strudentPayInfo.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084
  1. <!-- -->
  2. <template>
  3. <div class="m-container">
  4. <el-page-header @back="goBack" content="学员缴费记录"> </el-page-header>
  5. <!-- this.info = {
  6. paymentStatus: res.data.calender.paymentStatus,
  7. startPaymentDate: res.data.calender.startPaymentDate,
  8. deadlinePaymentDate: res.data.calender.deadlinePaymentDate,
  9. expectNum: res.data.calender.expectNum,
  10. actualNum: res.data.calender.actualNum,
  11. sumActualAmount: res.data.sumActualAmount
  12. } -->
  13. <statistic :span="4" :col="5">
  14. <statistic-item>
  15. <span>状态</span>
  16. <span>
  17. <p
  18. class="status"
  19. style="color: #ff6a6a"
  20. v-if="info.paymentStatus == 'OPEN'"
  21. >
  22. {{ "已开启" }}
  23. </p>
  24. <p
  25. class="status"
  26. style="color: #ff6a6a"
  27. v-if="info.paymentStatus == 'NO'"
  28. >
  29. {{ "未开始" }}
  30. </p>
  31. <p
  32. class="status"
  33. style="color: #5ccdb8"
  34. v-if="info.paymentStatus == 'OVER'"
  35. >
  36. {{ "已结束" }}
  37. </p>
  38. </span>
  39. </statistic-item>
  40. <statistic-item>
  41. <span>预计缴费日期</span>
  42. <span style="font-size: 16px"
  43. >{{ info.startPaymentDate | formatTimer }} ~
  44. {{ info.deadlinePaymentDate | formatTimer }}</span
  45. >
  46. </statistic-item>
  47. <statistic-item>
  48. <span>预计缴费人数</span>
  49. <span>{{ info.expectNum ? info.expectNum : 0 }}</span>
  50. </statistic-item>
  51. <statistic-item>
  52. <span>实际缴费人数</span>
  53. <span>{{ info.actualNum ? info.actualNum : 0 }}</span>
  54. </statistic-item>
  55. <statistic-item>
  56. <span>收款金额</span>
  57. <span>{{ info.sumActualAmount ? info.sumActualAmount : 0 }}</span>
  58. </statistic-item>
  59. </statistic>
  60. <!-- <div class="infoMsg">
  61. <div class="left">
  62. <p class="title">状态</p>
  63. <p class="status"
  64. style="color: #ff6a6a"
  65. v-if="info.paymentStatus == 'OPEN'">
  66. {{ "已开启" }}
  67. </p>
  68. <p class="status"
  69. style="color: #ff6a6a"
  70. v-if="info.paymentStatus == 'NO'">
  71. {{ "未开始" }}
  72. </p>
  73. <p class="status"
  74. style="color: #5ccdb8"
  75. v-if="info.paymentStatus == 'OVER'">
  76. {{ "已结束" }}
  77. </p>
  78. </div>
  79. <div class="right">
  80. <div class="expectBox first">
  81. <p class="title">预计缴费日期</p>
  82. <p class="status">
  83. {{ info.startPaymentDate | formatTimer }}~{{
  84. info.deadlinePaymentDate | formatTimer
  85. }}
  86. </p>
  87. </div>
  88. <div class="expectBox">
  89. <p class="title">预计缴费人数</p>
  90. <p class="status">{{ info.expectNum ? info.expectNum : 0 }}</p>
  91. </div>
  92. <div class="expectBox">
  93. <p class="title">实际缴费人数</p>
  94. <p class="status">{{ info.actualNum ? info.actualNum : 0 }}</p>
  95. </div>
  96. <div class="expectBox">
  97. <p class="title">收款金额</p>
  98. <p class="status">
  99. {{ info.sumActualAmount ? info.sumActualAmount : 0 }}
  100. </p>
  101. </div>
  102. </div>
  103. </div> -->
  104. <div class="m-core">
  105. <save-form
  106. save-key="strudent-pay-info"
  107. :inline="true"
  108. :model.sync="searchForm"
  109. @submit="search"
  110. @reset="onReSet"
  111. >
  112. <el-form-item>
  113. <el-input
  114. v-model.trim="searchForm.search"
  115. @keyup.enter.native="search"
  116. placeholder="学员编号,手机号"
  117. ></el-input>
  118. </el-form-item>
  119. <el-form-item>
  120. <el-select
  121. v-model.trim="searchForm.subjectId"
  122. style="width: 180px"
  123. clearable
  124. filterable
  125. placeholder="请选择声部"
  126. >
  127. <el-option
  128. v-for="(item, index) in soundList"
  129. :key="index"
  130. :label="item.name"
  131. :value="item.id"
  132. ></el-option>
  133. </el-select>
  134. </el-form-item>
  135. <el-form-item>
  136. <el-select
  137. v-model.trim="searchForm.paymentStatus"
  138. style="width: 180px"
  139. clearable
  140. filterable
  141. placeholder="请选择状态"
  142. >
  143. <el-option label="未缴费" value="NON_PAYMENT"></el-option>
  144. <el-option label="缴费中" value="PROCESSING"></el-option>
  145. <el-option label="已缴费" value="PAID_COMPLETED"></el-option>
  146. </el-select>
  147. </el-form-item>
  148. <el-form-item>
  149. <el-select
  150. v-model.trim="searchForm.musicGroupStatus"
  151. style="width: 180px"
  152. clearable
  153. filterable
  154. placeholder="请选择学员状态"
  155. >
  156. <el-option label="在读" value="NORMAL"></el-option>
  157. <el-option label="退团" value="QUIT"></el-option>
  158. <el-option label="休学" value="QUIT_SCHOOL"></el-option>
  159. <el-option label="报名" value="APPLY"></el-option>
  160. </el-select>
  161. </el-form-item>
  162. <el-form-item>
  163. <el-button native-type="suubmit" type="danger">搜索</el-button>
  164. <el-button native-type="reset" type="primary">重置</el-button>
  165. </el-form-item>
  166. </save-form>
  167. <!-- NO: '未开启缴费',
  168. OPEN: '开启缴费',
  169. OVER: '缴费已结束', -->
  170. <div class="wrap">
  171. <div class="newBand" @click="detailVisible = true">缴费详情</div>
  172. <!-- <div
  173. class="newBand"
  174. @click="resetPay"
  175. v-permission="'musicGroupPaymentCalenderDetail/updateExpectAmount'"
  176. >
  177. 修改缴费金额
  178. </div> -->
  179. <div
  180. class="newBand"
  181. @click="startPay"
  182. v-if="info.paymentStatus != 'OPEN'"
  183. v-permission="'musicGroupPaymentCalenderDetail/openPayment'"
  184. >
  185. 开启缴费
  186. </div>
  187. <div
  188. class="newBand"
  189. @click="payRemind"
  190. v-permission="'musicGroupPaymentCalenderDetail/sendWaitRenewMessage'"
  191. >
  192. 缴费提醒
  193. </div>
  194. <!-- <div
  195. class="newBand"
  196. @click="addStudentBtn"
  197. v-if="info.paymentStatus != 'OVER'"
  198. v-permission="'musicGroupPaymentCalenderDetail/add'"
  199. >
  200. 新增学员
  201. </div> -->
  202. <div
  203. class="newBand"
  204. @click="delStudentBtn"
  205. v-if="titleForm.paymentType != 'SPAN_GROUP_CLASS_ADJUST'"
  206. v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
  207. >
  208. 删除学员
  209. </div>
  210. <div
  211. class="newBand"
  212. v-permission="'export/musicGroupPaymentCalenderDetail'"
  213. @click="onMusicGroupPaymentCalenderDetail"
  214. >
  215. 缴费记录导出
  216. </div>
  217. </div>
  218. <div class="tableWrap">
  219. <el-table
  220. style="width: 100%"
  221. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  222. :data="tableList"
  223. @selection-change="handleSelectionChange"
  224. >
  225. <el-table-column
  226. type="selection"
  227. :selectable="checkSelect"
  228. width="55"
  229. >
  230. </el-table-column>
  231. <el-table-column type="expand">
  232. <template slot-scope="props">
  233. <el-form label-position="left" inline class="demo-table-expand">
  234. <el-form-item label="乐团课金额">
  235. <span>{{ props.row.courseAmount | moneyFormat}}元</span>
  236. </el-form-item>
  237. <el-form-item label="团练宝金额">
  238. <span>{{ props.row.cloudAmount | moneyFormat}}元</span>
  239. </el-form-item>
  240. <el-form-item label="乐保金额">
  241. <span>{{ props.row.maintenanceAmount | moneyFormat}}元</span>
  242. </el-form-item>
  243. <el-form-item label="乐团活动金额">
  244. <span>{{ props.row.activityAmount | moneyFormat}}元</span>
  245. </el-form-item>
  246. <el-form-item label="乐器金额">
  247. <span>{{ props.row.musicalAmount | moneyFormat}}元</span>
  248. </el-form-item>
  249. <el-form-item label="辅件金额">
  250. <span>{{ props.row.accessoriesAmount | moneyFormat}}元</span>
  251. </el-form-item>
  252. </el-form>
  253. </template>
  254. </el-table-column>
  255. <el-table-column
  256. align="center"
  257. prop="userId"
  258. label="学员编号"
  259. ></el-table-column>
  260. <el-table-column align="center" prop="studentId" label="学员姓名">
  261. <template slot-scope="scope">
  262. <div v-if="scope.row.sysUser">
  263. {{ scope.row.sysUser.username }}
  264. </div>
  265. </template>
  266. </el-table-column>
  267. <el-table-column align="center" label="学员声部">
  268. <template slot-scope="scope">
  269. <div v-if="scope.row.studentRegistration">
  270. {{ scope.row.studentRegistration.subjectName }}
  271. </div>
  272. </template>
  273. </el-table-column>
  274. <el-table-column align="center" label="学员状态">
  275. <template slot-scope="scope">
  276. <div v-if="scope.row.studentRegistration">
  277. {{
  278. scope.row.studentRegistration.musicGroupStatus
  279. | studentTeamStatus
  280. }}
  281. </div>
  282. </template>
  283. </el-table-column>
  284. <el-table-column align="center" prop="studentId" label="手机号">
  285. <template slot-scope="scope">
  286. <div v-if="scope.row.sysUser">
  287. {{ scope.row.sysUser.phone }}
  288. </div>
  289. </template>
  290. </el-table-column>
  291. <!-- <el-table-column align="center" prop="expectAmount" label="课程金额">
  292. <template slot-scope="scope">
  293. <div>
  294. {{ scope.row.expectAmount | moneyFormat }}
  295. </div>
  296. </template>
  297. </el-table-column>
  298. <el-table-column
  299. align="center"
  300. prop="expectMemberAmount"
  301. label="会员金额"
  302. >
  303. <template slot-scope="scope">
  304. <div>
  305. {{ scope.row.expectMemberAmount | moneyFormat }}
  306. </div>
  307. </template>
  308. </el-table-column> -->
  309. <el-table-column align="center" label="缴费开始日期">
  310. <template slot-scope="scope">
  311. <div>
  312. {{ scope.row.startPaymentDate | formatTimer }}
  313. </div>
  314. </template>
  315. </el-table-column>
  316. <el-table-column align="center" label="缴费截止日期">
  317. <template slot-scope="scope">
  318. <div>
  319. {{ scope.row.deadlinePaymentDateMgpc | formatTimer }}
  320. </div>
  321. </template>
  322. </el-table-column>
  323. <el-table-column align="center" label="是否开启缴费">
  324. <template slot-scope="scope">
  325. <div>
  326. {{ scope.row.open ? "是" : "否" }}
  327. </div>
  328. </template>
  329. </el-table-column>
  330. <el-table-column align="center" label="缴费状态">
  331. <template slot-scope="scope">
  332. <div>
  333. {{ scope.row.paymentStatus | paymentStatusDetall }}
  334. </div>
  335. </template>
  336. </el-table-column>
  337. <el-table-column align="center" prop="studentId" label="支付时间">
  338. <template slot-scope="scope">
  339. <div>
  340. {{ scope.row.payTime | dateForMinFormat }}
  341. </div>
  342. </template>
  343. </el-table-column>
  344. <!-- <el-table-column align="center"
  345. width="200px"
  346. label="操作">
  347. <template slot-scope="scope">
  348. <div>
  349. <el-button type="text"
  350. :disabled="!checkSelect(scope.row)"
  351. @click="resetPay(scope.row)">修改金额</el-button>
  352. <el-button type="text"
  353. :disabled="!checkSelect(scope.row)"
  354. @click="startPay(scope.row)">开启缴费</el-button>
  355. </div>
  356. </template>
  357. </el-table-column> -->
  358. </el-table>
  359. <pagination
  360. sync
  361. saveKey="strudent-pay-info"
  362. :total.sync="rules.total"
  363. :page.sync="rules.page"
  364. :limit.sync="rules.limit"
  365. :page-sizes="rules.page_size"
  366. @pagination="getList"
  367. />
  368. </div>
  369. </div>
  370. <!-- <el-dialog :visible.sync="payVisible"
  371. width="500px"
  372. title="修改缴费时间">
  373. <el-form :model="payForm"
  374. ref='payForm'>
  375. <el-form-item label="缴费开始日期"
  376. :rules="[{ required: true, message: '请设置缴费开始日期',trigger: 'blur'}]"
  377. prop="startDate">
  378. <el-date-picker v-model.trim="payForm.startDate"
  379. type="date"
  380. :picker-options="pickerOptions"
  381. value-format="yyyy-MM-dd"
  382. placeholder="开始日期"></el-date-picker>
  383. </el-form-item>
  384. </el-form>
  385. <div slot="footer"
  386. class="dialog-footer">
  387. <el-button @click="payVisible = false">取 消</el-button>
  388. <el-button type="primary"
  389. @click="">确 定</el-button>
  390. </div>
  391. </el-dialog> -->
  392. <!-- <el-dialog
  393. :visible.sync="resetPayVisible"
  394. width="500px"
  395. title="修改缴费金额"
  396. >
  397. <el-form
  398. :model="resetPayForm"
  399. :inline="true"
  400. label-width="120px"
  401. label-position="right"
  402. ref="resetPayForm"
  403. @submit.native.prevent
  404. >
  405. <el-form-item
  406. v-if="
  407. msgList.length > 0 ||
  408. titleForm.paymentType == 'SPAN_GROUP_CLASS_ADJUST'
  409. "
  410. label="预计课程金额"
  411. :rules="[
  412. { required: true, message: '请输入预计缴费金额', trigger: 'blur' },
  413. {
  414. pattern:
  415. /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  416. message: '请输入正确的金额',
  417. trigger: 'blur',
  418. },
  419. ]"
  420. prop="momey"
  421. >
  422. <el-input v-model="resetPayForm.momey"></el-input>
  423. </el-form-item>
  424. <el-form-item
  425. v-if="memberRankSettingId"
  426. label="预计会员金额"
  427. :rules="[
  428. { required: true, message: '请输入预计会员金额', trigger: 'blur' },
  429. {
  430. pattern:
  431. /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  432. message: '请输入正确的金额',
  433. trigger: 'blur',
  434. },
  435. ]"
  436. prop="expectMemberAmount"
  437. >
  438. <el-input v-model="resetPayForm.expectMemberAmount"></el-input>
  439. </el-form-item>
  440. </el-form>
  441. <div slot="footer" class="dialog-footer">
  442. <el-button @click="resetPayVisible = false">取 消</el-button>
  443. <el-button type="primary" @click="submitReset">确 定</el-button>
  444. </div>
  445. </el-dialog> -->
  446. <el-dialog :visible.sync="studentVisible" title="学生列表" width="600">
  447. <el-table
  448. :data="studentList"
  449. class="studenTable"
  450. ref="singleTable"
  451. highlight-current-row
  452. @current-change="handleCurrentChange"
  453. >
  454. <!-- <el-table-column type="selection"
  455. width="55">
  456. </el-table-column> -->
  457. <el-table-column
  458. property="userId"
  459. align="center"
  460. label="学员编号"
  461. ></el-table-column>
  462. <el-table-column
  463. property="name"
  464. align="center"
  465. label="学员姓名"
  466. ></el-table-column>
  467. <el-table-column
  468. property="phone"
  469. align="center"
  470. label="手机号"
  471. ></el-table-column>
  472. </el-table>
  473. <div slot="footer" class="dialog-footer">
  474. <el-button @click="cancleAdd">取 消</el-button>
  475. <el-button type="primary" @click="submitAddStudent">确 定</el-button>
  476. </div>
  477. </el-dialog>
  478. <el-dialog width="900px" title="查看缴费详情" :visible.sync="detailVisible">
  479. <reviewDetail
  480. @close="detailVisible = false"
  481. @submited="getList"
  482. :detail="{ id: $route.query.paymentId }"
  483. :musicGroupId="$route.query.id"
  484. destroy-on-close
  485. />
  486. <div slot="footer" class="dialog-footer">
  487. <el-button type="primary" @click="detailVisible = false"
  488. >关闭</el-button
  489. >
  490. </div>
  491. </el-dialog>
  492. <el-dialog width="400px" title="缴费时间" :visible.sync="timerVisible">
  493. <el-form :model="timerForm" ref="timerForm">
  494. <el-form-item
  495. label="缴费开始时间"
  496. :rules="[{ required: true, message: '请选择缴费开始时间' }]"
  497. prop="startPaymentDate"
  498. >
  499. <el-date-picker
  500. :picker-options="pickerOptions"
  501. v-model="timerForm.startPaymentDate"
  502. type="date"
  503. placeholder="选择日期"
  504. @change="changeStartTime"
  505. value-format="yyyy-MM-dd"
  506. >
  507. </el-date-picker>
  508. </el-form-item>
  509. <el-form-item
  510. label="缴费结束时间"
  511. :rules="[{ required: true, message: '请选择缴费结束时间' }]"
  512. prop="deadlinePaymentDate"
  513. >
  514. <el-date-picker
  515. :picker-options="payendTimer"
  516. v-model="timerForm.deadlinePaymentDate"
  517. type="date"
  518. placeholder="选择日期"
  519. value-format="yyyy-MM-dd"
  520. >
  521. </el-date-picker>
  522. </el-form-item>
  523. </el-form>
  524. <span slot="footer" class="dialog-footer">
  525. <el-button @click="timerVisible = false">取 消</el-button>
  526. <el-button @click="submitPayTimer" type="primary">确 定</el-button>
  527. </span>
  528. </el-dialog>
  529. </div>
  530. </template>
  531. <script>
  532. import axios from "axios";
  533. import { getToken, getTenantId } from "@/utils/auth";
  534. import pagination from "@/components/Pagination/index";
  535. import load from "@/utils/loading";
  536. import cleanDeep from "clean-deep";
  537. import qs from "qs";
  538. import { courseType } from "@/utils/searchArray";
  539. import reviewDetail from "../modals/review-detail";
  540. import {
  541. findSound,
  542. getmusicGroupPaymentCalenderDetail,
  543. openMusicGroupPaymentCalenderDetailPayment,
  544. resetMusicGroupPaymentCalenderDetail,
  545. getMusicGroupPaymentCalenderDetail,
  546. queryCanAddStudent,
  547. addMusicGroupPaymentCalenderStudent,
  548. delMusicGroupPaymentCalenderStudent,
  549. sendWaitRenewMessage,
  550. } from "@/api/buildTeam";
  551. let that;
  552. export default {
  553. components: { pagination, reviewDetail },
  554. data() {
  555. return {
  556. searchForm: {
  557. search: null,
  558. subjectId: null,
  559. paymentStatus: null,
  560. musicGroupStatus: null,
  561. },
  562. teacherList: [],
  563. soundList: [],
  564. tableList: [{ studentId: 111 }],
  565. rules: {
  566. // 分页规则
  567. limit: 10, // 限制显示条数
  568. page: 1, // 当前页
  569. total: 0, // 总条数
  570. page_size: [10, 20, 40, 50], // 选择限制显示条数
  571. },
  572. payVisible: false,
  573. resetPayVisible: false,
  574. studentVisible: false,
  575. chioseStudent: null,
  576. studentList: [],
  577. pickerOptions: {
  578. firstDayOfWeek: 1,
  579. disabledDate(time) {
  580. return time.getTime() + 86400000 <= new Date().getTime();
  581. },
  582. },
  583. payForm: {
  584. startDate: null,
  585. },
  586. resetPayForm: {
  587. momey: null,
  588. expectMemberAmount: null,
  589. },
  590. activeChiose: [],
  591. id: null,
  592. ids: null,
  593. info: {
  594. paymentStatus: null,
  595. startPaymentDate: null,
  596. deadlinePaymentDate: null,
  597. expectNum: null,
  598. actualNum: null,
  599. sumActualAmount: null,
  600. },
  601. msgList: [],
  602. memberRankSettingId: null,
  603. detailVisible: false,
  604. titleForm: {
  605. paymentType: "",
  606. musicGroupOrganizationCourseSettingId: "",
  607. paymentValidStartDate: "",
  608. paymentValidEndDate: "",
  609. calenderSettingsName: "",
  610. memberPaymentAmount: "",
  611. memberRankSettingName: "",
  612. originalMemberPaymentAmount: "",
  613. memberValidDate: "",
  614. },
  615. timerVisible: false,
  616. timerForm: {
  617. startPaymentDate: "",
  618. deadlinePaymentDate: "",
  619. },
  620. };
  621. },
  622. //生命周期 - 创建完成(可以访问当前this实例)
  623. created() {},
  624. //生命周期 - 挂载完成(可以访问DOM元素)
  625. mounted() {
  626. // 获取声部
  627. that = this;
  628. this.teamid = this.$route.query.id;
  629. findSound({ musicGroupId: this.teamid }).then((res) => {
  630. if (res.code == 200) {
  631. this.soundList = res.data;
  632. }
  633. });
  634. // 获取分部
  635. this.init();
  636. },
  637. activated() {
  638. this.teamid = this.$route.query.id;
  639. findSound({ musicGroupId: this.teamid }).then((res) => {
  640. if (res.code == 200) {
  641. this.soundList = res.data;
  642. }
  643. });
  644. this.init();
  645. },
  646. methods: {
  647. init() {
  648. this.getList();
  649. },
  650. getList() {
  651. this.id = this.$route.query.paymentId;
  652. // 获取缴费状态
  653. getMusicGroupPaymentCalenderDetail({ id: this.id }).then((res) => {
  654. if (res.code == 200) {
  655. this.info = {
  656. paymentStatus: res.data.calender.status,
  657. startPaymentDate: res.data.calender.startPaymentDate,
  658. deadlinePaymentDate: res.data.calender.deadlinePaymentDate,
  659. expectNum: res.data.calender.expectNum,
  660. actualNum: res.data.calender.actualNum,
  661. sumActualAmount: res.data.sumActualAmount,
  662. };
  663. this.titleForm = {
  664. paymentType: res.data.calender.paymentType,
  665. musicGroupOrganizationCourseSettingId:
  666. res.data.calenderSettingsName,
  667. paymentValidStartDate: res.data.calender.paymentValidStartDate,
  668. paymentValidEndDate: res.data.calender.paymentValidEndDate,
  669. calenderSettingsName: res.data.calenderSettingsName,
  670. memberPaymentAmount: res.data.calender.memberPaymentAmount,
  671. memberRankSettingName: res.data.calender.memberRankSettingName,
  672. originalMemberPaymentAmount:
  673. res.data.calender.originalMemberPaymentAmount,
  674. memberValidDate: res.data.calender.memberValidDate,
  675. };
  676. this.msgList = res.data.musicGroupPaymentCalenderCourseSettings;
  677. this.memberRankSettingId = res.data?.calender?.memberRankSettingId;
  678. }
  679. });
  680. this.searchForm.id = this.id;
  681. this.searchForm.page = this.rules.page;
  682. this.searchForm.rows = this.rules.limit;
  683. getmusicGroupPaymentCalenderDetail(this.searchForm).then((payment) => {
  684. if (payment.code == 200) {
  685. this.rules.total = payment.data.total;
  686. this.tableList = payment.data.rows;
  687. }
  688. });
  689. },
  690. search() {
  691. this.rules.page = 1;
  692. this.getList();
  693. },
  694. onReSet() {
  695. this.searchForm = {
  696. search: null,
  697. subjectId: null,
  698. paymentStatus: null,
  699. };
  700. this.search();
  701. },
  702. checkSelect(val) {
  703. return val.paymentStatus == "NON_PAYMENT";
  704. },
  705. resetPay() {
  706. // this.activeRow = row;
  707. if (this.activeChiose.length < 1) {
  708. this.$message.error("请至少选择一名学员");
  709. return;
  710. }
  711. let ids = this.activeChiose.map((item) => {
  712. return item.id;
  713. });
  714. this.ids = ids.join(",");
  715. this.resetPayVisible = true;
  716. },
  717. // resetTime () {
  718. // this.payVisible = true;
  719. // },
  720. goBack() {
  721. let query = this.$route.query;
  722. if (query.type == "resetTeam") {
  723. this.$store.dispatch("delVisitedViews", this.$route);
  724. this.$router.push({
  725. path: "/business/resetTeaming",
  726. query: { ...this.$route.query },
  727. });
  728. } else if (query.type == "look") {
  729. this.$store.dispatch("delVisitedViews", this.$route);
  730. this.$router.push({
  731. path: "/business/resetTeaming",
  732. query: { ...this.$route.query },
  733. });
  734. } else if (query.type == "PRE_BUILD_FEE" || query.type == "feeAudit") {
  735. this.$store.dispatch("delVisitedViews", this.$route);
  736. this.$router.push({
  737. path: "/business/resetTeaming",
  738. query: { ...this.$route.query },
  739. });
  740. }
  741. },
  742. handleSelectionChange(val) {
  743. this.activeChiose = val;
  744. console.log(val);
  745. },
  746. startPay() {
  747. if (this.activeChiose.length < 1) {
  748. this.$message.error("请至少选择一名学员");
  749. return;
  750. }
  751. // 来一个弹窗选择日期 开始-结束
  752. this.timerVisible = true;
  753. return;
  754. // console.log(this.activeChiose)
  755. },
  756. submitReset() {
  757. this.$refs.resetPayForm.validate((res) => {
  758. if (res) {
  759. let obj = {};
  760. obj.expectAmount = this.resetPayForm.momey;
  761. obj.expectMemberAmount = this.resetPayForm.expectMemberAmount;
  762. obj.ids = this.ids;
  763. resetMusicGroupPaymentCalenderDetail(obj).then((res) => {
  764. if (res.code == 200) {
  765. this.$message.success("修改成功");
  766. this.resetPayVisible = false;
  767. this.getList();
  768. }
  769. });
  770. }
  771. });
  772. },
  773. addStudentBtn() {
  774. console.log(
  775. "musicGroupId:",
  776. this.teamid,
  777. "musicGroupPaymentCalenderId:",
  778. this.id
  779. );
  780. // 获取无缴费学员
  781. queryCanAddStudent({
  782. musicGroupId: this.teamid,
  783. musicGroupPaymentCalenderId: this.id,
  784. }).then((res) => {
  785. if (res.code == 200) {
  786. this.studentList = res.data;
  787. this.studentVisible = true;
  788. }
  789. });
  790. },
  791. delStudentBtn() {
  792. if (this.activeChiose.length < 1) {
  793. this.$message.error("请至少选择一名学员");
  794. return;
  795. }
  796. this.$confirm(`是否删除此学员`, "提示", {
  797. confirmButtonText: "确定",
  798. cancelButtonText: "取消",
  799. type: "warning",
  800. })
  801. .then(() => {
  802. let musicGroupPaymentCalenderDetailIds = this.activeChiose
  803. .map((stu) => {
  804. return stu.id;
  805. })
  806. .join(",");
  807. delMusicGroupPaymentCalenderStudent({
  808. musicGroupPaymentCalenderDetailIds,
  809. }).then((res) => {
  810. if (res.code == 200) {
  811. this.$message.success(`删除成功`);
  812. this.$set(this.rules, "page", 1);
  813. this.getList();
  814. }
  815. });
  816. })
  817. .catch(() => {});
  818. },
  819. handleCurrentChange(val) {
  820. this.chioseStudent = val;
  821. },
  822. submitAddStudent() {
  823. if (!this.chioseStudent) {
  824. this.$message.error("请选择学员");
  825. return;
  826. }
  827. addMusicGroupPaymentCalenderStudent({
  828. musicGroupPaymentCalenderId: this.id,
  829. userId: this.chioseStudent.userId,
  830. }).then((res) => {
  831. if (res.code == 200) {
  832. this.$message.success("添加成功");
  833. this.studentVisible = false;
  834. this.getList();
  835. }
  836. });
  837. },
  838. onMusicGroupPaymentCalenderDetail() {
  839. let searchForm = this.searchForm;
  840. // 报表导出
  841. let url = "/api-web/export/musicGroupPaymentCalenderDetail";
  842. let data = {
  843. id: this.$route.query.paymentId,
  844. musicGroupId: this.$route.query.id,
  845. };
  846. const options = {
  847. method: "POST",
  848. headers: {
  849. Authorization: getToken(),
  850. tenantId: getTenantId()
  851. },
  852. data: qs.stringify(cleanDeep(data)),
  853. url,
  854. responseType: "blob",
  855. };
  856. this.$confirm("您确定导出缴费记录", "提示", {
  857. confirmButtonText: "确定",
  858. cancelButtonText: "取消",
  859. type: "warning",
  860. })
  861. .then(() => {
  862. load.startLoading();
  863. axios(options)
  864. .then((res) => {
  865. let blob = new Blob([res.data], {
  866. type: "application/vnd.ms-excel;charset=utf-8",
  867. });
  868. let text = new Response(blob).text();
  869. text.then((res) => {
  870. // 判断是否报错
  871. if (res.indexOf("code") != -1) {
  872. let json = JSON.parse(res);
  873. this.$message.error(json.msg);
  874. } else {
  875. let objectUrl = URL.createObjectURL(blob);
  876. let link = document.createElement("a");
  877. let fname = "缴费导出" + new Date().getTime() + ".xls"; //下载文件的名字
  878. link.href = objectUrl;
  879. link.setAttribute("download", fname);
  880. document.body.appendChild(link);
  881. link.click();
  882. }
  883. });
  884. load.endLoading();
  885. })
  886. .catch((error) => {
  887. this.$message.error("导出数据失败,请联系管理员");
  888. load.endLoading();
  889. });
  890. })
  891. .catch(() => {});
  892. },
  893. cancleAdd(row) {
  894. this.$refs.singleTable.setCurrentRow(row);
  895. this.studentVisible = false;
  896. },
  897. payRemind() {
  898. if (this.activeChiose.length <= 0) {
  899. this.$message.error("请至少选择一名学员");
  900. return;
  901. }
  902. let submitArr = [];
  903. let msgArr = "";
  904. let str = "";
  905. this.activeChiose.forEach((item) => {
  906. if (item.open) {
  907. submitArr.push(item.userId);
  908. } else {
  909. msgArr += item?.sysUser?.username + ",";
  910. }
  911. });
  912. console.log(submitArr, msgArr);
  913. if (msgArr) {
  914. str = `${msgArr}未开启缴费无法提醒`;
  915. } else {
  916. str = "是否发送提醒";
  917. }
  918. this.$confirm(str, "提示", {
  919. confirmButtonText: "确定",
  920. cancelButtonText: "取消",
  921. type: "warning",
  922. })
  923. .then(async () => {
  924. try {
  925. const res = await sendWaitRenewMessage({
  926. studentIds: submitArr.join(","),
  927. calenderId: this.$route.query.paymentId,
  928. });
  929. this.$message.success("提醒成功");
  930. this.getList();
  931. } catch (e) {}
  932. })
  933. .catch(() => {});
  934. },
  935. changeStartTime(val) {
  936. this.timerForm.deadlinePaymentDate = "";
  937. },
  938. async submitPayTimer() {
  939. this.$refs.timerForm.validate((flag) => {
  940. if (flag) {
  941. let ids = this.activeChiose.map((item) => {
  942. return item.id;
  943. });
  944. ids = ids.join(",");
  945. // console.log(ids)
  946. openMusicGroupPaymentCalenderDetailPayment({
  947. ids,
  948. ...this.timerForm,
  949. }).then((res) => {
  950. if (res.code == 200) {
  951. this.$message.success(res.msg);
  952. this.timerVisible = false;
  953. this.getList();
  954. }
  955. });
  956. }
  957. });
  958. },
  959. },
  960. watch: {
  961. payVisible(val) {
  962. if (!val) {
  963. this.payForm = {
  964. startDate: null,
  965. };
  966. this.$refs["payForm"].resetFields();
  967. }
  968. },
  969. resetPayVisible(val) {
  970. if (!val) {
  971. this.resetPayForm = {
  972. momey: null,
  973. };
  974. }
  975. },
  976. timerVisible(val) {
  977. if (!val) {
  978. this.$refs.timerForm.resetFields();
  979. }
  980. },
  981. },
  982. computed: {
  983. payendTimer: () => {
  984. return {
  985. firstDayOfWeek: 1,
  986. disabledDate(time) {
  987. if (that.timerForm?.startPaymentDate) {
  988. return (
  989. time.getTime() + 86400000 <=
  990. new Date(that.timerForm?.startPaymentDate).getTime()
  991. );
  992. } else {
  993. return time.getTime() + 86400000 <= new Date().getTime();
  994. }
  995. },
  996. };
  997. },
  998. },
  999. };
  1000. </script>
  1001. <style lang='scss' scoped>
  1002. .studenTable {
  1003. height: 300px;
  1004. overflow: auto;
  1005. }
  1006. .infoMsg {
  1007. margin: 30px 0;
  1008. display: flex;
  1009. flex-direction: row;
  1010. justify-content: flex-start;
  1011. text-align: center;
  1012. .title {
  1013. color: #999;
  1014. font-size: 14px;
  1015. line-height: 30px;
  1016. min-width: 100px;
  1017. }
  1018. .status {
  1019. font-size: 20px;
  1020. }
  1021. .left {
  1022. width: 200px;
  1023. display: flex;
  1024. flex-direction: column;
  1025. justify-content: center;
  1026. height: 60px;
  1027. margin-right: 200px;
  1028. }
  1029. .right {
  1030. text-align: center;
  1031. height: 60px;
  1032. line-height: 30px;
  1033. display: flex;
  1034. flex-direction: row;
  1035. justify-content: flex-start;
  1036. .expectBox {
  1037. width: 220px;
  1038. border-right: 1px solid #ccc;
  1039. &:nth-last-child(1) {
  1040. border-right: none !important;
  1041. }
  1042. }
  1043. .expectBox.first {
  1044. width: 300px;
  1045. }
  1046. }
  1047. }
  1048. .wrap {
  1049. display: flex;
  1050. flex-direction: row;
  1051. justify-content: flex-start;
  1052. div {
  1053. margin-right: 20px;
  1054. }
  1055. }
  1056. .inputStyle {
  1057. width: 180px;
  1058. }
  1059. .demo-table-expand {
  1060. font-size: 0;
  1061. }
  1062. .demo-table-expand label {
  1063. width: 90px;
  1064. color: #99a9bf;
  1065. }
  1066. .demo-table-expand .el-form-item {
  1067. margin-right: 0;
  1068. margin-bottom: 0;
  1069. width: 50%;
  1070. }
  1071. </style>