Browse Source

05/13 16:40

提交测试
mo 5 years ago
parent
commit
cdd49a3f9b

+ 5 - 4
src/utils/searchArray.js

@@ -5,6 +5,7 @@ const courseType = [
   { label: "单技课", value: "SINGLE" },
   { label: "合奏课", value: "MIX" },
   { label: "基础技能课", value: "HIGH" },
+  { label: "基础技能课(线上)", value: "HIGH_ONLINE" },
   { label: "vip课", value: "VIP" },
   { label: "试听课", value: "DEMO" },
   { label: "综合课", value: "COMPREHENSIVE" },
@@ -19,7 +20,7 @@ const courseListType = [
   { label: "乐团课", value: "MUSIC" },
   { label: "VIP课", value: "VIP" },
   { label: "网管课", value: "PRACTICE" },
-  
+
 ]
 
 // 考勤状态
@@ -59,9 +60,9 @@ const orderStatus = [
   { value: "SMALL_CLASS_TO_BUY", label: "VIP购买" },
   { value: "SPORADIC", label: "零星收费" },
   { value: "LUCK", label: "福袋活动" },
-  { value: "PRACTICE_GROUP_BUY", label: "网管课" }, 
-  {value:'PRACTICE_GROUP_RENEW',label:'网管课续费'}
-  
+  { value: "PRACTICE_GROUP_BUY", label: "网管课" },
+  { value: 'PRACTICE_GROUP_RENEW', label: '网管课续费' }
+
 ]
 
 // 交易状态

+ 8 - 3
src/views/resetTeaming/index.vue

@@ -2,7 +2,7 @@
   <div class="m-container">
     <h2>
       <el-page-header @back="onCancel"
-                      content="乐团修改"></el-page-header>
+                      :content="name"></el-page-header>
 
     </h2>
     <div class="m-core">
@@ -13,7 +13,8 @@
         <el-tab-pane label="基本信息"
                      v-if="permission('/resetTeaming/teamBaseInfo')"
                      name="1">
-          <teamBaseInfo v-if="activeIndex == 1" />
+          <teamBaseInfo v-if="activeIndex == 1"
+                        @getName='getName' />
         </el-tab-pane>
         <el-tab-pane label="缴费调整"
                      v-if="permission('/resetTeaming/resetSound')"
@@ -63,7 +64,8 @@ export default {
       //   coursePlan: true,
       // }
       Fsearch: null,
-      Frules: null
+      Frules: null,
+      name: null
     }
   },
   created () {
@@ -100,6 +102,9 @@ export default {
     },
     permission (str) {
       return permission(str)
+    },
+    getName (val) {
+      this.name = val
     }
   },
 }

+ 18 - 7
src/views/teamBuild/components/teamBaseInfo.vue

@@ -98,10 +98,10 @@
                      :disabled="!topFrom.section"
                      filterable
                      clearable>
-            <el-option v-for="(item,index) in orgianList"
+            <el-option v-for="(item,index) in technician"
                        :key="index"
-                       :label="item.realName"
-                       :value="item.id"></el-option>
+                       :label="item.userName"
+                       :value="item.userId"></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="报名截止时间"
@@ -386,6 +386,8 @@ import {
   resetTeamBaseInfo,
   getEmployeeOrgan
 } from "@/api/buildTeam";
+import { findTechnician } from "@/api/repairManager";
+
 import {
   queryEmployByOrganId,
   queryByOrganId,
@@ -480,7 +482,8 @@ export default {
       teamid: "",
       teamStatus: "",
       orgianList: [],
-      isInit: false
+      isInit: false,
+      technician: []
     };
 
   },
@@ -492,9 +495,9 @@ export default {
 
   },
   mounted () {
-    if (!this.isInit) {
-      this.init();
-    }
+
+    this.init();
+
     // 获取分部下的员工
   },
   methods: {
@@ -520,6 +523,7 @@ export default {
           if (res.code == 200) {
             // 头部
             this.topFrom.name = res.data.musicGroup.name;
+            this.$emit('getName', this.topFrom.name)
             this.topFrom.time = res.data.musicGroup.applyExpireDate;
             this.topFrom.type = res.data.musicGroup.chargeTypeId;
             this.topFrom.startClass = res.data.musicGroup.enrollClasses.split(
@@ -595,6 +599,13 @@ export default {
                   this.isInit = false;
                 }
               });
+
+              // 获取维修技师
+              findTechnician().then(res => {
+                if (res.code == 200) {
+                  this.technician = res.data;
+                }
+              })
             }
           }
         });

