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 (x.checked == false&& x.new_status==0) { if(this.editType == false){//编辑的时候不判断
goods_list_all = false; if (x.checked == false&& x.new_status==0) {
} 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,23 +361,26 @@ export default { ...@@ -354,23 +361,26 @@ export default {
} }
//编辑时候的商城全选 //编辑时候的商城全选
if(this.cart_id_list.length>0){ if(this.editType ==true){
this.cart_id_list.forEach((z) => { if(this.cart_id_list.length>0){
if (x.id != z.id) { this.cart_id_list.forEach((z) => {
let obj = { if (x.id != z.id) {
mch_id: 0, let obj = {
id: x.id, mch_id: 0,
}; id: x.id,
add_cartlist.push(obj); };
} add_cartlist.push(obj);
}); }
}else{ });
let obj = { }else{
mch_id: 0, let obj = {
id: x.id, mch_id: 0,
}; id: x.id,
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