Commit fadcb43a authored by zhangjianguo's avatar zhangjianguo

判断失效在编辑的时候

parent 78ed026a
...@@ -296,9 +296,16 @@ export default { ...@@ -296,9 +296,16 @@ export default {
this.TotalPrice += price * this.list[i].goods_list[index].num; this.TotalPrice += price * this.list[i].goods_list[index].num;
let goods_list_all = true; //判断该商场是否全选 let goods_list_all = true; //判断该商场是否全选
this.list[i].goods_list.forEach((x) => { this.list[i].goods_list.forEach((x) => {
if(this.editType == false){//编辑的时候不判断
if (x.checked == false&& x.new_status==0) { if (x.checked == false&& x.new_status==0) {
goods_list_all = false; goods_list_all = false;
} }
}else{
if (x.checked == false) {
goods_list_all = false;
}
}
}); });
if (goods_list_all == true) { if (goods_list_all == true) {
this.list[i].checked = true; this.list[i].checked = true;
...@@ -354,6 +361,7 @@ export default { ...@@ -354,6 +361,7 @@ export default {
} }
//编辑时候的商城全选 //编辑时候的商城全选
if(this.editType ==true){
if(this.cart_id_list.length>0){ if(this.cart_id_list.length>0){
this.cart_id_list.forEach((z) => { this.cart_id_list.forEach((z) => {
if (x.id != z.id) { if (x.id != z.id) {
...@@ -371,6 +379,8 @@ export default { ...@@ -371,6 +379,8 @@ export default {
}; };
add_cartlist.push(obj); add_cartlist.push(obj);
} }
}
}) })
this.cart_id_list= this.cart_id_list.concat(add_cartlist) this.cart_id_list= this.cart_id_list.concat(add_cartlist)
let list_all = true; //判断所有商场是否全选 let list_all = true; //判断所有商场是否全选
...@@ -441,10 +451,6 @@ export default { ...@@ -441,10 +451,6 @@ export default {
}) })
}); });
// if (this.editType == true) {
// this.cart_id_list = [];
// }
} }
}, },
inputblur(i,index,num,price,e){ inputblur(i,index,num,price,e){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment