|
@@ -13,7 +13,9 @@
|
|
|
<userBaseinfo
|
|
|
:form.sync="form"
|
|
|
:isCommon="isCommon"
|
|
|
- v-if="paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST'"
|
|
|
+ v-if="
|
|
|
+ paymentTypeString !== 'SPAN_GROUP_CLASS_ADJUST' && courseViewType != 2
|
|
|
+ "
|
|
|
:isUserType="isUserType"
|
|
|
@getCharges="getCharges"
|
|
|
@changeActive="changeActive"
|
|
@@ -72,9 +74,9 @@
|
|
|
</template>
|
|
|
<!-- 续费或临时加课 -->
|
|
|
<template v-else-if="(!isCommon && eclass.length) || isCommon">
|
|
|
- <div>
|
|
|
+ <!-- 会员团的续费不显现 -->
|
|
|
+ <div v-if="!(courseViewType == 2 && paymentType == 1)">
|
|
|
<extraClass
|
|
|
- v-if="courseViewType != 2"
|
|
|
:form="eclass"
|
|
|
ref="eclass"
|
|
|
:isCommon="isCommon"
|
|
@@ -89,29 +91,6 @@
|
|
|
form.leixing === '1' || form.leixing === '2' || paymentType == '0'
|
|
|
"
|
|
|
/>
|
|
|
- <template v-else>
|
|
|
- <div>
|
|
|
- <el-alert
|
|
|
- title="会员设置"
|
|
|
- :closable="false"
|
|
|
- class="alert"
|
|
|
- style="margin-top: 20px"
|
|
|
- type="info"
|
|
|
- v-if="courseViewType == 2 && paymentType != 2"
|
|
|
- >
|
|
|
- </el-alert>
|
|
|
- <memberSetting
|
|
|
- ref="memberSetting"
|
|
|
- v-if="courseViewType == 2 && paymentType != 2"
|
|
|
- :form="memberForm"
|
|
|
- :viewDetail="nowDetail"
|
|
|
- :isUserType="isUserType"
|
|
|
- :organId="baseInfo.musicGroup.organId"
|
|
|
- :addStudent="showMember"
|
|
|
- :showTime="true"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -133,9 +112,9 @@
|
|
|
:isUserType="isUserType"
|
|
|
:organId="baseInfo.musicGroup.organId"
|
|
|
:addStudent="showMember"
|
|
|
- :showTime="false"
|
|
|
+ :showTime="paymentType == 1"
|
|
|
/>
|
|
|
- <div v-if="!(courseViewType == 2 && form.leixing == 1)">
|
|
|
+ <div v-if="!(courseViewType == 2 && paymentType == 1)">
|
|
|
<el-alert title="缴费设置" :closable="false" class="alert" type="info">
|
|
|
</el-alert>
|
|
|
<!-- 缴费设置的 不是会员团切不是续费 续费{{form.leixing}} -->
|
|
@@ -279,6 +258,7 @@ import memberSetting from "./member-setting";
|
|
|
import baseInfoVue from "../../teamDetail/components/baseInfo.vue";
|
|
|
import merge from "webpack-merge";
|
|
|
import numeral from "numeral";
|
|
|
+import dayjs from "dayjs";
|
|
|
// import { organizationCloudTeacherFeeQueryPage } from "@/api/specialSetting";
|
|
|
const paymentTypeFormat = {
|
|
|
0: "MUSIC_APPLY",
|
|
@@ -485,30 +465,14 @@ export default {
|
|
|
this.$set(this.form, "leixing", "2");
|
|
|
this.addExtraClass();
|
|
|
}
|
|
|
- // if (
|
|
|
- // !this.paymentType &&
|
|
|
- // this.type == "user" &&
|
|
|
- // organId &&
|
|
|
- // (this.courseViewType == 2 || this.courseViewType == 3)
|
|
|
- // ) {
|
|
|
- // try {
|
|
|
- // const res = await organizationCloudTeacherFeeQueryPage({ organId });
|
|
|
- // this.courseViewType == 2
|
|
|
- // ? (this.cloudFee = res.data.rows[0].price)
|
|
|
- // : (this.cloudFee = res.data.rows[0].plusPrice);
|
|
|
- // } catch (e) {
|
|
|
- // console.log(e);
|
|
|
- // }
|
|
|
- // // 获取乐团云教练费用
|
|
|
- // // this.cloudFee
|
|
|
- // }
|
|
|
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.$emit('changePaymentType',key)
|
|
|
+ // this.paymentType = key;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -571,6 +535,7 @@ export default {
|
|
|
this.viewDetail.musicGroupPaymentCalenders[0]
|
|
|
.originalMemberPaymentAmount
|
|
|
);
|
|
|
+
|
|
|
if (this.$refs.cycle) {
|
|
|
this.$set(
|
|
|
this.cycle,
|
|
@@ -597,6 +562,12 @@ export default {
|
|
|
"musicGroupOrganizationCourseSettingId",
|
|
|
res.data.auditDto?.musicGroupOrganizationCourseSettingsId
|
|
|
);
|
|
|
+ if (this.courseViewType == 2 && this.form.leixing == 1) {
|
|
|
+ // 会员团续费
|
|
|
+
|
|
|
+ this.$set(this.memberForm, "paymentDate", [dayjs(firstPayment.startPaymentDate).format("YYYY-MM-DD"),dayjs(firstPayment.deadlinePaymentDate).format("YYYY-MM-DD")
|
|
|
+ ]);
|
|
|
+ }
|
|
|
this.syncAllMoney();
|
|
|
} catch (error) {}
|
|
|
}
|
|
@@ -771,7 +742,9 @@ export default {
|
|
|
) {
|
|
|
return this.$message.error("请至少选择一条加课信息");
|
|
|
}
|
|
|
+
|
|
|
if (valided.length === forms.length) {
|
|
|
+ // 验证通过
|
|
|
const { leixing, ...rest } = {
|
|
|
...this.form,
|
|
|
...this.other,
|
|
@@ -780,7 +753,6 @@ export default {
|
|
|
musicGroupPaymentDateRangeList: [
|
|
|
...this.cycles.map((item) => {
|
|
|
const { paymentDate, paymentValid, ...other } = item;
|
|
|
- console.log(item)
|
|
|
return {
|
|
|
...other,
|
|
|
...getTimes(paymentDate, [
|
|
@@ -798,7 +770,17 @@ export default {
|
|
|
musicGroupPaymentCalenderCourseSettingsList: this.eclass,
|
|
|
musicGroupPaymentCalenderStudentDetails: this.eclassuser,
|
|
|
};
|
|
|
- console.log('直接循环')
|
|
|
+ // 如果是会员团续费 则添加缴费开始时间 缴费结束时间
|
|
|
+ const { paymentDate, ...some } = this.memberForm;
|
|
|
+ if (this.courseViewType == 2 && this.form.leixing == 1) {
|
|
|
+ rest.musicGroupPaymentDateRangeList[0] = {
|
|
|
+ ...getTimes(paymentDate, [
|
|
|
+ "startPaymentDate",
|
|
|
+ "deadlinePaymentDate",
|
|
|
+ ]),
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
if (this.$refs.cycle) {
|
|
|
const { paymentDate, paymentValid, ...other } = this.cycle;
|
|
|
rest.musicGroupPaymentDateRangeList = [
|
|
@@ -815,14 +797,10 @@ export default {
|
|
|
},
|
|
|
];
|
|
|
}
|
|
|
- const { paymentDate, ...some } = this.memberForm;
|
|
|
+
|
|
|
const data = {
|
|
|
...rest,
|
|
|
...some,
|
|
|
- ...getTimes(paymentDate, [
|
|
|
- "startPaymentDate",
|
|
|
- "deadlinePaymentDate",
|
|
|
- ]),
|
|
|
isGiveMusicNetwork: false,
|
|
|
studentIds: this.studentIds,
|
|
|
paymentType:
|