Browse Source

Merge branch 'master' of http://git.2weisou.com/liumin/NewZkgj

trunk1017
douzhuo 2 years ago
parent
commit
87e9066b51
7 changed files with 257 additions and 214 deletions
  1. +1
    -1
      manifest.json
  2. +2
    -2
      pages/center/consumer/consumerDetail.vue
  3. +1
    -2
      pages/center/consumer/index.vue
  4. +2
    -2
      pages/mine/details2.vue
  5. +34
    -14
      pages/reportExcel/dayReport.vue
  6. +217
    -193
      pages/reportExcel/weekReport.vue
  7. BIN
      static/images/nodata.png

+ 1
- 1
manifest.json View File

@@ -91,7 +91,7 @@
}, },
"quickapp" : {}, "quickapp" : {},
"mp-weixin" : { "mp-weixin" : {
"appid" : "wxe044603515ff2cb5",
"appid" : "wx8f883dca5ecc5510",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : true, "es6" : true,


+ 2
- 2
pages/center/consumer/consumerDetail.vue View File

@@ -297,8 +297,8 @@
<view class="item" style="flex: 1; text-align: center" <view class="item" style="flex: 1; text-align: center"
>执行{{ item.fraction || 0 }}%</view >执行{{ item.fraction || 0 }}%</view
> >
<view class="item" style="flex:1;text-align:center;" v-if="item.keywordsList&&item.keywordsList.length">已匹配({{
item.keywordsList&&item.keywordsList.length
<view class="item" style="flex:1;text-align:center;color:#2671E2" v-if="item.keywordsList&&item.keywordsList.length">已匹配({{
item.keywordsList.length
}})</view> }})</view>
<view class="item" v-else style="flex:1;text-align:center;">未匹配</view> <view class="item" v-else style="flex:1;text-align:center;">未匹配</view>
</view> </view>


+ 1
- 2
pages/center/consumer/index.vue View File

@@ -1185,7 +1185,6 @@ export default {
}) })
} }
}) })
console.log(this.keywordsIds);
this.getMyCustom(); this.getMyCustom();
}, },
goSearch() { goSearch() {
@@ -1380,7 +1379,6 @@ export default {
.content-sec { .content-sec {
border-top: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
padding: 0 30rpx; padding: 0 30rpx;
// padding-bottom: 30rpx;
position: relative; position: relative;


.content-sec-lab { .content-sec-lab {
@@ -1394,6 +1392,7 @@ export default {


.content-sec-lab1 { .content-sec-lab1 {
color: #333333; color: #333333;
word-break: break-all;
} }


.content-sec-tips { .content-sec-tips {


+ 2
- 2
pages/mine/details2.vue View File

@@ -354,9 +354,9 @@
<view class="title1" style="flex:1">{{item.name}}</view> <view class="title1" style="flex:1">{{item.name}}</view>
<view class="Level1-middle" style="flex:2;display:flex;"> <view class="Level1-middle" style="flex:2;display:flex;">
<view class="item" style="flex:1;text-align:center;">执行{{item.fraction || 0}}%</view> <view class="item" style="flex:1;text-align:center;">执行{{item.fraction || 0}}%</view>
<view class="item" style="flex:1;text-align:center;"
<view class="item" style="flex:1;text-align:center;color:#2671E2"
v-if="item.keywordsList&&item.keywordsList.length">已匹配({{ v-if="item.keywordsList&&item.keywordsList.length">已匹配({{
item.keywordsList&&item.keywordsList.length
item.keywordsList.length
}})</view> }})</view>
<view class="item" v-else style="flex:1;text-align:center;">未匹配</view> <view class="item" v-else style="flex:1;text-align:center;">未匹配</view>
</view> </view>


+ 34
- 14
pages/reportExcel/dayReport.vue View File

@@ -12,10 +12,12 @@
生成时间:{{ weekObj.createTime || '--' }} 生成时间:{{ weekObj.createTime || '--' }}
</view> </view>
</view> </view>

<view class="nodata-box" style="background: url(../../static/images/nodata.png)no-repeat;background-size: contain;" v-if="nodata">
此项目今日还没有接待量哦~
</view>
<view v-if="!nodata">
<!-- 循环渲染的数据 --> <!-- 循环渲染的数据 -->
<view class="dateList"> <view class="dateList">
<!-- -->
<view class="arrs"> <view class="arrs">
<view class="arrs-items index1"> <view class="arrs-items index1">
<view class="left"> <view class="left">
@@ -281,18 +283,15 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<view class="nav-footer">
<view class="nav-footer" v-if="!nodata">
<view class="footer-item" @click="toHome"> <view class="footer-item" @click="toHome">
回到管理端 回到管理端
</view> </view>
<view class="footer-item" @click="copy" style="margin-left: 24rpx;"> <view class="footer-item" @click="copy" style="margin-left: 24rpx;">
复制内容 复制内容
</view> </view>
<view class="footer-item full" style="margin-left: 24rpx;"> <view class="footer-item full" style="margin-left: 24rpx;">
<button open-type="share" class="fulls"> <button open-type="share" class="fulls">
一键转发 一键转发
@@ -316,6 +315,7 @@
id: '', // 消息id id: '', // 消息id
projectName: '', // 项目名称 projectName: '', // 项目名称
weekObj: {}, // 日报详情 weekObj: {}, // 日报详情
nodata: false//有无数据
} }
}, },


@@ -344,13 +344,23 @@
this.$u.get('/zkMessage/findByProjectId', { this.$u.get('/zkMessage/findByProjectId', {
id: this.id id: this.id
}).then(res => { }).then(res => {
console.log(res)
let data = JSON.parse(res.zkMessage.content)
this.weekObj = {
...res.zkMessage,
...data
let data = {}
if(res.zkMessage.content){
data = JSON.parse(res.zkMessage.content)
this.weekObj = {
...res.zkMessage,
...data
}
this.nodata = false
}else{
this.nodata = true
this.weekObj = {
...res.zkMessage
}
} }
this.projectName = res.projectName this.projectName = res.projectName
console.log(this.weekObj)
this.init() this.init()
}).catch(e => { }).catch(e => {
console.log(e) console.log(e)
@@ -363,7 +373,6 @@
生成时间:${this.weekObj.createTime || '--'} 生成时间:${this.weekObj.createTime || '--'}
1、接待量:${this.weekObj.receptionCount || 0 } 1、接待量:${this.weekObj.receptionCount || 0 }
有效接待:${this.weekObj.activeCustomer || 0} 有效接待:${this.weekObj.activeCustomer || 0}
@@ -489,7 +498,6 @@
this.getTopThree() this.getTopThree()
}, },



// 冒泡排序 // 冒泡排序
bubbleSort(arr) { bubbleSort(arr) {
for (let i = 0; i < arr.length - 1; i += 1) { for (let i = 0; i < arr.length - 1; i += 1) {
@@ -743,5 +751,17 @@
font-size: 30rpx !important; font-size: 30rpx !important;
font-weight: bold !important; font-weight: bold !important;
} }
.nodata-box{
width: 400rpx;
height: 400rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 40rpx;
padding-top: 360rpx;
margin: 0 auto;
text-align: center;
}
} }
</style> </style>

+ 217
- 193
pages/reportExcel/weekReport.vue View File

@@ -13,222 +13,224 @@
</view> </view>
</view> </view>
</view> </view>


<!-- 简报 -->
<view class="briefing">
<view class="briefing-title">
简报
</view>
<!-- 简报表格部分 -->
<view class="briefing-box">
<block v-for="(data, index) in numlist" :key="index">
<view class="briefing-box-item" @click="toAuthPage(data)">
<view class="tops" :class="[data.class || '']">
{{ data.name }}
</view>
<view class="middle" :class="[data.class || '']">
{{ data.num || 0 }}
</view>
<view class="bottom">
对比上周: {{ data.preNum || 0 }}
<text class="b-text"
:class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent || '0' }}</text>
<template v-if="data.percent != 0">
<text style="margin-left: 8rpx;font-size: 34rpx;font-weight: bold;"
:class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent > 0 ? '↑' : '↓' }}</text>
</template>
</view>
</view>
</block>
</view>
<view class="nodata-box" v-if="nodata" style="background: url(../../static/images/nodata.png)no-repeat;background-size: contain;" >
此项目本周还没有接待量哦~
</view> </view>


<!-- 销讲场景执行排名 -->
<view class="execution-ranking">
<view class="execution-ranking-title">
销讲场景执行排名
</view>
<template v-if="isShowXJTop1List">
<view class="execution-ranking-desc" v-if="false">
<text>销讲场景平均执行对比上周</text>
<text>{{ rankTop('fractionPKName') }}</text>
<text>{{ rankTop('fractionPK') }}</text>
<text>%</text>
<template v-if="rankTop('fractionBastValue') > 0">
<text>,其中【{{ rankTop('fractionBastName') }}】最强为</text>
<text class="up">{{ rankTop('fractionBastValue') }}</text>
<text>%</text>
</template>
<template v-if="rankTop('fractionLastValue') < 0">
<text>,【{{ rankTop('fractionLastName') }}】执行最弱为</text>
<text class="down">{{ rankTop('fractionLastValue') }}</text>
<text>%;</text>
</template>
<view v-if="!nodata" >
<!-- 简报 -->
<view class="briefing">
<view class="briefing-title">
简报
</view> </view>

<!-- 排名百分比列表 -->
<view class="ranking-box" @click="toTrendAnalysis('销讲数据')">
<block v-for="(percent, index) in weekObj.XJTop1List" :key="index">
<view class="ranking-item">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
</u-line-progress>
<!-- 简报表格部分 -->
<view class="briefing-box">
<block v-for="(data, index) in numlist" :key="index">
<view class="briefing-box-item" @click="toAuthPage(data)">
<view class="tops" :class="[data.class || '']">
{{ data.name }}
</view>
<view class="middle" :class="[data.class || '']">
{{ data.num || 0 }}
</view>
<view class="bottom">
对比上周: {{ data.preNum || 0 }}
<text class="b-text"
:class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent || '0' }}</text>
<template v-if="data.percent != 0">
<text style="margin-left: 8rpx;font-size: 34rpx;font-weight: bold;"
:class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent > 0 ? '↑' : '↓' }}</text>
</template>
</view> </view>
<view class="right"> {{ percent.value || '0' }} %</view>
</view> </view>
</block> </block>
</view> </view>
</template>
<template v-else>
<view class="empity">
暂无数据
</view>
</template>
</view>

