|
@@ -48,7 +48,7 @@
|
|
|
class="alert"
|
|
|
type="info">
|
|
|
</el-alert>
|
|
|
- <template v-if="isUserType && paymentType == '0'">
|
|
|
+ <template v-if="isMulticycle">
|
|
|
<el-form ref="payment" :model="payment">
|
|
|
<el-form-item
|
|
|
label-width="160px"
|
|
@@ -137,6 +137,7 @@ import {
|
|
|
musicGroupPaymentCalenderAdd,
|
|
|
musicGroupPaymentCalenderDetailBatchUpdate,
|
|
|
queryByMusicGroupOrganizationCourseSettingsId,
|
|
|
+ musicGroupPaymentCalenderView,
|
|
|
} from "../api";
|
|
|
import { paymentPatternType } from '@/constant'
|
|
|
import { getTimes, objectToOptions } from "@/utils";
|
|
@@ -184,6 +185,7 @@ export default {
|
|
|
payment: {
|
|
|
paymentPattern: null,
|
|
|
},
|
|
|
+ viewDetail: null,
|
|
|
organizationCourseUnitPriceSettingsByType: {},
|
|
|
paymentPatternTypeOptions: objectToOptions(paymentPatternType),
|
|
|
};
|
|
@@ -210,6 +212,23 @@ export default {
|
|
|
},
|
|
|
paymentAmountDisabled() {
|
|
|
return (this.isUserType || (this.isCommon && this.isUserType)) && this.isDisabled
|
|
|
+ },
|
|
|
+ isMulticycle() {
|
|
|
+ let editMulticycle = false
|
|
|
+ if (this.viewDetail) {
|
|
|
+ const { musicGroupPaymentCalenders, auditDto } = this.viewDetail
|
|
|
+ editMulticycle = (musicGroupPaymentCalenders > 1 ||
|
|
|
+ musicGroupPaymentCalenders[0]?.paymentType == 'MUSIC_APPLY')
|
|
|
+ if (editMulticycle) {
|
|
|
+ this.$set(this.payment, 'paymentPattern', String(auditDto?.paymentPattern))
|
|
|
+ this.cycles = musicGroupPaymentCalenders.map(item => ({
|
|
|
+ paymentAmount: item.paymentAmount,
|
|
|
+ paymentDate: [item?.startPaymentDate, item?.deadlinePaymentDate],
|
|
|
+ paymentValid: [item?.paymentValidStartDate, item?.paymentValidEndDate]
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.isUserType && this.paymentType == '0' || editMulticycle
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -282,9 +301,11 @@ export default {
|
|
|
this.form.musicGroupOrganizationCourseSettingId = this.rowDetail.musicGroupOrganizationCourseSettingId;
|
|
|
} else {
|
|
|
try {
|
|
|
- const res = await getMusicGroupPaymentCalenderDetail({
|
|
|
- id: this.rowDetail.id
|
|
|
+ const res = await musicGroupPaymentCalenderView({
|
|
|
+ musicGroupId: this.musicGroupId,
|
|
|
+ batchNo: this.rowDetail.batchNo,
|
|
|
})
|
|
|
+ this.viewDetail = res.data
|
|
|
this.eclass = res.data.musicGroupPaymentCalenderCourseSettings
|
|
|
this.syncAllMoney()
|
|
|
} catch (error) {}
|