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
790680cd
Commit
790680cd
authored
May 06, 2019
by
youjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆维护相关
parent
a466a462
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
276 additions
and
6 deletions
+276
-6
index.js
src/api/vehicle/active/index.js
+16
-0
index.js
src/api/vehicle/upkeep/index.js
+16
-0
index.js
src/router/index.js
+6
-0
baseInfo.js
src/store/modules/baseInfo.js
+4
-0
index.vue
src/views/branchCompany/stock/index.vue
+1
-0
index.vue
src/views/vehicle/vehicleInfo/index.vue
+135
-6
index.vue
src/views/vehicle/vehicleUpkeepLog/index.vue
+98
-0
No files found.
src/api/vehicle/active/index.js
View file @
790680cd
...
...
@@ -16,3 +16,19 @@ export function arrivalVehicle(param) {
})
}
export
function
upkeepVehicle
(
param
)
{
return
fetch
({
url
:
'/vehicle/active/upkeep'
,
method
:
'post'
,
data
:
param
})
}
export
function
upkeepEndVehicle
(
param
)
{
return
fetch
({
url
:
'/vehicle/active/upkeepEnd'
,
method
:
'post'
,
data
:
param
})
}
src/api/vehicle/upkeep/index.js
0 → 100644
View file @
790680cd
import
fetch
from
'utils/fetch'
;
export
function
getAllUpkeepItem
()
{
return
fetch
({
url
:
'/vehicle/upkeep/item/all'
,
method
:
'get'
});
}
export
function
logPage
(
param
)
{
return
fetch
({
url
:
'/vehicle/upkeep/log/page'
,
method
:
'get'
,
params
:
param
})
}
src/router/index.js
View file @
790680cd
...
...
@@ -243,6 +243,12 @@ export const asyncRouterMap = [{
component
:
_import
(
'vehicle/vehicleDepartureLog/index'
),
name
:
'车辆出车记录'
,
authority
:
'vehicleDepartureLog'
},
{
path
:
'vehicleUpkeepLog'
,
component
:
_import
(
'vehicle/vehicleUpkeepLog/index'
),
name
:
'车辆保养记录'
,
authority
:
'vehicleUpkeepLog'
}
]
}
...
...
src/store/modules/baseInfo.js
View file @
790680cd
...
...
@@ -80,6 +80,10 @@ const baseInfo = {
4
:
{
code
:
4
,
val
:
'出车'
},
5
:
{
code
:
5
,
val
:
'保养'
}
},
codeAndBranchCompany
:
{},
...
...
src/views/branchCompany/stock/index.vue
View file @
790680cd
...
...
@@ -121,6 +121,7 @@
</template>
<
script
>
import
'static/css/uploadImg.css'
;
import
{
search
,
getObj
,
...
...
src/views/vehicle/vehicleInfo/index.vue
View file @
790680cd
...
...
@@ -267,9 +267,16 @@
<
template
scope=
"scope"
>
<el-button
v-if=
"vehicleInfo_btn_edit"
size=
"small"
type=
"success"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
v-if=
"scope.row.status == 1"
size=
"small"
type=
"success"
@
click=
"departureHandler(scope.row)"
>
出车
</el-button>
<el-button
v-if=
"scope.row.status == 4"
size=
"small"
type=
"success"
@
click=
"arrivalHandler(scope.row)"
>
收车
</el-button>
<el-button
v-if=
"scope.row.status == 1"
size=
"small"
type=
"success"
@
click=
"departureHandler(scope.row)"
>
出车
</el-button>
<el-button
v-if=
"scope.row.status == 4"
size=
"small"
type=
"success"
@
click=
"arrivalHandler(scope.row)"
>
收车
</el-button>
<el-button
v-if=
"scope.row.status == 1"
size=
"small"
type=
"success"
@
click=
"upkeepHandler(scope.row)"
>
保养
</el-button>
<el-button
v-if=
"scope.row.status == 5"
size=
"small"
type=
"success"
@
click=
"upkeepEndHandler(scope.row)"
>
保养结束
</el-button>
<el-button
v-if=
"vehicleInfo_btn_apply && checkIfRuning(scope.row) "
size=
"small"
type=
"success"
@
click=
"handleApply(scope.row)"
>
申请预订
...
...
@@ -552,7 +559,7 @@
<el-dialog
title=
"出车"
:visible
.
sync=
"departureDialogVisible"
>
<el-form
:model=
"departureForm"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<el-form-item
label=
"车牌号"
>
<el-input
v-model=
"departureForm.numberPlate"
disabled
=
"false"
></el-input>
<el-input
v-model=
"departureForm.numberPlate"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"用途"
prop=
"use"
>
<el-input
v-model=
"departureForm.use"
placeholder=
"请输入出车用途"
></el-input>
...
...
@@ -583,7 +590,7 @@
<el-dialog
title=
"收车"
:visible
.
sync=
"arrivalDialogVisible"
>
<el-form
:model=
"arrivalForm"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<el-form-item
label=
"车牌号"
>
<el-input
v-model=
"arrivalForm.numberPlate"
disabled
=
"false"
></el-input>
<el-input
v-model=
"arrivalForm.numberPlate"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"收车人"
prop=
"checkMan"
>
<el-input
v-model=
"arrivalForm.recycleMan"
placeholder=
"请输入收车人"
></el-input>
...
...
@@ -601,6 +608,42 @@
</div>
</el-dialog>
<!-- 车辆保养弹窗 -->
<el-dialog
title=
"保养"
:visible
.
sync=
"upkeepDialogVisible"
>
<el-form
:model=
"upkeepForm"
:rules=
"rules"
ref=
"form"
label-width=
"90px"
>
<el-form-item
label=
"车牌号"
>
<el-input
v-model=
"upkeepForm.numberPlate"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"保养人"
prop=
"operator"
>
<el-input
v-model=
"upkeepForm.operator"
placeholder=
"请输入车辆保养人"
></el-input>
</el-form-item>
<el-form-item
label=
"公里数"
prop=
"mileage"
>
<el-input
v-model=
"upkeepForm.mileage"
placeholder=
"请输入保养时公里数"
></el-input>
</el-form-item>
<el-form-item
label=
"总费用"
prop=
"amount"
>
<el-input
v-model=
"upkeepForm.amount"
placeholder=
"请输入保养总费用"
></el-input>
</el-form-item>
<el-form-item
label=
"审批人"
prop=
"approvers"
>
<el-input
v-model=
"upkeepForm.approvers"
placeholder=
"请输入保养审批人"
></el-input>
</el-form-item>
<el-form-item
label=
"分公司"
prop=
"branchCompanyId"
>
<el-select
class=
"filter-item"
v-model=
"upkeepForm.branchCompanyId"
placeholder=
"请选择分公司"
>
<el-option
v-for=
"item in allCompanies"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"保养项目"
prop=
"upkeepItems"
>
<el-checkbox-group
v-model=
"upkeepForm.upkeepItems"
>
<el-checkbox
v-for=
"item in allUpkeepItems"
:label=
"item.id"
>
{{item.name}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancelUpkeep"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"upkeepVehicleHandler"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -625,9 +668,15 @@
import
{
departureVehicle
,
arrivalVehicle
arrivalVehicle
,
upkeepVehicle
,
upkeepEndVehicle
}
from
'api/vehicle/active'
;
import
{
getAllUpkeepItem
}
from
'api/vehicle/upkeep'
;
import
{
getSonRegionByCodes
,
getRegionByCodes
,
...
...
@@ -932,7 +981,20 @@
recycleMan
:
null
,
recycleManTel
:
null
,
mileage
:
null
}
},
upkeepDialogVisible
:
false
,
upkeepForm
:
{
vehicleId
:
null
,
numberPlate
:
null
,
operator
:
null
,
date
:
null
,
mileage
:
null
,
amount
:
null
,
approvers
:
null
,
branchCompanyId
:
null
,
upkeepItems
:
[]
},
allUpkeepItems
:
null
}
},
created
()
{
...
...
@@ -940,6 +1002,9 @@
getAllCompany
(
codeAndBranchCompany
=>
{
this
.
allCompanies
=
codeAndBranchCompany
;
});
getAllUpkeepItem
().
then
(
response
=>
{
this
.
allUpkeepItems
=
response
.
data
;
});
this
.
vehicleInfo_btn_edit
=
this
.
elements
[
'vehicleInfo:btn_edit'
];
this
.
vehicleInfo_btn_add
=
this
.
elements
[
'vehicleInfo:btn_add'
];
this
.
vehicleInfo_btn_apply
=
this
.
elements
[
'vehicleInfo:btn_apply'
];
...
...
@@ -1051,6 +1116,70 @@
}
},
methods
:
{
upkeepEndHandler
(
row
)
{
console
.
dir
(
row
);
this
.
$confirm
(
'此操作将结束保养, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
upkeepEndVehicle
({
vehicleId
:
row
.
id
}).
then
(()
=>
{
this
.
$notify
({
title
:
'成功'
,
message
:
'操作成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
getList
();
});
});
},
upkeepVehicleHandler
()
{
upkeepVehicle
(
this
.
upkeepForm
).
then
(
response
=>
{
if
(
response
.
code
===
rsCode
.
RS_CODE_SUC
)
{
this
.
upkeepDialogVisible
=
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
});
}
})
},
cancelUpkeep
()
{
this
.
cleanUpkeepForm
();
this
.
upkeepDialogVisible
=
false
;
},
upkeepHandler
(
row
)
{
this
.
cleanUpkeepForm
();
this
.
upkeepForm
.
vehicleId
=
row
.
id
;
this
.
upkeepForm
.
numberPlate
=
row
.
numberPlate
;
this
.
upkeepDialogVisible
=
true
;
},
cleanUpkeepForm
()
{
this
.
upkeepForm
=
{
vehicleId
:
null
,
numberPlate
:
null
,
operator
:
null
,
date
:
null
,
mileage
:
null
,
amount
:
null
,
approvers
:
null
,
branchCompanyId
:
null
,
upkeepItems
:
[]
}
},
handleDepartureLog
(
row
)
{
this
.
$router
.
push
({
path
:
'/vehicle/vehicleDepartureLog'
,
...
...
src/views/vehicle/vehicleUpkeepLog/index.vue
0 → 100644
View file @
790680cd
<
template
>
<div
class=
"app-container calendar-list-container"
>
<div
class=
"filter-container"
>
<el-input
@
keyup
.
enter
.
native=
"handleFilter"
style=
"width: 200px;"
class=
"filter-item"
placeholder=
"车牌号"
v-model=
"listQuery.numberPlate"
></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
style=
"width: 100%"
>
<el-table-column
align=
"center"
label=
"车牌号"
width=
"120"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
row
.
numberPlate
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"100"
align=
"center"
label=
"保养人"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
operator
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"保养日期"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
date
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"100"
align=
"center"
label=
"公里数"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
mileage
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"200"
align=
"center"
label=
"总费用"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
amount
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"250"
align=
"center"
label=
"审批人"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
approvers
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"250"
align=
"center"
label=
"保养分公司"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
branchCompanyName
}}
</span>
</
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, 50]"
:page-size=
"listQuery.limit"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"total"
></el-pagination>
</div>
</div>
</template>
<
script
>
import
{
logPage
}
from
'../../../api/vehicle/upkeep'
;
export
default
{
name
:
'vehicleUpkeepLog'
,
data
()
{
return
{
list
:
null
,
total
:
null
,
listLoading
:
true
,
listQuery
:
{
page
:
1
,
limit
:
20
,
numberPlate
:
undefined
},
tableKey
:
0
}
},
created
()
{
this
.
getList
();
},
methods
:
{
handleFilter
()
{
this
.
getList
();
},
getList
()
{
this
.
listLoading
=
true
;
logPage
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
listLoading
=
false
;
});
},
handleSizeChange
(
val
)
{
this
.
listQuery
.
limit
=
val
;
this
.
getList
();
},
handleCurrentChange
(
val
)
{
this
.
listQuery
.
page
=
val
;
this
.
getList
();
}
}
}
</
script
>
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