Commit 276a24b0 by 王志慧

cmmmit

1 parent 7145b469
...@@ -117,6 +117,7 @@ line-height: 25px; ...@@ -117,6 +117,7 @@ line-height: 25px;
color: #666666; color: #666666;
line-height: 15px; line-height: 15px;
margin-bottom: 2px; margin-bottom: 2px;
white-space:nowrap;
} }
.mb{ .mb{
margin-bottom:5px; margin-bottom:5px;
...@@ -176,3 +177,6 @@ color:#333333; ...@@ -176,3 +177,6 @@ color:#333333;
// .f2-tooltip span:nth-child(2) { // .f2-tooltip span:nth-child(2) {
// font-size: 13px !important; // font-size: 13px !important;
// } // }
// .van-swipe{
// overflow: visible!important;
// }
\ No newline at end of file \ No newline at end of file
.sprite-icon { background-image: url(../images/sprite.png);background-size: 345px 270px;} .sprite-icon { background-image: url(../images/sprite.png);background-size: 345px 270px;}
.icon-bg { width: 345px; height: 180px; background-position: 0px 0px;} .icon-bg { width: 345px; height: 180px; background-position: 0px 0px;}
.icon-client { width: 26px; height: 26px; background-position: -37px -244px;} .icon-client { width: 26px; height: 26px; background-position: -37px -244px;}
.icon-crown { width: 12px; height: 9px; background-position: -229px -244px;} .icon-crown { width: 12px; height: 9px; background-position: -265px -244px;}
.icon-customers { width: 40px; height: 44px; background-position: 0px -190px;} .icon-customers { width: 40px; height: 44px; background-position: 0px -190px;}
.icon-equity { width: 40px; height: 44px; background-position: -50px -190px;} .icon-equity { width: 40px; height: 44px; background-position: -50px -190px;}
.icon-huangguan { width: 14px; height: 15px; background-position: -181px -244px;} .icon-helmet { width: 26px; height: 26px; background-position: -73px -244px;}
.icon-huangguan { width: 14px; height: 15px; background-position: -217px -244px;}
.icon-liushi { width: 40px; height: 44px; background-position: -100px -190px;} .icon-liushi { width: 40px; height: 44px; background-position: -100px -190px;}
.icon-message { width: 14px; height: 13px; background-position: -205px -244px;} .icon-message { width: 14px; height: 13px; background-position: -241px -244px;}
.icon-production { width: 40px; height: 44px; background-position: -150px -190px;} .icon-production { width: 40px; height: 44px; background-position: -150px -190px;}
.icon-proportion { width: 26px; height: 26px; background-position: -73px -244px;} .icon-proportion { width: 26px; height: 26px; background-position: -109px -244px;}
.icon-Qy { width: 40px; height: 44px; background-position: -200px -190px;} .icon-Qy { width: 40px; height: 44px; background-position: -200px -190px;}
.icon-qycustomer { width: 26px; height: 26px; background-position: -109px -244px;} .icon-qycustomer { width: 26px; height: 26px; background-position: -145px -244px;}
.icon-rank { width: 27px; height: 26px; background-position: 0px -244px;} .icon-rank { width: 27px; height: 26px; background-position: 0px -244px;}
.icon-speed { width: 26px; height: 26px; background-position: -145px -244px;} .icon-speed { width: 26px; height: 26px; background-position: -181px -244px;}
.icon-totalCu { width: 40px; height: 44px; background-position: -250px -190px;} .icon-totalCu { width: 40px; height: 44px; background-position: -250px -190px;}
.icon-wechat-customers { width: 40px; height: 44px; background-position: -300px -190px;} .icon-wechat-customers { width: 40px; height: 44px; background-position: -300px -190px;}
\ No newline at end of file \ No newline at end of file

171 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
...@@ -254,13 +254,10 @@ export default { ...@@ -254,13 +254,10 @@ export default {
this.lineChart.render() this.lineChart.render()
}, },
initPieChart(id = 'pieChart') { initPieChart(id = 'pieChart') {
console.log(4444444444)
console.log(this.productionValueReportList)
console.log(this.trendChartList)
console.log(this.trendList)
let { productionValueReportList, orderSource } = this let { productionValueReportList, orderSource } = this
productionValueReportList.map(e => (e.count = 'count')) productionValueReportList.map(e => {
e.count = 'count';
})
this.chart && this.chart.clear() this.chart && this.chart.clear()
this.chart = null this.chart = null
this.chart = new F2.Chart({ this.chart = new F2.Chart({
......
<template> <template>
<div class="ranking-wrap"> <div class="ranking-wrap">
<template v-if="tabIndex == 1"> <template v-if="tabIndex == 1">
<template v-if="productionReportList&&productionReportList.length > 0"> <template v-if="productionReportList && productionReportList.length > 0">
<div class="rank-inline flex" v-for="(i, index) in productionReportList" :key="i.id"> <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="['rank-type', index == 0 ? 'rank-type-index' : '']">
{{ index + 1 }} {{ index + 1 }}
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
</div> </div>
<div :class="['small-text', 'ranking-text', tabType.index == 1 ? 'rate' : '']">{{ i.merchantName }}</div> <div :class="['small-text', 'ranking-text', tabType.index == 1 ? 'rate' : '']">{{ i.merchantName }}</div>
<div class="small-text gray">¥{{ i.newProductionValue }}</div> <div class="small-text gray">¥{{ i.newProductionValue }}</div>
<tempalte v-if="tabType.index == 1 && tabIndex == 0"> <template v-if="tabType.index == 1 && tabIndex == 0">
<span class="ratio flex"> <span class="ratio flex">
<van-icon name="down" size="10px" :class="`${index == 1 ? 'up' : ''}`" /> <van-icon name="down" size="10px" :class="`${index == 1 ? 'up' : ''}`" />
10% 10%
</span> </span>
</tempalte> </template>
</div> </div>
</template> </template>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<template v-if="qyCustomerRatioMerchantTop&&qyCustomerRatioMerchantTop.length"> <template v-if="qyCustomerRatioMerchantTop && qyCustomerRatioMerchantTop.length">
<div class="rank-inline flex" v-for="(c, index) in qyCustomerRatioMerchantTop" :key="c.id"> <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="['rank-type', index == 0 ? 'rank-type-index' : '']">
{{ index + 1 }} {{ index + 1 }}
...@@ -35,12 +35,12 @@ ...@@ -35,12 +35,12 @@
</div> </div>
<div :class="['small-text', 'ranking-text', tabType.index == 1 ? 'rate' : '']">{{ c.merchantName }}</div> <div :class="['small-text', 'ranking-text', tabType.index == 1 ? 'rate' : '']">{{ c.merchantName }}</div>
<div class="small-text gray">{{ tabType.index == 0 ? c.qyCustomerRatio * 100 + '%' : c.newlyQyCount }}</div> <div class="small-text gray">{{ tabType.index == 0 ? c.qyCustomerRatio * 100 + '%' : c.newlyQyCount }}</div>
<tempalte v-if="tabType.index == 1"> <template v-if="tabType.index == 1">
<span class="ratio flex"> <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' : ''" />
{{ c.qyCustomerRatio * 100 }}% {{ c.qyCustomerRatio * 100 }}%
</span> </span>
</tempalte> </template>
</div> </div>
</template> </template>
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
<div :class="['sprite-icon', ' icon-' + item.icon]"></div> <div :class="['sprite-icon', ' icon-' + item.icon]"></div>
<div class="small-text"> <div class="small-text">
{{ item.text }} {{ item.text }}
<template v-if="tabIndex== 1"> <template v-if="item.info">
<span>{{ item.info }}</span> <span>{{ item.info }}</span>
</template>
<template v-else>
<span>{{ item.value(reportData) }}</span>
<!-- <span>{{ item.value(reportData)*100 }}%</span> -->
</template> </template>
<template v-else>
<span>{{ item.value(reportData) }}</span>
<!-- <span>{{ item.value(reportData)*100 }}%</span> -->
</template>
</div> </div>
</div> </div>
</template> </template>
...@@ -38,19 +38,22 @@ export default { ...@@ -38,19 +38,22 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
reportData: state => state.report.reportData, reportData: state => state.report.reportData,
tabIndex :state => state.report.tabIndex, tabIndex: state => state.report.tabIndex,
userInfo:state => state.report.userInfo, userInfo: state => state.report.userInfo
}) })
}, },
methods: { methods: {
initFastData() { initFastData() {
let {userInfo:{accountLevel}} = this let {
userInfo: { accountLevel }
} = this
this.fastData = [] this.fastData = []
let text='-'
if (this.tabIndex == 1) { if (this.tabIndex == 1) {
//增长速度最快业务1商城订单2直播订单3活动订单4会员套餐5精品升级6权益提单 //增长速度最快业务1商城订单2直播订单3活动订单4会员套餐5精品升级6权益提单
let { fastOrderSource } = this.reportData let { fastOrderSource } = this.reportData
if (fastOrderSource) { if (fastOrderSource) {
let text = text =
fastOrderSource == 1 fastOrderSource == 1
? '商城订单' ? '商城订单'
: fastOrderSource == 2 : fastOrderSource == 2
...@@ -62,34 +65,42 @@ export default { ...@@ -62,34 +65,42 @@ export default {
: fastOrderSource == 5 : fastOrderSource == 5
? '精品升级' ? '精品升级'
: '权益提单' : '权益提单'
this.fastData.push({
text: '增长速度最快业务:',
info: text,
icon: 'rank'
})
} }
console.log(this.fastData) this.fastData.push(
{
text: '增长速度最快业务:',
info: text,
icon: 'rank'
},
{
text: '产值排行榜冠军店:',
value: obj => {
return obj.mostProductionValueMerchantName?obj.mostProductionValueMerchantName:'-'
},
icon: 'helmet'
}
)
} else { } else {
if (accountLevel !==4) { if (accountLevel !== 4) {
this.fastData.push( this.fastData.push(
{ {
text: '企微客户占比最高的门店:', text: '企微客户占比最高的门店:',
value: obj => { value: obj => {
return obj.newlyQyFastestGrowthMerchant return obj.newlyQyFastestGrowthMerchant?obj.newlyQyFastestGrowthMerchant:'-'
}, },
icon: 'proportion' icon: 'proportion'
}, },
{ {
text: '企微增长速度最快的门店:', text: '企微增长速度最快的门店:',
value: obj => { value: obj => {
return obj.newlyQyFastestGrowthMerchant return obj.newlyQyFastestGrowthMerchant?obj.newlyQyFastestGrowthMerchant:'-'
}, },
icon: 'speed' icon: 'speed'
}, },
{ {
text: '企微客户数最多的门店:', text: '企微客户数最多的门店:',
value: obj => { value: obj => {
return obj.newlyQyMostMerchant return obj.newlyQyMostMerchant?obj.newlyQyMostMerchant:'-'
}, },
icon: 'client' icon: 'client'
} }
...@@ -98,7 +109,7 @@ export default { ...@@ -98,7 +109,7 @@ export default {
this.fastData.push({ this.fastData.push({
text: '企业微信客户占比:', text: '企业微信客户占比:',
value: obj => { value: obj => {
return obj.qyCustomerRatio return obj.qyCustomerRatio?((obj.qyCustomerRatio)*100).toFixed(0)+'%':'-'
}, },
icon: 'qycustomer' icon: 'qycustomer'
}) })
......
...@@ -3,57 +3,66 @@ ...@@ -3,57 +3,66 @@
<div class="headline">{{ statisticsObj.title }}</div> <div class="headline">{{ statisticsObj.title }}</div>
<div class="flex"> <div class="flex">
<template v-for="value in statisticsObj.cumulative"> <template v-for="value in statisticsObj.cumulative">
<div class="text-half" :key="value.id"> <div class="text-half" :key="value.id + 'cumulative'">
<div class="small-text">{{ value.title }}</div> <div class="small-text">{{ value.title }}</div>
<div class="num-text"><span v-if="value.type == 0">¥</span>{{ value.value(reportData) }}</div> <div class="num-text">
<span v-if="value.type == 0">¥</span>
{{ value.value(reportData) }}
</div>
</div> </div>
</template> </template>
</div> </div>
<div class="flex-between"> <div class="flex-between">
<van-swipe :loop="false" :width="167" :show-indicators="false"> <template v-if="statisticsObj.new.length > 0">
<template v-for="add in statisticsObj.new"> <van-swipe :loop="false" :show-indicators="false" :width="200">
<van-swipe-item class="container" :key="add.id"> <template v-for="add in statisticsObj.new">
<div class="text-message">{{ add.title }}</div> <van-swipe-item class="container" :key="add.id + 'new'">
<div class="flex-between"> <div class="text-message">{{ add.title }}</div>
<span class="add-count">{{ add.value(reportData) }}</span> <div class="flex-between">
<template v-if="add.sequential(reportData)"> <span class="add-count">{{ add.value(reportData) }}</span>
<div class="ratio text-message"> <template v-if="add.sequential(reportData)">
周环比 <div class="ratio text-message">
<span> 周环比
<van-icon name="down" size="10px" :class="add.up(reportData) == 1 ? 'up' : ''" /> <span>
{{ add.sequential(reportData) }} <template v-if="add.sequential(reportData)!='0%'">
</span> <van-icon name="down" size="10px" :class="add.up(reportData) == 0 ? 'up' : ''" />
</div> </template>
</template> {{ add.sequential(reportData) }}
</div> </span>
<div class="flex"> </div>
<div :class="['sprite-icon', 'icon-' + add.icon]"></div> </template>
<template v-if="add.list"> </div>
<div class="customer-info"> <div class="flex">
<span class="text-message mb">{{ add.list.customerTitle }}:{{ add.list.customerValue(reportData) }}</span> <div :class="['sprite-icon', 'icon-' + add.icon]"></div>
<span class="text-message">{{ add.list.qyTitle }}:{{ add.list.qyValue(reportData) }}</span> <template v-if="add.list">
</div> <div class="customer-info">
</template> <span class="text-message mb">{{ add.list.customerTitle }}:{{ add.list.customerValue(reportData) }}</span>
<span class="text-message">{{ add.list.qyTitle }}:{{ add.list.qyValue(reportData) }}</span>
</div>
</template>
<template v-if="add.info"> <template v-if="add.info">
<div class="customer-info"> <div class="customer-info">
<span class="text-message mb">发起申请客户数</span> <span class="text-message mb">{{ add.info.title }}</span>
<div class="gray-text flex"> <div class="gray-text flex">
{{ add.info.value(reportData) }} {{ add.info.value(reportData) }}
<div class="ratio text-message"> <div class="ratio text-message">
周环比 周环比
<label> <label>
<van-icon name="down" size="10px" :class="`${index == 0 ? 'up' : ''}`" /> <template v-if="add.info.sequential(reportData)!='0%'">
{{ add.info.sequential(reportData) }} <van-icon name="down" size="10px" :class="`${add.info.up(reportData) == 0 ? 'up' : ''}`" />
</label> </template>
{{ add.info.sequential(reportData) }}
</label>
</div>
</div> </div>
</div> </div>
</div> </template>
</template> </div>
</div> </van-swipe-item>
</van-swipe-item> </template>
</template> </van-swipe>
</van-swipe> </template>
</div> </div>
</div> </div>
</template> </template>
...@@ -105,7 +114,7 @@ export default { ...@@ -105,7 +114,7 @@ export default {
} }
.container { .container {
width: 167px; width: 167px !important;
height: 106px; height: 106px;
background: #ffffff; background: #ffffff;
box-shadow: 0px 3px 8px 0px rgba(170, 180, 209, 0.2); box-shadow: 0px 3px 8px 0px rgba(170, 180, 209, 0.2);
...@@ -126,7 +135,6 @@ export default { ...@@ -126,7 +135,6 @@ export default {
span { span {
padding: 0 1px; padding: 0 1px;
width: auto; width: auto;
height: 14px;
background: #d0def1; background: #d0def1;
border-radius: 3px; border-radius: 3px;
height: 15px; height: 15px;
...@@ -143,6 +151,7 @@ export default { ...@@ -143,6 +151,7 @@ export default {
} }
& .up { & .up {
transform: rotate(180deg); transform: rotate(180deg);
line-height: 15px;
} }
} }
.text-message { .text-message {
...@@ -163,5 +172,8 @@ export default { ...@@ -163,5 +172,8 @@ export default {
} }
.statistics /deep/ .van-swipe__track { .statistics /deep/ .van-swipe__track {
margin-right: 10px; margin-right: 10px;
.van-swipe-item {
width: 167px !important;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="store-ranking-wrap"> <div class="store-ranking-wrap">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
<div class="weekTitle headline">新增客户分布</div> <div class="weekTitle headline">新增客户分布</div>
<van-swipe :loop="false" :width="140" :show-indicators="false"> <van-swipe :loop="false" :width="170" :show-indicators="false">
<template v-for="(i, index) in staffDistributionVOList"> <template v-for="(i, index) in staffDistributionVOList">
<van-swipe-item :key="i.id"> <van-swipe-item :key="i.id">
<template v-if="index == 0"> <template v-if="index == 0">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<template v-if="tabIndex == 1"> <template v-if="tabIndex == 1">
<div class="weekTitle headline">新增产值分布</div> <div class="weekTitle headline">新增产值分布</div>
<canvas class="canvas" id="pieChart" v-if="productionValueReportList.length>0"></canvas> <canvas class="canvas" id="pieChart" v-if="productionValueReportList.length > 0"></canvas>
</template> </template>
<template v-if="(tabIndex == 0 && staffDistributionVOList.length == 0) || (tabIndex == 1 && productionValueReportList.length == 0)"> <template v-if="(tabIndex == 0 && staffDistributionVOList.length == 0) || (tabIndex == 1 && productionValueReportList.length == 0)">
<Empty></Empty> <Empty></Empty>
...@@ -201,6 +201,11 @@ export default { ...@@ -201,6 +201,11 @@ export default {
.gray-text { .gray-text {
margin: 10px 0 0 0; margin: 10px 0 0 0;
color: #999999; color: #999999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width:100%;
text-align: center;
span { span {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
...@@ -244,4 +249,10 @@ export default { ...@@ -244,4 +249,10 @@ export default {
height: 195px; height: 195px;
background-color: #ffffff; background-color: #ffffff;
} }
.store-ranking-wrap /deep/ .van-swipe__track {
margin-right: 10px;
.van-swipe-item{
width:140px!important;
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</template> </template>
<template v-if="outputData.reportTimeStart && reportType == 1"> <template v-if="outputData.reportTimeStart && reportType == 1">
<div class="time small-text" @click="showDateSelect = true"> <div class="time small-text" @click="showDateSelect = true">
{{ outputData.reportTimeStart.slice(0,outputData.reportTimeStart.length-3) }} {{ outputData.reportTimeStart.slice(0, outputData.reportTimeStart.length - 3) }}
<van-icon name="arrow-down" /> <van-icon name="arrow-down" />
</div> </div>
</template> </template>
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
...mapMutations({ ...mapMutations({
SET_START_TIME: 'report/SET_START_TIME', SET_START_TIME: 'report/SET_START_TIME',
INIT_DATA: 'report/INIT_DATA', INIT_DATA: 'report/INIT_DATA',
SET_TABTYPE_INDEX:'report/SET_TABTYPE_INDEX' SET_TABTYPE_INDEX: 'report/SET_TABTYPE_INDEX'
}), }),
initDate() { initDate() {
let { reportType } = this let { reportType } = this
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
} }
this.dateColumns = dateColumns this.dateColumns = dateColumns
this.SET_START_TIME({ this.SET_START_TIME({
reportTimeStart: this.dateColumns[this.dateColumns.length - 1]+'-01' reportTimeStart: this.dateColumns[this.dateColumns.length - 1] + '-01'
}) })
} }
}, },
...@@ -112,7 +112,6 @@ export default { ...@@ -112,7 +112,6 @@ export default {
if (accountLevel == 4) { if (accountLevel == 4) {
//门店 //门店
this.getCumerchantReport({ this.getCumerchantReport({
merchantIdList: [this.userInfo.merchantId],
reportType: this.reportType, reportType: this.reportType,
startDate: time, startDate: time,
success: res => { success: res => {
...@@ -124,7 +123,6 @@ export default { ...@@ -124,7 +123,6 @@ export default {
//集团 //集团
this.getCugroupReport({ this.getCugroupReport({
reportType: this.reportType, reportType: this.reportType,
merchantIdList: [this.userInfo.merchantId],
startDate: time, startDate: time,
success: res => { success: res => {
this.hideLoading() this.hideLoading()
......
...@@ -112,7 +112,7 @@ const actions = { ...@@ -112,7 +112,7 @@ const actions = {
}) })
} else { } else {
util.showLoading() util.showLoading()
let appid = getParams('corpId') //从链接获取 let { appid } = getParams('corpId') //从链接获取
let dj_scrm = util.getLocalStorage('dj_scrm_corpId') let dj_scrm = util.getLocalStorage('dj_scrm_corpId')
if (!appid) appid = (dj_scrm && dj_scrm.corpId) || 'ww7ee69c648ae1b7e6' if (!appid) appid = (dj_scrm && dj_scrm.corpId) || 'ww7ee69c648ae1b7e6'
util.setLocalStorage('dj_scrm_corpId', { corpId: appid }) util.setLocalStorage('dj_scrm_corpId', { corpId: appid })
...@@ -128,8 +128,9 @@ const actions = { ...@@ -128,8 +128,9 @@ const actions = {
} }
}, },
navigation({ dispatch }) { navigation({ dispatch }) {
let { sessionId, corpId } = getParams() let { sessionId, corpId, reportType } = getParams()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId') const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
util.setLocalStorage('reportType', { reportType })
if (!corpId) corpId = storage_corpId && storage_corpId.corpId if (!corpId) corpId = storage_corpId && storage_corpId.corpId
if (corpId && storage_corpId) { if (corpId && storage_corpId) {
if (corpId != storage_corpId.corpId) { if (corpId != storage_corpId.corpId) {
...@@ -151,7 +152,7 @@ const actions = { ...@@ -151,7 +152,7 @@ const actions = {
} }
state.showWindow = true state.showWindow = true
}, },
registerHttp({}, sessionId = '') { registerHttp({ }, sessionId = '') {
window.$HTTP = new Http({ ...window.$fetchConfig, alert: Notify, headers: { token: sessionId } }) window.$HTTP = new Http({ ...window.$fetchConfig, alert: Notify, headers: { token: sessionId } })
} }
} }
......
...@@ -17,17 +17,7 @@ export default { ...@@ -17,17 +17,7 @@ export default {
reportTimeEnd: '' reportTimeEnd: ''
}, },
statisticsObj: '', statisticsObj: '',
staffDistributionVOList: [ staffDistributionVOList: [],//新增客户分布
{
"id": 0,
"weekId": 0,
"staffId": 0,
"staffName": "张三",
"newlyQyCount": 10,
"newlyQyRatio": 20,
"top": 0
}
],//新增客户分布
qyTotalCountMerchantTop: [], //企微客户数排行 qyTotalCountMerchantTop: [], //企微客户数排行
qyCustomerRatioMerchantTop: [],//企微客户占比 qyCustomerRatioMerchantTop: [],//企微客户占比
trendChartList: [{ trendChartList: [{
...@@ -56,7 +46,7 @@ export default { ...@@ -56,7 +46,7 @@ export default {
}, },
//获取报表数据 //获取报表数据
["SET_REPORT"](state, payload) { ["SET_REPORT"](state, payload) {
if (payload.reportData.yearProductionValue) { if (payload.reportData.yearProductionValue) {
payload.reportData.yearProductionValue = (payload.reportData.yearProductionValue / 100).toFixed(0) payload.reportData.yearProductionValue = (payload.reportData.yearProductionValue / 100).toFixed(0)
} else { } else {
...@@ -67,22 +57,30 @@ export default { ...@@ -67,22 +57,30 @@ export default {
} else { } else {
payload.reportData.newProductionValue = 0 payload.reportData.newProductionValue = 0
} }
if (payload.reportData.newProductionValueSequential && payload.reportData.newProductionValueSequential.indexOf('-')) { if (payload.reportData.newProductionValueSequential && payload.reportData.newProductionValueSequential.indexOf('-') != -1) {
payload.reportData.newProductup = 1 payload.reportData.newProductup = 1
} else { } else {
payload.reportData.newProductup = 0 payload.reportData.newProductup = 0
} }
if (payload.reportData.newEquityBillLadingSequential && payload.reportData.newEquityBillLadingSequential.indexOf('-')) { if (payload.reportData.newEquityBillLadingSequential && payload.reportData.newEquityBillLadingSequential.indexOf('-') != -1) {
payload.reportData.newEquityup = 1 payload.reportData.newEquityup = 1
} else { } else {
payload.reportData.newEquityup = 0 payload.reportData.newEquityup = 0
} }
payload.reportData.yearEquityBillLadingNum = payload.reportData.yearEquityBillLadingNum ? payload.reportData.yearEquityBillLadingNum : 0 payload.reportData.yearEquityBillLadingNum = payload.reportData.yearEquityBillLadingNum ? payload.reportData.yearEquityBillLadingNum : 0
state.reportData = payload.reportData; state.reportData = payload.reportData;
console.log(payload.reportData)
console.log(33333333333)
state.productionReportList = payload.reportData.merchantProductionValueReportList ? payload.reportData.merchantProductionValueReportList : []; state.productionReportList = payload.reportData.merchantProductionValueReportList ? payload.reportData.merchantProductionValueReportList : [];
payload.reportData.productionValueReportList.map(e => {
e.newProductionValue = e.newProductionValue / 100
})
state.productionValueReportList = payload.reportData.productionValueReportList ? payload.reportData.productionValueReportList : []; 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 = [] //客户的趋势图 state.trendChartList = [] //客户的趋势图
}, },
//设置底部tabIndex //设置底部tabIndex
["SET_TAB_INDEX"](state, payload) { ["SET_TAB_INDEX"](state, payload) {
...@@ -103,9 +101,10 @@ export default { ...@@ -103,9 +101,10 @@ export default {
state.userInfo.accountLevel = payload.accountLevel state.userInfo.accountLevel = payload.accountLevel
}, },
['SET_CUSTOMER_REPORT'](state, payload) { ['SET_CUSTOMER_REPORT'](state, payload) {
if (payload.reportData.newlyQyDegree && payload.reportData.newlyQyDegree > 0) { if (payload.reportData.newlyQyDegree && payload.reportData.newlyQyDegree > 0) {
payload.reportData.newlyQyDegree = payload.reportData.newlyQyDegree * 100 + '%' payload.reportData.newlyQyDegree = payload.reportData.newlyQyDegree * 100 + '%'
payload.reportData.newlyQyDegreetup = 0 payload.reportData.newlyQyDegreeup = 0
} else { } else {
payload.reportData.newlyQyDegree = payload.reportData.newlyQyDegree * 100 + '%' payload.reportData.newlyQyDegree = payload.reportData.newlyQyDegree * 100 + '%'
payload.reportData.newlyQyDegreeup = 1 payload.reportData.newlyQyDegreeup = 1
...@@ -117,6 +116,7 @@ export default { ...@@ -117,6 +116,7 @@ export default {
payload.reportData.newlyTotalDegree = payload.reportData.newlyTotalDegree * 100 + '%' payload.reportData.newlyTotalDegree = payload.reportData.newlyTotalDegree * 100 + '%'
payload.reportData.newlyTotalDegreeup = 1 payload.reportData.newlyTotalDegreeup = 1
} }
if (payload.reportData.flowQyDegree && payload.reportData.flowQyDegree > 0) { if (payload.reportData.flowQyDegree && payload.reportData.flowQyDegree > 0) {
payload.reportData.flowQyDegree = payload.reportData.flowQyDegree * 100 + '%' payload.reportData.flowQyDegree = payload.reportData.flowQyDegree * 100 + '%'
payload.reportData.flowQyDegreeup = 0 payload.reportData.flowQyDegreeup = 0
...@@ -124,12 +124,23 @@ export default { ...@@ -124,12 +124,23 @@ export default {
payload.reportData.flowQyDegree = payload.reportData.flowQyDegree * 100 + '%' payload.reportData.flowQyDegree = payload.reportData.flowQyDegree * 100 + '%'
payload.reportData.flowQyDegreeup = 1 payload.reportData.flowQyDegreeup = 1
} }
if (payload.reportData.applyDegree && payload.reportData.applyDegree > 0) {
payload.reportData.applyDegree = payload.reportData.applyDegree * 100 + '%'
payload.reportData.applyDegreeup = 0
} else {
payload.reportData.applyDegree = payload.reportData.applyDegree * 100 + '%'
payload.reportData.applyDegreeup = 1
}
state.reportData = payload.reportData state.reportData = payload.reportData
state.qyCustomerRatioMerchantTop = payload.reportData.qyCustomerRatioMerchantTop //企微客户占比 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 : [] state.trendChartList = payload.reportData.trendChartList ? payload.reportData.trendChartList : []
console.log(state.reportData)
console.log(3333333333)
}, },
["INIT_DATA"](state, payload) { ["INIT_DATA"](state, payload) {
state.statisticsObj = {}
let { let {
userInfo: { accountLevel }, userInfo: { accountLevel },
tabIndex, tabIndex,
...@@ -149,7 +160,7 @@ export default { ...@@ -149,7 +160,7 @@ export default {
} }
}, },
{ {
id: 1, id: 2,
title: '今年累计权益提单数', title: '今年累计权益提单数',
type: 1, type: 1,
value: obj => { value: obj => {
...@@ -173,7 +184,7 @@ export default { ...@@ -173,7 +184,7 @@ export default {
} }
}, },
{ {
id: 2, id: 4,
title: '新增权益提单数', title: '新增权益提单数',
value: obj => { value: obj => {
return obj.newEquityBillLadingNum return obj.newEquityBillLadingNum
...@@ -195,7 +206,7 @@ export default { ...@@ -195,7 +206,7 @@ export default {
title: '产值统计', title: '产值统计',
cumulative: [ cumulative: [
{ {
id: 1, id: 5,
title: '今年累计产值', title: '今年累计产值',
type: 0, type: 0,
value: obj => { value: obj => {
...@@ -203,7 +214,7 @@ export default { ...@@ -203,7 +214,7 @@ export default {
} }
}, },
{ {
id: 2, id: 6,
title: '今年累计权益提单数', title: '今年累计权益提单数',
type: 1, type: 1,
value: obj => { value: obj => {
...@@ -214,7 +225,7 @@ export default { ...@@ -214,7 +225,7 @@ export default {
new: [ new: [
{ {
id: 3, id: 7,
title: '新增产值', title: '新增产值',
value: obj => { value: obj => {
return obj.newProductionValue return obj.newProductionValue
...@@ -227,7 +238,7 @@ export default { ...@@ -227,7 +238,7 @@ export default {
return obj.newProductup return obj.newProductup
} }
}, { }, {
id: 2, id: 8,
title: '新增权益提单数', title: '新增权益提单数',
value: obj => { value: obj => {
return obj.newEquityBillLadingNum return obj.newEquityBillLadingNum
...@@ -249,7 +260,7 @@ export default { ...@@ -249,7 +260,7 @@ export default {
title: '客户统计', title: '客户统计',
cumulative: [ cumulative: [
{ {
id: 1, id: 9,
title: '累计客户总数', title: '累计客户总数',
type: 1, type: 1,
value: obj => { value: obj => {
...@@ -257,7 +268,7 @@ export default { ...@@ -257,7 +268,7 @@ export default {
} }
}, },
{ {
id: 1, id: 10,
title: '累计企微客户总数', title: '累计企微客户总数',
type: 1, type: 1,
value: obj => { value: obj => {
...@@ -267,7 +278,7 @@ export default { ...@@ -267,7 +278,7 @@ export default {
], ],
new: [ new: [
{ {
id: 2, id: 11,
title: '新增客户数', title: '新增客户数',
value: obj => { value: obj => {
return obj.newlyTotalCount return obj.newlyTotalCount
...@@ -281,7 +292,7 @@ export default { ...@@ -281,7 +292,7 @@ export default {
icon: 'totalCu' icon: 'totalCu'
}, },
{ {
id: 3, id: 12,
title: '新增企微客户数', title: '新增企微客户数',
value: obj => { value: obj => {
return obj.newlyQyCount return obj.newlyQyCount
...@@ -300,11 +311,14 @@ export default { ...@@ -300,11 +311,14 @@ export default {
}, },
sequential: obj => { sequential: obj => {
return obj.applyDegree return obj.applyDegree
} },
up: obj => {
return obj.applyDegreeup
},
} }
}, },
{ {
id: 4, id: 13,
title: '流失客户数', title: '流失客户数',
value: obj => { value: obj => {
return obj.flowQyCount return obj.flowQyCount
...@@ -327,7 +341,7 @@ export default { ...@@ -327,7 +341,7 @@ export default {
title: '客户统计', title: '客户统计',
cumulative: [ cumulative: [
{ {
id: 1, id: 14,
title: '企微客户总数', title: '企微客户总数',
type: 1, type: 1,
value: obj => { value: obj => {
...@@ -335,7 +349,7 @@ export default { ...@@ -335,7 +349,7 @@ export default {
} }
}, },
{ {
id: 1, id: 15,
title: '客户总数', title: '客户总数',
type: 1, type: 1,
value: obj => { value: obj => {
...@@ -345,7 +359,7 @@ export default { ...@@ -345,7 +359,7 @@ export default {
], ],
new: [ new: [
{ {
id: 3, id: 16,
title: '新增企微客户数', title: '新增企微客户数',
value: obj => { value: obj => {
return obj.newlyQyCount return obj.newlyQyCount
...@@ -369,7 +383,7 @@ export default { ...@@ -369,7 +383,7 @@ export default {
icon: 'Qy', icon: 'Qy',
}, },
{ {
id: 2, id: 17,
title: '新增客户数', title: '新增客户数',
value: obj => { value: obj => {
return obj.newlyTotalCount return obj.newlyTotalCount
......
...@@ -50,9 +50,8 @@ export default { ...@@ -50,9 +50,8 @@ export default {
// this.$refs.canvasTab.initData() // this.$refs.canvasTab.initData()
}, },
created() { created() {
console.log(this.getQuery()) console.log(JSON.parse(window.localStorage.getItem('reportType')))
let reportType = this.getQuery().reportType ? this.getQuery().reportType : 0 let reportType = this.getQuery().reportType ? this.getQuery().reportType : JSON.parse(window.localStorage.getItem('reportType')).reportType
console.log(reportType)
this.SET_REPORT_TYPE({ this.SET_REPORT_TYPE({
reportType: reportType reportType: reportType
}) })
...@@ -136,8 +135,6 @@ export default { ...@@ -136,8 +135,6 @@ export default {
} else if (this.tabIndex == 0 && this.userInfo.accountLevel == 4) { } else if (this.tabIndex == 0 && this.userInfo.accountLevel == 4) {
/**获取当前门店周报月报客户统计 */ /**获取当前门店周报月报客户统计 */
this.getCumerchantReport({ this.getCumerchantReport({
merchantIdList: [this.userInfo.merchantId],
// merchantIdList: ['44184606'],
startDate: this.outputData.reportTimeStart, startDate: this.outputData.reportTimeStart,
reportType: this.reportType, reportType: this.reportType,
success: res => { success: res => {
...@@ -149,8 +146,6 @@ export default { ...@@ -149,8 +146,6 @@ export default {
} else { } else {
/**获取当前集团周报月报客户统计 */ /**获取当前集团周报月报客户统计 */
this.getCugroupReport({ this.getCugroupReport({
// merchantIdList: ['44184606'],
merchantIdList: [this.userInfo.merchantId],
startDate: this.outputData.reportTimeStart, startDate: this.outputData.reportTimeStart,
reportType: this.reportType, reportType: this.reportType,
success: res => { success: res => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!