studentGroupRecord.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>
  5. 团练宝缴费记录
  6. </h2>
  7. <div class="m-core">
  8. <el-form :inline="true" :model="searchForm">
  9. <el-form-item prop="period">
  10. <el-select
  11. placeholder="团练宝单位"
  12. clearable
  13. v-model.trim="searchForm.period"
  14. style="width: 100% !important"
  15. >
  16. <el-option label="月度" value="MONTH"></el-option>
  17. <el-option label="季度" value="QUARTERLY"></el-option>
  18. <el-option label="半年" value="YEAR_HALF"></el-option>
  19. <el-option label="年度" value="YEAR"></el-option>
  20. <!-- <el-option label="固定天数" value="DAY"></el-option> -->
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item prop="visitTime">
  24. <el-date-picker
  25. v-model.trim="searchForm.visitTime"
  26. style="width: 410px"
  27. type="daterange"
  28. :picker-options="{
  29. firstDayOfWeek: 1,
  30. }"
  31. :default-time="['00:00:00', '23:59:59']"
  32. range-separator="至"
  33. start-placeholder="创建开始日期"
  34. end-placeholder="创建结束日期"
  35. ></el-date-picker>
  36. </el-form-item>
  37. <el-form-item>
  38. <el-button @click="search" type="danger">搜索</el-button>
  39. <el-button @click="onReSet" type="primary">重置</el-button>
  40. </el-form-item>
  41. </el-form>
  42. <div class="tableWrap">
  43. <el-table
  44. style="width: 100%"
  45. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  46. :data="tableList"
  47. >
  48. <el-table-column
  49. align="center"
  50. prop="id"
  51. label="续费编号"
  52. ></el-table-column>
  53. <el-table-column align="center" prop="name" label="团练宝单位">
  54. <template slot-scope="scope">
  55. {{ scope.row.period | memberEnumType }}
  56. </template>
  57. </el-table-column>
  58. <el-table-column align="center" prop="memberNum" label="周期数">
  59. </el-table-column>
  60. <el-table-column
  61. align="center"
  62. prop="subjectName"
  63. label="缴费金额(元)"
  64. >
  65. <template slot-scope="scope">
  66. {{ scope.row.actualAmount | hasMoneyFormat }}
  67. </template>
  68. </el-table-column>
  69. <el-table-column
  70. align="center"
  71. prop="type"
  72. label="已缴费人数/总人数"
  73. >
  74. <template slot-scope="scope">
  75. {{ scope.row.paymentUserNum }}/{{ scope.row.userNum }}
  76. </template>
  77. </el-table-column>
  78. <el-table-column
  79. align="center"
  80. label="创建人"
  81. prop="operatorName"
  82. >
  83. </el-table-column>
  84. <el-table-column
  85. align="center"
  86. prop="createTime"
  87. label="创建时间"
  88. ></el-table-column>
  89. <el-table-column
  90. align="center"
  91. prop="remark"
  92. label="备注"
  93. ></el-table-column>
  94. <el-table-column align="center"
  95. label="操作">
  96. <template slot-scope="scope">
  97. <el-button type="text" v-if="$helpers.permission('studentCloudCoachPaymentDetails/queryPage')" @click="onDetail(scope.row)">详情</el-button>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. <pagination
  102. sync
  103. :total.sync="rules.total"
  104. :page.sync="rules.page"
  105. :limit.sync="rules.limit"
  106. :page-sizes="rules.page_size"
  107. @pagination="getList"
  108. />
  109. </div>
  110. </div>
  111. <el-dialog
  112. title="激活会员"
  113. :visible.sync="recordVisible"
  114. width="1000px"
  115. v-if="recordVisible"
  116. append-to-body
  117. >
  118. <recordDetail :detail="selectDetail" @close="recordVisible = false" />
  119. </el-dialog>
  120. </div>
  121. </template>
  122. <script>
  123. import pagination from "@/components/Pagination/index";
  124. import { queryInactive } from '@/views/resetTeaming/api'
  125. import recordDetail from '@/views/studentManager/modals/recordDetail'
  126. import { cloudCoachPaymentProgramQueryPage } from './api'
  127. import { getTimes } from "@/utils";
  128. export default {
  129. components: { pagination, recordDetail },
  130. data() {
  131. return {
  132. recordVisible: false,
  133. searchForm: {
  134. visitTime: [],
  135. period: null,
  136. },
  137. tableList: [],
  138. rules: {
  139. // 分页规则
  140. limit: 10, // 限制显示条数
  141. page: 1, // 当前页
  142. total: 0, // 总条数
  143. page_size: [10, 20, 40, 50], // 选择限制显示条数
  144. },
  145. selectDetail: null,
  146. };
  147. },
  148. mounted() {
  149. this.getList()
  150. },
  151. methods: {
  152. async getList() {
  153. try {
  154. const { visitTime, ...search } = this.searchForm
  155. const res = await cloudCoachPaymentProgramQueryPage({
  156. ...search,
  157. ...getTimes(visitTime, ["startTime", "endTime"]),
  158. page: this.rules.page,
  159. rows: this.rules.limit,
  160. });
  161. this.rules.total = res.data.total;
  162. this.tableList = res.data.rows;
  163. } catch (e) { }
  164. },
  165. search() {
  166. this.rules.page = 1;
  167. this.getList();
  168. },
  169. onReSet() {
  170. this.searchForm = {
  171. visitTime: [],
  172. period: null,
  173. }
  174. this.search()
  175. },
  176. onDetail(row) {
  177. this.selectDetail = row
  178. this.recordVisible = true
  179. }
  180. },
  181. };
  182. </script>