Browse Source

HL-6005提示发货记录单号占用,现选择完数量显示0

hella_online_20240927
yufei_wang 2 months ago
parent
commit
9438c8b77e
  1. 18
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

18
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -234,6 +234,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
tableData.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 => {
console.log(err)
message.error('错误')
@ -745,11 +754,16 @@ const clearSearchInput = (field)=>{
}
//true0
const inputNumberChange = (field, val,row, index) => {
console.log('inputNumberChange',formRef.value.formRef)
if(field=='qty'){
if(row['subReturnedQty']<=0){
message.error(`发货记录单号${formRef.value.formRef.formModel['deliverRecordNumber']}物料${row['itemCode']}被占用`)
}
if(row['subReturnedQty']!=null&&row['qty']>row['subReturnedQty']){
message.error(`物料${row['itemCode']}最大数量为${row['subReturnedQty']}`)
}
}
console.log('inputNumberChange',field, val,row, index)
}
//
@ -760,6 +774,10 @@ const submitForm = async (formType, submitData) => {
}
let flag = true
tableData.value.forEach(item=>{
if(item['subReturnedQty']<=0){
flag = false
message.error(`发货记录单号${data['deliverRecordNumber']}物料${item['itemCode']}被占用`)
}
if(item['subReturnedQty']!=null&&item['qty']>item['subReturnedQty']){
flag = false
message.error(`物料${item['itemCode']}最大数量为${item['subReturnedQty']}`)

Loading…
Cancel
Save