张洋 1 month ago
parent
commit
2bdf246ecf

+ 8 - 8
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_fooditem_wutu.xml

@@ -2,17 +2,17 @@
 <Window>
 	<!-- 样式④ 纯文字 148x96:顶部留 26 给角标,名字 2 行 + 价格,上下 spacer 让内容垂直居中 -->
 	<DiandanFoodItem name="diandan_fooditem" width="148" height="96" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
-		<VerticalLayout width="148" height="96" inset="10,26,10,10" childpadding="5">
-			<Control></Control>
-			<Label name="foodname" height="34" font="12" textcolor="#FF1F2329" wordbreak="true" endellipsis="true" align="center"></Label>
-			<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top" align="center"></Label>
-			<Control></Control>
+		<VerticalLayout width="148" height="96" inset="10,26,10,10" childpadding="5" mouse="false">
+			<Control mouse="false"></Control>
+			<Label name="foodname" height="34" font="12" textcolor="#FF1F2329" wordbreak="true" endellipsis="true" align="center" mouse="false"></Label>
+			<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top" align="center" mouse="false"></Label>
+			<Control mouse="false"></Control>
 		</VerticalLayout>
-		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,6,64,28" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,6,64,28" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,6,64,28" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,6,64,28" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,6,64,28" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,6,64,28" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 	</DiandanFoodItem>
 
 </Window>

+ 10 - 9
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_fooditem_youtu.xml

@@ -1,20 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
-	<!-- 样式① 图上文下 148x172:图 140x96 内缩 4 避圆角,文字区 72 高(名字 2 行 40 + 价格贴底) -->
+	<!-- 样式① 图上文下 148x172:图满宽铺顶紧贴边框,顶层透明描边框把描边画回图片上;文字区 72 高(名字 2 行 40 + 价格贴底) -->
 	<DiandanFoodItem name="diandan_fooditem" width="148" height="172" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r10.png' corner='10,10,10,10'">
-		<Control name="image" width="148" height="96" bkimage="file='fc_img_ph.png'"></Control>
+		<Control name="image" width="148" height="96" bkimage="file='fc_img_ph.png'" mouse="false"></Control>
 		<Control bkimage="file='fc_topmask.png'" width="148" height="172" float="true" pos="0,0,148,172" mouse="false"/>
+		<Control name="diandan_fooditem_frame" bkimage="file='fc_r10_frame.png' corner='10,10,10,10'" width="148" height="172" float="true" pos="0,0,148,172" mouse="false"/>
 
-		<VerticalLayout width="148" height="72" inset="10,6,10,2">
-			<Label name="foodname" height="40" font="13" textcolor="#FF1F2329" wordbreak="true" endellipsis="true"></Label>
-			<Control></Control>
-			<Label name="price" height="20" font="114" textcolor="#FFF5623D" valign="top"></Label>
+		<VerticalLayout width="148" height="72" inset="10,6,10,2" mouse="false">
+			<Label name="foodname" height="40" font="13" textcolor="#FF1F2329" wordbreak="true" endellipsis="true" mouse="false"></Label>
+			<Control mouse="false"></Control>
+			<Label name="price" height="20" font="114" textcolor="#FFF5623D" valign="top" mouse="false"></Label>
 		</VerticalLayout>
-		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,10,64,32" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,10,64,32" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,10,64,32" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,10,64,32" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,10,64,32" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,10,64,32" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 	</DiandanFoodItem>
 
 </Window>

+ 9 - 9
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_fooditem_youtu_2.xml

@@ -2,22 +2,22 @@
 <Window>
 	<!-- 样式② 图左文右 250x82:缩略图 80x80 贴左/上/下铺满,名字价格居右(HLayout 子项高度只认 maxheight) -->
 	<DiandanFoodItem name="diandan_fooditem" width="250" height="82" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
