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
0214e701
Commit
0214e701
authored
Sep 12, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform-ui
into base-modify
parents
46f496f7
8f1ec310
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2161 additions
and
1525 deletions
+2161
-1525
pushManagement.js
src/api/appManagement/pushManagement.js
+73
-0
index.js
src/api/vehicle/vehicleInfo/index.js
+9
-0
index.js
src/router/index.js
+8
-2
index.vue
src/views/appManagement/pushManagement/index.vue
+469
-0
index.vue
src/views/vehicle/bookRecord/index.vue
+5
-3
index.vue
src/views/vehicle/vehicleDepartureLog/index.vue
+8
-3
index.vue
src/views/vehicle/vehicleInfo/index.vue
+1580
-1517
index.vue
src/views/vehicle/vehicleSchedulManage/index.vue
+7
-0
vehicleRecords.vue
src/views/vehicle/vehicleSchedulManage/vehicleRecords.vue
+1
-0
index.vue
src/views/vehicle/vehicleUpkeepLog/index.vue
+1
-0
No files found.
src/api/appManagement/pushManagement.js
0 → 100644
View file @
0214e701
import
fetch
from
'utils/fetch'
;
/**
* 获取列表
* @param query
*/
export
function
getPushList
(
query
)
{
return
fetch
({
url
:
'/api/universal/jpush/list'
,
method
:
'Get'
,
params
:
query
});
}
/**
* 获取弹窗管理列表某一条数据
* @param query
*/
export
function
getObj
(
id
)
{
return
fetch
({
url
:
'/api/universal/jpush/getOne/'
+
id
,
method
:
'Get'
})
}
/**
* 弹窗管理--添加
* @param query
*/
export
function
addObj
(
obj
)
{
return
fetch
({
url
:
'/api/universal/jpush/addMessagePush'
,
method
:
'post'
,
data
:
obj
});
}
/**
* 编辑某一条数据,上下架
* @param query
*/
export
function
editObj
(
data
)
{
return
fetch
({
url
:
'/api/universal/jpush/udpMessagePush'
,
method
:
'post'
,
data
:
data
})
}
/**
* 删除数据
* @param query
*/
export
function
delObj
(
id
)
{
return
fetch
({
url
:
'/api/universal/jpush/del/'
+
id
,
method
:
'delete'
,
})
}
/**
* 立即推送
* @param query
*/
export
function
pushStype
(
query
)
{
return
fetch
({
url
:
'/api/universal/jpush/stype'
,
method
:
'Get'
,
params
:
query
});
}
src/api/vehicle/vehicleInfo/index.js
View file @
0214e701
...
...
@@ -63,6 +63,7 @@ export function getBookedInfo(vehicleId, yearMonth) {
method
:
'get'
});
}
/*
* 根据id获取片区下省份
* */
...
...
@@ -89,3 +90,11 @@ export function editObj(param) {
data
:
param
});
}
//检查车辆编码是否存在
export
function
checkCode
(
code
,
id
)
{
return
fetch
({
url
:
'/vehicle/vehicleInfo/exist_code/'
+
code
+
'?id='
+
id
,
method
:
'get'
});
}
src/router/index.js
View file @
0214e701
...
...
@@ -334,7 +334,7 @@ export const asyncRouterMap = [{
{
path
:
'bookRecord'
,
component
:
_import
(
'vehicle/bookRecord/index'
),
name
:
'车辆
申请
管理'
,
name
:
'车辆
排班
管理'
,
authority
:
'bookRecord'
},
{
...
...
@@ -364,7 +364,7 @@ export const asyncRouterMap = [{
{
path
:
'vehicleSchedulManage'
,
component
:
_import
(
'vehicle/vehicleSchedulManage/index'
),
name
:
'车辆排班
管理
'
,
name
:
'车辆排班
表
'
,
authority
:
'vehicleSchedulManage'
},
{
...
...
@@ -519,6 +519,12 @@ export const asyncRouterMap = [{
component
:
_import
(
'appManagement/selectedActivities/index'
),
name
:
'首页精选活动'
,
authority
:
'selectedActivities'
},
{
path
:
'pushManagement'
,
component
:
_import
(
'appManagement/pushManagement/index'
),
name
:
'消息推送'
,
authority
:
'pushManagement'
}
]
},
...
...
src/views/appManagement/pushManagement/index.vue
0 → 100644
View file @
0214e701
<
template
>
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div
class=
"filter-container"
ref=
"filter-container"
>
<el-form
ref=
"queryForm"
:inline=
"inline"
:model=
"listQuery"
label-width=
"60px"
>
<el-row>
<el-col
:span=
"4"
>
<el-form-item
label=
"标题"
>
<el-input
v-model
.
number=
"listQuery.title"
placeholder=
"请输入标题"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"4"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.type"
placeholder=
"请选择推送方式"
@
change=
"handleTypeChange"
>
<el-option
:key=
"null"
label=
"全部"
:value=
"null"
></el-option>
<el-option
:key=
"1"
label=
"手动推送"
:value=
"1"
></el-option>
<el-option
:key=
"2"
label=
"系统自动推送"
:value=
"2"
></el-option>
</el-select>
</el-col>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
style=
"float: right;"
@
click=
"handleCreate"
>
+ 添加通知
</el-button>
</el-row>
</el-form>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
type=
"index"
align=
"center"
label=
"序号"
width=
"98"
>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"标题"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
row
.
title
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"描述"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
alerts
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"推送方式"
>
<
template
scope=
"scope"
>
<span
v-if=
"scope.row.type==1"
>
手动推送
</span>
<span
v-if=
"scope.row.type==2"
>
系统自动推送
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"250"
align=
"center"
label=
"创建时间"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
crtTimeStr
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
width=
"150"
label=
"操作"
fixed=
"right"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleDown(scope.row)"
v-show=
"scope.row.type==1"
>
立即推送
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
size=
"small"
@
click=
"deleteHandler(scope.row)"
style=
"color:red;"
>
删除
</el-button>
</
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>
</div>
<!-- banner modal弹窗 -->
<el-dialog
:title=
"modalTitle"
:visible
.
sync=
"bannerDialogVisible"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<el-form-item
label=
"推送方式"
>
<el-radio-group
v-model=
"form.type"
size=
"medium"
>
<el-radio-button
label=
"1"
>
手工推送
</el-radio-button>
<el-radio-button
label=
"2"
>
系统自动推送
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"标题"
prop=
"name"
>
<el-input
v-model=
"form.title"
placeholder=
"请输入标题"
></el-input>
</el-form-item>
<el-form-item
label=
"描述"
prop=
"name"
>
<el-input
v-model=
"form.alert"
placeholder=
"请输入描述"
></el-input>
</el-form-item>
<el-form-item
label=
"样式"
>
<el-radio-group
v-model=
"form.style"
size=
"medium"
@
change=
"handleRadio"
>
<el-radio-button
label=
"1"
>
标准样式
</el-radio-button>
<el-radio-button
label=
"3"
>
大图
</el-radio-button>
<el-radio-button
label=
"2"
>
自定义样式
</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"图片"
prop=
"picture"
v-if=
"showPic"
:style=
"{display:'block'}"
>
<el-upload
class=
"avatar-uploader"
:action=
"BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:show-file-list=
"false"
:headers=
"getHeaderWithToken"
:on-success=
"handleAvatarSuccess"
>
<img
v-if=
"$utils.isString(form.bigPicPath) && !$utils.isEmpty(form.bigPicPath)"
:src=
"form.bigPicPath"
style=
"width:200px;max-height:200px;"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
style=
"lineHeight:100px;width:100px;height: 100px;vertical-align: middle;"
></i>
</el-upload>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelHandel"
>
取 消
</el-button>
<el-button
v-if=
"modalTitle=='创建'"
type=
"primary"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
v-else
type=
"primary"
@
click=
"update('form')"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
'static/css/uploadImg.css'
;
// 引入图片上传组件对话框
import
{
formatDate
}
from
'utils/dateFormattor'
;
import
{
toEast8Date
,
deepCopyDate
,
newEast8Date
,
convertDate2Str
,
timestamp2Date
,
getYMD_hm
}
from
'utils/dateUtils'
;
import
{
getPushList
,
getObj
,
addObj
,
editObj
,
delObj
,
pushStype
}
from
'src/api/appManagement/pushManagement'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
getToken
}
from
'../../../utils/auth'
;
import
Element1
from
"../../admin/menu/components/element"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElCol
from
"element-ui/packages/col/src/col"
;
export
default
{
name
:
'pushManagement'
,
components
:
{
ElCol
,
ElRow
,
Element1
},
data
()
{
return
{
showPic
:
false
,
tableKey
:
0
,
modalTitle
:
"创建"
,
BASE_API
:
process
.
env
.
BASE_API
,
bannerDialogVisible
:
false
,
//添加、编辑弹框
showLoadingBody
:
false
,
form
:
{
type
:
""
,
title
:
''
,
alert
:
''
,
style
:
''
,
bigPicPath
:
''
,
},
listQuery
:
{
page
:
1
,
limit
:
10
,
title
:
''
,
//标题
type
:
undefined
},
pushQuery
:
{
id
:
0
,
userIds
:
''
,
},
rules
:
{
title
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入标题'
,
trigger
:
'blur'
},
alert
:
{
type
:
'string'
,
required
:
true
,
message
:
'请输入描述'
,
},
},
pickerOptionsStart
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
}
},
pickerOptionsEnd
:
{
disabledDate
:
time
=>
{
const
beginDateVal
=
new
Date
(
this
.
form
.
starTimeStr
).
getTime
()
if
(
beginDateVal
)
{
return
time
.
getTime
()
<
beginDateVal
-
8.64e7
}
}
},
list
:
null
,
total
:
null
,
listLoading
:
true
,
inline
:
true
,
}
},
created
()
{
this
.
getList
();
},
computed
:
{
...
mapGetters
([
'elements'
,
'belong2Type'
]),
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()};
},
},
methods
:
{
handleFilter
()
{
this
.
listQuery
.
page
=
1
;
this
.
$refs
.
queryForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
getList
();
}
else
{
return
false
;
}
});
},
handleRadio
(
item
)
{
if
(
item
==
3
)
{
this
.
showPic
=
true
;
}
else
{
this
.
showPic
=
false
;
}
},
handleTypeChange
(
item
)
{
this
.
listQuery
.
type
=
item
;
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
getList
();
},
/**
* 添加
* */
handleCreate
()
{
this
.
cleanForm
();
this
.
modalTitle
=
'创建'
;
this
.
bannerDialogVisible
=
true
;
},
/**
* 操作-编辑
* */
handleUpdate
(
row
)
{
this
.
modalTitle
=
'编辑'
;
this
.
cleanForm
();
getObj
(
row
.
id
).
then
(
response
=>
{
var
item
=
response
.
data
;
item
.
up_name
=
item
.
timeType
==
0
?
'不限'
:
item
.
timeType
==
1
?
'自定义'
:
''
;
if
(
item
.
startTime
>
0
&&
item
.
timeType
==
1
){
item
.
starTimeStr
=
getYMD_hm
(
item
.
startTime
);
}
else
{
item
.
starTimeStr
=
''
;
}
if
(
item
.
endTime
>
0
&&
item
.
timeType
==
1
){
item
.
endTimeStr
=
getYMD_hm
(
item
.
endTime
);
}
else
{
item
.
endTimeStr
=
''
;
}
this
.
form
=
item
;
this
.
bannerDialogVisible
=
true
;
})
},
/**
* 弹框-取消
* */
cancelHandel
(){
this
.
cleanForm
();
this
.
bannerDialogVisible
=
false
;
},
/**
* 清空表单
* */
cleanForm
()
{
this
.
form
=
{
type
:
""
,
title
:
''
,
alert
:
''
,
style
:
''
,
bigPicPath
:
''
,
}
},
/**
* 获取banner列表数据
* */
getList
()
{
this
.
listLoading
=
true
;
getPushList
(
this
.
listQuery
).
then
(
response
=>
{
let
totalCountRs
=
undefined
;
let
listRs
=
undefined
;
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
totalCount
))
{
listRs
=
response
.
data
.
data
;
response
.
data
.
data
.
map
(
function
(
item
){
item
.
crtTimeStr
=
timestamp2Date
(
item
.
crtTime
);
item
.
alerts
=
item
.
alert
;
item
.
visible2
=
false
;
});
totalCountRs
=
response
.
data
.
totalCount
;
}
this
.
listLoading
=
false
;
this
.
list
=
listRs
;
this
.
total
=
totalCountRs
;
});
},
/**
* 创建
* */
create
(
formName
)
{
let
that
=
this
;
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
addObj
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
bannerDialogVisible
=
false
;
this
.
$notify
({
title
:
'成功'
,
message
:
'创建成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
}
else
{
return
false
;
}
});
},
/**
* 编辑-更新
* */
update
(
formName
)
{
let
that
=
this
;
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
editObj
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
bannerDialogVisible
=
false
;
this
.
$notify
({
title
:
'成功'
,
message
:
'编辑成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
}
else
{
return
false
;
}
});
},
/**
* 上传图片
* @param file
* @returns {boolean}
*/
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/gif'
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
10
;
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传图片只能是 JPG/GIF 格式!'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传图片大小不能超过 10MB!'
);
}
this
.
showLoadingBody
=
true
;
return
isJPG
&&
isLt2M
;
},
handleAvatarSuccess
(
res
,
file
)
{
this
.
form
.
bigPicPath
=
res
.
data
;
this
.
showLoadingBody
=
false
;
},
/**
* 操作-删除
* */
deleteHandler
(
row
)
{
this
.
$confirm
(
'确定删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delObj
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'删除成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'删除失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
})
},
/**
* 操作-推送
* */
handleDown
(
row
)
{
this
.
$confirm
(
'确定推送吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
pushQuery
.
id
=
row
.
id
pushStype
(
this
.
pushQuery
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'推送成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'推送失败'
,
message
:
rsCode
.
msg
[
response
.
code
]
?
rsCode
.
msg
[
response
.
code
]
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
})
},
}
}
</
script
>
src/views/vehicle/bookRecord/index.vue
View file @
0214e701
...
...
@@ -9,10 +9,12 @@
: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
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>
...
...
src/views/vehicle/vehicleDepartureLog/index.vue
View file @
0214e701
...
...
@@ -3,7 +3,7 @@
<div
class=
"filter-container"
>
<el-form>
<el-row>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item>
<el-date-picker
v-model=
"listQuery.time"
...
...
@@ -15,13 +15,18 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"5"
>
<el-form-item>
<el-input
type=
"number"
style=
"width: 200px;"
v-model
.
number=
"listQuery.code"
placeholder=
"请输入车辆编码"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"5"
>
<el-form-item
>
<el-input
@
keyup
.
enter
.
native=
"handleFilter"
style=
"width: 200px;"
class=
"filter-item"
placeholder=
"车牌号"
v-model=
"listQuery.numberPlate"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
</el-form-item>
...
...
src/views/vehicle/vehicleInfo/index.vue
View file @
0214e701
...
...
@@ -3,17 +3,17 @@
<div
class=
"filter-container"
ref=
"filter-container"
>
<el-form
:rules=
"rules4Query"
ref=
"queryForm"
:inline=
"inline"
:model=
"listQuery"
label-width=
"100px"
>
<el-row>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"车牌"
>
<el-input
v-model=
"listQuery.numberPlate"
placeholder=
"请输入车牌"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"车辆编码"
>
<el-input
type=
"number"
v-model
.
number=
"listQuery.code"
placeholder=
"请输入车辆编码"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
5
"
>
<el-form-item
label=
"车辆状态"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.status"
placeholder=
"请选择车辆状态"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
...
...
@@ -22,37 +22,8 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"未预订日期"
prop=
"notBookDateRange"
>
<el-date-picker
v-model=
"notBookDateRange"
type=
"daterange"
:editable=
"true"
format=
"yyyy-MM-dd"
placeholder=
"请输入未预订日期范围"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"预订日期"
prop=
"bookDateRange"
>
<el-date-picker
v-model=
"bookDateRange"
type=
"daterange"
:editable=
"true"
format=
"yyyy-MM-dd"
placeholder=
"请输入已预订日期范围"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"5"
>
<el-form-item
label=
"分公司"
prop=
"subordinateBranch"
>
<!--
<el-select
class=
"filter-item"
v-model=
"listQuery.subordinateBranch"
placeholder=
"请选择分公司"
>
-->
<!--
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
-->
<!--
<el-option
v-for=
"item in allCompanies"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
-->
<!--
</el-select>
-->
<el-autocomplete
class=
"inline-input"
v-model=
"state1"
...
...
@@ -64,46 +35,44 @@
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"
所属地区
"
prop=
"zoneId"
>
<el-col>
<el-form-item
label=
"
区域
"
prop=
"zoneId"
>
<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-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=
"片区"
prop=
"addrCity"
>
-->
<!--
<el-select
class=
"filter-item"
v-model=
"listQuery.addrCity"
placeholder=
"请选择片区"
>
-->
<!--
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
-->
<!--
<el-option
v-for=
"item in cityRegions4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"省份"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.addrProvince"
placeholder=
"请选择省份(直辖市)"
@
change=
'getValue'
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
—
<el-select
class=
"filter-item"
v-model=
"listQuery.addrProvince"
placeholder=
"请选择省份(直辖市)"
@
change=
'getValue'
>
<el-option
v-for=
"item in provinceRegions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"城市"
prop=
"addrCity"
>
—
<el-select
class=
"filter-item"
v-model=
"listQuery.addrCity"
placeholder=
"请选择城市"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"item in cityRegions4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in cityRegions4Query"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"车型"
>
<
!--
<
el-form-item
label=
"车型"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.modelId"
placeholder=
"请选择车型"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"item in allVehicleList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in allVehicleList"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
-->
<el-form-item
label=
"车型"
prop=
"modelId"
>
<el-autocomplete
class=
"inline-input"
v-model=
"vehicleArr"
:fetch-suggestions=
"queryVehicleModelSearch"
placeholder=
"请选择车型"
@
select=
"handleVehicleModelSelect"
></el-autocomplete>
</el-form-item>
</el-col>
</el-row>
<el-button
class=
"filter-item"
type=
"primary"
:icon=
" showMoreQueryFilter ? 'caret-top' : 'caret-bottom' "
...
...
@@ -128,7 +97,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<
!--
<
el-col
:span=
"8"
>
<el-form-item
label=
"保险结束日期"
prop=
"insuranceDateRange"
>
<el-date-picker
v-model=
"listQuery.insuranceDateRange"
...
...
@@ -138,11 +107,11 @@
placeholder=
"请输入保险结束日期范围"
>
</el-date-picker>
</el-form-item>
</el-col
>
</el-col>
--
>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<
!--
<
el-col
:span=
"8"
>
<el-form-item
label=
"年审日期"
prop=
"aVRange"
>
<el-date-picker
v-model=
"listQuery.aVRange"
...
...
@@ -152,7 +121,7 @@
placeholder=
"请输入年审日期范围"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-col>
-->
<el-col
:span=
"8"
>
<el-form-item
label=
"保养日期"
prop=
"mRange"
>
<el-date-picker
...
...
@@ -335,7 +304,8 @@
<el-table-column
align=
"center"
label=
"操作"
width=
"280"
fixed=
"right"
>
<
template
scope=
"scope"
>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
{{
vehicleInfo_btn_edit
?
"编辑"
:
"查看"
}}
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleUpdate(scope.row)"
>
{{
vehicleInfo_btn_edit
?
"编辑"
:
"查看"
}}
</el-button>
<!--
<el-button
v-if=
"scope.row.status == 1&&vehicleInfo_btn_ride"
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"departureHandler(scope.row)"
>
出车
</el-button>
-->
...
...
@@ -348,12 +318,19 @@
保养结束
</el-button>
-->
<el-button
v-if=
"vehicleInfo_btn_apply && checkIfRuning(scope.row) "
size=
"small"
class=
"el-button el-button--text el-button--small"
<el-button
v-if=
"vehicleInfo_btn_apply && checkIfRuning(scope.row) "
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleApply(scope.row)"
>
申请预订
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button>
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleDepartureLog(scope.row)"
>
出车记录
</el-button>
<el-button
size=
"small"
@
click=
"deleteHandler(scope.row)"
class=
"el-button el-button--text el-button--small"
style=
"color:red;"
v-if=
"vehicleInfo_btn_ret"
>
删除
</el-button>
<!--
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button>
-->
<el-button
size=
"small"
class=
"el-button el-button--text el-button--small"
@
click=
"handleDepartureLog(scope.row)"
>
排班记录
</el-button>
<el-button
size=
"small"
@
click=
"deleteHandler(scope.row)"
class=
"el-button el-button--text el-button--small"
style=
"color:red;"
v-if=
"vehicleInfo_btn_ret"
>
删除
</el-button>
</
template
>
</el-table-column>
...
...
@@ -374,7 +351,7 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"车辆编码"
prop=
"code"
>
<el-input
v-model
.
number=
"form.code"
placeholder=
"
不填将自动生成
"
></el-input>
<el-input
v-model
.
number=
"form.code"
placeholder=
"
请输入车辆编码"
type=
"number
"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -552,7 +529,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"车型"
>
<
!--<
el-form-item label="车型">
<el-select v-model="form.modelId" filterable placeholder="请选择">
<el-option
v-for="item in allVehicleList"
...
...
@@ -561,6 +538,15 @@
:value="item.id">
</el-option>
</el-select>
</el-form-item>-->
<el-form-item
label=
"车型"
prop=
"vehicleModelName"
>
<el-autocomplete
class=
"inline-input"
v-model=
"form.vehicleModelName"
:fetch-suggestions=
"queryVehicleModelSearch"
placeholder=
"请输入内容"
@
select=
"handleVehicleModelSelectSubordinate"
></el-autocomplete>
</el-form-item>
</el-col>
<!--<el-col :span="12">-->
...
...
@@ -604,7 +590,8 @@
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel('form')"
>
取 消
</el-button>
<el-button
v-if=
"dialogStatus=='create'"
type=
"primary"
@
click=
"create('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"update('form')"
v-if=
"dialogStatus=='update'&&vehicleInfo_btn_edit"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"update('form')"
v-if=
"dialogStatus=='update'&&vehicleInfo_btn_edit"
>
确 定
</el-button>
</div>
</el-dialog>
...
...
@@ -651,7 +638,8 @@
<el-form-item
label=
"用途"
prop=
"bookType"
>
<el-select
class=
"filter-item"
v-model=
"form4Apply.bookType"
placeholder=
"请选择用途"
>
<el-option
:key=
"undefined"
label=
""
:value=
"undefined"
></el-option>
<el-option
v-for=
"(val, key, index) in book_type_list "
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
<el-option
v-for=
"(val, key, index) in book_type_list "
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"保养项目"
prop=
"upkeepIds"
v-if=
"form4Apply.bookType==6"
>
...
...
@@ -662,7 +650,8 @@
<el-form-item
label=
"目的地"
prop=
"destination"
>
<el-input
v-model=
"form4Apply.destination"
placeholder=
"请输入目的地"
></el-input>
</el-form-item>
<el-form-item
label=
"随行物品"
prop=
"selectedAccItem"
v-if=
"form4Apply.bookType!=3&&form4Apply.bookType!=6&&form4Apply.bookType!=8&&form4Apply.bookType!=10"
>
<el-form-item
label=
"随行物品"
prop=
"selectedAccItem"
v-if=
"form4Apply.bookType!=3&&form4Apply.bookType!=6&&form4Apply.bookType!=8&&form4Apply.bookType!=10"
>
<el-input
type=
"textarea"
v-model=
"getSelectedAccItemStr"
:rows=
"5"
icon=
"menu"
@
focus=
"handleAccItemSelect"
clearable
placeholder=
"请选择随行物品"
></el-input>
...
...
@@ -722,9 +711,11 @@
</el-dialog>
<!--出车弹框-->
<departureDialog
v-if=
"departureDialogVisible"
:departureRow=
"departureRow"
v-on:departureDialogEvent =
"departureDialogEvent"
></departureDialog>
<departureDialog
v-if=
"departureDialogVisible"
:departureRow=
"departureRow"
v-on:departureDialogEvent=
"departureDialogEvent"
></departureDialog>
<!-- 车辆保养弹窗 -->
<upkeepDialog
v-if=
"upkeepDialogVisible"
:upkeepRow=
"upkeepRow"
v-on:upkeepDialogEvent =
"upkeepDialogEvent"
></upkeepDialog>
<upkeepDialog
v-if=
"upkeepDialogVisible"
:upkeepRow=
"upkeepRow"
v-on:upkeepDialogEvent=
"upkeepDialogEvent"
></upkeepDialog>
</div>
</template>
...
...
@@ -741,13 +732,14 @@
getBookedInfo
,
putObj
,
delObj
,
getSysRegionByIds
}
from
'api/vehicle/vehicleInfo/'
;
getSysRegionByIds
,
checkCode
}
from
'../../../api/vehicle/vehicleInfo/'
;
import
{
getAllVehicleModelList
,
getAllVehicleList
}
from
'
api/vehicleType'
;
}
from
'../../../
api/vehicleType'
;
import
{
getConstantByTypeAndCode
,
...
...
@@ -830,19 +822,21 @@
data
()
{
return
{
upkeepRow
:
{},
//保养数据
departureRow
:
{},
//出车数据
departureRow
:
{},
//出车数据
state1
:
''
,
vehicleArr
:
''
,
BASE_API
:
process
.
env
.
BASE_API
,
dialogForm4LicenceVisible
:
false
,
licenceSrcUrl
:
undefined
,
showLoadingBody
:
false
,
allVehicleList
:
[],
//全部车型
form
:
{
subordinateBranchName
:
""
,
vehicleModelName
:
""
,
subordinateBranchName
:
""
,
subordinateBranch
:
undefined
,
parkBranchCompanyName
:
""
,
parkBranchCompanyId
:
undefined
,
modelId
:
undefined
,
//车型id
modelId
:
undefined
,
//车型id
status
:
undefined
,
code
:
undefined
,
numberPlate
:
undefined
,
...
...
@@ -871,6 +865,13 @@
trigger
:
'change'
}
],
vehicleModelName
:[
{
required
:
true
,
message
:
'请选择车型'
,
trigger
:
'change'
}
],
parkBranchCompanyName
:
[
{
required
:
true
,
...
...
@@ -882,8 +883,9 @@
code
:
[
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
))
{
return
callback
();
if
(
this
.
$utils
.
isUndefined
(
value
)
||
this
.
$utils
.
isNull
(
value
)
||
this
.
$utils
.
isEmpty
(
""
+
value
))
{
return
callback
(
new
Error
(
"请输入车辆编码"
));
}
if
(
!
this
.
$utils
.
isInteger
(
value
))
{
return
callback
(
new
Error
(
'编码必须为整数'
));
...
...
@@ -891,9 +893,17 @@
if
(
value
<
1
||
value
>
9999999999
)
{
return
callback
(
new
Error
(
'编码合法范围:[1 - 9999999999]'
));
}
//检验code码
checkCode
(
value
,
this
.
form
.
id
).
then
(
response
=>
{
if
(
response
.
data
===
true
)
{
return
callback
(
new
Error
(
"该车辆编码已经被占用,请重新输入"
));
}
else
{
callback
();
}
})
},
trigger
:
'blur'
trigger
:
'blur'
,
required
:
true
}
],
vin
:
[
...
...
@@ -921,28 +931,28 @@
}
]
},
book_type_list
:
[
book_type_list
:
[
{
name
:
'维修'
,
id
:
3
},
{
name
:
'展览'
,
id
:
4
},
{
name
:
'旅游'
,
id
:
5
},
{
name
:
'保养'
,
id
:
6
},
{
name
:
'禁用'
,
id
:
8
},
{
name
:
'客户用车'
,
id
:
9
},
{
name
:
'其他'
,
id
:
10
name
:
'维修'
,
id
:
3
},
{
name
:
'展览'
,
id
:
4
},
{
name
:
'旅游'
,
id
:
5
},
{
name
:
'保养'
,
id
:
6
},
{
name
:
'禁用'
,
id
:
8
},
{
name
:
'客户用车'
,
id
:
9
},
{
name
:
'其他'
,
id
:
10
}
],
form4Apply
:
{
...
...
@@ -957,11 +967,11 @@
destination
:
undefined
,
selectedAccItem
:
undefined
,
remark
:
undefined
,
vehicleId
:
undefined
,
bookType
:
undefined
,
vehicleUsername
:
undefined
,
vehicleUserPhone
:
undefined
,
upkeepIds
:
[],
vehicleId
:
undefined
,
bookType
:
undefined
,
vehicleUsername
:
undefined
,
vehicleUserPhone
:
undefined
,
upkeepIds
:
[],
},
pickerOptions4Apply
:
{
disabledDate
:
this
.
checkBookDate
...
...
@@ -1048,24 +1058,24 @@
trigger
:
'blur'
}
],
vehicleUsername
:
[
vehicleUsername
:
[
{
required
:
true
,
message
:
'请输入使用人'
,
trigger
:
'blur'
}
],
vehicleUserPhone
:
[
vehicleUserPhone
:
[
{
required
:
true
,
message
:
'请输入使用人联系方式'
,
trigger
:
'blur'
},
{
},
{
pattern
:
/^1
[
3456789
]\d{9}
$/
,
message
:
'请输入正确的手机号'
}
],
bookType
:
[
bookType
:
[
{
required
:
true
,
message
:
'请选择用途'
,
...
...
@@ -1104,7 +1114,8 @@
}
]
},
selectArry
:[],
selectArry
:
[],
selectVehicleModelArray
:
[],
list
:
null
,
total
:
null
,
listLoading
:
true
,
...
...
@@ -1130,7 +1141,7 @@
notBookedStartDate
:
undefined
,
notBookedEndDate
:
undefined
,
code
:
undefined
,
modelId
:
undefined
modelId
:
undefined
},
showMoreQueryFilter
:
false
,
showMoreMoreCol
:
false
,
...
...
@@ -1177,13 +1188,13 @@
},
upkeepDialogVisible
:
false
,
allUpkeepItems
:
null
,
allZoneArr
:
[],
//全部片区
allZoneArr
:
[],
//全部片区
provinceRegions
:
[],
//片区下省份数据
vehicleInfo_btn_edit
:
false
,
//编辑
vehicleInfo_btn_add
:
false
,
//新增
vehicleInfo_btn_apply
:
false
,
//申请预定
vehicleInfo_btn_ride
:
false
,
//出车
vehicleInfo_btn_ret
:
false
,
//删除
vehicleInfo_btn_ride
:
false
,
//出车
vehicleInfo_btn_ret
:
false
,
//删除
}
},
created
()
{
...
...
@@ -1229,7 +1240,7 @@
}
return
getSonRegionByCodes
(
this
.
listQuery
.
addrProvince
);
},
getAllZoneList
()
{
getAllZoneList
()
{
this
.
allZoneArr
=
getAllZone
();
return
getAllZone
();
},
...
...
@@ -1350,8 +1361,8 @@
if
(
!
this
.
$utils
.
isInteger
(
this
.
listQuery
.
zoneId
))
{
return
null
;
}
this
.
allZoneArr
.
map
(
function
(
item
)
{
if
(
item
.
id
==
that
.
listQuery
.
zoneId
)
{
this
.
allZoneArr
.
map
(
function
(
item
)
{
if
(
item
.
id
==
that
.
listQuery
.
zoneId
)
{
getSysRegionByIds
(
item
.
provinceIds
).
then
(
response
=>
{
let
listRs
=
undefined
;
if
(
!
that
.
$utils
.
isEmpty
(
response
.
data
))
{
...
...
@@ -1362,7 +1373,7 @@
}
});
},
getValue
(
e
)
{
getValue
(
e
)
{
this
.
listQuery
.
addrCity
=
undefined
;
},
/**
...
...
@@ -1380,8 +1391,9 @@
/**
* 刷新
* */
reloadPage
()
{
reloadPage
()
{
this
.
state1
=
""
;
this
.
vehicleArr
=
""
;
this
.
listQuery
=
{
page
:
1
,
limit
:
20
,
...
...
@@ -1410,8 +1422,8 @@
/**
* 出车modal传递回来的数据
* */
departureDialogEvent
(
e
)
{
if
(
e
)
{
departureDialogEvent
(
e
)
{
if
(
e
)
{
this
.
getList
();
}
this
.
departureDialogVisible
=
false
;
...
...
@@ -1419,8 +1431,8 @@
/**
* 保养modal传递回来的数据
* */
upkeepDialogEvent
(
e
)
{
if
(
e
)
{
upkeepDialogEvent
(
e
)
{
if
(
e
)
{
this
.
getList
();
}
this
.
upkeepDialogVisible
=
false
;
...
...
@@ -1432,7 +1444,7 @@
name
:
"全部"
};
selectArry
.
push
(
iitem
);
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
...
...
@@ -1441,6 +1453,22 @@
// 调用 callback 返回建议列表的数据
cb
(
results
);
},
queryVehicleModelSearch
(
queryString
,
cb
)
{
let
selectArry
=
[];
let
iitem
=
{
value
:
"全部"
,
name
:
"全部"
};
selectArry
.
push
(
iitem
);
this
.
allVehicleList
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
this
.
selectVehicleModelArray
=
selectArry
;
var
results
=
queryString
?
selectArry
.
filter
(
this
.
createFilter
(
queryString
))
:
selectArry
;
// 调用 callback 返回建议列表的数据
cb
(
results
);
},
createFilter
(
queryString
)
{
return
(
restaurant
)
=>
{
return
(
restaurant
.
name
.
indexOf
(
queryString
.
toLowerCase
())
!=
-
1
);
...
...
@@ -1449,24 +1477,24 @@
/**
* 还车分公司
*/
handleSelectArrivalCompanyName
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelectArrivalCompanyName
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
arrivalForm
.
arrivalBranchCompanyId
=
undefined
;
}
else
{
this
.
arrivalForm
.
arrivalBranchCompanyId
=
item
.
id
;
}
console
.
log
(
item
);
},
handleSelectDepartureForm
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelectDepartureForm
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
departureForm
.
departureBranchCompanyId
=
undefined
;
}
else
{
this
.
departureForm
.
departureBranchCompanyId
=
item
.
id
;
}
console
.
log
(
item
);
},
handleSelectEexpectArrivalCompanyName
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelectEexpectArrivalCompanyName
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
departureForm
.
expectArrivalBranchCompanyId
=
undefined
;
}
else
{
this
.
departureForm
.
expectArrivalBranchCompanyId
=
item
.
id
;
...
...
@@ -1476,8 +1504,8 @@
/**
* 提车分公司
* */
handleSelect3
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelect3
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
form4Apply
.
liftCompany
=
undefined
;
}
else
{
this
.
form4Apply
.
liftCompany
=
item
.
id
;
...
...
@@ -1487,8 +1515,8 @@
/**
* 还车分公司
* */
handleSelect4
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelect4
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
form4Apply
.
retCompany
=
undefined
;
}
else
{
this
.
form4Apply
.
retCompany
=
item
.
id
;
...
...
@@ -1498,8 +1526,8 @@
/**
* 所属分公司
* */
handleSelectSubordinate
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelectSubordinate
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
form
.
subordinateBranch
=
undefined
;
// this.form.subordinateBranchName = "";
}
else
{
...
...
@@ -1507,11 +1535,18 @@
// this.form.subordinateBranchName = item.name;
}
},
handleVehicleModelSelectSubordinate
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
form
.
modelId
=
undefined
;
}
else
{
this
.
form
.
modelId
=
item
.
id
;
}
},
/**
* 停靠分公司
* */
handleSelectPark
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelectPark
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
form
.
parkBranchCompanyId
=
undefined
;
this
.
form
.
parkBranchCompanyName
=
""
;
}
else
{
...
...
@@ -1519,8 +1554,8 @@
this
.
form
.
parkBranchCompanyName
=
item
.
name
;
}
},
handleSelect1
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelect1
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
form
.
subordinateBranch
=
undefined
;
}
else
{
this
.
form
.
subordinateBranch
=
item
.
id
;
...
...
@@ -1528,18 +1563,25 @@
console
.
log
(
item
);
},
handleSelect
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
listQuery
.
subordinateBranch
=
undefined
;
}
else
{
this
.
listQuery
.
subordinateBranch
=
item
.
id
;
}
console
.
log
(
item
);
},
handleVehicleModelSelect
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
listQuery
.
modelId
=
undefined
;
}
else
{
this
.
listQuery
.
modelId
=
item
.
id
;
}
},
/**
* 出车分公司
* */
handleSelectPark1
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
handleSelectPark1
(
item
)
{
if
(
item
.
value
==
"全部"
)
{
this
.
departureForm
.
departureBranchCompanyId
=
undefined
;
this
.
departureForm
.
departureBranchCompanyName
=
""
;
}
else
{
...
...
@@ -1579,7 +1621,7 @@
},
handleDepartureLog
(
row
)
{
this
.
$router
.
push
({
path
:
'/vehicle/vehicleDepartureLog
'
,
path
:
'/vehicle/vehicleSchedulManage
'
,
query
:
{
numberPlate
:
row
.
numberPlate
}
...
...
@@ -1594,12 +1636,12 @@
this
.
arrivalForm
.
arrivalBranchCompanyId
=
row
.
subordinateBranch
;
let
that
=
this
;
let
selectArry
=
[];
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
selectArry
.
map
(
function
(
iitem
)
{
if
(
row
.
subordinateBranch
==
iitem
.
id
)
{
if
(
row
.
subordinateBranch
==
iitem
.
id
)
{
that
.
arrivalForm
.
arrivalBranchCompanyName
=
iitem
.
name
;
}
});
...
...
@@ -1614,7 +1656,7 @@
* 收车-确定
*/
arrivalVehicleHandler
()
{
if
(
this
.
arrivalForm
.
arrivalBranchCompanyName
==
""
||
this
.
arrivalForm
.
arrivalBranchCompanyName
==
"全部"
)
{
if
(
this
.
arrivalForm
.
arrivalBranchCompanyName
==
""
||
this
.
arrivalForm
.
arrivalBranchCompanyName
==
"全部"
)
{
this
.
arrivalForm
.
arrivalBranchCompanyId
=
undefined
;
}
arrivalVehicle
(
this
.
arrivalForm
).
then
(
response
=>
{
...
...
@@ -1790,14 +1832,18 @@
4
:
{
code
:
4
,
val
:
'出车'
}
}
/*,
5: {
code: 5,
val: '上牌中'
}*/
};
},
getBrand
:
function
(
code
)
{
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN
)
{
return
'未知'
;
}
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_BRAND
,
code
)?
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_BRAND
,
code
).
val
:
'品牌不存在'
;
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_BRAND
,
code
)
?
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_BRAND
,
code
).
val
:
'品牌不存在'
;
},
getAllBranch
:
()
=>
{
return
getConstantListByType
(
VEHICLE_CONSTANT_VEHICLE_BRAND
);
...
...
@@ -1806,7 +1852,7 @@
if
(
!
this
.
$utils
.
isInteger
(
code
)
||
code
==
VEHICLE_CONSTANT_USE_TYPE_UNKOWN
)
{
return
'未知'
;
}
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_USE
,
code
)?
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_USE
,
code
).
val
:
'用途未知'
;
return
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_USE
,
code
)
?
getConstantByTypeAndCode
(
VEHICLE_CONSTANT_VEHICLE_USE
,
code
).
val
:
'用途未知'
;
},
getAllUseType
:
()
=>
{
return
getConstantListByType
(
VEHICLE_CONSTANT_VEHICLE_USE
);
...
...
@@ -1816,24 +1862,27 @@
let
listQueryTemp
=
this
.
fillDateRange2Object
(
this
.
listQuery
,
'mRange'
,
'mRangeDateStart'
,
'mRangeDateEnd'
);
listQueryTemp
=
this
.
fillDateRange2Object
(
listQueryTemp
,
'aVRange'
,
'aVRangeDateStart'
,
'aVRangeDateEnd'
);
listQueryTemp
=
this
.
fillDateRange2Object
(
listQueryTemp
,
'insuranceDateRange'
,
'insuranceDateRangeStart'
,
'insuranceDateRangeEnd'
);
if
(
!
this
.
state1
)
{
if
(
!
this
.
state1
)
{
listQueryTemp
.
subordinateBranch
=
undefined
;
}
if
(
!
this
.
vehicleArr
)
{
listQueryTemp
.
modelId
=
undefined
;
}
page
(
listQueryTemp
).
then
(
response
=>
{
if
(
response
.
code
==
1
)
{
if
(
response
.
code
==
1
)
{
let
totalCountRs
=
undefined
;
let
listRs
=
undefined
;
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
totalCount
))
{
listRs
=
response
.
data
.
data
;
totalCountRs
=
response
.
data
.
totalCount
;
listRs
.
map
(
function
(
item
)
{
listRs
.
map
(
function
(
item
)
{
item
.
visible2
=
false
;
});
}
this
.
listLoading
=
false
;
this
.
list
=
listRs
;
this
.
total
=
totalCountRs
;
}
else
{
}
else
{
this
.
list
=
[];
this
.
listLoading
=
false
;
}
...
...
@@ -1868,16 +1917,23 @@
},
handleUpdate
(
row
)
{
let
selectArry
=
[];
let
selectVehicleModelArry
=
[];
let
iitem
=
{
value
:
"全部"
,
name
:
"全部"
};
selectArry
.
push
(
iitem
);
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
selectVehicleModelArry
.
push
(
iitem
);
this
.
allVehicleList
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectVehicleModelArry
.
push
(
item
);
});
this
.
selectArry
=
selectArry
;
this
.
selectVehicleModelArray
=
selectVehicleModelArry
;
getObj
(
row
.
id
)
.
then
(
response
=>
{
let
that
=
this
;
...
...
@@ -1886,15 +1942,21 @@
this
.
form
[
key
]
=
item
;
});
selectArry
.
map
(
function
(
iitem
)
{
if
(
that
.
form
[
"subordinateBranch"
]
==
iitem
.
id
)
{
if
(
that
.
form
[
"subordinateBranch"
]
==
iitem
.
id
)
{
that
.
form
.
subordinateBranchName
=
iitem
.
name
;
that
.
form
.
subordinateBranch
=
iitem
.
id
;
}
if
(
that
.
form
[
"parkBranchCompanyId"
]
==
iitem
.
id
)
{
if
(
that
.
form
[
"parkBranchCompanyId"
]
==
iitem
.
id
)
{
that
.
form
.
parkBranchCompanyName
=
iitem
.
name
;
that
.
form
.
parkBranchCompanyId
=
iitem
.
id
;
}
});
selectVehicleModelArry
.
map
(
function
(
value
)
{
if
(
that
.
form
[
"modelId"
]
==
value
.
id
){
that
.
form
.
vehicleModelName
=
value
.
name
;
that
.
form
.
modelId
=
value
.
id
;
}
});
this
.
fillDates2Range
(
this
.
form
,
'insuranceDateRange4form'
,
'insuranceStartDate'
,
'insuranceEndDate'
);
this
.
dialogFormVisible
=
true
;
this
.
dialogStatus
=
'update'
;
...
...
@@ -1907,14 +1969,14 @@
this
.
resetTemp4Apply
();
let
that
=
this
;
let
selectArry
=
[];
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
this
.
allCompaniesArr
.
map
(
function
(
item
)
{
item
.
value
=
item
.
name
;
selectArry
.
push
(
item
);
});
this
.
form4Apply
.
liftCompany
=
row
.
parkBranchCompanyId
;
this
.
form4Apply
.
vehicleId
=
row
.
id
;
selectArry
.
map
(
function
(
iitem
)
{
if
(
row
.
parkBranchCompanyId
==
iitem
.
id
)
{
if
(
row
.
parkBranchCompanyId
==
iitem
.
id
)
{
that
.
form4Apply
.
state3
=
iitem
.
name
;
}
});
...
...
@@ -2006,7 +2068,7 @@
* @param formName
*/
apply
(
formName
)
{
if
(
!
this
.
form4Apply
.
state3
||
this
.
form4Apply
.
state3
==
"全部"
)
{
if
(
!
this
.
form4Apply
.
state3
||
this
.
form4Apply
.
state3
==
"全部"
)
{
this
.
form4Apply
.
liftCompany
=
undefined
;
this
.
$notify
({
title
:
'失败'
,
...
...
@@ -2016,7 +2078,7 @@
});
return
;
}
if
(
!
this
.
form4Apply
.
state4
||
this
.
form4Apply
.
state4
==
"全部"
)
{
if
(
!
this
.
form4Apply
.
state4
||
this
.
form4Apply
.
state4
==
"全部"
)
{
this
.
form4Apply
.
retCompany
=
undefined
;
this
.
$notify
({
title
:
'失败'
,
...
...
@@ -2029,8 +2091,8 @@
const
set
=
this
.
$refs
;
set
[
formName
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form4Apply
.
bookType
==
6
)
{
if
(
this
.
form4Apply
.
upkeepIds
.
length
==
0
)
{
if
(
this
.
form4Apply
.
bookType
==
6
)
{
if
(
this
.
form4Apply
.
upkeepIds
.
length
==
0
)
{
this
.
$notify
({
title
:
'警告'
,
message
:
'请选择保养项目'
,
...
...
@@ -2040,10 +2102,10 @@
return
false
;
}
}
this
.
form4Apply
.
upkeepIds
=
this
.
form4Apply
.
bookType
==
6
?
this
.
form4Apply
.
upkeepIds
.
join
(
","
):
''
this
.
form4Apply
.
upkeepIds
=
this
.
form4Apply
.
bookType
==
6
?
this
.
form4Apply
.
upkeepIds
.
join
(
","
)
:
''
this
.
dialogFormVisible
=
false
;
book
(
this
.
form4Apply
).
then
(
res
=>
{
if
(
res
.
status
==
200
)
{
if
(
res
.
status
==
200
)
{
this
.
dialogForm4ApplyVisible
=
false
;
this
.
getList
();
this
.
$notify
({
...
...
@@ -2052,7 +2114,7 @@
type
:
'success'
,
duration
:
2000
});
}
else
{
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
res
.
message
,
...
...
@@ -2102,10 +2164,11 @@
code
:
undefined
,
parkBranchCompanyName
:
""
,
//停靠分公司名称
parkBranchCompanyId
:
undefined
,
//停靠分公司id
modelId
:
undefined
,
//车型id
modelId
:
undefined
,
//车型id
numberPlate
:
undefined
,
brand
:
undefined
,
subordinateBranchName
:
""
,
vehicleModelName
:
""
,
subordinateBranch
:
undefined
,
useType
:
undefined
,
vin
:
undefined
,
...
...
@@ -2130,7 +2193,7 @@
bookStartDate
:
undefined
,
bookEndDate
:
undefined
,
state3
:
''
,
state4
:
''
,
state4
:
''
,
retCompany
:
undefined
,
vehicle
:
undefined
,
selectedAccItem
:
undefined
,
...
...
@@ -2138,11 +2201,11 @@
liftAddr
:
undefined
,
destination
:
undefined
,
remark
:
undefined
,
vehicleId
:
undefined
,
bookType
:
undefined
,
vehicleUsername
:
undefined
,
vehicleUserPhone
:
undefined
,
upkeepIds
:
[],
vehicleId
:
undefined
,
bookType
:
undefined
,
vehicleUsername
:
undefined
,
vehicleUserPhone
:
undefined
,
upkeepIds
:
[],
};
},
resetTemp4BookInfo
()
{
...
...
src/views/vehicle/vehicleSchedulManage/index.vue
View file @
0214e701
...
...
@@ -16,6 +16,9 @@
<el-form-item
label=
"车牌"
>
<el-input
v-model=
"listQuery.numberPlate"
placeholder=
"请输入车牌"
></el-input>
</el-form-item>
<el-form-item
label=
"车辆编码"
>
<el-input
type=
"number"
style=
"width: 200px;"
v-model
.
number=
"listQuery.code"
placeholder=
"请输入车辆编码"
></el-input>
</el-form-item>
<el-form-item
label=
"用途"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.useType"
placeholder=
"请选择用途"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
...
...
@@ -473,6 +476,10 @@
}
},
created
()
{
const
numberPlate
=
this
.
$route
.
query
.
numberPlate
;
if
(
numberPlate
)
{
this
.
listQuery
.
numberPlate
=
numberPlate
;
}
this
.
getList
();
this
.
getAllVehicleType
();
let
currentMonth
=
getCurrentMonth
();
...
...
src/views/vehicle/vehicleSchedulManage/vehicleRecords.vue
View file @
0214e701
...
...
@@ -4,6 +4,7 @@
<div
class=
"filter-container"
>
<el-input
style=
"width: 200px;"
placeholder=
"车牌号"
v-model=
"listQuery.numberPlate"
></el-input>
<el-input
type=
"number"
style=
"width: 200px;"
v-model
.
number=
"listQuery.code"
placeholder=
"请输入车辆编码"
></el-input>
<el-date-picker
v-model=
"listQuery.selectedMonth"
type=
"month"
...
...
src/views/vehicle/vehicleUpkeepLog/index.vue
View file @
0214e701
...
...
@@ -3,6 +3,7 @@
<div
class=
"filter-container"
>
<el-input
@
keyup
.
enter
.
native=
"handleFilter"
style=
"width: 200px;"
class=
"filter-item"
placeholder=
"车牌号"
v-model=
"listQuery.numberPlate"
></el-input>
<el-input
type=
"number"
style=
"width: 200px;"
v-model
.
number=
"listQuery.code"
class=
"filter-item"
placeholder=
"请输入车辆编码"
></el-input>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"search"
@
click=
"handleFilter"
>
搜索
</el-button>
</div>
<el-table
:key=
'tableKey'
:data=
"list"
v-loading
.
body=
"listLoading"
border
fit
highlight-current-row
...
...
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