|
@@ -309,7 +309,7 @@ export default {
|
|
|
// 计算百分比
|
|
|
calculatePrice () {
|
|
|
const _this = this
|
|
|
- if (_this.form.giveRuleType === 'SUM_MONEY' && _this.form.regularUnit === 'YUAN' && _this.fullGiftRuleList[0].promotionValue && _this.fullGiftRuleList[0].regularValue) {
|
|
|
+ if (_this.form.giveRuleType == 'SUM_MONEY' && _this.form.regularUnit == 'YUAN' && _this.fullGiftRuleList[0].promotionValue && _this.fullGiftRuleList[0].regularValue) {
|
|
|
_this.scaleNum = ((_this.fullGiftRuleList[0].promotionValue / _this.fullGiftRuleList[0].regularValue) * 100).toFixed(2)
|
|
|
} else {
|
|
|
_this.scaleNum = 0
|
|
@@ -559,18 +559,19 @@ export default {
|
|
|
// 重新组成保存数据
|
|
|
if (resultObj.gateProductList && resultObj.gateProductList.length > 0) {
|
|
|
resultObj.gateProductList = _this.newData(resultObj.gateProductList)
|
|
|
- this.$refs.cillProduct.setTabVal(resultObj.gateProductList)
|
|
|
+ _this.$refs.cillProduct.setTabVal(resultObj.gateProductList)
|
|
|
}
|
|
|
if (resultObj.regularProductList && resultObj.regularProductList.length > 0) {
|
|
|
resultObj.regularProductList = _this.newData(resultObj.regularProductList)
|
|
|
- this.$refs.normalPriceProduct.setTabVal(resultObj.regularProductList)
|
|
|
+ _this.$refs.normalPriceProduct.setTabVal(resultObj.regularProductList)
|
|
|
}
|
|
|
if (resultObj.giftProductList && resultObj.giftProductList.length > 0) {
|
|
|
resultObj.giftProductList = _this.newData(resultObj.giftProductList)
|
|
|
- this.$refs.offerProduct.setTabVal(resultObj.giftProductList)
|
|
|
+ _this.$refs.offerProduct.setTabVal(resultObj.giftProductList)
|
|
|
}
|
|
|
delete resultObj.giftProductMap
|
|
|
- this.form = { ...this.form, ...resultObj }
|
|
|
+ _this.form = { ..._this.form, ...resultObj }
|
|
|
+ _this.calculatePrice()
|
|
|
}
|
|
|
})
|
|
|
},
|