+ 61 - 44
src/views/teamBuild/signupList.vue

@@ -72,7 +72,8 @@
         </el-form-item>
         <!-- 专业actualSubjectId 调剂isAllowAdjust 手机号name -->
         <el-form-item>
-          <el-button type='danger' @click='search'>搜索</el-button>
+          <el-button type='danger'
+                     @click='search'>搜索</el-button>
           <el-button type='primary'
                      @click="onReset">重置</el-button>
         </el-form-item>
@@ -108,7 +109,8 @@
                            align='center'>
           </el-table-column>
         </el-table>
-        <div class="btnWrap" v-permission="'musicGroup/updateExpectedStudentNum'"
+        <div class="btnWrap"
+             v-permission="'musicGroup/updateExpectedStudentNum'"
              style="margin-right:20px; margin-top:20px;">
           <el-button v-if="!isEdit"
                      @click="isEdit = true">编辑</el-button>
@@ -487,12 +489,7 @@ export default {
           this.applyExpireDate = res.data.musicGroup.applyExpireDate;
         }
       })
-      // 根据乐团id获取学团情况
-      getintoClass({ musicGroupId: this.id }).then(res => {
-        if (res.code == 200) {
-          this.leftList = res.data;
-        }
-      })
+
       // 根据乐团id获乐团声部
       findSound({ musicGroupId: this.id }).then(res => {
         if (res.code == 200) {
@@ -506,7 +503,7 @@ export default {
       this.rules.page = 1;
       this.getList();
     },
-    onReset() {
+    onReset () {
       this.rules.page = 1
       this.rules.limit = 10
       this.searchFrom = {
@@ -548,6 +545,12 @@ export default {
           this.rules.total = res.data.total
         }
       })
+      // 根据乐团id获取学团情况
+      getintoClass({ musicGroupId: this.id }).then(res => {
+        if (res.code == 200) {
+          this.leftList = res.data;
+        }
+      })
     },
     onStartPayment (formName) { // 开启缴费
       this.$refs[formName].validate((valid) => {
@@ -613,41 +616,41 @@ export default {
     },
     onCreateQRCode () { // 生成报名二维码
       this.qrcodeStatus = true
-      let id = this.$route.query.id
+      let id = this.id
+
       let teamName = this.$route.query.name
-      if (this.qrcodes) {
-        this.qrcodes = false
-        setTimeout(() => {
-          this.qrcode = new QRCode('qrcode', {
-            width: 200,
-            height: 200,
-            colorDark: '#000000',
-            colorLight: '#ffffff',
-            correctLevel: QRCode.CorrectLevel.H
-          })
-          this.qrcode.makeCode(vaildStudentUrl() + '/#/login?musicGroupId=' + id)
-          this.codeUrl = vaildStudentUrl() + '/#/login?musicGroupId=' + id
-        }, 500)
-      }
+      setTimeout(() => {
+        document.getElementById('qrcode').innerHTML = '';
+        this.qrcode = new QRCode('qrcode', {
+          width: 200,
+          height: 200,
+          colorDark: '#000000',
+          colorLight: '#ffffff',
+          correctLevel: QRCode.CorrectLevel.H
+        })
+        this.qrcode.makeCode(vaildStudentUrl() + '/#/login?musicGroupId=' + id)
+        this.codeUrl = vaildStudentUrl() + '/#/login?musicGroupId=' + id
+      }, 500)
     },
     onCreateQRCode2 () { // 生成报名二维码
       this.qrcodeStatus2 = true
-      let id = this.$route.query.id
+      let id = this.id
+
       let teamName = this.$route.query.name
-      if (this.qrcodes2) {
-        this.qrcodes2 = false
-        setTimeout(() => {
-          this.qrcode2 = new QRCode('qrcode2', {
-            width: 200,
-            height: 200,
-            colorDark: '#000000',
-            colorLight: '#ffffff',
-            correctLevel: QRCode.CorrectLevel.H
-          })
-          this.qrcode2.makeCode(vaildTeacherUrl() + '/#/order?musicGroupId=' + id + '&musicGroupName=' + teamName)
-          this.codeUrl2 = vaildTeacherUrl() + '/#/order?musicGroupId=' + id + '&musicGroupName=' + teamName
-        }, 500)
-      }
+
+      setTimeout(() => {
+        document.getElementById('qrcode2').innerHTML = '';
+        this.qrcode2 = new QRCode('qrcode2', {
+          width: 200,
+          height: 200,
+          colorDark: '#000000',
+          colorLight: '#ffffff',
+          correctLevel: QRCode.CorrectLevel.H
+        })
+        this.qrcode2.makeCode(vaildTeacherUrl() + '/#/order?musicGroupId=' + id + '&musicGroupName=' + teamName)
+        this.codeUrl2 = vaildTeacherUrl() + '/#/order?musicGroupId=' + id + '&musicGroupName=' + teamName
+      }, 500)
+
     },
     onDownLoadExecl () { // 报表导出
       let url = '/api-web/studentRegistration/queryStudentApplyDetailExport'
@@ -677,11 +680,11 @@ export default {
             type: 'application/vnd.ms-excel;charset=utf-8'
             //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
           })
-          
+
           let text = (new Response(blob)).text()
           text.then(res => {
             // 判断是否报错
-            if(res.indexOf('code') != -1) {
+            if (res.indexOf('code') != -1) {
               let json = JSON.parse(res)
               this.$message.error(json.msg)
             } else {
@@ -698,9 +701,9 @@ export default {
           })
           load.endLoading();
         }).catch(error => {
-            this.$message.error('导出数据失败,请连接管理员');
-            load.endLoading();
-          })
+          this.$message.error('导出数据失败,请连接管理员');
+          load.endLoading();
+        })
       }).catch(() => { })
     },
     onGoHome () { // 确认开团
@@ -866,6 +869,17 @@ export default {
           othersPrice: ''
         }
       }
+    },
+    qrcodeStatus (val) {
+      console.log('报名')
+      if (!val) {
+        this.qrcode.clear()
+      }
+    },
+    qrcodeStatus2 (val) {
+      if (!val) {
+        this.qrcode2.clear()
+      }
     }
   }
 }
