commissionItem.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view class="commission_item">
  3. <view class="commission_top">
  4. <view class="top_left">{{item.item}}</view>
  5. <view class="top_right">
  6. <text class="account_type">{{ item.accountType === '1' ? '前端' : '后端' }}</text>
  7. </view>
  8. </view>
  9. <view class="commission_info">
  10. <view class="info_row">
  11. <view class="info_item">
  12. <text class="label">电话: </text>
  13. <show-real-text :real="item.phone" :type='type'></show-real-text>
  14. </view>
  15. </view>
  16. <view class="info_row">
  17. <view class="info_item">
  18. <text class="label">收单时间: </text>
  19. <text class="value">{{item.receiptDate || '-'}}</text>
  20. </view>
  21. </view>
  22. <view class="info_row">
  23. <view class="info_item">
  24. <text class="label">收单人: </text>
  25. <text class="value">{{item.receiptNickName || '-'}}</text>
  26. </view>
  27. <view class="info_item">
  28. <text class="label">公司: </text>
  29. <text class="value">{{item.orgName || '-'}}</text>
  30. </view>
  31. </view>
  32. <view class="info_row">
  33. <view class="info_item">
  34. <text class="label">分成所属人: </text>
  35. <text class="value">{{item.userName || '-'}}</text>
  36. </view>
  37. <view class="info_item">
  38. <text class="label">分成比例: </text>
  39. <text class="value">{{item.commissionRate || '-'}}%</text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="commission_amount">
  44. <view class="amount_item">
  45. <view class="amount_label">业绩</view>
  46. <view class="amount_value primary">{{formatAmount(item.commissionAmount)}}</view>
  47. </view>
  48. <view class="amount_item">
  49. <view class="amount_label">毛业绩</view>
  50. <view class="amount_value">{{formatAmount(item.grossAmount)}}</view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. export default {
  57. props: {
  58. item: {
  59. type: Object,
  60. required: true
  61. },
  62. type: {
  63. type: String,
  64. default: '2'
  65. }
  66. },
  67. methods: {
  68. formatAmount(amount) {
  69. if (!amount) return '-';
  70. return parseFloat(amount).toLocaleString();
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .commission_item {
  77. background: #fff;
  78. border-radius: 20px;
  79. padding: 20px;
  80. margin-bottom: 20px;
  81. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  82. .commission_top {
  83. display: flex;
  84. justify-content: space-between;
  85. margin-bottom: 15px;
  86. .top_left {
  87. font-size: 18px;
  88. font-weight: bold;
  89. color: #202020;
  90. }
  91. .top_right {
  92. .account_type {
  93. background: #108cff;
  94. color: #fff;
  95. padding: 4px 8px;
  96. border-radius: 10px;
  97. font-size: 12px;
  98. }
  99. }
  100. }
  101. .commission_info {
  102. margin-bottom: 15px;
  103. .info_row {
  104. display: flex;
  105. margin-bottom: 8px;
  106. &:last-child {
  107. margin-bottom: 0;
  108. }
  109. .info_item {
  110. flex: 1;
  111. display: flex;
  112. align-items: center;
  113. font-size: 14px;
  114. .label {
  115. color: #9b9aa2;
  116. margin-right: 8px;
  117. min-width: 60px;
  118. }
  119. .value {
  120. color: #202020;
  121. }
  122. }
  123. }
  124. }
  125. .commission_amount {
  126. display: flex;
  127. justify-content: space-around;
  128. padding: 15px 0;
  129. border-top: 1px solid #f0f0f0;
  130. background: #f8f9fb;
  131. border-radius: 10px;
  132. .amount_item {
  133. text-align: center;
  134. .amount_label {
  135. font-size: 12px;
  136. color: #9b9aa2;
  137. margin-bottom: 5px;
  138. }
  139. .amount_value {
  140. font-size: 16px;
  141. font-weight: bold;
  142. color: #202020;
  143. &.primary {
  144. color: #108cff;
  145. }
  146. }
  147. }
  148. }
  149. }
  150. </style>