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
75e08b69
Commit
75e08b69
authored
May 29, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出车
parent
8d20102f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
6 deletions
+82
-6
index.vue
src/views/vehicle/vehicleInfo/index.vue
+82
-6
No files found.
src/views/vehicle/vehicleInfo/index.vue
View file @
75e08b69
...
@@ -604,9 +604,16 @@
...
@@ -604,9 +604,16 @@
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
></el-date-picker>
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"出车分公司"
prop=
"departureBranchCompanyId"
>
<el-form-item
label=
"出车分公司"
prop=
"departureBranchCompanyId"
>
<el-select
class=
"filter-item"
v-model=
"departureForm.departureBranchCompanyId"
placeholder=
"请选择分公司"
>
<el-autocomplete
<el-option
v-for=
"item in allCompanies"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
class=
"inline-input"
</el-select>
v-model=
"departureForm.departureBranchCompanyName"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
@
select=
"handleSelectDepartureForm"
></el-autocomplete>
<!--<el-select class="filter-item" v-model="departureForm.departureBranchCompanyId" placeholder="请选择分公司">-->
<!--<el-option v-for="item in allCompanies" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--</el-select>-->
</el-form-item>
</el-form-item>
<el-form-item
label=
"用途"
prop=
"use"
>
<el-form-item
label=
"用途"
prop=
"use"
>
<el-input
v-model=
"departureForm.use"
placeholder=
"请输入出车用途"
></el-input>
<el-input
v-model=
"departureForm.use"
placeholder=
"请输入出车用途"
></el-input>
...
@@ -627,9 +634,16 @@
...
@@ -627,9 +634,16 @@
<el-input
v-model=
"departureForm.mileage"
placeholder=
"请输入出车时公里数"
></el-input>
<el-input
v-model=
"departureForm.mileage"
placeholder=
"请输入出车时公里数"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"预计还车分公司"
prop=
"expectArrivalBranchCompanyId"
>
<el-form-item
label=
"预计还车分公司"
prop=
"expectArrivalBranchCompanyId"
>
<el-select
class=
"filter-item"
v-model=
"departureForm.expectArrivalBranchCompanyId"
placeholder=
"请选择分公司"
>
<el-autocomplete
<el-option
v-for=
"item in allCompanies"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
class=
"inline-input"
</el-select>
v-model=
"departureForm.expectArrivalBranchCompanyName"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
@
select=
"handleSelectEexpectArrivalCompanyName"
></el-autocomplete>
<!--<el-select class="filter-item" v-model="departureForm.expectArrivalBranchCompanyId" placeholder="请选择分公司">-->
<!--<el-option v-for="item in allCompanies" :key="item.id" :label="item.name" :value="item.id"></el-option>-->
<!--</el-select>-->
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -1047,12 +1061,14 @@
...
@@ -1047,12 +1061,14 @@
numberPlate
:
null
,
numberPlate
:
null
,
departureDate
:
null
,
departureDate
:
null
,
departureBranchCompanyId
:
null
,
departureBranchCompanyId
:
null
,
departureBranchCompanyName
:
''
,
use
:
null
,
use
:
null
,
user
:
null
,
user
:
null
,
userTel
:
null
,
userTel
:
null
,
checkMan
:
null
,
checkMan
:
null
,
checkManTel
:
null
,
checkManTel
:
null
,
expectArrivalBranchCompanyId
:
null
,
expectArrivalBranchCompanyId
:
null
,
expectArrivalBranchCompanyName
:
''
,
mileage
:
null
mileage
:
null
},
},
arrivalDialogVisible
:
false
,
arrivalDialogVisible
:
false
,
...
@@ -1255,6 +1271,22 @@
...
@@ -1255,6 +1271,22 @@
return
(
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
);
return
(
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
);
};
};
},
},
handleSelectDepartureForm
(
item
){
if
(
item
.
value
==
"全部"
){
this
.
departureForm
.
departureBranchCompanyId
=
undefined
;
}
else
{
this
.
departureForm
.
departureBranchCompanyId
=
item
.
id
;
}
console
.
log
(
item
);
},
handleSelectEexpectArrivalCompanyName
(
item
){
if
(
item
.
value
==
"全部"
){
this
.
departureForm
.
expectArrivalBranchCompanyId
=
undefined
;
}
else
{
this
.
departureForm
.
expectArrivalBranchCompanyId
=
item
.
id
;
}
console
.
log
(
item
);
},
handleSelect1
(
item
){
handleSelect1
(
item
){
if
(
item
.
value
==
"全部"
){
if
(
item
.
value
==
"全部"
){
this
.
form
.
subordinateBranch
=
undefined
;
this
.
form
.
subordinateBranch
=
undefined
;
...
@@ -1390,6 +1422,21 @@
...
@@ -1390,6 +1422,21 @@
// open dialog
// open dialog
this
.
departureDialogVisible
=
true
;
this
.
departureDialogVisible
=
true
;
this
.
clearDepartureForm
();
this
.
clearDepartureForm
();
let
that
=
this
;
let
selectArry
=
[];
this
.
allCompaniesArr
.
map
(
function
(
item
){
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
this
.
departureForm
.
mileage
=
row
.
mileage
;
this
.
departureForm
.
expectArrivalBranchCompanyId
=
row
.
subordinateBranch
;
this
.
departureForm
.
departureBranchCompanyId
=
row
.
subordinateBranch
;
selectArry
.
map
(
function
(
iitem
)
{
if
(
row
.
subordinateBranch
==
iitem
.
id
){
that
.
departureForm
.
departureBranchCompanyName
=
iitem
.
name
;
that
.
departureForm
.
expectArrivalBranchCompanyName
=
iitem
.
name
;
}
});
this
.
departureForm
.
vehicleId
=
row
.
id
;
this
.
departureForm
.
vehicleId
=
row
.
id
;
this
.
departureForm
.
numberPlate
=
row
.
numberPlate
;
this
.
departureForm
.
numberPlate
=
row
.
numberPlate
;
this
.
departureForm
.
departureDate
=
Date
();
this
.
departureForm
.
departureDate
=
Date
();
...
@@ -1402,6 +1449,7 @@
...
@@ -1402,6 +1449,7 @@
this
.
departureForm
=
{
this
.
departureForm
=
{
vehicleId
:
null
,
vehicleId
:
null
,
numberPlate
:
null
,
numberPlate
:
null
,
departureBranchCompanyName
:
''
,
departureDate
:
null
,
departureDate
:
null
,
departureBranchCompanyId
:
null
,
departureBranchCompanyId
:
null
,
use
:
null
,
use
:
null
,
...
@@ -1410,10 +1458,18 @@
...
@@ -1410,10 +1458,18 @@
checkMan
:
null
,
checkMan
:
null
,
checkManTel
:
null
,
checkManTel
:
null
,
expectArrivalBranchCompanyId
:
null
,
expectArrivalBranchCompanyId
:
null
,
expectArrivalBranchCompanyName
:
''
,
mileage
:
null
mileage
:
null
}
}
},
},
departureVehicleHandler
()
{
departureVehicleHandler
()
{
console
.
log
(
this
.
departureForm
);
if
(
this
.
departureForm
.
expectArrivalBranchCompanyName
==
"全部"
||
this
.
departureForm
.
expectArrivalBranchCompanyName
==
''
){
this
.
departureForm
.
expectArrivalBranchCompanyId
=
undefined
;
}
if
(
this
.
departureForm
.
departureBranchCompanyName
==
"全部"
||
this
.
departureForm
.
departureBranchCompanyName
==
''
){
this
.
departureForm
.
departureBranchCompanyId
=
undefined
;
}
departureVehicle
(
this
.
departureForm
).
then
(
response
=>
{
departureVehicle
(
this
.
departureForm
).
then
(
response
=>
{
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
this
.
departureDialogVisible
=
false
;
this
.
departureDialogVisible
=
false
;
...
@@ -1664,6 +1720,16 @@
...
@@ -1664,6 +1720,16 @@
},
},
create
(
formName
)
{
create
(
formName
)
{
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
;
if
(
!
this
.
form
.
state2
||
this
.
form
.
state2
==
"全部"
){
this
.
form
.
subordinateBranch
=
undefined
;
this
.
$notify
({
title
:
'失败'
,
message
:
'请选择分公司'
,
type
:
'warning'
,
duration
:
2000
});
return
;
}
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
let
formTemp
=
this
.
fillDateRange2Object
(
this
.
form
,
'insuranceDateRange4form'
,
'insuranceStartDate'
,
'insuranceEndDate'
);
let
formTemp
=
this
.
fillDateRange2Object
(
this
.
form
,
'insuranceDateRange4form'
,
'insuranceStartDate'
,
'insuranceEndDate'
);
...
@@ -1704,6 +1770,16 @@
...
@@ -1704,6 +1770,16 @@
},
},
update
(
formName
)
{
update
(
formName
)
{
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
;
if
(
!
this
.
form
.
state2
||
this
.
form
.
state2
==
"全部"
){
this
.
form
.
subordinateBranch
=
undefined
;
this
.
$notify
({
title
:
'失败'
,
message
:
'请选择分公司'
,
type
:
'warning'
,
duration
:
2000
});
return
;
}
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
let
formTemp
=
this
.
fillDateRange2Object
(
this
.
form
,
'insuranceDateRange4form'
,
'insuranceStartDate'
,
'insuranceEndDate'
);
let
formTemp
=
this
.
fillDateRange2Object
(
this
.
form
,
'insuranceDateRange4form'
,
'insuranceStartDate'
,
'insuranceEndDate'
);
...
...
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