Commit 21e004d1 authored by Bill's avatar Bill

fix: 修改加工订单时,订单号为必填

parent b58802fb
......@@ -269,15 +269,26 @@ const Add: React.FC<{}> = () => {
}
setSubmitLoading(true);
const detailList = someLists.map((item) => {
const orderData = values.source === 1
? {
orderId: item.orderId,
orderDetailId: item.fullId,
orderNo: item.orderNo,
productId: item.commodityId,
purchaseCount: item.orderTotal, // 订单数量
surplusProcessNum: item.restTotal, // 剩余加工数量
}
: {
productId: item.id,
purchaseCount:null,
surplusProcessNum:null,
}
return {
orederNo: item.orderNo, // 如果是商品加工,那么他没有订单号
productId: item.id, // skuid
...orderData,
productName: item.name,
category: item.customerCategoryName,
brand: item.brandName,
unit: item.unitName,
purchaseCount:null,
surplusProcessNum:null,
processNum: item.processNum || 0,
processPrice: item.processUnitPrice || 0,
processTotalPrice: item.processTotalPrice,
......
......@@ -52,20 +52,22 @@ const ProcessProducts = ({visible, cancel, rowSelection, ...restProps}) => {
(item) => {
return {
orderNo: record.orderNo,
orderId: record.id, // 订单id
// orderDetailId: item.id, // 订单商品唯一id
commodityId: item.productId, // 商品id
id: item.productId,
id: item.productId, // sku id
name: item.productName,
customerCategoryName: item.category,
brandName: item.brand,
unitName: item.unit,
orderTotal: item.purchaseCount,
orderTotal: item.purchaseCount, // 采购数量
restTotal: item.purchaseCount - (item.processNum || 0),
processNum: '',
processUnitPrice: '',
processTotalPrice: '',
price: item.price, //单价,
hasProcessNum: item.processNum || 0,
fullId: item.id
fullId: item.id, //订单商品唯一id
}
}
)
......
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