|
@@ -74,58 +74,63 @@
|
|
<el-alert title="缴费设置" :closable="false" class="alert" type="info">
|
|
<el-alert title="缴费设置" :closable="false" class="alert" type="info">
|
|
</el-alert>
|
|
</el-alert>
|
|
<el-form ref="payment" :model="payment">
|
|
<el-form ref="payment" :model="payment">
|
|
- <el-form-item
|
|
|
|
- label="缴费方式"
|
|
|
|
- prop="paymentPattern"
|
|
|
|
- :rules="[{required: true, message: '请选择缴费方式', trigger: 'change'}]"
|
|
|
|
- >
|
|
|
|
- <el-select style="width: 100%!important;" v-model="payment.paymentPattern" placeholder="请选择缴费方式">
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in paymentPatternTypeOptions"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value">
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <el-collapse :value="collapse" @change="collapseChange" >
|
|
|
|
- <el-collapse-item
|
|
|
|
- v-for="(item, index) in cycles"
|
|
|
|
- :key="index"
|
|
|
|
- :name="index"
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="缴费方式"
|
|
|
|
+ prop="paymentPattern"
|
|
|
|
+ label-width="160px"
|
|
|
|
+ :rules="[{required: true, message: '请选择缴费方式', trigger: 'change'}]"
|
|
>
|
|
>
|
|
- <template slot="title">
|
|
|
|
- <div class="collapse-title">
|
|
|
|
- <span>缴费周期 {{index + 1}}</span>
|
|
|
|
- <i v-if="cycles.length > 1" class="el-icon-circle-close" @click.stop="removeCycle(index)"></i>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- <paymentCycle
|
|
|
|
- ref="cycles"
|
|
|
|
- :form="item"
|
|
|
|
- :hidePaymentPattern="true"
|
|
|
|
- :isUserType="true"
|
|
|
|
- :isCommon="false"
|
|
|
|
- :isDisabled="true"
|
|
|
|
- />
|
|
|
|
- </el-collapse-item>
|
|
|
|
- </el-collapse>
|
|
|
|
- <el-button
|
|
|
|
- icon="el-icon-circle-plus-outline"
|
|
|
|
- plain
|
|
|
|
- type="info"
|
|
|
|
- size="small"
|
|
|
|
- style="width: 100%;margin: 20px 0;"
|
|
|
|
- @click="addCycle"
|
|
|
|
- >新增缴费周期</el-button>
|
|
|
|
- <!-- <paymentCycle
|
|
|
|
|
|
+ <el-select style="width: 100%!important;" v-model="payment.paymentPattern" placeholder="请选择缴费方式">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in paymentPatternTypeOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <template v-if="payment.paymentPattern == 0">
|
|
|
|
+ <el-collapse :value="collapse" @change="collapseChange" >
|
|
|
|
+ <el-collapse-item
|
|
|
|
+ v-for="(item, index) in cycles"
|
|
|
|
+ :key="index"
|
|
|
|
+ :name="index"
|
|
|
|
+ >
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <div class="collapse-title">
|
|
|
|
+ <span>缴费周期 {{index + 1}}</span>
|
|
|
|
+ <i v-if="cycles.length > 1" class="el-icon-circle-close" @click.stop="removeCycle(index)"></i>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <paymentCycle
|
|
|
|
+ ref="cycles"
|
|
|
|
+ :form="item"
|
|
|
|
+ :hidePaymentPattern="true"
|
|
|
|
+ :isUserType="true"
|
|
|
|
+ :isCommon="false"
|
|
|
|
+ :isDisabled="true"
|
|
|
|
+ />
|
|
|
|
+ </el-collapse-item>
|
|
|
|
+ </el-collapse>
|
|
|
|
+ <el-button
|
|
|
|
+ icon="el-icon-circle-plus-outline"
|
|
|
|
+ plain
|
|
|
|
+ type="info"
|
|
|
|
+ size="small"
|
|
|
|
+ style="width: 100%;margin: 20px 0;"
|
|
|
|
+ @click="addCycle"
|
|
|
|
+ >新增缴费周期</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ <paymentCycle
|
|
|
|
+ v-else
|
|
ref="cycle"
|
|
ref="cycle"
|
|
:isUserType="true"
|
|
:isUserType="true"
|
|
|
|
+ :hidePaymentPattern="true"
|
|
:form.sync="cycle"
|
|
:form.sync="cycle"
|
|
:isCommon="false"
|
|
:isCommon="false"
|
|
:isDisabled="true"
|
|
:isDisabled="true"
|
|
- /> -->
|
|
|
|
|
|
+ />
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="$listeners.close">取 消</el-button>
|
|
<el-button @click="$listeners.close">取 消</el-button>
|
|
<el-button type="primary" @click="submit">确认</el-button>
|
|
<el-button type="primary" @click="submit">确认</el-button>
|
|
@@ -180,6 +185,9 @@ export default {
|
|
'form.snapClass'() {
|
|
'form.snapClass'() {
|
|
this.classChange()
|
|
this.classChange()
|
|
},
|
|
},
|
|
|
|
+ 'payment.paymentPattern'() {
|
|
|
|
+ this.syncAllMoney()
|
|
|
|
+ },
|
|
baseInfo() {
|
|
baseInfo() {
|
|
this.formatCourse()
|
|
this.formatCourse()
|
|
}
|
|
}
|
|
@@ -216,6 +224,9 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if (this.$refs.cycle) {
|
|
|
|
+ this.$set(this.cycle, 'paymentAmount', money)
|
|
|
|
+ }
|
|
|
|
|
|
return money;
|
|
return money;
|
|
},
|
|
},
|
|
@@ -262,7 +273,7 @@ export default {
|
|
},
|
|
},
|
|
getForms() {
|
|
getForms() {
|
|
const { $refs: refs } = this;
|
|
const { $refs: refs } = this;
|
|
- return [refs.eclass, refs.cycle, refs.payment, ...refs.cycles]
|
|
|
|
|
|
+ return [refs.eclass, refs.cycle, refs.payment, ...(refs.cycles || [])]
|
|
.filter((item) => !!item)
|
|
.filter((item) => !!item)
|
|
.map((item) => item.$refs.form || item);
|
|
.map((item) => item.$refs.form || item);
|
|
},
|
|
},
|
|
@@ -294,9 +305,10 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
if (forms.length === valided.length) {
|
|
if (forms.length === valided.length) {
|
|
|
|
+ const cyclelist = this.payment.paymentPattern == 0 ? this.cycles : [this.cycle]
|
|
const data = {
|
|
const data = {
|
|
attribute1: this.ids,
|
|
attribute1: this.ids,
|
|
- musicGroupPaymentDateRangeList: [...this.cycles.map(item => {
|
|
|
|
|
|
+ musicGroupPaymentDateRangeList: cyclelist.map(item => {
|
|
const { paymentDate, paymentValid, ...other } = item
|
|
const { paymentDate, paymentValid, ...other } = item
|
|
return {
|
|
return {
|
|
...other,
|
|
...other,
|
|
@@ -307,7 +319,8 @@ export default {
|
|
]),
|
|
]),
|
|
paymentPattern: this.payment.paymentPattern,
|
|
paymentPattern: this.payment.paymentPattern,
|
|
}
|
|
}
|
|
- })],
|
|
|
|
|
|
+ }),
|
|
|
|
+ paymentPattern: this.payment.paymentPattern,
|
|
musicGroupId: this.musicGroupId,
|
|
musicGroupId: this.musicGroupId,
|
|
paymentType: 'ADD_STUDENT',
|
|
paymentType: 'ADD_STUDENT',
|
|
studentIds: this.createdUserId,
|
|
studentIds: this.createdUserId,
|