Browse Source

输入框修改完

张洋 1 month ago
parent
commit
5d5b9ad03f

+ 7 - 7
bin/Win32/Debug/zhipuzi_pos_windows/skin/huiyuan_page.xml

@@ -85,11 +85,11 @@
 
 						<!-- 信息网格 -->
 						<HorizontalLayout height="66" childpadding="12">
-							<VerticalLayout bkcolor="#FFFAFBFC" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
+							<VerticalLayout bkcolor="#FFF5F7FA" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
 								<Label text="手机号" font="12" textcolor="#FF8A9099" height="18" />
 								<Label name="huiyuan_phone" text="--" font="14" textcolor="#FF1F2329" height="24" />
 							</VerticalLayout>
-							<VerticalLayout bkcolor="#FFFAFBFC" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
+							<VerticalLayout bkcolor="#FFF5F7FA" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
 								<Label text="密码登录" font="12" textcolor="#FF8A9099" height="18" />
 								<Label name="huiyuan_mimazhifu" text="--" font="14" textcolor="#FF1F2329" height="24" />
 							</VerticalLayout>
@@ -98,11 +98,11 @@
 						<Control height="12" />
 
 						<HorizontalLayout height="66" childpadding="12">
-							<VerticalLayout bkcolor="#FFFAFBFC" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
+							<VerticalLayout bkcolor="#FFF5F7FA" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
 								<Label text="性别" font="12" textcolor="#FF8A9099" height="18" />
 								<Label name="huiyuan_sex" text="--" font="14" textcolor="#FF1F2329" height="24" />
 							</VerticalLayout>
-							<VerticalLayout bkcolor="#FFFAFBFC" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
+							<VerticalLayout bkcolor="#FFF5F7FA" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
 								<Label text="生日" font="12" textcolor="#FF8A9099" height="18" />
 								<Label name="huiyuan_birthday" text="--" font="14" textcolor="#FF1F2329" height="24" />
 							</VerticalLayout>
@@ -110,7 +110,7 @@
 
 						<Control height="12" />
 
-						<VerticalLayout height="66" bkcolor="#FFFAFBFC" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
+						<VerticalLayout height="66" bkcolor="#FFF5F7FA" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
 							<Label text="地址" font="12" textcolor="#FF8A9099" height="18" />
 							<Label name="huiyuan_address" text="--" font="14" textcolor="#FF1F2329" height="24" />
 						</VerticalLayout>
@@ -118,11 +118,11 @@
 						<Control height="12" />
 
 						<HorizontalLayout height="66" childpadding="12">
-							<VerticalLayout bkcolor="#FFFAFBFC" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
+							<VerticalLayout bkcolor="#FFF5F7FA" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
 								<Label text="实体会员卡" font="12" textcolor="#FF8A9099" height="18" />
 								<Label name="huiyuan_shitika" text="--" font="14" textcolor="#FF1F2329" height="24" />
 							</VerticalLayout>
-							<VerticalLayout bkcolor="#FFFAFBFC" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
+							<VerticalLayout bkcolor="#FFF5F7FA" borderround="16,16" inset="15,0,15,0" childvalign="vcenter">
 								<Label text="会员状态" font="12" textcolor="#FF8A9099" height="18" />
 								<Label name="huiyuan_status" text="--" font="14" textcolor="#FF60B177" height="24" />
 							</VerticalLayout>

+ 40 - 34
bin/Win32/Debug/zhipuzi_pos_windows/skin/num_input_dlg.xml

@@ -1,45 +1,51 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<Window size="700,434" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
+<Window size="540,420" caption="0,0,0,44" roundcorner="4,4" shadowsize="3" showshadow="true">
 	
-	<VerticalLayout bkimage="shoukuan_bkg.png" >
+	<VerticalLayout bkimage="shoukuan_bkg.png">
 		<HorizontalLayout name="dlg_title_bkg" height="44" bkcolor="0xFF60B177">
-			<Label name="dlg_title" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="22"/>
-			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+			<Label name="dlg_title" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="115"/>
+			<Button name="closebtn" keyboard="false" padding="0,14,15,0" width="16" height="16" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		
-		<HorizontalLayout>
-			<VerticalLayout width="370">
-				<Label name="attention" text="请输入折扣值(1到100之间的整数)" height="30" width="300" padding="30,50,0,0" align="left"/>
-	
-				<HorizontalLayout height="50" padding="0,30,0,0">
-					<Edit name="content" width="250" height="50" padding="30,0,0,0" textcolor="0xFF60B177" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" font="32"/>
-				</HorizontalLayout>
-				
-				<Label name="errinfo" text=""  height="60" width="250" float="true" pos="30,150,280,290" align="left" textcolor="#FFFF0000" visible="false"/>
-				
-				<HorizontalLayout height="56" valign="center" padding="30,100,0,20">
-					<Button name="save" align="center" text="确认" textcolor="#FFFFFFFF" height="50" width="250" padding="0,0,0,0" 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 inset="20,20,20,20" childpadding="16">
+			<!-- 左侧:提示语 + 输入框(右侧带单位) + 确认按钮 -->
+			<VerticalLayout width="242">
+				<Label name="attention" text="" width="242" height="42" font="13" textcolor="#FF5F6368" align="left" wordbreak="true"/>
+				<Control width="242" height="14"/>
+				<HorizontalLayout width="242" height="46">
+					<!-- Edit 的 textpadding 右侧预留 44px:原生输入窗口按 textpadding 内缩,不会盖住浮层单位 -->
+					<Edit name="content" width="242" height="46" font="16" textcolor="#FF1F2329" bkcolor="#FFFFFFFF" nativebkcolor="#FFFFFFFF" textpadding="14,0,44,0" normalimage="file='input_normal.png' corner='10,10,10,10'" hotimage="file='input_hover.png' corner='10,10,10,10'" focusedimage="file='input_focus.png' corner='10,10,10,10'"/>
+					<Label name="unit" text="" float="true" pos="0,0,242,46" align="right" valign="center" font="14" textcolor="#FF8A9099" textpadding="0,0,14,0" mouse="false"/>
 				</HorizontalLayout>
