index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <div class="app-container">
  3. <!-- 查询和其他操作 -->
  4. <!-- <div class="filter-container">
  5. <el-input v-model="listQuery.shopName" clearable size="mini" class="filter-item" style="width: 200px; margin-left: 10px" placeholder="请输入商家名称" />
  6. <el-button size="mini" class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 10px" @click="handleSearch">查找</el-button>
  7. <br />
  8. <el-button size="mini" type="primary" icon="el-icon-plus" @click="$refs.EditModal && $refs.EditModal.handleOpen({ shopId: '' })">添加</el-button>
  9. </div> -->
  10. <!-- 查询结果 -->
  11. <div v-tableHeight>
  12. <el-table v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list" v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }">
  13. <el-table-column align="center" label="商家ID" prop="shopId" fixed="left" />
  14. <el-table-column align="center" label="商家名称 " prop="shopName"></el-table-column>
  15. <el-table-column align="center" label="审核状态" prop="auditStatus">
  16. <template slot-scope="{ row }">
  17. <el-tag v-if="row.auditStatus === 2" :style="{ marginRight: '6px' }" type="success">已通过</el-tag>
  18. <el-tag v-if="row.auditStatus === 1" :style="{ marginRight: '6px' }" type="warning">已申请</el-tag>
  19. <el-tag v-if="row.auditStatus === 3" :style="{ marginRight: '6px' }" type="danger">不通过</el-tag>
  20. </template>
  21. </el-table-column>
  22. <el-table-column align="center" label="提现比例" prop="ratio">
  23. <template slot-scope="{ row }">
  24. <el-tag v-if="row.ratio" :style="{ marginRight: '6px' }" type="success">{{ row.ratio * 100 + '%' }}</el-tag>
  25. <span v-else>--</span>
  26. </template>
  27. </el-table-column>
  28. <el-table-column align="center" label="操作" width="220" fixed="right" class-name="small-padding fixed-width">
  29. <template slot-scope="{ row }">
  30. <el-button :disabled="[2, 3].includes(row.auditStatus)" type="warning" size="mini" @click="handleDetail(row)">资格审核</el-button>
  31. </template>
  32. </el-table-column>
  33. </el-table>
  34. </div>
  35. <div style="padding-top: 10px;">
  36. <el-pagination
  37. :current-page="listQuery.page"
  38. :page-sizes="[10, 20, 50, 100]"
  39. :page-size="listQuery.pageSize"
  40. layout="total, sizes, prev, pager, next, jumper"
  41. :total="total"
  42. @size-change="(val) => (listQuery.pageSize = val) && getList()"
  43. @current-change="(val) => (listQuery.page = val) && getList()"
  44. />
  45. </div>
  46. <Examine @refresh="refresh" ref="examineRef"></Examine>
  47. </div>
  48. </template>
  49. <script>
  50. import { getWithdrawalApplicationList } from '@/api/business'
  51. import Examine from './Examine.vue'
  52. export default {
  53. name: 'voucherApply',
  54. components: { Examine },
  55. data() {
  56. return {
  57. list: [],
  58. total: 0,
  59. listLoading: true,
  60. listQuery: {
  61. page: 1,
  62. pageSize: 20
  63. }
  64. }
  65. },
  66. created() {
  67. this.getList()
  68. },
  69. methods: {
  70. async getList() {
  71. this.listLoading = true
  72. try {
  73. const res = await getWithdrawalApplicationList(this.listQuery)
  74. this.list = res.data.list
  75. this.total = res.data.total
  76. } finally {
  77. this.listLoading = false
  78. }
  79. },
  80. handleSearch() {
  81. this.listQuery.page = 1
  82. this.getList()
  83. },
  84. handleDetail(row) {
  85. this.$refs.examineRef && this.$refs.examineRef.open(row)
  86. },
  87. refresh() {
  88. this.listQuery.page = 1
  89. this.getList()
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="scss" scoped>
  95. .app-container {
  96. padding: 20px;
  97. display: flex;
  98. flex-direction: column;
  99. .filter-container {
  100. .filter-item {
  101. display: inline-block;
  102. vertical-align: middle;
  103. margin-bottom: 10px;
  104. }
  105. }
  106. .small-padding {
  107. .cell {
  108. padding-left: 5px;
  109. padding-right: 5px;
  110. }
  111. }
  112. .fixed-width {
  113. .el-button--mini {
  114. padding: 7px 10px;
  115. }
  116. }
  117. }
  118. </style>