Browse Source

提交开发环境

1
mo 4 years ago
parent
commit
7b7640d11b

+ 1 - 1
src/utils/directivePage.js

@@ -1,7 +1,7 @@
 
 export function permission(value, parent) {
     let permission = window.localStorage.getItem('permission')
-    permission = permission.split(',')
+    if(permission)  permission = permission.split(',')
     parent = parent ? parent : null
     // if(parent) {
     //     if(permission.includes(value) && permission.includes(parent)) {

File diff suppressed because it is too large
+ 384 - 319
src/views/resetTeaming/components/resetPayListSchool.vue


+ 32 - 15
src/views/resetTeaming/index.vue

@@ -8,12 +8,12 @@
         <img :src="stepImgs[team_status]" alt="" />
         {{ musicGroupType[team_status] }}
       </p>
-      <!-- navMenu -->
+      <!-- navMenu   @tab-click="handleClick" -->
       <tab-router
         v-model="activeIndex"
         type="card"
         ref="tab"
-        @tab-click="handleClick"
+        :before-leave="checkGoTo"
       >
         <!-- -->
         <el-tab-pane
@@ -281,24 +281,27 @@ export default {
       this.$router.push({ path: "/teamList" });
     },
     getBaseInfo(baseInfo) {
-      this.baseInfo = baseInfo;
-      if (baseInfo?.musicGroup?.name) {
-        this.teamName = baseInfo?.musicGroup?.name;
+      if (baseInfo) {
+        this.baseInfo = baseInfo;
+        if (baseInfo?.musicGroup?.name) {
+          this.teamName = baseInfo?.musicGroup?.name;
+        }
+        this.musicGroupInfo = baseInfo?.musicGroup;
+      }else{
+        this.__init()
       }
-
-      this.musicGroupInfo = baseInfo?.musicGroup;
     },
-    async handleClick(val) {
+    handleClick(val) {
       this.teamid = this.$route.query.id;
-      if (val.name != 1 && this.$refs.teamBaseInfo) {
-        await this.$refs.teamBaseInfo.setStore();
-        this.activeIndex = val.name
-      }else{
-        this.activeIndex = val.name
-      }
+      // if (val.name != 1 && this.$refs.teamBaseInfo) {
+      //   await this.$refs.teamBaseInfo.setStore();
+      //   this.activeIndex = val.name
+      // }else{
+      //   this.activeIndex = val.name
+      // }
       // this.team_status = this.$route.query.team_status;
       // console.log('切换tab',val)
-      // this.$refs.tab.tab(val);
+      this.$refs.tab.tab(val);
       // this.activeIndex = val.name;
     },
     permission(str) {
@@ -311,6 +314,20 @@ export default {
 
       this.teamid = this.$route.query.id;
     },
+    checkGoTo() {
+      //  if (val.name != 1 && this.$refs.teamBaseInfo) {
+      //   await this.$refs.teamBaseInfo.setStore();
+      // }
+      var p = new Promise(async (resolve, reject) => {
+        if (this.activeIndex == 1 && this.$refs.teamBaseInfo) {
+          await this.$refs.teamBaseInfo.setStore();
+          resolve();
+        } else {
+          resolve();
+        }
+      });
+      return p;
+    },
   },
   watch: {
     //  async activeIndex(val){

+ 6 - 1
src/views/resetTeaming/modals/user-baseinfo.vue

@@ -38,7 +38,7 @@
       type="warning">
       <template #title>
         <p>该乐团为{{chargeTypeName}}模式,若需创建其他模式的收费标准,请先修改乐团基本信息中的乐团模式
-          <strong style="font-weight: 600;margin-left: 10px;cursor: pointer;" @click="$listeners.changeActive({name: '1'})">立即修改>></strong>
+          <strong style="font-weight: 600;margin-left: 10px;cursor: pointer;" @click="changeActive">立即修改>></strong>
       </p>
       </template>
     </el-alert>
@@ -55,6 +55,11 @@ export default {
       console.log(this.paymentType)
     }
   },
+  methods:{
+    changeActive(){
+      this.$listeners.changeActive({name: '1'})
+    }
+  }
 }
 </script>
 <style lang="less" scoped>

+ 340 - 232
src/views/resetTeaming/modals/user-pay-form.vue

@@ -1,88 +1,114 @@
 <template>
   <div>
-    <el-alert title="课程信息设置"
-              :closable="false"
-              class="alert"
-              v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
-              type="info">
+    <el-alert
+      title="课程信息设置"
+      :closable="false"
+      class="alert"
+      v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
+      type="info"
+    >
     </el-alert>
-    <userBaseinfo :form.sync="form"
-                  :isCommon="isCommon"
-                  v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
-                  :isUserType="isUserType"
-                  @getCharges="getCharges"
-                  @changeActive="changeActive"
-                  :typeList="typeList"
-                  :charges="charges"
-                  :rowDetail="rowDetail"
-                  :chargeTypeName="chargeTypeName"
-                  :paymentType="paymentType"
-                  ref="base" />
+    <userBaseinfo
+      :form.sync="form"
+      :isCommon="isCommon"
+      v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
+      :isUserType="isUserType"
+      @getCharges="getCharges"
+      @changeActive="changeActive"
+      :typeList="typeList"
+      :charges="charges"
+      :rowDetail="rowDetail"
+      :chargeTypeName="chargeTypeName"
+      :paymentType="paymentType"
+      ref="base"
+    />
     <template v-if="paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST'">
-      <el-alert title="加课信息设置"
-                :closable="false"
-                class="alert"
-                type="info">
+      <el-alert
+        title="加课信息设置"
+        :closable="false"
+        class="alert"
+        type="info"
+      >
       </el-alert>
-      <extraClassUser :form.sync="eclassuser"
-                  ref="eclass"
-                  :isUserType="isUserType"
-                  :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
-                  @priceChange="priceChange"
-                  :clearable="true"
-                  @moneyChange="syncAllMoney" />
+      <extraClassUser
+        :form.sync="eclassuser"
+        ref="eclass"
+        :isUserType="isUserType"
+        :courseUnitPriceSettingsByType="
+          organizationCourseUnitPriceSettingsByType
+        "
+        @priceChange="priceChange"
+        :clearable="true"
+        @moneyChange="syncAllMoney"
+      />
     </template>
     <template v-else-if="!isCommon">
-      <el-alert title="加课信息设置"
-                :closable="false"
-                class="alert"
-                type="info">
+      <el-alert
+        title="加课信息设置"
+        :closable="false"
+        class="alert"
+        type="info"
+      >
       </el-alert>
-      <extraClass :form.sync="eclass"
-                  ref="eclass"
-                  @create="addExtraClass"
-                  @remove="removeExtraClass"
-                  :isUserType="isUserType"
-                  :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
-                  @priceChange="priceChange"
-                  :clearable="true"
-                  @moneyChange="syncAllMoney" />
+      <extraClass
+        :form.sync="eclass"
+        ref="eclass"
+        @create="addExtraClass"
+        @remove="removeExtraClass"
+        :isUserType="isUserType"
+        :courseUnitPriceSettingsByType="
+          organizationCourseUnitPriceSettingsByType
+        "
+        @priceChange="priceChange"
+        :clearable="true"
+        @moneyChange="syncAllMoney"
+      />
     </template>
-    <extraClass v-else-if="(!isCommon && eclass.length) || isCommon"
-                :form="eclass"
-                ref="eclass"
-                :isCommon="isCommon"
-                @create="addExtraClass"
-                @remove="removeExtraClass"
-                @moneyChange="syncAllMoney"
-                :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
-                :isUserType="isUserType"
-                :isDisabled="form.leixing === '1' || form.leixing === '2' || paymentType == '0'" />
+    <extraClass
+      v-else-if="(!isCommon && eclass.length) || isCommon"
+      :form="eclass"
+      ref="eclass"
+      :isCommon="isCommon"
+      @create="addExtraClass"
+      @remove="removeExtraClass"
+      @moneyChange="syncAllMoney"
+      :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
+      :isUserType="isUserType"
+      :isDisabled="
+        form.leixing === '1' || form.leixing === '2' || paymentType == '0'
+      "
+    />
     <template>
-      <el-alert title="缴费设置"
-                :closable="false"
-                class="alert"
-                type="info">
+      <el-alert title="缴费设置" :closable="false" class="alert" type="info">
       </el-alert>
       <el-form ref="payment" :model="payment">
         <el-form-item
           label-width="160px"
           label="缴费方式"
           prop="paymentPattern"
-          :rules="[{required: true, message: '请选择缴费方式', trigger: 'change'}]"
+          :rules="[
+            { required: true, message: '请选择缴费方式', trigger: 'change' },
+          ]"
         >
-          <el-select style="width: 100%!important;" v-model="payment.paymentPattern" placeholder="请选择缴费方式">
+          <el-select
+            style="width: 100% !important"
+            v-model="payment.paymentPattern"
+            placeholder="请选择缴费方式"
+          >
             <el-option
               v-for="item in paymentPatternTypeOptions"
               :key="item.value"
               :label="item.label"
-              :value="item.value">
+              :value="item.value"
+            >
             </el-option>
           </el-select>
         </el-form-item>
       </el-form>
-      <template v-if="isMulticycle && paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'">
-        <el-collapse :value="collapse" @change="collapseChange" >
+      <template
+        v-if="isMulticycle && paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
+      >
+        <el-collapse :value="collapse" @change="collapseChange">
           <el-collapse-item
             v-for="(item, index) in cycles"
             :key="index"
@@ -90,8 +116,12 @@
           >
             <template slot="title">
               <div class="collapse-title">
-                <span>缴费周期 {{index + 1}}</span>
-                <i v-if="cycles.length > 1" class="el-icon-circle-close" @click.stop="removeCycle(index)"></i>
+                <span>缴费周期 {{ index + 1 }}</span>
+                <i
+                  v-if="cycles.length > 1"
+                  class="el-icon-circle-close"
+                  @click.stop="removeCycle(index)"
+                ></i>
               </div>
             </template>
             <paymentCycle
@@ -100,7 +130,11 @@
               :hidePaymentPattern="true"
               :isCommon="isCommon"
               :isUserType="isUserType"
-              :isDisabled="form.leixing === '1' || form.leixing === '2' || paymentType == '0'"
+              :isDisabled="
+                form.leixing === '1' ||
+                form.leixing === '2' ||
+                paymentType == '0'
+              "
             />
           </el-collapse-item>
         </el-collapse>
@@ -109,9 +143,10 @@
           plain
           type="info"
           size="small"
-          style="width: 100%;margin: 20px 0;"
+          style="width: 100%; margin: 20px 0"
           @click="addCycle"
-        >新增缴费周期</el-button>
+          >新增缴费周期</el-button
+        >
       </template>
       <paymentCycle
         ref="cycle"
@@ -119,27 +154,25 @@
         :isCommon="isCommon"
         :hidePaymentPattern="true"
         :isUserType="isUserType"
-        :isDisabled="form.leixing === '1' || form.leixing === '2' || paymentType == '0'"
+        :isDisabled="
+          form.leixing === '1' || form.leixing === '2' || paymentType == '0'
+        "
         v-else
       />
     </template>
-    <el-alert title="其它"
-              :closable="false"
-              class="alert"
-              type="info">
+    <el-alert title="其它" :closable="false" class="alert" type="info">
     </el-alert>
-    <otherform :form="other"
-               ref="other" />
-    <div slot="footer"
-         class="dialog-footer">
+    <otherform :form="other" ref="other" />
+    <div slot="footer" class="dialog-footer">
       <el-button @click="$listeners.close">取 消</el-button>
-      <el-button type="primary"
-                 @click="submit">确认</el-button>
+      <el-button type="primary" @click="submit">确认</el-button>
     </div>
-    <el-dialog :title="nextTitle"
-               :visible.sync="nextVisible"
-               width="600px"
-               append-to-body>
+    <el-dialog
+      :title="nextTitle"
+      :visible.sync="nextVisible"
+      width="600px"
+      append-to-body
+    >
       <classrooms @close="closeNext" />
     </el-dialog>
   </div>
@@ -149,14 +182,14 @@ import {
   chargeTypeList,
   musicGroupOrganizationCourseSettingsQueryPage,
 } from "@/api/specialSetting";
-import { getMusicGroupPaymentCalenderDetail } from '@/api/buildTeam'
+import { getMusicGroupPaymentCalenderDetail } from "@/api/buildTeam";
 import {
   musicGroupPaymentCalenderAdd,
   musicGroupPaymentCalenderDetailBatchUpdate,
   queryByMusicGroupOrganizationCourseSettingsId,
   musicGroupPaymentCalenderView,
 } from "../api";
-import { paymentPatternType } from '@/constant'
+import { paymentPatternType } from "@/constant";
 import { getTimes, objectToOptions } from "@/utils";
 import userBaseinfo from "./user-baseinfo";
 import paymentCycle from "./payment-cycle";
@@ -164,9 +197,9 @@ import extraClass from "./extra-class";
 import extraClassUser from "./extra-class-user";
 import classrooms from "./classrooms";
 import otherform from "./other";
-import baseInfoVue from '../../teamDetail/components/baseInfo.vue';
-import merge from 'webpack-merge'
-import numeral from 'numeral'
+import baseInfoVue from "../../teamDetail/components/baseInfo.vue";
+import merge from "webpack-merge";
+import numeral from "numeral";
 
 const paymentTypeFormat = {
   0: "MUSIC_APPLY",
@@ -177,7 +210,14 @@ const paymentTypeFormat = {
 };
 
 export default {
-  props: ["type", "musicGroupId", "baseInfo", "paymentType", "rowDetail", 'organizationCourseUnitPriceSettings'],
+  props: [
+    "type",
+    "musicGroupId",
+    "baseInfo",
+    "paymentType",
+    "rowDetail",
+    "organizationCourseUnitPriceSettings",
+  ],
   components: {
     userBaseinfo,
     paymentCycle,
@@ -186,7 +226,7 @@ export default {
     classrooms,
     otherform,
   },
-  data () {
+  data() {
     return {
       options: [],
       form: {
@@ -194,7 +234,7 @@ export default {
         leixing: "1",
         musicGroupOrganizationCourseSettingId: null,
       },
-      chargeTypeName: '',
+      chargeTypeName: "",
       other: {},
       cycles: [{}],
       cycle: {},
@@ -204,7 +244,7 @@ export default {
       nextVisible: false,
       typeList: [],
       charges: [],
-      studentIds: '',
+      studentIds: "",
       payment: {
         paymentPattern: null,
       },
@@ -215,21 +255,21 @@ export default {
   },
   computed: {
     musicGroup() {
-      return this.baseInfo?.musicGroup
+      return this.baseInfo?.musicGroup;
     },
-    isCommon () {
+    isCommon() {
       return this.form.leixing === "1";
     },
-    isDisabled () {
+    isDisabled() {
       return this.form.leixing === "1" || String(this.paymentType) === "0";
     },
-    isUserType () {
+    isUserType() {
       return this.type === "user";
     },
-    nextTitle () {
+    nextTitle() {
       return this.isCommon ? "乐团课程-班级选择" : "临时加课-班级选择";
     },
-    chargesById () {
+    chargesById() {
       const data = {};
       for (const item of this.charges) {
         data[item.id] = item;
@@ -237,50 +277,62 @@ export default {
       return data;
     },
     paymentAmountDisabled() {
-      return (this.isUserType || (this.isCommon && this.isUserType)) && this.isDisabled
+      return (
+        (this.isUserType || (this.isCommon && this.isUserType)) &&
+        this.isDisabled
+      );
     },
     isMulticycle() {
-      let editMulticycle = false
-      let paymentType = ''
+      let editMulticycle = false;
+      let paymentType = "";
       if (this.viewDetail) {
-        const { musicGroupPaymentCalenders, auditDto } = this.viewDetail
-        paymentType = musicGroupPaymentCalenders[0]?.paymentType
-        editMulticycle = (musicGroupPaymentCalenders.length > 1 || paymentType != 'ADD_COURSE')
+        const { musicGroupPaymentCalenders, auditDto } = this.viewDetail;
+        paymentType = musicGroupPaymentCalenders[0]?.paymentType;
+        editMulticycle =
+          musicGroupPaymentCalenders.length > 1 || paymentType != "ADD_COURSE";
         if (editMulticycle) {
-          this.cycles = musicGroupPaymentCalenders.map(item => ({
+          this.cycles = musicGroupPaymentCalenders.map((item) => ({
             paymentAmount: item.paymentAmount,
             paymentDate: [item?.startPaymentDate, item?.deadlinePaymentDate],
-            paymentValid: [item?.paymentValidStartDate, item?.paymentValidEndDate]
-          }))
+            paymentValid: [
+              item?.paymentValidStartDate,
+              item?.paymentValidEndDate,
+            ],
+          }));
         }
       }
-      return (this.payment.paymentPattern == 0 && this.form.leixing !== '2' && paymentType !== 'ADD_COURSE') || (this.payment.paymentPattern == 0 && editMulticycle)
+      return (
+        (this.payment.paymentPattern == 0 &&
+          this.form.leixing !== "2" &&
+          paymentType !== "ADD_COURSE") ||
+        (this.payment.paymentPattern == 0 && editMulticycle)
+      );
     },
     paymentTypeString() {
-      let paymentType = ''
+      let paymentType = "";
       if (this.viewDetail) {
-        const { musicGroupPaymentCalenders } = this.viewDetail
-        paymentType = musicGroupPaymentCalenders[0]?.paymentType
+        const { musicGroupPaymentCalenders } = this.viewDetail;
+        paymentType = musicGroupPaymentCalenders[0]?.paymentType;
       }
-      return paymentType
-    }
+      return paymentType;
+    },
   },
   watch: {
-    type () {
+    type() {
       this.$set(
         this.form,
         "payUserType",
         this.type === "user" ? "STUDENT" : "SCHOOL"
       );
     },
-    baseInfo (val) {
-      this.formatCourse()
+    baseInfo(val) {
+      this.formatCourse();
       this.getCharges();
     },
     organizationCourseUnitPriceSettings() {
-      this.formatCourse()
+      this.formatCourse();
     },
-    "form.leixing" (val) {
+    "form.leixing"(val) {
       this.cycles = [{}];
       this.collapse = [0];
       this.cycle = {};
@@ -292,41 +344,41 @@ export default {
         this.eclass = [{}];
       }
     },
-    async "form.musicGroupOrganizationCourseSettingId" (val) {
-      if (val&&!this.rowDetail) {
+    async "form.musicGroupOrganizationCourseSettingId"(val) {
+      if (val && !this.rowDetail) {
         try {
           const res = await queryByMusicGroupOrganizationCourseSettingsId({
-            id: val
-          })
-          this.eclass = res.data.filter(item => {
-            return !item.isStudentOptional || this.paymentType !== undefined
+            id: val,
+          });
+          this.eclass = res.data.filter((item) => {
+            return !item.isStudentOptional || this.paymentType !== undefined;
           }) || [{}];
 
           this.syncAllMoney();
-        } catch (error) { }
+        } catch (error) {}
       }
     },
-    'payment.paymentPattern'() {
-      this.syncAllMoney()
+    "payment.paymentPattern"() {
+      this.syncAllMoney();
     },
   },
-  mounted () {
-    this.formatCourse()
+  mounted() {
+    this.formatCourse();
     this.init();
   },
-  activated () {
-    this.formatCourse()
+  activated() {
+    this.formatCourse();
     this.init();
   },
   methods: {
-    async init () {
+    async init() {
       this.getCharges();
       if (this.rowDetail) {
         for (const key in paymentTypeFormat) {
           if (paymentTypeFormat.hasOwnProperty(key)) {
             const item = paymentTypeFormat[key];
             if (item === this.rowDetail.paymentType) {
-              this.paymentType = key
+              this.paymentType = key;
             }
           }
         }
@@ -340,22 +392,30 @@ export default {
           const res = await musicGroupPaymentCalenderView({
             musicGroupId: this.musicGroupId,
             batchNo: this.rowDetail.batchNo,
-          })
-          this.viewDetail = res.data
-          const firstPayment = res.data.musicGroupPaymentCalenders[0] || {}
-          this.eclass = (res.data.musicGroupPaymentCalenderCourseSettings || []).filter(item => {
-            return !item.isStudentOptional || this.paymentType !== undefined
-          })
-          this.eclassuser = res.data.musicGroupPaymentCalenderStudentDetails.map(item => {
-            if (this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST') {
-              return {
-                ...item,
-                courseOriginalPrice: item.masterSubCoursePrice
+          });
+          this.viewDetail = res.data;
+          const firstPayment = res.data.musicGroupPaymentCalenders[0] || {};
+          this.eclass = (
+            res.data.musicGroupPaymentCalenderCourseSettings || []
+          ).filter((item) => {
+            return !item.isStudentOptional || this.paymentType !== undefined;
+          });
+          this.eclassuser = res.data.musicGroupPaymentCalenderStudentDetails.map(
+            (item) => {
+              if (this.paymentTypeString === "SPAN_GROUP_CLASS_ADJUST") {
+                return {
+                  ...item,
+                  courseOriginalPrice: item.masterSubCoursePrice,
+                };
               }
+              return item;
             }
-            return item
-          })
-          this.$set(this.payment, 'paymentPattern', String(this.viewDetail.auditDto?.paymentPattern))
+          );
+          this.$set(
+            this.payment,
+            "paymentPattern",
+            String(this.viewDetail.auditDto?.paymentPattern)
+          );
           if (this.$refs.cycle) {
             this.$set(
               this.cycle,
@@ -367,57 +427,80 @@ export default {
               firstPayment.paymentValidEndDate,
             ];
             // paymentDate startPaymentDate deadlinePaymentDate
-            this.$set(this.cycle, "paymentDate", [firstPayment.startPaymentDate, firstPayment.deadlinePaymentDate]);
+            this.$set(this.cycle, "paymentDate", [
+              firstPayment.startPaymentDate,
+              firstPayment.deadlinePaymentDate,
+            ]);
             this.$set(this.cycle, "paymentValid", arr);
           }
-          this.studentIds = firstPayment.studentIds
-          this.$set(this.form, 'musicGroupOrganizationCourseSettingId', res.data.auditDto?.musicGroupOrganizationCourseSettingsId)
-          this.syncAllMoney()
+          this.studentIds = firstPayment.studentIds;
+          this.$set(
+            this.form,
+            "musicGroupOrganizationCourseSettingId",
+            res.data.auditDto?.musicGroupOrganizationCourseSettingsId
+          );
+          this.syncAllMoney();
         } catch (error) {}
       }
     },
     formatCourse() {
-      const organId = this.musicGroup?.organId
-      const chargeTypeId = this.musicGroup?.chargeTypeId
-      const _ = {}
-      const list = (this.organizationCourseUnitPriceSettings || [])
-        .filter(item => organId && organId == item.organId && chargeTypeId && chargeTypeId == item.chargeTypeId)
+      const organId = this.musicGroup?.organId;
+      const chargeTypeId = this.musicGroup?.chargeTypeId;
+      const _ = {};
+      const list = (this.organizationCourseUnitPriceSettings || []).filter(
+        (item) =>
+          organId &&
+          organId == item.organId &&
+          chargeTypeId &&
+          chargeTypeId == item.chargeTypeId
+      );
       for (const item of list) {
-        _[item.courseType] = item
+        _[item.courseType] = item;
       }
-      this.organizationCourseUnitPriceSettingsByType = _
-      return _
+      this.organizationCourseUnitPriceSettingsByType = _;
+      return _;
     },
-    priceChange (item, index) {
-      const _ = [...this.eclass]
-      const active = this.organizationCourseUnitPriceSettingsByType[item.courseType] || {}
-      const price = Math.round(numeral(active.unitPrice || 1).multiply((item.courseTotalMinuties || 1)).value())
-      item.courseCurrentPrice = price
-      item.courseOriginalPrice = price
-      _[index] = item
-      this.eclass = [..._]
-      this.syncAllMoney()
+    priceChange(item, index) {
+      const _ = [...this.eclass];
+      const active =
+        this.organizationCourseUnitPriceSettingsByType[item.courseType] || {};
+      const price = Math.round(
+        numeral(active.unitPrice || 1)
+          .multiply(item.courseTotalMinuties || 1)
+          .value()
+      );
+      item.courseCurrentPrice = price;
+      item.courseOriginalPrice = price;
+      _[index] = item;
+      this.eclass = [..._];
+      this.syncAllMoney();
     },
-    syncAllMoney () {
-      if (this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST') {
-        const money = this.viewDetail?.musicGroupPaymentCalenders[0].paymentAmount
+    syncAllMoney() {
+      if (this.paymentTypeString === "SPAN_GROUP_CLASS_ADJUST") {
+        const money = this.viewDetail?.musicGroupPaymentCalenders[0]
+          .paymentAmount;
         this.$set(this.cycle, "paymentAmount", money);
-        return money
+        return money;
       }
       let money = 0;
-      let first = 0
-      let other = 0
-      let classs = this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST' ? this.eclassuser : this.eclass
+      let first = 0;
+      let other = 0;
+      let classs =
+        this.paymentTypeString === "SPAN_GROUP_CLASS_ADJUST"
+          ? this.eclassuser
+          : this.eclass;
       for (const item of classs) {
         money += item.courseCurrentPrice;
         if (this.cycles && this.cycles.length) {
           if (item.isStudentOptional) {
-            first += item.courseCurrentPrice
+            first += item.courseCurrentPrice;
           } else {
-            const floorMoney = Math.floor(item.courseCurrentPrice / this.cycles.length)
-            const remainder = item.courseCurrentPrice % this.cycles.length
-            first += floorMoney + remainder
-            other += floorMoney
+            const floorMoney = Math.floor(
+              item.courseCurrentPrice / this.cycles.length
+            );
+            const remainder = item.courseCurrentPrice % this.cycles.length;
+            first += floorMoney + remainder;
+            other += floorMoney;
           }
         }
       }
@@ -425,27 +508,27 @@ export default {
         this.cycles = this.cycles.map((item, index) => {
           return {
             ...item,
-            paymentAmount: (index === 0 ? first : other)
-          }
-        })
+            paymentAmount: index === 0 ? first : other,
+          };
+        });
       }
       // if (!money) {
-        // this.$set(this.cycle, "paymentAmount", undefined);
+      // this.$set(this.cycle, "paymentAmount", undefined);
       // } else {
-        this.$set(this.cycle, "paymentAmount", money);
+      this.$set(this.cycle, "paymentAmount", money);
       // }
 
       return money;
     },
-    async getChargeTypeList () {
+    async getChargeTypeList() {
       try {
         const res = await chargeTypeList({
           row: 9999,
         });
         this.typeList = res.data.rows;
-      } catch (error) { }
+      } catch (error) {}
     },
-    async getCharges () {
+    async getCharges() {
       const organId = this.musicGroup?.organId;
       const chargeTypeId = this.musicGroup?.chargeTypeId;
       this.chargeTypeName = this.musicGroup?.chargeTypeName;
@@ -455,50 +538,59 @@ export default {
           chargeTypeId,
           organId,
         });
-        const ids = res.data.rows.map(item => item.id)
+        const ids = res.data.rows.map((item) => item.id);
         if (!ids.includes(this.form.musicGroupOrganizationCourseSettingId)) {
-          this.$set(this.form, 'musicGroupOrganizationCourseSettingId', null)
+          this.$set(this.form, "musicGroupOrganizationCourseSettingId", null);
         }
         this.charges = res.data.rows;
-      } catch (error) { }
+      } catch (error) {}
     },
-    addExtraClass () {
+    addExtraClass() {
       this.eclass.push({});
     },
-    removeExtraClass (index) {
+    removeExtraClass(index) {
       this.eclass[index] = null;
       this.eclass = this.eclass.filter((item) => !!item);
     },
-    addCycle () {
+    addCycle() {
       this.cycles.push({});
       this.collapse.push(this.cycles.length - 1);
-      this.syncAllMoney()
+      this.syncAllMoney();
     },
-    removeCycle (index) {
+    removeCycle(index) {
       this.cycles[index] = null;
       this.cycles = this.cycles.filter((item) => !!item);
       if (this.collapse.includes(index)) {
         this.collapse.splice(index, 1);
-        this.collapse = this.collapse.map((item, _index) => _index - 1 >= index ? item -- : item)
+        this.collapse = this.collapse.map((item, _index) =>
+          _index - 1 >= index ? item-- : item
+        );
       }
-      this.syncAllMoney()
+      this.syncAllMoney();
     },
-    collapseChange (val) {
+    collapseChange(val) {
       this.collapse = val;
     },
-    closeNext () {
+    closeNext() {
       this.nextVisible = false;
     },
-    getForms () {
+    getForms() {
       const { $refs: refs } = this;
 
-      return [refs.base, refs.eclass, refs.cycle, ...(refs.cycles || []), refs.other, refs.payment]
+      return [
+        refs.base,
+        refs.eclass,
+        refs.cycle,
+        ...(refs.cycles || []),
+        refs.other,
+        refs.payment,
+      ]
         .filter((item) => !!item)
         .map((item) => item.$refs.form || item);
     },
     changeActive(val) {
       if (this.$listeners.changeActive) {
-        this.$listeners.changeActive(val)
+        this.$listeners.changeActive(val);
       }
     },
     async submit() {
@@ -512,37 +604,47 @@ export default {
         });
       }
       if (this.eclass.length < 1 && this.eclassuser.length < 1) {
-        return this.$message.error('请至少选择一条加课信息')
+        return this.$message.error("请至少选择一条加课信息");
       }
       if (valided.length === forms.length) {
         const { leixing, ...rest } = {
           ...this.form,
           ...this.other,
           paymentPattern: this.payment.paymentPattern,
-          musicGroupPaymentDateRangeList: [...this.cycles.map(item => {
-            const { paymentDate, paymentValid, ...other } = item
-            return {
-              ...other,
-              ...getTimes(paymentDate, ["startPaymentDate", "deadlinePaymentDate"]),
-              ...getTimes(paymentValid, [
-                "paymentValidStartDate",
-                "paymentValidEndDate",
-              ]),
-            }
-          })],
+          musicGroupPaymentDateRangeList: [
+            ...this.cycles.map((item) => {
+              const { paymentDate, paymentValid, ...other } = item;
+              return {
+                ...other,
+                ...getTimes(paymentDate, [
+                  "startPaymentDate",
+                  "deadlinePaymentDate",
+                ]),
+                ...getTimes(paymentValid, [
+                  "paymentValidStartDate",
+                  "paymentValidEndDate",
+                ]),
+              };
+            }),
+          ],
           musicGroupPaymentCalenderCourseSettingsList: this.eclass,
           musicGroupPaymentCalenderStudentDetails: this.eclassuser,
         };
         if (this.$refs.cycle) {
-          const { paymentDate, paymentValid, ...other } = this.cycle
-          rest.musicGroupPaymentDateRangeList = [{
+          const { paymentDate, paymentValid, ...other } = this.cycle;
+          rest.musicGroupPaymentDateRangeList = [
+            {
               ...other,
-              ...getTimes(paymentDate, ["startPaymentDate", "deadlinePaymentDate"]),
+              ...getTimes(paymentDate, [
+                "startPaymentDate",
+                "deadlinePaymentDate",
+              ]),
               ...getTimes(paymentValid, [
                 "paymentValidStartDate",
                 "paymentValidEndDate",
               ]),
-          }]
+            },
+          ];
         }
         const data = {
           ...rest,
@@ -554,37 +656,43 @@ export default {
             ],
           musicGroupId: this.musicGroupId,
         };
-        const info = this.viewDetail?.musicGroupPaymentCalenders[0]
-        if (info && this.viewDetail?.auditDto.paymentType === 'ADD_STUDENT') {
-          data.attribute1 = info.attribute1
+        const info = this.viewDetail?.musicGroupPaymentCalenders[0];
+        if (info && this.viewDetail?.auditDto.paymentType === "ADD_STUDENT") {
+          data.attribute1 = info.attribute1;
         }
+
         if (!this.rowDetail?.batchNo) {
+
+
           try {
             const res = await musicGroupPaymentCalenderAdd(data);
-            this.$listeners.close();
-            this.$listeners.submited(res.data);
-            // 在这里
-            if (this.$route.query.type == "teamDraft") {
-              this.$router.push({
-                query: merge(this.$route.query, { 'type': 'feeAudit' })
-              });
+                 if (this.$route.query.team_status == "PRE_BUILD_FEE") {
+                 this.$message.success("创建成功");
+                  this.$store.dispatch("delVisitedViews", this.$route);
+                  this.$router.push({
+                    path: "/teamList",
+                  });
             }
-          } catch (error) { }
+
+            // this.$listeners.close();
+            // this.$listeners.submited(res.data);
+
+            // 在这里
+          } catch (error) {}
         } else {
           try {
-            data.batchNo = this.rowDetail.batchNo
+            data.batchNo = this.rowDetail.batchNo;
             // 缴费类型无法修改,按照之前覆盖
-            data.paymentType = this.viewDetail.musicGroupPaymentCalenders[0]?.paymentType
+            data.paymentType = this.viewDetail.musicGroupPaymentCalenders[0]?.paymentType;
             const res = await musicGroupPaymentCalenderDetailBatchUpdate(data);
             this.$listeners.close();
             this.$listeners.submited(res.data);
             if (this.$route.query.type == "teamDraft") {
               this.$router.push({
-                query: merge(this.$route.query, { 'type': 'feeAudit' })
+                query: merge(this.$route.query, { type: "feeAudit" }),
               });
-
             }
-          } catch (error) { }
+          } catch (error) {}
         }
       }
     },

+ 138 - 139
src/views/teamBuild/components/soundSetComponents/soundSetCore.vue

@@ -86,7 +86,11 @@
         </el-collapse>
       </el-checkbox-group>
     </div>
-    <el-dialog title="声部选择" :visible.sync="soundVisible" v-if="soundVisible">
+    <el-dialog
+      title="声部选择"
+      :visible.sync="soundVisible"
+      v-if="soundVisible"
+    >
       <chioseSoundList
         :soundList="soundList"
         :activeSound="activeSound"
@@ -135,13 +139,9 @@ export default {
       this.teamid = this.$route.query.id;
     }
     window.addEventListener("scroll", this.getScroll);
-               this.topfor = JSON.parse(
-          localStorage.getItem(`${this.$route.query.id}base`)
-        );
-        this.$nextTick(res=>{
-             this.init();
-        })
-
+    this.$nextTick((res) => {
+      this.init();
+    });
   },
   deactivated() {
     window.removeEventListener("scroll", this.getScroll);
@@ -189,7 +189,9 @@ export default {
       // this.topfor = this.$store.getters.topinfo;
       // let type = this.topfor.type;
       // let section = this.topfor.section;
-
+      this.topfor =
+        JSON.parse(localStorage.getItem(`${this.$route.query.id}base`)) ||
+        this.$store.getters.topinfo;
       this.teamStatus = this.$route.query.type;
       if (
         this.teamStatus == "look" ||
@@ -208,90 +210,91 @@ export default {
       getSoundTree({ tenantId: 1 }).then((res) => {
         if (res.code == 200) {
           this.soundList = res.data.rows;
-        if (sotrage && sotrage[0]?.id) {
-          // this.$set(data,'activeSoundList',sotrage)
-          this.activeSoundList = sotrage;
-          let activeSound = [];
+          if (sotrage && sotrage[0]?.id) {
+            // this.$set(data,'activeSoundList',sotrage)
+            this.activeSoundList = sotrage;
+            let activeSound = [];
 
-          this.activeSoundList.forEach((item) => {
-            activeSound.push(item.id);
-          });
-          this.chioseActiveSound = activeSound;
-           this.activeSound = activeSound;
-           this.changeActiveSound(activeSound.join(","));
-        } else {
-          if (this.teamStatus == "newTeam") {
-              this.getDefaultSubject()
+            this.activeSoundList.forEach((item) => {
+              activeSound.push(item.id);
+            });
+            this.chioseActiveSound = activeSound;
+            this.activeSound = 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) {
-                   // 如果没有一个声部 则请求默认声部
+            if (this.teamStatus == "newTeam") {
+              this.getDefaultSubject();
+            } else {
+              this.teamid = this.$route.query.id;
+              if (this.teamid) {
+                findMusicGroupSubjectInfo({ musicGroupId: this.teamid }).then(
+                  (res) => {
+                    if (res.code == 200) {
+                      // 如果没有一个声部 则请求默认声部
 
-                    if(res.data?.musicGroupSubjectPlans?.length>0){
-                             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 (res.data?.musicGroupSubjectPlans?.length > 0) {
+                        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)
-                            );
-                          });
-                        } 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
-                            ),
-                          });
-                        }
+                            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[index].chioseMusic.push({
+                                  musical: parseInt(shop.goodsIdList),
+                                  type: typeJson,
+                                  groupPrice: shop.price,
+                                  borrowPrice: shop.depositFee,
+                                  groupRemissionCourseFee: Boolean(
+                                    shop.groupRemissionCourseFee
+                                  ),
+                                });
+                              }
+                            }
+                          }
+                        );
+                      } else {
+                        this.getDefaultSubject();
                       }
-                    });
-                    }else{
-                      this.getDefaultSubject()
-                    }
-
 
-                    // 这里开始
+                      // 这里开始
+                    }
                   }
-                }
-              );
+                );
+              }
             }
           }
         }
-        }
       });
       getSubject({ tenantId: 1 }).then((res) => {
         if (res.code == 200) {
@@ -299,29 +302,25 @@ export default {
         }
       });
     },
-    getDefaultSubject(){
-      this.topfor = JSON.parse(
-          localStorage.getItem(`${this.$route.query.id}base`)
-        )||this.$store.getters.topinfo;
-       console.log(this.topfor)
+    getDefaultSubject() {
       let type = this.topfor.type;
       let section = this.topfor.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(","));
-              }
-            });
+      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(","));
+        }
+      });
     },
     lookCheck(val) {
       this.checkList = [...new Set(val)];
@@ -608,41 +607,41 @@ export default {
       });
     },
 
-    initCreateTeam(obj) {
-      let enrollClasses;
-      this.topfor.startClass
-        ? (enrollClasses = this.topfor.startClass.join(","))
-        : (enrollClasses = null);
-      obj.musicGroup = {
-        settlementType: this.topfor.salary,
-        applyExpireDate: dayjs(this.topfor.time).format("YYYY-MM-DD HH:mm:ss"),
-        chargeTypeId: this.topfor.type,
-        cooperationOrganId: this.topfor.school,
-        courseViewType: this.topfor.courseViewType,
-        teamTeacherId: this.topfor.boss,
-        educationalTeacherId: this.topfor.teacher,
-        enrollClasses,
-        name: this.topfor.name,
-        organId: this.topfor.section,
-        paymentPattern: this.topfor.paymentPattern,
-        paymentValidStartDate: this.topfor.paymentValidStartDate
-          ? dayjs(this.topfor.paymentValidStartDate).format("YYYY-MM-DD")
-          : this.topfor.paymentValidStartDate,
-        paymentValidEndDate: this.topfor.paymentValidEndDate
-          ? dayjs(this.topfor.paymentValidEndDate).format("YYYY-MM-DD")
-          : this.topfor.paymentValidEndDate,
-        // paymentMonths:obj.months  有待确认
-        schoolId: this.topfor.address,
-        expectStartGroupDate: this.topfor.startTime,
-        isClassroomLessons: this.topfor.isClass,
-        status: "DRAFT",
-        ownershipType: this.topfor.ownershipType,
-        repairUserId: this.topfor.repairUserId,
-        feeType: this.topfor.feeType,
-        directorUserId: this.topfor.head,
-      };
-      return obj;
-    },
+    // initCreateTeam(obj) {
+    //   let enrollClasses;
+    //   this.topfor.startClass
+    //     ? (enrollClasses = this.topfor.startClass.join(","))
+    //     : (enrollClasses = null);
+    //   obj.musicGroup = {
+    //     settlementType: this.topfor.salary,
+    //     applyExpireDate: dayjs(this.topfor.time).format("YYYY-MM-DD HH:mm:ss"),
+    //     chargeTypeId: this.topfor.type,
+    //     cooperationOrganId: this.topfor.school,
+    //     courseViewType: this.topfor.courseViewType,
+    //     teamTeacherId: this.topfor.boss,
+    //     educationalTeacherId: this.topfor.teacher,
+    //     enrollClasses,
+    //     name: this.topfor.name,
+    //     organId: this.topfor.section,
+    //     paymentPattern: this.topfor.paymentPattern,
+    //     paymentValidStartDate: this.topfor.paymentValidStartDate
+    //       ? dayjs(this.topfor.paymentValidStartDate).format("YYYY-MM-DD")
+    //       : this.topfor.paymentValidStartDate,
+    //     paymentValidEndDate: this.topfor.paymentValidEndDate
+    //       ? dayjs(this.topfor.paymentValidEndDate).format("YYYY-MM-DD")
+    //       : this.topfor.paymentValidEndDate,
+    //     // paymentMonths:obj.months  有待确认
+    //     schoolId: this.topfor.address,
+    //     expectStartGroupDate: this.topfor.startTime,
+    //     isClassroomLessons: this.topfor.isClass,
+    //     status: "DRAFT",
+    //     ownershipType: this.topfor.ownershipType,
+    //     repairUserId: this.topfor.repairUserId,
+    //     feeType: this.topfor.feeType,
+    //     directorUserId: this.topfor.head,
+    //   };
+    //   return obj;
+    // },
     getScroll() {
       this.scrollTop =
         window.pageYOffset ||

+ 14 - 5
src/views/teamBuild/components/teamBaseInfo.vue

@@ -40,6 +40,7 @@
             filterable
             :disabled="basdisabled"
             clearable
+            @change="changeType"
           >
             <el-option
               v-for="(item, index) in typeList"
@@ -711,7 +712,7 @@ export default {
     },
     chioseSchool(val) {},
     gotoNext() {
-      this.$refs["topinfo"].validate((valid, object) => {
+      this.$refs["topinfo"].validate(async(valid, object) => {
         if (!valid) {
           this.$message.error("请填写建团必要参数");
         } else {
@@ -722,8 +723,7 @@ export default {
             // 获取数据提交
             this.$emit("handleClick", { name: "2" });
           } else {
-            console.log("调用了");
-            this.resetSubmit();
+           await this.resetSubmit();
           }
         }
       });
@@ -795,7 +795,8 @@ export default {
           if (this.teamStatus != "newTeam") {
             resetTeamBaseInfo(obj).then((res) => {
               if (res.code == 200) {
-                this.setStore();
+                localStorage.setItem(`${this.teamid}base`,JSON.stringify(this.topFrom));
+                  this.$emit("getBaseInfo");
                 if (this.teamStatus == "teamDraft") {
                   this.$message.success("保存成功");
                   this.$emit("handleClick", { name: "2" });
@@ -851,7 +852,10 @@ export default {
                         id: res.data,
                         team_status: "DRAFT",
                       }),
-                    });
+                    },(router) => {
+                        console.log(router);
+                        router.meta.title = "乐团编辑中";
+                      });
                     this.$emit("getName", this.topFrom.name);
                     this.init();
                   });
@@ -1125,6 +1129,11 @@ export default {
       this.applyExpireDate = res.data.musicGroup.applyExpireDate;
       localStorage.setItem(`${this.teamid}base`, JSON.stringify(this.topFrom));
     },
+    changeType(val){
+      if(val){
+        localStorage.removeItem(`${this.teamid}sound`);
+      }
+    }
   },
   computed: {
     startClassString() {

+ 3 - 3
src/views/teamBuild/forecastName.vue

@@ -40,7 +40,7 @@
                 :model="searchForm"
                 ref="searchForm"
             >
-                <el-form-item>
+                <el-form-item prop="name">
                     <el-input
                         v-model.trim="searchForm.name"
                         clearable
@@ -58,8 +58,8 @@
                         <el-option label="否" :value="0"></el-option>
                     </el-select>
                 </el-form-item>
-                <el-form-item>
-                    <el-select clearable v-model="searchForm.subjectId" placeholder="所选专业">
+                <el-form-item prop="subjectId">
+                    <el-select clearable v-model="searchForm.subjectId" placeholder="所选专业" >
                         <el-option v-for="item in selects.subjects" :value="item.id" :label="item.name" :key="item.id"></el-option>
                     </el-select>
                 </el-form-item>

+ 1 - 0
src/views/teamDetail/components/courseList.vue

@@ -898,6 +898,7 @@ export default {
     },
     onReSet() {
       this.$refs.searchForm.resetFields();
+      this.search()
     },
     beginDate() {
       return {

+ 19 - 16
src/views/teamDetail/components/studentList.vue

@@ -135,9 +135,7 @@
           合并学员
         </div>
         <div
-          v-if="
-            team_status == 'APPLY'
-          "
+          v-if="team_status == 'APPLY'"
           v-permission="'studentRegistration/openPayment'"
           class="newBand"
           style="background-color: #14928a; border: 1px solid #14928a"
@@ -464,11 +462,11 @@
             <div>{{ scope.row.studentStatus | musicGroupStudentType }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="新增学员">
+        <!-- <el-table-column align="center" label="新增学员">
           <template slot-scope="scope">
             <div>{{ scope.row.isNewStudent | yesOrNo }}</div>
           </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column align="center" label="报名缴费">
           <template slot-scope="scope">
             <div>{{ scope.row.paymentStatus | paymentStatus }}</div>
@@ -542,7 +540,8 @@
                 v-if="
                   permission('musicGroupPaymentCalender/add') &&
                   scope.row.studentStatus == 'APPLY' &&
-                  scope.row.paymentStatus == '0'
+                  scope.row.paymentStatus != '2' &&
+                  team_status == 'PROGRESS'
                 "
                 @click="addPay(scope.row)"
                 >添加缴费</el-button
@@ -576,7 +575,7 @@
               <auth :auths="'studentRegistration/batchUpdateSubject'">
                 <el-button
                   type="text"
-                  v-show="scope.row.paymentStatus != 2&&isShowResSound()"
+                  v-show="scope.row.paymentStatus != 2 && isShowResSound()"
                   @click="resetSubject(scope.row)"
                   >修改专业</el-button
                 >
@@ -605,7 +604,7 @@
               </auth>
               <auth
                 :auths="'subjectChange/getStudentOriginal'"
-                v-show="scope.row.paymentStatus == 2&&isShowResSound()"
+                v-show="scope.row.paymentStatus == 2 && isShowResSound()"
               >
                 <el-button type="text" @click="openChangeVoice(scope.row)"
                   >更改声部</el-button
@@ -1457,11 +1456,7 @@ export default {
       });
 
       // 获取汇总数据
-      getTeamStudentInfo({ musicGroupId: this.teamid }).then((res) => {
-        if (res.code == 200) {
-          this.studentListInfo = res.data;
-        }
-      });
+      this.getTeamStudent();
       this.pickerOptions = this.beginDate();
       this.getList();
       // 获取乐团内所有声部
@@ -1507,6 +1502,13 @@ export default {
         }
       });
     },
+    getTeamStudent() {
+      getTeamStudentInfo({ musicGroupId: this.teamid }).then((res) => {
+        if (res.code == 200) {
+          this.studentListInfo = res.data;
+        }
+      });
+    },
     permission(str) {
       return permission(str);
     },
@@ -1584,6 +1586,7 @@ export default {
     search() {
       this.rules.page = 1;
       this.getList();
+      this.getTeamStudent();
     },
     onReSet() {
       this.$refs.searchForm.resetFields();
@@ -2365,9 +2368,9 @@ export default {
         this.team_status == "PROGRESS" ||
         this.team_status == "PREPARE"
       ) {
-        return this.isCanReg
-      }else {
-        return false
+        return this.isCanReg;
+      } else {
+        return false;
       }
     },
   },

+ 1 - 1
src/views/teamDetail/teamList.vue

@@ -8,7 +8,7 @@
       <div class="btnList" style="margin-bottom: 20px">
         <el-button
           type="primary"
-          v-permission="'musicGroup/createGroup'"
+          v-if=" permission('musicGroup/createGroup')"
           @click="createNewTeam"
           >新建乐团</el-button
         >

Some files were not shown because too many files changed in this diff