diff --git a/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue b/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue index e3fcfb2..e59d1f0 100644 --- a/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue +++ b/pages/checkplan/ErpLocationMoveNoInvoice/ErpLocationMoveNoInvoice.vue @@ -287,7 +287,7 @@ }) this.getERPLocation(); this.getTimeData(); - this.getLocationName(); + // this.getLocationName(); // let Things = 20 // for (var i = 0; i < Things; i++) { // this.BoxListInfo.push({aa:"1"}) @@ -337,8 +337,8 @@ }, change(e) { this.ERPLOCATION = e.value; - //this.LOCATIONNAME = "" - //this.getLocationName(); + this.LOCATIONNAME = "" + this.getLocationName(); }, //获取焦点的公共方法 getfocus(nextfocus) { @@ -374,9 +374,35 @@ getLocationName() { this.items_Location = [] this.BoxListInfo = []; - let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; + this.items_LocationAll = []; + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + this.$showMessage("请先选择仓库") + } + // let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; + /* this.$MyRequest('/api/storage/getLocationNameForERPLocation', { - ERPLocation: ERPFACTORY + ERPLocation: this.ERPLOCATION }).then(res => { if (res.data.success) { for (let i = 0; i < res.data.resultObj.length; i++) { @@ -395,7 +421,7 @@ }).catch(err => { this.$showMessage(err) }); - + */ }, getitems_LocationAll(query){ console.log(query + "&&&&&&&&&&&&&&") diff --git a/pages/checkplan/InventPage/index.vue b/pages/checkplan/InventPage/index.vue index 93b2d82..c530959 100644 --- a/pages/checkplan/InventPage/index.vue +++ b/pages/checkplan/InventPage/index.vue @@ -133,7 +133,7 @@ }, mounted() { this.getERPLocation(); - this.getLocationName(); + // this.getLocationName(); // let Things = 20 // for (var i = 0; i < Things; i++) { // this.BoxListInfo.push({aa:"1"}) @@ -172,47 +172,49 @@ }, getLocationName() { this.items_Location = [] - let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; - 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 - }); - + if (this.ERPLOCATION1 != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION1, + }).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.focusBarCode = true + this.focusShipRequest = false } - // this.items_Location(''); - this.getitems_LocationAll(''); - } else { - this.$showMessage(res.data.message) - } - this.focusBarCode = true - this.focusShipRequest = false - }).catch(err => { - this.$showMessage(err) - }); - + }).catch(err => { + this.$showMessage(err) + }); + }else { + this.$showMessage("请先选择仓库") + } }, change(e) { - //this.LOCATIONNAME1 = "" - //this.getLocationName(); + this.ERPLOCATION1 = e.value; + 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)) }) - this.items_Location = arr.slice(0, arr.length) - /* 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 9543eca..42b5c36 100644 --- a/pages/checkplan/ModifyLocationName/ModifyLocationName.vue +++ b/pages/checkplan/ModifyLocationName/ModifyLocationName.vue @@ -228,7 +228,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getTimeData(); this.getERPLocation(); - this.getLocationName2() + // this.getLocationName2() }, methods: { @@ -312,7 +312,7 @@ }, change(e) { this.ERPLOCATION = e.value; - //this.LOCATIONNAME = "" + this.LOCATIONNAME = "" this.bqts = 0 this.bqkcs = 0 this.Huowei = e.Huowei @@ -325,7 +325,7 @@ // this.focusKw = true // } this.Locatiaon_state = false - //this.getLocationName2(); + this.getLocationName2(); }, changeLocation() { @@ -364,6 +364,35 @@ getLocationName2() { this.items_Location = [] let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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.focusBarCode = true + this.focusShipRequest = false + this.focusKw = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + this.$showMessage("请先选择仓库") + } + + + /** this.$MyRequest('/api/storage/getLocationNameForERPLocation', { ERPLocation: ERPFACTORY }).then(res => { @@ -386,7 +415,7 @@ }).catch(err => { this.$showMessage(err) }); - + */ }, getLocationName() { this.$MyRequest('/storage/getLocationName', { diff --git a/pages/material/features/OtherStockIn/index.vue b/pages/material/features/OtherStockIn/index.vue index c1fea0a..cfed2c2 100644 --- a/pages/material/features/OtherStockIn/index.vue +++ b/pages/material/features/OtherStockIn/index.vue @@ -245,7 +245,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getTimeData(); this.getERPLocation(); - this.getLocationName(); + // this.getLocationName(); }, methods: { getTimeData() { @@ -264,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 @@ -273,7 +273,7 @@ this.$showMessage(e.text + "仓库没有启用货位管理") this.Locatiaon_state = true this.focusPalletName = true - } */ + } }, getERPLocation() { this.items = []; @@ -296,6 +296,31 @@ }, getLocationName() { this.items_Location = [] + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + this.$showMessage("请先选择仓库") + } + /** let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; this.$MyRequest('/api/storage/getLocationNameForERPLocation', { ERPLocation: ERPFACTORY @@ -317,7 +342,7 @@ }).catch(err => { this.$showMessage(err) }); - + */ }, selConfirm(e) { this.ReceiveRequestName = e[0].value; diff --git a/pages/material/features/ProduceReturnPage/index.vue b/pages/material/features/ProduceReturnPage/index.vue index 05e46b9..0e7de02 100644 --- a/pages/material/features/ProduceReturnPage/index.vue +++ b/pages/material/features/ProduceReturnPage/index.vue @@ -406,7 +406,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getERPLocation(); - this.getLocationName(); + // this.getLocationName(); this.getTimeData(); // let Things = 20 // for (var i = 0; i < Things; i++) { @@ -476,7 +476,7 @@ } this.$showMessage("删除成功") }, - /*change(e) { + change(e) { this.ERPLOCATION = e.value; this.LOCATIONNAME = "" this.Huowei = e.Huowei, @@ -490,7 +490,7 @@ this.Locatiaon_state = true this.focusBarCode = true } - },*/ + }, //获取焦点的公共方法 getfocus(nextfocus) { this.initfocus() @@ -853,37 +853,63 @@ this.DESC_CN = ""; this.CHARGE = ""; }, + /* change(e) { this.ERPLOCATION = e.value; //this.LOCATIONNAME = "" - //this.getLocationName(); + this.getLocationName(); }, + */ getLocationName() { this.items_Location = [] - this.items_Location = [] - let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; - 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 - }); + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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) } - console.log(this.items_Location) - this.getitems_LocationAll(''); - } else { - this.$showMessage(res.data.message) - } - this.focusBarCode = true - this.focusShipRequest = false - }).catch(err => { - this.$showMessage(err) - }); - + this.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + this.$showMessage("请先选择仓库") + } + /* + let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; + 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 + }); + } + console.log(this.items_Location) + this.getitems_LocationAll(''); + } else { + this.$showMessage(res.data.message) + } + this.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + */ }, getitems_LocationAll(query) { console.log(query + "&&&&&&&&&&&&&&") diff --git a/pages/material/features/ProductSaleReturn/index.vue b/pages/material/features/ProductSaleReturn/index.vue index 1e7ee25..6ab0995 100644 --- a/pages/material/features/ProductSaleReturn/index.vue +++ b/pages/material/features/ProductSaleReturn/index.vue @@ -233,7 +233,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getERPLocation(); this.getTimeData(); - this.getLocationName(); + // this.getLocationName(); }, methods: { getTimeData(){ @@ -291,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 @@ -300,7 +300,7 @@ this.$showMessage(e.text + "仓库没有启用货位管理") this.Locatiaon_state = true this.focusPalletName = true - } */ + } }, changeLocationName(e) { this.LOCATIONNAME = e.value; @@ -326,6 +326,31 @@ }, getLocationName() { this.items_Location = [] + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + this.$showMessage("请先选择仓库") + } + /* let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; this.$MyRequest('/api/storage/getLocationNameForERPLocation', { ERPLocation: ERPFACTORY @@ -347,7 +372,7 @@ }).catch(err => { this.$showMessage(err) }); - + */ }, selConfirm(e) { diff --git a/pages/material/features/TransferReceivePage/index.vue b/pages/material/features/TransferReceivePage/index.vue index 383ad77..df95ac8 100644 --- a/pages/material/features/TransferReceivePage/index.vue +++ b/pages/material/features/TransferReceivePage/index.vue @@ -267,7 +267,7 @@ this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.getTimeData(); this.getERPLocation(); - this.getLocationName(); + // this.getLocationName(); }, computed: {}, methods: { @@ -316,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 @@ -325,7 +325,7 @@ this.$showMessage(e.text + "仓库没有启用货位管理") this.Locatiaon_state = true this.focusPalletName = true - } */ + } }, changeLocationName(e) { @@ -352,6 +352,31 @@ }, getLocationName() { this.items_Location = [] + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + this.$showMessage("请先选择仓库") + } + /* let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; this.$MyRequest('/api/storage/getLocationNameForERPLocation', { ERPLocation: ERPFACTORY @@ -373,7 +398,7 @@ }).catch(err => { this.$showMessage(err) }); - + */ }, getitems_LocationAll(query){ console.log(111) diff --git a/pages/product/features/LIbraryStockInOpt/index.vue b/pages/product/features/LIbraryStockInOpt/index.vue index 335fd97..3edac21 100644 --- a/pages/product/features/LIbraryStockInOpt/index.vue +++ b/pages/product/features/LIbraryStockInOpt/index.vue @@ -266,7 +266,7 @@ this.GetLiberaryBaeEn() this.GetPRODUCTLINES() this.getTimeData(); - this.getLocationName(); + // this.getLocationName(); }, methods: { handleScan() { @@ -296,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,7 +415,35 @@ }, getLocationName() { this.items_Location = [] - let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; + //let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + try { + Vue.prototype.$playFail() + } catch (e) {} + this.$showMessage("请先选择仓库") + } + /* this.$MyRequest('/api/storage/getLocationNameForERPLocation', { ERPLocation: ERPFACTORY }).then(res => { @@ -436,7 +464,7 @@ }).catch(err => { this.$showMessage(err) }); - + */ }, ScanFGBarCode() { diff --git a/pages/product/features/LIbraryStockTransfer/index.vue b/pages/product/features/LIbraryStockTransfer/index.vue index a2b277c..d36190a 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(); + // 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 => { @@ -652,6 +652,31 @@ }, getLocationName() { this.items_Location = [] + if (this.ERPLOCATION != '') { + this.$MyRequest('/api/storage/getLocationNameForERPLocation', { + ERPLocation: this.ERPLOCATION + }).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.focusBarCode = true + this.focusShipRequest = false + }).catch(err => { + this.$showMessage(err) + }); + } else { + this.$showMessage("请先选择仓库") + } + /* let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY; this.$MyRequest('/api/storage/getLocationNameForERPLocation', { ERPLocation: ERPFACTORY @@ -673,7 +698,7 @@ }).catch(err => { this.$showMessage(err) }); - + */ }, /** * 转库保存