Kaynağa Gözat

02/27 14:58

11
261568008@qq.com 5 yıl önce
ebeveyn
işleme
f2b9256e66
1 değiştirilmiş dosya ile 36 ekleme ve 3 silme
  1. 36 3
      src/views/vipClass/vipReset.vue

+ 36 - 3
src/views/vipClass/vipReset.vue

@@ -39,6 +39,11 @@
             <div>{{ scope.row.status | coursesStatus }}</div>
           </template>
         </el-table-column>
+         <el-table-column label="是否点名" align="center">
+          <template slot-scope="scope">
+            <div>{{scope.row.isCallNames?'已点名':'未点名'}}</div>
+          </template>
+        </el-table-column>
         <el-table-column label="结算状态" align="center">
           <template slot-scope="scope">
             <div>{{scope.row.isSettlement?'已结算':'未结算'}}</div>
@@ -58,7 +63,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="操作">
+        <el-table-column label="操作" width="180" align="center">
           <template slot-scope="scope">
             <div>
               <el-button
@@ -70,9 +75,16 @@
               <el-button
                 type="text"
                 v-permission="'courseSchedule/bathDelete'"
-                v-if="scope.row.status != 'OVER'"
+                 v-if="!scope.row.isSettlement"
                 @click="removeClass(scope.row)"
               >删除</el-button>
+              <!--   -->
+                  <el-button
+                type="text"
+                 v-permission="'vip/cleanAttendance'"
+                v-if="!scope.row.isSettlement"
+               @click="clearAttend(scope.row)"
+              >清除考勤</el-button>
             </div>
           </template>
         </el-table-column>
@@ -327,7 +339,7 @@
   </div>
 </template>
 <script>
-import { resetCourse } from "@/api/buildTeam";
+import { resetCourse,  cleanAttendance } from "@/api/buildTeam";
 // import { getSchool } from '@/api/systemManage'
 import pagination from "@/components/Pagination/index";
 import {
@@ -720,6 +732,27 @@ export default {
           this.getList();
         }
       });
+    },
+      // 清除考勤
+    clearAttend(row) {
+      this.$confirm("是否清除考勤记录?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          cleanAttendance({ courseScheduleIds: row.id }).then(
+            res => {
+              if (res.code == 200) {
+                this.$message.success("清除成功");
+                this.getList();
+              } else {
+                this.$message.error(res.msg);
+              }
+            }
+          );
+        })
+        .catch(() => {});
     }
   },
   watch: {