Commit 7feec4b8 by 王志慧

commit

1 parent 8f9f66da
......@@ -118,9 +118,11 @@ line-height: 25px;
line-height: 15px;
margin-bottom: 2px;
white-space:nowrap;
// word-break: break-all;
}
.mb{
margin-bottom:5px;
display: inline-block;
}
.gray-text{
height: 15px;
......@@ -129,6 +131,12 @@ font-weight: 400;
color: #333333;
line-height: 15px;
}
.gray{
color: #333333;
}
// tooltip样式
......@@ -154,8 +162,8 @@ line-height: 15px;
opacity: 0;
.time{
font-size: 10px;
font-weight: 400;
color: #666666;
font-weight: 400;
color: #666666;
line-height: 15px;
text-align:left;
}
......
......@@ -15,4 +15,6 @@
.icon-rank { width: 27px; height: 26px; background-position: 0px -244px;}
.icon-speed { width: 26px; height: 26px; background-position: -181px -244px;}
.icon-totalCu { width: 40px; height: 44px; background-position: -250px -190px;}
.icon-wechat-customers { width: 40px; height: 44px; background-position: -300px -190px;}
\ No newline at end of file
.icon-wechat-customers { width: 40px; height: 44px; background-position: -300px -190px;}
.icon-icondown { width: 5px; height: 9px; background-position: -287px -244px;}
.icon-iconup { width: 5px; height: 9px; background-position: -302px -244px;}
\ No newline at end of file

173 KB | W: | H:

