Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 16f225c6
authored
Dec 18, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户详情
1 parent
572fc8fe
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
80 additions
and
56 deletions
linkwe-ui/src/api/customer/group.js
linkwe-ui/src/api/customer/index.js
linkwe-ui/src/utils/request.js
linkwe-ui/src/views/customerManage/customer/infoTab.vue
linkwe-ui/src/views/customerManage/customer/record.vue
linkwe-ui/src/views/customerManage/customerDetail.vue
linkwe-ui/src/views/customerManage/group.vue
linkwe-ui/src/views/customerManage/groupDetail.vue
linkwe-ui/src/views/customerManage/lossRemind.vue
linkwe-ui/src/api/customer/group.js
View file @
16f225c
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
const
service
=
window
.
CONFIG
.
services
.
wecom
+
'/group'
const
service
=
window
.
CONFIG
.
services
.
wecom
+
'/group'
export
function
getDetail
(
chatId
)
{
return
request
({
url
:
service
+
`/chat/chatDetail/
${
chatId
}
`
,
method
:
'get'
})
}
/**
/**
* 客户群列表
* 客户群列表
* @param {*} data
* @param {*} data
...
@@ -26,8 +33,8 @@ export function getList(params) {
...
@@ -26,8 +33,8 @@ export function getList(params) {
* 群成员列表
* 群成员列表
* @param {*} params
* @param {*} params
* {
* {
"
group
Id": "群id",
"
chat
Id": "群id",
"
memberN
ame": "成员名称",
"
n
ame": "成员名称",
"pageNum": "",
"pageNum": "",
"pageSize": ""
"pageSize": ""
}
}
...
...
linkwe-ui/src/api/customer/index.js
View file @
16f225c
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
const
service
=
window
.
CONFIG
.
services
.
wecom
+
'/customer'
let
getway
=
window
.
CONFIG
.
services
.
wecom
const
service
=
getway
+
'/customer'
/**
/**
* 客户列表
* 客户列表
...
@@ -165,7 +166,6 @@ export function jobExtends(data) {
...
@@ -165,7 +166,6 @@ export function jobExtends(data) {
* delFlag: 1 用户是否流失 0 未流失,1流失
* delFlag: 1 用户是否流失 0 未流失,1流失
*/
*/
export
function
getDetail
(
params
)
{
export
function
getDetail
(
params
)
{
params
.
delFlag
=
1
return
request
({
return
request
({
url
:
service
+
'/findWeCustomerBaseInfo'
,
url
:
service
+
'/findWeCustomerBaseInfo'
,
params
params
...
@@ -178,12 +178,12 @@ export function getDetail(params) {
...
@@ -178,12 +178,12 @@ export function getDetail(params) {
* externalUserid 是 当前客户id
* externalUserid 是 当前客户id
* delFlag: 1 用户是否流失 0 未流失,1流失
* delFlag: 1 用户是否流失 0 未流失,1流失
*/
*/
export
function
getSummary
(
externalUserid
)
{
export
function
getSummary
(
{
externalUserid
,
delFlag
}
)
{
return
request
({
return
request
({
url
:
service
+
'/findWeCustomerInfoSummary'
,
url
:
service
+
'/findWeCustomerInfoSummary'
,
params
:
{
params
:
{
externalUserid
,
externalUserid
,
delFlag
:
1
delFlag
}
}
})
})
}
}
...
@@ -195,13 +195,13 @@ export function getSummary(externalUserid) {
...
@@ -195,13 +195,13 @@ export function getSummary(externalUserid) {
* delFlag: 1 用户是否流失 0 未流失,1流失
* delFlag: 1 用户是否流失 0 未流失,1流失
* @returns
* @returns
*/
*/
export
function
getCustomerInfoByUserId
(
externalUserid
,
userId
)
{
export
function
getCustomerInfoByUserId
(
{
externalUserid
,
userId
,
delFlag
}
)
{
return
request
({
return
request
({
url
:
service
+
'/findWeCustomerInfoByUserId'
,
url
:
service
+
'/findWeCustomerInfoByUserId'
,
params
:
{
params
:
{
externalUserid
,
externalUserid
,
userId
,
userId
,
delFlag
:
1
delFlag
}
}
})
})
}
}
...
@@ -222,3 +222,14 @@ export function getFollowUpRecord(params) {
...
@@ -222,3 +222,14 @@ export function getFollowUpRecord(params) {
params
params
})
})
}
}
/**
* 客户轨迹同步/同步指定客户个人朋友圈互动数据
* @param {*} userIds 指定员工id,多个用逗号隔开
* @returns
*/
export
function
syncTrack
(
userIds
)
{
return
request
({
url
:
getway
+
`/moments/synchMomentsInteracte`
})
}
linkwe-ui/src/utils/request.js
View file @
16f225c
...
@@ -14,7 +14,7 @@ const service = axios.create({
...
@@ -14,7 +14,7 @@ const service = axios.create({
})
})
// request拦截器
// request拦截器
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
config
=>
{
(
config
)
=>
{
// 是否需要设置 token
// 是否需要设置 token
const
isToken
=
(
config
.
headers
||
{}).
isToken
===
false
const
isToken
=
(
config
.
headers
||
{}).
isToken
===
false
if
(
getToken
()
&&
!
isToken
)
{
if
(
getToken
()
&&
!
isToken
)
{
...
@@ -22,7 +22,7 @@ service.interceptors.request.use(
...
@@ -22,7 +22,7 @@ service.interceptors.request.use(
}
}
return
config
return
config
},
},
error
=>
{
(
error
)
=>
{
console
.
log
(
error
)
console
.
log
(
error
)
Promise
.
reject
(
error
)
Promise
.
reject
(
error
)
}
}
...
@@ -30,7 +30,7 @@ service.interceptors.request.use(
...
@@ -30,7 +30,7 @@ service.interceptors.request.use(
// 响应拦截器
// 响应拦截器
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
res
=>
{
(
res
)
=>
{
// 未设置状态码则默认成功状态
// 未设置状态码则默认成功状态
const
code
=
res
.
data
.
code
||
200
const
code
=
res
.
data
.
code
||
200
// 获取错误信息
// 获取错误信息
...
@@ -69,7 +69,7 @@ service.interceptors.response.use(
...
@@ -69,7 +69,7 @@ service.interceptors.response.use(
return
Promise
.
reject
()
return
Promise
.
reject
()
}
}
},
},
error
=>
{
(
error
)
=>
{
console
.
log
(
'err'
+
error
)
console
.
log
(
'err'
+
error
)
let
{
message
,
response
,
config
}
=
error
let
{
message
,
response
,
config
}
=
error
if
(
message
==
'Network Error'
)
{
if
(
message
==
'Network Error'
)
{
...
...
linkwe-ui/src/views/customerManage/customer/infoTab.vue
View file @
16f225c
...
@@ -47,7 +47,7 @@ export default {
...
@@ -47,7 +47,7 @@ export default {
* externalUserid 是 当前客户id
* externalUserid 是 当前客户id
*/
*/
getSummary
()
{
getSummary
()
{
getSummary
(
this
.
$route
.
query
.
externalUserid
).
then
(({
data
})
=>
{
getSummary
(
this
.
$route
.
query
).
then
(({
data
})
=>
{
// {
// {
// 'companyTags':[{ //企业标签
// 'companyTags':[{ //企业标签
// 'userName':'',//添加人
// 'userName':'',//添加人
...
@@ -74,7 +74,7 @@ export default {
...
@@ -74,7 +74,7 @@ export default {
*客户画像单个跟进人
*客户画像单个跟进人
*/
*/
getCustomerInfoByUserId
()
{
getCustomerInfoByUserId
()
{
getCustomerInfoByUserId
(
this
.
$route
.
query
.
externalUserid
,
this
.
userId
).
then
(({
data
})
=>
{
getCustomerInfoByUserId
(
this
.
$route
.
query
).
then
(({
data
})
=>
{
this
.
portrayalSum
=
data
this
.
portrayalSum
=
data
})
})
},
},
...
@@ -86,9 +86,7 @@ export default {
...
@@ -86,9 +86,7 @@ export default {
this
.
active
=
type
this
.
active
=
type
},
},
sync
()
{
sync
()
{
this
.
openTrack
=
[
'0'
]
this
.
$refs
[
'record'
][
this
.
active
].
sync
()
this
.
active
=
'0'
this
.
$refs
[
'record'
][
0
].
$forceUpdate
()
}
}
}
}
}
}
...
@@ -211,7 +209,7 @@ export default {
...
@@ -211,7 +209,7 @@ export default {
<div
class=
"right"
>
<div
class=
"right"
>
<el-card>
<el-card>
<div
slot=
"header"
>
<div
slot=
"header"
>
<span
class=
"card-title"
>
客户轨迹
</span>
<span
class=
"card-title"
@
click=
"sync"
>
客户轨迹
</span>
<ButtonSync
class=
"btn-sync"
:lastSyncTime=
"lastSyncTime"
@
click=
"sync"
<ButtonSync
class=
"btn-sync"
:lastSyncTime=
"lastSyncTime"
@
click=
"sync"
>
同步
</ButtonSync
>
同步
</ButtonSync
...
...
linkwe-ui/src/views/customerManage/customer/record.vue
View file @
16f225c
<
script
>
<
script
>
import
{
getFollowUpRecord
}
from
'@/api/customer'
import
{
getFollowUpRecord
,
syncTrack
}
from
'@/api/customer'
import
{
dictTrackState
}
from
'@/utils/dictionary'
import
{
dictTrackState
}
from
'@/utils/dictionary'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
...
@@ -68,6 +68,18 @@ export default {
...
@@ -68,6 +68,18 @@ export default {
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
},
sync
()
{
this
.
loading
=
true
syncTrack
(
this
.
userId
)
.
then
(()
=>
{
this
.
getList
(
1
)
this
.
msgSuccess
(
'后台开始同步数据,请稍后关注进度'
)
})
.
catch
((
fail
)
=>
{
this
.
loading
=
false
console
.
error
(
fail
)
})
}
}
}
}
}
}
...
@@ -76,7 +88,7 @@ export default {
...
@@ -76,7 +88,7 @@ export default {
<
template
>
<
template
>
<div
v-loading=
"loading"
>
<div
v-loading=
"loading"
>
<template
v-if=
"viewType"
>
<template
v-if=
"viewType"
>
<el-table
:data=
"list"
v-loading=
"loading"
>
<el-table
:data=
"list"
>
<el-table-column
label=
"员工"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"员工"
align=
"center"
prop=
"userName"
/>
<el-table-column
label=
"跟进记录"
align=
"center"
prop=
"trackContent"
/>
<el-table-column
label=
"跟进记录"
align=
"center"
prop=
"trackContent"
/>
<el-table-column
prop=
"trackState"
label=
"跟进状态"
align=
"center"
>
<el-table-column
prop=
"trackState"
label=
"跟进状态"
align=
"center"
>
...
...
linkwe-ui/src/views/customerManage/customerDetail.vue
View file @
16f225c
...
@@ -36,22 +36,22 @@ export default {
...
@@ -36,22 +36,22 @@ export default {
this
.
getDetail
()
this
.
getDetail
()
},
},
methods
:
{
methods
:
{
updateBirthday
()
{
//
updateBirthday() {
if
(
!
this
.
birthday
||
this
.
birthday
==
this
.
customer
.
birthday
)
{
//
if (!this.birthday || this.birthday == this.customer.birthday) {
return
//
return
}
//
}
let
data
=
{
//
let data = {
externalUserid
:
this
.
customer
.
externalUserid
,
//
externalUserid: this.customer.externalUserid,
birthday
:
this
.
birthday
,
//
birthday: this.birthday,
firstUserId
:
this
.
customer
.
firstUserId
//
firstUserId: this.customer.firstUserId
}
//
}
updateBirthday
(
data
).
then
((
response
)
=>
{
//
updateBirthday(data).then((response) => {
this
.
msgSuccess
(
'操作成功'
)
//
this.msgSuccess('操作成功')
// this.getDetail()
//
// this.getDetail()
this
.
$set
(
this
.
customer
,
'birthday'
,
this
.
birthday
)
//
this.$set(this.customer, 'birthday', this.birthday)
// this.datePickerVisible = false
//
// this.datePickerVisible = false
})
//
})
},
//
},
/**
/**
*客户详情基础(基础信息+社交关系)
*客户详情基础(基础信息+社交关系)
* @param {*}
* @param {*}
...
...
linkwe-ui/src/views/customerManage/group.vue
View file @
16f225c
...
@@ -207,7 +207,7 @@ export default {
...
@@ -207,7 +207,7 @@ export default {
<el-button
v-hasPermi=
"['customerManage:group:query']"
type=
"primary"
@
click=
"getList(1)"
<el-button
v-hasPermi=
"['customerManage:group:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button
>
查询
</el-button
>
>
<el-button
v-hasPermi=
"['customerManage:group:query']"
type=
"
info
"
@
click=
"resetQuery"
<el-button
v-hasPermi=
"['customerManage:group:query']"
type=
"
success
"
@
click=
"resetQuery"
>
重置
</el-button
>
重置
</el-button
>
>
<!-- <el-button v-hasPermi="['customerManage:group:export']" type="success" @click="handleExport"
<!-- <el-button v-hasPermi="['customerManage:group:export']" type="success" @click="handleExport"
...
@@ -272,7 +272,7 @@ export default {
...
@@ -272,7 +272,7 @@ export default {
@
click=
"
@
click=
"
$router.push(
{
$router.push(
{
path: 'groupDetail',
path: 'groupDetail',
query:
scope.row
query:
{ chatId: scope.row.chatId }
})
})
"
"
v-hasPermi="['customerManage:group:view']"
v-hasPermi="['customerManage:group:view']"
...
...
linkwe-ui/src/views/customerManage/groupDetail.vue
View file @
16f225c
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
query
:
{
query
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
group
Id
:
undefined
,
chat
Id
:
undefined
,
name
:
undefined
name
:
undefined
},
},
dictJoinGroupType
,
dictJoinGroupType
,
...
@@ -34,25 +34,21 @@ export default {
...
@@ -34,25 +34,21 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
group
=
this
.
$route
.
query
this
.
query
.
chatId
=
this
.
$route
.
query
.
chatId
this
.
query
.
chatId
=
this
.
group
.
chatId
this
.
getDetail
()
// this.getDetail()
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
getDetail
()
{
getDetail
()
{
api
.
getDetail
(
this
.
query
.
chatId
).
then
((
res
)
=>
{
api
.
getDetail
(
this
.
query
.
chatId
).
then
(({
data
})
=>
{
if
(
res
.
code
==
200
)
{
// this.group = Object.assign({}, this.group, res.data)
this
.
group
=
Object
.
assign
({},
this
.
group
,
res
.
data
)
// console.log(this.group)
// console.log(this.group)
this
.
group
.
createTime
=
moment
(
this
.
group
.
createTime
).
format
(
'YYYY-MM-DD HH:mm:SS'
)
// this.group.createTime = moment(this.group.createTime).format('YYYY-MM-DD HH:mm:SS')
if
(
this
.
group
.
tagIds
)
{
if
(
data
.
tagIds
)
{
let
arr
=
this
.
group
.
tagIds
.
split
(
','
)
data
.
tagIds
=
data
.
tagIds
.
split
(
','
)
this
.
selectedTag
=
arr
.
map
((
dd
)
=>
{
data
.
tags
=
data
.
tags
.
split
(
','
)
return
{
tagId
:
dd
}
})
}
}
}
this
.
group
=
data
})
})
},
},
getList
(
page
)
{
getList
(
page
)
{
...
@@ -86,7 +82,7 @@ export default {
...
@@ -86,7 +82,7 @@ export default {
submitSelectTag
(
data
)
{
submitSelectTag
(
data
)
{
this
.
loading
=
true
this
.
loading
=
true
api
api
.
makeGroupTag
(
this
,
{
.
makeGroupTag
({
chatId
:
this
.
query
.
chatId
,
chatId
:
this
.
query
.
chatId
,
weeGroupTagRel
:
data
.
map
((
row
)
=>
({
weeGroupTagRel
:
data
.
map
((
row
)
=>
({
chatId
:
this
.
query
.
chatId
,
chatId
:
this
.
query
.
chatId
,
...
@@ -96,7 +92,7 @@ export default {
...
@@ -96,7 +92,7 @@ export default {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
loading
=
false
this
.
loading
=
false
// this.getGroup
Detail()
this
.
get
Detail
()
this
.
msgSuccess
(
'操作成功'
)
this
.
msgSuccess
(
'操作成功'
)
}
}
})
})
...
@@ -169,7 +165,7 @@ export default {
...
@@ -169,7 +165,7 @@ export default {
<span
class=
"line"
></span>
<span
class=
"line"
></span>
<div>
<div>
<div
class=
"value"
>
<div
class=
"value"
>
{{ group.
joinGroup
MemberNum || 0 }}
{{ group.
toDay
MemberNum || 0 }}
</div>
</div>
<div
class=
"key"
>
今日进群数
</div>
<div
class=
"key"
>
今日进群数
</div>
</div>
</div>
...
...
linkwe-ui/src/views/customerManage/lossRemind.vue
View file @
16f225c
...
@@ -290,7 +290,7 @@ export default {
...
@@ -290,7 +290,7 @@ export default {
query
:
{
query
:
{
externalUserid
:
row
.
externalUserid
,
externalUserid
:
row
.
externalUserid
,
userId
:
row
.
firstUserId
,
userId
:
row
.
firstUserId
,
delFlag
:
row
.
delFlag
delFlag
:
1
}
}
}
)
}
)
"
"
...
...
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