index.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!-- 客户充值界面 -->
  2. <template>
  3. <div class="customer-top-up">
  4. <!-- 搜索条件区 -->
  5. <div class="search-section">
  6. <Search @query="initData" @reset="reset" :SearchForm="ClientSearchForm"></Search>
  7. </div>
  8. <!-- 数据表格 -->
  9. <a-table row-key="id" :columns="UserAdiroColumns" :data="tableData" :pagination="pagination"
  10. @page-change="evChangePage" @page-size-change="onPageSizeChange" :filter-icon-align-left="true">
  11. <template #name="{ record }">
  12. <div class="boldTxt">{{ record.name }}</div>
  13. </template>
  14. <template #status="{ record }">
  15. <div>{{ handleStatusTxt(record.status) }}</div>
  16. </template>
  17. <template #puyStatus="{ record }">
  18. <a-tag :color="record.payStatus == 'SUCCESS' ? '#00b42a' : ''">{{ record.puyStatus }}</a-tag>
  19. </template>
  20. <template #image="{ record }">
  21. <a-image width="60" height="60" :src="record.certificateImg" :preview-props="{
  22. actionsLayout: ['rotateRight', 'zoomIn', 'zoomOut'],
  23. }" style="cursor: pointer;">
  24. </a-image>
  25. </template>
  26. </a-table>
  27. </div>
  28. </template>
  29. <script setup>
  30. import { ref, reactive, onMounted } from "vue";
  31. import { getAdiroePuyList } from "@/api/path/finance.js";
  32. import { columns, handleStatusTxt, statusOptions, UserAdiroColumns, AdminSearchForm, ClientSearchForm } from '../config'
  33. import Search from '@/components/Search/index.vue'
  34. import { Getdictionary, tableFunction, filterDict } from '@/mixins/index.js'
  35. const pagination = ref({
  36. showTotal: true,
  37. showJumper: true,
  38. showPageSize: true,
  39. total: 0,
  40. current: 1,
  41. pageSize: 10,
  42. });
  43. const onPageSizeChange = (pageSize) => {
  44. pagination.value.pageSize = pageSize;
  45. pagination.value.current = 1;
  46. initData();
  47. };
  48. const processData = async (data) => {
  49. let puyType = await Getdictionary('puyType')
  50. return (data.records || []).map(res => {
  51. res.puyStatus = filterDict(puyType,res.payStatus)
  52. return res
  53. })
  54. }
  55. const { tableData, evChangePage, initData, reset } = tableFunction(pagination.value, getAdiroePuyList, processData)
  56. onMounted(() => {
  57. initData();
  58. });
  59. </script>
  60. <style scoped lang="less">
  61. .customer-top-up {
  62. padding: 20px !important;
  63. .search-section {
  64. margin-bottom: 20px;
  65. }
  66. .audit-btn {
  67. margin-bottom: 10px;
  68. }
  69. }
  70. .text-box {
  71. width: 100%;
  72. margin-left: 10px;
  73. .text {
  74. font-family: PingFang SC;
  75. font-size: 12px;
  76. font-weight: 400;
  77. line-height: 19px;
  78. color: rgba(153, 153, 153, 1);
  79. text-align: left;
  80. }
  81. }
  82. </style>