<!-- 接待统计 -->
<view class="statistics">
<view class="statistics-title">
接待统计
</view> </view>
<template v-if="isShowStatistics">
<view class="statistics-desc" v-if="false">
<text>
顾问平均执行率对比上周
</text>
<text>
{{ rankTop('ranktype') || '' }}
</text>
<text :class="[rankTop('class')]">{{ rankTop('people') || '' }}</text>
<text class="">
人,其中{{ rankTop('topName') || '' }}上升
</text>
<text class="up">{{ rankTop('topPk') || '0' }}</text>
<text class="">
%为最高,{{ rankTop('lastName') || '' }}下降
</text>
<text class="down">{{ rankTop('lastPk') || '0' }}</text>
<text class="">
%降幅最大。
</text>

<!-- 销讲场景执行排名 -->
<view class="execution-ranking">
<view class="execution-ranking-title">
销讲场景执行排名
</view> </view>
<view class="table">
<view class="thead">
<block v-for="(head, headIndex) in tableHead" :key="headIndex">
<view class="thead-item" :style="[head.style]">
{{ head.title }}
</view>
</block>
<template v-if="isShowXJTop1List">
<view class="execution-ranking-desc" v-if="false">
<text>销讲场景平均执行对比上周</text>
<text>{{ rankTop('fractionPKName') }}</text>
<text>{{ rankTop('fractionPK') }}</text>
<text>%</text>
<template v-if="rankTop('fractionBastValue') > 0">
<text>,其中【{{ rankTop('fractionBastName') }}】最强为</text>
<text class="up">{{ rankTop('fractionBastValue') }}</text>
<text>%</text>
</template>
<template v-if="rankTop('fractionLastValue') < 0">
<text>,【{{ rankTop('fractionLastName') }}】执行最弱为</text>
<text class="down">{{ rankTop('fractionLastValue') }}</text>
<text>%;</text>
</template>
</view> </view>


