index.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <div class="squrt"></div>欠费学员列表 <filter-search @reload="FetchList" :keys="['visitFlag']"/>
  5. </h2>
  6. <div class="m-core">
  7. <save-form
  8. :inline="true"
  9. @submit="submit"
  10. @reset="onReSet"
  11. ref="searchForm"
  12. :model.sync="searchForm"
  13. >
  14. <el-form-item>
  15. <el-input
  16. v-model.trim="searchForm.search"
  17. clearable
  18. placeholder="学员(乐团)编号"
  19. ></el-input>
  20. </el-form-item>
  21. <el-form-item>
  22. <el-select
  23. v-model.trim="searchForm.organId"
  24. clearable
  25. filterable
  26. placeholder="请选择所属分部"
  27. >
  28. <el-option
  29. v-for="(item, index) in selects.branchs"
  30. :key="index"
  31. :label="item.name"
  32. :value="item.id"
  33. ></el-option>
  34. </el-select>
  35. </el-form-item>
  36. <el-form-item>
  37. <el-select
  38. v-model.trim="searchForm.schoolId"
  39. clearable
  40. filterable
  41. placeholder="请选择教学点"
  42. >
  43. <el-option
  44. v-for="(item, index) in selects.schools"
  45. :key="index"
  46. :value="item.id"
  47. :label="item.name"
  48. ></el-option>
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item>
  52. <remote-search
  53. :commit="'setEducations'"
  54. v-model="searchForm.eduTeacherId"
  55. />
  56. </el-form-item>
  57. <el-form-item>
  58. <el-button native-type="submit" type="danger">搜索</el-button>
  59. <el-button native-type="reset" type="primary">重置</el-button>
  60. </el-form-item>
  61. </save-form>
  62. <el-table
  63. :data="list"
  64. style="width: 100%"
  65. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  66. >
  67. <el-table-column
  68. prop="userId"
  69. label="学员编号"
  70. >
  71. <copy-text slot-scope="scope">{{scope.row.userId}}</copy-text>
  72. </el-table-column>
  73. <el-table-column
  74. prop="studentName"
  75. label="学员姓名"
  76. >
  77. <copy-text slot-scope="scope">{{scope.row.studentName}}</copy-text>
  78. </el-table-column>
  79. <el-table-column
  80. prop="organName"
  81. label="所属分部"
  82. >
  83. <copy-text slot-scope="scope">{{scope.row.organName}}</copy-text>
  84. </el-table-column>
  85. <el-table-column
  86. prop="cooperationName"
  87. label="合作单位"
  88. >
  89. <copy-text slot-scope="scope">{{scope.row.cooperationName}}</copy-text>
  90. </el-table-column>
  91. <el-table-column
  92. prop="musicGroupName"
  93. label="所在乐团"
  94. >
  95. <copy-text slot-scope="scope">{{scope.row.musicGroupName}}</copy-text>
  96. </el-table-column>
  97. <el-table-column
  98. prop="eduTeacherName"
  99. label="乐团主管"
  100. >
  101. <copy-text slot-scope="scope">{{scope.row.eduTeacherName}}</copy-text>
  102. </el-table-column>
  103. <el-table-column
  104. prop="subjectName"
  105. label="声部"
  106. >
  107. <copy-text slot-scope="scope">{{scope.row.subjectName}}</copy-text>
  108. </el-table-column>
  109. <el-table-column
  110. prop="gender"
  111. label="性别"
  112. >
  113. <span slot-scope="scope">{{scope.row.gender | sex}}</span>
  114. </el-table-column>
  115. <el-table-column
  116. prop="parentName"
  117. label="家长姓名"
  118. >
  119. <copy-text slot-scope="scope">{{scope.row.parentName}}</copy-text>
  120. </el-table-column>
  121. <el-table-column
  122. prop="phone"
  123. label="家长联系电话"
  124. >
  125. <copy-text slot-scope="scope">{{scope.row.phone}}</copy-text>
  126. </el-table-column>
  127. <el-table-column
  128. prop="noPaymentAmount"
  129. label="欠费金额"
  130. >
  131. <span style="color: red;" slot-scope="scope">{{scope.row.noPaymentAmount | moneyFormat}}</span>
  132. </el-table-column>
  133. <el-table-column
  134. prop="ctrls"
  135. label="操作"
  136. fixed="right"
  137. >
  138. <el-button type="text" @click="view">查看</el-button>
  139. </el-table-column>
  140. </el-table>
  141. <pagination
  142. sync
  143. :total.sync="rules.total"
  144. :page.sync="rules.page"
  145. :limit.sync="rules.limit"
  146. :page-sizes="rules.page_size"
  147. @pagination="FetchList"
  148. />
  149. </div>
  150. </div>
  151. </template>
  152. <script>
  153. import pagination from "@/components/Pagination/index";
  154. import { permission } from '@/utils/directivePage'
  155. import { queryArrearageStudents } from './api'
  156. const initSearch = {
  157. search: '',
  158. eduTeacherId: null,
  159. organId: null,
  160. branchs: null,
  161. }
  162. export default {
  163. components: {
  164. pagination,
  165. },
  166. data() {
  167. return {
  168. list: [],
  169. searchForm: {
  170. search: null,
  171. },
  172. rules: {
  173. // 分页规则
  174. limit: 10, // 限制显示条数
  175. page: 1, // 当前页
  176. total: 0, // 总条数
  177. page_size: [10, 20, 40, 50], // 选择限制显示条数
  178. },
  179. }
  180. },
  181. mounted() {
  182. this.$store.dispatch('setBranchs')
  183. this.$store.dispatch('setSchools')
  184. this.FetchList()
  185. },
  186. methods: {
  187. permission,
  188. async FetchList() {
  189. try {
  190. const res = await queryArrearageStudents({
  191. page: this.rules.page,
  192. rows: this.rules.limit,
  193. ...this.searchForm,
  194. })
  195. this.rules.total = res.data.total;
  196. this.list = res.data.rows
  197. } catch (error) {
  198. console.log(error)
  199. }
  200. },
  201. submit() {
  202. this.rules.page = 1
  203. this.FetchList()
  204. },
  205. onReSet() {
  206. this.searchForm = {...initSearch}
  207. this.submit();
  208. },
  209. view() {},
  210. }
  211. }
  212. </script>