withdrawal.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <div class="box">
  3. <div class="null-page" v-show="yes"></div>
  4. <el-card class="box-card">
  5. <div slot="header" class="clearfix">
  6. <span>提现记录</span>
  7. </div>
  8. <div v-loading="loading" class="withdrawal-list">
  9. <el-table v-if="dataList.length > 0" :data="dataList" border>
  10. <el-table-column prop="transfer_type_name" label="账户类型" width="150"></el-table-column>
  11. <el-table-column prop="apply_money" label="提现金额" width="150"></el-table-column>
  12. <el-table-column prop="apply_time" label="提现时间"></el-table-column>
  13. <el-table-column prop="status_name" label="提现状态" width="150"></el-table-column>
  14. <el-table-column label="操作" width="150">
  15. <template slot-scope="scope">
  16. <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">详情</el-button>
  17. </template>
  18. </el-table-column>
  19. </el-table>
  20. <div v-else-if="!loading && dataList.length == 0" class="ns-text-align">暂无提现记录</div>
  21. </div>
  22. <div class="pager">
  23. <el-pagination
  24. background
  25. :pager-count="5"
  26. :total="total"
  27. prev-text="上一页"
  28. next-text="下一页"
  29. :current-page.sync="currentPage"
  30. :page-size.sync="pageSize"
  31. @size-change="handlePageSizeChange"
  32. @current-change="handleCurrentPageChange"
  33. hide-on-single-page
  34. ></el-pagination>
  35. </div>
  36. </el-card>
  37. </div>
  38. </template>
  39. <script>
  40. import { withdrawList } from "@/api/member/account"
  41. export default {
  42. name: 'withdrawal',
  43. layout: "member",
  44. components: {},
  45. data: () => {
  46. return {
  47. dataList: [],
  48. currentPage: 1,
  49. pageSize: 10,
  50. total: 0,
  51. loading: true,
  52. yes: true
  53. };
  54. },
  55. created() {
  56. this.getDateList();
  57. },
  58. mounted() {
  59. let self = this;
  60. setTimeout(function() {
  61. self.yes = false
  62. }, 300)
  63. },
  64. methods: {
  65. handlePageSizeChange(size) {
  66. this.pageSize = size
  67. this.refresh()
  68. },
  69. handleCurrentPageChange(page) {
  70. this.currentPage = page
  71. this.refresh()
  72. },
  73. refresh() {
  74. this.loading = true
  75. this.getDateList()
  76. },
  77. getDateList() {
  78. withdrawList({
  79. page_size: this.pageSize,
  80. page: this.currentPage
  81. }).then(res => {
  82. if (res.code == 0 && res.data) {
  83. this.dataList = res.data.list
  84. this.dataList.forEach(item => {
  85. item.apply_time = this.$util.timeStampTurnTime(item.apply_time)
  86. })
  87. this.total = res.data.count
  88. }
  89. this.loading = false
  90. }).catch(err => {
  91. this.loading = false
  92. })
  93. },
  94. handleEdit(index, row) {
  95. this.$router.push({path: '/member/withdrawal_detail', query: {id: row.id}})
  96. }
  97. }
  98. };
  99. </script>
  100. <style lang="scss" scoped>
  101. .box {
  102. width: 100%;
  103. position: relative;
  104. }
  105. .null-page {
  106. width: 100%;
  107. height: 730px;
  108. background-color: #FFFFFF;
  109. position: absolute;
  110. top: 0;
  111. left: 0;
  112. z-index: 9;
  113. }
  114. .el-card.is-always-shadow,
  115. .el-card.is-hover-shadow:focus,
  116. .el-card.is-hover-shadow:hover {
  117. box-shadow: unset;
  118. }
  119. .el-card {
  120. border: 0;
  121. }
  122. .ns-len-input {
  123. width: 350px;
  124. }
  125. .el-select {
  126. margin-right: 10px;
  127. }
  128. .page-wrap {
  129. margin-top: 10px;
  130. }
  131. </style>