|
@@ -306,6 +306,7 @@
|
|
let goodsCheckedLength = 0,
|
|
let goodsCheckedLength = 0,
|
|
disabledListLength = 0,
|
|
disabledListLength = 0,
|
|
goodsList = this.goodsList;
|
|
goodsList = this.goodsList;
|
|
|
|
+
|
|
goodsList.forEach(item => {
|
|
goodsList.forEach(item => {
|
|
if(item.checked) {
|
|
if(item.checked) {
|
|
goodsCheckedLength++;
|
|
goodsCheckedLength++;
|
|
@@ -338,6 +339,10 @@
|
|
pros.productsChecked = false;
|
|
pros.productsChecked = false;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ //删除按钮 全选包括失效商品勾选
|
|
|
|
+ this.failureList.forEach(failureItem=>{
|
|
|
|
+ failureItem.productsChecked = true;
|
|
|
|
+ })
|
|
},
|
|
},
|
|
updateBothCheckBtn() {
|
|
updateBothCheckBtn() {
|
|
if(this.isshowDelbtn) {
|
|
if(this.isshowDelbtn) {
|
|
@@ -346,6 +351,7 @@
|
|
item.checked = this.isCheckAll;
|
|
item.checked = this.isCheckAll;
|
|
this.setProductChecked(item);
|
|
this.setProductChecked(item);
|
|
})
|
|
})
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
this.goodsList.forEach((item)=>{
|
|
this.goodsList.forEach((item)=>{
|
|
item.checked = this.isCheckAll && !item.isDisabled;
|
|
item.checked = this.isCheckAll && !item.isDisabled;
|
|
@@ -534,7 +540,6 @@
|
|
if(this.isCheckAll) {
|
|
if(this.isCheckAll) {
|
|
this.updateBothCheckBtn();
|
|
this.updateBothCheckBtn();
|
|
} else {
|
|
} else {
|
|
- // 失效也被勾选
|
|
|
|
this.goodsList.forEach(item => {
|
|
this.goodsList.forEach(item => {
|
|
if(item.checked) {
|
|
if(item.checked) {
|
|
item.productsList.forEach(pros => {
|
|
item.productsList.forEach(pros => {
|
|
@@ -544,6 +549,7 @@
|
|
})
|
|
})
|
|
this.updateCheckAllBtn();
|
|
this.updateCheckAllBtn();
|
|
}
|
|
}
|
|
|
|
+ // 失效也被勾选
|
|
this.failureList.forEach(failureItem => {
|
|
this.failureList.forEach(failureItem => {
|
|
if(failureItem.isFailureLayer){
|
|
if(failureItem.isFailureLayer){
|
|
failureItem.isFailureLayer = false
|
|
failureItem.isFailureLayer = false
|
|
@@ -597,7 +603,9 @@
|
|
if(this.delGoodsList.length == 0){
|
|
if(this.delGoodsList.length == 0){
|
|
this.$util.msg("请选择要删除的商品~",2000);
|
|
this.$util.msg("请选择要删除的商品~",2000);
|
|
return
|
|
return
|
|
- }else{
|
|
|
|
|
|
+ }else{
|
|
|
|
+ console.log(this.delGoodsList);
|
|
|
|
+ debugger
|
|
this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
|
|
this.$util.modal('','确定删除选中的商品吗?','确定','取消',true,() =>{
|
|
shoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
|
|
shoppingCartDelete({userID:this.userID,productIDs:this.delGoodsList}).then(response =>{
|
|
this.$util.msg('删除成功',2000);
|
|
this.$util.msg('删除成功',2000);
|