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
96b4f098
Commit
96b4f098
authored
Jul 31, 2019
by
denghr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车辆预约信息
parent
8bc28350
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
200 additions
and
11 deletions
+200
-11
index.js
src/api/vehicle/bookRecord/index.js
+27
-0
index.vue
src/views/vehicle/bookRecord/index.vue
+173
-11
No files found.
src/api/vehicle/bookRecord/index.js
View file @
96b4f098
...
...
@@ -53,3 +53,30 @@ export function ret(data) {
data
:
data
});
}
/**
* 根据id获取一条违章查询记录
* @param query
*/
export
function
getOneIllegalRow
(
id
)
{
return
fetch
({
url
:
'/api/order/orderViolation/getOne/'
+
id
,
method
:
'get'
});
}
/**
* 保存违章记录
* @param query
* {price:图片地址(多个逗号分割)
price:退款总金额
detailId:租车订单id
}
*/
export
function
saveOrderViolation
(
params
)
{
return
fetch
({
url
:
'/vehicle/departure/app/save'
,
method
:
'post'
,
data
:
params
});
}
\ No newline at end of file
src/views/vehicle/bookRecord/index.vue
View file @
96b4f098
...
...
@@ -5,7 +5,7 @@
<el-form-item
label=
"申请状态"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.status"
placeholder=
"请选择申请状态"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"(val, key, index) in
getAllBookRecordStatus()
"
:key=
"val.code"
:label=
"val.val"
<el-option
v-for=
"(val, key, index) in
statusList
"
:key=
"val.code"
:label=
"val.val"
:value=
"val.code"
></el-option>
</el-select>
</el-form-item>
...
...
@@ -20,7 +20,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"
所属
公司"
>
<el-form-item
label=
"
停靠
公司"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.liftCompany"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
...
...
@@ -50,7 +50,7 @@
<el-table-column
align=
"center"
label=
"停靠公司"
width=
"120"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
park
CompanyName
}}
</span>
<span>
{{
scope
.
row
.
lift
CompanyName
}}
</span>
</
template
>
</el-table-column>
...
...
@@ -189,18 +189,18 @@
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"250"
>
<
template
scope=
"scope"
>
<
el-button
size=
"small"
type=
"success"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button
>
<el-button
v-if=
"scope.row.haveViolation"
size=
"small"
type=
"success"
@
click=
"weizhang
(scope.row)"
>
违章记录
</el-button>
<
!--
<el-button
size=
"small"
type=
"success"
@
click=
"handleBookInfo(scope.row)"
>
预订信息
</el-button>
--
>
<el-button
size=
"small"
type=
"success"
v-if=
"scope.row.status==3"
@
click=
"illegalInquiry
(scope.row)"
>
违章记录
</el-button>
<el-button
v-if=
"bookRecord_btn_prove&&scope.row.status==1"
size=
"small"
type=
"success"
@
click=
"handleProve(scope.row)"
>
通过
</el-button>
<el-button
v-if=
"bookRecord_btn_reject&&scope.row.status==1"
size=
"small"
type=
"danger"
@
click=
"handleReject(scope.row)"
>
驳回
</el-button>
<el-button
v-if=
"bookRecord_btn_lift && checkIfProved(scope.row.status)"
size=
"small"
type=
"success"
<
!--
<
el-button
v-if=
"bookRecord_btn_lift && checkIfProved(scope.row.status)"
size=
"small"
type=
"success"
@
click=
"handleLift(scope.row)"
>
提车
</el-button>
<el-button
v-if=
"bookRecord_btn_ret && checkIfLift(scope.row.status)"
size=
"small"
type=
"success"
@
click=
"handleRet(scope.row)"
>
还车
</el-button>
</el-button>
-->
<el-button
v-if=
"bookRecord_btn_unbook && checkIfProved(scope.row.status)"
size=
"small"
type=
"danger"
@
click=
"handleUnbook(scope.row)"
>
取消预定
</el-button>
...
...
@@ -439,6 +439,38 @@
</div>
</el-dialog>
<el-dialog
title=
"违章查询"
:visible
.
sync=
"illegalVisible"
>
<el-form>
<el-row>
<el-col>
<el-form-item
label=
"违章截图"
:style=
"{display:'block'}"
>
<el-upload
class=
"upload-demo"
:headers=
"getHeaderWithToken"
action=
"https://xxtest.upyuns.com/api/universal/file/app/unauth/admin/upload"
:on-remove=
"handleRemove"
:file-list=
"fileList2"
:on-success=
"handleSuccess"
list-type=
"picture-card"
>
<i
class=
"el-icon-plus"
></i>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item
label=
"违章罚款"
>
<el-input
v-model=
"price"
type=
"number"
placeholder=
"请输入违章罚款金额"
style=
"width: 50%;margin-right:10px"
></el-input>
元
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"okHandler('form')"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -450,7 +482,9 @@
getObj
,
lift
,
ret
,
unbook
unbook
,
getOneIllegalRow
,
saveOrderViolation
}
from
'api/vehicle/bookRecord'
;
...
...
@@ -477,7 +511,9 @@
deepCopyDate
,
newEast8Date
}
from
'utils/dateUtils'
;
import
{
getToken
}
from
'../../../utils/auth'
;
import
{
BOOK_RECORD_STATUS_APPLY
,
BOOK_RECORD_STATUS_PROVED
,
...
...
@@ -495,6 +531,40 @@
},
data
()
{
return
{
statusList
:[
{
code
:
'1'
,
val
:
'申请中'
},
{
code
:
'2'
,
val
:
'已通过'
},
{
code
:
'3'
,
val
:
'已归还'
},
{
code
:
'4'
,
val
:
'拒绝'
},
{
code
:
'5'
,
val
:
'逾期归还'
},
{
code
:
'6'
,
val
:
'取消预订'
},
{
code
:
'7'
,
val
:
'已提车'
},
],
detailId
:
''
,
illegalVisible
:
false
,
price
:
undefined
,
//违章罚款金额
fileList2
:[],
//违章截图
detailItem
:{},
dialogDetailVisible
:
false
,
baranchQuery
:
{
...
...
@@ -660,6 +730,9 @@
'elements'
,
'bookRecordStatus'
]),
getHeaderWithToken
()
{
return
{
Authorization
:
getToken
()};
},
//获取大区列表
getAllZoneList
(){
return
getAllZone
();
...
...
@@ -681,6 +754,84 @@
}
},
methods
:
{
/**
* 确定
* */
okHandler
()
{
let
arr
=
[];
this
.
fileList2
.
map
(
function
(
item
){
arr
.
push
(
item
.
url
);
});
let
params
=
{
illegalPic
:
arr
.
join
(
","
),
illegalAmount
:
this
.
price
,
id
:
this
.
detailId
,
};
saveOrderViolation
(
params
).
then
(
response
=>
{
if
(
response
.
status
===
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'创建成功'
,
type
:
'success'
,
duration
:
2000
});
this
.
illegalVisible
=
false
;
this
.
getList
();
}
else
{
this
.
$notify
({
title
:
'创建失败'
,
message
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
},
/**
* 上传成功
* */
handleSuccess
(
res
,
file
)
{
let
c
=
{
url
:
res
.
data
};
this
.
fileList2
.
push
(
c
);
this
.
showLoadingBody
=
false
;
},
/**
* 删除违章图片
* */
handleRemove
(
file
,
fileList
){
this
.
fileList2
=
fileList
;
},
/**
* 操作-违章查询按钮,显示违章弹框
*/
illegalInquiry
(
row
){
var
t
=
this
;
this
.
fileList2
=
[];
this
.
price
=
''
;
if
(
row
.
vehicleDepartureLogVo
.
illegalPic
){
let
arr
=
row
.
vehicleDepartureLogVo
.
illegalPic
.
split
(
","
);
let
fileList2
=
[];
let
p
=
{};
arr
.
map
(
function
(
item
){
p
=
{
url
:
item
};
fileList2
.
push
(
p
);
});
t
.
fileList2
=
fileList2
;
}
if
(
row
.
vehicleDepartureLogVo
.
illegalAmount
){
t
.
price
=
parseFloat
(
row
.
vehicleDepartureLogVo
.
illegalAmount
);
}
this
.
detailId
=
row
.
vehicleDepartureLogVo
.
id
;
this
.
illegalVisible
=
true
;
},
/**
* 弹框-取消
* */
cancel
()
{
this
.
illegalVisible
=
false
;
},
handleDetail
(
row
){
this
.
detailItem
=
row
;
this
.
dialogDetailVisible
=
true
;
...
...
@@ -1020,7 +1171,14 @@
}).
then
(()
=>
{
unbook
(
row
.
id
)
.
then
(
response
=>
{
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
)
{
if
(
response
.
status
==
500
){
this
.
$notify
({
title
:
'失败'
,
message
:
response
.
message
,
type
:
'error'
,
duration
:
2000
});
}
else
if
(
response
.
code
===
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
)
{
this
.
$notify
({
title
:
'失败'
,
message
:
rsCode
.
msg
[
rsCode
.
code
.
VEHICLE_BOOKED_INFO_ALREADY_CHANGED
],
...
...
@@ -1043,7 +1201,11 @@
});
}
this
.
getList
();
});
}).
catch
(
response
=>
{
console
.
log
(
response
)
}
);
});
},
resetTemp4Lift
()
{
...
...
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