Browse Source

重复校验

hella_online_20240829
wangyufei 4 months ago
parent
commit
41136b5e53
  1. 7
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  2. 7
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
  3. 7
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue

7
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -111,6 +111,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'soLine') { if(formField == 'soLine') {
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['soLine']==item['lineNumber']&&item1['soNumber']==item['number']&&item1['itemCode']==item['itemCode']))
if(itemCodes.length>0){
itemCodes = itemCodes.map(item=>(item.itemCode))
message.warning(`物料${itemCodes.join(',')}已经存在`)
}
val = val.filter(item=>!tableData.value.find(item1=>item1['soLine']==item['lineNumber']&&item1['soNumber']==item['number']&&item1['itemCode']==item['itemCode']))
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}))
newRow['soLine'] = item['lineNumber'] newRow['soLine'] = item['lineNumber']

7
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue

@ -510,6 +510,13 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
} }
const updateTableData = (tableList)=>{ 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=>{ tableList.forEach(row=>{
//poNumber poLine itemCode batch //poNumber poLine itemCode batch
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))

7
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue

@ -487,6 +487,13 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r
} }
const updateTableData = (tableList)=>{ 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=>{ tableList.forEach(row=>{
//poNumber poLine itemCode batch //poNumber poLine itemCode batch
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row})) const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...row}))

Loading…
Cancel
Save