<view class="tbody" @click="toEmployeesstatistics('顾问排名')">
<block v-for="(data, index) in weekObj.customerInfo1" :key="index">
<view class="tbody-item">
<view class="tbody-items name">{{ data.name }}</view>
<view class="tbody-items nums">{{ data.activeCustomer }}</view>
<view class="tbody-items time">{{ data.avgDuration }}m</view>
<view class="tbody-items percent">{{ data.fraction }}%</view>
<view class="tbody-items week" :class="{up: data.pk > 0, down: data.pk < 0}">
{{ data.pk > 0 ? `+${data.pk}` : data.pk }}%
<!-- 排名百分比列表 -->
<view class="ranking-box" @click="toTrendAnalysis('销讲数据')">
<block v-for="(percent, index) in weekObj.XJTop1List" :key="index">
<view class="ranking-item">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
</u-line-progress>
</view> </view>
<view class="right"> {{ percent.value || '0' }} %</view>
</view> </view>
</block> </block>
</view> </view>
</view>
</template>
</template>
<template v-else>
<view class="empity">
暂无数据
</view>
</template>
</view>


<template v-else>
<view class="empity">
暂无数据
<!-- 接待统计 -->
<view class="statistics">
<view class="statistics-title">
接待统计
</view> </view>
</template>
</view>
<template v-if="isShowStatistics">
<view class="statistics-desc" v-if="false">
<text>
顾问平均执行率对比上周
</text>
<text>
{{ rankTop('ranktype') || '' }}
</text>
<text :class="[rankTop('class')]">{{ rankTop('people') || '' }}</text>
<text class="">
人,其中{{ rankTop('topName') || '' }}上升
</text>
<text class="up">{{ rankTop('topPk') || '0' }}</text>
<text class="">
%为最高,{{ rankTop('lastName') || '' }}下降
</text>
<text class="down">{{ rankTop('lastPk') || '0' }}</text>
<text class="">
%降幅最大。
</text>
</view>
<view class="table">
<view class="thead">
<block v-for="(head, headIndex) in tableHead" :key="headIndex">
<view class="thead-item" :style="[head.style]">
{{ head.title }}
</view>
</block>
</view>


