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

查询参数改下拉框

parent 099befa6
...@@ -284,3 +284,16 @@ export function queryCanCall(params){ ...@@ -284,3 +284,16 @@ export function queryCanCall(params){
return filter(e) 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,20 +8,28 @@ ...@@ -8,20 +8,28 @@
<view class="cu-form-group" style="background: #eee;"> <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"> <picker mode="selector" range-key="name" :value="selectedIndex" :range="pickerArray" @change="onPickerChange">
<view style="font-size: 15px;" class="uni-input">{{pickerArray[selectedIndex].name}}</view> <view style="font-size: 15px;" class="uni-input">{{pickerArray[selectedIndex].name}}</view>
</picker> </picker>
</view> </view>
<!-- 新增查询条件 --> <!-- 新增查询条件 -->
<view class="cu-form-group" style="background: #eee;">
<view class="title " style="width: 30%" >供应商代码</view>
<input v-model="gyscode" class="uni-input" focus placeholder="请输入供应商代码" />
</view>
<view class="cu-form-group" style="background: #eee;"> <view class="cu-form-group" style="background: #eee;">
<view class="title " style="width: 30%" >托盘类别</view> <view class="title " style="width: 30%" >供应商代码</view>
<input v-model="rqlb" 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="请输入容器类别" /> -->
<!-- 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>
<!-- 查询按钮 --> <!-- 查询按钮 -->
<view style="height: 40px;"> <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> <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 @@ ...@@ -61,7 +69,9 @@
adjustTry, adjustTry,
queryEmptyTpKw, queryEmptyTpKw,
rqflQuery, rqflQuery,
emptyCall emptyCall,
queryRqlb,
queryRqgys
} from '@/api/dlapi.js' } from '@/api/dlapi.js'
export default { export default {
data() { data() {
...@@ -74,12 +84,21 @@ ...@@ -74,12 +84,21 @@
modalName: "", modalName: "",
tpcode: "", tpcode: "",
wlinfor: [], wlinfor: [],
rqlbArray:[
{name:'',id:''}
],
gysArray:[
{name:'',id:''}
],
/* 选择 */ /* 选择 */
pickerArray: [ pickerArray: [
{name:'',id:''} {name:'',id:''}
], ],
// 当前选中值索引 // 当前选中值索引
selectedIndex: 0, selectedIndex: 0,
selectedIndex_rqlb:0,
selectedIndex_gys:0
} }
}, },
methods: { methods: {
...@@ -99,10 +118,23 @@ ...@@ -99,10 +118,23 @@
// 设置选中值名称 // 设置选中值名称
this.selectedIndex=index 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出调整 // api出调整
apiadjustTry(){ apiadjustTry(){
...@@ -168,6 +200,32 @@ ...@@ -168,6 +200,32 @@
}) })
this.apiQueryEmptyTpKw(this.pickerArray[0].id) 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> </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