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
756e3f1c
Commit
756e3f1c
authored
Feb 24, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理渠道现货/手工下单传参数异常
parent
4621e9f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+1
-0
index.tsx
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
+2
-2
useProductTable.tsx
...tion/purchaseOrder/orderCollect/model/useProductTable.tsx
+7
-2
No files found.
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
756e3f1c
...
...
@@ -204,6 +204,7 @@ export const useOrderFormInitEffect = (ctx: ISchemaFormActions | ISchemaFormAsyn
purchaseCount
:
v
.
count
,
money
:
v
.
memberDiscount
?
(
v
.
count
*
1000
*
v
.
unitPrice
*
100
*
v
.
memberDiscount
*
100
)
/
10000000
:
(
v
.
count
*
1000
*
v
.
unitPrice
*
100
)
/
100000
,
productId
:
v
.
id
,
channelProductId
:
v
.
channelProductId
,
memberId
:
initValue
.
supplyMembersId
,
// 添加 memberId, memberRoleId 字段
memberRoleId
:
initValue
.
supplyMembersRoleId
,
commodityId
:
v
.
id
,
// 添加commodityId用于判断是商品价格是使用price字段还是unitPrice字段(也可判断是报价订单还是其他)
...
...
src/pages/transaction/purchaseOrder/orderCollect/index.tsx
View file @
756e3f1c
...
...
@@ -223,7 +223,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
v
.
memberPrice
=
v
.
memberPrice
v
.
imgUrl
=
v
.
mainPic
?
v
.
mainPic
:
v
.
imgUrl
v
.
minOrder
=
v
.
minOrder
v
.
channelProductId
=
v
?.
commodityUnitPriceAndPicId
v
.
channelProductId
=
v
?.
c
hannelProductId
||
v
?.
c
ommodityUnitPriceAndPicId
return
v
}),
orderModel
:
value
[
'orderModel'
],
...
...
@@ -262,7 +262,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
v
.
memberPrice
=
v
.
memberPrice
v
.
imgUrl
=
v
.
mainPic
?
v
.
mainPic
:
v
.
imgUrl
v
.
minOrder
=
v
.
minOrder
v
.
channelProductId
=
v
?.
commodityUnitPriceAndPicId
v
.
channelProductId
=
v
?.
c
hannelProductId
||
v
?.
c
ommodityUnitPriceAndPicId
// v.productId = v.id
// v.productName = v.name
// v.category = v.customerCategoryName
...
...
src/pages/transaction/purchaseOrder/orderCollect/model/useProductTable.tsx
View file @
756e3f1c
...
...
@@ -177,8 +177,13 @@ export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncAction
const
index
=
newData
.
findIndex
(
item
=>
row
.
id
===
item
.
id
);
const
item
=
newData
[
index
];
row
[
'money'
]
=
getUnitPriceTotal
(
row
)
// 通过下单模式判断 是否是询需报价下单
row
[
'productId'
]
=
ctx
.
getFieldValue
(
"orderModel"
)
===
OrderModalType
[
"HAND_ORDER"
]
?
row
.
id
:
row
.
productId
// 通过下单模式判断 是否是手工或者渠道手工下单
let
addModel
=
ctx
.
getFieldValue
(
"orderModel"
)
row
[
'productId'
]
=
(
addModel
===
OrderModalType
[
"HAND_ORDER"
]
||
addModel
===
OrderModalType
[
"CHANNEL_DIRECT_MINING_ORDER"
]
||
addModel
===
OrderModalType
[
"CHANNEL_SPOT_MANUAL_ORDER"
]
)
?
row
.
id
:
row
.
productId
newData
.
splice
(
index
,
1
,
{
...
item
,
...
row
,
...
...
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