update 退料入库页面,优化仓库、库位下拉框

This commit is contained in:
18110972313 2025-04-23 20:00:14 +08:00
parent 159931a528
commit b63dccc86a

View File

@ -7,19 +7,25 @@
<u-col span="10"><label>{{ERPFACTORYNAME}} {{ERPFACTORY}}</label> </u-col> <u-col span="10"><label>{{ERPFACTORYNAME}} {{ERPFACTORY}}</label> </u-col>
</u-row> --> </u-row> -->
<!-- <u-form-item :border-bottom="false"> <u-form-item :border-bottom="false">
<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>
</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"-->
<!-- :disabled="Locatiaon_state"></zxzUniDataSelect>-->
<downSelect ref='selectRef' showKey="storageName" mode='single' :dataList="items_Location" @resultBack="resultBack"> <downSelect ref='selectRef' showKey="storageName" mode='single' :dataList="items_Location" @resultBack="resultBack">
<u-input :border="true" v-model="LOCATIONNAME" placeholder="请输入" @input="handleInput"/> <u-input :border="true" v-model="LOCATIONNAME" placeholder="请输入" @input="handleInput"/>
</downSelect> </downSelect>
</u-form-item> -->
<u-form-item :border-bottom="false">
<label>选择库位:</label>&nbsp;&nbsp;&nbsp;&nbsp;
<zxzUniDataSelect filterable v-model="LOCATIONNAME" :localdata="items_Location"
@inputChange="getitems_LocationAll"></zxzUniDataSelect>
</u-form-item> </u-form-item>
<!-- <br /> --> <!-- <br /> -->
<!-- <u-row align="left"> <!-- <u-row align="left">
<u-col span="2"><label>组织</label> </u-col> <u-col span="2"><label>组织</label> </u-col>
@ -391,7 +397,7 @@
}) })
this.orgObject = JSON.parse(uni.getStorageSync('orgObject')) this.orgObject = JSON.parse(uni.getStorageSync('orgObject'))
// this.getERPLocation(); this.getERPLocation();
this.getTimeData(); this.getTimeData();
// let Things = 20 // let Things = 20
// for (var i = 0; i < Things; i++) { // for (var i = 0; i < Things; i++) {
@ -514,6 +520,7 @@
this.items_Location = [] this.items_Location = []
this.$MyRequest('/api/wareHouse/search', { this.$MyRequest('/api/wareHouse/search', {
storageName: val, storageName: val,
siteName: 'SDK',
orgNo: this.orgObject.ERPFACTORY orgNo: this.orgObject.ERPFACTORY
}).then(res => { }).then(res => {
if (res.data.resultObj) { if (res.data.resultObj) {
@ -835,7 +842,54 @@
this.SPECNAME = ""; this.SPECNAME = "";
this.DESC_CN = ""; this.DESC_CN = "";
this.CHARGE = ""; this.CHARGE = "";
},
change(e) {
this.ERPLOCATION = e.value;
this.LOCATIONNAME = ""
this.getLocationName();
},
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)
}
this.focusBarCode = true
this.focusShipRequest = false
}).catch(err => {
this.$showMessage(err)
});
} else {
this.$showMessage("请先选择仓库")
}
},
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, 50)
} else {
this.items_Location = arr
}
console.log(this.items_Location)
},
} }
} }
</script> </script>