DecListTable.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <template>
  2. <div class="leo-dec-list-table" v-loading="loading">
  3. <el-table :data="tableData" stripe style="width: 100%;">
  4. <el-table-column label="订单编号" prop="ORDER_SN"></el-table-column>
  5. <el-table-column label="注册会员" v-if="type==='ZC'">
  6. <template slot-scope="scope">
  7. {{scope.row.INSERT_USER_NAME}}<br>
  8. </template>
  9. </el-table-column>
  10. <el-table-column label="报单金额" prop="DEC_AMOUNT" v-if="type!=='OR'"></el-table-column>
  11. <el-table-column label="报单BV" prop="DEC_PV" v-if="type!=='OR'"></el-table-column>
  12. <el-table-column label="订货单金额" prop="ORDER_AMOUNT" v-if="type==='OR'"></el-table-column>
  13. <el-table-column label="订货单BV" prop="ORDER_PV" v-if="type==='OR'"></el-table-column>
  14. <el-table-column label="支付钱包">
  15. <template slot-scope="scope">
  16. {{paidType[scope.row.PAID_WALLET].title}}<br>
  17. </template>
  18. </el-table-column>
  19. <el-table-column label="返利BV" v-if="type==='OR'">
  20. <template slot-scope="scope">
  21. {{scope.row.FL_PV}}<br>
  22. </template>
  23. </el-table-column>
  24. <el-table-column label="补贴BV" v-if="type==='OR'">
  25. <template slot-scope="scope">
  26. {{scope.row.BT_PV}}<br>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="报单期数" prop="PERIOD_NUM"></el-table-column>
  30. <el-table-column label="创建时间">
  31. <template slot-scope="scope">
  32. {{tool.formatDate(scope.row.CREATED_AT)}}<br>
  33. </template>
  34. </el-table-column>
  35. </el-table>
  36. <div class="white-box-footer">
  37. <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. import network from '@/utils/network'
  43. import tool from '@/utils/tool'
  44. import baseInfo from '@/utils/baseInfo'
  45. import Pagination from '@/components/Pagination'
  46. export default {
  47. name: 'leo-dec-list-table',
  48. components: {Pagination},
  49. props: {
  50. type: {
  51. type: String,
  52. default: 'ZC'
  53. },
  54. },
  55. mounted () {
  56. this.getData()
  57. },
  58. data () {
  59. return {
  60. tableData: null,
  61. loading: true,
  62. currentPage: 1,
  63. totalPages: 1,
  64. totalCount: 1,
  65. pageSize: 20,
  66. tool: tool,
  67. paidType: baseInfo.shopWalletType(),
  68. }
  69. },
  70. methods: {
  71. handleCurrentChange (page) {
  72. this.getData(page, this.pageSize)
  73. },
  74. handleSizeChange (pageSize) {
  75. this.getData(this.currentPage, pageSize)
  76. },
  77. getData (page, pageSize) {
  78. network.getPageData(this, 'finance/dec-list', page, pageSize, {decType: this.type})
  79. },
  80. }
  81. }
  82. </script>
  83. <style scoped>
  84. </style>