浏览代码

修改bug

chenrui 1 年之前
父节点
当前提交
5093add48e

+ 1 - 1
src/views/promotionRulesManagement/dealerPromotions/detailModal.vue

@@ -40,7 +40,7 @@
         <a-form-model-item label="满赠规则" prop="regularSameFlag" v-if="form.promotionRuleType ==='BUY_PROD_GIVE_MONEY'">
           <div>{{ form.giveRuleType==='SUM_MONEY'?'金额叠加':'按比例' }}</div>
           <div v-if="form.giveRuleList&&form.giveRuleList.length>0">
-            <div v-if="form.giveRuleType==='SUM_MONEY'">购买满{{ form.giveRuleList[0].regularValue }}{{ form.giveRuleList[0].regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ form.giveRuleList[0].promotionValue }}元<span v-if="form.giveRuleList[0].regularUnit==='YUAN'">({{ perCentNum }}%促销品采购额)</span></div>
+            <div v-if="form.giveRuleType==='SUM_MONEY'">购买满{{ form.giveRuleList[0].regularValue }}{{ form.giveRuleList[0].regularUnit==='YUAN'?'元':'个' }}正价产品,送{{ form.giveRuleList[0].promotionValue }}元<span>({{ form.giveRuleList[0].regularUnit==='YUAN'?perCentNum+'%':'' }}促销品采购额)</span></div>
             <div v-if="form.giveRuleType==='RATIO' &&form.giveRuleList && form.giveRuleList.length>0 ">
               <div v-for="item in form.giveRuleList" :key="item.scopeLevel">
                 {{ form.giveRuleList.length>1?item.scopeLevel+'、' :'' }}产品购买满{{ item.regularValue }}{{ item.regularUnit==='YUAN'?'元':'个' }}正价产品,送正价产品总金额的{{ item.promotionValue }}%为促销品采购额

+ 6 - 5
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -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()
         }
       })
     },