diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index ae42c44cb..91d5fb334 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -199,6 +199,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'toLocationCode'){ row['toLocationCode'] = val[0]['code'] } else if(formField == 'itemCode'){ + let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['code'])) + if(itemCodes.length>0){ + itemCodes = itemCodes.map(item=>(item['code'])) + message.warning(`物料${itemCodes.join(',')}已经存在`) + } + val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode'])) if(val.length==0){ return }