张洋 1 month ago
parent
commit
b81a657c03

+ 105 - 78
bin/Win32/Debug/zhipuzi_pos_windows/skin/shoukuan_page.xml

@@ -4,100 +4,127 @@
 		<HorizontalLayout>
 			<Control width="1" bkcolor="#FFD1D1D1"></Control>
 			
-			<VerticalLayout width="420" bkcolor="#FFFFFFFF">
-				<Label text="收款金额" font="20" width="150" height="30" padding="40,14,10,10"></Label>
+			<!-- 内容区:整块灰底 #F5F7FA;左右两张卡片只靠 12 的内边距分隔,不再画中间竖线 -->
+			<HorizontalLayout name="shoukuan_page_body" bkcolor="#FFF5F7FA" inset="12,12,12,12" childpadding="12">
 				
-				<HorizontalLayout height="68">
-					<Button name="shoukuan_page_money_edit" align="left" font="32" width="340" height="68" padding="40,0,40,0" textpadding="10,0,0,0" normalimage="" hotimage="" pushedimage="" bordersize="1" bordercolor="#FFA9A9A9" bkcolor="#00FFFFFF" textcolor="0xFF60B177"/>
-				</HorizontalLayout>
-				
-				<HorizontalLayout width="340" height="416" bkcolor="#FFF3F3F3" padding="40,30,40,10">
-					<Button name="jianpan_1" text="1" heiht="60" width="60" float="true" pos="10,10,110,100" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_2" text="2" heiht="60" width="60" float="true" pos="120,10,220,100" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_3" text="3" heiht="60" width="60" float="true" pos="230,10,330,100" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					
-					<Button name="jianpan_4" text="4" heiht="60" width="60" float="true" pos="10,110,110,200" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_5" text="5" heiht="60" width="60" float="true" pos="120,110,220,200" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_6" text="6" heiht="60" width="60" float="true" pos="230,110,330,200" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					
-					<Button name="jianpan_7" text="7" heiht="60" width="60" float="true" pos="10,210,110,300" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_8" text="8" heiht="60" width="60" float="true" pos="120,210,220,300" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_9" text="9" heiht="60" width="60" float="true" pos="230,210,330,300" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					
-					<Button name="jianpan_qingkong" text="清空" heiht="60" width="60" float="true" pos="10,310,110,400" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_0" text="0" heiht="60" width="60" float="true" pos="120,310,220,400" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-					<Button name="jianpan_dian" text="." heiht="60" width="60" float="true" pos="230,310,330,400" normalimage="file='shuzi_btn_normal.png' corner='5,5,5,5'" hotimage="file='shuzi_btn_hover.png' corner='5,5,5,5'" pushedimage="file='shuzi_btn_push.png' corner='5,5,5,5'"></Button>
-				</HorizontalLayout>
-				
-				<Control></Control>
-				
-				<Label name="errorinfo" text="" width="400" height="26" padding="43,10,10,10" textcolor="#FFFF0000" visible="false" align="center"></Label>
-			</VerticalLayout>
-			
-			<Control width="1" bkcolor="#FFEBE8E8"></Control>
-			
-			<HorizontalLayout name="diandan_jiesuan_layout" bkcolor="#FFFFFFFF" hscrollbar="true">				
-				<VerticalLayout name="diandan_page_jiesuan_zhangdan_layout" vscrollbar="true">
-					<Label text="账单明细" height="58" padding="20,0,0,0" font="20"></Label>
-					
-					<Control height="1" bkcolor="#FFEBE8E8" padding="10,0,10,0"></Control>
-					
-					<VerticalLayout name="diandan_jiesuan_zhangdanmingxi_jiage_layout" padding="20,0,20,0" height="100">
+				<!-- 左卡:收款金额 + 键盘;四边各留 12,卡内 inset 20,18,20,18
+				     不写 height → 由 CHorizontalLayoutUI::SetPos 拉满父容器可用高(与右侧账单卡同机制),
+				     窗口放大时白卡垂直铺满;卡内金额卡 96 + 12 + 键盘 536 = 644 固定且顶部对齐,
+				     余量留白自然落在卡底(不要又写成固定高,会把白底截断) -->
+				<VerticalLayout width="396" bkimage="file='card_r10.png' corner='10,10,10,10'" inset="20,18,20,18">
 					
