|
@@ -101,6 +101,10 @@
|
|
|
() => {
|
|
|
if (teamCourseDisabled) return;
|
|
|
teamCourse = !teamCourse;
|
|
|
+ if (teamCourse && form.eclass.length < 0) {
|
|
|
+ form.eclass = [];
|
|
|
+ form.eclass.push({});
|
|
|
+ }
|
|
|
}
|
|
|
"
|
|
|
>
|
|
@@ -120,6 +124,10 @@
|
|
|
() => {
|
|
|
if (memberDisabled) return;
|
|
|
member = !member;
|
|
|
+ if (member && form.memberList.length < 0) {
|
|
|
+ form.memberList = [];
|
|
|
+ form.memberList.push({});
|
|
|
+ }
|
|
|
}
|
|
|
"
|
|
|
>
|
|
@@ -140,6 +148,10 @@
|
|
|
() => {
|
|
|
if (leBaoDisabled) return;
|
|
|
leBao = !leBao;
|
|
|
+ if (leBao && form.leBaoList.length < 0) {
|
|
|
+ form.leBaoList = [];
|
|
|
+ form.leBaoList.push({});
|
|
|
+ }
|
|
|
}
|
|
|
"
|
|
|
>
|
|
@@ -159,6 +171,10 @@
|
|
|
() => {
|
|
|
if (teamActiveDisabled) return;
|
|
|
teamActive = !teamActive;
|
|
|
+ if (teamActive && form.activeList.length < 0) {
|
|
|
+ form.activeList = [];
|
|
|
+ form.activeList.push({});
|
|
|
+ }
|
|
|
}
|
|
|
"
|
|
|
>
|
|
@@ -278,6 +294,7 @@ export default {
|
|
|
organId: null,
|
|
|
leBaoInfo: null,
|
|
|
isShowLeBao: false,
|
|
|
+ isSetCourseSettingsId: false,
|
|
|
activeList: [{}],
|
|
|
submitList: [],
|
|
|
organizationCourseUnitPriceSettingsByType: null,
|
|
@@ -325,18 +342,18 @@ export default {
|
|
|
await this.getMemberList(); // 获取会员(团练保信息)
|
|
|
await this.getLeBao(); // 获取乐保
|
|
|
await this.getActive(); // 获取活动
|
|
|
-
|
|
|
- console.log(this.$route.query.calenderId,'calenderId');
|
|
|
if (this.$route.query.calenderId) {
|
|
|
// 说明是修改 查缴项目详情
|
|
|
getMusicGroupPaymentCalenderDetail({
|
|
|
id: this.$route.query.calenderId,
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
- if (res.data.member) {
|
|
|
- // 团练保
|
|
|
- this.member = true;
|
|
|
- this.$set(this.form, "memberList"[{ ...res.data.member }]);
|
|
|
+ if (res.data?.calender?.musicGroupOrganizationCourseSettingId) {
|
|
|
+ this.form.leixing = "1";
|
|
|
+ this.form.musicGroupOrganizationCourseSettingId =
|
|
|
+ res.data?.calender?.musicGroupOrganizationCourseSettingId;
|
|
|
+ } else {
|
|
|
+ this.form.leixing = "2";
|
|
|
}
|
|
|
this.$set(this.form, "paymentDate", [
|
|
|
res.data?.calender?.startPaymentDate,
|
|
@@ -348,32 +365,35 @@ export default {
|
|
|
"payUserType",
|
|
|
res.data?.calender?.payUserType
|
|
|
);
|
|
|
- if (res.data?.calender?.musicGroupOrganizationCourseSettingId) {
|
|
|
- this.leixing = "1";
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "musicGroupOrganizationCourseSettingId",
|
|
|
- res.data?.calender?.musicGroupOrganizationCourseSettingId
|
|
|
- );
|
|
|
- } else {
|
|
|
- this.leixing = "2";
|
|
|
+
|
|
|
+ if (res.data.member) {
|
|
|
+ // 团练保
|
|
|
+ this.member = true;
|
|
|
+ this.$set(this.form, "memberList", [{ ...res.data.member }]);
|
|
|
}
|
|
|
if (res.data.repair) {
|
|
|
this.leBao = true;
|
|
|
- this.$set(this.form, "leBaoList"[{ ...res.data.repair }]);
|
|
|
+ this.$set(this.form, "leBaoList", [{ ...res.data.repair }]);
|
|
|
}
|
|
|
if (res.data?.course?.length > 0) {
|
|
|
- this.teamCourse = true;
|
|
|
- this.$set(this.form, "eclass", res.data.course);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.teamCourse = true;
|
|
|
+ this.isSetCourseSettingsId = true;
|
|
|
+ this.$set(this.form, "eclass", res.data?.course);
|
|
|
+ });
|
|
|
}
|
|
|
if (res.data?.activity?.length > 0) {
|
|
|
this.teamActive = true;
|
|
|
- this.$set(this.form, "activity", res.data.activity);
|
|
|
+
|
|
|
+ this.$set(this.form, "activeList", res.data.activity);
|
|
|
+ this.form.activeList.forEach(active=>{
|
|
|
+ active.vipGroupCategoryNames = active.categoryName
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- if (this.submitList.length > 0) {
|
|
|
+ if (this.submitList.length > 0) {
|
|
|
this.$bus.$emit("showguide", this.submitList);
|
|
|
return;
|
|
|
}
|
|
@@ -601,55 +621,38 @@ export default {
|
|
|
if (!val) {
|
|
|
this.$set(this.form, "eclass", null);
|
|
|
} else {
|
|
|
- this.$set(this.form, "eclass", [{}]);
|
|
|
+ // this.$set(this.form, "eclass", [{}]);
|
|
|
}
|
|
|
},
|
|
|
member(val) {
|
|
|
if (!val) {
|
|
|
this.$set(this.form, "memberList", null);
|
|
|
} else {
|
|
|
- this.$set(this.form, "memberList", [
|
|
|
- {
|
|
|
- periodEnum: "",
|
|
|
- num: "",
|
|
|
- actualAmount: "",
|
|
|
- memberRankSettingId: "",
|
|
|
- optionalFlag: null,
|
|
|
- },
|
|
|
- ]);
|
|
|
+ // this.$set(this.form, "memberList", [{}]);
|
|
|
}
|
|
|
},
|
|
|
teamActive(val) {
|
|
|
if (!val) {
|
|
|
this.$set(this.form, "activeList", null);
|
|
|
} else {
|
|
|
- this.$set(this.form, "activeList", [{}]);
|
|
|
+ // this.$set(this.form, "activeList", [{}]);
|
|
|
}
|
|
|
},
|
|
|
leBao(val) {
|
|
|
if (!val) {
|
|
|
this.$set(this.form, "leBaoList", null);
|
|
|
} else {
|
|
|
- this.$set(this.form, "leBaoList", [
|
|
|
- {
|
|
|
- num: 0,
|
|
|
- actualAmount: "",
|
|
|
- originalAmount: "",
|
|
|
- },
|
|
|
- ]);
|
|
|
+ // this.$set(this.form, "leBaoList", [{}]);
|
|
|
}
|
|
|
},
|
|
|
async "form.musicGroupOrganizationCourseSettingId"(val) {
|
|
|
// && !this.rowDetail
|
|
|
|
|
|
- if (val && !this.isSetCourseSettingsId) {
|
|
|
+ if (val && !this.isSetCourseSettingsId&&!this.$route.query.calenderId) {
|
|
|
try {
|
|
|
const res = await queryByMusicGroupOrganizationCourseSettingsId({
|
|
|
id: val,
|
|
|
});
|
|
|
- // this.form.eclass = res.data.filter((item) => {
|
|
|
- // return !item.isStudentOptional || this.paymentType !== undefined;
|
|
|
- // }) || [{}];
|
|
|
this.$set(this.form, "eclass", res.data);
|
|
|
// this.syncAllMoney();
|
|
|
} catch (error) {}
|
|
@@ -660,14 +663,22 @@ export default {
|
|
|
this.cycles = [{}];
|
|
|
this.collapse = [0];
|
|
|
this.cycle = {};
|
|
|
- this.$set(this.form, "musicGroupOrganizationCourseSettingId", undefined);
|
|
|
+ if (val != "1") {
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "musicGroupOrganizationCourseSettingId",
|
|
|
+ undefined
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
// this.$set(this.cycle, "paymentAmount", undefined);
|
|
|
// this.$set(this.other, "memo", null);
|
|
|
- if (val === "1") {
|
|
|
+ if (val === "1" && !this.isSetCourseSettingsId) {
|
|
|
this.$set(this.form, "eclass", []);
|
|
|
} else if (val === "2") {
|
|
|
this.$set(this.form, "eclass", [{}]);
|
|
|
}
|
|
|
+ this.isSetCourseSettingsId = false;
|
|
|
},
|
|
|
},
|
|
|
computed: {
|