Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 17eafcb8
authored
Sep 24, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 修改客户档案交互
1 parent
d63727d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
105 additions
and
17 deletions
pages/common/customerDetail.vue
pages/common/customerDetail.vue
View file @
17eafcb
<
template
>
<view
class=
"detail-box"
>
<view
class=
"detail-box"
@
click=
"closeToolTip"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
<view
class=
"back"
@
click=
"back"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
车主详情
</view>
...
...
@@ -10,27 +20,60 @@
<view
class=
"title"
>
车主信息
</view>
<view
class=
"customer-info"
>
<template
v-for=
"(item, index) in customerForm"
>
<view
class=
"item flex"
:key=
"index"
>
<view
class=
"item flex"
:key=
"index"
>
<view
class=
"label"
>
{{
item
.
label
}}
</view>
<view
class=
"value text-hide"
>
{{
customerInfo
[
item
.
key
]
}}
</view>
<view
class=
"value text-hide"
:id=
"item.key"
>
{{
customerInfo
[
item
.
key
]
}}
</view>
<template
v-if=
"item.showTooltipIcon"
>
<view
class=
"sprite-icon icon-customer-detail"
@
click
.
stop=
"showTooltipBox(item)"
></view>
<view
class=
"tooltip-box"
v-if=
"item.showTooltip"
@
click
.
stop
>
{{
customerInfo
[
item
.
key
]
}}
</view>
</
template
>
</view>
</template>
</view>
</view>
<view
class=
"case-box box"
>
<view
class=
"title flex"
>
推荐套餐
</view>
<scroll-view
class=
"case-scroll-box"
scroll-y
@
scrolltolower=
"pageonReachBottom"
>
<scroll-view
class=
"case-scroll-box"
scroll-y
@
scrolltolower=
"pageonReachBottom"
>
<view
class=
"case-list"
>
<
template
v-if=
"flag"
>
<template
v-if=
"list.length && list[0] && list[0].length"
>
<template
v-for=
"i in list"
>
<template
v-for=
"item in i"
>
<view
class=
"case-item"
:key=
"item.id"
@
click=
"jumpDetail(item)"
>
<image
class=
"img"
:src=
"item.cover"
></image>
<view
class=
"case-item"
:key=
"item.id"
@
click=
"jumpDetail(item)"
>
<image
class=
"img"
:src=
"item.cover"
></image>
<view
class=
"case-info"
>
<view
class=
"case-name text-hide"
>
{{
item
.
title
}}
</view>
<template
v-for=
"(j, ind) in caseInfo"
>
<view
class=
"case-text flex"
:key=
"ind"
>
<view
class=
"case-text flex"
:key=
"ind"
>
<view
class=
"case-label"
>
{{
j
.
label
}}
:
</view>
<view
:class=
"['case-value', j.class]"
>
<template
v-if=
"j.format"
>
...
...
@@ -49,7 +92,7 @@
</template>
<
template
v-else
>
<view
class=
"nothing flex"
>
<
image
class=
"icon"
src=
"@/assets/images/home/nothing.webp"
/
>
<
view
class=
"icon"
></view
>
暂无推荐套餐
</view>
</
template
>
...
...
@@ -101,6 +144,7 @@ export default {
{
label
:
'客户标签'
,
key
:
'customerTagName'
,
hasTooltip
:
true
}],
caseInfo
:
[
{
...
...
@@ -136,7 +180,7 @@ export default {
total
:
0
,
flag
:
false
,
nothing
:
false
,
pageSize
:
8
,
pageSize
:
8
}
},
onLoad
(
options
)
{
...
...
@@ -164,11 +208,15 @@ export default {
async
findVisitsInfo
(
id
)
{
const
customerInfo
=
await
uni
.
$api
.
customerApi
.
findVisitsInfo
({
id
})
}),
{
customerForm
}
=
this
customerInfo
.
customerTagName
=
customerInfo
.
customerTagName
.
replace
(
/,/g
,
'|'
)
customerInfo
.
arrivalDate
=
dayjs
(
customerInfo
.
arrivalDate
).
format
(
"YYYY.MM.DD"
)
this
.
customerInfo
=
customerInfo
this
.
getMaterialResponsePage
()
this
.
$nextTick
(()
=>
{
this
.
checkTextWidth
(
customerForm
.
find
(
e
=>
e
.
hasTooltip
))
})
},
showPopup
()
{
this
.
arrowPopup
=
true
...
...
@@ -198,7 +246,6 @@ export default {
showChannel
:
2
,
scene
:
sceneType
}
console
.
log
(
params
)
const
{
list
,
total
}
=
await
uni
.
$api
.
customerApi
.
getMaterialResponsePage
(
params
)
uni
.
hideLoading
()
list
.
map
(
e
=>
{
...
...
@@ -220,7 +267,6 @@ export default {
this
.
$forceUpdate
()
}
catch
(
error
)
{
uni
.
hideLoading
()
console
.
log
(
error
)
this
.
flag
=
true
}
},
...
...
@@ -261,6 +307,25 @@ export default {
this
.
getMaterialResponsePage
()
}
else
this
.
nothing
=
true
},
checkTextWidth
(
item
)
{
if
(
!
item
)
return
let
query
=
uni
.
createSelectorQuery
().
in
(
this
)
query
.
select
(
`#
${
item
.
key
}
`
).
boundingClientRect
((
data
)
=>
{
if
(
data
.
width
>
410
)
item
.
showTooltipIcon
=
true
this
.
$forceUpdate
()
}).
exec
()
},
showTooltipBox
(
item
)
{
item
.
showTooltip
=
!
item
.
showTooltip
this
.
$forceUpdate
()
},
closeToolTip
()
{
let
item
=
this
.
customerForm
.
find
(
e
=>
e
.
hasTooltip
)
if
(
item
.
showTooltipIcon
)
{
item
.
showTooltip
=
false
this
.
$forceUpdate
()
}
}
}
}
</
script
>
...
...
@@ -338,17 +403,19 @@ export default {
.customer-box
{
height
:
292
rpx
;
margin-bottom
:
32
rpx
;
position
:
relative
;
z-index
:
2
;
.customer-info
{
display
:
flex
;
flex-wrap
:
wrap
;
padding
:
0
48
rpx
;
gap
:
12
rpx
38
rpx
;
.item
{
width
:
50%
;
width
:
1042
rpx
;
flex-shrink
:
0
;
font-size
:
28
rpx
;
margin-bottom
:
12
rpx
;
line-height
:
44
rpx
;
position
:
relative
;
.label
{
color
:
#292d3399
;
width
:
160
rpx
;
...
...
@@ -357,6 +424,25 @@ export default {
.value
{
color
:
#292d33
;
}
.icon-customer-detail
{
flex-shrink
:
0
;
margin-left
:
16
rpx
;
}
.tooltip-box
{
position
:
absolute
;
right
:
0
;
top
:
60
rpx
;
width
:
792
rpx
;
background
:
#ffffff
cc
;
box-shadow
:
inset
0
0
16
rpx
0
#ffffff
;
border-radius
:
16
rpx
;
backdrop-filter
:
blur
(
8
rpx
);
box-sizing
:
border-box
;
padding
:
24
rpx
28
rpx
;
font-size
:
28
rpx
;
color
:
#292d33
;
line-height
:
44
rpx
;
}
}
}
}
...
...
@@ -417,6 +503,8 @@ export default {
width
:
676
rpx
;
height
:
284
rpx
;
margin-bottom
:
24
rpx
;
background-image
:
url('@/assets/images/home/nothing.webp')
;
background-size
:
100%
100%
;
}
}
.end-text
{
...
...
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