Browse Source

优化:优惠券折扣率范围

萤火科技 5 years ago
parent
commit
78fe0db0d3

+ 4 - 4
src/views/market/coupon/Create.vue

@@ -38,13 +38,13 @@
         >
         >
           <a-input-number
           <a-input-number
             :min="0"
             :min="0"
-            :max="100"
-            :precision="0"
-            v-decorator="['discount', { initialValue: 0, rules: [{ required: true, message: '请输入折扣率' }] }]"
+            :max="9.9"
+            :precision="1"
+            v-decorator="['discount', { initialValue: 9.9, rules: [{ required: true, message: '请输入折扣率' }] }]"
           />
           />
           <span class="ml-5">%</span>
           <span class="ml-5">%</span>
           <p class="form-item-help">
           <p class="form-item-help">
-            <small>折扣率范围 0-100,80代表打8折,0代表不折扣</small>
+            <small>折扣率范围 0-9.9,8代表打8折,0代表不折扣</small>
           </p>
           </p>
         </a-form-item>
         </a-form-item>
         <a-form-item label="最低消费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
         <a-form-item label="最低消费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">

+ 1 - 1
src/views/market/coupon/Index.vue

@@ -47,7 +47,7 @@
         </template>
         </template>
         <template v-if="item.coupon_type == 20">
         <template v-if="item.coupon_type == 20">
           <span>打</span>
           <span>打</span>
-          <span class="c-p mlr-2">{{ item.discount / 10 }}</span>
+          <span class="c-p mlr-2">{{ item.discount }}</span>
           <span>折</span>
           <span>折</span>
         </template>
         </template>
       </template>
       </template>

+ 4 - 4
src/views/market/coupon/Update.vue

@@ -38,13 +38,13 @@
         >
         >
           <a-input-number
           <a-input-number
             :min="0"
             :min="0"
-            :max="100"
-            :precision="0"
-            v-decorator="['discount', { initialValue: 0, rules: [{ required: true, message: '请输入折扣率' }] }]"
+            :max="9.9"
+            :precision="1"
+            v-decorator="['discount', { initialValue: 9.9, rules: [{ required: true, message: '请输入折扣率' }] }]"
           />
           />
           <span class="ml-5">%</span>
           <span class="ml-5">%</span>
           <p class="form-item-help">
           <p class="form-item-help">
-            <small>折扣率范围 0-100,80代表打8折,0代表不折扣</small>
+            <small>折扣率范围 0-9.9,8代表打8折,0代表不折扣</small>
           </p>
           </p>
         </a-form-item>
         </a-form-item>
         <a-form-item label="最低消费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
         <a-form-item label="最低消费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">