|
@@ -28,11 +28,7 @@
|
|
|
placeholder="请选择计价标准"
|
|
|
>
|
|
|
<el-option label="按学生" value="STUDENT"> </el-option>
|
|
|
- <el-option
|
|
|
- label="按老师"
|
|
|
- value="TEACHER"
|
|
|
- :disabled="!teamCourse"
|
|
|
- >
|
|
|
+ <el-option label="按老师" value="TEACHER" :disabled="!teamCourse">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -75,10 +71,7 @@
|
|
|
</div>
|
|
|
<div
|
|
|
class="checkBtn"
|
|
|
- :class="[
|
|
|
- member ? 'active' : '',
|
|
|
- memberDisabled ? 'disabled' : '',
|
|
|
- ]"
|
|
|
+ :class="[member ? 'active' : '', memberDisabled ? 'disabled' : '']"
|
|
|
@click.prevent="
|
|
|
() => {
|
|
|
if (memberDisabled) return;
|
|
@@ -103,15 +96,10 @@
|
|
|
</div>
|
|
|
<div
|
|
|
v-if="
|
|
|
- isShowLeBao &&
|
|
|
- tenantId == 1 &&
|
|
|
- $route.query.team_status != 'PROGRESS'
|
|
|
+ isShowLeBao && tenantId == 1 && $route.query.team_status != 'PROGRESS'
|
|
|
"
|
|
|
class="checkBtn"
|
|
|
- :class="[
|
|
|
- leBao ? 'active' : '',
|
|
|
- leBaoDisabled ? 'disabled' : '',
|
|
|
- ]"
|
|
|
+ :class="[leBao ? 'active' : '', leBaoDisabled ? 'disabled' : '']"
|
|
|
@click.prevent="
|
|
|
() => {
|
|
|
if (leBaoDisabled) return;
|
|
@@ -169,9 +157,7 @@
|
|
|
<payTeamCourse
|
|
|
:form="form"
|
|
|
:charges="charges"
|
|
|
- :courseUnitPriceSettingsByType="
|
|
|
- organizationCourseUnitPriceSettingsByType
|
|
|
- "
|
|
|
+ :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
|
|
|
v-if="teamCourse"
|
|
|
@create="addExtraClass"
|
|
|
@remove="removeExtraClass"
|
|
@@ -199,9 +185,7 @@
|
|
|
/>
|
|
|
<paySchoolInfo
|
|
|
:form="form"
|
|
|
- :courseUnitPriceSettingsByType="
|
|
|
- organizationCourseUnitPriceSettingsByType
|
|
|
- "
|
|
|
+ :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
|
|
|
:teamCourse="teamCourse"
|
|
|
:member="member"
|
|
|
:teamActive="teamActive"
|
|
@@ -211,10 +195,7 @@
|
|
|
@checkType="checkType"
|
|
|
/>
|
|
|
<backMoney
|
|
|
- v-if="
|
|
|
- $route.query.payUserType == 'SCHOOL' &&
|
|
|
- form.currentTotalAmount > 0
|
|
|
- "
|
|
|
+ v-if="$route.query.payUserType == 'SCHOOL' && form.currentTotalAmount > 0"
|
|
|
:form="form"
|
|
|
/>
|
|
|
</div>
|
|
@@ -540,22 +521,19 @@ export default {
|
|
|
async init() {
|
|
|
this.organId = this.musicGroup?.organId;
|
|
|
this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
|
|
|
- if (
|
|
|
- this.courseViewType != 2 &&
|
|
|
- this.$route.query.team_status == "DRAFT"
|
|
|
- ) {
|
|
|
+ if (this.courseViewType != 2 && this.$route.query.team_status == "DRAFT") {
|
|
|
// 课程团的创建缴费
|
|
|
this.teamCourse = true;
|
|
|
// 现在课程团不在
|
|
|
// this.teamCourseDisabled = true;
|
|
|
this.form.paymentType = "MUSIC_APPLY";
|
|
|
- } else if (
|
|
|
- this.courseViewType == 2 &&
|
|
|
- this.$route.query.team_status == "DRAFT"
|
|
|
- ) {
|
|
|
+ } else if (this.courseViewType == 2 && this.$route.query.team_status == "DRAFT") {
|
|
|
// 会员团的创建缴费
|
|
|
this.member = true;
|
|
|
this.memberDisabled = true;
|
|
|
+ // 乐团创建缴费时,若乐团【收费模式】为【会员收费】,则缴费项目中【课程】【会员】两项都默认选中且必选,不可去掉
|
|
|
+ this.teamCourse = true;
|
|
|
+ this.teamCourseDisabled = true;
|
|
|
} else if (this.$route.query.team_status == "PROGRESS") {
|
|
|
this.leBao = false;
|
|
|
this.leBaoDisabled = true;
|
|
@@ -603,11 +581,7 @@ export default {
|
|
|
]);
|
|
|
}
|
|
|
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "contractUrl",
|
|
|
- res.data?.calender?.contractUrl
|
|
|
- );
|
|
|
+ this.$set(this.form, "contractUrl", res.data?.calender?.contractUrl);
|
|
|
this.$set(this.form, "memo", res.data?.calender?.memo);
|
|
|
|
|
|
this.$set(
|
|
@@ -618,19 +592,14 @@ export default {
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
"isShowMusicInsuranceForPay",
|
|
|
- res.data?.calender?.paymentItemShowState
|
|
|
- ?.isShowMusicInsuranceForPay
|
|
|
+ res.data?.calender?.paymentItemShowState?.isShowMusicInsuranceForPay
|
|
|
);
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
"isShowVipCourseForPay",
|
|
|
res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay
|
|
|
);
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "isShowSalePrice",
|
|
|
- res.data?.calender?.isShowSalePrice
|
|
|
- );
|
|
|
+ this.$set(this.form, "isShowSalePrice", res.data?.calender?.isShowSalePrice);
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
"isShowMusicCourseForPay",
|
|
@@ -647,21 +616,17 @@ export default {
|
|
|
}
|
|
|
if (res.data?.course?.length > 0) {
|
|
|
this.$set(
|
|
|
- this.form,
|
|
|
- "calenderFeeType",
|
|
|
- res.data?.calender?.calenderFeeType
|
|
|
- );
|
|
|
+ this.form,
|
|
|
+ "calenderFeeType",
|
|
|
+ res.data?.calender?.calenderFeeType
|
|
|
+ );
|
|
|
this.$nextTick(() => {
|
|
|
this.teamCourse = true;
|
|
|
|
|
|
this.$set(this.form, "eclass", res.data?.course);
|
|
|
console.log([...res.data?.course], "res.data?.course");
|
|
|
this.initDetail = true;
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "payUserType",
|
|
|
- res.data?.calender?.payUserType
|
|
|
- );
|
|
|
+ this.$set(this.form, "payUserType", res.data?.calender?.payUserType);
|
|
|
|
|
|
this.$set(
|
|
|
this.form,
|
|
@@ -746,9 +711,7 @@ export default {
|
|
|
const paramName = "cloud_price_range";
|
|
|
res.data.forEach((item) => {
|
|
|
if (item.paramName == paramName) {
|
|
|
- const itemValue = item.paranValue
|
|
|
- ? JSON.parse(item.paranValue)
|
|
|
- : null;
|
|
|
+ const itemValue = item.paranValue ? JSON.parse(item.paranValue) : null;
|
|
|
if (itemValue) {
|
|
|
this.rulesForm = itemValue;
|
|
|
}
|
|
@@ -883,9 +846,7 @@ export default {
|
|
|
if (item.isStudentOptional) {
|
|
|
first += item.courseCurrentPrice;
|
|
|
} 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;
|
|
|
first += floorMoney + remainder;
|
|
|
other += floorMoney;
|
|
@@ -928,22 +889,20 @@ export default {
|
|
|
async onPreview() {
|
|
|
// 开始预览
|
|
|
const musicGroupId = this.$route.query.id;
|
|
|
- await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then(
|
|
|
- (res) => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.dialogSubjectList = res.data.musicGroupSubjectPlans;
|
|
|
- // 默认预览第一个
|
|
|
- if (this.dialogSubjectList.length <= 0) {
|
|
|
- this.$message.error("请先设置声部信息");
|
|
|
- return;
|
|
|
- }
|
|
|
- this.activeName = this.dialogSubjectList[0].subjectId.toString();
|
|
|
- this.dialogSubjectVisible = true;
|
|
|
- } else {
|
|
|
- this.$message.warning("没有可预览的声部");
|
|
|
+ await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.dialogSubjectList = res.data.musicGroupSubjectPlans;
|
|
|
+ // 默认预览第一个
|
|
|
+ if (this.dialogSubjectList.length <= 0) {
|
|
|
+ this.$message.error("请先设置声部信息");
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.activeName = this.dialogSubjectList[0].subjectId.toString();
|
|
|
+ this.dialogSubjectVisible = true;
|
|
|
+ } else {
|
|
|
+ this.$message.warning("没有可预览的声部");
|
|
|
}
|
|
|
- );
|
|
|
+ });
|
|
|
},
|
|
|
checkType() {
|
|
|
this.$refs.form.validate();
|
|
@@ -953,11 +912,15 @@ export default {
|
|
|
if (isok) {
|
|
|
// 学校缴费没有预览
|
|
|
if (this.$route.query.payUserType == "SCHOOL") {
|
|
|
- this.$confirm(this.$route.query.calenderId?"是否修改缴费":"是否创建缴费?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
+ this.$confirm(
|
|
|
+ this.$route.query.calenderId ? "是否修改缴费" : "是否创建缴费?",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }
|
|
|
+ )
|
|
|
.then(() => {
|
|
|
this.onSubmit();
|
|
|
})
|
|
@@ -1076,8 +1039,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- let memberObj =
|
|
|
- form.memberList?.length > 0 ? { ...form.memberList[0] } : null;
|
|
|
+ let memberObj = form.memberList?.length > 0 ? { ...form.memberList[0] } : null;
|
|
|
// 获取会员名称
|
|
|
if (memberObj) {
|
|
|
this.memberRankList.forEach((item) => {
|
|
@@ -1133,9 +1095,7 @@ export default {
|
|
|
calenderActivityList:
|
|
|
this.form.activeList?.length > 0 ? this.form.activeList : null,
|
|
|
musicRepair:
|
|
|
- this.form.leBaoList?.length > 0
|
|
|
- ? { ...this.form.leBaoList[0] }
|
|
|
- : null,
|
|
|
+ this.form.leBaoList?.length > 0 ? { ...this.form.leBaoList[0] } : null,
|
|
|
calenderMember:
|
|
|
this.form.memberList?.length > 0 &&
|
|
|
this.form.memberList[0]?.memberRankSettingId
|
|
@@ -1168,9 +1128,7 @@ export default {
|
|
|
calenderActivityList:
|
|
|
this.form.activeList?.length > 0 ? this.form.activeList : null,
|
|
|
musicRepair:
|
|
|
- this.form.leBaoList?.length > 0
|
|
|
- ? { ...this.form.leBaoList[0] }
|
|
|
- : null,
|
|
|
+ this.form.leBaoList?.length > 0 ? { ...this.form.leBaoList[0] } : null,
|
|
|
calenderMember:
|
|
|
this.form.memberList?.length > 0 &&
|
|
|
this.form.memberList[0]?.memberRankSettingId
|
|
@@ -1187,8 +1145,7 @@ export default {
|
|
|
}),
|
|
|
calenderFeeType: this.form.calenderFeeType,
|
|
|
calenderFeeJson: JSON.stringify(calenderFeeJson),
|
|
|
- musicGroupCalenderRefundPeriods:
|
|
|
- this.form.musicGroupCalenderRefundPeriods,
|
|
|
+ musicGroupCalenderRefundPeriods: this.form.musicGroupCalenderRefundPeriods,
|
|
|
currentTotalAmount: this.form.currentTotalAmount,
|
|
|
contractUrl: this.form.contractUrl,
|
|
|
};
|
|
@@ -1209,8 +1166,7 @@ export default {
|
|
|
this.form.calenderFeeJson.allTotal = val;
|
|
|
if (this.form.calenderFeeJson.discountTotal) {
|
|
|
this.form.currentTotalAmount =
|
|
|
- this.form.calenderFeeJson.allTotal -
|
|
|
- this.form.calenderFeeJson.discountTotal;
|
|
|
+ this.form.calenderFeeJson.allTotal - this.form.calenderFeeJson.discountTotal;
|
|
|
} else {
|
|
|
this.form.currentTotalAmount = this.form.calenderFeeJson.allTotal;
|
|
|
}
|
|
@@ -1287,9 +1243,9 @@ export default {
|
|
|
// console.log(val,'form.currentTotalAmount');
|
|
|
// this.$forceUpdate()
|
|
|
},
|
|
|
- "form.calenderFeeType"(val,oldValue) {
|
|
|
- console.log(val,oldValue,this.initDetail)
|
|
|
- if (val == "TEACHER"&&!this.initDetail ) {
|
|
|
+ "form.calenderFeeType"(val, oldValue) {
|
|
|
+ console.log(val, oldValue, this.initDetail);
|
|
|
+ if (val == "TEACHER" && !this.initDetail) {
|
|
|
let arr = [];
|
|
|
this.form.eclass.forEach((item) => {
|
|
|
arr.push({
|
|
@@ -1329,11 +1285,7 @@ export default {
|
|
|
this.cycle = {};
|
|
|
|
|
|
if (val != "1") {
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "musicGroupOrganizationCourseSettingId",
|
|
|
- undefined
|
|
|
- );
|
|
|
+ this.$set(this.form, "musicGroupOrganizationCourseSettingId", undefined);
|
|
|
}
|
|
|
|
|
|
// this.$set(this.cycle, "paymentAmount", undefined);
|