lex-xin vor 4 Jahren
Ursprung
Commit
619d78a5e6

+ 2 - 2
src/views/buildVip/index.vue

@@ -204,6 +204,7 @@
           <el-form-item label="上课学员" prop="students">
             <el-select
               v-model.trim="leftForm.students"
+              collapse-tags
               multiple
               clearable
               placeholder="请输入上课学员"
@@ -814,8 +815,6 @@ export default {
         this.giveNum = giveNum || 0;
 
         return parseInt(offline) + parseInt(online) + "+" + giveNum || "";
-      } else if(this.hotType == 'DISCOUNT' && this.attribute3  && this.attribute3 > 0) {
-        return parseInt(this.attribute3)
       }
       return parseInt(offline) + parseInt(online) || "";
     },
@@ -984,6 +983,7 @@ export default {
     },
     // 选择活动方案
     chioseActive(val) {
+      console.log(val)
       this.rightForm.offlineCourse = "";
       this.rightForm.onlineCourse = "";
       // this.rightForm.onlinePrice = '';

+ 1 - 0
src/views/categroyManager/vipNewActive.vue

@@ -242,6 +242,7 @@
               :inline="true"
               ref="form"
               :rules="courseNumrules"
+               v-if="activeType == 'DISCOUNT'"
             >
               <el-form-item prop="minCourseNum">
                 <el-input

+ 69 - 38
src/views/teacherManager/teacherOperation/components/salarySet.vue

@@ -179,9 +179,15 @@
           </el-table-column>
         </el-table>
 
-        <el-form style="margin-top: 20px;">
-          <el-form-item required label="生效日期">
-            <el-date-picker v-model.trim="startDate"
+        <el-form style="margin-top: 20px;" ref="salaryForm" :model="updateForm" :rules="rules">
+          <el-form-item label="是否结算课酬" label-width="120px" prop="isSettlementSalary" :rules="[{ required: true, message: '请选择是否结算课酬', trigger: 'change'}]">
+              <el-select v-model.trim="updateForm.isSettlementSalary" style="width: 220px !important;">
+                <el-option label="是" :value="1"></el-option>
+                <el-option label="否" :value="0"></el-option>
+              </el-select>
+          </el-form-item>
+          <el-form-item label="生效日期" label-width="120px" prop="startDate" :rules="[{ required: true, message: '请选择生效日期', trigger: 'change'}]">
+            <el-date-picker v-model.trim="updateForm.startDate"
                             type="date"
                             value-format="yyyy-MM-dd"
                             :picker-options="pickerOptions"
@@ -208,7 +214,9 @@ import {
   teacherSalaryList,
   teacherSalaryBatchUpset,
   teacherDefaultPracticeGroupSalary,
-  PracticeGroupSalaryUpdate
+  PracticeGroupSalaryUpdate,
+  teacherGet,
+  teacherUpdate
 } from "@/api/teacherManager";
 import { sysConfigList } from "@/api/generalSettings";
 import { findTeacherDefaultSalary } from "@/api/vipSeting";
@@ -320,7 +328,11 @@ export default {
       musicGroupTable: [],
       ruleList: [],
       vipList: [],
-      startDate: null,
+      updateForm: {
+        startDate: null,
+        isSettlementSalary: null,
+      },
+      rules: {},
       accompanyTable: [
         {
           assistantTeacherSalary: 30,
@@ -354,6 +366,13 @@ export default {
       if (this.$route.query.rules) {
         this.Frules = this.$route.query.rules;
       }
+      teacherGet({ teacherId: this.teacherId }).then((res) => {
+          if (res.code == 200) {
+            let result = res.data;
+            this.updateForm.isSettlementSalary = result.isSettlementSalary ? 1 : 0
+          }
+        });
+
       // 获取课程形态 设置vip课酬
       findTeacherDefaultSalary({ userId: this.teacherId }).then(res => {
         if (res.code == 200 && res.data.length > 0) {
@@ -558,51 +577,63 @@ export default {
           return;
         }
       });
-      // 判断输入的值是否正确
-      if (!this.startDate) {
-        this.$message.error("请填写生效日期");
-        return;
-      }
       if (!checkStatus) {
         return
       }
-      this.$confirm("您确定更改老师课酬", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
-        .then(() => {
-          let params = teamTable.concat(temps)
-          teacherSalaryBatchUpset({
-            teacherDefaultMusicGroupSalaries: params,
-            startDate: this.startDate
-          }).then(res => {
-            if (res.code == 200) {
-              // 判断输入的值是否正确
-              vipGroupSalarySet({
-                teacherDefaultVipGroupSalaries: this.vipTable,
-                startDate: this.startDate
+      this.$refs['salaryForm'].validate((valid) => {
+        if(valid) {
+          this.$confirm("您确定更改老师课酬", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+            .then(async () => {
+              let params = teamTable.concat(temps)
+              let updateForm = this.updateForm
+              let res = await teacherUpdate({ id: this.teacherId, isSettlementSalary: updateForm.isSettlementSalary })
+              if(res.code != 200) {
+                this.$message.error(res.msg)
+                return
+              }
+              teacherSalaryBatchUpset({
+                teacherDefaultMusicGroupSalaries: params,
+                startDate: updateForm.startDate
               }).then(res => {
                 if (res.code == 200) {
-                  PracticeGroupSalaryUpdate({
-                    startDate: this.startDate,
-                    teacherDefaultPracticeGroupSalaries: this.accompanyTable
+                  // 判断输入的值是否正确
+                  vipGroupSalarySet({
+                    teacherDefaultVipGroupSalaries: this.vipTable,
+                    startDate: updateForm.startDate
                   }).then(res => {
                     if (res.code == 200) {
-                      this.$message.success("保存成功");
-                      this.$store.dispatch('delVisitedViews', this.$route)
-                      this.$router.push({
-                        path: "/teacherManager/teacherList",
-                        query: { rules: this.Frules, search: this.Fsearch }
+                      PracticeGroupSalaryUpdate({
+                        startDate: updateForm.startDate,
+                        teacherDefaultPracticeGroupSalaries: this.accompanyTable
+                      }).then(res => {
+                        if (res.code == 200) {
+                          this.$message.success("保存成功");
+                          this.$store.dispatch('delVisitedViews', this.$route)
+                          this.$router.push({
+                            path: "/teacherManager/teacherList",
+                            query: { rules: this.Frules, search: this.Fsearch }
+                          });
+                        }
                       });
                     }
                   });
                 }
               });
-            }
-          });
-        })
-        .catch(() => { });
+            })
+            .catch(() => { });
+        }
+      })
+      // 判断输入的值是否正确
+      // if (!this.startDate) {
+      //   this.$message.error("请填写生效日期");
+      //   return;
+      // }
+      
+      
     }
   }
 };

+ 5 - 5
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.38:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
-// let target = 'http://dev.dayaedu.com' // 开发环境
-let target = 'https://test.dayaedu.com' //测试环境
+let target = 'http://dev.dayaedu.com' // 开发环境
+// let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
@@ -55,7 +55,7 @@ module.exports = {
     //   warnings: false,
     //   errors: true
     // },
-    https: true,
+    https: false,
     proxy: {
       // change xxx-api/login => mock/login
       // detail: https://cli.vuejs.org/config/#devserver-proxy
@@ -67,8 +67,8 @@ module.exports = {
       // 'http://dev.dayaedu.com'
       '/api-auth': {
         // target: 'http://dev.dayaedu.com',
-        // target: 'http://47.114.176.40:8000',
-        target : 'https://test.dayaedu.com',
+        // target: 'https://test.dayaedu.com',
+        target : target,
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''