Commit bd7d853d authored by 李苏's avatar 李苏 💬

查询参数改下拉框

parent 099befa6
......@@ -284,3 +284,16 @@ export function queryCanCall(params){
return filter(e)
})
}
/* 容器类别下拉 */
export function queryRqlb(params){
return http.post("/xgwcs/tp/init/rqlb", params || {}).then(e => {
return filter(e)
})
}
/* 供应商代码下拉 */
export function queryRqgys(params){
return http.post("/xgwcs/tp/init/rqgys", params || {}).then(e => {
return filter(e)
})
}
\ No newline at end of file
......@@ -8,7 +8,7 @@
<view class="cu-form-group" style="background: #eee;">
<view class="title " style="width: 30%" >选择分类:</view>
<view class="title " style="width: 30%" >选择库位:</view>
<picker mode="selector" range-key="name" :value="selectedIndex" :range="pickerArray" @change="onPickerChange">
<view style="font-size: 15px;" class="uni-input">{{pickerArray[selectedIndex].name}}</view>
</picker>
......@@ -16,12 +16,20 @@
<!-- 新增查询条件 -->
<view class="cu-form-group" style="background: #eee;">
<view class="title " style="width: 30%" >供应商代码</view>
<input v-model="gyscode" class="uni-input" focus placeholder="请输入供应商代码" />
<!-- <input v-model="gyscode" class="uni-input" focus placeholder="请输入供应商代码" /> -->
<picker mode="selector" range-key="name" :value="selectedIndex_gys" :range="gysArray" @change="onPickerChange_gys">
<view style="font-size: 15px;" class="uni-input">{{gysArray[selectedIndex_gys].name}}</view>
</picker>
</view>
<view class="cu-form-group" style="background: #eee;">
<view class="title " style="width: 30%" >托盘类别</view>
<input v-model="rqlb" class="uni-input" focus placeholder="请输入托盘类别" />
<view class="title " style="width: 30%" >容器类别</view>
<!-- <input v-model="rqlb" class="uni-input" focus placeholder="请输入容器类别" /> -->
<!-- hide -->
<picker mode="selector" range-key="name" :value="selectedIndex_rqlb" :range="rqlbArray" @change="onPickerChange_rqlb">
<view style="font-size: 15px;" class="uni-input">{{rqlbArray[selectedIndex_rqlb].name}}</view>
</picker>
</view>
<!-- 查询按钮 -->
<view style="height: 40px;">
<button @click="apiQueryEmptyTpKw(pickerArray[selectedIndex].id)" class="cu-btn bg-blue lg" style="height: 30px;float: right;margin-right: 10px;margin-top: 5px;">查询</button>
......@@ -61,7 +69,9 @@
adjustTry,
queryEmptyTpKw,
rqflQuery,
emptyCall
emptyCall,
queryRqlb,
queryRqgys
} from '@/api/dlapi.js'
export default {
data() {
......@@ -74,12 +84,21 @@
modalName: "",
tpcode: "",
wlinfor: [],
rqlbArray:[
{name:'',id:''}
],
gysArray:[
{name:'',id:''}
],
/* 选择 */
pickerArray: [
{name:'',id:''}
],
// 当前选中值索引
selectedIndex: 0,
selectedIndex_rqlb:0,
selectedIndex_gys:0
}
},
methods: {
......@@ -99,10 +118,23 @@
// 设置选中值名称
this.selectedIndex=index
this.apiQueryEmptyTpKw(this.pickerArray[index].id)
// this.apiQueryEmptyTpKw(this.pickerArray[index].id)
/* 做出托盘查询请求*/
},
onPickerChange_rqlb(event){
const index = event.detail.value
// 设置选中值名称
this.selectedIndex_rqlb=index
this.rqlb=this.rqlbArray[this.selectedIndex_rqlb].id
},
onPickerChange_gys(event){
const index = event.detail.value
// 设置选中值名称
this.selectedIndex_gys=index
this.gyscode=this.gysArray[this.selectedIndex_gys].id
},
// api出调整
apiadjustTry(){
......@@ -168,6 +200,32 @@
})
this.apiQueryEmptyTpKw(this.pickerArray[0].id)
})
queryRqlb().then(res=>{
this.rqlbArray=res.records.map(item=>{
return {
id:item.rqlb,
name:item.rqlb
}
})
this.rqlbArray.unshift({
id:'',
name:'全部'
})
})
queryRqgys().then(res=>{
this.gysArray=res.records.map(item=>{
return {
id:item.gyscode,
name:item.gyscode
}
})
this.gysArray.unshift({
id:'',
name:'全部'
})
})
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment