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 7d2cefdc
authored
Jun 12, 2023
by
怪兽?别跑
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update
1 parent
fdc57864
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
127 additions
and
125 deletions
linkwe-pc/src/views/customerManage/customerDetail.vue
linkwe-pc/src/views/customerManage/customerDetail.vue
View file @
7d2cefd
<
script
>
<
script
>
import
{
import
{
updateBirthday
,
updateBirthday
,
getDetail
,
getDetail
,
findCustomerAddWay
,
findCustomerAddWay
,
getFollowUpRecord
,
getFollowUpRecord
,
getCustomerInfoByUserId
,
getCustomerInfoByUserId
}
from
'@/api/customer'
}
from
'@/api/customer'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
import
{
dictJoinGroupType
,
dictTrackState
}
from
'@/utils/dictionary'
import
{
dictJoinGroupType
,
dictTrackState
}
from
'@/utils/dictionary'
import
InfoTab
from
'./customer/infoTab.vue'
import
InfoTab
from
'./customer/infoTab.vue'
export
default
{
export
default
{
name
:
'CustomerDetail'
,
name
:
'CustomerDetail'
,
components
:
{
InfoTab
},
components
:
{
InfoTab
},
data
()
{
data
()
{
return
{
return
{
datePickerVisible
:
false
,
datePickerVisible
:
false
,
customer
:
{
customer
:
{
// weFlowerCustomerRels: [{}]
// weFlowerCustomerRels: [{}]
},
birthday
:
''
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
>
Date
.
now
()
},
},
},
birthday
:
''
,
dictAddType
:
{},
pickerOptions
:
{
dictJoinGroupType
,
disabledDate
(
time
)
{
dictTrackState
,
return
time
.
getTime
()
>
Date
.
now
()
}
},
dictAddType
:
{},
dictJoinGroupType
,
dictTrackState
,
active
:
0
,
active
:
0
,
openedTabs
:
[
'0'
],
openedTabs
:
[
'0'
]
}
}
},
created
()
{
this
.
findCustomerAddWay
()
this
.
getDetail
()
this
.
getStage
()
},
methods
:
{
findCustomerAddWay
()
{
findCustomerAddWay
().
then
(({
data
})
=>
{
data
.
forEach
((
element
)
=>
{
this
.
dictAddType
[
element
.
code
]
=
element
.
value
})
})
},
getStage
()
{
getList
().
then
((
res
)
=>
{
this
.
stageList
=
res
.
data
})
},
},
setValue
(
data
)
{
created
()
{
let
str
=
''
this
.
findCustomerAddWay
()
this
.
stageList
.
forEach
((
dd
)
=>
{
this
.
getDetail
()
if
(
dd
.
stageVal
==
data
)
{
this
.
getStage
()
str
=
dd
.
stageKey
}
})
return
str
},
},
// updateBirthday() {
methods
:
{
// if (!this.birthday || this.birthday == this.customer.birthday) {
findCustomerAddWay
()
{
// return
api
.
findCustomerAddWay
().
then
(({
data
})
=>
{
// }
data
.
forEach
((
element
)
=>
{
// let data = {
this
.
dictAddType
[
element
.
code
]
=
element
.
value
// externalUserid: this.customer.externalUserid,
})
// birthday: this.birthday,
})
// firstUserId: this.customer.firstUserId
},
// }
getStage
()
{
// updateBirthday(data).then((response) => {
getList
().
then
((
res
)
=>
{
// this.msgSuccess('操作成功')
this
.
stageList
=
res
.
data
// // this.getDetail()
})
// this.$set(this.customer, 'birthday', this.birthday)
},
// // this.datePickerVisible = false
setValue
(
data
)
{
// })
let
str
=
''
// },
this
.
stageList
.
forEach
((
dd
)
=>
{
/**
if
(
dd
.
stageVal
==
data
)
{
*客户详情基础(基础信息+社交关系)
str
=
dd
.
stageKey
* @param {*}
}
* externalUserid 是 当前客户id
})
* userId 是 当前跟进人id
return
str
*/
},
getDetail
()
{
// updateBirthday() {
getDetail
({
...
this
.
$route
.
query
,
delFlag
:
this
.
$route
.
query
.
isDelete
?
1
:
0
}).
then
(({
data
})
=>
{
// if (!this.birthday || this.birthday == this.customer.birthday) {
data
.
companyTags
&&
(
data
.
companyTags
=
data
.
companyTags
.
split
(
','
))
// return
this
.
customer
=
data
// }
// 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
:
this
.
$route
.
query
.
isDelete
?
1
:
0
}).
then
(({
data
})
=>
{
data
.
companyTags
&&
(
data
.
companyTags
=
data
.
companyTags
.
split
(
','
))
this
.
customer
=
data
if
(
data
.
trackUsers
&&
data
.
trackUsers
.
length
===
1
)
{
if
(
data
.
trackUsers
&&
data
.
trackUsers
.
length
===
1
)
{
this
.
openedTabs
=
[
data
.
trackUsers
[
0
].
trackUserId
]
this
.
openedTabs
=
[
data
.
trackUsers
[
0
].
trackUserId
]
}
}
this
.
birthday
=
data
.
birthday
this
.
birthday
=
data
.
birthday
})
})
},
},
changeTab
(
tab
)
{
changeTab
(
tab
)
{
this
.
openedTabs
.
includes
(
tab
.
$attrs
.
id
)
||
this
.
openedTabs
.
push
(
tab
.
$attrs
.
id
)
this
.
openedTabs
.
includes
(
tab
.
$attrs
.
id
)
||
this
.
openedTabs
.
push
(
tab
.
$attrs
.
id
)
},
}
// remark(item) {
// remark(item) {
// return (
// return (
// item.remark ||
// item.remark ||
// this.customer.customerName + (item.remarkCorpName ? '-' + item.remarkCorpName : '')
// this.customer.customerName + (item.remarkCorpName ? '-' + item.remarkCorpName : '')
// )
// )
// }
// }
},
}
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -180,11 +180,13 @@ export default {
...
@@ -180,11 +180,13 @@ export default {
v
-
for
=
"(item, index) of customer.trackUsers"
v
-
for
=
"(item, index) of customer.trackUsers"
:
key
=
"index"
:
key
=
"index"
:
label
=
"item.userName"
:
label
=
"item.userName"
:
id
=
"item.trackUserId"
>
:
id
=
"item.trackUserId"
>
<
info
-
tab
<
info
-
tab
v
-
if
=
"openedTabs.includes(item.trackUserId)"
v
-
if
=
"openedTabs.includes(item.trackUserId)"
:
stageList
=
"stageList"
:
stageList
=
"stageList"
:
userId
=
"item.trackUserId"
><
/info-tab
>
:
userId
=
"item.trackUserId"
><
/info-tab
>
<
/el-tab-pane
>
<
/el-tab-pane
>
<
/el-tabs
>
<
/el-tabs
>
<
/div
>
<
/div
>
...
@@ -192,32 +194,32 @@ export default {
...
@@ -192,32 +194,32 @@ export default {
<
/template
>
<
/template
>
<
style
lang
=
"scss"
scoped
>
<
style
lang
=
"scss"
scoped
>
.
avatar
{
.
avatar
{
width
:
80
px
;
width
:
80
px
;
height
:
80
px
;
height
:
80
px
;
border
-
radius
:
var
(
--
border
-
radius
-
big
);
border
-
radius
:
var
(
--
border
-
radius
-
big
);
flex
:
none
;
flex
:
none
;
}
}
.
info
-
wrap
{
.
info
-
wrap
{
margin
-
left
:
20
px
;
margin
-
left
:
20
px
;
.
info
{
.
info
{
color
:
#
aaa
;
color
:
#
aaa
;
line
-
height
:
32
px
;
line
-
height
:
32
px
;
}
}
}
}
.
el
-
icon
-
s
-
custom
{
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
font
-
size
:
16
px
;
margin
-
left
:
4
px
;
margin
-
left
:
4
px
;
color
:
#
999
;
color
:
#
999
;
&
.
man
{
&
.
man
{
color
:
#
13
a2e8
;
color
:
#
13
a2e8
;
}
&
.
woman
{
color
:
#
f753b2
;
}
}
}
&
.
woman
{
.
g
-
card
-
title
{
color
:
#
f753b2
;
margin
-
bottom
:
5
px
;
}
}
}
.
g
-
card
-
title
{
margin
-
bottom
:
5
px
;
}
<
/style
>
<
/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