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 c0d4ea46
authored
Nov 27, 2021
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户跟进
1 parent
3d4703bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
98 deletions
src/api/detail.js
src/main.js
src/views/customer/detail.vue
src/api/detail.js
View file @
c0d4ea4
...
...
@@ -2,11 +2,10 @@ const url = '/rop-scrm-entmicro/router'
export
default
{
/** 侧边栏-客户跟进 */
getCustomerDetail
(
data
)
{
data
.
method
=
'entmicro.api.customer.detail
.single
'
data
.
method
=
'entmicro.api.customer.detail'
return
window
.
$HTTP
({
url
,
data
,
returnAll
:
true
})
}
}
src/main.js
View file @
c0d4ea4
...
...
@@ -39,7 +39,7 @@ Vue.prototype.to = function (name, params) {
Vue
.
config
.
productionTip
=
false
import
VConsole
from
'vconsole'
//
const vConsole = new VConsole()
const
vConsole
=
new
VConsole
()
const
isMock
=
true
fetchConfig
(
!
isMock
).
then
(
res
=>
{
...
...
src/views/customer/detail.vue
View file @
c0d4ea4
<
template
>
<div
style=
"padding-bottom: 30px
"
>
<div
v-if=
"flag
"
>
<div
class=
"detail-bg detail-first"
>
<div
class=
"detail-customer"
>
<div
class=
"sprite-icon icon-avatar"
></div>
<template
v-if=
"userInfo.info.avatar"
>
<img
:src=
"userInfo.info.avatar"
class=
"avatar"
>
</
template
>
<
template
v-else
>
<div
class=
"sprite-icon icon-avatar"
></div>
</
template
>
<div
class=
"detail-customer-name"
>
<span
class=
"name"
>
小晶
</span>
<span
class=
"wechat"
>
@微信
</span>
<div>
女
</div>
<span
class=
"name"
>
{{userInfo.info.customerName}}
</span>
<span
class=
"wechat"
>
@{{userInfo.info.type == 1?'微信':'企微'}}
</span>
<div>
{{customerSex[userInfo.info.customerSex]}}
</div>
</div>
</div>
<div
class=
"detail-member"
>
<span
class=
"name"
>
所属成员
</span>
<span>
陈晓凯、熬浓
</span>
<span>
{{staffNameList}}
</span>
</div>
</div>
<div
class=
"detail-second"
>
<van-cell-group
:class=
"[isMore ? '' : 'more-hidden']"
inset
>
<van-cell
title=
"添加时间"
value=
"内容"
/>
<van-cell
title=
"添加渠道"
value=
"内容"
/>
<van-cell
title=
"联系电话"
value=
"2324"
is-link
@
click=
"toEdit('设置联系电话')"
/>
<van-cell
title=
"身份证号码"
value=
"123412412"
is-link
@
click=
"toEdit('设置身份证号码')"
/>
<van-cell
title=
"购车日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"近期保养日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"近期到店日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"商业险到期日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"车系"
value=
"123412412"
is-link
@
click=
"toEdit('设置车系')"
/>
<van-cell
title=
"车型"
value=
"123412412"
is-link
@
click=
"toEdit('设置车型')"
/>
<van-calendar
v-model=
"show"
color=
"#6760ff"
@
confirm=
"onConfirm"
/>
<van-cell-group
:class=
"[isMore ? '' : 'more-hidden']"
inset
>
<van-cell
title=
"添加时间"
:value=
"userInfo.info.addTime"
/>
<van-cell
title=
"添加渠道"
:value=
"userInfo.info.addWayName"
/>
<van-cell
title=
"联系电话"
:value=
"userInfo.info.customerPhone"
/>
<van-cell
title=
"身份证号码"
value=
"身份证没有"
/>
<van-cell
title=
"购车日期"
:value=
"userInfo.vehicleInfo.buyTime"
/>
<van-cell
title=
"近期保养日期"
:value=
"userInfo.vehicleInfo.maintRecTime"
/>
<van-cell
title=
"近期到店日期"
value=
"到店日期没有"
/>
<van-cell
title=
"商业险到期日期"
:value=
"userInfo.vehicleInfo.insEndTime"
/>
<van-cell
title=
"车系"
:value=
"userInfo.vehicleInfo.vehicleTrain"
/>
<van-cell
title=
"车型"
:value=
"userInfo.vehicleInfo.vehicleType"
/>
</van-cell-group>
<div
class=
"detail-more"
@
click=
"moreInfo"
>
{{
isMore
?
'收起'
:
'更多信息'
}}
</div>
<div
class=
"detail-more"
@
click=
"moreInfo"
>
{{ isMore ? '收起' : '更多信息' }}
</div>
</div>
<div
class=
"detail-bg detail-third"
>
<div
class=
"title"
>
客户标签
</div>
<div
class=
"detail-label"
>
<div
v-if=
"labelist.length == 0"
class=
"no-label"
>
<div
v-if=
"userInfo.labels.length == 0"
class=
"no-label"
>
<div
class=
"btn"
>
<van-icon
name=
"plus"
/>
<span>
标签
</span>
</div>
</div>
<div
class=
"has-label"
v-else
>
<div
class=
"has-label"
v-else
>
<div>
<div
v-for=
"item in labelist"
:key=
"item.id"
class=
"label-text"
>
{{
item
.
name
}}
</div>
<div
v-for=
"item in userInfo.labels"
:key=
"item.id"
class=
"label-text"
>
{{ item.labelValue }}
</div>
</div>
<div
class=
"btn-box"
>
<
!-- <
div class="btn-box">
<div class="btn">
<van-icon name="plus" />
<span>标签</span>
</div>
</div>
</div>
-->
</div>
</div>
</div>
<div
class=
"detail-bg detail-fourth"
>
<div
class=
"title"
>
所属群聊
</div>
<div
class=
"detail-group"
>
<div
v-if=
"groupList.length == 0"
class=
"no-data"
>
暂无数据
</div>
<div
v-if=
"userInfo.customerBases.length == 0"
class=
"no-data"
>
暂无数据
</div>
<div
v-else
>
<div
v-for=
"itm in groupList"
:key=
"itm.id"
class=
"group-item"
>
<div
v-for=
"itm in userInfo.customerBases"
:key=
"itm.id"
class=
"group-item"
>
<div
class=
"group-avatar"
></div>
<div
class=
"name"
>
{{
itm
.
groupName
}}
(
{{
itm
.
num
}}
)
</div>
<div
class=
"name"
>
{{ itm.groupName }}({{ itm.
membersNumber
}})
</div>
</div>
</div>
</div>
...
...
@@ -68,82 +132,52 @@
</template>
<
script
>
import
{
detailApi
}
from
'@/api'
import
{
detailApi
,
wxConfig
}
from
'@/api'
export
default
{
data
()
{
return
{
show
:
false
,
date
:
''
,
value
:
''
,
flag
:
false
,
isMore
:
false
,
labelist
:
[
{
id
:
1
,
name
:
'即将离开'
},
{
id
:
2
,
name
:
'大四'
},
{
id
:
3
,
name
:
'大四'
},
{
id
:
4
,
name
:
'大四'
},
{
id
:
5
,
name
:
'大四'
},
{
id
:
6
,
name
:
'大四'
}
],
groupList
:
[
{
id
:
1
,
groupName
:
'发发呆'
,
num
:
2
},
{
id
:
2
,
groupName
:
'烦的还是挺好的发挥地方'
,
num
:
4
},
{
id
:
3
,
groupName
:
'和任何人聚'
,
num
:
6
}
]
userInfo
:
{
labels
:
[],
vehicleInfo
:
{},
customerBases
:
[],
info
:
{}
},
staffNameList
:
''
,
customerSex
:
{
0
:
'未知'
,
1
:
'男'
,
2
:
'女'
}
}
},
created
()
{
this
.
getCustomerDetail
()
mounted
()
{
this
.
showLoading
()
wxConfig
.
init
([
'getCurExternalContact'
]).
then
(()
=>
{
wxConfig
.
getCurExternalContact
().
then
(
userId
=>
{
this
.
getCustomerDetail
(
userId
)
})
})
},
methods
:
{
onConfirm
(
date
)
{
console
.
log
(
date
)
// const [start, end] = date
this
.
show
=
false
this
.
date
=
date
// this.date = `${this.formatDate(start)} - ${this.formatDate(end)}`
},
moreInfo
()
{
this
.
isMore
=
!
this
.
isMore
},
toEdit
(
title
,
value
)
{
this
.
$router
.
push
({
name
:
'customer.editDetail'
,
params
:
{
title
}
})
},
getCustomerDetail
()
{
detailApi
.
getCustomerDetail
({
externalUserId
:
'wm-ZewEAAAc61j2kgvuKnY011oPgBj3w'
}).
then
(
res
=>
{
console
.
log
(
res
)
getCustomerDetail
(
userId
)
{
this
.
hideLoading
()
detailApi
.
getCustomerDetail
({
userId
}).
then
(
res
=>
{
this
.
flag
=
true
let
staffNameList
=
[]
if
(
res
.
staffFollows
)
{
res
.
staffFollows
.
map
(
e
=>
{
staffNameList
.
push
(
e
.
staffName
)
})
}
this
.
staffNameList
=
staffNameList
.
join
(
'、'
)
Object
.
keys
(
res
).
map
(
key
=>
{
if
(
res
[
key
])
this
.
userInfo
[
key
]
=
res
[
key
]
})
})
}
}
...
...
@@ -163,6 +197,11 @@ export default {
display
:
flex
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.1
);
padding
:
0
10px
21px
;
.avatar
{
width
:
44px
;
height
:
44px
;
flex-shrink
:
0
;
}
&
-name
{
font-size
:
16px
;
margin-left
:
16px
;
...
...
@@ -208,10 +247,12 @@ export default {
.detail-second
{
.van-cell-group
{
box-shadow
:
0px
4px
8px
0px
rgba
(
224
,
224
,
224
,
0.5
);
transition
:
all
0.25s
;
height
:
440px
;
overflow
:
hidden
;
}
.more-hidden
{
max-height
:
132px
;
overflow
:
hidden
;
height
:
132px
;
}
.detail-more
{
background-color
:
#ededed
;
...
...
@@ -262,7 +303,6 @@ export default {
.label-text
{
display
:
inline-block
;
margin
:
0
4px
4px
0
;
max-width
:
66px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
...
...
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