123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522 |
- <template>
- <view>
- <public-module></public-module>
- <view class="headers dis a-c j-c" :style="headerStyle">
- <text>掌柜合伙人</text>
- <view class="right dis a-c">
- <image src="/static/home/customerService.png" mode=""></image>
- <text>客服</text>
- </view>
- </view>
- <view class="homeBackground"></view>
- <view class="" style="padding: 0 30rpx;">
- <view class="dailyData-block">
- <view class="title ">
- <text>今日状况</text>
- <image src="/static/home/icon1.png" class="image1" mode=""></image>
- <image src="/static/home/icon3.png" class="image3" mode=""></image>
- </view>
- <image src="/static/home/icon2.png" class="image2" mode=""></image>
- <view class="data dis f-wrap j-s">
- <view class="dis f-c a-start view">
- <text>{{numberFormat(todayOverview.addPerNumber || 0) }}</text>
- <text>订单(笔)</text>
- </view>
- <view class="dis f-c a-start view">
- <text>{{numberFormat(todayOverview.commission || 0) }}</text>
- <text>新增人员</text>
- </view>
- <view class="dis f-c a-start view">
- <text>{{numberFormat(todayOverview.numberOrders || 0)}}</text>
- <text>保费(元)</text>
- </view>
- <view class="dis f-c a-start view">
- <text>{{numberFormat(todayOverview.premium || 0 ) }}</text>
- <text>佣金(元)</text>
- </view>
- </view>
- </view>
- <view class="statistics">
- <u-tabs :list="teamOverview" :is-scroll="true" name="gradeName" active-color="#333"
- inactive-color="#999" :current="current" @change="change"
- style="background: transparent;border-bottom: 1rpx solid #EEEEEE;"></u-tabs>
- <view class="count">
- <template v-if="teamOverviewInfo.grade==1">
- <image src="/static/home/icon4.png" class="mb-2" mode=""
- @click="invitationCode(teamOverviewInfo.grade)">
- </image>
- <view class="data dis f-wrap j-s mb-3">
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="closePartner">
- <text>{{teamOverviewInfo.vo1.v1}}</text>
- <text>我的管理人</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo1.v2}}</text>
- <text>管理人的合伙人</text>
- </view>
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="todayclosePartner">
- <text>{{teamOverviewInfo.vo1.v3}}</text>
- <text>我今日新增管理人</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo1.v4}}</text>
- <text>今日管理人邀请的合伙人</text>
- </view>
- </view>
- </template>
- <template v-if="teamOverviewInfo.grade==2 ">
- <image src="/static/home/icon5.png" class="mb-2" mode=""
- @click="invitationCode(teamOverviewInfo.grade)">
- </image>
- <view class="data dis f-wrap j-s mb-3">
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="closePartner">
- <text>{{teamOverviewInfo.vo2.v1}}</text>
- <text>我的合伙人</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo2.v2}}</text>
- <text>合伙人的工作室</text>
- </view>
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="todayclosePartner">
- <text>{{teamOverviewInfo.vo2.v3}}</text>
- <text>我今日新增合伙人</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo2.v4}}</text>
- <text>今日合伙人邀请的工作室</text>
- </view>
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
- <text>{{teamOverviewInfo.vo2.v5}}</text>
- <text>今日保费</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo2.v6}}</text>
- <text>今日佣金</text>
- </view>
- </view>
- </template>
- <template v-if="teamOverviewInfo.grade==3 ">
- <image src="/static/home/icon6.png" class="mb-2" mode=""
- @click="invitationCode(teamOverviewInfo.grade)">
- </image>
- <view class="data dis f-wrap j-s mb-3">
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="closePartner">
- <text>{{teamOverviewInfo.vo3.v1}}</text>
- <text>我的工作室</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo3.v2}}</text>
- <text>工作室下的业务团队</text>
- </view>
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="todayclosePartner">
- <text>{{teamOverviewInfo.vo3.v3}}</text>
- <text>我今日新增工作室</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo3.v4}}</text>
- <text>今日工作室邀请的团队</text>
- </view>
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
- <text>{{teamOverviewInfo.vo3.v5}}</text>
- <text>今日保费</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo3.v6}}</text>
- <text>今日佣金</text>
- </view>
- </view>
- </template>
- <template v-if="teamOverviewInfo.grade==4 ">
- <image src="/static/home/icon7.png" class="mb-2" mode=""
- @click="invitationCode(teamOverviewInfo.grade)">
- </image>
- <view class="data dis f-wrap j-s mb-3">
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="closePartner">
- <text>{{teamOverviewInfo.vo4.v1}}</text>
- <text>我的团队</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo4.v2}}</text>
- <text>代理人人数</text>
- </view>
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;"
- @click="todayclosePartner">
- <text>{{teamOverviewInfo.vo4.v3}}</text>
- <text>我今日新增团队</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo4.v4}}</text>
- <text>今日新增代理人</text>
- </view>
- <view class="dis f-c a-c view" style="border-right: 1rpx solid #EEEEEE;">
- <text>{{teamOverviewInfo.vo4.v5}}</text>
- <text>今日保费</text>
- </view>
- <view class="dis f-c a-c view">
- <text>{{teamOverviewInfo.vo4.v6}}</text>
- <text>今日佣金</text>
- </view>
- </view>
- </template>
- <view class="earnings dis a-c j-s " @click="myEarnings">
- <view class="dis a-c ">
- <image src="/static/home/wallet.png" mode=""></image>
- <text>我的收益</text>
- </view>
- <u-icon name="arrow-right" size="30" color="rgba(35,40,50,0.5)"></u-icon>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import myDatePicker from '../components/todaydate-picker.vue';
- import QR from "@/common/wxqrcode.js"
- import {
- mapState,
- mapMutations
- } from "vuex"
- import {
- vShow
- } from "vue"
- export default {
- computed: {
- ...mapState(['userInfo', "userCheckInfo"]),
- },
- components: {
- myDatePicker
- },
- data() {
- return {
- teamOverviewInfo: {}, //页面展示数据
- todayOverview: {}, //今日数据
- teamOverview: [{
- name: '我是创始人'
- }, {
- name: '我是管理人'
- },
- {
- name: '我是合伙人'
- },
- {
- name: '我是工作室'
- }
- ],
- current: 0,
- showData: '全部数据',
- ShowModalCode: false,
- ShowModalCode1: false,
- ShowModalCodebusiness: false,
- teamImg: '',
- workImg: '',
- totalList: {},
- type: uni.getStorageSync('type'),
- headerStyle: {
- backgroundColor: 'transparent',
- backgroundImage: '',
- backgroundSize: '',
- backgroundPosition: '',
- boxShadow: ''
- // 其他样式属性...
- },
- styles: [{
- value: '1',
- text: '渠道',
- notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
- checked: true
- },
- {
- value: '2',
- notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
- text: '个代'
- }
- ],
- deptSource: 1
- // type:JSON.parse(localStorage.getItem('type')).data
- }
- },
- async onShow(e) {
- this.type = uni.getStorageSync('type')
- this.showData = '全部数据',
- this.getList()
- // let res = await this.$http.post('/APPPartner/getHomePage', {
- // type: uni.getStorageSync('type'),
- // });
- // if (res.code == '200') {
- // this.totalList = res.data
- // }
- },
- methods: {
- //数据格式化
- numberFormat(value) {
- return (value).toLocaleString('en-US');
- },
- change(index) {
- const info = this.teamOverview[index];
- console.log(info);
- this.teamOverviewInfo = info;
- this.current = index;
- },
- async getList(beginTime, endTime) {
- let params = {
- type: this.type,
- "endTime": endTime || '',
- "beginTime": beginTime || '',
- }
- let res = await this.$http.post('/newAppPartner/getHomePage', params); //统计数据
- if (res.code == '200') {
- this.todayOverview = res.data.todayOverview; //今日数据
- this.teamOverview = res.data.teamOverview; //选项卡
- this.teamOverview.map(val => {
- val.gradeName = "我是" + val.gradeName;
- return val;
- })
- this.teamOverviewInfo = res.data.teamOverview[0]; //页面赋值第一条数据
- }
- },
- searchPopup() {
- this.$refs.datePicker.open()
- },
- confirmPickDate(dateStr, dateStr1, val) {
- if (dateStr) {
- dateStr += ' 00:00:01'
- }
- if (dateStr1) {
- dateStr1 += ' 23:59:59'
- }
- this.showData = val
- this.getList(dateStr, dateStr1)
- },
- recruitmentCode() {
- this.ShowModalCode = true
- this.teamImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applyteam?userId=" +
- this.userInfo
- .sysUser.userId, {
- size: parseInt(200) //二维码大小
- })
- },
- ShowModalCodeSumbit() {
- this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl +
- "/#/pages/index/applystudio?deptSource=" + this
- .deptSource + '&userId=' + this.userInfo.sysUser.userId, {
- size: parseInt(200) //二维码大小
- })
- },
- //人员列表
- closePartner() {
- uni.navigateTo({
- url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade,
- })
- },
- //今日人员
- todayclosePartner() {
- let dotayDate = new Date().toISOString().split('T')[0] //今日日期
- uni.navigateTo({
- url: "/pages/institutional/partner?grade=" + this.teamOverviewInfo.grade + '&startTime=' +
- dotayDate + '&endTime=' + dotayDate,
- })
- },
- //我的收益
- myEarnings() {
- uni.navigateTo({
- url: "/pages/institutional/myEarnings"
- })
- },
- //邀请码
- invitationCode(value) {
- // uni.navigateTo({
- // url: "/pages/institutional/invitationCode?grade=" + value,
- // })
- uni.navigateTo({
- url: "/pages/index/applypartner?grade=" + value,
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- background-color: #F7F7F7;
- }
- .headers {
- position: fixed;
- top: 0;
- left: 0;
- height: auto;
- width: 100%;
- z-index: 999999;
- padding: 30rpx;
- padding-top: 50px;
- text {
- font-size: 36rpx;
- font-weight: bold;
- color: #fff;
- }
- .right {
- position: absolute;
- right: 30rpx;
- image {
- width: 28rpx;
- height: 28rpx;
- margin-right: 4rpx;
- }
- text {
- font-weight: 400;
- color: #fff;
- font-size: 24rpx;
- }
- }
- }
- .homeBackground {
- height: 177px;
- width: 100%;
- background-image: url("/static/home/back.png");
- background-size: 100% 100%;
- }
- .dailyData-block {
- width: 100%;
- margin-top: -136rpx;
- background-image: url("/static/home/aaa.png");
- background-size: 100% 100%;
- backdrop-filter: blur(2rpx);
- padding: 20rpx 40rpx;
- // background: rgba(255, 255, 255, 0.2);
- // border-radius: 16px;
- // box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
- // backdrop-filter: blur(30px);
- // border: 1px solid rgba(255, 255, 255, 1);
- .title {
- position: relative;
- display: inline-block;
- text {
- color: #fff;
- font-weight: bold;
- font-size: 36rpx;
- margin-left: 10rpx;
- }
- .image1 {
- width: 16rpx;
- height: 16rpx;
- position: absolute;
- top: 0;
- right: -20rpx;
- }
- .image3 {
- width: 166rpx;
- height: 20rpx;
- position: absolute;
- bottom: 0;
- left: 0;
- }
- }
- .image2 {
- width: 138rpx;
- height: 138rpx;
- position: absolute;
- top: -50rpx;
- right: 22rpx;
- }
- .data {
- .view {
- width: 50%;
- text:first-child {
- font-size: 46rpx;
- color: #333;
- font-weight: bold;
- }
- text:last-child {
- font-size: 24rpx;
- color: #666;
- }
- }
- }
- }
- .statistics {
- background: #FFFFFF;
- border-radius: 20rpx 20rpx 20rpx 20rpx;
- margin-top: 15rpx;
- .count {
- padding: 34rpx 30rpx;
- box-sizing: border-box;
- image {
- width: 100%;
- height: 120rpx;
- }
- }
- .data {
- padding: 30rpx;
- box-sizing: border-box;
- background-color: #FBFBFB;
- border-radius: 8rpx;
- .view {
- width: 49%;
- text:first-child {
- font-size: 36rpx;
- color: #333;
- font-weight: bold;
- margin-bottom: 4rpx;
- }
- text:last-child {
- font-size: 22rpx;
- color: #999;
- }
- }
- }
- .earnings {
- image {
- width: 40rpx;
- height: 40rpx;
- }
- text {
- font-size: 30rpx;
- color: #333;
- margin-left: 14rpx;
- }
- }
- }
- ::v-deep {
- .u-tab-bar {
- background: linear-gradient(90deg, #2DD9FF 0%, #2D6DFF 100%) !important;
- border-radius: 6rpx;
- }
- }
- </style>
|