Ver código fonte

提交一下

1
mo 3 anos atrás
pai
commit
c610a53407

Diferenças do arquivo suprimidas por serem muito extensas
+ 515 - 503
src/store/modules/permission.js


+ 8 - 0
src/views/main/api.js

@@ -174,3 +174,11 @@ export const getSysConfigName = (data) => request2({
   method: 'get',
   params: data
 })
+
+// 学员已排课时长未消耗完
+export const getHasFreeCourseList = (data) => request2({
+  url: '/api-web/musicGroupPaymentCalender/queryHasFreeCourseTimesStudent',
+  method: 'get',
+  params: data
+})
+

+ 7 - 10
src/views/main/constant.js

@@ -316,16 +316,13 @@ export const errorType = {
       searchType: 'MUSIC_GROUP_HAS_COURSE_TIMES'
     }
   },
-  // HAS_FREE_COURSE_TIMES: {
-  //   name: '基础技能班学员数量异常',
-  //   isError: true,
-  //   url: '/teamCLassList',
-  //   permission: '/teamCLassList',
-  //   always: true,
-  //   query: {
-  //     HAS_FREE_COURSE_TIMES: '1',
-  //   },
-  // },
+  HAS_FREE_COURSE_TIMES: {
+    name: '排课时长消耗异常',
+    isError: true,
+    url: '/hasfreeCourse',
+    permission: '/hasfreeCourse',
+    always: true,
+  },
 }
 
 export const matterTypes = {

+ 180 - 0
src/views/main/hasfreeCourse/index.vue

@@ -0,0 +1,180 @@
+<!--  -->
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      排课时长消耗异常
+    </h2>
+    <div class="m-core">
+      <save-form
+        :inline="true"
+        :model="searchForm"
+        @submit="search"
+        @reset="onReSet"
+      >
+        <el-form-item prop="search">
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="请输入姓名、编号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item prop="organId">
+          <el-select
+            style="width: 180px !important"
+            class="multiple"
+            v-model.trim="searchForm.organId"
+            filterable
+            clearable
+            placeholder="请选择分部"
+          >
+            <el-option
+              v-for="(item, index) in selects.branchs"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="primary">搜索</el-button>
+          <el-button native-type="reset" type="danger">重置</el-button>
+        </el-form-item>
+      </save-form>
+      <div class="tableWrap">
+        <el-table
+          style="width: 100%"
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column
+            align="center"
+            prop="organName"
+            label="分部"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="userId"
+            label="学员编号"
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            prop="username"
+            label="学员名称"
+          ></el-table-column>
+          <el-table-column align="center" prop="username" label="课程类型">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.courseType | courseTypeFormat }}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="totalCourseMinutes"
+            label="总时长"
+          >
+            <template slot-scope="scope">
+              <div>{{ scope.row.totalCourseMinutes }}分钟</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="usedCourseMinutes"
+            label="消耗时长"
+          >
+            <template slot-scope="scope">
+              <div>{{ scope.row.usedCourseMinutes }}分钟</div>
+            </template></el-table-column
+          >
+          <el-table-column
+            align="center"
+            prop="freeCourseMinutes"
+            label="未消耗"
+          >
+            <template slot-scope="scope">
+              <div>{{ scope.row.freeCourseMinutes }}分钟</div>
+            </template></el-table-column
+          >
+        </el-table>
+        <pagination
+          sync
+          :total.sync="rules.total"
+          :page.sync="rules.page"
+          :limit.sync="rules.limit"
+          :page-sizes="rules.page_size"
+          @pagination="getList"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import axios from "axios";
+import { getToken } from "@/utils/auth";
+import pagination from "@/components/Pagination/index";
+import load from "@/utils/loading";
+import { getHasFreeCourseList } from "../api";
+export default {
+  components: { pagination },
+  data() {
+    return {
+      searchForm: {
+        search: null,
+        organId: null,
+      },
+
+      tableList: [],
+      organList: [],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50], // 选择限制显示条数
+      },
+    };
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    // 获取分部
+    this.$store.dispatch("setBranchs");
+    this.init();
+  },
+  methods: {
+    init() {
+      this.getList();
+    },
+    async getList() {
+      try {
+        const res = await getHasFreeCourseList({
+          ...this.searchForm,
+          rows: this.rules.limit,
+          page: this.rules.page,
+        });
+        this.rules.total = res.data.total;
+        this.tableList = res.data.rows;
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
+    onReSet() {
+      this.searchForm={
+        search: null,
+        organId: null,
+      }
+      this.search()
+    },
+  },
+};
+</script>
+<style lang='scss' scoped>
+</style>

+ 21 - 4
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -288,10 +288,12 @@ export default {
           group: "holiday",
         });
 
-        this.holidays = JSON.parse(res1.data[0].paranValue?res1.data[0].paranValue:'[]');
+        this.holidays = JSON.parse(
+          res1.data[0].paranValue ? res1.data[0].paranValue : "[]"
+        );
         this.prices = res.data;
         let arr = [];
-        if (JSON.stringify(this.prices) == '{}') {
+        if (JSON.stringify(this.prices) == "{}") {
           // 课程时长
           arr.push("teamCourseTimer");
         }
@@ -349,6 +351,21 @@ export default {
             studentIds,
             classGroupId,
           });
+          if (res.data.checkCourseTimesFlag == 1) {
+            this.$confirm("该班级学员剩余时长不一致是否继续?", "提示", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning",
+            })
+              .then(() => {
+
+              })
+              .catch((e)=>{
+                     this.$emit('close')
+              })
+
+
+          }
         } catch (error) {
           console.log(error);
         }
@@ -464,7 +481,7 @@ export default {
                 this.$listeners.close();
                 return;
               }
-                 if (result.code == 208) {
+              if (result.code == 208) {
                 await this.$confirm(
                   result.msg || `班级剩余排课时长不一致,请再次确认`,
                   "提示",
@@ -474,7 +491,7 @@ export default {
                 );
                 // obj.allowZeroSalary = true;
                 list.forEach((item) => {
-                  item.checkCourseTimesFlag   = true;
+                  item.checkCourseTimesFlag = true;
                 });
                 await classGroupUpdate(list);
                 this.$listeners.submited();

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff