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 6ac9878f
authored
Mar 17, 2026
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 分享pdf
1 parent
32f322be
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
159 additions
and
32 deletions
pages/evaluationForm/components/pdfPreView.vue
pages/evaluationForm/evaluationFormDetails.vue
pages/usedCar/reportManagement/index.vue
pages/evaluationForm/components/pdfPreView.vue
View file @
6ac9878
...
@@ -4,14 +4,17 @@
...
@@ -4,14 +4,17 @@
<view
class=
"back"
@
click
.
stop=
"back"
>
<view
class=
"back"
@
click
.
stop=
"back"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
</view>
{{
title
}}
<view
class=
"nav-title"
>
{{
title
}}
</view>
<!-- 从报告管理跳转时,右上角显示保存按钮 -->
<view
v-if=
"showSaveBtn && reportImageUrl"
class=
"nav-save-btn"
@
click
.
stop=
"saveReportImage"
>
保存图片
</view>
</view>
</view>
<web-view
v-if=
"fileUrltype === 'html'"
:src=
"url"
></web-view>
<!-- html 报告:统一用 web-view 展示内容,按钮放在导航栏,避免被覆盖 -->
<web-view
v-if=
"fileUrltype === 'html'"
:src=
"previewUrl"
></web-view>
<view
v-else-if=
"fileUrltype !== 'pdf'"
>
<view
v-else-if=
"fileUrltype !== 'pdf'"
>
<lk-preview-office
:url=
"
u
rl"
:fileType=
"fileType"
></lk-preview-office>
<lk-preview-office
:url=
"
previewU
rl"
:fileType=
"fileType"
></lk-preview-office>
</view>
</view>
<view
v-else
>
<view
v-else
>
<lk-preview-office
:url=
"
u
rl"
fileType=
"pdf"
></lk-preview-office>
<lk-preview-office
:url=
"
previewU
rl"
fileType=
"pdf"
></lk-preview-office>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -23,28 +26,33 @@ export default {
...
@@ -23,28 +26,33 @@ export default {
mixins
:
[
report
],
mixins
:
[
report
],
data
()
{
data
()
{
return
{
return
{
u
rl
:
''
,
previewU
rl
:
''
,
title
:
''
,
title
:
''
,
fileType
:
'pdf'
,
fileType
:
'pdf'
,
Signature
:
true
,
Signature
:
true
,
fileUrltype
:
'pdf'
fileUrltype
:
'pdf'
,
showSaveBtn
:
false
,
reportImageUrl
:
''
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
)
console
.
log
(
options
)
this
.
fileUrltype
=
options
.
fileUrltype
||
'pdf'
this
.
fileUrltype
=
options
.
fileUrltype
||
'pdf'
this
.
fileType
=
options
.
fileType
||
'pdf'
this
.
fileType
=
options
.
fileType
||
'pdf'
this
.
Signature
=
options
.
Signature
===
'false'
?
false
:
(
options
.
Signature
||
true
);
this
.
Signature
=
options
.
Signature
===
'false'
?
false
:
(
options
.
Signature
||
true
);
if
(
this
.
fileType
===
'docx'
)
{
if
(
this
.
fileType
===
'docx'
)
{
this
.
u
rl
=
options
.
fileUrl
this
.
previewU
rl
=
options
.
fileUrl
}
else
if
(
!
this
.
Signature
)
{
}
else
if
(
!
this
.
Signature
)
{
this
.
u
rl
=
options
.
fileUrl
this
.
previewU
rl
=
options
.
fileUrl
}
else
{
}
else
{
this
.
u
rl
=
options
.
fileUrl
+
'&OSSAccessKeyId='
+
options
.
OSSAccessKeyId
+
'&Signature='
+
options
.
Signature
this
.
previewU
rl
=
options
.
fileUrl
+
'&OSSAccessKeyId='
+
options
.
OSSAccessKeyId
+
'&Signature='
+
options
.
Signature
}
}
this
.
title
=
options
.
fileName
this
.
title
=
options
.
fileName
console
.
log
(
this
.
url
)
// 来自报告管理的额外参数:是否显示保存按钮 & 报告图片地址
this
.
showSaveBtn
=
options
.
showSaveBtn
===
'1'
this
.
reportImageUrl
=
options
.
reportImageUrl
?
decodeURIComponent
(
options
.
reportImageUrl
)
:
''
console
.
log
(
this
.
previewUrl
)
// else this.setWv()
// else this.setWv()
},
},
mounted
()
{
mounted
()
{
...
@@ -57,6 +65,40 @@ this.url = options.fileUrl
...
@@ -57,6 +65,40 @@ this.url = options.fileUrl
animationDuration
:
100
animationDuration
:
100
})
})
},
},
// 保存报告图片到相册
saveReportImage
()
{
if
(
!
this
.
reportImageUrl
)
{
uni
.
showToast
({
title
:
'暂无可保存的图片'
,
icon
:
'none'
})
return
}
uni
.
showLoading
({
title
:
'保存中...'
,
mask
:
true
})
uni
.
downloadFile
({
url
:
this
.
reportImageUrl
,
success
:
res
=>
{
if
(
res
.
statusCode
===
200
)
{
uni
.
saveImageToPhotosAlbum
({
filePath
:
res
.
tempFilePath
,
success
:
()
=>
{
uni
.
showToast
({
title
:
'已保存到相册'
,
icon
:
'none'
})
},
fail
:
()
=>
{
uni
.
showToast
({
title
:
'保存失败'
,
icon
:
'none'
})
},
complete
:
()
=>
{
uni
.
hideLoading
()
}
})
}
else
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'下载失败'
,
icon
:
'none'
})
}
},
fail
:
()
=>
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'下载失败'
,
icon
:
'none'
})
}
})
},
setWebviewStyle
()
{
setWebviewStyle
()
{
const
setWebviewStyleWithRetry
=
()
=>
{
const
setWebviewStyleWithRetry
=
()
=>
{
const
currentWebview
=
this
.
$scope
.
$getAppWebview
()
const
currentWebview
=
this
.
$scope
.
$getAppWebview
()
...
@@ -97,11 +139,12 @@ this.url = options.fileUrl
...
@@ -97,11 +139,12 @@ this.url = options.fileUrl
left
:
0
;
left
:
0
;
top
:
toRpx
(
48
);
top
:
toRpx
(
48
);
z-index
:
9
;
z-index
:
9
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-weight
:
700
;
font-weight
:
700
;
font-size
:
toRpx
(
32
);
font-size
:
toRpx
(
32
);
color
:
#1a1a1a
;
color
:
#1a1a1a
;
line-height
:
toRpx
(
96
);
.back
{
.back
{
position
:
absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
...
@@ -113,6 +156,26 @@ this.url = options.fileUrl
...
@@ -113,6 +156,26 @@ this.url = options.fileUrl
justify-content
:
center
;
justify-content
:
center
;
}
}
}
}
.nav-title
{
max-width
:
60%
;
text-align
:
center
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.nav-save-btn
{
position
:
absolute
;
right
:
toRpx
(
24
);
top
:
50%
;
transform
:
translateY
(
-50%
);
padding
:
0
toRpx
(
24
);
height
:
toRpx
(
64
);
line-height
:
toRpx
(
64
);
border-radius
:
toRpx
(
32
);
background
:
linear-gradient
(
0deg
,
#2c66f7
0%
,
#48a6ff
100%
);
color
:
#ffffff
;
font-size
:
toRpx
(
24
);
}
.file-box
{
.file-box
{
position
:
fixed
;
position
:
fixed
;
top
:
5.2vh
;
top
:
5.2vh
;
...
...
pages/evaluationForm/evaluationFormDetails.vue
View file @
6ac9878
...
@@ -157,12 +157,33 @@
...
@@ -157,12 +157,33 @@
</view>
</view>
</view>
</view>
<view
v-else-if=
"activeTabKey == 'evaluation'"
>
<view
v-else-if=
"activeTabKey == 'evaluation'"
>
<StepperNavigation
:currentStep=
"currentStep"
:steps=
"detailsInfo.priceHistory"
direction=
"vertical"
>
<!-- priceHistory 字段废弃:按轮展示 priceHistoryByRound,每轮内展示多次报价 -->
<
template
v-slot=
"{ step, indexContent }"
>
<StepperNavigation
:currentStep=
"currentStep"
:steps=
"detailsInfo.priceHistoryByRound"
direction=
"vertical"
>
<
template
v-slot=
"{ step }"
>
<view
class=
"gridBox mb-48 padBox"
>
<view
class=
"gridBox mb-48 padBox"
>
<view
v-for=
"(item, index) in priceItems"
:key=
"index"
:class=
"['flex align-center',
{ 'full-width': item.fullWidth }]">
<!-- 多次评估师报价(opType 10):评估价1/2/3…,每条用 priceItems -->
<view
v-for=
"(h, hIndex) in getRoundQuotes(step)"
:key=
"`quote_block_$
{hIndex}`">
<view
v-for=
"(item, index) in priceItems"
:key=
"`quote_$
{hIndex}_${index}`"
:class="['flex align-center', { 'full-width': item.fullWidth }]"
>
<view
class=
"title-label-see mr-16"
>
{{
item
.
label
}}
<text
v-if=
"getRoundQuotes(step).length > 1"
>
{{
hIndex
+
1
}}
</text>
</view>
<view
class=
"flex-1 break-word"
>
{{
h
[
item
.
key
]
||
'-'
}}
{{
item
.
cell
||
''
}}
</view>
</view>
</view>
<!-- 每轮底部汇总区:客户报价 / 报价反馈 / 核价金额 / 核价意见 -->
<view
v-for=
"(item, index) in roundSummaryItems"
:key=
"`summary_$
{index}`"
:class="['flex align-center', { 'full-width': item.fullWidth }]"
>
<view
class=
"title-label-see mr-16"
>
{{
item
.
label
}}
</view>
<view
class=
"title-label-see mr-16"
>
{{
item
.
label
}}
</view>
<view
class=
"flex-1 break-word"
>
{{
detailsInfo
.
priceHistory
[
indexContent
][
item
.
key
]
||
'-'
}}
{{
item
.
cell
||
''
}}
</view>
<view
class=
"flex-1 break-word"
>
{{
getRoundSummaryValue
(
step
,
item
.
opType
,
item
.
key
)
||
'-'
}}
{{
item
.
cell
||
''
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -560,12 +581,19 @@ export default {
...
@@ -560,12 +581,19 @@ export default {
{
label
:
'原车主电话'
,
key
:
'carLicense.previousOwnerPhone'
,
fullWidth
:
true
},
{
label
:
'原车主电话'
,
key
:
'carLicense.previousOwnerPhone'
,
fullWidth
:
true
},
{
label
:
'原车主住址'
,
key
:
'carLicense.previousOwnerAddress'
,
fullWidth
:
true
}
{
label
:
'原车主住址'
,
key
:
'carLicense.previousOwnerAddress'
,
fullWidth
:
true
}
],
],
// 评估师单次报价展示字段(仅用于 opType = 10)
priceItems
:
[
priceItems
:
[
{
label
:
'评估价格'
,
key
:
'evalPriceDisplay'
},
{
label
:
'评估价格'
,
key
:
'evalPriceDisplay'
},
{
label
:
'客户意向报价'
,
key
:
'customerTargetPriceDisplay'
},
{
label
:
'报价反馈'
,
key
:
'customerTargetPriceFeedback'
,
fullWidth
:
true
},
{
label
:
'评估意见'
,
key
:
'evalOpinion'
,
fullWidth
:
true
}
{
label
:
'评估意见'
,
key
:
'evalOpinion'
,
fullWidth
:
true
}
],
],
// 每轮底部汇总信息(来自不同 opType)
roundSummaryItems
:
[
{
label
:
'客户报价'
,
key
:
'customerTargetPriceDisplay'
,
opType
:
20
},
{
label
:
'报价反馈'
,
key
:
'customerTargetPriceFeedback'
,
opType
:
20
,
fullWidth
:
true
},
{
label
:
'核价金额'
,
key
:
'evalPriceDisplay'
,
opType
:
40
},
// 核价意见同样来自核价记录(opType 40)
{
label
:
'核价意见'
,
key
:
'evalOpinion'
,
opType
:
40
,
fullWidth
:
true
}
],
editItems
:
[
editItems
:
[
{
label
:
'订单状态'
,
key
:
'status'
},
{
label
:
'订单状态'
,
key
:
'status'
},
{
label
:
'编辑人员'
,
key
:
'editor'
}
{
label
:
'编辑人员'
,
key
:
'editor'
}
...
@@ -809,9 +837,33 @@ export default {
...
@@ -809,9 +837,33 @@ export default {
})
})
.
then
(
res
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
if
(
res
.
data
.
code
==
0
)
{
that
.
detailsInfo
=
res
.
data
.
data
const
data
=
res
.
data
.
data
||
{}
// priceHistory 字段废弃:统一使用 priceHistoryByRound(按轮分组)
if
(
!
Array
.
isArray
(
data
.
priceHistoryByRound
))
data
.
priceHistoryByRound
=
[]
// 规范化每轮数据:保证 priceHistoryList 为数组,且按 quoteTime 倒序(同一轮最新在前)
// 不再改变后端轮次顺序,保持后端返回的倒序(最新轮在最上方)
data
.
priceHistoryByRound
=
data
.
priceHistoryByRound
.
map
(
r
=>
{
const
list
=
Array
.
isArray
(
r
?.
priceHistoryList
)
?
r
.
priceHistoryList
.
filter
(
Boolean
)
:
[]
list
.
sort
((
a
,
b
)
=>
{
const
ta
=
a
?.
quoteTime
||
''
const
tb
=
b
?.
quoteTime
||
''
if
(
ta
===
tb
)
return
0
return
ta
<
tb
?
1
:
-
1
})
const
quoteTime
=
list
[
0
]?.
quoteTime
||
r
?.
quoteTime
||
''
return
{
...
r
,
roundNo
:
r
?.
roundNo
,
quoteTime
,
priceHistoryList
:
list
}
})
that
.
detailsInfo
=
data
// 判断评估信息
// 判断评估信息
if
(
that
.
detailsInfo
.
priceHistory
&&
that
.
detailsInfo
.
priceHistory
.
length
>
0
)
{
if
(
that
.
detailsInfo
.
priceHistory
ByRound
&&
that
.
detailsInfo
.
priceHistoryByRound
.
length
>
0
)
{
that
.
tabs
.
find
(
i
=>
i
.
key
===
'evaluation'
).
hidden
=
false
that
.
tabs
.
find
(
i
=>
i
.
key
===
'evaluation'
).
hidden
=
false
}
}
if
(
that
.
detailsInfo
.
paymentList
&&
that
.
detailsInfo
.
paymentList
.
length
>
0
)
{
if
(
that
.
detailsInfo
.
paymentList
&&
that
.
detailsInfo
.
paymentList
.
length
>
0
)
{
...
@@ -871,6 +923,17 @@ export default {
...
@@ -871,6 +923,17 @@ export default {
console
.
log
(
'rawValue:'
,
rawValue
===
0
?
0
:
item
.
type
===
'image'
||
item
.
accept
===
'video'
?
rawValue
:
rawValue
||
'-'
,
item
.
key
,
item
)
console
.
log
(
'rawValue:'
,
rawValue
===
0
?
0
:
item
.
type
===
'image'
||
item
.
accept
===
'video'
?
rawValue
:
rawValue
||
'-'
,
item
.
key
,
item
)
return
rawValue
===
0
?
0
:
item
.
type
===
'image'
||
item
.
accept
===
'video'
?
rawValue
:
rawValue
||
'-'
return
rawValue
===
0
?
0
:
item
.
type
===
'image'
||
item
.
accept
===
'video'
?
rawValue
:
rawValue
||
'-'
},
},
// 取当前轮次中所有评估师报价(opType = 10)
getRoundQuotes
(
step
)
{
const
list
=
Array
.
isArray
(
step
?.
priceHistoryList
)
?
step
.
priceHistoryList
:
[]
return
list
.
filter
(
i
=>
String
(
i
.
opType
)
===
'10'
)
},
// 取当前轮次底部汇总字段(根据 opType + 字段名)
getRoundSummaryValue
(
step
,
opType
,
key
)
{
const
list
=
Array
.
isArray
(
step
?.
priceHistoryList
)
?
step
.
priceHistoryList
:
[]
const
record
=
list
.
find
(
i
=>
String
(
i
.
opType
)
===
String
(
opType
))
return
record
?
record
[
key
]
:
''
},
getImageBySubtype
(
subtype
)
{
getImageBySubtype
(
subtype
)
{
if
(
!
this
.
detailsInfo
.
images
)
return
[]
if
(
!
this
.
detailsInfo
.
images
)
return
[]
if
(
subtype
===
41
||
subtype
===
22
||
subtype
===
51
)
{
if
(
subtype
===
41
||
subtype
===
22
||
subtype
===
51
)
{
...
@@ -1039,7 +1102,7 @@ export default {
...
@@ -1039,7 +1102,7 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.title-label-see
{
.title-label-see
{
width
:
toRpx
(
1
6
8
);
width
:
toRpx
(
1
9
8
);
color
:
#999999
;
color
:
#999999
;
font-size
:
toRpx
(
28
);
font-size
:
toRpx
(
28
);
font-weight
:
400
;
font-weight
:
400
;
...
@@ -1081,7 +1144,7 @@ export default {
...
@@ -1081,7 +1144,7 @@ export default {
padding-bottom
:
toRpx
(
28
);
padding-bottom
:
toRpx
(
28
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.title-label-see
{
.title-label-see
{
width
:
toRpx
(
1
6
8
);
width
:
toRpx
(
1
9
8
);
color
:
#999999
;
color
:
#999999
;
font-size
:
toRpx
(
28
);
font-size
:
toRpx
(
28
);
font-weight
:
400
;
font-weight
:
400
;
...
...
pages/usedCar/reportManagement/index.vue
View file @
6ac9878
...
@@ -567,7 +567,8 @@ export default {
...
@@ -567,7 +567,8 @@ export default {
toDetail
(
i
)
{
toDetail
(
i
)
{
if
(
i
.
status
===
1
)
{
if
(
i
.
status
===
1
)
{
const
reportUrl
=
i
.
reportUrl
const
reportUrl
=
i
.
reportUrl
const
url
=
`/pages/evaluationForm/components/pdfPreView?fileUrl=
${
reportUrl
}
&fileUrltype=html&Signature=false`
const
reportImageUrl
=
encodeURIComponent
(
i
.
reportImageUrl
||
''
)
const
url
=
`/pages/evaluationForm/components/pdfPreView?fileUrl=
${
reportUrl
}
&fileUrltype=html&Signature=false&showSaveBtn=1&reportImageUrl=
${
reportImageUrl
}
`
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
`
${
url
}
`
url
:
`
${
url
}
`
})
})
...
...
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