lex-xin %!s(int64=5) %!d(string=hai) anos
pai
achega
b68194d18d

+ 36 - 0
src/api/buildTeam.js

@@ -861,4 +861,40 @@ export function findStudentCourseHomeworks (data) {
     method: 'get',
     params: data
   })
+}
+
+// 运营预警列表
+export function teacherCourseStatistics (data) {
+  return request({
+    url: api + '/teacherCourseStatistics/queryPage',
+    method: 'get',
+    params: data
+  })
+}
+
+// 修改考勤状态
+export function updateTeacherAttendance(data) {
+  return request({
+    url: api + '/teacherAttendance/updateTeacherAttendance',
+    method: 'post',
+    data: qs.stringify(data)
+  })
+}
+
+// 点名列表
+export function findAttendanceStudentByCourseWithPage (data) {
+  return request({
+    url: api + '/studentAttendance/findAttendanceStudentByCourseWithPage',
+    method: 'get',
+    params: data
+  })
+}
+
+// 更新学生签到记录
+export function updateStudentAttendances (data) {
+  return request({
+    url: api + '/studentAttendance/updateStudentAttendances',
+    method: 'post',
+    data: data
+  })
 }

+ 5 - 3
src/router/index.js

@@ -72,7 +72,8 @@ export const constantRoutes = [
         component: () => import('@/views/setSilder/addSilder'),
         hidden: true,
         meta: {
-          noCache: '1'
+          noCache: '1',
+          title: '侧边栏'
         }
       }
     ]
@@ -234,7 +235,8 @@ export const asyncRoutes = {
   // 零星管理
   sporadicManager: () => import('@/views/sporadicManager/sporadicList'),
   // 课表列表
-  teamCourseList: () => import('@/views/teamDetail/teamCourseList')
-
+  teamCourseList: () => import('@/views/teamDetail/teamCourseList'),
+  // 运营预警
+  operationalList: () => import('@/views/operationalEarly/operationalList')
 }
 export default router

+ 5 - 2
src/views/journal/leaveOperation.vue

@@ -100,6 +100,9 @@
             <el-table :data="showMessage.musicGroupCourse"
                       style="width: 100%; padding-top: 10px;"
                       :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+              <el-table-column label="乐团编号" prop="before.musicGroupId"
+                               width="100px">
+              </el-table-column>
               <el-table-column label="类型"
                                width="100px">
                 <template slot-scope="scope">
@@ -120,11 +123,11 @@
                   {{ scope.row.before.startClassTime | getFormatTime(scope.row.before.endClassTime) }}
                 </template>
               </el-table-column>
-              <el-table-column label="操作" v-if="showMessage.status == 'PASS'">
+              <!-- <el-table-column label="操作" v-if="showMessage.status == 'PASS'">
                   <template slot-scope="scope">
                     <el-button @click="onClssTime(scope.row)" type="text">调整</el-button>
                   </template>
-                </el-table-column>
+              </el-table-column> -->
             </el-table>
           </div>
 

+ 38 - 44
src/views/main/index.vue

@@ -13,25 +13,19 @@
           <div class="infos">
             <div class="info">
               <p class="sub">全部</p>
-              <p class='msg' v-if="dataInfo.musicDatas"> 
-                {{ dataInfo.musicDatas.progress_num_ + dataInfo.musicDatas.prepare_num_ + dataInfo.musicDatas.pause_num_ }} 
-              </p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'> {{ dataInfo.mdTotal }}</p>
             </div>
             <div class="info">
               <p class="sub">筹备中</p>
-              <p class='msg' v-if="dataInfo.musicDatas">{{ dataInfo.musicDatas.prepare_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.prepare_num_ }}</p>
             </div>
             <div class="info">
               <p class="sub">进行中</p>
-              <p class='msg' v-if="dataInfo.musicDatas">{{ dataInfo.musicDatas.progress_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.progress_num_ }}</p>
             </div>
             <div class="info">
               <p class="sub">已完成</p>
-              <p class='msg' v-if="dataInfo.musicDatas">{{ dataInfo.musicDatas.pause_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.pause_num_ }}</p>
             </div>
           </div>
         </div>
@@ -45,13 +39,11 @@
           <div class="infos">
             <div class="info">
               <p class="sub">收入笔数</p>
