activity-log.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('com-user-info');
  4. ComponentHelper::loadComponentView('com-list-page');
  5. ComponentHelper::loadComponentView('com-list-table');
  6. ComponentHelper::loadComponentView('com-image');
  7. ?>
  8. <com-list-page :crumbs="crumbs" id="application">
  9. <com-list-table ref="table" :search-list="searchList" :api-params="apiParams">
  10. <el-table-column prop="pid" label="会员ID" align="center"></el-table-column>
  11. <el-table-column label="会员信息" align="center">
  12. <template slot-scope="scope">
  13. <com-user-info :user="scope.row.pUser"></com-user-info>
  14. </template>
  15. </el-table-column>
  16. <el-table-column prop="order_total" label="订单总数" align="center"></el-table-column>
  17. <el-table-column prop="achieved_total" label="已达标" align="center"></el-table-column>
  18. <el-table-column prop="unachieved_total" label="未达标" align="center"></el-table-column>
  19. <el-table-column prop="expired_total" label="已失效" align="center"></el-table-column>
  20. <el-table-column label="操作" align="center">
  21. <template slot-scope="scope">
  22. <el-button type="text" size="mini" circle @click="showOrder(scope.row)">查看订单</el-button>
  23. </template>
  24. </el-table-column>
  25. </com-list-table>
  26. <el-dialog title="查看订单" :visible.sync="dialogFormVisible" width="70%" v-if="ifDialogFormVisible" @closed="ifDialogFormVisible = false">
  27. <com-list-table ref="orderDetailsTable" :api-params="orderDetailsApiParams">
  28. <el-table-column prop="user_id" label="会员ID" align="center"></el-table-column>
  29. <el-table-column label="会员信息" align="center">
  30. <template slot-scope="scope">
  31. <com-user-info :user="scope.row.user"></com-user-info>
  32. </template>
  33. </el-table-column>
  34. <el-table-column prop="order_no" label="订单编号" align="center"></el-table-column>
  35. <el-table-column prop="pay_at_text" label="支付时间" align="center"></el-table-column>
  36. <el-table-column label="奖励内容" align="center">
  37. <template slot-scope="scope">
  38. {{ scope.row.is_reward_trigger > 0 ? (scope.row.rewardLog?.content ?? '') : '' }}
  39. </template>
  40. </el-table-column>
  41. <el-table-column prop="position" label="推荐序号" align="center"></el-table-column>
  42. <el-table-column prop="order_settlement_status_text" label="状态" align="center"></el-table-column>
  43. </com-list-table>
  44. </el-dialog>
  45. </com-list-page>
  46. <script type="text/javascript" src="/resources/js/diy-util.js"></script>
  47. <script>
  48. const application = new Vue({
  49. el: '#application',
  50. data: {
  51. apiParams: {
  52. r: 'rebate/index/activity-log',
  53. rid: getQuery('rid'),
  54. },
  55. crumbs: [
  56. {
  57. title: '首页',
  58. router: 'mall/overview/index',
  59. },
  60. {
  61. title: '推三返一',
  62. router: 'rebate/index/index',
  63. },
  64. {
  65. title: '活动记录',
  66. }
  67. ],
  68. dialogFormVisible: false,
  69. ifDialogFormVisible: false,
  70. orderDetailsApiParams: {
  71. r: 'rebate/index/activity-order-details',
  72. rid: getQuery('rid'),
  73. pid: 0
  74. },
  75. },
  76. mounted() {
  77. },
  78. computed: {
  79. searchList() {
  80. return [
  81. {
  82. key: 'user_id',
  83. title: '会员ID',
  84. type: 'text',
  85. clearable: true
  86. },
  87. {
  88. key: 'mobile',
  89. title: '手机号',
  90. type: 'text',
  91. clearable: true
  92. },
  93. {
  94. key: 'created_at',
  95. title: '创建时间',
  96. type: 'date-time-range',
  97. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  98. },
  99. ]
  100. }
  101. },
  102. methods: {
  103. showOrder(row) {
  104. this.dialogFormVisible = true
  105. this.ifDialogFormVisible = true
  106. this.orderDetailsApiParams.pid = row.pid
  107. }
  108. }
  109. })
  110. </script>