Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-customer
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 62e5a703
authored
Dec 02, 2021
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
a499fecd
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
143 deletions
src/api/groupCustomer.js
src/api/groupTag.js
src/api/wxConfig.js
src/views/customer/information.vue
src/views/customerDetails/add.vue
src/views/customerDetails/index.vue
src/views/tag/index.vue
src/views/tag/make.vue
src/api/groupCustomer.js
View file @
62e5a70
...
@@ -12,5 +12,15 @@ export default {
...
@@ -12,5 +12,15 @@ export default {
data
,
data
,
returnAll
returnAll
})
})
}
},
//用来判断是否待通过状态
updateCustomerWork
(
data
=
{})
{
data
.
method
=
'entmicro.api.dracScrmWork.updateCustomerWork'
return
window
.
$HTTP
({
url
,
data
,
returnAll
})
},
}
}
src/api/groupTag.js
View file @
62e5a70
...
@@ -31,4 +31,6 @@ export default {
...
@@ -31,4 +31,6 @@ export default {
returnAll
returnAll
})
})
},
},
}
}
src/api/wxConfig.js
View file @
62e5a70
...
@@ -282,6 +282,18 @@ const WxConfig = {
...
@@ -282,6 +282,18 @@ const WxConfig = {
})
})
})
})
},
},
/** 打开个人信息页接口 */
openUserProfile
(
params
)
{
// "type": 1, //1表示该userid是企业成员,2表示该userid是外部联系人
// "userid": "wmEAlECwAAHrbWYDetiu3Af13xlYDAAA" //可以是企业成员,也可以是外部联系人
return
new
Promise
((
resolve
)
=>
{
wx
.
invoke
(
'openUserProfile'
,
params
,
res
=>
{
if
(
res
.
err_msg
!=
"openUserProfile:ok"
)
{
resolve
(
res
)
}
})
})
},
/**使用企业微信内置地图查看位置接口 */
/**使用企业微信内置地图查看位置接口 */
openLocation
(
obj
)
{
openLocation
(
obj
)
{
/**
/**
...
...
src/views/customer/information.vue
View file @
62e5a70
...
@@ -5,9 +5,11 @@
...
@@ -5,9 +5,11 @@
<template>
<template>
<scroll-view
class=
"content"
@
ReachBottom=
"onReachBottom"
ref=
"scrollView"
>
<scroll-view
class=
"content"
@
ReachBottom=
"onReachBottom"
ref=
"scrollView"
>
<template
v-for=
"(item, index) in customerList"
>
<template
v-for=
"(item, index) in customerList"
>
<div
:key=
"index"
class=
"item flex"
>
<div
:key=
"index"
class=
"item flex"
@
click=
"openUserProfile(item)"
>
<div
class=
"avatar"
>
<div
class=
"avatar"
>
<div
class=
"sprite-icon icon-avatar"
></div>
<div
class=
"sprite-icon icon-avatar"
>
<img
:src=
"item.avatar"
alt=
""
/>
</div>
</div>
</div>
<div
class=
"info"
>
<div
class=
"info"
>
<div
class=
"phone flex name"
>
{{
item
.
customerName
}}
</div>
<div
class=
"phone flex name"
>
{{
item
.
customerName
}}
</div>
...
@@ -27,6 +29,7 @@
...
@@ -27,6 +29,7 @@
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
import
{
groupTag
}
from
'@/api'
export
default
{
export
default
{
name
:
''
,
name
:
''
,
data
()
{
data
()
{
...
@@ -39,145 +42,37 @@ export default {
...
@@ -39,145 +42,37 @@ export default {
},
},
methods
:
{
methods
:
{
onReachBottom
()
{
onReachBottom
()
{
console
.
log
(
'触底'
)
this
.
$refs
.
scrollView
.
loading
=
false
this
.
$refs
.
scrollView
.
loading
=
false
this
.
$refs
.
scrollView
.
finished
=
true
this
.
$refs
.
scrollView
.
finished
=
true
},
},
// 消息盒子-好友列表
// 消息盒子-好友列表
init
()
{
init
()
{
let
search
=
{
groupTag
.
getcustomerList
().
then
(
res
=>
{
taskId
:
'cb3b9128e620413c931601a6d439d365'
,
status
:
this
.
status
}
this
.
customerList
=
[
{
id
:
null
,
userid
:
'wmdMreDgAAY_3bc9griISYSmgyx_FuQw'
,
customerName
:
'王欣伟'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0'
,
type
:
1
,
createdTime
:
'2021-11-14 17:17:38'
,
status
:
2
},
{
id
:
null
,
userid
:
'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA'
,
customerName
:
'曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0'
,
type
:
2
,
createdTime
:
'2021-09-18 14:27:35'
,
status
:
1
},
{
id
:
null
,
userid
:
'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ'
,
customerName
:
'爱就在一起'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0'
,
type
:
1
,
createdTime
:
'2021-08-31 14:51:06'
,
status
:
0
},
{
id
:
null
,
userid
:
'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA'
,
customerName
:
'李崇源'
,
customerPhone
:
'13476670746'
,
avatar
:
'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0'
,
type
:
2
,
createdTime
:
'2021-08-24 09:39:05'
,
status
:
1
},
{
id
:
null
,
userid
:
'wmdMreDgAAY_3bc9griISYSmgyx_FuQw'
,
customerName
:
'王欣伟'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0'
,
type
:
1
,
createdTime
:
'2021-11-14 17:17:38'
,
status
:
2
},
{
id
:
null
,
userid
:
'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA'
,
customerName
:
'曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0'
,
type
:
2
,
createdTime
:
'2021-09-18 14:27:35'
,
status
:
1
},
{
id
:
null
,
userid
:
'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ'
,
customerName
:
'爱就在一起'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0'
,
type
:
1
,
createdTime
:
'2021-08-31 14:51:06'
,
status
:
0
},
{
id
:
null
,
userid
:
'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA'
,
customerName
:
'李崇源'
,
customerPhone
:
'13476670746'
,
avatar
:
'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0'
,
type
:
2
,
createdTime
:
'2021-08-24 09:39:05'
,
status
:
1
},
{
id
:
null
,
userid
:
'wmdMreDgAAY_3bc9griISYSmgyx_FuQw'
,
customerName
:
'王欣伟'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0'
,
type
:
1
,
createdTime
:
'2021-11-14 17:17:38'
,
status
:
2
},
{
id
:
null
,
userid
:
'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA'
,
customerName
:
'曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0'
,
type
:
2
,
createdTime
:
'2021-09-18 14:27:35'
,
status
:
1
},
{
id
:
null
,
userid
:
'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ'
,
customerName
:
'爱就在一起'
,
customerPhone
:
'13476670746'
,
avatar
:
'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0'
,
type
:
1
,
createdTime
:
'2021-08-31 14:51:06'
,
status
:
0
},
{
id
:
null
,
userid
:
'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA'
,
customerName
:
'李崇源'
,
customerPhone
:
'13476670746'
,
avatar
:
'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0'
,
type
:
2
,
createdTime
:
'2021-08-24 09:39:05'
,
status
:
1
}
]
console
.
log
(
this
.
customerList
)
groupCustomer
.
getCustomerList
(
search
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
customerList
=
res
.
data
this
.
customerList
=
res
.
data
if
(
this
.
customerList
.
length
>
0
)
{
this
.
customerList
.
forEach
(
item
=>
{
this
.
$set
(
item
,
'isChecked'
,
false
)
})
}
}
else
{
this
.
customerList
=
[]
}
}
})
})
},
//打开个人信息页
openUserProfile
(
data
)
{
let
seach
=
{
userIds
:
data
.
userid
,
//参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
type
:
1
}
console
.
log
(
seach
)
window
.
$wx
=
wxConfig
window
.
$wx
.
init
([
'openUserProfile'
]).
then
(()
=>
{
window
.
$wx
.
openUserProfile
(
seach
).
then
(
res
=>
{
console
.
log
(
res
)
})
})
}
}
}
}
}
}
...
...
src/views/customerDetails/add.vue
View file @
62e5a70
<
template
>
<
template
>
<div
:class=
"['container-add', copywriting
!=''?`page-type-$
{tabIndex}`:'']"
>
<div
:class=
"['container-add', copywriting
!= '' ? `page-type-$
{tabIndex}` : '']"
>
<tip
:title=
"title"
></tip>
<tip
:title=
"title"
></tip>
<template
v-if=
"customerList.length > 0"
>
<template
v-if=
"customerList.length > 0"
>
<div
class=
"customerList-add"
>
<div
class=
"customerList-add"
>
...
@@ -61,7 +61,7 @@ export default {
...
@@ -61,7 +61,7 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
init
()
this
.
init
()
},
},
computed
:
{
computed
:
{
...
@@ -114,6 +114,8 @@ export default {
...
@@ -114,6 +114,8 @@ export default {
},
},
//加好友
//加好友
addFriend
(
data
)
{
addFriend
(
data
)
{
groupCustomer
.
updateCustomerWork
(()
=>
{})
window
.
$wx
=
wxConfig
window
.
$wx
=
wxConfig
window
.
$wx
.
init
([
'navigateToAddCustomer'
,
'setClipboardData'
]).
then
(()
=>
{
window
.
$wx
.
init
([
'navigateToAddCustomer'
,
'setClipboardData'
]).
then
(()
=>
{
this
.
setClipboardData
(
data
.
customerPhone
)
//复制
this
.
setClipboardData
(
data
.
customerPhone
)
//复制
...
...
src/views/customerDetails/index.vue
View file @
62e5a70
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div
class=
"container-wrap"
>
<div
class=
"container-wrap"
>
<tab
:list=
"list"
:sticky=
"sticky"
:index=
"tabIndex"
@
change=
"changeTabs"
></tab>
<tab
:list=
"list"
:sticky=
"sticky"
:index=
"tabIndex"
@
change=
"changeTabs"
></tab>
<!-- 已通过 -->
<!-- 已通过 -->
<tag
:isTitle=
"isTitle"
v-if=
"tabIndex == 2"
id=
"tabId"
></tag>
<tag
:isTitle=
"isTitle"
v-if=
"tabIndex == 2"
id=
"tabId"
></tag>
<!-- 添加 待通过 全部-->
<!-- 添加 待通过 全部-->
<add
v-else
:tabIndex=
"tabIndex"
id=
"tabId"
></add>
<add
v-else
:tabIndex=
"tabIndex"
id=
"tabId"
></add>
</div>
</div>
...
...
src/views/tag/index.vue
View file @
62e5a70
...
@@ -96,6 +96,7 @@ export default {
...
@@ -96,6 +96,7 @@ export default {
taskId
:
this
.
taskId
,
taskId
:
this
.
taskId
,
status
:
2
status
:
2
}
}
this
.
allChecked
=
false
groupCustomer
.
getCustomerList
(
search
).
then
(
res
=>
{
groupCustomer
.
getCustomerList
(
search
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
customerList
=
res
.
data
this
.
customerList
=
res
.
data
...
@@ -122,7 +123,7 @@ export default {
...
@@ -122,7 +123,7 @@ export default {
groupTag
.
getcustomerList
(
obj
).
then
(
res
=>
{
groupTag
.
getcustomerList
(
obj
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
customerList
=
res
.
data
this
.
customerList
=
res
.
data
this
.
title
=
`您共有
${
this
.
customerList
.
length
}
位客户可添加标签`
this
.
title
=
`您共有
${
this
.
customerList
.
length
}
位客户可添加标签`
if
(
this
.
customerList
.
length
>
0
)
{
if
(
this
.
customerList
.
length
>
0
)
{
this
.
customerList
.
forEach
(
item
=>
{
this
.
customerList
.
forEach
(
item
=>
{
this
.
$set
(
item
,
'isChecked'
,
false
)
this
.
$set
(
item
,
'isChecked'
,
false
)
...
@@ -173,7 +174,12 @@ export default {
...
@@ -173,7 +174,12 @@ export default {
this
.
checkList
=
[]
this
.
checkList
=
[]
this
.
externalUserIds
=
[]
this
.
externalUserIds
=
[]
this
.
keyWord
=
''
this
.
keyWord
=
''
this
.
init
()
console
.
log
(
this
.
isTitle
)
if
(
this
.
isTitle
)
{
this
.
init
()
}
else
{
this
.
initAll
()
}
},
},
//打开会话
//打开会话
gotoInfo
(
item
)
{
gotoInfo
(
item
)
{
...
@@ -183,7 +189,6 @@ export default {
...
@@ -183,7 +189,6 @@ export default {
groupName
:
''
,
// 会话名称。单聊时该参数传入空字符串""即可。
groupName
:
''
,
// 会话名称。单聊时该参数传入空字符串""即可。
chatId
:
''
chatId
:
''
}
}
console
.
log
(
seach
)
window
.
$wx
=
wxConfig
window
.
$wx
=
wxConfig
window
.
$wx
.
init
([
'openEnterpriseChat'
]).
then
(()
=>
{
window
.
$wx
.
init
([
'openEnterpriseChat'
]).
then
(()
=>
{
window
.
$wx
.
openEnterpriseChat
(
seach
).
then
(
res
=>
{
window
.
$wx
.
openEnterpriseChat
(
seach
).
then
(
res
=>
{
...
@@ -203,8 +208,7 @@ export default {
...
@@ -203,8 +208,7 @@ export default {
.customerList
{
.customerList
{
//
background
:
#fff
;
//
background
:
#fff
;
.content
{
.content
{
//
height
:
calc
(
100vh
-
164px
);
height
:
calc
(
100vh
-
164px
);
height
:
calc
(
100vh
-
90px
);
}
}
.customer
{
.customer
{
padding
:
0
16px
;
padding
:
0
16px
;
...
...
src/views/tag/make.vue
View file @
62e5a70
...
@@ -81,7 +81,11 @@ export default {
...
@@ -81,7 +81,11 @@ export default {
if
(
this
.
tagList
[
index
].
taggingList
[
ids
].
isChecked
)
{
if
(
this
.
tagList
[
index
].
taggingList
[
ids
].
isChecked
)
{
this
.
checkAll
.
push
({
...
this
.
tagList
[
index
].
taggingList
[
ids
]
})
this
.
checkAll
.
push
({
...
this
.
tagList
[
index
].
taggingList
[
ids
]
})
}
else
{
}
else
{
this
.
checkAll
.
splice
(
index
,
1
)
for
(
let
i
=
0
;
i
<
this
.
checkAll
.
length
;
i
++
)
{
if
(
this
.
tagList
[
index
].
taggingList
[
ids
].
taggingId
==
this
.
checkAll
[
i
].
taggingId
)
{
this
.
checkAll
.
splice
(
i
--
,
1
)
}
}
}
}
},
},
close
(
data
,
value
)
{
close
(
data
,
value
)
{
...
@@ -202,7 +206,6 @@ export default {
...
@@ -202,7 +206,6 @@ export default {
}
}
.tag-container
{
.tag-container
{
padding
:
10px
16px
;
padding
:
10px
16px
;
overflow-y
:
auto
;
.tag-type
{
.tag-type
{
padding-bottom
:
24px
;
padding-bottom
:
24px
;
.tag-title
{
.tag-title
{
...
...
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