Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform-ui
Commits
cb1df2f6
Commit
cb1df2f6
authored
Dec 31, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Plain Diff
提交代码
parents
97105fe7
68a42fef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
2 deletions
+54
-2
index.vue
src/views/vehicle/vehicleInfo/index.vue
+54
-2
No files found.
src/views/vehicle/vehicleInfo/index.vue
View file @
cb1df2f6
...
...
@@ -681,7 +681,7 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"交强险单号"
prop=
"strongInsuranceNo"
>
<el-input
v-model
=
"form.strongInsuranceNo
"
placeholder=
"请输入交强险单号"
></el-input>
<el-input
v-model
.
text=
"form.strongInsuranceNo"
@
input=
"handleInput
"
placeholder=
"请输入交强险单号"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -770,6 +770,26 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item
label=
"保单pdf"
prop=
"insurancePDF"
:style=
"{display:'block'}"
>
<el-upload
ref=
"uploadPdf"
:action=
"BASE_API + '/api/universal/file/app/unauth/admin/upload'"
:show-file-list=
"false"
:headers=
"getHeaderWithToken"
:on-success=
"handleAvatarSuccessPDF"
:style=
"{display:'inline-block'}"
accept=
".pdf"
>
<el-button
size=
"small"
plain
>
选择文件
</el-button>
</el-upload>
<div
v-for=
"(item, i) in pdfList"
:key =
i
@
click=
"downloadPDF(i)"
>
<span>
{{item.name}}
</span>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
...
...
@@ -1040,6 +1060,7 @@ export default {
licenceSrcUrl
:
undefined
,
showLoadingBody
:
false
,
allVehicleList
:
[],
//全部车型
pdfList
:[],
form
:
{
insuranceEndDate
:
null
,
//商业险日期
vehicleModelName
:
''
,
//车型
...
...
@@ -1073,7 +1094,8 @@ export default {
strongInsuranceCompany
:
undefined
,
strongInsuranceEndDate
:
undefined
,
strongInsuranceNo
:
undefined
,
strongInsuranceCompany
:
undefined
strongInsuranceCompany
:
undefined
,
insurancePDF
:
undefined
},
rules
:
{
subordinateBranchName
:
[
...
...
@@ -1841,6 +1863,9 @@ export default {
},
methods
:
{
handleInput
(
e
){
this
.
form
.
strongInsuranceNo
=
e
.
target
.
value
.
replace
(
/
[^\d]
/g
,
''
);
},
cityRegions4Query
()
{
let
that
=
this
if
(
!
this
.
$utils
.
isInteger
(
this
.
listQuery
.
addrProvince
))
{
...
...
@@ -2408,9 +2433,31 @@ export default {
this
.
form
.
drivingLicenseDuplicatePath
=
res
.
data
this
.
showLoadingBody
=
false
},
handleAvatarSuccessPDF
(
res
,
file
)
{
if
(
res
.
data
)
{
if
(
this
.
pdfList
.
length
>=
0
)
{
var
data
=
{
"id"
:
this
.
pdfList
.
length
+
1
,
"name"
:
"车辆保单"
+
(
this
.
pdfList
.
length
+
1
),
"url"
:
res
.
data
}
this
.
pdfList
.
push
(
data
)
}
}
this
.
showLoadingBody
=
false
},
downloadPDF
(
i
)
{
var
data
=
this
.
pdfList
[
i
].
url
;
if
(
data
)
{
window
.
open
(
data
,
'_blank'
);
}
else
{
alert
(
"车辆保单不存在"
)
}
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/gif'
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/gif'
||
file
.
type
===
'image/pdf'
const
isLt2M
=
file
.
size
/
1024
/
1024
<
10
if
(
!
isJPG
)
{
...
...
@@ -2759,6 +2806,7 @@ export default {
this
.
$utils
.
objectEach
(
response
.
data
,
(
item
,
key
)
=>
{
this
.
form
[
key
]
=
item
})
that
.
pdfList
=
[]
selectArry
.
map
(
function
(
iitem
)
{
if
(
that
.
form
[
'subordinateBranch'
]
==
iitem
.
id
)
{
that
.
form
.
subordinateBranchName
=
iitem
.
name
...
...
@@ -2768,6 +2816,9 @@ export default {
that
.
form
.
parkBranchCompanyName
=
iitem
.
name
that
.
form
.
parkBranchCompanyId
=
iitem
.
id
}
if
(
that
.
form
.
insurancePDF
)
{
that
.
pdfList
=
JSON
.
parse
(
that
.
form
.
insurancePDF
)
}
})
selectVehicleModelArry
.
map
(
function
(
value
)
{
if
(
that
.
form
[
'modelId'
]
==
value
.
id
)
{
...
...
@@ -2869,6 +2920,7 @@ export default {
const
set
=
this
.
$refs
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
form
.
insurancePDF
=
JSON
.
stringify
(
this
.
pdfList
)
let
formTemp
=
this
.
fillDateRange2Object
(
this
.
form
,
'insuranceDateRange4form'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment