Commit cd6322e0 by 杨明

fixed

1 parent f78a2620
...@@ -283,6 +283,7 @@ export default { ...@@ -283,6 +283,7 @@ export default {
}, },
// 选择/取消 // 选择/取消
handleSelectionTable(val) { handleSelectionTable(val) {
var list = JSON.parse(JSON.stringify(this.selectedList[this.activeName].list))
var count = 0 var count = 0
var currentIdList = this.GoodsList.map(item => item.id) var currentIdList = this.GoodsList.map(item => item.id)
val val
...@@ -296,13 +297,14 @@ export default { ...@@ -296,13 +297,14 @@ export default {
this.selectedList[this.activeName].list = [] this.selectedList[this.activeName].list = []
} }
val.forEach(item => { val.forEach(item => {
let isSelected = list.find(k => k.id == item.id)
if (this.selectedList[this.activeName].list.findIndex(k => k.id == item.id) == '-1') { if (this.selectedList[this.activeName].list.findIndex(k => k.id == item.id) == '-1') {
this.selectedList[this.activeName].list.push({ this.selectedList[this.activeName].list.push({
id: item.id, id: item.id,
goodId: item.goodId, goodId: item.goodId,
appearance: item.appearance, appearance: item.appearance,
brandName: item.brandName, brandName: item.brandName,
couponAmount: 1, couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : 1,
goodsName: item.goodsName, goodsName: item.goodsName,
denomination: item.denomination, denomination: item.denomination,
effectiveDays: item.effectiveDays, effectiveDays: item.effectiveDays,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!