Browse Source

校验

hella_online_20240829
wangyufei 4 months ago
parent
commit
cf716b7b2c
  1. 7
      src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

7
src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue

@ -112,12 +112,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if (formField == 'itemCode') { if (formField == 'itemCode') {
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['itemCode']==item['itemCode'])) val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromPackingNumber']==item['packingNumber']&&item1['fromLocationCode']==item['locationCode']&&item1['inventoryStatus']==item['inventoryStatus']))
if(itemCodes.length>0){
itemCodes = itemCodes.map(item=>(item['itemCode']))
message.warning(`物料${itemCodes.join(',')}已经存在`)
}
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']))
if(val.length==0) return 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}))

Loading…
Cancel
Save