update 退料入库、产成品入库页面,优化获取库位方法

This commit is contained in:
18110972313 2025-04-24 11:13:29 +08:00
parent 4ef2bf7a85
commit 9d9ff9c596
2 changed files with 42 additions and 57 deletions

View File

@ -11,20 +11,11 @@
<label>选择仓库:</label>&nbsp;&nbsp;&nbsp;&nbsp;
<zxzUniDataSelect filterable v-model="ERPLOCATION" :localdata="items" @change="change">
</zxzUniDataSelect>
<<<<<<< HEAD
=======
</u-form-item>
<!-- <u-form-item :border-bottom="false">
<label>选择库位</label>
<zxzUniDataSelect filterable v-model="LOCATIONNAME" :localdata="items_Location"-->
<!-- :disabled="Locatiaon_state"></zxzUniDataSelect> -->
<u-form-item :border-bottom="false">
<label>选择库位: </label>
<downSelect class="downSelect-col" ref='selectRef' showKey="storageName" mode='single' :dataList="items_Location" @resultBack="resultBack">
<u-input :border="true" v-model="LOCATIONNAME" placeholder="请输入" @input="handleInput"/>
</downSelect>
>>>>>>> c596f28377050fefce42433c3bcbb7d676e49713
</u-form-item>
<!-- <u-form-item :border-bottom="false">
<label>选择库位</label>
@ -864,31 +855,28 @@
getLocationName() {
this.items_Location = []
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
});
}
console.log(this.items_Location)
this.getitems_LocationAll('');
} else {
this.$showMessage(res.data.message)
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
});
}
this.focusBarCode = true
this.focusShipRequest = false
}).catch(err => {
this.$showMessage(err)
});
} else {
this.$showMessage("请先选择仓库")
}
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) {

View File

@ -417,31 +417,28 @@
getLocationName() {
this.items_Location = []
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
});
}
console.log(this.items_LocationAll)
this.getitems_LocationAll('');
} else {
this.$showMessage(res.data.message)
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_LocationAll.push({
text: _Arr.DESCRIPTION,
value: _Arr.STORAGENAME
});
}
this.focusBarCode = true
this.focusShipRequest = false
}).catch(err => {
this.$showMessage(err)
});
} else {
this.$showMessage("请先选择仓库")
}
console.log(this.items_LocationAll)
this.getitems_LocationAll('');
} else {
this.$showMessage(res.data.message)
}
this.focusBarCode = true
this.focusShipRequest = false
}).catch(err => {
this.$showMessage(err)
});
},
getitems_LocationAll(query) {