Bladeren bron

Merge branch 'online' into wxl

lex-xin 5 jaren geleden
bovenliggende
commit
6900b3bdf9
37 gewijzigde bestanden met toevoegingen van 994 en 586 verwijderingen
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/css/app.c76da725.css
  3. 1 1
      dist/static/css/chunk-27c95ed6.20d0d867.css
  4. 1 0
      dist/static/css/chunk-3573fee0.77cb0737.css
  5. 0 0
      dist/static/css/chunk-4aab68d7.0d48e678.css
  6. 0 1
      dist/static/css/chunk-5cac4260.641b676e.css
  7. 0 0
      dist/static/css/chunk-e8e8b1ba.32210b55.css
  8. 0 0
      dist/static/js/app.a1fdb129.js
  9. 0 0
      dist/static/js/app.fcf390d7.js
  10. 0 0
      dist/static/js/chunk-27c95ed6.67652b17.js
  11. 0 0
      dist/static/js/chunk-3573fee0.7f776ed9.js
  12. 0 0
      dist/static/js/chunk-40e665d1.4051b03e.js
  13. 0 0
      dist/static/js/chunk-40e665d1.4af150b1.js
  14. 0 0
      dist/static/js/chunk-4aab68d7.0b2143e3.js
  15. 0 0
      dist/static/js/chunk-539bcd06.60c092da.js
  16. 0 0
      dist/static/js/chunk-5cac4260.619be20b.js
  17. 0 0
      dist/static/js/chunk-6181ddae.3c3406fc.js
  18. 0 0
      dist/static/js/chunk-6181ddae.edeef075.js
  19. 0 0
      dist/static/js/chunk-6cc9245e.8cb728cc.js
  20. 0 0
      dist/static/js/chunk-78297145.8dcdfbb3.js
  21. 0 0
      dist/static/js/chunk-bc672cf4.30ae04ec.js
  22. 0 0
      dist/static/js/chunk-de5c2e9a.3dfe8ce5.js
  23. 0 0
      dist/static/js/chunk-e8e8b1ba.f570006f.js
  24. 1 0
      src/App.vue
  25. 3 0
      src/layout/components/Navbar.vue
  26. 10 0
      src/layout/components/Sidebar/SidebarItem.vue
  27. 7 1
      src/store/modules/permission.js
  28. 1 1
      src/store/modules/tagsView.js
  29. 1 1
      src/store/modules/user.js
  30. 0 1
      src/views/accompanyManager/accompanyList.vue
  31. 324 24
      src/views/accompanyManager/accompanys.vue
  32. 7 1
      src/views/businessManager/orderManager/income.vue
  33. 7 1
      src/views/businessManager/orderManager/incomeOne.vue
  34. 7 1
      src/views/businessManager/orderManager/incomeTwo.vue
  35. 376 343
      src/views/categroyManager/vipActiveList.vue
  36. 247 210
      src/views/categroyManager/vipNewActive.vue
  37. 1 0
      src/views/vipClass/vipReset.vue

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c76da725.css


+ 1 - 1
dist/static/css/chunk-78297145.61e8e48a.css → dist/static/css/chunk-27c95ed6.20d0d867.css

@@ -1 +1 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.vipwrap[data-v-7211b2c3]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vipwrap .newBand[data-v-7211b2c3]{margin-right:20px}.resetClassForm[data-v-7211b2c3] .el-date-editor.el-input,.resetClassForm[data-v-7211b2c3] .el-date-editor.el-input__inner{width:180px!important}[data-v-7211b2c3] .el-date-editor.el-input,[data-v-7211b2c3] .el-date-editor.el-input__inner{width:100px!important}
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.vipwrap[data-v-2f40a6bb]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.vipwrap .newBand[data-v-2f40a6bb]{margin-right:20px}.resetClassForm[data-v-2f40a6bb] .el-date-editor.el-input,.resetClassForm[data-v-2f40a6bb] .el-date-editor.el-input__inner{width:180px!important}[data-v-2f40a6bb] .el-date-editor.el-input,[data-v-2f40a6bb] .el-date-editor.el-input__inner{width:100px!important}

+ 1 - 0
dist/static/css/chunk-3573fee0.77cb0737.css

@@ -0,0 +1 @@
+.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}.wrap[data-v-39ca9507]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.wrap div[data-v-39ca9507]{margin-right:20px}

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-4aab68d7.0d48e678.css


+ 0 - 1
dist/static/css/chunk-5cac4260.641b676e.css

@@ -1 +0,0 @@
-.pagination-container[data-v-31cb099a]{background:#fff;padding:32px 16px;width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.pagination-container.hidden[data-v-31cb099a]{display:none}

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/chunk-e8e8b1ba.32210b55.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.a1fdb129.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.fcf390d7.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-27c95ed6.67652b17.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3573fee0.7f776ed9.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-40e665d1.4051b03e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-40e665d1.4af150b1.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-4aab68d7.0b2143e3.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-539bcd06.60c092da.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-5cac4260.619be20b.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6181ddae.3c3406fc.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6181ddae.edeef075.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-6cc9245e.8cb728cc.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-78297145.8dcdfbb3.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-bc672cf4.30ae04ec.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-de5c2e9a.3dfe8ce5.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-e8e8b1ba.f570006f.js


+ 1 - 0
src/App.vue

@@ -294,4 +294,5 @@ input[type="number"] {
   color: #333;
   opacity: 1;
 }
+
 </style>

+ 3 - 0
src/layout/components/Navbar.vue

@@ -144,7 +144,10 @@ export default {
     },
     async logout () {
       await this.$store.dispatch("user/logout");
+      // await this.$store.dispatch("permission/removePermission")
       this.$router.push(`/login`);
+      window.location.reload()
+  
     },
     gotoRecode () {
       this.$router.push('/journal/journal')

+ 10 - 0
src/layout/components/Sidebar/SidebarItem.vue

@@ -105,3 +105,13 @@ export default {
   }
 }
 </script>
+<style lang="scss" scoped>
+  // 取消双击选中文字
+div{
+    -moz-user-select:none;/*火狐*/
+    -webkit-user-select:none;/*webkit浏览器*/
+    -ms-user-select:none;/*IE10*/
+    -khtml-user-select:none;/*早期浏览器*/
+      user-select:none;
+}
+</style>

+ 7 - 1
src/store/modules/permission.js

@@ -42,6 +42,7 @@ const mutations = {
     state.routes = constantRoutes.concat(routes)
   },
   SET_PERMISSION: (state, permission) => {
+
     state.permission = permission
   }
 }
