Browse Source

唯一性

hella_online_20240829
wangyufei 4 months ago
parent
commit
8cc1c6158a
  1. 1
      src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue
  2. 8
      src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue
  3. 7
      src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue
  4. 2
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

1
src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue

@ -158,6 +158,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
if (type == 'tableForm') {
if(formField == 'itemCode') {
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']))
if(val.length==0) return
val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))

8
src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue

@ -157,7 +157,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'containerNumber') {
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['containerNumber']==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['containerNumber']==item['itemCode']))
if(val.length==0) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['containerNumber'] = item['itemCode']

7
src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue

@ -133,6 +133,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => {
if (type == 'tableForm') {
if(formField == 'containerNumber') {
let itemCodes = val.filter(item=>tableData.value.find(item1=>item1['containerNumber']==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['containerNumber']==item['itemCode']))
if(val.length==0) return
val.forEach(item=>{
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))
newRow['containerNumber'] = item['itemCode']

2
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -131,6 +131,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
//
row[formField] = val[0][searchField]
if (formField == 'itemCode') {
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['batch']==item['batch']&&item1['packingNumber']==item['packingNumber']&&item1['locationCode']==item['locationCode']&&item1['inventoryStatus']==item['inventoryStatus']))
if(val.length==0) return
val.forEach(item=>{
if(tableData.value.find(item1=>item1['itemCode'] == item['itemCode']&&item1['batch'] == item['batch']&&item1['packingNumber'] == item['packingNumber']&&item1['toLocationCode'] == item['locationCode']&&item1['inventoryStatus'] == item['inventoryStatus'])) return
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item}))

Loading…
Cancel
Save