shish 2 miesięcy temu
rodzic
commit
0095ed3ea3
1 zmienionych plików z 31 dodań i 54 usunięć
  1. 31 54
      hdApp/src/admin/tools/calculator.vue

+ 31 - 54
hdApp/src/admin/tools/calculator.vue

@@ -41,14 +41,15 @@
 
 					<view class="customer-strip" @tap.stop="pickCustomer">
 						<text class="customer-strip-label">客户</text>
-						<text class="customer-strip-name">{{ customerDisplayName }}</text>
-						<text class="customer-strip-action">修改客户</text>
-					</view>
-
-					<view v-if="showBalanceRow" class="balance-strip">
-						<text class="balance-strip-label">余额</text>
-						<text class="balance-strip-val">¥{{ formatMoney(customInfo.balance) }}</text>
-						<text v-if="balanceCoversDue && selHasPay === 4" class="balance-strip-hint balance-strip-hint-ok">余额充足</text>
+						<view class="customer-strip-name-wrap">
+							<text class="customer-strip-name-line">
+								<text
+									class="customer-strip-name-txt"
+									:class="{ 'customer-strip-name-txt--with-balance': showBalanceRow }"
+									>{{ customerDisplayName }}</text>
+								<text v-if="showBalanceRow" class="customer-strip-balance">¥{{ formatMoney(customInfo.balance) }}</text>
+							</text>
+						</view>
 					</view>
 
 					<view class="rcv-pay-block">
@@ -1452,7 +1453,7 @@ export default {
 	padding: 32upx 28upx;
 	min-height: 94upx;
 	box-sizing: border-box;
-	margin-top: 12upx;
+	margin-top: 10upx;
 	border: 2upx solid #e5e9ef;
 }
 
@@ -1462,65 +1463,43 @@ export default {
 	flex-shrink: 0;
 }
 
-.customer-strip-name {
+.customer-strip-name-wrap {
 	flex: 1;
 	min-width: 0;
-	font-size: 34upx;
-	font-weight: 600;
-	color: #1a1a1a;
 	margin-left: 16upx;
 	overflow: hidden;
-	text-overflow: ellipsis;
-	white-space: nowrap;
 }
 
-.customer-strip-action {
-	font-size: 32upx;
-	color: #09c567;
-	flex-shrink: 0;
-	margin-left: 12upx;
+/* 名字与余额同一 text 节点内并排,避免父级 flex 把余额撑到最右侧 */
+.customer-strip-name-line {
+	font-size: 34upx;
+	line-height: 1.45;
 }
 
-.balance-strip {
-	display: flex;
-	flex-direction: row;
-	align-items: center;
-	flex-wrap: wrap;
-	background: #fff;
-	border-radius: 14upx;
-	padding: 24upx 28upx;
-	margin-top: 12upx;
-	border: 2upx solid #e5e9ef;
-	box-sizing: border-box;
+.customer-strip-name-txt {
+	color: #1a1a1a;
+	font-weight: 600;
+	display: inline-block;
+	vertical-align: middle;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	max-width: 100%;
 }
 
-.balance-strip-label {
-	font-size: 30upx;
-	color: #9aa4b2;
-	flex-shrink: 0;
-	margin-right: 12upx;
+.customer-strip-name-txt--with-balance {
+	max-width: 62%;
 }
 
-.balance-strip-val {
-	font-size: 34upx;
+.customer-strip-balance {
+	margin-left: 15upx;
 	font-weight: 700;
 	color: #3385ff;
-}
-
-.balance-strip-hint {
-	margin-left: 16upx;
-	font-size: 24upx;
-	line-height: 1.35;
-	flex: 1;
-	min-width: 200upx;
-}
-
-.balance-strip-hint-ok {
-	color: #09c567;
+	vertical-align: middle;
 }
 
 .rcv-pay-block {
-	margin-top: 12upx;
+	margin-top: 10upx;
 	padding: 22upx 20upx;
 	background: #fff;
 	border-radius: 14upx;
@@ -1677,8 +1656,7 @@ export default {
 .pay-submit-row {
 	display: flex;
 	flex-direction: row;
-	margin-top: 20upx;
-	margin-bottom: 8upx;
+	margin-top: 10upx;
 }
 
 .pay-submit-btn {
@@ -1854,7 +1832,6 @@ export default {
 	font-weight: 700;
 	background: #52b384;
 	color: #063d2b;
-	box-shadow: 0 4upx 0 #388f65;
 }
 
 .numpad-key-muted {