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 efd36ad9
authored
Dec 14, 2022
by
姜鹏凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
离职继承优化
1 parent
2aa13666
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
113 deletions
linkwe-pc/src/views/customerManage/customerDetail.vue
linkwe-pc/src/views/customerManage/customerDetail.vue
View file @
efd36ad
<
script
>
import
{
updateBirthday
,
getDetail
,
getSummary
,
getFollowUpRecord
,
getCustomerInfoByUserId
,
}
from
'@/api/customer'
import
{
updateBirthday
,
getDetail
,
getSummary
,
getFollowUpRecord
,
getCustomerInfoByUserId
}
from
'@/api/customer'
import
{
dictAddType
,
dictJoinGroupType
,
dictTrackState
}
from
'@/utils/dictionary'
import
InfoTab
from
'./customer/infoTab.vue'
export
default
{
name
:
'CustomerDetail'
,
components
:
{
InfoTab
},
data
()
{
return
{
datePickerVisible
:
false
,
customer
:
{
// weFlowerCustomerRels: [{}]
},
birthday
:
''
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
import
{
dictAddType
,
dictJoinGroupType
,
dictTrackState
}
from
'@/utils/dictionary'
import
InfoTab
from
'./customer/infoTab.vue'
export
default
{
name
:
'CustomerDetail'
,
components
:
{
InfoTab
},
data
()
{
return
{
datePickerVisible
:
false
,
customer
:
{
// weFlowerCustomerRels: [{}]
},
},
dictAddType
,
dictJoinGroupType
,
dictTrackState
,
active
:
0
,
openedTabs
:
[
'0'
],
}
},
created
()
{
this
.
getDetail
()
},
methods
:
{
// updateBirthday() {
// if (!this.birthday || this.birthday == this.customer.birthday) {
// return
// }
// let data = {
// externalUserid: this.customer.externalUserid,
// birthday: this.birthday,
// firstUserId: this.customer.firstUserId
// }
// updateBirthday(data).then((response) => {
// this.msgSuccess('操作成功')
// // this.getDetail()
// this.$set(this.customer, 'birthday', this.birthday)
// // this.datePickerVisible = false
// })
// },
/**
*客户详情基础(基础信息+社交关系)
* @param {*}
* externalUserid 是 当前客户id
* userId 是 当前跟进人id
*/
getDetail
()
{
getDetail
(
this
.
$route
.
query
).
then
(({
data
})
=>
{
data
.
companyTags
&&
(
data
.
companyTags
=
data
.
companyTags
.
split
(
','
))
this
.
customer
=
data
birthday
:
''
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
}
},
dictAddType
,
dictJoinGroupType
,
dictTrackState
,
if
(
data
.
trackUsers
&&
data
.
trackUsers
.
length
===
1
)
{
this
.
openedTabs
=
[
data
.
trackUsers
[
0
].
trackUserId
]
}
this
.
birthday
=
data
.
birthday
})
active
:
0
,
openedTabs
:
[
'0'
]
}
},
c
hangeTab
(
tab
)
{
this
.
openedTabs
.
includes
(
tab
.
$attrs
.
id
)
||
this
.
openedTabs
.
push
(
tab
.
$attrs
.
id
)
c
reated
(
)
{
this
.
getDetail
(
)
},
methods
:
{
// updateBirthday() {
// if (!this.birthday || this.birthday == this.customer.birthday) {
// return
// }
// let data = {
// externalUserid: this.customer.externalUserid,
// birthday: this.birthday,
// firstUserId: this.customer.firstUserId
// }
// updateBirthday(data).then((response) => {
// this.msgSuccess('操作成功')
// // this.getDetail()
// this.$set(this.customer, 'birthday', this.birthday)
// // this.datePickerVisible = false
// })
// },
/**
*客户详情基础(基础信息+社交关系)
* @param {*}
* externalUserid 是 当前客户id
* userId 是 当前跟进人id
*/
getDetail
()
{
getDetail
({
...
this
.
$route
.
query
,
delFlag
:
1
}).
then
(({
data
})
=>
{
data
.
companyTags
&&
(
data
.
companyTags
=
data
.
companyTags
.
split
(
','
))
this
.
customer
=
data
// remark(item) {
// return (
// item.remark ||
// this.customer.customerName + (item.remarkCorpName ? '-' + item.remarkCorpName : '')
// )
// }
},
}
if
(
data
.
trackUsers
&&
data
.
trackUsers
.
length
===
1
)
{
this
.
openedTabs
=
[
data
.
trackUsers
[
0
].
trackUserId
]
}
this
.
birthday
=
data
.
birthday
})
},
changeTab
(
tab
)
{
this
.
openedTabs
.
includes
(
tab
.
$attrs
.
id
)
||
this
.
openedTabs
.
push
(
tab
.
$attrs
.
id
)
}
// remark(item) {
// return (
// item.remark ||
// this.customer.customerName + (item.remarkCorpName ? '-' + item.remarkCorpName : '')
// )
// }
}
}
</
script
>
<
template
>
<div>
<!--
<el-button
slot=
"append"
circle
icon=
"el-icon-back"
@
click=
"$router.back()"
></el-button>
返回 -->
<div
class=
"flex aic mb20"
@
click=
"goRoute(customer)"
>
<el-image
style=
"width: 80px; height: 80px"
:src=
"customer.avatar"
fit=
"fit"
></el-image>
<el-image
style=
"width: 80px; height: 80px
;
"
:src=
"customer.avatar"
fit=
"fit"
></el-image>
<div
class=
"ml10"
>
<div>
{{
customer
.
customerName
+
(
customer
.
corpName
?
'-'
+
customer
.
corpName
:
''
)
}}
...
...
@@ -112,10 +106,7 @@ export default {
<
/el-card> --
>
<
div
class
=
"card-title mb5"
>
社交关系
<
/div
>
<
el
-
tabs
value
=
"1"
>
<
el
-
tab
-
pane
:
label
=
"
`跟进员工(${customer.trackUsers ? customer.trackUsers.length : 0
}
)`"
name="
1
"
>
<
el
-
tab
-
pane
:
label
=
"
`跟进员工(${customer.trackUsers ? customer.trackUsers.length : 0
}
)`" name="
1
">
<el-table :data="
customer
.
trackUsers
">
<el-table-column label="
员工
" align="
center
" prop="
userName
" />
<el-table-column prop="
addMethod
" label="
添加方式
" align="
center
">
...
...
@@ -144,11 +135,7 @@ export default {
<
/el-tabs
>
<
el
-
tabs
value
=
"0"
@
tab
-
click
=
"changeTab"
>
<
el
-
tab
-
pane
v
-
if
=
"customer.trackUsers && customer.trackUsers.length > 1"
label
=
"客户画像汇总"
id
=
"0"
>
<
el
-
tab
-
pane
v
-
if
=
"customer.trackUsers && customer.trackUsers.length > 1"
label
=
"客户画像汇总"
id
=
"0"
>
<
info
-
tab
:
trackUsers
=
"customer.trackUsers"
><
/info-tab
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
...
...
@@ -157,42 +144,39 @@ export default {
:
label
=
"item.userName"
:
id
=
"item.trackUserId"
>
<
info
-
tab
v
-
if
=
"openedTabs.includes(item.trackUserId)"
:
userId
=
"item.trackUserId"
><
/info-tab
>
<
info
-
tab
v
-
if
=
"openedTabs.includes(item.trackUserId)"
:
userId
=
"item.trackUserId"
><
/info-tab
>
<
/el-tab-pane
>
<
/el-tabs
>
<
/div
>
<
/template
>
<
style
lang
=
"scss"
scoped
>
.
info
-
wrap
{
margin
-
left
:
20
px
;
.
info
{
color
:
#
aaa
;
line
-
height
:
32
px
;
.
info
-
wrap
{
margin
-
left
:
20
px
;
.
info
{
color
:
#
aaa
;
line
-
height
:
32
px
;
}
}
}
.
el
-
card
{
::
v
-
deep
.
el
-
card__header
{
border
:
0
;
}
}
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
margin
-
left
:
4
px
;
color
:
#
999
;
&
.
man
{
color
:
#
13
a2e8
;
.
el
-
card
{
::
v
-
deep
.
el
-
card__header
{
border
:
0
;
}
}
&
.
woman
{
color
:
#
f753b2
;
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
margin
-
left
:
4
px
;
color
:
#
999
;
&
.
man
{
color
:
#
13
a2e8
;
}
&
.
woman
{
color
:
#
f753b2
;
}
}
}
.
card
-
title
{
font
-
weight
:
600
;
}
.
card
-
title
{
font
-
weight
:
600
;
}
<
/style
>
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