|
|
@ -510,6 +510,13 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r |
|
|
|
} |
|
|
|
|
|
|
|
const updateTableData = (tableList)=>{ |
|
|
|
let itemCodes = tableList.filter(item=>tableData.value.find(item1=>item1['poNumber']==item['number']&&item1['supplierCode']==item['supplierCode']&&item1['poLine']==item['lineNumber']&&item1['itemCode']==item['itemCode'])) |
|
|
|
if(itemCodes.length>0){ |
|
|
|
itemCodes = itemCodes.map(item=>(item.itemCode)) |
|
|
|
message.warning(`物料${itemCodes.join(',')}已经存在`) |
|
|
|
} |
|
|
|
tableList = tableList.filter(item=>!tableData.value.find(item1=>item1['poNumber']==item['number']&&item1['supplierCode']==item['supplierCode']&&item1['poLine']==item['lineNumber']&&item1['itemCode']==item['itemCode'])) |
|
|
|
if(tableList.length==0) return |
|
|
|
tableList.forEach(row=>{ |
|
|
|
//poNumber poLine itemCode batch |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) |
|
|
|