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 4fb97ad6
authored
Nov 24, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交详情
1 parent
1941408d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
362 additions
and
0 deletions
src/router/routes.js
src/views/customer/detail.vue
src/views/customer/editDetail.vue
src/router/routes.js
View file @
4fb97ad
...
...
@@ -23,6 +23,18 @@ const pages = {
title
:
'完善信息'
,
backgroundColor
:
'#F7F7F7'
}
},
{
name
:
'detail'
,
meta
:
{
title
:
'查看客户详情'
,
backgroundColor
:
'#F7F7F7'
}
},
{
name
:
'editDetail'
,
meta
:
{
title
:
'查看客户详情'
,
backgroundColor
:
'#F7F7F7'
}
}]
}
...
...
src/views/customer/detail.vue
View file @
4fb97ad
<
template
>
<div
style=
"padding-bottom: 30px"
>
<div
class=
"detail-bg detail-first"
>
<div
class=
"detail-customer"
>
<div
class=
"sprite-icon icon-avatar"
></div>
<div
class=
"detail-customer-name"
>
<span
class=
"name"
>
小晶
</span>
<span
class=
"wechat"
>
@微信
</span>
<div>
女
</div>
</div>
</div>
<div
class=
"detail-member"
>
<span
class=
"name"
>
所属成员
</span>
<span>
陈晓凯、熬浓
</span>
</div>
</div>
<div
class=
"detail-second"
>
<van-cell-group
:class=
"[isMore ? '' : 'more-hidden']"
inset
>
<van-cell
title=
"添加时间"
value=
"内容"
/>
<van-cell
title=
"添加渠道"
value=
"内容"
/>
<van-cell
title=
"联系电话"
value=
"2324"
is-link
@
click=
"toEdit('设置联系电话')"
/>
<van-cell
title=
"身份证号码"
value=
"123412412"
is-link
@
click=
"toEdit('设置身份证号码')"
/>
<van-cell
title=
"购车日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"近期保养日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"近期到店日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"商业险到期日期"
:value=
"date"
@
click=
"show = true"
is-link
/>
<van-cell
title=
"车系"
value=
"123412412"
is-link
@
click=
"toEdit('设置车系')"
/>
<van-cell
title=
"车型"
value=
"123412412"
is-link
@
click=
"toEdit('设置车型')"
/>
<van-calendar
v-model=
"show"
color=
"#6760ff"
@
confirm=
"onConfirm"
/>
</van-cell-group>
<div
class=
"detail-more"
@
click=
"moreInfo"
>
{{
isMore
?
'收起'
:
'更多信息'
}}
</div>
</div>
<div
class=
"detail-bg detail-third"
>
<div
class=
"title"
>
客户标签
</div>
<div
class=
"detail-label"
>
<div
v-if=
"labelist.length == 0"
class=
"no-label"
>
<div
class=
"btn"
>
<van-icon
name=
"plus"
/>
<span>
标签
</span>
</div>
</div>
<div
class=
"has-label"
v-else
>
<div>
<div
v-for=
"item in labelist"
:key=
"item.id"
class=
"label-text"
>
{{
item
.
name
}}
</div>
</div>
<div
class=
"btn-box"
>
<div
class=
"btn"
>
<van-icon
name=
"plus"
/>
<span>
标签
</span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"detail-bg detail-fourth"
>
<div
class=
"title"
>
所属群聊
</div>
<div
class=
"detail-group"
>
<div
v-if=
"groupList.length == 0"
class=
"no-data"
>
暂无数据
</div>
<div
v-else
>
<div
v-for=
"itm in groupList"
:key=
"itm.id"
class=
"group-item"
>
<div
class=
"group-avatar"
></div>
<div
class=
"name"
>
{{
itm
.
groupName
}}
(
{{
itm
.
num
}}
)
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
show
:
false
,
date
:
''
,
value
:
''
,
isMore
:
false
,
labelist
:
[
{
id
:
1
,
name
:
'即将离开'
},
{
id
:
2
,
name
:
'大四'
},
{
id
:
3
,
name
:
'大四'
},
{
id
:
4
,
name
:
'大四'
},
{
id
:
5
,
name
:
'大四'
},
{
id
:
6
,
name
:
'大四'
}
],
groupList
:
[
{
id
:
1
,
groupName
:
'发发呆'
,
num
:
2
},
{
id
:
2
,
groupName
:
'烦的还是挺好的发挥地方'
,
num
:
4
},
{
id
:
3
,
groupName
:
'和任何人聚'
,
num
:
6
}
]
}
},
methods
:
{
onConfirm
(
date
)
{
console
.
log
(
date
)
// const [start, end] = date
this
.
show
=
false
this
.
date
=
date
// this.date = `${this.formatDate(start)} - ${this.formatDate(end)}`
},
moreInfo
()
{
this
.
isMore
=
!
this
.
isMore
},
toEdit
(
title
,
value
)
{
this
.
$router
.
push
({
name
:
'customer.editDetail'
,
params
:
{
title
}
})
}
}
}
</
script
>
<
style
lang=
"scss"
scope
>
.detail-bg
{
background-color
:
#fff
;
border-radius
:
4px
;
box-shadow
:
0px
4px
8px
0px
rgba
(
224
,
224
,
224
,
0.5
);
}
.detail-first
{
padding
:
22px
10px
0
;
margin
:
10px
16px
;
.detail-customer
{
display
:
flex
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.1
);
padding
:
0
10px
21px
;
&-name
{
font-size
:
16px
;
margin-left
:
16px
;
color
:
#333
;
.name
{
font-weight
:
600
;
margin-right
:
6px
;
}
.wechat
{
color
:
#6760ff
;
}
div
{
font-size
:
14px
;
}
}
}
.detail-member
{
display
:
flex
;
align-items
:
center
;
font-size
:
14px
;
height
:
42px
;
color
:
#333
;
.name
{
color
:
#999
;
padding
:
0
10px
;
//
border-right
:
1px
solid
#999
;
margin-right
:
10px
;
position
:
relative
;
&::after
{
content
:
''
;
display
:
block
;
width
:
1px
;
height
:
14px
;
position
:
absolute
;
right
:
0
;
top
:
50%
;
transform
:
translateY
(
-50%
);
background-color
:
#999
;
}
}
}
}
.detail-second
{
.van-cell-group
{
box-shadow
:
0px
4px
8px
0px
rgba
(
224
,
224
,
224
,
0.5
);
}
.more-hidden
{
max-height
:
132px
;
overflow
:
hidden
;
}
.detail-more
{
background-color
:
#ededed
;
border-radius
:
0
0
4px
4px
;
color
:
#999
;
font-size
:
12px
;
text-align
:
center
;
line-height
:
18px
;
padding
:
5px
0
;
margin
:
0
16px
;
}
}
.detail-third
{
margin
:
10px
16px
;
padding
:
10px
16px
;
.title
{
font-size
:
16px
;
color
:
#333
;
font-weight
:
600
;
}
.detail-label
{
position
:
relative
;
min-height
:
65px
;
.no-label
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
}
.btn
{
width
:
60px
;
height
:
20px
;
background-color
:
#5850ff
;
color
:
#fff
;
font-size
:
12px
;
text-align
:
center
;
border-radius
:
11px
;
padding
:
4px
;
}
.has-label
{
//
display
:
flex
;
margin-top
:
20px
;
.btn-box
{
display
:
flex
;
justify-content
:
flex-end
;
}
}
.label-text
{
display
:
inline-block
;
margin
:
0
4px
4px
0
;
max-width
:
66px
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
word-break
:
break-all
;
border-radius
:
14px
;
background-color
:
rgba
(
88
,
80
,
255
,
0.15
);
font-size
:
14px
;
color
:
#5850ff
;
line-height
:
20px
;
padding
:
4px
12px
;
text-align
:
center
;
box-sizing
:
border-box
;
}
}
}
.detail-fourth
{
margin
:
10px
16px
;
padding
:
10px
16px
0
;
.detail-group
{
min-height
:
81px
;
position
:
relative
;
margin-top
:
4px
;
.no-data
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
font-size
:
12px
;
color
:
#999
;
}
.group-item
{
display
:
flex
;
align-items
:
center
;
padding
:
17px
0
;
border-bottom
:
1px
solid
rgba
(
0
,
0
,
0
,
0.1
);
&:last-child
{
border-bottom
:
none
;
}
.group-avatar
{
width
:
44px
;
height
:
44px
;
background-color
:
#e1e1e1
;
}
.name
{
font-size
:
16px
;
color
:
#333
;
font-weight
:
500
;
margin-left
:
10px
;
}
}
}
}
</
style
>
src/views/customer/editDetail.vue
0 → 100644
View file @
4fb97ad
<
template
>
<div
class=
"edit-wrapper"
>
<van-field
v-model=
"value"
placeholder=
"请输入"
/>
<div
class=
"submit"
>
保存
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
value
:
''
}
},
created
()
{
document
.
title
=
this
.
$route
.
params
.
title
}
}
</
script
>
<
style
lang=
"scss"
scope
>
.edit-wrapper
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
}
.submit
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
bottom
:
16px
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
343px
;
height
:
42px
;
background-color
:
#5859ff
;
border-radius
:
21px
;
font-size
:
14px
;
color
:
#fff
;
}
</
style
>
\ No newline at end of file
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