浏览代码

1209 18:38

筹备中基础技能班完成
mo 5 年之前
父节点
当前提交
88b38d5830

+ 9 - 0
src/api/buildTeam.js

@@ -743,4 +743,13 @@ export function classGroupUpdate (data) {
     method: 'POST',
     data
   })
+}
+
+//  获取乐团下所有的班级
+export function getMusicGroupAllClass (data) {
+  return request({
+    url: api + `/classGroup/findAllClassGroupByMusicGroup`,
+    method: 'get',
+    params: data
+  })
 }

+ 6 - 2
src/views/teamBuild/teamSeting/components/improvementClass.vue

@@ -26,6 +26,9 @@
                         value-format="yyyy-MM-dd">
         </el-date-picker>
       </el-form-item>
+      <el-form-item label="跳过节假日">
+        <el-checkbox v-model="topForm.holiday"></el-checkbox>
+      </el-form-item>
     </el-form>
     <div class="tableWrap">
       <el-table :data="tableList">
@@ -199,7 +202,8 @@ export default {
       topForm: {
         count: '',
         improventClassesNum: '',
-        timer: ''
+        timer: '',
+        holiday: false
       },
       maskForm: {
         name: '',
@@ -373,6 +377,7 @@ export default {
           for (let i in this.tableList) {
             this.tableList[i].startDate = this.topForm.timer;
             this.tableList[i].courseTimes = this.topForm.count;
+            this.tableList[i].holiday = this.topForm.holiday;
           }
 
           let count = this.tableList.length;
@@ -383,7 +388,6 @@ export default {
           addHighClass(this.tableList).then(res => {
             if (res.code == 200) {
               this.$message.success('恭喜您创建成功')
-
               if (this.permission('/teamSetting/salarySet')) {
                 this.$router.push({ path: '/business/teamDetail' })
               } else {

+ 27 - 8
src/views/teamDetail/components/resetClass.vue

@@ -606,8 +606,10 @@
   </div>
 </template>
 <script>
-import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent, findMusicGroupClassTeacher, revisionClassGroup, revisionAddClassGroup, getEmployeeOrgan, getTeacher, findNoClassSingle, getMusicGroupStuNoClassType, classGroupUpdate } from '@/api/buildTeam'
+import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent, findMusicGroupClassTeacher, revisionClassGroup, revisionAddClassGroup, getEmployeeOrgan, getTeacher, findNoClassSingle, getMusicGroupStuNoClassType, classGroupUpdate, getTeamBaseInfo } from '@/api/buildTeam'
 import { getClassAllStudent, removeStudents, addStudents } from '@/api/studentManager'
+import { queryEmployByOrganId } from '@/api/systemManage'
+
 import axios from 'axios'
 import qs from 'qs'
 export default {
@@ -695,11 +697,32 @@ export default {
         checked: false,
         courseTime: '',
         courseNum: ''
-      }
+      },
+      organId: ''
     }
   },
   created () {
     this.teamid = this.$route.query.id;
+    // 根据乐团id获取乐团所属分部
+    getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        this.organId = res.data.musicGroup.organId
+        getTeacher({ organId: this.organId }).then(res => {
+          if (res.code == 200) {
+            this.cooperationList = res.data;
+            this.teacherList = res.data;
+          }
+        })
+
+        // queryEmployByOrganId({ organId: this.organId, rows: 10000 }).then(res => {
+        //   if (res.code == 200) {
+
+        //   }
+        // })
+
+      }
+    })
+
   },
   mounted () {
     sessionStorage.setItem('resetCode', 3)
@@ -746,12 +769,8 @@ export default {
     //   }
     // })
     // 获取分部所有老师
-    getTeacher().then(res => {
-      if (res.code == 200) {
-        this.cooperationList = res.data;
-        this.teacherList = res.data;
-      }
-    })
+    // 助教是从员工表里选
+
   },
   methods: {
     recourse (row) {

+ 79 - 14
src/views/teamDetail/components/studentList.vue

@@ -180,7 +180,8 @@
                   @pagination="getList" />
     </div>
     <el-dialog title="学员基本信息"
-               width="640px" class="studentInfo"
+               width="640px"
+               class="studentInfo"
                :visible.sync="addStudentVisible">
       <el-form :model="maskForm"
                label-position="right"
@@ -274,21 +275,45 @@
             </el-date-picker>
           </el-col>
         </el-form-item>
-
-        <el-form-item label="单技课班级"
-                      prop="signClass">
+        <el-form-item label="声部费用"
+                      prop="courseFee">
+          <el-input v-model="maskForm.courseFee"
+                    placeholder="请输入声部费用"></el-input>
+        </el-form-item>
+        <br>
+        <el-form-item label="单技班">
           <el-select v-model="maskForm.signClass">
             <el-option v-for="(item,index) in signList"
                        :key="index"
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
 
-        <el-form-item label="声部费用"
-                      prop="courseFee">
-          <el-input v-model="maskForm.courseFee"
-                    placeholder="请输入声部费用"></el-input>
+        </el-form-item>
+        <el-form-item label="合奏班">
+          <el-select v-model="maskForm.mixClass">
+            <el-option v-for="(item,index) in mixList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.name"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="基础技能班">
+          <el-select v-model="maskForm.highClass">
+            <el-option v-for="(item,index) in highList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.name"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="临时班">
+          <el-select v-model="maskForm.snapClass"
+                     multiple>
+            <el-option v-for="(item,index) in snapList"
+                       :key="index"
+                       :value="item.id"
+                       :label="item.name"></el-option>
+          </el-select>
         </el-form-item>
 
         <el-divider>订单信息</el-divider>
@@ -413,7 +438,7 @@
   </div>
 </template>
 <script>
-import { getTeamStudentList, getTeamStudentInfo, getSingleClass, findSound, StudentQuit, findSubjectPlan, getGoods } from '@/api/buildTeam'
+import { getTeamStudentList, getTeamStudentInfo, getSingleClass, findSound, StudentQuit, findSubjectPlan, getGoods, getSubject, getMusicGroupAllClass } from '@/api/buildTeam'
 import { addStudent, getStudentClass, getStudentInfoByPhone } from '@/api/studentManager'
 import pagination from '@/components/Pagination/index'
 export default {
@@ -465,6 +490,9 @@ export default {
         studying: ''
       },
       signList: [],
+      mixList: [],
+      highList: [],
+      snapList: [],
       soundList: [],
       maskForm: {
         studentName: '',
@@ -475,6 +503,9 @@ export default {
         sound: '',
         timer: '',
         signClass: '',
+        mixClass: '',
+        highClass: '',
+        snapClass: [],
         // price: '',
         startClass: '',
         id: '',
@@ -540,15 +571,36 @@ export default {
         this.soundList = res.data;
       }
     })
+
+    // getSubject().then(res => {
+    //   if (res.code == 200) {
+    //     this.soundList = res.data;
+    //   }
+    // })
     // 获取乐团所有单技课班
-    getSingleClass({ musicGroupId: this.teamid }).then(res => {
+    // getSingleClass({ musicGroupId: this.teamid }).then(res => {
+    //   if (res.code == 200) {
+    //     this.signList = res.data;
+    //   }
+    // })
+    // 获取乐团所有合奏课
+    getMusicGroupAllClass({ musicGroupId: this.teamid }).then(res => {
       if (res.code == 200) {
-        this.signList = res.data;
+        res.data.forEach(item => {
+          if (item.type == 'NORMAL') {
+            this.signList.push(item);
+          } else if (item.type == 'MIX') {
+            this.mixList.push(item);
+          } else if (item.type == 'HIGH') {
+            this.highList.push(item)
+          } else if (item.type == 'SNAP') {
+            this.snapList.push(item);
+          }
+        })
       }
     })
 
 
-
   },
   methods: {
     getList () {
@@ -614,8 +666,22 @@ export default {
       this.$refs['maskForm'].validate(res => {
         if (res) {
           // this.maskForm.parentName.timer  少个生日的字段
+          // classGroupId: maskForm.signClass
+          /**  <!--  signClass: '',
+        mixClass: '',
+        highClass: '',
+        snapClass: [], --> */
+
           let maskForm = this.maskForm
+          if (!maskForm.signClass && !maskForm.mixClassId) {
+            this.$message.error('必须加入一个单机班或合奏班')
+            return;
+          }
           let params = {
+            signClassId: maskForm.signClass,
+            mixClassId: maskForm.mixClass,
+            snapClassIds: maskForm.snapClass.join(','),
+            highClassId: maskForm.highClass,
             courseFee: maskForm.courseFee,
             temporaryCourseFee: maskForm.temporaryCourseFee,
             studentRegistration: {
@@ -627,7 +693,6 @@ export default {
               currentClass: maskForm.course,
               subjectId: maskForm.sound,
               musicGroupId: this.teamid,
-              classGroupId: maskForm.signClass
             }
           }
           params.studentPaymentOrderDetails = []

+ 2 - 2
vue.config.js

@@ -17,8 +17,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // http://47.99.212.176:8000 
 // // 
 // let target = 'http://testadm.dayaedu.com/' //勇哥迁库
-// let target = 'http://192.168.3.27:8000' // 箭河
-let target = 'http://192.168.3.28:8000' //邹璇
+let target = 'http://192.168.3.27:8000' // 箭河
+// let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:18000' //勇哥
 // let target = 'http://47.99.212.176:8000' // 测试服
 // let target = 'http://192.168.3.48:8080' // 乔