多租户商城-商户小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 lines
5.4 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <view>
  3. <global-loading />
  4. <view class="totalClient-topBackImg flex-items flex-column">
  5. <view class="topBg">
  6. <view class="font-color-8A734A mar-top-30 fs60">{{SubordinateSalesData.total}}</view>
  7. <view class="font-color-C5AA7B">{{$t('page.cumulativedistributor')}}{{$t('common.persons')}}</view>
  8. </view>
  9. </view>
  10. <view class="content directAwardInfo" v-if="SubordinateSalesData.total>0">
  11. <view class="directAwardTit fs32 font-color-333">我的客户信息</view>
  12. <view class="flex-center clientList-box mar-top-30" v-for="(item, index) in SubordinateSalesDatalist"
  13. :key="index">
  14. <view class="directAward-box font-color-656 fs26" @click="arrowTypeChange(index)">
  15. <view class="directAward-icon flex-row-plus flex-items flex-sp-between">
  16. <view>
  17. <label class="orderId-box name font-color-333 fs28">分销员昵称{{item.distributorName}}</label>
  18. <view class="flex-row-plus flex-items mar-top-30 flex-sp-between">
  19. <label class="orderId-box font-color-999">手机号{{item.distributorPhone}}</label>
  20. </view>
  21. </view>
  22. <image v-if="item.ifOpen == false" class="arrow-down" src="http://36.138.125.206:8081/ceres-local-file/static/images/arrowDownIcon.png"></image>
  23. <image v-if="item.ifOpen == true" class="arrow-down" src="http://36.138.125.206:8081/ceres-local-file/static/images/arrowUpIcon.png"></image>
  24. </view>
  25. <view v-if="item.ifOpen == true">
  26. <view class="flex-row-plus flex-itdistributionOrderems mar-top-30 flex-sp-between">
  27. <label class="orderId-box font-color-999">累计下单数{{item.orders}}</label>
  28. <label class="commission-box mar-left-70 font-color-999">累计分佣¥{{item.price}}</label>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. <view v-else class="emptyCart-box flex-items-plus flex-column">
  35. <image class="emptyCart-img" src="http://36.138.125.206:8081/ceres-local-file/static/img/bgnull.png"></image>
  36. <label class="font-color-999 fs26 mar-top-30 font-color-999">{{$t('client.emptydata')}}</label>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. const NET = require('../../utils/request')
  42. const API = require('../../config/api')
  43. export default {
  44. data() {
  45. return {
  46. item: {},
  47. SubordinateSalesQuery: {
  48. model: {
  49. tenantCode: '',
  50. }
  51. },
  52. SubordinateSalesData: [],
  53. shopId: 0,
  54. distributorId: 0,
  55. page: 1, //当前页
  56. pageSize: 10, //每页记录数
  57. loadingType: 0,
  58. SubordinateSalesDatalist: []
  59. }
  60. },
  61. onLoad: function(options) {
  62. this.shopId = options.shopId
  63. this.distributorId = options.distributorId
  64. this.getSubordinateSales()
  65. },
  66. onReachBottom() {
  67. if (this.loadingType == 1) {
  68. uni.stopPullDownRefresh()
  69. } else {
  70. this.pageSize = this.pageSize + 10
  71. this.getSubordinateSales()
  72. }
  73. },
  74. methods: {
  75. getSubordinateSales() {
  76. // uni.showLoading({
  77. // mask: true,
  78. // title: '加载中...'
  79. // })
  80. NET.request(API.FindSubordinateSalesList, {
  81. shopId: this.shopId,
  82. distributorId: this.distributorId,
  83. page: this.page,
  84. pageSize: this.pageSize,
  85. }, 'GET').then(res => {
  86. uni.hideLoading()
  87. if (res.data.list.length == 0) {
  88. this.loadingType = 1
  89. }
  90. this.SubordinateSalesDatalist = res.data.list
  91. this.SubordinateSalesData = res.data
  92. }).catch(res => {
  93. uni.hideLoading()
  94. })
  95. },
  96. arrowTypeChange(arrowTypeId) {
  97. this.SubordinateSalesData.list[arrowTypeId].ifOpen = this.SubordinateSalesData.list[arrowTypeId].ifOpen == false ? true : false
  98. }
  99. }
  100. }
  101. </script>
  102. <style lang="scss">
  103. page {
  104. background: #333333;
  105. }
  106. .emptyCart-box {
  107. margin-top: 300upx;
  108. .emptyCart-img {
  109. width: 270upx;
  110. height: 270upx;
  111. }
  112. }
  113. .totalClient-topBackImg {
  114. width: 100%;
  115. padding: 0 20rpx;
  116. .topBg {
  117. width: 100%;
  118. height: 196upx;
  119. background: url("http://36.138.125.206:8081/ceres-local-file/static/images/totalPersonnelTopBackImg.png") no-repeat;
  120. margin-top: 50rpx;
  121. text-align: center;
  122. }
  123. .content {
  124. width: 690upx;
  125. background-color: #FFFFFF;
  126. .totalClient-left {
  127. width: 170upx;
  128. height: 20upx;
  129. }
  130. .massage-text {
  131. padding: 0 20upx;
  132. }
  133. }
  134. }
  135. .top {
  136. height: 50upx;
  137. background-image: linear-gradient(#FF8E14, #FFFFFF);
  138. }
  139. .directAwardInfo {
  140. width: 100%;
  141. height: 100vh;
  142. background: #F8F8F8;
  143. padding: 0 20rpx;
  144. .directAwardTit {
  145. height: 88rpx;
  146. line-height: 88rpx;
  147. font-size: 32rpx;
  148. color: #333333;
  149. text-align: center;
  150. padding-bottom: 20rpx;
  151. border-bottom: 2rpx solid #EEEEEE;
  152. font-weight: bold;
  153. }
  154. }
  155. .uni-collapse-cell[data-v-8f47561c] {
  156. -webkit-box-orient: vertical;
  157. -webkit-box-direction: normal;
  158. -webkit-flex-direction: column;
  159. flex-direction: column;
  160. border-color: #c8c7cc;
  161. border-bottom-width: 1px;
  162. border-bottom-style: none;
  163. }
  164. .directAward-box {
  165. width: 100%;
  166. display: flex;
  167. justify-content: flex-start;
  168. flex-direction: column;
  169. background-color: #FFFFFF;
  170. padding: 50upx 20upx;
  171. .orderId-box {
  172. width: 320upx;
  173. display: flex;
  174. justify-content: flex-start;
  175. flex-direction: row;
  176. }
  177. label.name {
  178. font-weight: bold;
  179. }
  180. .commission-box {
  181. text-align: right;
  182. }
  183. .arrow-down {
  184. width: 24upx;
  185. height: 24upx;
  186. }
  187. .upBox {
  188. border-top: 1upx solid #EDEDED;
  189. margin-top: 30upx;
  190. }
  191. }
  192. </style>