فهرست منبع

Merge branch 'ol_12_30' into wxl_01_15

lex-xin 4 سال پیش
والد
کامیت
bc48774f1c
42فایلهای تغییر یافته به همراه1606 افزوده شده و 317 حذف شده
  1. 2 0
      debug.log
  2. 29 0
      src/api/buildTeam.js
  3. 9 1
      src/api/repairManager.js
  4. 15 2
      src/components/remote-search/index.vue
  5. 3 0
      src/components/save-form/index.vue
  6. 3 1
      src/constant/index.js
  7. 2 0
      src/router/index.js
  8. 9 8
      src/store/modules/selects.js
  9. 2 1
      src/utils/request.js
  10. 8 0
      src/views/HumanResources/index.vue
  11. 1 0
      src/views/adapayAccount/index.vue
  12. 16 2
      src/views/businessManager/orderManager/financeManager.vue
  13. 1 1
      src/views/recodeManager/recodeList.vue
  14. 2 2
      src/views/repairManager/repairList.vue
  15. 1 1
      src/views/resetTeaming/components/resetPayList.vue
  16. 1 1
      src/views/resetTeaming/components/strudentPayInfo.vue
  17. 154 0
      src/views/resetTeaming/modals/extra-class-user.vue
  18. 2 1
      src/views/resetTeaming/modals/payment-cycle.vue
  19. 34 0
      src/views/resetTeaming/modals/review-detail.vue
  20. 40 5
      src/views/resetTeaming/modals/user-pay-form.vue
  21. 1 1
      src/views/studentManager/components/studentVip.vue
  22. 4 2
      src/views/studentManager/studentList.vue
  23. 7 0
      src/views/teamBuild/api.js
  24. 4 2
      src/views/teamBuild/components/merge-music.vue
  25. 2 0
      src/views/teamBuild/components/select-item.vue
  26. 35 16
      src/views/teamBuild/modals/close-studens.vue
  27. 7 1
      src/views/teamBuild/signupList.vue
  28. 3 3
      src/views/teamBuild/teamSeting/components/setClassV2.vue
  29. 258 0
      src/views/teamDetail/componentClass/calenderStudentList.vue
  30. 336 0
      src/views/teamDetail/componentClass/classCompound.vue
  31. 106 0
      src/views/teamDetail/componentClass/student-list.vue
  32. 2 2
      src/views/teamDetail/componentCourse/gpsLocation.vue
  33. 175 138
      src/views/teamDetail/components/modals/class-pay-list.vue
  34. 21 25
      src/views/teamDetail/components/modals/classList-group.vue
  35. 1 1
      src/views/teamDetail/components/modals/classList-item.vue
  36. 7 13
      src/views/teamDetail/components/modals/classroom-setting.vue
  37. 1 1
      src/views/teamDetail/components/modals/school-location.vue
  38. 4 4
      src/views/teamDetail/components/modals/student-reset-view.vue
  39. 18 4
      src/views/teamDetail/components/modals/view-student-list.vue
  40. 109 59
      src/views/teamDetail/components/resetClass.vue
  41. 8 1
      src/views/teamDetail/components/studentList.vue
  42. 163 18
      src/views/teamDetail/teamClassList.vue

+ 2 - 0
debug.log

@@ -16,3 +16,5 @@
 [0107/093708.765:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [0108/093931.571:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
 [0111/093600.762:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
+[0112/094119.970:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)
+[0114/100435.220:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

+ 29 - 0
src/api/buildTeam.js

@@ -1450,4 +1450,33 @@ export function getOrganCourseDurationSettings (data) {
   })
 }
 
+// 获取分部所有乐团班级
+export function getClassGroupPage(data) {
+  return request2({
+    url: api + `/classGroup/queryClassGroupPage`,
+    method: 'get',
+    params:data,
+    data:{}
+  })
+}
+
+// 获取合班学员缴费金额
+export function getStudentPaymentCalenders(data) {
+  return request2({
+    url: api + `/classGroup/queryStudentPaymentCalenders`,
+    method: 'post',
+    params:{},
+    data:data
+  })
+}
 
+// 跨团合并班级
+
+export function spanGroupMergeClassSplitClassAffirm(data) {
+  return request2({
+    url: api + `/classGroup/spanGroupMergeClassSplitClassAffirm`,
+    method: 'post',
+    params:{},
+    data:data
+  })
+}

+ 9 - 1
src/api/repairManager.js

@@ -10,6 +10,14 @@ export function findTechnician (data) {
   })
 }
 
+export function findAllTechnician (data) {
+  return request({
+    url: api + '/employee/findAllTechnician',
+    method: 'get',
+    params: data
+  })
+}
+
 // studentRepair/queryPage
 export function studentRepairList (data) {
   return request({
@@ -26,4 +34,4 @@ export function repairSuccess (data) {
     method: 'post',
     data: qs.stringify(data)
   })
-}
+}

+ 15 - 2
src/components/remote-search/index.vue

