|
|
@@ -170,8 +170,9 @@
|
|
|
<template #default="scope">
|
|
|
<el-button-group>
|
|
|
<el-button size="small" text @click="table_view(scope.row)">详情</el-button>
|
|
|
- <el-button type="danger" size="small" text @click="table_refund(scope.row)" v-if="scope.row.status==8">同意退款</el-button>
|
|
|
+ <el-button type="warning" size="small" text @click="table_refund(scope.row)" v-if="scope.row.status==8">同意退款</el-button>
|
|
|
<el-button type="danger" size="small" text @click="refund_detail(scope.row)" v-if="scope.row.status==9">处理退款</el-button>
|
|
|
+ <el-button type="danger" size="small" text @click="table_refund_cancel(scope.row)">取消退款</el-button>
|
|
|
</el-button-group>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -204,6 +205,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ table_refund_cancel(data){
|
|
|
+ var state = "履约中";
|
|
|
+ if (data.status == 9) {
|
|
|
+ state = "已完成";
|
|
|
+ }
|
|
|
+ this.$confirm(`取消退款申请后,订单将恢复到【${state}】状态,用户可二次申请`, '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ var loading = this.$loading();
|
|
|
+ var resp = await this.$API.merOrder.refundCanacel.post({"order":data.out_order_no,});
|
|
|
+ loading.close();
|
|
|
+ if (resp.code == 0) {
|
|
|
+ return this.$message.error(resp.msg);
|
|
|
+ }
|
|
|
+ this.$message.success(resp.msg);
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
refund_detail(data){
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.refundMain.open().setData(data)
|