Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
bac296f7
Commit
bac296f7
authored
Dec 25, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改接口地址
parent
46058aa3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
140 additions
and
139 deletions
+140
-139
verify.tsx
...rService/returnApplication/returnPrConfirmBack/verify.tsx
+140
-139
No files found.
src/pages/afterService/returnApplication/returnPrConfirmBack/verify.tsx
View file @
bac296f7
import
React
,
{
useState
}
from
'react'
;
import
{
Button
,
Space
,
Modal
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
,
RollbackOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
{
confirm
}
=
Modal
;
const
ReturnPrConfirmBackVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
(
info
)
=>
{
if
(
!
id
)
{
return
;
}
if
(
info
&&
info
.
returnDeliveryGoodsList
&&
info
.
returnDeliveryGoodsList
.
length
)
{
// 未退货发货数量有大于 0 时
if
(
info
.
returnDeliveryGoodsList
.
some
(
item
=>
{
return
item
.
detailList
.
some
(
good
=>
good
.
count
-
good
.
deliveryCount
>
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`您还有未退货发货的商品,是否确认全部退货发货都已完成?`
,
onOk
()
{
return
PublicApi
.
postAsReturnGoodsConfirmAllReturnGoodsReceipt
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
// 未退货发货数量全部小于或等于 0 时
if
(
info
.
returnDeliveryGoodsList
.
every
(
item
=>
{
return
item
.
detailList
.
every
(
good
=>
good
.
count
-
good
.
deliveryCount
<=
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认全部退货发货单已收到回单?`
,
onOk
()
{
return
PublicApi
.
postAsRe
placeGoodsConfirmAllReturnGoodsReceipt
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
}
};
const
handleDeliverAgain
=
(
info
)
=>
{
if
(
info
&&
info
.
returnDeliveryGoodsList
&&
info
.
returnDeliveryGoodsList
.
length
)
{
// 未退货发货数量全部小于或等于 0 时
if
(
info
.
returnDeliveryGoodsList
.
every
(
item
=>
{
return
item
.
detailList
.
every
(
good
=>
good
.
count
-
good
.
deliveryCount
<=
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`您商品都已退货发货,是否确认还需要继续退货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReturnGoodsContinueReturnDeliveryGoods
({
dataId
:
id
,
});
},
});
}
// 未退货发货数量有大于 0 时
if
(
info
.
returnDeliveryGoodsList
.
some
(
item
=>
{
return
item
.
detailList
.
some
(
good
=>
good
.
count
-
good
.
deliveryCount
>
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否继续退货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReturnGoodsContinueReturnDeliveryGoods
({
dataId
:
id
,
});
},
});
}
}
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
detailInfo
=>
(
<
Space
>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleSubmit
(
detailInfo
)
}
>
确认全部退货发货单已收到回单
</
Button
>
<
Button
type=
"default"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
handleDeliverAgain
(
detailInfo
)
}
>
继续退货发货
</
Button
>
</
Space
>
)
}
/>
</>
);
};
import
React
,
{
useState
}
from
'react'
;
import
{
Button
,
Space
,
Modal
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
,
RollbackOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
{
confirm
}
=
Modal
;
const
ReturnPrConfirmBackVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
(
info
)
=>
{
if
(
!
id
)
{
return
;
}
if
(
info
&&
info
.
returnDeliveryGoodsList
&&
info
.
returnDeliveryGoodsList
.
length
)
{
// 未退货发货数量有大于 0 时
if
(
info
.
returnDeliveryGoodsList
.
some
(
item
=>
{
return
item
.
detailList
.
some
(
good
=>
good
.
count
-
good
.
deliveryCount
>
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`您还有未退货发货的商品,是否确认全部退货发货都已完成?`
,
onOk
()
{
return
PublicApi
.
postAsReturnGoodsConfirmAllReturnGoodsReceipt
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
// 未退货发货数量全部小于或等于 0 时
if
(
info
.
returnDeliveryGoodsList
.
every
(
item
=>
{
return
item
.
detailList
.
every
(
good
=>
good
.
count
-
good
.
deliveryCount
<=
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认全部退货发货单已收到回单?`
,
onOk
()
{
return
PublicApi
.
postAsRe
turnGoodsConfirmAllReturnGoodsReceipt
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
});
},
});
}
}
};
const
handleDeliverAgain
=
(
info
)
=>
{
if
(
info
&&
info
.
returnDeliveryGoodsList
&&
info
.
returnDeliveryGoodsList
.
length
)
{
// 未退货发货数量全部小于或等于 0 时
if
(
info
.
returnDeliveryGoodsList
.
every
(
item
=>
{
return
item
.
detailList
.
every
(
good
=>
good
.
count
-
good
.
deliveryCount
<=
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`您商品都已退货发货,是否确认还需要继续退货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReturnGoodsContinueReturnDeliveryGoods
({
dataId
:
id
,
});
},
});
}
// 未退货发货数量有大于 0 时
if
(
info
.
returnDeliveryGoodsList
.
some
(
item
=>
{
return
item
.
detailList
.
some
(
good
=>
good
.
count
-
good
.
deliveryCount
>
0
)
})
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否继续退货发货?`
,
onOk
()
{
return
PublicApi
.
postAsReturnGoodsContinueReturnDeliveryGoods
({
dataId
:
id
,
});
},
});
}
}
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
detailInfo
=>
(
<
Space
>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleSubmit
(
detailInfo
)
}
>
确认全部退货发货单已收到回单
</
Button
>
<
Button
type=
"default"
icon=
{
<
RollbackOutlined
/>
}
onClick=
{
()
=>
handleDeliverAgain
(
detailInfo
)
}
>
继续退货发货
</
Button
>
</
Space
>
)
}
/>
</>
);
};
export
default
ReturnPrConfirmBackVerify
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment