Commit 9001cbaf authored by jiaorz's avatar jiaorz

123

parent 1b2c0045
......@@ -187,7 +187,7 @@
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)"
@click="handleViolatePrice(scope.row)"
>取消订单</el-button>
</template>
</el-table-column>
......@@ -442,7 +442,8 @@ import {
getAllBranchCompanyByZoneId,
getOrderVehicleCrosstown,
getStep,
calculate
calculate,
getViolatePrice
} from 'api/order/rentVehicle'
import { timestamp2Date } from 'utils/dateUtils'
import { mapGetters } from 'vuex'
......@@ -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) {
this.form = row
if (this.form.status == 2) {
......
......@@ -108,9 +108,15 @@
<span v-if="scope.row.status == '6'">已完成</span>
</template>
</el-table-column>
<el-table-column width="110" align="center" label="订单详情" fixed="right">
<el-table-column width="200" align="center" label="订单详情" fixed="right">
<template scope="scope">
<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>
</el-table-column>
</el-table>
......@@ -133,7 +139,8 @@
import {
page,
getAllBranchCompany,
getAllBranchCompanyByZoneId
getAllBranchCompanyByZoneId,
calculate
} from 'api/order/rentVehicle';
import {mapGetters} from 'vuex';
import rsCode from '../../../utils/rsCode';
......@@ -368,6 +375,40 @@
this.tourRow = row;
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) {
this.listQuery.zoneId = item
this.baranchQuery.zoneId = item
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment