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
5d459770
Commit
5d459770
authored
Aug 03, 2019
by
denghr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预约信息
parent
5a3cf766
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
399 additions
and
154 deletions
+399
-154
index.js
src/api/vehicle/bookRecord/index.js
+18
-0
index.vue
src/views/vehicle/bookRecord/index.vue
+376
-149
index.vue
src/views/vehicle/vehicleInfo/index.vue
+5
-5
No files found.
src/api/vehicle/bookRecord/index.js
View file @
5d459770
...
...
@@ -79,4 +79,22 @@ export function saveOrderViolation(params) {
method
:
'post'
,
data
:
params
});
}
//出车
export
function
departureVehicle
(
param
)
{
return
fetch
({
url
:
'/vehicle/active/small/departure'
,
method
:
'post'
,
data
:
param
});
}
//收车
export
function
arrivalVehicle
(
param
)
{
return
fetch
({
url
:
'/vehicle/active/small/arrival'
,
method
:
'post'
,
data
:
param
});
}
\ No newline at end of file
src/views/vehicle/bookRecord/index.vue
View file @
5d459770
...
...
@@ -48,11 +48,11 @@
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"停靠公司"
width=
"120"
>
<
!-- <
el-table-column align="center" label="停靠公司" width="120">
<template scope="scope">
<span>{{scope.row.liftCompanyName}}</span>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
align=
"center"
label=
"申请状态"
>
<
template
scope=
"scope"
>
...
...
@@ -191,18 +191,13 @@
<
template
scope=
"scope"
>
<!--
<el-button
size=
"small"
type=
"success"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button>
-->
<el-button
size=
"small"
type=
"success"
v-if=
"scope.row.status==3"
@
click=
"illegalInquiry(scope.row)"
>
违章记录
</el-button>
<el-button
v-if=
"bookRecord_btn_prove&&scope.row.status==1"
size=
"small"
type=
"success"
@
click=
"handleProve(scope.row)"
>
通过
</el-button>
<el-button
v-if=
"bookRecord_btn_reject&&scope.row.status==1"
size=
"small"
type=
"danger"
@
click=
"handleReject(scope.row)"
>
驳回
</el-button>
<!--
<el-button
v-if=
"bookRecord_btn_lift && checkIfProved(scope.row.status)"
size=
"small"
type=
"success"
@
click=
"handleLift(scope.row)"
>
提车
</el-button>
<el-button
v-if=
"bookRecord_btn_ret && checkIfLift(scope.row.status)"
size=
"small"
type=
"success"
@
click=
"handleRet(scope.row)"
>
还车
</el-button>
-->
<el-button
v-if=
"bookRecord_btn_unbook && checkIfProved(scope.row.status)"
size=
"small"
type=
"danger"
@
click=
"handleUnbook(scope.row)"
>
取消预定
<el-button
v-if=
"bookRecord_btn_prove&&scope.row.status==1"
size=
"small"
type=
"success"
@
click=
"handleProve(scope.row)"
>
通过
</el-button>
<el-button
v-if=
"bookRecord_btn_reject&&scope.row.status==1"
size=
"small"
type=
"danger"
@
click=
"handleReject(scope.row)"
>
驳回
</el-button>
<el-button
v-if=
"bookRecord_btn_lift&&scope.row.liftStatus==1"
size=
"small"
type=
"success"
@
click=
"handleLift(scope.row)"
>
出车
</el-button>
<template
v-if=
"scope.row.vehicleDepartureLogVo!=undefined"
>
<el-button
v-if=
"bookRecord_btn_ret&&scope.row.vehicleDepartureLogVo.state==0&&scope.row.retStatus==1"
size=
"small"
type=
"success"
@
click=
"handleRet(scope.row)"
>
收车
</el-button>
</
template
>
<el-button
v-if=
"bookRecord_btn_unbook && scope.row.state==2"
size=
"small"
type=
"danger"
@
click=
"handleUnbook(scope.row)"
>
取消预定
</el-button>
</template>
</el-table-column>
...
...
@@ -245,11 +240,11 @@
<span>
{{detailItem.vehicleId}}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"7"
>
<
!-- <
el-col :span="7">
<el-form-item label="当前停靠公司">
<span>{{detailItem.liftCompanyName}}</span>
</el-form-item>
</el-col>
</el-col>
-->
</el-row>
<el-row>
<el-col
:span=
"24"
>
...
...
@@ -323,6 +318,21 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"提车公里数"
>
<span
v-if=
"detailItem.vehicleDepartureLogVo.mileageStart"
>
{{detailItem.vehicleDepartureLogVo.mileageStart}}KM
</span>
</el-form-item>
</el-col>
</el-row>
<el-row
style=
"margin-left: 20px;"
>
<el-col
:span=
"3"
v-for=
"(item, index) in departurePicList"
:key=
"index"
:offset=
"index%6 > 0 ? 1 : 0"
style=
"margin-bottom:10px"
>
<el-card>
<img
:src=
"item"
class=
"image"
>
</el-card>
</el-col>
</el-row>
<hr>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"还车分公司"
>
...
...
@@ -342,16 +352,16 @@
</el-row>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"
提
车公里数"
>
<span
v-if=
"detailItem.vehicleDepartureLogVo
"
>
{{detailItem.vehicleDepartureLogVo.mileageStart
}}KM
</span>
<el-form-item
label=
"
还
车公里数"
>
<span
v-if=
"detailItem.vehicleDepartureLogVo
.mileageEnd"
>
{{detailItem.vehicleDepartureLogVo.mileageEnd
}}KM
</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"
24
"
>
<el-
form-item
label=
"还车公里数"
>
<
span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.mileageEnd}}KM
</span
>
</el-
form-item
>
<el-row
style=
"margin-left: 20px;"
>
<el-col
:span=
"
3"
v-for=
"(item, index) in arrivalPicList"
:key=
"index"
:offset=
"index%6 > 0 ? 1 : 0"
style=
"margin-bottom:10px
"
>
<el-
card
>
<
img
:src=
"item"
class=
"image"
>
</el-
card
>
</el-col>
</el-row>
<hr>
...
...
@@ -374,68 +384,129 @@
</div>
</el-dialog>
<!-- 提车对话框相关html元素 -->
<el-dialog
title=
"提车"
:visible
.
sync=
"dialogForm4LiftVisible"
>
<el-form
:model=
"form4Lift"
:rules=
"rules4Lift"
ref=
"form4Lift"
label-width=
"120px"
>
<el-form-item
label=
"提车分公司"
prop=
"liftCompany"
>
<!-- 出车对话框相关html元素 -->
<el-dialog
title=
"出车"
:visible
.
sync=
"dialogForm4LiftVisible"
>
<el-form
:model=
"departureForm"
:rules=
"departureFormrules"
ref=
"departureForm"
label-width=
"120px"
>
<el-form-item
label=
"车牌号"
>
<el-input
v-model=
"departureForm.numberPlate"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"出车时间"
>
<el-date-picker
v-model=
"departureForm.departureDate"
type=
"date"
disabled
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
></el-date-picker>
</el-form-item>
<el-form-item
label=
"出车分公司"
>
<el-autocomplete
class=
"inline-input"
v-model=
"
form4Lift.state1
"
v-model=
"
departureForm.departureBranchCompanyName
"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
@
select=
"handleSelect1"
disabled
></el-autocomplete>
</el-form-item>
<el-form-item
label=
"提车里程数"
prop=
"mileageLift"
>
<el-input
v-model
.
number=
"form4Lift.mileageLift"
placeholder=
"请输入当前车辆里程数"
></el-input>
<el-form-item
label=
"目的地分公司"
prop=
"expectArrivalBranchCompanyName"
>
<el-autocomplete
class=
"inline-input"
v-model=
"departureForm.expectArrivalBranchCompanyName"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
disabled
></el-autocomplete>
</el-form-item>
<el-form-item
label=
"提车备注"
prop=
"liftRemark"
>
<el-input
v-model=
"form4Lift.liftRemark"
placeholder=
"请输入备注信息"
></el-input>
<el-form-item
label=
"用途"
>
<el-input
v-model=
"departureForm.use"
placeholder=
"请输入出车用途"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"使用人"
>
<el-input
v-model=
"departureForm.user"
placeholder=
"请输入出车使用人"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"使用人联系方式"
>
<el-input
v-model=
"departureForm.userTel"
placeholder=
"请输入出车使用人联系方式"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"验车人"
prop=
"checkMan"
>
<el-input
v-model=
"departureForm.checkMan"
placeholder=
"请输入出车验车人"
></el-input>
</el-form-item>
<el-form-item
label=
"验车人联系方式"
prop=
"checkManTel"
>
<el-input
v-model=
"departureForm.checkManTel"
placeholder=
"请输入出车验车人联系方式"
></el-input>
</el-form-item>
<el-form-item
label=
"公里数"
prop=
"mileage"
>
<el-input
v-model
.
number=
"departureForm.mileage"
placeholder=
"请输入出车时公里数"
></el-input>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"departureForm.remark"
placeholder=
"请输入备注"
></el-input>
</el-form-item>
<el-row>
<el-col>
<el-form-item
label=
"出车截图"
:style=
"{display:'block'}"
required
>
<el-upload
class=
"upload-demo"
:headers=
"getHeaderWithToken"
action=
"https://xxtest.upyuns.com/api/universal/file/app/unauth/admin/upload"
:on-remove=
"handleDepartureRemove"
:file-list=
"departurePicList"
:on-success=
"handleDepartureSuccess"
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelDialog4Lift('
form4Lift
')"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"liftOk('
form4Lift
')"
>
确 定
</el-button>
<el-button
@
click=
"cancelDialog4Lift('
departureForm
')"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"liftOk('
departureForm
')"
>
确 定
</el-button>
</div>
</el-dialog>
<!-- 提车对话框相关html元素 -->
<el-dialog
title=
"还车"
:visible
.
sync=
"dialogForm4RetVisible"
>
<el-form
:model=
"form4Ret"
:rules=
"rules4Ret"
ref=
"form4Ret"
label-width=
"120px"
>
<el-form-item
label=
"还车分公司"
prop=
"retCompany"
>
<el-select
class=
"filter-item"
v-model
.
number=
"form4Ret.retCompany"
placeholder=
"请选择还车分公司"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"item in allCompanies"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<el-dialog
title=
"收车"
:visible
.
sync=
"dialogForm4RetVisible"
>
<el-form
:model=
"arrivalForm"
:rules=
"arrivalFormrules"
ref=
"form"
label-width=
"90px"
>
<el-form-item
label=
"车牌号"
>
<el-input
v-model=
"arrivalForm.numberPlate"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"还车里程数"
prop=
"mileageRet"
>
<el-input
v-model
.
number=
"form4Ret.mileageRet"
placeholder=
"请输入当前车辆里程数"
></el-input
>
<el-form-item
label=
"收车时间"
>
<el-date-picker
v-model=
"arrivalForm.arrivalDate"
type=
"date"
disabled
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
></el-date-picker
>
</el-form-item>
<el-form-item
label=
"是否违章"
prop=
"haveViolation"
>
<el-select
class=
"filter-item"
v-model=
"form4Ret.haveViolation"
placeholder=
"请选择是否违章"
>
<el-option
key=
"1"
label=
"是"
value=
"1"
></el-option>
<el-option
key=
"0"
label=
"否"
value=
"0"
></el-option>
</el-select>
<el-form-item
label=
"还车分公司"
>
<el-autocomplete
class=
"inline-input"
v-model=
"arrivalForm.arrivalBranchCompanyName"
:fetch-suggestions=
"querySearch"
placeholder=
"请输入内容"
disabled
></el-autocomplete>
</el-form-item>
<el-form-item
label=
"还车备注"
prop=
"retRemark"
>
<el-input
v-model=
"form4Ret.retRemark"
placeholder=
"请输入备注信息"
></el-input>
<el-form-item
label=
"收车人"
prop=
"recycleMan"
>
<el-input
v-model=
"arrivalForm.recycleMan"
placeholder=
"请输入收车人"
></el-input>
</el-form-item>
<el-form-item
label=
"收车人联系方式"
prop=
"recycleManTel"
>
<el-input
v-model=
"arrivalForm.recycleManTel"
placeholder=
"请输入收车人联系方式"
></el-input>
</el-form-item>
<el-form-item
label=
"公里数"
prop=
"mileage"
>
<el-input
v-model
.
number=
"arrivalForm.mileage"
placeholder=
"请输入收车时公里数"
></el-input>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
v-model=
"departureForm.remark"
placeholder=
"请输入备注"
></el-input>
</el-form-item>
<el-row>
<el-col>
<el-form-item
label=
"收车截图"
:style=
"{display:'block'}"
required
>
<el-upload
class=
"upload-demo"
:headers=
"getHeaderWithToken"
action=
"https://xxtest.upyuns.com/api/universal/file/app/unauth/admin/upload"
:on-remove=
"handleArrivalRemove"
:file-list=
"arrivalPicList"
:on-success=
"handleArrivalSuccess"
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelDialog4Ret('form
4Ret
')"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"ret('form
4Ret
')"
>
确 定
</el-button>
<el-button
@
click=
"cancelDialog4Ret('form')"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"ret('form')"
>
确 定
</el-button>
</div>
</el-dialog>
...
...
@@ -484,7 +555,9 @@
ret
,
unbook
,
getOneIllegalRow
,
saveOrderViolation
saveOrderViolation
,
departureVehicle
,
arrivalVehicle
}
from
'api/vehicle/bookRecord'
;
...
...
@@ -531,6 +604,76 @@
},
data
()
{
return
{
departureFormrules
:{
checkMan
:{
required
:
true
,
message
:
'请输入验车人'
,
trigger
:
'blur'
},
checkManTel
:{
required
:
true
,
message
:
'请输入验车人联系方式'
,
trigger
:
'blur'
},
mileage
:{
type
:
"number"
,
required
:
true
,
message
:
'请输入公里数'
,
trigger
:
'blur'
}
},
departureForm
:{
vehicleId
:
null
,
departureBranchCompanyId
:
null
,
//出发地分公司id
departureBranchCompanyName
:
''
,
//出发地分公司名称
use
:
null
,
user
:
null
,
userTel
:
null
,
checkMan
:
null
,
checkManTel
:
null
,
mileage
:
null
,
numberPlate
:
null
,
expectArrivalBranchCompanyId
:
null
,
//目的地分公司id
expectArrivalBranchCompanyName
:
''
,
//目的地分公司名称
bookRecordId
:
null
,
departurePic
:
''
,
remark
:
null
,
bookStartDate
:
null
,
},
departurePicList
:[],
arrivalPicList
:[],
arrivalForm
:{
vehicleId
:
null
,
numberPlate
:
null
,
arrivalDate
:
null
,
recycleMan
:
null
,
recycleManTel
:
null
,
mileage
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyName
:
''
,
arrivalPic
:
''
,
remark
:
''
,
bookRecordId
:
null
,
},
arrivalFormrules
:{
recycleMan
:{
required
:
true
,
message
:
'请输入收车人'
,
trigger
:
'blur'
},
recycleManTel
:{
required
:
true
,
message
:
'请输入收车人联系方式'
,
trigger
:
'blur'
},
mileage
:{
type
:
"number"
,
required
:
true
,
message
:
'请输入收车公里数'
,
trigger
:
'blur'
}
},
departurePicList
:[],
statusList
:[
{
code
:
'1'
,
...
...
@@ -788,8 +931,36 @@
/**
* 删除违章图片
* */
handleRemove
(
file
,
fileList
){
this
.
fileList2
=
fileList
;
handleRemove
(
file
,
fileList1
){
this
.
fileList2
=
fileList1
;
},
/**
* 出车上传成功
* */
handleDepartureSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
this
.
departurePicList
.
push
(
c
);
this
.
showLoadingBody
=
false
;
},
/**
* 删除出车图片
* */
handleDepartureRemove
(
file
,
fileList2
){
this
.
departurePicList
=
fileList2
;
},
/**
* 上传成功
* */
handleArrivalSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
this
.
arrivalPicList
.
push
(
c
);
this
.
showLoadingBody
=
false
;
},
/**
* 删除违章图片
* */
handleArrivalRemove
(
file
,
fileList3
){
this
.
arrivalPicList
=
fileList3
;
},
/**
* 操作-违章查询按钮,显示违章弹框
...
...
@@ -823,7 +994,28 @@
this
.
illegalVisible
=
false
;
},
handleDetail
(
row
){
var
t
=
this
this
.
detailItem
=
row
;
if
(
row
.
vehicleDepartureLogVo
!=
undefined
){
if
(
row
.
vehicleDepartureLogVo
.
departurePic
!=
undefined
){
let
arr
=
row
.
vehicleDepartureLogVo
.
departurePic
.
split
(
","
);
let
departurePicList
=
[];
let
p
=
{};
arr
.
map
(
function
(
item
){
departurePicList
.
push
(
item
);
});
t
.
departurePicList
=
departurePicList
;
}
if
(
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
undefined
){
let
Arr
=
row
.
vehicleDepartureLogVo
.
arrivalPic
.
split
(
","
);
let
arrivalPicList
=
[];
let
p
=
{};
Arr
.
map
(
function
(
item
){
arrivalPicList
.
push
(
item
);
});
t
.
arrivalPicList
=
arrivalPicList
;
}
}
this
.
dialogDetailVisible
=
true
;
},
//监听change事件
...
...
@@ -883,43 +1075,32 @@
this
.
$refs
[
formName
].
resetFields
();
},
/**
*
提
车弹框-确定
*
出
车弹框-确定
* */
liftOk
(
formName
)
{
if
(
this
.
form4Lift
.
state1
==
""
||
this
.
form4Lift
.
state1
==
"全部"
){
this
.
form4Lift
.
liftCompany
=
undefined
;
this
.
$notify
({
title
:
'失败'
,
message
:
'请选择提车分公司'
,
type
:
'warning'
,
duration
:
2000
});
return
;
}
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
lift
(
this
.
form4Lift
).
then
((
response
)
=>
{
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_STATUS_CHANGED
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_STATUS_CHANGED
],
type
:
'error'
,
duration
:
2000
});
}
else
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
var
arr
=
[];
this
.
departurePicList
.
map
(
function
(
item
){
arr
.
push
(
item
.
url
);
});
this
.
departureForm
.
departurePic
=
arr
.
join
(
","
);
departureVehicle
(
this
.
departureForm
).
then
(
response
=>
{
if
(
response
.
status
==
200
)
{
this
.
dialogForm4LiftVisible
=
false
;
this
.
$notify
({
title
:
'成功'
,
message
:
'
操作
成功'
,
message
:
'
出车
成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
dialogForm4LiftVisible
=
false
;
this
.
cleanDepartureForm
()
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'操作失败'
,
message
:
response
.
message
,
type
:
'error'
,
duration
:
2000
});
...
...
@@ -1082,67 +1263,87 @@
});
},
/**
* 操作-
提
车
* 操作-
出
车
* @param row
*/
handleLift
(
row
)
{
this
.
resetTemp4Lift
();
getObj
(
row
.
id
,
row
.
bookEndDate
)
.
then
(
response
=>
{
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
liftCompany
))
{
this
.
form4Lift
.
liftCompany
=
response
.
data
.
liftCompany
;
}
let
that
=
this
;
let
selectArry
=
[];
this
.
allCompaniesArr
.
map
(
function
(
item
){
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
selectArry
.
map
(
function
(
iitem
)
{
if
(
that
.
form4Lift
.
liftCompany
==
iitem
.
id
){
that
.
form4Lift
.
state1
=
iitem
.
name
;
}
});
this
.
form4Lift
.
id
=
row
.
id
;
this
.
dialogForm4LiftVisible
=
true
;
});
this
.
cleanDepartureForm
();
this
.
departurePicList
=
[];
if
(
row
.
bookType
==
1
){
this
.
departureForm
.
use
=
'租车'
}
else
if
(
row
.
bookType
==
2
){
this
.
departureForm
.
use
=
'用户租赁'
}
else
if
(
row
.
bookType
==
3
){
this
.
departureForm
.
use
=
'维修'
}
else
if
(
row
.
bookType
==
4
){
this
.
departureForm
.
use
=
'展览'
}
else
if
(
row
.
bookType
==
5
){
this
.
departureForm
.
use
=
'旅游'
}
else
if
(
row
.
bookType
==
6
){
this
.
departureForm
.
use
=
'保养'
}
else
if
(
row
.
bookType
==
7
){
this
.
departureForm
.
use
=
'预约中'
}
else
if
(
row
.
bookType
==
8
){
this
.
departureForm
.
use
=
'禁用'
}
else
if
(
row
.
bookType
==
9
){
this
.
departureForm
.
use
=
'客户用车'
}
else
if
(
row
.
bookType
==
10
){
this
.
departureForm
.
use
=
'其他'
}
this
.
departureForm
.
bookRecordId
=
row
.
id
this
.
departureForm
.
vehicleId
=
row
.
vehicleId
this
.
departureForm
.
numberPlate
=
row
.
numberPlate
this
.
departureForm
.
departureDate
=
Date
();
this
.
departureForm
.
departureBranchCompanyId
=
row
.
liftCompany
this
.
departureForm
.
departureBranchCompanyName
=
row
.
liftCompanyName
if
(
row
.
vehicleDepartureLogVo
!=
undefined
){
this
.
departureForm
.
user
=
row
.
vehicleDepartureLogVo
.
user
?
row
.
vehicleDepartureLogVo
.
user
:
''
this
.
departureForm
.
userTel
=
row
.
vehicleDepartureLogVo
.
userTel
?
row
.
vehicleDepartureLogVo
.
userTel
:
''
}
else
{
this
.
departureForm
.
user
=
''
this
.
departureForm
.
userTel
=
''
}
this
.
departureForm
.
expectArrivalBranchCompanyId
=
row
.
retCompany
this
.
departureForm
.
expectArrivalBranchCompanyName
=
row
.
retCompanyName
this
.
dialogForm4LiftVisible
=
true
;
},
/**
* 操作-收车
* @param row
*/
handleRet
(
row
)
{
this
.
resetTemp4Ret
();
getObj
(
row
.
id
,
row
.
bookEndDate
)
.
then
(
response
=>
{
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
retCompany
))
{
this
.
form4Ret
.
retCompany
=
response
.
data
.
retCompany
;
}
this
.
form4Ret
.
id
=
row
.
id
;
this
.
dialogForm4RetVisible
=
true
;
});
this
.
arrivalPicList
=
[];
this
.
arrivalForm
.
vehicleId
=
row
.
vehicleId
this
.
arrivalForm
.
numberPlate
=
row
.
numberPlate
this
.
arrivalForm
.
arrivalDate
=
Date
();
this
.
arrivalForm
.
arrivalBranchCompanyId
=
row
.
retCompany
this
.
arrivalForm
.
arrivalBranchCompanyName
=
row
.
retCompanyName
this
.
dialogForm4RetVisible
=
true
;
},
ret
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
ret
(
this
.
form4Ret
).
then
((
response
)
=>
{
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_STATUS_CHANGED
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_STATUS_CHANGED
],
type
:
'error'
,
duration
:
2000
});
}
else
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
var
arr
=
[];
this
.
arrivalPicList
.
map
(
function
(
item
){
arr
.
push
(
item
.
url
);
});
this
.
arrivalForm
.
arrivalPic
=
arr
.
join
(
","
);
arrivalVehicle
(
this
.
arrivalForm
).
then
(
response
=>
{
if
(
response
.
status
==
200
)
{
this
.
dialogForm4RetVisible
=
false
;
this
.
$notify
({
title
:
'成功'
,
message
:
'
操作
成功'
,
message
:
'
收车
成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
dialogForm4RetVisible
=
false
;
this
.
cleanArrivalForm
()
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'操作失败'
,
message
:
response
.
message
,
type
:
'error'
,
duration
:
2000
});
...
...
@@ -1198,24 +1399,44 @@
);
});
},
resetTemp4Lift
()
{
this
.
form4Lift
=
{
id
:
undefined
,
state1
:
''
,
mileageLift
:
undefined
,
liftCompany
:
undefined
,
liftRemark
:
undefined
/**
* 清空出车弹框数据
*/
cleanDepartureForm
()
{
this
.
departureForm
=
{
vehicleId
:
null
,
departureBranchCompanyId
:
null
,
//出发地分公司id
departureBranchCompanyName
:
''
,
//出发地分公司名称
use
:
null
,
user
:
null
,
userTel
:
null
,
checkMan
:
null
,
checkManTel
:
null
,
mileage
:
null
,
numberPlate
:
null
,
expectArrivalBranchCompanyId
:
null
,
//目的地分公司id
expectArrivalBranchCompanyName
:
''
,
//目的地分公司名称
bookRecordId
:
null
,
departurePic
:
''
,
remark
:
null
,
bookStartDate
:
null
,
};
},
resetTemp4Ret
()
{
this
.
form4Ret
=
{
id
:
undefined
,
mileageRet
:
undefined
,
haveViolation
:
undefined
,
retCompany
:
undefined
,
retRemark
:
undefined
};
}
cleanArrivalForm
(){
this
.
arrivalForm
=
{
vehicleId
:
null
,
numberPlate
:
null
,
arrivalDate
:
null
,
recycleMan
:
null
,
recycleManTel
:
null
,
mileage
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyName
:
''
,
arrivalPic
:
''
,
remark
:
''
,
bookRecordId
:
null
}
},
}
}
</
script
>
...
...
@@ -1229,4 +1450,10 @@
background-color
:
#ccc
;
border
:
none
;
}
.image
{
width
:
100%
;
height
:
110px
;
display
:
block
;
}
.el-card__body
,
.el-card
{
padding
:
0px
;
width
:
110px
;
height
:
110px
;
text-align
:
center
;}
</
style
>
src/views/vehicle/vehicleInfo/index.vue
View file @
5d459770
...
...
@@ -322,10 +322,10 @@
<
template
scope=
"scope"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
{{
vehicleInfo_btn_edit
?
"编辑"
:
"查看"
}}
</el-button>
<el-button
v-if=
"scope.row.status == 1&&vehicleInfo_btn_ride"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"departureHandler(scope.row)"
>
出车
</el-button>
<el-button
v-if=
"scope.row.status == 4"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"arrivalHandler(scope.row)"
>
收车
</el-button>
<
!--
<
el-button
v-if=
"scope.row.status == 1&&vehicleInfo_btn_ride"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"departureHandler(scope.row)"
>
出车
</el-button>
-->
<
!--
<
el-button
v-if=
"scope.row.status == 4"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"arrivalHandler(scope.row)"
>
收车
</el-button>
-->
<el-button
v-if=
"scope.row.status == 1"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"upkeepHandler(scope.row)"
>
保养
</el-button>
...
...
@@ -338,7 +338,7 @@
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleDepartureLog(scope.row)"
>
出车记录
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteHandler(scope.row)"
v-if=
"vehicleInfo_btn_ret"
>
删除
</el-button>
<el-button
type=
"danger"
size=
"small"
@
click=
"deleteHandler(scope.row)"
style=
"margin-left:0px"
v-if=
"vehicleInfo_btn_ret"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
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