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
8be78a9e
Commit
8be78a9e
authored
Oct 12, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建订单优化
parent
967f4ad0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2154 additions
and
1898 deletions
+2154
-1898
index.js
src/api/base_info/branch_company/index.js
+17
-1
rentOrderDetailModal.vue
src/views/order/modal/rentOrderDetailModal.vue
+352
-258
index.vue
src/views/order/rentVehicleInfo/index.vue
+0
-1
summitPopup.vue
src/views/summit/model/summitPopup.vue
+98
-33
index.vue
src/views/vehicle/bookRecord/index.vue
+1687
-1605
No files found.
src/api/base_info/branch_company/index.js
View file @
8be78a9e
...
@@ -155,7 +155,22 @@ export function stockSearchPage(query) {
...
@@ -155,7 +155,22 @@ export function stockSearchPage(query) {
});
});
}
}
// 修改订单还车公司
export
function
updateEndCompany
(
params
)
{
return
fetch
({
url
:
'/api/order/baseOrder/updateEndCompany'
,
method
:
'post'
,
data
:
params
});
}
// 修改预定订单还车公司
export
function
updateById
(
params
)
{
return
fetch
({
url
:
'/vehicle/vehicleInfo/bookRecord/updateById'
,
method
:
'post'
,
data
:
params
});
}
export
function
delObj
(
id
)
{
export
function
delObj
(
id
)
{
return
fetch
({
return
fetch
({
url
:
'/vehicle/branchCompany/'
+
id
,
url
:
'/vehicle/branchCompany/'
+
id
,
...
@@ -184,6 +199,7 @@ export function getDetail(id) {
...
@@ -184,6 +199,7 @@ export function getDetail(id) {
method
:
'get'
method
:
'get'
})
})
}
}
/**
/**
* 获取所有公司信息
* 获取所有公司信息
* @returns {null|*}
* @returns {null|*}
...
...
src/views/order/modal/rentOrderDetailModal.vue
View file @
8be78a9e
...
@@ -31,7 +31,16 @@
...
@@ -31,7 +31,16 @@
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"配车:"
>
<el-form-item
label=
"配车:"
>
<span
style=
"margin-right: 10px;"
>
{{
form
.
vehicleNumberPlat
?
form
.
vehicleNumberPlat
:
form
.
vehicalNumberPlat
}}
</span><el-button
size=
"small"
type=
"primary"
icon=
"edit"
v-if=
"form.status==4"
@
click=
"resetCar"
>
重新配车
</el-button>
<span
style=
"margin-right: 10px;"
>
{{
form
.
vehicleNumberPlat
?
form
.
vehicleNumberPlat
:
form
.
vehicalNumberPlat
}}
</span>
<el-button
size=
"small"
type=
"primary"
icon=
"edit"
v-if=
"form.status==4"
@
click=
"resetCar"
>
重新配车
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -42,7 +51,7 @@
...
@@ -42,7 +51,7 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
""
label-width=
"10px"
>
<el-form-item
label
label-width=
"10px"
>
<span>
{{
form
.
orderRentVehicleDetail
.
startAddr
}}
</span>
<span>
{{
form
.
orderRentVehicleDetail
.
startAddr
}}
</span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -59,18 +68,22 @@
...
@@ -59,18 +68,22 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
""
label-width=
"10px"
>
<el-form-item
label
label-width=
"10px"
>
<span>
{{
form
.
orderRentVehicleDetail
.
endAddr
}}
</span>
<span>
{{
form
.
orderRentVehicleDetail
.
endAddr
}}
</span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"交
车公司:"
>
<el-form-item
label=
"还
车公司:"
>
<span>
{{
form
.
endCompanyName
}}
</span>
<span>
{{
form
.
endCompanyName
}}
</span>
<el-button
size=
"mini"
type=
"primary"
style=
"padding: 7px 9px;"
@
click=
"resetReturn = true"
>
更换
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<table
class=
"orderDetail"
>
<table
class=
"orderDetail"
>
<tr><th>
房车
</th><th>
租借天数
</th><th>
费用明细
</th>
<tr>
<th>
房车
</th>
<th>
租借天数
</th>
<th>
费用明细
</th>
</tr>
</tr>
<tr>
<tr>
<td>
{{
form
.
name
}}{{
rentCostDetail
}}
</td>
<td>
{{
form
.
name
}}{{
rentCostDetail
}}
</td>
...
@@ -78,26 +91,33 @@
...
@@ -78,26 +91,33 @@
<td>
{{
rentCostDetail
}}
</td>
<td>
{{
rentCostDetail
}}
</td>
</tr>
</tr>
<tr>
<tr>
<td
></td>
<td
></td>
<td
></td>
<td
></td>
<td
>
共计:¥
{{
form
.
realAmount
}}
</td>
<td
>
共计:¥
{{
form
.
realAmount
}}
</td>
</tr>
</tr>
</table>
</table>
<div
v-if=
"form.orderVehicleCrosstownDto"
style=
"margin: 20px 0;"
><span
style=
"font-size: 18px;font-weight: bold;"
>
驾驶人信息
</span></div>
<div
v-if=
"form.orderVehicleCrosstownDto"
style=
"margin: 20px 0;"
>
<span
style=
"font-size: 18px;font-weight: bold;"
>
驾驶人信息
</span>
</div>
<table
class=
"orderDetail"
v-if=
"form.orderVehicleCrosstownDto"
>
<table
class=
"orderDetail"
v-if=
"form.orderVehicleCrosstownDto"
>
<tr><th>
姓名
</th><th>
手机号
</th><th>
身份证号
</th>
<!--
<th>
驾照
</th>
-->
</tr>
<tr>
<th>
姓名
</th>
<th>
手机号
</th>
<th>
身份证号
</th>
<!--
<th>
驾照
</th>
-->
</tr>
<tr>
<tr>
<td>
{{
form
.
orderVehicleCrosstownDto
.
licenseName
}}
</td>
<td>
{{
form
.
orderVehicleCrosstownDto
.
licenseName
}}
</td>
<td>
{{
form
.
orderVehicleCrosstownDto
.
licensePhone
}}
</td>
<td>
{{
form
.
orderVehicleCrosstownDto
.
licensePhone
}}
</td>
<td>
{{
form
.
orderVehicleCrosstownDto
.
licenseIdCard
}}
</td>
<td>
{{
form
.
orderVehicleCrosstownDto
.
licenseIdCard
}}
</td>
<!--
<td><img
style=
"width: 140px;height: 140px;"
:src=
"form.orderVehicleCrosstownDto?form.orderVehicleCrosstownDto.licenseImg:'https://xxtest.upyuns.com/image/app/default_%20avatar.png'"
></td>
-->
<!--
<td><img
style=
"width: 140px;height: 140px;"
:src=
"form.orderVehicleCrosstownDto?form.orderVehicleCrosstownDto.licenseImg:'https://xxtest.upyuns.com/image/app/default_%20avatar.png'"
></td>
-->
</tr>
</tr>
</table>
</table>
</el-form>
</el-form>
<div
class=
"modal_modal"
v-show=
"resetCarVisible"
></div>
<div
class=
"modal_modal"
v-show=
"resetCarVisible"
></div>
<!-- 重新配车 -->
<!-- 重新配车 -->
<el-dialog
title=
"重新配车"
:visible
.
sync=
"resetCarVisible"
:append-to-body=
'true'
:modal=
"false"
>
<el-dialog
title=
"重新配车"
:visible
.
sync=
"resetCarVisible"
:append-to-body=
"true"
:modal=
"false"
>
<el-form
:model=
"resetCarForm"
ref=
"carForm"
:rules=
"rules"
label-width=
"90px"
>
<el-form
:model=
"resetCarForm"
ref=
"carForm"
:rules=
"rules"
label-width=
"90px"
>
<el-form-item
label=
"车牌号:"
prop=
"numberPlate"
>
<el-form-item
label=
"车牌号:"
prop=
"numberPlate"
>
<el-input
v-model=
"resetCarForm.numberPlate"
placeholder=
"请输入重配的车牌号"
></el-input>
<el-input
v-model=
"resetCarForm.numberPlate"
placeholder=
"请输入重配的车牌号"
></el-input>
...
@@ -108,18 +128,32 @@
...
@@ -108,18 +128,32 @@
<el-button
type=
"primary"
@
click=
"update('carForm')"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"update('carForm')"
>
确定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 更改还车地点 -->
<div
class=
"modal_modal"
v-show=
"resetReturn"
></div>
<el-dialog
title=
"更改还车地点"
:visible
.
sync=
"resetReturn"
:append-to-body=
"true"
:modal=
"false"
>
<el-form
:model=
"returnForm"
ref=
"returnForm"
label-width=
"90px"
>
<el-form-item
label=
"还车地点:"
prop=
"endCompanyId"
>
<el-select
clearable
v-model=
"returnForm.endCompanyId"
filterable
placeholder=
"请选择/搜索还车地点"
>
<el-option
v-for=
"item in allCompaniesArr"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-button
style=
"margin-top:20px"
type=
"primary"
@
click=
"confirm('returnForm')"
>
确定
</el-button>
</el-form>
</el-dialog>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElRow
from
'element-ui/packages/row/src/row'
import
ElInput
from
"../../../../node_modules/element-ui/packages/input/src/input.vue"
;
import
ElInput
from
'../../../../node_modules/element-ui/packages/input/src/input.vue'
import
ElCol
from
"element-ui/packages/col/src/col"
;
import
ElCol
from
'element-ui/packages/col/src/col'
import
ElFormItem
from
"../../../../node_modules/element-ui/packages/form/src/form-item.vue"
;
import
ElFormItem
from
'../../../../node_modules/element-ui/packages/form/src/form-item.vue'
import
ElForm
from
"../../../../node_modules/element-ui/packages/form/src/form.vue"
;
import
ElForm
from
'../../../../node_modules/element-ui/packages/form/src/form.vue'
import
{
editObj
}
from
'api/vehicle/vehicleInfo'
;
import
{
editObj
}
from
'api/vehicle/vehicleInfo'
export
default
{
import
{
getAll
,
updateEndCompany
}
from
'api/base_info/branch_company'
props
:
[
"form"
,
"rentCostDetail"
],
export
default
{
props
:
[
'form'
,
'rentCostDetail'
],
name
:
'rentOrderDetailModal'
,
name
:
'rentOrderDetailModal'
,
components
:
{
components
:
{
ElFormItem
,
ElFormItem
,
...
@@ -129,12 +163,26 @@
...
@@ -129,12 +163,26 @@
},
},
data
()
{
data
()
{
return
{
return
{
updateNumberPlat
:
false
,
//是否重新配车
returnForm
:
{
endCompanyId
:
''
},
allCompaniesArr
:
[],
resetReturn
:
false
,
//更改换成地点loading
updateNumberPlat
:
false
,
//是否重新配车
dialogVisible
:
false
,
dialogVisible
:
false
,
resetCarVisible
:
false
,
resetCarVisible
:
false
,
resetCarForm
:{
resetCarForm
:
{
no
:
''
,
no
:
''
,
numberPlate
:
''
,
//重新配车车牌号
numberPlate
:
''
//重新配车车牌号
},
rules1
:
{
endCompanyId
:
[
{
required
:
true
,
message
:
'请选择更换地点'
,
trigger
:
'change'
}
]
},
},
rules
:
{
rules
:
{
numberPlate
:
[
numberPlate
:
[
...
@@ -145,55 +193,100 @@
...
@@ -145,55 +193,100 @@
trigger
:
'blur'
trigger
:
'blur'
}
}
]
]
},
}
}
}
},
},
watch
:
{
watch
:
{
dialogVisible
(
newValue
,
oldValue
){
dialogVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
){
if
(
!
newValue
)
{
this
.
$emit
(
"rentOrderDetailDialogEvent"
,
this
.
updateNumberPlat
);
this
.
$emit
(
'rentOrderDetailDialogEvent'
,
this
.
updateNumberPlat
)
}
}
}
},
},
},
mounted
()
{
mounted
()
{
this
.
dialogVisible
=
true
;
console
.
log
(
this
.
form
)
this
.
dialogVisible
=
true
if
(
this
.
form
.
status
==
2
)
{
if
(
this
.
form
.
status
==
2
)
{
this
.
form
.
ststusName
=
'取消'
;
this
.
form
.
ststusName
=
'取消'
}
}
if
(
this
.
form
.
status
==
3
)
{
if
(
this
.
form
.
status
==
3
)
{
this
.
form
.
ststusName
=
'待付款'
;
this
.
form
.
ststusName
=
'待付款'
}
}
if
(
this
.
form
.
status
==
4
)
{
if
(
this
.
form
.
status
==
4
)
{
this
.
form
.
ststusName
=
'待出行'
;
this
.
form
.
ststusName
=
'待出行'
}
}
if
(
this
.
form
.
status
==
5
)
{
if
(
this
.
form
.
status
==
5
)
{
this
.
form
.
ststusName
=
'出行中'
;
this
.
form
.
ststusName
=
'出行中'
}
}
if
(
this
.
form
.
status
==
6
)
{
if
(
this
.
form
.
status
==
6
)
{
this
.
form
.
ststusName
=
'已完成'
;
this
.
form
.
ststusName
=
'已完成'
}
}
this
.
getAllFn
()
},
},
methods
:
{
methods
:
{
resetCar
(){
getAllFn
()
{
this
.
clearFrom
();
let
_this
=
this
getAll
().
then
(
data
=>
{
_this
.
allCompaniesArr
=
[]
data
.
data
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
_this
.
allCompaniesArr
.
push
(
item
)
})
})
},
confirm
(
formName
)
{
if
(
this
.
returnForm
.
endCompanyId
==
''
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'还车地点不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
{
this
.
returnForm
.
id
=
this
.
form
.
detailId
updateEndCompany
(
this
.
returnForm
).
then
(
data
=>
{
console
.
log
(
data
.
status
);
if
(
data
.
status
==
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'修改还车地点成功'
,
type
:
'success'
,
duration
:
3000
})
this
.
resetReturn
=
false
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
data
.
message
,
type
:
'error'
,
duration
:
3000
})
}
})
}
},
resetCar
()
{
this
.
clearFrom
()
this
.
resetCarVisible
=
true
this
.
resetCarVisible
=
true
this
.
resetCarForm
.
no
=
this
.
form
.
no
this
.
resetCarForm
.
no
=
this
.
form
.
no
},
},
cancelResetCar
()
{
cancelResetCar
()
{
this
.
resetCarVisible
=
false
this
.
resetCarVisible
=
false
},
},
clearFrom
()
{
clearFrom
()
{
this
.
resetCarForm
=
{
this
.
resetCarForm
=
{
no
:
''
,
no
:
''
,
numberPlate
:
''
,
//重新配车车牌号
numberPlate
:
''
//重新配车车牌号
}
}
},
},
/**
/**
* 重新配车
* 重新配车
* */
* */
update
(
formName
)
{
update
(
formName
)
{
let
that
=
this
;
let
that
=
this
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
editObj
(
this
.
resetCarForm
).
then
(
response
=>
{
editObj
(
this
.
resetCarForm
).
then
(
response
=>
{
...
@@ -203,7 +296,7 @@
...
@@ -203,7 +296,7 @@
message
:
'修改成功'
,
message
:
'修改成功'
,
type
:
'success'
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
this
.
resetCarVisible
=
false
this
.
resetCarVisible
=
false
this
.
form
.
vehicleNumberPlat
=
this
.
resetCarForm
.
numberPlate
this
.
form
.
vehicleNumberPlat
=
this
.
resetCarForm
.
numberPlate
this
.
updateNumberPlat
=
true
this
.
updateNumberPlat
=
true
...
@@ -213,55 +306,56 @@
...
@@ -213,55 +306,56 @@
message
:
response
.
message
,
message
:
response
.
message
,
type
:
'error'
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
}
});
})
}
else
{
}
else
{
return
false
;
return
false
}
}
});
})
},
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.label-text
{
.label-text
{
margin-left
:
10px
;
margin-left
:
10px
;
margin-right
:
20px
;
margin-right
:
20px
;
}
}
.label-title
{
.label-title
{
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.orderDetail
tr
th
{
.orderDetail
tr
th
{
background
:
#eef1f6
;
background
:
#eef1f6
;
}
}
.orderDetail
tr
td
,
.orderDetail
tr
th
{
.orderDetail
tr
td
,
.orderDetail
tr
th
{
width
:
500px
;
width
:
500px
;
text-align
:
center
;
text-align
:
center
;
border
:
1px
solid
#dfe6ec
;
border
:
1px
solid
#dfe6ec
;
margin-left
:
100px
;
margin-left
:
100px
;
margin-right
:
100px
;
margin-right
:
100px
;
padding
:
10px
;
padding
:
10px
;
}
}
.label-value
{
.label-value
{
margin-left
:
80px
;
margin-left
:
80px
;
margin-right
:
100px
;
margin-right
:
100px
;
}
}
#license-img
{
#license-img
{
width
:
50px
;
width
:
50px
;
height
:
50px
;
height
:
50px
;
}
}
.order-details
.el-form-item
{
.order-details
.el-form-item
{
margin-bottom
:
10px
!important
;
margin-bottom
:
10px
!important
;
}
}
.modal_modal
{
.modal_modal
{
position
:
fixed
;
position
:
fixed
;
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
opacity
:
.5
;
opacity
:
0
.5
;
background
:
#000
;
background
:
#000
;
z-index
:
2000
;
z-index
:
2000
;
}
}
</
style
>
</
style
>
src/views/order/rentVehicleInfo/index.vue
View file @
8be78a9e
...
@@ -697,7 +697,6 @@ export default {
...
@@ -697,7 +697,6 @@ export default {
});
});
},
},
handleOrderDetail
(
row
)
{
handleOrderDetail
(
row
)
{
debugger
this
.
form
=
row
;
this
.
form
=
row
;
if
(
this
.
form
.
status
==
2
)
{
if
(
this
.
form
.
status
==
2
)
{
this
.
form
.
ststusName
=
"取消"
;
this
.
form
.
ststusName
=
"取消"
;
...
...
src/views/summit/model/summitPopup.vue
View file @
8be78a9e
...
@@ -165,12 +165,21 @@
...
@@ -165,12 +165,21 @@
<el-form-item
label=
"峰会流程:"
>
<el-form-item
label=
"峰会流程:"
>
<el-row
class=
"height"
v-for=
"(item, index) in processJson"
:key=
"index"
>
<el-row
class=
"height"
v-for=
"(item, index) in processJson"
:key=
"index"
>
<el-col
:span=
"6"
>
<el-col
:span=
"6"
>
<el-date-picker
<
!--
<
el-date-picker
v-model=
"item.time"
v-model=
"item.time"
type=
"datetime"
type=
"datetime"
format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
placeholder=
"请选择时间"
placeholder=
"请选择时间"
></el-date-picker>
></el-date-picker>
-->
<el-time-select
v-model=
"item.time"
:picker-options=
"
{
start: '06:00',
step: '00:15',
end: '23:59'
}"
placeholder="选择/输入时间"
>
</el-time-select>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-input
class=
"content"
v-model=
"item.content"
placeholder=
"请输入内容"
></el-input>
<el-input
class=
"content"
v-model=
"item.content"
placeholder=
"请输入内容"
></el-input>
...
@@ -256,6 +265,7 @@ export default {
...
@@ -256,6 +265,7 @@ export default {
longitude
:
undefined
,
longitude
:
undefined
,
latitude
:
undefined
,
latitude
:
undefined
,
state
:
'默认'
,
state
:
'默认'
,
status
:
0
,
rid
:
undefined
,
rid
:
undefined
,
content
:
''
,
// 峰会主题
content
:
''
,
// 峰会主题
contentFirm
:
''
,
contentFirm
:
''
,
...
@@ -305,10 +315,10 @@ export default {
...
@@ -305,10 +315,10 @@ export default {
res
.
data
.
state
=
this
.
getState
(
res
.
data
.
status
)
res
.
data
.
state
=
this
.
getState
(
res
.
data
.
status
)
this
.
form
=
res
.
data
this
.
form
=
res
.
data
this
.
form
.
bmCloseTime
=
Number
(
res
.
data
.
bmCloseTime
)
this
.
form
.
bmCloseTime
=
Number
(
res
.
data
.
bmCloseTime
)
let
introduce
=
this
.
form
.
vehicleImgs
.
split
(
','
);
let
introduce
=
this
.
form
.
vehicleImgs
.
split
(
','
)
introduce
.
forEach
(
element
=>
{
introduce
.
forEach
(
element
=>
{
this
.
fileList2
.
push
({
name
:
'峰会介绍'
,
url
:
element
})
this
.
fileList2
.
push
({
name
:
'峰会介绍'
,
url
:
element
})
});
})
if
(
res
.
data
.
processJson
)
{
if
(
res
.
data
.
processJson
)
{
this
.
processJson
=
JSON
.
parse
(
res
.
data
.
processJson
)
this
.
processJson
=
JSON
.
parse
(
res
.
data
.
processJson
)
}
}
...
@@ -378,7 +388,7 @@ export default {
...
@@ -378,7 +388,7 @@ export default {
},
},
addTag
()
{
addTag
()
{
const
t
=
{
const
t
=
{
time
:
undefined
,
time
:
null
,
content
:
''
content
:
''
}
}
this
.
processJson
.
push
(
t
)
this
.
processJson
.
push
(
t
)
...
@@ -388,43 +398,98 @@ export default {
...
@@ -388,43 +398,98 @@ export default {
*
*
* */
* */
update1
()
{
update1
()
{
this
.
dataProcessing
()
if
(
!
this
.
form
.
title
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'标题不能为空'
,
type
:
'error'
,
duration
:
2000
})
return
false
}
else
if
(
!
this
.
form
.
startTime
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'开始时间不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
if
(
!
this
.
form
.
endTime
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'结束时间不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
if
(
!
this
.
form
.
bmCloseTime
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'报名截止时间不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
{
typeof
(
this
.
form
.
endTime
)
==
'number'
?
this
.
form
.
endTime
=
this
.
form
.
endTime
:
this
.
form
.
endTime
=
this
.
form
.
endTime
.
getTime
();
typeof
(
this
.
form
.
startTime
)
==
'number'
?
this
.
form
.
startTime
=
this
.
form
.
startTime
:
this
.
form
.
startTime
=
this
.
form
.
startTime
.
getTime
();
typeof
(
this
.
form
.
bmCloseTime
)
==
'number'
?
this
.
form
.
bmCloseTime
=
this
.
form
.
bmCloseTime
:
this
.
form
.
bmCloseTime
=
this
.
form
.
bmCloseTime
.
getTime
();
let
pic
=
[]
if
(
!!
this
.
form
.
vehicleImgs
)
{
this
.
form
.
vehicleImgs
.
forEach
(
element
=>
{
pic
.
push
(
element
.
url
)
})
this
.
form
.
vehicleImgs
=
pic
.
join
(
','
)
}
this
.
form
.
processJson
=
this
.
processJson
update
(
this
.
form
).
then
(
res
=>
{
update
(
this
.
form
).
then
(
res
=>
{
this
.
responseResult
(
res
)
this
.
responseResult
(
res
)
})
})
this
.
dataProcessing
()
}
},
},
create
(
formName
)
{
create
()
{
if
(
if
(
!
this
.
form
.
title
)
{
!
this
.
form
.
title
||
!
this
.
form
.
startTime
||
!
this
.
form
.
endTime
)
{
this
.
$notify
({
this
.
$notify
({
title
:
'失败'
,
title
:
'失败'
,
message
:
'
必填项
不能为空'
,
message
:
'
标题
不能为空'
,
type
:
'error'
,
type
:
'error'
,
duration
:
2000
duration
:
2000
})
})
return
false
return
false
}
else
if
(
!
this
.
form
.
startTime
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'开始时间不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
if
(
!
this
.
form
.
endTime
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'结束时间不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
if
(
!
this
.
form
.
bmCloseTime
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'报名截止时间不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
{
}
else
{
this
.
form
.
endTime
=
this
.
form
.
endTime
.
getTime
()
this
.
form
.
endTime
=
this
.
form
.
endTime
.
getTime
()
this
.
form
.
startTime
=
this
.
form
.
startTime
.
getTime
()
this
.
form
.
startTime
=
this
.
form
.
startTime
.
getTime
()
this
.
form
.
bmCloseTime
=
this
.
form
.
bmCloseTime
.
getTime
()
this
.
form
.
bmCloseTime
=
this
.
form
.
bmCloseTime
.
getTime
()
let
pic
=
[]
let
pic
=
[]
if
(
!!
this
.
form
.
vehicleImgs
)
{
this
.
form
.
vehicleImgs
.
forEach
(
element
=>
{
this
.
form
.
vehicleImgs
.
forEach
(
element
=>
{
pic
.
push
(
element
.
url
)
pic
.
push
(
element
.
url
)
})
})
this
.
form
.
vehicleImgs
=
pic
.
join
(
','
)
this
.
form
.
vehicleImgs
=
pic
.
join
(
','
)
let
demo
=
[]
}
this
.
processJson
.
forEach
(
element
=>
{
demo
.
push
({
this
.
form
.
processJson
=
this
.
processJson
time
:
formatDate
(
element
.
time
,
'yyyy-MM-dd hh'
)
+
':00:00'
,
content
:
element
.
content
})
})
this
.
form
.
processJson
=
demo
add
(
this
.
form
).
then
(
res
=>
{
add
(
this
.
form
).
then
(
res
=>
{
this
.
responseResult
(
res
)
this
.
responseResult
(
res
)
...
...
src/views/vehicle/bookRecord/index.vue
View file @
8be78a9e
...
@@ -36,12 +36,7 @@
...
@@ -36,12 +36,7 @@
@
change=
"getProvinceRegions"
@
change=
"getProvinceRegions"
>
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -53,12 +48,7 @@
...
@@ -53,12 +48,7 @@
@
change=
"getAllBranchCompanyChange"
@
change=
"getAllBranchCompanyChange"
>
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"预订月份"
prop=
"selectedMonth4Query"
>
<el-form-item
label=
"预订月份"
prop=
"selectedMonth4Query"
>
...
@@ -382,9 +372,7 @@
...
@@ -382,9 +372,7 @@
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作人"
>
<el-form-item
label=
"操作人"
>
<span
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.checkMan}}
</span>
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.checkMan}}
</span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
...
@@ -422,13 +410,17 @@
...
@@ -422,13 +410,17 @@
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"还车分公司"
>
<el-form-item
label=
"还车分公司"
>
<span>
{{detailItem.retCompanyName}}
</span>
<span>
{{detailItem.retCompanyName}}
</span>
<el-button
size=
"mini"
type=
"primary"
style=
"padding: 7px 9px;"
@
click=
"resetReturn = true"
>
更换
</el-button>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"操作人"
>
<el-form-item
label=
"操作人"
>
<span
<span
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.recycleMan}}
</span>
v-if=
"detailItem.vehicleDepartureLogVo"
>
{{detailItem.vehicleDepartureLogVo.recycleMan}}
</span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
...
@@ -481,6 +473,19 @@
...
@@ -481,6 +473,19 @@
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 更改还车地点 -->
<div
class=
"modal_modal"
v-show=
"resetReturn"
></div>
<el-dialog
title=
"更改还车地点"
:visible
.
sync=
"resetReturn"
:append-to-body=
"true"
:modal=
"false"
>
<el-form
:model=
"returnForm"
ref=
"returnForm"
label-width=
"90px"
>
<el-form-item
label=
"还车地点:"
prop=
"retCompany"
>
<el-select
clearable
v-model=
"returnForm.retCompany"
filterable
placeholder=
"请选择/搜索还车地点"
>
<el-option
v-for=
"item in allCompaniesArr"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-button
style=
"margin-top:20px"
type=
"primary"
@
click=
"confirm('returnForm')"
>
确定
</el-button>
</el-form>
</el-dialog>
<el-dialog
title=
"驳回"
:visible
.
sync=
"rejectVisible"
>
<el-dialog
title=
"驳回"
:visible
.
sync=
"rejectVisible"
>
<el-form
:model=
"rejectFrom"
:rules=
"rejectRules"
ref=
"rejectDialogFrom"
label-width=
"80px"
>
<el-form
:model=
"rejectFrom"
:rules=
"rejectRules"
ref=
"rejectDialogFrom"
label-width=
"80px"
>
<el-form-item
label=
"驳回理由"
prop=
"rejectRemark"
>
<el-form-item
label=
"驳回理由"
prop=
"rejectRemark"
>
...
@@ -688,78 +693,87 @@ import {
...
@@ -688,78 +693,87 @@ import {
saveOrderViolation
,
saveOrderViolation
,
departureVehicle
,
departureVehicle
,
arrivalVehicle
arrivalVehicle
}
from
"api/vehicle/bookRecord"
;
}
from
'api/vehicle/bookRecord'
import
{
getAllCompany
,
getAll
}
from
"api/base_info/branch_company/"
;
import
{
import
{
getAllZone
}
from
"api/base_info/constant/"
;
getAllCompany
,
import
{
getAllBranchCompanyByZoneId
}
from
"api/order/rentVehicle"
;
getAll
,
import
{
formatDate
}
from
"utils/dateFormattor"
;
updateById
}
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
{
toEast8Date
,
deepCopyDate
,
newEast8Date
}
from
'utils/dateUtils'
import
{
getToken
}
from
"../../../utils/auth"
;
import
{
getToken
}
from
'../../../utils/auth'
import
{
import
{
BOOK_RECORD_STATUS_APPLY
,
BOOK_RECORD_STATUS_APPLY
,
BOOK_RECORD_STATUS_PROVED
,
BOOK_RECORD_STATUS_PROVED
,
BOOK_RECORD_STATUS_LIFT
BOOK_RECORD_STATUS_LIFT
}
from
"../../../store/modules/baseInfo"
;
}
from
'../../../store/modules/baseInfo'
import
bookInfoViewer
from
"../bookInfoViewer"
;
import
bookInfoViewer
from
'../bookInfoViewer'
import
accItemSelector
from
"../accompanyingItem/accItemSelector.vue"
;
import
accItemSelector
from
'../accompanyingItem/accItemSelector.vue'
export
default
{
export
default
{
name
:
"bookRecord"
,
name
:
'bookRecord'
,
components
:
{
components
:
{
bookInfoViewer
,
bookInfoViewer
,
accItemSelector
accItemSelector
},
},
data
()
{
data
()
{
return
{
return
{
returnForm
:
{
retCompany
:
''
},
allCompaniesArr
:
[],
resetReturn
:
false
,
//更改换成地点loading
rejectVisible
:
false
,
rejectVisible
:
false
,
rejectFrom
:
{
rejectFrom
:
{
vehicleBookRecordId
:
""
,
vehicleBookRecordId
:
''
,
rejectRemark
:
""
rejectRemark
:
''
},
},
rejectRules
:
{
rejectRules
:
{
rejectRemark
:
{
rejectRemark
:
{
type
:
"string"
,
type
:
'string'
,
required
:
true
,
required
:
true
,
message
:
"请输入拒绝原因"
,
message
:
'请输入拒绝原因'
,
trigger
:
"blur"
trigger
:
'blur'
}
}
},
},
BASE_API
:
process
.
env
.
BASE_API
,
BASE_API
:
process
.
env
.
BASE_API
,
departureFormrules
:
{
departureFormrules
:
{
checkMan
:
{
checkMan
:
{
required
:
true
,
required
:
true
,
message
:
"请输入验车人"
,
message
:
'请输入验车人'
,
trigger
:
"blur"
trigger
:
'blur'
},
},
checkManTel
:
[
checkManTel
:
[
{
{
required
:
true
,
required
:
true
,
message
:
"请输入验车人联系方式"
,
message
:
'请输入验车人联系方式'
,
trigger
:
"blur"
trigger
:
'blur'
},
},
{
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
"请输入正确的手机号"
message
:
'请输入正确的手机号'
}
}
],
],
mileage
:
{
mileage
:
{
type
:
"number"
,
type
:
'number'
,
required
:
true
,
required
:
true
,
message
:
"请输入公里数"
,
message
:
'请输入公里数'
,
trigger
:
"blur"
trigger
:
'blur'
}
}
},
},
departureForm
:
{
departureForm
:
{
vehicleId
:
null
,
vehicleId
:
null
,
departureBranchCompanyId
:
null
,
//出发地分公司id
departureBranchCompanyId
:
null
,
//出发地分公司id
departureBranchCompanyName
:
""
,
//出发地分公司名称
departureBranchCompanyName
:
''
,
//出发地分公司名称
use
:
null
,
use
:
null
,
user
:
null
,
user
:
null
,
userTel
:
null
,
userTel
:
null
,
...
@@ -768,9 +782,9 @@ export default {
...
@@ -768,9 +782,9 @@ export default {
mileage
:
null
,
mileage
:
null
,
numberPlate
:
null
,
numberPlate
:
null
,
expectArrivalBranchCompanyId
:
null
,
//目的地分公司id
expectArrivalBranchCompanyId
:
null
,
//目的地分公司id
expectArrivalBranchCompanyName
:
""
,
//目的地分公司名称
expectArrivalBranchCompanyName
:
''
,
//目的地分公司名称
bookRecordId
:
null
,
bookRecordId
:
null
,
departurePic
:
""
,
departurePic
:
''
,
remark
:
null
,
remark
:
null
,
bookStartDate
:
null
bookStartDate
:
null
},
},
...
@@ -784,104 +798,105 @@ export default {
...
@@ -784,104 +798,105 @@ export default {
recycleManTel
:
null
,
recycleManTel
:
null
,
mileage
:
null
,
mileage
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyName
:
""
,
arrivalBranchCompanyName
:
''
,
arrivalPic
:
""
,
arrivalPic
:
''
,
remark
:
""
,
remark
:
''
,
bookRecordId
:
null
bookRecordId
:
null
},
},
arrivalFormrules
:
{
arrivalFormrules
:
{
recycleMan
:
{
recycleMan
:
{
required
:
true
,
required
:
true
,
message
:
"请输入收车人"
,
message
:
'请输入收车人'
,
trigger
:
"blur"
trigger
:
'blur'
},
},
recycleManTel
:
[
recycleManTel
:
[
{
{
required
:
true
,
required
:
true
,
message
:
"请输入收车人联系方式"
,
message
:
'请输入收车人联系方式'
,
trigger
:
"blur"
trigger
:
'blur'
},
},
{
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
"请输入正确的手机号"
message
:
'请输入正确的手机号'
}
}
],
],
mileage
:
{
mileage
:
{
type
:
"number"
,
type
:
'number'
,
required
:
true
,
required
:
true
,
message
:
"请输入收车公里数"
,
message
:
'请输入收车公里数'
,
trigger
:
"blur"
trigger
:
'blur'
}
}
},
},
statusList
:
[
statusList
:
[
{
{
code
:
"1"
,
code
:
'1'
,
val
:
"申请中"
val
:
'申请中'
},
},
{
{
code
:
"3"
,
code
:
'3'
,
val
:
"待出行"
val
:
'待出行'
},
},
{
{
code
:
"4"
,
code
:
'4'
,
val
:
"驳回"
val
:
'驳回'
},
},
{
{
code
:
"5"
,
code
:
'5'
,
val
:
"出行中"
val
:
'出行中'
},
},
{
{
code
:
"6"
,
code
:
'6'
,
val
:
"取消预订"
val
:
'取消预订'
},
},
{
{
code
:
"7"
,
code
:
'7'
,
val
:
"已完成"
val
:
'已完成'
}
}
],
],
activeId
:
''
,
bookTypeList
:
[
bookTypeList
:
[
{
{
id
:
"1"
,
id
:
'1'
,
name
:
"租车"
name
:
'租车'
},
},
{
{
id
:
"2"
,
id
:
'2'
,
name
:
"用户租赁"
name
:
'用户租赁'
},
},
{
{
id
:
"3"
,
id
:
'3'
,
name
:
"维修"
name
:
'维修'
},
},
{
{
id
:
"4"
,
id
:
'4'
,
name
:
"展览"
name
:
'展览'
},
},
{
{
id
:
"5"
,
id
:
'5'
,
name
:
"旅游"
name
:
'旅游'
},
},
{
{
id
:
"6"
,
id
:
'6'
,
name
:
"保养"
name
:
'保养'
},
},
{
{
id
:
"7"
,
id
:
'7'
,
name
:
"预约中"
name
:
'预约中'
},
},
{
{
id
:
"8"
,
id
:
'8'
,
name
:
"禁用"
name
:
'禁用'
},
},
{
{
id
:
"9"
,
id
:
'9'
,
name
:
"客户用车"
name
:
'客户用车'
},
},
{
{
id
:
"10"
,
id
:
'10'
,
name
:
"其他"
name
:
'其他'
}
}
],
],
detailId
:
""
,
detailId
:
''
,
illegalVisible
:
false
,
illegalVisible
:
false
,
price
:
undefined
,
//违章罚款金额
price
:
undefined
,
//违章罚款金额
fileList2
:
[],
//违章截图
fileList2
:
[],
//违章截图
...
@@ -892,7 +907,7 @@ export default {
...
@@ -892,7 +907,7 @@ export default {
},
},
allZoneArr
:
[],
//全部片区
allZoneArr
:
[],
//全部片区
allBranchCompany
:
[],
allBranchCompany
:
[],
state2
:
""
,
//搜索-分公司名称
state2
:
''
,
//搜索-分公司名称
rules4Query
:
{},
rules4Query
:
{},
list
:
null
,
list
:
null
,
total
:
null
,
total
:
null
,
...
@@ -910,7 +925,7 @@ export default {
...
@@ -910,7 +925,7 @@ export default {
},
},
inline
:
true
,
inline
:
true
,
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
dialogStatus
:
""
,
dialogStatus
:
''
,
bookRecord_btn_prove
:
false
,
bookRecord_btn_prove
:
false
,
bookRecord_btn_unbook
:
false
,
bookRecord_btn_unbook
:
false
,
bookRecord_btn_reject
:
false
,
bookRecord_btn_reject
:
false
,
...
@@ -919,10 +934,9 @@ export default {
...
@@ -919,10 +934,9 @@ export default {
dialogForm4LiftVisible
:
false
,
dialogForm4LiftVisible
:
false
,
dialogForm4RetVisible
:
false
,
dialogForm4RetVisible
:
false
,
allCompanies
:
{},
allCompanies
:
{},
allCompaniesArr
:
[],
tableKey
:
0
,
tableKey
:
0
,
form4Lift
:
{
form4Lift
:
{
state1
:
""
,
state1
:
''
,
id
:
undefined
,
id
:
undefined
,
mileageLift
:
undefined
,
mileageLift
:
undefined
,
liftCompany
:
undefined
,
liftCompany
:
undefined
,
...
@@ -932,40 +946,47 @@ export default {
...
@@ -932,40 +946,47 @@ export default {
liftCompany
:
[
liftCompany
:
[
{
{
required
:
true
,
required
:
true
,
message
:
"请选择提车分公司"
,
message
:
'请选择提车分公司'
,
trigger
:
"blur"
,
trigger
:
'blur'
,
type
:
"integer"
type
:
'integer'
}
}
],
],
mileageLift
:
[
mileageLift
:
[
{
{
required
:
true
,
required
:
true
,
message
:
"请输入当前里程数"
,
message
:
'请输入当前里程数'
,
trigger
:
"blur"
,
trigger
:
'blur'
,
type
:
"integer"
type
:
'integer'
},
},
{
{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
))
{
if
(
return
callback
();
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
)
)
{
return
callback
()
}
}
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
return
callback
(
new
Error
(
"里程数必须为整数"
));
return
callback
(
new
Error
(
'里程数必须为整数'
))
}
}
if
(
value
<
0
||
value
>
9999999999
)
{
if
(
value
<
0
||
value
>
9999999999
)
{
return
callback
(
new
Error
(
"里程数合法范围:[0 - 9999999999]"
));
return
callback
(
new
Error
(
'里程数合法范围:[0 - 9999999999]'
)
)
}
}
callback
();
callback
()
},
},
trigger
:
"blur"
trigger
:
'blur'
}
}
],
],
retRemark
:
[
retRemark
:
[
{
{
min
:
0
,
min
:
0
,
max
:
2000
,
max
:
2000
,
message
:
"长度小于 2000 个字符"
,
message
:
'长度小于 2000 个字符'
,
trigger
:
"blur"
trigger
:
'blur'
}
}
]
]
},
},
...
@@ -980,404 +1001,446 @@ export default {
...
@@ -980,404 +1001,446 @@ export default {
retCompany
:
[
retCompany
:
[
{
{
required
:
true
,
required
:
true
,
message
:
"请选择提车分公司"
,
message
:
'请选择提车分公司'
,
trigger
:
"blur"
,
trigger
:
'blur'
,
type
:
"integer"
type
:
'integer'
}
}
],
],
mileageRet
:
[
mileageRet
:
[
{
{
required
:
true
,
required
:
true
,
message
:
"请输入当前里程数"
,
message
:
'请输入当前里程数'
,
trigger
:
"blur"
,
trigger
:
'blur'
,
type
:
"integer"
type
:
'integer'
},
},
{
{
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
))
{
if
(
return
callback
();
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
)
)
{
return
callback
()
}
}
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
return
callback
(
new
Error
(
"里程数必须为整数"
));
return
callback
(
new
Error
(
'里程数必须为整数'
))
}
}
if
(
value
<
0
||
value
>
9999999999
)
{
if
(
value
<
0
||
value
>
9999999999
)
{
return
callback
(
new
Error
(
"里程数合法范围:[0 - 9999999999]"
));
return
callback
(
new
Error
(
'里程数合法范围:[0 - 9999999999]'
)
)
}
}
callback
();
callback
()
},
},
trigger
:
"blur"
trigger
:
'blur'
}
}
],
],
retRemark
:
[
retRemark
:
[
{
{
min
:
0
,
min
:
0
,
max
:
2000
,
max
:
2000
,
message
:
"长度小于 2000 个字符"
,
message
:
'长度小于 2000 个字符'
,
trigger
:
"blur"
trigger
:
'blur'
}
}
]
]
},
},
selectedAccItem
:
undefined
selectedAccItem
:
undefined
};
}
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
()
getAll
().
then
(
response
=>
{
getAll
().
then
(
response
=>
{
this
.
allCompaniesArr
=
response
.
data
;
this
.
allCompaniesArr
=
response
.
data
});
// response.data.map(function(item) {
// item.value = item.name
// this.allCompaniesArr.push(item)
// })
})
getAllCompany
(
codeAndBranchCompany
=>
{
getAllCompany
(
codeAndBranchCompany
=>
{
//初始化公司列表
//初始化公司列表
this
.
allCompanies
=
codeAndBranchCompany
;
this
.
allCompanies
=
codeAndBranchCompany
});
})
this
.
bookRecord_btn_prove
=
this
.
elements
[
"bookRecord:btn_prove"
];
this
.
bookRecord_btn_prove
=
this
.
elements
[
'bookRecord:btn_prove'
]
this
.
bookRecord_btn_reject
=
this
.
elements
[
"bookRecord:btn_reject"
];
this
.
bookRecord_btn_reject
=
this
.
elements
[
'bookRecord:btn_reject'
]
this
.
bookRecord_btn_unbook
=
this
.
elements
[
"bookRecord:btn_unbook"
];
this
.
bookRecord_btn_unbook
=
this
.
elements
[
'bookRecord:btn_unbook'
]
this
.
bookRecord_btn_lift
=
this
.
elements
[
"bookRecord:btn_lift"
];
this
.
bookRecord_btn_lift
=
this
.
elements
[
'bookRecord:btn_lift'
]
this
.
bookRecord_btn_ret
=
this
.
elements
[
"bookRecord:btn_ret"
];
this
.
bookRecord_btn_ret
=
this
.
elements
[
'bookRecord:btn_ret'
]
},
},
computed
:
{
computed
:
{
...
mapGetters
([
"elements"
,
"bookRecordStatus"
]),
...
mapGetters
([
'elements'
,
'bookRecordStatus'
]),
getHeaderWithToken
()
{
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()
};
return
{
Authorization
:
getToken
()
}
},
},
//获取大区列表
//获取大区列表
getAllZoneList
()
{
getAllZoneList
()
{
return
getAllZone
();
return
getAllZone
()
},
},
selectedMonth4Query
:
{
selectedMonth4Query
:
{
get
:
function
()
{
get
:
function
()
{
if
(
if
(
this
.
$utils
.
isString
(
this
.
listQuery
.
selectedMonth
)
&&
this
.
$utils
.
isString
(
this
.
listQuery
.
selectedMonth
)
&&
this
.
listQuery
.
selectedMonth
!==
""
this
.
listQuery
.
selectedMonth
!==
''
)
{
)
{
return
toEast8Date
(
this
.
listQuery
.
selectedMonth
);
return
toEast8Date
(
this
.
listQuery
.
selectedMonth
)
}
}
return
undefined
;
return
undefined
},
},
set
:
function
(
date
)
{
set
:
function
(
date
)
{
if
(
this
.
$utils
.
isDate
(
date
))
{
if
(
this
.
$utils
.
isDate
(
date
))
{
this
.
listQuery
.
selectedMonth
=
formatDate
(
date
,
"yyyy-MM"
);
this
.
listQuery
.
selectedMonth
=
formatDate
(
date
,
'yyyy-MM'
)
}
else
{
}
else
{
this
.
listQuery
.
selectedMonth
=
undefined
;
this
.
listQuery
.
selectedMonth
=
undefined
}
}
}
}
}
}
},
},
methods
:
{
methods
:
{
confirm
()
{
if
(
this
.
returnForm
.
retCompany
==
''
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
'还车地点不能为空'
,
type
:
'error'
,
duration
:
2000
})
}
else
{
this
.
returnForm
.
id
=
this
.
activeId
updateById
(
this
.
returnForm
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'修改还车地点成功'
,
type
:
'success'
,
duration
:
2000
})
this
.
resetReturn
=
false
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
data
.
message
,
type
:
'error'
,
duration
:
2000
})
}
})
}
},
/**
/**
* 确定
* 确定
* */
* */
okHandler
()
{
okHandler
()
{
let
arr
=
[];
let
arr
=
[]
this
.
fileList2
.
map
(
function
(
item
)
{
this
.
fileList2
.
map
(
function
(
item
)
{
arr
.
push
(
item
.
url
);
arr
.
push
(
item
.
url
)
});
})
let
params
=
{
let
params
=
{
illegalPic
:
arr
.
join
(
","
),
illegalPic
:
arr
.
join
(
','
),
illegalAmount
:
this
.
price
,
illegalAmount
:
this
.
price
,
id
:
this
.
detailId
id
:
this
.
detailId
};
}
saveOrderViolation
(
params
).
then
(
response
=>
{
saveOrderViolation
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"成功"
,
title
:
'成功'
,
message
:
"创建成功"
,
message
:
'创建成功'
,
type
:
"success"
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
this
.
illegalVisible
=
false
;
this
.
illegalVisible
=
false
this
.
getList
();
this
.
getList
()
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
"创建失败"
,
title
:
'创建失败'
,
message
:
"操作失败!"
,
message
:
'操作失败!'
,
type
:
"error"
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
}
});
})
},
},
/**
/**
* 上传成功
* 上传成功
* */
* */
handleSuccess
(
res
,
file
)
{
handleSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
let
c
=
{
url
:
res
.
data
}
this
.
fileList2
.
push
(
c
);
this
.
fileList2
.
push
(
c
)
this
.
showLoadingBody
=
false
;
this
.
showLoadingBody
=
false
},
},
/**
/**
* 删除违章图片
* 删除违章图片
* */
* */
handleRemove
(
file
,
fileList1
)
{
handleRemove
(
file
,
fileList1
)
{
this
.
fileList2
=
fileList1
;
this
.
fileList2
=
fileList1
},
},
/**
/**
* 出车上传成功
* 出车上传成功
* */
* */
handleDepartureSuccess
(
res
,
file
)
{
handleDepartureSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
let
c
=
{
url
:
res
.
data
}
this
.
departurePicList
.
push
(
c
);
this
.
departurePicList
.
push
(
c
)
this
.
showLoadingBody
=
false
;
this
.
showLoadingBody
=
false
},
},
/**
/**
* 删除出车图片
* 删除出车图片
* */
* */
handleDepartureRemove
(
file
,
fileList2
)
{
handleDepartureRemove
(
file
,
fileList2
)
{
this
.
departurePicList
=
fileList2
;
this
.
departurePicList
=
fileList2
},
},
/**
/**
* 上传成功
* 上传成功
* */
* */
handleArrivalSuccess
(
res
,
file
)
{
handleArrivalSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
let
c
=
{
url
:
res
.
data
}
this
.
arrivalPicList
.
push
(
c
);
this
.
arrivalPicList
.
push
(
c
)
this
.
showLoadingBody
=
false
;
this
.
showLoadingBody
=
false
},
},
/**
/**
* 删除违章图片
* 删除违章图片
* */
* */
handleArrivalRemove
(
file
,
fileList3
)
{
handleArrivalRemove
(
file
,
fileList3
)
{
this
.
arrivalPicList
=
fileList3
;
this
.
arrivalPicList
=
fileList3
},
},
/**
/**
* 操作-违章查询按钮,显示违章弹框
* 操作-违章查询按钮,显示违章弹框
*/
*/
illegalInquiry
(
row
)
{
illegalInquiry
(
row
)
{
var
t
=
this
;
var
t
=
this
this
.
fileList2
=
[];
this
.
fileList2
=
[]
this
.
price
=
""
;
this
.
price
=
''
if
(
row
.
vehicleDepartureLogVo
.
illegalPic
)
{
if
(
row
.
vehicleDepartureLogVo
.
illegalPic
)
{
let
arr
=
row
.
vehicleDepartureLogVo
.
illegalPic
.
split
(
","
);
let
arr
=
row
.
vehicleDepartureLogVo
.
illegalPic
.
split
(
','
)
let
fileList2
=
[];
let
fileList2
=
[]
let
p
=
{};
let
p
=
{}
arr
.
map
(
function
(
item
)
{
arr
.
map
(
function
(
item
)
{
p
=
{
p
=
{
url
:
item
url
:
item
};
}
fileList2
.
push
(
p
);
fileList2
.
push
(
p
)
});
})
t
.
fileList2
=
fileList2
;
t
.
fileList2
=
fileList2
}
}
if
(
row
.
vehicleDepartureLogVo
.
illegalAmount
)
{
if
(
row
.
vehicleDepartureLogVo
.
illegalAmount
)
{
t
.
price
=
parseFloat
(
row
.
vehicleDepartureLogVo
.
illegalAmount
);
t
.
price
=
parseFloat
(
row
.
vehicleDepartureLogVo
.
illegalAmount
)
}
}
this
.
detailId
=
row
.
vehicleDepartureLogVo
.
id
;
this
.
detailId
=
row
.
vehicleDepartureLogVo
.
id
this
.
illegalVisible
=
true
;
this
.
illegalVisible
=
true
},
},
/**
/**
* 弹框-取消
* 弹框-取消
* */
* */
cancel
()
{
cancel
()
{
this
.
illegalVisible
=
false
;
this
.
illegalVisible
=
false
},
},
handleDetail
(
row
)
{
handleDetail
(
row
)
{
var
t
=
this
;
this
.
activeId
=
row
.
id
this
.
detailItem
=
row
;
var
t
=
this
this
.
detailItem
=
row
if
(
row
.
vehicleDepartureLogVo
!=
undefined
)
{
if
(
row
.
vehicleDepartureLogVo
!=
undefined
)
{
if
(
if
(
row
.
vehicleDepartureLogVo
.
departurePic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
departurePic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
departurePic
!=
""
row
.
vehicleDepartureLogVo
.
departurePic
!=
''
)
{
)
{
let
arr
=
row
.
vehicleDepartureLogVo
.
departurePic
.
split
(
","
);
let
arr
=
row
.
vehicleDepartureLogVo
.
departurePic
.
split
(
','
)
let
departurePicList
=
[];
let
departurePicList
=
[]
let
p
=
{};
let
p
=
{}
arr
.
map
(
function
(
item
)
{
arr
.
map
(
function
(
item
)
{
departurePicList
.
push
(
item
);
departurePicList
.
push
(
item
)
});
})
t
.
departurePicList
=
departurePicList
;
t
.
departurePicList
=
departurePicList
}
else
{
}
else
{
t
.
departurePicList
=
[];
t
.
departurePicList
=
[]
}
}
if
(
if
(
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
undefined
&&
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
""
row
.
vehicleDepartureLogVo
.
arrivalPic
!=
''
)
{
)
{
let
Arr
=
row
.
vehicleDepartureLogVo
.
arrivalPic
.
split
(
","
);
let
Arr
=
row
.
vehicleDepartureLogVo
.
arrivalPic
.
split
(
','
)
let
arrivalPicList
=
[];
let
arrivalPicList
=
[]
let
p
=
{};
let
p
=
{}
Arr
.
map
(
function
(
item
)
{
Arr
.
map
(
function
(
item
)
{
arrivalPicList
.
push
(
item
);
arrivalPicList
.
push
(
item
)
});
})
t
.
arrivalPicList
=
arrivalPicList
;
t
.
arrivalPicList
=
arrivalPicList
}
else
{
}
else
{
t
.
arrivalPicList
=
[];
t
.
arrivalPicList
=
[]
}
}
}
else
{
}
else
{
t
.
departurePicList
=
[];
t
.
departurePicList
=
[]
t
.
arrivalPicList
=
[];
t
.
arrivalPicList
=
[]
}
}
this
.
dialogDetailVisible
=
true
;
this
.
dialogDetailVisible
=
true
},
},
//监听change事件
//监听change事件
getProvinceRegions
(
item
)
{
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zoneId
=
item
;
this
.
listQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
;
this
.
baranchQuery
.
zoneId
=
item
this
.
listQuery
.
liftCompany
=
undefined
;
this
.
listQuery
.
liftCompany
=
undefined
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
).
then
(
response
=>
{
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
).
then
(
response
=>
{
this
.
allBranchCompany
=
response
.
data
;
this
.
allBranchCompany
=
response
.
data
});
})
},
},
getAllBranchCompanyChange
(
item
)
{
getAllBranchCompanyChange
(
item
)
{
this
.
listQuery
.
liftCompany
=
item
;
this
.
listQuery
.
liftCompany
=
item
},
},
querySearch
(
queryString
,
cb
)
{
querySearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
let
selectArry
=
[]
let
iitem
=
{
let
iitem
=
{
value
:
"全部"
,
value
:
'全部'
,
name
:
"全部"
name
:
'全部'
};
}
selectArry
.
push
(
iitem
);
selectArry
.
push
(
iitem
)
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
item
.
value
=
item
.
name
selectArry
.
push
(
item
);
selectArry
.
push
(
item
)
});
})
this
.
selectArry
=
selectArry
;
this
.
selectArry
=
selectArry
var
results
=
queryString
var
results
=
queryString
?
selectArry
.
filter
(
this
.
createFilter
(
queryString
))
?
selectArry
.
filter
(
this
.
createFilter
(
queryString
))
:
selectArry
;
:
selectArry
// 调用 callback 返回建议列表的数据
// 调用 callback 返回建议列表的数据
cb
(
results
);
cb
(
results
)
},
},
createFilter
(
queryString
)
{
createFilter
(
queryString
)
{
return
restaurant
=>
{
return
restaurant
=>
{
return
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
;
return
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
};
}
},
},
/**
/**
* 分公司搜索
* 分公司搜索
* */
* */
handleSelect2
(
item
)
{
handleSelect2
(
item
)
{
this
.
listQuery
.
subordinateBranch
=
item
.
id
;
this
.
listQuery
.
subordinateBranch
=
item
.
id
console
.
log
(
item
);
console
.
log
(
item
)
},
},
/**
/**
* 提车分公司
* 提车分公司
* */
* */
handleSelect1
(
item
)
{
handleSelect1
(
item
)
{
this
.
form4Lift
.
liftCompany
=
item
.
id
;
this
.
form4Lift
.
liftCompany
=
item
.
id
console
.
log
(
item
);
console
.
log
(
item
)
},
},
cancelDialog4Lift
(
formName
)
{
cancelDialog4Lift
(
formName
)
{
this
.
dialogForm4LiftVisible
=
false
;
this
.
dialogForm4LiftVisible
=
false
this
.
$refs
[
formName
].
resetFields
();
this
.
$refs
[
formName
].
resetFields
()
},
},
cancelDialog4Ret
(
formName
)
{
cancelDialog4Ret
(
formName
)
{
this
.
dialogForm4RetVisible
=
false
;
this
.
dialogForm4RetVisible
=
false
this
.
$refs
[
formName
].
resetFields
();
this
.
$refs
[
formName
].
resetFields
()
},
},
/**
/**
* 出车弹框-确定
* 出车弹框-确定
* */
* */
liftOk
(
formName
)
{
liftOk
(
formName
)
{
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
Number
(
this
.
departureForm
.
mileage
)
>
999999
)
{
if
(
Number
(
this
.
departureForm
.
mileage
)
>
999999
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"警告"
,
title
:
'警告'
,
message
:
"公里数不能大于999999"
,
message
:
'公里数不能大于999999'
,
type
:
"warning"
,
type
:
'warning'
,
duration
:
2000
duration
:
2000
});
})
return
false
;
return
false
}
}
var
arr
=
[];
var
arr
=
[]
this
.
departurePicList
.
map
(
function
(
item
)
{
this
.
departurePicList
.
map
(
function
(
item
)
{
arr
.
push
(
item
.
url
);
arr
.
push
(
item
.
url
)
});
})
this
.
departureForm
.
departurePic
=
arr
.
join
(
","
);
this
.
departureForm
.
departurePic
=
arr
.
join
(
','
)
departureVehicle
(
this
.
departureForm
).
then
(
response
=>
{
departureVehicle
(
this
.
departureForm
).
then
(
response
=>
{
if
(
response
.
status
==
200
)
{
if
(
response
.
status
==
200
)
{
this
.
dialogForm4LiftVisible
=
false
;
this
.
dialogForm4LiftVisible
=
false
this
.
$notify
({
this
.
$notify
({
title
:
"成功"
,
title
:
'成功'
,
message
:
"出车成功"
,
message
:
'出车成功'
,
type
:
"success"
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
this
.
cleanDepartureForm
();
this
.
cleanDepartureForm
()
this
.
getList
();
this
.
getList
()
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
"失败"
,
title
:
'失败'
,
message
:
response
.
message
,
message
:
response
.
message
,
type
:
"error"
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
}
});
})
}
else
{
}
else
{
return
false
;
return
false
}
}
});
})
},
},
handleBookInfo
(
row
)
{
handleBookInfo
(
row
)
{
this
.
$refs
.
bookInfoViewer
.
handleBookInfo
(
row
.
vehicle
);
this
.
$refs
.
bookInfoViewer
.
handleBookInfo
(
row
.
vehicle
)
},
},
handleAccItemInfo
(
row
)
{
handleAccItemInfo
(
row
)
{
this
.
selectedAccItem
=
row
.
accItemAndAmount
;
this
.
selectedAccItem
=
row
.
accItemAndAmount
this
.
$refs
.
accItemSelector
.
show
();
this
.
$refs
.
accItemSelector
.
show
()
},
},
checkIfBooked
(
bookedDate
,
[
startDateStr
,
endDateStr
])
{
checkIfBooked
(
bookedDate
,
[
startDateStr
,
endDateStr
])
{
if
(
if
(
this
.
$utils
.
isInteger
(
bookedDate
)
&&
this
.
$utils
.
isInteger
(
bookedDate
)
&&
this
.
$utils
.
isString
(
startDateStr
)
&&
this
.
$utils
.
isString
(
startDateStr
)
&&
startDateStr
!==
""
&&
startDateStr
!==
''
&&
this
.
$utils
.
isString
(
endDateStr
)
&&
this
.
$utils
.
isString
(
endDateStr
)
&&
endDateStr
!==
""
endDateStr
!==
''
)
{
)
{
let
startDate
=
toEast8Date
(
startDateStr
);
let
startDate
=
toEast8Date
(
startDateStr
)
let
endDate
=
toEast8Date
(
endDateStr
);
let
endDate
=
toEast8Date
(
endDateStr
)
for
(
for
(
;
;
this
.
$utils
.
toDateString
(
startDate
,
"yyyy-MM-dd"
)
<=
this
.
$utils
.
toDateString
(
startDate
,
'yyyy-MM-dd'
)
<=
this
.
$utils
.
toDateString
(
endDate
,
"yyyy-MM-dd"
);
this
.
$utils
.
toDateString
(
endDate
,
'yyyy-MM-dd'
);
startDate
.
setDate
(
startDate
.
getDate
()
+
1
)
startDate
.
setDate
(
startDate
.
getDate
()
+
1
)
)
{
)
{
if
((
bookedDate
&
(
1
<<
(
startDate
.
getDate
()
-
1
)))
!==
0
)
{
if
((
bookedDate
&
(
1
<<
(
startDate
.
getDate
()
-
1
)))
!==
0
)
{
return
true
;
return
true
}
}
}
}
}
}
return
false
;
return
false
},
},
checkIfApply
(
code
)
{
checkIfApply
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_APPLY
;
return
code
===
BOOK_RECORD_STATUS_APPLY
},
},
checkIfProved
(
code
)
{
checkIfProved
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_PROVED
;
return
code
===
BOOK_RECORD_STATUS_PROVED
},
},
checkIfLift
(
code
)
{
checkIfLift
(
code
)
{
return
code
===
BOOK_RECORD_STATUS_LIFT
;
return
code
===
BOOK_RECORD_STATUS_LIFT
},
},
getList
()
{
getList
()
{
this
.
listLoading
=
true
;
this
.
listLoading
=
true
for
(
var
key
in
this
.
listQuery
)
{
for
(
var
key
in
this
.
listQuery
)
{
if
(
this
.
listQuery
[
key
]
===
""
)
{
if
(
this
.
listQuery
[
key
]
===
''
)
{
this
.
listQuery
[
key
]
=
undefined
;
this
.
listQuery
[
key
]
=
undefined
}
}
}
}
page
(
this
.
listQuery
).
then
(
response
=>
{
page
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
;
this
.
list
=
response
.
data
.
data
this
.
total
=
response
.
data
.
totalCount
;
this
.
total
=
response
.
data
.
totalCount
this
.
listLoading
=
false
;
this
.
listLoading
=
false
});
})
},
},
getBookRecordStatus
:
function
(
data
)
{
getBookRecordStatus
:
function
(
data
)
{
this
.
bookRecordStatus
[
"3"
].
val
=
"待出行"
;
this
.
bookRecordStatus
[
'3'
].
val
=
'待出行'
this
.
bookRecordStatus
[
"4"
].
val
=
"驳回"
;
this
.
bookRecordStatus
[
'4'
].
val
=
'驳回'
this
.
bookRecordStatus
[
"5"
].
val
=
"出行中"
;
this
.
bookRecordStatus
[
'5'
].
val
=
'出行中'
this
.
bookRecordStatus
[
"7"
].
val
=
"已完成"
;
this
.
bookRecordStatus
[
'7'
].
val
=
'已完成'
if
(
data
)
{
if
(
data
)
{
if
(
!
this
.
$utils
.
isInteger
(
data
.
status
))
{
if
(
!
this
.
$utils
.
isInteger
(
data
.
status
))
{
return
"未知"
;
return
'未知'
}
}
if
(
if
(
data
.
status
==
2
&&
data
.
status
==
2
&&
(
data
.
vehicleDepartureLogVo
==
undefined
||
(
data
.
vehicleDepartureLogVo
==
undefined
||
data
.
vehicleDepartureLogVo
==
null
)
data
.
vehicleDepartureLogVo
==
null
)
)
{
)
{
return
this
.
bookRecordStatus
[
"3"
].
val
;
return
this
.
bookRecordStatus
[
'3'
].
val
}
}
if
(
if
(
data
.
status
==
2
&&
data
.
status
==
2
&&
...
@@ -1385,7 +1448,7 @@ export default {
...
@@ -1385,7 +1448,7 @@ export default {
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
.
state
==
0
data
.
vehicleDepartureLogVo
.
state
==
0
)
{
)
{
return
this
.
bookRecordStatus
[
"5"
].
val
;
return
this
.
bookRecordStatus
[
'5'
].
val
}
}
if
(
if
(
data
.
status
==
2
&&
data
.
status
==
2
&&
...
@@ -1393,31 +1456,31 @@ export default {
...
@@ -1393,31 +1456,31 @@ export default {
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
!=
null
&&
data
.
vehicleDepartureLogVo
.
state
==
1
data
.
vehicleDepartureLogVo
.
state
==
1
)
{
)
{
return
this
.
bookRecordStatus
[
"7"
].
val
;
return
this
.
bookRecordStatus
[
'7'
].
val
}
}
return
this
.
bookRecordStatus
[
data
.
status
+
""
].
val
;
return
this
.
bookRecordStatus
[
data
.
status
+
''
].
val
}
}
return
""
;
return
''
},
},
getAllBookRecordStatus
:
function
()
{
getAllBookRecordStatus
:
function
()
{
console
.
log
(
this
.
bookRecordStatus
);
console
.
log
(
this
.
bookRecordStatus
)
return
this
.
bookRecordStatus
;
return
this
.
bookRecordStatus
},
},
getDatePeriodStr
([
startDate
,
endDate
])
{
getDatePeriodStr
([
startDate
,
endDate
])
{
if
(
if
(
this
.
$utils
.
isString
(
startDate
)
&&
this
.
$utils
.
isString
(
startDate
)
&&
startDate
!==
""
&&
startDate
!==
''
&&
this
.
$utils
.
isString
(
endDate
)
&&
this
.
$utils
.
isString
(
endDate
)
&&
endDate
!==
""
endDate
!==
''
)
{
)
{
return
(
return
(
formatDate
(
toEast8Date
(
startDate
),
"yyyy-MM-dd"
)
+
formatDate
(
toEast8Date
(
startDate
),
'yyyy-MM-dd'
)
+
" 至 "
+
' 至 '
+
formatDate
(
toEast8Date
(
endDate
),
"yyyy-MM-dd"
)
formatDate
(
toEast8Date
(
endDate
),
'yyyy-MM-dd'
)
);
)
}
}
return
"未知"
;
return
'未知'
},
},
/**
/**
* 清空出车弹框数据
* 清空出车弹框数据
...
@@ -1426,7 +1489,7 @@ export default {
...
@@ -1426,7 +1489,7 @@ export default {
this
.
departureForm
=
{
this
.
departureForm
=
{
vehicleId
:
null
,
vehicleId
:
null
,
departureBranchCompanyId
:
null
,
//出发地分公司id
departureBranchCompanyId
:
null
,
//出发地分公司id
departureBranchCompanyName
:
""
,
//出发地分公司名称
departureBranchCompanyName
:
''
,
//出发地分公司名称
use
:
null
,
use
:
null
,
user
:
null
,
user
:
null
,
userTel
:
null
,
userTel
:
null
,
...
@@ -1435,12 +1498,12 @@ export default {
...
@@ -1435,12 +1498,12 @@ export default {
mileage
:
null
,
mileage
:
null
,
numberPlate
:
null
,
numberPlate
:
null
,
expectArrivalBranchCompanyId
:
null
,
//目的地分公司id
expectArrivalBranchCompanyId
:
null
,
//目的地分公司id
expectArrivalBranchCompanyName
:
""
,
//目的地分公司名称
expectArrivalBranchCompanyName
:
''
,
//目的地分公司名称
bookRecordId
:
null
,
bookRecordId
:
null
,
departurePic
:
""
,
departurePic
:
''
,
remark
:
null
,
remark
:
null
,
bookStartDate
:
null
bookStartDate
:
null
};
}
},
},
cleanArrivalForm
()
{
cleanArrivalForm
()
{
this
.
arrivalForm
=
{
this
.
arrivalForm
=
{
...
@@ -1451,149 +1514,157 @@ export default {
...
@@ -1451,149 +1514,157 @@ export default {
recycleManTel
:
null
,
recycleManTel
:
null
,
mileage
:
null
,
mileage
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyId
:
null
,
arrivalBranchCompanyName
:
""
,
arrivalBranchCompanyName
:
''
,
arrivalPic
:
""
,
arrivalPic
:
''
,
remark
:
""
,
remark
:
''
,
bookRecordId
:
null
bookRecordId
:
null
};
}
},
},
/**
/**
* 搜索按钮
* 搜索按钮
* */
* */
handleFilter
()
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
;
this
.
listQuery
.
page
=
1
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
getList
();
this
.
getList
()
}
else
{
}
else
{
return
false
;
return
false
}
}
});
})
},
},
handleSizeChange
(
val
)
{
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
listQuery
.
limit
=
val
this
.
getList
();
this
.
getList
()
},
},
handleCurrentChange
(
val
)
{
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
listQuery
.
page
=
val
this
.
getList
();
this
.
getList
()
},
},
handleProve
(
row
)
{
handleProve
(
row
)
{
this
.
$confirm
(
"确定批准申请?"
,
"提示"
,
{
this
.
$confirm
(
'确定批准申请?'
,
'提示'
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
'取消'
,
type
:
"warning"
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
prove
(
row
.
id
).
then
(
response
=>
{
prove
(
row
.
id
).
then
(
response
=>
{
if
(
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
)
{
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"失败"
,
title
:
'失败'
,
message
:
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
],
rsCode
.
msg
[
type
:
"error"
,
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
],
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
else
if
(
}
else
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
)
{
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"失败"
,
title
:
'失败'
,
message
:
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
],
rsCode
.
msg
[
type
:
"error"
,
rsCode
.
code
.
VEHICLE_BOOKED_RECORD_ALREADY_CHANGED
],
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
else
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
}
else
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"成功"
,
title
:
'成功'
,
message
:
"操作成功"
,
message
:
'操作成功'
,
type
:
"success"
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
if
(
this
.
dialogDetailVisible
)
{
if
(
this
.
dialogDetailVisible
)
{
this
.
dialogDetailVisible
=
false
;
this
.
dialogDetailVisible
=
false
}
}
}
}
this
.
getList
();
this
.
getList
()
});
})
});
})
},
},
rejectBtn
(
formName
)
{
rejectBtn
(
formName
)
{
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
reject
(
this
.
rejectFrom
).
then
(
response
=>
{
reject
(
this
.
rejectFrom
).
then
(
response
=>
{
if
(
response
.
code
==
1
)
{
if
(
response
.
code
==
1
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"成功"
,
title
:
'成功'
,
message
:
"操作成功"
,
message
:
'操作成功'
,
type
:
"success"
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
this
.
getList
();
this
.
getList
()
if
(
this
.
rejectVisible
)
{
if
(
this
.
rejectVisible
)
{
this
.
rejectVisible
=
false
;
this
.
rejectVisible
=
false
}
}
if
(
this
.
dialogDetailVisible
)
{
if
(
this
.
dialogDetailVisible
)
{
this
.
dialogDetailVisible
=
false
;
this
.
dialogDetailVisible
=
false
}
}
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
"失败"
,
title
:
'失败'
,
message
:
response
.
message
,
message
:
response
.
message
,
type
:
"error"
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
}
});
})
}
else
{
}
else
{
return
false
;
return
false
}
}
});
})
},
},
handleReject
(
row
)
{
handleReject
(
row
)
{
this
.
rejectVisible
=
true
;
this
.
rejectVisible
=
true
this
.
rejectFrom
.
vehicleBookRecordId
=
row
.
id
;
this
.
rejectFrom
.
vehicleBookRecordId
=
row
.
id
this
.
rejectFrom
.
rejectRemark
=
""
;
this
.
rejectFrom
.
rejectRemark
=
''
},
},
/**
/**
* 操作-出车
* 操作-出车
* @param row
* @param row
*/
*/
handleLift
(
row
)
{
handleLift
(
row
)
{
this
.
cleanDepartureForm
();
this
.
cleanDepartureForm
()
this
.
departurePicList
=
[];
this
.
departurePicList
=
[]
if
(
row
.
bookType
==
1
)
{
if
(
row
.
bookType
==
1
)
{
this
.
departureForm
.
use
=
"租车"
;
this
.
departureForm
.
use
=
'租车'
}
else
if
(
row
.
bookType
==
2
)
{
}
else
if
(
row
.
bookType
==
2
)
{
this
.
departureForm
.
use
=
"用户租赁"
;
this
.
departureForm
.
use
=
'用户租赁'
}
else
if
(
row
.
bookType
==
3
)
{
}
else
if
(
row
.
bookType
==
3
)
{
this
.
departureForm
.
use
=
"维修"
;
this
.
departureForm
.
use
=
'维修'
}
else
if
(
row
.
bookType
==
4
)
{
}
else
if
(
row
.
bookType
==
4
)
{
this
.
departureForm
.
use
=
"展览"
;
this
.
departureForm
.
use
=
'展览'
}
else
if
(
row
.
bookType
==
5
)
{
}
else
if
(
row
.
bookType
==
5
)
{
this
.
departureForm
.
use
=
"旅游"
;
this
.
departureForm
.
use
=
'旅游'
}
else
if
(
row
.
bookType
==
6
)
{
}
else
if
(
row
.
bookType
==
6
)
{
this
.
departureForm
.
use
=
"保养"
;
this
.
departureForm
.
use
=
'保养'
}
else
if
(
row
.
bookType
==
7
)
{
}
else
if
(
row
.
bookType
==
7
)
{
this
.
departureForm
.
use
=
"预约中"
;
this
.
departureForm
.
use
=
'预约中'
}
else
if
(
row
.
bookType
==
8
)
{
}
else
if
(
row
.
bookType
==
8
)
{
this
.
departureForm
.
use
=
"禁用"
;
this
.
departureForm
.
use
=
'禁用'
}
else
if
(
row
.
bookType
==
9
)
{
}
else
if
(
row
.
bookType
==
9
)
{
this
.
departureForm
.
use
=
"客户用车"
;
this
.
departureForm
.
use
=
'客户用车'
}
else
if
(
row
.
bookType
==
10
)
{
}
else
if
(
row
.
bookType
==
10
)
{
this
.
departureForm
.
use
=
"其他"
;
this
.
departureForm
.
use
=
'其他'
}
}
this
.
departureForm
.
bookRecordId
=
row
.
id
;
this
.
departureForm
.
bookRecordId
=
row
.
id
this
.
departureForm
.
vehicleId
=
row
.
vehicleId
;
this
.
departureForm
.
vehicleId
=
row
.
vehicleId
this
.
departureForm
.
numberPlate
=
row
.
numberPlate
;
this
.
departureForm
.
numberPlate
=
row
.
numberPlate
this
.
departureForm
.
departureDate
=
Date
();
this
.
departureForm
.
departureDate
=
Date
()
this
.
departureForm
.
departureBranchCompanyId
=
row
.
liftCompany
;
this
.
departureForm
.
departureBranchCompanyId
=
row
.
liftCompany
this
.
departureForm
.
departureBranchCompanyName
=
row
.
liftCompanyName
;
this
.
departureForm
.
departureBranchCompanyName
=
row
.
liftCompanyName
this
.
departureForm
.
user
=
row
.
vehicleUsername
;
this
.
departureForm
.
user
=
row
.
vehicleUsername
this
.
departureForm
.
userTel
=
row
.
vehicleUserPhone
;
this
.
departureForm
.
userTel
=
row
.
vehicleUserPhone
// if(row.vehicleDepartureLogVo!=undefined){
// if(row.vehicleDepartureLogVo!=undefined){
// this.departureForm.user = row.vehicleDepartureLogVo.user?row.vehicleDepartureLogVo.user:''
// this.departureForm.user = row.vehicleDepartureLogVo.user?row.vehicleDepartureLogVo.user:''
// this.departureForm.userTel = row.vehicleDepartureLogVo.userTel?row.vehicleDepartureLogVo.userTel:''
// this.departureForm.userTel = row.vehicleDepartureLogVo.userTel?row.vehicleDepartureLogVo.userTel:''
...
@@ -1601,103 +1672,104 @@ export default {
...
@@ -1601,103 +1672,104 @@ export default {
// this.departureForm.user = ''
// this.departureForm.user = ''
// this.departureForm.userTel = ''
// this.departureForm.userTel = ''
// }
// }
this
.
departureForm
.
expectArrivalBranchCompanyId
=
row
.
retCompany
;
this
.
departureForm
.
expectArrivalBranchCompanyId
=
row
.
retCompany
this
.
departureForm
.
expectArrivalBranchCompanyName
=
row
.
retCompanyName
;
this
.
departureForm
.
expectArrivalBranchCompanyName
=
this
.
dialogForm4LiftVisible
=
true
;
row
.
retCompanyName
this
.
dialogForm4LiftVisible
=
true
},
},
/**
/**
* 操作-收车
* 操作-收车
* @param row
* @param row
*/
*/
handleRet
(
row
)
{
handleRet
(
row
)
{
this
.
arrivalPicList
=
[];
this
.
arrivalPicList
=
[]
this
.
arrivalForm
.
bookRecordId
=
row
.
id
;
this
.
arrivalForm
.
bookRecordId
=
row
.
id
this
.
arrivalForm
.
vehicleId
=
row
.
vehicleId
;
this
.
arrivalForm
.
vehicleId
=
row
.
vehicleId
this
.
arrivalForm
.
numberPlate
=
row
.
numberPlate
;
this
.
arrivalForm
.
numberPlate
=
row
.
numberPlate
this
.
arrivalForm
.
arrivalDate
=
Date
();
this
.
arrivalForm
.
arrivalDate
=
Date
()
this
.
arrivalForm
.
arrivalBranchCompanyId
=
row
.
retCompany
;
this
.
arrivalForm
.
arrivalBranchCompanyId
=
row
.
retCompany
this
.
arrivalForm
.
arrivalBranchCompanyName
=
row
.
retCompanyName
;
this
.
arrivalForm
.
arrivalBranchCompanyName
=
row
.
retCompanyName
this
.
dialogForm4RetVisible
=
true
;
this
.
dialogForm4RetVisible
=
true
},
},
ret
(
formName
)
{
ret
(
formName
)
{
const
set
=
this
.
$refs
;
const
set
=
this
.
$refs
set
[
formName
].
validate
(
valid
=>
{
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
Number
(
this
.
arrivalForm
.
mileage
)
>
999999
)
{
if
(
Number
(
this
.
arrivalForm
.
mileage
)
>
999999
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"警告"
,
title
:
'警告'
,
message
:
"公里数不能大于999999"
,
message
:
'公里数不能大于999999'
,
type
:
"warning"
,
type
:
'warning'
,
duration
:
2000
duration
:
2000
});
})
return
false
;
return
false
}
}
var
arr
=
[];
var
arr
=
[]
this
.
arrivalPicList
.
map
(
function
(
item
)
{
this
.
arrivalPicList
.
map
(
function
(
item
)
{
arr
.
push
(
item
.
url
);
arr
.
push
(
item
.
url
)
});
})
this
.
arrivalForm
.
arrivalPic
=
arr
.
join
(
","
);
this
.
arrivalForm
.
arrivalPic
=
arr
.
join
(
','
)
arrivalVehicle
(
this
.
arrivalForm
).
then
(
response
=>
{
arrivalVehicle
(
this
.
arrivalForm
).
then
(
response
=>
{
if
(
response
.
status
==
200
)
{
if
(
response
.
status
==
200
)
{
this
.
dialogForm4RetVisible
=
false
;
this
.
dialogForm4RetVisible
=
false
this
.
$notify
({
this
.
$notify
({
title
:
"成功"
,
title
:
'成功'
,
message
:
"收车成功"
,
message
:
'收车成功'
,
type
:
"success"
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
this
.
cleanArrivalForm
();
this
.
cleanArrivalForm
()
this
.
getList
();
this
.
getList
()
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
"失败"
,
title
:
'失败'
,
message
:
response
.
message
,
message
:
response
.
message
,
type
:
"error"
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
}
});
})
}
else
{
}
else
{
return
false
;
return
false
}
}
});
})
},
},
handleUnbook
(
row
)
{
handleUnbook
(
row
)
{
this
.
$confirm
(
"确定取消预定?"
,
"提示"
,
{
this
.
$confirm
(
'确定取消预定?'
,
'提示'
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
'取消'
,
type
:
"warning"
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
var
obj
=
{
var
obj
=
{
vehicleBookRecordId
:
row
.
id
vehicleBookRecordId
:
row
.
id
};
}
unbook
(
obj
)
unbook
(
obj
)
.
then
(
response
=>
{
.
then
(
response
=>
{
if
(
response
.
code
==
1
)
{
if
(
response
.
code
==
1
)
{
this
.
$notify
({
this
.
$notify
({
title
:
"成功"
,
title
:
'成功'
,
message
:
"操作成功"
,
message
:
'操作成功'
,
type
:
"success"
,
type
:
'success'
,
duration
:
2000
duration
:
2000
});
})
this
.
getList
();
this
.
getList
()
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
title
:
"失败"
,
title
:
'失败'
,
message
:
response
.
message
,
message
:
response
.
message
,
type
:
"error"
,
type
:
'error'
,
duration
:
2000
duration
:
2000
});
})
}
}
})
})
.
catch
(
response
=>
{
.
catch
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
response
)
});
})
});
})
}
}
}
}
}
;
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
@@ -1720,4 +1792,14 @@ export default {
...
@@ -1720,4 +1792,14 @@ export default {
width
:
150px
;
width
:
150px
;
text-align
:
center
;
text-align
:
center
;
}
}
.modal_modal
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
opacity
:
0.5
;
background
:
#000
;
z-index
:
2001
;
}
</
style
>
</
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