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) => { const submitForm = async (formType, data) => {
data.subList = [] data.subList = []
let flag = false
for (let item of tableData.value) { for (let item of tableData.value) {
await PurchaseDetailApi.getPurchaseDetailPageCheckData({ await PurchaseDetailApi.getPurchaseDetailPageCheckData({
number: item.poNumber, number: item.poNumber,
@ -449,13 +450,20 @@
console.log("【要货计划】-每条数据结果",item) console.log("【要货计划】-每条数据结果",item)
if(res.list[0].type == 'DISCRETE'){// if(res.list[0].type == 'DISCRETE'){//
if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) { if (item.planQty > res.list[0].orderQty - res.list[0].plannedQty) {
flag = true;
message.error('要货计划数量不得大于订单数量-已计划数量') message.error('要货计划数量不得大于订单数量-已计划数量')
return 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) { if (data.subList.length == tableData.value.length) {
try { try {
if (formType === 'create') { if (formType === 'create') {

Loading…
Cancel
Save