|
@ -114,7 +114,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
if (formField == 'packingNumber') { |
|
|
if (formField == 'packingNumber') { |
|
|
|
|
|
let itemCodes = [] |
|
|
val.forEach(item=>{ |
|
|
val.forEach(item=>{ |
|
|
|
|
|
const findIndex = tableData.value.findIndex(valItem=>valItem['itemCode']==item.itemCode&&valItem['batch']==item.batch&&valItem['packingNumber']==item.packingNumber) |
|
|
|
|
|
if(findIndex == -1){ |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
newRow['packingNumber'] = item['packingNumber'] |
|
|
newRow['packingNumber'] = item['packingNumber'] |
|
|
newRow['containerNumber'] = item['containerNumber'] |
|
|
newRow['containerNumber'] = item['containerNumber'] |
|
@ -124,7 +127,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
newRow['fromLocationCode'] = item['locationCode'] |
|
|
newRow['fromLocationCode'] = item['locationCode'] |
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
tableData.value.push(newRow) |
|
|
tableData.value.push(newRow) |
|
|
|
|
|
}else{ |
|
|
|
|
|
itemCodes.push(item['packingNumber']) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
if(itemCodes.length>0){ |
|
|
|
|
|
message.warning(`${t('ts.包装号')}${itemCodes.join(',')}${t('ts.已经存在')}`); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
} |
|
|
} |
|
|