member.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <template>
  2. <div>
  3. <div>
  4. <el-form :inline="true" :model="searchForm">
  5. <el-form-item prop="period">
  6. <el-select
  7. placeholder="学练宝单位"
  8. clearable
  9. v-model.trim="searchForm.period"
  10. style="width: 100% !important"
  11. >
  12. <el-option label="月度" value="MONTH"></el-option>
  13. <el-option label="季度" value="QUARTERLY"></el-option>
  14. <el-option label="半年" value="YEAR_HALF"></el-option>
  15. <el-option label="年度" value="YEAR"></el-option>
  16. <!-- <el-option label="固定天数" value="DAY"></el-option> -->
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item prop="organId">
  20. <el-select
  21. class="multiple"
  22. v-model.trim="searchForm.organId"
  23. filterable
  24. clearable
  25. placeholder="请选择分部"
  26. >
  27. <el-option
  28. v-for="(item, index) in selects.branchs"
  29. :key="index"
  30. :label="item.name"
  31. :value="item.id"
  32. ></el-option>
  33. </el-select>
  34. </el-form-item>
  35. <el-form-item>
  36. <el-select
  37. class="multiple"
  38. v-model.trim="searchForm.audit"
  39. filterable
  40. clearable
  41. placeholder="请选择审核人"
  42. >
  43. <el-option
  44. v-for="(item, index) in userList"
  45. :key="index"
  46. :label="item.auditName"
  47. :value="item.audit"
  48. ></el-option>
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item prop="visitTime">
  52. <el-date-picker
  53. v-model.trim="searchForm.visitTime"
  54. style="width: 410px"
  55. type="daterange"
  56. :picker-options="{
  57. firstDayOfWeek: 1
  58. }"
  59. :default-time="['00:00:00', '23:59:59']"
  60. range-separator="至"
  61. start-placeholder="创建开始日期"
  62. end-placeholder="创建结束日期"
  63. ></el-date-picker>
  64. </el-form-item>
  65. <el-form-item>
  66. <el-select
  67. class="multiple"
  68. v-model.trim="searchForm.status"
  69. filterable
  70. clearable
  71. placeholder="审核状态"
  72. >
  73. <el-option label="审核中" value="AUDITING"></el-option>
  74. <el-option label="拒绝" value="REJECT"></el-option>
  75. <el-option label="开启缴费" value="OPEN"></el-option>
  76. </el-select>
  77. </el-form-item>
  78. <el-form-item>
  79. <el-button @click="search" type="danger">搜索</el-button>
  80. <el-button @click="onReSet" type="primary">重置</el-button>
  81. </el-form-item>
  82. </el-form>
  83. <div class="tableWrap">
  84. <el-table
  85. style="width: 100%"
  86. :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
  87. :data="tableList"
  88. >
  89. <el-table-column
  90. align="left"
  91. prop="id"
  92. label="续费编号"
  93. ></el-table-column>
  94. <el-table-column align="left" prop="organName" label="分部名称">
  95. </el-table-column>
  96. <el-table-column align="left" prop="name" label="学练宝">
  97. <template slot-scope="scope">
  98. <div>
  99. <p>
  100. 学练宝版本:
  101. {{ scope.row.name ? scope.row.name : "--" }}
  102. </p>
  103. <p>
  104. 续费周期:
  105. {{ scope.row.memberNum ? scope.row.memberNum : "--"
  106. }}{{ scope.row.period | memberEnumType }}
  107. </p>
  108. <p>
  109. 缴费金额: {{ scope.row.actualAmount | moneyFormat(true) }}
  110. </p>
  111. </div>
  112. </template>
  113. </el-table-column>
  114. <!-- <el-table-column align="left" prop="memberNum" label="周期数">
  115. </el-table-column> -->
  116. <!-- <el-table-column align="left" prop="subjectName" label="缴费金额(元)">
  117. <template slot-scope="scope">
  118. {{ scope.row.actualAmount | moneyFormat(true) }}
  119. </template>
  120. </el-table-column> -->
  121. <el-table-column align="left" prop="type" label="人数">
  122. <template slot-scope="scope">
  123. <p>已缴费: {{ scope.row.paymentUserNum }}人</p>
  124. <p>总人数: {{ scope.row.userNum }}人</p>
  125. </template>
  126. </el-table-column>
  127. <el-table-column
  128. align="left"
  129. label="创建人"
  130. prop="operatorName"
  131. width="200px"
  132. >
  133. <template slot-scope="scope">
  134. <div>
  135. <p>
  136. {{ scope.row.operatorName ? scope.row.operatorName : "--" }}
  137. </p>
  138. <p>{{ scope.row.createTime ? scope.row.createTime : "--" }}</p>
  139. </div>
  140. </template>
  141. </el-table-column>
  142. <el-table-column
  143. align="left"
  144. prop="createTime"
  145. label="审核人"
  146. width="140px"
  147. >
  148. <template slot-scope="scope">
  149. <div>
  150. <p>{{ scope.row.auditName ? scope.row.auditName : "--" }}</p>
  151. <p>
  152. {{
  153. scope.row.auditTime
  154. ? scope.row.auditTime
  155. : "--" | dateForMinFormat
  156. }}
  157. </p>
  158. </div>
  159. </template>
  160. </el-table-column>
  161. <el-table-column
  162. align="left"
  163. prop="remark"
  164. label="备注"
  165. ></el-table-column>
  166. <el-table-column align="left" prop="memo" label="审核意见">
  167. <template slot-scope="scope">
  168. <overflow-text width="80px" :text="scope.row.memo" />
  169. </template>
  170. </el-table-column>
  171. <el-table-column
  172. align="left"
  173. prop="operatorName"
  174. label="申请人"
  175. ></el-table-column>
  176. <el-table-column
  177. align="left"
  178. prop="status"
  179. label="状态"
  180. width="100px"
  181. >
  182. <template slot-scope="scope">
  183. <div>
  184. {{ scope.row.status | auditType }}
  185. </div>
  186. </template>
  187. </el-table-column>
  188. <!-- <el-table-column
  189. align="left"
  190. prop="createTime"
  191. label="创建时间"
  192. ></el-table-column> -->
  193. <!-- </el-table-column> -->
  194. <el-table-column align="left" label="操作">
  195. <template slot-scope="scope">
  196. <el-button
  197. type="text"
  198. v-if="
  199. scope.row.status == 'AUDITING' &&
  200. $helpers.permission('cloudCoachPaymentProgram/audit')
  201. "
  202. @click="onDetail(scope.row)"
  203. >审核</el-button
  204. >
  205. <el-button
  206. type="text"
  207. v-if="
  208. scope.row.status != 'AUDITING' &&
  209. $helpers.permission(
  210. 'studentCloudCoachPaymentDetails/queryPage'
  211. )
  212. "
  213. @click="onDetail(scope.row)"
  214. >详情</el-button
  215. >
  216. </template>
  217. </el-table-column>
  218. </el-table>
  219. <pagination
  220. sync
  221. :total.sync="rules.total"
  222. :page.sync="rules.page"
  223. :limit.sync="rules.limit"
  224. :page-sizes="rules.page_size"
  225. @pagination="getList"
  226. />
  227. </div>
  228. </div>
  229. <el-dialog
  230. title="审核详情"
  231. :visible.sync="recordVisible"
  232. width="800px"
  233. v-if="recordVisible"
  234. append-to-body
  235. >
  236. <member-model
  237. :detail="selectDetail"
  238. @getList="getList"
  239. @close="recordVisible = false"
  240. />
  241. </el-dialog>
  242. </div>
  243. </template>
  244. <script>
  245. import pagination from "@/components/Pagination/index";
  246. import memberModel from "./memberModel";
  247. import { cloudCoachPaymentProgramQueryPage } from "../studentManager/api";
  248. import { getTimes } from "@/utils";
  249. import { auditTypeList } from "@/utils/searchArray";
  250. import { getCalenderUser } from "./api";
  251. export default {
  252. components: { pagination, memberModel },
  253. data() {
  254. return {
  255. recordVisible: false,
  256. searchForm: {
  257. visitTime: [],
  258. period: null,
  259. organId: null,
  260. status: "AUDITING",
  261. audit: null
  262. },
  263. tableList: [],
  264. userList: [],
  265. rules: {
  266. // 分页规则
  267. limit: 10, // 限制显示条数
  268. page: 1, // 当前页
  269. total: 0, // 总条数
  270. page_size: [10, 20, 40, 50] // 选择限制显示条数
  271. },
  272. selectDetail: null,
  273. statusList: auditTypeList
  274. };
  275. },
  276. async mounted() {
  277. await this.$store.dispatch("setBranchs");
  278. this.getList();
  279. this.getCalenderList();
  280. },
  281. methods: {
  282. async getList() {
  283. try {
  284. const { visitTime, ...search } = this.searchForm;
  285. const res = await cloudCoachPaymentProgramQueryPage({
  286. ...search,
  287. ...getTimes(visitTime, ["startTime", "endTime"]),
  288. page: this.rules.page,
  289. rows: this.rules.limit
  290. });
  291. this.rules.total = res.data.total;
  292. this.tableList = res.data.rows;
  293. } catch (e) {}
  294. },
  295. search() {
  296. this.rules.page = 1;
  297. this.getList();
  298. },
  299. onReSet() {
  300. this.searchForm = {
  301. visitTime: [],
  302. period: null
  303. };
  304. this.search();
  305. },
  306. onDetail(row) {
  307. this.selectDetail = row;
  308. this.recordVisible = true;
  309. },
  310. async getCalenderList() {
  311. try {
  312. const res = await getCalenderUser({ type: "CLOUD" });
  313. this.userList = res.data;
  314. } catch (e) {
  315. console.log(e);
  316. }
  317. }
  318. }
  319. };
  320. </script>