|
@ -234,6 +234,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
tableData.value = [...res.list] |
|
|
tableData.value = [...res.list] |
|
|
originTableData.value = [...res.list] |
|
|
originTableData.value = [...res.list] |
|
|
} |
|
|
} |
|
|
|
|
|
let messageItemCode = [] |
|
|
|
|
|
tableData.value.forEach(item=>{ |
|
|
|
|
|
if(item['subReturnedQty']<=0){ |
|
|
|
|
|
messageItemCode.push(item['itemCode']) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
if(messageItemCode.length>0){ |
|
|
|
|
|
message.error(`发货记录单号${val[0]['number']}物料${messageItemCode.join(',')}被占用`) |
|
|
|
|
|
} |
|
|
}).catch(err => { |
|
|
}).catch(err => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
message.error('错误') |
|
|
message.error('错误') |
|
@ -745,11 +754,16 @@ const clearSearchInput = (field)=>{ |
|
|
} |
|
|
} |
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|
const inputNumberChange = (field, val,row, index) => { |
|
|
const inputNumberChange = (field, val,row, index) => { |
|
|
|
|
|
console.log('inputNumberChange',formRef.value.formRef) |
|
|
if(field=='qty'){ |
|
|
if(field=='qty'){ |
|
|
|
|
|
if(row['subReturnedQty']<=0){ |
|
|
|
|
|
message.error(`发货记录单号${formRef.value.formRef.formModel['deliverRecordNumber']}物料${row['itemCode']}被占用`) |
|
|
|
|
|
} |
|
|
if(row['subReturnedQty']!=null&&row['qty']>row['subReturnedQty']){ |
|
|
if(row['subReturnedQty']!=null&&row['qty']>row['subReturnedQty']){ |
|
|
message.error(`物料${row['itemCode']}最大数量为${row['subReturnedQty']}`) |
|
|
message.error(`物料${row['itemCode']}最大数量为${row['subReturnedQty']}`) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.log('inputNumberChange',field, val,row, index) |
|
|
console.log('inputNumberChange',field, val,row, index) |
|
|
} |
|
|
} |
|
|
// 主子数据 提交 |
|
|
// 主子数据 提交 |
|
@ -760,6 +774,10 @@ const submitForm = async (formType, submitData) => { |
|
|
} |
|
|
} |
|
|
let flag = true |
|
|
let flag = true |
|
|
tableData.value.forEach(item=>{ |
|
|
tableData.value.forEach(item=>{ |
|
|
|
|
|
if(item['subReturnedQty']<=0){ |
|
|
|
|
|
flag = false |
|
|
|
|
|
message.error(`发货记录单号${data['deliverRecordNumber']}物料${item['itemCode']}被占用`) |
|
|
|
|
|
} |
|
|
if(item['subReturnedQty']!=null&&item['qty']>item['subReturnedQty']){ |
|
|
if(item['subReturnedQty']!=null&&item['qty']>item['subReturnedQty']){ |
|
|
flag = false |
|
|
flag = false |
|
|
message.error(`物料${item['itemCode']}最大数量为${item['subReturnedQty']}`) |
|
|
message.error(`物料${item['itemCode']}最大数量为${item['subReturnedQty']}`) |
|
|