@@ -109,7 +110,7 @@ const actions = {
         if (res.code == 200) {
           let newData = recursionRouter(res.data);
           recursionPerission(res.data)
-          var accessedRoutes
+          let accessedRoutes
           // 生成异步路由表
           accessedRoutes = generateAsyncRouter(asyncRoutes, newData)
           // var result = accessedRoutes.concat({ path: '*', redirect: '/404', hidden: true })
@@ -121,6 +122,11 @@ const actions = {
         }
       })
     })
+  },
+  removePermission({ commit }){
+    window.localStorage.removeItem('permission')
+    commit('SET_PERMISSION', [])
+    
   }
 }
 

+ 1 - 1
src/store/modules/tagsView.js

@@ -5,7 +5,7 @@ const tagsView = {
   },
   mutations: {
     ADD_VISITED_VIEWS: (state, view) => {
-      if (state.visitedViews.some(v => v.fullPath === view.fullPath)) {
+      if (state.visitedViews.some(v => v.path === view.path)) {
         state.visitedViews.forEach(v => {
           if (v.path === view.path) {
             v.fullPath = view.fullPath

+ 1 - 1
src/store/modules/user.js

@@ -85,7 +85,7 @@ const actions = {
 
   // 登出
   logout ({ commit }) {
-    return new Promise((resolve, reject) => {
+    return new Promise((resolve, reject) => { 
       logout().then(() => {
         commit('SET_TOKEN', '')
         removeToken()

+ 0 - 1
src/views/accompanyManager/accompanyList.vue

@@ -217,7 +217,6 @@ export default {
         })
       },
       lookCrouse(row){
-        console.log(row)
          let rules = JSON.stringify(this.rules);
       let searchForm = JSON.stringify(this.searchForm);
         this.$router.push({path:'/business/accompanys',query:{id:row.id, rules, searchForm}})

+ 324 - 24
src/views/accompanyManager/accompanys.vue

@@ -4,15 +4,24 @@
       <el-page-header @back="goBack" :content="name"></el-page-header>
     </h2>
     <!--   v-permission="'vipGroupManage/updateVipBaseInfo'" -->
-    <div
-      class="newBand"
-      @click="resetTeachers"
-      v-permission="'courseSchedule/practiceGroupTeacherAdjust'"
-    >修改老师</div>
+    <div class="wrap">
+      <div
+        class="newBand"
+        @click="resetTeachers"
+        v-permission="'courseSchedule/practiceGroupTeacherAdjust'"
+      >修改老师</div>
+      <!-- // accompanys/addCourse -->
+      <!-- <div v-permission="'accompanys/addCourse'" class="newBand" @click="addCourse">网管课加课</div> -->
+      <div class="newBand" v-permission="'accompanys/vipCourseAdjust'" @click="adjustment">批量调整</div>
+    </div>
+
     <div class="tableWrap">
-      <el-table :data="tableList" :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <!-- @selection-change="handleSelectionChange" -->
-        <!-- <el-table-column type="selection" :selectable="isDisabled" width="55"></el-table-column> -->
+      <el-table
+        :data="tableList"
+        :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+        @selection-change="handleSelectionChange"
+      >
+        <el-table-column type="selection" :selectable="isDisabled" width="55"></el-table-column>
         <el-table-column label="课程编号" align="center" prop="id"></el-table-column>
         <el-table-column label="课程名称" align="center" prop="name"></el-table-column>
         <el-table-column label="主教老师" align="center" prop="teacherName"></el-table-column>
@@ -32,6 +41,9 @@
             <div>{{ scope.row.classDate | formatTimer}}</div>
           </template>
         </el-table-column>
+        <el-table-column label="是否点名" align="center" prop="status">
+          <template slot-scope="scope">{{ scope.row.isCallNames ? '是' : '否' }}</template>
+        </el-table-column>
         <el-table-column label="课程状态" align="center" prop="status">
           <template slot-scope="scope">
             <div>{{ scope.row.status | coursesStatus }}</div>
@@ -49,22 +61,33 @@
             <div>{{scope.row.schoolName?scope.row.schoolName:'网络教室'}}</div>
           </template>
         </el-table-column>-->
-        <el-table-column label="操作">
+        <el-table-column label="操作" width="250px" align="center" fixed="right">
           <template slot-scope="scope">
             <div>
               <el-button
                 type="text"
                 v-permission="'courseSchedule/classStartDateAdjust'"
-                v-if="scope.row.status == 'NOT_START'"
+                v-if="!scope.row.isSettlement"
                 @click="resetClass(scope.row)"
               >调整</el-button>
-              <!--  v-permission="'courseSchedule/classStartDateAdjust'" -->
+              <el-button
+                type="text"
+                v-permission="'accompanys/remove'"
+                v-if="!scope.row.isSettlement && scope.row.status == 'NOT_START'"
+                @click="removeClass(scope.row)"
+              >删除</el-button>
               <el-button
                 v-permission="'courseSchedule/practiceCourseTeacherAdjust'"
                 type="text"
                 v-if="scope.row.status == 'NOT_START'"
                 @click="resetTeacher(scope.row)"
               >更换老师</el-button>
+              <el-button
+                type="text"
+                v-permission="'accompanys/cleanAttendance'"
+                v-if="!scope.row.isSettlement"
+                @click="clearAttend(scope.row)"
+              >清除考勤</el-button>
             </div>
           </template>
         </el-table-column>
@@ -91,7 +114,7 @@
             v-model.trim="maskForm.date"
             style="width:200px!important;"
             type="date"
-             :picker-options="courseOption"
+            :picker-options="courseOption"
             value-format="yyyy-MM-dd"
             placeholder="选择日期"
           ></el-date-picker>
@@ -101,11 +124,10 @@
             placeholder="起始时间"
             style="width:200px!important;"
             v-model.trim="startTime"
-            
             :picker-options="{
                             start: '08:30',
                             step: '00:30',
-                            end: '20:30'
+                            end: '23:00'
                             }"
           ></el-time-select>
         </el-form-item>
@@ -174,6 +196,85 @@
         <el-button type="primary" @click="subresetTeacher">确 定</el-button>
       </div>
     </el-dialog>
+    <el-dialog :title="adjustmentName" width="800px" :visible.sync="adjustmentVisible">
+      <el-form
+        :model="adjustmentForm"
+        label-position="right"
+        label-width="120px"
+        ref="adjustmentForm"
+        :rules="adjustmentRules"
+        :inline="true"
+      >
+        <el-form-item label="已选择课时数" v-if="!isaddCourse">
+          <el-input disabled v-model.trim="adjustmentForm.count"></el-input>
+        </el-form-item>
+        <el-form-item label="添加课时数" prop="addCount" v-if="isaddCourse">
+          <el-input type="number" @mousewheel.native.prevent v-model.trim="adjustmentForm.addCount"></el-input>
+        </el-form-item>
+        <br />
+        <el-form-item label="单课费用" prop="fee" v-if="isaddCourse">
+          <el-input v-model.trim="adjustmentForm.fee"></el-input>
+        </el-form-item>
+        <el-form-item label="排课起始时间" prop="courseTime">
+          <el-date-picker
+            v-model.trim="adjustmentForm.courseTime"
+            :picker-options="pickerOptions"
+            style="width:200px!important;"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择日期"
+          ></el-date-picker>
+          <el-checkbox style="margin-left:10px;" v-model.trim="adjustmentForm.checked">是否跳过节假日</el-checkbox>
+        </el-form-item>
+      </el-form>
+      <div class="WeekWrap">
+        <h3 style="margin-bottom:20px;">
+          循环次数
+          <el-button type="text" style="margin-left:10px;" @click="addWeek">添加</el-button>
+        </h3>
+        <div class="countWrap" style="margin-bottom:10px;">
+          <div
+            class="countItem"
+            style="margin-bottom:20px;"
+            v-for="(item,index) in weekList"
+            :key="index"
+          >
+            <span>循环周期:</span>
+            <el-select v-model.trim="item.dayOfWeek" filterable clearable>
+              <el-option
+                v-for="(item,index) in weekDateList"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+            <span style="margin-left:10px;">开始时间</span>
+            <el-time-select
+              style="margin-left:10px;"
+              placeholder
+              v-model.trim="item.startClassTime"
+              :picker-options="{
+                               start: '04:30',
+                               step: '00:05',
+                               end: '23:55'
+            }"
+            ></el-time-select>
+            <el-button
+              style="margin-left:10px;"
+              type="danger"
+              @click="removeWeek(item)"
+              icon="el-icon-delete"
+              circle
+            ></el-button>
+          </div>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="adjustmentVisible = false">取 消</el-button>
+        <el-button type="primary" v-if="!isaddCourse" @click="submitAdjustment">确 定</el-button>
+        <el-button type="primary" v-if="isaddCourse" @click="addCourseSubmit">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -184,14 +285,23 @@ import {
   getTeacher,
   practiceGroupManage,
   practiceGroupTeacherAdjust,
-  practiceCourseTeacherAdjust
+  practiceCourseTeacherAdjust,
+  cleanAttendance
 } from "@/api/buildTeam";
+import {
+  vipCourseAdjust,
+  batchAppendVipGroupCourses,
+  bathDelete
+} from "@/api/vipSeting";
 export default {
   components: {
     pagination
   },
   data() {
     return {
+      adjustmentName: "",
+      isaddCourse: false,
+      adjustmentVisible: false,
       isMultiple: true,
       name: "网管课程组",
       courseVisible: false,
@@ -216,6 +326,14 @@ export default {
         startTime: "",
         id: ""
       },
+      adjustmentForm: {
+        count: "",
+        courseTime: "",
+        checked: false,
+        addCount: "",
+        courseType: "",
+        fee: ""
+      },
       startTime: null,
       maskRules: {
         date: [{ required: true, message: "请选择上课时间", trigger: "blur" }],
@@ -230,8 +348,37 @@ export default {
       teacherForm: {
         teacher: null
       },
-      courseOption:null,
-      coursesExpireDate:null
+      courseOption: null,
+      coursesExpireDate: null,
+      adjustmentRules: {
+        courseTime: [{ required: true, message: "请选择开始时间" }],
+        addCount: [{ required: true, message: "请输入加课次数" }],
+        courseType: [{ required: true, message: "请选择课程类型" }],
+        fee: [{ required: true, message: "请输入费用" }]
+      },
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() + 86400000 <= new Date().getTime();
+        }
+      },
+      weekList: [
+        {
+          dayOfWeek: "",
+          startTime: "",
+          endTime: "",
+          moid: new Date().getTime()
+        }
+      ],
+      weekDateList: [
+        { value: "1", label: "星期一" },
+        { value: "2", label: "星期二" },
+        { value: "3", label: "星期三" },
+        { value: "4", label: "星期四" },
+        { value: "5", label: "星期五" },
+        { value: "6", label: "星期六" },
+        { value: "7", label: "星期日" }
+      ],
+      activeList: []
     };
   },
   created() {
@@ -343,7 +490,6 @@ export default {
       this.isMultiple = false;
       this.activeRow = row;
       this.teacherForm.teacher = row.actualTeacherId;
-      console.log(row.actualTeacherId);
       this.teacherVisible = true;
     },
     resetTeachers() {
@@ -401,16 +547,170 @@ export default {
       return {
         disabledDate: time => {
           // if (self.leftForm.courseStart) {
-            // let date = new Date(self.leftForm.courseStart.replace(/-/, "/"));
-            // coursesExpireDate
-            let date = new Date(this.coursesExpireDate.replace(/-/, "/"))
-            
-            return time.getTime() > date.getTime();
+          // let date = new Date(self.leftForm.courseStart.replace(/-/, "/"));
+          // coursesExpireDate
+          let date = new Date(this.coursesExpireDate.replace(/-/, "/"));
+
+          return time.getTime() > date.getTime();
           // }
           // return;
         }
       };
+    },
+    // 是否允许批量调整
+    isDisabled(row, index) {
+      // || !row.isCallNames
+      if (row.isSettlement) {
+        return false;
+      } else {
+        return true;
+      }
+    },
+    adjustment() {
+      this.adjustmentName = "批量调整";
+      this.isaddCourse = false;
+      if (this.adjustmentForm.count <= 0) {
+        this.$message.error("请至少勾选一节课");
+      } else {
+        this.adjustmentVisible = true;
+      }
+    },
+    addWeek() {
+      // 添加循环周期
+      this.weekList.push({
+        dayOfWeek: "",
+        startClassTime: "",
+        endClassTime: "",
+        id: new Date()
+      });
+    },
+    // 删除循环周
+    removeWeek(item) {
+      for (let i in this.weekList) {
+        if (this.weekList[i].id == item.id) {
+          this.weekList.splice(i, 1);
+        }
+      }
+    },
+    submitAdjustment() {
+      this.$refs["adjustmentForm"].validate(item => {
+        if (item) {
+          let week = this.weekList;
+          if (!week[0] || !week[0].startClassTime || !week[0].dayOfWeek) {
+            this.$message.error("至少排一节课");
+            return;
+          }
+          // 开始
+          let obj = {};
+          obj.courseCreateStartTime = this.adjustmentForm.courseTime;
+          let idArr = this.activeList.map(item => {
+            return item.id;
+          });
+          let courseScheduleIds = idArr.join(",");
+          obj.courseScheduleIds = courseScheduleIds;
+          obj.courseTimes = this.weekList;
+          obj.holiday = this.adjustmentForm.checked;
+          obj.teachMode = this.adjustmentForm.courseType || null;
+          obj.groupType = "PRACTICE";
+
+          obj.vipGroupId = this.practiceId;
+          vipCourseAdjust(obj).then(res => {
+            if (res.code == 200) {
+              this.$message.success("恭喜您修改成功");
+              this.adjustmentVisible = false;
+              this.getList();
+            }
+          });
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.adjustmentForm.count = val.length;
+      this.activeList = val;
+    },
+    clearAttend(row) {
+      this.$confirm("是否清除考勤记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          cleanAttendance({ courseScheduleIds: row.id }).then(res => {
+            if (res.code == 200) {
+              this.$message.success("清除成功");
+              this.getList();
+            } else {
+              this.$message.error(res.msg);
+            }
+          });
+        })
+        .catch(() => {});
+    },
+    // 网管课加课弹窗
+    addCourse() {
+      this.adjustmentName = "网管课加课";
+      this.isaddCourse = true;
+      this.adjustmentVisible = true;
+    },
+    // 网管课加课提交
+    addCourseSubmit() {
+      this.$refs["adjustmentForm"].validate(item => {
+        if (item) {
+          let week = this.weekList;
+          if (!week[0] || !week[0].startClassTime || !week[0].dayOfWeek) {
+            this.$message.error("至少排一节课");
+            return;
+          }
+          // 开始
+          let obj = {};
+          obj.courseCreateStartTime = this.adjustmentForm.courseTime;
+          let idArr = this.activeList.map(item => {
+            return item.id;
+          });
+          let courseScheduleIds = idArr.join(",");
+          obj.courseScheduleIds = courseScheduleIds;
+          obj.courseTimes = this.weekList;
+          obj.holiday = this.adjustmentForm.checked;
+          obj.vipGroupId = this.practiceId;
+          obj.courseCount = this.adjustmentForm.addCount;
+          obj.teachMode = this.adjustmentForm.courseType;
+          obj.singleClassPrice = this.adjustmentForm.fee;
+          obj.groupType = "PRACTICE";
+          batchAppendVipGroupCourses(obj).then(res => {
+            if (res.code == 200) {
+              this.$message.success("恭喜您添加成功");
+              this.adjustmentVisible = false;
+              this.getList();
+            }
+          });
+        }
+      });
+    },
+    // 删除
+    removeClass(row) {
+      this.$confirm("是否删除该课程?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        bathDelete({ courseScheduleIds: row.id }).then(res => {
+          if (res.code == 200) {
+            this.$message.success("删除成功");
+            this.getList();
+          }
+        });
+      });
     }
   }
 };
-</script>
+</script>
+<style lang="scss" scoped>
+.wrap {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  div {
+    margin-right: 20px;
+  }
+}
+</style>

+ 7 - 1
src/views/businessManager/orderManager/income.vue

@@ -65,6 +65,9 @@
         </el-form-item>
       </el-form>
       <!-- 列表 -->
+      <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
+          应收总金额:{{ totalExpectAmount }}元 &nbsp;&nbsp;&nbsp;&nbsp;
+          实收总金额:{{ totalActualAmount }}元</div>
       <div class="tableWrap">
         <el-table :data='tableList'
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}">
@@ -176,6 +179,8 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
       },
+      totalExpectAmount: 0, //应收总金额
+      totalActualAmount: 0, //实收总金额
     }
   },
   mounted () {
@@ -276,7 +281,8 @@ export default {
         if (res.code == 200) {
           this.tableList = result.rows
           this.pageInfo.total = result.total
-
+          this.totalExpectAmount = result.totalExpectAmount ? result.totalExpectAmount : 0
+          this.totalActualAmount = result.totalActualAmount ? result.totalActualAmount : 0
         }
       })
     },

+ 7 - 1
src/views/businessManager/orderManager/incomeOne.vue

@@ -67,6 +67,9 @@
         </el-form-item>
       </el-form>
       <!-- 列表 -->
+      <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
+          应收总金额:{{ totalExpectAmount }}元 &nbsp;&nbsp;&nbsp;&nbsp;
+          实收总金额:{{ totalActualAmount }}元</div>
       <div class="tableWrap">
         <el-table :data='tableList'
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}">
@@ -191,6 +194,8 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
       },
+      totalExpectAmount: 0, //应收总金额
+      totalActualAmount: 0, //实收总金额
     }
   },
   mounted () {
@@ -290,7 +295,8 @@ export default {
         if (res.code == 200) {
           this.tableList = result.rows
           this.pageInfo.total = result.total
-
+          this.totalExpectAmount = result.totalExpectAmount ? result.totalExpectAmount : 0
+          this.totalActualAmount = result.totalActualAmount ? result.totalActualAmount : 0
         }
       })
     },