+					<!-- 收款金额:浅灰填充子卡(与「会员充值 / 现金收款」弹框的余额卡同款) -->
+					<VerticalLayout width="356" height="96" bkimage="file='balance_card.png' corner='16,16,16,16'" inset="20,14,20,0">
+						<Label text="收款金额" width="140" height="20" font="13" textcolor="#FF8A9099" align="left"></Label>
+						
+						<Control height="2"></Control>
+						
+						<HorizontalLayout height="50">
+							<Label text="¥" width="20" height="50" font="24" textcolor="#FF60B177" align="left"></Label>
+							<Button name="shoukuan_page_money_edit" align="left" font="136" height="50" textpadding="0,0,0,0" normalimage="" hotimage="" pushedimage="" bkcolor="#00000000" textcolor="#FF60B177"></Button>
+						</HorizontalLayout>
 					</VerticalLayout>
 					
-					<Control height="1" bkcolor="#FFEBE8E8" padding="10,10,10,0"></Control>
-					
-					<HorizontalLayout height="50">
-						<Control></Control>
-						<Label name="diandan_jiesuan_total_yingshou" text="" width="300" height="50" align="right" padding="0,0,15,0"/>
-					</HorizontalLayout>
+					<Control height="12"></Control>
 					
-					<Label text="支付方式" width="100" height="58" padding="20,30,0,0" font="20"></Label>
-					
-					<Control height="1" bkcolor="#FFEBE8E8" padding="10,0,10,0"></Control>
-					
-					<HorizontalLayout name="diandan_jiesuan_zhifufangshi_layout">
-						<HorizontalLayout name="diandan_jiesuan_zhifufangshi_weixinzhifu" width="120" hegiht="80" float="true">
-							<Button name="diandan_jiesuan_zhifufangshi_weixinzhifu_btn" text="" height="80" width="120" padding="0,0,0,0" textcolor="#FF999999" normalimage="" hotimage="" pushedimage="" bordersize="0" bkcolor="#FFFF4242"></Button>
-							<Control name="zhifu_icon" bkimage="weixinzhifu_icon.png" width="24" height="22" float="true" pos="53,10,77,32" mouse="false"></Control>
-							<Label name="zhifu_name" text="微信支付/支付宝/云闪付" wordbreak="true" width="115" height="40" font="14" float="true" pos="2,35,117,75" textcolor="#FFFFFFFF" mouse="false"></Label>
+					<!-- 数字键盘:参照「会员充值弹框」三态图与圆角;键 108x125、列距 16、行距 12(3*108+2*16=356,4*125+3*12=536) -->
+					<VerticalLayout width="356" height="536">
+						<HorizontalLayout height="125">
+							<Button name="jianpan_1" text="1" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_2" text="2" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_3" text="3" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
 						</HorizontalLayout>
 						
-						<HorizontalLayout name="diandan_jiesuan_zhifufangshi_huiyuan" width="120" hegiht="80" float="true">
-							<Button name="diandan_jiesuan_zhifufangshi_shoukuan_btn" text="" height="80" width="120" padding="0,0,0,0" textcolor="#FF999999" normalimage="" hotimage="" pushedimage="" bordersize="0" bkcolor="#FFFF8910"></Button>
-							<Control name="zhifu_icon" bkimage="huiyuanzhifu_icon.png" width="26" height="20" float="true" pos="50,10,76,30" mouse="false"></Control>
-							<Label name="zhifu_name" text="会员支付" width="180" height="35" font="14" float="true" pos="30,35,210,70" textcolor="#FFFFFFFF" mouse="false"></Label>
+						<Control height="12"></Control>
+						
+						<HorizontalLayout height="125">
+							<Button name="jianpan_4" text="4" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_5" text="5" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_6" text="6" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
 						</HorizontalLayout>
 						
