From 1f317a2a9b72541a7766cc90702565c2cb1849ef Mon Sep 17 00:00:00 2001 From: 18110972313 <780768673@qq.com> Date: Thu, 24 Apr 2025 16:58:15 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8F=96=E6=B6=88=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=A1=86=EF=BC=8C=E9=80=89=E6=8B=A9=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E4=BB=93=E5=BA=93=E5=BF=85=E5=A1=AB=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ErpLocationMoveNoInvoice.vue | 52 ++++++++-------- pages/checkplan/InventPage/index.vue | 59 +++++++++---------- .../ModifyLocationName/ModifyLocationName.vue | 51 ++++++++-------- .../material/features/OtherStockIn/index.vue | 5 +- .../features/ProduceReturnPage/index.vue | 5 +- .../features/ProductSaleReturn/index.vue | 5 +- .../features/ProductStockIn/index.vue | 5 +- .../features/TransferReceivePage/index.vue | 5 +- .../features/LIbraryStockInOpt/index.vue | 50 +++++++--------- .../features/LIbraryStockTransfer/index.vue | 48 +++++++-------- 10 files changed, 136 insertions(+), 149 deletions(-) diff --git a/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue b/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue index 79ed2f5..02baa2a 100644 --- a/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue +++ b/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue @@ -287,6 +287,7 @@ }) this.getERPLocation(); this.getTimeData(); + this.getLocationName(); // let Things = 20 // for (var i = 0; i < Things; i++) { // this.BoxListInfo.push({aa:"1"}) @@ -336,8 +337,8 @@ }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" - this.getLocationName(); + //this.LOCATIONNAME = "" + //this.getLocationName(); }, //获取焦点的公共方法 getfocus(nextfocus) { @@ -373,30 +374,26 @@ this.items_Location = [] this.BoxListInfo = []; let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; - if (this.ERPLOCATION != '') { - this.$MyRequest('/api/storage/getLocationNameForERPLocation', { - ERPLocation: ERPFACTORY - }).then(res => { - if (res.data.success) { - for (let i = 0; i < res.data.resultObj.length; i++) { - var _Arr = res.data.resultObj[i]; - this.items_LocationAll.push({ - text: _Arr.DESCRIPTION, - value: _Arr.STORAGENAME - }); - this.getitems_LocationAll(''); - } - } else { - this.$showMessage(res.data.message) + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: ERPFACTORY + }).then(res => { + if (res.data.success) { + for (let i = 0; i < res.data.resultObj.length; i++) { + var _Arr = res.data.resultObj[i]; + this.items_LocationAll.push({ + text: _Arr.DESCRIPTION, + value: _Arr.STORAGENAME + }); + this.getitems_LocationAll(''); } - this.focusBarCode = true - this.focusShipRequest = false - }).catch(err => { - this.$showMessage(err) - }); - } else { - this.$showMessage("请先选择仓库") - } + } else { + this.$showMessage(res.data.message) + } + this.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); }, getitems_LocationAll(query){ @@ -404,11 +401,12 @@ var arr = this.items_LocationAll.filter(item => { return (item.text.includes(query)) || (item.value.includes(query)) }) - if(arr.length > 50){ + this.items_Location = arr.slice(0, arr.length) + /* if(arr.length > 50){ this.items_Location = arr.slice(0,50) } else { this.items_Location = arr - } + } */ console.log(this.items_Location) }, async ScanBarCode() { diff --git a/pages/checkplan/InventPage/index.vue b/pages/checkplan/InventPage/index.vue index bd08e50..93b2d82 100644 --- a/pages/checkplan/InventPage/index.vue +++ b/pages/checkplan/InventPage/index.vue @@ -133,7 +133,7 @@ }, mounted() { this.getERPLocation(); - + this.getLocationName(); // let Things = 20 // for (var i = 0; i < Things; i++) { // this.BoxListInfo.push({aa:"1"}) @@ -173,49 +173,46 @@ getLocationName() { this.items_Location = [] let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; - if (this.ERPLOCATION1 != '') { - this.$MyRequest('/api/storage/getLocationNameForERPLocation', { - ERPLocation: ERPFACTORY, - }).then(res => { - console.log(res.data.resultObj) - if (res.data.success) { - for (let i = 0; i < res.data.resultObj.length; i++) { - var _Arr = res.data.resultObj[i]; - this.items_LocationAll.push({ - text: _Arr.DESCRIPTION, - value: _Arr.STORAGENAME - }); - - } - // this.items_Location(''); - this.getitems_LocationAll(''); - } else { - this.$showMessage(res.data.message) + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: ERPFACTORY, + }).then(res => { + console.log(res.data.resultObj) + if (res.data.success) { + for (let i = 0; i < res.data.resultObj.length; i++) { + var _Arr = res.data.resultObj[i]; + this.items_LocationAll.push({ + text: _Arr.DESCRIPTION, + value: _Arr.STORAGENAME + }); + } - this.focusBarCode = true - this.focusShipRequest = false - }).catch(err => { - this.$showMessage(err) - }); - } else { - this.$showMessage("请先选择仓库") - } + // this.items_Location(''); + this.getitems_LocationAll(''); + } else { + this.$showMessage(res.data.message) + } + this.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); }, change(e) { - this.LOCATIONNAME1 = "" - this.getLocationName(); + //this.LOCATIONNAME1 = "" + //this.getLocationName(); }, getitems_LocationAll(query){ console.log(query + "&&&&&&&&&&&&&&") var arr = this.items_LocationAll.filter(item => { return (item.text.includes(query)) || (item.value.includes(query)) }) - if(arr.length > 50){ + this.items_Location = arr.slice(0, arr.length) + /* if(arr.length > 50){ this.items_Location = arr.slice(0,50) } else { this.items_Location = arr - } + } */ console.log(this.items_Location) }, getERPLocation() { diff --git a/pages/checkplan/ModifyLocationName/ModifyLocationName.vue b/pages/checkplan/ModifyLocationName/ModifyLocationName.vue index 32e20df..9543eca 100644 --- a/pages/checkplan/ModifyLocationName/ModifyLocationName.vue +++ b/pages/checkplan/ModifyLocationName/ModifyLocationName.vue @@ -228,6 +228,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getTimeData(); this.getERPLocation(); + this.getLocationName2() }, methods: { @@ -311,7 +312,7 @@ }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" + //this.LOCATIONNAME = "" this.bqts = 0 this.bqkcs = 0 this.Huowei = e.Huowei @@ -324,7 +325,7 @@ // this.focusKw = true // } this.Locatiaon_state = false - this.getLocationName2(); + //this.getLocationName2(); }, changeLocation() { @@ -363,32 +364,28 @@ getLocationName2() { this.items_Location = [] let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; - if (this.ERPLOCATION != '') { - this.$MyRequest('/api/storage/getLocationNameForERPLocation', { - ERPLocation: ERPFACTORY - }).then(res => { - if (res.data.success) { - for (let i = 0; i < res.data.resultObj.length; i++) { - var _Arr = res.data.resultObj[i]; - this.items_Location.push({ - text: _Arr.DESCRIPTION, - value: _Arr.STORAGENAME, - Huowei: _Arr.USE_LOCATION, - }); - - } - } else { - this.$showMessage(res.data.message) + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: ERPFACTORY + }).then(res => { + if (res.data.success) { + for (let i = 0; i < res.data.resultObj.length; i++) { + var _Arr = res.data.resultObj[i]; + this.items_Location.push({ + text: _Arr.DESCRIPTION, + value: _Arr.STORAGENAME, + Huowei: _Arr.USE_LOCATION, + }); + } - this.focusBarCode = true - this.focusShipRequest = false - this.focusKw = false - }).catch(err => { - this.$showMessage(err) - }); - } else { - this.$showMessage("请先选择仓库") - } + } else { + this.$showMessage(res.data.message) + } + this.focusBarCode = true + this.focusShipRequest = false + this.focusKw = false + }).catch(err => { + this.$showMessage(err) + }); }, getLocationName() { diff --git a/pages/material/features/OtherStockIn/index.vue b/pages/material/features/OtherStockIn/index.vue index 2232d9b..c1fea0a 100644 --- a/pages/material/features/OtherStockIn/index.vue +++ b/pages/material/features/OtherStockIn/index.vue @@ -245,6 +245,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getTimeData(); this.getERPLocation(); + this.getLocationName(); }, methods: { getTimeData() { @@ -263,7 +264,7 @@ }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" + /* this.LOCATIONNAME = "" this.Huowei = e.Huowei if (e.Huowei == 'Y') { this.Locatiaon_state = false @@ -272,7 +273,7 @@ this.$showMessage(e.text + "仓库没有启用货位管理") this.Locatiaon_state = true this.focusPalletName = true - } + } */ }, getERPLocation() { this.items = []; diff --git a/pages/material/features/ProduceReturnPage/index.vue b/pages/material/features/ProduceReturnPage/index.vue index 06750cc..4cf32b0 100644 --- a/pages/material/features/ProduceReturnPage/index.vue +++ b/pages/material/features/ProduceReturnPage/index.vue @@ -406,6 +406,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getERPLocation(); + this.getLocationName(); this.getTimeData(); // let Things = 20 // for (var i = 0; i < Things; i++) { @@ -853,8 +854,8 @@ }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" - this.getLocationName(); + //this.LOCATIONNAME = "" + //this.getLocationName(); }, getLocationName() { this.items_Location = [] diff --git a/pages/material/features/ProductSaleReturn/index.vue b/pages/material/features/ProductSaleReturn/index.vue index 6d4ffe2..baa01ea 100644 --- a/pages/material/features/ProductSaleReturn/index.vue +++ b/pages/material/features/ProductSaleReturn/index.vue @@ -233,6 +233,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getERPLocation(); this.getTimeData(); + this.getLocationName(); }, methods: { getTimeData(){ @@ -290,7 +291,7 @@ }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" + /* this.LOCATIONNAME = "" this.Huowei = e.Huowei if (e.Huowei == 'Y') { this.Locatiaon_state = false @@ -299,7 +300,7 @@ this.$showMessage(e.text + "仓库没有启用货位管理") this.Locatiaon_state = true this.focusPalletName = true - } + } */ }, getERPLocation() { this.items = []; diff --git a/pages/material/features/ProductStockIn/index.vue b/pages/material/features/ProductStockIn/index.vue index b1f416e..5cd4449 100644 --- a/pages/material/features/ProductStockIn/index.vue +++ b/pages/material/features/ProductStockIn/index.vue @@ -252,6 +252,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getERPLocation(); + this.getLocationName(); // this.GetLiberaryBaeIn() // this.GetLiberaryBaeEn() this.getTimeData(); @@ -385,8 +386,8 @@ // }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" - this.getLocationName(); + //this.LOCATIONNAME = "" + //this.getLocationName(); }, //获取焦点的公共方法 getfocus(nextfocus) { diff --git a/pages/material/features/TransferReceivePage/index.vue b/pages/material/features/TransferReceivePage/index.vue index 456154a..157b589 100644 --- a/pages/material/features/TransferReceivePage/index.vue +++ b/pages/material/features/TransferReceivePage/index.vue @@ -267,6 +267,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getTimeData(); this.getERPLocation(); + this.getLocationName(); }, computed: {}, methods: { @@ -315,7 +316,7 @@ change(e) { this.ERPLOCATION = e.value; console.log(e) - this.LOCATIONNAME = "" + /* this.LOCATIONNAME = "" this.Huowei=e.Huowei if (e.Huowei == 'Y') { this.Locatiaon_state = false @@ -324,7 +325,7 @@ this.$showMessage(e.text + "仓库没有启用货位管理") this.Locatiaon_state = true this.focusPalletName = true - } + } */ }, getERPLocation() { diff --git a/pages/product/features/LIbraryStockInOpt/index.vue b/pages/product/features/LIbraryStockInOpt/index.vue index 2f33383..335fd97 100644 --- a/pages/product/features/LIbraryStockInOpt/index.vue +++ b/pages/product/features/LIbraryStockInOpt/index.vue @@ -266,6 +266,7 @@ this.GetLiberaryBaeEn() this.GetPRODUCTLINES() this.getTimeData(); + this.getLocationName(); }, methods: { handleScan() { @@ -295,8 +296,8 @@ }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" - this.getLocationName(); + /* this.LOCATIONNAME = "" + this.getLocationName(); */ }, GetArea() { this.$MyRequest('/api/storage/getArea', {}).then(res => { @@ -415,33 +416,26 @@ getLocationName() { this.items_Location = [] let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; - if (this.ERPLOCATION != '') { - this.$MyRequest('/api/storage/getLocationNameForERPLocation', { - ERPLocation: ERPFACTORY - }).then(res => { - if (res.data.success) { - for (let i = 0; i < res.data.resultObj.length; i++) { - var _Arr = res.data.resultObj[i]; - this.items_Location.push({ - text: _Arr.DESCRIPTION, - value: _Arr.STORAGENAME - }); - - } - } else { - this.$showMessage(res.data.message) + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: ERPFACTORY + }).then(res => { + if (res.data.success) { + for (let i = 0; i < res.data.resultObj.length; i++) { + var _Arr = res.data.resultObj[i]; + this.items_Location.push({ + text: _Arr.DESCRIPTION, + value: _Arr.STORAGENAME + }); + } - this.focusBarCode = true - this.focusShipRequest = false - }).catch(err => { - this.$showMessage(err) - }); - } else { - try { - Vue.prototype.$playFail() - } catch (e) {} - this.$showMessage("请先选择仓库") - } + } else { + this.$showMessage(res.data.message) + } + this.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); }, diff --git a/pages/product/features/LIbraryStockTransfer/index.vue b/pages/product/features/LIbraryStockTransfer/index.vue index 2cf6e8c..a2b277c 100644 --- a/pages/product/features/LIbraryStockTransfer/index.vue +++ b/pages/product/features/LIbraryStockTransfer/index.vue @@ -356,7 +356,7 @@ this.GetLiberaryBaeIn() this.GetLiberaryBaeEn() this.getTimeData(); - + this.getLocationName(); // let Things = 20 // for (var i = 0; i < Things; i++) { // this.list_detail.push({aa:"1"}) @@ -559,8 +559,8 @@ }, change(e) { this.ERPLOCATION = e.value; - this.LOCATIONNAME = "" - this.getLocationName(); + /* this.LOCATIONNAME = "" + this.getLocationName(); */ }, GetArea() { this.$MyRequest('/api/storage/getArea2', {}).then(res => { @@ -653,30 +653,26 @@ getLocationName() { this.items_Location = [] let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; - if (this.ERPLOCATION != '') { - this.$MyRequest('/api/storage/getLocationNameForERPLocation', { - ERPLocation: ERPFACTORY - }).then(res => { - if (res.data.success) { - for (let i = 0; i < res.data.resultObj.length; i++) { - var _Arr = res.data.resultObj[i]; - this.items_Location.push({ - text: _Arr.DESCRIPTION, - value: _Arr.STORAGENAME - }); - - } - } else { - this.$showMessage(res.data.message) + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: ERPFACTORY + }).then(res => { + if (res.data.success) { + for (let i = 0; i < res.data.resultObj.length; i++) { + var _Arr = res.data.resultObj[i]; + this.items_Location.push({ + text: _Arr.DESCRIPTION, + value: _Arr.STORAGENAME + }); + } - this.focusBarCode = true - this.focusShipRequest = false - }).catch(err => { - this.$showMessage(err) - }); - } else { - this.$showMessage("请先选择仓库") - } + } else { + this.$showMessage(res.data.message) + } + this.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); }, /**