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 41361203
authored
Nov 08, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
2.0客户页面构建
1 parent
86f89aec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
275 additions
and
57 deletions
linkwe-ui/.env.development
linkwe-ui/.env.production
linkwe-ui/src/api/customer/index.js
linkwe-ui/src/api/organization.js
linkwe-ui/src/views/customerManage/customer.vue
linkwe-ui/src/views/customerManage/customer/record.vue
linkwe-ui/src/views/customerManage/customer/track.vue
linkwe-ui/src/views/customerManage/customerDetail.vue
linkwe-ui/src/views/customerManage/group.vue
linkwe-ui/src/views/customerManage/groupDetail.vue
linkwe-ui/.env.development
View file @
4136120
...
...
@@ -2,7 +2,7 @@
ENV = 'development'
# 基础api(根据实际情况,自行配置,下为示例)
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/
test
-api'
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/
dev
-api'
# 路由基础路径
VUE_APP_BASE_URL = '/'
\ No newline at end of file
linkwe-ui/.env.production
View file @
4136120
...
...
@@ -2,7 +2,7 @@
ENV = 'production'
# 基础api
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/
test
-api'
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/
dev
-api'
# 路由基础路径
VUE_APP_BASE_URL = '/test/'
\ No newline at end of file
linkwe-ui/src/api/customer/index.js
View file @
4136120
...
...
@@ -149,3 +149,20 @@ export function getLossRemindStatus(status) {
url
:
window
.
CONFIG
.
services
.
wecom
+
'/corp/getCustomerChurnNoticeSwitch/'
})
}
/**
* 在职继承
* @param {*} data
{
handoverUserId: '', //移交人
takeoverUserId: '', //接受人
externalUserid: '' //客户id,多个客户使用逗号隔开
}
* @returns
*/
export
function
jobExtends
(
data
)
{
return
request
({
url
:
service
+
'/jobExtends'
,
method
:
'POST'
,
data
})
}
linkwe-ui/src/api/organization.js
View file @
4136120
...
...
@@ -14,7 +14,7 @@ const serviceUser = window.CONFIG.services.wecom + '/user'
export
function
getTree
(
params
)
{
return
request
({
url
:
service
+
'/list'
,
params
,
params
})
}
...
...
@@ -31,7 +31,7 @@ export function updateDepart(data) {
return
request
({
url
:
service
,
method
:
'put'
,
data
,
data
})
}
...
...
@@ -47,14 +47,14 @@ export function addDepart(data) {
return
request
({
url
:
service
,
method
:
'post'
,
data
,
data
})
}
export
function
removeDepart
(
ids
)
{
return
request
({
url
:
service
+
'/'
+
ids
,
method
:
'DELETE'
,
method
:
'DELETE'
})
}
...
...
@@ -76,7 +76,22 @@ export function removeDepart(ids) {
export
function
getList
(
params
)
{
return
request
({
url
:
serviceUser
+
'/list'
,
params
,
params
})
}
/**
* 获取所有员工的接口(不分页)
{
“isActivate” //1=已激活,2=已禁用,4=未激活,5=退出企业,
“isConfigCustomerContact”//1:是;0:否
}
* @returns
*/
export
function
getAllStaff
(
params
)
{
return
request
({
url
:
serviceUser
+
'/findAllWeUser'
,
params
})
}
...
...
@@ -86,7 +101,7 @@ export function getList(params) {
*/
export
function
getUserDetail
(
id
)
{
return
request
({
url
:
serviceUser
+
'/'
+
id
,
url
:
serviceUser
+
'/'
+
id
})
}
...
...
@@ -98,7 +113,7 @@ export function addUser(data) {
return
request
({
url
:
serviceUser
,
method
:
'post'
,
data
,
data
})
}
...
...
@@ -132,7 +147,7 @@ export function updateUser(data) {
return
request
({
url
:
serviceUser
,
method
:
'put'
,
data
,
data
})
}
...
...
@@ -148,7 +163,7 @@ export function startOrStop(data) {
return
request
({
url
:
serviceUser
+
'/startOrStop'
,
method
:
'put'
,
data
,
data
})
}
...
...
@@ -159,7 +174,7 @@ export function startOrStop(data) {
export
function
remove
(
userId
)
{
return
request
({
url
:
serviceUser
+
'/'
+
userId
,
method
:
'DELETE'
,
method
:
'DELETE'
})
}
...
...
@@ -168,6 +183,6 @@ export function remove(userId) {
*/
export
function
syncUser
()
{
return
request
({
url
:
serviceUser
+
'/synchWeUser'
,
url
:
serviceUser
+
'/synchWeUser'
})
}
linkwe-ui/src/views/customerManage/customer.vue
View file @
4136120
<
script
>
import
*
as
api
from
'@/api/customer'
import
{
getList
as
getListTag
}
from
'@/api/customer/tag'
import
{
get
List
as
getListOrganization
}
from
'@/api/organization'
import
{
get
AllStaff
}
from
'@/api/organization'
import
AddTag
from
'@/components/AddTag'
import
SelectUser
from
'@/components/SelectUser'
import
SelectTag
from
'@/components/SelectTag'
...
...
@@ -29,19 +29,23 @@ export default {
queryUser
:
[],
// 搜索框选择的添加人
dateRange
:
[],
// 添加日期
loading
:
false
,
isMoreFilter
:
false
,
total
:
0
,
lastSyncTime
:
''
,
noRepeatCustomerTotal
:
0
,
// 添加标签表单
form
:
{
gourpName
:
''
,
weTags
:
[]
},
list
:
[],
// 客户列表
listOrganization
:
[],
// 组织架构
列表
staffList
:
[],
// 所有员工
列表
multipleSelection
:
[],
// 多选数组
dialogVisible
:
false
,
// 选择标签弹窗显隐
dialogVisibleSelectUser
:
false
,
// 选择添加人弹窗显隐
dialogVisibleAddTag
:
false
,
// 添加标签弹窗显隐
dialogVisibleExtend
:
false
,
// 在职继承弹窗显隐
extendStaff
:
''
,
// 在职继承选择的员工
currentEidt
:
''
,
// 当前编辑项
selectedTag
:
[],
// 选择的标签
tagDialogType
:
{
title
:
''
,
// 选择标签弹窗标题
...
...
@@ -68,10 +72,10 @@ export default {
}),
dictStatus
:
Object
.
freeze
({
1
:
{
name
:
'待跟进'
,
color
:
''
},
2
:
{
name
:
'跟进中'
,
color
:
''
},
3
:
{
name
:
'已成交'
,
color
:
''
},
4
:
{
name
:
'无意向'
,
color
:
''
},
5
:
{
name
:
'已流失'
,
color
:
''
}
2
:
{
name
:
'跟进中'
,
color
:
'
warning
'
},
3
:
{
name
:
'已成交'
,
color
:
'
success
'
},
4
:
{
name
:
'无意向'
,
color
:
'
info
'
},
5
:
{
name
:
'已流失'
,
color
:
'
danger
'
}
})
}
},
...
...
@@ -80,7 +84,7 @@ export default {
created
()
{
this
.
getList
()
this
.
getListTag
()
this
.
get
ListOrganization
()
this
.
get
AllStaff
()
this
.
$store
.
dispatch
(
'app/setBusininessDesc'
,
...
...
@@ -148,9 +152,9 @@ export default {
}
})
},
get
ListOrganization
()
{
get
ListOrganization
().
then
(({
rows
})
=>
{
this
.
listOrganization
=
Object
.
freeze
(
rows
)
get
AllStaff
()
{
get
AllStaff
().
then
(({
data
})
=>
{
this
.
staffList
=
Object
.
freeze
(
data
)
})
},
showTagDialog
()
{
...
...
@@ -163,6 +167,7 @@ export default {
// this.$refs.selectTag.$forceUpdate()
},
makeTag
(
row
)
{
this
.
currentEidt
=
row
// if (!this.multipleSelection.length) {
// this.msgInfo('请选择一位客户')
// return
...
...
@@ -264,9 +269,9 @@ export default {
this
.
dialogVisible
=
false
}
else
{
let
data
=
{
externalUserid
:
this
.
multipleSelection
[
0
]
.
externalUserid
,
externalUserid
:
this
.
currentEidt
.
externalUserid
,
addTag
:
selected
,
userId
:
this
.
multipleSelection
[
0
]
.
firstUserId
userId
:
this
.
currentEidt
.
firstUserId
}
// let apiType = {
// add: 'makeLabel',
...
...
@@ -302,6 +307,24 @@ export default {
path
:
'customerDetail'
,
query
:
{
data
:
JSON
.
stringify
(
row
)
}
})
},
// 在职继承
transfer
(
row
)
{
if
(
!
this
.
extendStaff
)
{
this
.
msgError
(
'请选择员工'
)
return
}
let
data
=
{
handoverUserId
:
this
.
currentEidt
.
firstUserId
,
//移交人
takeoverUserId
:
this
.
extendStaff
,
//接受人
externalUserid
:
this
.
currentEidt
.
externalUserid
//客户id,多个客户使用逗号隔开
}
api
.
jobExtends
(
data
).
then
((
res
)
=>
{
this
.
msgSuccess
(
'操作成功'
)
this
.
dialogVisibleExtend
=
false
this
.
getList
()
})
}
}
}
...
...
@@ -314,7 +337,7 @@ export default {
<el-input
v-model=
"query.name"
placeholder=
"请输入"
></el-input>
</el-form-item>
<el-form-item
label=
"客户类型"
prop=
"name"
>
<el-select
v-model=
"
model
"
placeholder=
"请选择"
>
<el-select
v-model=
"
query.customerType
"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictCustomerType"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -335,12 +358,12 @@ export default {
</div>
</el-form-item>
<el-form-item
label=
"跟进状态"
prop=
"name"
>
<el-select
v-model=
"
model
"
placeholder=
"请选择"
>
<el-select
v-model=
"
query.trackState
"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictStatus"
:key=
"index"
:label=
"item.name"
:value=
"index"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"添加方式"
>
<el-select
v-model=
"
model
"
placeholder=
"请选择"
>
<el-select
v-model=
"
query.addMethod
"
placeholder=
"请选择"
>
<el-option
v-for=
"(item, index) in dictAddType"
:key=
"index"
:label=
"item"
:value=
"index"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -423,7 +446,9 @@ export default {
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"firstAddTime"
label
=
"跟进状态"
align
=
"center"
>
<
template
slot
-
scope
=
"
{
row
}
">
<el-tag type="
success
"
>
{{
dictStatus
[
row
.
trackState
+
''
].
name
}}
<
/el-tag
>
<el-tag v-if="
row
.
trackState
" :type="
dictStatus
[
~~
row
.
trackState
+
''
].
color
"
>
{{
dictStatus
[
~~
row
.
trackState
+
''
].
name
}}
<
/el-tag
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"trackState"
label
=
"添加方式"
align
=
"center"
>
...
...
@@ -443,7 +468,16 @@ export default {
<el-button v-hasPermi="
[
'customerManage/customer:makeTag'
]
" type="
text
" @click="
makeTag
(
row
)
"
>标签管理</el-button
>
<el-button type="
text
" size="
small
" :disabled="
row
.
isTransfer
">在职继承 </el-button>
<el-button
type="
text
"
size="
small
"
:disabled="
row
.
isTransfer
"
@click="
dialogVisibleExtend
=
true
currentEidt
=
row
"
>在职继承
</el-button>
</template>
</el-table-column>
</el-table>
...
...
@@ -472,6 +506,22 @@ export default {
<!-- 添加标签弹窗 -->
<AddTag :visible.sync="
dialogVisibleAddTag
" :form="
form
" @success="
getListTag
(
true
)
" />
<!-- 在职继承弹窗 -->
<el-dialog title="
选择员工
" :visible.sync="
dialogVisibleExtend
" :close-on-click-modal="
false
">
<el-form ref="
formExtend
" inline>
<el-form-item prop="
extendStaff
" label="
选择员工
">
<el-select v-model="
extendStaff
" placeholder="">
<el-option v-for="
item
in
staffList
" :key="
item
.
userId
" :label="
item
.
name
" :value="
item
.
userId
">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="
footer
">
<el-button @click="
dialogVisibleExtend
=
false
">取 消</el-button>
<el-button type="
primary
" @click="
transfer
">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
linkwe-ui/src/views/customerManage/customer/record.vue
0 → 100644
View file @
4136120
<
script
>
export
default
{
name
:
''
,
props
:
{
user
:
{
type
:
String
,
default
:
''
}
},
components
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
name
:
''
// "客户名称",
},
loading
:
false
,
total
:
0
,
list
:
[]
// 列表
}
},
computed
:
{},
watch
:
{},
created
()
{
this
.
getList
()
},
mounted
()
{},
methods
:
{
/** 查询 */
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
api
.
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
}
}
}
</
script
>
<
template
>
<div>
<el-table
:data=
"list"
v-loading=
"loading"
>
<el-table-column
label=
"员工"
align=
"center"
prop=
"welcomeMsg"
/>
<el-table-column
label=
"跟进记录"
align=
"center"
prop=
"createBy"
/>
<el-table-column
label=
"跟进状态"
align=
"center"
prop=
"createTime"
/>
<el-table-column
label=
"跟进记录时间"
align=
"center"
prop=
"createTime"
/>
</el-table>
<el-pagination
@
current-change=
"getList"
:current-page=
"query.pageNum"
:page-sizes=
"[10, 20, 50]"
:page-size=
"query.pageSize"
layout=
"total, prev, pager, next, jumper"
:total=
"total"
>
</el-pagination>
</div>
</
template
>
<
style
lang=
"less"
scoped
></
style
>
linkwe-ui/src/views/customerManage/customer/track.vue
0 → 100644
View file @
4136120
<
script
>
export
default
{
name
:
''
,
props
:
{
user
:
{
type
:
String
,
default
:
''
}
},
components
:
{},
data
()
{
return
{
query
:
{
pageNum
:
1
,
pageSize
:
10
,
name
:
''
// "客户名称",
},
loading
:
false
,
total
:
0
,
list
:
[]
// 列表
}
},
computed
:
{},
watch
:
{},
created
()
{
// this.getList()
},
mounted
()
{},
methods
:
{
/** 查询 */
getList
(
page
)
{
page
&&
(
this
.
query
.
pageNum
=
page
)
this
.
loading
=
true
api
.
getList
(
this
.
query
)
.
then
(({
rows
,
total
})
=>
{
this
.
list
=
rows
this
.
total
=
+
total
this
.
loading
=
false
})
.
catch
(()
=>
{
this
.
loading
=
false
})
}
}
}
</
script
>
<
template
>
<ul
class=
"infinite-list"
v-infinite-scroll=
"getList"
style=
"overflow:auto"
>
<li
v-for=
"i in list"
class=
"infinite-list-item"
:key=
"i"
>
<div>
2021-02-16 星期二
</div>
<el-timeline>
<el-timeline-item
v-for=
"(activity, index) in 6"
:key=
"index"
timestamp=
"2018/4/12"
placement=
"top"
>
<p>
更新 Github 模板
</p>
<p>
王小虎 提交于 2018/4/12 20:46
</p>
</el-timeline-item>
</el-timeline>
</li>
</ul>
</
template
>
<
style
lang=
"less"
scoped
></
style
>
linkwe-ui/src/views/customerManage/customerDetail.vue
View file @
4136120
This diff is collapsed.
Click to expand it.
linkwe-ui/src/views/customerManage/group.vue
View file @
4136120
...
...
@@ -161,7 +161,7 @@ export default {
</
script
>
<
template
>
<div
class=
"
app-container
"
>
<div
class=
""
>
<el-form
:model=
"query"
ref=
"queryForm"
:inline=
"true"
class=
"top-search"
label-width=
"80px"
>
<el-form-item
label=
"群名"
prop=
"groupName"
>
<el-input
v-model=
"query.groupName"
placeholder=
"请输入群名"
clearable
/>
...
...
linkwe-ui/src/views/customerManage/groupDetail.vue
View file @
4136120
...
...
@@ -90,7 +90,7 @@ export default {
</
script
>
<
template
>
<div
class=
"
app-container
"
>
<div
class=
""
>
<!--
<el-button
slot=
"append"
circle
icon=
"el-icon-back"
@
click=
"$router.back()"
></el-button>
返回 -->
<div
class=
"flex mt10"
>
<div
class=
"left g-card g-pad20"
>
...
...
@@ -118,31 +118,31 @@ export default {
</div>
</div>
<div
class=
"flex aic"
>
<div
class=
"flex aic
ac mt10 overview
"
>
<div>
<div>
<div
class=
"value"
>
{{ group.groupLeaderName }}
</div>
<div
class=
"key"
>
群主
</div>
</div>
<span
class=
"line"
>
|
</span>
<span
class=
"line"
></span>
<div>
<div>
{{ group.memberNum }}
<div
class=
"value"
>
{{ group.memberNum
|| 0
}}
</div>
<div
class=
"key"
>
群总人数
</div>
</div>
<span
class=
"line"
>
|
</span>
<span
class=
"line"
></span>
<div>
<div>
{{ group.customerNum }}
<div
class=
"value"
>
{{ group.customerNum
|| 0
}}
</div>
<div
class=
"key"
>
客户总数
</div>
</div>
<span
class=
"line"
>
|
</span>
<span
class=
"line"
></span>
<div>
<div>
{{ group.joinGroupMemberNum }}
<div
class=
"value"
>
{{ group.joinGroupMemberNum
|| 0
}}
</div>
<div
class=
"key"
>
今日进群数
</div>
</div>
...
...
@@ -162,7 +162,7 @@ export default {
<el-input
class=
"mt20"
placeholder=
"请输入群成员"
v-model=
"query.name"
clearable
>
<el-button
type=
"primary"
slot=
"append"
@
click=
"getList(1)"
>
<span
class=
"key"
>
查询
</span>
<span>
查询
</span>
</el-button>
</el-input>
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
...
...
@@ -200,15 +200,24 @@ export default {
.
info
{
color
:
#
666
;
}
}
.
overview
{
justify
-
content
:
space
-
around
;
line
-
height
:
30
px
;
.
key
{
color
:
#
999
;
}
.
value
{
color
:
#
333
;
font
-
weight
:
600
;
font
-
size
:
16
px
;
}
.
line
{
padding
:
15
px
;
color
:
#
dbdbdb
;
width
:
1
px
;
height
:
30
px
;
background
:
#
ddd
;
}
}
.
key
{
color
:
$blue
;
}
.
left
{
width
:
70
%
;
}
...
...
@@ -218,10 +227,4 @@ export default {
.
el
-
input
{
width
:
30
%
;
}
.
card
-
blue
{
flex
:
1
;
width
:
unset
;
max
-
width
:
200
px
;
}
<
/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