|
@@ -2,9 +2,9 @@
|
|
|
退款结果页 / 资金落地 / 返充凭证海报
|
|
退款结果页 / 资金落地 / 返充凭证海报
|
|
|
用途:
|
|
用途:
|
|
|
1) 无原单退款、线下原单售后成功后:选手选「已线下转账」或「返充到客户余额」
|
|
1) 无原单退款、线下原单售后成功后:选手选「已线下转账」或「返充到客户余额」
|
|
|
- 2) 已返充余额:绘制退款凭证海报
|
|
|
|
|
- 3) 已原路退回:简单成功提示
|
|
|
|
|
- 谁用:freeRefundConfirm、refund.vue 线下售后、售后详情/列表补发。
|
|
|
|
|
|
|
+ 2) 已返充余额、挂账原路:绘制带小程序码的退款凭证海报
|
|
|
|
|
+ 3) 其它原路退回:说明退到哪里、怎么退
|
|
|
|
|
+ 谁用:freeRefundConfirm、refund.vue 售后、售后详情/列表补发。
|
|
|
-->
|
|
-->
|
|
|
<template>
|
|
<template>
|
|
|
<view class="forward-result-page">
|
|
<view class="forward-result-page">
|
|
@@ -26,8 +26,9 @@
|
|
|
<button class="admin-button-com big action-btn" @click="goBack">返回首页</button>
|
|
<button class="admin-button-com big action-btn" @click="goBack">返回首页</button>
|
|
|
</appResult>
|
|
</appResult>
|
|
|
|
|
|
|
|
- <!-- 已返充余额:凭证海报 -->
|
|
|
|
|
- <appResult v-else-if="showPoster" title="退款成功">
|
|
|
|
|
|
|
+ <!-- 已返充 / 挂账原路:凭证海报(含小程序码) -->
|
|
|
|
|
+ <appResult v-else-if="showPoster" :title="posterPageTitle">
|
|
|
|
|
+ <text v-if="posterUrl && originReturnDesc" class="origin-desc">{{ originReturnDesc }}</text>
|
|
|
<view v-if="posterLoading" class="status-text">凭证生成中...</view>
|
|
<view v-if="posterLoading" class="status-text">凭证生成中...</view>
|
|
|
<view v-else-if="posterFail" class="fail-box">
|
|
<view v-else-if="posterFail" class="fail-box">
|
|
|
<text class="status-text fail-text">凭证生成失败,请重试</text>
|
|
<text class="status-text fail-text">凭证生成失败,请重试</text>
|
|
@@ -57,9 +58,10 @@
|
|
|
</button>
|
|
</button>
|
|
|
</appResult>
|
|
</appResult>
|
|
|
|
|
|
|
|
- <!-- 已原路 / 其它终态 -->
|
|
|
|
|
|
|
+ <!-- 已原路 / 其它终态(非挂账海报场景) -->
|
|
|
<appResult v-else :title="pageTitle">
|
|
<appResult v-else :title="pageTitle">
|
|
|
<text class="simple-success">{{ simpleSuccessText }}</text>
|
|
<text class="simple-success">{{ simpleSuccessText }}</text>
|
|
|
|
|
+ <text v-if="originReturnDesc" class="origin-desc">{{ originReturnDesc }}</text>
|
|
|
<button class="admin-button-com big action-btn" @click="goBack">
|
|
<button class="admin-button-com big action-btn" @click="goBack">
|
|
|
{{ mode === 'repost' ? '返回' : '返回首页' }}
|
|
{{ mode === 'repost' ? '返回' : '返回首页' }}
|
|
|
</button>
|
|
</button>
|
|
@@ -110,7 +112,9 @@ export default {
|
|
|
posterLoading: false,
|
|
posterLoading: false,
|
|
|
posterFail: false,
|
|
posterFail: false,
|
|
|
canvasW: 360,
|
|
canvasW: 360,
|
|
|
- canvasH: 640
|
|
|
|
|
|
|
+ canvasH: 640,
|
|
|
|
|
+ // 当天=1 / 跨天=0,挂账海报文案区分减欠款 vs 加余额
|
|
|
|
|
+ sameDay: 1
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -120,20 +124,83 @@ export default {
|
|
|
&& Number(this.returnBalance) === 0
|
|
&& Number(this.returnBalance) === 0
|
|
|
&& (Number(this.needFundAction) === 1 || Number(this.orderId) === 0)
|
|
&& (Number(this.needFundAction) === 1 || Number(this.orderId) === 0)
|
|
|
},
|
|
},
|
|
|
- /** 已返充:展示海报 */
|
|
|
|
|
|
|
+ /** 挂账原路已完成(需出凭证海报) */
|
|
|
|
|
+ isDebtOriginReturn() {
|
|
|
|
|
+ return Number(this.hasReturn) === 1
|
|
|
|
|
+ && Number(this.returnBalance) === 0
|
|
|
|
|
+ && Number(this.payWay) === 3
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 已返充或挂账原路:展示带小程序码的凭证海报 */
|
|
|
showPoster() {
|
|
showPoster() {
|
|
|
- return Number(this.returnBalance) === 1
|
|
|
|
|
|
|
+ return Number(this.returnBalance) === 1 || this.isDebtOriginReturn
|
|
|
|
|
+ },
|
|
|
|
|
+ posterPageTitle() {
|
|
|
|
|
+ if (this.isDebtOriginReturn) return '原路退回成功'
|
|
|
|
|
+ return '退款成功'
|
|
|
},
|
|
},
|
|
|
pageTitle() {
|
|
pageTitle() {
|
|
|
if (Number(this.hasReturn) === 1) return '原路退回成功'
|
|
if (Number(this.hasReturn) === 1) return '原路退回成功'
|
|
|
return '退款成功'
|
|
return '退款成功'
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 海报导语:返充 / 挂账减欠 / 挂账退余额 */
|
|
|
|
|
+ posterStatusText() {
|
|
|
|
|
+ if (Number(this.returnBalance) === 1) return '已返充到余额'
|
|
|
|
|
+ if (this.isDebtOriginReturn) {
|
|
|
|
|
+ return Number(this.sameDay) === 0 ? '挂账原路已退回余额' : '已按挂账原路减少欠款'
|
|
|
|
|
+ }
|
|
|
|
|
+ return '退款成功'
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 成功主文案:原路时写清退到哪里
|
|
|
|
|
+ */
|
|
|
simpleSuccessText() {
|
|
simpleSuccessText() {
|
|
|
const amt = this.formatMoney(this.amount)
|
|
const amt = this.formatMoney(this.amount)
|
|
|
- if (Number(this.hasReturn) === 1) {
|
|
|
|
|
- return `已原路退回 ¥${amt}`
|
|
|
|
|
|
|
+ if (Number(this.hasReturn) !== 1) {
|
|
|
|
|
+ return `退款成功,金额 ¥${amt}`
|
|
|
|
|
+ }
|
|
|
|
|
+ const payWay = Number(this.payWay)
|
|
|
|
|
+ const online = Number(this.onlinePay) === 2
|
|
|
|
|
+ if (payWay === 0) {
|
|
|
|
|
+ return online ? `已原路退回到客户微信 ¥${amt}` : `已原路退回(线下微信)¥${amt}`
|
|
|
|
|
+ }
|
|
|
|
|
+ if (payWay === 1) {
|
|
|
|
|
+ return online ? `已原路退回到客户支付宝 ¥${amt}` : `已原路退回(线下支付宝)¥${amt}`
|
|
|
|
|
+ }
|
|
|
|
|
+ if (payWay === 2) return `已原路退回到客户余额 ¥${amt}`
|
|
|
|
|
+ if (payWay === 3) {
|
|
|
|
|
+ return Number(this.sameDay) === 0
|
|
|
|
|
+ ? `挂账原路已退回客户余额 ¥${amt}`
|
|
|
|
|
+ : `已按挂账原路减少欠款 ¥${amt}`
|
|
|
}
|
|
}
|
|
|
- return `退款成功,金额 ¥${amt}`
|
|
|
|
|
|
|
+ if (payWay === 4) return `已原路退回(现金)¥${amt}`
|
|
|
|
|
+ if (payWay === 5) return `已原路退回(银行卡)¥${amt}`
|
|
|
|
|
+ return `已原路退回 ¥${amt}`
|
|
|
|
|
+ },
|
|
|
|
|
+ /** 原路补充说明:怎么退的 */
|
|
|
|
|
+ originReturnDesc() {
|
|
|
|
|
+ if (Number(this.returnBalance) === 1) {
|
|
|
|
|
+ return '金额已返充到客户余额,可长按下方凭证转发给客户。'
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Number(this.hasReturn) !== 1) return ''
|
|
|
|
|
+ const payWay = Number(this.payWay)
|
|
|
|
|
+ const online = Number(this.onlinePay) === 2
|
|
|
|
|
+ if (payWay === 0 && online) {
|
|
|
|
|
+ return '退款已按原支付通道退回客户微信。'
|
|
|
|
|
+ }
|
|
|
|
|
+ if (payWay === 1 && online) {
|
|
|
|
|
+ return '退款已按原支付通道退回客户支付宝。'
|
|
|
|
|
+ }
|
|
|
|
|
+ if (payWay === 2) return '金额已自动加回该客户账户余额。'
|
|
|
|
|
+ if (payWay === 3) {
|
|
|
|
|
+ if (Number(this.sameDay) === 0) {
|
|
|
|
|
+ return '退款金额已加回客户余额。可长按下方凭证转发给客户核对。'
|
|
|
|
|
+ }
|
|
|
|
|
+ return '该笔售后已自动冲减客户挂账欠款。可长按下方凭证转发给客户核对。'
|
|
|
|
|
+ }
|
|
|
|
|
+ if (payWay === 0 || payWay === 1) {
|
|
|
|
|
+ return '已按原单线下支付方式标记原路退回,请确认客户已收到退款。'
|
|
|
|
|
+ }
|
|
|
|
|
+ return '退款已按原单方式完成原路退回。'
|
|
|
},
|
|
},
|
|
|
payWayLabel() {
|
|
payWayLabel() {
|
|
|
const payWay = Number(this.payWay)
|
|
const payWay = Number(this.payWay)
|
|
@@ -189,7 +256,9 @@ export default {
|
|
|
if (!this.needFundAction && Number(this.hasReturn) === 0 && Number(this.returnBalance) === 0 && Number(this.orderId) === 0) {
|
|
if (!this.needFundAction && Number(this.hasReturn) === 0 && Number(this.returnBalance) === 0 && Number(this.orderId) === 0) {
|
|
|
this.needFundAction = 1
|
|
this.needFundAction = 1
|
|
|
}
|
|
}
|
|
|
|
|
+ this.sameDay = payload.sameDay != null ? Number(payload.sameDay) : 1
|
|
|
|
|
|
|
|
|
|
+ // 返充或挂账原路:生成带小程序码的凭证海报
|
|
|
if (this.showPoster && this.customId > 0) {
|
|
if (this.showPoster && this.customId > 0) {
|
|
|
this.generatePoster()
|
|
this.generatePoster()
|
|
|
}
|
|
}
|
|
@@ -211,7 +280,8 @@ export default {
|
|
|
hasReturn: this.hasReturn,
|
|
hasReturn: this.hasReturn,
|
|
|
couldReturn: this.couldReturn,
|
|
couldReturn: this.couldReturn,
|
|
|
returnBalance: this.returnBalance,
|
|
returnBalance: this.returnBalance,
|
|
|
- needFundAction: this.needFundAction
|
|
|
|
|
|
|
+ needFundAction: this.needFundAction,
|
|
|
|
|
+ sameDay: this.sameDay
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -258,6 +328,10 @@ export default {
|
|
|
that.needFundAction = 0
|
|
that.needFundAction = 0
|
|
|
that.persistPayload()
|
|
that.persistPayload()
|
|
|
that.$msg && that.$msg('已标记原路退回')
|
|
that.$msg && that.$msg('已标记原路退回')
|
|
|
|
|
+ // 挂账原路标记后生成凭证海报
|
|
|
|
|
+ if (that.showPoster && that.customId > 0) {
|
|
|
|
|
+ that.generatePoster()
|
|
|
|
|
+ }
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
that.fundActing = false
|
|
that.fundActing = false
|
|
@@ -386,7 +460,7 @@ export default {
|
|
|
|
|
|
|
|
ctx.setFillStyle('#333333')
|
|
ctx.setFillStyle('#333333')
|
|
|
ctx.setFontSize(22)
|
|
ctx.setFontSize(22)
|
|
|
- ctx.fillText('已返充到余额', w / 2, 208)
|
|
|
|
|
|
|
+ ctx.fillText(that.posterStatusText, w / 2, 208)
|
|
|
|
|
|
|
|
let rowY = 252
|
|
let rowY = 252
|
|
|
const labelX = padX
|
|
const labelX = padX
|
|
@@ -541,7 +615,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.poster-img {
|
|
.poster-img {
|
|
|
- width: 640upx;
|
|
|
|
|
|
|
+ width: 480upx;
|
|
|
max-width: 100%;
|
|
max-width: 100%;
|
|
|
border-radius: 12upx;
|
|
border-radius: 12upx;
|
|
|
box-shadow: 0 8upx 24upx rgba(0, 0, 0, 0.12);
|
|
box-shadow: 0 8upx 24upx rgba(0, 0, 0, 0.12);
|
|
@@ -555,13 +629,22 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.simple-success {
|
|
.simple-success {
|
|
|
- margin-bottom: 24upx;
|
|
|
|
|
|
|
+ margin-bottom: 16upx;
|
|
|
font-size: 30upx;
|
|
font-size: 30upx;
|
|
|
color: #333333;
|
|
color: #333333;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
line-height: 1.6;
|
|
line-height: 1.6;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.origin-desc {
|
|
|
|
|
+ margin-bottom: 28upx;
|
|
|
|
|
+ padding: 0 20upx;
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ color: #666666;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ line-height: 1.5;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.fund-tip {
|
|
.fund-tip {
|
|
|
margin-bottom: 40upx;
|
|
margin-bottom: 40upx;
|
|
|
font-size: 34upx;
|
|
font-size: 34upx;
|