|
|
@@ -64,6 +64,11 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view class="refund-row" v-if="Number(info.sameDay) === 0 || Number(info.fundType) > 0">
|
|
|
+ <view class="refund-label">售后类型</view>
|
|
|
+ <view class="refund-value">{{ sameDayFundText }}</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="refund-row">
|
|
|
<view class="refund-label">操作人员</view>
|
|
|
<view class="refund-value">{{ info.shopAdminName || '' }}</view>
|
|
|
@@ -112,6 +117,12 @@
|
|
|
class="admin-button-com big refund-actions__btn refund-actions__btn--reject"
|
|
|
@click="reject()"
|
|
|
>驳回</button>
|
|
|
+ <!-- 返充余额:查看/补发退款凭证海报 -->
|
|
|
+ <button
|
|
|
+ v-if="canShowPoster"
|
|
|
+ class="admin-button-com big blue refund-actions__btn"
|
|
|
+ @click="goPoster()"
|
|
|
+ >查看凭证</button>
|
|
|
<button
|
|
|
v-if="info.status == 1"
|
|
|
class="admin-button-com big blue refund-actions__btn"
|
|
|
@@ -171,6 +182,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ /** 已通过且返充余额时可查看凭证 */
|
|
|
+ canShowPoster() {
|
|
|
+ return Number(this.info.status) === 1 && Number(this.info.fundType) === 2
|
|
|
+ },
|
|
|
+ /** 隔天/资金方式文案 */
|
|
|
+ sameDayFundText() {
|
|
|
+ const sameDay = Number(this.info.sameDay)
|
|
|
+ const fund = Number(this.info.fundType)
|
|
|
+ const dayText = sameDay === 0 ? '隔天售后' : '当天售后'
|
|
|
+ if (fund === 2) return dayText + ' · 返充余额'
|
|
|
+ if (fund === 3) return dayText + ' · 仅记账'
|
|
|
+ if (fund === 1) return dayText + ' · 原路退回'
|
|
|
+ return dayText
|
|
|
+ },
|
|
|
/** 申请原因文案 */
|
|
|
causeText() {
|
|
|
const causeMap = {
|
|
|
@@ -284,7 +309,12 @@ export default {
|
|
|
that.needCancelRemind(res.data.clearId)
|
|
|
} else {
|
|
|
that.$msg('操作成功')
|
|
|
- that.init()
|
|
|
+ // 通过后若返充余额,直接进凭证页
|
|
|
+ that.init().then(() => {
|
|
|
+ if (that.canShowPoster) {
|
|
|
+ that.goPoster()
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -296,6 +326,40 @@ export default {
|
|
|
that.$util.pageTo({ url: '/admin/clear/customInfo?id=' + id })
|
|
|
})
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 跳转退款凭证海报(mode=repost 从详情补发)
|
|
|
+ * fundType=2 返充余额才有凭证
|
|
|
+ */
|
|
|
+ goPoster() {
|
|
|
+ const info = this.info || {}
|
|
|
+ const orderId = info.relateOrderId
|
|
|
+ || (info.orderInfo && info.orderInfo.id)
|
|
|
+ || 0
|
|
|
+ const payload = {
|
|
|
+ fundType: info.fundType,
|
|
|
+ amount: info.refundPrice,
|
|
|
+ customId: info.customId,
|
|
|
+ customName: info.customName || '',
|
|
|
+ forwardSn: info.orderSn || '',
|
|
|
+ forwardId: info.id || 0,
|
|
|
+ orderId: orderId,
|
|
|
+ mode: 'repost'
|
|
|
+ }
|
|
|
+ uni.setStorageSync('forwardResultPayload', payload)
|
|
|
+ this.$util.pageTo({
|
|
|
+ url: '/admin/billing/forwardResult',
|
|
|
+ query: {
|
|
|
+ fundType: payload.fundType,
|
|
|
+ amount: payload.amount,
|
|
|
+ customId: payload.customId,
|
|
|
+ customName: encodeURIComponent(payload.customName || ''),
|
|
|
+ forwardSn: payload.forwardSn,
|
|
|
+ forwardId: payload.forwardId,
|
|
|
+ orderId: payload.orderId,
|
|
|
+ mode: 'repost'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 预览售后图片:urls 与列表缩略图同源,current 传 URL 避免 App 端滑动加载失败 */
|
|
|
showBig(index) {
|
|
|
const urls = this.getPreviewImageUrls()
|
|
|
@@ -329,7 +393,7 @@ export default {
|
|
|
this.$util.pageTo({ url: '/pagesOrder/refundSuccess?id=' + this.option.id })
|
|
|
},
|
|
|
init() {
|
|
|
- refundDetail({ id: this.option.id }).then(res => {
|
|
|
+ return refundDetail({ id: this.option.id }).then(res => {
|
|
|
this.product = res.data.itemList || []
|
|
|
this.refundType = res.data.info.refundType || 0
|
|
|
this.refundPrice = res.data.info.refundPrice ? parseFloat(res.data.info.refundPrice) : 0
|