Ver código fonte

Merge branch '05/07navColor' into test

mo 4 anos atrás
pai
commit
12d5a27761

+ 2 - 2
src/views/recodeManager/recodeList.vue

@@ -251,7 +251,7 @@
                 <el-button
                   type="text"
                   v-if="
-                    scope.row.jobNature === 'PART_TIME' &&
+                    scope.row.jobNature != 'FULL_TIME' &&
                     scope.row.complaintsStatus == 2
                   "
                   @click="unappeal(scope.row)"
@@ -261,7 +261,7 @@
               <auth auths="teacherAttendance/addComplaints">
                 <el-button
                   v-if="
-                    scope.row.jobNature === 'PART_TIME' &&
+                    scope.row.jobNature != 'FULL_TIME' &&
                     (scope.row.complaintsStatus == null ||
                       scope.row.complaintsStatus == 3)
                   "

+ 53 - 1
src/views/teamDetail/componentCourse/teacherList.vue

@@ -200,6 +200,29 @@
                 >处理意见</el-button
               >
             </auth>
+                       <auth auths="teacherAttendance/repealComplaints/4300">
+                <el-button
+                  type="text"
+                  v-if="
+                    scope.row.jobNature != 'FULL_TIME' &&
+                    scope.row.teacherAttendance.complaintsStatus == 2
+                  "
+                  @click="unappeal(scope.row)"
+                  >撤销申诉</el-button
+                >
+              </auth>
+              <auth auths="teacherAttendance/addComplaints/4299">
+                <el-button
+                  v-if="
+                    scope.row.jobNature != 'FULL_TIME' &&
+                    (scope.row.teacherAttendance.complaintsStatus == null ||
+                      scope.row.teacherAttendance.complaintsStatus == 3)
+                  "
+                  type="text"
+                  @click="appeal(scope.row)"
+                  >申诉</el-button
+                >
+              </auth>
           </div>
         </template>
       </el-table-column>
@@ -290,6 +313,14 @@
         <el-button type="primary" @click="resetSalary">确 定</el-button>
       </div>
     </el-dialog>
+         <el-dialog title="申诉" width="400px" :visible.sync="appealVisible" append-to-body>
+          <appeal
+            v-if="appealVisible && detail"
+            :detail="detail"
+            @close="appealVisible = false"
+            @submited="getList"
+          />
+        </el-dialog>
     <!-- </el-dialog> -->
   </div>
 </template>
@@ -298,12 +329,15 @@ import { updateTeacherAttendance, getTeacherSalary } from "@/api/buildTeam";
 import { updateTeacherCoursesSalary } from "@/api/teacherManager";
 import { getCourseTeachers } from "@/api/teacherManager";
 import gpsLoction from "../componentCourse/gpsLocation";
+import appeal from "@/views/recodeManager/modals/appeal";
+import { repealComplaints } from "@/views/recodeManager/api";
 import hand from "@/views/recodeManager/modals/hand";
 export default {
-  components: { gpsLoction, hand },
+  components: { gpsLoction, hand,appeal },
   props: ["courseScheduleId", "teachMode", "courseStatus"],
   data() {
     return {
+      appealVisible:false,
       tableList: [],
       gpsVisible: false,
       activeRow: null,
@@ -445,6 +479,24 @@ export default {
         }
       });
     },
+     appeal(row) {
+      this.appealVisible = true;
+      this.detail = row;
+      this.detail.courseScheduleId = row.teacherAttendance?.courseScheduleId;
+    },
+    async unappeal(row) {
+      try {
+        await this.$confirm("是否确认撤销申诉?", "提示", {
+          type: "warning",
+        });
+        await repealComplaints({
+          courseScheduleId: row.teacherAttendance.courseScheduleId,
+          userId: row.teacherId,
+        });
+        this.$message.success("撤销成功");
+        this.getList();
+      } catch (error) {}
+    },
   },
 };
 </script>