diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index 157816868..8d4556556 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -441,6 +441,7 @@ // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = [] + let flag = false for (let item of tableData.value) { await PurchaseDetailApi.getPurchaseDetailPageCheckData({ number: item.poNumber, @@ -449,13 +450,20 @@ console.log("【要货计划】-每条数据结果",item) if(res.list[0].type == 'DISCRETE'){//只有离散单需要这个校验 if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) { + flag = true; message.error('要货计划数量不得大于订单数量-已计划数量') return + }else{ + data.subList.push(item) // 拼接子表数据参数 } + }else{ + data.subList.push(item) // 拼接子表数据参数 } - data.subList.push(item) // 拼接子表数据参数 }) } + if(flag){ + return; + } if (data.subList.length == tableData.value.length) { try { if (formType === 'create') {