-		<HorizontalLayout width="250" height="82" inset="1,1,8,1" childpadding="9">
-			<Control name="image" width="80" height="80" maxheight="80" bkimage="file='fc_img_ph.png'"></Control>
+		<HorizontalLayout width="250" height="82" inset="1,1,8,1" childpadding="9" mouse="false">
+			<Control name="image" width="80" height="80" maxheight="80" bkimage="file='fc_img_ph.png'" mouse="false"></Control>
 
-			<VerticalLayout width="152" height="80" maxheight="80">
-				<Label name="foodname" height="34" font="12" textcolor="#FF1F2329" wordbreak="true" endellipsis="true"></Label>
-				<Control></Control>
-				<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top"></Label>
+			<VerticalLayout width="152" height="80" maxheight="80" mouse="false">
+				<Label name="foodname" height="34" font="12" textcolor="#FF1F2329" wordbreak="true" endellipsis="true" mouse="false"></Label>
+				<Control mouse="false"></Control>
+				<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top" mouse="false"></Label>
 			</VerticalLayout>
 		</HorizontalLayout>
 		<!-- 圆角遮罩:DuiLib 无裁剪,图片铺满后方角会戳出 fc_r8 圆角;外部填页面底色、洞内全透明,浮在上层盖住外沿 -->
 		<Control float="true" pos="0,0,250,82" bkimage="file='fc_mask_250x82.png'" mouse="false"></Control>
-		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 	</DiandanFoodItem>
 
 </Window>

+ 6 - 6
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_fooditem_youtu_3.xml

