salesIndex.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <template>
  2. <view class="sales-index-container">
  3. <JHeader title="店铺分销中心" width="50" height="50" style="padding: 24upx 0 0;"></JHeader>
  4. <view class="salesIndex-topBackImg">
  5. <view class="topStoreTag flex-row-plus">
  6. <view class="storeName overflow font-color-FFF">
  7. <image class="storeLogoImg" :src="common.seamingImgUrl(distributeInfo.shopLogo)"></image>
  8. <label class=" fs24">{{ distributeInfo.shopName }}</label>
  9. </view>
  10. </view>
  11. <view class="flex-items flex-column">
  12. <image class="salesHeadImg" :src="common.seamingImgUrl(salesMainData.headImage)"></image>
  13. <view class="font-color-FFF fs36 mar-top-10">{{ salesMainData.name }}</view>
  14. <view class="gradeText">{{ distributeInfo.levelName }}</view>
  15. </view>
  16. <view class="flex-items-plus awardTopInfo">
  17. <view class="flex-row-plus award-box flex-items flex-sp-around">
  18. <view class="flex-column-plus flex-items" @click="go(`/another-tf/another-serve/distributionModule/totalAward?shopId=${distributeInfo.shopId}&distributorId=${distributeInfo.distributorId}`)">
  19. <label class="fs50">{{ salesMainData.cumulative }}</label>
  20. <label class="fs26 award">累计奖励(元)</label>
  21. </view>
  22. <view class="flex-column-plus flex-items" @click="go(`/another-tf/another-serve/distributionModule/unliquidated?shopId=${distributeInfo.shopId}&distributorId=${distributeInfo.distributorId}`)">
  23. <label class="fs50">{{ salesMainData.unsettled }}</label>
  24. <label class="fs26 award">未结算奖励(元)</label>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <view class="flex-items-plus awardInfo">
  30. <view class="flex-row-plus award-box flex-items flex-sp-around">
  31. <view class="flex-column-plus flex-items" @click="go(`/another-tf/another-serve/distributionModule/totalClient?shopId=${distributeInfo.shopId}&distributorId=${distributeInfo.distributorId}`)">
  32. <label class="fs44 font-color-C5AA7B">{{ salesMainData.users }}</label>
  33. <label class="fs24 font-color-333">累计客户(人)</label>
  34. </view>
  35. <view class="borRig-line-E5E5E5 lineRight" style="height: 44upx;"></view>
  36. <view class="flex-column-plus flex-items" @click="go(`/another-tf/another-serve/distributionModule/totalPersonnel?shopId=${distributeInfo.shopId}&distributorId=${distributeInfo.distributorId}`)">
  37. <label class="fs44 font-color-C5AA7B">{{ salesMainData.distributors }}</label>
  38. <label class="fs24 font-color-333">累计分销员(人)</label>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="btnList">
  43. <view class="btnListBox flex-row-plus flex-items flex-sp-around">
  44. <view class="flex-column-plus flex-items" @click="gopromotion(1)">
  45. <tui-icon name="shop" :size="64" unit="upx" color="#333333" margin="0"></tui-icon>
  46. <label class="fs26 font-color-333">推广店铺</label>
  47. </view>
  48. <view class="flex-column-plus flex-items" @click="go(`/another-tf/another-serve/distributionModule/commodity?shopId=${distributeInfo.shopId}&distributorId=${distributeInfo.distributorId}`)">
  49. <tui-icon name="bag" :size="64" unit="upx" color="#333333" margin="0"></tui-icon>
  50. <label class="fs26 font-color-333">推广商品</label>
  51. </view>
  52. <view class="flex-column-plus flex-items" @click="go(`/another-tf/another-serve/distributionModule/distributionOrder?shopId=${distributeInfo.shopId}&distributorId=${distributeInfo.distributorId}`)">
  53. <tui-icon name="order" :size="64" unit="upx" color="#333333" margin="0"></tui-icon>
  54. <label class="fs26 font-color-333">分销订单</label>
  55. </view>
  56. <view class="flex-column-plus flex-items" @click="gopromotion(2)">
  57. <tui-icon name="down" :size="64" unit="upx" color="#333333" margin="0"></tui-icon>
  58. <label class="fs26 font-color-333">邀请下级</label>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. import { getShopDistributorSalesMainInfoApi, getSharePicShopApi } from '../../../api/anotherTFInterface'
  66. export default {
  67. name: 'SalesIndex',
  68. data() {
  69. return {
  70. distributeInfo: {},
  71. salesMainData: {}
  72. }
  73. },
  74. onLoad(options) {
  75. this.distributeInfo = JSON.parse(options.distributeInfo)
  76. this.getSalesMainInfo()
  77. },
  78. methods: {
  79. getSalesMainInfo() {
  80. uni.showLoading()
  81. getShopDistributorSalesMainInfoApi({
  82. distributorId: this.distributeInfo.distributorId,
  83. shopId: this.distributeInfo.shopId
  84. }).then((res) => {
  85. uni.hideLoading()
  86. this.salesMainData = res.data
  87. })
  88. .catch((e) => {
  89. uni.hideLoading()
  90. })
  91. },
  92. // 推广店铺
  93. gopromotion(promoteType) {
  94. let system
  95. // #ifdef APP
  96. system = 1
  97. // #endif
  98. // #ifdef H5
  99. system = 3
  100. // #endif
  101. // #ifdef MP-WEIXIN
  102. system = 2
  103. // #endif
  104. // #ifdef MP-ALIPAY
  105. system = 4
  106. // #endif
  107. uni.showLoading()
  108. getSharePicShopApi({
  109. type: promoteType,
  110. shopId: this.distributeInfo.shopId,
  111. distributorId: this.distributeInfo.distributorId,
  112. terminal: system
  113. }).then((res) => {
  114. uni.hideLoading()
  115. uni.navigateTo({
  116. url: `/another-tf/another-serve/shareProduct/index?shareType=1&shopId=${this.distributeInfo.shopId}&shareImg=${res.data}&salesId=${this.distributeInfo.distributorId}`
  117. })
  118. })
  119. .catch((e) => {
  120. uni.hideLoading()
  121. })
  122. }
  123. }
  124. }
  125. </script>
  126. <style lang="less" scoped>
  127. .sales-index-container {
  128. min-height: 100vh;
  129. box-sizing: border-box;
  130. background-color: #F7F7F7;
  131. .salesIndex-topBackImg {
  132. width: 100%;
  133. background: #333333;
  134. padding-top: 10upx;
  135. position: relative;
  136. .topStoreTag {
  137. background: #717171;
  138. height: 50upx;
  139. width: 180upx;
  140. border-radius: 20rpx 0 0 20rpx;
  141. position: absolute;
  142. right: 0;
  143. top: 50rpx;
  144. .storeName {
  145. height: 50upx;
  146. display: flex;
  147. align-items: center;
  148. margin-left: 5rpx;
  149. }
  150. .storeLogoImg {
  151. width: 40upx;
  152. height: 40upx;
  153. border-radius: 50%;
  154. margin-right: 10rpx;
  155. }
  156. }
  157. .salesHeadImg {
  158. width: 100upx;
  159. height: 100upx;
  160. border-radius: 50%;
  161. border: 10rpx solid #717171;
  162. }
  163. .gradeText {
  164. font-size: 26rpx;
  165. color: #FFFFFF;
  166. font-weight: 400;
  167. line-height: 36rpx;
  168. text-align: center;
  169. margin-top: 15upx;
  170. padding: 5upx 10upx;
  171. opacity: 0.7;
  172. }
  173. }
  174. .awardTopInfo {
  175. .award-box {
  176. height: 158upx;
  177. width: 690upx;
  178. margin-top: 30upx;
  179. label {
  180. color: #FDEDD3;
  181. }
  182. .award {
  183. color: #8A734A;
  184. width: 222rpx;
  185. height: 78rpx;
  186. line-height: 78rpx;
  187. background: linear-gradient(90deg, #FDEDD3 0%, #EDDABA 100%);
  188. text-align: center;
  189. margin-bottom: 28rpx;
  190. }
  191. }
  192. }
  193. .awardInfo {
  194. .award-box {
  195. height: 158upx;
  196. width: 690upx;
  197. margin-top: 30upx;
  198. background: #FFFFFF;
  199. }
  200. }
  201. .btnList {
  202. display: flex;
  203. width: 100%;
  204. margin-top: 30upx;
  205. flex-flow: wrap;
  206. justify-content: center;
  207. .btnListBox {
  208. background: #FFFFFF;
  209. height: 196upx;
  210. width: 690upx;
  211. }
  212. .salesIcon {
  213. width: 90rpx;
  214. height: 90rpx;
  215. }
  216. }
  217. }
  218. </style>