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
b9af4593
Commit
b9af4593
authored
Oct 28, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改订单-修改商品价格时无法修改支付信息
parent
96ee62f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+1
-0
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+17
-7
No files found.
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
b9af4593
...
...
@@ -87,6 +87,7 @@ export const useEditHideField = () => {
export
const
useProductTableChangeForPay
=
(
ctx
:
ISchemaFormActions
|
ISchemaFormAsyncActions
,
update
)
=>
{
FormEffectHooks
.
onFieldValueChange$
(
'orderProductRequests'
).
subscribe
(
state
=>
{
const
{
value
}
=
state
console
.
log
(
value
)
const
payInfoData
=
ctx
.
getFieldValue
(
'paymentInformationResponses'
)
// 强制渲染一次, 用于触发金额总数
update
()
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
b9af4593
...
...
@@ -300,15 +300,25 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
TheInvoiceList
}
}
effects=
{
(
$
,
ctx
)
=>
{
if
(
id
)
{
ctx
.
setFieldState
(
'orderModel'
,
state
=>
{
state
.
props
[
"x-component-props"
]
=
{
disabled
:
true
}
})
}
$
(
'onFormMount'
).
subscribe
(()
=>
{
if
(
id
)
{
ctx
.
setFieldState
(
'orderModel'
,
state
=>
{
state
.
props
[
"x-component-props"
]
=
{
disabled
:
true
}
})
}
})
// 监听商品总价的变更, 此处逻辑需优化
$
(
'sumPrice'
).
subscribe
(
payload
=>
{
const
oldData
=
[...
addSchemaAction
.
getFieldValue
(
'paymentInformationResponses'
)];
if
(
oldData
&&
oldData
.
length
>
0
)
{
const
newData
=
oldData
.
map
(
v
=>
{
v
.
payPrice
=
(
v
.
payRatio
/
100
*
payload
).
toFixed
(
2
)
return
v
})
addSchemaAction
.
setFieldValue
(
'paymentInformationResponses'
,
newData
)
}
setProductSumPrice
(
payload
)
})
$
(
'onFieldInputChange'
,
'orderModel'
).
subscribe
(
state
=>
{
...
...
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