|
@@ -22,13 +22,13 @@
|
|
|
<!--选择商品-->
|
|
|
<view class="checkbox-box" @click.stop="ischeck(item,pros)" :class="[pros.validFlag == '3' && !isshowDelbtn ?'disabled' : '']">
|
|
|
<button class="checkbox iconfont"
|
|
|
- :disabled="pros.validFlag == '3' && !isshowDelbtn"
|
|
|
- :class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']">
|
|
|
+ :disabled="pros.validFlag == '3' && !isshowDelbtn"
|
|
|
+ :class="[pros.productsChecked ?'icon-gouxuanl':'icon-weigouxuan']">
|
|
|
</button>
|
|
|
</view>
|
|
|
- <view class="pros-img" @click.stop="navToListPage(pros.productID)" ><image :src="pros.image ? pros.image:''" alt="" /></view>
|
|
|
+ <view class="pros-img" @click.stop="navToListPage(pros.productId)" ><image :src="pros.image ? pros.image:''" alt="" /></view>
|
|
|
<view class="pros-product">
|
|
|
- <view class="producttitle" @click.stop="navToListPage(pros.productID)" >
|
|
|
+ <view class="producttitle" @click.stop="navToListPage(pros.productId)" >
|
|
|
<text v-if="pros.validFlag == '3'" class="no-text">商品已下架</text>{{pros.name}}
|
|
|
</view>
|
|
|
<view class="productspec">规格:{{pros.unit ? pros.unit : ''}}</view>
|
|
@@ -227,9 +227,11 @@
|
|
|
this.goodsList.forEach((item,index) => {
|
|
|
let productsListLength = item.cartList.length,
|
|
|
invalidLength = 0;
|
|
|
+ item.checked = false;
|
|
|
item.cartList.forEach(pros => {
|
|
|
pros.shopID = item.shopID;
|
|
|
pros.isStep = false
|
|
|
+ pros.productsChecked = false
|
|
|
if(pros.validFlag == '3' ) {invalidLength++;}
|
|
|
if(pros.step === 2){
|
|
|
if(pros.number % pros.min != 0){
|
|
@@ -241,6 +243,7 @@
|
|
|
})
|
|
|
item.isDisabled = invalidLength === productsListLength;
|
|
|
})
|
|
|
+ console.log(this.goodsList);
|
|
|
} else {
|
|
|
this.goodsList = [];
|
|
|
}
|
|
@@ -268,6 +271,7 @@
|
|
|
},
|
|
|
ischeck(item,pro){//为未选中的时候改变为true,反之为true
|
|
|
pro.productsChecked = !pro.productsChecked;
|
|
|
+ console.log(pro.productsChecked)
|
|
|
this.updateProductCheckedAllBtn(item);
|
|
|
this.updateCheckAllBtn();
|
|
|
},
|
|
@@ -503,7 +507,7 @@
|
|
|
let products = res.cartList
|
|
|
products.forEach(pros=>{
|
|
|
if(pros.productsChecked){
|
|
|
- setGoodsList.push(pros.productID)
|
|
|
+ setGoodsList.push(pros.productId)
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -529,7 +533,7 @@
|
|
|
this.goodsList.forEach(el=>{//获取勾选的商品ID拼接字符串逗号隔开,最后一个逗号去掉
|
|
|
el.cartList.forEach(pros=>{
|
|
|
if(pros.productsChecked){
|
|
|
- productID += pros.productID+','
|
|
|
+ productID += pros.productId+','
|
|
|
}
|
|
|
})
|
|
|
})
|
|
@@ -599,7 +603,7 @@
|
|
|
let products = delitem.cartList
|
|
|
products.forEach(pros=>{
|
|
|
if(pros.productsChecked){
|
|
|
- this.delGoodsList += pros.productID+','
|
|
|
+ this.delGoodsList += pros.productId+','
|
|
|
}
|
|
|
})
|
|
|
})
|