mo 5 år sedan
förälder
incheckning
5c15d9979f

+ 3 - 2
src/router/index.js

@@ -156,8 +156,9 @@ export const asyncRoutes = {
   // 发放清单
   teamDetailedList: () => import('@/views/teamDetail/teamDetailedList'),
   // 小班课设置
-  setImprovement: () => import('@/views/teamBuild/teamSeting/components/setImprovement')
-
+  setImprovement: () => import('@/views/teamBuild/teamSeting/components/setImprovement'),
+  // 乐团修改 @/views/resetTeaming/index
+  resetTeaming: () => import('@/views/resetTeaming/index')
 
 }
 export default router

+ 18 - 0
src/views/resetTeaming/components/resetSound.vue

@@ -0,0 +1,18 @@
+<template>
+  <div class="m-container">
+    <el-table :data='tableList'>
+
+    </el-table>
+  </div>
+</template>
+<script>
+export default {
+  data () {
+    return {
+      tableList: []
+    }
+  }
+}
+</script>
+<style lang="scss">
+</style>

+ 55 - 0
src/views/resetTeaming/index.vue

@@ -0,0 +1,55 @@
+<template>
+  <div class="m-container">
+    <h2>
+      乐团修改
+    </h2>
+    <div class="m-core">
+      <!-- navMenu -->
+      <el-tabs v-model="activeIndex"
+               type="card"
+               @tab-click="handleClick">
+        <el-tab-pane label="基本信息"
+                     name="1">
+          <teamBaseInfo v-if="acitveStatus[0]" />
+        </el-tab-pane>
+        <el-tab-pane label="声部修改"
+                     name="2">
+          <resetSound v-if="acitveStatus[1]" />
+        </el-tab-pane>
+        <el-tab-pane label="班级调整"
+                     name="3">
+          <studentVip v-if="acitveStatus[2]" />
+        </el-tab-pane>
+        <el-tab-pane label="新增排课"
+                     name="4">
+          <studentRecord v-if="acitveStatus[3]" />
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+<script>
+import teamBaseInfo from '@/views/teamBuild/components/teamBaseInfo'
+import resetSound from '@/views/resetTeaming/components/resetSound'
+export default {
+  components: { teamBaseInfo, resetSound },
+  data () {
+    return {
+      activeIndex: '1',
+      acitveStatus: [true, false, false, false, false, false, false],
+      teamid: ''
+    }
+  },
+  mounted () {
+    this.teamid = this.$route.query.id;
+  }, methods: {
+    handleClick (val) {
+      this.activeIndex = val.name
+      this.acitveStatus[val.name - 1] = true
+
+    }
+  },
+}
+</script>
+<style lang="scss">
+</style>

+ 24 - 2
src/views/teamBuild/components/teamBaseInfo.vue

@@ -141,7 +141,7 @@
           <el-checkbox v-model="topFrom.isClass">课堂课乐团</el-checkbox>
         </el-form-item>
         <el-form-item label="教学主任"
-                      v-if="activeTeam.length > 0"
+                      v-if="teamStatus!='newTeam'"
                       prop='head'>
           <el-select v-model="topFrom.head"
                      clearable>
@@ -302,7 +302,7 @@
     </div>
     <div class="btnWrap">
       <div class="nextBtn"
-           v-if="teamStatus=='乐团修改'"
+           v-if="teamStatus=='resetTeam'"
            @click="resetSubmit">
         修改
       </div>
@@ -459,6 +459,7 @@ export default {
       // this.holidayList = Object.keys(res.data[year])
     })
     this.teamStatus = this.$route.query.type;
+    console.log(this.teamStatus);
     // 传过来的乐团信息
     this.activeTeam = this.getTeamList;
 
