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
b42f6723
Commit
b42f6723
authored
Feb 19, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 显示售后换货积分订单相关
parent
f7678690
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
index.tsx
...rvice/exchangeApplication/components/DetailInfo/index.tsx
+6
-3
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+16
-0
No files found.
src/pages/afterService/exchangeApplication/components/DetailInfo/index.tsx
View file @
b42f6723
...
...
@@ -19,6 +19,8 @@ import {
import
{
EXCHANGE_OUTER_STATUS_FINISHED
,
EXCHANGE_INNER_STATUS_UNCOMMITTED
,
ORDER_TYPE2_POINTS
,
ORDER_TYPE2_CHANNEL_POINTS
,
}
from
'@/constants'
;
import
{
normalizeFiledata
,
FileData
,
findLastIndexFlowState
}
from
'@/utils'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
...
...
@@ -76,6 +78,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const
[
replaceGoodsLoading
,
setExchangeGoodsLoading
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoloading
]
=
useState
(
false
);
const
isPointsOrder
=
detailInfo
?.
orderType
===
ORDER_TYPE2_POINTS
||
detailInfo
?.
orderType
===
ORDER_TYPE2_CHANNEL_POINTS
;
const
productColumns
:
EditableColumns
[]
=
[
{
title
:
'订单号'
,
...
...
@@ -114,17 +117,17 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
align
:
'center'
,
},
{
title
:
'采购
数量'
,
title
:
!
isPointsOrder
?
'采购数量'
:
'兑换
数量'
,
dataIndex
:
'purchaseCount'
,
align
:
'center'
,
},
{
title
:
'采购单价
'
,
title
:
!
isPointsOrder
?
'采购单价'
:
'所需积分
'
,
dataIndex
:
'purchasePrice'
,
align
:
'center'
,
},
{
title
:
'采购金额
'
,
title
:
!
isPointsOrder
?
'采购金额'
:
'所需积分小计
'
,
dataIndex
:
'purchaseAmount'
,
align
:
'center'
,
},
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
b42f6723
...
...
@@ -188,6 +188,19 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
];
};
const
setColumnsTitle
=
(
orderType
:
number
)
=>
{
const
isPointsOrder
=
orderType
===
ORDER_TYPE2_POINTS
||
orderType
===
ORDER_TYPE2_CHANNEL_POINTS
;
// addSchemaAction.setFieldState('replaceGoodsList.*.purchasePrice', state => {
// state.title = !isPointsOrder ? '采购单价' : '所需积分';
// });
// addSchemaAction.setFieldState('replaceGoodsList.*.purchaseCount', state => {
// state.title = !isPointsOrder ? '采购数量' : '兑换数量';
// });
// addSchemaAction.setFieldState('replaceGoodsList.*.purchaseAmount', state => {
// state.title = !isPointsOrder ? '采购金额' : '所需积分小计';
// });
};
// 根据供应会员获取订单列表
const
getOrderList
=
(
params
):
Promise
<
OrderListRes
>
=>
{
const
supplierMemberValue
=
addSchemaAction
.
getFieldValue
(
'supplierMember'
);
...
...
@@ -295,6 +308,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
...
rest
,
});
setGoodsValue
(
goodsDetailList
.
map
(
item
=>
item
.
orderRecordId
));
setColumnsTitle
(
orderType
);
}
}).
finally
(()
=>
{
setInfoLoading
(
false
);
...
...
@@ -514,6 +528,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
const
handleGoodsConfirm
=
values
=>
{
const
preValues
=
addSchemaAction
.
getFieldValue
(
'replaceGoodsList'
);
const
value
=
[];
const
first
=
values
.
length
?
values
[
0
]
:
{};
values
.
forEach
(
item
=>
{
const
atom
=
{
...
...
@@ -541,6 +556,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
if
(
preValues
.
length
)
{
newData
.
reverse
();
}
setColumnsTitle
(
first
.
orderType
);
addSchemaAction
.
setFieldValue
(
'replaceGoodsList'
,
newData
);
};
...
...
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