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
shenshaokai
jinfa-platform
Commits
e5d82bda
Commit
e5d82bda
authored
Dec 14, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成售后换货手工发货相关流程
parent
1fea8375
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
137 additions
and
98 deletions
+137
-98
verify.tsx
...rService/exchangeApplication/exchangePrDeliver/verify.tsx
+15
-9
verify.tsx
...Service/exchangeApplication/exchangePrReceived/verify.tsx
+39
-19
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+9
-25
verify.tsx
.../afterService/exchangeManage/exchangePrDeliver/verify.tsx
+15
-9
verify.tsx
...afterService/exchangeManage/exchangePrReceived/verify.tsx
+38
-18
verify.tsx
...s/afterService/exchangeManage/exchangePrSubmit/verify.tsx
+20
-16
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+1
-1
verify.tsx
...ges/afterService/returnManage/returnPrReceived/verify.tsx
+0
-1
No files found.
src/pages/afterService/exchangeApplication/exchangePrDeliver/verify.tsx
View file @
e5d82bda
...
...
@@ -4,6 +4,7 @@ import { history } from 'umi';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
...
...
@@ -17,8 +18,9 @@ const ExchangePrDeliverVerify: React.FC = () => {
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoods
Confirm
ReturnDeliveryGoods
({
PublicApi
.
postAsReplaceGoods
Manual
ReturnDeliveryGoods
({
dataId
:
id
,
...
values
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
...
...
@@ -36,14 +38,18 @@ const ExchangePrDeliverVerify: React.FC = () => {
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
()
=>
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工退货发货
</
Button
>
headExtra=
{
info
=>
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工退货发货
</
Button
>
)
}
</>
)
}
/>
...
...
src/pages/afterService/exchangeApplication/exchangePrReceived/verify.tsx
View file @
e5d82bda
...
...
@@ -4,6 +4,7 @@ import { history } from 'umi';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
...
...
@@ -17,7 +18,7 @@ const ExchangePrReceivedVerify: React.FC = () => {
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsConfirmReplaceReceiveGoods
({
PublicApi
.
postAsReplaceGoodsConfirm
Manual
ReplaceReceiveGoods
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -36,24 +37,43 @@ const ExchangePrReceivedVerify: React.FC = () => {
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
(
detailInfo
)
=>
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工确认换货收货
</
Button
>
)
}
/>
<
ManualDeliveryModal
title=
"确认换货收货"
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
false
}
headExtra=
{
info
=>
{
const
detailed
=
info
||
{};
// @ts-ignore
const
{
manualReplaceGoodsAddress
=
{}
}
=
detailed
;
return
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工确认换货收货
</
Button
>
<
ManualDeliveryModal
key=
"2"
title=
"确认换货收货"
value=
{
{
deliveryAddressTxt
:
manualReplaceGoodsAddress
.
deliveryAddress
,
deliveryTime
:
manualReplaceGoodsAddress
.
deliveryTime
,
logisticsOrderNo
:
manualReplaceGoodsAddress
.
logisticsOrderNo
,
logisticsNameTxt
:
manualReplaceGoodsAddress
.
logisticsName
,
}
}
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
false
}
/>
</>
)
}
</>
)
}
}
/>
</>
);
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
e5d82bda
...
...
@@ -60,7 +60,6 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
const
[
replaceGoodsList
,
setReplaceGoodsList
]
=
useState
<
GetAsReplaceGoodsPageReturnedGoodsResponse
>
({
data
:
[],
totalCount
:
0
});
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
replaceGoodsLoading
,
setExchangeGoodsLoading
]
=
useState
(
false
);
const
[
goodsValue
,
setGoodsValue
]
=
useState
([]);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
...
...
@@ -243,44 +242,27 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
,
...
rest
,
});
}
}).
finally
(()
=>
{
setInfoLoading
(
false
);
});
};
// 获取换货明细列表
const
getReplaceGoods
=
()
=>
{
if
(
!
id
)
{
return
;
}
setExchangeGoodsLoading
(
true
);
PublicApi
.
getAsReplaceGoodsPageReturnedGoods
({
replaceId
:
id
,
current
:
`
${
1
}
`
,
pageSize
:
`
${
99999
}
`
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setReplaceGoodsList
({
data
:
res
.
data
.
data
.
map
(
item
=>
({
data
:
goodsDetailList
.
map
(
item
=>
({
...
item
,
extraData
:
{
replacedCount
:
item
.
purchaseCount
||
0
,
// 已换货数量,这里取 采购数量判断即可
id
:
item
.
orderRecordId
,
taskType
,
},
})),
totalCount
:
res
.
data
.
totalCount
,
totalCount
:
goodsDetailList
.
length
,
});
setGoodsValue
(
res
.
data
&&
res
.
data
.
data
?
res
.
data
.
data
.
map
(
item
=>
item
.
orderRecordId
)
:
[]
);
setGoodsValue
(
goodsDetailList
.
map
(
item
=>
item
.
orderRecordId
)
);
}
}).
finally
(()
=>
{
set
ExchangeGoods
Loading
(
false
);
set
Info
Loading
(
false
);
});
};
useEffect
(()
=>
{
getDetailInfo
();
getReplaceGoods
();
},
[]);
const
handleAddGoods
=
()
=>
{
...
...
@@ -327,6 +309,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
setSubmitLoading
(
true
);
const
payload
=
{
...
rest
,
replaceId
:
id
||
0
,
supplierMemberId
:
supplierMember
[
0
].
memberId
,
supplierRoleId
:
supplierMember
[
0
].
roleId
,
...
...
@@ -386,7 +369,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
unit
:
unit
||
''
,
...
rest
,
})),
...
rest
,
taskType
:
replaceGoodsList
[
0
].
extraData
.
taskType
,
};
PublicApi
.
postAsReplaceGoodsSave
(
payload
)
...
...
@@ -457,6 +440,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
extraData
:
{
replacedCount
:
item
.
replaceCount
||
item
.
purchaseCount
||
0
,
// 已换货数量
id
:
item
.
id
,
taskType
:
item
.
processEnum
,
},
};
value
.
push
(
atom
);
...
...
@@ -477,7 +461,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
);
return
(
<
Spin
spinning=
{
infoLoading
||
replaceGoodsLoading
}
>
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
style=
{
{
padding
:
24
,
...
...
src/pages/afterService/exchangeManage/exchangePrDeliver/verify.tsx
View file @
e5d82bda
...
...
@@ -4,6 +4,7 @@ import { history } from 'umi';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
...
...
@@ -17,8 +18,9 @@ const ExchangePrDeliverVerify: React.FC = () => {
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoods
Confirm
ReplaceDeliveryGoods
({
PublicApi
.
postAsReplaceGoods
Manual
ReplaceDeliveryGoods
({
dataId
:
id
,
...
values
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
...
...
@@ -36,14 +38,18 @@ const ExchangePrDeliverVerify: React.FC = () => {
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
()
=>
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工换货发货
</
Button
>
headExtra=
{
info
=>
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工换货发货
</
Button
>
)
}
</>
)
}
/>
...
...
src/pages/afterService/exchangeManage/exchangePrReceived/verify.tsx
View file @
e5d82bda
...
...
@@ -4,6 +4,7 @@ import { history } from 'umi';
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
...
...
@@ -17,7 +18,7 @@ const ExchangePrReceivedVerify: React.FC = () => {
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsConfirmReturnReceiveGoods
({
PublicApi
.
postAsReplaceGoodsConfirm
Manual
ReturnReceiveGoods
({
dataId
:
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -36,23 +37,42 @@ const ExchangePrReceivedVerify: React.FC = () => {
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
()
=>
(
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工确认退货收货
</
Button
>
)
}
/>
<
ManualDeliveryModal
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
false
}
headExtra=
{
info
=>
{
const
detailed
=
info
||
{};
// @ts-ignore
const
{
manualReturnGoodsAddress
=
{}
}
=
detailed
;
return
(
<>
{
(
info
&&
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
)
&&
(
<>
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
>
手工确认退货收货
</
Button
>
<
ManualDeliveryModal
key=
"2"
value=
{
{
deliveryAddressTxt
:
manualReturnGoodsAddress
.
deliveryAddress
,
deliveryTime
:
manualReturnGoodsAddress
.
deliveryTime
,
logisticsOrderNo
:
manualReturnGoodsAddress
.
logisticsOrderNo
,
logisticsNameTxt
:
manualReturnGoodsAddress
.
logisticsName
,
}
}
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
false
}
/>
</>
)
}
</>
)
}
}
/>
</>
);
...
...
src/pages/afterService/exchangeManage/exchangePrSubmit/verify.tsx
View file @
e5d82bda
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-04 17:22:07
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
04 18:39:57
* @LastEditTime: 2020-12-
14 19:55:14
* @Description:
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -88,19 +88,23 @@ const ExchangePrSubmitVerify: React.FC = () => {
message
.
error
(
'请选择换货自提地址'
);
return
;
}
setReturnAddress
({
receiveId
:
returnAddress
.
id
,
receiveAddress
:
returnAddress
.
receiveAddress
,
receiveUserName
:
returnAddress
.
receiveUserName
,
receiveUserTel
:
returnAddress
.
receiveUserTel
,
});
setExchangeAddress
({
deliveryType
:
exchangeAddress
.
deliveryType
,
sendId
:
exchangeAddress
.
id
,
sendAddress
:
exchangeAddress
.
sendAddress
,
sendUserName
:
exchangeAddress
.
sendUserName
,
sendUserTel
:
exchangeAddress
.
sendUserTel
,
});
if
(
returnAddress
)
{
setReturnAddress
({
receiveId
:
returnAddress
.
id
,
receiveAddress
:
returnAddress
.
receiveAddress
,
receiveUserName
:
returnAddress
.
receiveUserName
,
receiveUserTel
:
returnAddress
.
receiveUserTel
,
});
}
if
(
exchangeAddress
)
{
setExchangeAddress
({
deliveryType
:
exchangeAddress
.
deliveryType
,
sendId
:
exchangeAddress
.
id
,
sendAddress
:
exchangeAddress
.
sendAddress
,
sendUserName
:
exchangeAddress
.
sendUserName
,
sendUserTel
:
exchangeAddress
.
sendUserTel
,
});
}
setVisible
(
true
);
};
...
...
@@ -112,8 +116,8 @@ const ExchangePrSubmitVerify: React.FC = () => {
PublicApi
.
postAsReplaceGoodsSubmitVerify
({
applyId
:
id
,
...
values
,
...
exchangeAddress
,
...
returnAddress
,
...
(
exchangeAddress
||
{})
,
...
(
returnAddress
||
{})
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
e5d82bda
...
...
@@ -386,7 +386,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
}),
isNeedReturn
:
1
,
})),
taskType
:
returnGoodsList
[
0
].
taskType
,
taskType
:
returnGoodsList
[
0
].
extraData
.
taskType
,
};
PublicApi
.
postAsReturnGoodsSave
(
payload
)
...
...
src/pages/afterService/returnManage/returnPrReceived/verify.tsx
View file @
e5d82bda
...
...
@@ -21,7 +21,6 @@ const ReturnPrReceivedVerify: React.FC = () => {
setSubmitLoading
(
true
);
PublicApi
.
postAsReturnGoodsConfirmManualReturnReceiveGoods
({
dataId
:
id
,
...
values
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
...
...
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