|
@ -222,6 +222,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
newRow['uom'] = item['uom'] |
|
|
newRow['uom'] = item['uom'] |
|
|
newRow['singlePrice'] = itemCode ? itemCode['price'] : '' |
|
|
newRow['singlePrice'] = itemCode ? itemCode['price'] : '' |
|
|
newRow['amount'] = newRow['qty'] * newRow['singlePrice'] |
|
|
newRow['amount'] = newRow['qty'] * newRow['singlePrice'] |
|
|
|
|
|
newRow['inventoryQty'] = item['qty'] |
|
|
tableData.value.push(newRow) |
|
|
tableData.value.push(newRow) |
|
|
}) |
|
|
}) |
|
|
// row['singlePrice'] = res.price |
|
|
// row['singlePrice'] = res.price |
|
@ -725,6 +726,13 @@ const submitForm = async (formType, submitData) => { |
|
|
item.amount = Number(item.amount).toFixed(2) |
|
|
item.amount = Number(item.amount).toFixed(2) |
|
|
}) |
|
|
}) |
|
|
try { |
|
|
try { |
|
|
|
|
|
const cmdExists = data.subList.some(filter => |
|
|
|
|
|
parseFloat(filter.inventoryQty) < parseFloat(filter.qty) |
|
|
|
|
|
); |
|
|
|
|
|
if(cmdExists){ |
|
|
|
|
|
message.warning("数量不能大于库存数量") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
console.log('【报废出库子列表】', data.subList) |
|
|
console.log('【报废出库子列表】', data.subList) |
|
|
if (data.subList.length == 0) { |
|
|
if (data.subList.length == 0) { |
|
|