|
@@ -1,8 +1,9 @@
|
|
|
-<!--
|
|
|
|
|
|
|
+ <!--
|
|
|
商城订单申请售后页
|
|
商城订单申请售后页
|
|
|
供订单详情「申请售后」进入;顾客勾选商品/金额后提交待审核申请,商家在 hdApp 审核
|
|
供订单详情「申请售后」进入;顾客勾选商品/金额后提交待审核申请,商家在 hdApp 审核
|
|
|
撤销后仍可重新申请:把已取消记录改回待审核
|
|
撤销后仍可重新申请:把已取消记录改回待审核
|
|
|
退货并退款金额:普通商品按勾选原价分摊会员折/满减;秒杀、团购按活动单价退,不再叠整单优惠
|
|
退货并退款金额:普通商品按勾选原价分摊会员折/满减;秒杀、团购按活动单价退,不再叠整单优惠
|
|
|
|
|
+ 红包全额抵扣导致实付为 0 时仍可申请:提交 0 元,审核通过后退回红包
|
|
|
-->
|
|
-->
|
|
|
<template>
|
|
<template>
|
|
|
<view class="refund-page">
|
|
<view class="refund-page">
|
|
@@ -286,6 +287,21 @@ export default {
|
|
|
return 0
|
|
return 0
|
|
|
}
|
|
}
|
|
|
return parseFloat(capped.toFixed(2))
|
|
return parseFloat(capped.toFixed(2))
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 现金为 0 仍可提交:红包未退回,且红包金额大于订单实付(与后端 canApplyRefund 一致)
|
|
|
|
|
+ */
|
|
|
|
|
+ allowZeroCashRefund() {
|
|
|
|
|
+ if (!(Number(this.orderInfo.hbId) > 0)) {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Number(this.couldRefundPrice) > 0) {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ const payAmount = Number(
|
|
|
|
|
+ this.orderInfo.mainPay != null ? this.orderInfo.mainPay : this.orderInfo.orderPrice
|
|
|
|
|
+ ) || 0
|
|
|
|
|
+ return Number(this.orderInfo.hbAmount || 0) > payAmount
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
@@ -554,7 +570,7 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (Number(this.refundMoney) <= 0) {
|
|
|
|
|
|
|
+ if (!(Number(this.refundMoney) > 0) && !this.allowZeroCashRefund) {
|
|
|
this.$msg('退款金额必须大于0')
|
|
this.$msg('退款金额必须大于0')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -562,9 +578,13 @@ export default {
|
|
|
this.$msg('退款金额超过可退金额')
|
|
this.$msg('退款金额超过可退金额')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ const money = Number(this.refundMoney) || 0
|
|
|
|
|
+ const content = money > 0
|
|
|
|
|
+ ? '申请退款 ¥' + this.refundMoney + ',提交后需商家审核'
|
|
|
|
|
+ : '订单实付为0,提交后将申请退回红包,需商家审核'
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '确认提交',
|
|
title: '确认提交',
|
|
|
- content: '申请退款 ¥' + this.refundMoney + ',提交后需商家审核',
|
|
|
|
|
|
|
+ content: content,
|
|
|
success: res => {
|
|
success: res => {
|
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
|
this.doSubmit(selectProduct)
|
|
this.doSubmit(selectProduct)
|