Commit 756e3f1c authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix: 处理渠道现货/手工下单传参数异常

parent 4621e9f3
......@@ -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字段(也可判断是报价订单还是其他)
......
......@@ -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?.channelProductId || v?.commodityUnitPriceAndPicId
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?.channelProductId || v?.commodityUnitPriceAndPicId
// v.productId = v.id
// v.productName = v.name
// v.category = v.customerCategoryName
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment