fix: 修复bug
parent
7cc0e41cf6
commit
87a50fa476
|
@ -34,6 +34,14 @@ export function getRechargeOrder(id) {
|
|||
})
|
||||
}
|
||||
|
||||
// 发起退款
|
||||
export function refundRechargeOrder(data) {
|
||||
return request({
|
||||
url: '/shop/recharge-order/memberRefund',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得订单分页
|
||||
export function getRechargeOrderPage(query) {
|
||||
return request({
|
||||
|
|
|
@ -62,13 +62,30 @@
|
|||
<dict-tag :type="DICT_TYPE.PAY_TYPE" :value="scope.row.payType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付状态" align="center" prop="paid" />
|
||||
<el-table-column label="支付状态" align="center">
|
||||
<template v-slot="scope">
|
||||
<span>已支付</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款状态" align="center">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.refundStatus === 0">未退款</span>
|
||||
<span v-else-if="scope.row.refundStatus === 1">申请中</span>
|
||||
<span v-else-if="scope.row.refundStatus === 2">已退款</span>
|
||||
<span v-else-if="scope.row.refundStatus === 3">退款中</span>
|
||||
<span v-else-if="scope.row.refundStatus === 4">拒绝退款</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
||||
<template v-if="scope.row.refundStatus === 1">
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleRefund(scope.row, 1)"
|
||||
v-hasPermi="['shop:recharge-order:delete']">同意退款</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleRefund(scope.row, 2)"
|
||||
v-hasPermi="['shop:recharge-order:delete']">拒绝退款</el-button>
|
||||
</template>
|
||||
<el-button v-if="scope.row.refundStatus !== 2 || scope.row.refundStatus !== 3" size="mini" type="text" icon="el-icon-edit" @click="handleRefund(scope.row, 3)"
|
||||
v-hasPermi="['shop:recharge-order:update']">发起退款</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['shop:recharge-order:delete']">同意退款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -81,7 +98,15 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { createRechargeOrder, updateRechargeOrder, deleteRechargeOrder, getRechargeOrder, getRechargeOrderPage, exportRechargeOrderExcel } from "@/api/shop/rechargeOrder";
|
||||
import {
|
||||
createRechargeOrder,
|
||||
updateRechargeOrder,
|
||||
deleteRechargeOrder,
|
||||
getRechargeOrder,
|
||||
getRechargeOrderPage,
|
||||
exportRechargeOrderExcel,
|
||||
refundRechargeOrder
|
||||
} from '@/api/shop/rechargeOrder';
|
||||
import {DICT_TYPE} from "@/utils/dict";
|
||||
|
||||
export default {
|
||||
|
@ -179,6 +204,9 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleReview(row, status){
|
||||
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -249,15 +277,18 @@ export default {
|
|||
this.open = true;
|
||||
this.title = "添加订单";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
/** 退款按钮操作 */
|
||||
handleRefund(row, type) {
|
||||
const id = row.id;
|
||||
getRechargeOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改订单";
|
||||
});
|
||||
this.$modal.confirm('是否退款订单编号为"' + id + '"的数据?').then(function() {
|
||||
return refundRechargeOrder({
|
||||
orderId: id,
|
||||
type: type
|
||||
});
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("发起退款成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
|
Loading…
Reference in New Issue