@@ -2,19 +2,19 @@
 <Window>
 	<!-- 样式③ 名字价格压图 148x150:图片铺满整卡,底部信息条固定 48 高(白 65% 半透明 #A6FFFFFF),名字固定一行 -->
 	<DiandanFoodItem name="diandan_fooditem" width="148" height="150" bkcolor="#00000000" bordersize="0" bkimage="file='fc_r8.png' corner='8,8,8,8'">
-		<Control name="image" width="148" height="150" bkimage="file='fc_img_ph.png'"></Control>
+		<Control name="image" width="148" height="150" bkimage="file='fc_img_ph.png'" mouse="false"></Control>
 
 		<VerticalLayout width="148" height="48" float="true" pos="0,102,148,150" mouse="false" bkcolor="#A6FFFFFF" inset="8,5,8,6" childpadding="1">
-			<Label name="foodname" height="17" font="12" textcolor="#FF1F2329" endellipsis="true"></Label>
-			<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top"></Label>
+			<Label name="foodname" height="17" font="12" textcolor="#FF1F2329" endellipsis="true" mouse="false"></Label>
+			<Label name="price" height="19" font="113" textcolor="#FFF5623D" valign="top" mouse="false"></Label>
 		</VerticalLayout>
 		<!-- 圆角遮罩:盖住图片与信息条戳出 fc_r8 圆角轮廓的方角 -->
 		<Control float="true" pos="0,0,148,150" bkimage="file='fc_mask_148x150.png'" mouse="false"></Control>
-		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="nature" visible="false" width="54" height="22" font="12" text="多属性" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_grn.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="chengzhong" visible="false" width="54" height="22" font="12" text="称重" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_blue.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 
-		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center"></Label>
+		<Label name="kucun" visible="false" width="54" height="22" font="12" text="已售罄" float="true" pos="10,8,64,30" textcolor="#FFFFFFFF" bkimage="file='fc_chip_gray.png' corner='11,11,11,11'" align="center" valign="center" mouse="false"></Label>
 	</DiandanFoodItem>
 
 </Window>

BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/fc_r10_frame.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/fc_r10_hot_frame.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/fc_r10_pressed.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/fc_r10_pressed_frame.png


BIN
bin/Win32/Debug/zhipuzi_pos_windows/skin/fc_r8_pressed.png


+ 40 - 49
bin/Win32/Debug/zhipuzi_pos_windows/skin/yubaozhuangbiaoqian_page.xml

@@ -2,64 +2,55 @@
 <Window>
 
 	<YubaozhuangbiaoqianPage>
-		<HorizontalLayout>
-			<Control width="1" bkcolor="#FFD1D1D1"></Control>
-				
-			<VerticalLayout width="380" bkcolor="#FFFFFFFF" padding="0,0,0,0">
-				<HorizontalLayout name="yubaozhuangbiaoqian_page_chengzhong_layout" height="100">
-					<VerticalLayout width="80">
-						<Control name="yubaozhuangbiaoqian_page_status_chengzhong_wending" bkimage="deng_off.png" width="8" height="8" float="true" pos="15,28,23,36" mouse="false"></Control>
-						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_wending" text="稳定" height="20" padding="30,20,0,0" font="14"></Label>
-
-						<Control name="yubaozhuangbiaoqian_page_status_chengzhong_jingzhong" bkimage="deng_off.png" width="8" height="8" float="true" pos="15,68,23,76" mouse="false"></Control>
-						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_jingzhong" text="净重" height="20" padding="30,20,0,0" font="14"></Label>
-					</VerticalLayout>							
-
-					<HorizontalLayout width="200">
-						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_value" text="0.000" align="right" width="135" height="40" padding="0,35,0,0" textcolor="#FF60B177" font="140"></Label>
-						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_unit" text="公斤" height="30" padding="15,40,0,0" font="16"></Label>
-					</HorizontalLayout>
-
-					<VerticalLayout>
-						<Button name="yubaozhuangbiaoqian_page_chengzhong_zhiling" visible="false" width="80" height="32" padding="10,10,10,0" text="置零" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'" />
-						<Button name="yubaozhuangbiaoqian_page_chengzhong_qupi" visible="false" width="80" height="32" padding="10,15,10,0" text="去皮" textcolor="#FFFFFFFF" normalimage="file='btn_green_zhengchang.png' corner='5,5,5,5'" hotimage="file='btn_green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='btn_green_dianji.png' corner='5,5,5,5'" />
-
+		<HorizontalLayout bkcolor="#FFF5F7FA" inset="12,12,12,12" childpadding="12">
+
+			<!-- 左:称重卡(390) + 提示区 -->
+			<VerticalLayout width="390" bkcolor="#00000000" childpadding="12">
+				<!-- 称重卡 C4:与点单页完全一致(状态竖排 / 数字块164x54居中 / 置零·去皮竖排,卡高76) -->
+				<HorizontalLayout name="yubaozhuangbiaoqian_page_chengzhong_layout" height="76" bkimage="file='dc_cart.png' corner='10,10,10,10'">
+					<VerticalLayout float="true" pos="14,16,66,60" mouse="false">
+						<Control name="yubaozhuangbiaoqian_page_status_chengzhong_wending" bkimage="deng_off.png" width="8" height="8" float="true" pos="0,4,8,12" mouse="false"/>
+						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_wending" text="稳定" font="12" textcolor="#FF5F6368" float="true" pos="14,0,52,17" mouse="false"/>
+						<Control name="yubaozhuangbiaoqian_page_status_chengzhong_jingzhong" bkimage="deng_off.png" width="8" height="8" float="true" pos="0,31,8,39" mouse="false"/>
+						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_jingzhong" text="净重" font="12" textcolor="#FF5F6368" float="true" pos="14,27,52,44" mouse="false"/>
 					</VerticalLayout>
+					<HorizontalLayout float="true" pos="113,11,277,65" bkimage="file='cz_num_bg.png'" mouse="false">
+						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_value" text="0.000" align="right" font="132" textcolor="#FF2E9B5C" float="true" pos="8,6,118,48" mouse="false"/>
+						<Label name="yubaozhuangbiaoqian_page_label_chengzhong_unit" text="公斤" font="13" textcolor="#FF2E9B5C" float="true" pos="124,25,150,43" mouse="false"/>
+					</HorizontalLayout>
+					<Button name="yubaozhuangbiaoqian_page_chengzhong_zhiling" visible="false" float="true" pos="328,8,376,35" text="置零" font="12" textcolor="#FF2E9B5C" normalimage="file='cz_btn_n.png'" hotimage="file='cz_btn_h.png'" pushedimage="file='cz_btn_p.png'"/>
+					<Button name="yubaozhuangbiaoqian_page_chengzhong_qupi" visible="false" float="true" pos="328,41,376,68" text="去皮" font="12" textcolor="#FF2E9B5C" normalimage="file='cz_btn_n.png'" hotimage="file='cz_btn_h.png'" pushedimage="file='cz_btn_p.png'"/>
 				</HorizontalLayout>
 
-				<Control height="1" bkcolor="#FFEBE8E8"></Control>	
-
-				<VerticalLayout padding="0,30,0,0">
-					<Label text="1、打印条码前,先前往设置中心设置好标签打印机的参数" textcolor="#FF999999" wordbreak="true" height="40" padding="20,10,20,0" font="14"></Label>
-					<Label text="2、称重商品请提前设置好商品PLU编码,先把商品放在秤上称重,等待读数稳定后再点击商品即可打印条码" textcolor="#FF999999" wordbreak="true" height="40" padding="20,10,20,0" font="14"></Label>
-					<Label text="3、称重商品条码为13位【FFWWWWWNNNNNC】,请在收银机的条码秤设置选择同样的格式即可扫码识别" textcolor="#FF999999" wordbreak="true" height="40" padding="20,10,20,0" font="14"></Label>
-					<Label text="4、非称重商品请提前设置好商品条码,直接点击商品即可打印条码" textcolor="#FF999999" wordbreak="true" height="40" padding="20,10,20,0" font="14"></Label>
-				</VerticalLayout>	
+				<!-- 提示区:白卡圆角,与点单页卡片风格一致 -->
+				<VerticalLayout bkimage="file='dc_cart.png' corner='10,10,10,10'" inset="16,14,16,14" childpadding="8">
+					<Label text="使用说明" font="115" textcolor="#FF1F2329" height="24"/>
+					<Label text="1、打印条码前,先前往设置中心设置好标签打印机的参数" textcolor="#FF5F6368" wordbreak="true" font="13" height="24"/>
+					<Label text="2、称重商品请提前设置好商品PLU编码,先把商品放在秤上称重,等待读数稳定后再点击商品即可打印条码" textcolor="#FF5F6368" wordbreak="true" font="13" height="48"/>
+					<Label text="3、称重商品条码为13位【FFWWWWWNNNNNC】,请在收钱机的条码秤设置选择同样的格式即可扫码识别" textcolor="#FF5F6368" wordbreak="true" font="13" height="48"/>
+					<Label text="4、非称重商品请提前设置好商品条码,直接点击商品即可打印条码" textcolor="#FF5F6368" wordbreak="true" font="13" height="44"/>
+				</VerticalLayout>
 			</VerticalLayout>
-			
-			<Control width="1" bkcolor="#FFEBE8E8"></Control>
-			
-			<VerticalLayout name="yubaozhuangbiaoqian_food_layout">
-				<VerticalLayout name="yubaozhuangbiaoqian_fenlei_layout_scrolllayout" vscrollbar="true">
-					<Container name="yubaozhuangbiaoqian_fenlei_layout" padding="0,0,0,0" bkcolor="#FFFFFFFF">
 
+			<!-- 右:分类 + 商品网格 + 搜索 -->
+			<VerticalLayout name="yubaozhuangbiaoqian_food_layout" childpadding="12">
+				<VerticalLayout name="yubaozhuangbiaoqian_fenlei_layout_scrolllayout" vscrollbar="true">
+					<Container name="yubaozhuangbiaoqian_fenlei_layout">
 					</Container>
 				</VerticalLayout>
-				
-				<TileLayout name="yubaozhuangbiaoqian_foodlist" padding="0,0,0,0" inset="10,10,0,10" childpadding="10" vscrollbar="true" hscrollbar="false">
-				
+
+				<TileLayout name="yubaozhuangbiaoqian_foodlist" bkcolor="#00000000" vscrollbar="true" hscrollbar="false" childpadding="10">
 				</TileLayout>
-				
-				<HorizontalLayout height="70" padding="0,0,0,0" bkcolor="#FFFFFFFF">
-					<Edit name="yubaozhuangbiaoqian_food_search_edit" tooltip="请输入商品名字或条码搜索" width="380" height="50" padding="30,10,0,10" textpadding="50,0,50,0" borderround="45,45" bkcolor="#FFECEFED" nativebkcolor="#FFECEFED" />
-					
-					<Label name="yubaozhuangbiaoqian_food_search_tishi" text="请输入商品名字或条码搜索" width="120" height="35" font="16" float="true" pos="90,18,425,50" mouse="false"></Label>
-					
-					<Control bkimage="search_icon.png" width="25" height="26" pos="45,23,70,49" float="true"></Control>
-					
-					<Button name="yubaozhuangbiaoqian_food_search_clear" visible="false" width="23" height="23" pos="365,23,388,46" float="true" normalimage="search_clear.png" hotimage="search_clear.png" pushedimage="search_clear.png" bkimage="search_clear.png"></Button>
+
+				<HorizontalLayout height="40" childpadding="10">
+					<HorizontalLayout bkimage="file='dc_search.png' corner='20,20,20,20'" inset="16,0,12,0" childpadding="8" childvalign="vcenter">
+						<Control bkimage="dc_ico_search16.png" width="16" height="16" maxheight="16"/>
+						<Edit name="yubaozhuangbiaoqian_food_search_edit" tooltip="请输入商品名字或条码搜索" font="12" textcolor="#FF1F2329" maxheight="24" bkcolor="#00000000" nativebkcolor="#FFEFF1F3"/>
+						<Label name="yubaozhuangbiaoqian_food_search_tishi" text="请输入商品名字或条码搜索" width="150" height="20" font="12" float="true" pos="40,10,190,30" mouse="false" valign="center" textcolor="#FFA8ADB3"/>
+						<Button name="yubaozhuangbiaoqian_food_search_clear" visible="false" width="23" height="23" maxheight="23" normalimage="search_clear.png" hotimage="search_clear.png" pushedimage="search_clear.png"/>
+					</HorizontalLayout>
 				</HorizontalLayout>
 			</VerticalLayout>
 		</HorizontalLayout>
 	</YubaozhuangbiaoqianPage>
-</Window>
+</Window>

+ 54 - 15
zhipuzi_pos_windows/control/CDiandanFoodItemUI.cpp

@@ -16,32 +16,71 @@ void CDiandanFoodItemUI::DoEvent(TEventUI& event)
 	if (event.Type == UIEVENT_BUTTONUP)
 	{
 		m_pManager->SendNotify(this, DUI_MSGTYPE_CLICK);
+		// 按压释放后仍悬浮 -> 恢复 hot 态
+		SetCardState("hot");
+	}
+	else if (event.Type == UIEVENT_BUTTONDOWN)
+	{
+		// 按压态:深绿边 + 内阴影
+		SetCardState("pressed");
 	}
 	else if (event.Type == UIEVENT_MOUSEENTER)
 	{
-		//悬浮:整卡切浅绿底。样式①是 radius 10 的卡片,其余三种是 radius 8
-		if (m_youtu_model == "1")
-		{
-			this->SetBkImage(L"file='fc_r10.png' corner='10,10,10,10'");
-		}
-		else
-		{
-			this->SetBkImage(L"file='fc_r8.png' corner='8,8,8,8'");
-		}
+		// 悬浮态:整卡切浅绿边(样式① radius10,其余 radius8)
+		SetCardState("hot");
 	}
 	else if (event.Type == UIEVENT_MOUSELEAVE)
 	{
-		if (m_youtu_model == "1")
+		// 离开恢复普通态
+		SetCardState("normal");
+	}
+
+	CVerticalLayoutUI::DoEvent(event);
+}
+
+void CDiandanFoodItemUI::SetCardState(const std::string& state)
+{
+	bool bR10 = (m_youtu_model == "1");
+
+	// 底层背景(提供白底填充 + 悬浮/按压时的整卡色调)
+	LPCTSTR pszRoot = bR10 ? _T("file='fc_r10.png' corner='10,10,10,10'")
+	                       : _T("file='fc_r8.png' corner='8,8,8,8'");
+	LPCTSTR pszRootHot = bR10 ? _T("file='fc_r10_hot.png' corner='10,10,10,10'")
+	                          : _T("file='fc_r8_hot.png' corner='8,8,8,8'");
+	LPCTSTR pszRootPressed = bR10 ? _T("file='fc_r10_pressed.png' corner='10,10,10,10'")
+	                              : _T("file='fc_r8_pressed.png' corner='8,8,8,8'");
+
+	// 样式①顶层描边框(透明中心 + 只描边,叠在满宽图片上层,使描边不被图片盖住)
+	LPCTSTR pszFrame = _T("file='fc_r10_frame.png' corner='10,10,10,10'");
+	LPCTSTR pszFrameHot = _T("file='fc_r10_hot_frame.png' corner='10,10,10,10'");
+	LPCTSTR pszFramePressed = _T("file='fc_r10_pressed_frame.png' corner='10,10,10,10'");
+
+	LPCTSTR pszRootUse = pszRoot;
+	LPCTSTR pszFrameUse = pszFrame;
+	if (state == "hot")
+	{
+		pszRootUse = pszRootHot;
+		pszFrameUse = pszFrameHot;
+	}
+	else if (state == "pressed")
+	{
+		pszRootUse = pszRootPressed;
+		pszFrameUse = pszFramePressed;
+	}
+
+	this->SetBkImage(pszRootUse);
+
+	if (bR10)
+	{
+		if (m_pBorderFrame == nullptr)
 		{
-			this->SetBkImage(L"file='fc_r10.png' corner='10,10,10,10'");
+			m_pBorderFrame = this->FindSubControl(_T("diandan_fooditem_frame"));
 		}
-		else
+		if (m_pBorderFrame != nullptr)
 		{
-			this->SetBkImage(L"file='fc_r8.png' corner='8,8,8,8'");
+			m_pBorderFrame->SetBkImage(pszFrameUse);
 		}
 	}
-
-	CVerticalLayoutUI::DoEvent(event);
 }
 
 void CDiandanFoodItemUI::SetFoodInfo(CFood info)

