studentPayList.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <template>
  2. <div>
  3. <!-- 搜索类型 -->
  4. <save-form
  5. :inline="true"
  6. class="searchForm"
  7. :model="searchForm"
  8. @submit="search"
  9. @reset="onReSet"
  10. save-key="studentDetail-studentPayList"
  11. >
  12. <el-form-item>
  13. <el-select
  14. v-model.trim="searchForm.attendanceStatus"
  15. filterable
  16. clearable
  17. placeholder="考勤状态"
  18. >
  19. <el-option
  20. v-for="(item, index) in attendanceStatus"
  21. :key="index"
  22. :label="item.label"
  23. :value="item.value"
  24. ></el-option>
  25. </el-select>
  26. </el-form-item>
  27. <el-form-item>
  28. <el-button native-type="submit" type="danger">搜索</el-button>
  29. <el-button native-type="reset" type="primary">重置</el-button>
  30. </el-form-item>
  31. </save-form>
  32. <!-- 列表 -->
  33. <div class="tableWrap">
  34. <el-table
  35. :data="tableList"
  36. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  37. >
  38. <el-table-column align="center" label="上课时间">
  39. <template slot-scope="scope">
  40. {{ scope.row.classDate }}
  41. {{ scope.row.startClassTime | timerForMinFormat }}
  42. </template>
  43. </el-table-column>
  44. <el-table-column align="center" label="课程类型">
  45. <template slot-scope="scope">
  46. {{ scope.row.classGroupType | coursesType }}
  47. </template>
  48. </el-table-column>
  49. <el-table-column align="center" prop="classGroupName" label="班级名称">
  50. </el-table-column>
  51. <el-table-column
  52. align="center"
  53. prop="currentClassTimes"
  54. label="当前课次"
  55. >
  56. <template slot-scope="scope">
  57. <div>
  58. {{
  59. scope.row.currentClassTimes + "/" + scope.row.totalClassTimes
  60. }}
  61. </div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column align="center" label="考勤状态">
  65. <template slot-scope="scope">
  66. {{ scope.row.status | clockingIn }}
  67. </template>
  68. </el-table-column>
  69. <el-table-column align="center" prop="expectPrice" label="预计扣费">
  70. <template slot-scope="scope">
  71. <div>
  72. {{ scope.row.expectPrice | moneyFormat }}
  73. </div>
  74. </template>
  75. </el-table-column>
  76. <el-table-column align="center" prop="actualPrice" label="实际扣费">
  77. <template slot-scope="scope">
  78. <div>
  79. {{ scope.row.actualPrice | moneyFormat }}
  80. </div>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. <pagination
  85. save-key="studentDetail-studentPayList"
  86. sync
  87. :total.sync="pageInfo.total"
  88. :page.sync="pageInfo.page"
  89. :limit.sync="pageInfo.limit"
  90. :page-sizes="pageInfo.page_size"
  91. @pagination="getList"
  92. />
  93. </div>
  94. </div>
  95. </template>
  96. <script>
  97. import pagination from "@/components/Pagination/index";
  98. import { queryStudentPayment } from "@/api/studentManager";
  99. import { attendanceStatus } from "@/utils/searchArray";
  100. import store from "@/store";
  101. export default {
  102. name: "studentPayList",
  103. components: { pagination },
  104. data() {
  105. return {
  106. organId: null,
  107. searchForm: {
  108. studentId: null,
  109. attendanceStatus: null,
  110. },
  111. attendanceStatus: attendanceStatus,
  112. pageInfo: {
  113. // 分页规则
  114. limit: 10, // 限制显示条数
  115. page: 1, // 当前页
  116. total: 0, // 总条数
  117. page_size: [10, 20, 40, 50], // 选择限制显示条数
  118. },
  119. tableList: [],
  120. };
  121. },
  122. mounted() {
  123. this.searchForm.studentId = this.$route.query.userId;
  124. this.getList();
  125. },
  126. activated() {
  127. this.searchForm.studentId = this.$route.query.userId;
  128. this.getList();
  129. },
  130. methods: {
  131. search() {
  132. this.pageInfo.page = 1;
  133. this.getList();
  134. },
  135. getList() {
  136. let params = this.searchForm;
  137. params.rows = this.pageInfo.limit;
  138. params.page = this.pageInfo.page;
  139. queryStudentPayment(params).then((res) => {
  140. if (res.code == 200) {
  141. this.tableList = res.data.rows;
  142. this.pageInfo.total = res.data.total;
  143. }
  144. });
  145. },
  146. onReSet() {
  147. // 重置搜索
  148. this.searchForm = {
  149. studentId: this.$route.query.userId,
  150. attendanceStatus: null,
  151. };
  152. },
  153. },
  154. };
  155. </script>
  156. <style lang="scss">
  157. </style>