|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="picking-task-page">
|
|
|
<u-navbar height="40px" title="拣货任务" bgColor="#F0F6FB" autoBack placeholder>
|
|
|
- <view class="u-nav-slot btn-right" slot="right">
|
|
|
+ <view class="u-nav-slot btn-right" slot="right" @click="stashClick">
|
|
|
<view class="cang-name">{{cangName}}</view>
|
|
|
<u-icon name="arrow-down-fill" color="#999999" size="12"></u-icon>
|
|
|
</view>
|
|
@@ -34,7 +34,9 @@
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+ <!-- 中心仓弹窗 -->
|
|
|
+ <u-picker :show="stashShow" :defaultIndex="defaultIndex" :columns="columnsList" @confirm="pickerConfirm" @cancel="stashShow= false"></u-picker>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -50,7 +52,14 @@
|
|
|
cangName:'鹏越中心仓',
|
|
|
searchKey:'',
|
|
|
type1:'全部',
|
|
|
- type2:'月份'
|
|
|
+ type2:'月份',
|
|
|
+ stashShow:false,
|
|
|
+ columnsList:[],
|
|
|
+ stashColumns:[
|
|
|
+ ['鹏越中心仓','美团中心仓']
|
|
|
+ ],
|
|
|
+ defaultIndex:[],
|
|
|
+ pickType:0,//1.中心仓
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
@@ -58,6 +67,27 @@
|
|
|
let statusBarHeight = systemInfo.statusBarHeight;
|
|
|
this.offsetTop = statusBarHeight + 40
|
|
|
console.log('状态栏的高度是:' + statusBarHeight + 'px');
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ stashClick() {
|
|
|
+ this.pickType = 1
|
|
|
+ this.columnsList = this.stashColumns
|
|
|
+ this.defaultIndex = this.getDefaultIndex(this.cangName)
|
|
|
+ this.stashShow = true
|
|
|
+ },
|
|
|
+ pickerConfirm(val) {
|
|
|
+ if(this.pickType == 1) {
|
|
|
+ this.cangName = val.value[0]
|
|
|
+ }
|
|
|
+ this.stashShow = false
|
|
|
+ },
|
|
|
+ // 获取picker默认index
|
|
|
+ getDefaultIndex(val) {
|
|
|
+ let arr = []
|
|
|
+ let index = this.columnsList[0].findIndex(item=>item == val)
|
|
|
+ arr = [index]
|
|
|
+ return arr
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|