+ 7 - 0
zhipuzi_pos_windows/control/CDiandanFoodItemUI.h

@@ -30,6 +30,10 @@ public:
 
 	void SetYoutuModel(std::string youtu_model);
 
+private:
+	// 根据交互态切换整卡背景 +(样式①)顶层描边框
+	void SetCardState(const std::string& state);
+
 private:
 	CFood m_foodinfo;
 	CFoodpackage m_foodpackageinfo;
@@ -38,5 +42,8 @@ private:
 
 	//默认有图模式
 	std::string m_youtu_model = "1";
+
+	// 样式①:图片满宽铺顶后,叠在图片上层的透明描边框(name=diandan_fooditem_frame)
+	CControlUI* m_pBorderFrame = nullptr;
 };
 

+ 2 - 2
zhipuzi_pos_windows/page/CGengduoPageUI.cpp

@@ -786,9 +786,9 @@ void CGengduoPageUI::GengduoJiaohuan(CControlUI* pSender)
 			changyongVector = CLewaimaiString::Split(m_changyongString, ",");
 		}
 
-		if (changyongVector.size() >= 6)
+		if (changyongVector.size() >= 8)
 		{
-			m_pMainWnd->ShowToast(L"常用功能最多只能设置6个");
+			m_pMainWnd->ShowToast(L"常用功能最多只能设置8个");
 			return;
 		}
 	}

