|
@@ -26,14 +26,14 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="check-list">
|
|
|
- <productList ref="productList" noDataText="暂无产品" @allChecked="allCheckedCallback"></productList>
|
|
|
+ <productList ref="productList" noDataText="暂无产品" @updateNums="updateNums" @allChecked="allCheckedCallback"></productList>
|
|
|
</view>
|
|
|
<!-- 底部栏 -->
|
|
|
<view class="footer-bar flex align_center">
|
|
|
<view class="f-left">
|
|
|
<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
|
|
|
</view>
|
|
|
- <view class="f-mid flex align_center" @click="openCart">
|
|
|
+ <view class="f-mid" @click="openCart">
|
|
|
<view>
|
|
|
已选<text>{{totalCategory}}</text>款/<text>{{totalQty}}</text>件
|
|
|
</view>
|
|
@@ -134,7 +134,7 @@
|
|
|
</view>
|
|
|
<view class="btns">
|
|
|
<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClear">重置</u-button>
|
|
|
- <u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="clearSearch">查询</u-button>
|
|
|
+ <u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="changeSearch">查询</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
@@ -231,6 +231,9 @@
|
|
|
allCheckeChange(e){
|
|
|
this.$refs.productList.allSelect(e.value)
|
|
|
this.chooseList = this.$refs.productList.getAllChecked()
|
|
|
+ if(!e.value){
|
|
|
+ this.showCart = false
|
|
|
+ }
|
|
|
},
|
|
|
allCheckedCallback(val){
|
|
|
this.allChecked = val
|
|
@@ -296,19 +299,25 @@
|
|
|
this.chooseList = []
|
|
|
this.showCart = false
|
|
|
this.allChecked = false
|
|
|
- this.$refs.productList.allSelect(false)
|
|
|
+ if(this.$refs.productList){
|
|
|
+ this.$refs.productList.allSelect(false)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ updateNums(){
|
|
|
+ this.chooseList = this.$refs.productList.getAllChecked()
|
|
|
},
|
|
|
// 修改数量
|
|
|
cartChangeNums(v){
|
|
|
this.$refs.productList.changeNums(v.index.split('_')[1],v.value)
|
|
|
+ this.chooseList.splice()
|
|
|
+ },
|
|
|
+ clearSearch(){
|
|
|
+ this.queryWord = ''
|
|
|
+ this.changeSearch()
|
|
|
},
|
|
|
handleClear(){
|
|
|
this.stockStateList = []
|
|
|
this.queryKeys.map(item => item.checked = false)
|
|
|
- this.clearSearch()
|
|
|
- },
|
|
|
- clearSearch(){
|
|
|
- this.queryWord = ''
|
|
|
this.changeSearch()
|
|
|
},
|
|
|
changeSearch(){
|
|
@@ -324,6 +333,9 @@
|
|
|
queryWord: this.queryWord,
|
|
|
stockStateList: this.stockStateList
|
|
|
}
|
|
|
+ _this.clearChoose()
|
|
|
+ _this.partList = []
|
|
|
+ _this.$refs.productList && _this.$refs.productList.setData(_this.partList)
|
|
|
_this.status = 'loading'
|
|
|
uni.showLoading({
|
|
|
mask:true,
|
|
@@ -489,7 +501,6 @@
|
|
|
}
|
|
|
.f-mid{
|
|
|
flex-grow: 1;
|
|
|
- font-size: 0.8rem;
|
|
|
color: #666;
|
|
|
> view{
|
|
|
padding: 0 5upx;
|
|
@@ -498,6 +509,9 @@
|
|
|
color: red;
|
|
|
}
|
|
|
}
|
|
|
+ &:last-child{
|
|
|
+ font-size: 0.8rem;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.f-btns{
|