|
@@ -67,6 +67,7 @@
|
|
|
:isUserType="true"
|
|
|
:isCommon="false"
|
|
|
:isDisabled="true"
|
|
|
+ :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
|
|
|
@moneyChange="syncAllMoney"
|
|
|
/>
|
|
|
<el-alert title="缴费设置" :closable="false" class="alert" type="info">
|
|
@@ -76,7 +77,7 @@
|
|
|
:isUserType="true"
|
|
|
:form.sync="cycle"
|
|
|
:isCommon="false"
|
|
|
- :isDisabled="false"
|
|
|
+ :isDisabled="true"
|
|
|
/>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="$listeners.close">取 消</el-button>
|
|
@@ -89,15 +90,17 @@ import paymentCycle from "../../../resetTeaming/modals/payment-cycle";
|
|
|
import extraClass from "../../../resetTeaming/modals/extra-class";
|
|
|
import { musicGroupPaymentCalenderAdd } from '../../../resetTeaming/api'
|
|
|
import { queryRemainCourseTypeDuration } from '../../api'
|
|
|
-import { getTimes } from "@/utils";
|
|
|
+import { courseType } from '@/constant'
|
|
|
+import { getTimes, objectToOptions } from "@/utils";
|
|
|
export default {
|
|
|
- props: ["snapList", "highList", "mixList", "signList", 'createdUserId', 'organizationCourseUnitPriceSettings', 'musicGroupId'],
|
|
|
+ props: ["snapList", "highList", "mixList", "signList", 'createdUserId', 'organizationCourseUnitPriceSettings', 'musicGroupId', 'baseInfo'],
|
|
|
components: {
|
|
|
paymentCycle,
|
|
|
extraClass
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ courseTypeOptions: courseType,
|
|
|
ids: '',
|
|
|
form: {
|
|
|
signClass: '',
|
|
@@ -107,15 +110,7 @@ export default {
|
|
|
},
|
|
|
cycle: {},
|
|
|
eclass: [],
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- organizationCourseUnitPriceSettingsByType() {
|
|
|
- const _ = {}
|
|
|
- for (const item of this.organizationCourseUnitPriceSettings) {
|
|
|
- _[item.courseType] = item
|
|
|
- }
|
|
|
- return _
|
|
|
+ organizationCourseUnitPriceSettingsByType: {},
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -131,6 +126,12 @@ export default {
|
|
|
'form.snapClass'() {
|
|
|
this.classChange()
|
|
|
},
|
|
|
+ baseInfo() {
|
|
|
+ this.formatCourse()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.formatCourse()
|
|
|
},
|
|
|
methods: {
|
|
|
addExtraClass() {
|
|
@@ -153,6 +154,19 @@ export default {
|
|
|
this.eclass[index] = null;
|
|
|
this.eclass = this.eclass.filter((item) => !!item);
|
|
|
},
|
|
|
+ formatCourse() {
|
|
|
+ const organId = this.baseInfo?.organId
|
|
|
+ const chargeTypeId = this.baseInfo?.chargeTypeId
|
|
|
+ const _ = {}
|
|
|
+ const list = (this.organizationCourseUnitPriceSettings || [])
|
|
|
+ .filter(item => organId && organId == item.organId && chargeTypeId && chargeTypeId == item.chargeTypeId)
|
|
|
+ for (const item of list) {
|
|
|
+ _[item.courseType] = item
|
|
|
+ }
|
|
|
+ console.log(_)
|
|
|
+ this.organizationCourseUnitPriceSettingsByType = _
|
|
|
+ return _
|
|
|
+ },
|
|
|
async classChange() {
|
|
|
try {
|
|
|
const ids = [this.form.signClass, this.form.mixClass, this.form.highClass, ...this.form.snapClass].filter(item => !!item).join(',')
|