|
@@ -6,7 +6,7 @@
|
|
|
<view class="shelfName">
|
|
|
<view>{{nowData.shelfName}}</view>
|
|
|
</view>
|
|
|
- <view v-if="placeTab.length" class="btns" @click="showTab = true">筛选<u-icon size="20" name="arrow-down"></u-icon></view>
|
|
|
+ <view class="btns" @click="showTab = true">筛选<u-icon size="20" name="arrow-down"></u-icon></view>
|
|
|
</view>
|
|
|
<view class="search flex align_center">
|
|
|
<view class="input">
|
|
@@ -129,13 +129,13 @@
|
|
|
<u-popup v-model="showTab" mode="right" width="70%">
|
|
|
<view class="tabBox flex flex_column">
|
|
|
<view class="tabs">
|
|
|
- <view>
|
|
|
- <view :class="'available'==curType?'active':''" @click="curType=curType=='available'?'':'available'">有可用库存的产品</view>
|
|
|
- <view :class="'blocked'==curType?'active':''" @click="curType=curType=='blocked'?'':'blocked'">有冻结库存的产品</view>
|
|
|
- </view>
|
|
|
- <view class="flex">
|
|
|
- <view :class="item==curTab?'active':''" v-for="item in placeTab" :key="item" @click="curTab=curTab==item?'':item">{{item}}层</view>
|
|
|
- </view>
|
|
|
+ <u-checkbox-group wrap @change="checkboxGroupChange">
|
|
|
+ <u-checkbox
|
|
|
+ v-model="item.checked"
|
|
|
+ v-for="(item, index) in queryKeys" :key="index"
|
|
|
+ :name="item.code"
|
|
|
+ >{{item.name}}</u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
</view>
|
|
|
<view class="btns">
|
|
|
<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClear">重置</u-button>
|
|
@@ -176,9 +176,7 @@
|
|
|
partList: [],
|
|
|
allChecked: false,
|
|
|
showTab: false,
|
|
|
- placeTab: [],
|
|
|
- curTab: '',
|
|
|
- curType: '',
|
|
|
+ curType: [],
|
|
|
customBtnStyle: { // 自定义按钮样式
|
|
|
borderColor: this.$config('primaryColor'),
|
|
|
backgroundColor: this.$config('primaryColor'),
|
|
@@ -195,6 +193,23 @@
|
|
|
backgroundColor: '#dd524d'
|
|
|
}
|
|
|
}
|
|
|
+ ],
|
|
|
+ queryKeys: [
|
|
|
+ {
|
|
|
+ name: '库存充足',
|
|
|
+ code: '1',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '部分缺货',
|
|
|
+ code: '2',
|
|
|
+ checked: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '全部缺货',
|
|
|
+ code: '3',
|
|
|
+ checked: false
|
|
|
+ }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
@@ -216,7 +231,6 @@
|
|
|
this.nowData = JSON.parse(decodeURIComponent(opts.data));
|
|
|
this.stockCheckSn = this.nowData.stockCheckSn
|
|
|
this.getpartList()
|
|
|
- this.getShelfPlace()
|
|
|
|
|
|
if(this.stockCheckSn){
|
|
|
// 获取盘点单明细
|
|
@@ -234,6 +248,10 @@
|
|
|
uni.$off("resetStockCheck")
|
|
|
},
|
|
|
methods: {
|
|
|
+ checkboxGroupChange(e) {
|
|
|
+ console.log(e);
|
|
|
+ this.curType = e
|
|
|
+ },
|
|
|
// 全选
|
|
|
allCheckeChange(e){
|
|
|
this.$refs.productList.allSelect(e.value)
|
|
@@ -337,26 +355,9 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- // 获取货位号
|
|
|
- getShelfPlace(flag){
|
|
|
- getProductPlace({ shelfSn: this.nowData.shelfSn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- for(let a in res.data){
|
|
|
- this.placeTab.push(a)
|
|
|
- }
|
|
|
- // 排序
|
|
|
- this.placeTab.sort(function(a,b){ return (a+'').localeCompare(b+'');});
|
|
|
- if(!flag){
|
|
|
- this.curTab = ''
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.placeTab = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
handleClear(){
|
|
|
- this.curTab = ''
|
|
|
- this.curType = ''
|
|
|
+ this.curType = []
|
|
|
+ this.queryKeys.map(item => item.checked = false)
|
|
|
this.clearSearch()
|
|
|
},
|
|
|
clearSearch(){
|
|
@@ -376,7 +377,6 @@
|
|
|
pageSize: this.pageSize,
|
|
|
shelfSn: this.nowData.shelfSn,
|
|
|
queryWord: this.queryWord,
|
|
|
- shelfPlaceCodeHead: this.curTab,
|
|
|
currQtyFlag: this.curType=='available' ? 1 : '',
|
|
|
freezeQtyFlag: this.curType=='blocked' ? 1 : '',
|
|
|
}
|
|
@@ -385,7 +385,6 @@
|
|
|
uni.hideLoading()
|
|
|
if(res.status == 200){
|
|
|
let list = res.data.list
|
|
|
- console.log(list)
|
|
|
if (list && list.length){
|
|
|
// 分页 拼接数据
|
|
|
if (_this.pageNo != 1) {
|
|
@@ -653,24 +652,21 @@
|
|
|
.tabBox{
|
|
|
height: 100vh;
|
|
|
.tabs{
|
|
|
- flex-grow: 1;
|
|
|
overflow: auto;
|
|
|
padding: 20rpx;
|
|
|
> view{
|
|
|
flex-wrap: wrap;
|
|
|
justify-content: space-between;
|
|
|
> view{
|
|
|
- width: 45%;
|
|
|
+ width: 98%;
|
|
|
border: 1rpx solid #eee;
|
|
|
padding: 15rpx;
|
|
|
border-radius: 50rpx;
|
|
|
text-align: center;
|
|
|
margin-bottom: 15rpx;
|
|
|
- }
|
|
|
- .active{
|
|
|
- border:0;
|
|
|
- background-color: #0485F6;
|
|
|
- color: #fff;
|
|
|
+ /deep/ .u-checkbox__label{
|
|
|
+ flex-grow: 1;
|
|
|
+ }
|
|
|
}
|
|
|
&:first-child{
|
|
|
> view{
|
|
@@ -681,7 +677,7 @@
|
|
|
}
|
|
|
.btns{
|
|
|
display: flex;
|
|
|
- padding: 20upx;
|
|
|
+ padding: 40upx 20upx 20upx;
|
|
|
justify-content: space-between;
|
|
|
.handle-btn {
|
|
|
font-size: 28upx;
|