+ 7 - 1
src/views/businessManager/orderManager/incomeTwo.vue

@@ -67,6 +67,9 @@
         </el-form-item>
       </el-form>
       <!-- 列表 -->
+      <div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
+          应收总金额:{{ totalExpectAmount }}元 &nbsp;&nbsp;&nbsp;&nbsp;
+          实收总金额:{{ totalActualAmount }}元</div>
       <div class="tableWrap">
         <el-table :data='tableList'
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}">
@@ -180,6 +183,8 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
       },
+      totalExpectAmount: 0, //应收总金额
+      totalActualAmount: 0, //实收总金额
     }
   },
   mounted () {
@@ -269,7 +274,8 @@ export default {
         if (res.code == 200) {
           this.tableList = result.rows
           this.pageInfo.total = result.total
-
+          this.totalExpectAmount = result.totalExpectAmount ? result.totalExpectAmount : 0
+          this.totalActualAmount = result.totalActualAmount ? result.totalActualAmount : 0
         }
       })
     },

File diff suppressed because it is too large
+ 376 - 343
src/views/categroyManager/vipActiveList.vue


+ 247 - 210
src/views/categroyManager/vipNewActive.vue

@@ -2,71 +2,67 @@
   <div class="m-container">
     <!-- <h2><div class="squrt"></div>VIP活动方案新增 </h2> -->
     <h2>
