1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018 |
- <!-- -->
- <template>
- <div class="m-core">
- <save-form
- :inline="true"
- save-key="resetPayList"
- @submit="getList"
- :model="searchForm"
- >
- <el-form-item>
- <el-select
- placeholder="缴费类型"
- v-model="searchForm.paymentType"
- clearable
- filterable
- >
- <el-option
- v-for="(item, index) in payOrderTypeList"
- :label="item.label"
- :value="item.value"
- :key="index"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="danger" native-type="submit">搜索</el-button>
- <!-- <el-button @click="onReSet" type="primary">重置</el-button> -->
- </el-form-item>
- </save-form>
- <div class="topWrap">
- <div
- class="newBand"
- @click="newUserPay"
- v-if="teamStatus"
- v-permission="'musicGroupPaymentCalender/add/3895'"
- >
- 新建学员缴费
- </div>
- <!-- <div class="newBand"
- v-if="teamStatus"
- v-permission="'/studentPayBase'"
- @click="setStudentPay">学员缴费设置</div> -->
- <!-- <div class="newBand"
- v-if="!isNewGropu"
- @click="onCreateQRCode">续费二维码</div> -->
- </div>
- <div class="tableWrap">
- <el-table
- style="width: 100%"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- :data="tableList"
- >
- <el-table-column
- align="center"
- prop="batchNo"
- width="200"
- label="缴费批次"
- >
- <template slot-scope="scope">
- <div>
- <copy-text>{{ scope.row.batchNo }}</copy-text>
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="paymentType" label="缴费类型">
- <template slot-scope="scope">
- <div>
- {{ scope.row.paymentType | userPaymentTypeFormat }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="paymentPattern" label="缴费方式">
- <template slot-scope="scope">
- <div>
- {{ scope.row.paymentPattern | teamPayStatus }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="auditStatus"
- label="审核状态"
- width="100px"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.auditStatus | auditType }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="addCourseTotalTime"
- width="150px"
- label="加课总时长"
- >
- </el-table-column>
- <el-table-column
- align="center"
- prop="courseCurrentPrice"
- label="课程费用"
- >
- <template slot-scope="scope">
- <div>
- {{
- (scope.row.paymentType === "SPAN_GROUP_CLASS_ADJUST"
- ? scope.row.courseOriginalPrice
- : scope.row.courseCurrentPrice) | moneyFormat
- }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="courseCurrentPrice"
- label="会员费用"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.memberPaymentAmount | moneyFormat }}
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column align="center"
- prop="status"
- label="缴费状态">
- <template slot-scope="scope">
- <div>
- {{ scope.row.status | payTypeStatus }}
- </div>
- </template>
- </el-table-column> -->
- <!-- <el-table-column align="center"
- prop="operatorName"
- label="责任人">
- </el-table-column> -->
- <el-table-column align="center" prop="memo" width="200px" label="备注">
- <template slot-scope="scope">
- <overflow-text width="200px" :text="scope.row.memo" />
- </template>
- </el-table-column>
- <el-table-column label="操作" fixed="right" min-width="200px">
- <template slot-scope="scope">
- <div>
- <auth auths="musicGroupPaymentCalender/queryPage/4315">
- <!-- v-permission="'musicGroupPaymentCalender/queryPage/4315'" -->
- <el-button type="text" @click="lookList(scope.row)"
- >查看</el-button
- ></auth
- >
- <auth auths="musicGroupPaymentCalenderDetail/batchAdd/3890">
- <el-button
- type="text"
- @click="openChioseStudent(scope.row)"
- v-if="
- scope.row.auditStatus != 'REJECT' &&
- scope.row.auditStatus != 'AUDITING' &&
- scope.row.auditStatus != 'DRAFT' &&
- teamStatus &&
- scope.row.paymentType != 'MUSIC_APPLY' &&
- scope.row.paymentType != 'ADD_STUDENT' &&
- scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
- "
- >添加学员</el-button
- >
- </auth>
- <!-- v-permission="'musicGroupPaymentCalenderDetail/batchAdd/3890'" v-permission="''" -->
- <auth auths="musicGroupPaymentCalender/update/4313">
- <el-button
- type="text"
- v-if="
- teamStatus &&
- (scope.row.auditStatus === 'REJECT' ||
- scope.row.auditStatus === 'DRAFT')
- "
- @click="resetPay(scope.row)"
- >修改</el-button
- >
- </auth>
- <auth auths="musicGroupPaymentCalender/revoke">
- <el-button
- type="text"
- v-if="
- (team_status == 'FEE_AUDIT' || team_status == 'PROGRESS') &&
- scope.row.auditStatus === 'AUDITING' &&
- scope.row.paymentType != 'ADD_STUDENT' &&
- scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
- "
- @click="revoke(scope.row)"
- >撤回</el-button
- >
- </auth>
- <auth auths="musicGroupPaymentCalender/delByBatchNo/4305">
- <el-button
- type="text"
- v-if="
- teamStatus &&
- scope.row.paymentType != 'ADD_STUDENT' &&
- scope.row.paymentType != 'SPAN_GROUP_CLASS_ADJUST'
- "
- @click="removeBatchNo(scope.row)"
- >删除</el-button
- ></auth
- >
- <!-- <el-button type="text"
- v-if="!isNewGropu&&teamStatus&&scope.row.paymentType!='MUSIC_APPLY'"
- @click="onCreateQRCode(scope.row)">续费二维码</el-button> -->
- <!-- <el-button type="text"
- v-if="isNewGropu"
- v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
- @click="onPreview(scope.row)">预览</el-button> -->
- </div>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- save-key="resetPayList"
- sync
- :total.sync="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="getList"
- />
- </div>
- <el-dialog :visible.sync="itemsVisible" title="查看缴费计划" width="1000px">
- <pay-items
- v-if="itemsVisible"
- ref="payItems"
- :batchNo="viewDetail && viewDetail.batchNo"
- payUserType="STUDENT"
- :teamStatus="teamStatus"
- :teamType="teamType"
- :isNewGropu="isNewGropu"
- @lookDetail="lookDetail"
- @onPreview="onPreview"
- @openChioseStudent="openChioseStudent"
- @resetPay="resetPay"
- @close="itemsVisible = false"
- @onCreateQRCode="onCreateQRCode"
- />
- </el-dialog>
- <el-dialog
- :visible.sync="payVisible"
- :close-on-click-modal="false"
- width="500px"
- :title="diTitle"
- >
- <el-form
- :model="payForm"
- :inline="true"
- label-width="120px"
- label-position="right"
- ref="payForm"
- >
- <el-form-item
- label="缴费开始日期"
- :rules="[
- { required: true, message: '请设置缴费开始日期', trigger: 'blur' },
- ]"
- prop="startPaymentDate"
- >
- <el-date-picker
- v-model.trim="payForm.startPaymentDate"
- @change="changeStartTime"
- type="date"
- :picker-options="pickerOptions"
- value-format="yyyy-MM-dd"
- placeholder="开始日期"
- ></el-date-picker>
- </el-form-item>
- <el-form-item
- label="缴费结束日期"
- :rules="[
- { required: true, message: '请设置缴费结束日期', trigger: 'blur' },
- ]"
- prop="deadlinePaymentDate"
- >
- <el-date-picker
- v-model.trim="payForm.deadlinePaymentDate"
- type="date"
- :picker-options="beginDate(payForm.startPaymentDate)"
- value-format="yyyy-MM-dd"
- placeholder="结束日期"
- ></el-date-picker>
- </el-form-item>
- <el-form-item
- label="缴费方式"
- prop="paymentPattern"
- :rules="[{ required: true, message: '请选择缴费方式' }]"
- >
- <el-select
- placeholder="缴费方式"
- style="width: 220px"
- clearable
- filterable
- @change="paymentPatternChange"
- v-model.trim="payForm.paymentPattern"
- >
- <el-option :value="0" label="按月"></el-option>
- <el-option :value="1" label="按季"></el-option>
- <el-option :value="2" label="一次性"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- label="缴费有效期开始"
- :rules="[
- {
- required: true,
- message: '请设置缴费有效期开始日期',
- trigger: 'blur',
- },
- ]"
- prop="paymentValidStartDate"
- >
- <el-date-picker
- v-model.trim="payForm.paymentValidStartDate"
- type="date"
- @change="changePaymentStartTime"
- :picker-options="pickerOptions"
- value-format="yyyy-MM-dd"
- placeholder="有效期开始日期"
- ></el-date-picker>
- </el-form-item>
- <el-form-item
- label="缴费有效期结束"
- :rules="[
- {
- required: true,
- message: '请设置缴费有效期结束日期',
- trigger: 'blur',
- },
- ]"
- prop="paymentValidEndDate"
- >
- <el-date-picker
- v-model.trim="payForm.paymentValidEndDate"
- type="date"
- :picker-options="beginDate(payForm.paymentValidStartDate)"
- value-format="yyyy-MM-dd"
- placeholder="有效期结束日期"
- ></el-date-picker>
- </el-form-item>
- <el-form-item
- label="收费类型"
- v-if="isNew"
- :rules="[
- { required: true, message: '请选择收费类型', trigger: 'blur' },
- ]"
- prop="type"
- >
- <el-select
- v-model.trim="payForm.type"
- style="width: 220px !important"
- placeholder="课程类型"
- >
- <el-option label="线上" value="ONLINE"></el-option>
- <el-option label="线下" value="OFFLINE"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item
- label="备注"
- v-if="isNew"
- :rules="[{ required: true, message: '请填写备注', trigger: 'blur' }]"
- prop="memo"
- >
- <el-input
- type="textarea"
- style="width: 220px !important"
- :rows="4"
- placeholder="请填写备注"
- v-model="payForm.memo"
- ></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="payVisible = false">取 消</el-button>
- <el-button type="primary" v-if="isNew" @click="newPayInfo"
- >确 定</el-button
- >
- <el-button type="primary" v-else @click="resetPayDate">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog
- title="查看"
- :visible.sync="reviewVisible"
- width="900px"
- destroy-on-close
- >
- <reviewDetail
- @close="reviewVisible = false"
- @submited="getList"
- :detail="viewDetail"
- :musicGroupId="$route.query.id"
- destroy-on-close
- />
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="reviewVisible = false"
- >关闭</el-button
- >
- </div>
- </el-dialog>
- <el-dialog :title="payFormTitle" :visible.sync="userVisible" width="830px">
- <userPayForm
- v-if="userVisible"
- @close="userVisible = false"
- @submited="payedSubmited"
- @changeActive="changeActive"
- :organizationCourseUnitPriceSettings="
- organizationCourseUnitPriceSettings
- "
- :rowDetail="activeRow"
- :type="payFormType"
- :baseInfo="baseInfo"
- :paymentType="team_status == 'PRE_BUILD_FEE' ? 0 : undefined"
- :musicGroupId="$route.query.id"
- />
- </el-dialog>
- <!-- 会员缴费 -->
- <el-dialog
- :title="payFormTitle"
- :visible.sync="memberVisible"
- width="830px"
- >
- <memberPayForm
- v-if="memberVisible"
- @close="memberVisible = false"
- @submited="payedSubmited"
- @changeActive="changeActive"
- :organizationCourseUnitPriceSettings="
- organizationCourseUnitPriceSettings
- "
- :rowDetail="activeRow"
- :type="payFormType"
- :baseInfo="baseInfo"
- :paymentType="team_status == 'PRE_BUILD_FEE' ? 0 : undefined"
- :musicGroupId="$route.query.id"
- />
- </el-dialog>
- <el-dialog
- title="学员选择"
- :visible.sync="chioseStudentVisible"
- destroy-on-close
- append-to-body
- width="800px"
- >
- <setStudentFee
- @chioseStudent="chioseStudent"
- ref="setStudentFee"
- v-if="chioseStudentVisible"
- :batchNo="batchNo"
- :musicGroupPaymentCalenderId="musicGroupPaymentCalenderId"
- @submited="chioseStudentSubmited"
- :clearTale="clearStduent"
- ></setStudentFee>
- <div slot="footer" class="dialog-footer">
- <el-button @click="chioseStudentVisible = false">取 消</el-button>
- <el-button type="primary" @click="submitNewPay">确 定</el-button>
- </div>
- </el-dialog>
- <qr-code v-model="qrcodeStatus" title="续费二维码" :codeUrl="codeUrl" />
- <el-dialog
- title="报名声部预览"
- :visible.sync="dialogSubjectVisible"
- width="400px"
- class="subjectPreview"
- >
- <el-tabs v-model="activeName" type="card">
- <el-tab-pane
- :label="subject.subName"
- lazy
- v-for="(subject, index) in dialogSubjectList"
- :key="index"
- :name="subject.subjectId.toString()"
- >
- <subject-preview
- :subjectId="subject.subjectId"
- :calenderId="dialogCalenderId"
- ></subject-preview>
- </el-tab-pane>
- </el-tabs>
- <!-- <div slot="footer">
- <el-button @click="dialogSubjectVisible = false">取 消</el-button>
- </div> -->
- </el-dialog>
- </div>
- </template>
- <script>
- import pagination from "@/components/Pagination/index";
- import dayjs from "dayjs";
- import QrCode from "@/components/QrCode/index";
- import { vaildStudentUrl } from "@/utils/validate";
- import { getTeamBaseInfo } from "@/api/buildTeam";
- import {
- resetMusicGroupPaymentCalender,
- delMusicGroupPaymentCalender,
- findMusicGroupSubjectInfo,
- } from "@/api/buildTeam";
- import { getAuditList } from "@/api/auditManager";
- import { getOrganizationCourseUnitPriceSettings } from "@/api/specialSetting";
- import {
- getMusicGroupStu,
- musicGroupPaymentCalenderDetailBatchAdd,
- musicGroupPaymentCalenderDelByBatchNo,
- revokeMusicGroupPaymentCalender,
- } from "../api";
- import setStudentFee from "./studentPayBase";
- import userPayForm from "../modals/user-pay-form";
- import memberPayForm from "../modals/member-pay-form";
- import payItems from "../modals/pay-items";
- import schoolPayForm from "../modals/school-pay-form";
- import review from "../modals/review";
- import reviewDetail from "../modals/review-detail";
- import subjectPreview from "@/views/resetTeaming/modals/subject-preview";
- import { userPaymentType } from "@/constant";
- import { objectToOptions } from "@/utils";
- import { payOrderTypeList } from "@/utils/searchArray";
- export default {
- props: ["isNewGropu"],
- components: {
- pagination,
- setStudentFee,
- userPayForm,
- memberPayForm,
- schoolPayForm,
- QrCode,
- review,
- reviewDetail,
- "pay-items": payItems,
- subjectPreview,
- },
- data() {
- return {
- musicGroupStu: [],
- payFormType: "user",
- userVisible: false,
- schoolVisible: false,
- itemsVisible: false,
- reviewVisible: false,
- organizationCourseUnitPriceSettings: [],
- searchForm: {
- paymentType: null,
- },
- viewDetail: null,
- tableList: [],
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- isInit: false,
- diTitle: "新增缴费",
- payVisible: false,
- payForm: {
- startPaymentDate: null,
- deadlinePaymentDate: null,
- paymentPattern: null,
- paymentValidStartDate: null,
- paymentValidEndDate: null,
- type: null,
- memo: null,
- },
- isNew: false,
- activeRow: null,
- pickerOptions: {
- firstDayOfWeek: 1,
- disabledDate(time) {
- return time.getTime() + 86400000 <= new Date().getTime();
- },
- },
- qrcodeStatus: false, // 生成二维码
- codeUrl: null,
- chioseStudentVisible: false,
- chioseStudentList: [],
- clearStduent: true,
- batchNo: "",
- musicGroupPaymentCalenderId: "",
- teamType: this.$route.query.type,
- payOrderTypeLists: payOrderTypeList,
- dialogSubjectVisible: false, // 预览声部
- dialogSubjectList: [],
- activeName: null,
- dialogCalenderId: null, // 选择编号
- baseInfo: null,
- memberVisible: false, // 会员缴费
- };
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- async mounted() {
- // 获取分部
- try {
- const res = await getOrganizationCourseUnitPriceSettings({
- rows: 9999,
- });
- this.organizationCourseUnitPriceSettings = res.data.rows;
- } catch (error) {}
- this.init();
- },
- computed: {
- payOrderTypeList() {
- return objectToOptions(userPaymentType);
- },
- payFormTitle() {
- if (this.isNew) {
- return this.payFormType === "user" ? "新增学员缴费" : "新增学校缴费";
- } else {
- return this.payFormType === "user" ? "修改学员缴费" : "修改学校缴费";
- }
- },
- teamStatus() {
- // let type = this.$route.query.type;
- return (
- this.team_status == "PRE_BUILD_FEE" || this.team_status == "PROGRESS"
- );
- },
- team_status() {
- return this.$route.query.team_status;
- },
- },
- // activated () {
- // this.init();
- // },
- methods: {
- async init() {
- // this.team_status = this.$route.query.team_status;
- try {
- const res = await getMusicGroupStu({
- musicGroupId: this.$route.query.id,
- });
- } catch (error) {}
- this.getTeamInfo();
- this.getList();
- },
- getTeamInfo() {
- if (this.$route.query.id) {
- getTeamBaseInfo({ musicGroupId: this.$route.query.id }).then((res) => {
- if (res.code == 200) {
- this.baseInfo = res.data;
- this.$emit("getBaseInfo", this.baseInfo);
- }
- });
- }
- },
- newUserPay() {
- // 判断一下乐团是课程缴费 还是会员缴费 且乐团状态为创建缴费中
- if (
- this.baseInfo?.musicGroup?.courseViewType == 2 &&
- this.team_status == "PRE_BUILD_FEE"
- ) {
- this.payFormType = "user";
- this.isNew = true;
- this.activeRow = null;
- this.memberVisible = true;
- } else {
- this.payFormType = "user";
- this.isNew = true;
- this.activeRow = null;
- this.userVisible = true;
- }
- },
- newSchoolPay() {
- this.payFormType = "school";
- this.isNew = true;
- this.activeRow = null;
- this.userVisible = true;
- },
- getList() {
- let musicGroupId = this.$route.query.id;
- return getAuditList({
- page: this.rules.page,
- rows: this.rules.limit,
- search: musicGroupId,
- payUserType: "STUDENT",
- paymentType: this.searchForm.paymentType,
- }).then((res) => {
- if (res.code == 200) {
- this.rules.total = res.data.total;
- this.tableList = res.data.rows;
- }
- });
- // 请求乐团状态
- },
- paymentPatternChange(val) {
- // if (val === 2) {
- // this.payForm.paymentValidEndDate = null
- // }
- },
- onCreateQRCode(row) {
- // 生成报名二维码
- this.qrcodeStatus = true;
- this.codeUrl =
- vaildStudentUrl() +
- "/#/musicGroupRenew?calenderId=" +
- row.id +
- "&id=" +
- this.$route.query.id;
- },
- chioseStudent(val) {
- this.chioseStudentList = val;
- },
- newPay() {
- this.diTitle = "新增缴费";
- this.isNew = true;
- this.payVisible = true;
- },
- resetPay(row) {
- this.diTitle = "修改缴费";
- if (
- this.baseInfo?.musicGroup?.courseViewType == 2 &&
- row.paymentType == "MUSIC_APPLY"
- ) {
- this.payFormType = row.payUserType === "SCHOOL" ? "school" : "user";
- this.isNew = false;
- this.activeRow = row;
- this.memberVisible = true;
- } else {
- this.isNew = false;
- this.activeRow = row;
- this.payFormType = row.payUserType === "SCHOOL" ? "school" : "user";
- this.userVisible = true;
- }
- // 判断一下 是不是云收费团 且是乐团报名缴费
- },
- async revoke(row) {
- try {
- await this.$confirm("是否撤回此缴费项目的审批?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- });
- const res = await revokeMusicGroupPaymentCalender({
- batchNo: row.batchNo,
- });
- this.$message.success("取消审批成功");
- this.getList();
- this.getTeamInfo();
- } catch {}
- },
- changeActive(val) {
- if (this.$listeners.changeActive) {
- this.$listeners.changeActive(val);
- }
- },
- async chioseStudentSubmited() {
- try {
- await this.$confirm("缴费创建完成, 是否立即排课?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- });
- if (this.$listeners.changeActive) {
- this.$listeners.changeActive({
- name: "5",
- });
- }
- } catch (error) {}
- },
- detelePay(row) {
- let id = row.id;
- this.$confirm(`确定删除该缴费周期?`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- delMusicGroupPaymentCalender({ id }).then((res) => {
- if (res.code == 200) {
- this.$message.success("删除成功");
- this.getList();
- }
- });
- })
- .catch(() => {});
- },
- lookList(row) {
- this.viewDetail = row;
- this.itemsVisible = true;
- },
- lookDetail(row) {
- let query = this.$route.query;
- this.$route.query.paymentId = row.id;
- this.viewDetail = row;
- if (row.payUserType === "SCHOOL") {
- this.reviewVisible = true;
- } else {
- this.$router.push({ path: "/business/strudentPayInfo", query });
- // this.$router.push({ path: "/teamPayInfo/strudentPayInfo", query });
- }
- },
- // setStudentPay () {
- // let query = this.$route.query;
- // this.$router.push({ path: "/business/studentPayBase", query });
- // },
- async removeBatchNo(row) {
- try {
- await this.$confirm("是否确认删除该缴费批次?", "提示", {
- type: "warning",
- });
- await musicGroupPaymentCalenderDelByBatchNo({ batchNo: row.batchNo });
- this.$message.success("删除成功");
- this.getList();
- } catch (error) {}
- },
- newPayInfo() {
- this.$refs["payForm"].validate((res) => {
- if (res) {
- /**
- * payForm: {
- startPaymentDate: null,
- deadlinePaymentDate: null,
- type: null,
- memo: null
- },
- *
- */
- this.chioseStudentVisible = true;
- return;
- }
- });
- },
- submitNewPay() {
- if (this.chioseStudentList.length < 1) {
- this.$message.error("请至少选择一名学员");
- return;
- }
- let obj = {};
- obj.userIdList = this.chioseStudentList.map((stu) => {
- return stu.userId;
- });
- obj.batchNo = this.batchNo;
- musicGroupPaymentCalenderDetailBatchAdd(obj).then((res) => {
- if (res.code == 200) {
- this.$message.success("添加成功");
- this.$refs.setStudentFee.clearTable();
- this.payVisible = false;
- this.chioseStudentVisible = false;
- // this.$refs.payItems?.getList()
- this.getList();
- }
- });
- },
- resetPayDate() {
- resetMusicGroupPaymentCalender({
- id: this.activeRow.id,
- startPaymentDate: this.payForm.startPaymentDate,
- deadlinePaymentDate: this.payForm.deadlinePaymentDate,
- paymentValidStartDate: this.payForm.paymentValidStartDate
- ? dayjs(this.payForm.paymentValidStartDate).format("YYYY-MM-DD")
- : this.payForm.paymentValidStartDate,
- paymentValidEndDate: this.payForm.paymentValidEndDate
- ? dayjs(this.payForm.paymentValidEndDate).format("YYYY-MM-DD")
- : this.payForm.paymentValidEndDate,
- paymentPattern: this.payForm.paymentPattern,
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success("修改成功");
- this.payVisible = false;
- this.getTeamInfo();
- this.getList();
- }
- });
- },
- changeStartTime(val) {
- this.payForm.deadlinePaymentDate = this.dateAddDays(val, 3);
- },
- changePaymentStartTime(val) {
- this.payForm.paymentValidEndDate = null;
- },
- dateAddDays(dataStr, dayCount) {
- let strdate = dataStr; //日期字符串
- let isdate = new Date(strdate.replace(/-/g, "/")); //把日期字符串转换成日期格式
- isdate = new Date((isdate / 1000 + 86400 * dayCount) * 1000); //日期加1天
- let pdate =
- isdate.getFullYear() +
- "-" +
- (isdate.getMonth() + 1) +
- "-" +
- isdate.getDate(); //把日期格式转换成字符串
- return pdate;
- },
- beginDate(end) {
- return {
- firstDayOfWeek: 1,
- disabledDate(time) {
- if (end) {
- return new Date(end).getTime() - 86400000 >= time.getTime();
- } else {
- return time.getTime() + 86400000 < Date.now();
- //开始时间不选时,结束时间最大值小于等于当天
- }
- },
- };
- },
- search() {
- this.rules.page = 1;
- this.getList();
- },
- onReSet() {
- this.searchForm = { payUserType: null };
- },
- openChioseStudent(row) {
- this.chioseStudentVisible = true;
- this.batchNo = row.batchNo;
- this.musicGroupPaymentCalenderId = row.id;
- },
- async payedSubmited(data) {
- try {
- await this.getList();
- this.getTeamInfo();
- // if (!this.isNewGropu) {
- // this.chioseStudentVisible = true;
- // if (data) {
- // this.musicGroupPaymentCalenderId = data.musicGroupPaymentCalenderId;
- // }
- // }
- } catch (error) {}
- },
- async onPreview(row) {
- // 开始预览
- this.dialogCalenderId = row.id;
- const musicGroupId = this.$route.query.id;
- await findMusicGroupSubjectInfo({ musicGroupId: musicGroupId }).then(
- (res) => {
- if (res.code == 200) {
- this.dialogSubjectList = res.data.musicGroupSubjectPlans;
- // 默认预览第一个
- this.activeName = this.dialogSubjectList[0].subjectId.toString();
- this.dialogSubjectVisible = true;
- } else {
- this.$message.warning("没有可预览的声部");
- }
- }
- );
- },
- },
- watch: {
- chioseStudentVisible() {
- this.chioseStudentList = [];
- },
- payVisible(val) {
- if (!val) {
- this.payForm = {
- startPaymentDate: null,
- paymentPattern: null,
- paymentValidStartDate: null,
- paymentValidEndDate: null,
- type: null,
- memo: null,
- deadlinePaymentDate: null,
- };
- this.$refs["payForm"].resetFields();
- }
- },
- },
- };
- </script>
- <style lang='scss' scoped>
- .topWrap {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- div {
- margin-right: 10px;
- }
- }
- .left-code,
- .right-code {
- // width: 50%;
- // float: left;
- h2 {
- font-size: 18px;
- text-align: center;
- padding-bottom: 8px;
- }
- .qrcode {
- display: flex;
- flex-direction: column;
- align-items: center;
- img {
- width: 200px;
- height: 200px;
- margin: 0 auto;
- }
- }
- .code-url {
- font-size: 18px;
- text-align: center;
- padding: 15px 15px 0 15px;
- }
- }
- .previewContainer {
- /deep/.el-dialog__body {
- padding: 0;
- }
- }
- .subjectPreview {
- /deep/.el-dialog__body {
- padding: 30px 0 0;
- }
- }
- </style>
|