feat: 订单详情增加直接退款
This commit is contained in:
@@ -81,6 +81,15 @@
|
||||
<div>
|
||||
实收金额:
|
||||
<span style="color: red">¥{{ detail.payAmount }}</span>
|
||||
<el-button
|
||||
v-if="detail.status != 'unpaid' && detail.payAmount < detail.refundAmount"
|
||||
size="small"
|
||||
type="danger"
|
||||
class="u-m-l-10"
|
||||
@click="tuikuan()"
|
||||
>
|
||||
<span>退款</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -415,6 +424,10 @@ export default {
|
||||
this.update();
|
||||
},
|
||||
tuikuan(item) {
|
||||
if (!item) {
|
||||
this.$refs.refReturnMoney.open([], this.detail);
|
||||
return;
|
||||
}
|
||||
let arr = [];
|
||||
if (item === "all") {
|
||||
for (let i in this.detail.detailMap) {
|
||||
@@ -430,7 +443,6 @@ export default {
|
||||
if (arr.length == 0) {
|
||||
return ElMessage.error("请选择要退款的商品和数量");
|
||||
}
|
||||
this.selGoods = item;
|
||||
this.$refs.refReturnMoney.open(arr, this.detail);
|
||||
},
|
||||
tuicai(item) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog title="修改退款金额" width="410px" v-model="show" @close="reset" :modal="modal">
|
||||
<div class="u-flex u-col-top">
|
||||
<div class="u-flex u-col-top" v-if="goodsList && goodsList.length">
|
||||
<span class="u-m-0">退款商品</span>
|
||||
<div class="u-p-l-20 goods-list">
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user