@@ -987,6 +1001,9 @@ export default {
   }
 
   .qrcode {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
     img {
       width: 200px;
       height: 200px;

+ 62 - 31
src/views/teamBuild/teamSeting/components/lookCourse.vue

@@ -1,17 +1,17 @@
 <template>
   <div>
     <el-form :inline="true">
-      <el-form-item>
+      <!-- <el-form-item>
         <div class="newBand"
              @click="gotoPlan">新增</div>
-      </el-form-item>
-      <el-form-item label="选择合奏班">
-        <el-select v-model.trim="chioseMix"
+      </el-form-item> -->
+      <el-form-item label="课程类型">
+        <el-select v-model.trim="classScheduleType"
                    @change="chioseList">
-          <el-option v-for='(item,index) in maxClassList'
+          <el-option v-for='(item,index) in courseType'
                      :key="index"
-                     :value="item.id"
-                     :label="item.name"></el-option>
+                     :value="item.value"
+                     :label="item.label"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -31,13 +31,22 @@
           </div>
         </template>
       </el-table-column>
+      <el-table-column label="上课时间"
+                       align="center"
+                       width="180">
+        <template slot-scope="scope">
+          <div>
+            {{ scope.row.startClassTimeStr+ '-'+ scope.row.endClassTimeStr}}
+          </div>
+        </template>
+      </el-table-column>
       </el-table-column>
       <el-table-column label="课程类型"
                        align="center"
                        width="180">
         <template slot-scope="scope">
           <div>
-            {{scope.row.type |coursesType }}
+            {{scope.row.courseScheduleType |coursesType }}
           </div>
         </template>
       </el-table-column>
@@ -45,11 +54,11 @@
                        align="center"
                        label="班级名称">
       </el-table-column>
-      <el-table-column prop="name"
+      <!-- <el-table-column prop="classGroupName"
                        align="center"
                        label="课程名称">
-      </el-table-column>
-      <el-table-column label="上课时间"
+      </el-table-column> -->
+      <!-- <el-table-column label="上课时间"
                        align="left"
                        width="180">
         <template slot-scope="scope">
@@ -57,10 +66,18 @@
             {{ scope.row.startClassTimeStr+ '-'+ scope.row.endClassTimeStr}}
           </div>
         </template>
+      </el-table-column> -->
+      <el-table-column>
       </el-table-column>
       <el-table-column>
       </el-table-column>
+
     </el-table>
+    <pagination :total="rules.total"
+                :page.sync="rules.page"
+                :limit.sync="rules.limit"
+                :page-sizes="rules.page_size"
+                @pagination="getList" />
     <div class="btnWrap">
       <div class="setBtn"
            @click="gotoNext">下一步</div>
@@ -68,7 +85,8 @@
   </div>
 </template>
 <script>
-import { getAllClass, getClassCOurse, deteleAllCourse } from '@/api/buildTeam'
+import { deteleAllCourse, getCourseSchedule } from '@/api/buildTeam'
+import pagination from "@/components/Pagination/index";
 export default {
   name: 'lookCourse',
   props: {
@@ -77,12 +95,30 @@ export default {
       required: true
     }
   },
+  components: { pagination },
   data () {
     return {
       teamid: '',
       maxClassList: [],
-      chioseMix: '',
-      tableList: []
+      classScheduleType: null,
+      tableList: [],
+      courseType: [
+        { label: "单技课", value: "SINGLE" },
+        { label: "合奏课", value: "MIX" },
+        { label: "基础技能课", value: "HIGH" },
+        { label: "基础技能课(线上)", value: "HIGH_ONLINE" },
+        { label: "综合课", value: "COMPREHENSIVE" },
+        { label: "集训单技课", value: "TRAINING_SINGLE" },
+        { label: "集训合奏课", value: "TRAINING_MIX" },
+        { label: "课堂课", value: "CLASSROOM" },
+      ],
+      rules: {
+        // 分页规则
+        limit: 10, // 限制显示条数
+        page: 1, // 当前页
+        total: 0, // 总条数
+        page_size: [10, 20, 40, 50] // 选择限制显示条数
+      },
     }
   }, mounted () {
     this.init()
@@ -94,16 +130,14 @@ export default {
       sessionStorage.setItem('setStep', 2)
       sessionStorage.setItem('resetCode', 4)
       this.teamid = this.$route.query.id;
-      getAllClass({ musicGroupId: this.teamid }).then(res => {
-        if (res.code == 200 && res.data.length > 0) {
-          this.maxClassList = res.data;
-          this.chioseMix = this.maxClassList[0].id;
-          // 发请求获取数据
-          getClassCOurse({ classGroupId: this.chioseMix }).then(res => {
-            if (res.code == 200) {
-              this.tableList = res.data;
-            }
-          })
+      this.getList()
+    },
+    getList () {
+      // musicGroupId: this.teamid,
+      getCourseSchedule({ classScheduleType: this.classScheduleType, musicGroupId: this.teamid, rows: this.rules.limit }).then(res => {
+        if (res.code == 200) {
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total;
         }
       })
     },
@@ -125,11 +159,8 @@ export default {
 
     },
     chioseList (val) {
-      getClassCOurse({ classGroupId: val }).then(res => {
-        if (res.code == 200) {
-          this.tableList = res.data;
-        }
-      })
+      this.classScheduleType = val;
+      this.getList();
     },
     // 删除乐团所有未上课程
     removeAllCourse () {
@@ -137,7 +168,7 @@ export default {
         this.$message.error('课酬确认后无法编辑')
         return;
       }
-      this.$confirm('是否清除课程?', '提示', {
+      this.$confirm('是否清除所有课程?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
@@ -145,7 +176,7 @@ export default {
         deteleAllCourse({ musicGroupId: this.teamid }).then(res => {
           if (res.code == 200) {
             this.$message.success('删除成功');
-            this.chioseList(this.maxClassList[0].id)
+            this.getList();
           }
         })
 

+ 43 - 27
src/views/teamBuild/teamSeting/components/setClassV2.vue

@@ -19,9 +19,11 @@
     </el-form>
     <div class="buttonWrap">
       <div class="newBand"
-           @click="newClass">新建班级</div>
+           @click="newClass"
+           v-permission="'classGroup/create'">新建班级</div>
       <div class="newBand"
-           @click="arrangeStart">批量排课</div>
+           @click="arrangeStart"
+           v-permission="'courseSchedule/batchAddCourseSchedule'">批量排课</div>
       <!-- <div class="newBand">删除排课</div> -->
       <!-- <p class="expectMsg">基础技能班参考数量: 线上:XX/线下:XX</p> -->
     </div>
@@ -74,10 +76,12 @@
           <template slot-scope="scope">
             <div>
               <el-button type="text"
+                         v-permission="'classGroup/classGroupUpdate'"
                          @click="classAdjustment(scope.row)">班级调整</el-button>
               <el-popover placement="top"
                           width="160"
-                          :ref="scope.$index">
+                          :ref="scope.$index"
+                          v-permission="'classGroup/delSingle'">
                 <p>确定删除?</p>
                 <div style="text-align: right; margin: 0">
                   <el-button size="mini"
@@ -92,6 +96,7 @@
                            slot="reference">删除班级</el-button>
               </el-popover>
               <el-button type="text"
+                         v-permission="'classGroupStudent/findAllStudent'"
                          v-if="scope.row.type
                          !='HIGHT'
                          &&scope.row.type
@@ -127,8 +132,7 @@
                       prop="type">
           <el-select v-model.trim="newClassForm.type"
                      clearable
-                     filterable
-                     @change="changeClass">
+                     filterable>
             <el-option v-for="(item,index) in classTypeList"
                        :key="index"
                        :label="item.label"
@@ -142,8 +146,7 @@
           <el-select v-model.trim="newClassForm.subjectIdList"
                      clearable
                      filterable
-                     multiple
-                     @change="changeClass">
+                     multiple>
             <el-option v-for="(item,index) in soundList"
                        :key="index"
                        :label="item.name"
@@ -182,18 +185,17 @@
           </el-select>
         </el-form-item>
         <el-form-item label="助教老师"
-                      prop="teaching"
-                      <el-select
-                      placeholder="请选择助教老师"
-                      v-model="newClassForm.teaching"
-                      @change="setAssistant1"
-                      clearable
-                      multiple
-                      filterable>
-          <el-option v-for="(item,index) in teacherList"
-                     :label="item.realName"
-                     :value="item.id"
-                     :key="index"></el-option>
+                      prop="teaching">
+          <el-select placeholder="请选择助教老师"
+                     v-model="newClassForm.teaching"
+                     @change="setAssistant1"
+                     clearable
+                     multiple
+                     filterable>
+            <el-option v-for="(item,index) in teacherList"
+                       :label="item.realName"
+                       :value="item.id"
+                       :key="index"></el-option>
           </el-select>
         </el-form-item>
       </el-form>
@@ -606,7 +608,7 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
-import { getTeacher, getEmployeeOrgan, getMusicGroupClass, createClass, getSoundTree, findSound, getMusicGroupStuNoClassType, classGroupUpdate, removeSingleClass, workOut } from "@/api/buildTeam";
+import { getTeacher, getEmployeeOrgan, getMusicGroupClass, createClass, findSound, getMusicGroupStuNoClassType, classGroupUpdate, removeSingleClass, workOut } from "@/api/buildTeam";
 import {
   getClassAllStudent,
   removeStudents,
@@ -636,7 +638,7 @@ export default {
       },
       soundList: [],
       teacherList: [],
-      organList: [],
+
       tableList: [],
       classTypeList: [
         { value: "NORMAL", label: "单技班" },
@@ -730,11 +732,6 @@ export default {
         this.cooperationList = res.data;
       }
     });
-    getEmployeeOrgan().then(res => {
-      if (res.code == 200) {
-        this.organList = res.data;
-      }
-    });
     // 获取声部
     findSound({ musicGroupId: this.teamid }).then(res => {
       if (res.code == 200) {
@@ -764,11 +761,14 @@ export default {
         }
       })
     },
-    changeClass () { },
     changeClassGetList (val) {
       this.getList()
     },
     newClass () {
+      if (this.isSetSalary) {
+        this.$message.error('课酬确认后无法编辑')
+        return;
+      }
       this.newClassVisible = true;
     },
     newClassSecond () {
@@ -959,6 +959,10 @@ export default {
       })
     },
     classAdjustment (row) {
+      if (this.isSetSalary) {
+        this.$message.error('课酬确认后无法编辑')
+        return;
+      }
       this.activeType = row.type;
       this.activeClass = row.id;
       // this.activeListStudent = row.subjectIdList.split(',')
@@ -1026,6 +1030,10 @@ export default {
     },
     // 删除班级
     removeClass (scope) {
+      if (this.isSetSalary) {
+        this.$message.error('课酬确认后无法编辑')
+        return;
+      }
       removeSingleClass({ classGroupId: scope.row.id })
         .then(res => {
           if (res.code == 200) {
@@ -1196,6 +1204,10 @@ export default {
       });
     },
     resetClass (row) {
+      if (this.isSetSalary) {
+        this.$message.error('课酬确认后无法编辑')
+        return;
+      }
       this.isNewClass = false;
       this.className = row.name;
       this.studentVisible = true;
@@ -1215,6 +1227,10 @@ export default {
     },
     // 排课开始
     arrangeStart () {
+      if (this.isSetSalary) {
+        this.$message.error('课酬确认后无法编辑')
+        return;
+      }
       if (this.chioseTab.length < 1) {
         this.$message.error('请至少选择一个班级')
         return;