فهرست منبع

Merge branch '04/16vipactiveRange' of http://git.dayaedu.com/molingzhide/dy-admin-manager into 04/16vipactiveRange

mo 4 سال پیش
والد
کامیت
e4f2bc6989

+ 1 - 0
src/views/buildVip/index.vue

@@ -998,6 +998,7 @@ export default {
     },
     // 选择活动方案
     chioseActive(val) {
+      console.log(val)
       this.rightForm.offlineCourse = "";
       this.rightForm.onlineCourse = "";
       // this.rightForm.onlinePrice = '';

+ 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;
+      // }
+      
+      
     }
   }
 };

+ 4 - 0
src/views/vipClass/vipDetail/components/fnanceInfo.vue

@@ -51,6 +51,10 @@
     <div class="tableWrap">
       <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                 :data="tableList">
+        <el-table-column label="课程编号"
+                         align="center"
+                         prop="courseScheduleId">
+        </el-table-column>
         <el-table-column label="上课时间"
                          align="center"
                          prop="classDate">

+ 27 - 24
src/views/workBenchManager/payAppeal.vue

@@ -171,7 +171,7 @@
     </div>
     <el-dialog title="考勤申诉" :visible.sync="dialogVisible" width="500px">
       <div>
-        <el-form ref="visibleForm" :model="visibleForm" class="visibleForm">
+        <el-form ref="visibleForm" :model="visibleForm" label-width="100px" class="visibleForm">
           <el-form-item label="签到时间">
             {{ visibleForm.signInTime }}
           </el-form-item>
@@ -191,6 +191,10 @@
               </el-col>
             </el-row>
           </el-form-item>
+          <el-form-item label="申诉考勤状态">
+            <el-checkbox v-if="visibleForm.complaintsType == 'SIGN_IN' || visibleForm.complaintsType == 'ALL'" disabled :value="true">签到状态</el-checkbox>
+            <el-checkbox v-if="visibleForm.complaintsType == 'SIGN_OUT' || visibleForm.complaintsType == 'ALL'" disabled :value="true">签退状态</el-checkbox>
+          </el-form-item>
           <el-form-item
             label="申诉内容"
             :rules="[
@@ -200,7 +204,7 @@
           >
             <el-input
               type="textarea"
-              :rows="5"
+              :rows="4"
               :disabled="visibleForm.complaintsStatusEnum != '2'"
               v-model.trim="visibleForm.complaintsContent"
             ></el-input>
@@ -214,13 +218,13 @@
           >
             <el-input
               type="textarea"
-              :rows="5"
+              :rows="4"
               :disabled="visibleForm.complaintsStatusEnum != '2'"
               v-model.trim="visibleForm.disposeContent"
             ></el-input>
           </el-form-item>
           <!--  -->
-          <el-form-item
+          <!-- <el-form-item
             label="请选择需要补正的状态"
             v-if="visibleForm.complaintsStatusEnum == '2'"
           >
@@ -235,7 +239,7 @@
               :disabled="visibleForm.complaintsStatusEnum != '2'"
               >签退状态</el-checkbox
             >
-          </el-form-item>
+          </el-form-item> -->
         </el-form>
       </div>
       <div slot="footer" v-if="visibleForm.complaintsStatusEnum == '2'">
@@ -295,6 +299,7 @@ export default {
         teacherAttendanceId: null,
         reSignInStatus: null,
         reSignOutStatus: null,
+        complaintsType: null,
         url: null,
       },
     };
@@ -352,28 +357,25 @@ export default {
         this.$refs["visibleForm"].validate((flag) => {
           if (flag) {
             let obj = {};
-            if (
-              !this.visibleForm.reSignInStatus &&
-              !this.visibleForm.reSignOutStatus
-            ) {
-              this.$message.error("请修正签到状态或签退状态");
-              return;
-            }
-            let str = "是否将此课程的";
-            //visibleForm.reSignInStatus
-            if (this.visibleForm.reSignInStatus) {
-              obj.signInStatus = 1;
-              str += "【签到状态】";
-            }
-            if (this.visibleForm.reSignOutStatus) {
-              obj.signOutStatus = 1;
-              str += "【签退状态】";
-            }
-            str += "修正为正常";
+            // if (
+            //   !this.visibleForm.reSignInStatus &&
+            //   !this.visibleForm.reSignOutStatus
+            // ) {
+            //   this.$message.error("请修正签到状态或签退状态");
+            //   return;
+            // }
+            // let str = "是否将此课程的";
+            // if (this.visibleForm.complaintsType == 'SIGN_IN' || this.visibleForm.complaintsType == 'ALL') {
+            //   str += "【签到状态】";
+            // }
+            // if (this.visibleForm.complaintsType == 'SIGN_OUT' || this.visibleForm.complaintsType == 'ALL') {
+            //   str += "【签退状态】";
+            // }
+            // str += "修正为正常";
             obj.content = this.visibleForm.disposeContent;
             obj.teacherAttendanceId = this.visibleForm.teacherAttendanceId;
 
-            this.$confirm(str, "是否", {
+            this.$confirm('您是否同意该申诉?', "是否", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning",
@@ -430,6 +432,7 @@ export default {
         // reSignOutStatus: row.signOutStatus == 1 ? true : false,
         reSignInStatus: null,
         reSignOutStatus: null,
+        complaintsType: row.complaintsType,
         srcList: row.url.split(","),
       };
       this.dialogVisible = true;

+ 4 - 4
vue.config.js

@@ -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
@@ -66,9 +66,9 @@ module.exports = {
       // let target = 'http://dev.dayaedu.com'
       // 'http://dev.dayaedu.com'
       '/api-auth': {
-        target: 'http://dev.dayaedu.com',
-        // target: 'http://47.114.176.40:8000',
-        // target : 'https://test.dayaedu.com',
+        // target: 'http://dev.dayaedu.com',
+        // target: 'https://test.dayaedu.com',
+        target : target,
         changeOrigin: true,
         pathRewrite: {
           '^api-auth': ''