|
|
@ -155,6 +155,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
newRow['qty'] = item['qty'] |
|
|
|
newRow['inventoryQty'] = item['qty'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['packingNumber'] = item['packingNumber'] |
|
|
|
newRow['batch'] = item['batch'] |
|
|
@ -189,6 +190,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
if (formField == 'itemCode') { |
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
setV['qty'] = val[0]['qty'] |
|
|
|
setV['inventoryQty'] = val[0]['qty'] |
|
|
|
setV['uom'] = val[0]['uom'] |
|
|
|
setV['packingNumber'] = val[0]['packingNumber'] |
|
|
|
setV['batch'] = val[0]['batch'] |
|
|
@ -450,8 +452,15 @@ const submitForm = async (formType, submitData) => { |
|
|
|
data.subList.forEach(item=>{ |
|
|
|
item['workStationCode'] = data['workStationCode'] |
|
|
|
}) |
|
|
|
const cmdExists = data.subList.some(filter => |
|
|
|
parseFloat(filter.inventoryQty) < parseFloat(filter.qty) |
|
|
|
); |
|
|
|
if(cmdExists){ |
|
|
|
message.warning("回收数量不能大于库存数量") |
|
|
|
return |
|
|
|
} |
|
|
|
if(data.subList.find(item => (item.qty <= 0))) { |
|
|
|
message.warning('数量必须大于0') |
|
|
|
message.warning('回收数量必须大于0') |
|
|
|
formRef.value.formLoading = false |
|
|
|
return |
|
|
|
} |
|
|
|