173 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -62,10 +62,17 @@ export default {
let text
if (reportType == 0) {
text = '本周'
// document.title = '周报'
} else {
let time = outputData.reportTimeStart.split('-')
text = time[1] + '月'
if (time[1] > 9) {
text = time[1] + '月'
} else {
text = time[1].split('')[1] + '月'
}
document.title = '月报'
}
if (accountLevel !== 4 && this.tabIndex == 0) {
//集团客户周月报
if (reportType == 0) {
......
......@@ -57,8 +57,6 @@ export default {
watch: {
tabType: {
handler(n) {
console.log(n)
console.log('监听tabType的index')
let { userInfo } = this
this.$nextTick(() => {
this.initCanvas(userInfo.accountLevel)
......@@ -114,11 +112,12 @@ export default {
this.$nextTick(() => {
let { reportType, tabIndex, tabType } = this
if ((tabIndex == 1 && type != 4 && reportType == 1 && tabType.index == 2) || (tabIndex == 1 && type == 4 && reportType == 1 && tabType.index == 0)) this.initLineChart() //产值
if ((type != 4 && reportType == 1 && tabType.index == 2) || (type == 4 && reportType == 1 && tabType.index == 0)) this.lineCustomerChart() //客户
if ((tabIndex ==0 &&type != 4 && reportType == 1 && tabType.index == 2) || (tabIndex == 0&&type == 4 && reportType == 1 && tabType.index == 0)) this.lineCustomerChart() //客户
if ((type == 4 && tabIndex == 1 && tabType.index == 1) || (type != 4 && tabIndex == 1 && tabType.index == 1) || reportType == 0) this.initPieChart()
})
},
initLineChart(id = 'lineChart') {
console.log('产值折线图')
let { tabIndex } = this
this.lineChart && this.lineChart.clear()
this.lineChart = null
......@@ -187,11 +186,14 @@ export default {
.adjust('stack')
} else {
let { trendList } = this
trendList.forEach(item => {
item.type = '新增产值'
})
this.lineChart.source(trendList, {
dataDateStr: {
type: 'timeCat',
mask: 'MM/DD',
tickCount: 8,
tickCount: 5,
range: [0, 1]
},
orderMoneyTotalSum: {
......@@ -222,7 +224,8 @@ export default {
showTitle: true, // 展示 tooltip 的标题
layout: 'vertical'
})
this.lineChart.line().position('dataDateStr*orderMoneyTotalSum').shape('smooth').color('#3975C6')
this.lineChart.legend(false)
this.lineChart.line().position('dataDateStr*orderMoneyTotalSum').shape('smooth').color('type', ['#3975C6'])
// this.lineChart.point().position('dataDateStr*orderMoneyTotalSum').shape('smooth').style({
// stroke: '#fff',
// lineWidth: 1
......@@ -254,6 +257,7 @@ export default {
this.lineChart.render()
},
initPieChart(id = 'pieChart') {
console.log('饼图')
let { productionValueReportList, orderSource } = this
productionValueReportList.map(e => {
e.count = 'count'
......@@ -306,6 +310,7 @@ export default {
this.chart.render()
},
lineCustomerChart(id = 'lineCustomerChart') {
console.log('客户折线图')
// var tooltipEl = document.createElement('div')
// var dom = document.getElementById('lineCustomerChart')
this.lineChartCustomer && this.lineChartCustomer.clear()
......@@ -320,16 +325,18 @@ export default {
trendChartList.forEach(item => {
trendList.push(
{
{
dayTime: item.dayTime,
type: '新增企微客户数',
value: item.newlyCustomerCount
value: item.entMicroCount
},
{
{
dayTime: item.dayTime,
type: '新增客户数',
value: item.entMicroCount
value: item.newlyCustomerCount
}
)
})
this.lineChartCustomer.source(trendList, {
......@@ -343,7 +350,7 @@ export default {
formatter(e) {
return Math.ceil(e)
}
},
}
})
this.lineChartCustomer.axis('dayTime', {
label: function label(text, index, total) {
......
......@@ -4,7 +4,12 @@
<template v-if="staffDistributionVOList.length > 0">
<div class="store-rank-inline flex" v-for="i in staffDistributionVOList" :key="i.id">
<div class="customers-portrait">
<img :src="i.thumbAvatar" alt="" />
<template v-if="i.staffId != -1">
<img :src="i.thumbAvatar" alt="" />
</template>
<template v-else>
<img src="@/assets/images/general.png" alt="" />
</template>
</div>
<div>
<div class="gray-text staffName">{{ i.staffName }}</div>
......
......@@ -19,12 +19,11 @@ export default {
</script>
<style lang="scss" scoped>
.custom-image {
padding-top: 79px;
background-color: #fff;
}
.custom-image /deep/ .van-empty__image {
width: 88px;
height: 56px;
width: 266px;
height: 133px;
}
</style>
\ No newline at end of file
<template>
<div class="ranking-wrap">
<div class="group-wrap">
<template v-if="tabIndex == 1">
<template v-if="productionReportList && productionReportList.length > 0">
<div class="rank-inline flex" v-for="(i, index) in productionReportList" :key="i.id">
<div :class="['rank-type', index == 0 ? 'rank-type-index' : '']">
<div class="group-inline flex" v-for="(i, index) in productionReportList" :key="i.id">
<div :class="['group-type', index == 0 ? 'group-type-index' : '']">
{{ index + 1 }}
<template v-if="index == 0">
<div class="sprite-icon icon-huangguan"></div>
</template>
</div>
<div :class="['small-text', 'ranking-text', tabType.index == 1 ? 'rate' : '']">{{ i.merchantName }}</div>
<div :class="['small-text', 'grouping-text', tabType.index == 1 ? 'rate' : '']">{{ i.merchantName }}</div>
<div class="small-text gray">¥{{ i.newProductionValue }}</div>
<template v-if="tabType.index == 1 && tabIndex == 0">
<span class="ratio flex">
......@@ -26,18 +26,19 @@
</template>
<template v-else>
<template v-if="qyCustomerRatioMerchantTop && qyCustomerRatioMerchantTop.length">
<div class="rank-inline flex" v-for="(c, index) in qyCustomerRatioMerchantTop" :key="c.id">
<div :class="['rank-type', index == 0 ? 'rank-type-index' : '']">
<div class="group-inline flex" v-for="(c, index) in qyCustomerRatioMerchantTop" :key="c.id">
<div :class="['group-type', index == 0 ? 'group-type-index' : '']">
{{ index + 1 }}
<template v-if="index == 0">
<div class="sprite-icon icon-huangguan"></div>
</template>
</div>
<div :class="['small-text', 'ranking-text', tabType.index == 1 ? 'rate' : '']">{{ c.merchantName }}</div>
<div :class="['small-text', 'grouping-text', tabType.index == 1 ? 'rate' : '']">{{ c.merchantName }}</div>
<div class="small-text gray">{{ tabType.index == 0 ? c.qyCustomerRatio * 100 + '%' : c.newlyQyCount }}</div>
<template v-if="tabType.index == 1">
<span class="ratio flex">
<van-icon name="down" size="10px" :class="c.qyCustomerRatio > 0 ? 'up' : ''" />
<!-- <van-icon name="down" size="10px" :class="c.qyCustomerRatio > 0 ? 'up' : ''" /> -->
<div :class="['sprite-icon', c.qyCustomerRatio > 0 ? 'icon-iconup' : '']"></div>
{{ c.qyCustomerRatio * 100 }}%
</span>
</template>
......@@ -80,14 +81,15 @@ export default {
</script>
<style lang='scss' scoped>
.ranking-wrap {
.group-wrap {
height: auto;
background-color: #fff;
padding: 0 10px;
.rank-inline {
.group-inline {
border-bottom: 1px solid #e8e8f2;
padding: 15px 0 19px 0;
.rank-type {
.group-type {
width: 20px;
height: 20px;
border-radius: 50%;
......@@ -99,21 +101,22 @@ export default {
align-items: center;
justify-content: center;
}
.rank-type-index {
.group-type-index {
background-color: #3975c6;
color: #fff;
position: relative;
.icon-huangguan {
position: absolute;
top: -5px;
right: -19px;
top: -6px;
right: -9px;
}
}
.ranking-text {
.grouping-text {
width: 196px;
word-wrap: break-word;
margin: 0 32px 0 8px;
height: auto;
color: #333333;
}
.rate {
margin: 0 32px 0 8px !important;
......
......@@ -21,12 +21,12 @@
<div class="flex-between">
<span class="add-count">{{ add.value(reportData) }}</span>
<template v-if="add.sequential(reportData)">
<div class="ratio text-message">
{{reportType == 0?'周环比':'月环比' }}
<span>
<template v-if="add.sequential(reportData)!='0%'">
<van-icon name="down" size="10px" :class="add.up(reportData) == 0 ? 'up' : ''" />
</template>
<div class="ratio text-message flex">
{{ reportType == 0 ? '周环比' : '月环比' }}
<span :class="['flex', add.up(reportData) == 0 ? 'bcolor' : 'ycolor']">
<template v-if="add.sequential(reportData) != '0%'">
<div :class="['sprite-icon', add.up(reportData) == 0 ? 'icon-iconup' : 'icon-icondown']"></div>
</template>
{{ add.sequential(reportData) }}
</span>
</div>
......@@ -46,11 +46,11 @@
<span class="text-message mb">{{ add.info.title }}</span>
<div class="gray-text flex">
{{ add.info.value(reportData) }}
<div class="ratio text-message">
<div class="ratio text-message flex">
周环比
<label>
<template v-if="add.info.sequential(reportData)!='0%'">
<van-icon name="down" size="10px" :class="`${add.info.up(reportData) == 0 ? 'up' : ''}`" />
<label :class="['flex', add.info.up(reportData) == 0 ? 'applybcolor' : 'applyycolor']">
<template v-if="add.info.sequential(reportData) != '0%'">
<div :class="['sprite-icon', add.info.up(reportData) == 0 ? 'icon-iconup' : 'icon-icondown']"></div>
</template>
{{ add.info.sequential(reportData) }}
</label>
......@@ -80,7 +80,7 @@ export default {
...mapState({
reportData: state => state.report.reportData,
statisticsObj: state => state.report.statisticsObj,
reportType:state=>state.report.reportType
reportType: state => state.report.reportType
})
},
mounted() {},
......@@ -136,27 +136,30 @@ export default {
span {
padding: 0 1px;
width: auto;
background: #d0def1;
border-radius: 3px;
height: 15px;
font-size: 11px;
font-weight: 500;
color: #3975c6;
line-height: 15px;
margin-left: 5px;
}
& .bcolor {
background: #d0def1;
color: #3975c6;
}
& .ycolor {
background: #f5ddb5;
color: #df8500;
}
label {
font-weight: 500;
color: #3975c6;
line-height: 15px;
}
& .up {
transform: rotate(180deg);
line-height: 15px;
}
}
.text-message {
display: inline-block;
// & .up {
// transform: rotate(180deg);
// line-height: 15px;
// }
}
.customer-info {
width: 65%;
......@@ -166,16 +169,26 @@ export default {
}
.ratio {
margin-left: 2px;
& .applybcolor {
color: #3975c6;
}
& .applyycolor {
color: #df8500;
}
}
}
}
}
}
.statistics /deep/ .van-swipe__track {
margin-right: 10px;
height:auto;
.van-swipe-item {
width: 167px !important;
.statistics /deep/ .van-swipe {
margin-right: -15px;
.van-swipe__track {
margin-right: 10px;
height: auto;
.van-swipe-item {
width: 167px !important;
}
}
}
</style>
\ No newline at end of file
......@@ -9,7 +9,13 @@
<div class="sprite-icon icon-crown"></div>
</template>
<div class="customers-portrait">
<img :src="i.thumbAvatar" alt="" />
<template v-if="i.staffId != -1">
<img :src="i.thumbAvatar" alt="" />
</template>
<template v-else>
<img src="@/assets/images/general.png" alt="" />
</template>
<template v-if="index == 0">
<div class="sprite-icon icon-huangguan"></div>
</template>
......@@ -35,8 +41,6 @@
</template>
</div>
</template>
</div>
</template>
<script type='text/ecmascript-6'>
import F2 from '@antv/f2/lib/index-all'
......@@ -204,7 +208,7 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width:100%;
width: 100%;
text-align: center;
span {
font-size: 14px;
......@@ -251,9 +255,9 @@ export default {
}
.store-ranking-wrap /deep/ .van-swipe__track {
margin-right: 10px;
height:auto;
.van-swipe-item{
width:140px!important;
height: auto;
.van-swipe-item {
width: 140px !important;
}
}
</style>
\ No newline at end of file
......@@ -143,7 +143,8 @@ export default {
}
this.SET_TABTYPE_INDEX({ index: 0 })
this.showDateSelect = false
}
},
}
}
</script>
......@@ -160,6 +161,7 @@ export default {
z-index: 9;
margin-top: 15px;
padding: 0 10px;
line-height:40px;
.report-name {
width: 50%;
height: 15px;
......
......@@ -2,7 +2,8 @@ const pages = {
report: [{
name: 'index',
meta: {
backgroundColor: '#F7F7F7'
backgroundColor: '#F7F7F7',
title:'统计报表'
}
}],
}
......
......@@ -20,62 +20,51 @@ export default {
staffDistributionVOList: [],//新增客户分布
qyTotalCountMerchantTop: [], //企微客户数排行
qyCustomerRatioMerchantTop: [],//企微客户占比
trendChartList: [{
dayTime: "2021-12-01",//日期 ,
entMicroCount: 2,//新增企微客户数 ,
notAddEntMicroCount: 4,//未加企微客户数 ,
newlyCustomerCount: 3// 新增客户数
},
{
dayTime: "2021-12-03",//日期 ,
entMicroCount: 8,//新增企微客户数 ,
notAddEntMicroCount: 4,//未加企微客户数 ,
newlyCustomerCount: 7// 新增客户数
},
{
dayTime: "2021-12-06",//日期 ,
entMicroCount: 9,//新增企微客户数 ,
notAddEntMicroCount: 9,//未加企微客户数 ,
newlyCustomerCount: 5// 新增客户数
}],//新增客户趋势图
trendChartList: [],//新增客户趋势图
userInfo: JSON.parse(window.localStorage.getItem('dj_scrm_userInfo')) ? JSON.parse(window.localStorage.getItem('dj_scrm_userInfo')) : ''
},
mutations: {
["SET_REPORT_TYPE"](state, payload) {
state.reportType = payload.reportType
},
//获取报表数据
//获取产值报表数据
["SET_REPORT"](state, payload) {
//今年累计产值
if (payload.reportData.yearProductionValue) {
payload.reportData.yearProductionValue = (payload.reportData.yearProductionValue / 100).toFixed(0)
payload.reportData.yearProductionValue = (payload.reportData.yearProductionValue / 100).toFixed(2)
} else {
payload.reportData.yearProductionValue = 0
}
//新增产值
if (payload.reportData.newProductionValue) {
payload.reportData.newProductionValue = (payload.reportData.newProductionValue / 100).toFixed(0)
payload.reportData.newProductionValue = (payload.reportData.newProductionValue / 100).toFixed(2)
} else {
payload.reportData.newProductionValue = 0
}
//新增产值环比
if (payload.reportData.newProductionValueSequential && payload.reportData.newProductionValueSequential.indexOf('-') != -1) {
payload.reportData.newProductup = 1
} else {
payload.reportData.newProductup = 0
}
//新增权益提单数环比
if (payload.reportData.newEquityBillLadingSequential && payload.reportData.newEquityBillLadingSequential.indexOf('-') != -1) {
payload.reportData.newEquityup = 1
} else {
payload.reportData.newEquityup = 0
}
//今年累计权益提单数
payload.reportData.yearEquityBillLadingNum = payload.reportData.yearEquityBillLadingNum ? payload.reportData.yearEquityBillLadingNum : 0
state.reportData = payload.reportData;
state.productionReportList = payload.reportData.merchantProductionValueReportList ? payload.reportData.merchantProductionValueReportList : [];
payload.reportData.productionValueReportList.map(e => {
payload.reportData.merchantProductionValueReportList.map(e => {
e.newProductionValue = e.newProductionValue / 100
})
payload.reportData.productionValueReportList.map(e => {
e.newProductionValue = e.newProductionValue / 100
})//新增产值分布饼图数据处理
state.productionReportList = payload.reportData.merchantProductionValueReportList;
state.productionValueReportList = payload.reportData.productionValueReportList ? payload.reportData.productionValueReportList : [];
state.trendList = payload.reportData.trendList ? payload.reportData.trendList : []
state.trendList = payload.reportData.trendList ? payload.reportData.trendList : []//新增产值趋势图
state.trendChartList = [] //客户的趋势图
......@@ -98,52 +87,50 @@ export default {
['SET_UESR_INFI'](state, payload) {
state.userInfo.accountLevel = payload.accountLevel
},
//获取客户报表数据
['SET_CUSTOMER_REPORT'](state, payload) {
//新增企微客户数环比
if (payload.reportData.newlyQyDegree && payload.reportData.newlyQyDegree > 0) {
payload.reportData.newlyQyDegreeup = 0
} else {
// payload.reportData.newlyQyDegree = payload.reportData.newlyQyDegree * 100 + '%'
payload.reportData.newlyQyDegreeup = 1
}
//新增客户数环比
if (payload.reportData.newlyTotalDegree && payload.reportData.newlyTotalDegree > 0) {
payload.reportData.newlyTotalDegreeup = 0
} else {
// payload.reportData.newlyTotalDegree = payload.reportData.newlyTotalDegree * 100 + '%'
payload.reportData.newlyTotalDegreeup = 1
}
//流失客户数环比
if (payload.reportData.flowQyDegree && payload.reportData.flowQyDegree > 0) {
payload.reportData.flowQyDegreeup = 0
} else {
// payload.reportData.flowQyDegree = payload.reportData.flowQyDegree * 100 + '%'
payload.reportData.flowQyDegreeup = 1
}
//发起申请客户数环比
if (payload.reportData.applyDegree && payload.reportData.applyDegree > 0) {
payload.reportData.applyDegreeup = 0
} else {
// payload.reportData.applyDegree = payload.reportData.applyDegree * 100 + '%'
payload.reportData.applyDegreeup = 1
}
payload.reportData.newlyQyDegree = (payload.reportData.newlyQyDegree * 100).toFixed(0) + '%'
payload.reportData.newlyTotalDegree = (payload.reportData.newlyTotalDegree * 100).toFixed(0) + '%'
payload.reportData.flowQyDegree = (payload.reportData.flowQyDegree * 100).toFixed(0) + '%'
payload.reportData.applyDegree = (payload.reportData.applyDegree * 100).toFixed(0) + '%'
//数据被null时,不处理,直接判断不显示
payload.reportData.newlyQyDegree = payload.reportData.newlyQyDegree != null && (payload.reportData.newlyQyDegree * 100).toFixed(0) + '%'
payload.reportData.newlyTotalDegree = payload.reportData.newlyTotalDegree != null && (payload.reportData.newlyTotalDegree * 100).toFixed(0) + '%'
payload.reportData.flowQyDegree = payload.reportData.flowQyDegree != null && (payload.reportData.flowQyDegree * 100).toFixed(0) + '%'
payload.reportData.applyDegree = payload.reportData.applyDegree != null && (payload.reportData.applyDegree * 100).toFixed(0) + '%'
state.reportData = payload.reportData
state.qyCustomerRatioMerchantTop = payload.reportData.qyCustomerRatioMerchantTop //企微客户占比
state.staffDistributionVOList = payload.reportData.staffDistributionVOList ? payload.reportData.staffDistributionVOList : []
state.staffDistributionVOList = payload.reportData.staffDistributionVOList ? payload.reportData.staffDistributionVOList : [] //客户分布
state.trendChartList = payload.reportData.trendChartList ? payload.reportData.trendChartList : []
},
["INIT_DATA"](state, payload) {
state.statisticsObj = {}
let {
userInfo: { accountLevel },
tabIndex,
reportType
tabIndex
} = state
if (accountLevel == 4 && tabIndex == 1) {
//门店产值
......@@ -410,7 +397,6 @@ export default {
}
} else {
}
console.log(state.statisticsObj)
},
},
actions: {
......@@ -455,24 +441,6 @@ export default {
}
})
},
//修改收货地址
modAddress(conText, payload) {
modAddressData({ uid: conText.rootState.user.uid, ...payload }).then(res => {
if (payload.success) {
payload.success(res);
}
})
},
//获取默认收货地址
getDefaultAddress(conText, payload) {
getDefaultAddressData(conText.rootState.user.uid).then(res => {
if (res.code === 200) {
if (payload.success) {
payload.success(res);
}
}
})
}
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!