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
700178c7
Commit
700178c7
authored
Feb 20, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加积分订单展示相关
parent
4e57c28a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
16 deletions
+13
-16
index.tsx
...cation/exchangePrSubmit/components/ExchangeForm/index.tsx
+3
-10
index.ts
.../exchangePrSubmit/components/ExchangeForm/schema/index.ts
+10
-6
No files found.
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/index.tsx
View file @
700178c7
...
...
@@ -99,6 +99,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
const
[
goodsValue
,
setGoodsValue
]
=
useState
([]);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
const
[
applyType
,
setApplyType
]
=
useState
(
1
);
const
tableColumn
:
ColumnType
<
any
>
[]
=
[
{
...
...
@@ -190,15 +191,7 @@ 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 ? '采购金额' : '所需积分小计';
// });
setApplyType
(
isPointsOrder
?
2
:
1
);
};
// 根据供应会员获取订单列表
...
...
@@ -644,7 +637,7 @@ const ExchangeForm: React.FC<BillsFormProps> = ({
}
}
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
schema=
{
addBillSchema
}
schema=
{
addBillSchema
(
applyType
)
}
/>
</
Card
>
...
...
src/pages/afterService/exchangeApplication/exchangePrSubmit/components/ExchangeForm/schema/index.ts
View file @
700178c7
...
...
@@ -68,7 +68,11 @@ const supplierSchema: ISchema = {
},
};
export
const
addBillSchema
:
ISchema
=
{
/**
*
* @param type 类型目前只有 1.普通的 跟 2.积分的
*/
export
const
addBillSchema
=
(
applyType
:
number
):
ISchema
=>
({
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
...
...
@@ -264,17 +268,17 @@ export const addBillSchema: ISchema = {
},
purchaseCount
:
{
type
:
'string'
,
title
:
'采购
数量'
,
title
:
applyType
!==
2
?
'采购数量'
:
'兑换
数量'
,
'x-component'
:
'Text'
,
},
purchasePrice
:
{
type
:
'string'
,
title
:
'采购单价
'
,
title
:
applyType
!==
2
?
'采购单价'
:
'所需积分
'
,
'x-component'
:
'Text'
,
},
purchaseAmount
:
{
type
:
'string'
,
title
:
'采购金额
'
,
title
:
applyType
!==
2
?
'采购金额'
:
'所需积分小计
'
,
'x-component'
:
'Text'
,
},
replaceCount
:
{
...
...
@@ -457,4 +461,4 @@ export const addBillSchema: ISchema = {
},
},
},
};
\ No newline at end of file
});
\ 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