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
linweijiong
jinfa-platform
Commits
6f5cf3ec
Commit
6f5cf3ec
authored
Aug 18, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完善换货退货收、发货相关
parent
4dd8b2c4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
172 deletions
+132
-172
index.tsx
...ges/afterService/components/ExchangeDeliverInfo/index.tsx
+13
-20
index.tsx
...es/afterService/components/ExchangeReceivedInfo/index.tsx
+14
-21
interface.d.ts
...ges/afterService/components/ReturnAnalysis/interface.d.ts
+45
-42
verify.tsx
...rService/exchangeApplication/exchangePrDeliver/verify.tsx
+58
-21
verify.tsx
...afterService/exchangeManage/exchangePrReceived/verify.tsx
+2
-68
No files found.
src/pages/afterService/components/ExchangeDeliverInfo/index.tsx
View file @
6f5cf3ec
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-08 14:53:46
* @LastEditTime: 2021-0
8-17 18:27:41
* @Description: 换货发货统计、换货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -102,14 +102,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
render
:
(
text
,
record
)
=>
(
<
a
href=
{
`${target}/orderDetail?orderNo=${text}`
}
target=
"_blank"
>
{
text
}
</
a
>
),
},
{
title
:
'商品ID'
,
...
...
@@ -176,14 +168,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
render
:
(
text
,
record
)
=>
(
<
a
href=
{
`${target}/orderDetail?orderNo=${text}`
}
target=
"_blank"
>
{
text
}
</
a
>
),
},
{
title
:
'商品ID'
,
...
...
@@ -296,7 +280,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
>
{
radioValue
===
'1'
?
(
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
rowKey=
{
()
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
summary
}
columns=
{
summaryColumns
}
loading=
{
false
}
...
...
@@ -327,11 +311,20 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
{
item
.
logisticsId
?
(
<
Link
to=
{
`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`
}
>
{
item
.
logisticsOrderNo
}
</
Link
>
)
:
(
<
a
href=
{
`https://www.kuaidi100.com/chaxun?nu=${item.logisticsOrderNo}`
}
target=
"_blank"
>
{
item
.
logisticsOrderNo
}
</
a
>
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"换货入库单号"
>
{
isPurchaser
?
(
...
...
@@ -358,7 +351,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
contentStyle=
{
{
display
:
'block'
,
textAlign
:
'right'
}
}
>
{
(
isEdit
&&
!
isPurchaser
&&
...
...
@@ -414,7 +407,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
</
div
>
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
rowKey=
{
()
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
...
...
src/pages/afterService/components/ExchangeReceivedInfo/index.tsx
View file @
6f5cf3ec
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-09 18:09:01
* @LastEditTime: 2021-0
8-17 17:30:29
* @Description: 换货收货统计、换货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -104,14 +104,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
render
:
(
text
,
record
)
=>
(
<
a
href=
{
`${target}/orderDetail?orderNo=${text}`
}
target=
"_blank"
>
{
text
}
</
a
>
),
},
{
title
:
'商品ID'
,
...
...
@@ -178,14 +170,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
render
:
(
text
,
record
)
=>
(
<
a
href=
{
`${target}/orderDetail?orderNo=${text}`
}
target=
"_blank"
>
{
text
}
</
a
>
),
},
{
title
:
'商品ID'
,
...
...
@@ -305,7 +289,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
>
{
radioValue
===
'1'
?
(
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
rowKey=
{
()
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
summary
}
columns=
{
summaryColumns
}
loading=
{
false
}
...
...
@@ -314,7 +298,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
)
:
null
}
{
radioValue
===
'2'
?
(
<>
<
Tabs
>
<
Tabs
defaultActiveKey=
{
detailed
?
`${detailed[detailed.length - 1].batch}`
:
''
}
>
{
detailed
.
map
((
item
)
=>
(
<
TabPane
tab=
{
`第 ${item.batch} 批次`
}
...
...
@@ -336,11 +320,20 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
{
item
.
logisticsId
?
(
<
Link
to=
{
`/memberCenter/logisticsAbility/logisticsBillSubmit/logisticsBillQuery/preview?id=${item.logisticsId}`
}
>
{
item
.
logisticsOrderNo
}
</
Link
>
)
:
(
<
a
href=
{
`https://www.kuaidi100.com/chaxun?nu=${item.logisticsOrderNo}`
}
target=
"_blank"
>
{
item
.
logisticsOrderNo
}
</
a
>
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"退货入库单号"
>
{
!
isPurchaser
?
(
...
...
@@ -367,7 +360,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
contentStyle=
{
{
display
:
'block'
,
textAlign
:
'right'
}
}
>
{
(
isEdit
&&
isPurchaser
&&
...
...
@@ -423,7 +416,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
</
div
>
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
rowKey=
{
()
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
...
...
src/pages/afterService/components/ReturnAnalysis/interface.d.ts
View file @
6f5cf3ec
...
...
@@ -52,6 +52,49 @@ export interface SummaryData {
differenceCount
:
number
}
export
type
DetailedListItem
=
{
/**
* 订单号
*/
orderNo
?:
string
/**
* 商品id
*/
productId
?:
string
/**
* 商品名称
*/
productName
?:
string
/**
* 品类
*/
category
?:
string
/**
* 品牌
*/
brand
?:
string
/**
* 单位
*/
unit
?:
string
/**
* 数量
*/
count
?:
number
/**
* 发货数量
*/
deliveryCount
?:
number
/**
* 入库数量
*/
storageCount
?:
number
/**
* 差异数量,(差异数量=发货数量-入库数量)
*/
differenceCount
?:
number
}
export
interface
Detailed
{
/**
* 退货发货单号Id
...
...
@@ -108,46 +151,5 @@ export interface Detailed {
/**
* 发货明细 ,DeliveryGoodsDetailVO
*/
detailList
:
{
/**
* 订单号
*/
orderNo
?:
string
/**
* 商品id
*/
productId
?:
string
/**
* 商品名称
*/
productName
?:
string
/**
* 品类
*/
category
?:
string
/**
* 品牌
*/
brand
?:
string
/**
* 单位
*/
unit
?:
string
/**
* 数量
*/
count
?:
number
/**
* 发货数量
*/
deliveryCount
?:
number
/**
* 入库数量
*/
storageCount
?:
number
/**
* 差异数量,(差异数量=发货数量-入库数量)
*/
differenceCount
?:
number
}[]
detailList
:
DetailedListItem
[]
}
\ No newline at end of file
src/pages/afterService/exchangeApplication/exchangePrDeliver/verify.tsx
View file @
6f5cf3ec
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
6-07 17:08:04
* @LastEditTime: 2021-0
8-17 13:53:35
* @Description:
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -10,39 +10,56 @@ import { Button } from 'antd';
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
moment
from
'moment'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
,
EXCHANGE_GOODS_MANUAL_DELIVERY_CONTRACT
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
import
ReturnDeliverDrawer
,
{
ValuesType
}
from
'../../components/DeliverDrawer'
;
const
ExchangePrDeliverVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
[
modalVisible
,
setModal
Visible
]
=
useState
(
false
);
const
[
visible
,
set
Visible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
(
values
:
ValuesType
)
=>
{
if
(
!
id
)
{
return
;
}
const
{
productList
,
returnDeliverAddress
,
deliveryTime
,
logisticsNameTxt
,
logisticsOrderNo
,
}
=
values
;
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsManualReturnDeliveryGoods
({
dataId
:
id
,
...
values
,
dataId
:
+
id
,
deliveryAddress
:
`
${
returnDeliverAddress
.
fullAddress
}
${
returnDeliverAddress
.
name
}
/
${
returnDeliverAddress
.
phone
}
`
,
productList
:
productList
.
map
((
item
)
=>
({
productId
:
item
.
productId
,
returnCount
:
+
item
.
count
,
})),
deliveryTime
:
moment
(
deliveryTime
).
valueOf
(),
logisticsName
:
logisticsNameTxt
,
logisticsOrderNo
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
handleVisibleDrawer
(
false
);
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
handleVisible
=
flag
=>
{
set
Modal
Visible
(
!!
flag
);
const
handleVisible
Drawer
=
flag
=>
{
setVisible
(
!!
flag
);
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
info
=>
(
...
...
@@ -51,26 +68,46 @@ const ExchangePrDeliverVerify: React.FC = () => {
<
Button
type=
"default"
icon=
{
<
SettingOutlined
/>
}
onClick=
{
()
=>
handleVisible
(
true
)
}
onClick=
{
()
=>
handleVisibleDrawer
(
true
)
}
>
手工
退货发货
退货发货
</
Button
>
)
}
<
ReturnDeliverDrawer
afterType=
{
2
}
flowType=
"returnDeliver"
value=
{
{
productList
:
(
info
?.
goodsDetailList
.
filter
((
item
)
=>
item
.
isNeedReturn
&&
item
.
noDeliveryCount
>
0
)
.
map
((
item
)
=>
({
orderNo
:
item
.
orderNo
,
productId
:
item
.
productId
,
productName
:
item
.
productName
,
category
:
item
.
category
,
brand
:
item
.
brand
,
unit
:
item
.
unit
,
applyCount
:
item
.
replaceCount
,
deliveryCount
:
item
.
deliveryCount
,
noDeliveryCount
:
item
.
noDeliveryCount
,
receiveCount
:
item
.
receiveCount
,
subCount
:
item
.
subCount
,
count
:
item
.
noDeliveryCount
,
}))
),
}
}
deliveryType=
{
info
?.
returnGoodsAddress
.
deliveryType
}
visible=
{
visible
}
onClose=
{
()
=>
handleVisibleDrawer
(
false
)
}
onSubmit=
{
handleSubmit
}
submitLoading=
{
submitLoading
}
/>
</>
)
}
target=
"/memberCenter/afterService/exchangeApplication/exchangePrDeliver"
isEditRefundDeliver
/>
<
ManualDeliveryModal
title=
"退货发货处理"
visible=
{
modalVisible
}
confirmLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
onVisible=
{
handleVisible
}
isEdit=
{
true
}
/>
</>
);
};
...
...
src/pages/afterService/exchangeManage/exchangePrReceived/verify.tsx
View file @
6f5cf3ec
...
...
@@ -2,88 +2,22 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
07 19:36:18
* @LastEditTime: 2021-08-
17 17:20:05
* @Description:
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
SettingOutlined
}
from
'@ant-design/icons'
;
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
EXCHANGE_GOODS_MANUAL_DELIVERY
,
EXCHANGE_GOODS_MANUAL_DELIVERY_CONTRACT
}
from
'../../constants'
;
import
ManualDeliveryModal
from
'../../components/ManualDeliveryModal'
;
import
DetailInfo
from
'../components/DetailInfo'
;
const
ExchangePrReceivedVerify
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
handleSubmit
=
values
=>
{
if
(
!
id
)
{
return
;
}
setSubmitLoading
(
true
);
PublicApi
.
postAsReplaceGoodsConfirmManualReturnReceiveGoods
({
dataId
:
+
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
goBack
();
}
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
};
const
handleVisible
=
flag
=>
{
setModalVisible
(
!!
flag
);
};
return
(
<>
<
DetailInfo
id=
{
id
}
headExtra=
{
info
=>
{
const
detailed
=
info
||
{};
// @ts-ignore
const
{
manualReturnGoodsAddress
=
{}
}
=
detailed
;
return
(
<>
{
(
info
&&
(
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY
||
info
.
taskType
===
EXCHANGE_GOODS_MANUAL_DELIVERY_CONTRACT
))
&&
(
<>
<
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
}
/>
</>
)
}
</>
)
}
}
target=
"/memberCenter/afterService/exchangeManage/exchangePrReceived"
isEditRefundDeliver
/>
</>
);
};
...
...
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