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; <label>选择仓库:</label>&nbsp;&nbsp;&nbsp;&nbsp;
<zxzUniDataSelect filterable v-model="ERPLOCATION" :localdata="items" @change="change"> <zxzUniDataSelect filterable v-model="ERPLOCATION" :localdata="items" @change="change">
</zxzUniDataSelect> </zxzUniDataSelect>
<<<<<<< HEAD
=======
</u-form-item> </u-form-item>
<!-- <u-form-item :border-bottom="false"> <!-- <u-form-item :border-bottom="false">
<label>选择库位</label> <label>选择库位</label>
<zxzUniDataSelect filterable v-model="LOCATIONNAME" :localdata="items_Location"--> <zxzUniDataSelect filterable v-model="LOCATIONNAME" :localdata="items_Location"-->
<!-- :disabled="Locatiaon_state"></zxzUniDataSelect> --> <!-- :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"> <!-- <u-form-item :border-bottom="false">
<label>选择库位</label> <label>选择库位</label>
@ -864,31 +855,28 @@
getLocationName() { getLocationName() {
this.items_Location = [] this.items_Location = []
this.items_Location = [] this.items_Location = []
if (this.ERPLOCATION != '') { let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY;
this.$MyRequest('/api/storage/getLocationNameForERPLocation', { this.$MyRequest('/api/storage/getLocationNameForERPLocation', {
ERPLocation: this.ERPLOCATION ERPLocation: ERPFACTORY
}).then(res => { }).then(res => {
if (res.data.success) { if (res.data.success) {
for (let i = 0; i < res.data.resultObj.length; i++) { for (let i = 0; i < res.data.resultObj.length; i++) {
var _Arr = res.data.resultObj[i]; var _Arr = res.data.resultObj[i];
this.items_Location.push({ this.items_Location.push({
text: _Arr.DESCRIPTION, text: _Arr.DESCRIPTION,
value: _Arr.STORAGENAME value: _Arr.STORAGENAME
}); });
}
console.log(this.items_Location)
this.getitems_LocationAll('');
} else {
this.$showMessage(res.data.message)
} }
this.focusBarCode = true console.log(this.items_Location)
this.focusShipRequest = false this.getitems_LocationAll('');
}).catch(err => { } else {
this.$showMessage(err) this.$showMessage(res.data.message)
}); }
} else { this.focusBarCode = true
this.$showMessage("请先选择仓库") this.focusShipRequest = false
} }).catch(err => {
this.$showMessage(err)
});
}, },
getitems_LocationAll(query) { getitems_LocationAll(query) {

View File

@ -417,31 +417,28 @@
getLocationName() { getLocationName() {
this.items_Location = [] this.items_Location = []
this.items_LocationAll = [] this.items_LocationAll = []
if (this.ERPLOCATION != '') { let ERPFACTORY = JSON.parse(uni.getStorageSync('orgObject')).ERPFACTORY;
this.$MyRequest('/api/storage/getLocationNameForERPLocation', { this.$MyRequest('/api/storage/getLocationNameForERPLocation', {
ERPLocation: this.ERPLOCATION ERPLocation: ERPFACTORY
}).then(res => { }).then(res => {
if (res.data.success) { if (res.data.success) {
for (let i = 0; i < res.data.resultObj.length; i++) { for (let i = 0; i < res.data.resultObj.length; i++) {
var _Arr = res.data.resultObj[i]; var _Arr = res.data.resultObj[i];
this.items_LocationAll.push({ this.items_LocationAll.push({
text: _Arr.DESCRIPTION, text: _Arr.DESCRIPTION,
value: _Arr.STORAGENAME value: _Arr.STORAGENAME
}); });
}
console.log(this.items_LocationAll)
this.getitems_LocationAll('');
} else {
this.$showMessage(res.data.message)
} }
this.focusBarCode = true console.log(this.items_LocationAll)
this.focusShipRequest = false this.getitems_LocationAll('');
}).catch(err => { } else {
this.$showMessage(err) this.$showMessage(res.data.message)
}); }
} else { this.focusBarCode = true
this.$showMessage("请先选择仓库") this.focusShipRequest = false
} }).catch(err => {
this.$showMessage(err)
});
}, },
getitems_LocationAll(query) { getitems_LocationAll(query) {