Browse Source

判断物料唯一

hella_online_20240829
wangyufei 4 months ago
parent
commit
aa94548aaf
  1. 5
      src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

5
src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue

@ -113,7 +113,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
// row['itemCode'] = val[0]['code']
// row['uom'] = val[0]['uom']
val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return
if(tableData.value.find(item1=>item1['itemCode'] == item['code'])){
message.warning(`物料${item['code']}已经存在`)
return
}
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['itemCode'] = item['code']
newRow['uom'] = item['uom']

Loading…
Cancel
Save