@@ -793,6 +794,27 @@ export default {
   .el-checkbox__input.is-checked + .el-checkbox__label {
     color: #606266;
   }
+  .subTitle {
+    width: 1203px;
+    height: 40px;
+    line-height: 40px;
+    background-color: #fefceb;
+    padding: 0 25px;
+    box-sizing: border-box;
+    font-size: 16px;
+    color: #474747;
+    margin-bottom: 20px;
+  }
+  .chioseWrap {
+    margin-bottom: 30px;
+    display: flex;
+    flex-direction: row;
+    padding: 0 25px;
+    p {
+      font-size: 14px;
+      margin-right: 30px;
+    }
+  }
   // .baseRight {
   //   width: 375px;
   //   margin-left: 25px;

+ 25 - 6
src/views/teamBuild/components/teamSoundMoney.vue

@@ -189,7 +189,7 @@
               </el-dialog>
               <span>
                 <span v-for='(item,index) in scope.row.markList'
-                      v-if="item.name"
+                      v-if="item.name && scope.row.markChioseList.length>0"
                       :key='index'>{{item.name+':'}}{{item.goods|goodsFilter(scope.row.markChioseList)}}{{' 价格 '+item.price }} </span>
               </span>
               <i class='el-icon-edit'
@@ -363,7 +363,6 @@ export default {
       let id = row.id;
       getGoods({ 'subjectId': id, 'type': 'ACCESSORIES' }).then(res => {
         if (res.code == 200) {
-          console.log(res);
           row.markChioseList = res.data;
           // console.log(row);
         }
@@ -487,6 +486,7 @@ export default {
         let activeSoundList = this.activeSoundList
         // 添加商品以及教辅
         obj.musicGroupId = this.teamid
+        obj.status = status;
         obj.musicGroupSubjectGoodsGroups = []
         obj.musicGroupSubjectPlans = []
         activeSoundList.forEach(active => {
@@ -524,7 +524,10 @@ export default {
         })
         // 发请求修改声部信息
         updateSubjectInfo(obj).then(res => {
-
+          if (res.code == 200) {
+            this.$message.success('提交成功')
+            this.$router.push({ path: '/business/teamDetail' })
+          }
         })
       }
 
@@ -565,7 +568,7 @@ export default {
     },
     goodsFilter (val, list) {
       if (list.length <= 0) {
-        return;
+        return '';
       }
       let arr = [];
       for (let i = 0; i < val.length; i++) {
@@ -635,11 +638,27 @@ export default {
                     }
                     if (res.data.musicGroupSubjectGoodsGroups[j].type == 'ACCESSORIES') {
                       if (res.data.musicGroupSubjectGoodsGroups[j].goodsList.length >= 0) {
-                        this.activeSoundList[i].markList = res.data.musicGroupSubjectGoodsGroups[j].goodsList;
+                        this.activeSoundList[i].markList = [];
+                        this.activeSoundList[i].markList.push(res.data.musicGroupSubjectGoodsGroups[j])
                         console.log(this.activeSoundList[i].markList);
+                        this.activeSoundList[i].markList.map(item => {
+                          item.goods = item.goodsList.map(some => {
+                            return some.id;
+                          })
+                        })
 
+                        /**
+                         *  let some = {
+              subjectId: active.id,
+              type: 'ACCESSORIES',
+              goodsIdList: mark.goods ? mark.goods.join(',') : '',
+              name: mark.name,
+              price: mark.price
+            }
+                         * 
+                         */
                       } else {
-                        this.activeSoundList[i].markList = [];
+
                       }
 
                     }

+ 13 - 2
src/views/teamDetail/teamList.vue

@@ -134,14 +134,20 @@
                            v-if="scope.row.status == 'PROGRESS'"
                            @click="lookTeamDetail(scope.row)">查看</el-button>
                 <el-button type="text"
-                           v-if="scope.row.status != 'PROGRESS'"
+                           v-if="scope.row.status != 'PROGRESS' && scope.row.status != 'AUDIT'"
                            @click="lookTeamDetail(scope.row)">编辑</el-button>
+                <el-button type="text"
+                           v-if="scope.row.status == 'AUDIT'"
+                           @click="stopTeam(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 v-if="scope.row.status == 'PROGRESS'"
+                           @click="resetTeaming(scope.row)"
+                           type="text">修改</el-button>
               </div>
             </template>
           </el-table-column>
@@ -258,6 +264,11 @@ export default {
       }
       this.$router.push({ path: '/business/teamBuild', query: { type: 'teamList', teamList: this.passed } })
     },
+    resetTeaming (row) {
+      // 修改进行中的乐团
+      console.log(row.id)
+      this.$router.push({ path: '/business/resetTeaming', query: { type: 'resetTeam', id: row.id } })
+    },
     setSearchList (obj) {
       // 
       // 没有相同的key=>添加这个对象
@@ -411,7 +422,7 @@ export default {
     // setImprovement 设置小班课
     gotoImprovement (row) {
       this.$router.push({ path: '/business/setImprovement', query: { id: row.id } })
-    }
+    },
   },
 }
 </script>

+ 1 - 1
vue.config.js

@@ -17,7 +17,7 @@ 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' // 乔