-						<HorizontalLayout name="diandan_jiesuan_zhifufangshi_xianjin" width="120" hegiht="80" float="true">
-							<Button name="diandan_jiesuan_zhifufangshi_xianjin_btn" text="" height="80" width="120" padding="0,0,0,0" textcolor="#FF999999" normalimage="" hotimage="" pushedimage="" bordersize="0" bkcolor="#FF52CB4B"></Button>
-							<Control name="zhifu_icon" bkimage="xianjinzhifu_icon.png" width="21" height="24" float="true" pos="50,10,71,34" mouse="false"></Control>
-							<Label name="zhifu_name" text="现金支付" width="180" height="35" font="14" float="true" pos="30,35,210,70" textcolor="#FFFFFFFF" mouse="false"></Label>
+						<Control height="12"></Control>
+						
+						<HorizontalLayout height="125">
+							<Button name="jianpan_7" text="7" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_8" text="8" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_9" text="9" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
 						</HorizontalLayout>
 						
-						<!--
-						<HorizontalLayout name="diandan_jiesuan_zhifufangshi_gouwuka" width="122" hegiht="80" float="true">
-							<Button name="diandan_jiesuan_zhifufangshi_gouwuka_btn" text="" height="80" width="120" padding="0,0,0,0" textcolor="#FF999999" normalimage="" hotimage="" pushedimage="" bordersize="1" bordercolor="#FFC1C1C1" bkcolor="#FFF7F7F7"></Button>
-							<Control name="zhifu_icon" bkimage="gouwuka_icon.png" width="34" height="28" float="true" pos="45,10,79,38" mouse="false"></Control>
-							<Label name="zhifu_name" text="购物卡" width="180" height="35" font="14" float="true" pos="38,35,218,70" mouse="false"></Label>
+						<Control height="12"></Control>
+						
+						<HorizontalLayout height="125">
+							<Button name="jianpan_qingkong" text="清空" font="15" textcolor="#FF5F6368" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_0" text="0" font="24" textcolor="#FF1F2329" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
+							<Control width="16" height="125"></Control>
+							<Button name="jianpan_dian" text="." font="24" textcolor="#FF5F6368" width="108" height="125" normalimage="file='key_normal.png' corner='12,12,12,12'" hotimage="file='key_hover.png' corner='12,12,12,12'" pushedimage="file='key_pushed.png' corner='12,12,12,12'" pushedtextcolor="#FF60B177"></Button>
 						</HorizontalLayout>
+					</VerticalLayout>
+				</VerticalLayout>
+				
+				<!-- 右卡槽:账单卡宽度由 C++ 按页面宽算(SetFixedWidth),XML 不写 width -->
+				<HorizontalLayout name="diandan_jiesuan_layout" hscrollbar="true">
+					<VerticalLayout name="diandan_page_jiesuan_zhangdan_layout" vscrollbar="true" bkimage="file='card_r10.png' corner='10,10,10,10'">
+						<Label text="账单明细" height="48" padding="18,0,0,0" font="16"></Label>
 						