+ 16 - 20
zhipuzi_pos_windows/page/CYubaozhuangbiaoqianPageUI.cpp

@@ -209,7 +209,9 @@ void CYubaozhuangbiaoqianPageUI::UpdateFoodtypePos()
 	}
 
 	//根据宽度计算每行显示的数量
-	int nMeihangNum = (nWidth - 381) / 140;
+	//与点单页保持一致:分类区可用宽 = 页宽 - 左侧 inset12 - 购物车390 - 间距12 - 右侧 inset12 = 页宽-414
+	//每个胶囊 130 宽 + 8 间距;首列从 x=0 起,与下方商品网格左边对齐
+	int nMeihangNum = (nWidth - 414) / 138;
 
 	int num = 0;
 
@@ -223,10 +225,10 @@ void CYubaozhuangbiaoqianPageUI::UpdateFoodtypePos()
 		int curCol = num % nMeihangNum + 1;
 
 		RECT rect;
-		rect.left = (curCol - 1) * 140 + 10;
+		rect.left = (curCol - 1) * 138;
 		rect.right = rect.left + 130;
-		rect.top = (curRow - 1) * 52 + 10;
-		rect.bottom = rect.top + 42;
+		rect.top = (curRow - 1) * 46 + 8;
+		rect.bottom = rect.top + 38;
 
 		// 强制设置固定大小和位置
 		SIZE size;
