|
|
@@ -349,8 +349,16 @@ export default {
|
|
|
refundSendCost:this.orderInfo.refundSendCostAmount,
|
|
|
refundPackCost:this.orderInfo.refundPackCostAmount
|
|
|
};
|
|
|
- // 可隔天冲销:弹资金选项;否则走当天售后
|
|
|
- if (this.nextDayEligible) {
|
|
|
+ // 非当天 / 已结清 → 必须隔天售后(接口预检 + 本地兜底)
|
|
|
+ if (this.nextDayEligible || this.isMustNextDayOrder()) {
|
|
|
+ // 预检失败时用订单字段补齐资金弹窗参数
|
|
|
+ if (!this.nextDayEligible) {
|
|
|
+ this.orderCleared = Number(this.orderInfo.clearId) > 0
|
|
|
+ const payWay = Number(this.orderInfo.payWay)
|
|
|
+ const online = Number(this.orderInfo.onlinePay)
|
|
|
+ this.forceBalanceFund = (payWay === 2 || payWay === 3)
|
|
|
+ this.allowOriginalFund = online === 1 && (payWay === 0 || payWay === 1) && !this.forceBalanceFund
|
|
|
+ }
|
|
|
this.showForwardPop = true
|
|
|
return
|
|
|
}
|
|
|
@@ -366,6 +374,31 @@ export default {
|
|
|
that.submitRefund(that._pendingRefundParams)
|
|
|
})
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 本地判断是否必须隔天售后:非当天支付 / 已结账单 / 挂账已结清
|
|
|
+ * 与后端 NextDayRefundService::mustUseNextDay 对齐,预检接口失败时仍能拦住
|
|
|
+ */
|
|
|
+ isMustNextDayOrder() {
|
|
|
+ const info = this.orderInfo || {}
|
|
|
+ if (Number(info.clearId) > 0) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ const debtPrice = Number(info.debtPrice) || 0
|
|
|
+ const remainDebt = Number(info.remainDebtPrice) || 0
|
|
|
+ if (debtPrice > 0 && remainDebt === 0) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ const payTime = info.payTime || info.addTime || ''
|
|
|
+ if (!payTime || payTime === '0000-00-00 00:00:00') {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ const payDay = String(payTime).substr(0, 10)
|
|
|
+ const now = new Date()
|
|
|
+ const m = now.getMonth() + 1
|
|
|
+ const d = now.getDate()
|
|
|
+ const today = now.getFullYear() + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
|
|
|
+ return payDay !== today
|
|
|
+ },
|
|
|
/**
|
|
|
* 隔天冲销确认:写入 sameDay=0 + fundType 后提交
|
|
|
*/
|