Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-customer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 925c2767
authored
Jun 24, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:客户记录
1 parent
14ac09f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
157 additions
and
22 deletions
src/api/groupCustomer.js
src/assets/css/index.scss
src/router/routes.js
src/views/customer/record.vue
src/views/solicit/components/pie.vue
src/views/solicit/overview.vue
src/api/groupCustomer.js
View file @
925c276
// const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
// const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
const
url
=
'/rop-scrm-entmicro/router'
const
url
=
'/rop-scrm-entmicro/router'
const
recordUrl
=
'/rop-scrm-shopmall/router'
export
default
{
export
default
{
/**消息盒子-好友列表 */
/**消息盒子-好友列表 */
...
@@ -17,5 +18,14 @@ export default {
...
@@ -17,5 +18,14 @@ export default {
url
,
url
,
data
data
})
})
},
//客户动态记录列表
getcustomerRecordList
(
data
=
{})
{
data
.
method
=
'scrm.api.shopmall.customer.dynamic.record.list'
return
window
.
$HTTP
({
url
:
recordUrl
,
data
,
returnAll
:
true
})
}
}
}
}
src/assets/css/index.scss
View file @
925c276
...
@@ -102,6 +102,12 @@ img {
...
@@ -102,6 +102,12 @@ img {
.color54
{
.color54
{
color
:
#545454
;
color
:
#545454
;
}
}
.color6
{
color
:
#666666
;
}
.color9
{
color
:
#999999
;
}
.font-10
{
.font-10
{
font-size
:
10px
;
font-size
:
10px
;
}
}
...
...
src/router/routes.js
View file @
925c276
...
@@ -64,7 +64,14 @@ const pages = {
...
@@ -64,7 +64,14 @@ const pages = {
backgroundColor
:
'#F7F7F7'
,
backgroundColor
:
'#F7F7F7'
,
keepAlive
:
true
keepAlive
:
true
}
}
}
},
{
name
:
'record'
,
meta
:
{
title
:
'客户记录'
,
backgroundColor
:
'#F7F7F7'
}
},
],
],
tag
:
[
tag
:
[
{
{
...
...
src/views/customer/record.vue
0 → 100644
View file @
925c276
<
template
>
<div
class=
"record-container"
v-if=
"flag"
>
<scroll-view
class=
"content"
@
ReachBottom=
"onReachBottom"
ref=
"scrollView"
>
<template
v-if=
"recordList.length > 0"
>
<div
class=
"record-container-content"
>
<!--
<div
class=
"font-16 color-3 fw5 line-22 m-l-4"
>
2021-12-31
</div>
-->
<template
v-for=
"(item, index) in recordList"
>
<div
class=
"record-container-content-item"
:key=
"index"
>
<div
class=
"portrait"
>
<img
:src=
"item.avatar"
alt=
""
v-if=
"item.avatar"
/>
<img
v-else
src=
"../../assets/images/user.png"
/>
</div>
<div
class=
"m-t-4 font-14 line-22"
>
<div
class=
"color-3 customerName text-hide"
>
{{
item
.
customerName
}}
</div>
<div
class=
"color6 m-t-4"
>
{{
item
.
operationType
==
1
?
'浏览了'
:
item
.
operationType
==
2
?
'领取优惠券'
:
'下单购买'
}}
<span
class=
"color-3 m-l-4"
>
{{
item
.
goodsName
}}
</span>
</div>
<div
class=
"font-12 color9 m-t-4"
v-if=
"item.operationType == 3"
>
订单编号:
{{
item
.
orderCode
}}
</div>
</div>
<div
class=
"font-12 color9 time"
>
{{
item
.
operationDate
}}
</div>
</div>
</
template
>
</div>
</template>
<
template
v-else
>
<empty
description=
"暂无数据"
/>
</
template
>
</scroll-view>
</div>
</template>
<
script
>
import
{
groupCustomer
}
from
'@/api'
import
{
Notify
}
from
'vant'
export
default
{
data
()
{
return
{
flag
:
false
,
recordList
:
[],
page
:
{
pageNum
:
1
,
pageSize
:
10
}
}
},
mounted
()
{
this
.
showLoading
()
this
.
getcustomerRecordList
()
},
methods
:
{
getcustomerRecordList
()
{
let
list
=
this
.
recordList
groupCustomer
.
getcustomerRecordList
({
...
this
.
page
}).
then
(({
code
,
data
,
message
})
=>
{
this
.
hideLoading
()
if
(
code
==
0
)
{
this
.
recordList
=
[...
list
,
...
data
.
list
]
if
(
this
.
page
.
pageNum
>
1
)
this
.
$refs
.
scrollView
.
loading
=
false
if
(
data
.
list
==
0
&&
this
.
flag
)
{
this
.
$refs
.
scrollView
.
finished
=
true
}
}
else
{
Notify
(
message
)
}
this
.
flag
=
true
})
},
onReachBottom
()
{
this
.
page
.
pageNum
++
this
.
getcustomerRecordList
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.record-container
{
padding
:
0
12px
;
/deep/
.van-list
{
background
:
#f7f7f7
;
height
:
100%
;
.van-empty
{
height
:
100%
;
}
}
&
-content-item
{
background
:
#ffffff
;
border-radius
:
6px
;
margin
:
8px
0
;
padding
:
8px
12px
12px
12px
;
display
:
flex
;
position
:
relative
;
.customerName
{
max-width
:
160px
;
}
.portrait
{
width
:
40px
;
height
:
40px
;
margin-right
:
6px
;
img
{
width
:
100%
;
border-radius
:
50%
;
}
}
.time
{
position
:
absolute
;
top
:
14px
;
right
:
12px
;
line-height
:
18px
;
}
}
}
</
style
>
src/views/solicit/components/pie.vue
View file @
925c276
...
@@ -44,6 +44,10 @@ export default {
...
@@ -44,6 +44,10 @@ export default {
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
},
},
specialData
:
{
type
:
Array
,
default
:
()
=>
[]
},
id
:
{
id
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
...
@@ -59,13 +63,13 @@ export default {
...
@@ -59,13 +63,13 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
console
.
log
(
this
.
list
)
this
.
initCanvas
()
this
.
initCanvas
()
},
},
methods
:
{
methods
:
{
initCanvas
()
{
initCanvas
()
{
let
id
=
this
.
refId
let
id
=
this
.
refId
let
{
chartData
,
chartColor
,
centerData
}
=
this
let
{
chartData
,
chartColor
,
specialData
,
centerData
}
=
this
let
data
=
specialData
.
length
>
0
?
specialData
:
chartData
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
({
...
@@ -73,7 +77,8 @@ export default {
...
@@ -73,7 +77,8 @@ export default {
pixelRatio
:
window
.
devicePixelRatio
,
pixelRatio
:
window
.
devicePixelRatio
,
padding
:
[
20
,
20
,
20
,
20
]
padding
:
[
20
,
20
,
20
,
20
]
})
})
this
.
chart
.
source
(
chartData
)
this
.
chart
.
source
(
data
)
this
.
chart
.
coord
(
'polar'
,
{
this
.
chart
.
coord
(
'polar'
,
{
transposed
:
true
,
transposed
:
true
,
radius
:
0.9
,
radius
:
0.9
,
...
@@ -88,25 +93,8 @@ export default {
...
@@ -88,25 +93,8 @@ export default {
<div style="font-size: 12px;color: rgba(47, 64, 86, 0.7);">
${
centerData
.
text
}
</div>
<div style="font-size: 12px;color: rgba(47, 64, 86, 0.7);">
${
centerData
.
text
}
</div>
<div style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;line-height: 24px;">
${
centerData
.
rate
}
</div>
<div style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;line-height: 24px;">
${
centerData
.
rate
}
</div>
</div>`
</div>`
// html: '<div style="text-align: center;width:150px;height: 50px;">\n <p style="font-size: 10px;color: #999;margin: 0" id="title"></p>\n <p style="font-size: 18px;color: #343434;margin: 0;font-weight: bold;" id="value"></p>\n </div>'
})
})
this
.
chart
.
interval
().
position
(
'const*value'
).
adjust
(
'stack'
).
color
(
'text'
,
chartColor
)
this
.
chart
.
interval
().
position
(
'const*value'
).
adjust
(
'stack'
).
color
(
'text'
,
chartColor
)
// this.chart.pieLabel({
// activeShape: false,
// lineStyle: {
// stroke: '#fff' // 线的颜色
// },
// anchorStyle: {
// fill: '#fff'
// },
// onClick(ev) {
// const data = ev.data
// if (data) {
// document.getElementById('title').innerText = data.text
// document.getElementById('value').innerText = data.value
// }
// }
// })
this
.
chart
.
render
()
this
.
chart
.
render
()
}
}
}
}
...
...
src/views/solicit/overview.vue
View file @
925c276
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"title-info"
>
客户招揽概况
</div>
<div
class=
"title-info"
>
客户招揽概况
</div>
<div
class=
"overview-content"
>
<div
class=
"overview-content"
>
<template
v-if=
"chart.pieData.length > 0"
>
<template
v-if=
"chart.pieData.length > 0"
>
<pieChart
:color=
"chart.pieColor"
id=
"overviewRef"
:list=
"chart.pieData"
:centerData=
"chart.centerData"
></pieChart>
<pieChart
:color=
"chart.pieColor"
id=
"overviewRef"
:list=
"chart.pieData"
:centerData=
"chart.centerData"
:specialData=
"chart.specialData"
></pieChart>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<empty></empty>
<empty></empty>
...
@@ -63,6 +63,7 @@ export default {
...
@@ -63,6 +63,7 @@ export default {
chart
:
{
chart
:
{
pieColor
:
[
'#3975C6'
,
'#E6E7EB'
],
pieColor
:
[
'#3975C6'
,
'#E6E7EB'
],
pieData
:
[],
pieData
:
[],
specialData
:[],
centerData
:
{},
centerData
:
{},
barData
:
[],
barData
:
[],
barColor
:
'#3975C6'
barColor
:
'#3975C6'
...
@@ -165,6 +166,18 @@ export default {
...
@@ -165,6 +166,18 @@ export default {
value
:
overviewInfo
.
notFollowedUpCount
value
:
overviewInfo
.
notFollowedUpCount
}
}
]
]
this
.
chart
.
specialData
=
[
{
const
:
'const'
,
text
:
' 已跟进 (人)'
,
value
:
overviewInfo
.
followedUpCount
},
{
const
:
'const'
,
text
:
'未跟进'
,
value
:
parseInt
(
overviewInfo
.
notFollowedUpCount
-
overviewInfo
.
followedUpCount
)
}
]
this
.
chart
.
centerData
=
{
this
.
chart
.
centerData
=
{
text
:
'达成率'
,
text
:
'达成率'
,
rate
:
overviewInfo
.
followedUpPercent
?
parseInt
(
overviewInfo
.
followedUpPercent
*
100
)
+
'%'
:
0
rate
:
overviewInfo
.
followedUpPercent
?
parseInt
(
overviewInfo
.
followedUpPercent
*
100
)
+
'%'
:
0
...
...
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