|
@@ -3,7 +3,9 @@
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="top" v-if="list.length !=0">
|
|
<view class="top" v-if="list.length !=0">
|
|
<view class="text_1">
|
|
<view class="text_1">
|
|
- <checkbox class="checkbox" @click="selectAll(false)" :checked="isAll">全选</checkbox>
|
|
|
|
|
|
+ <uni-popup ref="popup" :mask-click="true" background-color="#f1f1f1">
|
|
|
|
+ <checkbox class="checkbox" @click="selectAll(false)" :checked="isAll">全选</checkbox>
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
<view class="text_2" v-if="num==0" @click="edit(1)">编辑</view>
|
|
<view class="text_2" v-if="num==0" @click="edit(1)">编辑</view>
|
|
<view class="text_2" v-if="num==1" @click="edit(0)">完成</view>
|
|
<view class="text_2" v-if="num==1" @click="edit(0)">完成</view>
|
|
@@ -295,12 +297,19 @@ export default {
|
|
if (result.errcode === 0) {
|
|
if (result.errcode === 0) {
|
|
list = list.map(i => ({ ...i, goods: i.goods.filter(f => f.cart_id !== e.cart_id) }))
|
|
list = list.map(i => ({ ...i, goods: i.goods.filter(f => f.cart_id !== e.cart_id) }))
|
|
this.$set(this, `list`, list);
|
|
this.$set(this, `list`, list);
|
|
|
|
+ // 检查店铺内是否还有商品
|
|
|
|
+ this.checkShopGoodsExist();
|
|
// 计算总额
|
|
// 计算总额
|
|
this.countMoney();
|
|
this.countMoney();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ //检查店铺内是否还有商品
|
|
|
|
+ checkShopGoodsExist() {
|
|
|
|
+ let list = this.list;
|
|
|
|
+ list = list.filter(f => f.goods && f.goods.length > 0)
|
|
|
|
+ this.$set(this, `list`, list);
|
|
},
|
|
},
|
|
// 计算总额
|
|
// 计算总额
|
|
countMoney() {
|
|
countMoney() {
|