vbea 2 лет назад
Родитель
Сommit
5e28a90f6e
1 измененных файлов с 9 добавлено и 2 удалено
  1. 9 2
      Strides-Admin/src/views/voucher/detail.vue

+ 9 - 2
Strides-Admin/src/views/voucher/detail.vue

@@ -79,7 +79,8 @@
             class="flex1">
             <el-select
               class="add-text"
-              v-model="form.voucherType">
+              v-model="form.voucherType"
+              @change="changeVoucherType">
               <el-option
                 v-for="(item, index) in options.type"
                 :key="index"
@@ -105,7 +106,7 @@
         <div class="section-title">VOUCHER CONFIGURATION</div>
         <div class="flexcr">
           <el-form-item
-            :label="'Set ' + (form.voucherType || 'Voucher Value')"
+            :label="'Set ' + (form.voucherType || 'Voucher Value') + ':'"
             prop="voucherValue"
             class="flex1">
             <el-input
@@ -543,6 +544,12 @@ export default {
         this.form.timePeriod = ["", ""];
       }
     },
+    changeVoucherType() {
+      if (this.form.voucherType == 'Free Charging') {
+        this.form.voucherValue = "";
+        this.form.redemptionCode = "";
+      }
+    },
     onClickSave() {
       this.$refs.form.validate(result => {
         if (result) {