-      <el-page-header @back="onCancel"
-                      :content="'VIP活动方案' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
+      <el-page-header @back="onCancel" :content="'VIP活动方案' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
     </h2>
     <div class="m-core">
-      <el-form :label-position="labelPosition"
-               :model="vipform"
-               ref='vipform'
-               :rules='vipformRules'
-               class="vipform">
-        <el-form-item label="活动名称"
-                      prop="name">
-          <el-input style="width:400px"
-                    v-model.trim="vipform.name"></el-input>
+      <el-form
+        :label-position="labelPosition"
+        :model="vipform"
+        ref="vipform"
+        :rules="vipformRules"
+        class="vipform"
+      >
+        <el-form-item label="活动名称" prop="name">
+          <el-input style="width:400px" v-model.trim="vipform.name"></el-input>
         </el-form-item>
-        <el-form-item label="适用分部"
-                      prop="organ">
-          <el-select v-model.trim="vipform.organ"
-                     multiple
-                     filterable
-                     clearable>
-            <el-option v-for='(item,index) in organList'
-                       :key="index"
-                       :label="item.name"
-                       :value="item.id"></el-option>
+        <el-form-item label="适用分部" prop="organ">
+          <el-select v-model.trim="vipform.organ" multiple filterable clearable>
+            <el-option
+              v-for="(item,index) in organList"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
           </el-select>
           <el-button @click="onCheckAllBranch">适用所有分部</el-button>
         </el-form-item>
