Commit 6331efc7 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:处理手工下单编辑商品异常

parent 491cd73e
...@@ -181,7 +181,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => { ...@@ -181,7 +181,7 @@ const PurchaseOrderDetail:React.FC<PurchaseOrderDetailProps> = (props) => {
orderProductRequests: _orderProductRequests.map(v => { orderProductRequests: _orderProductRequests.map(v => {
v.price = 1 v.price = 1
v.isMemberPrice = Number(v.isMemberPrice) v.isMemberPrice = Number(v.isMemberPrice)
v.memberPrice = toPoint(v.memberPrice) v.memberPrice = v.memberPrice !== 1 ? toPoint(v.memberPrice) : 1
v.imgUrl = v.mainPic v.imgUrl = v.mainPic
v.minOrder = v.minOrder v.minOrder = v.minOrder
// v.productId = v.id // v.productId = v.id
......
...@@ -29,7 +29,8 @@ export const getUnitPriceTotal = (record) => { ...@@ -29,7 +29,8 @@ export const getUnitPriceTotal = (record) => {
} }
}) })
// 考虑会员折扣 // 考虑会员折扣
let memberPrice = record?.memberPrice ? toPoint(record.memberPrice) : 1 console.log('算价格', record.memberPrice)
let memberPrice = record.memberPrice !== 1 ? toPoint(record.memberPrice) : 1
return unitPrice * purchaseCount * memberPrice return unitPrice * purchaseCount * memberPrice
} }
export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActions) => { export const useProductTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActions) => {
......
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