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
9001cbaf
Commit
9001cbaf
authored
Oct 31, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
1b2c0045
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
4 deletions
+65
-4
index.vue
src/views/order/rentVehicleInfo/index.vue
+22
-2
index.vue
src/views/order/tourOrderInfo/index.vue
+43
-2
No files found.
src/views/order/rentVehicleInfo/index.vue
View file @
9001cbaf
...
@@ -187,7 +187,7 @@
...
@@ -187,7 +187,7 @@
size=
"small"
size=
"small"
v-if=
"scope.row.status == 3 || scope.row.status == 4"
v-if=
"scope.row.status == 3 || scope.row.status == 4"
class=
"el-button el-button--text el-button--small"
class=
"el-button el-button--text el-button--small"
@
click=
"
cancel
(scope.row)"
@
click=
"
handleViolatePrice
(scope.row)"
>
取消订单
</el-button>
>
取消订单
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -442,7 +442,8 @@ import {
...
@@ -442,7 +442,8 @@ import {
getAllBranchCompanyByZoneId
,
getAllBranchCompanyByZoneId
,
getOrderVehicleCrosstown
,
getOrderVehicleCrosstown
,
getStep
,
getStep
,
calculate
calculate
,
getViolatePrice
}
from
'api/order/rentVehicle'
}
from
'api/order/rentVehicle'
import
{
timestamp2Date
}
from
'utils/dateUtils'
import
{
timestamp2Date
}
from
'utils/dateUtils'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
...
@@ -722,6 +723,25 @@ export default {
...
@@ -722,6 +723,25 @@ export default {
})
})
})
})
},
},
handleViolatePrice
(
row
)
{
let
params
=
{
cancelReason
:
'后台取消'
,
appUserId
:
row
.
userId
}
getViolatePrice
(
row
.
no
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
console
.
log
(
data
)
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'获取违约金失败'
,
type
:
'success'
,
duration
:
2000
})
}
})
},
handleOrderDetail
(
row
)
{
handleOrderDetail
(
row
)
{
this
.
form
=
row
this
.
form
=
row
if
(
this
.
form
.
status
==
2
)
{
if
(
this
.
form
.
status
==
2
)
{
...
...
src/views/order/tourOrderInfo/index.vue
View file @
9001cbaf
...
@@ -108,9 +108,15 @@
...
@@ -108,9 +108,15 @@
<span
v-if=
"scope.row.status == '6'"
>
已完成
</span>
<span
v-if=
"scope.row.status == '6'"
>
已完成
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
width=
"
11
0"
align=
"center"
label=
"订单详情"
fixed=
"right"
>
<el-table-column
width=
"
20
0"
align=
"center"
label=
"订单详情"
fixed=
"right"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
style=
"color: #13CE66;cursor: pointer;"
@
click=
"handleBuy(scope.row)"
>
订单详情
</span>
<span
style=
"color: #13CE66;cursor: pointer;"
@
click=
"handleBuy(scope.row)"
>
订单详情
</span>
<el-button
size=
"small"
v-if=
"scope.row.status == 3 || scope.row.status == 4"
class=
"el-button el-button--text el-button--small"
@
click=
"cancel(scope.row)"
>
取消订单
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -133,7 +139,8 @@
...
@@ -133,7 +139,8 @@
import
{
import
{
page
,
page
,
getAllBranchCompany
,
getAllBranchCompany
,
getAllBranchCompanyByZoneId
getAllBranchCompanyByZoneId
,
calculate
}
from
'api/order/rentVehicle'
;
}
from
'api/order/rentVehicle'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
}
from
'vuex'
;
import
rsCode
from
'../../../utils/rsCode'
;
import
rsCode
from
'../../../utils/rsCode'
;
...
@@ -368,6 +375,40 @@
...
@@ -368,6 +375,40 @@
this
.
tourRow
=
row
;
this
.
tourRow
=
row
;
this
.
tourDialogVisible
=
true
;
this
.
tourDialogVisible
=
true
;
},
},
/**
* 取消订单
*/
cancel
(
row
)
{
this
.
$confirm
(
'此操作将取消该订单, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
let
params
=
{
cancelReason
:
'后台取消'
,
appUserId
:
row
.
userId
}
calculate
(
row
.
no
,
params
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
this
.
$notify
({
title
:
'成功'
,
message
:
'取消订单成功'
,
type
:
'success'
,
duration
:
2000
})
this
.
getList
()
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'取消订单失败'
,
type
:
'success'
,
duration
:
2000
})
}
})
})
},
getProvinceRegions
(
item
)
{
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zoneId
=
item
this
.
listQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
...
...
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