+				<Control width="242" height="16"/>
+				<Button name="save" text="确认" width="242" height="46" textcolor="#FFFFFFFF" font="115" normalimage="file='gd_btn_green_n.png' corner='8,8,8,8'" hotimage="file='gd_btn_green_h.png' corner='8,8,8,8'" pushedimage="file='gd_btn_green_p.png' corner='8,8,8,8'"/>
 			</VerticalLayout>
 			
-			<HorizontalLayout width="330" height="406" bkcolor="#FFF3F3F3">
-				<Button name="jianpan_1" text="1" font="26" heiht="60" width="60" float="true" pos="10,0,110,90" 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" font="26" heiht="60" width="60" float="true" pos="120,0,220,90" 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" font="26" heiht="60" width="60" float="true" pos="230,0,330,90" 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" font="26" heiht="60" width="60" float="true" pos="10,100,110,190" 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" font="26" heiht="60" width="60" float="true" pos="120,100,220,190" 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" font="26" heiht="60" width="60" float="true" pos="230,100,330,190" 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" font="26" heiht="60" width="60" float="true" pos="10,200,110,290" 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" font="26" heiht="60" width="60" float="true" pos="120,200,220,290" 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" font="26" heiht="60" width="60" float="true" pos="230,200,330,290" 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="清空" font="26" heiht="60" width="60" float="true" pos="10,300,110,390" 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" font="26" heiht="60" width="60" float="true" pos="120,300,220,390" 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_x" text="X" font="26" heiht="60" width="60" float="true" pos="230,300,330,390" 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>
+			<!-- 右侧:数字键盘。复刻会员充值弹框键盘规格(key_*.png 圆角 12 / 数字 24 号 / 按下文字转主绿 #FF60B177 / 清空与退格用次要灰字) -->
+			<VerticalLayout width="242" childpadding="10">
+				<HorizontalLayout width="242" height="76" childpadding="10">
+					<Button name="jianpan_1" text="1" font="24" textcolor="#FF1F2329" 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 name="jianpan_2" text="2" font="24" textcolor="#FF1F2329" 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 name="jianpan_3" text="3" font="24" textcolor="#FF1F2329" 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"/>
+				</HorizontalLayout>
+				<HorizontalLayout width="242" height="76" childpadding="10">
+					<Button name="jianpan_4" text="4" font="24" textcolor="#FF1F2329" 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 name="jianpan_5" text="5" font="24" textcolor="#FF1F2329" 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 name="jianpan_6" text="6" font="24" textcolor="#FF1F2329" 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"/>
+				</HorizontalLayout>
+				<HorizontalLayout width="242" height="76" childpadding="10">
+					<Button name="jianpan_7" text="7" font="24" textcolor="#FF1F2329" 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 name="jianpan_8" text="8" font="24" textcolor="#FF1F2329" 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 name="jianpan_9" text="9" font="24" textcolor="#FF1F2329" 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"/>
+				</HorizontalLayout>
+				<HorizontalLayout width="242" height="76" childpadding="10">
+					<Button name="jianpan_qingkong" text="清空" font="15" textcolor="#FF5F6368" 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 name="jianpan_0" text="0" font="24" textcolor="#FF1F2329" 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 name="jianpan_x" text="×" font="24" textcolor="#FF5F6368" 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"/>
+				</HorizontalLayout>
+			</VerticalLayout>
 		</HorizontalLayout>
 		
+		<Label name="errinfo" text="" height="40" width="242" float="true" pos="20,236,262,276" align="left" font="13" textcolor="#FFFF0000" visible="false" wordbreak="true"/>
 	</VerticalLayout>
-</Window>
+</Window>

+ 3 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -2745,6 +2745,7 @@ void CDiandanPageUI::ClickZhekou()
 		pNumDlg->SetTitle(L"输入折扣值");
 		pNumDlg->SetAttention(L"请输入折扣值(1到100之间的数字,支持小数点)");
 		pNumDlg->SetRange(1, 100);
+		pNumDlg->SetUnit(L"%");
 		pNumDlg->SetAllowDecimal(true);
 
 		UINT ret = pNumDlg->ShowModal();
@@ -2793,6 +2794,7 @@ void CDiandanPageUI::ClickJiajia()
 		pNumDlg->SetTitle(L"输入加价金额");
 		pNumDlg->SetAttention(L"请输入加价金额(0到1000之间的整数)");
 		pNumDlg->SetRange(0, 1000);
+		pNumDlg->SetUnit(L"元");
 
 		UINT ret = pNumDlg->ShowModal();
 
@@ -2840,6 +2842,7 @@ void CDiandanPageUI::ClickRengongyouhui()
 		pNumDlg->SetTitle(L"输入优惠金额");
 		pNumDlg->SetAttention(L"请输入优惠金额(0到1000之间的整数)");
 		pNumDlg->SetRange(0, 1000);
+		pNumDlg->SetUnit(L"元");
 
 		UINT ret = pNumDlg->ShowModal();
 

+ 3 - 0
zhipuzi_pos_windows/page/CSaomashouyinPageUI.cpp

@@ -2326,6 +2326,7 @@ void CSaomashouyinPageUI::ClickZhekou()
 		pNumDlg->SetTitle(L"输入折扣值");
 		pNumDlg->SetAttention(L"请输入折扣值(1到100之间的整数)");
 		pNumDlg->SetRange(1, 100);
+		pNumDlg->SetUnit(L"%");
 
 		UINT ret = pNumDlg->ShowModal();
 
@@ -2373,6 +2374,7 @@ void CSaomashouyinPageUI::ClickJiajia()
 		pNumDlg->SetTitle(L"输入加价金额");
 		pNumDlg->SetAttention(L"请输入加价金额(0到1000之间的整数)");
 		pNumDlg->SetRange(0, 1000);
+		pNumDlg->SetUnit(L"元");
 
 		UINT ret = pNumDlg->ShowModal();
 
@@ -2420,6 +2422,7 @@ void CSaomashouyinPageUI::ClickRengongyouhui()
 		pNumDlg->SetTitle(L"输入优惠金额");
 		pNumDlg->SetAttention(L"请输入优惠金额(0到1000之间的整数)");
 		pNumDlg->SetRange(0, 1000);
+		pNumDlg->SetUnit(L"元");
 
 		UINT ret = pNumDlg->ShowModal();
 

+ 3 - 0
zhipuzi_pos_windows/page/CZhengcanDiandanPageUI.cpp

@@ -3216,6 +3216,7 @@ void CZhengcanDiandanPageUI::ClickZhekou()
 		pNumDlg->SetTitle(L"输入折扣值");
 		pNumDlg->SetAttention(L"请输入折扣值(1到100之间的整数)");
 		pNumDlg->SetRange(1, 100);
+		pNumDlg->SetUnit(L"%");
 
 		UINT ret = pNumDlg->ShowModal();
 
@@ -3263,6 +3264,7 @@ void CZhengcanDiandanPageUI::ClickJiajia()
 		pNumDlg->SetTitle(L"输入加价金额");
 		pNumDlg->SetAttention(L"请输入加价金额(0到1000之间的整数)");
 		pNumDlg->SetRange(0, 1000);
+		pNumDlg->SetUnit(L"元");
 
 		UINT ret = pNumDlg->ShowModal();
 
@@ -3310,6 +3312,7 @@ void CZhengcanDiandanPageUI::ClickRengongyouhui()
 		pNumDlg->SetTitle(L"输入优惠金额");
 		pNumDlg->SetAttention(L"请输入优惠金额(0到1000之间的整数)");
 		pNumDlg->SetRange(0, 1000);
+		pNumDlg->SetUnit(L"元");
 
 		UINT ret = pNumDlg->ShowModal();
 

BIN
zhipuzi_pos_windows/resource/skin.zip


+ 10 - 0
zhipuzi_pos_windows/wnd/CNumInputWnd.cpp

@@ -368,6 +368,16 @@ void CNumInputWnd::SetAllowDecimal(bool allow)
 	m_allow_decimal = allow;
 }
 
+//设置输入框右侧的单位文字(折扣填 %、金额填 元),不调用则留空
+void CNumInputWnd::SetUnit(std::wstring unit)
+{
+	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("unit")));
+	if (pLabel != NULL)
+	{
+		pLabel->SetText(unit.c_str());
+	}
+}
+
 std::string CNumInputWnd::GetNum()
 {
 	return m_content;

+ 3 - 0
zhipuzi_pos_windows/wnd/CNumInputWnd.h

@@ -75,6 +75,9 @@ public:
 	//是否允许输入小数点(整单折扣 95.5 这类场景需要),默认不允许
 	void SetAllowDecimal(bool allow);
 
+	//设置输入框右侧的单位文字(折扣填 %、金额填 元、退菜份数不填),默认空
+	void SetUnit(std::wstring unit);
+
 	void SaveNum();
 
 	std::string GetNum();