|
@ -509,6 +509,12 @@ const updateTableData = (tableList)=>{ |
|
|
//批次 |
|
|
//批次 |
|
|
newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
newRow['batch'] = formatDate(newRow['produceDate'],'YYYYMMDD'); |
|
|
newRow['defaultToLocationCode'] =row['defaultLocation'] |
|
|
newRow['defaultToLocationCode'] =row['defaultLocation'] |
|
|
|
|
|
if(Number(row['orderQty'])>1){ |
|
|
|
|
|
newRow['qty'] = 1 |
|
|
|
|
|
}else{ |
|
|
|
|
|
newRow['qty'] = row['orderQty'] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(!tableData.value.find((item:object)=>item.poNumber == newRow.poNumber&&item.itemCode == newRow.itemCode&&item.poLine == newRow.poLine&&item.batch == newRow.batch)){ |
|
|
if(!tableData.value.find((item:object)=>item.poNumber == newRow.poNumber&&item.itemCode == newRow.itemCode&&item.poLine == newRow.poLine&&item.batch == newRow.batch)){ |
|
|
tableData.value.push(newRow) |
|
|
tableData.value.push(newRow) |
|
|
} |
|
|
} |
|
@ -734,6 +740,11 @@ const submitForm = async (formType, submitData) => { |
|
|
tableData.value.forEach((row, index) => { |
|
|
tableData.value.forEach((row, index) => { |
|
|
row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() |
|
|
row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() |
|
|
}) |
|
|
}) |
|
|
|
|
|
if(tableData.value.find(item=>item['qty']>item['orderQty'])){ |
|
|
|
|
|
message.error('收货数不能大于订单数') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|