-              <p class='msg' v-if="dataInfo.incomeMap">{{ dataInfo.incomeMap.total }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.incomeMap && dataInfo.incomeMap.total >= 0 ? dataInfo.incomeMap.total : '--' }}</p>
             </div>
             <div class="info">
               <p class="sub">收入金额</p>
-              <p class='msg' v-if="dataInfo.incomeMap">{{ dataInfo.incomeMap.total_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.incomeMap && dataInfo.incomeMap.total_num_ >= 0 ? dataInfo.incomeMap.total_num_ : '--' }}</p>
             </div>
           </div>
         </div>
@@ -65,13 +57,11 @@
           <div class="infos">
             <div class="info">
               <p class="sub">支出笔数</p>
-              <p class='msg' v-if="dataInfo.incomeExpendMap">{{ dataInfo.incomeExpendMap.expend_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.incomeExpendMap && dataInfo.incomeExpendMap.expend_num_ >= 0 ? dataInfo.incomeExpendMap.expend_num_ : '--' }}</p>
             </div>
             <div class="info">
               <p class="sub">支出金额</p>
-              <p class='msg' v-if="dataInfo.incomeExpendMap">{{ dataInfo.incomeExpendMap.expend_total_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.incomeExpendMap && dataInfo.incomeExpendMap.expend_total_ >= 0 ? dataInfo.incomeExpendMap.expend_total_ : '--' }}</p>
             </div>
           </div>
         </div>
@@ -85,18 +75,15 @@
           <div class="infos">
             <div class="info">
               <p class="sub">总计</p>
-              <p class='msg' v-if="dataInfo.teacherDatas">{{ dataInfo.teacherDatas.total >= 0 ? dataInfo.teacherDatas.total : '--' }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.teacherDatas && dataInfo.teacherDatas.total >= 0 ? dataInfo.teacherDatas.total : '--' }}</p>
             </div>
             <div class="info">
               <p class="sub">全职人数</p>
-              <p class='msg' v-if="dataInfo.teacherDatas">{{ dataInfo.teacherDatas.full_time_num_ >= 0 ? dataInfo.teacherDatas.full_time_num_ : '--' }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.teacherDatas && dataInfo.teacherDatas.full_time_num_ >= 0 ? dataInfo.teacherDatas.full_time_num_ : '--' }}</p>
             </div>
             <div class="info">
               <p class="sub">兼职人数</p>
-              <p class='msg' v-if="dataInfo.teacherDatas">{{ dataInfo.teacherDatas.part_time_num_ >= 0 ? dataInfo.teacherDatas.part_time_num_ : '--' }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.teacherDatas && dataInfo.teacherDatas.part_time_num_ >= 0 ? dataInfo.teacherDatas.part_time_num_ : '--' }}</p>
             </div>
           </div>
         </div>
@@ -110,20 +97,17 @@
           <div class="infos">
             <div class="info">
               <p class="sub">总计</p>
-              <p class='msg' v-if="dataInfo.vipDatas">
-                {{ dataInfo.vipDatas.applying_num_ + dataInfo.vipDatas.finished_num_ }}
+              <p class='msg'>
+                {{ dataInfo.vdTotal }}
               </p>
-              <p class="msg" v-else>--</p>
             </div>
             <div class="info">
               <p class="sub">进行中</p>
-              <p class='msg' v-if="dataInfo.vipDatas">{{ dataInfo.vipDatas.applying_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.applying_num_ }}</p>
             </div>
             <div class="info">
               <p class="sub">已完成</p>
-              <p class='msg' v-if="dataInfo.vipDatas">{{ dataInfo.vipDatas.finished_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.finished_num_ }}</p>
             </div>
           </div>
         </div>
@@ -137,18 +121,15 @@
           <div class="infos">
             <div class="info">
               <p class="sub">总计</p>
-              <p class='msg' v-if="dataInfo.demoDatas">{{ dataInfo.demoDatas.booked_num_ + dataInfo.demoDatas.unbooked_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.ddTotal }}</p>
             </div>
             <div class="info">
               <p class="sub">已预约</p>
-              <p class='msg' v-if="dataInfo.demoDatas">{{ dataInfo.demoDatas.booked_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.booked_num_ }}</p>
             </div>
             <div class="info">
               <p class="sub">未完成</p>
