瀏覽代碼

Merge branch '02/24resetMain' into test

mo 4 年之前
父節點
當前提交
809233800c
共有 2 個文件被更改,包括 17 次插入13 次删除
  1. 12 8
      src/views/categroyManager/vipActiveList.vue
  2. 5 5
      src/views/categroyManager/vipNewActive.vue

+ 12 - 8
src/views/categroyManager/vipActiveList.vue

@@ -947,13 +947,17 @@ export default {
       this.activeType = row.type;
       this.attribute1 = row.attribute1;
       this.attribute2 = row.attribute2;
+
+      let studentMaxUsedTimes = row.studentMaxUsedTimes == -1?null:row.studentMaxUsedTimes
+      let minCourseNum = row.minCourseNum == -1?null:row.minCourseNum
+      let maxCourseNum = row.maxCourseNum == -1?null:row.maxCourseNum
       this.$set(
         this.courseNumForm,
         "studentMaxUsedTimes",
-        row.studentMaxUsedTimes
+        studentMaxUsedTimes
       );
-      this.$set(this.courseNumForm, "minCourseNum", row.minCourseNum);
-      this.$set(this.courseNumForm, "maxCourseNum", row.maxCourseNum);
+      this.$set(this.courseNumForm, "minCourseNum", minCourseNum);
+      this.$set(this.courseNumForm, "maxCourseNum", maxCourseNum);
       this.giveClassPaySalaryFlag =
         row.giveClassPaySalaryFlag == 1 ? true : false;
     },
@@ -1056,12 +1060,12 @@ export default {
                 offlineSalarySettlement,
               };
               if (type == "BASE_ACTIVITY") {
-                this.courseNumForm.studentMaxUsedTimes = 0;
-                this.courseNumForm.minCourseNum = 0;
-                this.courseNumForm.maxCourseNum = 0;
+                this.courseNumForm.studentMaxUsedTimes = -1;
+                this.courseNumForm.minCourseNum = -1;
+                this.courseNumForm.maxCourseNum = -1;
               } else if (type == "GIVE_CLASS") {
-                this.courseNumForm.minCourseNum = 0;
-                this.courseNumForm.maxCourseNum = 0;
+                this.courseNumForm.minCourseNum = -1;
+                this.courseNumForm.maxCourseNum = -1;
               }
               // 发请求创建活动
               resetVipActive({

+ 5 - 5
src/views/categroyManager/vipNewActive.vue

@@ -626,12 +626,12 @@ export default {
                 offlineSalarySettlement,
               };
                     if (type == "BASE_ACTIVITY") {
-                this.courseNumForm.studentMaxUsedTimes = 0;
-                this.courseNumForm.minCourseNum = 0;
-                this.courseNumForm.maxCourseNum = 0;
+                this.courseNumForm.studentMaxUsedTimes = -1;
+                this.courseNumForm.minCourseNum = -1;
+                this.courseNumForm.maxCourseNum = -1;
               } else if (type == "GIVE_CLASS") {
-                this.courseNumForm.minCourseNum = 0;
-                this.courseNumForm.maxCourseNum = 0;
+                this.courseNumForm.minCourseNum = -1;
+                this.courseNumForm.maxCourseNum = -1;
               }
               // 发请求创建活动
               addVipActive(