infoTwo.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. <template>
  2. <view class="center">
  3. <view class="dz"><image src="../../static/dp/dz.png" mode=""></image></view>
  4. <view class="top"><image src="../../static/dp/top.png" mode=""></image></view>
  5. <view class="title flex">
  6. <view class="logo"><image src="../../static/dp/log.png" mode=""></image></view>
  7. <view class="time">{{ newTime }}</view>
  8. </view>
  9. <view class="info-box">
  10. <view class="info-item">
  11. <view class="info-item-bg"><image src="../../static/dp/money.png" mode=""></image></view>
  12. <view class="info-name">进账余额</view>
  13. <view class="info-price">¥{{ price }}</view>
  14. </view>
  15. <view class="info-item">
  16. <view class="info-item-bg"><image src="../../static/dp/order.png" mode=""></image></view>
  17. <view class="info-name">订单数</view>
  18. <view class="info-price">{{ order }}</view>
  19. </view>
  20. <view class="info-item">
  21. <view class="info-item-bg"><image src="../../static/dp/people.png" mode=""></image></view>
  22. <view class="info-name">会员数</view>
  23. <view class="info-price">{{ user }}</view>
  24. </view>
  25. <view class="info-item">
  26. <view class="info-item-bg"><image src="../../static/dp/ylb.png" mode=""></image></view>
  27. <view class="info-name">已裂变新客</view>
  28. <view class="info-price">{{ explode_num }}</view>
  29. </view>
  30. <!-- <view class="info-item">
  31. <view class="info-item-bg"><image src="../../static/dp/dlb.png" mode=""></image></view>
  32. <view class="info-name">待裂变新客</view>
  33. <view class="info-price">23</view>
  34. </view> -->
  35. <view class="info-item">
  36. <view class="info-item-bg"><image src="../../static/dp/pgl.png" mode=""></image></view>
  37. <view class="info-name">曝光量</view>
  38. <view class="info-price">{{ visit }}</view>
  39. </view>
  40. </view>
  41. <view class="ranking-right">
  42. <view class="ranking-right-item">
  43. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  44. <view class="ranking-item-title">个人成交金额排行</view>
  45. <view class="ranking-item-bottom">
  46. <view class="ranking-item-bottom-title">
  47. <view class="ranking-item-bottom-font" style="width: 12%;">序号</view>
  48. <view class="ranking-item-bottom-font" style="width: 12%;">姓名</view>
  49. <view class="ranking-item-bottom-font" style="width: 36%;">所属门店</view>
  50. <view class="ranking-item-bottom-font">成交金额</view>
  51. <view class="ranking-item-bottom-font">订单数量</view>
  52. </view>
  53. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in yglist">
  54. <view class="ranking-item-bottom-font" style="width: 12%;">{{ index + 1 }}</view>
  55. <view class="ranking-item-bottom-font" style="width: 12%;">{{ item.nickname }}</view>
  56. <view class="ranking-item-bottom-font" style="width: 36%;">{{ item.store.name }}</view>
  57. <view class="ranking-item-bottom-font">¥{{ item.sum_pay_price }}00</view>
  58. <view class="ranking-item-bottom-font">{{ item.order_count }}</view>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="ranking-right-item">
  63. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  64. <view class="ranking-item-title">个人裂变新客排行</view>
  65. <view class="ranking-item-bottom">
  66. <view class="ranking-item-bottom-title">
  67. <view class="ranking-item-bottom-font" style="width: 12%;">序号</view>
  68. <view class="ranking-item-bottom-font" style="width: 22%;">姓名</view>
  69. <view class="ranking-item-bottom-font" style="width: 46%;">所属门店</view>
  70. <view class="ranking-item-bottom-font">已裂变</view>
  71. <!-- <view class="ranking-item-bottom-font">待裂变</view> -->
  72. </view>
  73. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in grlblist">
  74. <view class="ranking-item-bottom-font" style="width: 12%;">{{ index + 1 }}</view>
  75. <view class="ranking-item-bottom-font" style="width: 22%;">{{ item.nickname }}</view>
  76. <view class="ranking-item-bottom-font" style="width: 46%;">{{ item.belong_store.name }}</view>
  77. <view class="ranking-item-bottom-font">{{ item.explode_count }}</view>
  78. <!-- <view class="ranking-item-bottom-font">12</view> -->
  79. </view>
  80. </view>
  81. </view>
  82. <view class="ranking-right-item">
  83. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  84. <view class="ranking-item-title">破万大神</view>
  85. <view class="ranking-item-bottom">
  86. <view class="ranking-item-bottom-title">
  87. <view class="ranking-item-bottom-font" style="width: 12%;">序号</view>
  88. <view class="ranking-item-bottom-font" style="width: 12%;">姓名</view>
  89. <view class="ranking-item-bottom-font" style="width: 36%;">所属门店</view>
  90. <view class="ranking-item-bottom-font">成交金额</view>
  91. <view class="ranking-item-bottom-font">订单数量</view>
  92. </view>
  93. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in pwlist">
  94. <view class="ranking-item-bottom-font" style="width: 12%;">{{ index + 1 }}</view>
  95. <view class="ranking-item-bottom-font" style="width: 12%;">{{ item.waiter.user.nickname }}</view>
  96. <view class="ranking-item-bottom-font" style="width: 36%;">{{ item.store.name }}</view>
  97. <view class="ranking-item-bottom-font">¥{{ item.sum_pay_price }}00</view>
  98. <view class="ranking-item-bottom-font">{{ item.order_count }}</view>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="ranking-right-item">
  103. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  104. <view class="ranking-item-title">门店成交金额排行</view>
  105. <view class="ranking-item-bottom">
  106. <view class="ranking-item-bottom-title">
  107. <view class="ranking-item-bottom-font" style="width: 30%;">序号</view>
  108. <view class="ranking-item-bottom-font" style="width: 40%;">所属门店</view>
  109. <view class="ranking-item-bottom-font" style="width: 30%;">成交金额</view>
  110. </view>
  111. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in mdcjlist">
  112. <view class="ranking-item-bottom-font" style="width: 30%;">{{ index + 1 }}</view>
  113. <view class="ranking-item-bottom-font" style="width: 40%;">{{ item.name }}</view>
  114. <view class="ranking-item-bottom-font" style="width: 30%;">{{ item.sum_pay_price }}</view>
  115. </view>
  116. </view>
  117. </view>
  118. <view class="ranking-right-item">
  119. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  120. <view class="ranking-item-title">门店裂变新客排行</view>
  121. <view class="ranking-item-bottom">
  122. <view class="ranking-item-bottom-title">
  123. <view class="ranking-item-bottom-font" style="width: 30%;">序号</view>
  124. <view class="ranking-item-bottom-font" style="width: 40%;">所属门店</view>
  125. <view class="ranking-item-bottom-font" style="width: 30%;">已裂变</view>
  126. </view>
  127. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in mdlblist">
  128. <view class="ranking-item-bottom-font" style="width: 30%;">{{ index + 1 }}</view>
  129. <view class="ranking-item-bottom-font" style="width: 40%;">{{ item.name }}</view>
  130. <view class="ranking-item-bottom-font" style="width: 30%;">{{ item.explode_count }}</view>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="ranking-right-item">
  135. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  136. <view class="ranking-item-title">超级客户</view>
  137. <view class="ranking-item-bottom">
  138. <view class="ranking-item-bottom-title">
  139. <view class="ranking-item-bottom-font" style="width: 25%;">序号</view>
  140. <view class="ranking-item-bottom-font" style="width: 25%;">姓名</view>
  141. <view class="ranking-item-bottom-font" style="width: 25%;">成交金额</view>
  142. <view class="ranking-item-bottom-font" style="width: 25%;">订单数</view>
  143. </view>
  144. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in cjkhlist">
  145. <view class="ranking-item-bottom-font" style="width: 25%;">{{ index + 1 }}</view>
  146. <view class="ranking-item-bottom-font" style="width: 25%;">{{ item.nickname }}</view>
  147. <view class="ranking-item-bottom-font" style="width: 25%;">¥{{ item.sum_pay_price }}</view>
  148. <view class="ranking-item-bottom-font" style="width: 25%;">{{ item.order_count }}</view>
  149. </view>
  150. </view>
  151. </view>
  152. <view class="ranking-right-item">
  153. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  154. <view class="ranking-item-title">热卖项目排行</view>
  155. <view class="ranking-item-bottom">
  156. <view class="ranking-item-bottom-title">
  157. <view class="ranking-item-bottom-font" style="width: 15%;">序号</view>
  158. <view class="ranking-item-bottom-font" style="width: 35%;">项目名称</view>
  159. <view class="ranking-item-bottom-font" style="width: 25%;">销售数量</view>
  160. <view class="ranking-item-bottom-font" style="width: 25%;">销售金额</view>
  161. </view>
  162. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in rmxmlist">
  163. <view class="ranking-item-bottom-font" style="width: 15%;">{{ index + 1 }}</view>
  164. <view class="ranking-item-bottom-font" style="width: 35%;">{{ item.store_name }}</view>
  165. <view class="ranking-item-bottom-font" style="width: 25%;">{{ item.sales }}</view>
  166. <view class="ranking-item-bottom-font" style="width: 25%;">{{ item.sales * 1 * item.price * 1 }}</view>
  167. </view>
  168. </view>
  169. </view>
  170. <view class="ranking-right-item">
  171. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  172. <view class="ranking-item-title">小组成交金额排行</view>
  173. <view class="ranking-item-bottom">
  174. <view class="ranking-item-bottom-title">
  175. <view class="ranking-item-bottom-font" style="width: 12%;">序号</view>
  176. <view class="ranking-item-bottom-font" style="width: 12%;">组名</view>
  177. <view class="ranking-item-bottom-font" style="width: 36%;">所属门店</view>
  178. <view class="ranking-item-bottom-font">成交金额</view>
  179. <view class="ranking-item-bottom-font">订单数量</view>
  180. </view>
  181. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in xccjlist">
  182. <view class="ranking-item-bottom-font" style="width: 12%;">{{ index + 1 }}</view>
  183. <view class="ranking-item-bottom-font" style="width: 12%;">{{ item.group_name }}</view>
  184. <view class="ranking-item-bottom-font" style="width: 36%;">{{ item.store.name }}</view>
  185. <view class="ranking-item-bottom-font">¥{{ item.sum_pay_price }}</view>
  186. <view class="ranking-item-bottom-font">{{ item.order_count }}</view>
  187. </view>
  188. </view>
  189. </view>
  190. <view class="ranking-right-item">
  191. <view class="ranking-right-item-bg"><image src="../../static/dp/bg.png" mode=""></image></view>
  192. <view class="ranking-item-title">小组裂变新客排行</view>
  193. <view class="ranking-item-bottom">
  194. <view class="ranking-item-bottom-title">
  195. <view class="ranking-item-bottom-font" style="width: 12%;">序号</view>
  196. <view class="ranking-item-bottom-font" style="width: 12%;">组名</view>
  197. <view class="ranking-item-bottom-font" style="width: 56%;">所属门店</view>
  198. <view class="ranking-item-bottom-font">已裂变</view>
  199. <!-- <view class="ranking-item-bottom-font">待裂变</view> -->
  200. </view>
  201. <view class="ranking-item-bottom-main" :class="{ current: index % 2 != 0 }" v-for="(item, index) in xzlblist">
  202. <view class="ranking-item-bottom-font" style="width: 12%;">{{ index + 1 }}</view>
  203. <view class="ranking-item-bottom-font" style="width: 12%;">{{ item.group_name }}</view>
  204. <view class="ranking-item-bottom-font" style="width: 56%;">{{ item.store.name }}</view>
  205. <view class="ranking-item-bottom-font">{{ item.group_explode_count }}</view>
  206. <!-- <view class="ranking-item-bottom-font">12</view> -->
  207. </view>
  208. </view>
  209. </view>
  210. </view>
  211. <!-- <view class="bottom"><image src="../../static/dp/bottom.png" mode=""></image></view> -->
  212. </view>
  213. </template>
  214. <script>
  215. import { getnewTime, timeComputed } from '@/utils/rocessor.js';
  216. import { loadIndexs, waiter_rank, user_explode_rank, over10000, store_list, store_explode_rank, super_user, product, groupList, group_explode_rank } from '@/api/info.js';
  217. export default {
  218. data() {
  219. return {
  220. newTime: '2022.08.22',
  221. explode_num: '',
  222. order: '',
  223. price: '',
  224. user: '',
  225. visit: '',
  226. time: '',
  227. yglist: [], //员工排行榜
  228. grlblist: [], //个人裂变新客排行
  229. pwlist: [], //破万大神
  230. mdcjlist: [], //门店成交金额排行
  231. mdlblist: [], //门店裂变排行
  232. cjkhlist: [], //超级客户
  233. rmxmlist: [], //热卖项目排行
  234. xccjlist: [], //小组成交金额排行
  235. xzlblist: [] //小组裂变新客排行榜
  236. };
  237. },
  238. onHide() {
  239. clearTimeout(this.time);
  240. },
  241. // 监听页面卸载
  242. onUnload() {
  243. // 关闭倒计时
  244. clearTimeout(this.time);
  245. },
  246. // 监听页面后退
  247. onBackPress() {
  248. // 关闭倒计时
  249. clearTimeout(this.time);
  250. },
  251. onShow() {
  252. this.loadData();
  253. },
  254. methods: {
  255. navTo(url) {
  256. this.$router.push(url);
  257. },
  258. loadData() {
  259. const obj = this;
  260. loadIndexs().then(({ data }) => {
  261. this.newTime = getnewTime();
  262. this.explode_num = data.explode_num;
  263. this.order = data.order;
  264. this.user = data.user;
  265. this.visit = data.visit;
  266. this.price = data.order_pay;
  267. });
  268. waiter_rank({ page: 1, limit: 21, store_id: 0 }).then(({ data }) => {
  269. this.yglist = data.list;
  270. });
  271. user_explode_rank({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  272. this.grlblist = data.list;
  273. });
  274. over10000({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  275. this.pwlist = data.list;
  276. });
  277. store_list({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  278. this.mdcjlist = data.list;
  279. });
  280. store_explode_rank({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  281. this.mdlblist = data.list;
  282. });
  283. super_user({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  284. this.cjkhlist = data.list;
  285. });
  286. product({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  287. this.rmxmlist = data.list;
  288. });
  289. groupList({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  290. this.xccjlist = data.list;
  291. });
  292. group_explode_rank({ page: 1, limit: 8, store_id: 0 }).then(({ data }) => {
  293. this.xzlblist = data.list;
  294. });
  295. this.time = setTimeout(this.loadData, 1000);
  296. }
  297. }
  298. };
  299. </script>
  300. <style lang="scss">
  301. page,
  302. .center {
  303. position: relative;
  304. height: auto;
  305. min-height: 100%;
  306. background: linear-gradient(180deg, #0b1c9d 0%, #02004d 18%, #02004d 100%);
  307. }
  308. .top {
  309. height: 62rpx;
  310. width: 750rpx;
  311. image {
  312. width: 100%;
  313. height: 100%;
  314. }
  315. }
  316. .dz {
  317. position: absolute;
  318. top: 209rpx;
  319. left: 0;
  320. right: 0;
  321. width: 640rpx;
  322. height: 480rpx;
  323. margin: 0 auto;
  324. image {
  325. width: 100%;
  326. height: 100%;
  327. }
  328. }
  329. .title {
  330. margin-top: 12rpx;
  331. padding: 0 20rpx;
  332. align-items: flex-end;
  333. .logo {
  334. width: 186rpx;
  335. height: 58rpx;
  336. image {
  337. width: 100%;
  338. height: 100%;
  339. }
  340. }
  341. .time {
  342. font-size: 26rpx;
  343. font-family: PingFang SC;
  344. font-weight: bold;
  345. color: #ffffff;
  346. }
  347. }
  348. .bottom {
  349. position: absolute;
  350. bottom: 0;
  351. left: 0;
  352. right: 0;
  353. width: 750rpx;
  354. height: 820rpx;
  355. image {
  356. width: 100%;
  357. height: 100%;
  358. }
  359. }
  360. .info-box {
  361. margin: 47rpx 10rpx 0;
  362. display: flex;
  363. justify-content: center;
  364. align-items: center;
  365. flex-wrap: wrap;
  366. .info-item {
  367. position: relative;
  368. width: 242rpx;
  369. height: 152rpx;
  370. padding: 22rpx 0 0 32rpx;
  371. line-height: 1;
  372. .info-item-bg {
  373. position: absolute;
  374. top: 0;
  375. left: 0;
  376. right: 0;
  377. width: 242rpx;
  378. height: 152rpx;
  379. image {
  380. width: 242rpx;
  381. height: 152rpx;
  382. }
  383. }
  384. .info-name {
  385. position: relative;
  386. z-index: 2;
  387. font-size: 25rpx;
  388. font-family: PingFang SC;
  389. font-weight: bold;
  390. color: #ffffff;
  391. }
  392. .info-price {
  393. position: relative;
  394. z-index: 2;
  395. margin-top: 26rpx;
  396. font-size: 42rpx;
  397. font-family: PingFang SC;
  398. font-weight: bold;
  399. color: #ffffff;
  400. }
  401. }
  402. }
  403. .ranking-right {
  404. margin: 20rpx 14rpx 0;
  405. display: flex;
  406. align-items: center;
  407. flex-wrap: wrap;
  408. .ranking-right-item {
  409. margin-top: 10rpx;
  410. width: 360rpx;
  411. height: 344rpx;
  412. position: relative;
  413. padding: 32rpx 16rpx 0;
  414. .ranking-right-item-bg {
  415. position: absolute;
  416. top: 0;
  417. left: 0;
  418. right: 0;
  419. width: 360rpx;
  420. height: 344rpx;
  421. image {
  422. width: 360rpx;
  423. height: 344rpx;
  424. }
  425. }
  426. .ranking-item-title {
  427. position: relative;
  428. z-index: 2;
  429. text-align: center;
  430. font-size: 25rpx;
  431. font-family: SimSun;
  432. font-weight: 400;
  433. color: #66ffff;
  434. }
  435. .ranking-item-bottom {
  436. position: relative;
  437. z-index: 2;
  438. margin-top: 20rpx;
  439. .ranking-item-bottom-title {
  440. display: flex;
  441. .ranking-item-bottom-font {
  442. width: 20%;
  443. font-size: 14rpx;
  444. font-family: PingFang SC;
  445. font-weight: 500;
  446. color: #ffffff;
  447. text-align: center;
  448. }
  449. }
  450. .ranking-item-bottom-main {
  451. position: relative;
  452. z-index: 2;
  453. display: flex;
  454. .ranking-item-bottom-font {
  455. width: 20%;
  456. font-size: 13rpx;
  457. font-family: PingFang SC;
  458. font-weight: 500;
  459. color: #ffffff;
  460. text-align: center;
  461. line-height: 26rpx;
  462. word-break: keep-all;
  463. white-space: nowrap;
  464. overflow: hidden;
  465. text-overflow: ellipsis;
  466. }
  467. }
  468. .current {
  469. background: #06a4da;
  470. }
  471. }
  472. }
  473. }
  474. </style>