shish hace 1 año
padre
commit
40c4ccb797
Se han modificado 1 ficheros con 43 adiciones y 3 borrados
  1. 43 3
      hdApp/src/admin/order/refund.vue

+ 43 - 3
hdApp/src/admin/order/refund.vue

@@ -1,6 +1,12 @@
 <template>
 	<view class="refund-page">
 
+		<!-- 红色提示信息 -->
+		<view class="warning-tip" v-if="addMinusOrder==1">
+			<view class="warning-icon">⚠</view>
+			<text class="warning-text">订单已结账,只能开负数订单进行售后</text>
+		</view>
+
 		<!-- 退款方式选择卡片 -->
 		<view class="card-section">
 			<view class="section-title">
@@ -181,12 +187,14 @@
 						<text class="amount-value">¥{{refundMoney}}</text>
 					</view>
 					<view class="confirm-text">
-						<text>确认要退款吗?</text>
+						<text v-if="addMinusOrder == 0">确认要退款吗?</text>
+						<text v-else>确认要开负数订单退款吗?</text>
 					</view>
 				</view>
 				<view class="modal-actions">
 					<button class="modal-btn cancel-modal-btn" @tap="cancelRefundModal">取消</button>
-					<button class="modal-btn confirm-modal-btn" @tap="executeRefund">确认退款</button>
+					<button class="modal-btn confirm-modal-btn" @tap="executeRefund" v-if="addMinusOrder == 0">确认退款</button>
+					<button class="modal-btn confirm-modal-btn" @tap="executeRefund" v-else>确认开单退款</button>
 				</view>
 			</view>
 		</ModalModule>
@@ -207,7 +215,8 @@ export default {
 			remark:'',
 			orderInfo:{},
 			coundRefundPrice:0,
-			showRefundModal: false
+			showRefundModal: false,
+			addMinusOrder:0,//开负数订单售后 0不是 1是
 		};
 	},
 
@@ -363,6 +372,10 @@ export default {
 			const res = await getDetail({ id: this.option.id})
 			this.orderInfo = res.data
 			
+			if(this.orderInfo.payWay == 3 && Number(this.orderInfo.remainDebtPrice)<=0){
+				this.addMinusOrder = 1
+			}
+
 			this.coundRefundPrice = Number(res.data.orderPrice) - Number(res.data.tkPrice)
 			this.coundRefundPrice = this.coundRefundPrice.toFixed(2)
 			this.coundRefundPrice = parseFloat(this.coundRefundPrice)
@@ -384,6 +397,33 @@ export default {
 	padding: 20upx 0 200upx;
 }
 
+// 红色提示样式
+.warning-tip {
+	background: #fff2f0;
+	border: 1upx solid #ffccc7;
+	border-radius: 8upx;
+	margin: 0upx 20upx 20upx 20upx;
+	padding: 20upx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	gap: 15upx;
+	
+	.warning-icon {
+		font-size: 40upx;
+		color: #ff4757;
+		font-weight: bold;
+		line-height: 1;
+	}
+	
+	.warning-text {
+		font-size: 34upx;
+		color: #ff4757;
+		font-weight:bold;
+		text-align: center;
+	}
+}
+
 
 
 // 卡片样式