|
@@ -1,155 +0,0 @@
|
|
-
|
|
|
|
-<template>
|
|
|
|
- <div>
|
|
|
|
- <!-- v-if="Object.keys(payItem).length > 0" -->
|
|
|
|
- <paymentCycle
|
|
|
|
- ref="cycle"
|
|
|
|
- :form="cycle"
|
|
|
|
- :isUserType="true"
|
|
|
|
- :isCommon="true"
|
|
|
|
- :isDisabled="true"
|
|
|
|
- :hideMoney="true"
|
|
|
|
- />
|
|
|
|
- <!-- v-if="Object.keys(payItem).length > 0" -->
|
|
|
|
- <otherform :form="other" ref="other" />
|
|
|
|
- <el-table
|
|
|
|
- :data="mergeInfo[index]"
|
|
|
|
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
|
- max-height="300px"
|
|
|
|
- height="300px"
|
|
|
|
- >
|
|
|
|
- <el-table-column
|
|
|
|
- prop="userId"
|
|
|
|
- align="center"
|
|
|
|
- width="120"
|
|
|
|
- label="学员编号"
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="username"
|
|
|
|
- align="center"
|
|
|
|
- width="120"
|
|
|
|
- label="学员姓名"
|
|
|
|
- ></el-table-column>
|
|
|
|
- <el-table-column prop="phone" align="center" width="120" label="课程类型">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div>
|
|
|
|
- {{ scope.row.courseType | coursesType }}
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="subjectNames" align="center" label="原价">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div>
|
|
|
|
- <el-input v-model="scope.row.courseOriginalPrice"></el-input>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" label="现价">
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <div>
|
|
|
|
- <el-input v-model="scope.row.courseCurrentPrice"></el-input>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
-</template>
|
|
|
|
-<script>
|
|
|
|
-import paymentCycle from "@/views/resetTeaming/modals/payment-cycle";
|
|
|
|
-import otherform from "@/views/resetTeaming/modals/other";
|
|
|
|
-import { getTimes } from "@/utils";
|
|
|
|
-export default {
|
|
|
|
- components: { paymentCycle, otherform },
|
|
|
|
- props: ["mergeInfo", "index","classList",'classGroupStudents'],
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- payItem: {},
|
|
|
|
- cycle: {
|
|
|
|
- paymentAmount: null,
|
|
|
|
- paymentPattern: null,
|
|
|
|
- },
|
|
|
|
- other: {},
|
|
|
|
- musicGroupId:''
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- mounted() {
|
|
|
|
- console.log(this.classList)
|
|
|
|
- this.classList.forEach((classes) => {
|
|
|
|
- if (classes.id == this.index) {
|
|
|
|
- this.musicGroupId = classes.musicGroupId
|
|
|
|
- console.log(this.musicGroupId)
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- getForms() {
|
|
|
|
- const { $refs: refs } = this;
|
|
|
|
- // [refs.base, refs.eclass, refs.cycle, ...(refs.cycles || []), refs.other, refs.payment]
|
|
|
|
- return [refs.cycle, refs.other]
|
|
|
|
- .filter((item) => !!item)
|
|
|
|
- .map((item) => item.$refs.form || item);
|
|
|
|
- },
|
|
|
|
- getData() {
|
|
|
|
- const forms = this.getForms();
|
|
|
|
- const valided = [];
|
|
|
|
- for (const form of forms) {
|
|
|
|
- form.validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- valided.push(form);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- // if (this.eclass.length < 1) {
|
|
|
|
- // return this.$message.error("请至少选择一条加课信息");
|
|
|
|
- // }
|
|
|
|
- console.log(valided.length, forms.length);
|
|
|
|
- if (valided.length === forms.length) {
|
|
|
|
- const { leixing, ...rest } = {
|
|
|
|
- ...this.form,
|
|
|
|
- ...this.other,
|
|
|
|
- musicGroupPaymentCalenderCourseSettingsList: this.corusePayList,
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- if (this.$refs.cycle) {
|
|
|
|
- const {
|
|
|
|
- paymentDate,
|
|
|
|
- paymentValid,
|
|
|
|
- paymentPattern,
|
|
|
|
- ...other
|
|
|
|
- } = this.cycle;
|
|
|
|
- rest.paymentPattern = paymentPattern;
|
|
|
|
- rest.payUserType = "STUDENT";
|
|
|
|
- rest.paymentType = "SPAN_GROUP_CLASS_ADJUST";
|
|
|
|
- rest.musicGroupPaymentCalenderStudentDetails =this.mergeInfo[this.index]
|
|
|
|
- rest.studentIds = classGroupStudents[this.index]
|
|
|
|
- rest.musicGroupPaymentDateRangeList = [
|
|
|
|
- {
|
|
|
|
- ...other,
|
|
|
|
- ...getTimes(paymentDate, [
|
|
|
|
- "startPaymentDate",
|
|
|
|
- "deadlinePaymentDate",
|
|
|
|
- ]),
|
|
|
|
- ...getTimes(paymentValid, [
|
|
|
|
- "paymentValidStartDate",
|
|
|
|
- "paymentValidEndDate",
|
|
|
|
- ]),
|
|
|
|
- },
|
|
|
|
- ];
|
|
|
|
- }
|
|
|
|
- const data = {
|
|
|
|
- ...rest,
|
|
|
|
- musicGroupId: this.musicGroupId,
|
|
|
|
- };
|
|
|
|
- return data;
|
|
|
|
-
|
|
|
|
- // 说明验证通过
|
|
|
|
- } else {
|
|
|
|
- this.$message.error("请填写必要信息");
|
|
|
|
- return "error";
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-};
|
|
|
|
-</script>
|
|
|
|
-<style lang="scss" scoped>
|
|
|
|
-</style>
|
|
|