shish 8 horas atrás
pai
commit
1fa281d86f

+ 5 - 3
hdApp/src/admin/billing/affirm.vue

@@ -2212,22 +2212,23 @@ export default {
   flex-shrink: 0;
 }
 
-/* 实际金额右侧优惠/加价标签:红底白字两行,店员一眼能看到优惠类型和金额 */
+/* 实际金额右侧优惠/加价标签:红底白字两行,文案水平居中 */
 .price-hint-tag {
   margin-left: 16upx;
   padding: 8upx 16upx;
   border-radius: 8upx;
   display: flex;
   flex-direction: column;
-  align-items: flex-start;
+  align-items: center;
   justify-content: center;
   flex-shrink: 1;
   min-width: 0;
 
   .price-hint-label {
-    font-size: 22upx;
+    font-size: 24upx;
     color: #fff;
     line-height: 1.2;
+    text-align: center;
   }
 
   .price-hint-amount {
@@ -2236,6 +2237,7 @@ export default {
     font-weight: bold;
     color: #fff;
     line-height: 1.2;
+    text-align: center;
   }
 
   &.discount {

+ 6 - 5
hdApp/src/admin/billing/freeRefundList.vue

@@ -109,15 +109,16 @@
               <text class="meta-label">付款</text>
               <text class="meta-value">{{ payWayText(item) }}</text>
             </view>
-            <view class="meta-item">
+            <!-- 待审核尚未落地资金/封账口径/审核人,不展示这三栏 -->
+            <view class="meta-item" v-if="item.status != 0">
               <text class="meta-label">退还</text>
               <text class="meta-value">{{ fundText(item) }}</text>
             </view>
-            <view class="meta-item" v-if="item.sameDay == 0">
-              <text class="meta-label">时间</text>
+            <view class="meta-item" v-if="item.status != 0 && item.sameDay == 0">
+              <text class="meta-label">退款</text>
               <text class="meta-value" style="color: green;font-weight: bold;">封账后退款</text>
             </view>
-            <view class="meta-item">
+            <view class="meta-item" v-if="item.status != 0">
               <text class="meta-label">操作</text>
               <text class="meta-value">{{ item.shopAdminName || '-' }}</text>
             </view>
@@ -142,7 +143,7 @@
                 <button
                   class="admin-button-com middle poster-btn"
                   :class="canFundAction(item) ? 'blue' : 'disable'"
-                >退还方式</button>
+                >确认退还方式</button>
               </view>
               <view
                 class="poster-btn-wrap"

+ 54 - 47
hdApp/src/admin/order/refundDetail.vue

@@ -89,8 +89,8 @@
 			<!-- 待审核尚未落定 sameDay,不展示;通过后再展示冲减/不冲减口径 -->
 			<template v-if="Number(info.status) !== 0">
 				<view class="refund-row">
-					<view class="refund-label">订单时间</view>
-					<view class="refund-value">{{ info.sameDay === 0 ? '过去订单' : '当天订单' }}</view>
+					<view class="refund-label">退款类型</view>
+					<view class="refund-value">{{ info.sameDay === 0 ? '封账后退款' : '当天退款' }}</view>
 				</view>
 			</template>
 
@@ -209,15 +209,15 @@ export default {
 			}
 			return classMap[this.info.status] || 'refund-status'
 		},
-		/** 已通过且待资金落地 */
+		/** 已通过且待资金落地(字段缺省按 0,避免 undefined 导致不跳转) */
 		canFundAction() {
 			return Number(this.info.status) === 1
-				&& Number(this.info.hasReturn) === 0
-				&& Number(this.info.returnBalance) === 0
+				&& Number(this.info.hasReturn || 0) === 0
+				&& Number(this.info.returnBalance || 0) === 0
 		},
 		/** 已通过且返充余额时可查看凭证 */
 		canShowPoster() {
-			return Number(this.info.status) === 1 && Number(this.info.returnBalance) === 1
+			return Number(this.info.status) === 1 && Number(this.info.returnBalance || 0) === 1
 		},
 		/** 待审核:商城顾客申请,超管可在本页通过/驳回 */
 		canAudit() {
@@ -279,8 +279,8 @@ export default {
 			)
 		},
 		/**
-		 * 审核通过:对齐商家即时售后
-		 * - 待选手选落地(线下微信/支付宝/现金/银行卡等)→ forwardResult
+		 * 审核通过:线下等待落地单直接进退还方式选择页(等同点「退还方式」),无需再点一次
+		 * - 待选手选落地 → forwardResult
 		 * - 已返充余额 → 凭证页
 		 * - 已原路(线上/余额/挂账)→ 留在详情刷新
 		 */
@@ -295,55 +295,57 @@ export default {
 				}
 				this.$msg(res.msg || '已通过')
 				const data = res.data || {}
-				// 与 admin/order/refund.vue 成功跳转条件一致
-				const needFund = Number(data.needFundAction) === 1
-					|| (Number(data.hasReturn) === 0
-						&& Number(data.returnBalance) === 0
-						&& Number(data.couldReturn) === 1)
-				const showPoster = Number(data.returnBalance) === 1
-				if (needFund || showPoster) {
-					this.goAfterPassResult(data, needFund, showPoster)
+				// 先把接口资金字段合并进 info,便于立刻判断
+				if (data && typeof data === 'object') {
+					this.info = Object.assign({}, this.info, {
+						status: 1,
+						hasReturn: data.hasReturn != null ? data.hasReturn : this.info.hasReturn,
+						returnBalance: data.returnBalance != null ? data.returnBalance : this.info.returnBalance,
+						couldReturn: data.couldReturn != null ? data.couldReturn : this.info.couldReturn,
+						payWay: data.payWay != null ? data.payWay : this.info.payWay,
+						onlinePay: data.onlinePay != null ? data.onlinePay : this.info.onlinePay,
+						refundSn: data.refundSn || data.orderSn || this.info.refundSn,
+						customBalance: data.customBalance != null ? data.customBalance : this.info.customBalance
+					})
+				}
+				// 接口明确待落地 / 已返充:立即跳(与手动点按钮同一页)
+				if (this.shouldGoFundAfterPass(data) || this.canFundAction) {
+					this.goFundAction()
+					return
+				}
+				if (Number(data.returnBalance) === 1 || this.canShowPoster) {
+					this.goPoster()
 					return
 				}
-				this.init()
+				// 接口未带齐字段时刷新详情再判一次,避免只留「退还方式」按钮
+				this.init().then(() => {
+					if (this.canFundAction) {
+						this.goFundAction()
+						return
+					}
+					if (this.canShowPoster) {
+						this.goPoster()
+					}
+				})
 			}).catch(() => {
 				uni.hideLoading()
 				this.busy = false
 			})
 		},
 		/**
-		 * 通过后进资金结果页:选手选「已线下转账 / 返充余额」或查看凭证
-		 * @param {Object} data pass 接口返回的资金字段
-		 * @param {boolean} needFund 是否待选手选
-		 * @param {boolean} showPoster 是否已返充需看凭证
+		 * 通过接口返回判断是否要进退还方式选择页
+		 * needFundAction=1,或 hasReturn/returnBalance 未落且 couldReturn=1(线下等)
 		 */
