index.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <div class="app-container">
  3. <!-- 查询和其他操作 -->
  4. <div class="filter-container">
  5. <el-input
  6. v-model="listQuery.phone" clearable size="mini" class="filter-item"
  7. style="width: 200px;" placeholder="请输入下单用户号码"
  8. />
  9. <el-input
  10. v-model="listQuery.superiorPhone" clearable size="mini" class="filter-item"
  11. style="width: 200px;margin-left: 10px;" placeholder="请输入绑定上级手机号码"
  12. />
  13. <el-button
  14. size="mini" class="filter-item" type="primary" icon="el-icon-search"
  15. style="margin-left:10px;"
  16. @click="handleSearch"
  17. >
  18. 查找
  19. </el-button>
  20. </div>
  21. <!-- 查询结果 -->
  22. <div v-tableHeight>
  23. <el-table
  24. v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
  25. v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
  26. >
  27. <el-table-column align="center" width="100" label="ID" prop="commissionLogId" fixed="left" />
  28. <el-table-column align="center" label="分佣类型" prop="commissionType">
  29. <template slot-scope="{ row }">
  30. <el-tag v-if="row.commissionType === 1" effect="plain">社区订单</el-tag>
  31. <el-tag v-else-if="row.commissionType === 2" effect="plain">商圈订单</el-tag>
  32. <el-tag v-else-if="row.commissionType === 3" effect="plain">商城订单</el-tag>
  33. <el-tag v-else-if="row.commissionType === 4" effect="plain">团长升级</el-tag>
  34. <el-tag v-else-if="row.commissionType === 5" effect="plain">充值赠送代金券</el-tag>
  35. <el-tag v-else-if="row.commissionType === 6" effect="plain">赠送佣金活动</el-tag>
  36. <span v-else>--</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column align="center" width="150" label="交易时间" prop="tradeTime" show-overflow-tooltip />
  40. <el-table-column align="center" width="150" label="关联订单编号" prop="orderFormid" show-overflow-tooltip />
  41. <el-table-column align="center" width="100" label="购买用户ID" prop="buyerUserId" show-overflow-tooltip />
  42. <el-table-column align="center" width="150" label="下单用户号码" prop="phone" show-overflow-tooltip />
  43. <el-table-column align="center" width="100" label="支付金额" prop="orderPrice" show-overflow-tooltip />
  44. <el-table-column align="center" width="100" label="佣金比例/金额" prop="orderProportion" show-overflow-tooltip />
  45. <el-table-column align="center" width="100" label="团长ID" prop="tId" show-overflow-tooltip />
  46. <el-table-column align="center" width="120" label="团长手机号" prop="tPhone" show-overflow-tooltip />
  47. <el-table-column align="center" width="100" label="用于分佣的佣金总额" prop="commissionPrice" show-overflow-tooltip />
  48. <!-- <el-table-column align="center" width="100" label="佣金分配详情" prop="commissionDetail" show-overflow-tooltip /> -->
  49. <el-table-column align="center" label="操作" width="220" fixed="right" class-name="small-padding fixed-width">
  50. <template slot-scope="{ row }">
  51. <el-button type="warning" size="mini" @click="handleDetail(row)">
  52. 详情
  53. </el-button>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. </div>
  58. <div>
  59. <el-pagination
  60. :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
  61. layout="total, sizes, prev, pager, next, jumper" :total="total"
  62. @size-change="(val) => ((listQuery.pageSize = val) && getList())"
  63. @current-change="(val) => ((listQuery.page = val) && getList())"
  64. />
  65. </div>
  66. <!-- 查看详情 -->
  67. <DetailModal ref="DetailModal" />
  68. </div>
  69. </template>
  70. <script>
  71. import DetailModal from './components/DetailModal'
  72. import { getAllCommissionLog } from '@/api/relationshipChainManagement/commissionLog'
  73. export default {
  74. name: 'CommissionLog',
  75. components: {
  76. DetailModal
  77. },
  78. data() {
  79. return {
  80. list: [],
  81. total: 0,
  82. listLoading: true,
  83. listQuery: {
  84. page: 1,
  85. pageSize: 20,
  86. phone: '',
  87. superiorPhone: ''
  88. }
  89. }
  90. },
  91. created() {
  92. this.getList()
  93. },
  94. methods: {
  95. async getList() {
  96. this.listLoading = true
  97. try {
  98. const res = await getAllCommissionLog(this.listQuery)
  99. this.list = res.data.list
  100. this.total = res.data.total
  101. } finally {
  102. this.listLoading = false
  103. }
  104. },
  105. handleSearch() {
  106. this.listQuery.page = 1
  107. this.getList()
  108. },
  109. handleDetail(row) {
  110. this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
  111. }
  112. }
  113. }
  114. </script>
  115. <style lang="scss" scoped>
  116. .app-container {
  117. padding: 20px;
  118. display: flex;
  119. flex-direction: column;
  120. .filter-container {
  121. .filter-item {
  122. display: inline-block;
  123. vertical-align: middle;
  124. margin-bottom: 10px;
  125. }
  126. }
  127. .small-padding {
  128. .cell {
  129. padding-left: 5px;
  130. padding-right: 5px;
  131. }
  132. }
  133. .fixed-width {
  134. .el-button--mini {
  135. padding: 7px 10px;
  136. }
  137. }
  138. }
  139. </style>