Merge remote-tracking branch 'origin/feature/mall_product' into feature/mall_product
commit
6eaa2f70b5
|
@ -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) {
|
export function getRechargeOrderPage(query) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -66,13 +66,30 @@
|
||||||
<dict-tag :type="DICT_TYPE.PAY_TYPE" :value="scope.row.payType"/>
|
<dict-tag :type="DICT_TYPE.PAY_TYPE" :value="scope.row.payType"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template v-slot="scope">
|
<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>
|
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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -85,7 +102,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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";
|
import {DICT_TYPE} from "@/utils/dict";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -183,6 +208,9 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleReview(row, status){
|
||||||
|
|
||||||
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -253,15 +281,18 @@ export default {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加订单";
|
this.title = "添加订单";
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 退款按钮操作 */
|
||||||
handleUpdate(row) {
|
handleRefund(row, type) {
|
||||||
this.reset();
|
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
getRechargeOrder(id).then(response => {
|
this.$modal.confirm('是否退款订单编号为"' + id + '"的数据?').then(function() {
|
||||||
this.form = response.data;
|
return refundRechargeOrder({
|
||||||
this.open = true;
|
orderId: id,
|
||||||
this.title = "修改订单";
|
type: type
|
||||||
});
|
});
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("发起退款成功");
|
||||||
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
|
Loading…
Reference in New Issue