-						<HorizontalLayout name="diandan_jiesuan_zhifufangshi_meishicheng" width="122" hegiht="80" float="true">
-							<Button name="diandan_jiesuan_zhifufangshi_meishicheng_btn" text="" height="80" width="120" padding="0,0,0,0" textcolor="#FF999999" normalimage="" hotimage="" pushedimage="" bordersize="1" bordercolor="#FFC1C1C1" bkcolor="#FFF7F7F7"></Button>
-							<Control name="zhifu_icon" bkimage="meishicheng_icon.png" width="37" height="27" float="true" pos="48,10,85,37" mouse="false"></Control>
-							<Label name="zhifu_name" text="美食城临时卡" width="180" height="35" font="14" float="true" pos="25,35,205,70" mouse="false"></Label>
+						<VerticalLayout name="diandan_jiesuan_zhangdanmingxi_jiage_layout" padding="20,0,20,0" height="100">
+						
+						</VerticalLayout>
+						
+						<Control height="1" bkcolor="#FFF0F1F3" padding="10,10,10,0"></Control>
+						
+						<HorizontalLayout height="50">
+							<Control></Control>
+							<!-- 应收行:两个 Label 都 autocalcwidth → 框宽 == 文字宽,标签紧贴金额、整组贴右,
+							     金额末位仍在「卡右缘 − 20」,与上方明细行数值右缘齐平。
+							     金额文字由 C++ SetText 写入(宽度会变):CLabelUI::SetText 会 NeedParentUpdate
+							     触发全量重排,autocalcwidth 随之重算;初始 text 写 ¥0.00(InitMoney 把收款金额置 0)
+							     保证首帧就正确,避免文本为空时量出 0 宽被当成弹性子项。 -->
+							<Label text="应收金额:" autocalcwidth="true" height="50" font="113" textcolor="#FF5F6368" align="right"></Label>
+							<Label name="diandan_jiesuan_total_yingshou" text="¥0.00" autocalcwidth="true" height="50" font="116" textcolor="#FFE14B4A" align="right"></Label>
+							<Control width="20"></Control>
 						</HorizontalLayout>
-						-->
 						
-						<HorizontalLayout name="diandan_jiesuan_zhifufangshi_fulika" width="122" hegiht="80" float="true">
-							<Button name="diandan_jiesuan_zhifufangshi_fulika_btn" text="" height="80" width="120" padding="0,0,0,0" textcolor="#FF999999" normalimage="" hotimage="" pushedimage="" bordersize="1" bordercolor="#FFC1C1C1" bkcolor="#FFF7F7F7"></Button>
-							<Control name="zhifu_icon" bkimage="fulika_icon.png" width="30" height="30" float="true" pos="48,10,78,40" mouse="false"></Control>
-							<Label name="zhifu_name" text="福利卡" width="180" height="35" font="14" float="true" pos="40,35,220,70" mouse="false"></Label>
+						<Label text="支付方式" width="120" height="48" padding="18,18,0,0" font="16"></Label>
+						
+						<HorizontalLayout name="diandan_jiesuan_zhifufangshi_layout">
+							<HorizontalLayout name="diandan_jiesuan_zhifufangshi_weixinzhifu" width="120" height="54" float="true">
+								<Button name="diandan_jiesuan_zhifufangshi_weixinzhifu_btn" text="" width="120" height="54" maxheight="54" textpadding="0,0,0,0" normalimage="file='pay_scan_n.png' corner='8,8,8,8'" hotimage="file='pay_scan_h.png' corner='8,8,8,8'" pushedimage="file='pay_scan_p.png' corner='8,8,8,8'"></Button>
+								<Control name="zhifu_icon" bkimage="dc_ico_scan.png" width="24" height="24" float="true" pos="16,15,40,39" mouse="false"></Control>
+								<Label name="zhifu_name" text="扫码支付" font="13" textcolor="#FFFFFFFF" float="true" pos="46,0,116,54" align="left" endellipsis="true" mouse="false"></Label>
+							</HorizontalLayout>
+							
+							<HorizontalLayout name="diandan_jiesuan_zhifufangshi_huiyuan" width="120" height="54" float="true">
+								<Button name="diandan_jiesuan_zhifufangshi_shoukuan_btn" text="" width="120" height="54" maxheight="54" textpadding="0,0,0,0" normalimage="file='pay_member_n.png' corner='8,8,8,8'" hotimage="file='pay_member_h.png' corner='8,8,8,8'" pushedimage="file='pay_member_p.png' corner='8,8,8,8'"></Button>
+								<Control name="zhifu_icon" bkimage="dc_ico_card.png" width="24" height="24" float="true" pos="16,15,40,39" mouse="false"></Control>
+								<Label name="zhifu_name" text="会员支付" font="13" textcolor="#FFFFFFFF" float="true" pos="46,0,116,54" align="left" endellipsis="true" mouse="false"></Label>
+							</HorizontalLayout>
+							
+							<HorizontalLayout name="diandan_jiesuan_zhifufangshi_xianjin" width="120" height="54" float="true">
+								<Button name="diandan_jiesuan_zhifufangshi_xianjin_btn" text="" width="120" height="54" maxheight="54" textpadding="0,0,0,0" normalimage="file='pay_cash_n.png' corner='8,8,8,8'" hotimage="file='pay_cash_h.png' corner='8,8,8,8'" pushedimage="file='pay_cash_p.png' corner='8,8,8,8'"></Button>
+								<Control name="zhifu_icon" bkimage="dc_ico_cash.png" width="24" height="24" float="true" pos="16,15,40,39" mouse="false"></Control>
+								<Label name="zhifu_name" text="现金支付" font="13" textcolor="#FFFFFFFF" float="true" pos="46,0,116,54" align="left" endellipsis="true" mouse="false"></Label>
+							</HorizontalLayout>
+							
+							<HorizontalLayout name="diandan_jiesuan_zhifufangshi_fulika" width="120" height="54" float="true">
+								<Button name="diandan_jiesuan_zhifufangshi_fulika_btn" text="" width="120" height="54" maxheight="54" textpadding="0,0,0,0" normalimage="file='pay_fuli_n.png' corner='8,8,8,8'" hotimage="file='pay_fuli_h.png' corner='8,8,8,8'" pushedimage="file='pay_fuli_p.png' corner='8,8,8,8'"></Button>
+								<Control name="zhifu_icon" bkimage="dc_ico_fuli.png" width="24" height="24" float="true" pos="16,15,40,39" mouse="false"></Control>
+								<Label name="zhifu_name" text="福利卡" font="13" textcolor="#FFFFFFFF" float="true" pos="46,0,116,54" align="left" endellipsis="true" mouse="false"></Label>
+							</HorizontalLayout>
 						</HorizontalLayout>
