|
@ -157,7 +157,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
if(formField == 'containerNumber') { |
|
|
if(formField == 'containerNumber') { |
|
|
|
|
|
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['containerNumber']==item['itemCode'])) |
|
|
|
|
|
if(itemCodes.length>0){ |
|
|
|
|
|
itemCodes = itemCodes.map(item=>(item['itemCode'])) |
|
|
|
|
|
message.warning(`物料${itemCodes.join(',')}已经存在`) |
|
|
|
|
|
} |
|
|
|
|
|
val = val.filter(item=>!tableData.value.find(item1=>item1['containerNumber']==item['itemCode'])) |
|
|
|
|
|
if(val.length==0) return |
|
|
val.forEach(item=>{ |
|
|
val.forEach(item=>{ |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
newRow['containerNumber'] = item['itemCode'] |
|
|
newRow['containerNumber'] = item['itemCode'] |
|
|