index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  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.numberOrders || 0) }}</text>
  23. <text>订单(笔)</text>
  24. </view>
  25. <view class="dis f-c a-start view">
  26. <text>{{numberFormat(todayOverview.addPerNumber || 0) }}</text>
  27. <text>新增人员</text>
  28. </view>
  29. <view class="dis f-c a-start view">
  30. <text>{{numberFormat(todayOverview.premium || 0)}}</text>
  31. <text>保费(元)</text>
  32. </view>
  33. <view class="dis f-c a-start view">
  34. <text>{{numberFormat(todayOverview.commission || 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="ShowModalCodebusiness" mode="bottom" border-radius="15" :closeable="true">
  179. <view>
  180. <text class=" ShowModalCode-business">工作室业务</text>
  181. <view>
  182. <radio-group class="uni-list" @change="styleChange">
  183. <view v-for="(item, index) in styles" :key="index" class="uni-list-item">
  184. <view class="uni-list-item__container">
  185. <view class="uni-list-item__content">
  186. <text class="uni-list-item__content-title">{{ item.text }}</text>
  187. </view>
  188. <view class="uni-list-item__extra">
  189. <radio :value="item.value" :checked="item.checked" />
  190. </view>
  191. </view>
  192. <view class="uni-list-item__notestext">{{ item.notestext }}</view>
  193. </view>
  194. </radio-group>
  195. </view>
  196. <view class="ShowModalCode-sumbit" @click="ShowModalCodeSumbit()">确定</view>
  197. </view>
  198. </u-popup>
  199. <u-modal v-model="promptshow" :show-cancel-button="true" :confirm-text="`确认为${deptSource==1?'渠道':'个代'}模式`"
  200. cancel-text="重新选择" :cancel-style="{fontSize:'28rpx',color:'#007AFF'}" :confirm-style="{fontSize:'28rpx'}"
  201. @confirm="promptshowconfirm">
  202. <view class="p-2">
  203. <text v-if="deptSource==1">您选择的 <text style="color: #007AFF;margin: 0 10rpx;">个代</text> 模式,业务员出单后,业务员的
  204. <text> <strong>佣金都会归到自己账户内</strong> </text>。</text>
  205. <text v-else>您选择的 <text style="color: #007AFF;">渠道</text> 模式,业务员出单后,业务员的
  206. <text> <strong>佣金都会归到团队长账户内由团队长进行分配</strong></text>。</text>
  207. </view>
  208. </u-modal>
  209. </view>
  210. </template>
  211. <script>
  212. import myDatePicker from '../components/todaydate-picker.vue';
  213. import QR from "@/common/wxqrcode.js"
  214. import {
  215. mapState,
  216. mapMutations
  217. } from "vuex"
  218. import {
  219. vShow
  220. } from "vue"
  221. export default {
  222. computed: {
  223. ...mapState(['userInfo', "userCheckInfo"]),
  224. },
  225. components: {
  226. myDatePicker
  227. },
  228. data() {
  229. return {
  230. promptshow: false, //提示
  231. personTypeshow: false, //业务类型弹窗
  232. teamOverviewInfo: {}, //页面展示数据
  233. todayOverview: {}, //今日数据
  234. teamOverview: [{
  235. name: '我是创始人'
  236. }, {
  237. name: '我是管理人'
  238. },
  239. {
  240. name: '我是合伙人'
  241. },
  242. {
  243. name: '我是工作室'
  244. }
  245. ],
  246. current: 0,
  247. showData: '全部数据',
  248. ShowModalCode: false,
  249. ShowModalCode1: false,
  250. ShowModalCodebusiness: false,
  251. teamImg: '',
  252. workImg: '',
  253. totalList: {},
  254. type: uni.getStorageSync('type'),
  255. headerStyle: {
  256. backgroundColor: 'transparent',
  257. backgroundImage: '',
  258. backgroundSize: '',
  259. backgroundPosition: '',
  260. boxShadow: ''
  261. // 其他样式属性...
  262. },
  263. styles: [{
  264. value: '1',
  265. text: '渠道',
  266. notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
  267. checked: true
  268. },
  269. {
  270. value: '2',
  271. notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
  272. text: '个代'
  273. }
  274. ],
  275. deptSource: 1,
  276. grade: 0,
  277. }
  278. },
  279. async onShow(e) {
  280. this.type = uni.getStorageSync('type')
  281. this.showData = '全部数据',
  282. this.getList()
  283. // let res = await this.$http.post('/APPPartner/getHomePage', {
  284. // type: uni.getStorageSync('type'),
  285. // });
  286. // if (res.code == '200') {
  287. // this.totalList = res.data
  288. // }
  289. },
  290. methods: {
  291. //业务来源确定事件
  292. promptshowconfirm() {
  293. this.promptshow = false;
  294. this.ShowModalCodebusiness = false;
  295. uni.navigateTo({
  296. url: "/pages/institutional/invitationCode?grade=" + this.grade + "&deptSource=" + this
  297. .deptSource + '&userId=' + this.userInfo.sysUser.userId,
  298. })
  299. // uni.navigateTo({
  300. // url: "/pages/index/applypartner?grade=" + this.grade + "&deptSource=" + this
  301. // .deptSource + '&userId=' + this.userInfo.sysUser.userId,
  302. // })
  303. },
  304. //业务类型
  305. styleChange(e) {
  306. this.deptSource = e.detail.value
  307. },
  308. //数据格式化
  309. numberFormat(value) {
  310. return (value).toLocaleString('en-US');
  311. },
  312. //标签切换
  313. change(index) {
  314. const info = this.teamOverview[index];
  315. this.teamOverviewInfo = info;
  316. this.current = index;
  317. },
  318. async getList(beginTime, endTime) {
  319. let params = {
  320. type: this.type,
  321. "endTime": endTime || '',
  322. "beginTime": beginTime || '',
  323. }
  324. let res = await this.$http.post('/newAppPartner/getHomePage', params); //统计数据
  325. if (res.code == '200') {
  326. this.todayOverview = res.data.todayOverview; //今日数据
  327. this.teamOverview = res.data.teamOverview; //选项卡
  328. this.teamOverview.map(val => {
  329. val.gradeName = "我是" + val.gradeName;
  330. return val;
  331. })
  332. this.teamOverviewInfo = res.data.teamOverview[0]; //页面赋值第一条数据
  333. }
  334. },
  335. //业务来源确定
  336. ShowModalCodeSumbit() {
  337. this.promptshow = true;
  338. },
  339. //人员列表
  340. closePartner() {
  341. uni.navigateTo({
  342. url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade,
  343. })
  344. },
  345. //今日人员
  346. todayclosePartner() {
  347. let dotayDate = new Date().toISOString().split('T')[0] //今日日期
  348. uni.navigateTo({
  349. url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade + '&startTime=' +
  350. dotayDate + '&endTime=' + dotayDate,
  351. })
  352. },
  353. //我的收益
  354. myEarnings() {
  355. uni.navigateTo({
  356. url: "/pages/institutional/myEarnings"
  357. })
  358. },
  359. //邀请码
  360. invitationCode(value) {
  361. this.grade = value;
  362. if (value == 4) { //区分合伙人和工作室 4==工作室
  363. this.ShowModalCodebusiness = true;
  364. } else {
  365. uni.navigateTo({
  366. url: "/pages/institutional/invitationCode?grade=" + value,
  367. })
  368. }
  369. // uni.navigateTo({
  370. // url: "/pages/index/applypartner?grade=" + value,
  371. // })
  372. },
  373. }
  374. }
  375. </script>
  376. <style lang="scss" scoped>
  377. * {
  378. // outline: 1px solid red !important;
  379. }
  380. page {
  381. background-color: #F7F7F7;
  382. }
  383. .headers {
  384. position: fixed;
  385. top: 0;
  386. left: 0;
  387. height: auto;
  388. width: 100%;
  389. z-index: 99;
  390. padding: 30rpx;
  391. padding-top: 50px;
  392. text {
  393. font-size: 36rpx;
  394. font-weight: bold;
  395. color: #fff;
  396. }
  397. .right {
  398. position: absolute;
  399. right: 30rpx;
  400. image {
  401. width: 28rpx;
  402. height: 28rpx;
  403. margin-right: 4rpx;
  404. }
  405. text {
  406. font-weight: 400;
  407. color: #fff;
  408. font-size: 24rpx;
  409. }
  410. }
  411. }
  412. .homeBackground {
  413. height: 177px;
  414. width: 100%;
  415. background-image: url("/static/home/back.png");
  416. background-size: 100% 100%;
  417. }
  418. .dailyData-block {
  419. width: 100%;
  420. margin-top: -136rpx;
  421. background-image: url("/static/home/aaa.png");
  422. background-size: 100% 100%;
  423. backdrop-filter: blur(2rpx);
  424. padding: 20rpx 40rpx;
  425. // background: rgba(255, 255, 255, 0.2);
  426. // border-radius: 16px;
  427. // box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  428. // backdrop-filter: blur(30px);
  429. // border: 1px solid rgba(255, 255, 255, 1);
  430. .title {
  431. position: relative;
  432. display: inline-block;
  433. text {
  434. color: #fff;
  435. font-weight: bold;
  436. font-size: 36rpx;
  437. margin-left: 10rpx;
  438. }
  439. .image1 {
  440. width: 16rpx;
  441. height: 16rpx;
  442. position: absolute;
  443. top: 0;
  444. right: -20rpx;
  445. }
  446. .image3 {
  447. width: 166rpx;
  448. height: 20rpx;
  449. position: absolute;
  450. bottom: 0;
  451. left: 0;
  452. }
  453. }
  454. .image2 {
  455. width: 138rpx;
  456. height: 138rpx;
  457. position: absolute;
  458. top: -50rpx;
  459. right: 22rpx;
  460. }
  461. .data {
  462. .view {
  463. width: 50%;
  464. text:first-child {
  465. font-size: 46rpx;
  466. color: #333;
  467. font-weight: bold;
  468. }
  469. text:last-child {
  470. font-size: 24rpx;
  471. color: #666;
  472. }
  473. }
  474. }
  475. }
  476. .statistics {
  477. background: #FFFFFF;
  478. border-radius: 20rpx 20rpx 20rpx 20rpx;
  479. margin-top: 15rpx;
  480. .count {
  481. padding: 34rpx 30rpx;
  482. box-sizing: border-box;
  483. image {
  484. width: 100%;
  485. height: 120rpx;
  486. }
  487. }
  488. .data {
  489. padding: 30rpx;
  490. box-sizing: border-box;
  491. background-color: #FBFBFB;
  492. border-radius: 8rpx;
  493. .view {
  494. width: 49%;
  495. text:first-child {
  496. font-size: 36rpx;
  497. color: #333;
  498. font-weight: bold;
  499. margin-bottom: 4rpx;
  500. }
  501. text:last-child {
  502. font-size: 22rpx;
  503. color: #999;
  504. }
  505. }
  506. }
  507. .earnings {
  508. image {
  509. width: 40rpx;
  510. height: 40rpx;
  511. }
  512. text {
  513. font-size: 30rpx;
  514. color: #333;
  515. margin-left: 14rpx;
  516. }
  517. }
  518. }
  519. ::v-deep {
  520. .u-tab-bar {
  521. background: linear-gradient(90deg, #2DD9FF 0%, #2D6DFF 100%) !important;
  522. border-radius: 6rpx;
  523. }
  524. }
  525. .ShowModalCode-style {
  526. text:first-child {
  527. display: block;
  528. font-weight: 600;
  529. font-size: 16px;
  530. color: #333333;
  531. border: 1px solid #EEEEEE;
  532. padding: 15px;
  533. text-align: center;
  534. }
  535. }
  536. .ShowModalCode-con {
  537. padding: 30px;
  538. text-align: center;
  539. image {
  540. margin: 0 auto;
  541. margin-top: 15px;
  542. }
  543. }
  544. .ShowModalCode-business {
  545. display: block;
  546. font-weight: 600;
  547. font-size: 16px;
  548. color: #333333;
  549. // border: 1px solid #EEEEEE;
  550. padding: 15px;
  551. text-align: center;
  552. }
  553. .ShowModalCode-sumbit {
  554. background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
  555. border-radius: 5px 5px 5px 5px;
  556. height: 40px;
  557. line-height: 40px;
  558. font-size: 16px;
  559. color: #FFFFFF;
  560. margin: 15px;
  561. text-align: center;
  562. }
  563. .uni-list {
  564. flex: 1;
  565. }
  566. .uni-list-item:first-child {
  567. /* #ifndef APP-NVUE */
  568. // display: flex;
  569. /* #endif */
  570. flex: 1;
  571. flex-direction: row;
  572. background-color: #FFFFFF;
  573. border-bottom-style: solid;
  574. border-bottom-width: 1px;
  575. border-bottom-color: #eee;
  576. }
  577. .uni-list-item__container {
  578. padding: 12px 15px;
  579. width: 100%;
  580. flex: 1;
  581. position: relative;
  582. /* #ifndef APP-NVUE */
  583. display: flex;
  584. box-sizing: border-box;
  585. /* #endif */
  586. flex-direction: row;
  587. justify-content: space-between;
  588. align-items: center;
  589. }
  590. .uni-list-item__notestext {
  591. padding: 0 15px 15px 15px;
  592. font-size: 15px;
  593. color: #666666;
  594. }
  595. .uni-list-item__content-title {
  596. font-size: 17px;
  597. color: #333333;
  598. }
  599. </style>