salesIndex.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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">累计客户(人)</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">累计分销员(人)</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="../../static/images/origin/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="../../static/images/origin/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="../../static/images/origin/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="../../static/images/origin/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. })
  92. .catch((res) => {
  93. uni.hideLoading()
  94. })
  95. },
  96. // 累计奖励
  97. gototalAward() {
  98. uni.navigateTo({
  99. url: 'totalAward?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  100. })
  101. },
  102. // 未结算奖励
  103. gounliquidated() {
  104. uni.navigateTo({
  105. url: 'unliquidated?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  106. })
  107. },
  108. // 累计客户
  109. gototalClient() {
  110. uni.navigateTo({
  111. url: 'totalClient?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  112. })
  113. },
  114. // 累计分销员
  115. gototalPersonnel() {
  116. uni.navigateTo({
  117. url: 'totalPersonnel?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  118. })
  119. },
  120. // 推广店铺
  121. gopromotion(promoteType) {
  122. // #ifdef APP-PLUS
  123. var system = 1
  124. // #endif
  125. // #ifdef H5
  126. var system = 3
  127. // #endif
  128. // #ifdef MP-WEIXIN
  129. var system = 2
  130. // #endif
  131. // #ifdef MP-ALIPAY
  132. var system = 4
  133. // #endif
  134. // uni.showLoading({
  135. // mask: true,
  136. // title: '请稍候...'
  137. // })
  138. /* const res = {'data':'../../static/images/origin/xxx.png'}
  139. uni.hideLoading()
  140. uni.navigateTo({
  141. url: `../../pages_category_page1/distributionModule/shareProduct?shareImg=${res.data}&shopId=${this.item.shopId}`
  142. }); */
  143. NET.request(API.shopGetSharePic, {
  144. type: promoteType,
  145. shopId: this.item.shopId,
  146. distributorId: this.item.distributorId,
  147. terminal: system
  148. }, 'GET').then((res) => {
  149. uni.hideLoading()
  150. uni.navigateTo({
  151. url: `../../pages_category_page1/distributionModule/shareProduct?shareType=1&shareImg=${res.data}&shopId=${this.item.shopId}&salesId=${this.item.distributorId}`
  152. })
  153. })
  154. .catch((res) => {
  155. uni.hideLoading()
  156. })
  157. },
  158. // 推广商品
  159. storeindex() {
  160. uni.navigateTo({
  161. url: 'commodity?shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId + '&headimg=' + this.SalesMainItem.headImage + '&username=' + this.SalesMainItem.name
  162. })
  163. },
  164. // 分销订单
  165. godistributionOrder() {
  166. uni.navigateTo({
  167. url: `distributionOrder?shopId=${this.item.shopId}&distributorId=${this.item.distributorId}`
  168. })
  169. },
  170. // 邀请下级
  171. goinvite() {
  172. uni.navigateTo({
  173. url: 'invite?tenantCode=' + JSON.stringify(this.SalesMainItem) + '&shopId=' + this.item.shopId + '&distributorId=' + this.item.distributorId
  174. })
  175. }
  176. }
  177. }
  178. </script>
  179. <style lang="scss">
  180. page {
  181. background-color: #F7F7F7;
  182. }
  183. .container {
  184. .salesIndex-topBackImg {
  185. width: 100%;
  186. background: #333333;
  187. padding-top: 10upx;
  188. position: relative;
  189. .topStoreTag {
  190. background: #717171;
  191. height: 50upx;
  192. width: 180upx;
  193. border-radius: 20rpx 0 0 20rpx;
  194. position: absolute;
  195. right: 0;
  196. top: 50rpx;
  197. .storeName {
  198. height: 50upx;
  199. display: flex;
  200. align-items: center;
  201. margin-left: 5rpx;
  202. }
  203. .storeLogoImg {
  204. width: 40upx;
  205. height: 40upx;
  206. border-radius: 50%;
  207. margin-right: 10rpx;
  208. }
  209. }
  210. .salesHeadImg {
  211. width: 100upx;
  212. height: 100upx;
  213. border-radius: 50%;
  214. border: 10rpx solid #717171;
  215. }
  216. .gradeText {
  217. font-size: 26rpx;
  218. color: #FFFFFF;
  219. font-weight: 400;
  220. line-height: 36rpx;
  221. text-align: center;
  222. margin-top: 15upx;
  223. padding: 5upx 10upx;
  224. opacity: 0.7;
  225. }
  226. }
  227. .awardTopInfo {
  228. .award-box {
  229. height: 158upx;
  230. width: 690upx;
  231. margin-top: 30upx;
  232. label {
  233. color: #FDEDD3;
  234. }
  235. .award {
  236. color: #8A734A;
  237. width: 222rpx;
  238. height: 78rpx;
  239. line-height: 78rpx;
  240. background: linear-gradient(90deg, #FDEDD3 0%, #EDDABA 100%);
  241. text-align: center;
  242. margin-bottom: 28rpx;
  243. }
  244. .salesIcon {
  245. width: 60upx;
  246. height: 56upx;
  247. }
  248. }
  249. }
  250. .awardInfo {
  251. .award-box {
  252. height: 158upx;
  253. width: 690upx;
  254. margin-top: 30upx;
  255. background: #FFFFFF;
  256. .salesIcon {
  257. width: 60upx;
  258. height: 56upx;
  259. }
  260. }
  261. }
  262. .btnList {
  263. display: flex;
  264. width: 100%;
  265. margin-top: 30upx;
  266. flex-flow: wrap;
  267. justify-content: center;
  268. .btnListBox {
  269. background: #FFFFFF;
  270. height: 196upx;
  271. width: 690upx;
  272. }
  273. .salesIcon {
  274. width: 90rpx;
  275. height: 90rpx;
  276. }
  277. }
  278. }
  279. </style>