Browse Source

校验重复

hella_online_20240829
wangyufei 4 months ago
parent
commit
d4c257833a
  1. 4
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 4
      src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

4
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -210,6 +210,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if (formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`)
return
}
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]

4
src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue

@ -211,6 +211,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['packQty'] = val[0]['packQty']
row[formField] = val[0][searchField]
}else if (formField == 'itemCode') {
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){
message.warning(`物料${val[0]['itemCode']}已经存在`)
return
}
row['uom'] = val[0]['uom']
row['produceDate'] = dayjs().valueOf()
row[formField] = val[0][searchField]

Loading…
Cancel
Save