chunping 3 ani în urmă
părinte
comite
e4d507f4bd
1 a modificat fișierele cu 18 adăugiri și 1 ștergeri
  1. 18 1
      src/views/business/coupon/add.vue

+ 18 - 1
src/views/business/coupon/add.vue

@@ -126,7 +126,7 @@ export default {
       readonly: this.$route.name === 'View',
       addData: {
         ticketBoxList:[],
-        useArea: 0,
+        useArea: 2,
         dueDays: 90,
         type: 2
       },
@@ -175,6 +175,23 @@ export default {
   },
   methods: {
     update() {
+      if (this.addData.type == 1) {
+        if(this.addData.useArea !== 0) {
+          this.$message({
+            message: '请选择使用范围!',
+            type: 'warning'
+          })
+          return
+        }
+      } else if (this.addData.type == 2) {
+        if(this.addData.useArea !== 2) {
+          this.$message({
+            message: '请选择使用范围!',
+            type: 'warning'
+          })
+          return
+        }
+      }
       this.$refs.addItem.validate((valid, items) => {
         if (valid) {
           this.addIng = true