-		goAfterPassResult(data, needFund, showPoster) {
-			const info = this.info || {}
-			const payload = {
-				amount: data.refundPrice != null ? data.refundPrice : info.refundPrice,
-				customId: data.customId != null ? data.customId : info.customId,
-				customBalance: data.customBalance != null ? data.customBalance : '',
-				customName: data.customName || info.customName || '',
-				forwardSn: data.refundSn || data.orderSn || info.refundSn || info.orderSn || '',
-				forwardId: data.id || info.id || 0,
-				orderId: data.orderId != null ? data.orderId : (info.orderId || 0),
-				payWay: data.payWay != null ? data.payWay : info.payWay,
-				onlinePay: data.onlinePay != null ? data.onlinePay : (info.onlinePay != null ? info.onlinePay : 1),
-				hasReturn: data.hasReturn != null ? data.hasReturn : 0,
-				couldReturn: data.couldReturn != null ? data.couldReturn : 1,
-				returnBalance: data.returnBalance != null ? data.returnBalance : 0,
-				needFundAction: needFund ? 1 : 0,
-				mode: showPoster && !needFund ? 'repost' : ''
+		shouldGoFundAfterPass(data) {
+			if (!data || typeof data !== 'object') {
+				return false
 			}
-			uni.setStorageSync('forwardResultPayload', payload)
-			this.$util.pageTo({
-				url: '/admin/billing/forwardResult',
-				type: 2,
-				query: Object.assign({}, payload, {
-					customName: encodeURIComponent(payload.customName || ''),
-					mode: payload.mode || ''
-				})
-			})
+			if (Number(data.needFundAction) === 1) {
+				return true
+			}
+			return Number(data.hasReturn) === 0
+				&& Number(data.returnBalance) === 0
+				&& Number(data.couldReturn) === 1
 		},
 		confirmReject() {
 			const reason = (this.rejectReason || '').trim()
@@ -391,9 +393,14 @@ export default {
 		},
 		goFundAction() {
 			const payload = this.buildForwardPayload('')
+			// 强制标记待选手选,避免 needFundAction 因字段缺省为 0 导致结果页不展示选项
+			if (Number(payload.hasReturn || 0) === 0 && Number(payload.returnBalance || 0) === 0) {
+				payload.needFundAction = 1
+			}
 			uni.setStorageSync('forwardResultPayload', payload)
 			this.$util.pageTo({
 				url: '/admin/billing/forwardResult',
+				type: 2,
 				query: Object.assign({}, payload, {
 					customName: encodeURIComponent(payload.customName || '')
 				})

+ 2 - 76
mallApp/src/pages/order/refund.vue

@@ -2,7 +2,6 @@
   商城订单申请售后页
   供订单详情「申请售后」进入;顾客勾选商品/金额后提交待审核申请,商家在 hdApp 审核
   仅当存在待审核申请时锁进度页不可再提交;无待审核则直接进表单(含已取消/通过/驳回后再申)
-  申请页按原单支付方式提示退款去向:线上原路 / 余额 / 挂账冲减 / 线下由商家转账或返充
   退货并退款金额:普通商品按勾选原价分摊会员折/满减;秒杀、团购按活动单价退,不再叠整单优惠
   红包全额抵扣导致实付为 0 时仍可申请:提交 0 元,审核通过后退回红包
 -->
@@ -57,11 +56,6 @@
 				<text>{{ refundDeadlineTip }}</text>
 			</view>
 
-			<!-- 原单支付去向提示:与商家审核落地规则一致,避免顾客误以为一律原路微信退回 -->
-			<view class="tip-section" v-if="payRefundTip.text">
-				<text class="tip-text" :class="payRefundTip.tone + '-tip'">{{ payRefundTip.text }}</text>
-			</view>
-
 			<!-- 退款方式 -->
 			<view class="card-section">
 				<view class="section-title">
@@ -290,37 +284,6 @@ export default {
 				this.orderInfo.mainPay != null ? this.orderInfo.mainPay : this.orderInfo.orderPrice
 			) || 0
 			return Number(this.orderInfo.hbAmount || 0) > payAmount
-		},
-		/**
-		 * 申请页支付去向提示(与 hd 审核落地一致)
-		 * 线上微信/支付宝→原路;余额→退余额;挂账→冲欠款;线下→商家选手选转账或返充
-		 */
-		payRefundTip() {
-			const payWay = Number(this.orderInfo.payWay)
-			const online = Number(this.orderInfo.onlinePay)
-			if (online === 2 && (payWay === 0 || payWay === 1)) {
-				return {
-					tone: 'online',
-					text: '原单线上支付:商家审核通过后将原路退回'
-				}
-			}
-			if (payWay === 2) {
-				return {
-					tone: 'online',
-					text: '原单余额支付:商家审核通过后退回账户余额'
-				}
-			}
-			if (payWay === 3) {
-				return {
-					tone: 'debt',
-					text: '原单挂账:商家审核通过后冲减欠款'
-				}
-			}
-			// 线下微信/支付宝/现金/银行卡等:审核通过后由商家确认线下转或返充
-			return {
-				tone: 'offline',
-				text: '原单线下支付:商家审核通过后线下退款或返充余额,请与商家确认到账方式'
-			}
 		}
 	},
 	methods: {
@@ -580,17 +543,11 @@ export default {
 				return
 			}
 			const money = Number(this.refundMoney) || 0
-			let title = '确认提交'
-			let content = money > 0
+			const content = money > 0
 				? '确认申请退款 ¥' + this.refundMoney + '?'
 				: '订单实付为0,提交后将申请退回红包'
-			// 有金额时附带去向说明,与上方 tip、商家审核落地一致
-			if (money > 0 && this.payRefundTip && this.payRefundTip.text) {
-				title = '确认提交'
-				content = '确认申请退款 ¥' + this.refundMoney + '?\n' + this.payRefundTip.text
-			}
 			uni.showModal({
-				title: title,
+				title: '确认提交',
 				content: content,
 				success: res => {
 					if (res.confirm) {
@@ -668,37 +625,6 @@ export default {
 	line-height: 1.5;
 }
 
-/* 支付方式去向提示 */
-.tip-section {
-	margin: 0 20upx 20upx;
-	padding: 20upx;
-	border-radius: 12upx;
-	.tip-text {
-		display: block;
-		font-size: 28upx;
-		line-height: 1.5;
-		font-weight: 500;
-		&.online-tip {
-			background: rgba(51, 133, 255, 0.1);
-			color: #3385ff;
-			padding: 16upx 20upx;
-			border-radius: 8upx;
-		}
-		&.debt-tip {
-			background: rgba(230, 126, 34, 0.12);
-			color: #e67e22;
-			padding: 16upx 20upx;
-			border-radius: 8upx;
-		}
-		&.offline-tip {
-			background: rgba(255, 77, 109, 0.1);
-			color: #ff4d6d;
-			padding: 16upx 20upx;
-			border-radius: 8upx;
-		}
-	}
-}
-
 .card-section {
 	background: #fff;
 	margin: 0 20upx 20upx;