-        <el-form-item label="活动描述"
-                      prop="desc">
-          <el-input type="textarea"
-                    v-model.trim="vipform.desc"
-                    style="width:400px"
-                    :rows="5"
-                    placeholder="请输入活动说明"></el-input>
+        <el-form-item label="活动描述" prop="desc">
+          <el-input
+            type="textarea"
+            v-model.trim="vipform.desc"
+            style="width:400px"
+            :rows="5"
+            placeholder="请输入活动说明"
+          ></el-input>
         </el-form-item>
-        <el-form-item label="活动时间"
-                      prop="activeTime">
-          <el-date-picker v-model.trim="vipform.activeTime"
-                          type="datetimerange"
-                          range-separator="至"
-                          value-format="yyyy-MM-dd HH:mm:ss"
-                          start-placeholder="开始日期"
-                          end-placeholder="结束日期">
-          </el-date-picker>
+        <el-form-item label="活动时间" prop="activeTime">
+          <el-date-picker
+            v-model.trim="vipform.activeTime"
+            type="datetimerange"
+            range-separator="至"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
         </el-form-item>
-        <el-form-item label="课程时间"
-                      prop="courseTime">
-          <el-date-picker v-model.trim="vipform.courseTime"
-                          type="datetimerange"
-                          range-separator="至"
-                          value-format="yyyy-MM-dd HH:mm:ss"
-                          start-placeholder="开始日期"
-                          end-placeholder="结束日期">
-          </el-date-picker>
+        <el-form-item label="课程时间" prop="courseTime">
+          <el-date-picker
+            v-model.trim="vipform.courseTime"
+            type="datetimerange"
+            range-separator="至"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+          ></el-date-picker>
         </el-form-item>
-        <el-form-item label="课程形式"
-                      prop="stauts">
-          <el-select v-model.trim="vipform.stauts"
-                     filterable
-                     clearable
-                     multiple>
-            <el-option v-for="(item,index) in courseStatusList"
-                       :key='index'
-                       :value="item.id"
-                       :label="item.name"></el-option>
+        <el-form-item label="课程形式" prop="stauts">
+          <el-select v-model.trim="vipform.stauts" filterable clearable multiple>
+            <el-option
+              v-for="(item,index) in courseStatusList"
+              :key="index"
+              :value="item.id"
+              :label="item.name"
+            ></el-option>
           </el-select>
         </el-form-item>
       </el-form>