<!-- 顾问销讲执行率排名 -->
<view class="guwen-ranking">
<view class="guwen-ranking-title">
顾问销讲执行率排名(TOP10)
</view>
<template v-if="isShowZXLTopList">
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.ZXLTopList" :key="index">
<view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
</u-line-progress>
</view>
<view class="right"> {{ percent.value || '0' }} %</view>
<view class="tbody" @click="toEmployeesstatistics('顾问排名')">
<block v-for="(data, index) in weekObj.customerInfo1" :key="index">
<view class="tbody-item">
<view class="tbody-items name">{{ data.name }}</view>
<view class="tbody-items nums">{{ data.activeCustomer }}</view>
<view class="tbody-items time">{{ data.avgDuration }}m</view>
<view class="tbody-items percent">{{ data.fraction }}%</view>
<view class="tbody-items week" :class="{up: data.pk > 0, down: data.pk < 0}">
{{ data.pk > 0 ? `+${data.pk}` : data.pk }}%
</view>
</view>
</block>
</view> </view>
</block>
</view>
</template>
</view>
</template>


<template v-else>
<view class="empity">
暂无数据
<template v-else>
<view class="empity">
暂无数据
</view>
</template>
</view>

<!-- 顾问销讲执行率排名 -->
<view class="guwen-ranking">
<view class="guwen-ranking-title">
顾问销讲执行率排名(TOP10)
</view> </view>
</template>
</view>
<template v-if="isShowZXLTopList">
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.ZXLTopList" :key="index">
<view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
</u-line-progress>
</view>
<view class="right"> {{ percent.value || '0' }} %</view>
</view>
</block>
</view>
</template>


<!-- 顾问接待量排名 -->
<view class="guwen-ranking">
<view class="guwen-ranking-title">
顾问接待量排名(TOP10)
<template v-else>
<view class="empity">
暂无数据
</view>
</template>
</view> </view>


