瀏覽代碼

乐团流程修改

mo 4 年之前
父節點
當前提交
21d3b71799

+ 8 - 1
src/api/buildTeam.js

@@ -1548,4 +1548,11 @@ export function sendWaitRenewMessage(data) {
     data:data
     data:data
   })
   })
 }
 }
-
+// 查询进行中乐团能否补招
+export function checkCanReg(data) {
+  return request2({
+    url: api + `/studentManage/checkCanReg`,
+    method: 'get',
+    params:data,
+  })
+}

+ 1 - 0
src/permission.js

@@ -14,6 +14,7 @@ const whiteList = ['/login'] // no redirect whitelist
 let isOpen = false
 let isOpen = false
 
 
 router.onError((error) => {
 router.onError((error) => {
+  console.log(error)
   if (error instanceof Error) {
   if (error instanceof Error) {
     const isChunkLoadFailed = error.name.indexOf('chunk')
     const isChunkLoadFailed = error.name.indexOf('chunk')
     const targetPath = router.history.pending.fullPath;
     const targetPath = router.history.pending.fullPath;

+ 44 - 17
src/views/resetTeaming/index.vue

@@ -9,22 +9,17 @@
         {{ musicGroupType[team_status] }}
         {{ musicGroupType[team_status] }}
       </p>
       </p>
       <!-- navMenu -->
       <!-- navMenu -->
-      <tab-router
-        v-model="activeIndex"
-        type="card"
-        ref="tab"
-
-      >
-       <!-- @tab-click="handleClick" -->
+      <tab-router v-model="activeIndex" type="card" ref="tab">
+        <!-- @tab-click="handleClick" -->
         <el-tab-pane
         <el-tab-pane
           label="基本信息"
           label="基本信息"
           lazy
           lazy
           v-if="permission('/teamBaseInfo')"
           v-if="permission('/teamBaseInfo')"
           name="1"
           name="1"
         >
         >
-        <!--  v-if="activeIndex == 'teamBaseInfo'" -->
+          <!--  v-if="activeIndex == 'teamBaseInfo'" -->
           <teamBaseInfo
           <teamBaseInfo
-          v-if="activeIndex == '1'"
+            v-if="activeIndex == '1'"
             @getBaseInfo="getBaseInfo"
             @getBaseInfo="getBaseInfo"
             :baseInfo="baseInfo"
             :baseInfo="baseInfo"
             @getName="getName"
             @getName="getName"
@@ -40,7 +35,13 @@
         >
         >
           <resetSound v-if="activeIndex == '2'" />
           <resetSound v-if="activeIndex == '2'" />
         </el-tab-pane>
         </el-tab-pane>
-        <el-tab-pane lazy label="预报名信息" name="9" :disabled="!teamid" v-if="permission('/teamForecastName')">
+        <el-tab-pane
+          lazy
+          label="预报名信息"
+          name="9"
+          :disabled="!teamid"
+          v-if="permission('/teamForecastName')"
+        >
           <!--         v-if="
           <!--         v-if="
             team_status == 'PRE_APPLY' ||
             team_status == 'PRE_APPLY' ||
             team_status == 'PRE_BUILD_FEE' ||
             team_status == 'PRE_BUILD_FEE' ||
@@ -52,8 +53,14 @@
             :isedit="team_status == 'PRE_APPLY'"
             :isedit="team_status == 'PRE_APPLY'"
           />
           />
         </el-tab-pane>
         </el-tab-pane>
-        <el-tab-pane lazy label="乐器清单" name="10" :disabled="!teamid" v-if="permission('/teamMusicList')" >
-          <musicOrder  v-if="activeIndex == '10'"/>
+        <el-tab-pane
+          lazy
+          label="乐器清单"
+          name="10"
+          :disabled="!teamid"
+          v-if="permission('/teamMusicList')"
+        >
+          <musicOrder v-if="activeIndex == '10'" />
         </el-tab-pane>
         </el-tab-pane>
         <el-tab-pane
         <el-tab-pane
           label="老师列表"
           label="老师列表"
@@ -71,7 +78,19 @@
         >
         >
           <studentList :teamid="teamid" v-if="activeIndex == '7'" />
           <studentList :teamid="teamid" v-if="activeIndex == '7'" />
         </el-tab-pane>
         </el-tab-pane>
-
+        <!-- teamRemainTime -->
+        <el-tab-pane
+          label="剩余时长"
+          lazy
+          v-if="permission('/teamRemainTime')"
+          name="12"
+          :disabled="!teamid"
+        >
+          <teamRemainTime
+            v-if="activeIndex == '12' && musicGroupInfo"
+            :musicGroupInfo="musicGroupInfo"
+          />
+        </el-tab-pane>
         <el-tab-pane
         <el-tab-pane
           label="班级列表"
           label="班级列表"
           lazy
           lazy
@@ -120,7 +139,12 @@
           />
           />
         </el-tab-pane>
         </el-tab-pane>
         <!--   v-if="permission('/resetTeaming/coursePlan')" -->
         <!--   v-if="permission('/resetTeaming/coursePlan')" -->
-        <el-tab-pane label="乐团日志" :disabled="!teamid" name="11"  v-if="permission('/teamJournal')">
+        <el-tab-pane
+          label="乐团日志"
+          :disabled="!teamid"
+          name="11"
+          v-if="permission('/teamJournal')"
+        >
           <teamJournal :teamid="teamid" v-if="activeIndex == 11" />
           <teamJournal :teamid="teamid" v-if="activeIndex == 11" />
         </el-tab-pane>
         </el-tab-pane>
         <!-- <el-tab-pane label="新增小班课"
         <!-- <el-tab-pane label="新增小班课"
@@ -149,6 +173,8 @@ import courseList from "@/views/teamDetail/components/courseList";
 import forecastName from "@/views/teamBuild/forecastName";
 import forecastName from "@/views/teamBuild/forecastName";
 import musicOrder from "@/views/teamDetail/teamDetailedList";
 import musicOrder from "@/views/teamDetail/teamDetailedList";
 import teamJournal from "@/views/teamBuild/components/teamJournal";
 import teamJournal from "@/views/teamBuild/components/teamJournal";
+import teamRemainTime from "@/views/teamBuild/components/teamRemainTime";
+
 import { permission } from "@/utils/directivePage";
 import { permission } from "@/utils/directivePage";
 import { getTeamBaseInfo } from "@/api/buildTeam";
 import { getTeamBaseInfo } from "@/api/buildTeam";
 import { musicGroupType } from "@/constant";
 import { musicGroupType } from "@/constant";
@@ -166,6 +192,7 @@ export default {
     forecastName,
     forecastName,
     musicOrder,
     musicOrder,
     teamJournal,
     teamJournal,
+    teamRemainTime,
   },
   },
   name: "resetTeaming",
   name: "resetTeaming",
   data() {
   data() {
@@ -248,15 +275,15 @@ export default {
       this.teamid = this.$route.query.id;
       this.teamid = this.$route.query.id;
       // this.team_status = this.$route.query.team_status;
       // this.team_status = this.$route.query.team_status;
       // console.log('切换tab',val)
       // console.log('切换tab',val)
-   this.$refs.tab.tab(val);
+      this.$refs.tab.tab(val);
       // this.activeIndex = val.name;
       // this.activeIndex = val.name;
     },
     },
     permission(str) {
     permission(str) {
       return permission(str);
       return permission(str);
     },
     },
     getName(val) {
     getName(val) {
-      this.name = val
-          this.teamid = this.$route.query.id;
+      this.teamName = val;
+      this.teamid = this.$route.query.id;
     },
     },
   },
   },
 };
 };

+ 6 - 8
src/views/teamBuild/components/soundSetComponents/chioseSoundList.vue

@@ -1,13 +1,11 @@
 <template>
 <template>
   <div>
   <div>
-
     <div class="soundWrap">
     <div class="soundWrap">
-
       <el-checkbox-group v-model.trim="activeSoundList">
       <el-checkbox-group v-model.trim="activeSoundList">
         <div class="itemList">
         <div class="itemList">
           <div class="categroy"
           <div class="categroy"
-               v-for="(item,index) in soundList"
-               :key="index">
+               v-for="item in soundList"
+               :key="item.id">
             <p>{{item.name}}</p>
             <p>{{item.name}}</p>
             <el-checkbox :label="sound.id"
             <el-checkbox :label="sound.id"
                          @change="changeCheck"
                          @change="changeCheck"
@@ -42,7 +40,6 @@ export default {
     console.log(this.soundList)
     console.log(this.soundList)
   },
   },
   activated () {
   activated () {
-    console.log(this.soundList)
   },
   },
   methods: {
   methods: {
     generates () {
     generates () {
@@ -56,7 +53,7 @@ export default {
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .soundWrap {
 .soundWrap {
   width: 100%;
   width: 100%;
-  overflow: auto;
+  overflow-y: auto;
   .itemList {
   .itemList {
     display: flex;
     display: flex;
     flex-direction: row;
     flex-direction: row;
@@ -65,7 +62,7 @@ export default {
     flex-grow: 1;
     flex-grow: 1;
     height: 300px;
     height: 300px;
     max-height: 300px;
     max-height: 300px;
-    overflow: auto;
+    overflow-y: auto;
     .categroy {
     .categroy {
       z-index: 100;
       z-index: 100;
       width: 150px;
       width: 150px;
@@ -83,6 +80,7 @@ export default {
         background-color: #edeef0;
         background-color: #edeef0;
         margin-bottom: 15px;
         margin-bottom: 15px;
         text-align: center;
         text-align: center;
+        font-size: 14px;
       }
       }
     }
     }
   }
   }
@@ -99,4 +97,4 @@ export default {
   flex-direction: row;
   flex-direction: row;
   justify-content: flex-end;
   justify-content: flex-end;
 }
 }
-</style>
+</style>

+ 131 - 167
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -1,7 +1,6 @@
 <template>
 <template>
   <div>
   <div>
     <div
     <div
-
       :class="isField ? 'soundBtnWrap' : 'soundBtnFixed'"
       :class="isField ? 'soundBtnWrap' : 'soundBtnFixed'"
       v-if="!basdisabled"
       v-if="!basdisabled"
     >
     >
@@ -87,7 +86,7 @@
         </el-collapse>
         </el-collapse>
       </el-checkbox-group>
       </el-checkbox-group>
     </div>
     </div>
-    <el-dialog title="声部选择" :visible.sync="soundVisible" destroy-on-close>
+    <el-dialog title="声部选择" :visible.sync="soundVisible" v-if="soundVisible">
       <chioseSoundList
       <chioseSoundList
         :soundList="soundList"
         :soundList="soundList"
         :activeSound="activeSound"
         :activeSound="activeSound"
@@ -102,11 +101,9 @@ import { formatData } from "@/utils/utils";
 import {
 import {
   getSubject,
   getSubject,
   getDefaultSubject,
   getDefaultSubject,
-
   getSoundTree,
   getSoundTree,
   findMusicGroupSubjectInfo,
   findMusicGroupSubjectInfo,
   updateSubjectInfo,
   updateSubjectInfo,
-
   getSubjectGoods,
   getSubjectGoods,
 } from "@/api/buildTeam";
 } from "@/api/buildTeam";
 import dayjs from "dayjs";
 import dayjs from "dayjs";
@@ -137,18 +134,15 @@ export default {
     if (this.$route.query.id) {
     if (this.$route.query.id) {
       this.teamid = this.$route.query.id;
       this.teamid = this.$route.query.id;
     }
     }
-      window.addEventListener("scroll", this.getScroll);
+    window.addEventListener("scroll", this.getScroll);
     this.init();
     this.init();
   },
   },
   deactivated() {
   deactivated() {
     window.removeEventListener("scroll", this.getScroll);
     window.removeEventListener("scroll", this.getScroll);
   },
   },
   beforeDestroy() {
   beforeDestroy() {
-    sessionStorage.setItem(
-      `${this.teamid}sound`,
-      JSON.stringify(this.activeSoundList)
-    );
-     window.removeEventListener("scroll", this.getScroll);
+    this.setStore();
+    window.removeEventListener("scroll", this.getScroll);
   },
   },
   activated() {
   activated() {
     if (
     if (
@@ -161,23 +155,29 @@ export default {
         this.init();
         this.init();
       }
       }
     }
     }
-      this.teamStatus = this.$route.query.type;
-     if (
-        this.teamStatus == "look" ||
-        this.teamStatus == "teamAudit" ||
-        this.teamStatus == "feeAudit"||
-        this.teamStatus ==  "teamCanceled"
-      ) {
-        this.basdisabled = true;
-      } else {
-        this.basdisabled = false;
-      }
+    this.teamStatus = this.$route.query.type;
+    if (
+      this.teamStatus == "look" ||
+      this.teamStatus == "teamAudit" ||
+      this.teamStatus == "feeAudit" ||
+      this.teamStatus == "teamCanceled"
+    ) {
+      this.basdisabled = true;
+    } else {
+      this.basdisabled = false;
+    }
   },
   },
-  deactivated(){
-    this.activeSoundList = []
+  deactivated() {
+    this.activeSoundList = [];
   },
   },
 
 
   methods: {
   methods: {
+    setStore() {
+      sessionStorage.setItem(
+        `${this.teamid}sound`,
+        JSON.stringify(this.activeSoundList)
+      );
+    },
     init() {
     init() {
       // 获取第一页的数据
       // 获取第一页的数据
       this.topfor = this.$store.getters.topinfo;
       this.topfor = this.$store.getters.topinfo;
@@ -197,98 +197,100 @@ export default {
       let sotrage = JSON.parse(
       let sotrage = JSON.parse(
         sessionStorage.getItem(`${this.$route.query.id}sound`)
         sessionStorage.getItem(`${this.$route.query.id}sound`)
       );
       );
-      if (sotrage&&sotrage[0]?.id) {
-        this.activeSoundList = sotrage;
-        let activeSound = [];
 
 
-        this.activeSoundList.forEach((item) => {
-          activeSound.push(item.id);
-        });
-        this.chioseActiveSound = activeSound;
-      } else {
-        getSoundTree({ tenantId: 1 }).then((res) => {
-          if (res.code == 200) {
-            this.soundList = res.data.rows;
-            if (this.teamStatus == "newTeam" && type && section) {
-              getDefaultSubject({
-                chargeTypeId: type,
-                organId: section,
-                number: 1,
-              }).then((res) => {
-                if (res.code == 200) {
-                  let activeSound = [];
-                  this.activeSoundList = res.data.map((item) => {
-                    activeSound.push(item.id);
-                    return this.initSound(item);
-                  });
-                  this.activeSound = activeSound;
-                  this.chioseActiveSound = activeSound;
-                  this.changeActiveSound(activeSound.join(","));
-                }
-              });
-            } else {
-              this.teamid = this.$route.query.id;
-              if (this.teamid) {
-                findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(
-                  (res) => {
-                    if (res.code == 200) {
-                      let activeSound = [];
-                      this.activeSoundList = res.data?.musicGroupSubjectPlans.map(
-                        (item) => {
-                          activeSound.push(item.subjectId);
-                          return {
-                            id: parseInt(item.subjectId),
-                            sound: item.subName,
-                            expectedStudentNum: item.expectedStudentNum,
-                            chioseMusic: [],
-                            markChioseList: [],
-                            goodsList: [],
-                            markList: [],
-                          };
-                        }
-                      );
-                      this.activeSound = activeSound;
-                      this.chioseActiveSound = activeSound;
-                      this.changeActiveSound(activeSound.join(","));
-                      // 格式化商品和教辅
-                      res.data.musicGroupSubjectGoodsGroups.forEach((shop) => {
-                        let index = findIndex(this.activeSoundList, (o) => {
-                          return o.id == shop.subjectId;
-                        });
+      getSoundTree({ tenantId: 1 }).then((res) => {
+        if (res.code == 200) {
+          this.soundList = res.data.rows;
+        }
+        if (sotrage && sotrage[0]?.id) {
+          this.activeSoundList = sotrage;
+          let activeSound = [];
 
 
-                        if (index != -1) {
-                          if (shop.type == "ACCESSORIES") {
-                            shop.goodsIdList.split(",").forEach((item) => {
-                              this.activeSoundList[index].markChioseList.push(
-                                parseInt(item)
-                              );
-                            });
-                          } else if (shop.type == "INSTRUMENT") {
-                            // 商品
-                            let typeJson = Object.keys(
-                              JSON.parse(shop.kitGroupPurchaseTypeJson)
+          this.activeSoundList.forEach((item) => {
+            activeSound.push(item.id);
+          });
+          this.chioseActiveSound = activeSound;
+           this.activeSound = activeSound;
+           this.changeActiveSound(activeSound.join(","));
+        } else {
+          if (this.teamStatus == "newTeam" && type && section) {
+            getDefaultSubject({
+              chargeTypeId: type,
+              organId: section,
+              number: 1,
+            }).then((res) => {
+              if (res.code == 200) {
+                let activeSound = [];
+                this.activeSoundList = res.data.map((item) => {
+                  activeSound.push(item.id);
+                  return this.initSound(item);
+                });
+                this.activeSound = activeSound;
+                this.chioseActiveSound = activeSound;
+                this.changeActiveSound(activeSound.join(","));
+              }
+            });
+          } else {
+            this.teamid = this.$route.query.id;
+            if (this.teamid) {
+              findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(
+                (res) => {
+                  if (res.code == 200) {
+                    let activeSound = [];
+                    this.activeSoundList = res.data?.musicGroupSubjectPlans.map(
+                      (item) => {
+                        activeSound.push(item.subjectId);
+                        return {
+                          id: parseInt(item.subjectId),
+                          sound: item.subName,
+                          expectedStudentNum: item.expectedStudentNum,
+                          chioseMusic: [],
+                          markChioseList: [],
+                          goodsList: [],
+                          markList: [],
+                        };
+                      }
+                    );
+                    this.activeSound = activeSound;
+                    this.chioseActiveSound = activeSound;
+                    this.changeActiveSound(activeSound.join(","));
+                    // 格式化商品和教辅
+                    res.data.musicGroupSubjectGoodsGroups.forEach((shop) => {
+                      let index = findIndex(this.activeSoundList, (o) => {
+                        return o.id == shop.subjectId;
+                      });
+
+                      if (index != -1) {
+                        if (shop.type == "ACCESSORIES") {
+                          shop.goodsIdList.split(",").forEach((item) => {
+                            this.activeSoundList[index].markChioseList.push(
+                              parseInt(item)
                             );
                             );
-                            this.activeSoundList[index].chioseMusic.push({
-                              musical: parseInt(shop.goodsIdList),
-                              type: typeJson,
-                              groupPrice: shop.price,
-                              borrowPrice: shop.depositFee,
-                              groupRemissionCourseFee: Boolean(
-                                shop.groupRemissionCourseFee
-                              ),
-                            });
-                          }
+                          });
+                        } else if (shop.type == "INSTRUMENT") {
+                          // 商品
+                          let typeJson = Object.keys(
+                            JSON.parse(shop.kitGroupPurchaseTypeJson)
+                          );
+                          this.activeSoundList[index].chioseMusic.push({
+                            musical: parseInt(shop.goodsIdList),
+                            type: typeJson,
+                            groupPrice: shop.price,
+                            borrowPrice: shop.depositFee,
+                            groupRemissionCourseFee: Boolean(
+                              shop.groupRemissionCourseFee
+                            ),
+                          });
                         }
                         }
-                      });
-                    }
+                      }
+                    });
                   }
                   }
-                );
-              }
+                }
+              );
             }
             }
           }
           }
-        });
-      }
-
+        }
+      });
       getSubject({ tenantId: 1 }).then((res) => {
       getSubject({ tenantId: 1 }).then((res) => {
         if (res.code == 200) {
         if (res.code == 200) {
           this.childSoundList = res.data;
           this.childSoundList = res.data;
@@ -499,43 +501,9 @@ export default {
         });
         });
       });
       });
       if (this.teamStatus == "newTeam") {
       if (this.teamStatus == "newTeam") {
-        // createTeam(obj).then((res) => {
-        //   if (res.code == 200) {
-        //     // 成功 跳转到乐团报名详情
-        //     // let query = this.$route.query;
-        //     // query.type = "teamDraft";
-        //     // this.$router.push({
-        //     //   query: {
-        //     //     ...query,
-        //     //     id: res.data,
-        //     //   },
-        //     // });
-        //     // this.$emit("chiosetab", 2);
-        //     // this.$emit("getBaseInfo", obj);
-        //     //  zheli
-
-        //     // 把第3步单独拆出来做成独立的模块
-        //     this.$confirm("乐团创建成功,是否提交审核?", "提示", {
-        //       confirmButtonText: "确定",
-        //       cancelButtonText: "取消",
-        //       type: "warning",
-        //     })
-        //       .then(() => {
-        //         this.teamStatus = "teamDraft";
-        //         this.teamid = res.data;
-        //         this.submitInfo(1);
-        //       })
-        //       .catch(() => {
-        //         this.$store.dispatch("delVisitedViews", this.$route);
-        //         this.$router.push({
-        //           path: "/teamList",
-        //         });
-        //       });
-        //   }
-        // });
       } else {
       } else {
         obj.musicGroupId = this.teamid;
         obj.musicGroupId = this.teamid;
-        console.log(obj,type)
+        console.log(obj, type);
         if (type) {
         if (type) {
           obj.musicGroupStatus = "AUDIT";
           obj.musicGroupStatus = "AUDIT";
         } else {
         } else {
@@ -560,31 +528,28 @@ export default {
               });
               });
             })
             })
             .catch(() => {});
             .catch(() => {});
-        }else{
-           updateSubjectInfo(obj).then((res) => {
-          if (res.code == 200) {
-
-            if(type == 1){
-               this.$message.success('已提交审核')
-               let query = this.$route.query;
-            this.$store.dispatch("delVisitedViews", this.$route);
-            this.$router.push({
-              path: "/teamList",
-              query: {
-                ...query,
-              },
-            });
-
-            }else{
-               this.$message.success('保存成功')
+        } else {
+          updateSubjectInfo(obj).then((res) => {
+            if (res.code == 200) {
+              this.setStore();
+              if (type == 1) {
+                this.$message.success("已提交审核");
+                let query = this.$route.query;
+                this.$store.dispatch("delVisitedViews", this.$route);
+                this.$router.push({
+                  path: "/teamList",
+                  query: {
+                    ...query,
+                  },
+                });
+              } else {
+                this.$message.success("保存成功");
+              }
+              // this.$emit("chiosetab", 2);
+              // 创建乐团,只会到声部了
             }
             }
-            // this.$emit("chiosetab", 2);
-            // 创建乐团,只会到声部了
-
-          }
-        });
+          });
         }
         }
-
       }
       }
     },
     },
     deleteRow() {
     deleteRow() {
@@ -654,7 +619,6 @@ export default {
       return obj;
       return obj;
     },
     },
     getScroll() {
     getScroll() {
-
       this.scrollTop =
       this.scrollTop =
         window.pageYOffset ||
         window.pageYOffset ||
         document.documentElement.scrollTop ||
         document.documentElement.scrollTop ||

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

@@ -334,7 +334,7 @@
         <!-- 审批或者草稿的下一步 -->
         <!-- 审批或者草稿的下一步 -->
         <div
         <div
           class="nextBtn"
           class="nextBtn"
-          @click="gotoNext(teamStatus == 'newTeam' ? 0 : 1)"
+          @click="gotoNext"
           v-if="!basdisabled"
           v-if="!basdisabled"
         >
         >
           保存
           保存
@@ -441,7 +441,6 @@ export default {
 
 
       paymentForm: {
       paymentForm: {
         paymentExpireDate: null,
         paymentExpireDate: null,
-
         // feeType: null
         // feeType: null
       },
       },
       paymentRules: {
       paymentRules: {
@@ -507,7 +506,12 @@ export default {
   deactivated() {},
   deactivated() {},
   beforeDestroy() {
   beforeDestroy() {
     // this.topFrom.paymentExpireDate = this.paymentExpireDate;
     // this.topFrom.paymentExpireDate = this.paymentExpireDate;
-    if (this.$route.query.id) {
+   this.setStore()
+  },
+
+  methods: {
+    setStore(){
+       if (this.$route.query.id) {
       sessionStorage.setItem(
       sessionStorage.setItem(
         `${this.$route.query.id}base`,
         `${this.$route.query.id}base`,
         JSON.stringify(this.topFrom)
         JSON.stringify(this.topFrom)
@@ -515,9 +519,7 @@ export default {
     } else {
     } else {
       sessionStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
       sessionStorage.setItem(`newTeambase`, JSON.stringify(this.topFrom));
     }
     }
-  },
-
-  methods: {
+    },
     //|| this.teamStatus === 'teamAudit'
     //|| this.teamStatus === 'teamAudit'
     isNotEditing: function () {
     isNotEditing: function () {
       return !(
       return !(
@@ -691,7 +693,7 @@ export default {
       });
       });
     },
     },
     chioseSchool(val) {},
     chioseSchool(val) {},
-    gotoNext(num) {
+    gotoNext() {
       this.$refs["topinfo"].validate((valid, object) => {
       this.$refs["topinfo"].validate((valid, object) => {
         if (!valid) {
         if (!valid) {
           this.$message.error("请填写建团必要参数");
           this.$message.error("请填写建团必要参数");
@@ -774,11 +776,12 @@ export default {
             repairUserId: this.topFrom.repairUserId || null,
             repairUserId: this.topFrom.repairUserId || null,
             feeType: this.topFrom.feeType,
             feeType: this.topFrom.feeType,
           };
           };
-          obj.musicGroupPaymentEntities = [];
+          // obj.musicGroupPaymentEntities = [];
           // createTeam
           // createTeam
           if (this.teamStatus != "newTeam") {
           if (this.teamStatus != "newTeam") {
             resetTeamBaseInfo(obj).then((res) => {
             resetTeamBaseInfo(obj).then((res) => {
               if (res.code == 200) {
               if (res.code == 200) {
+                 this.setStore()
                 if (this.teamStatus == "teamDraft") {
                 if (this.teamStatus == "teamDraft") {
                   this.$message.success("保存成功");
                   this.$message.success("保存成功");
                   // 跳到第二页
                   // 跳到第二页
@@ -791,15 +794,22 @@ export default {
             });
             });
           } else {
           } else {
             // 发送建团申请 成功后跳到第二页
             // 发送建团申请 成功后跳到第二页
-
             createTeam(obj).then((res) => {
             createTeam(obj).then((res) => {
               if (res.code == 200) {
               if (res.code == 200) {
                 // this.$message.success('建团成功,请设置声部信息')
                 // this.$message.success('建团成功,请设置声部信息')
                 // this.$emit("chiosetab", 1);
                 // this.$emit("chiosetab", 1);
-                this.$confirm("新建乐团成功是否继续设置声部信息", "提示", {
+                const h = this.$createElement;
+                this.$msgbox({
+                  title: "提示",
+                  message: h("p", null, [
+                    h("p", null, "新建与团成功 "),
+                    h("p", null, "请设置声部信息"),
+                  ]),
+                  type: "warning",
                   confirmButtonText: "是",
                   confirmButtonText: "是",
                   cancelButtonText: "否",
                   cancelButtonText: "否",
-                  type: "warning",
+                  showCancelButton: true,
+                  customClass: "messageBox-prompt-test",
                 })
                 })
                   .then(() => {
                   .then(() => {
                     this.$router.push({
                     this.$router.push({
@@ -809,8 +819,9 @@ export default {
                         team_status: "DRAFT",
                         team_status: "DRAFT",
                       }),
                       }),
                     });
                     });
-                    this.$emit("handleClick", { name: "2" });
+
                     this.$emit("getName", this.topFrom.name);
                     this.$emit("getName", this.topFrom.name);
+                    this.$emit("handleClick", { name: "2" });
                   })
                   })
                   .catch(() => {
                   .catch(() => {
                     this.$router.push({
                     this.$router.push({
@@ -1119,6 +1130,11 @@ export default {
 };
 };
 </script>
 </script>
 <style lang="scss" >
 <style lang="scss" >
+.messageBox-prompt-test {
+  .el-message-box__status {
+    top: 25% !important;
+  }
+}
 .base-container {
 .base-container {
   overflow: auto;
   overflow: auto;
   // display: flex;
   // display: flex;

+ 155 - 0
src/views/teamBuild/components/teamRemainTime.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+    <el-form ref="search" :model="search" inline @submit.stop.native="submit" @reset.stop.native="reset">
+      <el-form-item prop="keyword">
+        <el-input v-model.trim="search.keyword" clearable placeholder="学生姓名(手机、编号)"/>
+      </el-form-item>
+      <el-form-item prop="hastimer">
+        <el-select v-model.trim="search.hastimer" clearable placeholder="是否存在剩余时长">
+          <el-option label="是" value="1"></el-option>
+          <el-option label="否" value="0"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" native-type="submit">搜索</el-button>
+        <el-button type="danger" native-type="reset">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      :data="filterlist"
+      :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+    >
+      <!-- <el-table-column
+        prop="type"
+        label="课程类型"
+        align="center"
+      >
+        <template slot-scope="scope">
+          {{courseType[scope.row.type]}}
+        </template>
+      </el-table-column> -->
+      <el-table-column
+        prop="userId"
+        label="学生编号"
+        width="120"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <copy-text>{{scope.row.userId}}</copy-text>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="username"
+        label="学生姓名"
+        width="120"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <copy-text>{{scope.row.username}}</copy-text>
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="phone"
+        label="学生手机号"
+        width="140"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <copy-text>{{scope.row.phone}}</copy-text>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="课程时长"
+      >
+        <template slot-scope="scope">
+          <el-tag
+            style="margin-right: 5px;margin-bottom: 5px;"
+            v-for="item in scope.row.mapDtos"
+            :key="item.key"
+            type="info"
+            size="small"
+          >{{courseType[item.key]}}: {{item.value}}分钟</el-tag>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column
+        prop="time"
+        label="剩余时长(分)"
+        align="center"
+      /> -->
+    </el-table>
+  </div>
+</template>
+
+<script>
+import { queryStudentSubTotalCourseTimes } from '@/views/teamDetail/api'
+import { courseType } from '@/constant'
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      courseType,
+      list: [],
+      filterlist: [],
+      extra: [],
+      search: {
+        keyword: '',
+        hastimer: ''
+      }
+    }
+  },
+  mounted() {
+    this.FetchDetail()
+  },
+  methods: {
+    array2object(list = []) {
+      const data = {}
+      for (const item of list) {
+        data[item.key] = item.value
+      }
+      return data
+    },
+    filter() {
+      const { keyword, hastimer } = this.search
+      this.filterlist = this.list.filter(item => {
+        const user = !keyword || (
+          ('' + item.userId).indexOf(keyword) > -1 ||
+          ('' + item.phone).indexOf(keyword) > -1 ||
+          ('' + item.username).indexOf(keyword) > -1
+        )
+        const length = item.mapDtos.filter(dto => dto.value > 0).length
+        const couse = !hastimer || (hastimer == '1' && length || hastimer == '0' && !length)
+        return user && couse
+      })
+    },
+    submit(evt) {
+      evt.stopPropagation()
+      evt.stopImmediatePropagation()
+      evt.preventDefault()
+      this.filter()
+    },
+    reset(evt) {
+      evt.stopPropagation()
+      evt.stopImmediatePropagation()
+      evt.preventDefault()
+      this.search = {
+        keyword: '',
+        hastimer: ''
+      }
+      this.filter()
+    },
+    async FetchDetail() {
+      try {
+        const res = await queryStudentSubTotalCourseTimes({
+          musicGroupId: this.$route.query.id,
+        })
+        this.list = res.data
+        this.filter()
+        if (res.data[0]) {
+          this.extra = res.data[0].mapDtos
+        }
+        // this.list = Object.keys(res.data).map(item => ({type: item, time: res.data[item]}))
+      } catch (error) {}
+    }
+  }
+}
+</script>

+ 4 - 4
src/views/teamDetail/components/courseList.vue

@@ -78,15 +78,15 @@
       @click="resetTimer">修改日期</div>-->
       @click="resetTimer">修改日期</div>-->
     </div>
     </div>
     <!-- -->
     <!-- -->
-
+<!--  @selection-change="handleSelectionChange" -->
     <!-- 列表 -->
     <!-- 列表 -->
     <div class="tableWrap">
     <div class="tableWrap">
       <el-table :data="tableList"
       <el-table :data="tableList"
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}"
-                @selection-change="handleSelectionChange">
-        <el-table-column type="selection"
+               >
+        <!-- <el-table-column type="selection"
                          width="55"
                          width="55"
-                         :selectable="checkSelectable"></el-table-column>
+                         :selectable="checkSelectable"></el-table-column> -->
         <el-table-column align='center'
         <el-table-column align='center'
                          prop="courseScheduleId"
                          prop="courseScheduleId"
                          label="课程编号"></el-table-column>
                          label="课程编号"></el-table-column>

+ 6 - 134
src/views/teamDetail/components/resetClass.vue

@@ -43,7 +43,9 @@
           tooltip-effect="dark"
           tooltip-effect="dark"
           @selection-change="handleSelectionChange"
           @selection-change="handleSelectionChange"
         >
         >
+        <!-- checkSignPostpone -->
           <el-table-column
           <el-table-column
+          :selectable="checkSignPostpone"
             type="selection"
             type="selection"
             width="55"
             width="55"
             v-if="team_status == 'PROGRESS'"
             v-if="team_status == 'PROGRESS'"
@@ -149,7 +151,7 @@
                   type="text"
                   type="text"
                   v-if="
                   v-if="
                     team_status == 'PROGRESS' &&
                     team_status == 'PROGRESS' &&
-                    permission('courseSchedule/coursePostpone')
+                    permission('courseSchedule/coursePostpone')&&checkSignPostpone(scope.row)
                   "
                   "
                   @click="signPostpone(scope.row)"
                   @click="signPostpone(scope.row)"
                   >顺延课程</el-button
                   >顺延课程</el-button
@@ -1354,139 +1356,6 @@ export default {
         }
         }
       }
       }
     },
     },
-    // 提交临时班的信息
-    // submitTemporary(type) {
-    //   // 参数是一样  type为1 新增临时班
-    //   // type为2  新增声部班
-    //   // type为3 修改班级信息
-
-    //   if (type == 1) {
-    //     this.isTemporary = true;
-    //   } else {
-    //     this.isTemporary = false;
-    //   }
-
-    //   this.$refs["teacherForm"].validate((item) => {
-    //     if (item) {
-    //       let week = this.weekList;
-    //       if (this.teacherForm.isAdd != "onlyUpdateTeacher") {
-    //         if (
-    //           !week[0] ||
-    //           !week[0].startClassTime ||
-    //           !week[0].endClassTime ||
-    //           !week[0].dayOfWeek
-    //         ) {
-    //           this.$message.error("至少排一节课");
-    //           return;
-    //         }
-    //       }
-
-    //       // 这里代表排课成功  发请求  新增临时班
-    //       let classGroupName = this.className;
-    //       let classGroupTeacherMapperList = [
-    //         { userId: this.teacherForm.coreTeacher, teacherRole: "BISHOP" },
-    //       ];
-    //       for (let i in this.teacherForm.assistant) {
-    //         classGroupTeacherMapperList.push({
-    //           userId: this.teacherForm.assistant[i],
-    //           teacherRole: "TEACHING",
-    //         });
-    //       }
-    //       // let mixClassGroupId = this.teacherForm.mixClassGroupId;
-    //       let musicGroupId = this.teamid;
-    //       let startDate = this.teacherForm.courseTime;
-    //       let courseType = this.teacherForm.courseType;
-    //       let courseTimes = this.teacherForm.courseNum;
-
-    //       if (
-    //         courseTimes <= 0 &&
-    //         this.teacherForm.isAdd != "onlyUpdateTeacher"
-    //       ) {
-    //         this.$message.error("请至少排一节课");
-    //         return;
-    //       } else if (courseTimes > this.maxMun) {
-    //         this.$message.error(`一次最多排${this.maxMun}节课`);
-    //         return;
-    //       }
-    //       let students = this.activeListStudent.map((item) => {
-    //         return item.userId;
-    //       });
-    //       let holiday = this.teacherForm.checked;
-    //       let courseList = [];
-    //       for (let i in this.weekList) {
-    //         courseList.push(this.weekList[i]);
-    //       }
-    //       if (
-    //         courseList.length <= 0 &&
-    //         this.teacherForm.isAdd != "onlyUpdateTeacher"
-    //       ) {
-    //         this.$message.error("新增班级至少排一节课");
-    //         return;
-    //       }
-    //       if (this.teacherForm.isAdd == "onlyUpdateTeacher") {
-    //         startDate = null;
-    //         courseType = null;
-    //         students = null;
-    //         holiday = null;
-    //         courseTimes = null;
-    //         (courseList = null), (mineType = null);
-    //       }
-    //       //       mixClassGroupId,
-    //       let mineType = this.activeType;
-    //       let obj = {
-    //         classGroupName,
-    //         classGroupTeacherMapperList,
-    //         musicGroupId,
-    //         startDate,
-    //         courseType,
-    //         students,
-    //         holiday,
-    //         courseTimes,
-    //         courseTimeDtoList: courseList,
-    //         type: mineType,
-    //         courseAddType: this.teacherForm.isAdd,
-    //       };
-    //       if (type == 1) {
-    //         // 新增临时班级
-    //         revisionClassGroup(obj).then((res) => {
-    //           if (res.code == 200) {
-    //             // 提示修改成功
-    //             this.$message.success("修改成功");
-    //             this.infoVisible = false;
-    //             this.studentVisible = false;
-    //             this.getList();
-    //           }
-    //         });
-    //       } else if (type == 2) {
-    //         (obj.subjectId = this.teacherForm.sound),
-    //           (obj.expectStudentNum = this.teacherForm.expectStudentNum);
-    //         // 新增声部班
-    //         revisionAddClassGroup(obj).then((res) => {
-    //           if (res.code == 200) {
-    //             // 修改成功
-    //             this.$message.success("修改成功");
-    //             this.infoVisible = false;
-    //             this.studentVisible = false;
-    //             this.getList();
-    //           }
-    //         });
-    //       } else if (type == 3) {
-    //         // 乐团修改
-    //         obj.classGroupId = this.activeClass;
-    //         classGroupUpdate(obj).then((res) => {
-    //           if (res.code == 200) {
-    //             this.$message.success("修改成功");
-    //             this.infoVisible = false;
-    //             this.getList();
-    //           }
-    //         });
-    //       }
-    //     } else {
-    //       this.$message.error("请填写必要信息");
-    //       return;
-    //     }
-    //   });
-    // },
     // 新建基础技能班
     // 新建基础技能班
     newClassHight() {
     newClassHight() {
       this.$refs["newClassForm"].validate((res) => {
       this.$refs["newClassForm"].validate((res) => {
@@ -1703,6 +1572,9 @@ export default {
       }
       }
       this.postponeVisible = true;
       this.postponeVisible = true;
     },
     },
+    checkSignPostpone(row){
+      return row.totalClassTimes - row.currentClassTimes >0
+    },
     handleClose() {
     handleClose() {
       // 弹窗关闭之前
       // 弹窗关闭之前
       this.postponeVisible = false;
       this.postponeVisible = false;

+ 59 - 32
src/views/teamDetail/components/studentList.vue

@@ -21,12 +21,19 @@
     </statistic> -->
     </statistic> -->
 
 
     <!-- style="margin-bottom: 15px" -->
     <!-- style="margin-bottom: 15px" -->
-        <p
+    <p
       style="margin-bottom: 15px; font-size: 16px; font-weight: 400"
       style="margin-bottom: 15px; font-size: 16px; font-weight: 400"
+      v-if="
+        team_status == 'PAY' ||
+        team_status == 'APPLY' ||
+        (team_status == 'PROGRESS' && isCanReg) ||
+        team_status == 'PREPARE'
+      "
     >
     >
-      报名截止时间:{{ applyExpireDate | formatTimer }} 缴费截止时间:{{
-        paymentExpireDate | formatTimer
-      }}
+      <span> 报名截止时间:{{ applyExpireDate | formatTimer }} </span>
+      <span v-if="team_status != 'APPLY'">
+        缴费截止时间:{{ paymentExpireDate | formatTimer }}
+      </span>
     </p>
     </p>
     <div class="studentListWrap" v-if="team_status == 'PROGRESS'">
     <div class="studentListWrap" v-if="team_status == 'PROGRESS'">
       <div
       <div
@@ -39,21 +46,21 @@
       <!-- 可以直接去学生考勤查看 -->
       <!-- 可以直接去学生考勤查看 -->
       <!-- <el-button type="primary" v-permission="'/studentSignin'"
       <!-- <el-button type="primary" v-permission="'/studentSignin'"
               @click="gotoSignin">点名总览</el-button> -->
               @click="gotoSignin">点名总览</el-button> -->
-      <div
+      <!-- <div
         class="newBand"
         class="newBand"
         v-permission="'studentManage/queryStudentSubTotalCourseTimes'"
         v-permission="'studentManage/queryStudentSubTotalCourseTimes'"
         @click="viewTimer"
         @click="viewTimer"
         style="margin-right: 15px"
         style="margin-right: 15px"
       >
       >
         剩余时长明细
         剩余时长明细
-      </div>
+      </div> -->
     </div>
     </div>
     <div
     <div
       style="display: flex; justify-content: space-between; align-items: center"
       style="display: flex; justify-content: space-between; align-items: center"
       v-if="
       v-if="
         team_status == 'PAY' ||
         team_status == 'PAY' ||
         team_status == 'APPLY' ||
         team_status == 'APPLY' ||
-        team_status == 'PROGRESS' ||
+        (team_status == 'PROGRESS' && isCanReg) ||
         team_status == 'PREPARE'
         team_status == 'PREPARE'
       "
       "
     >
     >
@@ -129,9 +136,7 @@
         </div>
         </div>
         <div
         <div
           v-if="
           v-if="
-            team_status == 'APPLY' ||
-            team_status == 'PROGRESS' ||
-            team_status == 'PREPARE'
+            team_status == 'APPLY'
           "
           "
           v-permission="'studentRegistration/openPayment'"
           v-permission="'studentRegistration/openPayment'"
           class="newBand"
           class="newBand"
@@ -190,21 +195,21 @@
               <el-button v-show="isEdit" @click="saveIsEdit">保存</el-button>
               <el-button v-show="isEdit" @click="saveIsEdit">保存</el-button>
             </div>
             </div>
           </div>
           </div>
-          <auth :auths="'studentRegistration/openPayment'">
+          <!-- <auth :auths="'studentRegistration/openPayment'">
             <el-button
             <el-button
               style="background-color: #14928a; border: 1px solid #14928a"
               style="background-color: #14928a; border: 1px solid #14928a"
               @click="onPartPayment"
               @click="onPartPayment"
               type="primary"
               type="primary"
               >开启缴费</el-button
               >开启缴费</el-button
             >
             >
-          </auth>
+          </auth> -->
           <div class="newBand" style="margin-bottom: 10px" slot="reference">
           <div class="newBand" style="margin-bottom: 10px" slot="reference">
             声部报名计划
             声部报名计划
           </div>
           </div>
         </el-popover>
         </el-popover>
       </div>
       </div>
     </div>
     </div>
-         <!-- v-if="
+    <!-- v-if="
         team_status == 'PAY' ||
         team_status == 'PAY' ||
         team_status == 'PROGRESS' ||
         team_status == 'PROGRESS' ||
         team_status == 'PREPARE'
         team_status == 'PREPARE'
@@ -571,7 +576,7 @@
               <auth :auths="'studentRegistration/batchUpdateSubject'">
               <auth :auths="'studentRegistration/batchUpdateSubject'">
                 <el-button
                 <el-button
                   type="text"
                   type="text"
-                  v-show="scope.row.paymentStatus != 1"
+                  v-show="scope.row.paymentStatus != 2&&isShowResSound()"
                   @click="resetSubject(scope.row)"
                   @click="resetSubject(scope.row)"
                   >修改专业</el-button
                   >修改专业</el-button
                 >
                 >
@@ -592,7 +597,7 @@
               <!-- &&  status == "PAY"-->
               <!-- &&  status == "PAY"-->
               <auth
               <auth
                 :auths="'studentRegistration/queryFeeDetail'"
                 :auths="'studentRegistration/queryFeeDetail'"
-                v-show="scope.row.paymentStatus == 1"
+                v-show="scope.row.paymentStatus == 2"
               >
               >
                 <el-button type="text" @click="lookdetail(scope.row)"
                 <el-button type="text" @click="lookdetail(scope.row)"
                   >查看</el-button
                   >查看</el-button
@@ -600,7 +605,7 @@
               </auth>
               </auth>
               <auth
               <auth
                 :auths="'subjectChange/getStudentOriginal'"
                 :auths="'subjectChange/getStudentOriginal'"
-                v-show="scope.row.paymentStatus == 1"
+                v-show="scope.row.paymentStatus == 2&&isShowResSound()"
               >
               >
                 <el-button type="text" @click="openChangeVoice(scope.row)"
                 <el-button type="text" @click="openChangeVoice(scope.row)"
                   >更改声部</el-button
                   >更改声部</el-button
@@ -933,7 +938,7 @@
         style="padding: 0 20px"
         style="padding: 0 20px"
         :organId="organId"
         :organId="organId"
         @close="mergeVisible = false"
         @close="mergeVisible = false"
-        @submited="gotoStudentList"
+        @submited="getList"
       />
       />
     </el-dialog>
     </el-dialog>
     <el-dialog
     <el-dialog
@@ -1116,7 +1121,9 @@ import {
   getTeamBaseInfo,
   getTeamBaseInfo,
   getintoClass,
   getintoClass,
   resetPlanNum,
   resetPlanNum,
-  openPayment
+  openPayment,
+  musicGroupFound,
+  checkCanReg,
 } from "@/api/buildTeam";
 } from "@/api/buildTeam";
 import {
 import {
   addStudent,
   addStudent,
@@ -1139,12 +1146,12 @@ import cleanDeep from "clean-deep";
 import createUserPay from "./modals/create-user-pay.vue";
 import createUserPay from "./modals/create-user-pay.vue";
 import TimesView from "./modals/course-time-detail";
 import TimesView from "./modals/course-time-detail";
 import paymentCycle from "../../resetTeaming/modals/payment-cycle";
 import paymentCycle from "../../resetTeaming/modals/payment-cycle";
-
 import paymentList from "./modals/payment-list";
 import paymentList from "./modals/payment-list";
 import Tooltip from "@/components/Tooltip/index";
 import Tooltip from "@/components/Tooltip/index";
 import changeVoice from "@/views/teamBuild/modals/change-voice";
 import changeVoice from "@/views/teamBuild/modals/change-voice";
 //import changeVoice from "./modals/change-voice";
 //import changeVoice from "./modals/change-voice";
 import visit from "@/views/withdrawal-application/modals/visit";
 import visit from "@/views/withdrawal-application/modals/visit";
+import mergeMusic from "@/views/teamBuild/components/merge-music";
 export default {
 export default {
   name: "tstudentList",
   name: "tstudentList",
   data() {
   data() {
@@ -1369,6 +1376,8 @@ export default {
       },
       },
       subjectVisible: false,
       subjectVisible: false,
       multipleSelection: [],
       multipleSelection: [],
+      isCanReg: false,
+      organId: "",
     };
     };
   },
   },
   components: {
   components: {
@@ -1381,6 +1390,7 @@ export default {
     visit,
     visit,
     qrCode,
     qrCode,
     changeVoice,
     changeVoice,
+    mergeMusic,
   },
   },
   created() {},
   created() {},
   filters: {
   filters: {
@@ -1416,9 +1426,16 @@ export default {
     permission(str) {
     permission(str) {
       return permission(str);
       return permission(str);
     },
     },
-    init() {
+    async init() {
       this.teamid = this.$route.query.id;
       this.teamid = this.$route.query.id;
       this.team_status = this.$route.query.team_status;
       this.team_status = this.$route.query.team_status;
+      // 获取乐团是否能补招
+      try {
+        const ruselt = await checkCanReg({ musicGroupId: this.teamid });
+        this.isCanReg = ruselt.data;
+      } catch (e) {
+        console.log(e);
+      }
       getMusicGroupGradeList({ musicGroupId: this.teamid }).then((res) => {
       getMusicGroupGradeList({ musicGroupId: this.teamid }).then((res) => {
         let result = res.data;
         let result = res.data;
         if (res.code == 200 && result) {
         if (res.code == 200 && result) {
@@ -1435,6 +1452,7 @@ export default {
         if (res.code == 200) {
         if (res.code == 200) {
           this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
           this.paymentExpireDate = res.data.musicGroup.paymentExpireDate;
           this.applyExpireDate = res.data.musicGroup.applyExpireDate;
           this.applyExpireDate = res.data.musicGroup.applyExpireDate;
+          this.organId = res.data.musicGroup.organId;
         }
         }
       });
       });
 
 
@@ -1459,17 +1477,6 @@ export default {
         }
         }
       });
       });
 
 
-      // getSubject().then(res => {
-      //   if (res.code == 200) {
-      //     this.soundList = res.data;
-      //   }
-      // })
-      // 获取乐团所有声部课班
-      // getSingleClass({ musicGroupId: this.teamid }).then(res => {
-      //   if (res.code == 200) {
-      //     this.signList = res.data;
-      //   }
-      // })
       // 获取乐团基本信息
       // 获取乐团基本信息
       getMusicGroup({ musicGroupId: this.teamid }).then(
       getMusicGroup({ musicGroupId: this.teamid }).then(
         (res) => (this.baseInfo = res.data)
         (res) => (this.baseInfo = res.data)
@@ -1625,6 +1632,7 @@ export default {
         if (res.code == 200) {
         if (res.code == 200) {
           this.tableList = res.data.rows;
           this.tableList = res.data.rows;
           this.rules.total = res.data.total;
           this.rules.total = res.data.total;
+          this.getStudentStatus();
         }
         }
       });
       });
     },
     },
@@ -2044,7 +2052,8 @@ export default {
               //     ...query,
               //     ...query,
               //   },
               //   },
               // });
               // });
-              this.onCancel();
+              this.$store.dispatch("delVisitedViews", this.$route);
+              this.$router.push({ path: "/teamList" });
             }
             }
           });
           });
         })
         })
@@ -2343,6 +2352,24 @@ export default {
     checkboxSelect(row) {
     checkboxSelect(row) {
       return row.paymentStatus == 0;
       return row.paymentStatus == 0;
     },
     },
+    isShowResSound() {
+      /**
+       *         team_status == 'PAY' ||
+        team_status == 'APPLY' ||
+        team_status == 'PROGRESS'&&isCanReg ||
+        team_status == 'PREPARE')
+       */
+      if (this.team_status == "PAY" || this.team_status == "APPLY") {
+        return true;
+      } else if (
+        this.team_status == "PROGRESS" ||
+        this.team_status == "PREPARE"
+      ) {
+        return this.isCanReg
+      }else {
+        return false
+      }
+    },
   },
   },
   watch: {
   watch: {
     quitVisible(val) {
     quitVisible(val) {

+ 194 - 153
src/views/teamDetail/teamDetailedList.vue

@@ -22,210 +22,251 @@
     </div> -->
     </div> -->
     <div class="m-core">
     <div class="m-core">
       <div class="tableWrap">
       <div class="tableWrap">
-        <el-table :header-cell-style="{background:'#EDEEF0',color:'#444'}"
-                  :data='tableList'>
-          <el-table-column label="商品编号"
-                           prop='sn'
-                           align="center">
+        <el-table
+          :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
+          :data="tableList"
+        >
+          <el-table-column label="商品编号" prop="sn" align="center">
           </el-table-column>
           </el-table-column>
-          <el-table-column label="商品名称"
-                           align="center"
-                           prop='name'>
+          <el-table-column label="商品名称" align="center" prop="name">
           </el-table-column>
           </el-table-column>
-          <el-table-column label="商品类型"
-                           align="center"
-                           prop='type'>
+          <el-table-column label="商品类型" align="center" prop="type">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div>
               <div>
                 {{ scope.row.type | shopType }}
                 {{ scope.row.type | shopType }}
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column label="具体型号"
-                           align="center"
-                           prop='specification'>
+          <el-table-column label="具体型号" align="center" prop="specification">
           </el-table-column>
           </el-table-column>
-          <el-table-column label="数量统计"
-                           align="center"
-                           prop='sellCount'>
+          <el-table-column label="数量统计" align="center" prop="sellCount">
           </el-table-column>
           </el-table-column>
         </el-table>
         </el-table>
       </div>
       </div>
     </div>
     </div>
-    <div class="btnWrap"
-         style="margin-top:20px;">
-      <el-button type="primary"
-                 v-if="tableList.length > 0"
-                 v-permission="'order/musicalListExport'"
-                 @click="musicalListExport">订货清单导出</el-button>
-      <el-button type="primary"
-                 v-if="tableList.length > 0"
-                 v-permission="'order/musicalListDetailExport'"
-                 @click="musicalListDetailExport">分发清单导出</el-button>
-      <el-button type="warning okBtn"
-      v-if="team_status =='PREPARE'"
-                 v-permission="'order/verifyMusicalList'"
-                 @click="okDetailList">确认</el-button>
+    <div class="btnWrap" style="margin-top: 20px">
+      <el-button
+        type="primary"
+        v-if="tableList.length > 0"
+        v-permission="'order/musicalListExport'"
+        @click="musicalListExport"
+        >订货清单导出</el-button
+      >
+      <el-button
+        type="primary"
+        v-if="tableList.length > 0"
+        v-permission="'order/musicalListDetailExport'"
+        @click="musicalListDetailExport"
+        >分发清单导出</el-button
+      >
+      <el-button
+        type="warning okBtn"
+        v-if="team_status == 'PREPARE'&&!hasVerifyMusicalList"
+        v-permission="'order/verifyMusicalList'"
+        @click="okDetailList"
+        >确认</el-button
+      >
       <!-- <div class="okBtn" v-permission="'order/verifyMusicalList'"
       <!-- <div class="okBtn" v-permission="'order/verifyMusicalList'"
            @click="okDetailList">确认</div> -->
            @click="okDetailList">确认</div> -->
     </div>
     </div>
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { getTeamDetailList } from '@/api/buildTeam'
-import { verifyMusicalList } from '@/api/orderManager'
-import axios from 'axios'
-import qs from 'qs'
-import { getToken } from '@/utils/auth'
-import load from '@/utils/loading'
+import { getTeamDetailList } from "@/api/buildTeam";
+import { getTeamList } from "@/api/teamServer";
+import { verifyMusicalList } from "@/api/orderManager";
+import axios from "axios";
+import qs from "qs";
+import { getToken } from "@/utils/auth";
+import load from "@/utils/loading";
 export default {
 export default {
-  data () {
+  data() {
     return {
     return {
-      teamid: '',
+      teamid: "",
       tableList: [],
       tableList: [],
       Fsearch: null,
       Fsearch: null,
       Frules: null,
       Frules: null,
-      team_status:''
-    }
+      team_status: "",
+      hasVerifyMusicalList:true
+    };
   },
   },
-  mounted () {
-    this.init()
+  mounted() {
+    this.init();
   },
   },
-  activated () {
-    this.init()
+  activated() {
+    this.init();
   },
   },
   methods: {
   methods: {
-    init () {
+    init() {
       this.team_status = this.$route.query.team_status;
       this.team_status = this.$route.query.team_status;
       this.teamid = this.$route.query.id;
       this.teamid = this.$route.query.id;
-      getTeamDetailList({ musicGroupId: this.teamid }).then(res => {
-        if (res.code == 200) {
-          this.tableList = res.data ? res.data : [];
-        }
-      })
-    },
-    onCancel () {
-       this.$store.dispatch('delVisitedViews', this.$route)
-      this.$router.push({ path: '/teamList'})
-    },
-    okDetailList () {
-      this.$confirm(`是否确认发放清单?`, '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        verifyMusicalList({ musicGroupId: this.teamid }).then(res => {
+      if (this.teamid) {
+        getTeamList({ musicGroupId: this.teamid }).then(res=>{
+          if(res.code == 200){
+            this.hasVerifyMusicalList = res?.data?.rows[0]?.hasVerifyMusicalList
+          }
+        })
+        getTeamDetailList({ musicGroupId: this.teamid }).then((res) => {
           if (res.code == 200) {
           if (res.code == 200) {
-            this.$router.push({ path: '/teamList', query: { search: this.Fsearch, rules: this.Frules } })
+            this.tableList = res.data ? res.data : [];
           }
           }
+        });
+      }
+    },
+    onCancel() {
+      this.$store.dispatch("delVisitedViews", this.$route);
+      this.$router.push({ path: "/teamList" });
+    },
+    okDetailList() {
+      this.$confirm(`是否确认发放清单?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          verifyMusicalList({ musicGroupId: this.teamid }).then((res) => {
+            if (res.code == 200) {
+              this.$router.push({
+                path: "/teamList",
+                query: { search: this.Fsearch, rules: this.Frules },
+              });
+            }
+          });
         })
         })
-      }).catch(() => { })
-
+        .catch(() => {});
     },
     },
-    musicalListExport () { // 报表导出
-      let url = '/api-web/order/musicalListExport'
+    musicalListExport() {
+      // 报表导出
+      let url = "/api-web/order/musicalListExport";
       let data = {
       let data = {
         musicGroupId: this.$route.query.id,
         musicGroupId: this.$route.query.id,
-      }
+      };
       const options = {
       const options = {
-        method: 'POST',
+        method: "POST",
         headers: {
         headers: {
-          'Authorization': getToken()
+          Authorization: getToken(),
         },
         },
         data: qs.stringify(data),
         data: qs.stringify(data),
         url,
         url,
-        responseType: 'blob'
-      }
-      this.$confirm('您确定导出订货清单', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        load.startLoading()
-        axios(options).then(res => {
-          let blob = new Blob([res.data], {
-            // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-            type: 'application/vnd.ms-excel;charset=utf-8'
-            //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-          })
-          let text = (new Response(blob)).text()
-          text.then(res => {
-            // 判断是否报错
-            if (res.indexOf('code') != -1) {
-              let json = JSON.parse(res)
-              this.$message.error(json.msg)
-            } else {
-              let objectUrl = URL.createObjectURL(blob)
-              let link = document.createElement("a")
-              let nowTime = new Date()
-              let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
-              let fname = this.$route.query.id + '-' + ymd + '订货清单.xls' //下载文件的名字
-              link.href = objectUrl
-              link.setAttribute("download", fname)
-              document.body.appendChild(link)
-              link.click()
-            }
-          })
-          load.endLoading();
-        }).catch(error => {
-          this.$message.error('导出数据失败,请联系管理员');
-          load.endLoading();
+        responseType: "blob",
+      };
+      this.$confirm("您确定导出订货清单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          load.startLoading();
+          axios(options)
+            .then((res) => {
+              let blob = new Blob([res.data], {
+                // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+                type: "application/vnd.ms-excel;charset=utf-8",
+                //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+              });
+              let text = new Response(blob).text();
+              text.then((res) => {
+                // 判断是否报错
+                if (res.indexOf("code") != -1) {
+                  let json = JSON.parse(res);
+                  this.$message.error(json.msg);
+                } else {
+                  let objectUrl = URL.createObjectURL(blob);
+                  let link = document.createElement("a");
+                  let nowTime = new Date();
+                  let ymd =
+                    nowTime.getFullYear() +
+                    "" +
+                    (nowTime.getMonth() + 1) +
+                    "" +
+                    nowTime.getDate() +
+                    "" +
+                    nowTime.getHours() +
+                    "" +
+                    nowTime.getMinutes();
+                  let fname = this.$route.query.id + "-" + ymd + "订货清单.xls"; //下载文件的名字
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+              load.endLoading();
+            })
+            .catch((error) => {
+              this.$message.error("导出数据失败,请联系管理员");
+              load.endLoading();
+            });
         })
         })
-      }).catch(() => { })
+        .catch(() => {});
     },
     },
-    musicalListDetailExport () { // 报表导出
-      let url = '/api-web/order/musicalListDetailExport'
+    musicalListDetailExport() {
+      // 报表导出
+      let url = "/api-web/order/musicalListDetailExport";
       let data = {
       let data = {
-        musicGroupId: this.$route.query.id
-      }
+        musicGroupId: this.$route.query.id,
+      };
       const options = {
       const options = {
-        method: 'POST',
+        method: "POST",
         headers: {
         headers: {
-          'Authorization': getToken()
+          Authorization: getToken(),
         },
         },
         data: qs.stringify(data),
         data: qs.stringify(data),
         url,
         url,
-        responseType: 'blob'
-      }
-      this.$confirm('您确定导出分发清单', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        load.startLoading()
-        axios(options).then(res => {
-          let blob = new Blob([res.data], {
-            // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
-            type: 'application/vnd.ms-excel;charset=utf-8'
-            //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
-          })
-          let text = (new Response(blob)).text()
-          text.then(res => {
-            // 判断是否报错
-            if (res.indexOf('code') != -1) {
-              let json = JSON.parse(res)
-              this.$message.error(json.msg)
-            } else {
-              let objectUrl = URL.createObjectURL(blob)
-              let link = document.createElement("a")
-              let nowTime = new Date()
-              let ymd = nowTime.getFullYear() + '' + (nowTime.getMonth() + 1) + '' + nowTime.getDate() + '' + nowTime.getHours() + '' + nowTime.getMinutes()
-              let fname = this.$route.query.id + '-' + ymd + '分发清单.xls' //下载文件的名字
-              link.href = objectUrl
-              link.setAttribute("download", fname)
-              document.body.appendChild(link)
-              link.click()
-            }
-          })
-          load.endLoading();
-        }).catch(error => {
-          this.$message.error('导出数据失败,请联系管理员');
-          load.endLoading();
+        responseType: "blob",
+      };
+      this.$confirm("您确定导出分发清单", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          load.startLoading();
+          axios(options)
+            .then((res) => {
+              let blob = new Blob([res.data], {
+                // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
+                type: "application/vnd.ms-excel;charset=utf-8",
+                //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
+              });
+              let text = new Response(blob).text();
+              text.then((res) => {
+                // 判断是否报错
+                if (res.indexOf("code") != -1) {
+                  let json = JSON.parse(res);
+                  this.$message.error(json.msg);
+                } else {
+                  let objectUrl = URL.createObjectURL(blob);
+                  let link = document.createElement("a");
+                  let nowTime = new Date();
+                  let ymd =
+                    nowTime.getFullYear() +
+                    "" +
+                    (nowTime.getMonth() + 1) +
+                    "" +
+                    nowTime.getDate() +
+                    "" +
+                    nowTime.getHours() +
+                    "" +
+                    nowTime.getMinutes();
+                  let fname = this.$route.query.id + "-" + ymd + "分发清单.xls"; //下载文件的名字
+                  link.href = objectUrl;
+                  link.setAttribute("download", fname);
+                  document.body.appendChild(link);
+                  link.click();
+                }
+              });
+              load.endLoading();
+            })
+            .catch((error) => {
+              this.$message.error("导出数据失败,请联系管理员");
+              load.endLoading();
+            });
         })
         })
-      }).catch(() => { })
-    }
+        .catch(() => {});
+    },
   },
   },
-}
+};
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">