|
|
@@ -215,6 +215,12 @@
|
|
|
{{ afterSales.auditRemark }}
|
|
|
</span>
|
|
|
</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="退款类型" v-if="isRefundedOrder">
|
|
|
+ <span>{{ refundScopeType || '-' }}</span>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="退款金额" v-if="isRefundedOrder">
|
|
|
+ <span>{{ displayRefundAmount != null ? displayRefundAmount : '-' }}</span>
|
|
|
+ </el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
<div style="margin: 20px 0px" v-if="order!=null">
|
|
|
<span class="font-small">
|
|
|
@@ -1110,6 +1116,43 @@ export default {
|
|
|
removeProductLoading: false
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ isRefundedOrder() {
|
|
|
+ if (!this.order || this.order.status == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const status = Number(this.order.status);
|
|
|
+ return status === -1 || status === -2;
|
|
|
+ },
|
|
|
+ displayRefundAmount() {
|
|
|
+ if (!this.isRefundedOrder) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ let amount = null;
|
|
|
+ if (this.afterSales && this.afterSales.refundAmount != null) {
|
|
|
+ amount = this.afterSales.refundAmount;
|
|
|
+ } else if (this.order.refundPrice != null) {
|
|
|
+ amount = this.order.refundPrice;
|
|
|
+ }
|
|
|
+ if (amount == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return Number(amount).toFixed(2);
|
|
|
+ },
|
|
|
+ refundScopeType() {
|
|
|
+ if (!this.isRefundedOrder) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ const refundRaw = this.afterSales && this.afterSales.refundAmount != null
|
|
|
+ ? this.afterSales.refundAmount
|
|
|
+ : this.order.refundPrice;
|
|
|
+ const payRaw = this.order.payMoney != null ? this.order.payMoney : this.order.payPrice;
|
|
|
+ if (refundRaw == null || payRaw == null) {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ return Number(refundRaw) < Number(payRaw) ? '部分退款' : '全额退款';
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getDicts("store_order_delivery_status").then((response) => {
|
|
|
this.deliveryStatusOptions = response.data;
|