Commit 8f2534dc authored by guoyou's avatar guoyou

会员订单管理修复

parents 87d1c22f 69502ce6
...@@ -98,6 +98,17 @@ export function calculate(no, params) { ...@@ -98,6 +98,17 @@ export function calculate(no, params) {
}); });
} }
/**
* @param {Object} no
* @param {Object} params计算违约价格
*/
export function getViolatePrice(no) {
return fetch({
url: '/api/order/orderRefund/back-stage/getViolatePrice/'+ no,
method: 'post',
});
}
//创建订单 //创建订单
export function orderStatistics(params) { export function orderStatistics(params) {
return fetch({ return fetch({
......
...@@ -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) {
......
...@@ -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="110" align="center" label="订单详情" fixed="right"> <el-table-column width="200" 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
......
...@@ -1484,7 +1484,7 @@ ...@@ -1484,7 +1484,7 @@
if (type==2&&name && mobile) { if (type==2&&name && mobile) {
return name+' '+mobile; return name+' '+mobile;
} }
return ''; return '';
}, },
templateModel(){ templateModel(){
this.costDetail= { this.costDetail= {
......
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