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
05556731
Commit
05556731
authored
Aug 11, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加退货数量默认值、过滤退货数量为0的数据
parent
4cc3d73b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
index.tsx
.../returnPrDeliver/components/ReturnDeliverDrawer/index.tsx
+16
-4
verify.tsx
...afterService/returnApplication/returnPrDeliver/verify.tsx
+6
-2
No files found.
src/pages/afterService/returnApplication/returnPrDeliver/components/ReturnDeliverDrawer/index.tsx
View file @
05556731
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-08-07 15:11:54
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-
09 14:12:50
* @LastEditTime: 2021-08-
11 16:36:25
* @Description: 退货发货处理抽屉
*/
import
React
from
'react'
;
...
...
@@ -18,7 +18,7 @@ import {
import
{
ArrayTable
}
from
'@formily/antd-components'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetAsReturnGoods
PageReturnedGoodsResponseDetail
,
GetAsReturnGoods
GetDetailByConsumerResponse
,
}
from
'@/services/AfterServiceV2Api'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
NiceForm
from
'@/components/NiceForm'
;
...
...
@@ -70,6 +70,10 @@ export type ValuesType = {
* 已发货数量
*/
deliveryCount
:
string
,
/**
* 未退货发货数量
*/
noDeliveryCount
:
number
,
}[],
/**
* 退货发货地址
...
...
@@ -77,6 +81,13 @@ export type ValuesType = {
returnDeliverAddress
:
AddressValueType
,
}
type
ProductListItemType
=
GetAsReturnGoodsGetDetailByConsumerResponse
[
'goodsDetailList'
][
0
]
&
{
/**
* 退货数量
*/
count
:
number
,
}
interface
IProps
{
/**
* 是否可见
...
...
@@ -89,7 +100,7 @@ interface IProps {
/**
* 商品列表
*/
productList
:
GetAsReturnGoodsPageReturnedGoodsResponseDetail
[],
productList
:
ProductListItemType
[],
},
/**
* 配送方式
...
...
@@ -153,7 +164,8 @@ const ReturnDeliverDrawer: React.FC<IProps> = (props) => {
const
{
productList
,
...
rest
}
=
values
;
onSubmit
({
...
rest
,
productList
:
productList
.
filter
((
item
)
=>
+
item
.
deliveryCount
<
+
item
.
returnCount
),
// 过滤掉退货数量为0的数据
productList
:
productList
.
filter
((
item
)
=>
+
item
.
deliveryCount
<
+
item
.
returnCount
&&
+
item
.
count
>
0
),
});
}
};
...
...
src/pages/afterService/returnApplication/returnPrDeliver/verify.tsx
View file @
05556731
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-06 11:36:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-1
0 18:18:45
* @LastEditTime: 2021-08-1
1 16:18:09
* @Description: 退货发货
*/
import
React
,
{
useState
}
from
'react'
;
...
...
@@ -77,7 +77,11 @@ const ReturnPrDeliverVerify: React.FC = () => {
<
ReturnDeliverDrawer
value=
{
{
productList
:
info
?.
goodsDetailList
.
filter
((
item
)
=>
item
.
isNeedReturn
&&
item
.
noDeliveryCount
>
0
),
productList
:
(
info
?.
goodsDetailList
.
filter
((
item
)
=>
item
.
isNeedReturn
&&
item
.
noDeliveryCount
>
0
)
.
map
((
item
)
=>
({
...
item
,
count
:
item
.
noDeliveryCount
}))
),
}
}
deliveryType=
{
info
?.
returnGoodsAddress
.
deliveryType
}
visible=
{
visible
}
...
...
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