|
@@ -32,6 +32,9 @@
|
|
|
form.eclass = [];
|
|
|
form.eclass.push({});
|
|
|
}
|
|
|
+ if (!teamCourse) {
|
|
|
+ form.calenderFeeType = 'STUDENT';
|
|
|
+ }
|
|
|
}
|
|
|
"
|
|
|
>
|
|
@@ -174,8 +177,30 @@
|
|
|
@create="addActive"
|
|
|
@remove="removeActive"
|
|
|
/>
|
|
|
+ <paySchoolInfo
|
|
|
+ :form="form"
|
|
|
+ :courseUnitPriceSettingsByType="
|
|
|
+ organizationCourseUnitPriceSettingsByType
|
|
|
+ "
|
|
|
+ :teamCourse="teamCourse"
|
|
|
+ :member="member"
|
|
|
+ :teamActive="teamActive"
|
|
|
+ :leBao="leBao"
|
|
|
+ @setAllTotal="setAllTotal"
|
|
|
+ v-if="$route.query.payUserType == 'SCHOOL'"
|
|
|
+ />
|
|
|
+ <backMoney
|
|
|
+ v-if="
|
|
|
+ $route.query.payUserType == 'SCHOOL' &&
|
|
|
+ form.currentTotalAmount > 0
|
|
|
+ "
|
|
|
+ :form="form"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <div class="teamCourseList coreList">
|
|
|
+ <div
|
|
|
+ class="teamCourseList coreList"
|
|
|
+ v-if="$route.query.payUserType == 'STUDENT'"
|
|
|
+ >
|
|
|
<div class="coreTitle">
|
|
|
<p>基础信息设置</p>
|
|
|
</div>
|
|
@@ -223,6 +248,41 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col style="width: 430px">
|
|
|
+ <!-- :rules="[
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: '请选择缴费时间',
|
|
|
+ trigger: 'blur',
|
|
|
+ },
|
|
|
+ ]" -->
|
|
|
+ <el-form-item prop="paymentDate" ref="paymentDate">
|
|
|
+ <template slot="label">
|
|
|
+ <p style="position: relative">
|
|
|
+ <!-- <span style="color: #f56c6c; margin-right: 4px">*</span> -->
|
|
|
+ 是否展示售价
|
|
|
+ <!-- <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <div slot="content">在该时间段内学员才可缴费</div>
|
|
|
+ <i
|
|
|
+ class="el-icon-question"
|
|
|
+ style="
|
|
|
+ font-size: 18px;
|
|
|
+ color: #f56c6c;
|
|
|
+ position: relative;
|
|
|
+ top: 2px;
|
|
|
+ "
|
|
|
+ ></i>
|
|
|
+ </el-tooltip> -->
|
|
|
+ </p>
|
|
|
+ </template>
|
|
|
+ <el-select v-model="form.isShowSalePrice">
|
|
|
+ <el-option label="是" :value="true"> </el-option>
|
|
|
+ <el-option label="否" :value="false"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
<el-col class="memoWrap">
|
|
|
<el-form-item
|
|
|
class="memoWrapItem"
|
|
@@ -257,8 +317,9 @@
|
|
|
|
|
|
<el-input
|
|
|
style="width: 100%"
|
|
|
- :rows="1"
|
|
|
+ :rows="3"
|
|
|
v-model="form.memo"
|
|
|
+ type="textarea"
|
|
|
maxlength="50"
|
|
|
show-word-limit
|
|
|
></el-input>
|
|
@@ -327,6 +388,8 @@ import payTeamCourse from "../modals/payTeamCourse";
|
|
|
import payMember from "../modals/payMember";
|
|
|
import payLeBao from "../modals/payLeBao";
|
|
|
import payTeamActive from "../modals/payTeamActive";
|
|
|
+import paySchoolInfo from "../modals/paySchoolInfo";
|
|
|
+import backMoney from "../modals/backMoney";
|
|
|
import numeral from "numeral";
|
|
|
import dayjs from "dayjs";
|
|
|
import subjectPreview from "@/views/resetTeaming/modals/subject-preview";
|
|
@@ -356,6 +419,8 @@ export default {
|
|
|
payLeBao,
|
|
|
payTeamActive,
|
|
|
subjectPreview,
|
|
|
+ paySchoolInfo,
|
|
|
+ backMoney,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -376,19 +441,29 @@ export default {
|
|
|
],
|
|
|
leBaoList: [{}],
|
|
|
activeList: [{}],
|
|
|
+ teacherFeeList: [],
|
|
|
isShowMemberForPay: true,
|
|
|
isShowMusicInsuranceForPay: true,
|
|
|
isShowVipCourseForPay: true,
|
|
|
isShowMusicCourseForPay: true,
|
|
|
leixing: "1",
|
|
|
+ isShowSalePrice: true,
|
|
|
+ calenderFeeJson: {
|
|
|
+ discountTotal: "",
|
|
|
+ allTotal: "",
|
|
|
+ sutdentNumber: "",
|
|
|
+ },
|
|
|
+ calenderFeeType: "STUDENT",
|
|
|
+ musicGroupCalenderRefundPeriods: [{ refundDate: "", refundAmount: "" }],
|
|
|
+ currentTotalAmount: 0,
|
|
|
},
|
|
|
teamCourse: false,
|
|
|
- teamCourseDisabled: false,
|
|
|
member: false,
|
|
|
- memberDisabled: false,
|
|
|
teamActive: false,
|
|
|
- teamActiveDisabled: false,
|
|
|
leBao: false,
|
|
|
+ memberDisabled: false,
|
|
|
+ teamCourseDisabled: false,
|
|
|
+ teamActiveDisabled: false,
|
|
|
leBaoDisabled: false,
|
|
|
organizationCourseUnitPriceSettings: null,
|
|
|
baseInfo: null,
|
|
@@ -419,6 +494,7 @@ export default {
|
|
|
tenantId: null,
|
|
|
isField: false,
|
|
|
showAutoActivationFlag: false,
|
|
|
+ initDetail: false,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -444,7 +520,7 @@ export default {
|
|
|
this.courseViewType = this.baseInfo?.musicGroup?.courseViewType;
|
|
|
if (
|
|
|
this.courseViewType != 2 &&
|
|
|
- this.$route.query.team_status == "PRE_BUILD_FEE"
|
|
|
+ this.$route.query.team_status == "DRAFT"
|
|
|
) {
|
|
|
// 课程团的创建缴费
|
|
|
this.teamCourse = true;
|
|
@@ -453,7 +529,7 @@ export default {
|
|
|
this.form.paymentType = "MUSIC_APPLY";
|
|
|
} else if (
|
|
|
this.courseViewType == 2 &&
|
|
|
- this.$route.query.team_status == "PRE_BUILD_FEE"
|
|
|
+ this.$route.query.team_status == "DRAFT"
|
|
|
) {
|
|
|
// 会员团的创建缴费
|
|
|
this.member = true;
|
|
@@ -463,12 +539,12 @@ export default {
|
|
|
this.leBaoDisabled = true;
|
|
|
}
|
|
|
if (this.$route.query.payUserType == "SCHOOL") {
|
|
|
- this.member = false;
|
|
|
- this.memberDisabled = true;
|
|
|
+ // this.member = false;
|
|
|
+ // this.memberDisabled = true;
|
|
|
this.leBao = false;
|
|
|
- this.teamActive = false;
|
|
|
this.leBaoDisabled = true;
|
|
|
- this.teamActiveDisabled = true;
|
|
|
+ // this.teamActive = false;
|
|
|
+ // this.teamActiveDisabled = true;
|
|
|
} else {
|
|
|
}
|
|
|
await this.getCharges(); // 续费的选择缴费类型
|
|
@@ -481,7 +557,8 @@ export default {
|
|
|
await this.getAgreement(); // 获取是否有正在启用得协议
|
|
|
if (this.$route.query.calenderId) {
|
|
|
// 说明是修改 查缴项目详情
|
|
|
- getMusicGroupPaymentCalenderDetail({
|
|
|
+ this.initDetail = true;
|
|
|
+ await getMusicGroupPaymentCalenderDetail({
|
|
|
id: this.$route.query.calenderId,
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
@@ -497,15 +574,28 @@ export default {
|
|
|
res.data?.calender?.deadlinePaymentDate,
|
|
|
]);
|
|
|
this.$set(this.form, "memo", res.data?.calender?.memo);
|
|
|
+
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "isShowMemberForPay",
|
|
|
+ res.data?.calender?.paymentItemShowState?.isShowMemberForPay
|
|
|
+ );
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
- "payUserType",
|
|
|
- res.data?.calender?.payUserType
|
|
|
+ "isShowMusicInsuranceForPay",
|
|
|
+ res.data?.calender?.paymentItemShowState
|
|
|
+ ?.isShowMusicInsuranceForPay
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "isShowVipCourseForPay",
|
|
|
+ res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "isShowMusicCourseForPay",
|
|
|
+ res.data?.calender?.paymentItemShowState?.isShowMusicCourseForPay
|
|
|
);
|
|
|
- this.$set(this.form, "isShowMemberForPay", res.data?.calender?.paymentItemShowState?.isShowMemberForPay);
|
|
|
- this.$set(this.form, "isShowMusicInsuranceForPay", res.data?.calender?.paymentItemShowState?.isShowMusicInsuranceForPay);
|
|
|
- this.$set(this.form, "isShowVipCourseForPay", res.data?.calender?.paymentItemShowState?.isShowVipCourseForPay);
|
|
|
- this.$set(this.form, "isShowMusicCourseForPay", res.data?.calender?.paymentItemShowState?.isShowMusicCourseForPay);
|
|
|
if (res.data.member) {
|
|
|
// 团练保
|
|
|
this.member = true;
|
|
@@ -520,6 +610,37 @@ export default {
|
|
|
this.teamCourse = true;
|
|
|
this.isSetCourseSettingsId = true;
|
|
|
this.$set(this.form, "eclass", res.data?.course);
|
|
|
+ console.log('设置完成eclass')
|
|
|
+ this.initDetail = true;
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "payUserType",
|
|
|
+ res.data?.calender?.payUserType
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "calenderFeeType",
|
|
|
+ res.data?.calender?.calenderFeeType
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "musicGroupCalenderRefundPeriods",
|
|
|
+ res.data?.calenderRefundPeriods
|
|
|
+ );
|
|
|
+
|
|
|
+ let calenderFeeJson = res.data?.calender?.calenderFeeJson;
|
|
|
+ if (calenderFeeJson) {
|
|
|
+ calenderFeeJson = JSON.parse(calenderFeeJson);
|
|
|
+ this.$set(this.form, "calenderFeeJson", calenderFeeJson);
|
|
|
+ if (this.form.calenderFeeType == "TEACHER") {
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ "teacherFeeList",
|
|
|
+ calenderFeeJson.teacherFeeList
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
if (res.data?.activity?.length > 0) {
|
|
@@ -650,7 +771,7 @@ export default {
|
|
|
path: "/business/resetTeaming",
|
|
|
query,
|
|
|
});
|
|
|
- } else if (query.type == "PRE_BUILD_FEE" || query.type == "feeAudit") {
|
|
|
+ } else if (query.type == "teamDraft" || query.type == "feeAudit") {
|
|
|
this.$store.dispatch("delVisitedViews", this.$route);
|
|
|
this.$router.push({
|
|
|
path: "/business/resetTeaming",
|
|
@@ -752,6 +873,10 @@ export default {
|
|
|
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 {
|
|
@@ -790,6 +915,17 @@ export default {
|
|
|
this.$refs.form.validate(async (isok) => {
|
|
|
if (isok) {
|
|
|
let obj = this.fommatDate();
|
|
|
+ if(this.form.payUserType=='SCHOOL'){
|
|
|
+ let total = 0;
|
|
|
+ this.form.musicGroupCalenderRefundPeriods.forEach(item=>{
|
|
|
+ total+=item.refundAmount*1
|
|
|
+ })
|
|
|
+ if(total !=this.form.currentTotalAmount){
|
|
|
+ console.log(total,this.form.currentTotalAmount)
|
|
|
+ this.$message.error('付款金额与回款金额不一致,请重新设置')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
if (this.$route.query.calenderId) {
|
|
|
obj.calenderId = this.$route.query.calenderId;
|
|
|
try {
|
|
@@ -906,7 +1042,9 @@ export default {
|
|
|
member: memberObj, // 云教练
|
|
|
memberPrivilegesItemList: [], // 会员基本内容
|
|
|
repair:
|
|
|
- (form.leBaoList?.length > 0&&this.isShowLeBao&&this.$route.query.team_status != 'PROGRESS')
|
|
|
+ form.leBaoList?.length > 0 &&
|
|
|
+ this.isShowLeBao &&
|
|
|
+ this.$route.query.team_status != "PROGRESS"
|
|
|
? { ...form.leBaoList[0], optionalFlag: false }
|
|
|
: null, // 乐保
|
|
|
},
|
|
@@ -917,34 +1055,73 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
fommatDate() {
|
|
|
- return {
|
|
|
- payUserType: this.$route.query.payUserType,
|
|
|
- musicGroupOrganizationCourseSettingId:
|
|
|
- this.form.musicGroupOrganizationCourseSettingId || null,
|
|
|
- memo: this.form.memo,
|
|
|
- startPaymentDate: this.form.paymentDate[0],
|
|
|
- deadlinePaymentDate: this.form.paymentDate[1],
|
|
|
- calenderActivityList:
|
|
|
- this.form.activeList?.length > 0 ? this.form.activeList : null,
|
|
|
- musicRepair:
|
|
|
- this.form.leBaoList?.length > 0
|
|
|
- ? { ...this.form.leBaoList[0] }
|
|
|
- : null,
|
|
|
- calenderMember:
|
|
|
- this.form.memberList?.length > 0 &&
|
|
|
- this.form.memberList[0]?.memberRankSettingId
|
|
|
- ? { ...this.form.memberList[0] }
|
|
|
- : null,
|
|
|
- musicGroupPaymentCalenderCourseSettingsList:
|
|
|
- this.form.eclass?.length > 0 ? this.form.eclass : null,
|
|
|
- musicGroupId: this.$route.query.id,
|
|
|
- paymentItemShowState: JSON.stringify({
|
|
|
- isShowMemberForPay: this.form.isShowMemberForPay,
|
|
|
- isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
|
|
|
- isShowVipCourseForPay: this.form.isShowVipCourseForPay,
|
|
|
- isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
|
|
|
- }),
|
|
|
- };
|
|
|
+ if (this.$route.query.payUserType == "STUDENT") {
|
|
|
+ return {
|
|
|
+ payUserType: this.$route.query.payUserType,
|
|
|
+ musicGroupOrganizationCourseSettingId:
|
|
|
+ this.form.musicGroupOrganizationCourseSettingId || null,
|
|
|
+ memo: this.form.memo,
|
|
|
+ startPaymentDate: this.form.paymentDate[0],
|
|
|
+ deadlinePaymentDate: this.form.paymentDate[1],
|
|
|
+ calenderActivityList:
|
|
|
+ this.form.activeList?.length > 0 ? this.form.activeList : null,
|
|
|
+ musicRepair:
|
|
|
+ this.form.leBaoList?.length > 0
|
|
|
+ ? { ...this.form.leBaoList[0] }
|
|
|
+ : null,
|
|
|
+ calenderMember:
|
|
|
+ this.form.memberList?.length > 0 &&
|
|
|
+ this.form.memberList[0]?.memberRankSettingId
|
|
|
+ ? { ...this.form.memberList[0] }
|
|
|
+ : null,
|
|
|
+ musicGroupPaymentCalenderCourseSettingsList:
|
|
|
+ this.form.eclass?.length > 0 ? this.form.eclass : null,
|
|
|
+ musicGroupId: this.$route.query.id,
|
|
|
+ paymentItemShowState: JSON.stringify({
|
|
|
+ isShowMemberForPay: this.form.isShowMemberForPay,
|
|
|
+ isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
|
|
|
+ isShowVipCourseForPay: this.form.isShowVipCourseForPay,
|
|
|
+ isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
|
|
|
+ }),
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ let calenderFeeJson = this.form.calenderFeeJson;
|
|
|
+ if (this.form.calenderFeeType == "TEACHER") {
|
|
|
+ calenderFeeJson.teacherFeeList = this.form.teacherFeeList;
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ payUserType: this.$route.query.payUserType,
|
|
|
+ musicGroupOrganizationCourseSettingId:
|
|
|
+ this.form.musicGroupOrganizationCourseSettingId || null,
|
|
|
+ memo: this.form.memo,
|
|
|
+ calenderActivityList:
|
|
|
+ this.form.activeList?.length > 0 ? this.form.activeList : null,
|
|
|
+ musicRepair:
|
|
|
+ this.form.leBaoList?.length > 0
|
|
|
+ ? { ...this.form.leBaoList[0] }
|
|
|
+ : null,
|
|
|
+ calenderMember:
|
|
|
+ this.form.memberList?.length > 0 &&
|
|
|
+ this.form.memberList[0]?.memberRankSettingId
|
|
|
+ ? { ...this.form.memberList[0] }
|
|
|
+ : null,
|
|
|
+ musicGroupPaymentCalenderCourseSettingsList:
|
|
|
+ this.form.eclass?.length > 0 ? this.form.eclass : null,
|
|
|
+ musicGroupId: this.$route.query.id,
|
|
|
+ paymentItemShowState: JSON.stringify({
|
|
|
+ isShowMemberForPay: this.form.isShowMemberForPay,
|
|
|
+ isShowMusicInsuranceForPay: this.form.isShowMusicInsuranceForPay,
|
|
|
+ isShowVipCourseForPay: this.form.isShowVipCourseForPay,
|
|
|
+ isShowMusicCourseForPay: this.form.isShowMusicCourseForPay,
|
|
|
+ }),
|
|
|
+ calenderFeeType: this.form.calenderFeeType,
|
|
|
+ calenderFeeJson: JSON.stringify(calenderFeeJson),
|
|
|
+ musicGroupCalenderRefundPeriods:
|
|
|
+ this.form.musicGroupCalenderRefundPeriods,
|
|
|
+ currentTotalAmount: this.form.currentTotalAmount,
|
|
|
+ };
|
|
|
+ }
|
|
|
},
|
|
|
getScroll() {
|
|
|
this.scrollTop =
|
|
@@ -957,6 +1134,16 @@ export default {
|
|
|
this.isField = false;
|
|
|
}
|
|
|
},
|
|
|
+ setAllTotal(val) {
|
|
|
+ this.form.calenderFeeJson.allTotal = val;
|
|
|
+ this.form.currentTotalAmount =
|
|
|
+ this.form.calenderFeeJson.allTotal -
|
|
|
+ this.form.calenderFeeJson.discountTotal;
|
|
|
+ this.$set(this.form, "currentTotalAmount", this.form.currentTotalAmount);
|
|
|
+ },
|
|
|
+ currentTotalAmount(val) {
|
|
|
+ this.$set(this.form, "currentTotalAmount", val);
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
teamCourse(val) {
|
|
@@ -981,6 +1168,29 @@ export default {
|
|
|
this.$set(this.form, "leBaoList", [{}]);
|
|
|
}
|
|
|
},
|
|
|
+ "form.eclass": {
|
|
|
+ handler(newValue) {
|
|
|
+ if (this.initDetail) {
|
|
|
+ this.initDetail = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let arr = [];
|
|
|
+ newValue.forEach((item) => {
|
|
|
+ arr.push({
|
|
|
+ courseType: item.courseType,
|
|
|
+ teacherNumber: 0,
|
|
|
+ courseNumber: 0,
|
|
|
+ courseCurrentPrice: 0,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.$set(this.form, "teacherFeeList", arr);
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ "form.currentTotalAmount"(val) {
|
|
|
+ // console.log(val,'form.currentTotalAmount');
|
|
|
+ // this.$forceUpdate()
|
|
|
+ },
|
|
|
async "form.musicGroupOrganizationCourseSettingId"(val) {
|
|
|
// && !this.rowDetail !this.$route.query.calenderId
|
|
|
|
|
@@ -1032,7 +1242,8 @@ export default {
|
|
|
<style lang="scss" scoped>
|
|
|
@import "~@/views/resetTeaming/modals/pay.scss";
|
|
|
.memoWrap {
|
|
|
- width: calc(100% - 430px);
|
|
|
+ // width: calc(100% - 860px);
|
|
|
+ width: 860px;
|
|
|
.memoWrapItem {
|
|
|
display: block;
|
|
|
::v-deep .el-form-item__content {
|