index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. <template>
  2. <view>
  3. <public-module></public-module>
  4. <view class="headers dis a-c j-c" :style="headerStyle">
  5. <text>掌柜合伙人</text>
  6. <view class="right dis a-c">
  7. <image src="/static/home/customerService.png" mode=""></image>
  8. <text>客服</text>
  9. </view>
  10. </view>
  11. <view class="homeBackground"></view>
  12. <view class="" style="padding: 0 30rpx;">
  13. <view class="dailyData-block">
  14. <view class="title ">
  15. <text>今日状况</text>
  16. <image src="/static/home/icon1.png" class="image1" mode=""></image>
  17. <image src="/static/home/icon3.png" class="image3" mode=""></image>
  18. </view>
  19. <image src="/static/home/icon2.png" class="image2" mode=""></image>
  20. <view class="data dis f-wrap j-s">
  21. <view class="dis f-c a-start view">
  22. <text>{{numberFormat(todayOverview.addPerNumber || 0) }}</text>
  23. <text>订单(笔)</text>
  24. </view>
  25. <view class="dis f-c a-start view">
  26. <text>{{numberFormat(todayOverview.commission || 0) }}</text>
  27. <text>新增人员</text>
  28. </view>
  29. <view class="dis f-c a-start view">
  30. <text>{{numberFormat(todayOverview.numberOrders || 0)}}</text>
  31. <text>保费(元)</text>
  32. </view>
  33. <view class="dis f-c a-start view">
  34. <text>{{numberFormat(todayOverview.premium || 0 ) }}</text>
  35. <text>佣金(元)</text>
  36. </view>
  37. </view>
  38. </view>
  39. <view class="statistics">
  40. <u-tabs :list="teamOverview" :is-scroll="true" name="gradeName" active-color="#333"
  41. inactive-color="#999" :current="current" @change="change"
  42. style="background: transparent;border-bottom: 1rpx solid #EEEEEE;"></u-tabs>
  43. <view class="count">
  44. <template v-if="teamOverviewInfo.grade==1">
  45. <image src="/static/home/icon4.png" class="mb-2" mode=""
  46. @click="invitationCode(teamOverviewInfo.grade)">
  47. </image>
  48. <view class="data dis f-wrap j-s mb-3">
  49. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  50. @click="closePartner">
  51. <text>{{teamOverviewInfo.vo1.v1}}</text>
  52. <text>我的管理人</text>
  53. </view>
  54. <view class="dis f-c a-c view">
  55. <text>{{teamOverviewInfo.vo1.v2}}</text>
  56. <text>管理人的合伙人</text>
  57. </view>
  58. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  59. @click="todayclosePartner">
  60. <text>{{teamOverviewInfo.vo1.v3}}</text>
  61. <text>我今日新增管理人</text>
  62. </view>
  63. <view class="dis f-c a-c view">
  64. <text>{{teamOverviewInfo.vo1.v4}}</text>
  65. <text>今日管理人邀请的合伙人</text>
  66. </view>
  67. </view>
  68. </template>
  69. <template v-if="teamOverviewInfo.grade==2 ">
  70. <image src="/static/home/icon5.png" class="mb-2" mode=""
  71. @click="invitationCode(teamOverviewInfo.grade)">
  72. </image>
  73. <view class="data dis f-wrap j-s mb-3">
  74. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  75. @click="closePartner">
  76. <text>{{teamOverviewInfo.vo2.v1}}</text>
  77. <text>我的合伙人</text>
  78. </view>
  79. <view class="dis f-c a-c view">
  80. <text>{{teamOverviewInfo.vo2.v2}}</text>
  81. <text>合伙人的工作室</text>
  82. </view>
  83. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  84. @click="todayclosePartner">
  85. <text>{{teamOverviewInfo.vo2.v3}}</text>
  86. <text>我今日新增合伙人</text>
  87. </view>
  88. <view class="dis f-c a-c view">
  89. <text>{{teamOverviewInfo.vo2.v4}}</text>
  90. <text>今日合伙人邀请的工作室</text>
  91. </view>
  92. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
  93. <text>{{teamOverviewInfo.vo2.v5}}</text>
  94. <text>今日保费</text>
  95. </view>
  96. <view class="dis f-c a-c view">
  97. <text>{{teamOverviewInfo.vo2.v6}}</text>
  98. <text>今日佣金</text>
  99. </view>
  100. </view>
  101. </template>
  102. <template v-if="teamOverviewInfo.grade==3 ">
  103. <image src="/static/home/icon6.png" class="mb-2" mode=""
  104. @click="invitationCode(teamOverviewInfo.grade)">
  105. </image>
  106. <view class="data dis f-wrap j-s mb-3">
  107. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  108. @click="closePartner">
  109. <text>{{teamOverviewInfo.vo3.v1}}</text>
  110. <text>我的工作室</text>
  111. </view>
  112. <view class="dis f-c a-c view">
  113. <text>{{teamOverviewInfo.vo3.v2}}</text>
  114. <text>工作室下的业务团队</text>
  115. </view>
  116. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  117. @click="todayclosePartner">
  118. <text>{{teamOverviewInfo.vo3.v3}}</text>
  119. <text>我今日新增工作室</text>
  120. </view>
  121. <view class="dis f-c a-c view">
  122. <text>{{teamOverviewInfo.vo3.v4}}</text>
  123. <text>今日工作室邀请的团队</text>
  124. </view>
  125. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
  126. <text>{{teamOverviewInfo.vo3.v5}}</text>
  127. <text>今日保费</text>
  128. </view>
  129. <view class="dis f-c a-c view">
  130. <text>{{teamOverviewInfo.vo3.v6}}</text>
  131. <text>今日佣金</text>
  132. </view>
  133. </view>
  134. </template>
  135. <template v-if="teamOverviewInfo.grade==4 ">
  136. <image src="/static/home/icon7.png" class="mb-2" mode=""
  137. @click="invitationCode(teamOverviewInfo.grade)">
  138. </image>
  139. <view class="data dis f-wrap j-s mb-3">
  140. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  141. @click="closePartner">
  142. <text>{{teamOverviewInfo.vo4.v1}}</text>
  143. <text>我的团队</text>
  144. </view>
  145. <view class="dis f-c a-c view">
  146. <text>{{teamOverviewInfo.vo4.v2}}</text>
  147. <text>代理人人数</text>
  148. </view>
  149. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
  150. @click="todayclosePartner">
  151. <text>{{teamOverviewInfo.vo4.v3}}</text>
  152. <text>我今日新增团队</text>
  153. </view>
  154. <view class="dis f-c a-c view">
  155. <text>{{teamOverviewInfo.vo4.v4}}</text>
  156. <text>今日新增代理人</text>
  157. </view>
  158. <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
  159. <text>{{teamOverviewInfo.vo4.v5}}</text>
  160. <text>今日保费</text>
  161. </view>
  162. <view class="dis f-c a-c view">
  163. <text>{{teamOverviewInfo.vo4.v6}}</text>
  164. <text>今日佣金</text>
  165. </view>
  166. </view>
  167. </template>
  168. <view class="earnings dis a-c j-s " @click="myEarnings">
  169. <view class="dis a-c ">
  170. <image src="/static/home/wallet.png" mode=""></image>
  171. <text>我的收益</text>
  172. </view>
  173. <u-icon name="arrow-right" size="30" color="rgba(35,40,50,0.5)"></u-icon>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. <u-popup v-model="personTypeshow" mode="bottom" border-radius="14">
  179. <view>出淤泥而不染,濯清涟而不妖</view>
  180. </u-popup>
  181. </view>
  182. </template>
  183. <script>
  184. import myDatePicker from '../components/todaydate-picker.vue';
  185. import QR from "@/common/wxqrcode.js"
  186. import {
  187. mapState,
  188. mapMutations
  189. } from "vuex"
  190. import {
  191. vShow
  192. } from "vue"
  193. export default {
  194. computed: {
  195. ...mapState(['userInfo', "userCheckInfo"]),
  196. },
  197. components: {
  198. myDatePicker
  199. },
  200. data() {
  201. return {
  202. personTypeshow: false, //业务类型弹窗
  203. teamOverviewInfo: {}, //页面展示数据
  204. todayOverview: {}, //今日数据
  205. teamOverview: [{
  206. name: '我是创始人'
  207. }, {
  208. name: '我是管理人'
  209. },
  210. {
  211. name: '我是合伙人'
  212. },
  213. {
  214. name: '我是工作室'
  215. }
  216. ],
  217. current: 0,
  218. showData: '全部数据',
  219. ShowModalCode: false,
  220. ShowModalCode1: false,
  221. ShowModalCodebusiness: false,
  222. teamImg: '',
  223. workImg: '',
  224. totalList: {},
  225. type: uni.getStorageSync('type'),
  226. headerStyle: {
  227. backgroundColor: 'transparent',
  228. backgroundImage: '',
  229. backgroundSize: '',
  230. backgroundPosition: '',
  231. boxShadow: ''
  232. // 其他样式属性...
  233. },
  234. styles: [{
  235. value: '1',
  236. text: '渠道',
  237. notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
  238. checked: true
  239. },
  240. {
  241. value: '2',
  242. notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
  243. text: '个代'
  244. }
  245. ],
  246. deptSource: 1
  247. // type:JSON.parse(localStorage.getItem('type')).data
  248. }
  249. },
  250. async onShow(e) {
  251. this.type = uni.getStorageSync('type')
  252. this.showData = '全部数据',
  253. this.getList()
  254. // let res = await this.$http.post('/APPPartner/getHomePage', {
  255. // type: uni.getStorageSync('type'),
  256. // });
  257. // if (res.code == '200') {
  258. // this.totalList = res.data
  259. // }
  260. },
  261. methods: {
  262. //数据格式化
  263. numberFormat(value) {
  264. return (value).toLocaleString('en-US');
  265. },
  266. change(index) {
  267. const info = this.teamOverview[index];
  268. this.teamOverviewInfo = info;
  269. this.current = index;
  270. },
  271. async getList(beginTime, endTime) {
  272. let params = {
  273. type: this.type,
  274. "endTime": endTime || '',
  275. "beginTime": beginTime || '',
  276. }
  277. let res = await this.$http.post('/newAppPartner/getHomePage', params); //统计数据
  278. if (res.code == '200') {
  279. this.todayOverview = res.data.todayOverview; //今日数据
  280. this.teamOverview = res.data.teamOverview; //选项卡
  281. this.teamOverview.map(val => {
  282. val.gradeName = "我是" + val.gradeName;
  283. return val;
  284. })
  285. this.teamOverviewInfo = res.data.teamOverview[0]; //页面赋值第一条数据
  286. }
  287. },
  288. searchPopup() {
  289. this.$refs.datePicker.open()
  290. },
  291. confirmPickDate(dateStr, dateStr1, val) {
  292. if (dateStr) {
  293. dateStr += ' 00:00:01'
  294. }
  295. if (dateStr1) {
  296. dateStr1 += ' 23:59:59'
  297. }
  298. this.showData = val
  299. this.getList(dateStr, dateStr1)
  300. },
  301. recruitmentCode() {
  302. this.ShowModalCode = true
  303. this.teamImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applyteam?userId=" +
  304. this.userInfo
  305. .sysUser.userId, {
  306. size: parseInt(200) //二维码大小
  307. })
  308. },
  309. ShowModalCodeSumbit() {
  310. this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl +
  311. "/#/pages/index/applystudio?deptSource=" + this
  312. .deptSource + '&userId=' + this.userInfo.sysUser.userId, {
  313. size: parseInt(200) //二维码大小
  314. })
  315. },
  316. //人员列表
  317. closePartner() {
  318. uni.navigateTo({
  319. url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade,
  320. })
  321. },
  322. //今日人员
  323. todayclosePartner() {
  324. let dotayDate = new Date().toISOString().split('T')[0] //今日日期
  325. uni.navigateTo({
  326. url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade + '&startTime=' +
  327. dotayDate + '&endTime=' + dotayDate,
  328. })
  329. },
  330. //我的收益
  331. myEarnings() {
  332. uni.navigateTo({
  333. url: "/pages/institutional/myEarnings"
  334. })
  335. },
  336. //邀请码
  337. invitationCode(value) {
  338. if (value == 4) {
  339. this.personTypeshow = true;
  340. } else {
  341. uni.navigateTo({
  342. url: "/pages/institutional/invitationCode?grade=" + value,
  343. })
  344. }
  345. // uni.navigateTo({
  346. // url: "/pages/index/applypartner?grade=" + value,
  347. // })
  348. },
  349. }
  350. }
  351. </script>
  352. <style lang="scss" scoped>
  353. page {
  354. background-color: #F7F7F7;
  355. }
  356. .headers {
  357. position: fixed;
  358. top: 0;
  359. left: 0;
  360. height: auto;
  361. width: 100%;
  362. z-index: 999999;
  363. padding: 30rpx;
  364. padding-top: 50px;
  365. text {
  366. font-size: 36rpx;
  367. font-weight: bold;
  368. color: #fff;
  369. }
  370. .right {
  371. position: absolute;
  372. right: 30rpx;
  373. image {
  374. width: 28rpx;
  375. height: 28rpx;
  376. margin-right: 4rpx;
  377. }
  378. text {
  379. font-weight: 400;
  380. color: #fff;
  381. font-size: 24rpx;
  382. }
  383. }
  384. }
  385. .homeBackground {
  386. height: 177px;
  387. width: 100%;
  388. background-image: url("/static/home/back.png");
  389. background-size: 100% 100%;
  390. }
  391. .dailyData-block {
  392. width: 100%;
  393. margin-top: -136rpx;
  394. background-image: url("/static/home/aaa.png");
  395. background-size: 100% 100%;
  396. backdrop-filter: blur(2rpx);
  397. padding: 20rpx 40rpx;
  398. // background: rgba(255, 255, 255, 0.2);
  399. // border-radius: 16px;
  400. // box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  401. // backdrop-filter: blur(30px);
  402. // border: 1px solid rgba(255, 255, 255, 1);
  403. .title {
  404. position: relative;
  405. display: inline-block;
  406. text {
  407. color: #fff;
  408. font-weight: bold;
  409. font-size: 36rpx;
  410. margin-left: 10rpx;
  411. }
  412. .image1 {
  413. width: 16rpx;
  414. height: 16rpx;
  415. position: absolute;
  416. top: 0;
  417. right: -20rpx;
  418. }
  419. .image3 {
  420. width: 166rpx;
  421. height: 20rpx;
  422. position: absolute;
  423. bottom: 0;
  424. left: 0;
  425. }
  426. }
  427. .image2 {
  428. width: 138rpx;
  429. height: 138rpx;
  430. position: absolute;
  431. top: -50rpx;
  432. right: 22rpx;
  433. }
  434. .data {
  435. .view {
  436. width: 50%;
  437. text:first-child {
  438. font-size: 46rpx;
  439. color: #333;
  440. font-weight: bold;
  441. }
  442. text:last-child {
  443. font-size: 24rpx;
  444. color: #666;
  445. }
  446. }
  447. }
  448. }
  449. .statistics {
  450. background: #FFFFFF;
  451. border-radius: 20rpx 20rpx 20rpx 20rpx;
  452. margin-top: 15rpx;
  453. .count {
  454. padding: 34rpx 30rpx;
  455. box-sizing: border-box;
  456. image {
  457. width: 100%;
  458. height: 120rpx;
  459. }
  460. }
  461. .data {
  462. padding: 30rpx;
  463. box-sizing: border-box;
  464. background-color: #FBFBFB;
  465. border-radius: 8rpx;
  466. .view {
  467. width: 49%;
  468. text:first-child {
  469. font-size: 36rpx;
  470. color: #333;
  471. font-weight: bold;
  472. margin-bottom: 4rpx;
  473. }
  474. text:last-child {
  475. font-size: 22rpx;
  476. color: #999;
  477. }
  478. }
  479. }
  480. .earnings {
  481. image {
  482. width: 40rpx;
  483. height: 40rpx;
  484. }
  485. text {
  486. font-size: 30rpx;
  487. color: #333;
  488. margin-left: 14rpx;
  489. }
  490. }
  491. }
  492. ::v-deep {
  493. .u-tab-bar {
  494. background: linear-gradient(90deg, #2DD9FF 0%, #2D6DFF 100%) !important;
  495. border-radius: 6rpx;
  496. }
  497. }
  498. </style>