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 64a7d9b3
authored
Oct 04, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客户列表修改
1 parent
bcfdb379
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
120 deletions
linkwe-ui/src/api/customer/index.js
linkwe-ui/src/views/customerManage/customer.vue
linkwe-ui/src/api/customer/index.js
View file @
64a7d9b
...
@@ -17,9 +17,9 @@ const service = window.CONFIG.services.wecom + '/customer'
...
@@ -17,9 +17,9 @@ const service = window.CONFIG.services.wecom + '/customer'
*/
*/
export
function
getList
(
params
)
{
export
function
getList
(
params
)
{
return
request
({
return
request
({
url
:
service
+
'/
l
ist'
,
url
:
service
+
'/
findWeCustomerL
ist'
,
method
:
'get'
,
method
:
'get'
,
params
,
params
})
})
}
}
...
@@ -28,7 +28,7 @@ export function getList(params) {
...
@@ -28,7 +28,7 @@ export function getList(params) {
*/
*/
export
function
sync
()
{
export
function
sync
()
{
return
request
({
return
request
({
url
:
service
+
'/synchWeCustomer'
,
url
:
service
+
'/synchWeCustomer'
})
})
}
}
...
@@ -48,7 +48,7 @@ export function makeLabel(data) {
...
@@ -48,7 +48,7 @@ export function makeLabel(data) {
return
request
({
return
request
({
url
:
service
+
'/makeLabel'
,
url
:
service
+
'/makeLabel'
,
method
:
'post'
,
method
:
'post'
,
data
,
data
})
})
}
}
...
@@ -68,7 +68,7 @@ export function removeLabel(data) {
...
@@ -68,7 +68,7 @@ export function removeLabel(data) {
return
request
({
return
request
({
url
:
service
+
'/removeLabel'
,
url
:
service
+
'/removeLabel'
,
method
:
'DELETE'
,
method
:
'DELETE'
,
data
,
data
})
})
}
}
...
@@ -84,7 +84,7 @@ export function updateBirthday(data) {
...
@@ -84,7 +84,7 @@ export function updateBirthday(data) {
return
request
({
return
request
({
url
:
service
,
url
:
service
,
method
:
'PUT'
,
method
:
'PUT'
,
data
,
data
})
})
}
}
...
@@ -93,7 +93,7 @@ export function exportCustomer(query) {
...
@@ -93,7 +93,7 @@ export function exportCustomer(query) {
return
request
({
return
request
({
url
:
service
+
'/export'
,
url
:
service
+
'/export'
,
method
:
'get'
,
method
:
'get'
,
params
:
query
,
params
:
query
})
})
}
}
...
@@ -103,7 +103,7 @@ export function exportCustomer(query) {
...
@@ -103,7 +103,7 @@ export function exportCustomer(query) {
*/
*/
export
function
getDetail
(
externalUserid
)
{
export
function
getDetail
(
externalUserid
)
{
return
request
({
return
request
({
url
:
service
+
'/getCustomersByUserId/'
+
externalUserid
,
url
:
service
+
'/getCustomersByUserId/'
+
externalUserid
})
})
}
}
...
@@ -113,16 +113,13 @@ export function getDetail(externalUserid) {
...
@@ -113,16 +113,13 @@ export function getDetail(externalUserid) {
*/
*/
export
function
lossRemind
(
status
)
{
export
function
lossRemind
(
status
)
{
return
request
({
return
request
({
url
:
url
:
window
.
CONFIG
.
services
.
wecom
+
'/corp/startCustomerChurnNoticeSwitch/'
+
status
,
window
.
CONFIG
.
services
.
wecom
+
method
:
'PUT'
'/corp/startCustomerChurnNoticeSwitch/'
+
status
,
method
:
'PUT'
,
})
})
}
}
export
function
getLossRemindStatus
(
status
)
{
export
function
getLossRemindStatus
(
status
)
{
return
request
({
return
request
({
url
:
window
.
CONFIG
.
services
.
wecom
+
'/corp/getCustomerChurnNoticeSwitch/'
,
url
:
window
.
CONFIG
.
services
.
wecom
+
'/corp/getCustomerChurnNoticeSwitch/'
})
})
}
}
linkwe-ui/src/views/customerManage/customer.vue
View file @
64a7d9b
...
@@ -166,9 +166,7 @@ export default {
...
@@ -166,9 +166,7 @@ export default {
}
}
this
.
tagDialogType
=
{
this
.
tagDialogType
=
{
title
:
title
:
(
type
===
'add'
?
'增加标签'
:
'移出标签'
)
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
),
(
type
===
'add'
?
'增加标签'
:
'移出标签'
)
+
(
repeat
.
length
?
'(重复的标签已去重显示)'
:
''
),
type
:
type
type
:
type
}
}
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
...
@@ -264,14 +262,7 @@ export default {
...
@@ -264,14 +262,7 @@ export default {
<
template
>
<
template
>
<div>
<div>
<el-form
<el-form
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
ref=
"queryForm"
:inline=
"true"
:model=
"query"
label-width=
"100px"
class=
"top-search"
size=
"small"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-form-item
label=
"客户名称"
prop=
"name"
>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -279,12 +270,7 @@ export default {
...
@@ -279,12 +270,7 @@ export default {
<div
class=
"tag-input"
@
click=
"dialogVisibleSelectUser = true"
>
<div
class=
"tag-input"
@
click=
"dialogVisibleSelectUser = true"
>
<span
class=
"tag-place"
v-if=
"!queryUser.length"
>
请选择
</span>
<span
class=
"tag-place"
v-if=
"!queryUser.length"
>
请选择
</span>
<template
v-else
>
<template
v-else
>
<el-tag
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
type=
"info"
v-for=
"(unit, unique) in queryUser"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag
>
</
template
>
</
template
>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -304,32 +290,14 @@ export default {
...
@@ -304,32 +290,14 @@ export default {
<div
class=
"tag-input"
@
click=
"showTagDialog"
>
<div
class=
"tag-input"
@
click=
"showTagDialog"
>
<span
class=
"tag-place"
v-if=
"!queryTag.length"
>
请选择
</span>
<span
class=
"tag-place"
v-if=
"!queryTag.length"
>
请选择
</span>
<
template
v-else
>
<
template
v-else
>
<el-tag
<el-tag
type=
"info"
v-for=
"(unit, unique) in queryTag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag>
type=
"info"
v-for=
"(unit, unique) in queryTag"
:key=
"unique"
>
{{
unit
.
name
}}
</el-tag
>
</
template
>
</
template
>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
" "
>
<el-form-item
label=
" "
>
<el-button
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"primary"
@
click=
"getList(1)"
>
查询
</el-button>
v-hasPermi=
"['customerManage:customer:query']"
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button>
type=
"primary"
<el-button
v-hasPermi=
"['customerManage:customer:export']"
type=
"info"
@
click=
"exportCustomer"
@
click=
"getList(1)"
>
查询
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:query']"
type=
"success"
@
click=
"resetForm()"
>
重置
</el-button
>
<el-button
v-hasPermi=
"['customerManage:customer:export']"
type=
"info"
@
click=
"exportCustomer"
>
导出列表
</el-button
>
导出列表
</el-button
>
>
</el-form-item>
</el-form-item>
...
@@ -340,18 +308,10 @@ export default {
...
@@ -340,18 +308,10 @@ export default {
<!-- 共
<!-- 共
<span class="num">{{ total }}</span> 位客户,实际客户
<span class="num">{{ total }}</span> 位客户,实际客户
<span class="num">{{ total }}</span> 位。 -->
<span class="num">{{ total }}</span> 位。 -->
<el-button
<el-button
v-hasPermi=
"['customerManage:customer:sync']"
v-preventReClick
type=
"primary"
@
click=
"sync"
v-hasPermi=
"['customerManage:customer:sync']"
v-preventReClick
type=
"primary"
@
click=
"sync"
>
同步客户
</el-button
>
同步客户
</el-button
>
>
<el-button
<el-button
v-hasPermi=
"['customerManage:customer:checkRepeat']"
type=
"primary"
>
查看重复客户
</el-button>
v-hasPermi=
"['customerManage:customer:checkRepeat']"
type=
"primary"
>
查看重复客户
</el-button
>
<!-- <div>
<!-- <div>
最近同步:2021-05-17 15:05:43
最近同步:2021-05-17 15:05:43
</div> -->
</div> -->
...
@@ -382,65 +342,42 @@ export default {
...
@@ -382,65 +342,42 @@ export default {
@
select=
"handleSelection"
@
select=
"handleSelection"
@
selection-change=
"handleSelectionChange"
@
selection-change=
"handleSelectionChange"
>
>
<el-table-column
<el-table-column
type=
"selection"
align=
"center"
width=
"55"
></el-table-column>
type=
"selection"
align=
"center"
width=
"55"
></el-table-column>
<el-table-column
label=
"客户"
prop=
"name"
align=
"center"
>
<el-table-column
label=
"客户"
prop=
"name"
align=
"center"
>
<
template
slot-scope=
"{ row }"
>
<
template
slot-scope=
"{ row }"
>
<div
class=
"cp"
@
click=
"goRoute(row)"
>
<div
class=
"cp"
@
click=
"goRoute(row)"
>
{{
row
.
n
ame
}}
{{
row
.
customerN
ame
}}
<span
:style=
"
{ color: row.type === 1 ? '#4bde03' : '#f9a90b' }">
{{
<
!--
<
span
:style=
"
{ color: row.type === 1 ? '#4bde03' : '#f9a90b' }">
{{
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
row
.
type
]
{
1
:
'@微信'
,
2
:
'@企业微信'
}
[
row
.
type
]
}}
<
/span
>
}}
<
/span
>
<
i
<
i
:
class
=
"
[
'el-icon-s-custom'
,
{
1
:
'man'
,
2
:
'woman'
}
[
row
.
gender
]]
"></i> -->
:
class
=
"
[
'el-icon-s-custom'
,
{
1
:
'man'
,
2
:
'woman'
}
[
row
.
gender
]
]
"
></i>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
<!-- <el-table-column prop="
corpName
" label="
公司名称
" align="
center
"></el-table-column> -->
prop="
corpName
"
label="
公司名称
"
align="
center
"
></el-table-column>
<el-table-column prop="
userName
" label="
添加人(首位)
" align="
center
">
<el-table-column prop="
userName
" label="
添加人(首位)
" align="
center
">
<template slot-scope="
{
row
}"
>
{{
<!-- <template slot-scope="
{
row
}"
>
{{
row
.
weFlowerCustomerRels
[
0
]
row
.
weFlowerCustomerRels
[
0
]
?
row
.
weFlowerCustomerRels
[
0
].
userName
:
''
?
row
.
weFlowerCustomerRels
[
0
].
userName
}}
<
/template> --
>
:
''
}}
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"createTime"
label
=
"添加时间"
align
=
"center"
>
<
el
-
table
-
column
prop
=
"firstAddTime"
label
=
"添加时间"
align
=
"center"
>
<
template
slot
-
scope
=
"
{
row
}"
>
{{
<!--
<
template
slot
-
scope
=
"
{
row
}"
>
{{
row
.
weFlowerCustomerRels
[
0
]
row
.
weFlowerCustomerRels
[
0
]
?
row
.
weFlowerCustomerRels
[
0
].
createTime
:
''
?
row
.
weFlowerCustomerRels
[
0
].
createTime
}}
<
/template> --
>
:
''
}}
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"address"
label
=
"标签"
align
=
"center"
>
<
el
-
table
-
column
prop
=
"tagNames"
label
=
"标签"
align
=
"center"
>
<
template
slot
-
scope
=
"
{
row
}
">
<
template
slot
-
scope
=
"
{
row
}
" v-if="
row
.
tagNames
">
<div v-for="
(
item
,
index
)
in
row
.
weFlowerCustomerRels
" :key="
index
">
<el-tag type="
info
" v-for="
(
unit
,
unique
)
in
row
.
tagNames
.
split
(
','
)
" :key="
unique
"
>
{{
unit
}}
<
/el-tag
>
<el-tag
<!--
<
div
v
-
for
=
"(item, index) in row.weFlowerCustomerRels"
:
key
=
"index"
>
type="
info
"
<
el
-
tag
type
=
"info"
v
-
for
=
"(unit, unique) in item.weFlowerCustomerTagRels"
:
key
=
"unique"
>
{{
v-for="
(
unit
,
unique
)
in
item
.
weFlowerCustomerTagRels
"
unit
.
tagName
:key="
unique
"
}}
<
/el-tag
>
>
{{
unit
.
tagName
}}
<
/el-ta
g
<
/div> --
>
>
<
/div
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
width
=
"100"
>
<
el
-
table
-
column
label
=
"操作"
width
=
"100"
>
<
template
slot
-
scope
=
"
{
row
}
">
<
template
slot
-
scope
=
"
{
row
}
">
<el-button
<el-button v-hasPermi="
[
'customerManage:customer:view'
]
" @click="
goRoute
(
row
)
" type="
text
" size="
small
"
v-hasPermi="
[
'customerManage:customer:view'
]
"
@click="
goRoute
(
row
)
"
type="
text
"
size="
small
"
>查看</el-button
>查看</el-button
>
>
<!-- <el-button type="
text
" size="
small
">编辑</el-button> -->
<!-- <el-button type="
text
" size="
small
">编辑</el-button> -->
...
@@ -466,25 +403,15 @@ export default {
...
@@ -466,25 +403,15 @@ export default {
@success="
submitSelectTag
"
@success="
submitSelectTag
"
>
>
<div class="
mt20
" v-show="
tagDialogType
.
type
===
'add'
">
<div class="
mt20
" v-show="
tagDialogType
.
type
===
'add'
">
<el-button type="
primary
" @click="
dialogVisibleAddTag
=
true
"
<el-button type="
primary
" @click="
dialogVisibleAddTag
=
true
">添加标签</el-button>
>添加标签</el-button
>
</div>
</div>
</SelectTag>
</SelectTag>
<!-- 选择添加人弹窗 -->
<!-- 选择添加人弹窗 -->
<SelectUser
<SelectUser :visible.sync="
dialogVisibleSelectUser
" title="
选择添加人
" @success="
selectedUser
"></SelectUser>
:visible.sync="
dialogVisibleSelectUser
"
title="
选择添加人
"
@success="
selectedUser
"
></SelectUser>
<!-- 添加标签弹窗 -->
<!-- 添加标签弹窗 -->
<AddTag
<AddTag :visible.sync="
dialogVisibleAddTag
" :form="
form
" @success="
getListTag
(
true
)
" />
:visible.sync="
dialogVisibleAddTag
"
:form="
form
"
@success="
getListTag
(
true
)
"
/>
</div>
</div>
</template>
</template>
...
...
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