Browse Source

Merge branch 'Nov16thResetMusic' into online

mo 4 years ago
parent
commit
3e4ce37f0e

+ 1 - 1
src/components/QrCode/index.vue

@@ -15,7 +15,7 @@
 
 <script>
 import VueQr from 'vue-qr'
-import copy from 'copy-to-clipboard'
+import copy from 'copy-to-clipboard' 
 export default {
     data() {
         return {

+ 6 - 0
src/constant/index.js

@@ -150,3 +150,9 @@ export const workType = {
   TEACHING: "助教",
   BISHOP: "主教"
 }
+
+export const updateAttendanceEnum = {
+  SIGN_IN:'修复签到',
+  SIGN_OUT:'修复签退',
+  ALL:'签到和签退',
+}

+ 1 - 0
src/router/notKeepAliveList.js

@@ -4,5 +4,6 @@ export default [
   '/orderList/orderAudit',
   '/business/teamCourseList',
   '/business/auditList',
+  '/journal/payAppeal'
   // '/operateManager/HumanResources'
 ]

+ 2 - 1
src/utils/vueFilter.js

@@ -177,7 +177,8 @@ Vue.filter('payUserTypeFormat', val => constant.payUserType[val])
 Vue.filter('userPaymentTypeFormat', val => constant.userPaymentType[val])
 // 课程类型格式化
 Vue.filter('courseTypeFormat', val => constant.courseType[val])
-
+// 格式化签到签退记录 updateAttendanceEnum
+Vue.filter('updateAttendanceEnum', val => constant.updateAttendanceEnum[val])
 
 // 时间处理
 Vue.filter('timer', (value) => {

+ 3 - 1
src/views/teamDetail/componentCourse/addCompound.vue

@@ -135,7 +135,9 @@ export default {
       this.isLook = false
 
     },
-    getList () { },
+    getList () { 
+      
+    },
     closeReset () {
       this.clearCom()
       this.show = false

+ 1 - 1
src/views/teamDetail/componentCourse/compoundClass.vue

@@ -251,7 +251,7 @@ export default {
           courseMerge(obj).then(res => {
             if (res.code == 200) {
               this.$message.success("修改成功");
-              this.$emit('getList')
+              // this.$emit('getList')
               this.$emit('closeReset')
               // this.getList();
               // this.courseVisible = false;

+ 44 - 4
src/views/teamDetail/components/modals/classList-group.vue

@@ -8,7 +8,8 @@
         :item="item"
         @deteleClass="deteleClass"
         :form="form"
-        :classList="classList"
+        :classList="activeClassList"
+        @filterClassList="filterClassList"
       />
     </el-form>
     <el-button
@@ -28,7 +29,7 @@
       width="800px"
     >
       <classPayList
-      :classIdList="classIdList"
+        :classIdList="classIdList"
         :courseTypesByType="courseTypesByType"
         :form="form"
         :payInfo="payInfo"
@@ -60,9 +61,13 @@ export default {
         ],
       },
       showSecondVisable: false,
-      classIdList:[]
+      classIdList: [],
+      activeClassList: [],
     };
   },
+  mounted() {
+    this.activeClassList = this.classList;
+  },
   methods: {
     addClass() {
       this.form.classList.push({
@@ -94,7 +99,6 @@ export default {
             return item.classId;
           });
           try {
-
             let result = await getDefaultPaymentCalender(this.classIdList);
             this.payInfo = result.data;
             this.showSecondVisable = true;
@@ -102,6 +106,42 @@ export default {
         }
       });
     },
+    filterClassList(id) {
+      let arr = [];
+      this.form.classList.forEach((item) => {
+        if (item.classId) {
+          arr.push(item.classId);
+        }
+      });
+      if (id) {
+        let item;
+        // 找到对应的班级
+        this.classList.forEach((classes) => {
+          if (classes.id == id) {
+            item = classes;
+          }
+        });
+        // 过滤类型不一样的
+        this.activeClassList = this.classList.filter((classes) => {
+          return item.type == classes.type;
+        });
+        this.addDisabled(arr)
+      } else {
+        if (arr.length == 0) {
+          this.activeClassList = this.classList
+        } else {
+         this.addDisabled(arr)
+        }
+      }
+    },
+    addDisabled(arr){
+       this.activeClassList = this.activeClassList.map((classes) => {
+            return {
+              ...classes,
+              disabled: arr.indexOf(classes.id) != -1
+            };
+          });
+    }
   },
 };
 </script>

+ 27 - 27
src/views/teamDetail/components/modals/classList-item.vue

@@ -18,6 +18,7 @@
       <el-select
         v-model="item.classId"
         style="margin-right: 20px"
+        clearable
         @change="changeValue"
       >
         <el-option
@@ -25,7 +26,7 @@
           :value="item.id"
           v-for="(item, index) in classList"
           :key="index"
-          :disabled="isDisabled(item)"
+          :disabled='item.disabled'
         ></el-option>
       </el-select>
       <el-button
@@ -39,9 +40,12 @@
 
     <div class="infomsg">
       <div class="left" v-if="!isNoCourse">
-           剩余课时:
-        <div v-for="(val,key) in item.courseList" :key='key'>
-          <p style="margin-right:5px">{{key|courseTypeFormat}}:<span>{{val}}</span>节</p>
+        剩余课时:
+        <div v-for="(val, key) in item.courseList" :key="key">
+          <p style="margin-right: 5px">
+            {{ key | courseTypeFormat }}:<span>{{ val }}</span
+            >节
+          </p>
         </div>
       </div>
       <div class="left" v-else>
@@ -67,7 +71,7 @@
         :list="studentList"
         :chioseList="item.studentList"
         v-if="studentListModalVisible"
-        :showOk='true'
+        :showOk="true"
         :isChiose="true"
         @close="closeStudentView"
       />
@@ -90,36 +94,31 @@ export default {
       organizationCourseUnitPriceSettingsByType: [],
       eclass: [],
       isNoCourse: false,
+      activeClassList: [],
     };
   },
+  mounted() {
+    this.activeClassList =this.classList
+  },
   methods: {
     async changeValue(val) {
-      this.item.studentList = []
-      try {
-        let reset = await getClassGroupSubCourseNum({ classGroupId: val });
-        this.setClassCourse(reset.data);
-      } catch {}
+      this.item.studentList = [];
+      if (val) {
+        try {
+          let reset = await getClassGroupSubCourseNum({ classGroupId: val });
+          this.setClassCourse(reset.data);
+          // 成功之后
+          this.$emit("filterClassList", val);
+        } catch {}
+      } else {
+        this.setClassCourse({});
+        this.$emit("filterClassList", null);
+      }
     },
     deteleClass() {
       this.$emit("deteleClass", this.index);
     },
-    isDisabled(item) {
-      let flag = false;
-       this.form?.classList?.forEach((some) => {
-        if (item.type != some.type && some.type) {
-          flag = true;
-        }
-      });
-      this.form?.classList?.forEach((some) => {
-        if (item.id == some.classId) {
-          some.type = item.type
-          flag = true;
-        }
-      });
-      
 
-      return flag;
-    },
     lookStudentList() {
       if (!this.item.classId) {
         this.$message.error("请先选择班级,再查询学生列表");
@@ -146,9 +145,10 @@ export default {
       this.studentListModalVisible = false;
     },
     setClassCourse(data) {
+      console.log(data);
       if (Object.keys(data).length > 0) {
-
         this.item.courseList = data;
+        this.isNoCourse = false;
       } else {
         this.isNoCourse = true;
       }

+ 3 - 8
src/views/teamDetail/teamCourseList.vue

@@ -212,13 +212,7 @@
               <div>{{ scope.row.isComplaints==1?'是':'否'}}</div>
             </template>
           </el-table-column>
-          <!-- <el-table-column align="center"
-                           label="是否签退"
-                           fixed="right">
-            <template slot-scope="scope">
-              <div>{{ scope.row.isSignOut | attendanceOutType}}</div>
-            </template>
-          </el-table-column> -->
+         
           <el-table-column align="center"
                            prop="isLock"
                            label="是否冻结">
@@ -253,7 +247,7 @@
                 </el-button>
                 <el-button type="text"
                            @click="addCompound(scope.row)"
-                           v-if="(scope.row.groupType=='MUSIC'&&scope.row.type!='MUSIC_NETWORK'&&scope.row.type!='HIGH_ONLINE'&&scope.row.status=='NOT_START'&&!isAddCom(scope.row)&&permission('courseSchedule/courseMerge')&&scope.row.newCourseId <= 0)">添加合课</el-button>
+                           v-if="(scope.row.groupType=='MUSIC'&&scope.row.type!='MUSIC_NETWORK'&&scope.row.type!='HIGH_ONLINE'&&scope.row.status=='NOT_START'&&!isAddCom(scope.row)&&permission('courseSchedule/courseMerge')&&scope.row.newCourseId <= 0&&!scope.row.beMerged)">添加合课</el-button>
                 <el-button type="text"
                            v-if="isAddCom(scope.row)&&permission('courseSchedule/courseMerge')"
                            @click="cancleCompound(scope.row)">取消合课</el-button>
@@ -403,6 +397,7 @@
     </el-dialog>
     <addCompound :compoundList='compoundList' v-if="permission('courseSchedule/courseMerge')"
                  @clearCom='clearCom'
+                 @getList='getList'
                  @cancleCompound='cancleCompound' />
   </div>
 </template>

+ 19 - 6
src/views/workBenchManager/payAppeal.vue

@@ -6,7 +6,7 @@
       考勤申诉
     </h2>
     <div class="m-core">
-      <el-form :inline="true" :model="searchForm">
+      <save-form :inline="true" :model.sync="searchForm" ref='searchForm'>
         <el-form-item>
           <el-input
             v-model.trim="searchForm.search"
@@ -60,7 +60,7 @@
           <el-button type="danger" @click="search">搜索</el-button>
           <el-button @click="onReSet" type="primary">重置</el-button>
         </el-form-item>
-      </el-form>
+      </save-form>
       <div class="tableWrap">
         <el-table
           style="width: 100%"
@@ -125,6 +125,13 @@
               </div>
             </template>
           </el-table-column>
+          <el-table-column align="center" label="修复记录">
+            <template slot-scope="scope">
+              <div>
+                {{ scope.row.updateAttendanceEnum | updateAttendanceEnum }}
+              </div>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
             prop="operatorName"
@@ -145,7 +152,8 @@
           </el-table-column>
         </el-table>
         <pagination
-          :total="rules.total"
+          sync
+          :total.sync="rules.total"
           :page.sync="rules.page"
           :limit.sync="rules.limit"
           :page-sizes="rules.page_size"
@@ -189,7 +197,10 @@
             ></el-input>
           </el-form-item>
           <!--  -->
-          <el-form-item label="请选择需要补正的状态" v-if="visibleForm.complaintsStatusEnum == '2'">
+          <el-form-item
+            label="请选择需要补正的状态"
+            v-if="visibleForm.complaintsStatusEnum == '2'"
+          >
             <br />
             <el-checkbox
               v-model="visibleForm.reSignInStatus"
@@ -308,6 +319,8 @@ export default {
     },
     search() {
       this.rules.page = 1;
+      this.$refs.searchForm.save(this.searchForm);
+      this.$refs.searchForm.save(this.pageInfo, "page");
       this.getList();
     },
     onReSet() {
@@ -370,7 +383,7 @@ export default {
             let obj = {};
             obj.content = this.visibleForm.disposeContent;
             obj.teacherAttendanceId = this.visibleForm.teacherAttendanceId;
-            this.$confirm('驳回申诉', "是否", {
+            this.$confirm("驳回申诉", "是否", {
               confirmButtonText: "确定",
               cancelButtonText: "取消",
               type: "warning",
@@ -401,7 +414,7 @@ export default {
         teacherAttendanceId: row.teacherAttendanceId,
         // reSignInStatus: row.signInStatus == 1 ? true : false,
         // reSignOutStatus: row.signOutStatus == 1 ? true : false,
-           reSignInStatus: null,
+        reSignInStatus: null,
         reSignOutStatus: null,
       };
       this.dialogVisible = true;