@@ -76,70 +72,76 @@
         </div>
         <div class="right">
           <div class="chioseWrap">
-            <el-checkbox label="线上课"
-                         v-model.trim="online"></el-checkbox>
-            <el-select v-model.trim="onlineSalary"
-                       clearable
-                       filterable>
-              <el-option label="老师默认课酬"
-                         value="TEACHER_DEFAULT"></el-option>
-              <el-option label="课程单价比例折扣"
-                         value="RATIO_DISCOUNT"></el-option>
-              <el-option label="固定课酬"
-                         value="FIXED_SALARY"></el-option>
+            <el-checkbox label="线上课" v-model.trim="online"></el-checkbox>
+            <el-select v-model.trim="onlineSalary" clearable filterable>
+              <el-option label="老师默认课酬" value="TEACHER_DEFAULT"></el-option>
+              <el-option label="实际课程单价比例折扣" value="RATIO_DISCOUNT"></el-option>
+              <el-option label="固定课酬" value="FIXED_SALARY"></el-option>
             </el-select>
-            <el-input placeholder="请输入"
-                      v-if='onlineSalary== "RATIO_DISCOUNT"'
-                      style="width:200px;"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="onlineprice">
+            <el-input
+              placeholder="请输入"
+              v-if="onlineSalary== 'RATIO_DISCOUNT'"
+              style="width:200px;"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="onlineprice"
+            >
               <template slot="append">%</template>
             </el-input>
-            <el-input placeholder="请输入"
-                      v-if='onlineSalary == "FIXED_SALARY"'
-                      style="width:200px;"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="onlineprice">
+            <el-input
+              placeholder="请输入"
+              v-if="onlineSalary == 'FIXED_SALARY'"
+              style="width:200px;"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="onlineprice"
+            >
               <template slot="append">元</template>
             </el-input>
+            <div style="width:200px;" v-if="onlineSalary== 'TEACHER_DEFAULT'"></div>
+            <el-checkbox
+              label="是否参加梯度"
+              style="margin-left:20px;"
+              v-model.trim="onlineClassJoinGradientRewards"
+            ></el-checkbox>
           </div>
           <div class="chioseWrap">
-            <el-checkbox label="线下课"
-                         v-model.trim="unonline"></el-checkbox>
-            <el-select v-model.trim="unonlineSalary"
-                       clearable
-                       filterable>
-              <el-option label="老师默认课酬"
-                         value="TEACHER_DEFAULT"></el-option>
-              <el-option label="课程单价比例折扣"
-                         value="RATIO_DISCOUNT"></el-option>
-              <el-option label="固定课酬"
-                         value="FIXED_SALARY"></el-option>
+            <el-checkbox label="线下课" v-model.trim="unonline"></el-checkbox>
+            <el-select v-model.trim="unonlineSalary" clearable filterable>
+              <el-option label="老师默认课酬" value="TEACHER_DEFAULT"></el-option>
+              <el-option label="实际课程单价比例折扣" value="RATIO_DISCOUNT"></el-option>
+              <el-option label="固定课酬" value="FIXED_SALARY"></el-option>
             </el-select>
-            <el-input placeholder="请输入"
-                      v-if='unonlineSalary== "RATIO_DISCOUNT"'
-                      style="width:200px;"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="unonlineprice">
+            <el-input
+              placeholder="请输入"
+              v-if="unonlineSalary== 'RATIO_DISCOUNT'"
+              style="width:200px;"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="unonlineprice"
+            >
               <template slot="append">%</template>
             </el-input>
-            <el-input placeholder="请输入"
-                      style="width:200px;"
-                      v-if='unonlineSalary== "FIXED_SALARY"'
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="unonlineprice">
+            <el-input
+              placeholder="请输入"
+              style="width:200px;"
+              v-if="unonlineSalary== 'FIXED_SALARY'"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="unonlineprice"
+            >
               <template slot="append">元</template>
             </el-input>
+            <div style="width:200px;" v-if="unonlineSalary== 'TEACHER_DEFAULT'"></div>
+            <el-checkbox
+              label="是否参加梯度"
+              style="margin-left:20px;"
+              v-model.trim="offlineClassJoinGradientRewards"
+            ></el-checkbox>
           </div>
           <div class="chioseWrap">
-            <el-checkbox v-model.trim="paymentReadonlyFlag"
-                         label="可自定义单价"></el-checkbox>
-            <el-checkbox v-model.trim="salaryReadonlyFlag"
-                         label="可自定义课酬"></el-checkbox>
+            <el-checkbox v-model.trim="paymentReadonlyFlag" label="可自定义单价"></el-checkbox>
+            <el-checkbox v-model.trim="salaryReadonlyFlag" label="可自定义课酬"></el-checkbox>
           </div>
         </div>
       </div>
@@ -149,133 +151,159 @@
         </div>
         <div class="right">
           <div>
-            <div class="head"
-                 :class="activeType=='BASE_ACTIVITY'?'active':''"
-                 @click="activeType='BASE_ACTIVITY'">基础活动</div>
-            <p class="title"
-               v-if="activeType=='BASE_ACTIVITY'">课程原价</p>
+            <div
+              class="head"
+              :class="activeType=='BASE_ACTIVITY'?'active':''"
+              @click="activeType='BASE_ACTIVITY'"
+            >基础活动</div>
+            <p class="title" v-if="activeType=='BASE_ACTIVITY'">课程原价</p>
           </div>
           <div>
