|  | @@ -3,10 +3,12 @@
 | 
											
												
													
														|  |      <el-alert title="课程信息设置"
 |  |      <el-alert title="课程信息设置"
 | 
											
												
													
														|  |                :closable="false"
 |  |                :closable="false"
 | 
											
												
													
														|  |                class="alert"
 |  |                class="alert"
 | 
											
												
													
														|  | 
 |  | +              v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
 | 
											
												
													
														|  |                type="info">
 |  |                type="info">
 | 
											
												
													
														|  |      </el-alert>
 |  |      </el-alert>
 | 
											
												
													
														|  |      <userBaseinfo :form.sync="form"
 |  |      <userBaseinfo :form.sync="form"
 | 
											
												
													
														|  |                    :isCommon="isCommon"
 |  |                    :isCommon="isCommon"
 | 
											
												
													
														|  | 
 |  | +                  v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
 | 
											
												
													
														|  |                    :isUserType="isUserType"
 |  |                    :isUserType="isUserType"
 | 
											
												
													
														|  |                    @getCharges="getCharges"
 |  |                    @getCharges="getCharges"
 | 
											
												
													
														|  |                    @changeActive="changeActive"
 |  |                    @changeActive="changeActive"
 | 
											
										
											
												
													
														|  | @@ -16,7 +18,21 @@
 | 
											
												
													
														|  |                    :chargeTypeName="chargeTypeName"
 |  |                    :chargeTypeName="chargeTypeName"
 | 
											
												
													
														|  |                    :paymentType="paymentType"
 |  |                    :paymentType="paymentType"
 | 
											
												
													
														|  |                    ref="base" />
 |  |                    ref="base" />
 | 
											
												
													
														|  | -    <template v-if="!isCommon">
 |  | 
 | 
											
												
													
														|  | 
 |  | +    <template v-if="paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST'">
 | 
											
												
													
														|  | 
 |  | +      <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" />
 | 
											
												
													
														|  | 
 |  | +    </template>
 | 
											
												
													
														|  | 
 |  | +    <template v-else-if="!isCommon">
 | 
											
												
													
														|  |        <el-alert title="加课信息设置"
 |  |        <el-alert title="加课信息设置"
 | 
											
												
													
														|  |                  :closable="false"
 |  |                  :closable="false"
 | 
											
												
													
														|  |                  class="alert"
 |  |                  class="alert"
 | 
											
										
											
												
													
														|  | @@ -65,7 +81,7 @@
 | 
											
												
													
														|  |            </el-select>
 |  |            </el-select>
 | 
											
												
													
														|  |          </el-form-item>
 |  |          </el-form-item>
 | 
											
												
													
														|  |        </el-form>
 |  |        </el-form>
 | 
											
												
													
														|  | -      <template v-if="isMulticycle">
 |  | 
 | 
											
												
													
														|  | 
 |  | +      <template v-if="isMulticycle && paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'">
 | 
											
												
													
														|  |          <el-collapse :value="collapse" @change="collapseChange" >
 |  |          <el-collapse :value="collapse" @change="collapseChange" >
 | 
											
												
													
														|  |            <el-collapse-item
 |  |            <el-collapse-item
 | 
											
												
													
														|  |              v-for="(item, index) in cycles"
 |  |              v-for="(item, index) in cycles"
 | 
											
										
											
												
													
														|  | @@ -145,6 +161,7 @@ import { getTimes, objectToOptions } from "@/utils";
 | 
											
												
													
														|  |  import userBaseinfo from "./user-baseinfo";
 |  |  import userBaseinfo from "./user-baseinfo";
 | 
											
												
													
														|  |  import paymentCycle from "./payment-cycle";
 |  |  import paymentCycle from "./payment-cycle";
 | 
											
												
													
														|  |  import extraClass from "./extra-class";
 |  |  import extraClass from "./extra-class";
 | 
											
												
													
														|  | 
 |  | +import extraClassUser from "./extra-class-user";
 | 
											
												
													
														|  |  import classrooms from "./classrooms";
 |  |  import classrooms from "./classrooms";
 | 
											
												
													
														|  |  import otherform from "./other";
 |  |  import otherform from "./other";
 | 
											
												
													
														|  |  import baseInfoVue from '../../teamDetail/components/baseInfo.vue';
 |  |  import baseInfoVue from '../../teamDetail/components/baseInfo.vue';
 | 
											
										
											
												
													
														|  | @@ -156,6 +173,7 @@ const paymentTypeFormat = {
 | 
											
												
													
														|  |    1: "MUSIC_RENEW",
 |  |    1: "MUSIC_RENEW",
 | 
											
												
													
														|  |    2: "ADD_COURSE",
 |  |    2: "ADD_COURSE",
 | 
											
												
													
														|  |    3: "ADD_STUDENT",
 |  |    3: "ADD_STUDENT",
 | 
											
												
													
														|  | 
 |  | +  4: "SPAN_GROUP_CLASS_ADJUST",
 | 
											
												
													
														|  |  };
 |  |  };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  export default {
 |  |  export default {
 | 
											
										
											
												
													
														|  | @@ -164,6 +182,7 @@ export default {
 | 
											
												
													
														|  |      userBaseinfo,
 |  |      userBaseinfo,
 | 
											
												
													
														|  |      paymentCycle,
 |  |      paymentCycle,
 | 
											
												
													
														|  |      extraClass,
 |  |      extraClass,
 | 
											
												
													
														|  | 
 |  | +    extraClassUser,
 | 
											
												
													
														|  |      classrooms,
 |  |      classrooms,
 | 
											
												
													
														|  |      otherform,
 |  |      otherform,
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
										
											
												
													
														|  | @@ -180,6 +199,7 @@ export default {
 | 
											
												
													
														|  |        cycles: [{}],
 |  |        cycles: [{}],
 | 
											
												
													
														|  |        cycle: {},
 |  |        cycle: {},
 | 
											
												
													
														|  |        eclass: [],
 |  |        eclass: [],
 | 
											
												
													
														|  | 
 |  | +      eclassuser: [],
 | 
											
												
													
														|  |        collapse: [0],
 |  |        collapse: [0],
 | 
											
												
													
														|  |        nextVisible: false,
 |  |        nextVisible: false,
 | 
											
												
													
														|  |        typeList: [],
 |  |        typeList: [],
 | 
											
										
											
												
													
														|  | @@ -235,6 +255,14 @@ export default {
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        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 = ''
 | 
											
												
													
														|  | 
 |  | +      if (this.viewDetail) {
 | 
											
												
													
														|  | 
 |  | +        const { musicGroupPaymentCalenders } = this.viewDetail
 | 
											
												
													
														|  | 
 |  | +        paymentType = musicGroupPaymentCalenders[0]?.paymentType
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +      return paymentType
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    watch: {
 |  |    watch: {
 | 
											
										
											
												
													
														|  | @@ -317,6 +345,7 @@ export default {
 | 
											
												
													
														|  |            this.eclass = (res.data.musicGroupPaymentCalenderCourseSettings || []).filter(item => {
 |  |            this.eclass = (res.data.musicGroupPaymentCalenderCourseSettings || []).filter(item => {
 | 
											
												
													
														|  |              return !item.isStudentOptional || this.paymentType !== undefined
 |  |              return !item.isStudentOptional || this.paymentType !== undefined
 | 
											
												
													
														|  |            })
 |  |            })
 | 
											
												
													
														|  | 
 |  | +          this.eclassuser = res.data.musicGroupPaymentCalenderStudentDetails
 | 
											
												
													
														|  |            const firstPayment = res.data.musicGroupPaymentCalenders[0] || {}
 |  |            const firstPayment = res.data.musicGroupPaymentCalenders[0] || {}
 | 
											
												
													
														|  |            this.$set(this.payment, 'paymentPattern', String(this.viewDetail.auditDto?.paymentPattern))
 |  |            this.$set(this.payment, 'paymentPattern', String(this.viewDetail.auditDto?.paymentPattern))
 | 
											
												
													
														|  |            if (this.$refs.cycle) {
 |  |            if (this.$refs.cycle) {
 | 
											
										
											
												
													
														|  | @@ -362,10 +391,16 @@ export default {
 | 
											
												
													
														|  |        this.syncAllMoney()
 |  |        this.syncAllMoney()
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      syncAllMoney () {
 |  |      syncAllMoney () {
 | 
											
												
													
														|  | 
 |  | +      if (this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST') {
 | 
											
												
													
														|  | 
 |  | +        const money = this.viewDetail?.musicGroupPaymentCalenders[0].paymentAmount
 | 
											
												
													
														|  | 
 |  | +        this.$set(this.cycle, "paymentAmount", money);
 | 
											
												
													
														|  | 
 |  | +        return money
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  |        let money = 0;
 |  |        let money = 0;
 | 
											
												
													
														|  |        let first = 0
 |  |        let first = 0
 | 
											
												
													
														|  |        let other = 0
 |  |        let other = 0
 | 
											
												
													
														|  | -      for (const item of this.eclass) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      let classs = this.paymentTypeString === 'SPAN_GROUP_CLASS_ADJUST' ? this.eclassuser : this.eclass
 | 
											
												
													
														|  | 
 |  | +      for (const item of classs) {
 | 
											
												
													
														|  |          money += item.courseCurrentPrice;
 |  |          money += item.courseCurrentPrice;
 | 
											
												
													
														|  |          if (this.cycles && this.cycles.length) {
 |  |          if (this.cycles && this.cycles.length) {
 | 
											
												
													
														|  |            if (item.isStudentOptional) {
 |  |            if (item.isStudentOptional) {
 | 
											
										
											
												
													
														|  | @@ -373,7 +408,6 @@ export default {
 | 
											
												
													
														|  |            } else {
 |  |            } else {
 | 
											
												
													
														|  |              const floorMoney = Math.floor(item.courseCurrentPrice / this.cycles.length)
 |  |              const floorMoney = Math.floor(item.courseCurrentPrice / this.cycles.length)
 | 
											
												
													
														|  |              const remainder = item.courseCurrentPrice % this.cycles.length
 |  |              const remainder = item.courseCurrentPrice % this.cycles.length
 | 
											
												
													
														|  | -            console.log(remainder)
 |  | 
 | 
											
												
													
														|  |              first += floorMoney + remainder
 |  |              first += floorMoney + remainder
 | 
											
												
													
														|  |              other += floorMoney
 |  |              other += floorMoney
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
										
											
												
													
														|  | @@ -469,7 +503,7 @@ export default {
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |          });
 |  |          });
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  | -      if (this.eclass.length < 1) {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      if (this.eclass.length < 1 && this.eclassuser.length < 1) {
 | 
											
												
													
														|  |          return this.$message.error('请至少选择一条加课信息')
 |  |          return this.$message.error('请至少选择一条加课信息')
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |        if (valided.length === forms.length) {
 |  |        if (valided.length === forms.length) {
 | 
											
										
											
												
													
														|  | @@ -489,6 +523,7 @@ export default {
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |            })],
 |  |            })],
 | 
											
												
													
														|  |            musicGroupPaymentCalenderCourseSettingsList: this.eclass,
 |  |            musicGroupPaymentCalenderCourseSettingsList: this.eclass,
 | 
											
												
													
														|  | 
 |  | +          musicGroupPaymentCalenderStudentDetails: this.eclassuser,
 | 
											
												
													
														|  |          };
 |  |          };
 | 
											
												
													
														|  |          if (this.$refs.cycle) {
 |  |          if (this.$refs.cycle) {
 | 
											
												
													
														|  |            const { paymentDate, paymentValid, ...other } = this.cycle
 |  |            const { paymentDate, paymentValid, ...other } = this.cycle
 |