Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-report
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
4
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 276a24b0
authored
Jan 18, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
cmmmit
1 parent
7145b469
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
176 additions
and
132 deletions
src/assets/css/index.scss
src/assets/css/sprite.scss
src/assets/images/sprite.png
src/assets/spritesmith/helmet.png
src/components/Chart.vue
src/components/GroupRanking.vue
src/components/Ranking.vue
src/components/Statistics.vue
src/components/StoresRanking.vue
src/components/TimeSearch.vue
src/store/modules/app.js
src/store/modules/report.js
src/views/report/index.vue
src/assets/css/index.scss
View file @
276a24b
...
...
@@ -117,6 +117,7 @@ line-height: 25px;
color
:
#666666
;
line-height
:
15px
;
margin-bottom
:
2px
;
white-space
:nowrap
;
}
.mb
{
margin-bottom
:
5px
;
...
...
@@ -176,3 +177,6 @@ color:#333333;
// .f2-tooltip span:nth-child(2) {
// font-size: 13px !important;
// }
// .van-swipe{
// overflow: visible!important;
//
}
\ No newline at end of file
src/assets/css/sprite.scss
View file @
276a24b
.sprite-icon
{
background-image
:
url(../images/sprite.png)
;
background-size
:
345px
270px
;}
.icon-bg
{
width
:
345px
;
height
:
180px
;
background-position
:
0px
0px
;}
.icon-client
{
width
:
26px
;
height
:
26px
;
background-position
:
-37px
-244px
;}
.icon-crown
{
width
:
12px
;
height
:
9px
;
background-position
:
-2
29
px
-244px
;}
.icon-crown
{
width
:
12px
;
height
:
9px
;
background-position
:
-2
65
px
-244px
;}
.icon-customers
{
width
:
40px
;
height
:
44px
;
background-position
:
0px
-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-message
{
width
:
14px
;
height
:
13px
;
background-position
:
-2
05
px
-244px
;}
.icon-message
{
width
:
14px
;
height
:
13px
;
background-position
:
-2
41
px
-244px
;}
.icon-production
{
width
:
40px
;
height
:
44px
;
background-position
:
-150px
-190px
;}
.icon-proportion
{
width
:
26px
;
height
:
26px
;
background-position
:
-
73
px
-244px
;}
.icon-proportion
{
width
:
26px
;
height
:
26px
;
background-position
:
-
109
px
-244px
;}
.icon-Qy
{
width
:
40px
;
height
:
44px
;
background-position
:
-200px
-190px
;}
.icon-qycustomer
{
width
:
26px
;
height
:
26px
;
background-position
:
-1
09
px
-244px
;}
.icon-qycustomer
{
width
:
26px
;
height
:
26px
;
background-position
:
-1
45
px
-244px
;}
.icon-rank
{
width
:
27px
;
height
:
26px
;
background-position
:
0px
-244px
;}
.icon-speed
{
width
:
26px
;
height
:
26px
;
background-position
:
-1
45
px
-244px
;}
.icon-speed
{
width
:
26px
;
height
:
26px
;
background-position
:
-1
81
px
-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
src/assets/images/sprite.png
View file @
276a24b
171 KB
|
W:
|
H:
173 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/assets/spritesmith/helmet.png
0 → 100644
View file @
276a24b
1.98 KB
src/components/Chart.vue
View file @
276a24b
...
...
@@ -254,13 +254,10 @@ export default {
this
.
lineChart
.
render
()
},
initPieChart
(
id
=
'pieChart'
)
{
console
.
log
(
4444444444
)
console
.
log
(
this
.
productionValueReportList
)
console
.
log
(
this
.
trendChartList
)
console
.
log
(
this
.
trendList
)
let
{
productionValueReportList
,
orderSource
}
=
this
productionValueReportList
.
map
(
e
=>
(
e
.
count
=
'count'
))
productionValueReportList
.
map
(
e
=>
{
e
.
count
=
'count'
;
})
this
.
chart
&&
this
.
chart
.
clear
()
this
.
chart
=
null
this
.
chart
=
new
F2
.
Chart
({
...
...
src/components/GroupRanking.vue
View file @
276a24b
<
template
>
<div
class=
"ranking-wrap"
>
<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-type', index == 0 ? 'rank-type-index' : '']"
>
{{
index
+
1
}}
...
...
@@ -11,12 +11,12 @@
</div>
<div
:class=
"['small-text', 'ranking-text', tabType.index == 1 ? 'rate' : '']"
>
{{ i.merchantName }}
</div>
<div
class=
"small-text gray"
>
¥{{ i.newProductionValue }}
</div>
<temp
al
te
v-if=
"tabType.index == 1 && tabIndex == 0"
>
<
temp
la
te
v-if=
"tabType.index == 1 && tabIndex == 0"
>
<span
class=
"ratio flex"
>
<van-icon
name=
"down"
size=
"10px"
:class=
"`$
{index == 1 ? 'up' : ''}`" />
10%
</span>
</temp
al
te>
</
temp
la
te
>
</div>
</template>
...
...
@@ -25,7 +25,7 @@
</
template
>
</template>
<
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-type', index == 0 ? 'rank-type-index' : '']"
>
{{
index
+
1
}}
...
...
@@ -35,12 +35,12 @@
</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>
<temp
al
te
v-if=
"tabType.index == 1"
>
<
temp
la
te
v-if=
"tabType.index == 1"
>
<span
class=
"ratio flex"
>
<van-icon
name=
"down"
size=
"10px"
:class=
"c.qyCustomerRatio > 0 ? 'up' : ''"
/>
{{
c
.
qyCustomerRatio
*
100
}}
%
</span>
</temp
al
te>
</
temp
la
te
>
</div>
</template>
...
...
src/components/Ranking.vue
View file @
276a24b
...
...
@@ -5,13 +5,13 @@
<div
:class=
"['sprite-icon', ' icon-' + item.icon]"
></div>
<div
class=
"small-text"
>
{{
item
.
text
}}
<template
v-if=
"tabIndex== 1"
>
<span>
{{
item
.
info
}}
</span>
<template
v-if=
"item.info"
>
<span>
{{
item
.
info
}}
</span>
</
template
>
<
template
v-else
>
<span>
{{
item
.
value
(
reportData
)
}}
</span>
<!--
<span>
{{
item
.
value
(
reportData
)
*
100
}}
%
</span>
-->
</
template
>
<
template
v-else
>
<span>
{{
item
.
value
(
reportData
)
}}
</span>
<!--
<span>
{{
item
.
value
(
reportData
)
*
100
}}
%
</span>
-->
</
template
>
</div>
</div>
</template>
...
...
@@ -38,19 +38,22 @@ export default {
computed
:
{
...
mapState
({
reportData
:
state
=>
state
.
report
.
reportData
,
tabIndex
:
state
=>
state
.
report
.
tabIndex
,
userInfo
:
state
=>
state
.
report
.
userInfo
,
tabIndex
:
state
=>
state
.
report
.
tabIndex
,
userInfo
:
state
=>
state
.
report
.
userInfo
})
},
methods
:
{
initFastData
()
{
let
{
userInfo
:{
accountLevel
}}
=
this
let
{
userInfo
:
{
accountLevel
}
}
=
this
this
.
fastData
=
[]
let
text
=
'-'
if
(
this
.
tabIndex
==
1
)
{
//增长速度最快业务1商城订单2直播订单3活动订单4会员套餐5精品升级6权益提单
let
{
fastOrderSource
}
=
this
.
reportData
if
(
fastOrderSource
)
{
let
text
=
text
=
fastOrderSource
==
1
?
'商城订单'
:
fastOrderSource
==
2
...
...
@@ -62,34 +65,42 @@ export default {
:
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
{
if
(
accountLevel
!==
4
)
{
if
(
accountLevel
!==
4
)
{
this
.
fastData
.
push
(
{
text
:
'企微客户占比最高的门店:'
,
value
:
obj
=>
{
return
obj
.
newlyQyFastestGrowthMerchant
return
obj
.
newlyQyFastestGrowthMerchant
?
obj
.
newlyQyFastestGrowthMerchant
:
'-'
},
icon
:
'proportion'
},
{
text
:
'企微增长速度最快的门店:'
,
value
:
obj
=>
{
return
obj
.
newlyQyFastestGrowthMerchant
return
obj
.
newlyQyFastestGrowthMerchant
?
obj
.
newlyQyFastestGrowthMerchant
:
'-'
},
icon
:
'speed'
},
{
text
:
'企微客户数最多的门店:'
,
value
:
obj
=>
{
return
obj
.
newlyQyMostMerchant
return
obj
.
newlyQyMostMerchant
?
obj
.
newlyQyMostMerchant
:
'-'
},
icon
:
'client'
}
...
...
@@ -98,7 +109,7 @@ export default {
this
.
fastData
.
push
({
text
:
'企业微信客户占比:'
,
value
:
obj
=>
{
return
obj
.
qyCustomerRatio
return
obj
.
qyCustomerRatio
?((
obj
.
qyCustomerRatio
)
*
100
).
toFixed
(
0
)
+
'%'
:
'-'
},
icon
:
'qycustomer'
})
...
...
src/components/Statistics.vue
View file @
276a24b
...
...
@@ -3,57 +3,66 @@
<div
class=
"headline"
>
{{
statisticsObj
.
title
}}
</div>
<div
class=
"flex"
>
<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=
"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>
</
template
>
</div>
<div
class=
"flex-between"
>
<van-swipe
:loop=
"false"
:width=
"167"
:show-indicators=
"false"
>
<
template
v-for=
"add in statisticsObj.new"
>
<van-swipe-item
class=
"container"
:key=
"add.id"
>
<div
class=
"text-message"
>
{{
add
.
title
}}
</div>
<div
class=
"flex-between"
>
<span
class=
"add-count"
>
{{
add
.
value
(
reportData
)
}}
</span>
<template
v-if=
"add.sequential(reportData)"
>
<div
class=
"ratio text-message"
>
周环比
<span>
<van-icon
name=
"down"
size=
"10px"
:class=
"add.up(reportData) == 1 ? 'up' : ''"
/>
{{
add
.
sequential
(
reportData
)
}}
</span>
</div>
</
template
>
</div>
<div
class=
"flex"
>
<div
:class=
"['sprite-icon', 'icon-' + add.icon]"
></div>
<
template
v-if=
"add.list"
>
<div
class=
"customer-info"
>
<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=
"statisticsObj.new.length > 0"
>
<van-swipe
:loop=
"false"
:show-indicators=
"false"
:width=
"200"
>
<template
v-for=
"add in statisticsObj.new"
>
<van-swipe-item
class=
"container"
:key=
"add.id + 'new'"
>
<div
class=
"text-message"
>
{{
add
.
title
}}
</div>
<div
class=
"flex-between"
>
<span
class=
"add-count"
>
{{
add
.
value
(
reportData
)
}}
</span>
<template
v-if=
"add.sequential(reportData)"
>
<div
class=
"ratio text-message"
>
周环比
<span>
<template
v-if=
"add.sequential(reportData)!='0%'"
>
<van-icon
name=
"down"
size=
"10px"
:class=
"add.up(reportData) == 0 ? 'up' : ''"
/>
</
template
>
{{ add.sequential(reportData) }}
</span>
</div>
</template>
</div>
<div
class=
"flex"
>
<div
:class=
"['sprite-icon', 'icon-' + add.icon]"
></div>
<
template
v-if=
"add.list"
>
<div
class=
"customer-info"
>
<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"
>
<div
class=
"customer-info"
>
<span
class=
"text-message mb"
>
发起申请客户数
</span>
<div
class=
"gray-text flex"
>
{{
add
.
info
.
value
(
reportData
)
}}
<div
class=
"ratio text-message"
>
周环比
<label>
<van-icon
name=
"down"
size=
"10px"
:class=
"`$
{index == 0 ? 'up' : ''}`" />
{{
add
.
info
.
sequential
(
reportData
)
}}
</label>
<
template
v-if=
"add.info"
>
<div
class=
"customer-info"
>
<span
class=
"text-message mb"
>
{{
add
.
info
.
title
}}
</span>
<div
class=
"gray-text flex"
>
{{
add
.
info
.
value
(
reportData
)
}}
<div
class=
"ratio text-message"
>
周环比
<label>
<template
v-if=
"add.info.sequential(reportData)!='0%'"
>
<van-icon
name=
"down"
size=
"10px"
:class=
"`$
{add.info.up(reportData) == 0 ? 'up' : ''}`" />
</
template
>
{{ add.info.sequential(reportData) }}
</label>
</div>
</div>
</div>
</
div
>
</
template
>
</
div
>
</
van-swipe-item
>
</
templat
e>
</
van-swip
e>
</
template
>
</
div
>
</
van-swipe-item
>
</
template
>
</
van-swip
e>
</
templat
e>
</div>
</div>
</template>
...
...
@@ -105,7 +114,7 @@ export default {
}
.container
{
width
:
167px
;
width
:
167px
!important
;
height
:
106px
;
background
:
#ffffff
;
box-shadow
:
0px
3px
8px
0px
rgba
(
170
,
180
,
209
,
0.2
);
...
...
@@ -126,7 +135,6 @@ export default {
span
{
padding
:
0
1px
;
width
:
auto
;
height
:
14px
;
background
:
#d0def1
;
border-radius
:
3px
;
height
:
15px
;
...
...
@@ -143,6 +151,7 @@ export default {
}
&
.up
{
transform
:
rotate
(
180deg
);
line-height
:
15px
;
}
}
.text-message
{
...
...
@@ -163,5 +172,8 @@ export default {
}
.statistics
/
deep
/
.van-swipe__track
{
margin-right
:
10px
;
.van-swipe-item
{
width
:
167px
!important
;
}
}
</
style
>
\ No newline at end of file
src/components/StoresRanking.vue
View file @
276a24b
...
...
@@ -2,7 +2,7 @@
<div
class=
"store-ranking-wrap"
>
<template
v-if=
"tabIndex == 0"
>
<div
class=
"weekTitle headline"
>
新增客户分布
</div>
<van-swipe
:loop=
"false"
:width=
"1
4
0"
:show-indicators=
"false"
>
<van-swipe
:loop=
"false"
:width=
"1
7
0"
:show-indicators=
"false"
>
<template
v-for=
"(i, index) in staffDistributionVOList"
>
<van-swipe-item
:key=
"i.id"
>
<template
v-if=
"index == 0"
>
...
...
@@ -28,7 +28,7 @@
<
template
v-if=
"tabIndex == 1"
>
<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
v-if=
"(tabIndex == 0 && staffDistributionVOList.length == 0) || (tabIndex == 1 && productionValueReportList.length == 0)"
>
<Empty></Empty>
...
...
@@ -201,6 +201,11 @@ export default {
.gray-text
{
margin
:
10px
0
0
0
;
color
:
#999999
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
100%
;
text-align
:
center
;
span
{
font-size
:
14px
;
font-weight
:
500
;
...
...
@@ -244,4 +249,10 @@ export default {
height
:
195px
;
background-color
:
#ffffff
;
}
.store-ranking-wrap
/
deep
/
.van-swipe__track
{
margin-right
:
10px
;
.van-swipe-item{
width
:
140px
!important
;
}
}
</
style
>
\ No newline at end of file
src/components/TimeSearch.vue
View file @
276a24b
...
...
@@ -12,7 +12,7 @@
</
template
>
<
template
v-if=
"outputData.reportTimeStart && reportType == 1"
>
<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"
/>
</div>
</
template
>
...
...
@@ -53,7 +53,7 @@ export default {
...
mapMutations
({
SET_START_TIME
:
'report/SET_START_TIME'
,
INIT_DATA
:
'report/INIT_DATA'
,
SET_TABTYPE_INDEX
:
'report/SET_TABTYPE_INDEX'
SET_TABTYPE_INDEX
:
'report/SET_TABTYPE_INDEX'
}),
initDate
()
{
let
{
reportType
}
=
this
...
...
@@ -82,7 +82,7 @@ export default {
}
this
.
dateColumns
=
dateColumns
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 {
if
(
accountLevel
==
4
)
{
//门店
this
.
getCumerchantReport
({
merchantIdList
:
[
this
.
userInfo
.
merchantId
],
reportType
:
this
.
reportType
,
startDate
:
time
,
success
:
res
=>
{
...
...
@@ -124,7 +123,6 @@ export default {
//集团
this
.
getCugroupReport
({
reportType
:
this
.
reportType
,
merchantIdList
:
[
this
.
userInfo
.
merchantId
],
startDate
:
time
,
success
:
res
=>
{
this
.
hideLoading
()
...
...
src/store/modules/app.js
View file @
276a24b
...
...
@@ -112,7 +112,7 @@ const actions = {
})
}
else
{
util
.
showLoading
()
let
appid
=
getParams
(
'corpId'
)
//从链接获取
let
{
appid
}
=
getParams
(
'corpId'
)
//从链接获取
let
dj_scrm
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
if
(
!
appid
)
appid
=
(
dj_scrm
&&
dj_scrm
.
corpId
)
||
'ww7ee69c648ae1b7e6'
util
.
setLocalStorage
(
'dj_scrm_corpId'
,
{
corpId
:
appid
})
...
...
@@ -128,8 +128,9 @@ const actions = {
}
},
navigation
({
dispatch
})
{
let
{
sessionId
,
corpId
}
=
getParams
()
let
{
sessionId
,
corpId
,
reportType
}
=
getParams
()
const
storage_corpId
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
util
.
setLocalStorage
(
'reportType'
,
{
reportType
})
if
(
!
corpId
)
corpId
=
storage_corpId
&&
storage_corpId
.
corpId
if
(
corpId
&&
storage_corpId
)
{
if
(
corpId
!=
storage_corpId
.
corpId
)
{
...
...
@@ -151,7 +152,7 @@ const actions = {
}
state
.
showWindow
=
true
},
registerHttp
({},
sessionId
=
''
)
{
registerHttp
({
},
sessionId
=
''
)
{
window
.
$HTTP
=
new
Http
({
...
window
.
$fetchConfig
,
alert
:
Notify
,
headers
:
{
token
:
sessionId
}
})
}
}
...
...
src/store/modules/report.js
View file @
276a24b
...
...
@@ -17,17 +17,7 @@ export default {
reportTimeEnd
:
''
},
statisticsObj
:
''
,
staffDistributionVOList
:
[
{
"id"
:
0
,
"weekId"
:
0
,
"staffId"
:
0
,
"staffName"
:
"张三"
,
"newlyQyCount"
:
10
,
"newlyQyRatio"
:
20
,
"top"
:
0
}
],
//新增客户分布
staffDistributionVOList
:
[],
//新增客户分布
qyTotalCountMerchantTop
:
[],
//企微客户数排行
qyCustomerRatioMerchantTop
:
[],
//企微客户占比
trendChartList
:
[{
...
...
@@ -56,7 +46,7 @@ export default {
},
//获取报表数据
[
"SET_REPORT"
](
state
,
payload
)
{
if
(
payload
.
reportData
.
yearProductionValue
)
{
payload
.
reportData
.
yearProductionValue
=
(
payload
.
reportData
.
yearProductionValue
/
100
).
toFixed
(
0
)
}
else
{
...
...
@@ -67,22 +57,30 @@ export default {
}
else
{
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
}
else
{
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
}
else
{
payload
.
reportData
.
newEquityup
=
0
}
payload
.
reportData
.
yearEquityBillLadingNum
=
payload
.
reportData
.
yearEquityBillLadingNum
?
payload
.
reportData
.
yearEquityBillLadingNum
:
0
state
.
reportData
=
payload
.
reportData
;
console
.
log
(
payload
.
reportData
)
console
.
log
(
33333333333
)
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
.
trendList
=
payload
.
reportData
.
trendList
?
payload
.
reportData
.
trendList
:
[]
state
.
trendChartList
=
[]
//客户的趋势图
},
//设置底部tabIndex
[
"SET_TAB_INDEX"
](
state
,
payload
)
{
...
...
@@ -103,9 +101,10 @@ export default {
state
.
userInfo
.
accountLevel
=
payload
.
accountLevel
},
[
'SET_CUSTOMER_REPORT'
](
state
,
payload
)
{
if
(
payload
.
reportData
.
newlyQyDegree
&&
payload
.
reportData
.
newlyQyDegree
>
0
)
{
payload
.
reportData
.
newlyQyDegree
=
payload
.
reportData
.
newlyQyDegree
*
100
+
'%'
payload
.
reportData
.
newlyQyDegree
t
up
=
0
payload
.
reportData
.
newlyQyDegreeup
=
0
}
else
{
payload
.
reportData
.
newlyQyDegree
=
payload
.
reportData
.
newlyQyDegree
*
100
+
'%'
payload
.
reportData
.
newlyQyDegreeup
=
1
...
...
@@ -117,6 +116,7 @@ export default {
payload
.
reportData
.
newlyTotalDegree
=
payload
.
reportData
.
newlyTotalDegree
*
100
+
'%'
payload
.
reportData
.
newlyTotalDegreeup
=
1
}
if
(
payload
.
reportData
.
flowQyDegree
&&
payload
.
reportData
.
flowQyDegree
>
0
)
{
payload
.
reportData
.
flowQyDegree
=
payload
.
reportData
.
flowQyDegree
*
100
+
'%'
payload
.
reportData
.
flowQyDegreeup
=
0
...
...
@@ -124,12 +124,23 @@ export default {
payload
.
reportData
.
flowQyDegree
=
payload
.
reportData
.
flowQyDegree
*
100
+
'%'
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
.
qyCustomerRatioMerchantTop
=
payload
.
reportData
.
qyCustomerRatioMerchantTop
//企微客户占比
state
.
staffDistributionVOList
=
payload
.
reportData
.
staffDistributionVOList
?
payload
.
reportData
.
staffDistributionVOList
:
[]
state
.
trendChartList
=
payload
.
reportData
.
trendChartList
?
payload
.
reportData
.
trendChartList
:
[]
console
.
log
(
state
.
reportData
)
console
.
log
(
3333333333
)
},
[
"INIT_DATA"
](
state
,
payload
)
{
state
.
statisticsObj
=
{}
let
{
userInfo
:
{
accountLevel
},
tabIndex
,
...
...
@@ -149,7 +160,7 @@ export default {
}
},
{
id
:
1
,
id
:
2
,
title
:
'今年累计权益提单数'
,
type
:
1
,
value
:
obj
=>
{
...
...
@@ -173,7 +184,7 @@ export default {
}
},
{
id
:
2
,
id
:
4
,
title
:
'新增权益提单数'
,
value
:
obj
=>
{
return
obj
.
newEquityBillLadingNum
...
...
@@ -195,7 +206,7 @@ export default {
title
:
'产值统计'
,
cumulative
:
[
{
id
:
1
,
id
:
5
,
title
:
'今年累计产值'
,
type
:
0
,
value
:
obj
=>
{
...
...
@@ -203,7 +214,7 @@ export default {
}
},
{
id
:
2
,
id
:
6
,
title
:
'今年累计权益提单数'
,
type
:
1
,
value
:
obj
=>
{
...
...
@@ -214,7 +225,7 @@ export default {
new
:
[
{
id
:
3
,
id
:
7
,
title
:
'新增产值'
,
value
:
obj
=>
{
return
obj
.
newProductionValue
...
...
@@ -227,7 +238,7 @@ export default {
return
obj
.
newProductup
}
},
{
id
:
2
,
id
:
8
,
title
:
'新增权益提单数'
,
value
:
obj
=>
{
return
obj
.
newEquityBillLadingNum
...
...
@@ -249,7 +260,7 @@ export default {
title
:
'客户统计'
,
cumulative
:
[
{
id
:
1
,
id
:
9
,
title
:
'累计客户总数'
,
type
:
1
,
value
:
obj
=>
{
...
...
@@ -257,7 +268,7 @@ export default {
}
},
{
id
:
1
,
id
:
1
0
,
title
:
'累计企微客户总数'
,
type
:
1
,
value
:
obj
=>
{
...
...
@@ -267,7 +278,7 @@ export default {
],
new
:
[
{
id
:
2
,
id
:
11
,
title
:
'新增客户数'
,
value
:
obj
=>
{
return
obj
.
newlyTotalCount
...
...
@@ -281,7 +292,7 @@ export default {
icon
:
'totalCu'
},
{
id
:
3
,
id
:
12
,
title
:
'新增企微客户数'
,
value
:
obj
=>
{
return
obj
.
newlyQyCount
...
...
@@ -300,11 +311,14 @@ export default {
},
sequential
:
obj
=>
{
return
obj
.
applyDegree
}
},
up
:
obj
=>
{
return
obj
.
applyDegreeup
},
}
},
{
id
:
4
,
id
:
13
,
title
:
'流失客户数'
,
value
:
obj
=>
{
return
obj
.
flowQyCount
...
...
@@ -327,7 +341,7 @@ export default {
title
:
'客户统计'
,
cumulative
:
[
{
id
:
1
,
id
:
1
4
,
title
:
'企微客户总数'
,
type
:
1
,
value
:
obj
=>
{
...
...
@@ -335,7 +349,7 @@ export default {
}
},
{
id
:
1
,
id
:
1
5
,
title
:
'客户总数'
,
type
:
1
,
value
:
obj
=>
{
...
...
@@ -345,7 +359,7 @@ export default {
],
new
:
[
{
id
:
3
,
id
:
16
,
title
:
'新增企微客户数'
,
value
:
obj
=>
{
return
obj
.
newlyQyCount
...
...
@@ -369,7 +383,7 @@ export default {
icon
:
'Qy'
,
},
{
id
:
2
,
id
:
17
,
title
:
'新增客户数'
,
value
:
obj
=>
{
return
obj
.
newlyTotalCount
...
...
src/views/report/index.vue
View file @
276a24b
...
...
@@ -50,9 +50,8 @@ export default {
// this.$refs.canvasTab.initData()
},
created
()
{
console
.
log
(
this
.
getQuery
())
let
reportType
=
this
.
getQuery
().
reportType
?
this
.
getQuery
().
reportType
:
0
console
.
log
(
reportType
)
console
.
log
(
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'reportType'
)))
let
reportType
=
this
.
getQuery
().
reportType
?
this
.
getQuery
().
reportType
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'reportType'
)).
reportType
this
.
SET_REPORT_TYPE
({
reportType
:
reportType
})
...
...
@@ -136,8 +135,6 @@ export default {
}
else
if
(
this
.
tabIndex
==
0
&&
this
.
userInfo
.
accountLevel
==
4
)
{
/**获取当前门店周报月报客户统计 */
this
.
getCumerchantReport
({
merchantIdList
:
[
this
.
userInfo
.
merchantId
],
// merchantIdList: ['44184606'],
startDate
:
this
.
outputData
.
reportTimeStart
,
reportType
:
this
.
reportType
,
success
:
res
=>
{
...
...
@@ -149,8 +146,6 @@ export default {
}
else
{
/**获取当前集团周报月报客户统计 */
this
.
getCugroupReport
({
// merchantIdList: ['44184606'],
merchantIdList
:
[
this
.
userInfo
.
merchantId
],
startDate
:
this
.
outputData
.
reportTimeStart
,
reportType
:
this
.
reportType
,
success
:
res
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment