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 09744465
authored
Jun 09, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户添加方式字典
1 parent
6a9a918c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
76 deletions
linkwe-pc/src/utils/dictionary.js
linkwe-pc/src/views/customerManage/customer.vue
linkwe-pc/src/views/customerManage/customerDetail.vue
linkwe-pc/src/utils/dictionary.js
View file @
0974446
export
const
dictAddType
=
Object
.
freeze
({
0
:
'未知来源'
,
1
:
'扫描二维码'
,
2
:
'搜索手机号'
,
3
:
'名片分享'
,
4
:
'群聊'
,
5
:
'手机通讯录'
,
6
:
'微信联系人'
,
7
:
'来自微信好友的添加申请'
,
8
:
'安装第三方应用时自动添加的客服人员'
,
9
:
'搜索邮箱'
,
10
:
'视频号主页添加'
,
11
:
'员工活码'
,
12
:
'新客拉群'
,
13
:
'活动裂变'
,
201
:
'内部成员共享'
,
202
:
'管理员/负责人分配'
})
export
const
dictJoinGroupType
=
Object
.
freeze
({
export
const
dictJoinGroupType
=
Object
.
freeze
({
1
:
'由成员邀请入群(直接邀请入群)'
,
1
:
'由成员邀请入群(直接邀请入群)'
,
2
:
'由成员邀请入群(通过邀请链接入群)'
,
2
:
'由成员邀请入群(通过邀请链接入群)'
,
3
:
'通过扫描群二维码入群'
3
:
'通过扫描群二维码入群'
,
})
})
export
const
dictTrackState
=
Object
.
freeze
({
export
const
dictTrackState
=
Object
.
freeze
({
...
@@ -28,5 +9,5 @@ export const dictTrackState = Object.freeze({
...
@@ -28,5 +9,5 @@ export const dictTrackState = Object.freeze({
2
:
{
name
:
'跟进中'
,
color
:
'warning'
},
2
:
{
name
:
'跟进中'
,
color
:
'warning'
},
3
:
{
name
:
'已成交'
,
color
:
'success'
},
3
:
{
name
:
'已成交'
,
color
:
'success'
},
4
:
{
name
:
'无意向'
,
color
:
'info'
},
4
:
{
name
:
'无意向'
,
color
:
'info'
},
5
:
{
name
:
'已流失'
,
color
:
'danger'
}
5
:
{
name
:
'已流失'
,
color
:
'danger'
}
,
})
})
linkwe-pc/src/views/customerManage/customer.vue
View file @
0974446
<
script
>
<
script
>
import
*
as
api
from
'@/api/customer'
import
*
as
api
from
'@/api/customer'
import
{
getList
as
getListTag
}
from
'@/api/customer/tag'
import
{
getList
as
getListTag
}
from
'@/api/customer/tag'
import
AddTag
from
'@/components/AddTag'
import
AddTag
from
'@/components/AddTag'
import
SelectTag
from
'@/components/SelectTag'
import
SelectTag
from
'@/components/SelectTag'
import
DeleteTag
from
'@/components/DeleteTag'
import
DeleteTag
from
'@/components/DeleteTag'
import
{
dictAddType
,
dictTrackState
}
from
'@/utils/dictionary'
import
{
dictTrackState
}
from
'@/utils/dictionary'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
export
default
{
export
default
{
name
:
'Customer'
,
name
:
'Customer'
,
components
:
{
AddTag
,
SelectTag
,
DeleteTag
},
components
:
{
AddTag
,
SelectTag
,
DeleteTag
},
props
:
{},
props
:
{},
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
trackState
:
''
,
//跟进状态 1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
trackState
:
''
,
//跟进状态 1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
addMethod
:
''
,
//添加方式 0:未知来源;1:扫描二维码;2:搜索手机号;3:名片分享;4:群聊;5:手机通讯录;6:微信联系人;7:来自微信好友的添加申请;8:安装第三方应用时自动添加的客服人员;9:搜索邮箱;10:视频号主页添加;11:员工活码;12:新客拉群;13:活动裂变;201:内部成员共享;202:管理员/负责人分配
addMethod
:
''
,
//添加方式 0:未知来源;1:扫描二维码;2:搜索手机号;3:名片分享;4:群聊;5:手机通讯录;6:微信联系人;7:来自微信好友的添加申请;8:安装第三方应用时自动添加的客服人员;9:搜索邮箱;10:视频号主页添加;11:员工活码;12:新客拉群;13:活动裂变;201:内部成员共享;202:管理员/负责人分配
gender
:
''
,
//0-未知 1-男性 2-女性
gender
:
''
,
//0-未知 1-男性 2-女性
noTagCheck
:
false
noTagCheck
:
false
,
},
},
queryTag
:
[],
// 搜索框选择的标签
queryTag
:
[],
// 搜索框选择的标签
queryUser
:
[],
// 搜索框选择的添加人
queryUser
:
[],
// 搜索框选择的添加人
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
// 添加标签表单
// 添加标签表单
form
:
{
form
:
{
gourpName
:
''
,
gourpName
:
''
,
weTags
:
[]
weTags
:
[],
},
},
list
:
[],
// 客户列表
list
:
[],
// 客户列表
staffList
:
[],
// 所有员工列表
staffList
:
[],
// 所有员工列表
...
@@ -51,25 +51,26 @@
...
@@ -51,25 +51,26 @@
selectedTag
:
[],
// 选择的标签
selectedTag
:
[],
// 选择的标签
tagDialogType
:
{
tagDialogType
:
{
title
:
''
,
// 选择标签弹窗标题
title
:
''
,
// 选择标签弹窗标题
type
:
''
// 弹窗类型
type
:
''
,
// 弹窗类型
},
},
dictCustomerType
:
Object
.
freeze
({
1
:
'微信客户'
,
2
:
'企业客户'
}),
dictCustomerType
:
Object
.
freeze
({
1
:
'微信客户'
,
2
:
'企业客户'
}),
dictAddType
,
dictAddType
:
{}
,
dictTrackState
,
dictTrackState
,
multiObj
:
{
multiObj
:
{
state
:
'add'
,
// 'delete'
state
:
'add'
,
// 'delete'
title
:
'批量打标签'
,
title
:
'批量打标签'
,
showDialog
:
false
showDialog
:
false
,
},
},
multipleSelection
:
[],
// 多选数组
multipleSelection
:
[],
// 多选数组
mulSelectedTag
:
[],
mulSelectedTag
:
[],
deleteData
:
[],
deleteData
:
[],
deleteDialog
:
false
deleteDialog
:
false
,
}
}
},
},
watch
:
{},
watch
:
{},
computed
:
{},
computed
:
{},
created
()
{
created
()
{
this
.
findCustomerAddWay
()
this
.
getStage
()
this
.
getStage
()
this
.
getList
()
this
.
getList
()
this
.
getListTag
()
this
.
getListTag
()
...
@@ -78,11 +79,18 @@
...
@@ -78,11 +79,18 @@
'app/setBusininessDesc'
,
'app/setBusininessDesc'
,
`
`
<div>用于查看当前企业所有的客户列表及详细信息,支持对客户进行打标签。</div>
<div>用于查看当前企业所有的客户列表及详细信息,支持对客户进行打标签。</div>
`
`
,
)
)
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
findCustomerAddWay
()
{
findCustomerAddWay
().
then
(({
data
})
=>
{
data
.
forEach
((
element
)
=>
{
this
.
dictAddType
[
element
.
code
]
=
element
.
value
})
})
},
setValue
(
data
)
{
setValue
(
data
)
{
let
str
=
''
let
str
=
''
this
.
stageList
.
forEach
((
dd
)
=>
{
this
.
stageList
.
forEach
((
dd
)
=>
{
...
@@ -121,7 +129,7 @@
...
@@ -121,7 +129,7 @@
let
obj
=
{
let
obj
=
{
externalUserid
:
dd
.
externalUserid
,
externalUserid
:
dd
.
externalUserid
,
addTag
:
data
,
addTag
:
data
,
userId
:
dd
.
firstUserId
userId
:
dd
.
firstUserId
,
}
}
arr
.
push
(
obj
)
arr
.
push
(
obj
)
})
})
...
@@ -154,7 +162,7 @@
...
@@ -154,7 +162,7 @@
let
obj
=
{
let
obj
=
{
externalUserid
:
dd
.
externalUserid
,
externalUserid
:
dd
.
externalUserid
,
addTag
:
data
,
addTag
:
data
,
userId
:
dd
.
firstUserId
userId
:
dd
.
firstUserId
,
}
}
arr
.
push
(
obj
)
arr
.
push
(
obj
)
})
})
...
@@ -201,7 +209,7 @@
...
@@ -201,7 +209,7 @@
element
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
element
.
tagIds
.
forEach
((
unit
,
index
)
=>
{
element
.
tags
.
push
({
element
.
tags
.
push
({
tagId
:
unit
,
tagId
:
unit
,
tagName
:
element
.
tagNames
[
index
]
tagName
:
element
.
tagNames
[
index
],
})
})
})
})
}
}
...
@@ -229,7 +237,7 @@
...
@@ -229,7 +237,7 @@
this
.
$refs
.
selectTag
.
getList
()
this
.
$refs
.
selectTag
.
getList
()
this
.
form
=
{
this
.
form
=
{
gourpName
:
''
,
gourpName
:
''
,
weTags
:
[]
weTags
:
[],
}
}
}
}
})
})
...
@@ -239,7 +247,7 @@
...
@@ -239,7 +247,7 @@
this
.
selectedTag
=
this
.
queryTag
this
.
selectedTag
=
this
.
queryTag
this
.
tagDialogType
=
{
this
.
tagDialogType
=
{
title
:
'选择标签'
,
title
:
'选择标签'
,
type
:
'query'
type
:
'query'
,
}
}
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
// this.$refs.selectTag.$forceUpdate()
// this.$refs.selectTag.$forceUpdate()
...
@@ -287,16 +295,16 @@
...
@@ -287,16 +295,16 @@
message
:
this
.
$createElement
(
message
:
this
.
$createElement
(
'i'
,
'i'
,
{
style
:
'color: red'
},
{
style
:
'color: red'
},
'已有标签['
+
hasErrorTag
+
']不在标签库中,已被删除或存在异常'
'已有标签['
+
hasErrorTag
+
']不在标签库中,已被删除或存在异常'
,
),
),
type
:
'warning'
,
type
:
'warning'
,
customClass
:
'mzindex'
customClass
:
'mzindex'
,
})
})
// this.msgError('已有标签[' + hasErrorTag + ']不在标签库中,已被删除或存在异常')
// this.msgError('已有标签[' + hasErrorTag + ']不在标签库中,已被删除或存在异常')
}
}
this
.
tagDialogType
=
{
this
.
tagDialogType
=
{
title
:
'标签设置'
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
)
title
:
'标签设置'
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
),
}
}
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
// this.$refs.selectTag.$forceUpdate()
// this.$refs.selectTag.$forceUpdate()
...
@@ -355,7 +363,7 @@
...
@@ -355,7 +363,7 @@
externalUserid
:
this
.
currentEidt
.
externalUserid
,
externalUserid
:
this
.
currentEidt
.
externalUserid
,
removeTag
:
deleteTag
,
removeTag
:
deleteTag
,
addTag
:
selected
,
addTag
:
selected
,
userId
:
this
.
currentEidt
.
firstUserId
userId
:
this
.
currentEidt
.
firstUserId
,
}
}
// let apiType = {
// let apiType = {
// add: 'makeLabel',
// add: 'makeLabel',
...
@@ -398,7 +406,7 @@
...
@@ -398,7 +406,7 @@
let
{
externalUserid
,
firstUserId
:
userId
}
=
row
let
{
externalUserid
,
firstUserId
:
userId
}
=
row
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'customerDetail'
,
path
:
'customerDetail'
,
query
:
{
externalUserid
,
userId
}
query
:
{
externalUserid
,
userId
},
})
})
},
},
...
@@ -412,7 +420,7 @@
...
@@ -412,7 +420,7 @@
let
data
=
{
let
data
=
{
handoverUserId
:
this
.
currentEidt
.
firstUserId
,
//移交人
handoverUserId
:
this
.
currentEidt
.
firstUserId
,
//移交人
takeoverUserId
:
this
.
extendStaff
,
//接受人
takeoverUserId
:
this
.
extendStaff
,
//接受人
externalUserid
:
this
.
currentEidt
.
externalUserid
//客户id,多个客户使用逗号隔开
externalUserid
:
this
.
currentEidt
.
externalUserid
,
//客户id,多个客户使用逗号隔开
}
}
api
.
jobExtends
(
data
).
then
((
res
)
=>
{
api
.
jobExtends
(
data
).
then
((
res
)
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
msgSuccess
(
'操作成功'
)
...
@@ -423,9 +431,9 @@
...
@@ -423,9 +431,9 @@
setData
(
data
)
{
setData
(
data
)
{
this
.
queryTag
=
[]
this
.
queryTag
=
[]
this
.
query
.
tagIds
=
''
this
.
query
.
tagIds
=
''
}
},
}
},
}
}
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -453,8 +461,7 @@
...
@@ -453,8 +461,7 @@
v-for=
"(item, index) in stageList"
v-for=
"(item, index) in stageList"
:key=
"index"
:key=
"index"
:label=
"item.stageKey"
:label=
"item.stageKey"
:value=
"item.stageVal"
:value=
"item.stageVal"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"添加方式"
prop=
"addMethod"
>
<el-form-item
label=
"添加方式"
prop=
"addMethod"
>
...
@@ -471,8 +478,7 @@
...
@@ -471,8 +478,7 @@
range-separator=
"至"
range-separator=
"至"
start-placeholder=
"开始日期"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
end-placeholder=
"结束日期"
align=
"right"
align=
"right"
></el-date-picker>
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户标签"
prop=
"customerType"
>
<el-form-item
label=
"客户标签"
prop=
"customerType"
>
<div
class=
"tag-input"
@
click=
"showTagDialog"
>
<div
class=
"tag-input"
@
click=
"showTagDialog"
>
...
@@ -528,8 +534,7 @@
...
@@ -528,8 +534,7 @@
:data=
"list"
:data=
"list"
tooltip-effect=
"dark"
tooltip-effect=
"dark"
highlight-current-row
highlight-current-row
@
selection-change=
"handleSelectionChange"
@
selection-change=
"handleSelectionChange"
>
>
<!-- -->
<!-- -->
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
></el-table-column>
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
></el-table-column>
<el-table-column
label=
"客户"
prop=
"customerName"
header-align=
"center"
align=
""
width=
"180"
>
<el-table-column
label=
"客户"
prop=
"customerName"
header-align=
"center"
align=
""
width=
"180"
>
...
@@ -589,8 +594,7 @@
...
@@ -589,8 +594,7 @@
@click="
@click="
dialogVisibleExtend
=
true
dialogVisibleExtend
=
true
currentEidt
=
row
currentEidt
=
row
"
">
>
在职继承
在职继承
</el-button>
</el-button>
</template>
</template>
...
@@ -602,8 +606,7 @@
...
@@ -602,8 +606,7 @@
:total="
total
"
:total="
total
"
:page.sync="
query
.
pageNum
"
:page.sync="
query
.
pageNum
"
:limit.sync="
query
.
pageSize
"
:limit.sync="
query
.
pageSize
"
@pagination="
getList
()
"
@pagination="
getList
()
" />
/>
</div>
</div>
<!-- 选择标签弹窗 -->
<!-- 选择标签弹窗 -->
...
@@ -612,8 +615,7 @@
...
@@ -612,8 +615,7 @@
:visible.sync="
dialogVisible
"
:visible.sync="
dialogVisible
"
:title="
tagDialogType
.
title
"
:title="
tagDialogType
.
title
"
:defaultValues="
selectedTag
"
:defaultValues="
selectedTag
"
@success="
submitSelectTag
"
@success="
submitSelectTag
">
>
<!-- <el-button class="
ml20
" type="
primary
" @click="
dialogVisibleAddTag
=
true
"
<!-- <el-button class="
ml20
" type="
primary
" @click="
dialogVisibleAddTag
=
true
"
>添加标签</el-button
>添加标签</el-button
> -->
> -->
...
@@ -640,27 +642,25 @@
...
@@ -640,27 +642,25 @@
:selected="
mulSelectedTag
"
:selected="
mulSelectedTag
"
:visible.sync="
multiObj
.
showDialog
"
:visible.sync="
multiObj
.
showDialog
"
:title="
multiObj
.
title
"
:title="
multiObj
.
title
"
@success="
getMultiOperation
"
@success="
getMultiOperation
"></SelectTag>
></SelectTag>
<DeleteTag
<DeleteTag
v-if="
deleteDialog
"
v-if="
deleteDialog
"
ref="
deleteTag
"
ref="
deleteTag
"
:visible.sync="
deleteDialog
"
:visible.sync="
deleteDialog
"
:initList="
deleteData
"
:initList="
deleteData
"
:selected="
deleteData
"
:selected="
deleteData
"
@success="
getDeleteData
"
@success="
getDeleteData
"></DeleteTag>
></DeleteTag>
</div>
</div>
</template>
</template>
<style lang="
scss
"
scoped
>
<style lang="
scss
"
scoped
>
.
avatar
{
.
avatar
{
width
:
56
px
;
width
:
56
px
;
height
:
56
px
;
height
:
56
px
;
flex
:
none
;
flex
:
none
;
border
-
radius
:
var
(
--
border
-
radius
-
big
);
border
-
radius
:
var
(
--
border
-
radius
-
big
);
}
}
.
el
-
icon
-
s
-
custom
{
.
el
-
icon
-
s
-
custom
{
font
-
size
:
16
px
;
font
-
size
:
16
px
;
// margin-left: 4px;
// margin-left: 4px;
color
:
#
999
;
color
:
#
999
;
...
@@ -670,13 +670,13 @@
...
@@ -670,13 +670,13 @@
&
.
woman
{
&
.
woman
{
color
:
#
f753b2
;
color
:
#
f753b2
;
}
}
}
}
.
bfc
-
d
+
.
bfc
-
d
.
el
-
checkbox
:
first
-
child
{
.
bfc
-
d
+
.
bfc
-
d
.
el
-
checkbox
:
first
-
child
{
margin
-
left
:
10
px
;
margin
-
left
:
10
px
;
}
}
<
/style
>
<
/style
>
<
style
>
<
style
>
.
mzindex
{
.
mzindex
{
z
-
index
:
5000
!
important
;
z
-
index
:
5000
!
important
;
}
}
<
/style
>
<
/style
>
linkwe-pc/src/views/customerManage/customerDetail.vue
View file @
0974446
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
updateBirthday
,
getDetail
,
getSummary
,
getFollowUpRecord
,
getCustomerInfoByUserId
}
from
'@/api/customer'
import
{
updateBirthday
,
getDetail
,
getSummary
,
getFollowUpRecord
,
getCustomerInfoByUserId
}
from
'@/api/customer'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
import
{
getList
}
from
'@/api/salesCenter/businessConver.js'
import
{
dict
AddType
,
dict
JoinGroupType
,
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
{
...
@@ -20,7 +20,7 @@ export default {
...
@@ -20,7 +20,7 @@ export default {
return
time
.
getTime
()
>
Date
.
now
()
return
time
.
getTime
()
>
Date
.
now
()
},
},
},
},
dictAddType
,
dictAddType
:
{}
,
dictJoinGroupType
,
dictJoinGroupType
,
dictTrackState
,
dictTrackState
,
...
@@ -29,10 +29,18 @@ export default {
...
@@ -29,10 +29,18 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
findCustomerAddWay
()
this
.
getDetail
()
this
.
getDetail
()
this
.
getStage
()
this
.
getStage
()
},
},
methods
:
{
methods
:
{
findCustomerAddWay
()
{
findCustomerAddWay
().
then
(({
data
})
=>
{
data
.
forEach
((
element
)
=>
{
this
.
dictAddType
[
element
.
code
]
=
element
.
value
})
})
},
getStage
()
{
getStage
()
{
getList
().
then
((
res
)
=>
{
getList
().
then
((
res
)
=>
{
this
.
stageList
=
res
.
data
this
.
stageList
=
res
.
data
...
...
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