-            <div class="head"
-                 :class="activeType=='DISCOUNT'?'active':''"
-                 @click="activeType='DISCOUNT'">折扣</div>
-            <el-input v-if="activeType=='DISCOUNT'"
-                      v-model.trim="attribute1"
-                      style="width:200px!important"
-                      placeholder="请输入折扣数值">
+            <div
+              class="head"
+              :class="activeType=='DISCOUNT'?'active':''"
+              @click="activeType='DISCOUNT'"
+            >折扣</div>
+            <el-input
+              v-if="activeType=='DISCOUNT'"
+              v-model.trim="attribute1"
+              style="width:200px!important"
+              placeholder="请输入折扣数值"
+            >
               <template slot="append">%</template>
             </el-input>
           </div>
           <div>
-            <div class="head"
-                 :class="activeType=='GIVE_CLASS'?'active':''"
-                 @click="activeType='GIVE_CLASS'">赠送课时</div>
-            <el-input placeholder="多少节开始赠"
-                      v-if="activeType=='GIVE_CLASS'"
-                      v-model.trim="attribute1"
-                      type="number"
-                      @mousewheel.native.prevent
-                      style='margin-right:10px;width:200px!important'>
+            <div
+              class="head"
+              :class="activeType=='GIVE_CLASS'?'active':''"
+              @click="activeType='GIVE_CLASS'"
+            >赠送课时</div>
+            <el-input
+              placeholder="多少节开始赠"
+              v-if="activeType=='GIVE_CLASS'"
+              v-model.trim="attribute1"
+              type="number"
+              @mousewheel.native.prevent
+              style="margin-right:10px;width:200px!important"
+            >
               <template slot="append">节</template>
-            </el-input> <span v-if="activeType=='GIVE_CLASS'">赠</span>
-            <el-input v-if="activeType=='GIVE_CLASS'"
-                      placeholder="请输入赠送课时数"
-                      type="number"
-                      @mousewheel.native.prevent
-                      v-model.trim="attribute2"
-                      style='margin:0 10px;width:200px!important'>
+            </el-input>
+            <span v-if="activeType=='GIVE_CLASS'">赠</span>
+            <el-input
+              v-if="activeType=='GIVE_CLASS'"
+              placeholder="请输入赠送课时数"
+              type="number"
+              @mousewheel.native.prevent
+              v-model.trim="attribute2"
+              style="margin:0 10px;width:200px!important"
+            >
               <template slot="append">节</template>
             </el-input>
-            <el-checkbox v-if="activeType=='GIVE_CLASS'"
-                         v-model.trim="giveClassPaySalaryFlag"
-                         label="赠送课时结算课酬"></el-checkbox>
+            <el-checkbox
+              v-if="activeType=='GIVE_CLASS'"
+              v-model.trim="giveClassPaySalaryFlag"
+              label="赠送课时结算课酬"
+            ></el-checkbox>
           </div>
         </div>
       </div>
     </div>
-    <div class="btnWrap"
-         style="justify-content:flex-start">
-      <div class="closeBtn"
-           @click="onReSet">重置</div>
-      <div class="okBtn"
-           @click='submitFrom'>确定</div>
+    <div class="btnWrap" style="justify-content:flex-start">
+      <div class="closeBtn" @click="onReSet">重置</div>
+      <div class="okBtn" @click="submitFrom">确定</div>
     </div>
   </div>
 </template>
 <script>
