resetPayListSchool.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751
  1. <!-- -->
  2. <template>
  3. <div class="m-core">
  4. <el-form :inline="true"
  5. :model="searchForm">
  6. <el-form-item>
  7. <el-select placeholder="缴费类型"
  8. v-model="searchForm.paymentType"
  9. clearable
  10. filterable>
  11. <el-option v-for="(item, index) in payOrderTypeList"
  12. :label="item.label"
  13. :value="item.value"
  14. :key="index"></el-option>
  15. </el-select>
  16. </el-form-item>
  17. <el-form-item>
  18. <el-button type="danger"
  19. @click="getList">搜索</el-button>
  20. <!-- <el-button @click="onReSet" type="primary">重置</el-button> -->
  21. </el-form-item>
  22. </el-form>
  23. <div class="topWrap">
  24. <div class="newBand"
  25. @click="newSchoolPay"
  26. v-if="teamStatus"
  27. v-permission="'musicGroupPaymentCalender/add'">新建学校缴费</div>
  28. <div class="newBand"
  29. v-permission="'/studentPayBase'"
  30. v-if="teamStatus"
  31. @click="setStudentPay">学员缴费设置</div>
  32. <!-- <div class="newBand"
  33. v-if="!isNewGropu"
  34. @click="onCreateQRCode">续费二维码</div> -->
  35. </div>
  36. <div class="tableWrap">
  37. <el-table style="width: 100%"
  38. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  39. :data="tableList">
  40. <el-table-column align="center"
  41. prop="batchNo"
  42. width="200"
  43. label="订单编号"></el-table-column>
  44. <el-table-column align="center"
  45. prop="paymentType"
  46. label="缴费类型">
  47. <template slot-scope="scope">
  48. <div>
  49. {{ scope.row.paymentType | userPaymentTypeFormat }}
  50. </div>
  51. </template>
  52. </el-table-column>
  53. <el-table-column align="center"
  54. prop="paymentPattern"
  55. label="缴费方式">
  56. <template slot-scope="scope">
  57. <div>
  58. {{ scope.row.paymentPattern | teamPayStatus }}
  59. </div>
  60. </template>
  61. </el-table-column>
  62. <el-table-column align="center"
  63. prop="addCourseTotalTime"
  64. width="150px"
  65. label="加课总时长">
  66. </el-table-column>
  67. <el-table-column align="center"
  68. width="150px"
  69. prop="courseCurrentPrice"
  70. label="现价">
  71. <template slot-scope="scope">
  72. <div>
  73. {{ scope.row.courseCurrentPrice | moneyFormat }}
  74. </div>
  75. </template>
  76. </el-table-column>
  77. <!-- <el-table-column align="center"
  78. prop="status"
  79. label="缴费状态">
  80. <template slot-scope="scope">
  81. <div>
  82. {{ scope.row.status | payTypeStatus }}
  83. </div>
  84. </template>
  85. </el-table-column> -->
  86. <el-table-column align="center"
  87. prop="operatorName"
  88. label="责任人">
  89. </el-table-column>
  90. <el-table-column align="center"
  91. prop="memo"
  92. width="200px"
  93. label="备注">
  94. <template slot-scope="scope">
  95. <overflow-text width="200px" :text="scope.row.memo"/>
  96. </template>
  97. </el-table-column>
  98. <el-table-column label="操作"
  99. fixed="right"
  100. min-width="60px">
  101. <template slot-scope="scope">
  102. <div>
  103. <el-button type="text"
  104. @click="lookList(scope.row)"
  105. v-permission="'musicGroupPaymentCalender/queryPage'">查看</el-button>
  106. <!-- <el-button type="text"
  107. @click="lookDetail(scope.row)"
  108. v-permission="'musicGroupPaymentCalender/auditListDetail'">查看</el-button> -->
  109. <!-- <el-button type="text"
  110. @click="openChioseStudent(scope.row)"
  111. v-if="scope.row.status != 'REJECT' && scope.row.status != 'AUDITING'&&teamStatus && scope.row.paymentType != 'MUSIC_APPLY' && scope.row.paymentType != 'ADD_STUDENT'"
  112. v-permission="'musicGroupPaymentCalenderDetail/batchAdd'">添加学员</el-button>
  113. <el-button type="text"
  114. v-if="scope.row.status == 'REJECT'&&teamStatus"
  115. v-permission="'musicGroupPaymentCalender/update'"
  116. @click="resetPay(scope.row)">修改</el-button>
  117. <el-button type="text"
  118. v-if="!isNewGropu&&teamStatus&&scope.row.paymentType!='MUSIC_APPLY'"
  119. @click="onCreateQRCode(scope.row)">续费二维码</el-button>
  120. <el-button type="text"
  121. v-if="isNewGropu"
  122. v-permission="'musicGroup/findMusicGroupSubjectInfo/966'"
  123. @click="onPreview(scope.row)">预览</el-button> -->
  124. </div>
  125. </template>
  126. </el-table-column>
  127. </el-table>
  128. <pagination :total="rules.total"
  129. :page.sync="rules.page"
  130. :limit.sync="rules.limit"
  131. :page-sizes="rules.page_size"
  132. @pagination="getList" />
  133. </div>
  134. <el-dialog :visible.sync="payVisible"
  135. :close-on-click-modal="false"
  136. width="500px"
  137. :title="diTitle">
  138. <el-form :model="payForm"
  139. :inline="true"
  140. label-width="120px"
  141. label-position="right"
  142. ref="payForm">
  143. <el-form-item label="缴费开始日期"
  144. :rules="[
  145. { required: true, message: '请设置缴费开始日期', trigger: 'blur' },
  146. ]"
  147. prop="startPaymentDate">
  148. <el-date-picker v-model.trim="payForm.startPaymentDate"
  149. @change="changeStartTime"
  150. type="date"
  151. :picker-options="pickerOptions"
  152. value-format="yyyy-MM-dd"
  153. placeholder="开始日期"></el-date-picker>
  154. </el-form-item>
  155. <el-form-item label="缴费结束日期"
  156. :rules="[
  157. { required: true, message: '请设置缴费结束日期', trigger: 'blur' },
  158. ]"
  159. prop="deadlinePaymentDate">
  160. <el-date-picker v-model.trim="payForm.deadlinePaymentDate"
  161. type="date"
  162. :picker-options="beginDate(payForm.startPaymentDate)"
  163. value-format="yyyy-MM-dd"
  164. placeholder="结束日期"></el-date-picker>
  165. </el-form-item>
  166. <el-form-item label="缴费方式"
  167. prop="paymentPattern"
  168. :rules="[{ required: true, message: '请选择缴费方式' }]">
  169. <el-select placeholder="缴费方式"
  170. style="width: 220px"
  171. clearable
  172. filterable
  173. @change="paymentPatternChange"
  174. v-model.trim="payForm.paymentPattern">
  175. <el-option :value="0"
  176. label="按月"></el-option>
  177. <el-option :value="1"
  178. label="按季"></el-option>
  179. <el-option :value="2"
  180. label="一次性"></el-option>
  181. </el-select>
  182. </el-form-item>
  183. <el-form-item label="缴费有效期开始"
  184. :rules="[
  185. {
  186. required: true,
  187. message: '请设置缴费有效期开始日期',
  188. trigger: 'blur',
  189. },
  190. ]"
  191. prop="paymentValidStartDate">
  192. <el-date-picker v-model.trim="payForm.paymentValidStartDate"
  193. type="date"
  194. @change="changePaymentStartTime"
  195. :picker-options="pickerOptions"
  196. value-format="yyyy-MM-dd"
  197. placeholder="有效期开始日期"></el-date-picker>
  198. </el-form-item>
  199. <el-form-item label="缴费有效期结束"
  200. :rules="[
  201. {
  202. required: payForm.paymentPattern !== 2,
  203. message: '请设置缴费有效期结束日期',
  204. trigger: 'blur',
  205. },
  206. ]"
  207. prop="paymentValidEndDate">
  208. <el-date-picker v-model.trim="payForm.paymentValidEndDate"
  209. type="date"
  210. :disabled="payForm.paymentPattern === 2"
  211. :picker-options="beginDate(payForm.paymentValidStartDate)"
  212. value-format="yyyy-MM-dd"
  213. placeholder="有效期结束日期"></el-date-picker>
  214. </el-form-item>
  215. <el-form-item label="收费类型"
  216. v-if="isNew"
  217. :rules="[
  218. { required: true, message: '请选择收费类型', trigger: 'blur' },
  219. ]"
  220. prop="type">
  221. <el-select v-model.trim="payForm.type"
  222. style="width: 220px !important"
  223. placeholder="课程类型">
  224. <el-option label="线上"
  225. value="ONLINE"></el-option>
  226. <el-option label="线下"
  227. value="OFFLINE"></el-option>
  228. </el-select>
  229. </el-form-item>
  230. <el-form-item label="备注"
  231. v-if="isNew"
  232. :rules="[{ required: true, message: '请填写备注', trigger: 'blur' }]"
  233. prop="memo">
  234. <el-input type="textarea"
  235. style="width: 220px !important"
  236. :rows="4"
  237. placeholder="请填写备注"
  238. v-model="payForm.memo"></el-input>
  239. </el-form-item>
  240. </el-form>
  241. <div slot="footer"
  242. class="dialog-footer">
  243. <el-button @click="payVisible = false">取 消</el-button>
  244. <el-button type="primary"
  245. v-if="isNew"
  246. @click="newPayInfo">确 定</el-button>
  247. <el-button type="primary"
  248. v-else
  249. @click="resetPayDate">确 定</el-button>
  250. </div>
  251. </el-dialog>
  252. <el-dialog
  253. :visible.sync="itemsVisible"
  254. title="查看缴费计划"
  255. width="1000px"
  256. >
  257. <pay-items
  258. v-if="itemsVisible"
  259. :batchNo="viewDetail && viewDetail.batchNo"
  260. payUserType="STUDENT"
  261. :teamStatus="teamStatus"
  262. :teamType="teamType"
  263. @lookDetail="lookDetail"
  264. @openChioseStudent="openChioseStudent"
  265. @resetPay="resetPay"
  266. @close="itemsVisible = false"
  267. />
  268. </el-dialog>
  269. <el-dialog title="查看"
  270. :visible.sync="reviewVisible"
  271. width="900px"
  272. destroy-on-close>
  273. <reviewDetail @close="reviewVisible = false"
  274. @submited="getList"
  275. :detail="viewDetail"
  276. :musicGroupId="$route.query.id"
  277. destroy-on-close />
  278. <div slot="footer"
  279. class="dialog-footer">
  280. <el-button type="primary"
  281. @click="reviewVisible = false">关闭</el-button>
  282. </div>
  283. </el-dialog>
  284. <el-dialog :title="payFormTitle"
  285. :visible.sync="userVisible"
  286. width="830px">
  287. <userPayForm v-if="userVisible"
  288. @close="userVisible = false"
  289. @submited="payedSubmited"
  290. @changeActive="$listeners.changeActive"
  291. :organizationCourseUnitPriceSettings="organizationCourseUnitPriceSettings"
  292. :rowDetail='activeRow'
  293. :type="payFormType"
  294. :baseInfo="baseInfo"
  295. :paymentType="isNewGropu ? 0 : undefined"
  296. :musicGroupId="$route.query.id" />
  297. </el-dialog>
  298. <el-dialog title="学员选择"
  299. :visible.sync="chioseStudentVisible"
  300. destroy-on-close
  301. append-to-body
  302. width='800px'>
  303. <setStudentFee @chioseStudent='chioseStudent'
  304. ref='setStudentFee'
  305. :musicGroupPaymentCalenderId="musicGroupPaymentCalenderId"
  306. @submited="chioseStudentSubmited"
  307. :clearTale="clearStduent"></setStudentFee>
  308. <div slot="footer"
  309. class="dialog-footer">
  310. <el-button @click="chioseStudentVisible = false">取 消</el-button>
  311. <el-button type="primary"
  312. @click="submitNewPay">确 定</el-button>
  313. </div>
  314. </el-dialog>
  315. <qr-code v-model="qrcodeStatus"
  316. title="续费二维码"
  317. :codeUrl="codeUrl" />
  318. <el-dialog title="确认收款"
  319. :visible.sync="getMoneyVisible"
  320. width='600px'>
  321. <isGetMoney @close="closeMoney"
  322. :data="activeRow"
  323. ref='getMoney' />
  324. <div slot="footer"
  325. class="dialog-footer">
  326. <el-button @click="getMoneyVisible=false">取 消</el-button>
  327. <el-button type="primary"
  328. @click="submitGetMoney">确 定</el-button>
  329. </div>
  330. </el-dialog>
  331. </div>
  332. </template>
  333. <script>
  334. import axios from "axios";
  335. import { getToken } from "@/utils/auth";
  336. import pagination from "@/components/Pagination/index";
  337. import load from "@/utils/loading";
  338. import qs from "qs";
  339. import dayjs from 'dayjs'
  340. import QrCode from "@/components/QrCode/index";
  341. import { vaildStudentUrl } from '@/utils/validate'
  342. import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender } from "@/api/buildTeam";
  343. import {
  344. getOrganizationCourseUnitPriceSettings
  345. } from '@/api/specialSetting'
  346. import { getAuditList } from '@/api/auditManager'
  347. import { musicGroupPaymentCalenderQueryPage, getMusicGroupStu, musicGroupPaymentCalenderDetailBatchAdd } from '../api'
  348. import setStudentFee from './studentPayBase'
  349. import userPayForm from '../modals/user-pay-form'
  350. import payItems from '../modals/pay-items'
  351. import schoolPayForm from '../modals/school-pay-form'
  352. import isGetMoney from '../modals/isGetMoney'
  353. import review from '../modals/review'
  354. import reviewDetail from '../modals/review-detail'
  355. import { userPaymentType } from '@/constant'
  356. import { objectToOptions } from '@/utils'
  357. import { payOrderTypeList } from "@/utils/searchArray";
  358. export default {
  359. props: ["baseInfo", "isNewGropu"],
  360. components: {
  361. pagination,
  362. setStudentFee,
  363. userPayForm,
  364. schoolPayForm,
  365. QrCode,
  366. review,
  367. reviewDetail,
  368. teamType: '',
  369. 'pay-items': payItems,
  370. isGetMoney
  371. },
  372. data () {
  373. return {
  374. musicGroupStu: [],
  375. payFormType: "user",
  376. userVisible: false,
  377. schoolVisible: false,
  378. reviewVisible: false,
  379. itemsVisible: false,
  380. teamType: this.$route.query.type,
  381. organizationCourseUnitPriceSettings: [],
  382. searchForm: {
  383. paymentType: null,
  384. },
  385. viewDetail: null,
  386. tableList: [],
  387. rules: {
  388. // 分页规则
  389. limit: 10, // 限制显示条数
  390. page: 1, // 当前页
  391. total: 0, // 总条数
  392. page_size: [10, 20, 40, 50], // 选择限制显示条数
  393. },
  394. isInit: false,
  395. diTitle: "新增缴费",
  396. payVisible: false,
  397. payForm: {
  398. startPaymentDate: null,
  399. deadlinePaymentDate: null,
  400. paymentPattern: null,
  401. paymentValidStartDate: null,
  402. paymentValidEndDate: null,
  403. type: null,
  404. memo: null,
  405. },
  406. isNew: false,
  407. activeRow: null,
  408. pickerOptions: {
  409. firstDayOfWeek: 1,
  410. disabledDate (time) {
  411. return time.getTime() + 86400000 <= new Date().getTime();
  412. },
  413. },
  414. qrcodeStatus: false, // 生成二维码
  415. codeUrl: null,
  416. chioseStudentVisible: false,
  417. chioseStudentList: [],
  418. clearStduent: true,
  419. musicGroupPaymentCalenderId: "",
  420. payOrderTypeLists: payOrderTypeList,
  421. getMoneyVisible: false
  422. };
  423. },
  424. //生命周期 - 创建完成(可以访问当前this实例)
  425. created () { },
  426. //生命周期 - 挂载完成(可以访问DOM元素)
  427. async mounted () {
  428. // 获取分部
  429. try {
  430. const res = await getOrganizationCourseUnitPriceSettings({
  431. rows: 9999
  432. })
  433. this.organizationCourseUnitPriceSettings = res.data.rows
  434. } catch (error) { }
  435. this.init();
  436. },
  437. computed: {
  438. payOrderTypeList () {
  439. return objectToOptions(userPaymentType);
  440. },
  441. payFormTitle () {
  442. if (this.isNew) {
  443. return this.payFormType === "user" ? "新增学员缴费" : "新增学校缴费";
  444. } else {
  445. return this.payFormType === "user" ? "修改学员缴费" : "修改学校缴费";
  446. }
  447. },
  448. teamStatus () {
  449. let type = this.$route.query.type;
  450. return type == 'teamDraft' || type == 'resetTeam'
  451. }
  452. },
  453. activated () {
  454. this.init();
  455. },
  456. methods: {
  457. async init () {
  458. try {
  459. const res = await getMusicGroupStu({
  460. musicGroupId: this.$route.query.id,
  461. });
  462. } catch (error) { }
  463. this.getList();
  464. },
  465. newUserPay () {
  466. this.payFormType = "user";
  467. this.isNew = true;
  468. this.activeRow = null
  469. this.userVisible = true;
  470. },
  471. newSchoolPay () {
  472. this.payFormType = "school";
  473. this.isNew = true;
  474. this.activeRow = null
  475. this.userVisible = true;
  476. },
  477. getList () {
  478. let musicGroupId = this.$route.query.id
  479. return getAuditList({
  480. page: this.rules.page,
  481. rows: this.rules.limit,
  482. search: musicGroupId,
  483. payUserType: 'SCHOOL',
  484. paymentType: this.searchForm.paymentType,
  485. }).then(res => {
  486. if (res.code == 200) {
  487. this.rules.total = res.data.total;
  488. this.tableList = res.data.rows;
  489. }
  490. });
  491. },
  492. paymentPatternChange (val) {
  493. if (val === 2) {
  494. this.payForm.paymentValidEndDate = null;
  495. }
  496. },
  497. onCreateQRCode (row) { // 生成报名二维码
  498. this.qrcodeStatus = true
  499. this.codeUrl = vaildStudentUrl() + '/#/musicGroupRenew?calenderId=' + row.id
  500. },
  501. chioseStudent (val) {
  502. this.chioseStudentList = val;
  503. },
  504. newPay () {
  505. this.diTitle = "新增缴费";
  506. this.isNew = true;
  507. this.payVisible = true;
  508. },
  509. resetPay (row) {
  510. this.diTitle = "修改缴费";
  511. this.isNew = false;
  512. this.activeRow = row;
  513. this.payFormType = row.payUserType === 'SCHOOL' ? 'school' : 'user'
  514. this.userVisible = true;
  515. },
  516. async chioseStudentSubmited () {
  517. try {
  518. await this.$confirm('缴费创建完成, 是否立即排课?', '提示', {
  519. confirmButtonText: '确定',
  520. cancelButtonText: '取消',
  521. type: 'warning'
  522. })
  523. if (this.$listeners.changeActive) {
  524. this.$listeners.changeActive({
  525. name: '5'
  526. })
  527. }
  528. } catch (error) { }
  529. },
  530. detelePay (row) {
  531. let id = row.id;
  532. this.$confirm(`确定删除该缴费周期?`, "提示", {
  533. confirmButtonText: "确定",
  534. cancelButtonText: "取消",
  535. type: "warning",
  536. })
  537. .then(() => {
  538. delMusicGroupPaymentCalender({ id }).then((res) => {
  539. if (res.code == 200) {
  540. this.$message.success("删除成功");
  541. this.getList();
  542. }
  543. });
  544. })
  545. .catch(() => { });
  546. },
  547. lookList(row) {
  548. this.viewDetail = row
  549. this.itemsVisible = true
  550. },
  551. lookDetail (row) {
  552. let query = this.$route.query;
  553. this.$route.query.paymentId = row.id;
  554. this.viewDetail = row;
  555. if (row.payUserType === "SCHOOL") {
  556. this.reviewVisible = true;
  557. } else {
  558. this.$router.push({ path: "/business/strudentPayInfo", query });
  559. }
  560. },
  561. setStudentPay () {
  562. let query = this.$route.query;
  563. this.$router.push({ path: "/business/studentPayBase", query });
  564. },
  565. newPayInfo () {
  566. this.$refs["payForm"].validate((res) => {
  567. if (res) {
  568. /**
  569. * payForm: {
  570. startPaymentDate: null,
  571. deadlinePaymentDate: null,
  572. type: null,
  573. memo: null
  574. },
  575. *
  576. */
  577. this.chioseStudentVisible = true;
  578. return;
  579. }
  580. });
  581. },
  582. submitNewPay () {
  583. if (this.chioseStudentList.length < 1) {
  584. this.$message.error("请至少选择一名学员");
  585. return;
  586. }
  587. let obj = {};
  588. obj.userIdList = this.chioseStudentList.map((stu) => {
  589. return stu.userId;
  590. });
  591. obj.musicGroupPaymentCalenderId = this.musicGroupPaymentCalenderId;
  592. musicGroupPaymentCalenderDetailBatchAdd(obj).then((res) => {
  593. if (res.code == 200) {
  594. this.$message.success("添加成功");
  595. this.$refs.setStudentFee.clearTable();
  596. this.payVisible = false;
  597. this.chioseStudentVisible = false;
  598. this.getList();
  599. }
  600. });
  601. },
  602. resetPayDate () {
  603. resetMusicGroupPaymentCalender({
  604. id: this.activeRow.id,
  605. startPaymentDate: this.payForm.startPaymentDate,
  606. deadlinePaymentDate: this.payForm.deadlinePaymentDate,
  607. paymentValidStartDate: this.payForm.paymentValidStartDate
  608. ? dayjs(this.payForm.paymentValidStartDate).format("YYYY-MM-DD")
  609. : this.payForm.paymentValidStartDate,
  610. paymentValidEndDate: this.payForm.paymentValidEndDate
  611. ? dayjs(this.payForm.paymentValidEndDate).format("YYYY-MM-DD")
  612. : this.payForm.paymentValidEndDate,
  613. paymentPattern: this.payForm.paymentPattern,
  614. }).then((res) => {
  615. if (res.code == 200) {
  616. this.$message.success("修改成功");
  617. this.payVisible = false;
  618. this.getList();
  619. }
  620. });
  621. },
  622. changeStartTime (val) {
  623. this.payForm.deadlinePaymentDate = this.dateAddDays(val, 3);
  624. },
  625. changePaymentStartTime (val) {
  626. this.payForm.paymentValidEndDate = null;
  627. },
  628. dateAddDays (dataStr, dayCount) {
  629. let strdate = dataStr; //日期字符串
  630. let isdate = new Date(strdate.replace(/-/g, "/")); //把日期字符串转换成日期格式
  631. isdate = new Date((isdate / 1000 + 86400 * dayCount) * 1000); //日期加1天
  632. let pdate =
  633. isdate.getFullYear() +
  634. "-" +
  635. (isdate.getMonth() + 1) +
  636. "-" +
  637. isdate.getDate(); //把日期格式转换成字符串
  638. return pdate;
  639. },
  640. beginDate (end) {
  641. return {
  642. firstDayOfWeek: 1,
  643. disabledDate (time) {
  644. if (end) {
  645. return new Date(end).getTime() - 86400000 >= time.getTime();
  646. } else {
  647. return time.getTime() + 86400000 < Date.now();
  648. //开始时间不选时,结束时间最大值小于等于当天
  649. }
  650. },
  651. };
  652. },
  653. search () {
  654. this.rules.page = 1;
  655. this.getList();
  656. },
  657. onReSet () {
  658. this.searchForm = { payUserType: null };
  659. },
  660. openChioseStudent (row) {
  661. this.chioseStudentVisible = true;
  662. this.musicGroupPaymentCalenderId = row.id;
  663. },
  664. async payedSubmited (data) {
  665. try {
  666. await this.getList();
  667. // if (!this.isNewGropu) {
  668. // this.chioseStudentVisible = true;
  669. // if (data) {
  670. // this.musicGroupPaymentCalenderId = data.musicGroupPaymentCalenderId;
  671. // }
  672. // }
  673. } catch (error) { }
  674. },
  675. commmitGetMoney (row) {
  676. this.activeRow = row;
  677. this.getMoneyVisible = true;
  678. },
  679. submitGetMoney () {
  680. this.$refs.getMoney.submitGetMoney()
  681. },
  682. closeMoney () {
  683. this.getMoneyVisible = false;
  684. this.getList()
  685. }
  686. },
  687. watch: {
  688. chioseStudentVisible () {
  689. this.chioseStudentList = [];
  690. },
  691. payVisible (val) {
  692. if (!val) {
  693. this.payForm = {
  694. startPaymentDate: null,
  695. paymentPattern: null,
  696. paymentValidStartDate: null,
  697. paymentValidEndDate: null,
  698. type: null,
  699. memo: null,
  700. deadlinePaymentDate: null,
  701. };
  702. this.$refs["payForm"].resetFields();
  703. }
  704. },
  705. },
  706. };
  707. </script>
  708. <style lang='scss' scoped>
  709. .topWrap {
  710. display: flex;
  711. flex-direction: row;
  712. justify-content: flex-start;
  713. div {
  714. margin-right: 10px;
  715. }
  716. }
  717. .left-code,
  718. .right-code {
  719. // width: 50%;
  720. // float: left;
  721. h2 {
  722. font-size: 18px;
  723. text-align: center;
  724. padding-bottom: 8px;
  725. }
  726. .qrcode {
  727. display: flex;
  728. flex-direction: column;
  729. align-items: center;
  730. img {
  731. width: 200px;
  732. height: 200px;
  733. margin: 0 auto;
  734. }
  735. }
  736. .code-url {
  737. font-size: 18px;
  738. text-align: center;
  739. padding: 15px 15px 0 15px;
  740. }
  741. }
  742. </style>