-					</HorizontalLayout>
-				</VerticalLayout>
+					</VerticalLayout>
+				</HorizontalLayout>
+				
+				<!-- 错误提示:收款页暂无调用点(CShoukuanPageUI::ShowError 全工程零调用),float 不参与卡片布局 -->
+				<Label name="errorinfo" text="" pos="12,666,408,692" float="true" textcolor="#FFFF0000" visible="false" align="center"></Label>
 			</HorizontalLayout>
 		</HorizontalLayout>
 	</ShoukuanPage>
-</Window>
+</Window>

+ 28 - 15
zhipuzi_pos_windows/page/CShoukuanPageUI.cpp

@@ -428,12 +428,15 @@ void CShoukuanPageUI::InitJiesuanZhifu()
 			CButtonUI* newButton = new CButtonUI();
 
 			newButton->SetFixedWidth(120);
-			newButton->SetFixedHeight(80);
+			newButton->SetFixedHeight(54);
 			newButton->SetText(CLewaimaiString::UTF8ToUnicode(selfpay.name).c_str());
 
-			newButton->SetBorderSize(1);
-			newButton->SetBorderColor(0xFFC1C1C1);
-			newButton->SetBkColor(0xFFF7F7F7);
+			//与固定支付方式统一:白色圆角按钮(pay_more 三态图),文字深灰
+			newButton->SetAttribute(L"normalimage", L"file='pay_more_n.png' corner='8,8,8,8'");
+			newButton->SetAttribute(L"hotimage", L"file='pay_more_h.png' corner='8,8,8,8'");
+			newButton->SetAttribute(L"pushedimage", L"file='pay_more_p.png' corner='8,8,8,8'");
+			newButton->SetAttribute(L"textcolor", L"#FF5F6368");
+			newButton->SetAttribute(L"font", L"13");
 
 			//设置定义属性,在点击按钮的时候好区分
 			newButton->SetAttribute(L"name", L"diandan_jiesuan_zhifufangshi_zidingyi_btn");
@@ -459,16 +462,19 @@ void CShoukuanPageUI::UpdateJiesuanZhifuPos()
 		return;
 	}
 