@@ -49,6 +49,7 @@ export default {
     // this.getList();
     this.getOptions()
 
+
   },
   methods: {
     async getList() {
@@ -59,10 +60,13 @@ export default {
         data[item.userId] = item
       }
       this.listById = data
+
       this.options =
         this.list.length <= this.constant
           ? this.list
           : slice(this.list, 0, this.constant);
+
+            //  console.log(this.options)
     },
     remoteMethod(query) {
       // throttle
@@ -73,22 +77,29 @@ export default {
         let flag;
         this.options = this.list.filter((item) => {
           flag =
-            item.userName.toLowerCase().indexOf(query.toLowerCase()) > -1 ||
+            item.userName.toLowerCase().indexOf(query.toString().toLowerCase()) > -1 ||
             item.userId == query;
           if (this.multiple) {
             return flag || this.value.includes(item.userId);
           } else {
+            // console.log(query,this.value)
             return flag || item.userId == this.value;
           }
         });
       } else {
-          await this.getList()
+          try{
+             await this.getList()
           const optionids = this.options.map(item => item.userId)
+
           const valueItem = this.listById[this.value]
           if (!optionids.includes(this.value) && valueItem) {
             this.options.push(valueItem)
             this.options = uniqBy(this.options, 'userId')
           }
+          }catch(e){
+            // console.log(e)
+          }
+
       }
     },
     changeValue(val) {
@@ -117,6 +128,8 @@ export default {
         } else {
           if (val && this.isFirst) {
             this.getOptions('')
+          }else{
+             this.getOptions(val)
           }
         }
       },

+ 3 - 0
src/components/save-form/index.vue

@@ -89,6 +89,9 @@ export default {
   /deep/ .el-input__inner{
     width: 180px;
   }
+  /deep/.el-date-editor.el-input{
+    width: 180px;
+  }
   /deep/ .el-form-item__content .el-col {
     width: 180px;
   }

+ 3 - 1
src/constant/index.js

@@ -82,6 +82,7 @@ export const userPaymentType = {
   ADD_COURSE: '临时加课',
   MUSIC_APPLY: '乐团报名',
   MUSIC_RENEW: '乐团续费',
+  SPAN_GROUP_CLASS_ADJUST: '跨团合班',
 }
 
 export const payStatus = {
@@ -111,7 +112,8 @@ export const auditPaymentType = {
   ADD_STUDENT: '新增学员',
   ADD_COURSE: '临时加课',
   MUSIC_APPLY: '乐团报名',
-  MUSIC_RENEW: '乐团续费'
+  MUSIC_RENEW: '乐团续费',
+  SPAN_GROUP_CLASS_ADJUST: '跨团合班',
 }
 
 export const orderServerType = {

+ 2 - 0
src/router/index.js

@@ -186,6 +186,8 @@ export const asyncRoutes = {
   income: () => import('@/views/businessManager/orderManager/income'),
   incomeOne: () => import('@/views/businessManager/orderManager/incomeOne'),
   incomeTwo: () => import('@/views/businessManager/orderManager/incomeTwo'),
+  // 财务管理(含陶气)
+  'financeManager-taoqi': () => import('@/views/businessManager/orderManager/financeManager'),
   // 财务管理
   financeManager: () => import('@/views/businessManager/orderManager/financeManager'),
   // 充值列表

+ 9 - 8
src/store/modules/selects.js

@@ -64,7 +64,7 @@ export default {
       if ((!state.branchs.length || force === true) && !loadings.commit_branchs) {
         loadings.commit_branchs = true
         try {
-          state.branchsLoading = true
+          state.branchsLoading = getEmployeeOrgan()
           const res = await getEmployeeOrgan()
           commit('commit_branchs', res.data)
         } catch (error) { }
@@ -73,7 +73,7 @@ export default {
     },
     async setSubjects ({ commit, state }, force) {
       if ((!state.subjects.length || force === true) && !loadings.commit_subjects) {
-        loadings.commit_subjects = true
+        loadings.commit_subjects = getSubject({rows: 9999, tenantId: '1'})
         try {
           state.subjectsLoading = true
           const res = await getSubject({rows: 9999, tenantId: '1'})
@@ -84,7 +84,7 @@ export default {
     },
     async setTeachers ({ commit, state }, force) {
       if ((!state.teachers.length || force === true) && !loadings.commit_teachers) {
-        loadings.commit_teachers = true
+        loadings.commit_teachers = getTeacher()
         try {
           state.teachersLoading =true
           const res = await getTeacher()
@@ -95,18 +95,19 @@ export default {
     },
     async setSchools ({ commit, state }, force) {
       if ((!state.schools.length || force === true) && !loadings.commit_schools) {
-        loadings.commit_schools = true
+        loadings.commit_schools = getSchool()
         try {
           state.schoolsLoading = true
-          const res = await getSchool()
+          const res = await loadings.commit_schools
           commit('commit_schools', res.data)
         } catch (error) { }
         loadings.commit_schools = false
       }
+      return loadings.commit_schools
     },
     async setVipGroupCategory ({ commit, state }, force) {
       if ((!state.vipGroupCategory.length || force === true) && !loadings.commit_vip_group_category) {
-        loadings.commit_vip_group_category = true
+        loadings.commit_vip_group_category = vipGroupCategory()
         try {
           state.vipGroupCategoryLoading = true
           const res = await vipGroupCategory()
@@ -117,7 +118,7 @@ export default {
     },
     async setEducations({commit,state},force){
       if ((!state.educations.length || force === true) && !loadings.commit_educations) {
-        loadings.commit_educations = true
+        loadings.commit_educations = findEducationUsers()
         try {
           const res = await findEducationUsers()
           commit('commit_educations', res.data)
@@ -127,7 +128,7 @@ export default {
     },
     async setTechnician({commit,state},force){
       if ((!state.technician.length || force === true) && !loadings.commit_technician) {
-        loadings.commit_technician = true
+        loadings.commit_technician = findTechnician()
         try {
           const res = await findTechnician()
           commit('commit_technician', res.data)

+ 2 - 1
src/utils/request.js

@@ -92,7 +92,7 @@ service.interceptors.request.use(
     // do something before request is sent
     showFullScreenLoading()
     if (store.getters.token) {
-      // let each request carry token 
+      // let each request carry token
       // ['X-Token'] is a custom headers key
       // please modify it according to the actual situation
       config.headers['Authorization'] = getToken()
@@ -100,6 +100,7 @@ service.interceptors.request.use(
     }
     config.params = cleanDeep(config.params)
     //  params: cleanDeep(options.params),
+    // console.log(config)
     return config
   },
   error => {

+ 8 - 0
src/views/HumanResources/index.vue

@@ -115,6 +115,13 @@
             clearable
           ></el-input>
         </el-form-item>
+        <el-form-item prop="intentionCity">
+          <el-input
+            placeholder="工作意向"
+            v-model.trim="searchForm.intentionCity"
+            clearable
+          ></el-input>
+        </el-form-item>
         <el-form-item>
           <el-button @click="search" type="danger">搜索</el-button>
           <el-button
@@ -462,6 +469,7 @@ const initSearch = {
   userNameOrIdOrMobile: "",
   operator: "",
   dates: [],
+  intentionCity: '',
 };
 export default {
   components: { pagination, hrform, saveform },

+ 1 - 0
src/views/adapayAccount/index.vue

@@ -261,6 +261,7 @@ export default {
     },
     async getCalcBranchList() {
       await getPaymentConfigs({ payType: 'ADAPAY' }).then(res => {
+        this.calcBranchList = []
         if (res.code == 200 && res.data) {
           res.data.forEach(item => {
             this.calcBranchList.push({

+ 16 - 2
src/views/businessManager/orderManager/financeManager.vue

@@ -634,6 +634,15 @@ let that;
 export default {
   components: { pagination,Tooltip },
   name: "incomeTwo",
+  computed: {
+    extraQuery() {
+      const data = {}
+      if (this.$route.path === '/orderList/financeManager') {
+        data.noneTqType = '1'
+      }
+      return data
+    }
+  },
   data() {
     return {
       orderStatus: orderStatus,
@@ -837,6 +846,7 @@ export default {
         organId: searchForm.organId,
         lessBalancePaymentAmount: searchForm.lessBalancePaymentAmount,
         lessActualAmount: searchForm.lessActualAmount,
+        ...this.extraQuery
       };
 
       if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
@@ -894,7 +904,9 @@ export default {
     onAdaPayExport() {
       // 报表导出
       let url = "/api-web/adapay/exportBill";
-      let data = {};
+      let data = {
+        ...this.extraQuery
+      };
       if (this.searchForm.orderDate && this.searchForm.orderDate.length > 0) {
         data.startTime = this.searchForm.orderDate[0];
         data.endTime = this.searchForm.orderDate[1];
@@ -944,7 +956,9 @@ export default {
     },
     getList() {
       // let params = JSON.parse(JSON.stringify(this.searchForm));
-      let params = Object.assign({}, this.searchForm);
+      let params = Object.assign({
+        ...this.extraQuery
+      }, this.searchForm);
       // let params = {...this.searchForm}
       params.rows = this.pageInfo.limit;
       params.page = this.pageInfo.page;

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

@@ -18,7 +18,7 @@
             v-model.trim="searchForm.search"
             clearable
             @keyup.enter.native="search"
-            placeholder="关键字搜索"
+            placeholder="老师课程名、课程编号"
           ></el-input>
         </el-form-item>
         <el-form-item prop="organId">

+ 2 - 2
src/views/repairManager/repairList.vue

@@ -348,7 +348,7 @@ import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { getSoundTree } from "@/api/buildTeam";
 import {
-  findTechnician,
+  findAllTechnician,
   studentRepairList,
   repairSuccess,
 } from "@/api/repairManager";
@@ -385,7 +385,7 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    findTechnician().then((res) => {
+    findAllTechnician().then((res) => {
       if (res.code == 200) {
         this.employeeList = res.data;
       }

+ 1 - 1
src/views/resetTeaming/components/resetPayList.vue

@@ -129,7 +129,7 @@
                          v-permission="'musicGroupPaymentCalender/auditListDetail'">查看</el-button> -->
               <el-button type="text"
                          @click="openChioseStudent(scope.row)"
-                         v-if="scope.row.status != 'REJECT' && scope.row.status != 'AUDITING'&&teamStatus && scope.row.paymentType != 'MUSIC_APPLY' && scope.row.paymentType != 'ADD_STUDENT'"
+                         v-if="scope.row.status != 'REJECT' && scope.row.status != 'AUDITING'&&teamStatus && scope.row.paymentType != 'MUSIC_APPLY' && scope.row.paymentType != 'ADD_STUDENT' && scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'"
                          v-permission="'musicGroupPaymentCalenderDetail/batchAdd'">添加学员</el-button>
               <el-button type="text"
                          v-if="teamStatus && scope.row.auditStatus === 'REJECT'"

+ 1 - 1
src/views/resetTeaming/components/strudentPayInfo.vue

@@ -177,7 +177,7 @@
         <div
           class="newBand"
           @click="delStudentBtn"
-          v-if="info.paymentStatus == 'NO'"
+          v-if="info.paymentStatus == 'NO' && titleForm.paymentType != 'SPAN_GROUP_CLASS_ADJUST'"
           v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
         >
           删除学员

+ 154 - 0
src/views/resetTeaming/modals/extra-class-user.vue

@@ -0,0 +1,154 @@
+<template>
+  <el-form
+    ref="form"
+    :model="list"
+  >
+    <el-table
+      :data="form"
+      style="width: 100%;text-alogn: center;"
+    >
+      <el-table-column
+        label="学员姓名"
+        prop="username"></el-table-column>
+      <el-table-column
+        label="手机号码"
+        prop="phone"></el-table-column>
+      <el-table-column
+        label="课程类型"
+        prop="courseType"
+        key="courseType"
+        width="150">
+        <template slot-scope="scope">
+          {{courseType[list.form[scope.$index].courseType]}}
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="课程时长(分钟)"
+        prop="courseTime"
+        width="130"></el-table-column>
+      <el-table-column
+        label="现价(元)"
+        prop="courseCurrentPrice"
+        key="courseCurrentPrice"
+        width="140">
+        <template slot-scope="scope">
+          <el-form-item
+            :prop="'form.' + scope.$index + '.courseCurrentPrice'"
+            :rules="{ required: true, message: '请输入现价', trigger: 'blur' }"
+          >
+            <!-- $listeners.moneyChange -->
+            <el-input-number
+              size="small"
+              style="width: 90%!important;"
+              class="number-input"
+              v-model="list.form[scope.$index].courseCurrentPrice"
+              :controls="false"
+              :precision="0"
+              :min="0"
+              placeholder="请输入现价"
+            />
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="courseOriginalPrice"
+        key="courseOriginalPrice"
+        label="原价(元)"
+        width="140">
+        <template slot-scope="scope">
+          <el-form-item
+            :prop="'form.' + scope.$index + '.courseOriginalPrice'"
+            :rules="{ required: true, message: '请输入原价', trigger: 'blur' }"
+          >
+            <el-input-number
+              size="small"
+              style="width: 90%!important;"
+              class="number-input"
+              v-model="list.form[scope.$index].courseOriginalPrice"
+              :controls="false"
+              :precision="0"
+              :min="0"
+              placeholder="请输入原价"
+            />
+          </el-form-item>
+        </template>
+      </el-table-column>
+      <el-table-column
+        v-if="clearable && $listeners.remove"
+        prop="close"
+        key="close"
+        width="60">
+        <template slot-scope="scope">
+          <i
+            v-if="form.length > 1"
+            @click="$listeners.remove && $listeners.remove(scope.$index)"
+            class="el-icon-circle-close"
+            style="margin-bottom: 24px;cursor: pointer;"
+          ></i>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-button
+      icon="el-icon-circle-plus-outline"
+      plain
+      v-if="!isCommon && $listeners.create"
+      type="info"
+      size="small"
+      style="width: 100%;margin: 20px 0;"
+      @click="$listeners.create"
+    >新增课程类型</el-button>
+  </el-form>
+</template>
+<script>
+import { courseType, boolOptions } from '@/constant'
+import { objectToOptions } from '@/utils'
+import { classTimeList, array2object } from '@/utils/searchArray'
+import numeral from 'numeral'
+import MusicStore from '@/views/resetTeaming/store'
+export default {
+  props: ['form', 'isCommon', 'isDisabled', 'isUserType', 'courseUnitPriceSettingsByType', 'clearable'],
+  data() {
+    return {
+      courseType,
+      courseTypeOptions: this.courseUnitPriceSettingsByType,
+      boolOptionsOptions: objectToOptions(boolOptions),
+    }
+  },
+  computed: {
+    list() {
+      return {
+        form: this.form
+      }
+    },
+    classTimeList() {
+      return array2object(classTimeList)
+    },
+  },
+  methods: {
+    isOptionDisabled(key) {
+      const selected = this.form.map(item => item.courseType)
+      return selected.includes(key)
+    },
+    getOldMoney(index) {
+      return numeral(this.list.form[index].courseTotalMinuties * this.list.form[index].unitPrice).format('0,0.00')
+    },
+    validatorCourseTotalMinuties(index) {
+      return (rule, value, callback) => {
+        const { courseType } = this.list.form[index]
+        if (courseType && value > 1 && this.classTimeList[courseType] &&  value < this.classTimeList[courseType]) {
+          callback(new Error(`单节课不得少于${this.classTimeList[courseType]}分钟`))
+          return
+        }
+        callback()
+      }
+    }
+  },
+}
+</script>
+<style lang="less" scoped>
+.number-input{
+  /deep/ .el-input__inner {
+    text-align: left;
+  }
+}
+</style>

+ 2 - 1
src/views/resetTeaming/modals/payment-cycle.vue

@@ -7,6 +7,7 @@
     label-suffix=": "
   >
     <el-form-item
+    v-if="!hideMoney"
       label="缴费金额(元)"
       prop="paymentAmount"
       :rules="[{required: true, message: '请输入缴费金额', trigger: 'blur'}]"
@@ -72,7 +73,7 @@
 import { paymentPatternType } from '@/constant'
 import { objectToOptions } from '@/utils'
 export default {
-  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon', 'hidePaymentPattern'],
+  props: ['form', 'className', 'isUserType', 'isDisabled', 'isCommon', 'hidePaymentPattern','hideMoney'],
   data() {
     return {
       paymentPatternTypeOptions: objectToOptions(paymentPatternType),

+ 34 - 0
src/views/resetTeaming/modals/review-detail.vue

@@ -37,6 +37,7 @@
     </descriptions>
     <el-table :data="musicGroupPaymentCalenderCourseSettings"
               stripe
+              v-if="musicGroupPaymentCalenderCourseSettings.length"
               style="width: 100%; margin-top: 10px">
       <el-table-column prop="courseType"
                        label="课程类型"
@@ -60,6 +61,38 @@
                        label="原价(元)">
       </el-table-column>
     </el-table>
+    <el-table :data="musicGroupPaymentCalenderStudentDetails"
+              stripe
+              v-if="musicGroupPaymentCalenderStudentDetails.length"
+              style="width: 100%; margin-top: 10px">
+      <el-table-column prop="username"
+                       label="学员姓名">
+      </el-table-column>
+      <el-table-column prop="phone"
+                       label="手机号">
+      </el-table-column>
+      <el-table-column prop="courseType"
+                       label="课程类型"
+                       width="120">
+        <template slot-scope="scope">
+          {{ scope.row.courseType | courseTypeFormat }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="isStudentOptional"
+                       label="是否可选"
+                       width="100px">
+                       <template slot-scope="scope">{{scope.row.isStudentOptional ? '是' : '否'}}</template>
+      </el-table-column>
+      <el-table-column prop="courseTime"
+                       label="课程总时长(分钟)">
+      </el-table-column>
+      <el-table-column prop="courseCurrentPrice"
+                       label="现价(元)">
+      </el-table-column>
+      <el-table-column prop="courseOriginalPrice"
+                       label="原价(元)">
+      </el-table-column>
+    </el-table>
     <el-alert title="缴费周期"
               :closable="false"
               class="alert"
@@ -114,6 +147,7 @@ Vue.use(descriptions);
 const initData = {
   auditDto: {},
   musicGroupPaymentCalenderCourseSettings: [],
+  musicGroupPaymentCalenderStudentDetails: [],
   simpleUserDto: [],
   musicGroupPaymentCalenders: [],
   studentNum: 0,

+ 40 - 5
src/views/resetTeaming/modals/user-pay-form.vue

@@ -3,10 +3,12 @@
     <el-alert title="课程信息设置"
               :closable="false"
               class="alert"
+              v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
               type="info">
     </el-alert>
     <userBaseinfo :form.sync="form"
                   :isCommon="isCommon"
+                  v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
                   :isUserType="isUserType"
                   @getCharges="getCharges"
                   @changeActive="changeActive"
@@ -16,7 +18,21 @@
                   :chargeTypeName="chargeTypeName"
                   :paymentType="paymentType"
                   ref="base" />
-    <template v-if="!isCommon">
+    <template v-if="paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST'">
+      <el-alert title="加课信息设置"
+                :closable="false"
+                class="alert"
+                type="info">
+      </el-alert>
+      <extraClassUser :form.sync="eclassuser"
+                  ref="eclass"
+                  :isUserType="isUserType"
+                  :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
+                  @priceChange="priceChange"
+                  :clearable="true"
+                  @moneyChange="syncAllMoney" />
+    </template>
+    <template v-else-if="!isCommon">
       <el-alert title="加课信息设置"
                 :closable="false"
                 class="alert"
@@ -65,7 +81,7 @@
           </el-select>
         </el-form-item>
       </el-form>
-      <template v-if="isMulticycle">
+      <template v-if="isMulticycle && paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'">
         <el-collapse :value="collapse" @change="collapseChange" >
           <el-collapse-item
             v-for="(item, index) in cycles"
@@ -145,6 +161,7 @@ import { getTimes, objectToOptions } from "@/utils";
 import userBaseinfo from "./user-baseinfo";
 import paymentCycle from "./payment-cycle";
 import extraClass from "./extra-class";
+import extraClassUser from "./extra-class-user";
 import classrooms from "./classrooms";
 import otherform from "./other";
 import baseInfoVue from '../../teamDetail/components/baseInfo.vue';
@@ -156,6 +173,7 @@ const paymentTypeFormat = {
   1: "MUSIC_RENEW",
   2: "ADD_COURSE",
   3: "ADD_STUDENT",
+  4: "SPAN_GROUP_CLASS_ADJUST",
 };
 
 export default {
@@ -164,6 +182,7 @@ export default {
     userBaseinfo,
     paymentCycle,
     extraClass,
+    extraClassUser,
     classrooms,
     otherform,
   },
@@ -180,6 +199,7 @@ export default {
       cycles: [{}],
       cycle: {},
       eclass: [],
+      eclassuser: [],
       collapse: [0],
       nextVisible: false,
       typeList: [],
@@ -235,6 +255,14 @@ export default {
         }
       }
       return (this.payment.paymentPattern == 0 && this.form.leixing !== '2' && paymentType !== 'ADD_COURSE') || (this.payment.paymentPattern == 0 && editMulticycle)
+    },
+    paymentTypeString() {
+      let paymentType = ''
+      if (this.viewDetail) {
+        const { musicGroupPaymentCalenders } = this.viewDetail
+        paymentType = musicGroupPaymentCalenders[0]?.paymentType
+      }
+      return paymentType
     }
   },
   watch: {
@@ -317,6 +345,7 @@ export default {
           this.eclass = (res.data.musicGroupPaymentCalenderCourseSettings || []).filter(item => {
             return !item.isStudentOptional || this.paymentType !== undefined
           })
+          this.eclassuser = res.data.musicGroupPaymentCalenderStudentDetails
           const firstPayment = res.data.musicGroupPaymentCalenders[0] || {}
           this.$set(this.payment, 'paymentPattern', String(this.viewDetail.auditDto?.paymentPattern))
           if (this.$refs.cycle) {
@@ -362,10 +391,16 @@ export default {
       this.syncAllMoney()
     },
     syncAllMoney () {
+      if (this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST') {
+        const money = this.viewDetail?.musicGroupPaymentCalenders[0].paymentAmount
+        this.$set(this.cycle, "paymentAmount", money);
+        return money
+      }
       let money = 0;
       let first = 0
       let other = 0
-      for (const item of this.eclass) {
+      let classs = this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST' ? this.eclassuser : this.eclass
+      for (const item of classs) {
         money += item.courseCurrentPrice;
         if (this.cycles && this.cycles.length) {
           if (item.isStudentOptional) {
@@ -373,7 +408,6 @@ export default {
           } else {
             const floorMoney = Math.floor(item.courseCurrentPrice / this.cycles.length)
             const remainder = item.courseCurrentPrice % this.cycles.length
-            console.log(remainder)
             first += floorMoney + remainder
             other += floorMoney
           }
@@ -469,7 +503,7 @@ export default {
           }
         });
       }
-      if (this.eclass.length < 1) {
+      if (this.eclass.length < 1 && this.eclassuser.length < 1) {
         return this.$message.error('请至少选择一条加课信息')
       }
       if (valided.length === forms.length) {
@@ -489,6 +523,7 @@ export default {
             }
           })],
           musicGroupPaymentCalenderCourseSettingsList: this.eclass,
+          musicGroupPaymentCalenderStudentDetails: this.eclassuser,
         };
         if (this.$refs.cycle) {
           const { paymentDate, paymentValid, ...other } = this.cycle

+ 1 - 1
src/views/studentManager/components/studentVip.vue

@@ -14,7 +14,7 @@
           placeholder="课程名称"
           clearable
           @keyup.enter.native="onSearch"
-          v-model.trim="searchForm.classGroupName"
+          v-model.trim="searchForm.vipGroupName"
         ></el-input>
       </el-form-item>
       <el-form-item>

+ 4 - 2
src/views/studentManager/studentList.vue

@@ -46,7 +46,8 @@
         </el-form-item>
 
         <el-form-item>
-          <el-select
+            <remote-search :commit="'setTeachers'" v-model="searchForm.teacherId" />
+          <!-- <el-select
             placeholder="指导老师"
             v-model="searchForm.teacherId"
             clearable
@@ -58,8 +59,9 @@
               :value="item.id"
               :key="index"
             ></el-option>
-          </el-select>
+          </el-select> -->
         </el-form-item>
+
         <el-form-item prop="isActive">
           <el-select
             class="multiple"

+ 7 - 0
src/views/teamBuild/api.js

@@ -1,5 +1,12 @@
 import request2 from '@/utils/request2'
 
+// 关闭乐团前获取学员列表
+export const getMusicGroupStuReBack = data => request2({
+  url: '/api-web/studentRegistration/getMusicGroupStuReBack',
+  params: data,
+  method: 'get',
+})
+
 // 填加学员接口
 export const addMusicGroupRegs = data => request2({
   url: '/api-web/musicGroup/addMusicGroupRegs',

+ 4 - 2
src/views/teamBuild/components/merge-music.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="merge-music">
     <el-button type="primary" @click="visible = true">选择乐团</el-button>
-    <el-button type="primary" @click="studentsVisible = true">已合并学生</el-button>
+    <el-button type="primary" @click="studentsVisible = true">学员列表</el-button>
     <empty v-if="isEmpty" desc="暂未选择乐团"/>
     <el-collapse v-model="active" @change="changeActive" class="items" v-else>
       <el-collapse-item class="item" v-for="(item, key) in items" :key="key" :name="key" >
@@ -43,6 +43,7 @@
       append-to-body
     >
       <mergedStudents
+        v-if="studentsVisible"
         @close="studentsVisible = false"
         @submited="submited"
       />
@@ -138,7 +139,8 @@ export default {
           registerIds: allId
         })
         this.$message.success('合并成功')
-        this.$emit('chiosetab', 2)
+        this.$emit('close')
+        this.$emit('submited')
       } catch (error) {}
     },
     handleSelectionChange(arr) {

+ 2 - 0
src/views/teamBuild/components/select-item.vue

@@ -113,6 +113,8 @@ export default {
       try {
         const res = await getMusicGroupStu({
           musicGroupId: this.id,
+          studentStatus: 'NORMAL',
+          paymentStatus: 1
         })
         this.list = res.data
         this.filterlist = res.data

+ 35 - 16
src/views/teamBuild/modals/close-studens.vue

@@ -31,13 +31,18 @@
         </el-table-column>
         <el-table-column prop="surplusCourseFee" align="center" label="退费金额(元)" width="150">
           <template slot-scope="scope">
-            <el-form-item :prop="'' + scope.row.userId">
+            <el-form-item
+              :prop="'' + scope.row.userId"
+              :rules="[
+                { required: true, message: '' },
+                { validator: validatorMoney(scope.row) },
+              ]"
+            >
               <el-input-number
-                :min="0"
-                :max="scope.row.surplusCourseFee"
                 size="mini"
                 :controls="false"
-                :precision="0"
+                :precision="2"
+                :step="0.01"
                 v-model="moneys[scope.row.userId]"
                 placeholder="请输入退费金额"
               />
@@ -53,8 +58,7 @@
   </div>
 </template>
 <script>
-import { teamSoundStudent } from '@/api/buildTeam'
-import { closeMusicGroup } from '../api'
+import { closeMusicGroup, getMusicGroupStuReBack } from '../api'
 export default {
   props: ['detail'],
   mounted() {
@@ -68,7 +72,7 @@ export default {
   },
   methods: {
     async FetchList() {
-      const res = await teamSoundStudent({
+      const res = await getMusicGroupStuReBack({
         musicGroupId: this.detail?.id,
       })
       this.list = res.data
@@ -80,17 +84,32 @@ export default {
     },
     async submit() {
       try {
-        await this.$confirm('是否确认关闭乐团', '提示', {
-          type: 'warning'
+        this.$refs.form.validate(async valid => {
+          if (valid) {
+            await this.$confirm('是否确认关闭乐团', '提示', {
+              type: 'warning'
+            })
+            await closeMusicGroup({
+              musicGroupId: this.detail?.id,
+              userReBack: this.moneys
+            })
+            this.$message.success('关闭成功')
+            this.$emit('submited')
+            this.$emit('close')
+          } else {
+            this.$$message.error('请填写完成退费金额')
+          }
         })
-        await closeMusicGroup({
-          musicGroupId: this.detail?.id,
-          userReBack: this.moneys
-        })
-        this.$message.success('关闭成功')
-        this.$emit('submited')
-        this.$emit('close')
       } catch (error) {}
+    },
+    validatorMoney(row) {
+      return (rule, value, callback) => {
+        if (row.surplusCourseFee < value || value < 0) {
+          callback(new Error(`最大退费金额: ${row.surplusCourseFee}`))
+          return
+        }
+        callback()
+      }
     }
   }
 }

+ 7 - 1
src/views/teamBuild/signupList.vue

@@ -72,7 +72,13 @@
         </div>
       </div>
       <el-dialog title="选择合并乐团" :visible.sync="mergeVisible" width="950px">
-        <mergeMusic v-if="mergeVisible" style="padding: 0 20px;" :organId="organId" @close="mergeVisible = false"/>
+        <mergeMusic
+          v-if="mergeVisible"
+          style="padding: 0 20px;"
+          :organId="organId"
+          @close="mergeVisible = false"
+          @submited="getList"
+        />
       </el-dialog>
 
       <el-dialog title="预报名名单" :visible.sync="forecastVisible" width="950px">

+ 3 - 3
src/views/teamBuild/teamSeting/components/setClassV2.vue

@@ -205,7 +205,7 @@
         </el-form-item>
         <el-form-item
           label="助教老师"
-          v-if="newClassForm.type != 'HIGH_ONLINE'"
+          v-if="newClassForm.type != 'HIGH_ONLINE' && newClassForm.type != 'HIGH'&&newClassForm.type"
           prop="teaching"
         >
           <remote-search
@@ -231,7 +231,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
+        <!-- <el-form-item 辜经理和焕焕狗要求不要可选声部
           label="可报名声部"
           prop="memo"
           :rules="[
@@ -256,7 +256,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
           label="网络教室声部"
           prop="subjectId"

+ 258 - 0
src/views/teamDetail/componentClass/calenderStudentList.vue

@@ -0,0 +1,258 @@
+<template>
+  <div>
+    <paymentCycle
+      ref="cycle"
+      :form="cycle"
+      :isUserType="true"
+      :isCommon="true"
+      :isDisabled="true"
+      :hideMoney="true"
+    />
+    <otherform :form="other" ref="other" />
+    <el-table
+      :data="dataList"
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      max-height="300px"
+    >
+      <el-table-column
+        prop="userId"
+        align="center"
+        width="120"
+        label="学员编号"
+      ></el-table-column>
+      <el-table-column
+        prop="username"
+        align="center"
+        width="120"
+        label="学员姓名"
+      ></el-table-column>
+      <el-table-column prop="phone" align="center" width="120" label="课程类型">
+        <template slot-scope="scope">
+          <div
+            v-for="(item, index) in scope.row.courseList"
+            :key="index"
+            class="courseDiv"
+          >
+            {{ item.courseType | coursesType }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="现价">
+        <template slot-scope="scope">
+          <div >
+            <div
+              class="courseDiv"
+              v-for="(item, index) in scope.row.courseList"
+              :key="index"
+            >
+              <el-input v-model="item.courseCurrentPrice"></el-input>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column prop="subjectNames" align="center" label="原价">
+        <template slot-scope="scope">
+          <div>
+            <div
+              class="courseDiv"
+              v-for="(item, index) in scope.row.courseList"
+              :key="index"
+            >
+              <el-input v-model="item.courseOriginalPrice"></el-input>
+            </div>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+<script>
+import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
+import otherform from "@/views/resetTeaming/modals/other";
+import { getTimes } from "@/utils";
+import { spanGroupMergeClassSplitClassAffirm } from "@/api/buildTeam";
+export default {
+  props: [
+    "studentIds",
+    "masterClassGroupId",
+    "classGroupStudents",
+    "classList",
+    "mergeInfo",
+  ],
+  components: {
+    paymentCycle,
+    otherform,
+  },
+  data() {
+    return {
+      activeNames: [],
+      mergeInfoList: [],
+      cycle: {
+        paymentAmount: null,
+        paymentPattern: null,
+      },
+      other: {},
+      dataList: [],
+    };
+  },
+  mounted() {
+    // console.log(this.studentIds, this.masterClassGroupId, this.classGroupStudents)
+    // for (let item in this.mergeInfo) {
+    //   this.activeNames.push(item);
+    // }
+    this.mergeInfoList = [];
+    for (let merge in this.mergeInfo) {
+      this.mergeInfoList = this.mergeInfoList.concat(this.mergeInfo[merge]);
+    }
+    this.concatCourseLst(this.mergeInfoList);
+  },
+  methods: {
+    getCLassName(key) {
+      let str = "";
+      this.classList.forEach((classes) => {
+        if (classes.id == key) {
+          str = classes.name;
+        }
+      });
+      return str;
+    },
+    async submit() {
+      let obj = {};
+      let some = this.getData();
+      if (some) {
+        obj.musicGroupPaymentCalenderDtos = [some];
+      } else {
+        return;
+      }
+
+      obj.classGroupIds = this.classList.map((classes) => {
+        return classes.id;
+      });
+      obj.masterClassGroupId = this.masterClassGroupId;
+      obj.classGroupStudents = this.classGroupStudents;
+      obj.studentIds = this.studentIds;
+      try {
+        const reset = await spanGroupMergeClassSplitClassAffirm(obj);
+        this.$message.success(reset.msg);
+        // 1.关闭弹窗
+        // 2.清空合并班
+        // 3.刷新列表
+        this.$emit("refresh");
+      } catch (e) {
+        console.log(e);
+      }
+    },
+    getForms() {
+      const { $refs: refs } = this;
+      // [refs.base, refs.eclass, refs.cycle, ...(refs.cycles || []), refs.other, refs.payment]
+      return [refs.cycle, refs.other]
+        .filter((item) => !!item)
+        .map((item) => item.$refs.form || item);
+    },
+    getData() {
+      const forms = this.getForms();
+      const valided = [];
+      for (const form of forms) {
+        form.validate((valid) => {
+          if (valid) {
+            valided.push(form);
+          }
+        });
+      }
+      if (valided.length === forms.length) {
+        const { leixing, ...rest } = {
+          ...this.form,
+          ...this.other,
+        };
+
+        if (this.$refs.cycle) {
+          const {
+            paymentDate,
+            paymentValid,
+            paymentPattern,
+            ...other
+          } = this.cycle;
+          rest.paymentPattern = paymentPattern;
+          rest.payUserType = "STUDENT";
+          rest.paymentType = "SPAN_GROUP_CLASS_ADJUST";
+          rest.musicGroupPaymentCalenderStudentDetails = this.mergeInfoList;
+          rest.musicGroupPaymentDateRangeList = [
+            {
+              ...other,
+              ...getTimes(paymentDate, [
+                "startPaymentDate",
+                "deadlinePaymentDate",
+              ]),
+              ...getTimes(paymentValid, [
+                "paymentValidStartDate",
+                "paymentValidEndDate",
+              ]),
+            },
+          ];
+        }
+        const data = {
+          ...rest,
+        };
+        return data;
+
+        // 说明验证通过
+      } else {
+        this.$message.error("请填写必要信息");
+        return null;
+      }
+    },
+    concatCourseLst(arr) {
+      let data = {};
+      arr.forEach((some) => {
+        if (data[some.userId]) {
+          // data[some.userId].push(some)
+          data[some.userId].courseList.push(some);
+        } else {
+          data[some.userId] = {};
+          data[some.userId].userId = some.userId;
+          data[some.userId].username = some.username;
+          data[some.userId].courseList = [];
+          data[some.userId].courseList.push(some);
+        }
+      });
+      this.dataList = Object.values(data);
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.courseDiv {
+  height: 45px;
+  line-height: 45px;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+/deep/ .header {
+  display: flex;
+  align-items: center;
+  width: 100%;
+  justify-content: space-between;
+  // margin-bottom: 10px;
+  > span:first-child {
+    display: flex;
+    &::before {
+      content: "";
+      display: block;
+      width: 5px;
+      background-color: #14928a;
+      margin-right: 10px;
+      border-radius: 2px;
+      height: 48px;
+    }
+  }
+  .icon {
+    font-size: 18px;
+    font-weight: normal;
+    margin-right: 20px;
+  }
+  /deep/.el-collapse-item__wrap {
+    border-bottom: none !important;
+  }
+}
+</style>

+ 336 - 0
src/views/teamDetail/componentClass/classCompound.vue

@@ -0,0 +1,336 @@
+<template>
+  <div class="fixedBox">
+    <el-card>
+      <div class="boxWrap">
+        <p>
+          班级合并<span style="color: red"> {{ compoundList.length }} </span>
+        </p>
+        <el-popover placement="top" v-model="isLook" trigger="manual">
+          <div>
+            <p class="title">
+              班级合并列表
+              <i class="el-icon-minus minus" @click="isLook = false"></i>
+            </p>
+
+            <el-divider></el-divider>
+          </div>
+          <el-button type="text" style="float: right" @click="clearCom"
+            >清空列表</el-button
+          >
+          <div>
+            <el-radio-group v-model="radio" @change="changeMasterClass">
+              <el-table
+                :data="dataList"
+                height="300px"
+                :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+              >
+                <el-table-column align="center" label="主班" width="110">
+                  <template slot-scope="scope">
+                    <el-radio :label="scope.row.id"></el-radio>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  align="center"
+                  width="180px"
+                  label="班级名称"
+                  prop="name"
+                ></el-table-column>
+                <el-table-column align="center" label="班级类型">
+                  <template slot-scope="scope">
+                    <div>{{ scope.row.type | classType }}</div>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  align="center"
+                  width="180px"
+                  prop="teacherName"
+                  label="已选学生数"
+                >
+                  <!--    -->
+                  <template slot-scope="scope">
+                    <div>
+                      {{
+                        scope.row.studentList ? scope.row.studentList.length : 0
+                      }}
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column align="center" label="操作" width="200px">
+                  <template slot-scope="scope">
+                    <el-button type="text" @click="cancleCom(scope.row)"
+                      >取消</el-button
+                    >
+                    <el-button
+                      type="text"
+                      @click="showStudentList(scope.row)"
+                      :disabled="scope.row.id == radio"
+                      >添加学生</el-button
+                    >
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-radio-group>
+          </div>
+          <el-button
+            type="primary"
+            size="mini"
+            style="float: right; margin-top: 20px"
+            @click="submitClass"
+            >确定</el-button
+          >
+          <i
+            class="el-icon-copy-document"
+            slot="reference"
+            @click="isLook = true"
+          ></i>
+        </el-popover>
+      </div>
+    </el-card>
+    <el-dialog
+      :visible.sync="studentListModalVisible"
+      title="学员列表"
+      append-to-body
+      width="800px"
+    >
+      <viewStudentList
+        :classId="activeRow.id"
+        :disabledList="allStudentList"
+        :list="studentList"
+        :chioseList="activeRow.studentList"
+        v-if="studentListModalVisible"
+        :showOk="true"
+        :isChiose="true"
+        @close="closeStudentView"
+      />
+    </el-dialog>
+
+    <el-dialog
+      :visible.sync="calenderStudentVisible"
+      title="学员缴费列表"
+      append-to-body
+      width="800px"
+    >
+      <!--   studentIds:[],
+      masterClassGroupId:'',
+      classGroupStudents:[] -->
+      <calenderStudentList
+      ref='calenderStudentList'
+        v-if="calenderStudentVisible"
+        :classList="dataList"
+        :studentIds="studentIds"
+        :masterClassGroupId="masterClassGroupId"
+        :classGroupStudents="classGroupStudents"
+        :mergeInfo="mergeInfo"
+        @refresh='refresh'
+      />
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="calenderStudentVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitInfo"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </div>
+</template>
+<script>
+// import compoundClass from './compoundClass' compoundClass
+import viewStudentList from "./student-list";
+import calenderStudentList from "./calenderStudentList";
+import { getClassAllStudent } from "@/api/studentManager";
+import { getStudentPaymentCalenders } from "@/api/buildTeam";
+let that;
+export default {
+  props: ["compoundList"],
+  components: { viewStudentList, calenderStudentList },
+  data() {
+    return {
+      radio: "",
+      dataList: this.compoundList,
+      isLook: false,
+      show: false,
+      idList: "",
+      studentList: [],
+      studentListModalVisible: false,
+      activeRow: null,
+      calenderStudentVisible: false,
+      studentIds: [],
+      masterClassGroupId: "",
+      classGroupStudents: [],
+      mergeInfo: {},
+    };
+  },
+  created() {
+    that = this;
+  },
+  methods: {
+    cancleCom(row) {
+      this.$emit("cancleCompound", row);
+    },
+    clearCom() {
+      this.$emit("clearCom");
+
+    },
+    async submitClass() {
+      if (!this.radio) {
+        this.$message.error("请选择一个主班");
+        return;
+      }
+      // let arr = []
+      // 主班id
+      // 第一个是所有学员 this.radio
+      // 班级和学生id的键值对
+      // 第三个是主班编号 this.radio
+      let idList = []; // 所有的班级id
+      this.classGroupStudents = [];
+      let flag = false;
+      this.dataList.forEach((com) => {
+        // arr.push(com.type)
+        if (
+          (!com.studentList && com.id != this.radio) ||
+          (com.studentList?.length <= 0 && com.id != this.radio)
+        ) {
+          flag = true;
+        }
+
+        if (com.id != this.radio&&com.studentList?.length>0) {
+          this.classGroupStudents.push({
+            [com.id]: com.studentList.map((stu) => stu.userId).join(","),
+          });
+        }
+        idList.push(com.id);
+      });
+      if (this.dataList.length <= 1) {
+        this.$message.error("请至少选择2个班级");
+        return;
+      }
+      if (flag) {
+        this.$message.error("请保证每个班至少勾选一名学员");
+        return;
+      }
+      // 做判断
+      this.show = true;
+      this.isLook = false;
+      this.masterClassGroupId = this.radio;
+      this.studentIds = this.allStudentList.map((stu) => {
+        return stu.userId;
+      });
+
+      try {
+        const rest = await getStudentPaymentCalenders({
+          studentIds: this.studentIds,
+          masterClassGroupId: this.masterClassGroupId,
+          classGroupStudents: this.classGroupStudents,
+        });
+        this.mergeInfo = rest.data;
+        this.calenderStudentVisible = true;
+      } catch (e) {
+        console.log(e);
+      }
+
+      // 试着请求
+    },
+    getList() {
+       this.$emit("getList");
+    },
+    refresh(){
+      this.calenderStudentVisible = false;
+      this.clearCom()
+      this.getList()
+    },
+    closeReset() {
+      this.clearCom();
+      this.show = false;
+      this.$emit("getList");
+    },
+    showStudentList(row) {
+      // row.id
+      this.activeRow = row;
+      getClassAllStudent({ classGroupId: row.id }).then((res) => {
+        if (res.code == 200) {
+          this.studentList = res.data.map((item) => {
+            return {
+              userId: item.userId,
+              nickName: item.name,
+              gender: item.gender,
+              phone: item.parentsPhone,
+              subjectNames: item.subjectName,
+            };
+          });
+          this.studentListModalVisible = true;
+        }
+      });
+    },
+    closeStudentView(list) {
+      this.activeRow.studentList = list;
+      this.dataList.splice(1, 0);
+      this.studentListModalVisible = false;
+    },
+    changeMasterClass(val) {
+      this.dataList.forEach((classes) => {
+        if (classes.id == val) {
+          classes.studentList = null;
+          this.dataList.splice(1, 0);
+        }
+      });
+    },
+    submitInfo(){
+      this.$refs.calenderStudentList.submit()
+    }
+  },
+  watch: {
+    compoundList(val) {
+      this.dataList = val;
+    },
+  },
+  computed: {
+    allStudentList() {
+      let arr = [];
+      that.dataList.forEach((classes) => {
+        if (classes.studentList) {
+          arr = arr.concat(
+            classes.studentList.map((stu) => {
+              stu.classId = classes.id;
+              return stu;
+            })
+          );
+        }
+      });
+      return arr;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.title {
+  line-height: 44px;
+}
+.fixedBox {
+  position: fixed;
+  bottom: 20px;
+  right: 10px;
+  z-index: 100;
+  width: 200px;
+  background-color: #fff;
+  font-size: 14px;
+
+  .boxWrap {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    i {
+      font-size: 18px;
+      cursor: pointer;
+    }
+  }
+}
+/deep/.el-divider--horizontal {
+  margin: 0 !important;
+}
+.minus {
+  float: right;
+  line-height: 44px;
+  padding-right: 20px;
+  font-size: 20px;
+  cursor: pointer;
+}
+</style>

+ 106 - 0
src/views/teamDetail/componentClass/student-list.vue

@@ -0,0 +1,106 @@
+<template>
+  <div>
+    <el-table
+      :data="list"
+      ref='studentTable'
+      style
+      :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+      tooltip-effect="dark"
+
+       @selection-change="handleSelectionChange"
+       max-height='300px'
+    >
+     <el-table-column v-if="isChiose"
+      type="selection"
+      :selectable="checkSelectable"
+      width="55">
+    </el-table-column>
+      <el-table-column
+        prop="userId"
+        align="center"
+        width="120"
+        label="学员编号"
+      ></el-table-column>
+      <el-table-column
+        prop="nickName"
+        align="center"
+        width="120"
+        label="学员姓名"
+      ></el-table-column>
+      <el-table-column
+        prop="name"
+        align="center"
+        width="120"
+        label="性别"
+      >
+      <template slot-scope="scope">
+        <div>
+          {{scope.row.gender| sex}}
+        </div>
+      </template>
+      </el-table-column>
+      <el-table-column
+        prop="phone"
+        align="center"
+        width="120"
+        label="联系电话"
+      ></el-table-column>
+      <el-table-column
+        prop="subjectNames"
+        align="center"
+        label="专业"
+      ></el-table-column>
+    </el-table>
+    <div slot="footer" class="dialog-footer" v-if="showOk">
+      <el-button type="primary" @click="$listeners.close(selectList)">确 定</el-button>
+    </div>
+    <div style="clear: both;" v-if="showOk"></div>
+  </div>
+</template>
+<script>
+export default {
+  props: ['list','isChiose','chioseList','showOk','disabledList','classId'],
+  data(){
+    return{
+      selectList:this.chioseList
+    }
+  },mounted(){
+    if(this.chioseList){
+          let idList = this.chioseList.map((item,index)=>{
+      return item.userId
+    })
+    this.list.forEach((item,index)=>{
+      if(idList.indexOf(item.userId)!= -1){
+        this.$refs.studentTable.toggleRowSelection(item,true);
+      }
+    })
+    }
+  },
+  methods:{
+    handleSelectionChange(val){
+      this.selectList = val
+    },
+    checkSelectable(row){
+      let flag = true
+      if(this.disabledList&&this.disabledList.length >0){
+        this.disabledList.forEach(stu=>{
+          if(stu.userId == row.userId &&stu.classId!=this.classId){
+            flag = false
+          }
+        })
+      }
+      return flag
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+/deep/.dialog-footer{
+  margin-top: 10px;
+}
+  .dialog-footer {
+  float: right;
+
+}
+
+</style>

+ 2 - 2
src/views/teamDetail/componentCourse/gpsLocation.vue

@@ -30,7 +30,7 @@
                     :offset="[-50,0]"></el-amap-text>
     </el-amap>
   </div>
-</template> 
+</template>
 <script>
 import VueAMap from 'vue-amap'
 // 地图
@@ -175,4 +175,4 @@ export default {
 .amap-demo {
   height: 500px;
 }
-</style>
+</style>

+ 175 - 138
src/views/teamDetail/components/modals/class-pay-list.vue

@@ -1,21 +1,41 @@
 <template>
   <div>
-     <el-alert
-    title="课程时长设置"
-    type="info" :closable='false'>
-  </el-alert>
-    <el-form :model='courseTimeForm' ref='courseTimeForms' :inline='true' style="margin-top:20px;">
-      <el-form-item v-for="(item,index) in courseTimeForm.timeList" :key="index" :label="item.label"  
-       :prop="'timeList.' + index + '.value'" :rules="[{required: true, message: '请选择课程时长', trigger: 'blur'}]" label-width="100px">
-        <el-select clearable v-model="item.value" placeholder="请选择课程时长" @change="(val)=>setCourseTime(item,val)">
-          <el-option v-for="(time,index) in item.list" :key='index' :value='time' :label="time"></el-option>
+    <el-alert title="课程时长设置" type="info" :closable="false"> </el-alert>
+    <el-form
+      :model="courseTimeForm"
+      ref="courseTimeForms"
+      :inline="true"
+      style="margin-top: 20px"
+    >
+      <el-form-item
+        v-for="(item, index) in courseTimeForm.timeList"
+        :key="index"
+        :label="item.label"
+        :prop="'timeList.' + index + '.value'"
+        :rules="[
+          { required: true, message: '请选择课程时长', trigger: 'blur' },
+        ]"
+        label-width="100px"
+      >
+        <el-select
+          clearable
+          v-model="item.value"
+          placeholder="请选择课程时长"
+          @change="(val) => setCourseTime(item, val)"
+        >
+          <el-option
+            v-for="(time, index) in item.list"
+            :key="index"
+            :value="time"
+            :label="time"
+          ></el-option>
         </el-select>
-       </el-form-item>
+      </el-form-item>
     </el-form>
     <classPayListItem
       :payInfo="payInfo"
       ref="base"
-      :courseTypesByType="courseTypesByType" 
+      :courseTypesByType="courseTypesByType"
       v-for="(item, index) in form.classList"
       :key="index"
       :item="item"
@@ -26,124 +46,133 @@
       <el-button type="primary" @click="gotoLast">下一步</el-button>
     </div>
     <div style="clear: both"></div>
-        <el-dialog
+    <el-dialog
       :visible.sync="showLastVisable"
       title="合并结果确认"
       append-to-body
       width="800px"
     >
       <classSetting
-      :form='form'
-      ref="classSetting"
+        :form="form"
+        ref="classSetting"
         :musicGroupPaymentCalenderDtos="musicGroupPaymentCalenderDtos"
         :classType="5"
-        :teacherList="selects.teachers"
         :musicGroupId="teamid"
         :activeType="activeType"
         :courseTypeList="courseTypeList"
-        :cooperationList="selects.teachers"
         :studentSubmitedData="studentSubmitedData"
         :classIdList="classIdList"
         :classGroupStudents="classGroupStudents"
-        :selectPrices='classCourseMinuteMap'
-        :classCouresTimeList ="classCouresTimeList "
+        :selectPrices="classCourseMinuteMap"
+        :classCouresTimeList="classCouresTimeList"
+        :teacherList="teacherList"
+        :cooperationList="teacherList"
         @close="showLastVisable = false"
         v-if="showLastVisable"
-
       />
-        <div slot="footer" class="dialog-footer" >
+      <div slot="footer" class="dialog-footer">
         <el-button @click="showLastVisable = false">上一步</el-button>
         <el-button type="primary" @click="submitResetClass">确 定</el-button>
       </div>
-          
     </el-dialog>
   </div>
 </template>
 <script>
 import classNewInfo from "./class-new-info";
-import classPayListItem from './class-pay-list-item'
-import classSetting from './classroom-setting'
-import  {getCourseType} from "@/utils/utils"
-import {courseType,classTime} from '@/constant'
-import { getOrganCourseDurationSettings} from '@/api/buildTeam'
-import MusicStore from '@/views/resetTeaming/store'
+import classPayListItem from "./class-pay-list-item";
+import classSetting from "./classroom-setting";
+import { getCourseType } from "@/utils/utils";
+import { courseType, classTime } from "@/constant";
+import { getOrganCourseDurationSettings } from "@/api/buildTeam";
+import MusicStore from "@/views/resetTeaming/store";
 export default {
-  props: ["form", "payInfo", "courseTypesByType","classIdList","addCourseType",'classMaxCourseNumMap'],
+  props: [
+    "form",
+    "payInfo",
+    "courseTypesByType",
+    "classIdList",
+    "addCourseType",
+    "classMaxCourseNumMap",
+    "teacherList",
+  ],
   components: {
     classNewInfo,
     classPayListItem,
-    classSetting
+    classSetting,
   },
   data() {
     return {
-      showLastVisable:false,
-      musicGroupPaymentCalenderDtos:null,
-      teacherList:[],
-      studentList:[],
-      teamid:'',
-      activeType:'',
-      courseTypeList:[],
-      studentSubmitedData:{},
-      classGroupStudents:[],
-      courseTimeForm:{
-        timeList:[]
+      showLastVisable: false,
+      musicGroupPaymentCalenderDtos: null,
+      teacherList: [],
+      studentList: [],
+      teamid: "",
+      activeType: "",
+      courseTypeList: [],
+      studentSubmitedData: {},
+      classGroupStudents: [],
+      courseTimeForm: {
+        timeList: [],
       },
-      organId:'',
-      organCourseTime:{},
-      classCourseMinuteMap:{}
+      organId: "",
+      organCourseTime: {},
+      classCourseMinuteMap: {},
     };
   },
-  async mounted(){
+  async mounted() {
     // 1.查询该分部下得所有课程时长
     // 2.组成select需要得选项并且指定
 
-  
-         this.teamid = this.$route.query.id;
-        MusicStore.dispatch('getBaseInfo', {
-          data: { musicGroupId: this.teamid }
-        }).then(async (res) => {
-          this.organId =res.data.musicGroup.organId
-        
-          try{
-           const res = await getOrganCourseDurationSettings({organId:this.organId})
-           this.organCourseTime = res.data;
-             
-           this.setTimeList(res.data)
-           
-          }catch{}
-        })
+    this.teamid = this.$route.query.id;
+    MusicStore.dispatch("getBaseInfo", {
+      data: { musicGroupId: this.teamid },
+    }).then(async (res) => {
+      this.organId = res.data.musicGroup.organId;
+
+      try {
+        const res = await getOrganCourseDurationSettings({
+          organId: this.organId,
+        });
+        this.organCourseTime = res.data;
+
+        this.setTimeList(res.data);
+      } catch {}
+    });
   },
   methods: {
-    init(){
-       this.$store.dispatch('setTeachers')
-      this.studentList = []
-      let classGroupStudents = []
-      this.form.classList.forEach(classes=>{
-          this.studentList = this.studentList.concat(classes.studentList)
-          let arr = []
-          classes.studentList.forEach(stu=>{
-            arr.push(stu.userId)
-          })
-          classGroupStudents.push({[classes.classId]:arr.join(',')})
-      })
-      this.classGroupStudents = classGroupStudents
-      this.teamid = this.$route.query.id
-      this.activeType = this.form.classList[0].type
-      this.courseTypeList = getCourseType(this.activeType) 
+    init() {
+      //  this.$store.dispatch('setTeachers')
+      this.studentList = [];
+      let classGroupStudents = [];
+      this.form.classList.forEach((classes) => {
+        this.studentList = this.studentList.concat(classes.studentList);
+        let arr = [];
+        classes.studentList.forEach((stu) => {
+          arr.push(stu.userId);
+        });
+        classGroupStudents.push({ [classes.classId]: arr.join(",") });
+      });
+      this.classGroupStudents = classGroupStudents;
+      this.teamid = this.$route.query.id;
+      this.activeType = this.form.classList[0].type;
+      this.courseTypeList = getCourseType(this.activeType);
       this.studentSubmitedData = {
-        name:'',
-        seleched:this.studentList.map(stu=> {return stu.userId})
+        name: "",
+        seleched: this.studentList.map((stu) => {
+          return stu.userId;
+        }),
+      };
+      this.courseTimeForm.timeList.map((item) => {
+        this.classCourseMinuteMap[item.type] = item.value;
+      });
+      // this.classMaxCourseNumMap;
+      this.classCouresTimeList = {};
+      for (let key in this.classCourseMinuteMap) {
+        this.classCouresTimeList[key] =
+          this.classMaxCourseNumMap[key] * this.classCourseMinuteMap[key];
       }
-    this.courseTimeForm.timeList.map(item=>{
-     this.classCourseMinuteMap[item.type]=item.value
-    })
-    // this.classMaxCourseNumMap;
-    this.classCouresTimeList ={}
-    for(let key in this.classCourseMinuteMap){
-      this.classCouresTimeList[key] =  this.classMaxCourseNumMap[key]*this.classCourseMinuteMap[key]
-    }
 
-    this.showLastVisable = true
+      this.showLastVisable = true;
     },
     close() {
       this.$emit("close");
@@ -156,65 +185,74 @@ export default {
         .map((item) => item.$refs.form || item);
     },
     gotoLast() {
-       this.$refs.courseTimeForms.validate(_=>{
-        if(_){
-      const forms = this.getForms();
-      
-      let musicGroupPaymentCalenderDtos = []
-      // 判断有没有缴费项目(因为又可能没有)
-      // let flag = false
-      let arr = []
-      for (const form of forms) {
-         let data =  form.getData()
-        if(data=='error'){
-          arr.push(data)
-        }
-        if(data&&data!='error'){
-          musicGroupPaymentCalenderDtos.push(data)
-        }
-      }
-      if(arr.length>0){
-        return
-      }
-     
-           this.musicGroupPaymentCalenderDtos = musicGroupPaymentCalenderDtos
-      this.init()
+      this.$refs.courseTimeForms.validate((_) => {
+        if (_) {
+          const forms = this.getForms();
+
+          let musicGroupPaymentCalenderDtos = [];
+          // 判断有没有缴费项目(因为又可能没有)
+          // let flag = false
+          let arr = [];
+          for (const form of forms) {
+            let data = form.getData();
+            if (data == "error") {
+              arr.push(data);
+            }
+            if (data && data != "error") {
+              musicGroupPaymentCalenderDtos.push(data);
+            }
+          }
+          if (arr.length > 0) {
+            return;
+          }
+
+          this.musicGroupPaymentCalenderDtos = musicGroupPaymentCalenderDtos;
+          this.init();
         }
-      })
+      });
       // 弹出最后一页
-     
-           
     },
-    submitResetClass(){
-      this.$refs.classSetting.submit()
+    submitResetClass() {
+      this.$refs.classSetting.submit();
     },
-    setTimeList(organCourseTime){
-
-      this.addCourseType.map(course=>{
-        let arr = []
-      if(organCourseTime[course]){
-         arr =organCourseTime[course].split(',')
-      }else {
-        arr = [classTime[course]]
-      } 
-        this.courseTimeForm.timeList.push({type:course,value:'',label:courseType[course],list:arr})
-      })
+    setTimeList(organCourseTime) {
+      this.addCourseType.map((course) => {
+        let arr = [];
+        if (organCourseTime[course]) {
+          arr = organCourseTime[course].split(",");
+        } else {
+          arr = [classTime[course]];
+        }
+        this.courseTimeForm.timeList.push({
+          type: course,
+          value: "",
+          label: courseType[course],
+          list: arr,
+        });
+      });
     },
-    setCourseTime(item,val){
-      console.log(this.payInfo)
-      let obj = {...this.payInfo}
-      for(let k in obj){
-        if( obj[k][item.type]){
-         let courseCurrentPrice =val?val* obj[[k]][item.type].unitPrice:0
-         let courseTotalMinuties = val?val*obj[[k]][item.type].courseTotalNum:0
-           this.$emit('resetPayInfo',item.type,courseCurrentPrice,courseTotalMinuties)
+    setCourseTime(item, val) {
+      console.log(this.payInfo);
+      let obj = { ...this.payInfo };
+      for (let k in obj) {
+        if (obj[k][item.type]) {
+          let courseCurrentPrice = val
+            ? val * obj[[k]][item.type].unitPrice
+            : 0;
+          let courseTotalMinuties = val
+            ? val * obj[[k]][item.type].courseTotalNum
+            : 0;
+          this.$emit(
+            "resetPayInfo",
+            item.type,
+            courseCurrentPrice,
+            courseTotalMinuties
+          );
         }
       }
       this.payInfo = obj;
-    
-    }
+    },
   },
-
 };
 </script>
 <style lang="scss" scoped>
@@ -227,5 +265,4 @@ export default {
 .dialog-footer {
   text-align: right;
 }
-
-</style>
+</style>

+ 21 - 25
src/views/teamDetail/components/modals/classList-group.vue

@@ -12,16 +12,16 @@
         @filterClassList="filterClassList"
       />
     </el-form>
-    <el-button
+    <!-- <el-button
       icon="el-icon-circle-plus-outline"
       plain
       type="info"
       size="small"
       style="width: 100%; margin: 20px 0"
       @click="addClass"
-      :disabled="form.classList.length >= classList.length" 
+      :disabled="form.classList.length >= classList.length"
       >添加班级</el-button
-    >
+    > -->
     <el-dialog
       :visible.sync="showSecondVisable"
       title="缴费信息设置"
@@ -30,10 +30,11 @@
     >
       <classPayList
         :classIdList="classIdList"
-        :addCourseType='addCourseType'
+        :addCourseType="addCourseType"
         :courseTypesByType="courseTypesByType"
         :classMaxCourseNumMap="classMaxCourseNumMap"
         :form="form"
+        :teacherList="teacherList"
         :payInfo.sync="payInfo"
         @resetPayInfo="resetPayInfo"
         @close="showSecondVisable = false"
@@ -47,7 +48,7 @@ import classListItem from "./classList-item";
 import classPayList from "./class-pay-list";
 import { getDefaultPaymentCalender } from "@/api/buildTeam";
 export default {
-  props: ["classList", "courseTypesByType"],
+  props: ["classList", "courseTypesByType", "teacherList"],
   components: { classListItem, classPayList },
   data() {
     return {
@@ -66,7 +67,7 @@ export default {
       showSecondVisable: false,
       classIdList: [],
       activeClassList: [],
-      addCourseType:[]
+      addCourseType: [],
     };
   },
   mounted() {
@@ -105,8 +106,8 @@ export default {
           try {
             let result = await getDefaultPaymentCalender(this.classIdList);
             this.payInfo = result.data.defaultPaymentCalender;
-            this.addCourseType = result.data.groupTypeSet
-            this.classMaxCourseNumMap = result.data.classMaxCourseNumMap
+            this.addCourseType = result.data.groupTypeSet;
+            this.classMaxCourseNumMap = result.data.classMaxCourseNumMap;
             this.showSecondVisable = true;
           } catch {}
         }
@@ -129,7 +130,7 @@ export default {
         });
         this.form.classList.forEach((classes) => {
           if (classes.classId == id) {
-            classes.type = item.type
+            classes.type = item.type;
           }
         });
 
@@ -154,24 +155,19 @@ export default {
         };
       });
     },
-    resetPayInfo(key,value,time){
-       console.log(value,time)
-       console.log(this.payInfo)
-       let obj = {...this.payInfo}
-      for(let k in obj){
-        
-        if( obj[k][key]){
-
-         obj[k][key].courseCurrentPrice=value
-         obj[k][key].courseOriginalPrice=value
-        obj[k][key].courseTotalMinuties= parseInt(time) 
+    resetPayInfo(key, value, time) {
+      console.log(value, time);
+      console.log(this.payInfo);
+      let obj = { ...this.payInfo };
+      for (let k in obj) {
+        if (obj[k][key]) {
+          obj[k][key].courseCurrentPrice = value;
+          obj[k][key].courseOriginalPrice = value;
+          obj[k][key].courseTotalMinuties = parseInt(time);
         }
       }
-      this.payInfo = obj
-   
-     
-    }
-    
+      this.payInfo = obj;
+    },
   },
 };
 </script>

+ 1 - 1
src/views/teamDetail/components/modals/classList-item.vue

@@ -91,7 +91,7 @@ export default {
     return {
       studentList: [],
       studentListModalVisible: false,
-      organizationCourseUnitPriceSettingsByType: [], 
+      organizationCourseUnitPriceSettingsByType: [],
       eclass: [],
       isNoCourse: false,
       activeClassList: [],

+ 7 - 13
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -35,8 +35,10 @@
             :value="String(item.id)"
           ></el-option>
         </el-select>
+         <!-- <remote-search :commit="'setTeachers'" v-model="form.coreTeacher"  /> -->
       </el-form-item>
       <el-form-item label="助教老师" prop="assistant">
+         <!-- <remote-search :commit="'setTeachers'" v-model="form.assistant"  :multiple='true'/> -->
         <el-select
           v-model.trim="form.assistant"
           placeholder="请选择助教老师"
@@ -86,7 +88,7 @@
     </el-form>
     <div slot="footer" class="dialog-footer" v-if="classType != 5">
       <el-button @click="$listeners.close">取 消</el-button>
-      <el-button type="primary" v-if="!isEmpty" @click="submit">确 定</el-button>
+      <el-button type="primary" :disabled="isEmpty" @click="submit">确 定</el-button>
     </div>
   </div>
 </template>
@@ -133,10 +135,8 @@ const plusNum = (items = [], key) => {
 
 export default {
   props: [
-    "teacherList",
     "activeType",
     "courseTypeList",
-    "cooperationList",
     "musicGroupId",
     "detail",
     "studentSubmitedData",
@@ -145,7 +145,9 @@ export default {
     "classIdList",
     "classGroupStudents",
     "selectPrices",
-    "classCouresTimeList"
+    "classCouresTimeList",
+    "teacherList",
+    "cooperationList"
   ],
   components: {
     courseItem,
@@ -256,6 +258,7 @@ export default {
           console.log(error);
         }
         }
+        // console.log(res);
         if (Object.keys(res).length <= 0) return;
         this.musicCourseSettings = res.data;
 
@@ -278,15 +281,6 @@ export default {
         // this.courseTimes = courseTimes
 
     },
-    changeTag(key) {
-      const clas = {...this.form.classs}
-      if (clas[key]) {
-        delete clas[key]
-      } else {
-        clas[key] = this.allClasss[key]
-      }
-      this.$set(this.form, 'classs', clas)
-    },
     submit() {
       this.$refs.form.validate(async (valid) => {
         if (valid) {

+ 1 - 1
src/views/teamDetail/components/modals/school-location.vue

@@ -2,7 +2,7 @@
   <el-amap
     :zoom="14"
     ref="map"
-    vid="amapDemo"
+    vid="amapDemo1"
     style="height: 300px;"
     :amap-manager="amapManager"
     :center="center"

+ 4 - 4
src/views/teamDetail/components/modals/student-reset-view.vue

@@ -6,7 +6,7 @@
               class="alert"
               show-icon>
     </el-alert>
-    <classListGroup :classList="classList" ref='classListGroup' :courseTypesByType='courseTypesByType'/>
+    <classListGroup :classList="classList" ref='classListGroup' :courseTypesByType='courseTypesByType' :teacherList='teacherList'/>
      <div slot="footer" class="dialog-footer">
       <el-button @click="close">取 消</el-button>
       <el-button  type="primary" @click="gotoSecond">下一步</el-button>
@@ -17,7 +17,7 @@
 <script>
 import classListGroup from './classList-group'
 export default {
-  props: ['classList','courseTypesByType'],
+  props: ['classList','courseTypesByType','teacherList'],
   components: {
     classListGroup
   },
@@ -41,6 +41,6 @@ export default {
 }
 .dialog-footer {
   float: right;
-  
+
 }
-</style>
+</style>

+ 18 - 4
src/views/teamDetail/components/modals/view-student-list.vue

@@ -6,11 +6,13 @@
       style
       :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
       tooltip-effect="dark"
-      
+
        @selection-change="handleSelectionChange"
+       max-height='300px'
     >
      <el-table-column v-if="isChiose"
       type="selection"
+      :selectable="checkSelectable"
       width="55">
     </el-table-column>
       <el-table-column
@@ -45,7 +47,7 @@
       ></el-table-column>
       <el-table-column
         prop="subjectNames"
-        align="center"       
+        align="center"
         label="专业"
       ></el-table-column>
     </el-table>
@@ -57,7 +59,7 @@
 </template>
 <script>
 export default {
-  props: ['list','isChiose','chioseList','showOk'],
+  props: ['list','isChiose','chioseList','showOk','disabledList'],
   data(){
     return{
       selectList:this.chioseList
@@ -77,6 +79,17 @@ export default {
   methods:{
     handleSelectionChange(val){
       this.selectList = val
+    },
+    checkSelectable(row){
+      let flag = true
+      if(this.disabledList&&this.disabledList.length >0){
+        this.disabledList.forEach(stu=>{
+          if(stu.userId == row.userId){
+            flag = false
+          }
+        })
+      }
+      return flag
     }
   }
 };
@@ -87,6 +100,7 @@ export default {
 }
   .dialog-footer {
   float: right;
- 
+
 }
+
 </style>

+ 109 - 59
src/views/teamDetail/components/resetClass.vue

@@ -157,7 +157,7 @@
               @click="studentResetVisiable = true"
               v-if="permission('classGroup/mergeClassSplitClassAffirm')"
             >
-              学员班级调整
+              拆分班级
             </div>
           </div>
           <div class="right">
@@ -346,10 +346,23 @@
             { required: true, message: '请选择主教老师', trigger: 'blur' },
           ]"
         >
-          <remote-search
+          <el-select
+            v-model.trim="newClassForm.bishop"
+            placeholder="请选择主教老师"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="(item, index) in teacherList"
+              :key="index"
+              :label="item.realName"
+              :value="String(item.id)"
+            ></el-option>
+          </el-select>
+          <!-- <remote-search
             :commit="'setTeachers'"
             v-model="newClassForm.bishop"
-          />
+          /> -->
         </el-form-item>
         <el-form-item
           label="预计招生数"
@@ -368,15 +381,34 @@
         </el-form-item>
         <el-form-item
           label="助教老师"
-          v-if="newClassForm.type != 'HIGH_ONLINE'"
+          v-if="
+            newClassForm.type != 'HIGH_ONLINE' &&
+            newClassForm.type != 'HIGH' &&
+            newClassForm.type
+          "
           prop="teaching"
         >
-          <remote-search
+          <el-select
+            v-model.trim="newClassForm.teaching"
+            placeholder="请选择助教老师"
+            filterable
+            clearable
+            multiple
+            @change="setAssistant1"
+          >
+            <el-option
+              v-for="(item, index) in cooperationList"
+              :key="index"
+              :label="item.realName"
+              :value="item.id"
+            ></el-option>
+          </el-select>
+          <!-- <remote-search
             :commit="'setTeachers'"
             v-model="newClassForm.teaching"
             @change="setAssistant1"
             :multiple="true"
-          />
+          /> -->
         </el-form-item>
         <el-form-item
           label="声部"
@@ -394,7 +426,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item
+        <!-- <el-form-item 辜经理和焕焕狗要求不要可选声部
           label="可报名声部"
           prop="memo"
           :rules="[
@@ -418,7 +450,7 @@
               :value="item.id"
             ></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item
           label="网络教室声部"
           prop="subjectId"
@@ -462,6 +494,7 @@
       :visible.sync="studentResetVisiable"
     >
       <studentResetView
+        :teacherList="teacherList"
         :courseTypesByType="courseTypesByType"
         v-if="studentResetVisiable"
         :classList="mergeList"
@@ -503,7 +536,7 @@ import { queryEmployByOrganId } from "@/api/systemManage";
 import { diffTimerFormMinute, addTimerFormMinute } from "@/utils/date";
 import dayjs from "dayjs";
 import axios from "axios";
-import { classTimeList,musicClassTypeList } from "@/utils/searchArray";
+import { classTimeList, musicClassTypeList } from "@/utils/searchArray";
 import viewStudentList from "./modals/view-student-list";
 import selectStudent from "./modals/select-student";
 import classroomSetting from "./modals/classroom-setting";
@@ -522,6 +555,7 @@ export default {
   },
   data() {
     return {
+      musicGroupInfos: this.musicGroupInfo,
       classType: 0,
       pickerOptions: {
         firstDayOfWeek: 1,
@@ -651,9 +685,9 @@ export default {
   created() {
     this.init();
   },
-  activated() {
-    this.init();
-  },
+  // activated() {
+  //   this.init();
+  // },
   mounted() {},
   methods: {
     permission(val) {
@@ -661,45 +695,58 @@ export default {
     },
     async init() {
       this.teamid = this.$route.query.id;
-      this.organId = this.musicGroupInfo.organId;
-      this.chargeTypeId = this.musicGroupInfo.chargeTypeId;
-      // 根据分部id和缴费类型获取 可选课程类型
-      try {
-        if (this.organId && this.chargeTypeId) {
-          const res = await getOrganizationCourseUnitPriceSettings({
-            chargeTypeId: this.chargeTypeId,
-            organId: this.organId,
-            rows: 9999,
-          });
-          const d = {};
-          this.courseTypes = res.data.rows;
-          for (const item of this.courseTypes) {
-            d[item.courseType] = item;
+      if (this.musicGroupInfo) {
+        this.organId = this.musicGroupInfos.organId;
+        this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
+      } else {
+        getTeamBaseInfo({ musicGroupId: this.teamid }).then((res) => {
+          if (res.code == 200) {
+            this.musicGroupInfos = res.data.musicGroup;
+            this.organId = this.musicGroupInfos.organId;
+            this.chargeTypeId = this.musicGroupInfos.chargeTypeId;
           }
-          this.courseTypesByType = d;
-        }
-      } catch (error) {}
-      // 根据乐团id获取乐团所属分部
-      getTeacher({ organId: this.organId }).then((res) => {
-        if (res.code == 200) {
-          this.cooperationList = res.data;
-          this.teacherList = res.data;
-        }
-      });
-      getAllClass({ musicGroupId: this.teamid }).then((res) => {
-        if (res.code == 200) {
-          this.maxClassList = res.data;
-        }
-      });
+        });
+      }
+      this.$nextTick(async (res) => {
+        try {
+          if (this.organId && this.chargeTypeId) {
+            const res = await getOrganizationCourseUnitPriceSettings({
+              chargeTypeId: this.chargeTypeId,
+              organId: this.organId,
+              rows: 9999,
+            });
+            const d = {};
+            this.courseTypes = res.data.rows;
+            for (const item of this.courseTypes) {
+              d[item.courseType] = item;
+            }
+            this.courseTypesByType = d;
+            console.log(this.courseTypesByType);
+          }
+        } catch (error) {}
+        // 根据乐团id获取乐团所属分部
+        getTeacher({ organId: this.organId }).then((res) => {
+          if (res.code == 200) {
+            this.cooperationList = res.data;
+            this.teacherList = res.data;
+          }
+        });
+        getAllClass({ musicGroupId: this.teamid }).then((res) => {
+          if (res.code == 200) {
+            this.maxClassList = res.data;
+          }
+        });
 
-      // 获取默认乐团内的所有班
-      this.changeMixClass();
-      // 根据乐团id获取乐团的所有声部
-      findSound({ musicGroupId: this.teamid }).then((res) => {
-        if (res.code == 200) {
-          this.soundList = res.data;
-        }
+        // 获取默认乐团内的所有班
+        this.changeMixClass();
+        // 根据乐团id获取乐团的所有声部
+        findSound({ musicGroupId: this.teamid }).then((res) => {
+          if (res.code == 200) {
+            this.soundList = res.data;
+          }
+        });
       });
+      // 根据分部id和缴费类型获取 可选课程类型
     },
     studentSubmited(data) {
       if (!this.isOnlyChangeUser) {
@@ -743,10 +790,11 @@ export default {
         (res) => {
           if (res.code == 200) {
             this.activeSingleList = res.data;
-            this.mergeList = res.data.filter((item) => {
-              return item.type != "MUSIC_NETWORK";
-            });
-
+            if (res.data?.length > 0) {
+              this.mergeList = res.data.filter((item) => {
+                return item.type != "MUSIC_NETWORK";
+              });
+            }
             // this.topForm.count = this.activeSingleList.length
           }
         }
@@ -771,7 +819,7 @@ export default {
     },
     setType(type) {
       this.courseTypeList = getCourseType(type);
-      this.activeSoundList = this.soundList
+      this.activeSoundList = this.soundList;
     },
     // 新增班级
     addNewClass(type) {
@@ -1311,9 +1359,11 @@ export default {
       this.changeMemo([]);
     },
     setAssistant1(val) {
-      for (let i in val) {
-        if (val[i] == this.newClassForm.bishop) {
-          val.splice(i, 1);
+      if (val) {
+        for (let i in val) {
+          if (val[i] == this.newClassForm.bishop) {
+            val.splice(i, 1);
+          }
         }
       }
     },
@@ -1367,14 +1417,14 @@ export default {
       }
     },
     chioseHightype(val) {
-     this.changeMemo([]);
+      this.changeMemo([]);
       if (val == "HIGH_ONLINE") {
         this.newClassForm.teaching = [];
       }
       this.newClassForm.subjectId = "";
       this.$set(this.newClassForm, "subjectIdList", []);
       this.$set(this.newClassForm, "memo", []);
-      },
+    },
     changeStartClassTime(item) {
       // item.endClassTime = ''
       this.$set(item, "endClassTime", "");
@@ -1513,7 +1563,7 @@ export default {
           teaching: null,
           memo: [],
         };
-        this.resetClassFrom()
+        this.resetClassFrom();
       }
     },
   },

+ 8 - 1
src/views/teamDetail/components/studentList.vue

@@ -230,13 +230,16 @@
         </el-table-column>
         <el-table-column align="center"
                          fixed="right"
-                         width="340px;"
+                         width="360px;"
                          label="操作">
           <template slot-scope="scope">
             <div>
               <el-button type="text"
                          v-if="permission('studentManage/queryStudentClassGroup')&&scope.row.studentStatus != 'QUIT'"
                          @click="lookClass(scope.row)">查看班级</el-button>
+              <el-button type="text"
+                         v-if="permission('musicGroupPaymentCalender/add') && scope.row.studentStatus == 'APPLY' && scope.row.paymentStatus == '0'"
+                         @click="addPay(scope.row)">添加缴费</el-button>
 
               <el-button type="text"
                          v-if="permission('musicGroupQuit/directQuitMusicGroup')&&scope.row.studentStatus != 'QUIT'"
@@ -1018,6 +1021,10 @@ export default {
         }
       });
     },
+    addPay(row) {
+      this.createUserPayVisible = true;
+      this.createdUserId = row.userId;
+    },
     addCycle() {
       this.cycles.push({});
       this.collapse.push(this.collapse.length);

+ 163 - 18
src/views/teamDetail/teamClassList.vue

@@ -7,12 +7,13 @@
     </h2>
     <div class="m-core">
       <save-form
+      ref="searchForm"
         :inline="true"
         :model="searchForm"
         @submit="search"
         @reset="onReSet"
       >
-        <el-form-item>
+        <el-form-item prop="search">
           <el-input
             v-model.trim="searchForm.search"
             clearable
@@ -20,10 +21,11 @@
             placeholder="请输入乐团编号"
           ></el-input>
         </el-form-item>
-        <el-form-item>
+        <el-form-item prop="organIdList">
           <el-select
             class="multiple"
             filterable
+            multiple
             style="width: 180px !important"
             v-model.trim="searchForm.organIdList"
             clearable
@@ -38,13 +40,8 @@
           </el-select>
         </el-form-item>
         <!-- musicClassTypeList -->
-         <el-form-item >
-          <el-select
-            v-model.trim="searchForm.type"
-            clearable
-            filterable
-            @change="changeMixClass"
-          >
+        <el-form-item prop="type">
+          <el-select v-model.trim="searchForm.type" clearable filterable>
             <el-option
               v-for="(item, index) in musicClassTypeList"
               :key="index"
@@ -64,11 +61,100 @@
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="tableList"
         >
+          <el-table-column align="center" prop="musicGroupId" label="乐团编号">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.musicGroupId }}</copy-text>
+            </template>
+          </el-table-column>
           <el-table-column
             align="center"
-            prop="studentId"
-            label="分部"
+            prop="musicGroupName"
+            label="乐团名称"
           ></el-table-column>
+          <el-table-column align="center" prop="organName" label="分部名称">
+            <template slot-scope="scope">
+              <copy-text>{{ scope.row.organName }}</copy-text>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="name"
+            label="班级名称"
+          ></el-table-column>
+          <el-table-column align="center" prop="type" label="班级类型">
+            <template slot-scope="scope">
+              <div>{{ scope.row.type | classType }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="studentNum"
+            label="当前班级人数"
+          >
+            <template slot-scope="scope">
+              <div>{{ scope.row.studentNum }}人</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" prop label="主教老师">
+            <template slot-scope="scope">
+              <div v-if="scope.row.classGroupTeacherMapperList">
+                <p
+                  v-for="(item, index) in scope.row.classGroupTeacherMapperList"
+                  v-if="item.teacherRole == 'BISHOP'"
+                  :key="index"
+                >
+                  {{ item.userName }}
+                </p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="助教老师">
+            <template slot-scope="scope">
+              <div v-if="scope.row.classGroupTeacherMapperList">
+                <p
+                  v-for="(item, index) in scope.row.classGroupTeacherMapperList"
+                  v-if="item.teacherRole == 'TEACHING'"
+                  :key="index"
+                >
+                  {{ item.userName }}
+                </p>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="已上课时">
+            <template slot-scope="scope">
+              <div>{{ scope.row.currentClassTimes }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="总课数">
+            <template slot-scope="scope">
+              <div>{{ scope.row.totalClassTimes }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="操作">
+            <template slot-scope="scope">
+              <el-button
+                type="text"
+                @click="addCompound(scope.row)"
+                v-if="
+                  scope.row.type != 'MUSIC_NETWORK' &&
+                  scope.row.type != 'HIGH_ONLINE' &&scope.row.type != 'HIGH'&&
+                  !isAddCom(scope.row) &&
+                  permission('classGroup/spanGroupMergeClassSplitClassAffirm')
+                "
+                >添加合班</el-button
+              >
+              <el-button
+                type="text"
+                v-if="
+                  isAddCom(scope.row) &&
+                  permission('classGroup/spanGroupMergeClassSplitClassAffirm')
+                "
+                @click="cancleCompound(scope.row)"
+                >取消合班</el-button
+              >
+            </template>
+          </el-table-column>
         </el-table>
         <pagination
           sync
@@ -80,6 +166,10 @@
         />
       </div>
     </div>
+    <classCompound :compoundList='compoundList' v-if="permission('classGroup/spanGroupMergeClassSplitClassAffirm')"
+                 @clearCom='clearCom'
+                 @getList='getList'
+                 @cancleCompound='cancleCompound'/>
   </div>
 </template>
 
@@ -89,17 +179,21 @@ import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import { musicClassTypeList } from "@/utils/searchArray";
+import { getClassGroupPage } from "@/api/buildTeam";
+import { permission } from "@/utils/directivePage";
+import classCompound from "./componentClass/classCompound"
 export default {
-  components: { pagination },
+  components: { pagination,classCompound },
   data() {
     return {
       searchForm: {
         search: null,
-        organIdList:'',
-        type:''
+        organIdList: [],
+        type: "",
       },
       musicClassTypeList,
       tableList: [],
+      compoundList:[],
       rules: {
         // 分页规则
         limit: 10, // 限制显示条数
@@ -114,17 +208,68 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     // 获取分部
-
+    this.$store.dispatch("setBranchs");
     this.init();
   },
   methods: {
-    init() {},
-    getList() {},
+    init() {
+      this.getList();
+    },
+    async getList() {
+      try {
+        let { organIdList, ...result } = this.searchForm;
+        console.log(result)
+        let obj = {
+          ...result,
+          organIdList: this.searchForm.organIdList.join(","),
+          page: this.rules.page,
+          rows: this.rules.limit,
+        };
+        const res = await getClassGroupPage(obj);
+        this.rules.total = res.data.total;
+        this.tableList = res.data.rows;
+      } catch (err) {
+        console.log(err);
+      }
+    },
     search() {
       this.rules.page = 1;
       this.getList();
     },
-    onReSet() {},
+    onReSet() {
+      this.$refs.searchForm.resetFields()
+      this.search()
+    },
+       addCompound (row) {
+      this.compoundList.push(row)
+      this.compoundList = [...new Set(this.compoundList)]
+    },
+    isAddCom (row) {
+      let flag = false
+      this.compoundList.forEach(com => {
+        if (com.id == row.id) {
+          flag = true
+        }
+      })
+      return flag
+    },
+    cancleCompound (row) {
+      let indexNum = null
+      this.compoundList.forEach((com, index) => {
+        if (com.id == row.id) {
+          indexNum = index
+        }
+      })
+      if (indexNum + '') {
+        this.compoundList.splice(indexNum, 1)
+      }
+    },
+    clearCom () {
+      this.compoundList = []
+    },
+    permission(str, parent) {
+      return permission(str, parent);
+    },
   },
 };
 </script>