Browse Source

1104 18:38

mo 5 years ago
parent
commit
918e812844

+ 37 - 0
src/api/buildTeam.js

@@ -544,6 +544,15 @@ export function revisionClassGroup (data) {
     data
   })
 }
+
+// 班级调整新增班级
+export function revisionAddClassGroup (data) {
+  return request({
+    url: api + `/classGroup/revisionAddClassGroup`,
+    method: 'POST',
+    data
+  })
+}
 // 恢复乐团
 export function resumeMusicGroup (data) {
   return request({
@@ -561,3 +570,31 @@ export function pauseMusicGroup (data) {
     data: qs.stringify(data)
   })
 }
+
+
+// 修改乐团招生计划
+export function resetPlanNum (data) {
+  return request({
+    url: api + `/musicGroup/updateExpectedStudentNum`,
+    method: 'POST',
+    data
+  })
+}
+
+// 获取乐团声部设置信息
+export function findMusicGroupSubjectInfo (data) {
+  return request({
+    url: api + `/musicGroup/findMusicGroupSubjectInfo`,
+    method: 'get',
+    params: data
+  })
+}
+
+// 修改乐团声部信息
+export function updateSubjectInfo (data) {
+  return request({
+    url: api + `/musicGroup/updateSubjectInfo`,
+    method: 'POST',
+    data
+  })
+}

+ 13 - 7
src/utils/vueFilter.js

@@ -37,11 +37,15 @@ Vue.filter('shopType', (value) => {
 // 乐团状态
 Vue.filter('musicGroupType', (value) => {
   let template = {
-    APPLY: '报名中',
-    PAY: '缴费中',
-    PREPARE: '筹备中',
-    UNDERWAY: '进行中',
-    CANCELED: '取消'
+    APPLY: "报名中",
+    PAY: "缴费中",
+    PREPARE: "筹备中",
+    PROGRESS: "进行中",
+    CANCELED: '取消',
+    PAUSE: '暂停',
+    AUDIT: '审核中',
+    DRAFT: '编辑中',
+    AUDIT_FAILED: '审核失败'
   }
   return template[value]
 })
@@ -219,7 +223,6 @@ Vue.filter('paymentStatus', value => {
   let template = ['未开启缴费', '开启缴费', '已缴费']
   return template[value]
 })
-
 // 乐团状态
 Vue.filter('teamStatus', value => {
   let template = {
@@ -228,7 +231,10 @@ Vue.filter('teamStatus', value => {
     PREPARE: "筹备中",
     PROGRESS: "进行中",
     CANCELED: '取消',
-    PAUSE: '暂停'
+    PAUSE: '暂停',
+    AUDIT: '审核中',
+    DRAFT: '编辑中',
+    AUDIT_FAILED: '审核失败'
   }
   return template[value]
 })

+ 75 - 16
src/views/teamBuild/components/teamBaseInfo.vue

@@ -83,6 +83,7 @@
                       prop='time'
                       :rules="[{ required: true, message: '请输入报名截止时间'},]">
           <el-date-picker v-model="topFrom.time"
+                          style="width:100%!important"
                           type="date"
                           value-format="yyyy-MM-dd"
                           placeholder="选择日期">
@@ -127,14 +128,18 @@
                       :rules="[{ required: true, message: '请选择课酬结算标准'},]"
                       prop="salary">
           <el-select v-model="topFrom.salary">
-            <el-option label="课时默认结算"
+            <el-option label="默认课酬"
                        value="TEACHER_DEFAULT"></el-option>
-            <el-option label="课时梯度结算"
+            <el-option label="3.0课酬"
                        value="GRADIENT_SALARY"></el-option>
-            <el-option label="课堂课酬"
-                       value="CLASSROOM_SALARY"></el-option>
+            <!-- <el-option label="课堂课酬"
+                       value="CLASSROOM_SALARY"></el-option> -->
           </el-select>
         </el-form-item>
+        <el-form-item label=""
+                      prop="isClass">
+          <el-checkbox v-model="topFrom.isClass">课堂课乐团</el-checkbox>
+        </el-form-item>
         <el-form-item label="教学主任"
                       v-if="activeTeam.length > 0"
                       prop='head'>
@@ -301,11 +306,13 @@
            @click="resetSubmit">
         修改
       </div>
+      <!-- 审批或者草稿的下一步 -->
       <div class="nextBtn"
            @click="gotoNext(1)"
-           v-if="teamStatus=='newTeam'">
+           v-if="teamStatus=='newTeam' || teamStatus=='teamDraft'">
         下一步
       </div>
+      <!-- 跨团调整的下一步 -->
       <div class="nextBtn"
            v-if="teamStatus=='teamList'"
            @click="gotoNext(2)">
@@ -380,7 +387,8 @@ export default {
         startClass: [], // 招生年级起始
         address: '', // 教学地点
         salary: '', // 收费模式
-        head: ''
+        head: '',
+        isClass: false, //是否为课堂课
       },
       checkList: {
         soundInfo: { // 声部
@@ -441,9 +449,11 @@ export default {
     }
   },
   created () {
-    // 分为3种  this.teamStatus 1.resetTeam 乐团修改
+    // 分为3种  this.teamStatus 
+    //          1.resetTeam 乐团修改
     //          2. newTeam  新建乐团
     //          3.teamList 跨团修改
+    //          4.teamDraft 乐团草稿
     let year = new Date().getFullYear();
     axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
       // this.holidayList = Object.keys(res.data[year])
@@ -452,7 +462,7 @@ export default {
     // 传过来的乐团信息
     this.activeTeam = this.getTeamList;
 
-    if (this.teamStatus == 'resetTeam') {
+    if (this.teamStatus == 'resetTeam' || this.teamStatus == 'teamDraft') {
       // 单团修改
       this.teamid = this.$route.query.id;
       getTeamBaseInfo({ musicGroupId: this.teamid }).then(res => {
@@ -469,6 +479,7 @@ export default {
           this.topFrom.address = res.data.musicGroup.schoolId;
           this.topFrom.salary = res.data.musicGroup.settlementType;
           this.topFrom.head = res.data.musicGroup.directorUserId;
+          this.topFrom.isClass = res.data.musicGroup.isClassroomLessons
           // 课程组成形式
           this.checkList = JSON.parse(res.data.musicGroup.courseForm);
           // 付费方式和周期
@@ -494,6 +505,8 @@ export default {
               this.payList.student.chiose = 'ONE_OFF'
             }
           }
+          // 循环缴费月
+          this.payList.chioseMonth = res.data.months;
         }
       })
     }
@@ -551,10 +564,17 @@ export default {
         if (!valid) {
           this.$message.error('请填写建团必要参数')
         } else {
-          this.$store.dispatch('topinfo', this.topFrom);
-          this.$store.dispatch('checkinfo', this.checkList);
-          this.$store.dispatch('getpayInfo', this.payList);
-          this.$emit('chiosetab', num);
+          // 验证通过
+          if (this.teamStatus == 'teamDraft') {
+            // 获取数据提交
+            this.resetSubmit();
+          } else {
+            this.$store.dispatch('topinfo', this.topFrom);
+            this.$store.dispatch('checkinfo', this.checkList);
+            this.$store.dispatch('getpayInfo', this.payList);
+            this.$emit('chiosetab', num);
+          }
+
         }
       })
     },
@@ -563,8 +583,32 @@ export default {
         if (!valid) {
           this.$message.error('请填写必要参数')
         } else {
+          let status = null;
+          // 1.resetTeam 乐团修改
+          //          2. newTeam  新建乐团
+          //          3.teamList 跨团修改
+          //          4.teamDraft 乐团草稿
+          switch (this.teamStatus) {
+            case 'resetTeam': {
+              status = 'PROGRESS'
+              break
+            }
+            case 'newTeam': {
+              status = null
+              break
+            }
+            case 'teamList': {
+              status = null
+              break
+            }
+            case 'teamDraft': {
+              status = 'DRAFT'
+              break
+            }
+          }
           let obj = {};
-          this.payList.student.chiose == 'loop' ? obj.months = this.chioseMonth : obj.months = [];
+
+          this.payList.student.chiose == 'loop' ? obj.months = this.payList.chioseMonth : obj.months = [];
           obj.musicGroup = {
             settlementType: this.topFrom.salary,
             applyExpireDate: this.topFrom.time + ' 00:00:01',
@@ -579,7 +623,9 @@ export default {
             schoolId: this.topFrom.address,
             courseForm: JSON.stringify(this.checkfor),
             id: this.teamid,
-            directorUserId: this.topFrom.head
+            directorUserId: this.topFrom.head,
+            isClassroomLessons: this.topFrom.isClass,
+            status
           }
           obj.musicGroupPaymentEntities = []
           // 添加学校主体付费方式
@@ -605,8 +651,21 @@ export default {
           // 发请求
           resetTeamBaseInfo(obj).then(res => {
             if (res.code == 200) {
-              this.$message.success('修改乐团成功')
-              this.$router.push({ path: '/business/teamDetails', query: { id: this.teamid, name: this.topFrom.name } })
+              this.$message.success('保存成功')
+              if (this.teamStatus == 'teamDraft') {
+                // 跳到第二页
+                // 这里要删掉
+                this.$store.dispatch('topinfo', this.topFrom);
+                this.$store.dispatch('checkinfo', this.checkList);
+                this.$store.dispatch('getpayInfo', this.payList);
+                // 删掉结束
+                this.$emit('chiosetab', 1);
+
+              } else {
+                this.$message.success('修改乐团成功')
+                this.$router.push({ path: '/business/teamDetails', query: { id: this.teamid, name: this.topFrom.name } })
+              }
+
             }
           })
         }

+ 213 - 145
src/views/teamBuild/components/teamSoundMoney.vue

@@ -141,27 +141,6 @@
                          prop="jiaopu">
           <template slot-scope="scope">
             <div>
-              <!-- <el-popover placement="bottom"
-                          v-model="scope.row.markVisible"
-                          @show="chioseMark"
-                          v-if='scope.row.type == 1'>
-                <div slot='reference'
-                     class='chiose'>
-                  操作
-                </div>
-                <el-input v-model="scope.row.fangshi"></el-input>
-                1111
-                <div style="text-align: right; margin: 0">
-                  <el-button size="mini"
-                             type="text"
-                             @click="scope.row.provideVisible = false">取消</el-button>
-                  <el-button type="primary"
-                             size="mini"
-                             @click="scope.row.provideVisible  = false">确定</el-button>
-                </div>
-              </el-popover> -->
-              <!-- scope.row.markVisible = true -->
-
               <el-dialog :visible.sync="scope.row.markVisible"
                          style="text-align:left;"
                          width="60%">
@@ -278,13 +257,15 @@
       <div class="PrevBtn"
            @click="goback">上一步</div>
       <div class="submitBtn"
-           @click="submitInfo">提交</div>
+           @click="submitInfo(1)">保存</div>
+      <div class="submitBtn"
+           @click="submitInfo(2)">提交</div>
     </div>
   </div>
 </template>
 <script>
 import store from '@/store'
-import { getSubject, getDefaultSubject, getGoods, createTeam, getSoundTree } from '@/api/buildTeam'
+import { getSubject, getDefaultSubject, getGoods, createTeam, getSoundTree, findMusicGroupSubjectInfo, updateSubjectInfo } from '@/api/buildTeam'
 export default {
   data () {
     return {
@@ -297,7 +278,9 @@ export default {
       isLoop: '', // 是否显示周期循环
       payfor: {},
       topfor: {},
-      checkfor: {}
+      checkfor: {},
+      teamStatus: '',
+      teamid: ''
     }
   },
   methods: {
@@ -375,6 +358,7 @@ export default {
     },
     // 根据声部id查询可选教辅
     chioseMark (row) {
+      console.log(row);
       row.markVisible = true
       let id = row.id;
       getGoods({ 'subjectId': id, 'type': 'ACCESSORIES' }).then(res => {
@@ -402,129 +386,155 @@ export default {
     goback () {
       this.$emit('chiosetab', 0);
     },
-    submitInfo () {
-      // 整理数据提交
-      let obj = {};
-      this.payfor.student.chiose == 'loop' ? obj.months = this.payfor.chioseMonth : obj.months = [];
-      obj.musicGroup = {
-        settlementType: this.topfor.salary,
-        applyExpireDate: this.topfor.time + ' 00:00:01',
-        chargeTypeId: this.topfor.type,
-        cooperationOrganId: this.topfor.school,
-        teamTeacherId: this.topfor.boss,
-        educationalTeacherId: this.topfor.teacher,
-        enrollClasses: this.topfor.startClass.join(','),
-        name: this.topfor.name,
-        organId: this.topfor.section,
-        // paymentMonths:obj.months  有待确认
-        schoolId: this.topfor.address,
-        courseForm: JSON.stringify(this.checkfor)
-      }
-      obj.musicGroupPaymentEntities = []
-      // 添加学校主体付费方式
-      if (this.payfor.school.ischeck) {
-        obj.musicGroupPaymentEntities.push({
-          'amount': this.payfor.school.price,
-          'memo': this.payfor.school.value,
-          'paymentMethod': this.payfor.school.chiose,
-          'name': '学校'
-        })
-      }
-      // 添加公司主体付费方式
-      if (this.payfor.company.ischeck) {
-        obj.musicGroupPaymentEntities.push({
-          'amount': this.payfor.company.price,
-          'memo': this.payfor.company.value,
-          'paymentMethod': this.payfor.company.chiose,
-          'name': '公司'
-        })
+    submitInfo (type) {
+      let status;
+      if (type == 1) {
+        // 保存
+        status = 'DRAFT'
+      } else if (type == 2) {
+        // 提交
+        status = 'AUDIT'
       }
-      let activeSoundList = this.activeSoundList
-      // 添加商品以及教辅
-      obj.musicGroupSubjectGoodsGroups = []
-      obj.musicGroupSubjectPlans = []
-      activeSoundList.forEach(active => {
-        // 乐器
-        active.zhonglei.forEach(zl => {
-          let some = {
+      // 整理数据提交
+      if (this.teamStatus == 'newTeam') {
+        let obj = {};
+
+        obj.months = this.payfor.chioseMonth || [];
+        let enrollClasses;
+        this.topfor.startClass ? enrollClasses = this.topfor.startClass.join(',') : enrollClasses = null;
+        obj.musicGroup = {
+          settlementType: this.topfor.salary,
+          applyExpireDate: this.topfor.time + ' 00:00:01',
+          chargeTypeId: this.topfor.type,
+          cooperationOrganId: this.topfor.school,
+          teamTeacherId: this.topfor.boss,
+          educationalTeacherId: this.topfor.teacher,
+          enrollClasses,
+          name: this.topfor.name,
+          organId: this.topfor.section,
+          // paymentMonths:obj.months  有待确认
+          schoolId: this.topfor.address,
+          courseForm: JSON.stringify(this.checkfor),
+          isClassroomLessons: this.topfor.isClass,
+          status
+        }
+        obj.musicGroupPaymentEntities = []
+        // 添加学校主体付费方式
+        if (this.payfor.school.ischeck) {
+          obj.musicGroupPaymentEntities.push({
+            'amount': this.payfor.school.price,
+            'memo': this.payfor.school.value,
+            'paymentMethod': this.payfor.school.chiose,
+            'name': '学校'
+          })
+        }
+        // 添加公司主体付费方式
+        if (this.payfor.company.ischeck) {
+          obj.musicGroupPaymentEntities.push({
+            'amount': this.payfor.company.price,
+            'memo': this.payfor.company.value,
+            'paymentMethod': this.payfor.company.chiose,
+            'name': '公司'
+          })
+        }
+        let activeSoundList = this.activeSoundList
+        // 添加商品以及教辅
+        obj.musicGroupSubjectGoodsGroups = []
+        obj.musicGroupSubjectPlans = []
+        activeSoundList.forEach(active => {
+          // 乐器
+          active.zhonglei.forEach(zl => {
+            let some = {
+              subjectId: active.id,
+              type: 'INSTRUMENT',
+              goodsIdList: zl
+            }
+            obj.musicGroupSubjectGoodsGroups.push(some);
+          })
+
+          // 附件
+          active.markList.forEach(mark => {
+            let some = {
+              subjectId: active.id,
+              type: 'ACCESSORIES',
+              goodsIdList: mark.goods,
+              name: mark.name,
+              price: mark.price
+            }
+            obj.musicGroupSubjectGoodsGroups.push(some);
+          })
+
+          // 添加声部
+          let item = {
+            expectedStudentNum: active.jihua,
+            fee: active.yuji,
+            kitGroupPurchaseType: active.fangshi,
+            subName: active.sound,
             subjectId: active.id,
-            type: 'INSTRUMENT',
-            goodsIdList: zl
+            depositFee: active.fangshiprice // depositFee  只有租赁才有
           }
-          obj.musicGroupSubjectGoodsGroups.push(some);
+          obj.musicGroupSubjectPlans.push(item);
         })
+        createTeam(obj).then(res => {
+          if (res.code == 200) {
+            // 成功 跳转到乐团报名详情
+            this.$router.push({ path: '/business/teamDetail' })
+          }
+        })
+      } else {
+        // 只提交第二页的数据
+        let obj = {};
+        let activeSoundList = this.activeSoundList
+        // 添加商品以及教辅
+        obj.musicGroupId = this.teamid
+        obj.musicGroupSubjectGoodsGroups = []
+        obj.musicGroupSubjectPlans = []
+        activeSoundList.forEach(active => {
+          // 乐器
+          active.zhonglei.forEach(zl => {
+            let some = {
+              subjectId: active.id,
+              type: 'INSTRUMENT',
+              goodsIdList: zl
+            }
+            obj.musicGroupSubjectGoodsGroups.push(some);
+          })
 
-        // 遍历声部里的乐器
-        active.markList.forEach(mark => {
-          let some = {
+          // 遍历声部里的教辅
+          active.markList.forEach(mark => {
+            let some = {
+              subjectId: active.id,
+              type: 'ACCESSORIES',
+              goodsIdList: mark.goods ? mark.goods.join(',') : '',
+              name: mark.name,
+              price: mark.price
+            }
+            obj.musicGroupSubjectGoodsGroups.push(some);
+          })
+          // 添加声部
+          let item = {
+            expectedStudentNum: active.jihua,
+            fee: active.yuji,
+            kitGroupPurchaseType: active.fangshi,
+            subName: active.sound,
             subjectId: active.id,
-            type: 'ACCESSORIES',
-            goodsIdList: mark,
-            name: mark.name,
-            price: mark.price
+            depositFee: active.fangshiprice // depositFee  只有租赁才有
           }
-          obj.musicGroupSubjectGoodsGroups.push(some);
+          obj.musicGroupSubjectPlans.push(item);
         })
+        // 发请求修改声部信息
+        updateSubjectInfo(obj).then(res => {
 
-        // 添加声部
-
-
-        let item = {
-          expectedStudentNum: active.jihua,
-          fee: active.yuji,
-          kitGroupPurchaseType: active.fangshi,
-          subName: active.sound,
-          subjectId: active.id,
-          depositFee: active.fangshiprice // depositFee  只有租赁才有
-        }
-        obj.musicGroupSubjectPlans.push(item);
-      })
-      // for (let i in this.activeSoundList) {
-      //   // 遍历声部里的乐器
-      //   let some = {};
-      //   some.subjectId = this.activeSoundList[i].id;
-      //   some.type = 'INSTRUMENT';
-      //   some.goodsIdList = this.activeSoundList[i].zhonglei.join(',');
-      //   obj.musicGroupSubjectGoodsGroups.push(some);
-      // }
-      // // 遍历声部里的教辅
-      // for (let i in this.activeSoundList) {
-      //   // 遍历声部里的乐器
-      //   for (let j in this.activeSoundList[i].markList) {
-      //     let some = {};
-      //     some.subjectId = this.activeSoundList[i].id;
-      //     some.type = 'ACCESSORIES';
-      //     some.goodsIdList = this.activeSoundList[i].markList[j].goods.join(',');
-      //     some.name = this.activeSoundList[i].markList[j].name;
-      //     some.price = this.activeSoundList[i].markList[j].price;
-      //     obj.musicGroupSubjectGoodsGroups.push(some);
-      //   }
+        })
+      }
 
-      // }
-      // // 添加声部
-      // obj.musicGroupSubjectPlans = [];
-      // for (let i in this.activeSoundList) {
-      //   let item = {};
-      //   // expectedStudentNum
-      //   item.expectedStudentNum = this.activeSoundList[i].jihua;
-      //   item.fee = this.activeSoundList[i].yuji;
-      //   item.kitGroupPurchaseType = this.activeSoundList[i].fangshi;
-      //   item.subName = this.activeSoundList[i].sound;
-      //   item.subjectId = this.activeSoundList[i].id;
-      //   // depositFee  只有租赁才有
-      //   item.depositFee = this.activeSoundList[i].fangshiprice;
-      //   obj.musicGroupSubjectPlans.push(item);
-      // }
-      createTeam(obj).then(res => {
-        if (res.code == 200) {
-          // 成功 跳转到乐团报名详情
-          this.$router.push({ path: '/business/teamDetail' })
-        }
-      })
     }
   },
   filters: {
     zhongleiFilter (val, list) {
+      if (list.length <= 0) {
+        return;
+      }
       let arr = []
       for (let i = 0; i < list.length; i++) {
         for (let j = 0; j < val.length; j++) {
@@ -533,7 +543,12 @@ export default {
           }
         }
       }
-      return arr.join(',')
+      if (arr.length > 0) {
+        return arr.join(',')
+      } else {
+        return ''
+      }
+
     },
     fangshiFilter (val, price) {
       let str = ''
@@ -549,6 +564,9 @@ export default {
       return str + '费用:' + price
     },
     goodsFilter (val, list) {
+      if (list.length <= 0) {
+        return;
+      }
       let arr = [];
       for (let i = 0; i < val.length; i++) {
         for (let j = 0; j < list.length; j++) {
@@ -557,7 +575,11 @@ export default {
           }
         }
       }
-      return arr.join(',');
+      if (arr.length > 0) {
+        return arr.join(',')
+      } else {
+        return ''
+      }
     }
     // markFilter(val){
     //   for
@@ -575,16 +597,59 @@ export default {
         for (let key in this.soundList) {
           this.$set(this.soundLists, key, [])
         }
-        getDefaultSubject({ chargeTypeId: type }).then(res => {
-          if (res.code == 200) {
-            this.activeSoundList = res.data.map(item => {
-              this.soundLists[0].push(item.id)
-              let obj = { 'id': item.id, 'sound': item.name, 'jihua': 0, 'yuji': 0, 'zhonglei': [], 'fangshi': '', 'fangshiprice': 0, 'jiaopu': '', 'type': 1, 'typeVisible': false, 'provideVisible': false, 'markVisible': false, 'goodsList': [], 'markList': [{ 'name': '', 'goods': [], 'price': '' }], 'markChioseList': [] }
-              return obj;
-            })
-            // 并且把所有soundLists 里面
-          }
-        });
+        // 新建团带默认的数据
+        if (this.teamStatus == 'newTeam') {
+          getDefaultSubject({ chargeTypeId: type }).then(res => {
+            if (res.code == 200) {
+              this.activeSoundList = res.data.map(item => {
+                this.soundLists[0].push(item.id)
+                let obj = { 'id': item.id, 'sound': item.name, 'jihua': 0, 'yuji': 0, 'zhonglei': [], 'fangshi': '', 'fangshiprice': 0, 'jiaopu': '', 'type': 1, 'typeVisible': false, 'provideVisible': false, 'markVisible': false, 'goodsList': [], 'markList': [{ 'name': '', 'goods': [], 'price': '' }], 'markChioseList': [] }
+                return obj;
+              })
+              // 并且把所有soundLists 里面
+            }
+          });
+        }
+        // 修改带原有团的数据
+        if (this.teamStatus == 'teamDraft') {
+          // 获取第二页的数据
+          this.teamid = this.$route.query.id;
+          findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(res => {
+            if (res.code == 200) {
+              this.activeSoundList = res.data.musicGroupSubjectPlans.map(item => {
+                this.soundLists[0].push(item.subjectId)
+                let obj = { 'id': item.subjectId, 'sound': item.subName, 'jihua': item.expectedStudentNum, 'yuji': item.fee, 'zhonglei': [], 'fangshi': item.kitGroupPurchaseType, 'fangshiprice': item.depositFee, 'jiaopu': '', 'type': 1, 'typeVisible': false, 'provideVisible': false, 'markVisible': false, 'goodsList': [], 'markList': [{ 'name': '', 'goods': [], 'price': '' }], 'markChioseList': [] }
+                return obj;
+              })
+              // 循环列表里的声部 拿取商品
+              for (let i in this.activeSoundList) {
+                for (let j in res.data.musicGroupSubjectGoodsGroups) {
+                  if (this.activeSoundList[i].id == res.data.musicGroupSubjectGoodsGroups[j].subjectId) {
+                    if (res.data.musicGroupSubjectGoodsGroups[j].type == 'INSTRUMENT') {
+                      let arr = [...res.data.musicGroupSubjectGoodsGroups[j].goodsIdList];
+                      this.activeSoundList[i].zhonglei = arr.map(item => {
+                        return parseInt(item)
+                      })
+                      // goodsList
+
+                    }
+                    if (res.data.musicGroupSubjectGoodsGroups[j].type == 'ACCESSORIES') {
+                      if (res.data.musicGroupSubjectGoodsGroups[j].goodsList.length >= 0) {
+                        this.activeSoundList[i].markList = res.data.musicGroupSubjectGoodsGroups[j].goodsList;
+                        console.log(this.activeSoundList[i].markList);
+
+                      } else {
+                        this.activeSoundList[i].markList = [];
+                      }
+
+                    }
+                  }
+                }
+              }
+            }
+          })
+        }
+
       }
 
     })
@@ -593,6 +658,9 @@ export default {
     this.topfor = this.$store.getters.topinfo;
     this.checkfor = this.$store.getters.checkinfo;
     let type = this.topfor.type;
+    // 判断进来的乐团状态
+    this.teamStatus = this.$route.query.type;
+    console.log(this.teamStatus)
 
     // console.log(this.topfor);
     // console.log(this.checkfor);

+ 110 - 64
src/views/teamBuild/signupList.vue

@@ -8,13 +8,17 @@
         </h2>
         <div class="btnList">
           <div class='newBand close'>停止乐团</div>
-          <div class='newBand' @click="paymentStatus = true"
+          <div class='newBand'
+               @click="paymentStatus = true"
                v-if="status=='APPLY'">开始缴费</div>
-          <div class='newBand' @click="onGoHome"
+          <div class='newBand'
+               @click="onGoHome"
                v-if="status=='PAY'">确认开团</div>
-          <div class='newBand' @click="extendPaymentStatus = true"
+          <div class='newBand'
+               @click="extendPaymentStatus = true"
                v-if="status=='PAY'">延长缴费</div>
-          <div class='newBand' @click="onCreateQRCode" >生成二维码</div>
+          <div class='newBand'
+               @click="onCreateQRCode">生成二维码</div>
         </div>
       </div>
       <p class='msg'> <img src="@/assets/images/base/clock.png"
@@ -63,20 +67,36 @@
           <el-table-column label="计划招生"
                            prop="expectedStudentNum"
                            align='center'>
+            <template slot-scope="scope">
+              <div>
+                <p v-if="!isEdit">{{ scope.row.expectedStudentNum }}</p>
+
+                <el-input v-if="isEdit"
+                          v-model="scope.row.expectedStudentNum"></el-input>
+
+              </div>
+            </template>
           </el-table-column>
           <el-table-column label="已报名"
                            prop='applyStudentNum'
                            align='center'>
           </el-table-column>
         </el-table>
+        <div class="btnWrap"
+             style="margin-right:20px;  margin-top:20px;">
+          <el-button v-if="!isEdit"
+                     @click="isEdit = true">编辑</el-button>
+          <el-button v-if="isEdit"
+                     @click="saveIsEdit">保存</el-button>
+        </div>
       </div>
       <div class="right">
-        <el-table :data='rightList' ref="multipleTable"
+        <el-table :data='rightList'
+                  ref="multipleTable"
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                   @selection-change="handleSelectionChange">
-           <el-table-column
-            type="selection"
-            width="55">
+          <el-table-column type="selection"
+                           width="55">
           </el-table-column>
           <el-table-column label="学员姓名"
                            prop="studentName"
@@ -124,7 +144,7 @@
                            prop="parentsPhone"
                            align='center'>
           </el-table-column>
-           <!-- v-if='status == "PAY"' -->
+          <!-- v-if='status == "PAY"' -->
           <el-table-column label="学员状态"
                            prop="paymentStatus"
                            align='center'>
@@ -142,12 +162,13 @@
                            @click='resetSubject(scope.row)'>修改专业</el-button>
                 <!-- APPLY -->
                 <el-popover v-if='status == "APPLY" || scope.row.remark'
-                  placement="top-start"
-                  title="备注"
-                  width="200"
-                  trigger="hover"
-                  :content="scope.row.remark">
-                  <el-button type="text" slot="reference">备注</el-button>
+                            placement="top-start"
+                            title="备注"
+                            width="200"
+                            trigger="hover"
+                            :content="scope.row.remark">
+                  <el-button type="text"
+                             slot="reference">备注</el-button>
                 </el-popover>
                 <!-- PAY -->
                 <el-button type='text'
@@ -157,9 +178,12 @@
             </template>
           </el-table-column>
         </el-table>
-        <div style="margin-top: 10px; margin-bottom: 10px;" v-if="status=='APPLY'">
+        <div style="margin-top: 10px; margin-bottom: 10px;"
+             v-if="status=='APPLY'">
           <el-button @click="onSelectAll">全选/取消</el-button>
-          <el-button style="background-color: #14928a;border: 1px solid #14928a;" @click="onPartPayment" type="primary">提前缴费</el-button>
+          <el-button style="background-color: #14928a;border: 1px solid #14928a;"
+                     @click="onPartPayment"
+                     type="primary">提前缴费</el-button>
           <!-- <div class='newBand' v-if="status=='APPLY'">允许缴费</div> -->
         </div>
         <pagination :total="rules.total"
@@ -186,27 +210,31 @@
       <div slot="footer"
            class="dialog-footer">
         <el-button @click="subjectVisible = false">取 消</el-button>
-        <el-button type="primary" @click="okReset">确 定</el-button>
+        <el-button type="primary"
+                   @click="okReset">确 定</el-button>
       </div>
     </el-dialog>
 
     <el-dialog title="延长缴费"
                :visible.sync="extendPaymentStatus"
                width="400px">
-      <el-form :model="extendForm" ref="extendForm" :rules="extendRule">
-        <el-form-item label="延长时间" prop="expireDate">
-          <el-date-picker
-            v-model="extendForm.expireDate"
-            value-format="yyyy-MM-dd"
-            type="date"
-            placeholder="选择日期">
+      <el-form :model="extendForm"
+               ref="extendForm"
+               :rules="extendRule">
+        <el-form-item label="延长时间"
+                      prop="expireDate">
+          <el-date-picker v-model="extendForm.expireDate"
+                          value-format="yyyy-MM-dd"
+                          type="date"
+                          placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
       </el-form>
       <div slot="footer"
            class="dialog-footer">
         <el-button @click="extendPaymentStatus = false">取 消</el-button>
-        <el-button type="primary" @click="onExtendPayment('extendForm')">确 定</el-button>
+        <el-button type="primary"
+                   @click="onExtendPayment('extendForm')">确 定</el-button>
       </div>
     </el-dialog>
 
@@ -267,20 +295,25 @@
     <el-dialog title="开始缴费"
                :visible.sync="paymentStatus"
                width="400px">
-      <el-form ref="paymentForm" :model="paymentForm" label-position="top" :rules="paymentRules">
-        <el-form-item label="请设置缴费截止日期" prop="paymentExpireDate">
-          <el-date-picker
-            v-model="paymentForm.paymentExpireDate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            style="width: 100%"
-            placeholder="选择日期">
+      <el-form ref="paymentForm"
+               :model="paymentForm"
+               label-position="top"
+               :rules="paymentRules">
+        <el-form-item label="请设置缴费截止日期"
+                      prop="paymentExpireDate">
+          <el-date-picker v-model="paymentForm.paymentExpireDate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          style="width: 100%"
+                          placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
       </el-form>
-      <div slot="footer" class="dialog-footer">
+      <div slot="footer"
+           class="dialog-footer">
         <el-button @click="paymentStatus = false">取 消</el-button>
-        <el-button type="primary" @click="onStartPayment('paymentForm')">确 定</el-button>
+        <el-button type="primary"
+                   @click="onStartPayment('paymentForm')">确 定</el-button>
       </div>
     </el-dialog>
     <el-dialog title="报名二维码"
@@ -288,22 +321,26 @@
                width="500px">
       <div class="left-code">
         <h2>学员报名连接</h2>
-        <div id="qrcode" class="qrcode code"
-           ref="qrCodeUrl"></div>
-        <p class="code-url" v-if="codeUrl">{{ codeUrl }}</p>
+        <div id="qrcode"
+             class="qrcode code"
+             ref="qrCodeUrl"></div>
+        <p class="code-url"
+           v-if="codeUrl">{{ codeUrl }}</p>
       </div>
       <div class="right-code">
         <h2>报名缴费详情</h2>
-        <div id="qrcode2" class="qrcode code"
-           ref="qrCodeUrl"></div>
-        <p class="code-url" v-if="codeUrl2">{{ codeUrl2 }}</p>
+        <div id="qrcode2"
+             class="qrcode code"
+             ref="qrCodeUrl"></div>
+        <p class="code-url"
+           v-if="codeUrl2">{{ codeUrl2 }}</p>
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { getTeamRecruit, getintoClass, getStudentList, findSound, musicGroupOpenPay, openPayment, musicGroupFound, extensionPayment } from '@/api/buildTeam'
+import { getTeamRecruit, getintoClass, getStudentList, findSound, musicGroupOpenPay, openPayment, musicGroupFound, extensionPayment, resetPlanNum } from '@/api/buildTeam'
 import { resetStudentSubject, getStudentFeeDetail } from '@/api/studentManager'
 import QRCode from 'qrcodejs2'
 export default {
@@ -313,7 +350,7 @@ export default {
   data () {
     return {
       multipleSelection: [], // 
-      
+      isEdit: false,
       subjectVisible: false,
       orderVisible: false,
       leftList: [],
@@ -364,7 +401,7 @@ export default {
       extendPaymentStatus: false,
       extendForm: {
         expireDate: null,
-      }, 
+      },
       extendRule: {
         expireDate: [{ required: true, message: '请选择延长时间', trigger: 'change' }]
       }
@@ -410,14 +447,14 @@ export default {
         }
       })
     },
-    onStartPayment(formName) { // 开启缴费
+    onStartPayment (formName) { // 开启缴费
       this.$refs[formName].validate((valid) => {
         if (valid) {
           musicGroupOpenPay({
             musicGroupId: this.id,
             expireDate: this.paymentForm.paymentExpireDate
           }).then(res => {
-            if(res.code == 200) {
+            if (res.code == 200) {
               this.$message({
                 type: 'success',
                 message: '开启成功'
@@ -440,14 +477,14 @@ export default {
         }
       })
       // this.id
-      
+
     },
-    onSelectAll() { // 选中全部
+    onSelectAll () { // 选中全部
       this.$refs.multipleTable.toggleAllSelection()
     },
-    onPartPayment() { // 部分缴费
+    onPartPayment () { // 部分缴费
       let selection = this.multipleSelection
-      if(selection.length <= 0) {
+      if (selection.length <= 0) {
         this.$message({
           message: '您还没有选择学生',
           type: 'warning'
@@ -462,7 +499,7 @@ export default {
       openPayment({
         ids: ids.join(',')
       }).then(res => {
-        if(res.code == 200) {
+        if (res.code == 200) {
           this.$message({
             message: '开启成功',
             type: 'success'
@@ -473,10 +510,10 @@ export default {
         }
       })
     },
-    onCreateQRCode() { // 生成报名二维码
+    onCreateQRCode () { // 生成报名二维码
       this.qrcodeStatus = true
       let id = this.$route.query.id
-      if(this.qrcodes) {
+      if (this.qrcodes) {
         this.qrcodes = false
         setTimeout(() => {
           this.qrcode = new QRCode('qrcode', {
@@ -501,11 +538,11 @@ export default {
         }, 500)
       }
     },
-    onGoHome() { // 确认开团
+    onGoHome () { // 确认开团
       musicGroupFound({
         musicGroupId: this.$route.query.id
       }).then(res => {
-        if(res.code == 200) {
+        if (res.code == 200) {
           this.$message({
             type: 'success',
             message: '开启成功'
@@ -521,8 +558,8 @@ export default {
         }
       })
     },
-    handleSelectionChange(val) {
-        this.multipleSelection = val;
+    handleSelectionChange (val) {
+      this.multipleSelection = val;
     },
     // 修改专业
     resetSubject (row) {
@@ -546,14 +583,14 @@ export default {
       })
 
     },
-    onExtendPayment(formName) {
+    onExtendPayment (formName) {
       this.$refs[formName].validate(valid => {
-        if(valid) {
-          extensionPayment({ 
+        if (valid) {
+          extensionPayment({
             musicGroupId: this.id,
             expireDate: this.extendForm.expireDate
           }).then(res => {
-            if(res.code == 200) {
+            if (res.code == 200) {
               this.$message.success('延长缴费成功')
               this.extendPaymentStatus = false
             } else {
@@ -585,6 +622,15 @@ export default {
         }
       })
 
+    },
+    saveIsEdit () {
+      // 提交数据
+      console.log(this.leftList);
+      this.isEdit = false;
+      resetPlanNum(this.leftList).then(res => {
+
+      })
+
     }
   },
 }
@@ -691,7 +737,8 @@ export default {
 .el-dialog__body {
   overflow: hidden;
 }
-.left-code, .right-code {
+.left-code,
+.right-code {
   width: 50%;
   float: left;
   h2 {
@@ -713,5 +760,4 @@ export default {
     padding: 15px 15px 0 15px;
   }
 }
-
 </style>

+ 126 - 14
src/views/teamDetail/components/resetClass.vue

@@ -94,7 +94,8 @@
         <div class="floor">
           <div class="add"
                @click="temporary">临时调整</div>
-          <div class='add'>新建班级</div>
+          <div class='add'
+               @click="addNewClass">新建班级</div>
         </div>
       </div>
     </div>
@@ -141,7 +142,7 @@
         <div class="right">
           <!--  multiple
                      collapse-tags -->
-          <el-select v-if="isNewClass"
+          <el-select v-if="isSearch"
                      v-model="activeChioseSound"
                      style="width:180px"
                      clearable
@@ -151,7 +152,7 @@
                        :label="item.name"
                        :value="item.id"></el-option>
           </el-select>
-          <el-button v-if="isNewClass"
+          <el-button v-if="isSearch"
                      type="danger"
                      style="margin-left:20px;"
                      @click="searchStudent">搜索</el-button>
@@ -296,8 +297,10 @@
                :key="index">
             <span>循环周期: </span>
             <el-select v-model="item.week">
-              <el-option label="lalal"
-                         value="111"></el-option>
+              <el-option v-for="(item,index) in weekDateList"
+                         :key='index'
+                         :label="item.label"
+                         :value="item.value"></el-option>
             </el-select>
             <span>开始时间</span>
             <el-time-select placeholder=""
@@ -328,14 +331,20 @@
       </div>
       <div slot="footer"
            class="dialog-footer">
+        <!-- 1为临时班级 -->
         <el-button type="primary"
-                   @click="submitTemporary">确 定</el-button>
+                   v-if="isTemporary"
+                   @click="submitTemporary(1)">确 定</el-button>
+        <!-- 2为新增班级 -->
+        <el-button type="primary"
+                   v-if="!isTemporary"
+                   @click="submitTemporary(2)">确 定</el-button>
       </div>
     </el-dialog>
   </div>
 </template>
 <script>
-import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent, findMusicGroupClassTeacher, revisionClassGroup } from '@/api/buildTeam'
+import { getAllClass, getAllSignClassandTeacher, getAllSignClass, removeSingleClass, getNoClassStudentAll, findSound, teamSoundStudent, findMusicGroupClassTeacher, revisionClassGroup, revisionAddClassGroup } from '@/api/buildTeam'
 import { getClassAllStudent, removeStudents, addStudents } from '@/api/studentManager'
 import axios from 'axios'
 import qs from 'qs'
@@ -357,11 +366,13 @@ export default {
       studentList: [], //列表里的学生集合
       activeMixClass: '', // 选中的合奏班
       chioseStudent: [],// 勾选的学生信息
-      isNewClass: false,
+      isNewClass: false, // 是否为新建班级
+      isSearch: false, // 是否需要搜索
+      isTemporary: false, // 是否为临时班级
       className: '', // 班级名称
       activeClass: '', // 当前操作的班级
       soundList: [],
-      infoVisible: true,
+      infoVisible: false, // 判断是否需要显示老师设置
       teacherForm: {
         coreTeacher: '',
         assistant: [],
@@ -386,9 +397,20 @@ export default {
       courseTypeList: [
         { value: 'SINGLE', label: '单技课' },
         { value: 'MIX', label: '合奏课' },
+        { value: 'TRAINING_SINGLE', label: '集训单技课' },
+        { value: 'TRAINING_MIX', label: '集训合奏课' },
+        { value: 'HIGH', label: '小班课' },
         { value: 'COMPREHENSIVE', label: '综合课' },
-        { value: 'TRAINING', label: '集训课' },
         { value: 'CLASSROOM', label: '课堂课' },
+      ],
+      weekDateList: [
+        { value: '1', label: '星期一' },
+        { value: '2', label: '星期二' },
+        { value: '3', label: '星期三' },
+        { value: '4', label: '星期四' },
+        { value: '5', label: '星期五' },
+        { value: '6', label: '星期六' },
+        { value: '7', label: '星期日' },
       ]
     }
   },
@@ -453,6 +475,27 @@ export default {
       this.studentList = [];
       this.isNewClass = true;
       this.studentVisible = true;
+      this.isSearch = true;
+      this.className = '';
+      this.isTemporary = true;
+
+    },
+
+    // 新增班级 
+    addNewClass () {
+      if (!this.topForm.mixClass) {
+        this.$message.error('请先选择合奏班')
+        return
+      }
+      this.activeClass = '';
+      this.activeListStudent = [];
+      this.studentList = [];
+      this.isNewClass = true;
+      this.studentVisible = true;
+      this.isSearch = false;
+      this.className = '';
+      this.isTemporary = false;
+      this.getNoClassStudent()
 
     },
     searchStudent () {
@@ -506,6 +549,7 @@ export default {
       this.className = row.name;
       this.studentVisible = true;
       this.activeClass = row.id
+      this.isSearch = false;
       console.log(row);
       // 根据单机班id 查询单技班内的所有学生
       getClassAllStudent({ classGroupId: row.id }).then(res => {
@@ -516,7 +560,10 @@ export default {
           });
         }
       })
+      this.getNoClassStudent()
 
+    },
+    getNoClassStudent () {
       // 获取乐团内所有未分班的学生
       getNoClassStudentAll({ musicGroupId: this.teamid }).then(res => {
         if (res.code == 200) {
@@ -591,7 +638,18 @@ export default {
       return result;
     },
     setInfoMsg () {
-      this.studentVisible;
+      // 判断班级名称是否输入
+      if (!this.className) {
+        this.$message.error('请输入班级名称')
+        return
+      }
+      // 判断有没有勾选学生
+      if (this.activeListStudent.length <= 0) {
+        // 没有勾学生
+        this.$message.error('班级里至少要有一名学生')
+        return
+      }
+      this.infoVisible = true;
     },
     addWeek () {
       // 添加循环周期
@@ -612,7 +670,7 @@ export default {
       }
     },
     // 提交临时班的信息
-    submitTemporary () {
+    submitTemporary (type) {
       this.$refs['teacherForm'].validate(item => {
         if (item) {
           let week = this.weekList;
@@ -621,9 +679,63 @@ export default {
             return
           }
           // 这里代表排课成功  发请求  新增临时班
-          // revisionClassGroup({}).then(res=>{
+          let classGroupName = this.className;
+          let classGroupTeacherMapperList = [{ id: this.teacherForm.coreTeacher, teacherRole: 'BISHOP' }]
+          for (let i in this.teacherForm.assistant) {
+            classGroupTeacherMapperList.push({ id: this.teacherForm.assistant[i], teacherRole: 'TEACHING' })
+          }
+          let mixClassGroupId = this.activeMixClass;
+          let musicGroupId = this.teamid;
+          let startDate = this.teacherForm.courseTime;
+          let courseType = this.teacherForm.courseType;
+          let students = this.activeListStudent.map(item => {
+            return item.userId;
+          }).join(',')
+          let holiday = this.teacherForm.checked;
+          /**
+           *  this.weekList.push({
+        week: '',
+        startTime: '',
+        endTime: '',
+           * 
+           */
+          let courseList = [];
+          for (let i in this.weekList) {
+            courseList.push(this.weekList[i])
+          }
+          if (courseList.length <= 0) {
+            this.$message.error('新增班级至少排一节课')
+            return
+          }
+          let obj = {
+            classGroupName,
+            classGroupTeacherMapperList,
+            mixClassGroupId,
+            musicGroupId,
+            startDate,
+            courseType,
+            students,
+            holiday,
+            courseList
+          }
+          if (type == 1) {
+            revisionClassGroup(obj).then(res => {
+              if (res.code == 200) {
+                // 提示修改成功
+                this.$message.success('修改成功')
+                this.infoVisible = false;
+              }
+            })
+          } else if (type == 2) {
+            revisionAddClassGroup(obj).then(res => {
+              if (res.code == 200) {
+                // 修改成功
+                this.$message.success('修改成功');
+                this.infoVisible = false;
+              }
+            })
+          }
 
-          // })
         } else {
           this.$message.error('请填写必要信息')
           return;

+ 70 - 82
src/views/teamDetail/teamList.vue

@@ -13,22 +13,16 @@
                class="topForm"
                ref="topForm"
                :model="topForm">
-        <el-form-item prop='school'>
-          <el-select v-model="topForm.school"
-                     placeholder="请选择学校名称">
-            <el-option v-for="(item,index) in schools"
-                       :key="index"
-                       :label="item.text"
-                       :value="item.value"></el-option>
-          </el-select>
+        <el-form-item prop='teamName'>
+          <el-input v-model="topForm.teamName"
+                    placeholder="请输入乐团名称"></el-input>
         </el-form-item>
         <!-- 多选 -->
         <el-form-item prop='status'>
           <el-select class='multiple'
                      v-model="topForm.status"
-                     placeholder="请选择乐团状态"
-                     multiple
-                     collapse-tags>
+                     clearable
+                     placeholder="请选择乐团状态">
             <el-option v-for="(item,index) in nowStatus"
                        :key="index"
                        :label="item.text"
@@ -37,7 +31,9 @@
         </el-form-item>
         <!-- 收费类型 -->
         <el-form-item prop='payType'>
-          <el-select v-model="topForm.payType">
+          <el-select v-model="topForm.payType"
+                     placeholder="请选择收费类型"
+                     clearable>
             <el-option v-for="(item,index) in typeList"
                        :key='index'
                        :label="item.name"
@@ -45,7 +41,8 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <div class='searchBtn'>搜索</div>
+          <div class='searchBtn'
+               @click="getList">搜索</div>
         </el-form-item>
       </el-form>
       <div class="tableWrap">
@@ -134,9 +131,17 @@
                            v-if="scope.row.status == 'PREPARE'"
                            @click="gotodetailList(scope.row)">发放清单</el-button>
                 <el-button type="text"
+                           v-if="scope.row.status == 'PROGRESS'"
                            @click="lookTeamDetail(scope.row)">查看</el-button>
-                <el-button v-if="scope.row.status == 'PAUSE'" @click="onTeamOpeation('start', scope.row)" type="text">启动</el-button>
-                <el-button v-if="scope.row.status == 'PROGRESS'" @click="onTeamOpeation('pause', scope.row)"  type="text">暂停</el-button>
+                <el-button type="text"
+                           v-if="scope.row.status != 'PROGRESS'"
+                           @click="lookTeamDetail(scope.row)">编辑</el-button>
+                <el-button v-if="scope.row.status == 'PAUSE'"
+                           @click="onTeamOpeation('start', scope.row)"
+                           type="text">启动</el-button>
+                <el-button v-if="scope.row.status == 'PROGRESS'"
+                           @click="onTeamOpeation('pause', scope.row)"
+                           type="text">暂停</el-button>
               </div>
             </template>
           </el-table-column>
@@ -162,35 +167,34 @@ export default {
   data () {
     return {
       topForm: {
-        school: '',
-        status: [],
+        teamName: '',
+        status: '',
         payType: '',
         word: ''
       },
       typeList: [], // 收费类型
-      schools: [{ // 学校数组
-        value: 1, text: '张三团'
-      }, {
-        value: 2, text: '李四团'
-      }],
       nowStatus: [{ // 状态数组
-        value: 1, text: '报名中'
+        value: 'APPLY', text: '报名中'
       },
       {
-        value: 2, text: '缴费中'
+        value: 'PAY', text: '缴费中'
       }, {
-        value: 3, text: '筹备中'
+        value: 'PREPARE', text: '筹备中'
       },
       {
-        value: 4, text: '进行中'
+        value: 'PROGRESS', text: '进行中'
       }, {
-        value: 5, text: '失败'
+        value: 'CANCELED', text: '取消'
       }, {
-        value: 6, text: '已结束'
+        value: 'AUDIT', text: '审核中'
       },
       {
-        value: 7, text: '暂停'
-      },
+        value: 'PAUSE', text: '暂停'
+      }, {
+        value: 'DRAFT', text: '编辑中'
+      }, {
+        value: 'AUDIT_FAILED', text: '审核失败'
+      }
       ],
       searchLsit: [], // 存储选择后的数组
       tableData: [], // table数据
@@ -217,15 +221,25 @@ export default {
       }
     })
     // 获取乐团合作单位(学校)
-    getCooperation().then(res => {
-
-    })
+    // getCooperation().then(res => {
+    // })
   },
   methods: {
     getList () {
+      /**
+       * 
+       *  teamName: '',
+        status: [],
+        payType: '',
+       * 
+       */
       getTeamList({
         rows: this.rules.limit,
-        page: this.rules.page
+        page: this.rules.page,
+        organId: this.$store.getters.organ,
+        chargeTypeId: this.topForm.payType,
+        musicGroupName: this.topForm.teamName
+
       }).then(res => {
         if (res.code == 200) {
           this.tableData = res.data.rows
@@ -303,19 +317,19 @@ export default {
 
       }
     },
-    onTeamOpeation(type, row) {
-      if(type == 'start') {
+    onTeamOpeation (type, row) {
+      if (type == 'start') {
         resumeMusicGroup({ musicGroupId: row.id }).then(res => {
-          if(res.code == 200) {
+          if (res.code == 200) {
             this.$message.success('开启成功')
             this.getList()
           } else {
             this.$message.error(res.msg)
           }
         })
-      } else if(type == 'pause') {
+      } else if (type == 'pause') {
         pauseMusicGroup({ musicGroupId: row.id }).then(res => {
-          if(res.code == 200) {
+          if (res.code == 200) {
             this.$message.success('暂停成功')
             this.getList()
           } else {
@@ -330,6 +344,19 @@ export default {
     },
     lookTeamDetail (row) {
       switch (row.status) {
+        case 'DRAFT': {
+          // 编辑中
+          this.$router.push({ path: '/business/teamBuild', query: { type: 'teamDraft', id: row.id } })
+          break;
+        }
+        case 'AUDIT': {
+          // 审核中
+          break;
+        }
+        case 'AUDIT_FAILED': {
+          // 审核失败
+          break;
+        }
         case 'APPLY': {
           // 报名中
           console.log('报名中')
@@ -359,6 +386,10 @@ export default {
           console.log('取消')
           break
         }
+        case 'PAUSE': {
+          // 暂停
+          break;
+        }
       }
     },
     checkSelectable (row) {
@@ -382,49 +413,6 @@ export default {
       this.$router.push({ path: '/business/setImprovement', query: { id: row.id } })
     }
   },
-  watch: {
-    chioseSchool (val) {
-      if (val != '') {
-        // 遍历获取文字
-        for (let item in this.schools) {
-          if (this.schools[item].value == val) {
-            this.setSearchList({ id: 'school', key: this.schools[item].text, value: val, type: 2 })
-          }
-        }
-      }
-    },
-    chioseStauts (val, oldval) {
-      //  这里取出来是数组 [1,2,3]    添加  删除  修改
-      if (val != '') {
-        // 遍历获取文字
-        for (let i = 0; i < val.length; i++) {
-          for (let item in this.nowStatus) {
-            // 判断是不是添加还是删除 只有添加才push  否则不管
-            if (this.nowStatus[item].value == val[i] && val.length > oldval.length) {
-              this.setSearchList({ id: 'status', key: this.nowStatus[item].text, value: val[i], type: 2 })
-            }
-          }
-        }
-      }
-    },
-    chiosePayType (val) {
-      if (val) {
-        let arr = ['', '1.0', '1.5', '2.0', '3.0']
-        this.setSearchList({ id: 'payType', key: arr[val], value: val, type: 1 })
-      }
-    }
-  },
-  computed: {
-    chioseSchool () {
-      return this.topForm.school
-    },
-    chioseStauts () {
-      return this.topForm.status
-    },
-    chiosePayType () {
-      return this.topForm.payType
-    }
-  }
 }
 </script>
 <style lang="scss" scoped>

+ 2 - 2
vue.config.js

@@ -17,10 +17,10 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
 // http://47.99.212.176:8000
 // 
 // let target = 'http://192.168.3.27:8000' // 箭河
-// let target = 'http://192.168.3.28:8000' //邹璇
+let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
 // let target = 'http://47.99.212.176:8000' // 测试服
-let target = 'http://192.168.3.48:8000' // 乔
+// let target = 'http://192.168.3.48:8000' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**