|
@ -325,7 +325,6 @@ const tableSelectionDelete = (selection) => { |
|
|
tableData.value = tableData.value.filter(item => !selection.includes(item)) |
|
|
tableData.value = tableData.value.filter(item => !selection.includes(item)) |
|
|
} |
|
|
} |
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|
//为true表示子表数据中存在数量为0的数据 |
|
|
const flag = ref() |
|
|
|
|
|
|
|
|
|
|
|
// 主子数据 提交 |
|
|
// 主子数据 提交 |
|
|
const submitForm = async (formType, submitData) => { |
|
|
const submitForm = async (formType, submitData) => { |
|
@ -334,15 +333,20 @@ const submitForm = async (formType, submitData) => { |
|
|
data.id = data.masterId |
|
|
data.id = data.masterId |
|
|
} |
|
|
} |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
|
|
let flag = false |
|
|
data.subList.forEach(item => { |
|
|
data.subList.forEach(item => { |
|
|
item.toBatch = item.fromBatch |
|
|
item.toBatch = item.fromBatch |
|
|
item.fromLocationCode = data.fromLocationCode |
|
|
item.fromLocationCode = data.fromLocationCode |
|
|
item.toLocationCode = data.toLocationCode |
|
|
item.toLocationCode = data.toLocationCode |
|
|
item.toInventoryStatus = data.toInventoryStatus |
|
|
item.toInventoryStatus = data.toInventoryStatus |
|
|
|
|
|
if(item.checkQty>0&&Number(item.qty)==0){ |
|
|
if(item.qty == 0){ |
|
|
message.error(`${item['itemCode']}数量不能为0!`) |
|
|
message.error(`数量不能为0!`) |
|
|
flag = true |
|
|
flag.value = true |
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(item.checkQty>0&&item.qty<0){ |
|
|
|
|
|
message.error(`${item['itemCode']}数量不能小于0!`) |
|
|
|
|
|
flag = true |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -351,7 +355,7 @@ const submitForm = async (formType, submitData) => { |
|
|
message.warning('从库位和到库位不能相同') |
|
|
message.warning('从库位和到库位不能相同') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if(flag.value){ |
|
|
if(flag){ |
|
|
formRef.value.formLoading = false |
|
|
formRef.value.formLoading = false |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
@ -387,6 +391,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
newRow['fromInventoryStatus'] = item['inventoryStatus'] |
|
|
newRow['fromInventoryStatus'] = item['inventoryStatus'] |
|
|
newRow['origin_fromLocationCode'] = item['locationCode'] |
|
|
newRow['origin_fromLocationCode'] = item['locationCode'] |
|
|
newRow['uom'] = item['uom'] |
|
|
newRow['uom'] = item['uom'] |
|
|
|
|
|
newRow['checkQty'] = item['qty'] //用于保存的时候作校验 HL-5524 |
|
|
newRow['qty'] = item['qty'] |
|
|
newRow['qty'] = item['qty'] |
|
|
if(item['packingNumber']&&item['packingNumber'].length>0){ |
|
|
if(item['packingNumber']&&item['packingNumber'].length>0){ |
|
|
newRow['packUnit'] = item['packUnit'] |
|
|
newRow['packUnit'] = item['packUnit'] |
|
|