shish 11 miesięcy temu
rodzic
commit
4b1d7805cd
1 zmienionych plików z 18 dodań i 5 usunięć
  1. 18 5
      hdh5/admin/ghs/pay.vue

+ 18 - 5
hdh5/admin/ghs/pay.vue

@@ -7,7 +7,7 @@
 				<text class="currency">¥</text>
 				<text class="amount">{{ displayAmount }}</text>
 			</view>
-			<view class="amount-tip">请输入金额</view>
+			<button class="clear-amount-btn" @click="changeAmount(0)">清空金额</button>
 		</view>
 
 		<!-- 客户信息卡片 -->
@@ -24,7 +24,7 @@
 				</view>
 			</view>
 			<view class="debt-info" v-if="Number(customInfo.remainDebtAmount) > 0">
-				<view class="debt-amount">
+				<view class="debt-amount" @click="changeAmount(customInfo.remainDebtAmount)">
 					<text class="debt-label">待结金额</text>
 					<text class="debt-value">¥{{ customInfo.remainDebtAmount }}</text>
 				</view>
@@ -191,6 +191,10 @@ export default {
 
 	},
 	methods: {
+		changeAmount(amount){
+			this.currentAmount = amount
+			this.updateDisplay()
+		},
 		// 优化:添加触摸反馈
 		handleTouchStart(e) {
 			const target = e.currentTarget;
@@ -494,9 +498,18 @@ export default {
 		}
 	}
 	
-	.amount-tip {
-		color: rgba(255, 255, 255, 0.6);
-		font-size: 24upx;
+	.clear-amount-btn {
+		color: rgb(233, 223, 223);
+		font-size: 22upx;
+		margin-top: 20upx;
+		background: transparent;
+		border: 1upx solid rgba(255, 255, 255, 0.4);
+		border-radius: 12upx;
+		padding: 6upx 12upx;
+		transition: all 0.3s ease;
+		cursor: pointer;
+		width: auto;
+		display: inline-block;
 	}
 }