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
069a06c3
Commit
069a06c3
authored
Apr 14, 2020
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1456
parent
18f8da7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
5 deletions
+98
-5
rentVehicle.js
src/api/order/rentVehicle.js
+9
-0
illegalModal.vue
src/views/order/rentVehicleInfo/illegalModal.vue
+88
-5
index.vue
src/views/order/rentVehicleInfo/index.vue
+1
-0
No files found.
src/api/order/rentVehicle.js
View file @
069a06c3
...
@@ -171,3 +171,12 @@ export function orderDetail(query) {
...
@@ -171,3 +171,12 @@ export function orderDetail(query) {
params
:
query
params
:
query
});
});
}
}
export
function
refund
(
orderNo
)
{
return
fetch
({
url
:
'api/order/baseOrder/app/unauth/refundDeposit/'
+
orderNo
,
method
:
'get'
});
}
src/views/order/rentVehicleInfo/illegalModal.vue
View file @
069a06c3
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"
cancel"
>
取 消
</el-button>
<el-button
@
click=
"
refundMoney"
v-if =
"orderDetailInfo.refundStatus == 2"
>
立即退款
</el-button>
<el-button
type=
"primary"
@
click=
"okHandler('form')"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"okHandler('form')"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -104,7 +104,7 @@ import { page, saveOrderViolation } from 'api/order/rentVehicle'
...
@@ -104,7 +104,7 @@ import { page, saveOrderViolation } from 'api/order/rentVehicle'
import
{
mapGetters
}
from
'vuex'
import
{
mapGetters
}
from
'vuex'
import
{
formatDate
}
from
'../../../utils/dateFormattor'
import
{
formatDate
}
from
'../../../utils/dateFormattor'
import
{
getToken
}
from
'../../../utils/auth'
import
{
getToken
}
from
'../../../utils/auth'
import
{
getOneIllegalRow
}
from
'api/order/rentVehicle'
import
{
getOneIllegalRow
,
orderDetail
,
refund
}
from
'api/order/rentVehicle'
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'
...
@@ -123,12 +123,19 @@ export default {
...
@@ -123,12 +123,19 @@ export default {
data
()
{
data
()
{
return
{
return
{
BASE_API
:
process
.
env
.
BASE_API
,
BASE_API
:
process
.
env
.
BASE_API
,
price
:
undefined
,
//违章罚款金额
price
:
0
,
//违章罚款金额
isVisible
:
false
,
isVisible
:
false
,
fileList2
:
[]
//违章截图
fileList2
:
[],
//违章截图
refundStatus
:
0
,
orderDetailInfo
:{}
}
}
},
},
created
()
{},
created
()
{
console
.
log
(
this
.
row
)
console
.
log
(
this
.
row
.
orderNo
)
this
.
getOrderDetail
(
this
.
row
.
orderNo
);
},
watch
:
{
watch
:
{
isVisible
(
newValue
,
oldValue
)
{
isVisible
(
newValue
,
oldValue
)
{
if
(
!
newValue
)
{
if
(
!
newValue
)
{
...
@@ -182,6 +189,81 @@ export default {
...
@@ -182,6 +189,81 @@ export default {
}
}
})
})
},
},
refundMoney
()
{
let
that
=
this
;
console
.
log
(
that
.
orderDetailInfo
)
var
orderNo
=
that
.
orderDetailInfo
.
no
//1、查询订单押金状态
if
(
that
.
orderDetailInfo
.
refundStatus
==
2
)
{
//可以退还
var
money
=
that
.
orderDetailInfo
.
orderRentVehicleDetail
.
returnPayResidue
-
that
.
price
console
.
log
(
money
)
that
.
$confirm
(
'违章罚款金'
+
that
.
price
+
"元, 将退还"
+
money
+
"元"
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
if
(
that
.
price
<=
0
)
{
//当金额小于0直接退款
refund
(
orderNo
).
then
(()
=>
{
that
.
$notify
({
title
:
'成功'
,
message
:
'退款成功'
,
type
:
'success'
,
duration
:
2000
})
})
}
else
{
//当金额大于0先添加记录,再退款
that
.
okHandler
();
setTimeout
(
refund
(
orderNo
).
then
(()
=>
{
that
.
$notify
({
title
:
'成功'
,
message
:
'退款成功'
,
type
:
'success'
,
duration
:
2000
})
}),
2000
)
}
})
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'订单当前不能退还违章保证金!'
,
type
:
'error'
,
duration
:
2000
})
}
},
refund
(
orderNo
)
{
refund
(
orderNo
).
then
(
data
=>
{
if
(
data
.
status
==
200
)
{
console
.
log
(
data
)
this
.
$notify
({
title
:
'成功'
,
message
:
'押金退还成功!'
,
type
:
'success'
,
duration
:
2000
})
}
})
},
getOrderDetail
(
orderNo
)
{
let
param
=
{
"orderNo"
:
orderNo
,
"flag"
:
true
}
orderDetail
(
param
).
then
(
data
=>
{
console
.
log
(
data
)
if
(
data
.
status
==
200
)
{
this
.
orderDetailInfo
=
data
.
data
}
})
},
/**
/**
* 上传成功
* 上传成功
* */
* */
...
@@ -218,6 +300,7 @@ export default {
...
@@ -218,6 +300,7 @@ export default {
type
:
'success'
,
type
:
'success'
,
duration
:
2000
duration
:
2000
})
})
//添加退款
this
.
$emit
(
'illegalEvent'
,
false
)
this
.
$emit
(
'illegalEvent'
,
false
)
}
else
{
}
else
{
this
.
$notify
({
this
.
$notify
({
...
...
src/views/order/rentVehicleInfo/index.vue
View file @
069a06c3
...
@@ -1248,6 +1248,7 @@ export default {
...
@@ -1248,6 +1248,7 @@ export default {
* */
* */
illegalEvent
(
params
)
{
illegalEvent
(
params
)
{
this
.
illegalVisible
=
false
this
.
illegalVisible
=
false
console
.
log
(
params
)
if
(
params
)
{
if
(
params
)
{
}
}
},
},
...
...
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