transaction.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div id="column">
  3. <el-row>
  4. <el-col :span="24" class="info">
  5. <el-col :span="24" class="top">
  6. <el-col :span="12" class="topTitle">
  7. <span>审核信息列表</span>
  8. </el-col>
  9. </el-col>
  10. <el-col :span="24" class="list">
  11. <template>
  12. <el-table :data="recruitInfo" style="width: 100%">
  13. <el-table-column prop="username" label="购买人名称" align="center"> </el-table-column>
  14. <el-table-column prop="market_username" label="营销人名称" align="center"> </el-table-column>
  15. <el-table-column prop="product_name" label="商品名称 " align="center"> </el-table-column>
  16. <el-table-column prop="state" label="状态" align="center">
  17. <template v-slot="scoped">
  18. {{
  19. `${scoped.row.status}` === `0`
  20. ? '未交易'
  21. : `${scoped.row.status}` === `1`
  22. ? '交易中'
  23. : `${scoped.row.status}` === `2`
  24. ? '交易成功'
  25. : `${scoped.row.status}` === `3`
  26. ? '交易失败'
  27. : ''
  28. }}
  29. </template>
  30. </el-table-column>
  31. <el-table-column label="操作" align="center">
  32. <template slot-scope="scoped">
  33. <el-tooltip content="审核" placement="bottom" effect="light">
  34. <el-button
  35. type="text"
  36. size="small"
  37. @click="
  38. $router.push({
  39. path: '/enterprise/detail',
  40. query: {
  41. id: scoped.row.id,
  42. name: scoped.row.product_name,
  43. oneid: scoped.row.username,
  44. twoid: scoped.row.market_username,
  45. },
  46. })
  47. "
  48. ><i class="el-icon-edit"></i
  49. ></el-button>
  50. </el-tooltip>
  51. <el-tooltip content="删除" placement="bottom" effect="light">
  52. <el-button type="text" size="small" @click="handleDelete(scoped.row)"><i class="el-icon-delete"></i></el-button>
  53. </el-tooltip>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <el-col :span="24" class="page">
  58. <el-pagination
  59. @size-change="handleSizeChange"
  60. @current-change="handleCurrentChange"
  61. :current-page="currentPage"
  62. layout="total, prev, pager, next, jumper"
  63. :total="total"
  64. :page-size="pageSize"
  65. >
  66. </el-pagination>
  67. </el-col>
  68. </template>
  69. </el-col>
  70. </el-col>
  71. </el-row>
  72. </div>
  73. </template>
  74. <script>
  75. export default {
  76. name: 'column',
  77. props: {
  78. recruitInfo: null,
  79. total: null,
  80. },
  81. components: {},
  82. data: () => ({
  83. currentPage: 0,
  84. pageSize: 10,
  85. }),
  86. created() {},
  87. computed: {},
  88. methods: {
  89. addData() {
  90. this.$router.push({ path: '/personnel/recruitDetail' });
  91. },
  92. handleDelete(item) {
  93. this.$emit('delete', item);
  94. },
  95. handleEdit(row) {
  96. this.$emit('edit', { data: row });
  97. },
  98. handleSizeChange(val) {
  99. console.log(`每页 ${val} 条`);
  100. },
  101. handleCurrentChange(currentPage) {
  102. console.log(currentPage);
  103. this.$emit('handleCurrentChange', { skip: (currentPage - 1) * this.pageSize, limit: this.pageSize, currentPage });
  104. },
  105. },
  106. };
  107. </script>
  108. <style lang="less" scoped>
  109. .top {
  110. padding: 15px 0;
  111. border-bottom: 1px solid #cccc;
  112. }
  113. .top .topTitle {
  114. padding: 0 10px;
  115. }
  116. .top .topAdd {
  117. padding: 0 10px 0 0;
  118. text-align: right;
  119. }
  120. .page {
  121. padding: 20px 0;
  122. text-align: center;
  123. }
  124. </style>