chenrui 1 年間 前
コミット
79b71f5071

+ 18 - 3
src/views/promotionRulesManagement/dealerPromotions/sendAmountModal.vue

@@ -166,7 +166,7 @@
         </a-form-model-item>
       </a-form-model>
       <a-card size="small" :bordered="false" class="pages-wrap">
-        <div class="flex">
+        <div class="flex" style="margin-bottom:10px;">
           <a-radio-group v-model="chooseVal" button-style="solid">
             <a-radio-button value="a" v-show="form.gateFlag==='1'">
               门槛产品
@@ -243,7 +243,9 @@ export default {
         regularUnit: 'YUAN',
         scopeFlag: '1',
         gateInfo: undefined,
-        ruleInfo: undefined
+        ruleInfo: undefined,
+        gateUnit: undefined,
+        quotaUnit: undefined
       },
       rules: {
         description: [ { required: true, message: '请输入规则简称', trigger: 'blur' } ],
@@ -347,6 +349,14 @@ export default {
               _this.$message.warning('规则门槛条件不能为空!')
               return
             }
+            if (_this.form.gateType == 'RATIO_AMOUNT') {
+              _this.form.gateUnit = 'RATIO'
+            } else if (_this.form.gateType == 'MIN_AMOUNT') {
+              _this.form.gateUnit = 'YUAN'
+            } else {
+              _this.form.gateUnit = 'YUAN'
+              _this.form.quotaUnit = 'YUAN'
+            }
           }
           if (_this.form.giveRuleType == 'SUM_MONEY') {
             if (!_this.fullGiftRuleList[0].regularValue || _this.fullGiftRuleList[0].regularValue <= 0) {
@@ -508,7 +518,9 @@ export default {
         giftProductList: undefined,
         regularProductList: undefined,
         gateInfo: undefined,
-        ruleInfo: undefined
+        ruleInfo: undefined,
+        gateUnit: undefined,
+        quotaUnit: undefined
       }
       this.$nextTick(() => {
         this.$refs.ruleForm.resetFields()
@@ -680,4 +692,7 @@ export default {
       justify-content:space-between;
     }
   }
+  /deep/.ve-table{
+    border-radius:5px;
+  }
 </style>

+ 20 - 5
src/views/promotionRulesManagement/dealerPromotions/sendProductsModal.vue

@@ -161,7 +161,7 @@
         </a-form-model-item>
       </a-form-model>
       <a-card size="small" :bordered="false" class="pages-wrap">
-        <div class="flex">
+        <div class="flex" style="margin-bottom:10px;">
           <a-radio-group v-model="chooseVal" button-style="solid" @change="onChooseVal">
             <a-radio-button value="a" v-show="form.gateFlag==='1'">
               门槛产品
@@ -250,7 +250,9 @@ export default {
         regularPromotionSameFlag: '1',
         giftProductMap: {},
         gateInfo: undefined,
-        ruleInfo: undefined
+        ruleInfo: undefined,
+        gateUnit: undefined,
+        quotaUnit: undefined
       },
       rules: {
         description: [ { required: true, message: '请输入规则简称', trigger: 'blur' } ],
@@ -371,6 +373,14 @@ export default {
               _this.$message.warning('规则门槛条件不能为空!')
               return
             }
+            if (_this.form.gateType == 'RATIO_AMOUNT') {
+              _this.form.gateUnit = 'RATIO'
+            } else if (_this.form.gateType == 'MIN_AMOUNT') {
+              _this.form.gateUnit = 'YUAN'
+            } else {
+              _this.form.gateUnit = 'YUAN'
+              _this.form.quotaUnit = 'YUAN'
+            }
           }
           const hasNullVal = _this.fullGiftRuleList.some(itemVal => {
             if (itemVal.regularValue && itemVal.promotionValue) {
@@ -478,8 +488,8 @@ export default {
             }
           }
           var newInfo = `<div>${form.accrualFlag == '1' ? '数量叠加;' : ''}${form.convertExpenseFlag == '1' ? '可转费用报销单;' : ''}</div>`
-          _this.fullGiftRuleList.forEach((item,i) => {
-            newInfo += `<div>${i*1+1}、${form.regularSameFlag == '1' ? '同款' : '不同款'}产品购买满${item.regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送${item.promotionValue}个促销产品</div>`
+          _this.fullGiftRuleList.forEach((item, i) => {
+            newInfo += `<div>${i * 1 + 1}、${form.regularSameFlag == '1' ? '同款' : '不同款'}产品购买满${item.regularValue}${form.regularUnit == 'YUAN' ? '元' : '个'}正价产品,送${item.promotionValue}个促销产品</div>`
           })
           newInfo += form.restrictFlag == '1' ? `<div>限制正价产品${form.restrictCategory}款</div>` : ''
           form.ruleInfo = newInfo
@@ -546,7 +556,9 @@ export default {
         gateProductList: undefined,
         regularProductList: undefined,
         gateInfo: undefined,
-        ruleInfo: undefined
+        ruleInfo: undefined,
+        gateUnit: undefined,
+        quotaUnit: undefined
       }
       this.$nextTick(() => {
         this.$refs.ruleForm.resetFields()
@@ -718,5 +730,8 @@ export default {
       background-color: #ed1c24 !important;
     }
   }
+  /deep/.ve-table{
+    border-radius:5px;
+  }
 
 </style>

+ 2 - 0
src/views/promotionRulesManagement/dealerPromotions/specialOfferModal.vue

@@ -387,11 +387,13 @@ export default {
                 return
               }
             }
+            form.gateUnit = form.gateType =='RATIO_AMOUNT'? 'RATIO':form.gateType =='MIN_AMOUNT'?'YUAN':form.gateUnit
           } else {
             form.gateProductList = []
             form.gateValue = ''
             form.quotaAmount = ''
             form.gateType = undefined
+            form.gateUnit =''
           }
           form.specialProductList = _this.$refs.specialProduct.getResultVal()
           if (form.specialProductList.length == 0) {

+ 2 - 0
src/views/promotionRulesManagement/dealerPromotions/tableType3.vue

@@ -2,6 +2,7 @@
   <div class="pages-wrap">
     <!-- 列表  触底加载 -->
     <ve-table
+      :style="{width:'100%'}"
       border-y
       :scroll-width="0"
       :max-height="tableHeight"
@@ -13,6 +14,7 @@
       :table-data="dataSource"
       row-key-field-name="productScopeSn"
       :column-width-resize-option="columnWidthResizeOption"
+      s
     />
     <div v-show="showEmpty" class="empty-data"><a-empty description="暂无产品" :image="simpleImage"/></div>
     <div class="btn-cont">