|
@@ -139,7 +139,7 @@
|
|
|
let ret = false
|
|
|
if(!this.editFlag){
|
|
|
this.list.forEach(key => {
|
|
|
- ret = key.every(item => item.status==0||item.dealerScopeFlag==0)
|
|
|
+ ret = key.every(item => !item.status || item.status==0 || item.dealerScopeFlag==0)
|
|
|
})
|
|
|
}
|
|
|
return ret
|
|
@@ -180,9 +180,9 @@
|
|
|
key.discountType = a.discountType
|
|
|
key.promoProductSn = a.promoProductSn
|
|
|
key.promoSn = a.promoSn
|
|
|
+ key.orginPrice = key.price
|
|
|
// 特价
|
|
|
if(key.promoType=='PROMO_PROD'){
|
|
|
- key.orginPrice = key.price
|
|
|
// 直降
|
|
|
if(key.discountType == 'STRAIGHT_DOWN'){
|
|
|
key.price = key.price - key.resultValue
|
|
@@ -192,7 +192,6 @@
|
|
|
key.price = Number(key.price * key.resultValue).toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
- item.giftQty = key.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(key.qty / key.conditionValue)*key.resultValue : 0
|
|
|
}
|
|
|
delete key.shopPromoProduct
|
|
|
return {
|
|
@@ -217,7 +216,7 @@
|
|
|
promoType: key.promoType,
|
|
|
promoProductSn: key.promoProductSn,
|
|
|
promoSn: key.promoSn,
|
|
|
- giftQty: key.giftQty
|
|
|
+ giftQty: 0
|
|
|
}
|
|
|
}))
|
|
|
}
|
|
@@ -310,7 +309,7 @@
|
|
|
this.list.forEach(key => {
|
|
|
key.forEach(item => {
|
|
|
item.edit = this.editFlag
|
|
|
- if(item.status==0||item.dealerScopeFlag==0){
|
|
|
+ if(!item.status||item.status==0||item.dealerScopeFlag==0){
|
|
|
item.checked = false
|
|
|
}
|
|
|
})
|
|
@@ -458,7 +457,7 @@
|
|
|
productSn:item.productSn,
|
|
|
productCode:item.productCode,
|
|
|
qty: item.qty,
|
|
|
- price:item.price,
|
|
|
+ price:item.orginPrice,
|
|
|
})
|
|
|
cartSn.push({
|
|
|
cartSn: item.cartSn,
|
|
@@ -550,19 +549,21 @@
|
|
|
this.totalSel += 1 // 已选数量
|
|
|
// 如果是返券类型
|
|
|
if(item.promoType=='BUY_PROD_GIVE_VALID'){
|
|
|
- this.totalCoupon += item.resultValue
|
|
|
+ this.totalCoupon += item.resultValue * item.qty
|
|
|
}
|
|
|
// 特价
|
|
|
if(item.promoType=='PROMO_PROD'){
|
|
|
// 直降
|
|
|
if(item.discountType == 'STRAIGHT_DOWN'){
|
|
|
- this.totalDiscount += item.resultValue
|
|
|
+ this.totalDiscount += item.resultValue * item.qty
|
|
|
}
|
|
|
// 折扣
|
|
|
if(item.discountType == 'DISCOUNT'){
|
|
|
- this.totalDiscount += Number(item.price * (1-item.resultValue))
|
|
|
+ this.totalDiscount += Number(item.price * (1-item.resultValue)) * item.qty
|
|
|
}
|
|
|
}
|
|
|
+ // 满赠
|
|
|
+ item.giftQty = item.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(item.qty / item.conditionValue)*item.resultValue : 0
|
|
|
})
|
|
|
})
|
|
|
},
|