-              <p class='msg' v-if="dataInfo.demoDatas">{{ dataInfo.demoDatas.unbooked_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.unbooked_num_ }}</p>
             </div>
           </div>
         </div>
@@ -162,18 +143,15 @@
           <div class="infos">
             <div class="info">
               <p class="sub">总计</p>
-              <p class='msg' v-if="dataInfo.studentDatas">{{ dataInfo.studentDatas.total_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.studentDatas && dataInfo.studentDatas.total_num_ >= 0 ? dataInfo.studentDatas.total_num_ : '--' }}</p>
             </div>
             <div class="info">
               <p class="sub">本月新增</p>
-              <p class='msg' v-if="dataInfo.studentDatas">{{ dataInfo.studentDatas.new_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.studentDatas && dataInfo.studentDatas.new_num_ >= 0 ? dataInfo.studentDatas.new_num_ : '--' }}</p>
             </div>
             <div class="info">
               <p class="sub">本月退团</p>
-              <p class='msg' v-if="dataInfo.studentDatas">{{ dataInfo.studentDatas.quit_num_ }}</p>
-              <p class="msg" v-else>--</p>
+              <p class='msg'>{{ dataInfo.studentDatas && dataInfo.studentDatas.quit_num_ >= 0 ? dataInfo.studentDatas.quit_num_ : '--' }}</p>
             </div>
           </div>
         </div>