-	int nZhangdanWidth = nWidth - 420 - 5;
-	if (nZhangdanWidth < 290)
+	//收款页:左卡 + 右账单卡,两卡靠 12 的内边距分隔(已去掉中间竖线)
+	//右侧账单卡宽 = 页宽 − 1(左边线) − 12(内容区左内边距) − 396(左卡宽) − 12(两卡间距) − 12(内容区右内边距)
+	const int nLeftCardWidth = 396;	//与 shoukuan_page.xml 左卡 width 保持一致
+	int nZhangdanWidth = nWidth - 1 - 12 - nLeftCardWidth - 12 - 12;
+	if (nZhangdanWidth < 300)
 	{
-		nZhangdanWidth = 290;
+		nZhangdanWidth = 300;
 	}
 	CVerticalLayoutUI* pZhangdanLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(L"diandan_page_jiesuan_zhangdan_layout"));
 	pZhangdanLayout->SetFixedWidth(nZhangdanWidth);
 
-	//根据宽度计算每行显示的数量
-	int nMeihangNum = (nZhangdanWidth) / 144;
+	//根据宽度计算每行显示的数量(与点单页一致:每格 132)
+	int nMeihangNum = (nZhangdanWidth) / 132;
 	if (nMeihangNum < 1)
 	{
 		nMeihangNum = 1;
@@ -485,10 +491,10 @@ void CShoukuanPageUI::UpdateJiesuanZhifuPos()
 		int curCol = num % nMeihangNum + 1;
 
 		RECT rect;
-		rect.left = (curCol - 1) * 140 + 20;
+		rect.left = (curCol - 1) * 132 + 20;
 		rect.right = rect.left + 120;
-		rect.top = (curRow - 1) * 100 + 20;
-		rect.bottom = rect.top + 80;
+		rect.top = (curRow - 1) * 64 + 6;
+		rect.bottom = rect.top + 54;
 
 		// 强制设置固定大小和位置
 		SIZE size;
@@ -502,9 +508,9 @@ void CShoukuanPageUI::UpdateJiesuanZhifuPos()
 		num++;
 	}
 
-	//调整区域高度
+	//调整区域高度(与点单页一致:行距 64,末行下方留 60)
 	int lastRow = (num - 1) / nMeihangNum + 1;
-	pZhifufangshiLayout->SetFixedHeight(lastRow * 105);
+	pZhifufangshiLayout->SetFixedHeight((lastRow - 1) * 64 + 60);
 }
 
 //初始化收款金额
@@ -552,8 +558,15 @@ void CShoukuanPageUI::UpdateJiesuanInfo()
 
 	pmingxiLayout->SetFixedHeight(item_num * 40);
 
+	//右侧账单卡的应收金额:「应收金额:」是静态灰标签,这里只填红色的金额部分
 	CLabelUI* pYingshou = static_cast<CLabelUI*>(this->FindSubControl(_T("diandan_jiesuan_total_yingshou")));
-	pYingshou->SetText((L"应收金额:" + CLewaimaiString::UTF8ToUnicode(money) + L"元").c_str());
+	pYingshou->SetText((L"¥" + CLewaimaiString::UTF8ToUnicode(money)).c_str());
+	//该 Label 在 skin 里是 autocalcwidth(框宽 == 文字宽,才能紧挨左侧「应收金额:」标签)。
+	//但 CLabelUI::EstimateSize(UILabel.cpp:121-149)只在 m_bNeedEstimateSize 为真时重量宽度,
+	//而 SetText 只走 NeedParentUpdate 打「下一帧重排」标记、并不置该标志(该标志靠 szAvailable.cx
+	//变化触发,本行可用宽恒定、永远不会变)→ 金额位数变化时框宽会停在旧值、文字向左压住标签。
+	//同值回写 SetFont 是唯一会置 m_bNeedEstimateSize 的公开接口(UILabel.cpp:74-79),借此强制清缓存。
+	pYingshou->SetFont(pYingshou->GetFont());
 }
 
 //开始进行微信支付收款,如果fukuanma不为空,默认自动唤起支付

BIN
zhipuzi_pos_windows/resource/skin.zip