-import { vipGroupCategory, addVipActive } from '@/api/vipSeting'
-import { getEmployeeOrgan } from '@/api/buildTeam'
+import { vipGroupCategory, addVipActive } from "@/api/vipSeting";
+import { getEmployeeOrgan } from "@/api/buildTeam";
 export default {
-  name: 'vipNewActive',
-  data () {
+  name: "vipNewActive",
+  data() {
     return {
       pageType: this.$route.query.type,
-      labelPosition: 'left',
+      labelPosition: "left",
       vipform: {
-        name: '',
-        desc: '',
+        name: "",
+        desc: "",
         activeTime: [],
         courseTime: [],
         organ: []
       },
       vipformRules: {
-        name: [{ required: true, message: '请输入活动名称', trigger: 'blur' },
-        { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }],
-        desc: [{ required: false, message: '请输入文字描述', trigger: 'blur' },
-        { min: 1, max: 200, message: '长度在 1 到 200 个字符', trigger: 'blur' }],
-        activeTime: [{ required: false, message: '请选择活动时间', trigger: 'blur' }],
-        courseTime: [{ required: false, message: '请选择课程时间', trigger: 'blur' }],
-        organ: [{ required: true, message: '请选择适用分部', trigger: 'blur' }]
+        name: [
+          { required: true, message: "请输入活动名称", trigger: "blur" },
+          { min: 1, max: 25, message: "长度在 1 到 25 个字符", trigger: "blur" }
+        ],
+        desc: [
+          { required: false, message: "请输入文字描述", trigger: "blur" },
+          {
+            min: 1,
+            max: 200,
+            message: "长度在 1 到 200 个字符",
+            trigger: "blur"
+          }
+        ],
+        activeTime: [
+          { required: false, message: "请选择活动时间", trigger: "blur" }
+        ],
+        courseTime: [
+          { required: false, message: "请选择课程时间", trigger: "blur" }
+        ],
+        organ: [{ required: true, message: "请选择适用分部", trigger: "blur" }]
       },
       courseStatusList: [], // 获取所有课程形式
-      activeType: '',
+      activeType: "",
       online: true,
       unonline: true,
-      onlineSalary: 'TEACHER_DEFAULT',
-      unonlineSalary: 'TEACHER_DEFAULT',
-      onlineprice: '',
-      unonlineprice: '',
+      onlineSalary: "TEACHER_DEFAULT",
+      unonlineSalary: "TEACHER_DEFAULT",
+      onlineprice: "",
+      unonlineprice: "",
       salaryReadonlyFlag: true,
       paymentReadonlyFlag: true,
-      attribute1: '',
-      attribute2: '',
-      attribute3: '',
+      attribute1: "",
+      attribute2: "",
+      attribute3: "",
       giveClassPaySalaryFlag: true,
-      organList: []
-    }
+      organList: [],
+      onlineClassJoinGradientRewards: false,
+      offlineClassJoinGradientRewards: false
+    };
   },
-  mounted () {
+  mounted() {
     if (this.$route.query.rules) {
-      this.rules = this.$route.query.rules
+      this.rules = this.$route.query.rules;
     }
     if (this.$route.query.searchForm) {
-      this.searchForm = this.$route.query.searchForm
+      this.searchForm = this.$route.query.searchForm;
     }
     // 首先获取课程形式
     vipGroupCategory().then(res => {
       if (res.code == 200) {
         this.courseStatusList = res.data;
       }
-    })
+    });
     // 适用分部
     getEmployeeOrgan().then(res => {
       if (res.code == 200) {
         this.organList = res.data;
       }
-    })
+    });
   },
   methods: {
-    submitFrom () {
-      this.$refs['vipform'].validate((valid) => {
+    submitFrom() {
+      this.$refs["vipform"].validate(valid => {
         if (valid) {
           // 验证通过
           let coursesStartTime = this.vipform.courseTime[0];
           let coursesEndTime = this.vipform.courseTime[1];
           let startTime = this.vipform.activeTime[0];
           let endTime = this.vipform.activeTime[1];
-          let organId = this.vipform.organ.join(',');
+          let organId = this.vipform.organ.join(",");
           let type = this.activeType;
-          let vipGroupCategoryIdList = this.vipform.stauts.join(',')
+          let vipGroupCategoryIdList = this.vipform.stauts.join(",");
           let onlineSalarySettlement;
           let offlineSalarySettlement;
           if (this.online) {
@@ -283,7 +311,7 @@ export default {
             onlineSalarySettlement = {
               salarySettlementType: this.onlineSalary,
               settlementValue: this.onlineprice
-            }
+            };
           } else {
             onlineSalarySettlement = null;
           }
@@ -292,9 +320,9 @@ export default {
             offlineSalarySettlement = {
               salarySettlementType: this.unonlineSalary,
               settlementValue: this.unonlineprice
-            }
+            };
           } else {
-            offlineSalarySettlement = null
+            offlineSalarySettlement = null;
           }
           let salaryReadonlyFlag = this.salaryReadonlyFlag * 1;
           let paymentReadonlyFlag = this.paymentReadonlyFlag * 1;
@@ -302,7 +330,7 @@ export default {
           let vipGroupSalarySettlement = {
             onlineSalarySettlement,
             offlineSalarySettlement
-          }
+          };
           // 发请求创建活动
           addVipActive({
             coursesStartTime,
@@ -320,52 +348,61 @@ export default {
             giveClassPaySalaryFlag,
             attribute1: this.attribute1,
             attribute2: this.attribute2,
-            attribute3: this.attribute3
-
+            attribute3: this.attribute3,
+            offlineClassJoinGradientRewards:this.offlineClassJoinGradientRewards*1,
+            onlineClassJoinGradientRewards:this.onlineClassJoinGradientRewards*1
           }).then(res => {
             if (res.code == 200) {
-              this.$message.success('恭喜你,活动创建成功')
-              this.$router.push({ path: "/vipClassSet/vipActiveList", query: { rules: this.rules, searchForm: this.searchForm } })
+              this.$message.success("恭喜你,活动创建成功");
+              this.onReSet();
+              this.$router.push({
+                path: "/vipClassSet/vipActiveList",
+                query: { rules: this.rules, searchForm: this.searchForm }
+              });
             }
-          })
+          });
         } else {
-          this.$message.error('请填写必要参数')
+          this.$message.error("请填写必要参数");
         }
-      })
-
+      });
 
       // 线上线下课 勾选就传不勾选就不传
       // addVipActive().then(res => { })
     },
-    onCheckAllBranch () {
+    onCheckAllBranch() {
       // 选择所有分部
-      this.vipform.organ = []
+      this.vipform.organ = [];
       this.organList.forEach(item => {
-        this.vipform.organ.push(item.id)
-      })
+        this.vipform.organ.push(item.id);
+      });
     },
-    onCancel () {
-      this.$router.push({ path: "/vipClassSet/vipActiveList", query: { rules: this.rules, searchForm: this.searchForm } })
+    onCancel() {
+      this.$router.push({
+        path: "/vipClassSet/vipActiveList",
+        query: { rules: this.rules, searchForm: this.searchForm }
+      });
     },
-    onReSet () {
+    onReSet() {
       this.vipform = {
-        name: '',
-        desc: '',
+        name: "",
+        desc: "",
         activeTime: [],
-        courseTime: [],
-      }
-      this.activeType = ''
-      this.online = true
-      this.unonline = true
-      this.salaryReadonlyFlag = true
-      this.onlineSalary = 'TEACHER_DEFAULT'
-      this.unonlineSalary = 'TEACHER_DEFAULT'
-      this.onlineprice = ''
-      this.unonlineprice = ''
-      this.$refs.vipform.resetFields()
+        courseTime: []
+      };
+      this.activeType = "";
+      this.online = true;
+      this.unonline = true;
+      this.salaryReadonlyFlag = true;
+      this.onlineSalary = "TEACHER_DEFAULT";
+      this.unonlineSalary = "TEACHER_DEFAULT";
+      this.onlineprice = "";
+      this.unonlineprice = "";
+      this.onlineClassJoinGradientRewards = false;
+       this.offlineClassJoinGradientRewards = false;
+      this.$refs.vipform.resetFields();
     }
-  },
-}
+  }
+};
 </script>
 <style lang="scss" scoped>
 .m-core {

+ 1 - 0
src/views/vipClass/vipReset.vue

@@ -672,6 +672,7 @@ export default {
           obj.courseTimes = this.weekList;
           obj.holiday = this.adjustmentForm.checked;
           obj.teachMode = this.adjustmentForm.courseType || null;
+          obj.groupType = 'VIP';
           console.log(obj);
           obj.vipGroupId = this.vipid;
           vipCourseAdjust(obj).then(res => {

Some files were not shown because too many files changed in this diff