123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651 |
- <template>
- <view class="">
- <public-module></public-module>
- <view class="headers " :style="headerStyle">
- <view class="dis a-c j-start " style="padding: 0 15px;">
- <!-- <u-icon name="arrow-left" size="40" @tap="back"></u-icon> -->
- <text @tap="back">返回</text>
- <text
- style="margin: auto;">{{ parentData.level ? `工作室(${chineseNumbers[parentData.level - 1]}级合伙人)` : '我的工作室' }}</text>
- <text @tap="backHome">首页</text>
- </view>
- </view>
- <view class="body" style="background: #F8FAFE;margin-top: 85px;">
- <view class="partner-head">
- <seach @queryData="queryData" :directLsit='parentData' />
- </view>
- <!-- <card :cardData='directLsit'></card> -->
- <block v-for="(item, index) in directLsit" :key="index">
- <view class="card">
- <view style="padding: 10px 15px 0 10px">
- <view class="dis j-s card-title">
- <view>
- <text style="font-size: 16px;">{{ item.deptName }}({{ item.userName }})</text>
- <!-- <image v-if="parentData.partnerType==1 " style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie1.png" mode=""></image>
- <image v-if="parentData.partnerType==2 " style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie.png" mode=""></image>
- <image v-if="parentData.partnerType==3" style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie3.png" mode=""></image>
- <image v-if="parentData.partnerType==4" style="display: inline-block; width: 45px;height:18px;vertical-align: sub;" src="/static/icon/jibie4.png" mode=""></image> -->
- </view>
- <text v-if="item.teamManNum > 0" @click="detail(item)">详情
- <image style="display: inline-block; width: 9px;height:9px;vertical-align: -1px;"
- src="/static/icon/right.png" mode=""></image>
- </text>
- </view>
- <view style="padding:0 15px;font-size: 10px;
- color: #666666;font-weight: 600;">下级团队共计
- <text style="font-size: 12px;color: #333333;font-weight: 600;">{{ item.deptNum }}</text>
- 个
- </view>
- <view class="card-con dis j-c a-c">
- <view>
- <text>{{ item.suggestName || '未设置' }}</text>
- <text>推荐人</text>
- </view>
- <view>
- <text>{{ item.teamManNum }}</text>
- <text>会员总人数</text>
- </view>
- <view>
- <text>{{ item.sumPremium }}</text>
- <text>总保费</text>
- </view>
- <view style="border-right:none">
- <text>{{ item.extractFee }}</text>
- <text>我的佣金</text>
- </view>
- </view>
- </view>
- </view>
- </block>
- <!-- <u-loadmore style="margin-top: 5px;" v-if="directLsit.length!=0" :status="status" />
- <o-empty v-if="directLsit.length==0" /> -->
- </view>
- <view id="_drag_button" class="drag" :style="'left: ' + left + 'px; top:' + top + 'px;'"
- @touchmove.stop.prevent="touchmove" @touchend="touchend">
- <image src="/static/code.png" mode="" @click.stop.prevent="btnClick"></image>
- <text>招募码</text>
- </view>
- <u-popup v-model="ShowModalCodebusiness" mode="bottom" border-radius="15">
- <view>
- <text class=" ShowModalCode-business">工作室业务</text>
- <view>
- <radio-group class="uni-list" @change="styleChange">
- <view v-for="(item, index) in styles" :key="index" class="uni-list-item">
- <view class="uni-list-item__container">
- <view class="uni-list-item__content">
- <text class="uni-list-item__content-title">{{ item.text }}</text>
- </view>
- <view class="uni-list-item__extra">
- <radio :value="item.value" :checked="item.checked" />
- </view>
- </view>
- <view class="uni-list-item__notestext">{{ item.notestext }}</view>
- </view>
- </radio-group>
- </view>
- <view class="ShowModalCode-sumbit" @click="ShowModalPromptChannel=true">确定</view>
- </view>
- </u-popup>
- <u-popup v-model="ShowModalCode1" mode="bottom" border-radius="15">
- <view class="ShowModalCode-style ">
- <text>{{deptSource==1?'渠道':'个代'}}工作室招募码</text>
- <view class=" ShowModalCode-con">
- <view>扫码加入</view>
- <image :src="workImg" mode="widthFix" lazy-load style="width: 150px;"></image>
- </view>
- </view>
- </u-popup>
- <u-popup v-model="ShowModalPromptChannel" mode="center" border-radius="15" width="80%">
- <view>
- <text class=" ShowModalCode-business">
- <u-icon
- style="margin-right: 5px;"
- size="38"
- color="#F13F3F"
- name="info-circle-fill"
- />提示</text>
- <view class="ShowModalPrompt-con">
- 您选择的
- <span v-if="deptSource==1" style="color:#2D6DFF;font-size: 16px; ">渠道</span>
- <span v-else style="color:#2D6DFF;font-size: 16px; ">个代</span>
- 模式,业务员出单后,业务员的
- <span v-if="deptSource==1" >
- <span style="color:#333;font-weight: 700; ">佣金都会归到团队长账户内</span>
- 由团队长进行分配。
- </span>
- <span v-else style="color:#333;font-weight: 700; ">佣金都会归到自己账户内。</span>
-
- </view>
- <view class="ShowModalPrompt-con ShowModalPrompt-button" @click="ShowModalCodeSumbit()">
- <text v-if="deptSource==1">确认为渠道模式</text>
- <text v-else>确认为个代模式</text>
- </view>
- <view class="ShowModalPrompt-con ShowModalPrompt-button" @click="ShowModalPromptChannel=false">重新选择</view>
- </view>
- </u-popup>
-
- </view>
- </template>
- <script>
- import myDatePicker from '../components/date-picker.vue';
- import seach from '../components/seach.vue';
- import QR from "@/common/wxqrcode.js"
- import {
- mapState,
- mapMutations
- } from "vuex"
- // import card from '../components/card.vue'
- export default {
- components: { myDatePicker, seach },
- data() {
- return {
- ShowModalCodebusiness:false,
- ShowModalCode1:false,
- ShowModalPromptChannel:false,
- styles: [{
- value: '1',
- text: '渠道',
- notestext: '团队长加出单员模式,无分销模式,结费都在团队长处。',
- checked: true
- },
- {
- value: '2',
- notestext: '团队长加代理人模式,三级分销模式,结费方式为个人,有佣金。',
- text: '个代'
- }
- ],
- deptSource: 1,
- workImg:'',
- top: 0,
- left: 0,
- width: 0,
- height: 0,
- offsetWidth: 0,
- offsetHeight: 0,
- windowWidth: 0,
- windowHeight: 0,
- isMove: true,
- edge: 10,
- startShow: false,
- year: [{
- lable: '日',
- startShow: false
- }, {
- lable: '月',
- startShow: false
- }, {
- lable: '季',
- startShow: false
- }, {
- lable: '年',
- startShow: false
- }, {
- lable: '自定义',
- startShow: false
- }],
- chineseNumbers: ['一', '二', '三', '四', '五', '六', '七', '八', '九'],
- headerStyle: {
- backgroundColor: 'transparent',
- backgroundImage: 'url("/static/beijing (2).png")',
- backgroundSize: 'cover',
- backgroundPosition: '',
- boxShadow: ''
- // 其他样式属性...
- },
- teamTabIndex: 0,
- directLsit: [],
- source: 0,
- totalPages: 0,
- totalSize: 0,
- status: 'loadmore',
- pageRequest: { //查询的默认条件
- pageNum: 1,
- pageSize: 20,
- userName: ''
- },
- parentData: {}
- }
- },
- computed: {
- ...mapState(['userInfo', "userCheckInfo",]),
- },
- async onLoad(e) {
- this.parentData = JSON.parse(decodeURIComponent(e.key));
- // this.parentData.partnerType=this.parentData.level+1
- console.log(this.parentData)
- this.queryData()
- },
- mounted() {
- const sys = uni.getSystemInfoSync();
- this.windowWidth = sys.windowWidth;
- this.windowHeight = sys.windowHeight;
- // #ifdef APP-PLUS
- this.existTabBar && (this.windowHeight -= 50);
- // #endif
- if (sys.windowTop) {
- this.windowHeight += sys.windowTop;
- }
- const query = uni.createSelectorQuery().in(this);
- query.select('#_drag_button').boundingClientRect(data => {
- this.width = data.width;
- this.height = data.height;
- this.offsetWidth = data.width / 2;
- this.offsetHeight = data.height / 2;
- this.left = this.windowWidth - this.width - this.edge;
- if (this.bottomPx * 1 > 0) {
- this.top = this.windowHeight - this.height - this.bottomPx;
- } else {
- this.top = this.windowHeight - this.height - this.edge;
- }
- }).exec();
- //避免部分情况下图片加载延迟导致高度渲染出错
- setTimeout(() => {
- const query = uni.createSelectorQuery().in(this);
- query.select('#_drag_button').boundingClientRect(data => {
- this.width = data.width;
- this.height = data.height;
- this.offsetWidth = data.width / 2;
- this.offsetHeight = data.height / 2;
- this.left = this.windowWidth - this.width - this.edge;
- if (this.bottomPx * 1 > 0) {
- this.top = this.windowHeight - this.height - this.bottomPx;
- } else {
- this.top = this.windowHeight - this.height - this.edge;
- }
- }).exec();
- }, 200);
- },
- methods: {
- backHome() {
- uni.switchTab({
- url: "/pages/index/index"
- })
- },
- styleChange(e) {
- this.deptSource = e.detail.value
- },
- btnClick() {
- this.ShowModalCodebusiness = true
- this.deptSource = 1
- },
- ShowModalCodeSumbit(){
- this. ShowModalPromptChannel = false
- this. ShowModalCode1 = true
- this.workImg = QR.createQrCodeImg(this.$base.h5BaseUrl + "/#/pages/index/applystudio?deptSource=" + this.deptSource + '&userId=' + this.userInfo.sysUser.userId, {
- size: parseInt(200) //二维码大小
- })
- },
- touchmove(e) {
- // 单指触摸
- if (e.touches.length !== 1) {
- return false;
- }
- if (!this.isMove) {
- }
- this.isMove = true;
- this.left = e.touches[0].clientX - this.offsetWidth;
- let clientY = e.touches[0].clientY - this.offsetHeight;
- // #ifdef H5
- clientY += this.height;
- // #endif
- let edgeBottom = this.windowHeight - this.height - this.edge;
- // 上下触及边界
- if (clientY < this.edge) {
- this.top = this.edge;
- } else if (clientY > edgeBottom) {
- this.top = edgeBottom;
- } else {
- this.top = clientY
- }
- },
- touchend(e) {
- if (this.isDock) {
- let edgeRigth = this.windowWidth - this.width - this.edge;
- if (this.left < this.windowWidth / 2 - this.offsetWidth) {
- this.left = this.edge;
- } else {
- this.left = edgeRigth;
- }
- }
- if (this.isMove) {
- this.isMove = false;
- }
- },
- back() {
- uni.navigateBack({
- delta: 1, // 返回的页面数,如果是1表示返回上一页
- success: function () { }
- });
- },
- detail(item) {
- uni.navigateTo({
- url: "/pages/institutional/institutional?key=" + encodeURIComponent(JSON.stringify(item))
- })
- },
- onReachBottom() {
- if (this.pageRequest.pageNum >= this.totalPages) return;
- this.status = 'loading';
- this.pageRequest.pageNum = ++this.pageRequest.pageNum;
- setTimeout(async () => {
- let res = await this.$http.post('/sysPartner/querySysPartnerAPPPage', {
- ...this.pageRequest,
- source: this.source
- });
- if (res.code == '200') {
- this.totalSize = res.data.totalSize;
- this.directLsit = [...this.directLsit, ...res.data.content];
- }
- if (this.pageRequest.pageNum >= this.totalPages) this.status = 'nomore';
- else this.status = 'loading';
- }, 1000)
- },
- async queryData(data) {
- let params = {
- beginTime: data && data.beginTime || '',
- endTime: data && data.endTime || '',
- leaderIds: this.parentData.leaderIds,
- level: this.parentData.partnerType + 1 || this.parentData.level + 1,
- industrySector: data && data.industrySector || '',
- // ...this.pageRequest
- }
- let res = await this.$http.post('/APPPartner/partnerLeaderInfo', params);
- if (res.code == '200') {
- this.directLsit = res.data.partnerInfoVoList
- this.parentData = { ...this.parentData, ...res.data }
- this.totalPages = res.data.totalPages;
- this.totalSize = res.data.totalSize;
- if (this.pageRequest.pageNum >= res.data.totalPages) this.status = 'nomore';
- else this.status = 'loadmore';
- }
- },
- onShowDatePicker() { //显示
- this.showDatePicker = true;
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .headers {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 999999;
- padding-top: 40px;
- height: 85px;
- text:nth-child(2){
- font-size: 18px;
- font-weight: bold;
- }
- }
- .partner-head {
- background: #FFFFFF;
- color: #333333;
- font-size: 14px;
- i {
- margin-left: 2px;
- display: inline-block;
- width: 0;
- height: 0;
- border: 4px solid;
- border-color: #666666;
- border-bottom: 4px solid transparent;
- border-right: 4px solid transparent;
- border-left: 4px solid transparent;
- }
- .search-data {
- color: #666666;
- .active {
- color: #FFFFFF;
- background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
- }
- text {
- // width: 25px;
- // height: 25px;
- // text-align: center;
- padding: 5px 8px;
- border: 1px solid #EEEEEE;
- }
- }
- }
- .sum-insurance {
- padding: 10px 0;
- view {
- text-align: center;
- width: 33.33%;
- border-right: 1px solid #EEEEEE;
- text {
- display: block;
- }
- text:first-child {
- font-weight: 600;
- font-size: 18px;
- color: #333333;
- }
- text:last-child {
- font-size: 10px;
- color: #999999;
- }
- }
- }
- .card {
- background: #FFFFFF;
- border-radius: 5px 5px 5px 5px;
- margin: 10px;
- background-image: url("/static/card.png");
- background-size: 100% 100%;
- border-top: 1px solid;
- border-image: linear-gradient(270deg, rgba(45, 217, 255, 0), rgba(45, 217, 255, 1), rgba(45, 217, 255, 0)) 1 1;
- .card-title {
- padding: 10px 15px;
- text:first-child {
- font-weight: 600;
- font-size: 16px;
- color: #333333;
- }
- text:last-child {
- font-size: 12px;
- color: #666666;
- }
- }
- .card-con {
- padding: 10px 0;
- view {
- text-align: center;
- width: 33.33%;
- border-right: 1px solid #EEEEEE;
- text {
- display: block;
- }
- text:first-child {
- font-weight: 600;
- font-size: 16px;
- color: #333333;
- line-height: 18px;
- }
- text:last-child {
- font-size: 10px;
- color: #999999;
- }
- }
- }
- }
- .drag {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- min-height: 80rpx;
- position: fixed;
- z-index: 999999;
- font-size: 12px;
- color: #FFFFFF;
- width: 50px;
- height: 50px;
- padding-top: 2px;
- background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
- border-radius: 3px 3px 3px 3px;
- image {
- display: inline-block;
- width: 23px;
- height: 23px;
- }
- &.transition {
- transition: left .3s ease, top .3s ease;
- }
- }
- .ShowModalCode-business {
- display: block;
- font-weight: 600;
- font-size: 16px;
- color: #333333;
- // border: 1px solid #EEEEEE;
- padding: 10px;
- text-align: center;
- }
- .ShowModalCode-con {
- padding: 30px;
- text-align: center;
- image {
- margin: 0 auto;
- margin-top: 15px;
- }
- }
- .uni-list {
- flex: 1;
- }
- .uni-list-item:first-child {
- /* #ifndef APP-NVUE */
- // display: flex;
- /* #endif */
- flex: 1;
- flex-direction: row;
- background-color: #FFFFFF;
- border-bottom-style: solid;
- border-bottom-width: 1px;
- border-bottom-color: #eee;
- }
- .uni-list-item__container {
- padding: 12px 15px;
- width: 100%;
- flex: 1;
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- box-sizing: border-box;
- /* #endif */
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- }
- .uni-list-item__notestext {
- padding: 0 15px 15px 15px;
- font-size: 15px;
- color: #666666;
- }
- .uni-list-item__content-title {
- font-size: 17px;
- color: #333333;
- }
- .ShowModalCode-sumbit {
- background: linear-gradient(132deg, #2DD9FF 0%, #2D6DFF 100%);
- border-radius: 5px 5px 5px 5px;
- height: 40px;
- line-height: 40px;
- font-size: 16px;
- color: #FFFFFF;
- margin: 15px;
- text-align: center;
- }
- .ShowModalCode-style {
- text:first-of-type {
- display: block;
- font-weight: 600;
- font-size: 16px;
- color: #333333;
- border: 1px solid #EEEEEE;
- padding: 15px;
- text-align: center;
- }
- }
- .popup-code {
- text {
- display: block;
- border-bottom: 1px solid #EEEEEE;
- height: 50px;
- line-height: 50px;
- text-align: center;
- font-size: 16px;
- color: #666666;
- }
- }
- .ShowModalPrompt-con{
- padding: 0 16px;
- padding-bottom:16px;
- font-weight: 400;
- font-size: 15px;
- color: #666666;
- border-bottom: 1px solid #eee;
- }
- .ShowModalPrompt-button{
- padding:12px 0;
- text-align: center;
- color: #333333;
- }
- </style>
|