Browse Source

10/14

建团bug修改
mo 5 years ago
parent
commit
62fd6e421e

+ 7 - 7
src/api/buildTeam.js

@@ -62,9 +62,9 @@ export function getPayMaster (data) {
 // 根据收费类型获取默认科目
 export function getDefaultSubject (data) {
   return request({
-    url: '/web-server/subject/findDefaultSubByGroupId',
+    url: '/web-server/subject/findDefaultSubByChargeTypeId',
     method: 'get',
-    params: qs.stringify(data)
+    params: data
   })
 }
 
@@ -89,17 +89,17 @@ export function createTeam (data) {
 // 查询乐团招生情况
 export function getTeamRecruit (data) {
   return request({
-    url: `/web-server/musicGroupSubjectPlan/get/${data}`,
+    url: `/web-server/musicGroupSubjectPlan/getMusicSubjectClass`,
     method: 'get',
-    // params: qs.stringify(data)
+    params: data
 
   })
 }
 
-// 查询乐团分班情况
-export function getintoClass (data) {
+// 获取乐团单技班
+export function getSingleClass (data) {
   return request({
-    url: '/web-server/musicGroupSubjectPlan/getMusicSubjectClass',
+    url: '/web-server/classGroup/findMusicGroupClass',
     method: 'get',
     params: data
 

+ 9 - 0
src/api/vipSeting.js

@@ -212,3 +212,12 @@ export function createVip (data) {
     data
   })
 }
+
+// 暂停vip
+export function closeVip (data) {
+  return request({
+    url: '/web-server/vipGroupManage/stopVipGroup',
+    method: 'POST',
+    data: qs.stringify(data)
+  })
+}

+ 2 - 1
src/utils/request.js

@@ -82,7 +82,8 @@ service.interceptors.response.use(
       })
 
       // 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
-      if (res.code === 401 || res.code === 403) {
+      if (res.code == 401 || res.code == 403) {
+        console.log('tocken失效');
         this.$message({
           message: '登录超时请重新登录',
           type: 'warning'

+ 43 - 12
src/views/teamBuild/components/teamBaseInfo.vue

@@ -177,6 +177,35 @@
         </div>
         <div class="head noMargin">付费方式:</div>
         <div class="checkRow">
+          <el-checkbox label="学校"
+                       class='classCheckBox'
+                       v-model="payList.school.ischeck"></el-checkbox>
+          <div class="chioseList">
+            <div class="chioseItem"
+                 :class="payList.school.chiose == 'ONE_OFF'?'active':''"
+                 @click="payList.school.chiose='ONE_OFF'">一次性</div>
+            <div class="chioseItem"
+                 :class="payList.school.chiose == 'MONTHLY'?'active':''"
+                 @click="payList.school.chiose='MONTHLY'">一个月</div>
+            <div class="chioseItem "
+                 :class="payList.school.chiose == 'TERM'?'active':''"
+                 @click="payList.school.chiose='TERM'">一学期</div>
+            <div class="chioseItem"
+                 :class="payList.school.chiose == 'YEAR'?'active':''"
+                 @click="payList.school.chiose='YEAR'">一学年</div>
+          </div>
+          <div class="inputWrap">
+            预计收费: <input type="textarea"
+                   v-model="payList.school.price"
+                   placeholder="请输入">
+          </div>
+          <div class="inputWrap">
+            备注: <input type="textarea"
+                   v-model="payList.school.value"
+                   placeholder="请输入">
+          </div>
+        </div>
+        <div class="checkRow">
           <el-checkbox label="公司"
                        class='classCheckBox'
                        v-model="payList.company.ischeck"></el-checkbox>
@@ -196,11 +225,13 @@
           </div>
           <div class="inputWrap">
             预计收费: <input type="textarea"
-                   placeholder="请输入">
+                   placeholder="请输入"
+                   v-model="payList.company.price">
           </div>
           <div class="inputWrap">
             备注: <input type="textarea"
-                   placeholder="请输入">
+                   placeholder="请输入"
+                   v-model="payList.company.value">
           </div>
         </div>
         <div class="checkRow">
@@ -378,16 +409,16 @@ export default {
       }
     })
     // 6.默认支付主体
-    getPayMaster({ 'rows': 1000 }).then(res => {
-      console.log(res);
-      if (res.code == 200) {
-        this.payList = res.data.map(item => {
-          let obj = {};
-          obj.id = item.id;
-          obj.ischios
-        })
-      }
-    })
+    // getPayMaster({ 'rows': 1000 }).then(res => {
+    //   console.log(res);
+    //   if (res.code == 200) {
+    //     this.payList = res.data.map(item => {
+    //       let obj = {};
+    //       obj.id = item.id;
+    //       obj.ischios
+    //     })
+    //   }
+    // })
     getPayStatus({ 'rows': 1000 }).then(res => {
       console.log(res);
     })

+ 30 - 22
src/views/teamBuild/components/teamSoundMoney.vue

@@ -87,7 +87,7 @@
                 <el-select v-model="scope.row.zhonglei"
                            multiple
                            clearable
-                           collapse-tags>;
+                           collapse-tags>
                   <el-option v-for="(item,index) in scope.row.goodsList"
                              :key='index'
                              :label="item.name"
@@ -328,8 +328,9 @@ export default {
       this.dialogTableVisible = false;
     },
     removeListItem () {
+      console.log(this.soundLists)
       // 点击删除按钮
-
+      return
       for (let i = 0; i < this.activeSoundList.length; i++) {
         for (let j = 0; j < this.multipleSelection.length; j++) {
 
@@ -349,7 +350,6 @@ export default {
     },
     // 勾选选中框处理数据,存储勾选过的checkbox值
     checkinlist (obj) {
-      // console.log(that);
       let flag = false;
       this.activeSoundList.map(item => {
         if (item.id == obj.id) {
@@ -369,7 +369,7 @@ export default {
     // 根据声部id获取可选乐器种类
     chioseType (row) {
       // 根据id查询可选类型种类
-      // let id = obj.id;
+      let id = row.id;
       // console.log(row.id);
       // 'subjectId': id, ' type'='INSTRUMENT'
       getGoods({ 'subjectId': 3, 'type': 'INSTRUMENT' }).then(res => {
@@ -476,23 +476,21 @@ export default {
 
       }
       // 添加声部
-      obj.MusicGroupSubjectPlan = [];
+      obj.musicGroupSubjectPlans = [];
       for (let i in this.activeSoundList) {
         let item = {};
         item.applyStudentNum = this.activeSoundList[i].jihua;
-        item.expectedStudentNum = this.activeSoundList[i].yuji;
+        item.fee = this.activeSoundList[i].yuji;
         item.kitGroupPurchaseType = this.activeSoundList[i].fangshi;
         item.subName = this.activeSoundList[i].sound;
         item.subjectId = this.activeSoundList[i].id;
-        obj.MusicGroupSubjectPlan.push(item);
+        obj.musicGroupSubjectPlans.push(item);
       }
       console.log(obj);
       createTeam(obj).then(res => {
         if (res.code == 200) {
           // 成功 跳转到乐团报名详情
-          let id = 'ca2becc9-c39a-4c0b-b9e1-c3a744c10888';
-
-          this.$router.push({ path: '/teamBuild/teamSeting', query: { id } })
+          this.$router.push({ path: '/teamBuild/teamSeting', query: { id: res.data } })
         }
       })
     }
@@ -539,14 +537,27 @@ export default {
     // }
   },
   mounted () {
-    // console.log(store.getters.organ + '---');
     getSubject().then(res => {
       // console.log(res);
-      this.soundList = res.data.rows;
-      // // 生成动态的checkList
-      for (let key in this.soundList) {
-        this.$set(this.soundLists, key, [])
+      if (res.code == 200) {
+        this.soundList = res.data.rows;
+        // // 生成动态的checkList
+        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 => {
+              console.log(this.soundLists[0])
+              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 里面
+          }
+        });
       }
+
     })
     // 拿到刚才的存储的信息
     this.payfor = this.$store.getters.payList;
@@ -554,14 +565,11 @@ export default {
     this.checkfor = this.$store.getters.checkinfo;
     let type = this.topfor.type;
 
-    console.log(this.topfor);
-    console.log(this.checkfor);
-    console.log(this.payfor);
-    this.isLoop = this.payfor.student.chiose;
+    // console.log(this.topfor);
+    // console.log(this.checkfor);
+    // console.log(this.payfor);
+    this.isLoop = this.payfor.student.chiose || 1;
     // 获取存储的type值获取默认值
-    getDefaultSubject({ musicGroupId: type }).then(res => {
-      // console.log(res);
-    });
   },
   watch: {
 

+ 1 - 1
src/views/teamBuild/index.vue

@@ -18,7 +18,7 @@
         </span>
         <span class='stepspan  stepspan2'
               @click="activeIndex=1">
-          <!--   -->
+          <!--    -->
           <div class="step2 sptep"
                v-if="activeIndex>=1"
                :class="activeIndex >= 1?'activestep':''">

+ 211 - 5
src/views/teamBuild/teamSeting/components/setClass.vue

@@ -12,6 +12,7 @@
                          align='center'>
         </el-table-column>
         <el-table-column label="实际人数"
+                         prop="applyStudentNum"
                          align='center'>
         </el-table-column>
       </el-table>
@@ -41,6 +42,7 @@
         </div>
       </div>
     </div>
+    <!-- v-if="centertList.length>0 " -->
     <div class="right">
       <el-table :data='centertList'
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}">
@@ -55,11 +57,99 @@
                          align='center'>
         </el-table-column>
       </el-table>
+      <div class="centerInfo">
+        <div class="btnWrap">
+          <div class="setBtn"
+               @click="allVisible = true">添加</div>
+          <div class="okBtn">下一步</div>
+        </div>
+      </div>
     </div>
+    <el-dialog title="班级设置"
+               :visible.sync="classVisible">
+      <div class="classMaskWrap">
+        <div class="maskLeft">
+          <h3>声部 已选XXX
+          </h3>
+          <el-checkbox-group v-model="maskList.subjectCheckList"
+                             class='checkGroup'>
+            <el-checkbox :label="1">长笛</el-checkbox>
+            <el-checkbox :label="1">长笛</el-checkbox>
+            <el-checkbox :label="1">长笛</el-checkbox>
+            <el-checkbox :label="1">长笛</el-checkbox>
+          </el-checkbox-group>
+        </div>
+        <div class="maskRight">
+          <div class="rightGroup">
+            <h3>长笛的学员名单 <el-checkbox :indeterminate="maskList.isIndeterminate"
+                           v-model="maskList.checkAll"
+                           @change="handleCheckAllChange">全选</el-checkbox>
+            </h3>
+            <el-checkbox-group v-model="maskList.checkList"
+                               @change="handleCheckedCitiesChange"
+                               class='checkGroup'>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+              <el-checkbox :label="1">我是学生1</el-checkbox>
+            </el-checkbox-group>
+          </div>
+
+        </div>
+      </div>
+      <div class="classMaskbottom">
+        <h3></h3>
+        <el-form :inline="true">
+          <el-form-item label="班级名称">
+            <el-input></el-input>
+          </el-form-item>
+          <el-form-item label="已选声部">
+            <el-input disabled="true"></el-input>
+          </el-form-item>
+          <el-form-item label="班级人数">
+            <el-input disabled="true"></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="classVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="classVisible = false">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="合奏班设置"
+               width="600px"
+               :visible.sync="allVisible">
+      <el-checkbox-group v-model="allMaskList.signClassList"
+                         @change="handleCheckedCitiesChange"
+                         class='checkGroup'>
+        <el-checkbox :label="1">我是学生1</el-checkbox>
+        <el-checkbox :label="1">我是学生1</el-checkbox>
+        <el-checkbox :label="1">我是学生1</el-checkbox>
+      </el-checkbox-group>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="allVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="allVisible = false">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
-import { getTeamRecruit, getintoClass } from "@/api/buildTeam"
+import { getTeamRecruit, getSingleClass } from "@/api/buildTeam"
 export default {
   props: {
     teamid: {
@@ -69,26 +159,47 @@ export default {
   },
   data () {
     return {
+      classVisible: false, // 班级设置弹窗
+      allVisible: true, // 合奏班弹窗设置
       leftList: [],
       centertList: [],
-      rightList: []
+      rightList: [],
+      maskList: {
+        subjectCheckList: [],
+        checkList: [],
+        checkAll: false,
+        isIndeterminate: false,
+      },
+      allMaskList: {
+        signClassList: []
+      }
     }
   },
   mounted () {
     console.log(this.teamid)
-    getTeamRecruit(1).then(res => {
+    getTeamRecruit({ musicGroupId: this.teamid }).then(res => {
       console.log(res);
     })
-    getintoClass({ musicGroupId: 1 }).then(res => {
+    getSingleClass({ musicGroupId: this.teamid }).then(res => {
       if (res.code == 200) {
         this.leftList = res.data;
       }
     })
+  }, methods: {
+    handleCheckAllChange () {
+      this.checkedCities = val ? cityOptions : [];
+      this.isIndeterminate = false;
+    },
+    handleCheckedCitiesChange (val) {
+      let checkedCount = value.length;
+      this.checkAll = checkedCount === this.cities.length;
+      this.maskList.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
+    }
   },
 
 }
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
 .classWrap {
   display: flex;
   flex-direction: row;
@@ -138,6 +249,101 @@ export default {
   .right {
     flex-grow: 1;
     margin-left: 12px;
+    .centerInfo {
+      background-color: #fff;
+      color: #444;
+      padding: 15px;
+      .btnWrap {
+        margin-top: 38px;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-end;
+        .setBtn {
+          width: 120px;
+          height: 40px;
+          background: rgba(68, 68, 68, 1);
+          border-radius: 4px;
+          color: #fff;
+          line-height: 40px;
+          text-align: center;
+          cursor: pointer;
+        }
+        .okBtn {
+          width: 120px;
+          height: 40px;
+          background: rgba(249, 114, 21, 1);
+          border-radius: 4px;
+          color: #fff;
+          line-height: 40px;
+          text-align: center;
+          cursor: pointer;
+        }
+      }
+    }
+  }
+  .classMaskWrap {
+    display: flex;
+    flex-direction: row;
+    justify-content: flex-start;
+    max-height: 350px;
+    overflow: auto;
+
+    .maskLeft {
+      width: 200px;
+
+      h3 {
+        height: 40px;
+        line-height: 40px;
+        background-color: #edeef0;
+        font-size: 16px;
+        font-weight: normal;
+        color: #444;
+        padding-left: 25px;
+      }
+      .checkGroup {
+        .el-checkbox {
+          padding-left: 25px;
+          height: 30px;
+          line-height: 30px;
+          width: 100%;
+        }
+      }
+    }
+    .maskRight {
+      margin-left: 30px;
+      flex: 1;
+      .rightGroup {
+        h3 {
+          height: 40px;
+          line-height: 40px;
+          background-color: #edeef0;
+          font-size: 16px;
+          font-weight: normal;
+          color: #444;
+          padding-left: 25px;
+          display: flex;
+          flex-direction: row;
+          justify-content: space-between;
+          padding-right: 15px;
+        }
+        .checkGroup {
+          padding-left: 25px;
+          .el-checkbox {
+            height: 30px;
+            line-height: 30px;
+            width: 75px;
+          }
+        }
+      }
+    }
+  }
+  .classMaskbottom {
+    h3 {
+      height: 40px;
+      line-height: 40px;
+      background-color: #edeef0;
+      margin-bottom: 30px;
+    }
   }
 }
 </style>

+ 1 - 1
src/views/teamBuild/teamSeting/index.vue

@@ -99,7 +99,7 @@ export default {
     }
   },
   created () {
-    this.id = this.$route.query.id || 'ca2becc9-c39a-4c0b-b9e1-c3a744c10888'
+    this.id = this.$route.query.id || '191014165848001'
   },
   mounted () {
 

+ 16 - 5
src/views/vipClass/vipList.vue

@@ -121,9 +121,11 @@
               <div>
                 <el-button type="text"
                            @click="gotoVipDetail(scope.row.id)">查看</el-button>
-
-                <!-- <el-button type="text">启动</el-button>
-                <el-button type="text">暂停</el-button> -->
+                <!-- 
+                <el-button type="text">启动</el-button> -->
+                <el-button type="text"
+                           v-if="scope.row.status <3"
+                           @click='closeVip(scope.row.id)'>关闭</el-button>
               </div>
             </template>
           </el-table-column>
@@ -141,7 +143,7 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { getVipList, vipGroupActivity } from '@/api/vipSeting'
+import { getVipList, vipGroupActivity, closeVip } from '@/api/vipSeting'
 import { getTeacher } from '@/api/buildTeam'
 export default {
   components: { pagination },
@@ -193,6 +195,14 @@ export default {
     // 跳转到vip详情
     gotoVipDetail (id) {
       this.$router.push({ path: '/vipClass/vipDetail', query: { id } })
+    },
+    closeVip (id) {
+      closeVip({ vipGroupId: id }).then(res => {
+        if (res.code == 200) {
+          this.$message.success('停止课程成功')
+          this.getList();
+        }
+      })
     }
 
   },
@@ -201,7 +211,8 @@ export default {
       return val.split(' ')[0];
     },
     formatterStatus (val) {
-      let arr = ["未开始", "报名中", "取消"]
+      console.log(val);
+      let arr = ["未开始", "报名中", "报名结束", '取消', '停止']
       return arr[val];
     }
   }

+ 2 - 2
vue.config.js

@@ -16,10 +16,10 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
 // const port = process.env.port || process.env.npm_config_port || 9528 // dev port
 // http://47.99.212.176:8000
 // 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 = {
   /**