| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345 |
- <template>
- <view class="page">
- <view class="personalInfo dis a-start">
- <text class="createTime">{{createTime}}注册</text>
- <image src="../../../static/image/team/zg.png" mode="" class="zg"></image>
- <image src="../../../static/image/my/avatar2.png" mode="" class="avatar"></image>
- <view class="dis f-c " style="position: relative;">
- <view class="name dis a-c">
- <text>{{info.username}}</text>
- <image src="../../../static/image/team/proxy1.png" mode=""></image>
- </view>
- <text class="memberId">会员号 {{info.id}} </text>
- <view class="phone dis a-c" @click="callPhone(phone)">
- <text>手机号 {{phone}}</text>
- <image src="../../../static/image/car-insure/phone.png" mode=""></image>
- </view>
- </view>
- </view>
- <view class="performanceStats">
- <image src="../../../static/image/team/tjicon.png" mode=""></image>
- <view class="title">
- <text style="position: relative;">业绩统计</text>
- <view class="tag"></view>
- </view>
- <view class="data dis a-c j-start f-wrap mt-2">
- <view class="dis f-c a-c">
- <text>{{info.bjpolicynum}}</text>
- <text>报价次数</text>
- </view>
- <view class="dis f-c a-c">
- <text>{{info.policynum}}</text>
- <text>核保笔数</text>
- </view>
- <view class="dis f-c a-c">
- <text>{{info.ordernum}}</text>
- <text>出单笔数</text>
- </view>
- <view class="dis f-c a-c">
- <text>{{info.sumpremium}}</text>
- <text>签单保费</text>
- </view>
- <view class="dis f-c a-c">
- <text>{{info.averagePremium?info.averagePremium:0}}</text>
- <text>平均保费</text>
- </view>
- </view>
- </view>
- <view class="performanceSummary">
- <view class="title">
- <text style="position: relative;">业绩明细</text>
- <view class="tag"></view>
- </view>
- <view class="dataOver">
- <view class="item mb-2" v-for="(item,index) in list" :key="index">
- <view class="title dis a-c j-c">
- <image :src="item.logo" mode=""></image>
- <text>{{item.companyName}}</text>
- </view>
- <view class="data dis a-c j-s f-wrap ">
- <view class="dis f-c a-c">
- <text>{{item.bjpolicynum}}</text>
- <text>报价次数</text>
- </view>
- <view class="dis f-c a-c">
- <text>{{item.policynum}}</text>
- <text>核保笔数</text>
- </view>
- <view class="dis f-c a-c">
- <text>{{item.ordernum}}</text>
- <text>出单笔数</text>
- </view>
- <view class="dis f-c a-c">
- <text>{{item.sumpremium}}</text>
- <text>签单保费</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from "vuex";
- export default {
- data() {
- return {
- info: {},
- phone: "",
- createTime: "",
- referrersId: "",
- referrersName: "",
- list: [],
- dateRange: [new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-01', new Date()
- .getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate()
- ],
- }
- },
- computed: {
- ...mapState(['userInfo']),
- getHeight() {
- let height = uni.getSystemInfoSync().windowHeight - uni.upx2px(770);
- return `height: ${height}px;`;
- }
- },
- // 监听导航栏的按钮
- onNavigationBarButtonTap(e) {
- if (e.index == 0) {
- this.navigate({
- url: '/pages/index/index'
- }, "switchTab", true);
- }
- },
- onLoad() {
- const eventChannel = this.getOpenerEventChannel()
- // 监听acceptData事件,获取上一页面通过eventChannel传送到当前页面的数据
- eventChannel.on('acceptData', async (data) => {
- console.log(data);
- this.info = data.item;
- this.dateRange = [...data.date]
- this.getCompanyList()
- let res = await this.$http.get('/app/customer/' + this.info.id);
- if (res.code == '200') {
- this.phone = res.data.phone;
- this.createTime = res.data.createTime;
- this.referrersName = res.data.referrersName;
- this.referrersId = res.data.referrersId;
- }
- })
- },
- methods: {
- btn_click() {
- uni.navigateTo({
- url: '/pages/chat/chat'
- })
- },
- callPhone(tel) {
- uni.makePhoneCall({
- phoneNumber: tel,
- success: () => {
- console.log("成功拨打电话")
- }
- })
- },
- async getCompanyList() {
- let params = {
- id: this.info.id,
- "enddate": this.dateRange[1],
- "startdate": this.dateRange[0]
- }
- let res = await this.$http.post('/esm/user/queryUserCountForUser', params);
- if (res.code == '200') {
- console.log(res)
- // this.phone = res.data.phone;
- this.list = res.data;
- }
- }
- // toTeam() {
- // this.navigate({
- // url: '/pages/tools/team/team?id=' + this.staffInfo.sysUser.id + '&name=' + this.staffInfo
- // .sysUser.name
- // }, "navigateTo", true)
- // }
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- height: calc(100vh - 44px);
- background: #F8FAFE;
- padding: 10px 12px;
- }
- .personalInfo {
- height: 120px;
- background: linear-gradient(270deg, #2967FF 0%, #2967FF 100%);
- border-radius: 4px;
- padding: 24px;
- position: relative;
- .createTime {
- position: absolute;
- right: 8px;
- top: 5px;
- color: rgba(255, 255, 255, 0.55);
- font-size: 12px;
- }
- .zg {
- width: 108px;
- height: 98px;
- position: absolute;
- right: 28px;
- bottom: 0;
- }
- .avatar {
- width: 50px;
- height: 50px;
- margin-right: 20px;
- }
- .name {
- >text {
- font-size: 17px;
- color: #FFFFFF;
- font-weight: bold;
- }
- image {
- width: 133rpx;
- height: 46rpx;
- margin-left: 6px;
- }
- }
- .memberId,
- .phone {
- font-size: 13px;
- color: rgba(255, 255, 255, 0.85);
- image {
- width: 14px;
- height: 14px;
- margin-left: 6px;
- }
- }
- }
- .performanceStats {
- margin: 16px 0;
- background: linear-gradient(180deg, #DFE9FF 0%, #F1F5FE 100%);
- box-shadow: 0px 2px 5px 0px #DAE3F4;
- border-radius: 4px;
- border: 1px solid #FFFFFF;
- padding: 8px 10px;
- position: relative;
- >image {
- width: 136rpx;
- height: 120rpx;
- position: absolute;
- right: 10px;
- top: -13px;
- }
- .data {
- padding: 6px 8px;
- background: rgba(255, 255, 255, 0.8);
- >view {
- width: 25%;
- text:nth-child(1) {
- font-size: 15px;
- color: #333333;
- font-weight: bold;
- }
- text:nth-child(2) {
- font-size: 13px;
- color: #666666;
- }
- }
- }
- }
- .performanceSummary {
- background: #F1F5FE;
- box-shadow: 0px 2px 5px 0px #DAE3F4;
- border-radius: 4px;
- border: 1px solid #FFFFFF;
- padding: 8px 10px;
- .dataOver {
- padding: 10px 0;
- max-height: calc(100vh - 420px);
- overflow-y: auto;
- .item {
- background: rgba(255, 255, 255, 0.8);
- border-radius: 2px;
- padding: 8px;
- .title {
- padding: 6px;
- border-bottom: 1px solid #EEEEEE;
- font-weight: bold;
- font-size: 13px;
- color: #333;
- image {
- width: 23px;
- height: 23px;
- margin-right: 6px;
- }
- }
- .data {
- padding: 4px;
- >view {
- width: 25%;
- text:nth-child(1) {
- font-size: 13px;
- color: #333333;
- font-weight: bold;
- }
- text:nth-child(2) {
- font-size: 12px;
- color: #666666;
- }
- }
- }
- }
- }
- }
- .performanceStats .title,
- .performanceSummary .title {
- position: relative;
- .tag {
- position: absolute;
- left: 0;
- bottom: 3px;
- width: 110rpx;
- height: 8rpx;
- background: linear-gradient(90deg, #3D74FE 0%, rgba(152, 184, 255, 0.2) 100%);
- border-radius: 2px;
- }
- }
- </style>
|