Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
b3ec9e46
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b3ec9e46
编写于
10月 26, 2020
作者:
X
xinlaa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
组织架构,客户修改调试
上级
00dc4418
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
156 addition
and
55 deletion
+156
-55
linkwe-ui/src/api/customer/index.js
linkwe-ui/src/api/customer/index.js
+20
-6
linkwe-ui/src/api/organization.js
linkwe-ui/src/api/organization.js
+11
-0
linkwe-ui/src/layout/components/Navbar.vue
linkwe-ui/src/layout/components/Navbar.vue
+1
-1
linkwe-ui/src/views/contacts/organization.vue
linkwe-ui/src/views/contacts/organization.vue
+41
-13
linkwe-ui/src/views/customerManage/customer.vue
linkwe-ui/src/views/customerManage/customer.vue
+49
-19
linkwe-ui/src/views/customerManage/customerDetail.vue
linkwe-ui/src/views/customerManage/customerDetail.vue
+34
-16
未找到文件。
linkwe-ui/src/api/customer/index.js
浏览文件 @
b3ec9e46
...
...
@@ -34,17 +34,11 @@ export function sync() {
* 编辑客户标签
* @param {*} data
* {
"userid": "添加此客户添加人的id",
"externalUserid": "外部联系人userid",
"addTag": [{
"id": "标签id",
"groupId": "标签组id",
"name": "标签名"
}],
"removeTag": [{
"id": "标签id",
"groupId": "标签组id",
"name": "标签名"
}]
}
*/
...
...
@@ -55,3 +49,23 @@ export function makeLabel(data) {
data
})
}
/**
* 移除客户标签
* @param {*} data
* {
"externalUserid": "外部联系人userid",
"addTag": [{
"id": "标签id",
"groupId": "标签组id",
"name": "标签名"
}]
}
*/
export
function
removeLabel
(
data
)
{
return
request
({
url
:
service
+
'
/removeLabel
'
,
method
:
'
DELETE
'
,
data
})
}
linkwe-ui/src/api/organization.js
浏览文件 @
b3ec9e46
...
...
@@ -145,6 +145,17 @@ export function startOrStop(data) {
})
}
/**
* 用户删除接口
* @param {*} userId
*/
export
function
remove
(
userId
)
{
return
request
({
url
:
serviceUser
+
'
/
'
+
userId
,
method
:
'
DELETE
'
,
})
}
/**
* 同步成员
*/
...
...
linkwe-ui/src/layout/components/Navbar.vue
浏览文件 @
b3ec9e46
...
...
@@ -89,7 +89,7 @@ export default {
type
:
"
warning
"
,
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
"
LogOut
"
).
then
(()
=>
{
location
.
href
=
"
/
index
"
;
location
.
href
=
"
/
"
;
});
});
},
...
...
linkwe-ui/src/views/contacts/organization.vue
浏览文件 @
b3ec9e46
...
...
@@ -16,10 +16,22 @@ export default {
dateRange
:
[],
treeData
:
[],
userList
:
[],
status
:
{
0
:
"
启用
"
,
1
:
"
禁用
"
,
6
:
"
离职
"
,
},
statusActivate
:
{
1
:
"
已激活
"
,
2
:
"
已禁用
"
,
4
:
"
未激活
"
,
5
:
"
退出企业
"
,
6
:
"
删除
"
,
},
total
:
0
,
defaultProps
:
{
label
:
"
name
"
,
children
:
"
children
"
,
childr
启用
en
:
"
children
"
,
},
form
:
{},
dialogVisible
:
false
,
...
...
@@ -141,7 +153,7 @@ export default {
let
form
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
));
form
.
department
+=
""
;
form
.
isLeaderInDept
+=
""
;
api
[
form
.
i
d
?
"
updateUser
"
:
"
addUser
"
](
form
)
api
[
form
.
userI
d
?
"
updateUser
"
:
"
addUser
"
](
form
)
.
then
(()
=>
{
this
.
msgSuccess
(
"
操作成功
"
);
this
.
dialogVisible
=
false
;
...
...
@@ -154,15 +166,30 @@ export default {
});
},
startOrStop
(
data
)
{
// 0: 启用,1:禁用
let
params
=
{
id
:
data
.
i
d
,
enable
:
data
.
enable
==
1
?
false
:
true
,
userId
:
data
.
userI
d
,
enable
:
data
.
enable
==
1
?
0
:
1
,
};
api
.
startOrStop
(
params
).
then
(()
=>
{
this
.
msgSuccess
(
"
操作成功
"
);
this
.
getList
();
});
},
/** 删除按钮操作 */
remove
(
id
)
{
// const operIds = id || this.ids + "";
this
.
$confirm
(
"
是否确认删除吗?
"
,
"
警告
"
,
{
type
:
"
warning
"
,
})
.
then
(
function
()
{
return
api
.
remove
(
id
);
})
.
then
(()
=>
{
this
.
getList
();
this
.
msgSuccess
(
"
删除成功
"
);
});
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
...
...
@@ -318,7 +345,7 @@ export default {
</template>-->
</el-table-column>
<el-table-column
label=
"状态"
align=
"center"
prop=
"isActivate"
>
<
template
slot-scope=
"scope"
>
{{
s
cope
.
row
.
isActivate
==
1
?
'
已激活
'
:
'
未激活
'
}}
</
template
>
<
template
slot-scope=
"scope"
>
{{
s
tatusActivate
[
scope
.
row
.
isActivate
]
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
...
...
@@ -329,26 +356,27 @@ export default {
<
template
slot-scope=
"scope"
>
<el-button
v-hasPermi=
"['contacts:organization:view']"
size=
"mini"
type=
"text"
icon=
"el-icon-view"
@
click=
"edit(scope.row, 0)"
>
查看
</el-button>
<el-button
v-hasPermi=
"['contacts:organization:forbidden']"
v-if=
"scope.row.userId !== 1"
size=
"mini"
v-if=
"scope.row.userId !== 1 && scope.row.enable
<
2"
type=
"text"
icon=
"el-icon-close-notification"
@
click=
"startOrStop(scope.row)"
>
{{
s
cope
.
row
.
enable
==
1
?
'
禁用
'
:
'
启用
'
}}
</el-button>
>
{{
s
tatus
[
scope
.
row
.
enable
]
}}
</el-button>
<el-button
v-if=
"scope.row.enable
<
2"
v-hasPermi=
"['contacts:organization:edit']"
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"edit(scope.row, 1)"
>
编辑
</el-button>
<el-button
v-if=
"scope.row.enable
<
2"
v-hasPermi=
"['customerManage:tag:remove']"
@
click=
"remove(scope.row.userId)"
type=
"text"
>
删除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
linkwe-ui/src/views/customerManage/customer.vue
浏览文件 @
b3ec9e46
...
...
@@ -75,6 +75,7 @@ export default {
dialogVisibleAddTag
:
false
,
// 添加标签弹窗显隐
selectedGroup
:
""
,
// 选择的标签分组
selectedTag
:
[],
// 选择的标签
removeTag
:
[],
// 可移除的标签
tagDialogType
:
{
title
:
""
,
// 选择标签弹窗标题
type
:
""
,
// 弹窗类型
...
...
@@ -113,6 +114,12 @@ export default {
getListTag
()
{
getListTag
().
then
(({
rows
})
=>
{
this
.
listTag
=
Object
.
freeze
(
rows
);
this
.
listTagOneArray
=
[];
this
.
listTag
.
forEach
((
element
)
=>
{
element
.
weTags
.
forEach
((
d
)
=>
{
this
.
listTagOneArray
.
push
(
d
);
});
});
});
},
getListOrganization
()
{
...
...
@@ -128,7 +135,7 @@ export default {
};
this
.
dialogVisible
=
true
;
},
makeTag
()
{
makeTag
(
type
)
{
this
.
selectedTag
=
[];
if
(
!
this
.
multipleSelection
.
length
)
{
this
.
msgInfo
(
"
请选择一位客户
"
);
...
...
@@ -139,21 +146,21 @@ export default {
return
;
}
this
.
tagDialogType
=
{
title
:
"
为客户增加
标签
"
,
type
:
"
customer
"
,
title
:
type
===
"
add
"
?
"
增加标签
"
:
"
移出
标签
"
,
type
:
type
,
};
this
.
multipleSelection
.
forEach
((
element
)
=>
{
// debugger;
element
.
weFlowerCustomerRels
.
forEach
((
child
)
=>
{
child
.
weFlowerCustomerTagRels
.
forEach
((
grandchild
)
=>
{
this
.
selectedTag
.
push
({
id
:
grandchild
.
tagId
,
name
:
grandchild
.
tagName
,
let
filter
=
this
.
listTagOneArray
.
find
((
d
)
=>
{
return
d
.
tagId
===
grandchild
.
tagId
;
});
this
.
selectedTag
.
push
(
filter
);
});
});
});
this
.
removeTag
=
this
.
selectedTag
.
slice
();
this
.
dialogVisible
=
true
;
},
sync
()
{
...
...
@@ -174,18 +181,23 @@ export default {
},
submitSelectTag
(
formName
)
{
if
(
this
.
tagDialogType
.
type
===
"
query
"
)
{
this
.
query
.
tagIds
=
this
.
selectedTag
.
map
((
d
)
=>
d
.
i
d
)
+
""
;
this
.
query
.
tagIds
=
this
.
selectedTag
.
map
((
d
)
=>
d
.
tagI
d
)
+
""
;
// debugger;
this
.
queryTag
=
this
.
selectedTag
;
this
.
dialogVisible
=
false
;
}
else
if
(
this
.
tagDialogType
.
type
===
"
customer
"
)
{
}
else
{
let
data
=
{
userid
:
this
.
multipleSelection
[
0
].
externalUserid
,
externalUserid
:
this
.
multipleSelection
[
0
].
externalUserid
,
addTag
:
this
.
selectedTag
,
};
let
apiType
=
{
add
:
"
makeLabel
"
,
remove
:
"
removeLabel
"
,
};
api
.
makeLabel
(
this
.
selectedTag
).
then
(()
=>
{
api
[
apiType
[
this
.
tagDialogType
.
type
]](
data
).
then
(()
=>
{
this
.
msgSuccess
(
"
操作成功
"
);
this
.
dialogVisible
=
false
;
this
.
getList
();
});
}
},
...
...
@@ -278,13 +290,14 @@ export default {
type=
"primary"
size=
"mini"
icon=
"el-icon-s-flag"
@
click=
"makeTag"
@
click=
"makeTag
('add')
"
>
打标签
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:removeTag']"
type=
"primary"
size=
"mini"
icon=
"el-icon-brush"
@
click=
"makeTag('remove')"
>
移除标签
</el-button>
<el-button
v-hasPermi=
"['customerManage:customer:sync']"
...
...
@@ -320,10 +333,12 @@ export default {
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
corpName
"
label
=
"
公司名称
"
align
=
"
center
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
address
"
label
=
"
添加人(首位)
"
align
=
"
center
"
>
<
el
-
table
-
column
prop
=
"
userName
"
label
=
"
添加人(首位)
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
scope
.
row
.
weFlowerCustomerRels
[
0
].
userName
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
createTime
"
label
=
"
添加时间
"
align
=
"
center
"
><
/el-table-column
>
<
el
-
table
-
column
prop
=
"
createTime
"
label
=
"
添加时间
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
{{
scope
.
row
.
weFlowerCustomerRels
[
0
].
createTime
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
prop
=
"
address
"
label
=
"
标签
"
align
=
"
center
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
div
v
-
for
=
"
(item, index) in scope.row.weFlowerCustomerRels
"
:
key
=
"
index
"
>
...
...
@@ -366,24 +381,36 @@ export default {
v
-
for
=
"
(item, index) in listTag
"
:
key
=
"
index
"
:
label
=
"
item.gourpName
"
:
value
=
"
item.
i
d
"
:
value
=
"
item.
groupI
d
"
><
/el-option
>
<
/el-select
>
<
div
class
=
"
mt20
"
>
<
el
-
checkbox
-
group
v
-
model
=
"
selectedTag
"
>
<
el
-
checkbox
-
group
v
-
model
=
"
selectedTag
"
v
-
if
=
"
tagDialogType.type !== 'remove'
"
>
<
template
v
-
for
=
"
(item, index) in listTag
"
>
<
div
class
=
"
bfc-d
"
v
-
show
=
"
item.id === selectedGroup || !selectedGroup
"
:
key
=
"
index
"
>
<
div
class
=
"
bfc-d
"
v
-
show
=
"
item.groupId === selectedGroup || !selectedGroup
"
:
key
=
"
index
"
>
<
el
-
checkbox
:
label
=
"
unit
"
value
-
key
=
"
id
"
v
-
for
=
"
(unit, unique) in item.weTags
"
:
key
=
"
index + unique
"
>
{{
unit
.
name
}}
<
/el-checkbox
>
<
/div
>
<
/template
>
<
/el-checkbox-group
>
<
el
-
checkbox
-
group
v
-
else
v
-
model
=
"
selectedTag
"
>
<
template
v
-
for
=
"
(item, index) in removeTag
"
>
<
el
-
checkbox
v
-
if
=
"
item.groupId === selectedGroup || !selectedGroup
"
:
label
=
"
item
"
:
key
=
"
index
"
>
{{
item
.
name
}}
<
/el-checkbox
>
<
/template
>
<
/el-checkbox-group
>
<
/div
>
<
div
class
=
"
mt20
"
v
-
show
=
"
tagDialogType.type === '
customer
'
"
>
<
div
class
=
"
mt20
"
v
-
show
=
"
tagDialogType.type === '
add
'
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
dialogVisibleAddTag = true
"
>
添加标签
<
/el-button
>
<
/div
>
<
/div
>
...
...
@@ -447,4 +474,7 @@ export default {
color
:
#
f753b2
;
}
}
.
bfc
-
d
+
.
bfc
-
d
.
el
-
checkbox
:
first
-
child
{
margin
-
left
:
10
px
;
}
<
/style
>
linkwe-ui/src/views/customerManage/customerDetail.vue
浏览文件 @
b3ec9e46
...
...
@@ -5,7 +5,10 @@ export default {
name
:
"
CustomerDetail
"
,
data
()
{
return
{
customer
:
{},
datePickerVisible
:
false
,
customer
:
{
weFlowerCustomerRels
:
[],
},
};
},
created
()
{
...
...
@@ -29,22 +32,28 @@ export default {
<div>
<!--
<el-button
slot=
"append"
circle
icon=
"el-icon-back"
@
click=
"$router.back()"
></el-button>
返回 -->
<div
class=
"flex aic"
>
<el-avatar
:size=
"100"
src=
"https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png"
></el-avatar>
<el-avatar
:size=
"100"
:src=
"customer.avatar"
></el-avatar>
<div
class=
"info-wrap"
>
<div
style=
"margin-bottom: 20px;
"
>
{{
customer
.
groupN
ame
}}
<div
class=
"mb10
"
>
{{
customer
.
n
ame
}}
<span
:style=
"
{color: customer.type === 1 ? '#4bde03' : '#f9a90b'}"
>
{{
({
1
:
'
@微信
'
,
2
:
'
@企业微信
'
}
)[
customer
.
type
]
}}
<
/span
>
<
i
:
class
=
"
['el-icon-s-custom', ({1: 'man', 2: 'woman'
}
)[customer.gender]]
"
><
/i
>
<
/div
>
<
div
class
=
"
info
"
>
出生日期
:
{{
customer
.
createTime
||
'
--
'
}}
<
i
class
=
"
el-icon-edit
"
><
/i
>
<
el
-
date
-
picker
v
-
model
=
"
customer.createTime
"
type
=
"
date
"
placeholder
=
"
选择日期
"
><
/el-date-picker
>
出生日期
:
{{
customer
.
birthday
||
'
--
'
}}
<
div
class
=
"
ml20
"
style
=
"
position: absolute;
"
>
<
el
-
date
-
picker
v
-
if
=
"
datePickerVisible
"
v
-
model
=
"
customer.birthday
"
type
=
"
date
"
value
-
format
=
"
yyyy-MM-dd
"
placeholder
=
"
选择日期便于以后客情维护
"
@
blur
=
"
datePickerVisible = false
"
><
/el-date-picker
>
<
i
v
-
else
class
=
"
el-icon-edit
"
@
click
=
"
datePickerVisible = true
"
><
/i
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -53,28 +62,36 @@ export default {
<
div
>
<
el
-
row
:
gutter
=
"
10
"
>
<
el
-
col
:
span
=
"
10
"
>
备注名
:
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
Dora
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
{{
customer
.
name
}}
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"
10
"
>
<
el
-
col
:
span
=
"
10
"
>
标签
:
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
Dora
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
<
div
v
-
for
=
"
(item, index) in customer.weFlowerCustomerRels
"
:
key
=
"
index
"
>
<
el
-
tag
type
=
"
info
"
v
-
for
=
"
(unit, unique) in item.weFlowerCustomerTagRels
"
:
key
=
"
unique
"
>
{{
unit
.
tagName
}}
<
/el-tag
>
<
/div
>
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"
10
"
>
<
el
-
col
:
span
=
"
10
"
>
个人标签
:
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
Dora
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
{{
"
--
"
}}
<
/el-col
>
<
/el-row
>
<
el
-
divider
><
/el-divider
>
<
el
-
row
:
gutter
=
"
10
"
>
<
el
-
col
:
span
=
"
10
"
>
添加人
:
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
Dora
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
{{
customer
.
weFlowerCustomerRels
[
0
].
userName
}}
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"
10
"
>
<
el
-
col
:
span
=
"
10
"
>
所在部门
:
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
Dora
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
{{
"
--
"
}}
<
/el-col
>
<
/el-row
>
<
el
-
row
:
gutter
=
"
10
"
>
<
el
-
col
:
span
=
"
10
"
>
添加时间
:
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
Dora
<
/el-col
>
<
el
-
col
:
span
=
"
12
"
>
{{
customer
.
weFlowerCustomerRels
[
0
].
createTime
}}
<
/el-col
>
<
/el-row
>
<
/div
>
<
/el-card
>
...
...
@@ -106,6 +123,7 @@ export default {
margin
-
left
:
20
px
;
.
info
{
color
:
#
aaa
;
line
-
height
:
32
px
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录