detail.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <span>支出统计</span>
  5. </div>
  6. <div class="table-body">
  7. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  8. <el-table-column prop="store_info" label="小店名称" width="200">
  9. <template slot-scope="scope">
  10. <com-image style="float: left;margin-right: 10px;" mode="aspectFill" :src="scope.row.store.logo_img"></com-image>
  11. <div>{{scope.row.store.store_name}}</div>
  12. </template>
  13. </el-table-column>
  14. <el-table-column prop="order_no" label="订单编号" width="180" align="center"></el-table-column>
  15. <el-table-column label="小店收益" align="center">
  16. <template slot-scope="scope">
  17. <div>¥{{scope.row.store_money}}</div>
  18. </template>
  19. </el-table-column>
  20. <el-table-column label="分享奖励" align="center">
  21. <template slot-scope="scope">
  22. <div>¥{{scope.row.share_money}}</div>
  23. </template>
  24. </el-table-column>
  25. <el-table-column prop="promotion_money" label="推广奖励" align="center">
  26. <template slot-scope="scope">
  27. <div>¥{{scope.row.promotion_money}}</div>
  28. </template>
  29. </el-table-column>
  30. <el-table-column prop="agent_money" label="代理奖励" align="center">
  31. <template slot-scope="scope">
  32. <div>¥{{scope.row.agent_money}}</div>
  33. </template>
  34. </el-table-column>
  35. <el-table-column prop="fans_money" label="锁定奖励" align="center">
  36. <template slot-scope="scope">
  37. <div>¥{{scope.row.fans_money}}</div>
  38. </template>
  39. </el-table-column>
  40. <el-table-column prop="pension_money" label="养老金" align="center">
  41. <template slot-scope="scope">
  42. <div>¥{{scope.row.pension_money}}</div>
  43. </template>
  44. </el-table-column>
  45. <el-table-column prop="pv_money" label="PV值" align="center">
  46. <template slot-scope="scope">
  47. <div>¥{{scope.row.pv_money}}</div>
  48. </template>
  49. </el-table-column>
  50. </el-table>
  51. <div style="text-align: right;margin: 20px 0;">
  52. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  53. </div>
  54. </div>
  55. </el-card>
  56. </div>
  57. <script>
  58. const app = new Vue({
  59. el: '#app',
  60. data() {
  61. return {
  62. user_id: 0,
  63. search_data: {},
  64. list: [],
  65. page: 1,
  66. pageCount: 0,
  67. listLoading: false
  68. };
  69. },
  70. mounted: function() {
  71. this.getList();
  72. },
  73. created: function() {
  74. this.user_id = getQuery('user_id');
  75. },
  76. computed: {
  77. },
  78. methods: {
  79. getList() {
  80. let self = this;
  81. let basic_params = {
  82. r: 'happiness/store-expenses/detail',
  83. page: self.page,
  84. user_id: self.user_id,
  85. };
  86. params = Object.assign(basic_params, this.search_data);
  87. if (self.listLoading === false) {
  88. self.listLoading = true;
  89. request({
  90. params: params,
  91. method: 'get',
  92. }).then(e => {
  93. self.listLoading = false;
  94. if (e.data.code === 0) {
  95. self.list = e.data.data.list;
  96. self.pageCount = e.data.data.page_count;
  97. } else {
  98. self.$message.error(e.data.msg);
  99. }
  100. }).catch(e => {
  101. self.$message.error(e.data.msg);
  102. self.listLoading = false;
  103. });
  104. }
  105. },
  106. }
  107. })
  108. </script>