@@ -221,7 +199,23 @@ export default {
     __init () {
       getIndex().then(res => {
         if (res.code == 200) {
-          this.dataInfo = res.data
+          // this.dataInfo = res.data
+          let md = res.data.musicDatas || {},
+              vd = res.data.vipDatas || {},
+              dd = res.data.demoDatas || {}
+          let tempDate = {
+            mdTotal: (md.progress_num_ ? md.progress_num_ : 0) + (md.prepare_num_ ? md.prepare_num_ : 0) + (md.pause_num_ ? md.pause_num_ : 0),
+            progress_num_: md.progress_num_ >= 0 ? md.progress_num_ : '--',
+            prepare_num_: md.prepare_num_ >= 0 ? md.prepare_num_ : '--',
+            pause_num_: md.pause_num_ >= 0 ? md.pause_num_ : '--',
+            vdTotal: (vd.finished_num_ ? vd.finished_num_ : 0) + (vd.applying_num_ ? vd.applying_num_ : 0),
+            finished_num_: vd.finished_num_ >= 0 ? vd.finished_num_ : '--',
+            applying_num_: vd.applying_num_ >= 0 ? vd.applying_num_ : '--',
+            ddTotal: (dd.booked_num_ ? dd.booked_num_ : 0) + (dd.unbooked_num_ ? dd.unbooked_num_ : 0),
+            booked_num_: dd.booked_num_ >= 0 ? dd.booked_num_ : '--',
+            unbooked_num_: dd.unbooked_num_ >= 0 ? dd.unbooked_num_ : '--'
+          }
+          this.dataInfo = Object.assign(res.data, tempDate)
         }
       })
     }

+ 173 - 0
src/views/operationalEarly/operationalList.vue

@@ -0,0 +1,173 @@
+<template>
+  <div class="m-container">
+    <h2>
+      <div class="squrt"></div>
+      运营预警
+    </h2>
+    <div class="m-core">
+      <el-form :inline="true"
+               :model="searchForm">
+        <el-form-item>
+          <el-select v-model="searchForm.organId"
+                     @clear="onClear('organId')"
+                     placeholder='请选择分部'
+                     clearable
+                     filterable>
+            <el-option v-for='(item,index) in organList'
+                       :key="index"
+                       :value="item.id"
+                       :label="item.name"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-select v-model="searchForm.userId"
+                     @clear="onClear('userId')"
+                     clearable
+                     filterable
+                     placeholder="指导老师">
+            <el-option v-for="(item,index) in teacherList"
+                       :key='index'
+                       :value="item.id"
+                       :label="item.username"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+            <el-date-picker
+                v-model="searchForm.monthStr"
+                 @clear="onClear('monthStr')"
+                type="month"
+                value-format="yyyy-MM"
+                placeholder="选择月">
+            </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="danger"
+                     @click="search">搜索</el-button>
+          <el-button @click="onReSet"
+                     type="primary">重置</el-button>
+        </el-form-item>
+      </el-form>
+      <div class="tableWrap">
+        <el-table :data='tableList'
+                  :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+          <el-table-column align='center' prop="monthStr"
+                           label="月份" >
+          </el-table-column>
+          <el-table-column align='center' prop="organName"
+                           label="分部" >
+          </el-table-column>
+          <el-table-column align='center' prop="realName"
+                           label="老师"> 
+          </el-table-column>
+          <el-table-column align='center' prop="subjectListStr"
+                           label="专业" >
+          </el-table-column>
+          <el-table-column align='center' prop="musicCourseNum"
+                           label="乐团节数"> 
+          </el-table-column>
+          <el-table-column align='center' prop="vipCourseNum"
+                           label="小课节数" >
+          </el-table-column>
+          <el-table-column align='center' prop="expectMusicCourseSalary"
+                           label="预计乐团课酬"> 
+          </el-table-column>
+          <el-table-column align='center' prop="expectVipCourseSalary"
+                           label="预计小课课酬">
+          </el-table-column>
+          <el-table-column align='center'
+                           label="预计课酬合计" prop="expectTotalSalary">
+          </el-table-column>
+          <el-table-column align='center' prop="averageClassMinutes"
+                           label="平均上课时长" >
+          </el-table-column>
+        </el-table>
+        <pagination :total="pageInfo.total"
+                    :page.sync="pageInfo.page"
+                    :limit.sync="pageInfo.limit"
+                    :page-sizes="pageInfo.page_size"
+                    @pagination="getList" />
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { getEmployeeOrgan, teacherCourseStatistics, getTeacher } from '@/api/buildTeam'
+import pagination from '@/components/Pagination/index'
+let nowDate = new Date()
+let nowMonth = nowDate.getFullYear() + '-' + ((nowDate.getMonth() + 1) >= 10 ? (nowDate.getMonth() + 1) : '0' + (nowDate.getMonth() + 1))
+export default {
+    name: 'operationalList',
+    components: { pagination },
+    data () {
+        return {
+            searchForm: {
+                organId: null,
+                monthStr: nowMonth,
+                userId: null
+            },
+            tableList: [{}],
+            organList: [],
+            teacherList: [],
+            pageInfo: {
+                // 分页规则
+                limit: 10, // 限制显示条数
+                page: 1, // 当前页
+                total: 0, // 总条数
+                page_size: [10, 20, 40, 50] // 选择限制显示条数
+            }
+        }
+    }, 
+    mounted () {
+        // 获取分部
+        getEmployeeOrgan().then(res => {
+            if (res.code == 200) {
+                this.organList = res.data;
+            }
+        })
+        // 获取老师列表
+        getTeacher({ organId: this.organId }).then(res => {
+            if (res.code == 200) {
+                this.teacherList = res.data;
+            }
+        })
+        this.getList();
+    },
+    methods: {
+        search () {
+            this.pageInfo.page = 1
+            this.getList()
+        },
+        onClear(type) {
+            if(type == 'organId') {
+                this.searchForm.organId = null
+            } else if(type == 'monthStr') {
+                this.searchForm.monthStr = null
+            } else if(type == 'userId') {
+                this.searchForm.userId = null
+            }
+        },
+        onReSet () {
+            this.searchForm = {
+                organId: null,
+                monthStr: null,
+                userId: null
+            }
+            this.getList()
+        },
+        getList () {
+            let params = this.searchForm
+            teacherCourseStatistics(params).then(res => {
+                let result = res.data
+                if(res.code == 200) {
+                    this.tableList = result.rows
+                    this.pageInfo.total = result.total
+                }
+            })
+        },
+    
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 129 - 43
src/views/teamDetail/components/courseList.vue

@@ -4,7 +4,7 @@
     <el-form :inline="true"
              class="searchForm"
              v-model="searchForm">
-      <el-form-item label="课程类型">
+      <el-form-item>
         <el-select v-model="searchForm.courseStatus"
                    clearable
                    filterable
@@ -25,7 +25,7 @@
                      value="SINGLE"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="课程状态">
+      <el-form-item>
         <el-select v-model="searchForm.classStatus"
                    clearable
                    filterable
@@ -38,9 +38,10 @@
                      value="OVER"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="班级名称">
+      <el-form-item >
         <!-- getMusicGroupAllClass -->
         <el-select v-model="searchForm.class"
+                   placeholder="班级名称"
                    filterable
                    clearable>
           <el-option v-for='(item,index) in classList'
@@ -49,7 +50,16 @@
                      :label="item.name"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="选择日期">
+      <el-form-item>
+        <el-select v-model="searchForm.isSettlement"
+                   placeholder="是否结算"
+                   filterable
+                   clearable>
+          <el-option value="0" label="未结算"></el-option>
+          <el-option value="1" label="已结算"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
         <el-date-picker v-model="searchForm.timer"
                         style="width:420px;"
                         type="daterange"
@@ -83,6 +93,7 @@
                          width="55"
                          :selectable="checkSelectable"></el-table-column>
         <el-table-column align='center'
+                         width="180px"
                          label="时间">
           <template slot-scope="scope">
             {{ scope.row.classDate }} {{ scope.row.startClassTime ? scope.row.startClassTime.substr(0, 5) : '' }}-{{ scope.row.endClassTime ? scope.row.endClassTime.substr(0, 5) : '' }}
@@ -136,21 +147,24 @@
                          label="指导老师">
         </el-table-column>
         <el-table-column align='center'
-                         prop="masterTeacherName"
+                         label="结算状态">
+          <template slot-scope="scope">
+            {{ scope.row.settlementTime ? '已结算' : '未结算' }}
+          </template>
+        </el-table-column>
+        <el-table-column align='center'
+                         prop="remark"
                          label="备注">
         </el-table-column>
-        <!-- <el-table-column align='center'
-                         prop="subTeacherName"
-                         label="助教老师">
-        </el-table-column> -->
         <el-table-column align='center'
+                         width="180px"
                          label="操作">
           <template slot-scope="scope">
             <div>
-              <el-button v-if="scope.row.courseScheduleStatus == 'OVER'"
+              <el-button v-if="scope.row.courseScheduleStatus == 'OVER' && !scope.row.settlementTime && permission('teacherAttendance/updateTeacherAttendance')"
                          type="text" @click="onMarkAttendance(scope.row)">补考勤</el-button>
-              <el-button v-if="scope.row.courseScheduleStatus == 'OVER'"
-                         type="text" @click="rollCall.status = true">点名表</el-button>
+              <el-button v-if="scope.row.courseScheduleStatus == 'OVER' && !scope.row.settlementTime && permission('studentAttendance/updateStudentAttendances')"
+                         type="text" @click="onCallName(scope.row)">点名表</el-button>
               <!-- OVER -->
               <el-button v-if="scope.row.courseScheduleStatus == 'OVER' && permission('courseSchedule/classStartDateAdjust1')" type="text" @click="resetClass(scope.row)">调整</el-button>
               <el-button v-if="scope.row.courseScheduleStatus == 'NOT_START' && permission('courseSchedule/classStartDateAdjust')" type="text" @click="resetClass(scope.row)">调整</el-button>
@@ -282,25 +296,34 @@
                width="700px"
                :visible.sync="rollCall.status">
       <el-table :data="rollCall.gridData">
-        <el-table-column property="date" label="学员姓名"></el-table-column>
-        <el-table-column property="name" label="手机号"></el-table-column>
-        <el-table-column property="address" label="学员声部"></el-table-column>
-        <el-table-column property="address" label="到课状态"></el-table-column>
-        <el-table-column label="操作">
+        <el-table-column align='center' property="userName" label="学员姓名"></el-table-column>
+        <el-table-column align='center' property="phone" label="手机号"></el-table-column>
+        <el-table-column align='center' property="subjectName" label="学员声部"></el-table-column>
+        <el-table-column align='center' label="到课状态">
           <template slot-scope="scope">
-            <el-button size="small" type="primary" plain>主要按钮</el-button>
-            <el-button size="small" type="success" plain>成功按钮</el-button>
-            <el-button size="small" type="info" plain>信息按钮</el-button>
+            {{ scope.row.status | studentCallName }}
+          </template>
+        </el-table-column>
+        <el-table-column align='center' label="操作" width="220px">
+          <template slot-scope="scope">
+            <el-button size="small" @click="onChangeRollCall('TRUANT', scope.row)" type="primary" round>未到</el-button>
+            <el-button size="small" @click="onChangeRollCall('LEAVE', scope.row)" type="warning" round>请假</el-button>
+            <el-button size="small" @click="onChangeRollCall('NORMAL', scope.row)" type="success" round>到课</el-button>
           </template>
         </el-table-column>
       </el-table>
+      <pagination :total="rollCall.total"
+                  :page.sync="rollCall.page"
+                  :limit.sync="rollCall.limit"
+                  :page-sizes="rollCall.page_size"
+                  @pagination="getCallName" />
     </el-dialog>
   </div>
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
 import { bathDelete } from '@/api/vipSeting'
-import { getCourseList, findMusicGroupClassTeacher, resetCourse, getTeacher, getMusicGroupAllClass, getCourseSchedule, batchAdjustment } from '@/api/buildTeam'
+import { getCourseList, findMusicGroupClassTeacher, resetCourse, getTeacher, getMusicGroupAllClass, getCourseSchedule, batchAdjustment, updateTeacherAttendance, findAttendanceStudentByCourseWithPage, updateStudentAttendances } from '@/api/buildTeam'
 import { permission } from '@/utils/directivePage'
 export default {
   name: 'tcourseList',
@@ -313,7 +336,8 @@ export default {
         courseStatus: '', // 课程类型
         classStatus: '', // 课程状态
         timer: [], // 时间
-        class: ''
+        class: '',
+        isSettlement: ''
       },
       tableList: [],
       searchLsit: [],
@@ -350,7 +374,12 @@ export default {
       },
       rollCall: { // 点名表
         status: false,
-        gridData: []
+        gridData: [],
+        selectItem: {}, // 选中状态
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
       }
     }
 
@@ -392,6 +421,45 @@ export default {
         dataInfo: item
       }
     },
+    onCallName(item) { // 点名表
+      this.rollCall.page = 1
+      this.rollCall.selectItem = item
+      this.getCallName()
+    },
+    getCallName() {
+      let rollCall = this.rollCall
+      let params = {
+        page: rollCall.page,
+        rows: rollCall.limit,
+        courseScheduleId: rollCall.selectItem.courseScheduleId
+      }
+      findAttendanceStudentByCourseWithPage(params).then(res => {
+        let result = res.data
+        rollCall.status = true
+        if(res.code == 200) {
+          rollCall.gridData = result.rows
+          rollCall.total = result.total
+        }
+      })
+    },
+    onChangeRollCall(type, row) {
+      let rollCall = this.rollCall
+      let params = {
+        courseScheduleId: rollCall.selectItem.courseScheduleId,
+        studentAttendances:[{
+            userId: row.studentId,
+            status: type
+        }]
+      }
+      updateStudentAttendances(params).then(res => {
+        if(res.code == 200) {
+          this.$message.success('修改成功')
+          row.status = type
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
     permission (str) {
       return permission(str)
     },
@@ -400,18 +468,20 @@ export default {
       this.getList();
     },
     getList () {
-      if (!this.searchForm.timer) {
-        this.searchForm.timer = []
+      let searchForm = this.searchForm
+      if (!searchForm.timer) {
+        searchForm.timer = []
       }
       let obj = {
-        classScheduleStatus: this.searchForm.classStatus || null,
-        classScheduleType: this.searchForm.courseStatus || null,
+        classScheduleStatus: searchForm.classStatus || null,
+        classScheduleType: searchForm.courseStatus || null,
         musicGroupId: this.teamid,
-        startTime: this.searchForm.timer[0] || null,
-        endTime: this.searchForm.timer[1] || null,
-        page: this.rules.page, rows: this.rules.limit,
-        classGroupId: this.searchForm.class || null
-
+        startTime: searchForm.timer[0] || null,
+        endTime: searchForm.timer[1] || null,
+        page: this.rules.page, 
+        rows: this.rules.limit,
+        classGroupId: searchForm.class || null,
+        isSettlement: searchForm.isSettlement || null
       }
       getCourseSchedule(obj).then(res => {
         if (res.code == 200) {
@@ -524,14 +594,20 @@ export default {
       return val.courseScheduleStatus == 'NOT_START'
     },
     batchAdjustmentTime () {
-      let arr = [];
-      arr = this.activeCourseList.map(item => {
-        return { classDate: this.timerMask.timer, id: item.courseScheduleId, endClassTimeStr: item.endClassTimeStr, startClassTimeStr: item.startClassTimeStr };
-      })
-      batchAdjustment(arr).then(res => {
-        if (res.code == 200) {
-          this.timerVisible = false;
-          this.getList();
+      let tempData = this.markAttendance.dataInfo
+      let params = {
+        "teacherId": tempData.masterTeacherId,
+        "courseScheduleId": tempData.courseScheduleId,
+        "signInStatus": 1,
+        "signOutStatus": 1
+      }
+      updateTeacherAttendance(params).then(res => {
+        if(res.code == 200) {
+          this.$message.success('补卡成功')
+          this.markAttendance.status = false
+          this.getList()
+        } else {
+          this.$message.error(res.msg)
         }
       })
     },
@@ -545,9 +621,19 @@ export default {
         return
       }
       this.timerVisible = true;
-    },
-
-
+    }
+  },
+  filters: {
+    studentCallName: value => {
+      let template = {
+        NORMAL: "到课",
+        TRUANT: "未到",
+        LEAVE: "请假",
+        DROP_OUT: "退学",
+        '': '未到'
+      }
+      return template[value]
+    }
   }
 }
 </script>

+ 6 - 40
src/views/teamDetail/teamCourseList.vue

@@ -313,42 +313,8 @@ export default {
   },
   mounted () {
     this.init();
-    this.getList();
-    // 获取所有老师
-    getTeacher().then(res => {
-      if (res.code == 200) {
-        this.teacherList = res.data;
-      }
-    })
-
-    // 获取教学点
-    getSchool().then(res => {
-      if (res.code == 200) {
-        this.schoolList = res.data
-      }
-    })
-
-    // 获取班级列表
-    // getMusicGroupAllClass().then(res => {
-    //   if (res.code == 200) {
-    //     this.classList = res.data;
-    //   }
-    // })
-
-    // 获取分部
-    getEmployeeOrgan().then(res => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    })
   },
   methods: {
-    /**
-     *  courseStatus: '', // 课程类型
-        courseType: '', // 课程状态
-        timer:[] // 时间
-     * 
-     */
     init () {
       this.getList();
       // 获取所有老师
@@ -358,12 +324,12 @@ export default {
         }
       })
 
-      // 获取班级列表
-      // getMusicGroupAllClass().then(res => {
-      //   if (res.code == 200) {
-      //     this.classList = res.data;
-      //   }
-      // })
+      // 获取教学点
+      getSchool().then(res => {
+        if (res.code == 200) {
+          this.schoolList = res.data
+        }
+      })
 
       getEmployeeOrgan().then(res => {
         if (res.code == 200) {

+ 1 - 1
src/views/teamDetail/teamList.vue

@@ -150,7 +150,7 @@
             </template>
           </el-table-column>
           <el-table-column align='center'
-                           width='200px'
+                           width='220px'
                            fixed="right"
                            label="操作">
             <template slot-scope="scope">

+ 96 - 2
src/views/vipClass/vipDetail/components/teacherRecord.vue

@@ -58,7 +58,7 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-button @click="search">搜索</el-button>
+        <el-button @click="search" type="primary">搜索</el-button>
       </el-form-item>
     </el-form>
     <!-- 列表 -->
@@ -121,8 +121,12 @@
             <div>
               <el-button type="text"
                          v-if="scope.row.attendanceNum"
-                         v-permission="'vipGroupManage/findVipGroupAttendanceStudents'"
+                         permission="'vipGroupManage/findVipGroupAttendanceStudents'"
                          @click="lookStudents(scope.row)">查看学员</el-button>
+
+              <!-- 未结算没有点击功能 -->
+              <el-button v-if="scope.row.status == 'OVER' && !scope.row.isSalary && permission('studentAttendance/updateStudentAttendances')"
+                         type="text" @click="onCallName(scope.row)">点名表</el-button>
               <!-- <el-button type="text" v-permission="'vipGroupManage/classStartDateAdjust'"
                          @click="resetClass(scope.row)">课程调整</el-button> -->
             </div>
@@ -205,12 +209,41 @@
                    @click="resetCourse">确 定</el-button>
       </span>
     </el-dialog>
+
+    <el-dialog title='点名表'
+               width="700px"
+               :visible.sync="rollCall.status">
+      <el-table :data="rollCall.gridData">
+        <el-table-column align='center' property="userName" label="学员姓名"></el-table-column>
+        <el-table-column align='center' property="phone" label="手机号"></el-table-column>
+        <el-table-column align='center' property="subjectName" label="学员声部"></el-table-column>
+        <el-table-column align='center' label="到课状态">
+          <template slot-scope="scope">
+            {{ scope.row.status | studentCallName }}
+          </template>
+        </el-table-column>
+        <el-table-column align='center' label="操作" width="220px">
+          <template slot-scope="scope">
+            <el-button size="small" @click="onChangeRollCall('TRUANT', scope.row)" type="primary" round>未到</el-button>
+            <el-button size="small" @click="onChangeRollCall('LEAVE', scope.row)" type="warning" round>请假</el-button>
+            <el-button size="small" @click="onChangeRollCall('NORMAL', scope.row)" type="success" round>到课</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination :total="rollCall.total"
+                  :page.sync="rollCall.page"
+                  :limit.sync="rollCall.limit"
+                  :page-sizes="rollCall.page_size"
+                  @pagination="getCallName" />
+    </el-dialog>
   </div>
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
 import { getSchool } from '@/api/systemManage'
 import { findVipGroupTeachingRecord, getStudyStudents, resetVipClass } from '@/api/vipSeting'
+import { findAttendanceStudentByCourseWithPage, updateStudentAttendances } from '@/api/buildTeam'
+import { permission } from '@/utils/directivePage'
 export default {
   components: { pagination },
   name: 'teacherRecord',
@@ -255,6 +288,15 @@ export default {
         total: 0, // 总条数
         page_size: [10, 20, 40, 50] // 选择限制显示条数
       },
+      rollCall: { // 点名表
+        status: false,
+        gridData: [],
+        selectItem: {}, // 选中状态
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      }
     }
   },
   mounted () {
@@ -315,6 +357,45 @@ export default {
         }
       })
     },
+    onCallName(item) { // 点名表
+      this.rollCall.page = 1
+      this.rollCall.selectItem = item
+      this.getCallName()
+    },
+    getCallName() {
+      let rollCall = this.rollCall
+      let params = {
+        page: rollCall.page,
+        rows: rollCall.limit,
+        courseScheduleId: rollCall.selectItem.id
+      }
+      findAttendanceStudentByCourseWithPage(params).then(res => {
+        let result = res.data
+        rollCall.status = true
+        if(res.code == 200) {
+          rollCall.gridData = result.rows
+          rollCall.total = result.total
+        }
+      })
+    },
+    onChangeRollCall(type, row) {
+      let rollCall = this.rollCall
+      let params = {
+        courseScheduleId: rollCall.selectItem.id,
+        studentAttendances:[{
+            userId: row.studentId,
+            status: type
+        }]
+      }
+      updateStudentAttendances(params).then(res => {
+        if(res.code == 200) {
+          this.$message.success('修改成功')
+          row.status = type
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
     lookStudents (row) {
       let id = row.id;
       getStudyStudents({ courseScheduleId: id }).then(res => {
@@ -324,6 +405,9 @@ export default {
         }
       })
     },
+    permission (str) {
+      return permission(str)
+    },
     handleClose () {
       this.studentList = [];
       this.studentVisible = false;
@@ -386,6 +470,16 @@ export default {
       } else {
         return val
       }
+    },
+    studentCallName: value => {
+      let template = {
+        NORMAL: "到课",
+        TRUANT: "未到",
+        LEAVE: "请假",
+        DROP_OUT: "退学",
+        '': '未到'
+      }
+      return template[value]
     }
   }
 }

+ 2 - 2
vue.config.js

@@ -21,8 +21,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.27:8000' // 箭河
 // let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://admin.dayaedu.com' // 测试服
-// let target = 'http://192.168.3.48:8080' // 乔
+// let target = 'http://admin.dayaedu.com' // 测试服
+let target = 'http://192.168.3.48:8080' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**