commission-detail.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="commisions-list">
  3. <TuanPageHead :scroll-top="$data._scrollTop" fixed title="佣金详情" bacokground="#fff">
  4. <tui-icon slot="left" name="arrowleft" color="#3d3d3d" @click="handleBack"></tui-icon>
  5. </TuanPageHead>
  6. <view class="container">
  7. <LoadingMore v-show="$data._status !== 'none'" :status="$data._status"></LoadingMore>
  8. <view v-if="$data._list.length && $data._status !== 'loading'" class="list">
  9. <view v-for="item in $data._list" :key="item.id" class="item">
  10. <view class="item-bar">
  11. <view class="left">订单总额:¥{{ item.totalAmount }}</view>
  12. <view class="right">
  13. 分佣金额:¥{{ item.amount }}
  14. <!-- <text style="color: #fe751a; margin-left: 10upx">({{
  15. item.proportion * 100 }}%)</text> -->
  16. </view>
  17. </view>
  18. <view class="item-bar gray">
  19. <view class="left">订单号:{{ item.orderSn }}</view>
  20. <view class="right" :style="{ color: !item.isTo ? 'red' : 'green' }">
  21. {{ !item.isTo ? '订单未完成'
  22. : '订单已完成' }}
  23. </view>
  24. </view>
  25. <view class="item-bar gray">
  26. <view class="left">创建时间:{{ item.createTime }}</view>
  27. </view>
  28. <view
  29. style="background-color: #f3f2f2; padding: 20upx; box-sizing: border-box;display: flex; border-radius: 10upx;"
  30. >
  31. <image style="width: 100upx; height: 100upx; border-radius: 50%; margin-right: 10upx;" :src="item.imgOne">
  32. </image>
  33. <view>
  34. <view style="font-size: 26upx; margin-top: 10upx;">{{ item.userNameOne }}</view>
  35. <view
  36. style="padding: 4upx 12upx; background-color: #ff8700; border-radius: 6upx; color: #fff; display: inline-flex; font-size: 24upx; margin-top: 8upx;"
  37. >
  38. {{ item.type
  39. |
  40. filterType }}
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view v-if="$data._status !== 'loading' && !$data._list.length" class="no-data"> 暂无数据... </view>
  47. </view>
  48. <tui-toast ref="toast"></tui-toast>
  49. </view>
  50. </template>
  51. <script>
  52. import { getCommissionDeatilListApi } from '../../../api/anotherTFInterface'
  53. import loadDataMixin from '../../../mixin/loadMore'
  54. export default {
  55. mixins: [
  56. loadDataMixin({
  57. api: getCommissionDeatilListApi,
  58. mapKey: { totalPages: 'total', list: 'records', size: 'pageSize' }
  59. })
  60. ],
  61. data() {
  62. return {
  63. type: 1
  64. }
  65. },
  66. onLoad(params) {
  67. this.type = params.tag || 1
  68. this.loadData()
  69. },
  70. methods: {
  71. handleBack() {
  72. uni.navigateBack({
  73. delta: 1
  74. })
  75. },
  76. async loadData() {
  77. try {
  78. this.$data._query.today = this.type || 1
  79. await this._loadData()
  80. } finally {
  81. uni.stopPullDownRefresh()
  82. }
  83. }
  84. },
  85. filters: {
  86. filterType(type) {
  87. return { 1: '关系链', 2: '商城', 3: '本地', 4: '服务' }[type]
  88. }
  89. },
  90. onPullDownRefresh() {
  91. this.$data._query.page = 1
  92. this.loadData()
  93. }
  94. }
  95. </script>
  96. <style lang="less" scoped>
  97. .commisions-list {
  98. width: 100vw;
  99. background-color: #f6f6f5;
  100. min-height: 100vh;
  101. .container {
  102. .list {
  103. .item {
  104. background-color: #fff;
  105. padding: 20upx;
  106. box-sizing: border-boxf;
  107. margin-top: 30upx;
  108. .item-bar {
  109. display: flex;
  110. align-items: center;
  111. justify-content: space-between;
  112. font-size: 28upx;
  113. margin-bottom: 20upx;
  114. &.gray {
  115. color: #929292;
  116. font-size: 24upx;
  117. }
  118. }
  119. }
  120. }
  121. }
  122. .no-data {
  123. height: 600upx;
  124. width: 100vw;
  125. text-align: center;
  126. line-height: 600upx;
  127. color: #929292;
  128. font-size: 28upx;
  129. letter-spacing: 1em;
  130. }
  131. }
  132. </style>