Browse Source

修改校验逻辑

master_hella_20240701
zhaoxuebing 8 months ago
parent
commit
3b6c504ac0
  1. 10
      src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue

10
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') {

Loading…
Cancel
Save