<template v-if="isShowJDLTopList">
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.JDLTopList" :key="index">
<view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.values">
</u-line-progress>
</view>
<view class="right"> {{ percent.value || '0' }} </view>
</view>
</block>
<!-- 顾问接待量排名 -->
<view class="guwen-ranking">
<view class="guwen-ranking-title">
顾问接待量排名(TOP10)
</view> </view>
</template>


<template v-else>
<view class="empity">
暂无数据
</view>
</template>
</view>
<template v-if="isShowJDLTopList">
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.JDLTopList" :key="index">
<view class="ranking-item" @click="toStaffAnalysis('销讲数据', percent)">
<view class="left">{{ percent.title }}</view>
<view class="middle">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.values">
</u-line-progress>
</view>
<view class="right"> {{ percent.value || '0' }} </view>
</view>
</block>
</view>
</template>


<!-- 使用建议 -->
<view class="proposal" v-if="weekObj.suggest">
<view class="proposal-title">
使用建议
<template v-else>
<view class="empity">
暂无数据
</view>
</template>
</view> </view>
<!-- 建议的文字 -->
<view class="proposal-box">
<u-parse class="ql-editor" :content="weekObj.suggest" />

<!-- 使用建议 -->
<view class="proposal" v-if="weekObj.suggest">
<view class="proposal-title">
使用建议
</view>
<!-- 建议的文字 -->
<view class="proposal-box">
<u-parse class="ql-editor" :content="weekObj.suggest" />
</view>
</view> </view>
</view>


<!-- 底部按钮 -->
<view class="nav-footer">
<!-- 底部按钮 -->
<view class="nav-footer">


<view class="footer-item" @click="toHome">
回到管理端
</view>
<view class="footer-item" @click="toHome">
回到管理端
</view>


<view class="footer-item full" style="margin-left: 24rpx;">
<button open-type="share" class="fulls">
一键转发
</button>
<view class="footer-item full" style="margin-left: 24rpx;">
<button open-type="share" class="fulls">
一键转发
</button>
</view>
</view> </view>
</view> </view>
</view> </view>
@@ -243,6 +245,7 @@
}, },
data() { data() {
return { return {
nodata: false,
tableHead: [{ tableHead: [{
title: '顾问', title: '顾问',
style: { style: {
@@ -570,18 +573,28 @@
this.$u.get('/zkMessage/findByProjectId', { this.$u.get('/zkMessage/findByProjectId', {
id: this.id id: this.id
}).then(res => { }).then(res => {
console.log(res)
let data = JSON.parse(res.zkMessage.content)
console.log(data)
// console.log(res)
let data = {}
if(res.zkMessage.content){
data = JSON.parse(res.zkMessage.content)
}else{
this.nodata = true
this.weekObj = {
...res.zkMessage,
}
}
this.bubbleSort(data.customerInfo1, 'pk') this.bubbleSort(data.customerInfo1, 'pk')
this.bubbleSort(data.customerInfo2, 'pk') this.bubbleSort(data.customerInfo2, 'pk')
data.customerInfo1.reverse() data.customerInfo1.reverse()
data.customerInfo2.reverse() data.customerInfo2.reverse()

this.weekObj = {
...res.zkMessage,
...data
if(res.zkMessage.content){
data = JSON.parse(res.zkMessage.content)
this.weekObj = {
...res.zkMessage,
...data
}
} }
this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1) this.weekObj.createTimeName = this.getTimeLines(this.weekObj.weekDate, 1)
console.log(this.weekObj, 'this.weekObj') console.log(this.weekObj, 'this.weekObj')
this.projectName = res.projectName this.projectName = res.projectName
@@ -811,7 +824,18 @@
} }
} }



.nodata-box{
width: 400rpx;
height: 400rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
line-height: 40rpx;
padding-top: 360rpx;
margin: 0 auto;
text-align: center;
}


.briefing { .briefing {
background: #fff; background: #fff;


BIN
static/images/nodata.png View File

Before After
Width: 400  |  Height: 400  |  Size: 27 KiB

Loading…
Cancel
Save