215 lines
6.3 KiB
Vue
215 lines
6.3 KiB
Vue
<template>
|
||
<view>
|
||
<!-- 顶部操作条 -->
|
||
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||
<block slot="backText">返回</block>
|
||
<block slot="content">{{myOperator.level.name ? myOperator.level.name : '城市'}}运营商</block>
|
||
</cu-custom>
|
||
<view class="margin-top-sm margin-lr-sm padding bg-white name-card shadow-warp">
|
||
<!-- 个人名片 -->
|
||
<view class="flex justify-start">
|
||
<view class="cu-avatar round"
|
||
:style="'background-image:url(' + myOperator.customerLogoUrl + '); width: 130rpx; height: 130rpx;'">
|
||
</view>
|
||
<view class="margin-left-sm flex-column-around">
|
||
<view class="text-black text-xl">{{myOperator.name}}</view>
|
||
<view class="">
|
||
<text class="margin-right-xs">角色:合伙人</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 实名及公告图标 -->
|
||
<view class="flex justify-end oper-bar">
|
||
<!-- <view class="text-center margin-right-sm" @click="showCertificationForm">
|
||
<view class="cuIcon-profilefill text-yellow"></view>
|
||
<view class="text-xs">实名认证</view>
|
||
</view> -->
|
||
<view class="text-center">
|
||
<view class="cuIcon-notice"></view>
|
||
<view class="text-xs">公告</view>
|
||
</view>
|
||
</view>
|
||
<!-- 团队人员统计 -->
|
||
<view class="cu-list grid no-border col-4 solid-top margin-top-sm">
|
||
<view class="cu-item" :class="index == 2 ? 'solid-left' : ''" v-for="(item, index) in myOperator.analyseItems" v-if="index < 4 && item.type === 'common'">
|
||
<view class="margin-bottom-xs">{{item.title}}</view>
|
||
<view class="text-red" v-if="item.unit === 'yuan'">
|
||
¥{{item.value}}
|
||
</view>
|
||
<view v-else class="text-red">
|
||
{{item.value}}{{item.unit}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 团队订单统计 -->
|
||
<view class="margin-lr-sm margin-top-sm padding bg-white margin-bottom-with-bar">
|
||
<view class="cu-list grid no-border col-4">
|
||
<view class="cu-item" v-for="(item, index) in myOperator.analyseItems" v-if="index >= 4 && item.type === 'dayAnalyse'">
|
||
<view class="margin-bottom-xs">{{item.title}}</view>
|
||
<view class="text-red" v-if="item.unit === 'yuan'">
|
||
¥{{item.value}}
|
||
</view>
|
||
<view v-else class="text-red">
|
||
{{item.value}}{{item.unit}}
|
||
</view>
|
||
</view>
|
||
<view class="cu-item" v-for="(item, index) in myOperator.analyseItems" v-if="index >= 4 && item.type === 'common'">
|
||
<view class="margin-bottom-xs">{{item.title}}</view>
|
||
<view class="text-red" v-if="item.unit === 'yuan'">
|
||
¥{{item.value}}
|
||
</view>
|
||
<view v-else class="text-red">
|
||
{{item.value}}{{item.unit}}
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 操作栏 -->
|
||
<view class="bg-white padding margin-top-sm fixed-bottom-bar">
|
||
<view class="flex flex-wrap justify-between">
|
||
<view class="basis-df margin-tb-sm" v-for="(item, index) in operBtn">
|
||
<button class="cu-btn long-btn shadow bg-main-color light" :data-cur="item.code"
|
||
@click="doSomething">{{item.name}}</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 屏蔽设置 模态框 -->
|
||
<view class="cu-modal" :class="isShowShieldSet?'show':''">
|
||
<view class="cu-dialog">
|
||
<view class="cu-bar bg-white justify-end">
|
||
<view class="content">屏蔽设置</view>
|
||
<view class="action" @tap="hideModal">
|
||
<text class="cuIcon-close text-bold text-red"></text>
|
||
</view>
|
||
</view>
|
||
<view class="padding-xl">
|
||
<view class="margin-bottom">对所有客户屏蔽有竞争关系区域的服务和商品类目</view>
|
||
<view>
|
||
<text class="margin-right">屏蔽请勾选: </text>
|
||
<checkbox style="transform:scale(0.7)" class="round sm main-color" :value="agreeShield" :checked="agreeShield"
|
||
@click="changeAgreeShield">
|
||
</checkbox>
|
||
</view>
|
||
</view>
|
||
<view class="cu-bar bg-white">
|
||
<view class="action margin-0 flex-sub text-black" @tap="hideModal">取消</view>
|
||
<view class="action margin-0 flex-sub text-main-color solid-left" @tap="hideModal"
|
||
@click="confirmShield">确定</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
|
||
<script>
|
||
import horizontalNameCard from '@/components/common-card/horizontal-name-card.vue';
|
||
|
||
export default {
|
||
components: {
|
||
horizontalNameCard
|
||
},
|
||
data() {
|
||
return {
|
||
myOperator: {},
|
||
operBtn: [{
|
||
code: 'ShieldSet',
|
||
name: '屏蔽设置'
|
||
}, {
|
||
code: '',
|
||
name: '加价申请'
|
||
}, {
|
||
code: 'showTeamMembers',
|
||
name: '查看团队'
|
||
}, {
|
||
code: '',
|
||
name: '查看客户'
|
||
}, {
|
||
code: '',
|
||
name: '添加团队'
|
||
}, {
|
||
code: '',
|
||
name: '审批团队'
|
||
}],
|
||
agreeShield: false,
|
||
isShowShieldSet: false
|
||
}
|
||
},
|
||
onLoad() {
|
||
this.loadData();
|
||
},
|
||
methods: {
|
||
async loadData() {
|
||
this.curUserInfo = this.$request.getCurUserInfo();
|
||
// this.myOperator = await this.$api.data('myOperator');
|
||
this.loadMyInfo({
|
||
customerId: this.curUserInfo.customerId
|
||
});
|
||
},
|
||
async loadMyInfo(params) {
|
||
let res = await this.$request.qryCustomerList(params);
|
||
if (res && res.rows && res.rows.length == 1) {
|
||
this.myOperator = res.rows[0];
|
||
this.myOperator.extraInfos = [{
|
||
name: '角色:',
|
||
desc: '合伙人'
|
||
}];
|
||
}
|
||
},
|
||
hideModal(e) {
|
||
this.isShowShieldSet = false
|
||
},
|
||
doSomething(e) {
|
||
const cur = e.currentTarget.dataset.cur;
|
||
switch (cur) {
|
||
case 'ShieldSet':
|
||
this.isShowShieldSet = !this.isShowShieldSet;
|
||
break;
|
||
case 'showTeamMembers':
|
||
uni.navigateTo({
|
||
url: '/pages/my/my-team-member'
|
||
})
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
},
|
||
changeAgreeShield() {
|
||
this.agreeShield = !this.agreeShield;
|
||
},
|
||
confirmShield(e) {},
|
||
showCertificationForm() {
|
||
uni.navigateTo({
|
||
url: '/pages/my/Certification'
|
||
})
|
||
}
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style scoped>
|
||
.cu-list.grid.no-border>.solid-left.cu-item:after {
|
||
border-left: 1rpx solid rgba(0, 0, 0, 0.1);
|
||
border-left-width: 0.5px;
|
||
border-left-style: solid;
|
||
border-left-color: rgba(0, 0, 0, 0.1);
|
||
}
|
||
|
||
.name-card {
|
||
position: relative;
|
||
}
|
||
|
||
.name-card .oper-bar {
|
||
position: absolute;
|
||
top: 20rpx;
|
||
right: 20rpx;
|
||
font-size: 40rpx;
|
||
}
|
||
|
||
.long-btn {
|
||
width: 90%;
|
||
margin-left: 5%;
|
||
margin-right: 5%;
|
||
}
|
||
</style>
|