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 f094925f
authored
Mar 14, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'wangzh_dev_2.0' into 'master'
客户跟进2.0开发 See merge request
!2
2 parents
426920fa
ef483281
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
35 deletions
src/views/customer/detail.vue
src/views/tag/make.vue
src/views/customer/detail.vue
View file @
f094925
...
@@ -44,31 +44,48 @@
...
@@ -44,31 +44,48 @@
</div>
</div>
</div>
</div>
</div>
</div>
<
div
class=
"detail-bg detail-third
"
>
<
template
v-for=
"(label, ids) in labelArray
"
>
<div
class=
"title"
>
客户标签
</div>
<
div
class=
"detail-label
"
>
<
template
v-if=
"(merchantModel == 2 && label.labelGroupType != '自店标签') || merchantModel == 1
"
>
<div
v-if=
"userInfo.labelInfos && !userInfo.labelInfos.length"
class=
"no-label
"
>
<div
class=
"detail-bg detail-third"
:key=
"ids
"
>
<div
class=
"
btn text-center"
@
click=
"handleTag
"
>
<div
class=
"
title
"
>
<van-icon
name=
"plus"
class=
"plus"
/>
{{
label
.
labelGroupType
}}
<span
>
标签
</span>
<span
v-if=
"label.labelGroupType == '系统标签'"
class=
"prompt-text"
>
系统标签不支持手动修改
</span>
</div>
</div>
</div
>
<div
class=
"detail-label"
>
<div
class=
"has-label"
v-else
>
<div
v-if=
"label.labelGroupType !== '系统标签' && customerId == 0"
class=
"no-label"
>
<
template
v-for=
"(i, index) in userInfo.labelInfos
"
>
<div
class=
"btn text-center"
@
click=
"handleTag(label.labelGroupType)
"
>
<div
class=
"label-box"
:key=
"index"
>
<van-icon
name=
"plus"
class=
"plus"
/
>
<div
class=
"label-title"
>
{{
i
.
labelGroupInfo
.
labelGroupName
}}
</div
>
<span>
标签
</span
>
<
div
v-for=
"item in i.labelInfoList"
:key=
"item.id"
class=
"label-text text-center"
>
{{
item
.
labelName
}}
<
/div>
</div>
</div>
</div>
</
template
>
<div
class=
"has-label"
v-if=
"label.isShow && label.children.length > 0"
>
<div
class=
"btn-box"
v-if=
"customerId == 0"
>
<template
v-for=
"(i, index) in label.children"
>
<div
class=
"btn text-center"
@
click=
"handleTag"
>
<div
class=
"label-box"
:key=
"index"
>
<van-icon
name=
"plus"
class=
"plus"
/>
<div
class=
"label-title"
>
{{
i
.
labelGroupInfo
.
labelGroupName
}}
</div>
<span>
标签
</span>
<div
v-for=
"item in i.labelInfoList"
:key=
"item.id"
class=
"label-text text-center"
>
{{
item
.
labelName
}}
</div>
</div>
</
template
>
<!-- <div class="btn-box">
<div class="btn text-center" @click="handleTag">
<van-icon name="plus" class="plus" />
<span>标签8888</span>
</div>
</div> -->
</div>
</div>
</div>
</div>
<
template
v-if=
"label.children.length > 0"
>
<div
class=
"detail-more text-center"
@
click=
"moreInfoLabel(ids)"
>
<div
class=
"btn text-center"
>
{{
label
.
isShow
?
'收起'
:
'展开全部'
}}
<div
:class=
"['sprite-icon', 'icon-open-arrow',
{ more: label.isShow }]">
</div>
</div>
</div>
</
template
>
</div>
</div>
</div>
</template>
</div>
</template>
<div
class=
"detail-bg detail-fourth"
>
<div
class=
"detail-bg detail-fourth"
>
<div
class=
"title"
>
所属群聊
</div>
<div
class=
"title"
>
所属群聊
</div>
<div
class=
"detail-group"
>
<div
class=
"detail-group"
>
...
@@ -90,7 +107,7 @@
...
@@ -90,7 +107,7 @@
<van-popup
v-model=
"showDatePicker"
position=
"bottom"
round
>
<van-popup
v-model=
"showDatePicker"
position=
"bottom"
round
>
<van-datetime-picker
v-model=
"selectDate"
type=
"date"
title=
"选择年月日"
:min-date=
"minDate"
:max-date=
"maxDate"
@
confirm=
"confirmDate"
@
cancel=
"showDatePicker = false"
/>
<van-datetime-picker
v-model=
"selectDate"
type=
"date"
title=
"选择年月日"
:min-date=
"minDate"
:max-date=
"maxDate"
@
confirm=
"confirmDate"
@
cancel=
"showDatePicker = false"
/>
</van-popup>
</van-popup>
<make
@
success=
"successHandle"
:externalUserIds=
"[id]"
:chooseItems=
"userInfo.labelInfos"
:isCustomer=
"false"
ref=
"popRefs"
></make>
<make
@
success=
"successHandle"
:externalUserIds=
"[id]"
:chooseItems=
"userInfo.labelInfos"
:isCustomer=
"false"
ref=
"popRefs"
></make>
</div>
</div>
</template>
</template>
...
@@ -102,8 +119,10 @@ export default {
...
@@ -102,8 +119,10 @@ export default {
components
:
{
make
},
components
:
{
make
},
data
()
{
data
()
{
return
{
return
{
labelType
:
''
,
flag
:
false
,
flag
:
false
,
isMore
:
false
,
isMore
:
false
,
labels
:
[],
userInfo
:
{
userInfo
:
{
labels
:
[],
labels
:
[],
vehicleInfo
:
{},
vehicleInfo
:
{},
...
@@ -116,6 +135,8 @@ export default {
...
@@ -116,6 +135,8 @@ export default {
1
:
'男'
,
1
:
'男'
,
2
:
'女'
2
:
'女'
},
},
merchantModel
:
''
,
labelArray
:
[],
detailObj
:
[
detailObj
:
[
{
{
title
:
'添加时间'
,
title
:
'添加时间'
,
...
@@ -235,7 +256,7 @@ export default {
...
@@ -235,7 +256,7 @@ export default {
target
:
''
,
target
:
''
,
customerId
:
0
,
//默认是客户显示打标签按钮
customerId
:
0
,
//默认是客户显示打标签按钮
userAgent
:
false
,
userAgent
:
false
,
isTrue
:
tru
e
isTrue
:
fals
e
}
}
},
},
activated
()
{
activated
()
{
...
@@ -248,6 +269,7 @@ export default {
...
@@ -248,6 +269,7 @@ export default {
})
})
},
},
mounted
()
{
mounted
()
{
this
.
merchantModel
=
this
.
getLocalStorage
(
'dj_scrm_userInfo'
).
merchantModel
this
.
userAgent
=
this
.
isMobile
()
this
.
userAgent
=
this
.
isMobile
()
this
.
showLoading
()
this
.
showLoading
()
let
{
id
,
customerId
,
isTrue
}
=
this
.
getQuery
()
let
{
id
,
customerId
,
isTrue
}
=
this
.
getQuery
()
...
@@ -300,6 +322,9 @@ export default {
...
@@ -300,6 +322,9 @@ export default {
}
}
this
.
isMore
=
!
this
.
isMore
this
.
isMore
=
!
this
.
isMore
},
},
moreInfoLabel
(
index
)
{
this
.
labelArray
[
index
].
isShow
=
!
this
.
labelArray
[
index
].
isShow
},
getCustomerDetail
(
userId
)
{
getCustomerDetail
(
userId
)
{
this
.
hideLoading
()
this
.
hideLoading
()
detailApi
.
getCustomerDetail
({
userId
}).
then
(
res
=>
{
detailApi
.
getCustomerDetail
({
userId
}).
then
(
res
=>
{
...
@@ -316,9 +341,40 @@ export default {
...
@@ -316,9 +341,40 @@ export default {
Object
.
keys
(
res
).
map
(
key
=>
{
Object
.
keys
(
res
).
map
(
key
=>
{
if
(
res
[
key
])
this
.
userInfo
[
key
]
=
res
[
key
]
if
(
res
[
key
])
this
.
userInfo
[
key
]
=
res
[
key
]
})
})
this
.
initLabel
()
}
}
})
})
},
},
//标签分组
initLabel
()
{
console
.
log
(
'this.userInfo.labelInfos'
,
this
.
userInfo
.
labelInfos
)
let
labelArray
=
[
{
labelGroupType
:
'企业标签'
,
children
:
[],
isShow
:
false
},
{
labelGroupType
:
'自店标签'
,
children
:
[],
isShow
:
false
},
{
labelGroupType
:
'系统标签'
,
children
:
[],
isShow
:
false
}
]
this
.
userInfo
.
labelInfos
.
forEach
(
ele
=>
{
labelArray
.
forEach
(
label
=>
{
if
(
ele
.
labelGroupInfo
.
labelGroupType
==
label
.
labelGroupType
)
{
label
.
children
.
push
(
ele
)
}
})
})
console
.
log
(
labelArray
)
this
.
labelArray
=
labelArray
},
setDetail
({
type
,
title
,
save_key
,
maxlength
})
{
setDetail
({
type
,
title
,
save_key
,
maxlength
})
{
let
{
let
{
detailObj
,
detailObj
,
...
@@ -414,7 +470,8 @@ export default {
...
@@ -414,7 +470,8 @@ export default {
})
})
})
})
},
},
handleTag
()
{
handleTag
(
labelType
)
{
this
.
$refs
.
popRefs
.
labelType
=
labelType
this
.
$refs
.
popRefs
.
clearData
()
this
.
$refs
.
popRefs
.
clearData
()
this
.
$refs
.
popRefs
.
toggle
()
this
.
$refs
.
popRefs
.
toggle
()
},
},
...
@@ -555,20 +612,30 @@ export default {
...
@@ -555,20 +612,30 @@ export default {
}
}
.detail-third
{
.detail-third
{
margin
:
10px
16px
;
margin
:
10px
16px
;
padding
:
16px
;
padding
:
10px
16px
16px
16px
;
position
:
relative
;
.title
{
.title
{
font-size
:
16px
;
font-size
:
16px
;
color
:
#333
;
color
:
#333
;
font-weight
:
600
;
font-weight
:
600
;
line-height
:
22px
;
.prompt-text
{
font-size
:
12px
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
17px
;
margin-left
:
6px
;
}
}
}
.detail-label
{
.detail-label
{
position
:
relative
;
min-height
:
65px
;
.no-label
{
.no-label
{
position
:
absolute
;
position
:
absolute
;
top
:
50%
;
top
:
10px
;
left
:
50%
;
right
:
16px
;
transform
:
translate
(
-50%
,
-50%
);
z-index
:
99
;
//
top
:
50%
;
//
left
:
50%
;
//
transform
:
translate
(
-50%
,
-50%
);
}
}
.btn
{
.btn
{
width
:
60px
;
width
:
60px
;
...
@@ -609,6 +676,33 @@ export default {
...
@@ -609,6 +676,33 @@ export default {
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
}
}
.detail-more
{
border-radius
:
0
0
4px
4px
;
color
:
#999
;
font-size
:
12px
;
text-align
:
center
;
line-height
:
18px
;
padding
:
20px
0
0
0
;
position
:
relative
;
z-index
:
2
;
background-color
:
#fff
;
top
:
-1px
;
.btn
{
width
:
108px
;
height
:
21px
;
border-radius
:
12px
;
border
:
1px
solid
#3975c6
;
color
:
#3975c6
;
font-size
:
12px
;
.sprite-icon
{
margin-left
:
4px
;
transition
:
all
0.5s
;
}
.more
{
transform
:
rotate
(
-180deg
);
}
}
}
}
}
.detail-fourth
{
.detail-fourth
{
margin
:
10px
16px
36px
10px
;
margin
:
10px
16px
36px
10px
;
...
...
src/views/tag/make.vue
View file @
f094925
...
@@ -61,7 +61,8 @@ export default {
...
@@ -61,7 +61,8 @@ export default {
tagList
:
[],
tagList
:
[],
checkAll
:
[],
checkAll
:
[],
tagShow
:
false
,
tagShow
:
false
,
tagFlag
:
false
tagFlag
:
false
,
labelType
:
''
}
}
},
},
props
:
{
props
:
{
...
@@ -134,16 +135,22 @@ export default {
...
@@ -134,16 +135,22 @@ export default {
this
.
tagFlag
=
false
this
.
tagFlag
=
false
},
},
init
()
{
init
()
{
let
{
chooseItems
,
keyWord
,
isCustomer
}
=
this
console
.
log
(
chooseItems
,
'chooseItems'
)
let
{
chooseItems
,
keyWord
,
isCustomer
,
labelType
}
=
this
let
obj
=
{
let
obj
=
{
keyWord
keyWord
}
}
groupTag
.
gettagList
(
obj
).
then
(
res
=>
{
groupTag
.
gettagList
(
obj
).
then
(
res
=>
{
this
.
tagFlag
=
true
this
.
tagFlag
=
true
if
(
res
&&
res
.
length
>
0
)
{
if
(
res
&&
res
.
length
>
0
)
{
this
.
tagList
=
res
if
(
!
isCustomer
)
{
console
.
log
(
'this.tagList'
,
this
.
tagList
)
this
.
tagList
=
res
.
filter
(
label
=>
{
return
label
.
labelType
==
labelType
})
}
else
{
this
.
tagList
=
res
}
if
(
this
.
tagList
.
length
>
0
)
{
if
(
this
.
tagList
.
length
>
0
)
{
for
(
let
i
=
0
;
i
<
this
.
tagList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
tagList
.
length
;
i
++
)
{
this
.
tagList
[
i
].
checked
=
false
this
.
tagList
[
i
].
checked
=
false
...
@@ -212,7 +219,6 @@ export default {
...
@@ -212,7 +219,6 @@ export default {
},
},
//打标签
//打标签
handleTag
()
{
handleTag
()
{
console
.
log
(
'this.tagList'
,
this
.
tagList
)
let
tagIds
=
[]
let
tagIds
=
[]
let
deletetagIds
=
[]
let
deletetagIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
tagList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
tagList
.
length
;
i
++
)
{
...
...
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