Commit fadcb43a authored by zhangjianguo's avatar zhangjianguo

判断失效在编辑的时候

parent 78ed026a
......@@ -296,9 +296,16 @@ export default {
this.TotalPrice += price * this.list[i].goods_list[index].num;
let goods_list_all = true; //判断该商场是否全选
this.list[i].goods_list.forEach((x) => {
if (x.checked == false&& x.new_status==0) {
goods_list_all = false;
}
if(this.editType == 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) {
this.list[i].checked = true;
......@@ -354,23 +361,26 @@ export default {
}
//编辑时候的商城全选
if(this.cart_id_list.length>0){
this.cart_id_list.forEach((z) => {
if (x.id != z.id) {
let obj = {
mch_id: 0,
id: x.id,
};
add_cartlist.push(obj);
}
});
}else{
let obj = {
mch_id: 0,
id: x.id,
};
add_cartlist.push(obj);
}
if(this.editType ==true){
if(this.cart_id_list.length>0){
this.cart_id_list.forEach((z) => {
if (x.id != z.id) {
let obj = {
mch_id: 0,
id: x.id,
};
add_cartlist.push(obj);
}
});
}else{
let obj = {
mch_id: 0,
id: x.id,
};
add_cartlist.push(obj);
}
}
})
this.cart_id_list= this.cart_id_list.concat(add_cartlist)
let list_all = true; //判断所有商场是否全选
......@@ -441,10 +451,6 @@ export default {
})
});
// if (this.editType == true) {
// this.cart_id_list = [];
// }
}
},
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