@@ -242,7 +244,7 @@ void CYubaozhuangbiaoqianPageUI::UpdateFoodtypePos()
 
 	//调整区域高度
 	int lastRow = (num - 1) / nMeihangNum + 1;
-	pFenleiLayout->SetFixedHeight(lastRow * 52 + 10);
+	pFenleiLayout->SetFixedHeight(lastRow * 46 + 8);
 
 	//处理滚动条问题
 	CVerticalLayoutUI* pFenleiScrollLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_fenlei_layout_scrolllayout")));
@@ -251,7 +253,7 @@ void CYubaozhuangbiaoqianPageUI::UpdateFoodtypePos()
 		lastRow = 2;
 	}
 
-	pFenleiScrollLayout->SetFixedHeight(lastRow * 52 + 10);
+	pFenleiScrollLayout->SetFixedHeight(lastRow * 46 + 8);
 
 	SIZE size;
 	size.cx = 0;
@@ -271,8 +273,8 @@ void CYubaozhuangbiaoqianPageUI::InitFoodShow()
 	if (setting_xianshi_is_youtu == "1")
 	{
 		SIZE itemsize;
-		itemsize.cx = 130;
-		itemsize.cy = 200;
+		itemsize.cx = 148;
+		itemsize.cy = 172;
 		m_foodLayout->SetItemSize(itemsize);
 
 		xml_name = _T("diandan_fooditem_youtu.xml");
@@ -280,8 +282,8 @@ void CYubaozhuangbiaoqianPageUI::InitFoodShow()
 	else if (setting_xianshi_is_youtu == "2")
 	{
 		SIZE itemsize;
-		itemsize.cx = 230;
-		itemsize.cy = 90;
+		itemsize.cx = 250;
+		itemsize.cy = 82;
 		m_foodLayout->SetItemSize(itemsize);
 
 		xml_name = _T("diandan_fooditem_youtu_2.xml");
@@ -289,8 +291,8 @@ void CYubaozhuangbiaoqianPageUI::InitFoodShow()
 	else if (setting_xianshi_is_youtu == "3")
 	{
 		SIZE itemsize;
-		itemsize.cx = 140;
-		itemsize.cy = 120;
+		itemsize.cx = 148;
+		itemsize.cy = 150;
 		m_foodLayout->SetItemSize(itemsize);
 
 		xml_name = _T("diandan_fooditem_youtu_3.xml");
@@ -298,8 +300,8 @@ void CYubaozhuangbiaoqianPageUI::InitFoodShow()
 	else
 	{
 		SIZE itemsize;
-		itemsize.cx = 140;
-		itemsize.cy = 100;
+		itemsize.cx = 148;
+		itemsize.cy = 96;
 		m_foodLayout->SetItemSize(itemsize);
 
 		xml_name = _T("diandan_fooditem_wutu.xml");
@@ -630,9 +632,6 @@ void CYubaozhuangbiaoqianPageUI::StartSearchFood(std::string foodname)
 
 	m_sousuo_foodname = foodname;
 
-	CLabelUI* pTishi = static_cast<CLabelUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_food_search_tishi")));
-	pTishi->SetVisible(false);
-
 	this->InitFoodShow();
 }
 
@@ -649,9 +648,6 @@ void CYubaozhuangbiaoqianPageUI::StopSerachFood()
 
 	m_cur_type_id = m_type_id_before_sousuo;
 
-	CLabelUI* pTishi = static_cast<CLabelUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_food_search_tishi")));
-	pTishi->SetVisible(true);
-
 	this->InitFoodShow();
 }
 

BIN
zhipuzi_pos_windows/resource/skin.zip


+ 28 - 5
zhipuzi_pos_windows/wnd/CMainWnd.cpp

@@ -266,11 +266,24 @@ void CMainWnd::Notify(TNotifyUI& msg)
 		{
 			CSystem::HideSystemKeyboard();
 
-			// 点餐页商品搜索框:失去焦点且内容为空时恢复占位提示语
+			// 点餐页/预包装标签页商品搜索框:失去焦点且内容为空时恢复占位提示语
+			LPCTSTR szEditName = NULL;
+			LPCTSTR szTishiName = NULL;
 			if (name == _T("diandan_food_search_edit"))
 			{
-				CControlUI* pEdit = m_pm.FindControl(_T("diandan_food_search_edit"));
-				CControlUI* pTishi = m_pm.FindControl(_T("diandan_food_search_tishi"));
+				szEditName = _T("diandan_food_search_edit");
+				szTishiName = _T("diandan_food_search_tishi");
+			}
+			else if (name == _T("yubaozhuangbiaoqian_food_search_edit"))
+			{
+				szEditName = _T("yubaozhuangbiaoqian_food_search_edit");
+				szTishiName = _T("yubaozhuangbiaoqian_food_search_tishi");
+			}
+
+			if (szEditName != NULL && szTishiName != NULL)
+			{
+				CControlUI* pEdit = m_pm.FindControl(szEditName);
+				CControlUI* pTishi = m_pm.FindControl(szTishiName);
 				if (pEdit != NULL && pTishi != NULL)
 				{
 					if (pEdit->GetText().IsEmpty()) pTishi->SetVisible(true);
@@ -287,10 +300,20 @@ void CMainWnd::Notify(TNotifyUI& msg)
 				CSystem::ShowSystemKeyboard(m_hWnd);
 			}
 
-			// 点餐页商品搜索框:获得焦点即隐藏占位提示语,避免与光标/输入文字重叠
+			// 点餐页/预包装标签页商品搜索框:获得焦点即隐藏占位提示语,避免与光标/输入文字重叠
+			LPCTSTR szTishiName = NULL;
 			if (name == _T("diandan_food_search_edit"))
 			{
-				CControlUI* pTishi = m_pm.FindControl(_T("diandan_food_search_tishi"));
+				szTishiName = _T("diandan_food_search_tishi");
+			}
+			else if (name == _T("yubaozhuangbiaoqian_food_search_edit"))
+			{
+				szTishiName = _T("yubaozhuangbiaoqian_food_search_tishi");
+			}
+
+			if (szTishiName != NULL)
+			{
+				CControlUI* pTishi = m_pm.FindControl(szTishiName);
 				if (pTishi != NULL) pTishi->SetVisible(false);
 			}
 		}