1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084 |
- <!-- -->
- <template>
- <div class="m-container">
- <el-page-header @back="goBack" content="学员缴费记录"> </el-page-header>
- <!-- this.info = {
- paymentStatus: res.data.calender.paymentStatus,
- startPaymentDate: res.data.calender.startPaymentDate,
- deadlinePaymentDate: res.data.calender.deadlinePaymentDate,
- expectNum: res.data.calender.expectNum,
- actualNum: res.data.calender.actualNum,
- sumActualAmount: res.data.sumActualAmount
- } -->
- <statistic :span="4" :col="5">
- <statistic-item>
- <span>状态</span>
- <span>
- <p
- class="status"
- style="color: #ff6a6a"
- v-if="info.paymentStatus == 'OPEN'"
- >
- {{ "已开启" }}
- </p>
- <p
- class="status"
- style="color: #ff6a6a"
- v-if="info.paymentStatus == 'NO'"
- >
- {{ "未开始" }}
- </p>
- <p
- class="status"
- style="color: #5ccdb8"
- v-if="info.paymentStatus == 'OVER'"
- >
- {{ "已结束" }}
- </p>
- </span>
- </statistic-item>
- <statistic-item>
- <span>预计缴费日期</span>
- <span style="font-size: 16px"
- >{{ info.startPaymentDate | formatTimer }} ~
- {{ info.deadlinePaymentDate | formatTimer }}</span
- >
- </statistic-item>
- <statistic-item>
- <span>预计缴费人数</span>
- <span>{{ info.expectNum ? info.expectNum : 0 }}</span>
- </statistic-item>
- <statistic-item>
- <span>实际缴费人数</span>
- <span>{{ info.actualNum ? info.actualNum : 0 }}</span>
- </statistic-item>
- <statistic-item>
- <span>收款金额</span>
- <span>{{ info.sumActualAmount ? info.sumActualAmount : 0 }}</span>
- </statistic-item>
- </statistic>
- <!-- <div class="infoMsg">
- <div class="left">
- <p class="title">状态</p>
- <p class="status"
- style="color: #ff6a6a"
- v-if="info.paymentStatus == 'OPEN'">
- {{ "已开启" }}
- </p>
- <p class="status"
- style="color: #ff6a6a"
- v-if="info.paymentStatus == 'NO'">
- {{ "未开始" }}
- </p>
- <p class="status"
- style="color: #5ccdb8"
- v-if="info.paymentStatus == 'OVER'">
- {{ "已结束" }}
- </p>
- </div>
- <div class="right">
- <div class="expectBox first">
- <p class="title">预计缴费日期</p>
- <p class="status">
- {{ info.startPaymentDate | formatTimer }}~{{
- info.deadlinePaymentDate | formatTimer
- }}
- </p>
- </div>
- <div class="expectBox">
- <p class="title">预计缴费人数</p>
- <p class="status">{{ info.expectNum ? info.expectNum : 0 }}</p>
- </div>
- <div class="expectBox">
- <p class="title">实际缴费人数</p>
- <p class="status">{{ info.actualNum ? info.actualNum : 0 }}</p>
- </div>
- <div class="expectBox">
- <p class="title">收款金额</p>
- <p class="status">
- {{ info.sumActualAmount ? info.sumActualAmount : 0 }}
- </p>
- </div>
- </div>
- </div> -->
- <div class="m-core">
- <save-form
- save-key="strudent-pay-info"
- :inline="true"
- :model.sync="searchForm"
- @submit="search"
- @reset="onReSet"
- >
- <el-form-item>
- <el-input
- v-model.trim="searchForm.search"
- @keyup.enter.native="search"
- placeholder="学员编号,手机号"
- ></el-input>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.subjectId"
- style="width: 180px"
- clearable
- filterable
- placeholder="请选择声部"
- >
- <el-option
- v-for="(item, index) in soundList"
- :key="index"
- :label="item.name"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.paymentStatus"
- style="width: 180px"
- clearable
- filterable
- placeholder="请选择状态"
- >
- <el-option label="未缴费" value="NON_PAYMENT"></el-option>
- <el-option label="缴费中" value="PROCESSING"></el-option>
- <el-option label="已缴费" value="PAID_COMPLETED"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-select
- v-model.trim="searchForm.musicGroupStatus"
- style="width: 180px"
- clearable
- filterable
- placeholder="请选择学员状态"
- >
- <el-option label="在读" value="NORMAL"></el-option>
- <el-option label="退团" value="QUIT"></el-option>
- <el-option label="休学" value="QUIT_SCHOOL"></el-option>
- <el-option label="报名" value="APPLY"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button native-type="suubmit" type="danger">搜索</el-button>
- <el-button native-type="reset" type="primary">重置</el-button>
- </el-form-item>
- </save-form>
- <!-- NO: '未开启缴费',
- OPEN: '开启缴费',
- OVER: '缴费已结束', -->
- <div class="wrap">
- <div class="newBand" @click="detailVisible = true">缴费详情</div>
- <!-- <div
- class="newBand"
- @click="resetPay"
- v-permission="'musicGroupPaymentCalenderDetail/updateExpectAmount'"
- >
- 修改缴费金额
- </div> -->
- <div
- class="newBand"
- @click="startPay"
- v-if="info.paymentStatus != 'OPEN'"
- v-permission="'musicGroupPaymentCalenderDetail/openPayment'"
- >
- 开启缴费
- </div>
- <div
- class="newBand"
- @click="payRemind"
- v-permission="'musicGroupPaymentCalenderDetail/sendWaitRenewMessage'"
- >
- 缴费提醒
- </div>
- <!-- <div
- class="newBand"
- @click="addStudentBtn"
- v-if="info.paymentStatus != 'OVER'"
- v-permission="'musicGroupPaymentCalenderDetail/add'"
- >
- 新增学员
- </div> -->
- <div
- class="newBand"
- @click="delStudentBtn"
- v-if="titleForm.paymentType != 'SPAN_GROUP_CLASS_ADJUST'"
- v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
- >
- 删除学员
- </div>
- <div
- class="newBand"
- v-permission="'export/musicGroupPaymentCalenderDetail'"
- @click="onMusicGroupPaymentCalenderDetail"
- >
- 缴费记录导出
- </div>
- </div>
- <div class="tableWrap">
- <el-table
- style="width: 100%"
- :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
- :data="tableList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- :selectable="checkSelect"
- width="55"
- >
- </el-table-column>
- <el-table-column type="expand">
- <template slot-scope="props">
- <el-form label-position="left" inline class="demo-table-expand">
- <el-form-item label="乐团课金额">
- <span>{{ props.row.courseAmount | moneyFormat}}元</span>
- </el-form-item>
- <el-form-item label="团练宝金额">
- <span>{{ props.row.cloudAmount | moneyFormat}}元</span>
- </el-form-item>
- <el-form-item label="乐保金额">
- <span>{{ props.row.maintenanceAmount | moneyFormat}}元</span>
- </el-form-item>
- <el-form-item label="乐团活动金额">
- <span>{{ props.row.activityAmount | moneyFormat}}元</span>
- </el-form-item>
- <el-form-item label="乐器金额">
- <span>{{ props.row.musicalAmount | moneyFormat}}元</span>
- </el-form-item>
- <el-form-item label="辅件金额">
- <span>{{ props.row.accessoriesAmount | moneyFormat}}元</span>
- </el-form-item>
- </el-form>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="userId"
- label="学员编号"
- ></el-table-column>
- <el-table-column align="center" prop="studentId" label="学员姓名">
- <template slot-scope="scope">
- <div v-if="scope.row.sysUser">
- {{ scope.row.sysUser.username }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="学员声部">
- <template slot-scope="scope">
- <div v-if="scope.row.studentRegistration">
- {{ scope.row.studentRegistration.subjectName }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="学员状态">
- <template slot-scope="scope">
- <div v-if="scope.row.studentRegistration">
- {{
- scope.row.studentRegistration.musicGroupStatus
- | studentTeamStatus
- }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="studentId" label="手机号">
- <template slot-scope="scope">
- <div v-if="scope.row.sysUser">
- {{ scope.row.sysUser.phone }}
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column align="center" prop="expectAmount" label="课程金额">
- <template slot-scope="scope">
- <div>
- {{ scope.row.expectAmount | moneyFormat }}
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop="expectMemberAmount"
- label="会员金额"
- >
- <template slot-scope="scope">
- <div>
- {{ scope.row.expectMemberAmount | moneyFormat }}
- </div>
- </template>
- </el-table-column> -->
- <el-table-column align="center" label="缴费开始日期">
- <template slot-scope="scope">
- <div>
- {{ scope.row.startPaymentDate | formatTimer }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="缴费截止日期">
- <template slot-scope="scope">
- <div>
- {{ scope.row.deadlinePaymentDateMgpc | formatTimer }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="是否开启缴费">
- <template slot-scope="scope">
- <div>
- {{ scope.row.open ? "是" : "否" }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" label="缴费状态">
- <template slot-scope="scope">
- <div>
- {{ scope.row.paymentStatus | paymentStatusDetall }}
- </div>
- </template>
- </el-table-column>
- <el-table-column align="center" prop="studentId" label="支付时间">
- <template slot-scope="scope">
- <div>
- {{ scope.row.payTime | dateForMinFormat }}
- </div>
- </template>
- </el-table-column>
- <!-- <el-table-column align="center"
- width="200px"
- label="操作">
- <template slot-scope="scope">
- <div>
- <el-button type="text"
- :disabled="!checkSelect(scope.row)"
- @click="resetPay(scope.row)">修改金额</el-button>
- <el-button type="text"
- :disabled="!checkSelect(scope.row)"
- @click="startPay(scope.row)">开启缴费</el-button>
- </div>
- </template>
- </el-table-column> -->
- </el-table>
- <pagination
- sync
- saveKey="strudent-pay-info"
- :total.sync="rules.total"
- :page.sync="rules.page"
- :limit.sync="rules.limit"
- :page-sizes="rules.page_size"
- @pagination="getList"
- />
- </div>
- </div>
- <!-- <el-dialog :visible.sync="payVisible"
- width="500px"
- title="修改缴费时间">
- <el-form :model="payForm"
- ref='payForm'>
- <el-form-item label="缴费开始日期"
- :rules="[{ required: true, message: '请设置缴费开始日期',trigger: 'blur'}]"
- prop="startDate">
- <el-date-picker v-model.trim="payForm.startDate"
- type="date"
- :picker-options="pickerOptions"
- value-format="yyyy-MM-dd"
- placeholder="开始日期"></el-date-picker>
- </el-form-item>
- </el-form>
- <div slot="footer"
- class="dialog-footer">
- <el-button @click="payVisible = false">取 消</el-button>
- <el-button type="primary"
- @click="">确 定</el-button>
- </div>
- </el-dialog> -->
- <!-- <el-dialog
- :visible.sync="resetPayVisible"
- width="500px"
- title="修改缴费金额"
- >
- <el-form
- :model="resetPayForm"
- :inline="true"
- label-width="120px"
- label-position="right"
- ref="resetPayForm"
- @submit.native.prevent
- >
- <el-form-item
- v-if="
- msgList.length > 0 ||
- titleForm.paymentType == 'SPAN_GROUP_CLASS_ADJUST'
- "
- label="预计课程金额"
- :rules="[
- { required: true, message: '请输入预计缴费金额', trigger: 'blur' },
- {
- pattern:
- /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
- message: '请输入正确的金额',
- trigger: 'blur',
- },
- ]"
- prop="momey"
- >
- <el-input v-model="resetPayForm.momey"></el-input>
- </el-form-item>
- <el-form-item
- v-if="memberRankSettingId"
- label="预计会员金额"
- :rules="[
- { required: true, message: '请输入预计会员金额', trigger: 'blur' },
- {
- pattern:
- /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
- message: '请输入正确的金额',
- trigger: 'blur',
- },
- ]"
- prop="expectMemberAmount"
- >
- <el-input v-model="resetPayForm.expectMemberAmount"></el-input>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="resetPayVisible = false">取 消</el-button>
- <el-button type="primary" @click="submitReset">确 定</el-button>
- </div>
- </el-dialog> -->
- <el-dialog :visible.sync="studentVisible" title="学生列表" width="600">
- <el-table
- :data="studentList"
- class="studenTable"
- ref="singleTable"
- highlight-current-row
- @current-change="handleCurrentChange"
- >
- <!-- <el-table-column type="selection"
- width="55">
- </el-table-column> -->
- <el-table-column
- property="userId"
- align="center"
- label="学员编号"
- ></el-table-column>
- <el-table-column
- property="name"
- align="center"
- label="学员姓名"
- ></el-table-column>
- <el-table-column
- property="phone"
- align="center"
- label="手机号"
- ></el-table-column>
- </el-table>
- <div slot="footer" class="dialog-footer">
- <el-button @click="cancleAdd">取 消</el-button>
- <el-button type="primary" @click="submitAddStudent">确 定</el-button>
- </div>
- </el-dialog>
- <el-dialog width="900px" title="查看缴费详情" :visible.sync="detailVisible">
- <reviewDetail
- @close="detailVisible = false"
- @submited="getList"
- :detail="{ id: $route.query.paymentId }"
- :musicGroupId="$route.query.id"
- destroy-on-close
- />
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="detailVisible = false"
- >关闭</el-button
- >
- </div>
- </el-dialog>
- <el-dialog width="400px" title="缴费时间" :visible.sync="timerVisible">
- <el-form :model="timerForm" ref="timerForm">
- <el-form-item
- label="缴费开始时间"
- :rules="[{ required: true, message: '请选择缴费开始时间' }]"
- prop="startPaymentDate"
- >
- <el-date-picker
- :picker-options="pickerOptions"
- v-model="timerForm.startPaymentDate"
- type="date"
- placeholder="选择日期"
- @change="changeStartTime"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item
- label="缴费结束时间"
- :rules="[{ required: true, message: '请选择缴费结束时间' }]"
- prop="deadlinePaymentDate"
- >
- <el-date-picker
- :picker-options="payendTimer"
- v-model="timerForm.deadlinePaymentDate"
- type="date"
- placeholder="选择日期"
- value-format="yyyy-MM-dd"
- >
- </el-date-picker>
- </el-form-item>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="timerVisible = false">取 消</el-button>
- <el-button @click="submitPayTimer" type="primary">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import axios from "axios";
- import { getToken, getTenantId } from "@/utils/auth";
- import pagination from "@/components/Pagination/index";
- import load from "@/utils/loading";
- import cleanDeep from "clean-deep";
- import qs from "qs";
- import { courseType } from "@/utils/searchArray";
- import reviewDetail from "../modals/review-detail";
- import {
- findSound,
- getmusicGroupPaymentCalenderDetail,
- openMusicGroupPaymentCalenderDetailPayment,
- resetMusicGroupPaymentCalenderDetail,
- getMusicGroupPaymentCalenderDetail,
- queryCanAddStudent,
- addMusicGroupPaymentCalenderStudent,
- delMusicGroupPaymentCalenderStudent,
- sendWaitRenewMessage,
- } from "@/api/buildTeam";
- let that;
- export default {
- components: { pagination, reviewDetail },
- data() {
- return {
- searchForm: {
- search: null,
- subjectId: null,
- paymentStatus: null,
- musicGroupStatus: null,
- },
- teacherList: [],
- soundList: [],
- tableList: [{ studentId: 111 }],
- rules: {
- // 分页规则
- limit: 10, // 限制显示条数
- page: 1, // 当前页
- total: 0, // 总条数
- page_size: [10, 20, 40, 50], // 选择限制显示条数
- },
- payVisible: false,
- resetPayVisible: false,
- studentVisible: false,
- chioseStudent: null,
- studentList: [],
- pickerOptions: {
- firstDayOfWeek: 1,
- disabledDate(time) {
- return time.getTime() + 86400000 <= new Date().getTime();
- },
- },
- payForm: {
- startDate: null,
- },
- resetPayForm: {
- momey: null,
- expectMemberAmount: null,
- },
- activeChiose: [],
- id: null,
- ids: null,
- info: {
- paymentStatus: null,
- startPaymentDate: null,
- deadlinePaymentDate: null,
- expectNum: null,
- actualNum: null,
- sumActualAmount: null,
- },
- msgList: [],
- memberRankSettingId: null,
- detailVisible: false,
- titleForm: {
- paymentType: "",
- musicGroupOrganizationCourseSettingId: "",
- paymentValidStartDate: "",
- paymentValidEndDate: "",
- calenderSettingsName: "",
- memberPaymentAmount: "",
- memberRankSettingName: "",
- originalMemberPaymentAmount: "",
- memberValidDate: "",
- },
- timerVisible: false,
- timerForm: {
- startPaymentDate: "",
- deadlinePaymentDate: "",
- },
- };
- },
- //生命周期 - 创建完成(可以访问当前this实例)
- created() {},
- //生命周期 - 挂载完成(可以访问DOM元素)
- mounted() {
- // 获取声部
- that = this;
- this.teamid = this.$route.query.id;
- findSound({ musicGroupId: this.teamid }).then((res) => {
- if (res.code == 200) {
- this.soundList = res.data;
- }
- });
- // 获取分部
- this.init();
- },
- activated() {
- this.teamid = this.$route.query.id;
- findSound({ musicGroupId: this.teamid }).then((res) => {
- if (res.code == 200) {
- this.soundList = res.data;
- }
- });
- this.init();
- },
- methods: {
- init() {
- this.getList();
- },
- getList() {
- this.id = this.$route.query.paymentId;
- // 获取缴费状态
- getMusicGroupPaymentCalenderDetail({ id: this.id }).then((res) => {
- if (res.code == 200) {
- this.info = {
- paymentStatus: res.data.calender.status,
- startPaymentDate: res.data.calender.startPaymentDate,
- deadlinePaymentDate: res.data.calender.deadlinePaymentDate,
- expectNum: res.data.calender.expectNum,
- actualNum: res.data.calender.actualNum,
- sumActualAmount: res.data.sumActualAmount,
- };
- this.titleForm = {
- paymentType: res.data.calender.paymentType,
- musicGroupOrganizationCourseSettingId:
- res.data.calenderSettingsName,
- paymentValidStartDate: res.data.calender.paymentValidStartDate,
- paymentValidEndDate: res.data.calender.paymentValidEndDate,
- calenderSettingsName: res.data.calenderSettingsName,
- memberPaymentAmount: res.data.calender.memberPaymentAmount,
- memberRankSettingName: res.data.calender.memberRankSettingName,
- originalMemberPaymentAmount:
- res.data.calender.originalMemberPaymentAmount,
- memberValidDate: res.data.calender.memberValidDate,
- };
- this.msgList = res.data.musicGroupPaymentCalenderCourseSettings;
- this.memberRankSettingId = res.data?.calender?.memberRankSettingId;
- }
- });
- this.searchForm.id = this.id;
- this.searchForm.page = this.rules.page;
- this.searchForm.rows = this.rules.limit;
- getmusicGroupPaymentCalenderDetail(this.searchForm).then((payment) => {
- if (payment.code == 200) {
- this.rules.total = payment.data.total;
- this.tableList = payment.data.rows;
- }
- });
- },
- search() {
- this.rules.page = 1;
- this.getList();
- },
- onReSet() {
- this.searchForm = {
- search: null,
- subjectId: null,
- paymentStatus: null,
- };
- this.search();
- },
- checkSelect(val) {
- return val.paymentStatus == "NON_PAYMENT";
- },
- resetPay() {
- // this.activeRow = row;
- if (this.activeChiose.length < 1) {
- this.$message.error("请至少选择一名学员");
- return;
- }
- let ids = this.activeChiose.map((item) => {
- return item.id;
- });
- this.ids = ids.join(",");
- this.resetPayVisible = true;
- },
- // resetTime () {
- // this.payVisible = true;
- // },
- goBack() {
- let query = this.$route.query;
- if (query.type == "resetTeam") {
- this.$store.dispatch("delVisitedViews", this.$route);
- this.$router.push({
- path: "/business/resetTeaming",
- query: { ...this.$route.query },
- });
- } else if (query.type == "look") {
- this.$store.dispatch("delVisitedViews", this.$route);
- this.$router.push({
- path: "/business/resetTeaming",
- query: { ...this.$route.query },
- });
- } else if (query.type == "PRE_BUILD_FEE" || query.type == "feeAudit") {
- this.$store.dispatch("delVisitedViews", this.$route);
- this.$router.push({
- path: "/business/resetTeaming",
- query: { ...this.$route.query },
- });
- }
- },
- handleSelectionChange(val) {
- this.activeChiose = val;
- console.log(val);
- },
- startPay() {
- if (this.activeChiose.length < 1) {
- this.$message.error("请至少选择一名学员");
- return;
- }
- // 来一个弹窗选择日期 开始-结束
- this.timerVisible = true;
- return;
- // console.log(this.activeChiose)
- },
- submitReset() {
- this.$refs.resetPayForm.validate((res) => {
- if (res) {
- let obj = {};
- obj.expectAmount = this.resetPayForm.momey;
- obj.expectMemberAmount = this.resetPayForm.expectMemberAmount;
- obj.ids = this.ids;
- resetMusicGroupPaymentCalenderDetail(obj).then((res) => {
- if (res.code == 200) {
- this.$message.success("修改成功");
- this.resetPayVisible = false;
- this.getList();
- }
- });
- }
- });
- },
- addStudentBtn() {
- console.log(
- "musicGroupId:",
- this.teamid,
- "musicGroupPaymentCalenderId:",
- this.id
- );
- // 获取无缴费学员
- queryCanAddStudent({
- musicGroupId: this.teamid,
- musicGroupPaymentCalenderId: this.id,
- }).then((res) => {
- if (res.code == 200) {
- this.studentList = res.data;
- this.studentVisible = true;
- }
- });
- },
- delStudentBtn() {
- if (this.activeChiose.length < 1) {
- this.$message.error("请至少选择一名学员");
- return;
- }
- this.$confirm(`是否删除此学员`, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- let musicGroupPaymentCalenderDetailIds = this.activeChiose
- .map((stu) => {
- return stu.id;
- })
- .join(",");
- delMusicGroupPaymentCalenderStudent({
- musicGroupPaymentCalenderDetailIds,
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success(`删除成功`);
- this.$set(this.rules, "page", 1);
- this.getList();
- }
- });
- })
- .catch(() => {});
- },
- handleCurrentChange(val) {
- this.chioseStudent = val;
- },
- submitAddStudent() {
- if (!this.chioseStudent) {
- this.$message.error("请选择学员");
- return;
- }
- addMusicGroupPaymentCalenderStudent({
- musicGroupPaymentCalenderId: this.id,
- userId: this.chioseStudent.userId,
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success("添加成功");
- this.studentVisible = false;
- this.getList();
- }
- });
- },
- onMusicGroupPaymentCalenderDetail() {
- let searchForm = this.searchForm;
- // 报表导出
- let url = "/api-web/export/musicGroupPaymentCalenderDetail";
- let data = {
- id: this.$route.query.paymentId,
- musicGroupId: this.$route.query.id,
- };
- const options = {
- method: "POST",
- headers: {
- Authorization: getToken(),
- tenantId: getTenantId()
- },
- data: qs.stringify(cleanDeep(data)),
- url,
- responseType: "blob",
- };
- this.$confirm("您确定导出缴费记录", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- load.startLoading();
- axios(options)
- .then((res) => {
- let blob = new Blob([res.data], {
- type: "application/vnd.ms-excel;charset=utf-8",
- });
- let text = new Response(blob).text();
- text.then((res) => {
- // 判断是否报错
- if (res.indexOf("code") != -1) {
- let json = JSON.parse(res);
- this.$message.error(json.msg);
- } else {
- let objectUrl = URL.createObjectURL(blob);
- let link = document.createElement("a");
- let fname = "缴费导出" + new Date().getTime() + ".xls"; //下载文件的名字
- link.href = objectUrl;
- link.setAttribute("download", fname);
- document.body.appendChild(link);
- link.click();
- }
- });
- load.endLoading();
- })
- .catch((error) => {
- this.$message.error("导出数据失败,请联系管理员");
- load.endLoading();
- });
- })
- .catch(() => {});
- },
- cancleAdd(row) {
- this.$refs.singleTable.setCurrentRow(row);
- this.studentVisible = false;
- },
- payRemind() {
- if (this.activeChiose.length <= 0) {
- this.$message.error("请至少选择一名学员");
- return;
- }
- let submitArr = [];
- let msgArr = "";
- let str = "";
- this.activeChiose.forEach((item) => {
- if (item.open) {
- submitArr.push(item.userId);
- } else {
- msgArr += item?.sysUser?.username + ",";
- }
- });
- console.log(submitArr, msgArr);
- if (msgArr) {
- str = `${msgArr}未开启缴费无法提醒`;
- } else {
- str = "是否发送提醒";
- }
- this.$confirm(str, "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(async () => {
- try {
- const res = await sendWaitRenewMessage({
- studentIds: submitArr.join(","),
- calenderId: this.$route.query.paymentId,
- });
- this.$message.success("提醒成功");
- this.getList();
- } catch (e) {}
- })
- .catch(() => {});
- },
- changeStartTime(val) {
- this.timerForm.deadlinePaymentDate = "";
- },
- async submitPayTimer() {
- this.$refs.timerForm.validate((flag) => {
- if (flag) {
- let ids = this.activeChiose.map((item) => {
- return item.id;
- });
- ids = ids.join(",");
- // console.log(ids)
- openMusicGroupPaymentCalenderDetailPayment({
- ids,
- ...this.timerForm,
- }).then((res) => {
- if (res.code == 200) {
- this.$message.success(res.msg);
- this.timerVisible = false;
- this.getList();
- }
- });
- }
- });
- },
- },
- watch: {
- payVisible(val) {
- if (!val) {
- this.payForm = {
- startDate: null,
- };
- this.$refs["payForm"].resetFields();
- }
- },
- resetPayVisible(val) {
- if (!val) {
- this.resetPayForm = {
- momey: null,
- };
- }
- },
- timerVisible(val) {
- if (!val) {
- this.$refs.timerForm.resetFields();
- }
- },
- },
- computed: {
- payendTimer: () => {
- return {
- firstDayOfWeek: 1,
- disabledDate(time) {
- if (that.timerForm?.startPaymentDate) {
- return (
- time.getTime() + 86400000 <=
- new Date(that.timerForm?.startPaymentDate).getTime()
- );
- } else {
- return time.getTime() + 86400000 <= new Date().getTime();
- }
- },
- };
- },
- },
- };
- </script>
- <style lang='scss' scoped>
- .studenTable {
- height: 300px;
- overflow: auto;
- }
- .infoMsg {
- margin: 30px 0;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- text-align: center;
- .title {
- color: #999;
- font-size: 14px;
- line-height: 30px;
- min-width: 100px;
- }
- .status {
- font-size: 20px;
- }
- .left {
- width: 200px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- height: 60px;
- margin-right: 200px;
- }
- .right {
- text-align: center;
- height: 60px;
- line-height: 30px;
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- .expectBox {
- width: 220px;
- border-right: 1px solid #ccc;
- &:nth-last-child(1) {
- border-right: none !important;
- }
- }
- .expectBox.first {
- width: 300px;
- }
- }
- }
- .wrap {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- div {
- margin-right: 20px;
- }
- }
- .inputStyle {
- width: 180px;
- }
- .demo-table-expand {
- font-size: 0;
- }
- .demo-table-expand label {
- width: 90px;
- color: #99a9bf;
- }
- .demo-table-expand .el-form-item {
- margin-right: 0;
- margin-bottom: 0;
- width: 50%;
- }
- </style>
|