多租户商城-商户小程序端
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.

290 lines
8.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <view class="container">
  3. <global-loading />
  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="item.shopLogo"></image>
  8. <label class=" fs24">{{item.shopName}}</label>
  9. </view>
  10. </view>
  11. <view class="flex-items flex-column">
  12. <image class="salesHeadImg" :src="SalesMainItem.headImage"></image>
  13. <view class="font-color-FFF fs36 mar-top-10">{{SalesMainItem.name}}</view>
  14. <view class="gradeText">{{item.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="gototalAward">
  19. <label class="fs50">{{SalesMainItem.cumulative}}</label>
  20. <label class="fs26 award">累计奖励(</label>
  21. </view>
  22. <view class="flex-column-plus flex-items" @click="gounliquidated">
  23. <label class="fs50">{{SalesMainItem.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="gototalClient">
  32. <label class="fs44 font-color-C5AA7B">{{SalesMainItem.users}}</label>
  33. <label class="fs24 font-color-333">{{$t('page.cumulativecustomer')}}{{$t('common.persons')}}</label>
  34. </view>
  35. <view class="borRig-line-E5E5E5 lineRight" style="height: 44upx;"></view>
  36. <view class="flex-column-plus flex-items" @click="gototalPersonnel">
  37. <label class="fs44 font-color-C5AA7B">{{SalesMainItem.distributors}}</label>
  38. <label class="fs24 font-color-333">{{$t('page.cumulativedistributor')}}{{$t('common.persons')}}</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. <image class="salesIcon" src="http://36.138.125.206:8081/ceres-local-file/static/images/salesStoreIcon.png"></image>
  46. <label class="fs26 font-color-333">推广店铺</label>
  47. </view>
  48. <view class="flex-column-plus flex-items" @click="storeindex">
  49. <image class="salesIcon" src="http://36.138.125.206:8081/ceres-local-file/static/images/extendGoodsIcon.png"></image>
  50. <label class="fs26 font-color-333">推广商品</label>
  51. </view>
  52. <view class="flex-column-plus flex-items" @click="godistributionOrder">
  53. <image class="salesIcon" src="http://36.138.125.206:8081/ceres-local-file/static/images/salesOrderIcon.png"></image>
  54. <label class="fs26 font-color-333">分销订单</label>
  55. </view>
  56. <view class="flex-column-plus flex-items" @click="gopromotion(2)">
  57. <image class="salesIcon" src="http://36.138.125.206:8081/ceres-local-file/static/images/inviteLowerIcon.png"></image>
  58. <label class="fs26 font-color-333">邀请下级</label>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. const NET = require('../../utils/request')
  66. const API = require('../../config/api')
  67. export default {
  68. data() {
  69. return {
  70. item: {},
  71. SalesMainItem: {},
  72. }
  73. },
  74. onLoad(options) {
  75. this.item = JSON.parse(options.distributeInfo)
  76. uni.setStorageSync("salesId", this.item.distributorId)
  77. this.getSalesMainInfo()
  78. },
  79. methods: {
  80. getSalesMainInfo() {
  81. // uni.showLoading({
  82. // mask: true,
  83. // title: '加载中...'
  84. // })
  85. NET.request(API.QuerySalesMainInfo, {
  86. distributorId: this.item.distributorId,
  87. shopId:this.item.shopId
  88. }, 'GET').then(res => {
  89. uni.hideLoading()
  90. this.SalesMainItem = res.data
  91. }).catch(res => {
  92. uni.hideLoading()
  93. })
  94. },
  95. //累计奖励
  96. gototalAward() {
  97. uni.navigateTo({
  98. url: 'totalAward?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  99. });
  100. },
  101. // 未结算奖励
  102. gounliquidated() {
  103. uni.navigateTo({
  104. url: 'unliquidated?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  105. });
  106. },
  107. // 累计客户
  108. gototalClient() {
  109. uni.navigateTo({
  110. url: 'totalClient?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  111. });
  112. },
  113. // 累计分销员
  114. gototalPersonnel() {
  115. uni.navigateTo({
  116. url: 'totalPersonnel?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  117. });
  118. },
  119. // 推广店铺
  120. gopromotion(promoteType){
  121. // #ifdef APP-PLUS
  122. var system = 1
  123. // #endif
  124. // #ifdef H5
  125. var system = 3
  126. // #endif
  127. // #ifdef MP-WEIXIN
  128. var system = 2
  129. // #endif
  130. // #ifdef MP-ALIPAY
  131. var system = 4
  132. // #endif
  133. // uni.showLoading({
  134. // mask: true,
  135. // title: '请稍候...'
  136. // })
  137. /* const res = {'data':'https://cereshop.oss-cn-shenzhen.aliyuncs.com/test/2021-06-10/64223b9f0eef41abbb5d4056b9a40e2a08441534-3cbe-47af-8134-fc74635e069f.png'}
  138. uni.hideLoading()
  139. uni.navigateTo({
  140. url: `../../pages_category_page1/distributionModule/shareProduct?shareImg=${res.data}&shopId=${this.item.shopId}`
  141. }); */
  142. NET.request(API.shopGetSharePic, {
  143. type: promoteType,
  144. shopId: this.item.shopId,
  145. distributorId: this.item.distributorId,
  146. terminal: system
  147. }, 'GET').then(res => {
  148. uni.hideLoading()
  149. uni.navigateTo({
  150. url: `../../pages_category_page1/distributionModule/shareProduct?shareType=1&shareImg=${res.data}&shopId=${this.item.shopId}&salesId=${this.item.distributorId}`
  151. });
  152. }).catch(res => {
  153. uni.hideLoading()
  154. })
  155. },
  156. // 推广商品
  157. storeindex(){
  158. uni.navigateTo({
  159. url: 'commodity?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId + '&headimg=' + this.SalesMainItem.headImage + '&username=' + this.SalesMainItem.name
  160. });
  161. },
  162. // 分销订单
  163. godistributionOrder(){
  164. uni.navigateTo({
  165. url: `distributionOrder?shopId=${this.item.shopId}&distributorId=${this.item.distributorId}`
  166. });
  167. },
  168. // 邀请下级
  169. goinvite(){
  170. uni.navigateTo({
  171. url: 'invite?tenantCode=' + JSON.stringify(this.SalesMainItem) + '&shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  172. });
  173. }
  174. }
  175. }
  176. </script>
  177. <style lang="scss">
  178. page {
  179. background-color: #F7F7F7;
  180. }
  181. .container {
  182. .salesIndex-topBackImg {
  183. width: 100%;
  184. background: #333333;
  185. padding-top: 10upx;
  186. position: relative;
  187. .topStoreTag {
  188. background: #717171;
  189. height: 50upx;
  190. width: 180upx;
  191. border-radius: 20rpx 0 0 20rpx;
  192. position: absolute;
  193. right: 0;
  194. top: 50rpx;
  195. .storeName {
  196. height: 50upx;
  197. display: flex;
  198. align-items: center;
  199. margin-left: 5rpx;
  200. }
  201. .storeLogoImg {
  202. width: 40upx;
  203. height: 40upx;
  204. border-radius: 50%;
  205. margin-right: 10rpx;
  206. }
  207. }
  208. .salesHeadImg {
  209. width: 100upx;
  210. height: 100upx;
  211. border-radius: 50%;
  212. border: 10rpx solid #717171;
  213. }
  214. .gradeText {
  215. font-size: 26rpx;
  216. color: #FFFFFF;
  217. font-weight: 400;
  218. line-height: 36rpx;
  219. text-align: center;
  220. margin-top: 15upx;
  221. padding: 5upx 10upx;
  222. opacity: 0.7;
  223. }
  224. }
  225. .awardTopInfo {
  226. .award-box {
  227. height: 158upx;
  228. width: 690upx;
  229. margin-top: 30upx;
  230. label {
  231. color: #FDEDD3;
  232. }
  233. .award {
  234. color: #8A734A;
  235. width: 222rpx;
  236. height: 78rpx;
  237. line-height: 78rpx;
  238. background: linear-gradient(90deg, #FDEDD3 0%, #EDDABA 100%);
  239. text-align: center;
  240. margin-bottom: 28rpx;
  241. }
  242. .salesIcon {
  243. width: 60upx;
  244. height: 56upx;
  245. }
  246. }
  247. }
  248. .awardInfo {
  249. .award-box {
  250. height: 158upx;
  251. width: 690upx;
  252. margin-top: 30upx;
  253. background: #FFFFFF;
  254. .salesIcon {
  255. width: 60upx;
  256. height: 56upx;
  257. }
  258. }
  259. }
  260. .btnList {
  261. display: flex;
  262. width: 100%;
  263. margin-top: 30upx;
  264. flex-flow: wrap;
  265. justify-content: center;
  266. .btnListBox {
  267. background: #FFFFFF;
  268. height: 196upx;
  269. width: 690upx;
  270. }
  271. .salesIcon {
  272. width: 90rpx;
  273. height: 90rpx;
  274. }
  275. }
  276. }
  277. </style>