VoucherOrder.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <!-- eslint-disable vue/script-indent -->
  2. <template>
  3. <div class="tableBox">
  4. <el-select v-model="queruList.type" placeholder="请选择" style="margin: 10px;" @change="fuckYou">
  5. <el-option
  6. v-for="item in options"
  7. :key="item.value"
  8. :label="item.name"
  9. :value="item.value"
  10. >
  11. </el-option>
  12. </el-select>
  13. <el-table
  14. ref="multipleTable" v-loading="loading" :data="tableData" border
  15. :header-cell-style="{ background: '#EEF3FF', color: '#333333' }" tooltip-effect="dark" style="width: 100%"
  16. >
  17. <!-- <el-table-column label="订单id" width="220">
  18. <template slot-scope="scope">{{ scope.row.orderId }}</template>
  19. </el-table-column> -->
  20. <el-table-column prop="id" label="ID" width="220" />
  21. <el-table-column prop="shopId" label="商户ID" show-overflow-tooltip />
  22. <el-table-column prop="voucherId" label="代金券ID" show-overflow-tooltip />
  23. <el-table-column prop="number" label="数量" show-overflow-tooltip />
  24. <el-table-column prop="payId" label="订单号" show-overflow-tooltip />
  25. <el-table-column prop="payGrade" label="付款金额" show-overflow-tooltip />
  26. <el-table-column prop="payTime" label="购买时间" show-overflow-tooltip />
  27. <el-table-column prop="createTime" label="订单创建时间" show-overflow-tooltip />
  28. </el-table>
  29. <div class="fenye" style="margin-top: 10px;">
  30. <el-pagination
  31. :current-page="queruList.page" :page-sizes="[9, 20, 50, 100]" :page-size="9"
  32. layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
  33. @current-change="handleCurrentChange"
  34. />
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import { getAllVoucherOrder } from '@/api/volumeManagement'
  40. export default {
  41. // eslint-disable-next-line vue/match-component-file-name
  42. name: 'VoucherTable',
  43. data() {
  44. return {
  45. options: [{ name: '未付款', value: 0 },
  46. { name: '已取消', value: 1 },
  47. { name: '已付款', value: 2 },
  48. { name: '未发放', value: 3 },
  49. { name: '已发放', value: 4 }],
  50. loading: false,
  51. tableData: [],
  52. queruList: {
  53. pageSize: 9,
  54. page: 1,
  55. type: 4
  56. },
  57. total: 0
  58. }
  59. },
  60. created() {
  61. this.getDataList()
  62. },
  63. methods: {
  64. getDataList() {
  65. getAllVoucherOrder(this.queruList).then((res) => {
  66. this.tableData = res.data.list
  67. this.total = res.data.total
  68. })
  69. },
  70. handleSizeChange(value) {
  71. this.queruList.pageSize = value
  72. this.getDataList()
  73. },
  74. handleCurrentChange(value) {
  75. this.queruList.page = value
  76. this.getDataList()
  77. },
  78. fuckYou() {
  79. this.getDataList()
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. </style>