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
e13b129b
Commit
e13b129b
authored
Sep 26, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
员工录入操作权限
parent
bd5a94e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1166 additions
and
1022 deletions
+1166
-1022
employeesInput.vue
src/views/userManagement/employeesInput.vue
+2
-0
index.vue
src/views/vehicle/bookRecord/index.vue
+1164
-1022
No files found.
src/views/userManagement/employeesInput.vue
View file @
e13b129b
...
...
@@ -66,11 +66,13 @@
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"editorStaff(scope.row)"
v-if=
"scope.row.status != 1"
>
编辑
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"deleteStaff(scope.row)"
v-if=
"scope.row.status != 1"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
src/views/vehicle/bookRecord/index.vue
View file @
e13b129b
...
...
@@ -5,52 +5,84 @@
<el-form-item
label=
"申请状态"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.status"
placeholder=
"请选择申请状态"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"(val, key, index) in statusList "
:key=
"val.code"
:label=
"val.val"
:value=
"val.code"
></el-option>
<!--
<el-option
v-for=
"(val, key, index) in statusList "
:key=
"val.code"
:label=
"val.val"
:value=
"val.code"
></el-option>
-->
<el-option
v-for=
"(val, index) in statusList "
:key=
"index"
:label=
"val.val"
:value=
"val.code"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"车辆编码"
>
<el-input
type=
"number"
v-model
.
number=
"listQuery.code"
placeholder=
"请输入车辆编码"
></el-input>
</el-form-item>
<el-form-item
label=
"车辆编码"
>
<el-input
type=
"number"
v-model
.
number=
"listQuery.code"
placeholder=
"请输入车辆编码"
></el-input>
</el-form-item>
<el-form-item
label=
"车牌号"
>
<el-input
v-model=
"listQuery.numberPlate"
placeholder=
"请输入车牌号"
></el-input>
</el-form-item>
<el-form-item
label=
"用途"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.bookType"
placeholder=
"请选择"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in bookTypeList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-form-item>
<el-select
class=
"filter-item"
v-model=
"listQuery.bookType"
placeholder=
"请选择"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in bookTypeList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"所属大区"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-form-item>
<el-select
class=
"filter-item"
v-model=
"listQuery.zoneId"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"提车公司"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.liftCompany"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.liftCompany"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-form-item>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"预订月份"
prop=
"selectedMonth4Query"
>
<el-date-picker
v-model=
"selectedMonth4Query"
type=
"month"
:editable=
"true"
format=
"yyyy-MM"
placeholder=
"请选择预订月份"
>
</el-date-picker>
placeholder=
"请选择预订月份"
>
</el-date-picker>
</el-form-item>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
</el-form>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table
:key=
"tableKey"
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
align=
"center"
label=
"车牌号"
width=
"120"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
row
.
numberPlate
}}
</span>
...
...
@@ -97,7 +129,7 @@
<span v-else>{{getDatePeriodStr([scope.row.bookStartDate, scope.row.bookEndDate])}}</span>
</template>
</el-table-column>
-->
</el-table-column>-->
<!-- <el-table-column align="center" label="提车地址" width="200">-->
<!-- <template scope="scope">-->
...
...
@@ -127,7 +159,7 @@
<template scope="scope">
<span>{{scope.row.reviewerNameCancel}}</span>
</template>
</el-table-column>
-->
</el-table-column>-->
<el-table-column
align=
"center"
label=
"提车公司"
width=
"200"
>
<
template
scope=
"scope"
>
...
...
@@ -143,7 +175,7 @@
<template scope="scope">
<span>{{scope.row.actualStartDate}}</span>
</template>
</el-table-column>
-->
</el-table-column>-->
<el-table-column
align=
"center"
label=
"还车公司"
width=
"200"
>
<
template
scope=
"scope"
>
...
...
@@ -184,35 +216,73 @@
<template scope="scope">
<span>{{scope.row.haveViolation?'是':'否'}}</span>
</template>
</el-table-column>
-->
<el-table-column
align=
"center"
label=
"详情"
width=
"100"
fixed=
"right"
>
<
template
scope=
"scope"
>
<span
style=
"color: #13CE66;cursor: pointer;"
@
click=
"handleDetail(scope.row)"
>
订单详情
</span>
</
template
>
</el-table-column>
</el-table-column>-->
<el-table-column
align=
"center"
label=
"详情"
width=
"100"
fixed=
"right"
>
<
template
scope=
"scope"
>
<span
style=
"color: #13CE66;cursor: pointer;"
@
click=
"handleDetail(scope.row)"
>
订单详情
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"200"
fixed=
"right"
>
<
template
scope=
"scope"
>
<!--
<el-button
size=
"small"
type=
"success"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button>
-->
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
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"
class=
"el-button el-button--text el-button--small"
@
click=
"handleProve(scope.row)"
>
通过
</el-button>
<el-button
v-if=
"bookRecord_btn_reject&&scope.row.status==1"
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: red;"
@
click=
"handleReject(scope.row)"
>
驳回
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
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"
class=
"el-button el-button--text el-button--small"
@
click=
"handleProve(scope.row)"
>
通过
</el-button>
<el-button
v-if=
"bookRecord_btn_reject&&scope.row.status==1"
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: red;"
@
click=
"handleReject(scope.row)"
>
驳回
</el-button>
<template
v-if=
"scope.row.vehicleDepartureLogVo==undefined"
>
<el-button
v-if=
"bookRecord_btn_lift&&scope.row.liftStatus==1&&scope.row.status==2"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleLift(scope.row)"
>
出车
</el-button>
<el-button
v-if=
"bookRecord_btn_lift&&scope.row.liftStatus==1&&scope.row.status==2"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleLift(scope.row)"
>
出车
</el-button>
</
template
>
<
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"
class=
"el-button el-button--text el-button--small"
@
click=
"handleRet(scope.row)"
>
收车
</el-button>
<el-button
v-if=
"bookRecord_btn_ret&&scope.row.vehicleDepartureLogVo.state==0&&scope.row.retStatus==1"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleRet(scope.row)"
>
收车
</el-button>
</
template
>
<
template
v-if=
"scope.row.vehicleDepartureLogVo==undefined"
>
<el-button
v-if=
"bookRecord_btn_unbook&&scope.row.status==2"
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: red;"
@
click=
"handleUnbook(scope.row)"
>
取消预定
</el-button>
<el-button
v-if=
"bookRecord_btn_unbook&&scope.row.status==2"
size=
"small"
class=
"el-button el-button--text el-button--small"
style=
"color: red;"
@
click=
"handleUnbook(scope.row)"
>
取消预定
</el-button>
</
template
>
</template>
</el-table-column>
</el-table>
<div
v-show=
"!listLoading"
class=
"pagination-container"
>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"listQuery.page"
:page-sizes=
"[10,20,30,40,50]"
:page-size=
"listQuery.limit"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"listQuery.page"
:page-sizes=
"[10,20,30,40,50]"
:page-size=
"listQuery.limit"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
</div>
<book-info-viewer
ref=
"bookInfoViewer"
></book-info-viewer>
...
...
@@ -220,7 +290,6 @@
<!-- 查看详情 -->
<el-dialog
title=
"预约详情"
:visible
.
sync=
"dialogDetailVisible"
class=
"order-details"
>
<el-form
label-width=
"100px"
>
<el-row>
<el-col
:span=
"24"
>
...
...
@@ -249,7 +318,7 @@
<el-form-item label="当前停靠公司">
<span>{{detailItem.liftCompanyName}}</span>
</el-form-item>
</el-col>
-->
</el-col>-->
</el-row>
<el-row>
<el-col
:span=
"24"
>
...
...
@@ -259,7 +328,7 @@
</el-form-item>
</el-col>
</el-row>
<hr>
<hr
/
>
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"使用人"
>
...
...
@@ -271,7 +340,8 @@
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"预定时间"
>
<span>
{{detailItem.bookStartDate}}
</span>
至
<span>
{{detailItem.bookEndDate}}
</span>
<span>
{{detailItem.bookStartDate}}
</span>
至
<span>
{{detailItem.bookEndDate}}
</span>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -303,7 +373,7 @@
</el-form-item>
</el-col>
</el-row>
<hr>
<hr
/
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"提车分公司"
>
...
...
@@ -312,30 +382,42 @@
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作人"
>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.checkMan}}
</span>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.checkMan}}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作时间"
>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.departureTime}}
</span>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.departureTime}}
</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.mileageStart?detailItem.vehicleDepartureLogVo.mileageStart+'KM':''}}
</span>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.mileageStart?detailItem.vehicleDepartureLogVo.mileageStart+'KM':''}}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row
style=
"margin-left: 20px;"
v-if=
"departurePicList.length>0"
>
<el-col
:span=
"3"
v-for=
"(item, index) in departurePicList"
:key=
"index"
:offset=
"index%6 > 0 ? 1 : 0"
style=
"margin-bottom:10px"
>
<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"
>
<img
:src=
"item"
class=
"image"
/
>
</el-card>
</el-col>
</el-row>
<hr>
<hr
/
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"还车分公司"
>
...
...
@@ -344,30 +426,42 @@
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作人"
>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.recycleMan}}
</span>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.recycleMan}}
</span>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作时间"
>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.arrivalTime}}
</span>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.arrivalTime}}
</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?detailItem.vehicleDepartureLogVo.mileageEnd+'KM':''}}
</span>
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.mileageEnd?detailItem.vehicleDepartureLogVo.mileageEnd+'KM':''}}
</span>
</el-form-item>
</el-col>
</el-row>
<el-row
style=
"margin-left: 20px;"
v-if=
"arrivalPicList.length>0"
>
<el-col
:span=
"3"
v-for=
"(item, index) in arrivalPicList"
:key=
"index"
:offset=
"index%6 > 0 ? 1 : 0"
style=
"margin-bottom:10px"
>
<el-row
style=
"margin-left: 20px;"
v-if=
"arrivalPicList.length>0"
>
<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"
>
<img
:src=
"item"
class=
"image"
/
>
</el-card>
</el-col>
</el-row>
<hr>
<hr
/
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"审核人操作"
>
...
...
@@ -400,13 +494,23 @@
<!-- 出车对话框相关html元素 -->
<el-dialog
title=
"出车"
:visible
.
sync=
"dialogForm4LiftVisible"
>
<el-form
:model=
"departureForm"
:rules=
"departureFormrules"
ref=
"departureForm"
label-width=
"120px"
>
<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-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
...
...
@@ -457,7 +561,8 @@
:on-remove=
"handleDepartureRemove"
:file-list=
"departurePicList"
:on-success=
"handleDepartureSuccess"
list-type=
"picture-card"
>
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-form-item>
...
...
@@ -477,8 +582,13 @@
<el-input
v-model=
"arrivalForm.numberPlate"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"收车时间"
>
<el-date-picker
v-model=
"arrivalForm.arrivalDate"
type=
"date"
disabled
format=
"yyyy-MM-dd"
placeholder=
"选择日期"
></el-date-picker>
<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=
"还车分公司"
>
<el-autocomplete
...
...
@@ -511,7 +621,8 @@
:on-remove=
"handleArrivalRemove"
:file-list=
"arrivalPicList"
:on-success=
"handleArrivalSuccess"
list-type=
"picture-card"
>
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-form-item>
...
...
@@ -536,7 +647,8 @@
:on-remove=
"handleRemove"
:file-list=
"fileList2"
:on-success=
"handleSuccess"
list-type=
"picture-card"
>
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-form-item>
...
...
@@ -544,10 +656,15 @@
</el-row>
<el-row>
<el-col>
<el-form-item
label=
"违章罚款"
>
<el-input
v-model=
"price"
type=
"number"
placeholder=
"请输入违章罚款金额"
style=
"width: 50%;margin-right:10px"
></el-input>
元
</el-form-item>
</el-col>
<el-form-item
label=
"违章罚款"
>
<el-input
v-model=
"price"
type=
"number"
placeholder=
"请输入违章罚款金额"
style=
"width: 50%;margin-right:10px"
></el-input>
元
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -555,1027 +672,1052 @@
<el-button
type=
"primary"
@
click=
"okHandler('form')"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
page
,
prove
,
reject
,
getObj
,
lift
,
ret
,
unbook
,
getOneIllegalRow
,
saveOrderViolation
,
departureVehicle
,
arrivalVehicle
}
from
'api/vehicle/bookRecord'
;
import
{
page
,
prove
,
reject
,
getObj
,
lift
,
ret
,
unbook
,
getOneIllegalRow
,
saveOrderViolation
,
departureVehicle
,
arrivalVehicle
}
from
"api/vehicle/bookRecord"
;
import
{
getAllCompany
,
getAll
}
from
'api/base_info/branch_company/'
;
import
{
getAllZone
}
from
'api/base_info/constant/'
;
import
{
getAllBranchCompanyByZoneId
}
from
'api/order/rentVehicle'
;
import
{
formatDate
}
from
'utils/dateFormattor'
;
import
{
getAllCompany
,
getAll
}
from
"api/base_info/branch_company/"
;
import
{
getAllZone
}
from
"api/base_info/constant/"
;
import
{
getAllBranchCompanyByZoneId
}
from
"api/order/rentVehicle"
;
import
{
formatDate
}
from
"utils/dateFormattor"
;
import
rsCode
from
'../../../utils/rsCode'
;
import
rsCode
from
"../../../utils/rsCode"
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
"vuex"
;
import
{
toEast8Date
,
deepCopyDate
,
newEast8Date
}
from
'utils/dateUtils'
;
import
{
getToken
}
from
'../../../utils/auth'
;
import
{
BOOK_RECORD_STATUS_APPLY
,
BOOK_RECORD_STATUS_PROVED
,
BOOK_RECORD_STATUS_LIFT
}
from
'../../../store/modules/baseInfo'
;
import
{
toEast8Date
,
deepCopyDate
,
newEast8Date
}
from
"utils/dateUtils"
;
import
{
getToken
}
from
"../../../utils/auth"
;
import
{
BOOK_RECORD_STATUS_APPLY
,
BOOK_RECORD_STATUS_PROVED
,
BOOK_RECORD_STATUS_LIFT
}
from
"../../../store/modules/baseInfo"
;
import
bookInfoViewer
from
'../bookInfoViewer'
;
import
accItemSelector
from
'../accompanyingItem/accItemSelector.vue'
;
import
bookInfoViewer
from
"../bookInfoViewer"
;
import
accItemSelector
from
"../accompanyingItem/accItemSelector.vue"
;
export
default
{
name
:
'bookRecord'
,
components
:
{
bookInfoViewer
,
accItemSelector
},
data
()
{
return
{
rejectVisible
:
false
,
rejectFrom
:{
vehicleBookRecordId
:
''
,
rejectRemark
:
''
export
default
{
name
:
"bookRecord"
,
components
:
{
bookInfoViewer
,
accItemSelector
},
data
()
{
return
{
rejectVisible
:
false
,
rejectFrom
:
{
vehicleBookRecordId
:
""
,
rejectRemark
:
""
},
rejectRules
:
{
rejectRemark
:
{
type
:
"string"
,
required
:
true
,
message
:
"请输入拒绝原因"
,
trigger
:
"blur"
}
},
BASE_API
:
process
.
env
.
BASE_API
,
departureFormrules
:
{
checkMan
:
{
required
:
true
,
message
:
"请输入验车人"
,
trigger
:
"blur"
},
rejectRules
:{
rejectRemark
:{
type
:
"string"
,
checkManTel
:
[
{
required
:
true
,
message
:
"请输入
拒绝原因
"
,
message
:
"请输入
验车人联系方式
"
,
trigger
:
"blur"
},
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
"请输入正确的手机号"
}
],
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"
},
BASE_API
:
process
.
env
.
BASE_API
,
departureFormrules
:{
checkMan
:{
recycleManTel
:
[
{
required
:
true
,
message
:
'请输入验车人'
,
trigger
:
'blur'
message
:
"请输入收车人联系方式"
,
trigger
:
"blur"
},
checkManTel
:[
{
required
:
true
,
message
:
'请输入验车人联系方式'
,
trigger
:
'blur'
},
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
'请输入正确的手机号'
}
],
mileage
:{
type
:
"number"
,
required
:
true
,
message
:
'请输入公里数'
,
trigger
:
'blur'
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
"请输入正确的手机号"
}
],
mileage
:
{
type
:
"number"
,
required
:
true
,
message
:
"请输入收车公里数"
,
trigger
:
"blur"
}
},
statusList
:
[
{
code
:
"1"
,
val
:
"申请中"
},
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
,
{
code
:
"3"
,
val
:
"待出行"
},
departurePicList
:[],
arrivalPicList
:[],
arrivalForm
:{
vehicleId
:
null
,
numberPlate
:
null
,
arrivalDate
:
null
,
recycleMan
:
null
,
recycleManTel
:
null
,
mileage
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyName
:
''
,
arrivalPic
:
''
,
remark
:
''
,
bookRecordId
:
null
,
{
code
:
"4"
,
val
:
"驳回"
},
arrivalFormrules
:{
recycleMan
:{
required
:
true
,
message
:
'请输入收车人'
,
trigger
:
'blur'
},
recycleManTel
:[
{
required
:
true
,
message
:
'请输入收车人联系方式'
,
trigger
:
'blur'
},
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
'请输入正确的手机号'
}
],
mileage
:{
type
:
"number"
,
required
:
true
,
message
:
'请输入收车公里数'
,
trigger
:
'blur'
}
{
code
:
"5"
,
val
:
"出行中"
},
statusList
:[
{
code
:
'1'
,
val
:
'申请中'
},
{
code
:
'3'
,
val
:
'待出行'
},
{
code
:
'4'
,
val
:
'驳回'
},
{
code
:
'5'
,
val
:
'出行中'
},
{
code
:
'6'
,
val
:
'取消预订'
},
{
code
:
"6"
,
val
:
"取消预订"
},
{
code
:
"7"
,
val
:
"已完成"
}
],
bookTypeList
:
[
{
id
:
"1"
,
name
:
"租车"
},
{
id
:
"2"
,
name
:
"用户租赁"
},
{
id
:
"3"
,
name
:
"维修"
},
{
id
:
"4"
,
name
:
"展览"
},
{
id
:
"5"
,
name
:
"旅游"
},
{
id
:
"6"
,
name
:
"保养"
},
{
id
:
"7"
,
name
:
"预约中"
},
{
id
:
"8"
,
name
:
"禁用"
},
{
id
:
"9"
,
name
:
"客户用车"
},
{
id
:
"10"
,
name
:
"其他"
}
],
detailId
:
""
,
illegalVisible
:
false
,
price
:
undefined
,
//违章罚款金额
fileList2
:
[],
//违章截图
detailItem
:
{},
dialogDetailVisible
:
false
,
baranchQuery
:
{
zoneId
:
null
},
allZoneArr
:
[],
//全部片区
allBranchCompany
:
[],
state2
:
""
,
//搜索-分公司名称
rules4Query
:
{},
list
:
null
,
total
:
null
,
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
,
flag
:
false
,
zoneId
:
undefined
,
liftCompany
:
undefined
,
numberPlate
:
undefined
,
selectedMonth
:
undefined
,
status
:
undefined
,
bookType
:
undefined
},
inline
:
true
,
dialogFormVisible
:
false
,
dialogStatus
:
""
,
bookRecord_btn_prove
:
false
,
bookRecord_btn_unbook
:
false
,
bookRecord_btn_reject
:
false
,
bookRecord_btn_lift
:
false
,
bookRecord_btn_ret
:
false
,
dialogForm4LiftVisible
:
false
,
dialogForm4RetVisible
:
false
,
allCompanies
:
{},
allCompaniesArr
:
[],
tableKey
:
0
,
form4Lift
:
{
state1
:
""
,
id
:
undefined
,
mileageLift
:
undefined
,
liftCompany
:
undefined
,
liftRemark
:
undefined
},
rules4Lift
:
{
liftCompany
:
[
{
code
:
'7'
,
val
:
'已完成'
},
required
:
true
,
message
:
"请选择提车分公司"
,
trigger
:
"blur"
,
type
:
"integer"
}
],
bookTypeList
:[
{
id
:
'1'
,
name
:
'租车'
},
{
id
:
'2'
,
name
:
'用户租赁'
},
mileageLift
:
[
{
id
:
'3'
,
name
:
'维修'
},
{
id
:
'4'
,
name
:
'展览'
},
{
id
:
'5'
,
name
:
'旅游'
required
:
true
,
message
:
"请输入当前里程数"
,
trigger
:
"blur"
,
type
:
"integer"
},
{
id
:
'6'
,
name
:
'保养'
},
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
))
{
return
callback
();
}
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
return
callback
(
new
Error
(
"里程数必须为整数"
));
}
if
(
value
<
0
||
value
>
9999999999
)
{
return
callback
(
new
Error
(
"里程数合法范围:[0 - 9999999999]"
));
}
callback
();
},
trigger
:
"blur"
}
],
retRemark
:
[
{
id
:
'7'
,
name
:
'预约中'
},
min
:
0
,
max
:
2000
,
message
:
"长度小于 2000 个字符"
,
trigger
:
"blur"
}
]
},
form4Ret
:
{
id
:
undefined
,
mileageRet
:
undefined
,
haveViolation
:
undefined
,
retCompany
:
undefined
,
retRemark
:
undefined
},
rules4Ret
:
{
retCompany
:
[
{
id
:
'8'
,
name
:
'禁用'
},
required
:
true
,
message
:
"请选择提车分公司"
,
trigger
:
"blur"
,
type
:
"integer"
}
],
mileageRet
:
[
{
id
:
'9'
,
name
:
'客户用车'
required
:
true
,
message
:
"请输入当前里程数"
,
trigger
:
"blur"
,
type
:
"integer"
},
{
id
:
'10'
,
name
:
'其他'
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
))
{
return
callback
();
}
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
return
callback
(
new
Error
(
"里程数必须为整数"
));
}
if
(
value
<
0
||
value
>
9999999999
)
{
return
callback
(
new
Error
(
"里程数合法范围:[0 - 9999999999]"
));
}
callback
();
},
trigger
:
"blur"
}
],
detailId
:
''
,
illegalVisible
:
false
,
price
:
undefined
,
//违章罚款金额
fileList2
:[],
//违章截图
detailItem
:{},
dialogDetailVisible
:
false
,
baranchQuery
:
{
zoneId
:
null
},
allZoneArr
:[],
//全部片区
allBranchCompany
:[],
state2
:
''
,
//搜索-分公司名称
rules4Query
:
{
},
list
:
null
,
total
:
null
,
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
,
flag
:
false
,
zoneId
:
undefined
,
liftCompany
:
undefined
,
numberPlate
:
undefined
,
selectedMonth
:
undefined
,
status
:
undefined
,
bookType
:
undefined
},
inline
:
true
,
dialogFormVisible
:
false
,
dialogStatus
:
''
,
bookRecord_btn_prove
:
false
,
bookRecord_btn_unbook
:
false
,
bookRecord_btn_reject
:
false
,
bookRecord_btn_lift
:
false
,
bookRecord_btn_ret
:
false
,
dialogForm4LiftVisible
:
false
,
dialogForm4RetVisible
:
false
,
allCompanies
:
{},
allCompaniesArr
:
[],
tableKey
:
0
,
form4Lift
:
{
state1
:
''
,
id
:
undefined
,
mileageLift
:
undefined
,
liftCompany
:
undefined
,
liftRemark
:
undefined
},
rules4Lift
:
{
liftCompany
:
[
{
required
:
true
,
message
:
'请选择提车分公司'
,
trigger
:
'blur'
,
type
:
'integer'
}
],
mileageLift
:
[
{
required
:
true
,
message
:
'请输入当前里程数'
,
trigger
:
'blur'
,
type
:
'integer'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
))
{
return
callback
();
}
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
return
callback
(
new
Error
(
'里程数必须为整数'
));
}
if
(
value
<
0
||
value
>
9999999999
)
{
return
callback
(
new
Error
(
'里程数合法范围:[0 - 9999999999]'
));
}
callback
();
},
trigger
:
'blur'
}
],
retRemark
:
[
{
min
:
0
,
max
:
2000
,
message
:
'长度小于 2000 个字符'
,
trigger
:
'blur'
}
]
},
form4Ret
:
{
id
:
undefined
,
mileageRet
:
undefined
,
haveViolation
:
undefined
,
retCompany
:
undefined
,
retRemark
:
undefined
},
rules4Ret
:
{
retCompany
:
[
{
required
:
true
,
message
:
'请选择提车分公司'
,
trigger
:
'blur'
,
type
:
'integer'
}
],
mileageRet
:
[
{
required
:
true
,
message
:
'请输入当前里程数'
,
trigger
:
'blur'
,
type
:
'integer'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
))
{
return
callback
();
}
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
return
callback
(
new
Error
(
'里程数必须为整数'
));
}
if
(
value
<
0
||
value
>
9999999999
)
{
return
callback
(
new
Error
(
'里程数合法范围:[0 - 9999999999]'
));
}
callback
();
},
trigger
:
'blur'
}
],
retRemark
:
[
{
min
:
0
,
max
:
2000
,
message
:
'长度小于 2000 个字符'
,
trigger
:
'blur'
}
]
},
selectedAccItem
:
undefined
}
retRemark
:
[
{
min
:
0
,
max
:
2000
,
message
:
"长度小于 2000 个字符"
,
trigger
:
"blur"
}
]
},
selectedAccItem
:
undefined
};
},
created
()
{
this
.
getList
();
getAll
().
then
(
response
=>
{
this
.
allCompaniesArr
=
response
.
data
;
});
getAllCompany
(
codeAndBranchCompany
=>
{
//初始化公司列表
this
.
allCompanies
=
codeAndBranchCompany
;
});
this
.
bookRecord_btn_prove
=
this
.
elements
[
"bookRecord:btn_prove"
];
this
.
bookRecord_btn_reject
=
this
.
elements
[
"bookRecord:btn_reject"
];
this
.
bookRecord_btn_unbook
=
this
.
elements
[
"bookRecord:btn_unbook"
];
this
.
bookRecord_btn_lift
=
this
.
elements
[
"bookRecord:btn_lift"
];
this
.
bookRecord_btn_ret
=
this
.
elements
[
"bookRecord:btn_ret"
];
},
computed
:
{
...
mapGetters
([
"elements"
,
"bookRecordStatus"
]),
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()
};
},
created
()
{
this
.
getList
();
getAll
()
.
then
(
response
=>
{
this
.
allCompaniesArr
=
response
.
data
;
})
getAllCompany
(
codeAndBranchCompany
=>
{
//初始化公司列表
this
.
allCompanies
=
codeAndBranchCompany
;
});
this
.
bookRecord_btn_prove
=
this
.
elements
[
'bookRecord:btn_prove'
];
this
.
bookRecord_btn_reject
=
this
.
elements
[
'bookRecord:btn_reject'
];
this
.
bookRecord_btn_unbook
=
this
.
elements
[
'bookRecord:btn_unbook'
];
this
.
bookRecord_btn_lift
=
this
.
elements
[
'bookRecord:btn_lift'
];
this
.
bookRecord_btn_ret
=
this
.
elements
[
'bookRecord:btn_ret'
];
//获取大区列表
getAllZoneList
()
{
return
getAllZone
();
},
computed
:
{
...
mapGetters
([
'elements'
,
'bookRecordStatus'
]),
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()};
selectedMonth4Query
:
{
get
:
function
()
{
if
(
this
.
$utils
.
isString
(
this
.
listQuery
.
selectedMonth
)
&&
this
.
listQuery
.
selectedMonth
!==
""
)
{
return
toEast8Date
(
this
.
listQuery
.
selectedMonth
);
}
return
undefined
;
},
//获取大区列表
getAllZoneList
(){
return
getAllZone
();
},
selectedMonth4Query
:
{
get
:
function
()
{
if
(
this
.
$utils
.
isString
(
this
.
listQuery
.
selectedMonth
)
&&
this
.
listQuery
.
selectedMonth
!==
''
)
{
return
toEast8Date
(
this
.
listQuery
.
selectedMonth
);
}
return
undefined
;
},
set
:
function
(
date
)
{
if
(
this
.
$utils
.
isDate
(
date
))
{
this
.
listQuery
.
selectedMonth
=
formatDate
(
date
,
'yyyy-MM'
);
}
else
{
this
.
listQuery
.
selectedMonth
=
undefined
;
}
set
:
function
(
date
)
{
if
(
this
.
$utils
.
isDate
(
date
))
{
this
.
listQuery
.
selectedMonth
=
formatDate
(
date
,
"yyyy-MM"
);
}
else
{
this
.
listQuery
.
selectedMonth
=
undefined
;
}
}
}
},
methods
:
{
/**
* 确定
* */
okHandler
()
{
let
arr
=
[];
this
.
fileList2
.
map
(
function
(
item
)
{
arr
.
push
(
item
.
url
);
});
let
params
=
{
illegalPic
:
arr
.
join
(
","
),
illegalAmount
:
this
.
price
,
id
:
this
.
detailId
};
saveOrderViolation
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"创建成功"
,
type
:
"success"
,
duration
:
2000
});
this
.
illegalVisible
=
false
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
"创建失败"
,
message
:
"操作失败!"
,
type
:
"error"
,
duration
:
2000
});
}
});
},
methods
:
{
/**
* 确定
* */
okHandler
()
{
let
arr
=
[];
this
.
fileList2
.
map
(
function
(
item
){
arr
.
push
(
item
.
url
);
});
let
params
=
{
illegalPic
:
arr
.
join
(
","
),
illegalAmount
:
this
.
price
,
id
:
this
.
detailId
,
};
saveOrderViolation
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'创建成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
illegalVisible
=
false
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'创建失败'
,
message
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
/**
* 上传成功
* */
handleSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
this
.
fileList2
.
push
(
c
);
this
.
showLoadingBody
=
false
;
},
/**
* 删除违章图片
* */
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
;
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry
(
row
)
{
var
t
=
this
;
this
.
fileList2
=
[];
this
.
price
=
""
;
if
(
row
.
vehicleDepartureLogVo
.
illegalPic
)
{
let
arr
=
row
.
vehicleDepartureLogVo
.
illegalPic
.
split
(
","
);
let
fileList2
=
[];
let
p
=
{};
arr
.
map
(
function
(
item
)
{
p
=
{
url
:
item
};
fileList2
.
push
(
p
);
});
},
/**
* 上传成功
* */
handleSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
this
.
fileList2
.
push
(
c
);
this
.
showLoadingBody
=
false
;
},
/**
* 删除违章图片
* */
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
;
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry
(
row
){
var
t
=
this
;
this
.
fileList2
=
[];
this
.
price
=
''
;
if
(
row
.
vehicleDepartureLogVo
.
illegalPic
){
let
arr
=
row
.
vehicleDepartureLogVo
.
illegalPic
.
split
(
","
);
let
fileList2
=
[];
t
.
fileList2
=
fileList2
;
}
if
(
row
.
vehicleDepartureLogVo
.
illegalAmount
)
{
t
.
price
=
parseFloat
(
row
.
vehicleDepartureLogVo
.
illegalAmount
);
}
this
.
detailId
=
row
.
vehicleDepartureLogVo
.
id
;
this
.
illegalVisible
=
true
;
},
/**
* 弹框-取消
* */
cancel
()
{
this
.
illegalVisible
=
false
;
},
handleDetail
(
row
)
{
var
t
=
this
;
this
.
detailItem
=
row
;
if
(
row
.
vehicleDepartureLogVo
!=
undefined
)
{
if
(
row
.
vehicleDepartureLogVo
.
departurePic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
departurePic
!=
""
)
{
let
arr
=
row
.
vehicleDepartureLogVo
.
departurePic
.
split
(
","
);
let
departurePicList
=
[];
let
p
=
{};
arr
.
map
(
function
(
item
){
p
=
{
url
:
item
};
fileList2
.
push
(
p
);
arr
.
map
(
function
(
item
)
{
departurePicList
.
push
(
item
);
});
t
.
fileList2
=
fileList2
;
t
.
departurePicList
=
departurePicList
;
}
else
{
t
.
departurePicList
=
[];
}
if
(
row
.
vehicleDepartureLogVo
.
illegalAmount
){
t
.
price
=
parseFloat
(
row
.
vehicleDepartureLogVo
.
illegalAmount
);
if
(
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
""
)
{
let
Arr
=
row
.
vehicleDepartureLogVo
.
arrivalPic
.
split
(
","
);
let
arrivalPicList
=
[];
let
p
=
{};
Arr
.
map
(
function
(
item
)
{
arrivalPicList
.
push
(
item
);
});
t
.
arrivalPicList
=
arrivalPicList
;
}
else
{
t
.
arrivalPicList
=
[];
}
this
.
detailId
=
row
.
vehicleDepartureLogVo
.
id
;
this
.
illegalVisible
=
true
;
},
/**
* 弹框-取消
* */
cancel
()
{
this
.
illegalVisible
=
false
;
},
handleDetail
(
row
){
var
t
=
this
this
.
detailItem
=
row
;
if
(
row
.
vehicleDepartureLogVo
!=
undefined
){
if
(
row
.
vehicleDepartureLogVo
.
departurePic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
departurePic
!=
''
){
let
arr
=
row
.
vehicleDepartureLogVo
.
departurePic
.
split
(
","
);
let
departurePicList
=
[];
let
p
=
{};
arr
.
map
(
function
(
item
){
departurePicList
.
push
(
item
);
});
t
.
departurePicList
=
departurePicList
;
}
else
{
t
.
departurePicList
=
[];
}
if
(
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
''
){
let
Arr
=
row
.
vehicleDepartureLogVo
.
arrivalPic
.
split
(
","
);
let
arrivalPicList
=
[];
let
p
=
{};
Arr
.
map
(
function
(
item
){
arrivalPicList
.
push
(
item
);
}
else
{
t
.
departurePicList
=
[];
t
.
arrivalPicList
=
[];
}
this
.
dialogDetailVisible
=
true
;
},
//监听change事件
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zoneId
=
item
;
this
.
baranchQuery
.
zoneId
=
item
;
this
.
listQuery
.
liftCompany
=
undefined
;
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
).
then
(
response
=>
{
this
.
allBranchCompany
=
response
.
data
;
});
},
getAllBranchCompanyChange
(
item
)
{
this
.
listQuery
.
liftCompany
=
item
;
},
querySearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
let
iitem
=
{
value
:
"全部"
,
name
:
"全部"
};
selectArry
.
push
(
iitem
);
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
this
.
selectArry
=
selectArry
;
var
results
=
queryString
?
selectArry
.
filter
(
this
.
createFilter
(
queryString
))
:
selectArry
;
// 调用 callback 返回建议列表的数据
cb
(
results
);
},
createFilter
(
queryString
)
{
return
restaurant
=>
{
return
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
;
};
},
/**
* 分公司搜索
* */
handleSelect2
(
item
)
{
this
.
listQuery
.
subordinateBranch
=
item
.
id
;
console
.
log
(
item
);
},
/**
* 提车分公司
* */
handleSelect1
(
item
)
{
this
.
form4Lift
.
liftCompany
=
item
.
id
;
console
.
log
(
item
);
},
cancelDialog4Lift
(
formName
)
{
this
.
dialogForm4LiftVisible
=
false
;
this
.
$refs
[
formName
].
resetFields
();
},
cancelDialog4Ret
(
formName
)
{
this
.
dialogForm4RetVisible
=
false
;
this
.
$refs
[
formName
].
resetFields
();
},
/**
* 出车弹框-确定
* */
liftOk
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
Number
(
this
.
departureForm
.
mileage
)
>
999999
)
{
this
.
$notify
({
title
:
"警告"
,
message
:
"公里数不能大于999999"
,
type
:
"warning"
,
duration
:
2000
});
t
.
arrivalPicList
=
arrivalPicList
;
}
else
{
t
.
arrivalPicList
=
[];
return
false
;
}
}
else
{
t
.
departurePicList
=
[];
t
.
arrivalPicList
=
[];
}
this
.
dialogDetailVisible
=
true
;
},
//监听change事件
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
this
.
listQuery
.
liftCompany
=
undefined
;
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
)
.
then
(
response
=>
{
this
.
allBranchCompany
=
response
.
data
;
})
},
getAllBranchCompanyChange
(
item
)
{
this
.
listQuery
.
liftCompany
=
item
},
querySearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
let
iitem
=
{
value
:
"全部"
,
name
:
"全部"
};
selectArry
.
push
(
iitem
);
this
.
allCompaniesArr
.
map
(
function
(
item
){
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
this
.
selectArry
=
selectArry
;
var
results
=
queryString
?
selectArry
.
filter
(
this
.
createFilter
(
queryString
))
:
selectArry
;
// 调用 callback 返回建议列表的数据
cb
(
results
);
},
createFilter
(
queryString
)
{
return
(
restaurant
)
=>
{
return
(
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
);
};
},
/**
* 分公司搜索
* */
handleSelect2
(
item
){
this
.
listQuery
.
subordinateBranch
=
item
.
id
;
console
.
log
(
item
);
},
/**
* 提车分公司
* */
handleSelect1
(
item
){
this
.
form4Lift
.
liftCompany
=
item
.
id
;
console
.
log
(
item
);
},
cancelDialog4Lift
(
formName
)
{
this
.
dialogForm4LiftVisible
=
false
;
this
.
$refs
[
formName
].
resetFields
();
},
cancelDialog4Ret
(
formName
)
{
this
.
dialogForm4RetVisible
=
false
;
this
.
$refs
[
formName
].
resetFields
();
},
/**
* 出车弹框-确定
* */
liftOk
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
Number
(
this
.
departureForm
.
mileage
)
>
999999
){
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
:
'公里数不能大于999999'
,
type
:
'warning'
,
title
:
"成功"
,
message
:
"出车成功"
,
type
:
"success"
,
duration
:
2000
});
this
.
cleanDepartureForm
();
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
response
.
message
,
type
:
"error"
,
duration
:
2000
});
return
false
;
}
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
:
'出车成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
cleanDepartureForm
();
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
response
.
message
,
type
:
'error'
,
duration
:
2000
});
}
});
}
else
{
return
false
;
}
});
},
handleBookInfo
(
row
)
{
this
.
$refs
.
bookInfoViewer
.
handleBookInfo
(
row
.
vehicle
);
},
handleAccItemInfo
(
row
)
{
this
.
selectedAccItem
=
row
.
accItemAndAmount
;
this
.
$refs
.
accItemSelector
.
show
();
},
checkIfBooked
(
bookedDate
,
[
startDateStr
,
endDateStr
])
{
if
(
this
.
$utils
.
isInteger
(
bookedDate
)
&&
this
.
$utils
.
isString
(
startDateStr
)
&&
startDateStr
!==
''
&&
this
.
$utils
.
isString
(
endDateStr
)
&&
endDateStr
!==
''
)
{
let
startDate
=
toEast8Date
(
startDateStr
);
let
endDate
=
toEast8Date
(
endDateStr
);
for
(;
this
.
$utils
.
toDateString
(
startDate
,
'yyyy-MM-dd'
)
<=
this
.
$utils
.
toDateString
(
endDate
,
'yyyy-MM-dd'
);
startDate
.
setDate
(
startDate
.
getDate
()
+
1
))
{
if
((
bookedDate
&
(
1
<<
(
startDate
.
getDate
()
-
1
)))
!==
0
)
{
return
true
;
}
}
});
}
else
{
return
false
;
}
return
false
;
},
checkIfApply
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_APPLY
;
},
checkIfProved
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_PROVED
;
},
checkIfLift
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_LIFT
;
},
getList
()
{
this
.
listLoading
=
true
;
for
(
var
key
in
this
.
listQuery
){
if
(
this
.
listQuery
[
key
]
===
''
){
this
.
listQuery
[
key
]
=
undefined
});
},
handleBookInfo
(
row
)
{
this
.
$refs
.
bookInfoViewer
.
handleBookInfo
(
row
.
vehicle
);
},
handleAccItemInfo
(
row
)
{
this
.
selectedAccItem
=
row
.
accItemAndAmount
;
this
.
$refs
.
accItemSelector
.
show
();
},
checkIfBooked
(
bookedDate
,
[
startDateStr
,
endDateStr
])
{
if
(
this
.
$utils
.
isInteger
(
bookedDate
)
&&
this
.
$utils
.
isString
(
startDateStr
)
&&
startDateStr
!==
""
&&
this
.
$utils
.
isString
(
endDateStr
)
&&
endDateStr
!==
""
)
{
let
startDate
=
toEast8Date
(
startDateStr
);
let
endDate
=
toEast8Date
(
endDateStr
);
for
(
;
this
.
$utils
.
toDateString
(
startDate
,
"yyyy-MM-dd"
)
<=
this
.
$utils
.
toDateString
(
endDate
,
"yyyy-MM-dd"
);
startDate
.
setDate
(
startDate
.
getDate
()
+
1
)
)
{
if
((
bookedDate
&
(
1
<<
(
startDate
.
getDate
()
-
1
)))
!==
0
)
{
return
true
;
}
}
page
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
;
this
.
total
=
response
.
data
.
totalCount
;
this
.
listLoading
=
false
;
})
},
getBookRecordStatus
:
function
(
data
)
{
this
.
bookRecordStatus
[
'3'
].
val
=
'待出行'
this
.
bookRecordStatus
[
'4'
].
val
=
'驳回'
this
.
bookRecordStatus
[
'5'
].
val
=
'出行中'
this
.
bookRecordStatus
[
'7'
].
val
=
'已完成'
if
(
data
)
{
if
(
!
this
.
$utils
.
isInteger
(
data
.
status
))
{
return
'未知'
;
}
if
(
data
.
status
==
2
&&
(
data
.
vehicleDepartureLogVo
==
undefined
||
data
.
vehicleDepartureLogVo
==
null
))
{
return
this
.
bookRecordStatus
[
'3'
].
val
;
}
if
(
data
.
status
==
2
&&
data
.
vehicleDepartureLogVo
!=
undefined
&&
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
.
state
==
0
)
{
return
this
.
bookRecordStatus
[
'5'
].
val
;
}
if
(
data
.
status
==
2
&&
data
.
vehicleDepartureLogVo
!=
undefined
&&
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
.
state
==
1
)
{
return
this
.
bookRecordStatus
[
'7'
].
val
;
}
return
this
.
bookRecordStatus
[
data
.
status
+
''
].
val
;
}
return
''
;
},
getAllBookRecordStatus
:
function
()
{
console
.
log
(
this
.
bookRecordStatus
)
return
this
.
bookRecordStatus
;
},
getDatePeriodStr
([
startDate
,
endDate
])
{
if
(
this
.
$utils
.
isString
(
startDate
)
&&
startDate
!==
''
&&
this
.
$utils
.
isString
(
endDate
)
&&
endDate
!==
''
)
{
return
formatDate
(
toEast8Date
(
startDate
),
'yyyy-MM-dd'
)
+
' 至 '
+
formatDate
(
toEast8Date
(
endDate
),
'yyyy-MM-dd'
);
}
return
false
;
},
checkIfApply
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_APPLY
;
},
checkIfProved
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_PROVED
;
},
checkIfLift
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_LIFT
;
},
getList
()
{
this
.
listLoading
=
true
;
for
(
var
key
in
this
.
listQuery
)
{
if
(
this
.
listQuery
[
key
]
===
""
)
{
this
.
listQuery
[
key
]
=
undefined
;
}
return
'未知'
;
},
/**
* 清空出车弹框数据
*/
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
,
};
},
cleanArrivalForm
(){
this
.
arrivalForm
=
{
vehicleId
:
null
,
numberPlate
:
null
,
arrivalDate
:
null
,
recycleMan
:
null
,
recycleManTel
:
null
,
mileage
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyName
:
''
,
arrivalPic
:
''
,
remark
:
''
,
bookRecordId
:
null
}
},
/**
* 搜索按钮
* */
handleFilter
()
{
this
.
listQuery
.
page
=
1
;
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
getList
();
}
else
{
return
false
;
}
});
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
getList
();
},
handleProve
(
row
)
{
this
.
$confirm
(
'确定批准申请?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
prove
(
row
.
id
)
.
then
(
response
=>
{
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
],
type
:
'error'
,
duration
:
2000
});
}
else
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
],
type
:
'error'
,
duration
:
2000
});
}
else
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'操作成功'
,
type
:
'success'
,
duration
:
2000
});
if
(
this
.
dialogDetailVisible
){
this
.
dialogDetailVisible
=
false
}
}
this
.
getList
();
}
page
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
;
this
.
total
=
response
.
data
.
totalCount
;
this
.
listLoading
=
false
;
});
},
getBookRecordStatus
:
function
(
data
)
{
this
.
bookRecordStatus
[
"3"
].
val
=
"待出行"
;
this
.
bookRecordStatus
[
"4"
].
val
=
"驳回"
;
this
.
bookRecordStatus
[
"5"
].
val
=
"出行中"
;
this
.
bookRecordStatus
[
"7"
].
val
=
"已完成"
;
if
(
data
)
{
if
(
!
this
.
$utils
.
isInteger
(
data
.
status
))
{
return
"未知"
;
}
if
(
data
.
status
==
2
&&
(
data
.
vehicleDepartureLogVo
==
undefined
||
data
.
vehicleDepartureLogVo
==
null
)
)
{
return
this
.
bookRecordStatus
[
"3"
].
val
;
}
if
(
data
.
status
==
2
&&
data
.
vehicleDepartureLogVo
!=
undefined
&&
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
.
state
==
0
)
{
return
this
.
bookRecordStatus
[
"5"
].
val
;
}
if
(
data
.
status
==
2
&&
data
.
vehicleDepartureLogVo
!=
undefined
&&
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
.
state
==
1
)
{
return
this
.
bookRecordStatus
[
"7"
].
val
;
}
return
this
.
bookRecordStatus
[
data
.
status
+
""
].
val
;
}
return
""
;
},
getAllBookRecordStatus
:
function
()
{
console
.
log
(
this
.
bookRecordStatus
);
return
this
.
bookRecordStatus
;
},
getDatePeriodStr
([
startDate
,
endDate
])
{
if
(
this
.
$utils
.
isString
(
startDate
)
&&
startDate
!==
""
&&
this
.
$utils
.
isString
(
endDate
)
&&
endDate
!==
""
)
{
return
(
formatDate
(
toEast8Date
(
startDate
),
"yyyy-MM-dd"
)
+
" 至 "
+
formatDate
(
toEast8Date
(
endDate
),
"yyyy-MM-dd"
)
);
}
return
"未知"
;
},
/**
* 清空出车弹框数据
*/
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
};
},
cleanArrivalForm
()
{
this
.
arrivalForm
=
{
vehicleId
:
null
,
numberPlate
:
null
,
arrivalDate
:
null
,
recycleMan
:
null
,
recycleManTel
:
null
,
mileage
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyName
:
""
,
arrivalPic
:
""
,
remark
:
""
,
bookRecordId
:
null
};
},
/**
* 搜索按钮
* */
handleFilter
()
{
this
.
listQuery
.
page
=
1
;
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
getList
();
}
else
{
return
false
;
}
});
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
getList
();
},
handleProve
(
row
)
{
this
.
$confirm
(
"确定批准申请?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
prove
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
)
{
this
.
$notify
({
title
:
"失败"
,
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
],
type
:
"error"
,
duration
:
2000
});
});
},
rejectBtn
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
reject
(
this
.
rejectFrom
)
.
then
(
response
=>
{
if
(
response
.
code
==
1
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'操作成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
if
(
this
.
rejectVisible
){
this
.
rejectVisible
=
false
}
if
(
this
.
dialogDetailVisible
){
this
.
dialogDetailVisible
=
false
}
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
response
.
message
,
type
:
'error'
,
duration
:
2000
});
}
}
else
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
)
{
this
.
$notify
({
title
:
"失败"
,
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
],
type
:
"error"
,
duration
:
2000
});
}
else
{
return
false
;
}
else
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"操作成功"
,
type
:
"success"
,
duration
:
2000
});
if
(
this
.
dialogDetailVisible
)
{
this
.
dialogDetailVisible
=
false
;
}
}
this
.
getList
();
});
},
handleReject
(
row
)
{
this
.
rejectVisible
=
true
;
this
.
rejectFrom
.
vehicleBookRecordId
=
row
.
id
;
this
.
rejectFrom
.
rejectRemark
=
''
;
},
/**
* 操作-出车
* @param row
*/
handleLift
(
row
)
{
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
this
.
departureForm
.
user
=
row
.
vehicleUsername
this
.
departureForm
.
userTel
=
row
.
vehicleUserPhone
// 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
.
arrivalPicList
=
[];
this
.
arrivalForm
.
bookRecordId
=
row
.
id
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
)
{
if
(
Number
(
this
.
arrivalForm
.
mileage
)
>
999999
){
});
},
rejectBtn
(
formName
)
{
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
reject
(
this
.
rejectFrom
).
then
(
response
=>
{
if
(
response
.
code
==
1
)
{
this
.
$notify
({
title
:
'警告'
,
message
:
'公里数不能大于999999'
,
type
:
'warning'
,
title
:
"成功"
,
message
:
"操作成功"
,
type
:
"success"
,
duration
:
2000
});
return
false
;
}
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
:
'收车成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
cleanArrivalForm
();
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
response
.
message
,
type
:
'error'
,
duration
:
2000
});
this
.
getList
();
if
(
this
.
rejectVisible
)
{
this
.
rejectVisible
=
false
;
}
if
(
this
.
dialogDetailVisible
)
{
this
.
dialogDetailVisible
=
false
;
}
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
response
.
message
,
type
:
"error"
,
duration
:
2000
});
}
});
}
else
{
return
false
;
}
});
},
handleReject
(
row
)
{
this
.
rejectVisible
=
true
;
this
.
rejectFrom
.
vehicleBookRecordId
=
row
.
id
;
this
.
rejectFrom
.
rejectRemark
=
""
;
},
/**
* 操作-出车
* @param row
*/
handleLift
(
row
)
{
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
;
this
.
departureForm
.
user
=
row
.
vehicleUsername
;
this
.
departureForm
.
userTel
=
row
.
vehicleUserPhone
;
// 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
.
arrivalPicList
=
[];
this
.
arrivalForm
.
bookRecordId
=
row
.
id
;
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
)
{
if
(
Number
(
this
.
arrivalForm
.
mileage
)
>
999999
)
{
this
.
$notify
({
title
:
"警告"
,
message
:
"公里数不能大于999999"
,
type
:
"warning"
,
duration
:
2000
});
}
else
{
return
false
;
}
});
},
handleUnbook
(
row
)
{
this
.
$confirm
(
'确定取消预定?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
var
obj
=
{
vehicleBookRecordId
:
row
.
id
};
unbook
(
obj
)
.
then
(
response
=>
{
if
(
response
.
code
==
1
){
this
.
$notify
({
title
:
'成功'
,
message
:
'操作成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
response
.
message
,
type
:
'error'
,
duration
:
2000
});
}
}).
catch
(
response
=>
{
console
.
log
(
response
)
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
:
"收车成功"
,
type
:
"success"
,
duration
:
2000
});
this
.
cleanArrivalForm
();
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
response
.
message
,
type
:
"error"
,
duration
:
2000
});
}
});
}
else
{
return
false
;
}
});
},
handleUnbook
(
row
)
{
this
.
$confirm
(
"确定取消预定?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(()
=>
{
var
obj
=
{
vehicleBookRecordId
:
row
.
id
};
);
});
},
unbook
(
obj
)
.
then
(
response
=>
{
if
(
response
.
code
==
1
)
{
this
.
$notify
({
title
:
"成功"
,
message
:
"操作成功"
,
type
:
"success"
,
duration
:
2000
});
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
"失败"
,
message
:
response
.
message
,
type
:
"error"
,
duration
:
2000
});
}
})
.
catch
(
response
=>
{
console
.
log
(
response
);
});
});
}
}
};
</
script
>
<
style
scoped
>
.order-details
.el-form-item
{
margin-bottom
:
0px
!important
;
}
.order-details
hr
{
height
:
1px
;
background-color
:
#ccc
;
border
:
none
;
}
.image
{
width
:
100%
;
height
:
110px
;
display
:
block
;
}
.el-card__body
,
.el-card
{
padding
:
0px
!important
;
width
:
150px
;
text-align
:
center
;}
.order-details
.el-form-item
{
margin-bottom
:
0px
!important
;
}
.order-details
hr
{
height
:
1px
;
background-color
:
#ccc
;
border
:
none
;
}
.image
{
width
:
100%
;
height
:
110px
;
display
:
block
;
}
.el-card__body
,
.el-card
{
padding
:
0px
!important
;
width
:
150px
;
text-align
:
center
;
}
</
style
>
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