strudentPayInfo.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819
  1. <!-- -->
  2. <template>
  3. <div class="m-container">
  4. <el-page-header @back="goBack"
  5. content="学员缴费记录"> </el-page-header>
  6. <!-- this.info = {
  7. paymentStatus: res.data.calender.paymentStatus,
  8. startPaymentDate: res.data.calender.startPaymentDate,
  9. deadlinePaymentDate: res.data.calender.deadlinePaymentDate,
  10. expectNum: res.data.calender.expectNum,
  11. actualNum: res.data.calender.actualNum,
  12. sumActualAmount: res.data.sumActualAmount
  13. } -->
  14. <statistic :span="4" :col="5">
  15. <statistic-item>
  16. <span>状态</span>
  17. <span>
  18. <p class="status"
  19. style="color: #ff6a6a"
  20. v-if="info.paymentStatus == 'OPEN'">
  21. {{ "已开启" }}
  22. </p>
  23. <p class="status"
  24. style="color: #ff6a6a"
  25. v-if="info.paymentStatus == 'NO'">
  26. {{ "未开始" }}
  27. </p>
  28. <p class="status"
  29. style="color: #5ccdb8"
  30. v-if="info.paymentStatus == 'OVER'">
  31. {{ "已结束" }}
  32. </p>
  33. </span>
  34. </statistic-item>
  35. <statistic-item>
  36. <span>预计缴费日期</span>
  37. <span style="font-size: 16px">{{ info.startPaymentDate | formatTimer }} ~ {{ info.deadlinePaymentDate | formatTimer }}</span>
  38. </statistic-item>
  39. <statistic-item>
  40. <span>预计缴费人数</span>
  41. <span>{{ info.expectNum ? info.expectNum : 0 }}</span>
  42. </statistic-item>
  43. <statistic-item>
  44. <span>实际缴费人数</span>
  45. <span>{{ info.actualNum ? info.actualNum : 0 }}</span>
  46. </statistic-item>
  47. <statistic-item>
  48. <span>收款金额</span>
  49. <span>{{ info.sumActualAmount ? info.sumActualAmount : 0 }}</span>
  50. </statistic-item>
  51. </statistic>
  52. <!-- <div class="infoMsg">
  53. <div class="left">
  54. <p class="title">状态</p>
  55. <p class="status"
  56. style="color: #ff6a6a"
  57. v-if="info.paymentStatus == 'OPEN'">
  58. {{ "已开启" }}
  59. </p>
  60. <p class="status"
  61. style="color: #ff6a6a"
  62. v-if="info.paymentStatus == 'NO'">
  63. {{ "未开始" }}
  64. </p>
  65. <p class="status"
  66. style="color: #5ccdb8"
  67. v-if="info.paymentStatus == 'OVER'">
  68. {{ "已结束" }}
  69. </p>
  70. </div>
  71. <div class="right">
  72. <div class="expectBox first">
  73. <p class="title">预计缴费日期</p>
  74. <p class="status">
  75. {{ info.startPaymentDate | formatTimer }}~{{
  76. info.deadlinePaymentDate | formatTimer
  77. }}
  78. </p>
  79. </div>
  80. <div class="expectBox">
  81. <p class="title">预计缴费人数</p>
  82. <p class="status">{{ info.expectNum ? info.expectNum : 0 }}</p>
  83. </div>
  84. <div class="expectBox">
  85. <p class="title">实际缴费人数</p>
  86. <p class="status">{{ info.actualNum ? info.actualNum : 0 }}</p>
  87. </div>
  88. <div class="expectBox">
  89. <p class="title">收款金额</p>
  90. <p class="status">
  91. {{ info.sumActualAmount ? info.sumActualAmount : 0 }}
  92. </p>
  93. </div>
  94. </div>
  95. </div> -->
  96. <div class="m-core">
  97. <el-form :inline="true"
  98. :model="searchForm">
  99. <el-form-item>
  100. <el-input v-model.trim="searchForm.search"
  101. @keyup.enter.native="search"
  102. placeholder="学员编号,手机号"></el-input>
  103. </el-form-item>
  104. <el-form-item>
  105. <el-select v-model.trim="searchForm.subjectId"
  106. style="width: 180px"
  107. clearable
  108. filterable
  109. placeholder="请选择声部">
  110. <el-option v-for="(item, index) in soundList"
  111. :key="index"
  112. :label="item.name"
  113. :value="item.id"></el-option>
  114. </el-select>
  115. </el-form-item>
  116. <el-form-item>
  117. <el-select v-model.trim="searchForm.paymentStatus"
  118. style="width: 180px"
  119. clearable
  120. filterable
  121. placeholder="请选择状态">
  122. <el-option label="未缴费"
  123. value="NON_PAYMENT"></el-option>
  124. <el-option label="缴费中"
  125. value="PROCESSING"></el-option>
  126. <el-option label="已缴费"
  127. value="PAID_COMPLETED"></el-option>
  128. </el-select>
  129. </el-form-item>
  130. <el-form-item>
  131. <el-select v-model.trim="searchForm.musicGroupStatus"
  132. style="width: 180px"
  133. clearable
  134. filterable
  135. placeholder="请选择学员状态">
  136. <el-option label="在读"
  137. value="NORMAL"></el-option>
  138. <el-option label="退团"
  139. value="QUIT"></el-option>
  140. <el-option label="休学"
  141. value="QUIT_SCHOOL"></el-option>
  142. <el-option label="报名"
  143. value="APPLY"></el-option>
  144. </el-select>
  145. </el-form-item>
  146. <el-form-item>
  147. <el-button @click="search"
  148. type="danger">搜索</el-button>
  149. <el-button @click="onReSet"
  150. type="primary">重置</el-button>
  151. </el-form-item>
  152. </el-form>
  153. <!-- NO: '未开启缴费',
  154. OPEN: '开启缴费',
  155. OVER: '缴费已结束', -->
  156. <div class="wrap">
  157. <div class="newBand"
  158. @click="detailVisible=true">缴费详情</div>
  159. <div class="newBand"
  160. @click="resetPay"
  161. v-permission="'musicGroupPaymentCalenderDetail/updateExpectAmount'">修改缴费金额</div>
  162. <div class="newBand"
  163. @click="startPay"
  164. v-if="info.paymentStatus != 'OPEN'"
  165. v-permission="'musicGroupPaymentCalenderDetail/openPayment'">开启缴费</div>
  166. <!-- <div
  167. class="newBand"
  168. @click="addStudentBtn"
  169. v-if="info.paymentStatus != 'OVER'"
  170. v-permission="'musicGroupPaymentCalenderDetail/add'"
  171. >
  172. 新增学员
  173. </div> -->
  174. <!-- <div
  175. class="newBand"
  176. @click="delStudentBtn"
  177. v-if="info.paymentStatus == 'NO'"
  178. v-permission="'musicGroupPaymentCalenderDetail/batchDel'"
  179. >
  180. 删除学员
  181. </div> -->
  182. <div class="newBand"
  183. v-permission="'export/musicGroupPaymentCalenderDetail'"
  184. @click="onMusicGroupPaymentCalenderDetail">
  185. 缴费记录导出
  186. </div>
  187. </div>
  188. <div class="tableWrap">
  189. <el-table style="width: 100%"
  190. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  191. :data="tableList"
  192. @selection-change="handleSelectionChange">
  193. <el-table-column type="selection"
  194. :selectable="checkSelect"
  195. width="55">
  196. </el-table-column>
  197. <el-table-column align="center"
  198. prop="userId"
  199. label="学员编号"></el-table-column>
  200. <el-table-column align="center"
  201. prop="studentId"
  202. label="学员姓名">
  203. <template slot-scope="scope">
  204. <div v-if="scope.row.sysUser">
  205. {{ scope.row.sysUser.username }}
  206. </div>
  207. </template>
  208. </el-table-column>
  209. <el-table-column align="center"
  210. label="学员声部">
  211. <template slot-scope="scope">
  212. <div v-if="scope.row.studentRegistration">
  213. {{ scope.row.studentRegistration.subjectName }}
  214. </div>
  215. </template>
  216. </el-table-column>
  217. <el-table-column align="center"
  218. label="学员状态">
  219. <template slot-scope="scope">
  220. <div v-if="scope.row.studentRegistration">
  221. {{
  222. scope.row.studentRegistration.musicGroupStatus
  223. | studentTeamStatus
  224. }}
  225. </div>
  226. </template>
  227. </el-table-column>
  228. <el-table-column align="center"
  229. prop="studentId"
  230. label="手机号">
  231. <template slot-scope="scope">
  232. <div v-if="scope.row.sysUser">
  233. {{ scope.row.sysUser.phone }}
  234. </div>
  235. </template>
  236. </el-table-column>
  237. <el-table-column align="center"
  238. prop="expectAmount"
  239. label="预计缴费金额"></el-table-column>
  240. <el-table-column align="center"
  241. label="缴费开始日期">
  242. <template slot-scope="scope">
  243. <div>
  244. {{ scope.row.startPaymentDateMgpc | formatTimer }}
  245. </div>
  246. </template>
  247. </el-table-column>
  248. <el-table-column align="center"
  249. label="缴费截止日期">
  250. <template slot-scope="scope">
  251. <div>
  252. {{ scope.row.deadlinePaymentDateMgpc | formatTimer }}
  253. </div>
  254. </template>
  255. </el-table-column>
  256. <el-table-column align="center"
  257. label="是否开启缴费">
  258. <template slot-scope="scope">
  259. <div>
  260. {{ scope.row.open ? '是' : '否' }}
  261. </div>
  262. </template>
  263. </el-table-column>
  264. <el-table-column align="center"
  265. label="缴费状态">
  266. <template slot-scope="scope">
  267. <div>
  268. {{ scope.row.paymentStatus | paymentStatusDetall }}
  269. </div>
  270. </template>
  271. </el-table-column>
  272. <el-table-column align="center"
  273. prop="studentId"
  274. label="支付时间">
  275. <template slot-scope="scope">
  276. <div>
  277. {{ scope.row.payTime | dateForMinFormat }}
  278. </div>
  279. </template>
  280. </el-table-column>
  281. <!-- <el-table-column align="center"
  282. width="200px"
  283. label="操作">
  284. <template slot-scope="scope">
  285. <div>
  286. <el-button type="text"
  287. :disabled="!checkSelect(scope.row)"
  288. @click="resetPay(scope.row)">修改金额</el-button>
  289. <el-button type="text"
  290. :disabled="!checkSelect(scope.row)"
  291. @click="startPay(scope.row)">开启缴费</el-button>
  292. </div>
  293. </template>
  294. </el-table-column> -->
  295. </el-table>
  296. <pagination :total="rules.total"
  297. :page.sync="rules.page"
  298. :limit.sync="rules.limit"
  299. :page-sizes="rules.page_size"
  300. @pagination="getList" />
  301. </div>
  302. </div>
  303. <!-- <el-dialog :visible.sync="payVisible"
  304. width="500px"
  305. title="修改缴费时间">
  306. <el-form :model="payForm"
  307. ref='payForm'>
  308. <el-form-item label="缴费开始日期"
  309. :rules="[{ required: true, message: '请设置缴费开始日期',trigger: 'blur'}]"
  310. prop="startDate">
  311. <el-date-picker v-model.trim="payForm.startDate"
  312. type="date"
  313. :picker-options="pickerOptions"
  314. value-format="yyyy-MM-dd"
  315. placeholder="开始日期"></el-date-picker>
  316. </el-form-item>
  317. </el-form>
  318. <div slot="footer"
  319. class="dialog-footer">
  320. <el-button @click="payVisible = false">取 消</el-button>
  321. <el-button type="primary"
  322. @click="">确 定</el-button>
  323. </div>
  324. </el-dialog> -->
  325. <el-dialog :visible.sync="resetPayVisible"
  326. width="500px"
  327. title="修改缴费金额">
  328. <el-form :model="resetPayForm"
  329. :inline="true"
  330. label-width="120px"
  331. label-position="right"
  332. ref="resetPayForm" @submit.native.prevent>
  333. <!-- <el-form-item label="学员姓名"
  334. :rules="[{ required: true, message: '学员姓名',trigger: 'blur'}]"
  335. prop="startDate">
  336. <el-input disabled
  337. value="张三"></el-input>
  338. </el-form-item> -->
  339. <el-form-item label="预计缴费金额"
  340. :rules="[
  341. { required: true, message: '请输入预计缴费金额', trigger: 'blur' },
  342. {
  343. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  344. message: '请输入正确的金额',
  345. trigger: 'blur',
  346. },
  347. ]"
  348. prop="momey">
  349. <el-input v-model="resetPayForm.momey"></el-input>
  350. </el-form-item>
  351. </el-form>
  352. <div slot="footer"
  353. class="dialog-footer">
  354. <el-button @click="resetPayVisible = false">取 消</el-button>
  355. <el-button type="primary"
  356. @click="submitReset">确 定</el-button>
  357. </div>
  358. </el-dialog>
  359. <el-dialog :visible.sync="studentVisible"
  360. width="600">
  361. <el-table :data="studentList"
  362. class="studenTable"
  363. ref="singleTable"
  364. highlight-current-row
  365. @current-change="handleCurrentChange">
  366. <!-- <el-table-column type="selection"
  367. width="55">
  368. </el-table-column> -->
  369. <el-table-column property="userId"
  370. align="center"
  371. label="学员编号"></el-table-column>
  372. <el-table-column property="name"
  373. align="center"
  374. label="学员姓名"></el-table-column>
  375. <el-table-column property="phone"
  376. align="center"
  377. label="手机号"></el-table-column>
  378. </el-table>
  379. <div slot="footer"
  380. class="dialog-footer">
  381. <el-button @click="cancleAdd">取 消</el-button>
  382. <el-button type="primary"
  383. @click="submitAddStudent">确 定</el-button>
  384. </div>
  385. </el-dialog>
  386. <el-dialog width="700px"
  387. title="查看缴费详情"
  388. :visible.sync="detailVisible">
  389. <studentPayDetail :msgList='msgList'
  390. :titleForm='titleForm' />
  391. </el-dialog>
  392. </div>
  393. </template>
  394. <script>
  395. import axios from "axios";
  396. import { getToken } from "@/utils/auth";
  397. import pagination from "@/components/Pagination/index";
  398. import load from "@/utils/loading";
  399. import cleanDeep from "clean-deep";
  400. import qs from "qs";
  401. import { courseType } from '@/utils/searchArray'
  402. import { paymentPatternType } from '@/constant'
  403. import studentPayDetail from '../modals/studentPayDetail'
  404. import {
  405. findSound,
  406. getmusicGroupPaymentCalenderDetail,
  407. openMusicGroupPaymentCalenderDetailPayment,
  408. resetMusicGroupPaymentCalenderDetail,
  409. getMusicGroupPaymentCalenderDetail,
  410. queryCanAddStudent,
  411. addMusicGroupPaymentCalenderStudent,
  412. delMusicGroupPaymentCalenderStudent,
  413. } from "@/api/buildTeam";
  414. export default {
  415. components: { pagination, studentPayDetail },
  416. data () {
  417. return {
  418. searchForm: {
  419. search: null,
  420. subjectId: null,
  421. paymentStatus: null,
  422. musicGroupStatus: null,
  423. },
  424. teacherList: [],
  425. soundList: [],
  426. tableList: [{ studentId: 111 }],
  427. rules: {
  428. // 分页规则
  429. limit: 10, // 限制显示条数
  430. page: 1, // 当前页
  431. total: 0, // 总条数
  432. page_size: [10, 20, 40, 50], // 选择限制显示条数
  433. },
  434. payVisible: false,
  435. resetPayVisible: false,
  436. studentVisible: false,
  437. chioseStudent: null,
  438. studentList: [],
  439. pickerOptions: {
  440. disabledDate (time) {
  441. return time.getTime() + 86400000 <= new Date().getTime();
  442. },
  443. },
  444. payForm: {
  445. startDate: null,
  446. },
  447. resetPayForm: {
  448. momey: null,
  449. },
  450. activeChiose: [],
  451. id: null,
  452. ids: null,
  453. info: {
  454. paymentStatus: null,
  455. startPaymentDate: null,
  456. deadlinePaymentDate: null,
  457. expectNum: null,
  458. actualNum: null,
  459. sumActualAmount: null,
  460. },
  461. msgList: [],
  462. detailVisible: false,
  463. titleForm: {
  464. paymentType: "",
  465. musicGroupOrganizationCourseSettingId: "",
  466. paymentPattern: "",
  467. paymentValidStartDate: "",
  468. paymentValidEndDate: "",
  469. calenderSettingsName: "",
  470. },
  471. };
  472. },
  473. //生命周期 - 创建完成(可以访问当前this实例)
  474. created () { },
  475. //生命周期 - 挂载完成(可以访问DOM元素)
  476. mounted () {
  477. // 获取声部
  478. this.teamid = this.$route.query.id;
  479. findSound({ musicGroupId: this.teamid }).then((res) => {
  480. if (res.code == 200) {
  481. this.soundList = res.data;
  482. }
  483. });
  484. // 获取分部
  485. this.init();
  486. },
  487. activated () {
  488. this.teamid = this.$route.query.id;
  489. findSound({ musicGroupId: this.teamid }).then((res) => {
  490. if (res.code == 200) {
  491. this.soundList = res.data;
  492. }
  493. });
  494. this.init();
  495. },
  496. methods: {
  497. init () {
  498. this.getList();
  499. },
  500. getList () {
  501. this.id = this.$route.query.paymentId;
  502. // 获取缴费状态
  503. getMusicGroupPaymentCalenderDetail({ id: this.id }).then((res) => {
  504. if (res.code == 200) {
  505. this.info = {
  506. paymentStatus: res.data.calender.status,
  507. startPaymentDate: res.data.calender.startPaymentDate,
  508. deadlinePaymentDate: res.data.calender.deadlinePaymentDate,
  509. expectNum: res.data.calender.expectNum,
  510. actualNum: res.data.calender.actualNum,
  511. sumActualAmount: res.data.sumActualAmount,
  512. }
  513. this.titleForm = {
  514. paymentType: res.data.calender.paymentType,
  515. musicGroupOrganizationCourseSettingId: res.data.calenderSettingsName,
  516. paymentPattern: paymentPatternType[res.data.calender.paymentPattern],
  517. paymentValidStartDate: res.data.calender.paymentValidStartDate,
  518. paymentValidEndDate: res.data.calender.paymentValidEndDate,
  519. calenderSettingsName: res.data.calenderSettingsName,
  520. };
  521. this.msgList = res.data.musicGroupPaymentCalenderCourseSettings
  522. }
  523. });
  524. this.searchForm.id = this.id;
  525. this.searchForm.page = this.rules.page;
  526. this.searchForm.rows = this.rules.limit;
  527. getmusicGroupPaymentCalenderDetail(this.searchForm).then(
  528. (payment) => {
  529. if (payment.code == 200) {
  530. this.rules.total = payment.data.total;
  531. this.tableList = payment.data.rows;
  532. }
  533. }
  534. );
  535. },
  536. search () {
  537. this.rules.page = 1;
  538. this.getList();
  539. },
  540. onReSet () {
  541. this.searchForm = {
  542. search: null,
  543. subjectId: null,
  544. paymentStatus: null,
  545. };
  546. this.search();
  547. },
  548. checkSelect (val) {
  549. return val.paymentStatus == "NON_PAYMENT";
  550. },
  551. resetPay () {
  552. // this.activeRow = row;
  553. if (this.activeChiose.length < 1) {
  554. this.$message.error("请至少选择一名学员");
  555. return;
  556. }
  557. let ids = this.activeChiose.map((item) => {
  558. return item.id;
  559. });
  560. this.ids = ids.join(",");
  561. this.resetPayVisible = true;
  562. },
  563. // resetTime () {
  564. // this.payVisible = true;
  565. // },
  566. goBack () {
  567. let query = this.$route.query;
  568. if (query.type == 'resetTeam') {
  569. sessionStorage.setItem('resetCode', '3')
  570. }
  571. this.$router.go(-1)
  572. },
  573. handleSelectionChange (val) {
  574. this.activeChiose = val;
  575. console.log(val)
  576. },
  577. startPay () {
  578. if (this.activeChiose.length < 1) {
  579. this.$message.error("请至少选择一名学员");
  580. return;
  581. }
  582. // console.log(this.activeChiose)
  583. let ids = this.activeChiose.map((item) => {
  584. return item.id;
  585. });
  586. ids = ids.join(",");
  587. // console.log(ids)
  588. openMusicGroupPaymentCalenderDetailPayment({ ids }).then((res) => {
  589. if (res.code == 200) {
  590. this.$message.success(res.msg);
  591. this.getList();
  592. }
  593. });
  594. },
  595. submitReset () {
  596. let obj = {};
  597. obj.expectAmount = this.resetPayForm.momey;
  598. obj.ids = this.ids;
  599. resetMusicGroupPaymentCalenderDetail(obj).then((res) => {
  600. if (res.code == 200) {
  601. this.$message.success("修改成功");
  602. this.resetPayVisible = false;
  603. this.getList();
  604. }
  605. });
  606. },
  607. addStudentBtn () {
  608. console.log(
  609. "musicGroupId:",
  610. this.teamid,
  611. "musicGroupPaymentCalenderId:",
  612. this.id
  613. );
  614. // 获取无缴费学员
  615. queryCanAddStudent({
  616. musicGroupId: this.teamid,
  617. musicGroupPaymentCalenderId: this.id,
  618. }).then((res) => {
  619. if (res.code == 200) {
  620. this.studentList = res.data;
  621. this.studentVisible = true;
  622. }
  623. });
  624. },
  625. delStudentBtn () {
  626. if (this.activeChiose.length < 1) {
  627. this.$message.error("请至少选择一名学员");
  628. return;
  629. }
  630. this.$confirm(`是否删除此学员`, "提示", {
  631. confirmButtonText: "确定",
  632. cancelButtonText: "取消",
  633. type: "warning",
  634. })
  635. .then(() => {
  636. let musicGroupPaymentCalenderDetailIds = this.activeChiose
  637. .map((stu) => {
  638. return stu.id;
  639. })
  640. .join(",");
  641. delMusicGroupPaymentCalenderStudent({
  642. musicGroupPaymentCalenderDetailIds,
  643. }).then((res) => {
  644. if (res.code == 200) {
  645. this.$message.success(`删除成功`);
  646. this.getList();
  647. }
  648. });
  649. })
  650. .catch(() => { });
  651. },
  652. handleCurrentChange (val) {
  653. this.chioseStudent = val;
  654. },
  655. submitAddStudent () {
  656. if (!this.chioseStudent) {
  657. this.$message.error("请选择学员");
  658. return;
  659. }
  660. addMusicGroupPaymentCalenderStudent({
  661. musicGroupPaymentCalenderId: this.id,
  662. userId: this.chioseStudent.userId,
  663. }).then((res) => {
  664. if (res.code == 200) {
  665. this.$message.success("添加成功");
  666. this.studentVisible = false;
  667. this.getList();
  668. }
  669. });
  670. },
  671. onMusicGroupPaymentCalenderDetail () {
  672. let searchForm = this.searchForm;
  673. // 报表导出
  674. let url = "/api-web/export/musicGroupPaymentCalenderDetail";
  675. let data = {
  676. id: this.$route.query.paymentId,
  677. musicGroupId: this.$route.query.id,
  678. };
  679. const options = {
  680. method: "POST",
  681. headers: {
  682. Authorization: getToken(),
  683. },
  684. data: qs.stringify(cleanDeep(data)),
  685. url,
  686. responseType: "blob",
  687. };
  688. this.$confirm("您确定导出缴费记录", "提示", {
  689. confirmButtonText: "确定",
  690. cancelButtonText: "取消",
  691. type: "warning",
  692. })
  693. .then(() => {
  694. load.startLoading();
  695. axios(options)
  696. .then((res) => {
  697. let blob = new Blob([res.data], {
  698. type: "application/vnd.ms-excel;charset=utf-8",
  699. });
  700. let text = new Response(blob).text();
  701. text.then((res) => {
  702. // 判断是否报错
  703. if (res.indexOf("code") != -1) {
  704. let json = JSON.parse(res);
  705. this.$message.error(json.msg);
  706. } else {
  707. let objectUrl = URL.createObjectURL(blob);
  708. let link = document.createElement("a");
  709. let fname = "缴费导出" + new Date().getTime(); //下载文件的名字
  710. link.href = objectUrl;
  711. link.setAttribute("download", fname);
  712. document.body.appendChild(link);
  713. link.click();
  714. }
  715. });
  716. load.endLoading();
  717. })
  718. .catch((error) => {
  719. this.$message.error("导出数据失败,请联系管理员");
  720. load.endLoading();
  721. });
  722. })
  723. .catch(() => { });
  724. },
  725. cancleAdd (row) {
  726. this.$refs.singleTable.setCurrentRow(row);
  727. this.studentVisible = false;
  728. },
  729. },
  730. watch: {
  731. payVisible (val) {
  732. if (!val) {
  733. this.payForm = {
  734. startDate: null,
  735. };
  736. this.$refs["payForm"].resetFields();
  737. }
  738. },
  739. resetPayVisible (val) {
  740. if (!val) {
  741. this.resetPayForm = {
  742. momey: null,
  743. };
  744. }
  745. },
  746. },
  747. };
  748. </script>
  749. <style lang='scss' scoped>
  750. .studenTable {
  751. height: 300px;
  752. overflow: auto;
  753. }
  754. .infoMsg {
  755. margin: 30px 0;
  756. display: flex;
  757. flex-direction: row;
  758. justify-content: flex-start;
  759. text-align: center;
  760. .title {
  761. color: #999;
  762. font-size: 14px;
  763. line-height: 30px;
  764. min-width: 100px;
  765. }
  766. .status {
  767. font-size: 20px;
  768. }
  769. .left {
  770. width: 200px;
  771. display: flex;
  772. flex-direction: column;
  773. justify-content: center;
  774. height: 60px;
  775. margin-right: 200px;
  776. }
  777. .right {
  778. text-align: center;
  779. height: 60px;
  780. line-height: 30px;
  781. display: flex;
  782. flex-direction: row;
  783. justify-content: flex-start;
  784. .expectBox {
  785. width: 220px;
  786. border-right: 1px solid #ccc;
  787. &:nth-last-child(1) {
  788. border-right: none !important;
  789. }
  790. }
  791. .expectBox.first {
  792. width: 300px;
  793. }
  794. }
  795. }
  796. .wrap {
  797. display: flex;
  798. flex-direction: row;
  799. justify-content: flex-start;
  800. div {
  801. margin-right: 20px;
  802. }
  803. }
  804. .inputStyle {
  805. width: 180px;
  806. }
  807. </style>