张洋 4 роки тому
батько
коміт
cd2f19c5aa

BIN
bin/Win32/Debug/zhipuzi_pos_windows/dump/2021-11-27-12-52-24.dmp


BIN
bin/Win32/Debug/zhipuzi_pos_windows/dump/2021-11-27-17-35-47.dmp


+ 22 - 34
bin/Win32/Debug/zhipuzi_pos_windows/skin/fulika_shoukuan_wnd.xml

@@ -7,15 +7,11 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="福利卡收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="福利卡收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
+			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
-		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="400" padding="0,20,0,0">
-			<HorizontalLayout name="shoukuan_money_input_layout" height="60" padding="0,15,0,0">
-				<Label height="40" padding="190,20,0,10" name="shoukuan_before_pay_huobi" text="¥" font="0" textcolor="0xFF3CB371"></Label>
-				<Edit name="money_edit" float="true" pos="223,0,400,60" font="1" textcolor="0xFF3CB371" bkcolor="0xFFFCFCFC" nativebkcolor="0xFFFCFCFC"/>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15" visible="false">
+		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			
+			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15">
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="220,24,235,50"/>
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="220,24,235,50"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="245,12,520,48"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="245,12,520,48"/>
 			</HorizontalLayout>
 			</HorizontalLayout>
@@ -32,12 +28,17 @@
 				</VerticalLayout>
 				</VerticalLayout>
 			</HorizontalLayout>
 			</HorizontalLayout>
 			
 			
-			<HorizontalLayout name="fukuan_input_fukuanma_layout" height="120" padding="0,30,0,0">
-				<Label text="福利卡付款码:" font="2" float="true" pos="80,35,200,60"/>
-				<Edit name="fukuanma_edit" float="true" pos="203,32,420,68" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
-			</HorizontalLayout>
+			<VerticalLayout name="fukuan_input_fukuanma_layout" height="220" padding="0,30,0,0">
+				<HorizontalLayout padding="0,20,0,0" height="129">
+					<Control></Control>
+					<Control bkimage="qrcode_attention.png" width="129" height="127"></Control>
+					<Control></Control>
+				</HorizontalLayout>
+				
+				<Label text="请扫描顾客福利卡付款二维码" align="center" padding="0,30,0,0" height="40" font="0"></Label>
+			</VerticalLayout>
 			
 			
-			<VerticalLayout visible="false" name="fukuan_input_shoujihao_layout" height="120" padding="0,30,0,0">
+			<VerticalLayout visible="false" name="fukuan_input_shoujihao_layout" height="230" padding="0,30,0,0">
 				<HorizontalLayout height="60">
 				<HorizontalLayout height="60">
 					<Label text="手机号:" font="2" float="true" pos="100,15,200,40"/>
 					<Label text="手机号:" font="2" float="true" pos="100,15,200,40"/>
 					<Edit name="shoujihao_edit" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
 					<Edit name="shoujihao_edit" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
@@ -45,16 +46,15 @@
 			
 			
 				<HorizontalLayout height="60">
 				<HorizontalLayout height="60">
 					<Label text="密码:" font="2" float="true" pos="100,15,200,40"/>
 					<Label text="密码:" font="2" float="true" pos="100,15,200,40"/>
-					<Edit name="password_edit" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
+					<Edit name="password_edit" password="true" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
 				</HorizontalLayout>
 				</HorizontalLayout>
+				
+				<HorizontalLayout height="80" padding="0,30,0,0">
+					<Control></Control>
+					<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="400" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
+					<Control></Control>
+				</HorizontalLayout>	
 			</VerticalLayout>
 			</VerticalLayout>
-			
-			<HorizontalLayout height="80" padding="0,30,0,0">
-				<Control></Control>
-				<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
-				<Button name="closebtn" text="关闭" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="20,0,0,0" tooltip="点击这里取消收款" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" />
-				<Control></Control>
-			</HorizontalLayout>	
 
 
 			<HorizontalLayout height="50" padding="0,20,0,0">
 			<HorizontalLayout height="50" padding="0,20,0,0">
 				<Control></Control>
 				<Control></Control>
@@ -83,20 +83,8 @@
 			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口,按【Esc】取消本次支付" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口,按【Esc】取消本次支付" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 		</VerticalLayout>
 		</VerticalLayout>
 		
 		
-		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">
-			<HorizontalLayout name="shoukuan_pay_success_logo_wx" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="wx_logo.png" width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_pay_success_logo_zhifubao" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="zhifubao_logo.png"  width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
-			
-			<Label height="40" padding="0,20,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
+		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">			
+			<Label height="40" padding="0,80,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
 			
 			
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 		</VerticalLayout>
 		</VerticalLayout>

+ 21 - 32
bin/Win32/Debug/zhipuzi_pos_windows/skin/huiyuan_shoukuan_wnd.xml

@@ -7,15 +7,11 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="会员收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="会员收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
+			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
-		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="400" padding="0,20,0,0">
-			<HorizontalLayout name="shoukuan_money_input_layout" height="60" padding="0,15,0,0">
-				<Label height="40" padding="190,20,0,10" name="shoukuan_before_pay_huobi" text="¥" font="0" textcolor="0xFF3CB371"></Label>
-				<Edit name="money_edit" float="true" pos="223,0,400,60" font="1" textcolor="0xFF3CB371" bkcolor="0xFFFCFCFC" nativebkcolor="0xFFFCFCFC"/>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15" visible="false">
+		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			
+			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15">
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="220,24,235,50"/>
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="220,24,235,50"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="245,12,520,48"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="245,12,520,48"/>
 			</HorizontalLayout>
 			</HorizontalLayout>
@@ -32,12 +28,17 @@
 				</VerticalLayout>
 				</VerticalLayout>
 			</HorizontalLayout>
 			</HorizontalLayout>
 			
 			
-			<HorizontalLayout name="fukuan_input_fukuanma_layout" height="120" padding="0,30,0,0">
-				<Label text="会员付款码:" font="2" float="true" pos="100,35,200,60"/>
-				<Edit name="fukuanma_edit" float="true" pos="203,32,420,68" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
-			</HorizontalLayout>
+			<VerticalLayout name="fukuan_input_fukuanma_layout" height="220" padding="0,30,0,0">
+				<HorizontalLayout padding="0,20,0,0" height="129">
+					<Control></Control>
+					<Control bkimage="qrcode_attention.png" width="129" height="127"></Control>
+					<Control></Control>
+				</HorizontalLayout>
+				
+				<Label text="请扫描顾客会员付款二维码" align="center" padding="0,30,0,0" height="40" font="0"></Label>
+			</VerticalLayout>
 			
 			
-			<VerticalLayout visible="false" name="fukuan_input_shoujihao_layout" height="120" padding="0,30,0,0">
+			<VerticalLayout visible="false" name="fukuan_input_shoujihao_layout" height="230" padding="0,30,0,0">
 				<HorizontalLayout height="60">
 				<HorizontalLayout height="60">
 					<Label text="手机号:" font="2" float="true" pos="100,15,200,40"/>
 					<Label text="手机号:" font="2" float="true" pos="100,15,200,40"/>
 					<Edit name="shoujihao_edit" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
 					<Edit name="shoujihao_edit" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
@@ -45,16 +46,15 @@
 			
 			
 				<HorizontalLayout height="60">
 				<HorizontalLayout height="60">
 					<Label text="密码:" font="2" float="true" pos="100,15,200,40"/>
 					<Label text="密码:" font="2" float="true" pos="100,15,200,40"/>
-					<Edit name="password_edit" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
+					<Edit name="password_edit" password="true" float="true" pos="203,12,420,48" normalimage="file='Chat_InputBox_BG.png' corner='4,4,4,4'" hotimage="file='Chat_InputBox_BG_Hover.png' corner='4,4,4,4'" />
 				</HorizontalLayout>
 				</HorizontalLayout>
+				
+				<HorizontalLayout height="80" padding="0,30,0,0">
+					<Control></Control>
+					<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="400" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
+					<Control></Control>
+				</HorizontalLayout>	
 			</VerticalLayout>
 			</VerticalLayout>
-			
-			<HorizontalLayout height="80" padding="0,30,0,0">
-				<Control></Control>
-				<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
-				<Button name="closebtn" text="关闭" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="20,0,0,0" tooltip="点击这里取消收款" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" />
-				<Control></Control>
-			</HorizontalLayout>	
 
 
 			<HorizontalLayout height="50" padding="0,20,0,0">
 			<HorizontalLayout height="50" padding="0,20,0,0">
 				<Control></Control>
 				<Control></Control>
@@ -84,19 +84,8 @@
 		</VerticalLayout>
 		</VerticalLayout>
 		
 		
 		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">
 		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">
-			<HorizontalLayout name="shoukuan_pay_success_logo_wx" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="wx_logo.png" width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_pay_success_logo_zhifubao" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="zhifubao_logo.png"  width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
 			
 			
-			<Label height="40" padding="0,20,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
+			<Label height="40" padding="0,80,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
 			
 			
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 		</VerticalLayout>
 		</VerticalLayout>

+ 4 - 3
bin/Win32/Debug/zhipuzi_pos_windows/skin/login.xml

@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<Window size="520,410" caption="0,0,0,36" roundcorner="4,4" >
-	<Font id="0" name="微软雅黑" size="16" />
+<Window size="520,430" caption="0,0,0,36" roundcorner="4,4" >
+	<Font shared="true" id="0" name="微软雅黑" size="16" default="true" />
 	<Font id="1" name="微软雅黑" size="40" />
 	<Font id="1" name="微软雅黑" size="40" />
 	<Font id="2" name="微软雅黑" size="18" />
 	<Font id="2" name="微软雅黑" size="18" />
 	<Font id="3" name="微软雅黑" size="32" />
 	<Font id="3" name="微软雅黑" size="32" />
+
 	<VerticalLayout bkimage="file='Dialog_BG2.png' corner='4,48,4,4'" >		
 	<VerticalLayout bkimage="file='Dialog_BG2.png' corner='4,48,4,4'" >		
 		<HorizontalLayout height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout height="44" bkcolor="0xFF3CB371">
 			<Label name="login_version" text="" height="44" align="left" valign="center" padding="15,0,0,0" textcolor="#FFFFFFFF" font="0"/>
 			<Label name="login_version" text="" height="44" align="left" valign="center" padding="15,0,0,0" textcolor="#FFFFFFFF" font="0"/>
@@ -72,7 +73,7 @@
 			<Control></Control>
 			<Control></Control>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
-		<HorizontalLayout padding="0,0,0,15">
+		<HorizontalLayout padding="0,0,0,15" height="30">
 			<Control></Control>
 			<Control></Control>
 			<Button name="guanwang" text="{u}www.zhipuzi.com{/u}" showhtml="true" width="200" align="center"/>
 			<Button name="guanwang" text="{u}www.zhipuzi.com{/u}" showhtml="true" width="200" align="center"/>
 			<Control></Control>
 			<Control></Control>

Різницю між файлами не показано, бо вона завелика
+ 1 - 1
bin/Win32/Debug/zhipuzi_pos_windows/skin/main.xml


+ 8 - 25
bin/Win32/Debug/zhipuzi_pos_windows/skin/xianjin_shoukuan_wnd.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<Window size="580,550" caption="0,0,0,44" roundcorner="4,4" >
+<Window size="580,520" caption="0,0,0,44" roundcorner="4,4" >
 	<Font id="0" name="微软雅黑" size="24" />
 	<Font id="0" name="微软雅黑" size="24" />
 	<Font id="1" name="微软雅黑" size="40" />
 	<Font id="1" name="微软雅黑" size="40" />
 	<Font id="2" name="微软雅黑" size="18" />
 	<Font id="2" name="微软雅黑" size="18" />
@@ -8,15 +8,11 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="现金收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="现金收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
+			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
-		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">
-			<HorizontalLayout name="shoukuan_money_input_layout" height="60" padding="0,15,0,0">
-				<Label height="40" padding="190,20,0,10" name="shoukuan_before_pay_huobi" text="¥" font="0" textcolor="0xFF3CB371"></Label>
-				<Edit name="money_edit" float="true" pos="223,0,400,60" font="1" textcolor="0xFF3CB371" bkcolor="0xFFFCFCFC" nativebkcolor="0xFFFCFCFC"/>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15" visible="false">
+		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">			
+			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15">
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="230,24,245,50"/>
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="230,24,245,50"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="255,12,530,48"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="255,12,530,48"/>
 			</HorizontalLayout>
 			</HorizontalLayout>
@@ -41,10 +37,9 @@
 				<Label name="xianjin_zhaoling_label" text="0元" font="2" float="true" pos="185,12,300,40"/>
 				<Label name="xianjin_zhaoling_label" text="0元" font="2" float="true" pos="185,12,300,40"/>
 			</HorizontalLayout>
 			</HorizontalLayout>
 			
 			
-			<HorizontalLayout height="60" padding="0,50,0,0">
+			<HorizontalLayout height="60" padding="0,20,0,0">
 				<Control></Control>
 				<Control></Control>
-				<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
-				<Button name="closebtn" text="关闭" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="20,0,0,0" tooltip="点击这里取消收款" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" />
+				<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="400" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
 				<Control></Control>
 				<Control></Control>
 			</HorizontalLayout>	
 			</HorizontalLayout>	
 
 
@@ -75,20 +70,8 @@
 			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口,按【Esc】取消本次支付" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口,按【Esc】取消本次支付" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 		</VerticalLayout>
 		</VerticalLayout>
 		
 		
-		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">
-			<HorizontalLayout name="shoukuan_pay_success_logo_wx" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="wx_logo.png" width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_pay_success_logo_zhifubao" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="zhifubao_logo.png"  width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
-			
-			<Label height="40" padding="0,20,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
+		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">			
+			<Label height="40" padding="0,100,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
 			
 			
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 		</VerticalLayout>
 		</VerticalLayout>

+ 6 - 23
bin/Win32/Debug/zhipuzi_pos_windows/skin/zidingyi_shoukuan_wnd.xml

@@ -8,15 +8,11 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
+			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
-		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">
-			<HorizontalLayout name="shoukuan_money_input_layout" height="60" padding="0,15,0,0">
-				<Label height="40" padding="190,20,0,10" name="shoukuan_before_pay_huobi" text="¥" font="0" textcolor="0xFF3CB371"></Label>
-				<Edit name="money_edit" float="true" pos="223,0,400,60" font="1" textcolor="0xFF3CB371" bkcolor="0xFFFCFCFC" nativebkcolor="0xFFFCFCFC"/>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15" visible="false">
+		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">			
+			<HorizontalLayout name="shoukuan_money_show_layout" height="50" padding="0,15,0,15">
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="230,24,245,50"/>
 				<Label text="¥" font="0" textcolor="0xFF3CB371" float="true" pos="230,24,245,50"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="255,12,530,48"/>
 				<Label name="shoukuan_money_show_money" font="1" textcolor="0xFF3CB371" float="true" pos="255,12,530,48"/>
 			</HorizontalLayout>
 			</HorizontalLayout>
@@ -27,8 +23,7 @@
 			
 			
 			<HorizontalLayout height="60" padding="0,50,0,0">
 			<HorizontalLayout height="60" padding="0,50,0,0">
 				<Control></Control>
 				<Control></Control>
-				<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
-				<Button name="closebtn" text="关闭" font="2" textcolor="#FFFFFFFF" height="50" width="150" padding="20,0,0,0" tooltip="点击这里取消收款" normalimage="file='Btn_Red.png' corner='5,5,5,5'" hotimage="file='Btn_Red_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" />
+				<Button name="shoukuanBtn" text="确认" font="2" textcolor="#FFFFFFFF" height="50" width="400" padding="0,0,0,0" tooltip="点击这里确认收款" normalimage="file='Btn_Green.png' corner='5,5,5,5'" hotimage="file='Btn_Green_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_Green_Click.png' corner='5,5,5,5'" />
 				<Control></Control>
 				<Control></Control>
 			</HorizontalLayout>	
 			</HorizontalLayout>	
 
 
@@ -59,20 +54,8 @@
 			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口,按【Esc】取消本次支付" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 			<Label height="60" padding="20,30,20,0" name="shouyin_paying_attention" text="如果用户没有支付成功,则请确认客户不再进行支付时再关闭此窗口,按【Esc】取消本次支付" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 		</VerticalLayout>
 		</VerticalLayout>
 		
 		
-		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">
-			<HorizontalLayout name="shoukuan_pay_success_logo_wx" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="wx_logo.png" width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
-			
-			<HorizontalLayout name="shoukuan_pay_success_logo_zhifubao" height="100" padding="0,20,0,0" visible="false">
-				<Control></Control>
-				<Control bkimage="zhifubao_logo.png"  width="100" height="100" align="center"></Control>
-				<Control></Control>
-			</HorizontalLayout>
-			
-			<Label height="40" padding="0,20,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
+		<VerticalLayout name="shoukuan_pay_success_layout" visible="false">			
+			<Label height="40" padding="0,80,0,20" name="shoukuan_pay_success_money" text="成功收款:" font="3" textcolor="0xFF3CB371" align="center"></Label>
 			
 			
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 			<Label height="60" padding="20,30,20,0" name="shouyin_pay_success_attention" text="按任意键关闭窗口" font="2" textcolor="0xFF808080" multiline="true" align="center" />
 		</VerticalLayout>
 		</VerticalLayout>

+ 4 - 4
zhipuzi_pos_windows/wnd/CChengzhongWnd.cpp

@@ -324,12 +324,12 @@ void CChengzhongWnd::ReadChuankouValue()
 			else
 			else
 			{
 			{
 				//暂时不支持的其他型号
 				//暂时不支持的其他型号
-				Sleep(100);
+				Sleep(200);
 			}
 			}
 		}
 		}
 		else
 		else
 		{
 		{
-			Sleep(100);
+			Sleep(200);
 		}
 		}
 	}
 	}
 
 
@@ -366,7 +366,7 @@ void CChengzhongWnd::SaveWeight()
 	//等待工作线程退出
 	//等待工作线程退出
 	while (m_is_chuangkou_working)
 	while (m_is_chuangkou_working)
 	{
 	{
-		Sleep(100);
+		Sleep(200);
 	}
 	}
 
 
 	Close(IDOK);
 	Close(IDOK);
@@ -388,7 +388,7 @@ void CChengzhongWnd::Quit()
 	//等待工作线程退出
 	//等待工作线程退出
 	while (m_is_chuangkou_working)
 	while (m_is_chuangkou_working)
 	{
 	{
-		Sleep(100);
+		Sleep(200);
 	}
 	}
 
 
 	Close(IDCANCEL);
 	Close(IDCANCEL);

+ 71 - 107
zhipuzi_pos_windows/wnd/CFulikaShoukuanWnd.cpp

@@ -312,7 +312,10 @@ LRESULT CFulikaShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPar
 		{
 		{
 			if (m_shoukuan_status == 0)
 			if (m_shoukuan_status == 0)
 			{
 			{
-				StartShoukuan();
+				if (m_shoukuanModel == 2)
+				{
+					StartShoukuan();
+				}
 			}
 			}
 			else if (m_shoukuan_status == 1 || m_shoukuan_status == 2 || m_shoukuan_status == 5)
 			else if (m_shoukuan_status == 1 || m_shoukuan_status == 2 || m_shoukuan_status == 5)
 			{
 			{
@@ -325,7 +328,11 @@ LRESULT CFulikaShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPar
 			}
 			}
 			else if (m_shoukuan_status == 4)
 			else if (m_shoukuan_status == 4)
 			{
 			{
-				Close(IDCANCEL);
+				//Close(IDCANCEL);
+				if (m_shoukuanModel == 2)
+				{
+					StartShoukuan();
+				}
 			}
 			}
 
 
 			return true;
 			return true;
@@ -366,7 +373,7 @@ LRESULT CFulikaShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPar
 		}
 		}
 		else if (m_shoukuan_status == 4)
 		else if (m_shoukuan_status == 4)
 		{
 		{
-			Close(IDCANCEL);
+			//Close(IDCANCEL);
 
 
 			return true;
 			return true;
 		}
 		}
@@ -377,41 +384,20 @@ LRESULT CFulikaShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPar
 
 
 void CFulikaShoukuanWnd::InitMoney(std::wstring value)
 void CFulikaShoukuanWnd::InitMoney(std::wstring value)
 {
 {
-	CHorizontalLayoutUI* pInputLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_input_layout")));
-	pInputLayout->SetVisible(false);
-
-	CHorizontalLayoutUI* pShowLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_show_layout")));
-	pShowLayout->SetVisible(true);
-
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	if (pMoneyLabel)
 	if (pMoneyLabel)
 	{
 	{
 		pMoneyLabel->SetText(value.c_str());
 		pMoneyLabel->SetText(value.c_str());
 	}
 	}
 
 
-	m_is_money_init = true;
 	m_money = value;
 	m_money = value;
 }
 }
 
 
 void CFulikaShoukuanWnd::InitFukuanma(std::string fukuanma)
 void CFulikaShoukuanWnd::InitFukuanma(std::string fukuanma)
 {
 {
-	std::wstring ws_fukuanma = CLewaimaiString::UTF8ToUnicode(fukuanma);
+	m_fukuanma = fukuanma;
 
 
-	CLabelUI* pFukuanmaLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("fukuanma_edit")));
-	if (pFukuanmaLabel)
-	{
-		pFukuanmaLabel->SetText(ws_fukuanma.c_str());
-	}
-
-	std::string shoukuan_setting_mianqueren = CSetting::GetParam("shoukuan_setting_mianqueren");
-	if (shoukuan_setting_mianqueren == "1")
-	{
-		if (m_is_money_init)
-		{
-			//如果金额也是初始化好的,可以直接支付了
-			this->StartShoukuan();
-		}
-	}
+	this->StartShoukuan();
 }
 }
 
 
 void CFulikaShoukuanWnd::SetCommonParams(std::map<string, string> params)
 void CFulikaShoukuanWnd::SetCommonParams(std::map<string, string> params)
@@ -421,25 +407,7 @@ void CFulikaShoukuanWnd::SetCommonParams(std::map<string, string> params)
 
 
 void CFulikaShoukuanWnd::UpdateFocus()
 void CFulikaShoukuanWnd::UpdateFocus()
 {
 {
-	if (m_is_money_init == false)
-	{
-		//如果没初始化,这个时候有2个编辑框,不能抢焦点
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
-
-		pMoneyEdit->SetFocus();
-
-		//下一个焦点的,就设置为这个控件
-		m_pm.SetFocusNeeded(pMoneyEdit);
-
-		//这个干嘛的不知道,但是不加好像不行
-		m_pm.SetNextTabControl(false);
-	}
-	else
-	{
-		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fukuanma_edit")));
-
-		pFukuanEdit->SetFocus();
-	}
+	
 }
 }
 
 
 LRESULT CFulikaShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CFulikaShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
@@ -463,20 +431,11 @@ LRESULT CFulikaShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPA
 
 
 LRESULT CFulikaShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CFulikaShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 {
 {
-	//判断是否要打印
-	/*
-	int dayinji_setting_auto_print = atoi(CSetting::GetParam("system_setting_dayinji_setting_auto_print").c_str());
-	if (dayinji_setting_auto_print == 1)
+	//播放收款成功的金额
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
 	{
 	{
-		m_valueWnd->PrintZhifu(m_out_trade_no);
+		std::thread(&CFulikaShoukuanWnd::ReadShoukuanValue, this).detach();
 	}
 	}
-	}*/
-
-	//播放收款成功的金额
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	std::thread(&CFulikaShoukuanWnd::ReadShoukuanValue, this).detach();
-	//}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
@@ -489,12 +448,6 @@ LRESULT CFulikaShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM l
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 
 
-	CHorizontalLayoutUI* wx_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_wx")));
-	CHorizontalLayoutUI* zhifubao_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_zhifubao")));
-
-	wx_logo->SetVisible(true);
-	zhifubao_logo->SetVisible(false);
-
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	attention->SetText(ws_attention.c_str());
 	attention->SetText(ws_attention.c_str());
@@ -511,28 +464,20 @@ LRESULT CFulikaShoukuanWnd::OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lPar
 {
 {
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 
 
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
-	//}
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
+	{
+		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
+	}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
 
 
-	CVerticalLayoutUI* pay_fail_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_fail_layout")));
-	pay_fail_layout->SetVisible(true);
-
-	CHorizontalLayoutUI* title_layout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_title_bkg")));
-	title_layout->SetBkColor(0xFFD33E3A);
-
-	CLabelUI* pFailMessage = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_fail_attention")));
-
-	std::wstring ws_fail_message = L"失败信息:" + m_fail_message + L",按任意键关闭窗口,";
-	std::wstring ws_attention = ws_fail_message + to_wstring(m_timer_now) + L" 秒后自动关闭";
-
-	pFailMessage->SetText(ws_attention.c_str());
+	CVerticalLayoutUI* before_pay_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_before_pay_layout")));
+	before_pay_layout->SetVisible(true);
 
 
-	SetTimer(m_hWnd, WM_TIMER_WND_CLOSE, 1000, NULL);
+	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
+	pLabel->SetText((L"收款失败:" + m_fail_message).c_str());
+	pLabel->SetVisible(true);
 
 
 	SetFocus(m_hWnd);
 	SetFocus(m_hWnd);
 
 
@@ -545,42 +490,40 @@ void CFulikaShoukuanWnd::StartShoukuan()
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 
 
 	//检查收款金额
 	//检查收款金额
-	if (m_is_money_init == false)
+	if (m_money == L"")
 	{
 	{
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
-		m_money = pMoneyEdit->GetText();
+		pLabel->SetText(L"收款金额不能为空,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"")
-		{
-			pLabel->SetText(L"收款金额不能为空,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (m_money == L"0.00")
+	{
+		pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"0.00")
-		{
-			pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
+	if (!money_value || money_value < 0.01)
+	{
+		pLabel->SetText(L"收款金额错误,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
-		if (!money_value || money_value < 0.01)
-		{
-			pLabel->SetText(L"收款金额错误,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (money_value > 50000)
+	{
+		pLabel->SetText(L"单笔收款金额不能大于5万,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
 	}
 	}
 
 
 	//先判断收款码的格式是否正确
 	//先判断收款码的格式是否正确
-	CEditUI* pFukuanmaEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fukuanma_edit")));
-	std::wstring ws_Fukuanma = pFukuanmaEdit->GetText();
-	m_fukuanma = CLewaimaiString::UnicodeToUTF8(ws_Fukuanma);
-
 	CEditUI* pShoujihaoEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
 	CEditUI* pShoujihaoEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
 	std::wstring ws_Shoujihao = pShoujihaoEdit->GetText();
 	std::wstring ws_Shoujihao = pShoujihaoEdit->GetText();
 	m_shoujihao = CLewaimaiString::UnicodeToUTF8(ws_Shoujihao);
 	m_shoujihao = CLewaimaiString::UnicodeToUTF8(ws_Shoujihao);
@@ -667,7 +610,17 @@ void CFulikaShoukuanWnd::HandleShoukuan()
 	}
 	}
 
 
 	rapidjson::Value& v_errcode = document["errcode"];
 	rapidjson::Value& v_errcode = document["errcode"];
-	int errcode = v_errcode.GetInt();
+
+	int errcode;
+	if (v_errcode.IsString())
+	{
+		errcode = atoi(v_errcode.GetString());
+	}
+	else
+	{
+		errcode = v_errcode.GetInt();
+	}
+
 	if (errcode != 0)
 	if (errcode != 0)
 	{
 	{
 		LOG_INFO("response failed! message:" << document["errmsg"].GetString());
 		LOG_INFO("response failed! message:" << document["errmsg"].GetString());
@@ -943,3 +896,14 @@ void CFulikaShoukuanWnd::ReadShoukuanValue()
 {
 {
 	CSpeech::SpeakNum(1, CLewaimaiString::UnicodeToUTF8(m_money));
 	CSpeech::SpeakNum(1, CLewaimaiString::UnicodeToUTF8(m_money));
 }
 }
+
+//处理键盘捕捉结果
+void CFulikaShoukuanWnd::HandleTextCapture(std::string content)
+{
+	if (m_shoukuanModel == 1)
+	{
+		m_fukuanma = content;
+
+		StartShoukuan();
+	}
+}

+ 2 - 6
zhipuzi_pos_windows/wnd/CFulikaShoukuanWnd.h

@@ -88,15 +88,11 @@ public:
 	void ReadShoukuanValue();
 	void ReadShoukuanValue();
 
 
 	//处理键盘捕捉结果
 	//处理键盘捕捉结果
-	void HandleTextCapture(std::string content)
-	{
-
-	}
+	void HandleTextCapture(std::string content);
 
 
 public:
 public:
 	CPaintManagerUI m_pm;
 	CPaintManagerUI m_pm;
 
 
-	bool m_is_money_init = false;
 	std::wstring m_money;
 	std::wstring m_money;
 
 
 	std::string m_fukuanma;
 	std::string m_fukuanma;
@@ -109,7 +105,7 @@ public:
 	std::wstring m_fail_message;
 	std::wstring m_fail_message;
 
 
 	//窗口关闭的定时器时间
 	//窗口关闭的定时器时间
-	int m_timer_now = 4;
+	int m_timer_now = 2;
 
 
 	std::map<string, string> m_commonParams;
 	std::map<string, string> m_commonParams;
 
 

+ 61 - 108
zhipuzi_pos_windows/wnd/CHuiyuanShoukuanWnd.cpp

@@ -312,7 +312,10 @@ LRESULT CHuiyuanShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
 		{
 		{
 			if (m_shoukuan_status == 0)
 			if (m_shoukuan_status == 0)
 			{
 			{
-				StartShoukuan();
+				if (m_shoukuanModel == 2)
+				{
+					StartShoukuan();
+				}
 			}
 			}
 			else if (m_shoukuan_status == 1 || m_shoukuan_status == 2 || m_shoukuan_status == 5)
 			else if (m_shoukuan_status == 1 || m_shoukuan_status == 2 || m_shoukuan_status == 5)
 			{
 			{
@@ -320,12 +323,15 @@ LRESULT CHuiyuanShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
 			}
 			}
 			else if (m_shoukuan_status == 3)
 			else if (m_shoukuan_status == 3)
 			{
 			{
-				//已经明确成功或者失败了,那么久直接关闭就可以了
 				Close(IDOK);
 				Close(IDOK);
 			}
 			}
 			else if (m_shoukuan_status == 4)
 			else if (m_shoukuan_status == 4)
 			{
 			{
-				Close(IDCANCEL);
+				//Close(IDCANCEL);
+				if (m_shoukuanModel == 2)
+				{
+					StartShoukuan();
+				}
 			}
 			}
 
 
 			return true;
 			return true;
@@ -366,7 +372,7 @@ LRESULT CHuiyuanShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
 		}
 		}
 		else if (m_shoukuan_status == 4)
 		else if (m_shoukuan_status == 4)
 		{
 		{
-			Close(IDCANCEL);
+			//Close(IDCANCEL);
 
 
 			return true;
 			return true;
 		}
 		}
@@ -377,41 +383,20 @@ LRESULT CHuiyuanShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
 
 
 void CHuiyuanShoukuanWnd::InitMoney(std::wstring value)
 void CHuiyuanShoukuanWnd::InitMoney(std::wstring value)
 {
 {
-	CHorizontalLayoutUI* pInputLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_input_layout")));
-	pInputLayout->SetVisible(false);
-
-	CHorizontalLayoutUI* pShowLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_show_layout")));
-	pShowLayout->SetVisible(true);
-
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	if (pMoneyLabel)
 	if (pMoneyLabel)
 	{
 	{
 		pMoneyLabel->SetText(value.c_str());
 		pMoneyLabel->SetText(value.c_str());
 	}
 	}
 
 
-	m_is_money_init = true;
 	m_money = value;
 	m_money = value;
 }
 }
 
 
 void CHuiyuanShoukuanWnd::InitFukuanma(std::string fukuanma)
 void CHuiyuanShoukuanWnd::InitFukuanma(std::string fukuanma)
 {
 {
-	std::wstring ws_fukuanma = CLewaimaiString::UTF8ToUnicode(fukuanma);
+	m_fukuanma = fukuanma;
 
 
-	CLabelUI* pFukuanmaLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("fukuanma_edit")));
-	if (pFukuanmaLabel)
-	{
-		pFukuanmaLabel->SetText(ws_fukuanma.c_str());
-	}
-
-	std::string shoukuan_setting_mianqueren = CSetting::GetParam("shoukuan_setting_mianqueren");
-	if (shoukuan_setting_mianqueren == "1")
-	{
-		if (m_is_money_init)
-		{
-			//如果金额也是初始化好的,可以直接支付了
-			this->StartShoukuan();
-		}
-	}
+	this->StartShoukuan();
 }
 }
 
 
 void CHuiyuanShoukuanWnd::SetCommonParams(std::map<string, string> params)
 void CHuiyuanShoukuanWnd::SetCommonParams(std::map<string, string> params)
@@ -421,32 +406,14 @@ void CHuiyuanShoukuanWnd::SetCommonParams(std::map<string, string> params)
 
 
 void CHuiyuanShoukuanWnd::UpdateFocus()
 void CHuiyuanShoukuanWnd::UpdateFocus()
 {
 {
-	if (m_is_money_init == false)
-	{
-		//如果没初始化,这个时候有2个编辑框,不能抢焦点
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
-
-		pMoneyEdit->SetFocus();
-
-		//下一个焦点的,就设置为这个控件
-		m_pm.SetFocusNeeded(pMoneyEdit);
-
-		//这个干嘛的不知道,但是不加好像不行
-		m_pm.SetNextTabControl(false);
-	}
-	else
-	{
-		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fukuanma_edit")));
-
-		pFukuanEdit->SetFocus();
-	}
+	
 }
 }
 
 
 LRESULT CHuiyuanShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CHuiyuanShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 {
 {
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_password.wav";
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_password.wav";
 
 
-	if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
 	{
 	{
 		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
 		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
 	}
 	}
@@ -463,20 +430,11 @@ LRESULT CHuiyuanShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LP
 
 
 LRESULT CHuiyuanShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CHuiyuanShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 {
 {
-	//判断是否要打印
-	/*
-	int dayinji_setting_auto_print = atoi(CSetting::GetParam("system_setting_dayinji_setting_auto_print").c_str());
-	if (dayinji_setting_auto_print == 1)
+	//播放收款成功的金额
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
 	{
 	{
-		m_valueWnd->PrintZhifu(m_out_trade_no);
+		std::thread(&CHuiyuanShoukuanWnd::ReadShoukuanValue, this).detach();
 	}
 	}
-	}*/
-
-	//播放收款成功的金额
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	std::thread(&CHuiyuanShoukuanWnd::ReadShoukuanValue, this).detach();
-	//}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
@@ -489,12 +447,6 @@ LRESULT CHuiyuanShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 
 
-	CHorizontalLayoutUI* wx_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_wx")));
-	CHorizontalLayoutUI* zhifubao_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_zhifubao")));
-
-	wx_logo->SetVisible(true);
-	zhifubao_logo->SetVisible(false);
-
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	attention->SetText(ws_attention.c_str());
 	attention->SetText(ws_attention.c_str());
@@ -511,28 +463,20 @@ LRESULT CHuiyuanShoukuanWnd::OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lPa
 {
 {
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 
 
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
-	//}
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
+	{
+		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
+	}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
 
 
-	CVerticalLayoutUI* pay_fail_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_fail_layout")));
-	pay_fail_layout->SetVisible(true);
-
-	CHorizontalLayoutUI* title_layout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_title_bkg")));
-	title_layout->SetBkColor(0xFFD33E3A);
-
-	CLabelUI* pFailMessage = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_fail_attention")));
-
-	std::wstring ws_fail_message = L"失败信息:" + m_fail_message + L",按任意键关闭窗口,";
-	std::wstring ws_attention = ws_fail_message + to_wstring(m_timer_now) + L" 秒后自动关闭";
-
-	pFailMessage->SetText(ws_attention.c_str());
+	CVerticalLayoutUI* before_pay_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_before_pay_layout")));
+	before_pay_layout->SetVisible(true);
 
 
-	SetTimer(m_hWnd, WM_TIMER_WND_CLOSE, 1000, NULL);
+	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
+	pLabel->SetText((L"收款失败:" + m_fail_message).c_str());
+	pLabel->SetVisible(true);
 
 
 	SetFocus(m_hWnd);
 	SetFocus(m_hWnd);
 
 
@@ -545,42 +489,40 @@ void CHuiyuanShoukuanWnd::StartShoukuan()
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 
 
 	//检查收款金额
 	//检查收款金额
-	if (m_is_money_init == false)
+	if (m_money == L"")
 	{
 	{
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
-		m_money = pMoneyEdit->GetText();
+		pLabel->SetText(L"收款金额不能为空,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"")
-		{
-			pLabel->SetText(L"收款金额不能为空,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (m_money == L"0.00")
+	{
+		pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"0.00")
-		{
-			pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
+	if (!money_value || money_value < 0.01)
+	{
+		pLabel->SetText(L"收款金额错误,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
-		if (!money_value || money_value < 0.01)
-		{
-			pLabel->SetText(L"收款金额错误,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (money_value > 50000)
+	{
+		pLabel->SetText(L"单笔收款金额不能大于5万,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
 	}
 	}
 
 
 	//先判断收款码的格式是否正确
 	//先判断收款码的格式是否正确
-	CEditUI* pFukuanmaEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("fukuanma_edit")));
-	std::wstring ws_Fukuanma = pFukuanmaEdit->GetText();
-	m_fukuanma = CLewaimaiString::UnicodeToUTF8(ws_Fukuanma);
-
 	CEditUI* pShoujihaoEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
 	CEditUI* pShoujihaoEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shoujihao_edit")));
 	std::wstring ws_Shoujihao = pShoujihaoEdit->GetText();
 	std::wstring ws_Shoujihao = pShoujihaoEdit->GetText();
 	m_shoujihao = CLewaimaiString::UnicodeToUTF8(ws_Shoujihao);
 	m_shoujihao = CLewaimaiString::UnicodeToUTF8(ws_Shoujihao);
@@ -1025,3 +967,14 @@ void CHuiyuanShoukuanWnd::ReadShoukuanValue()
 {
 {
 	CSpeech::SpeakNum(1, CLewaimaiString::UnicodeToUTF8(m_money));
 	CSpeech::SpeakNum(1, CLewaimaiString::UnicodeToUTF8(m_money));
 }
 }
+
+//处理键盘捕捉结果
+void CHuiyuanShoukuanWnd::HandleTextCapture(std::string content)
+{
+	if (m_shoukuanModel == 1)
+	{
+		m_fukuanma = content;
+
+		StartShoukuan();
+	}
+}

+ 2 - 6
zhipuzi_pos_windows/wnd/CHuiyuanShoukuanWnd.h

@@ -88,15 +88,11 @@ public:
 	void ReadShoukuanValue();
 	void ReadShoukuanValue();
 
 
 	//处理键盘捕捉结果
 	//处理键盘捕捉结果
-	void HandleTextCapture(std::string content)
-	{
-
-	}
+	void HandleTextCapture(std::string content);
 
 
 public:
 public:
 	CPaintManagerUI m_pm;
 	CPaintManagerUI m_pm;
 
 
-	bool m_is_money_init = false;
 	std::wstring m_money;
 	std::wstring m_money;
 
 
 	std::string m_fukuanma;
 	std::string m_fukuanma;
@@ -109,7 +105,7 @@ public:
 	std::wstring m_fail_message;
 	std::wstring m_fail_message;
 
 
 	//窗口关闭的定时器时间
 	//窗口关闭的定时器时间
-	int m_timer_now = 4;
+	int m_timer_now = 2;
 
 
 	std::map<string, string> m_commonParams;
 	std::map<string, string> m_commonParams;
 
 

+ 70 - 5
zhipuzi_pos_windows/wnd/CMainWnd.cpp

@@ -676,17 +676,18 @@ LRESULT CMainWnd::OnInput(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
 			//通过虚拟键盘码得到名字
 			//通过虚拟键盘码得到名字
 			ToAscii(raw->data.keyboard.VKey, raw->data.keyboard.MakeCode, state, (LPWORD)keytext, 0);
 			ToAscii(raw->data.keyboard.VKey, raw->data.keyboard.MakeCode, state, (LPWORD)keytext, 0);
 
 
-			string a = keytext;
-
-			if (raw->data.keyboard.VKey >= 48 && raw->data.keyboard.VKey <= 57)
+			//LOG_INFO("vkey:" << raw->data.keyboard.VKey);
+			if (raw->data.keyboard.VKey >= 48 && raw->data.keyboard.VKey <= 122)
 			{
 			{
-				//只考虑数字
+				//这里是数字和英文字母之间的字符,包含部分标点
 				if (m_is_start_catch == false)
 				if (m_is_start_catch == false)
 				{
 				{
 					m_is_start_catch = true;
 					m_is_start_catch = true;
 
 
 					m_catch_string = "";
 					m_catch_string = "";
 
 
+					m_is_next_daxie = false;
+
 					char keytext[10] = { 0 };
 					char keytext[10] = { 0 };
 					BYTE state[256] = { 0 };
 					BYTE state[256] = { 0 };
 
 
@@ -695,6 +696,8 @@ LRESULT CMainWnd::OnInput(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
 
 
 					m_catch_string += string(keytext);
 					m_catch_string += string(keytext);
 
 
+					//LOG_INFO("起始字符:" << keytext << ",累积:" << m_catch_string.c_str());
+
 					m_last_catch_clock = clock();
 					m_last_catch_clock = clock();
 				}
 				}
 				else
 				else
@@ -705,10 +708,13 @@ LRESULT CMainWnd::OnInput(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
 					double total_t = (double)(now - m_last_catch_clock) / CLOCKS_PER_SEC;
 					double total_t = (double)(now - m_last_catch_clock) / CLOCKS_PER_SEC;
 					if (total_t > 0.05)
 					if (total_t > 0.05)
 					{
 					{
+						//LOG_INFO("人工输入");
 						//如果超过了50ms,说明是人工输入的了,就重置所有状态
 						//如果超过了50ms,说明是人工输入的了,就重置所有状态
 						m_is_start_catch = false;
 						m_is_start_catch = false;
 
 
 						m_catch_string = "";
 						m_catch_string = "";
+
+						m_is_next_daxie = false;
 					}
 					}
 					else
 					else
 					{
 					{
@@ -718,7 +724,19 @@ LRESULT CMainWnd::OnInput(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
 						//通过虚拟键盘码得到名字
 						//通过虚拟键盘码得到名字
 						ToAscii(raw->data.keyboard.VKey, raw->data.keyboard.MakeCode, state, (LPWORD)keytext, 0);
 						ToAscii(raw->data.keyboard.VKey, raw->data.keyboard.MakeCode, state, (LPWORD)keytext, 0);
 
 
-						m_catch_string += string(keytext);
+						std::string s_keytext = keytext;
+						if (m_is_next_daxie == true)
+						{
+							//要把抓取的这个字符转为大写
+							transform(s_keytext.begin(), s_keytext.end(), s_keytext.begin(), ::toupper);
+						}
+
+						//转换完了,再把状态还原
+						m_is_next_daxie = false;
+
+						m_catch_string += s_keytext;
+
+						//LOG_INFO("抓取字符:" << s_keytext.c_str() << ",累积:" << m_catch_string.c_str());
 
 
 						m_last_catch_clock = clock();
 						m_last_catch_clock = clock();
 					}
 					}
@@ -736,12 +754,15 @@ LRESULT CMainWnd::OnInput(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
 					double total_t = (double)(now - m_last_catch_clock) / CLOCKS_PER_SEC;
 					double total_t = (double)(now - m_last_catch_clock) / CLOCKS_PER_SEC;
 					if (total_t > 0.05)
 					if (total_t > 0.05)
 					{
 					{
+						//LOG_INFO("抓取enter人工");
 						//如果超过了50ms,说明是人工输入的了,就重置所有状态
 						//如果超过了50ms,说明是人工输入的了,就重置所有状态
 						m_is_start_catch = false;
 						m_is_start_catch = false;
 						m_catch_string = "";
 						m_catch_string = "";
+						m_is_next_daxie = false;
 					}
 					}
 					else
 					else
 					{
 					{
+						//LOG_INFO("抓取enter结束");
 						//这种说明是扫码的
 						//这种说明是扫码的
 						std::string last = m_catch_string;
 						std::string last = m_catch_string;
 
 
@@ -751,11 +772,55 @@ LRESULT CMainWnd::OnInput(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandle
 						//处理完成后,清空重来
 						//处理完成后,清空重来
 						m_is_start_catch = false;
 						m_is_start_catch = false;
 						m_catch_string = "";
 						m_catch_string = "";
+						m_is_next_daxie = false;
+					}
+				}
+				else
+				{
+					m_is_start_catch = false;
+					m_catch_string = "";
+					m_is_next_daxie = false;
+				}
+			}
+			else if (raw->data.keyboard.VKey == 16)
+			{
+				//这个是大小写切换的按键,扫描大写字母的时候会用到,每个大写字母都是由2个组成,先来个16,再来个对应小写字母的asicc
+				if (m_is_start_catch == false)
+				{
+					//说明第一个字符就是大写字母
+					m_is_start_catch = true;
+
+					m_catch_string = "";
+
+					m_is_next_daxie = true;
+
+					m_last_catch_clock = clock();
+				}
+				else
+				{
+					//已经在抓取中了
+					clock_t now = clock();
+
+					double total_t = (double)(now - m_last_catch_clock) / CLOCKS_PER_SEC;
+					if (total_t > 0.05)
+					{
+						//LOG_INFO("抓取16人工");
+						//如果超过了50ms,说明是人工输入的了,就重置所有状态
+						m_is_start_catch = false;
+						m_catch_string = "";
+						m_is_next_daxie = false;
+					}
+					else
+					{
+						m_is_next_daxie = true;
+
+						m_last_catch_clock = clock();
 					}
 					}
 				}
 				}
 			}
 			}
 			else
 			else
 			{
 			{
+				//LOG_INFO("抓取结束,重新开始");
 				//这种直接忽略,重新开始
 				//这种直接忽略,重新开始
 				m_is_start_catch = false;
 				m_is_start_catch = false;
 
 

+ 3 - 0
zhipuzi_pos_windows/wnd/CMainWnd.h

@@ -140,4 +140,7 @@ private:
 	bool m_is_start_catch = false;
 	bool m_is_start_catch = false;
 	clock_t m_last_catch_clock;
 	clock_t m_last_catch_clock;
 	std::string m_catch_string;
 	std::string m_catch_string;
+
+	//表示下一个抓取字符是否大写字母
+	bool m_is_next_daxie;
 };
 };

+ 39 - 2
zhipuzi_pos_windows/wnd/CWeixinzhifuShoukuanWnd.cpp

@@ -357,7 +357,7 @@ LRESULT CWeixinzhifuShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam
 {
 {
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_password.wav";
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_password.wav";
 
 
-	if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
 	{
 	{
 		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
 		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
 	}
 	}
@@ -453,6 +453,40 @@ void CWeixinzhifuShoukuanWnd::StartShoukuan()
 {
 {
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 
 
+	//检查收款金额
+	if (m_money == L"")
+	{
+		pLabel->SetText(L"收款金额不能为空,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
+	}
+
+	if (m_money == L"0.00")
+	{
+		pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
+	}
+
+	double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
+	if (!money_value || money_value < 0.01)
+	{
+		pLabel->SetText(L"收款金额错误,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
+	}
+
+	if (money_value > 50000)
+	{
+		pLabel->SetText(L"单笔收款金额不能大于5万,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
+	}
+
 	//先判断收款码的格式是否正确
 	//先判断收款码的格式是否正确
 	std::string s_Fukuanma = m_fukuanma;
 	std::string s_Fukuanma = m_fukuanma;
 
 
@@ -867,5 +901,8 @@ void CWeixinzhifuShoukuanWnd::HandleTextCapture(std::string content)
 {
 {
 	m_fukuanma = content;
 	m_fukuanma = content;
 
 
-	StartShoukuan();
+	if (m_shoukuan_status == 0)
+	{
+		StartShoukuan();
+	}
 }
 }

+ 41 - 108
zhipuzi_pos_windows/wnd/CXianjinShoukuanWnd.cpp

@@ -344,7 +344,8 @@ LRESULT CXianjinShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
 			}
 			}
 			else if (m_shoukuan_status == 4)
 			else if (m_shoukuan_status == 4)
 			{
 			{
-				Close(IDCANCEL);
+				//Close(IDCANCEL);
+				StartShoukuan();
 			}
 			}
 
 
 			return true;
 			return true;
@@ -385,7 +386,7 @@ LRESULT CXianjinShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
 		}
 		}
 		else if (m_shoukuan_status == 4)
 		else if (m_shoukuan_status == 4)
 		{
 		{
-			Close(IDCANCEL);
+			//Close(IDCANCEL);
 
 
 			return true;
 			return true;
 		}
 		}
@@ -396,43 +397,15 @@ LRESULT CXianjinShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lPa
 
 
 void CXianjinShoukuanWnd::InitMoney(std::wstring value)
 void CXianjinShoukuanWnd::InitMoney(std::wstring value)
 {
 {
-	CHorizontalLayoutUI* pInputLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_input_layout")));
-	pInputLayout->SetVisible(false);
-
-	CHorizontalLayoutUI* pShowLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_show_layout")));
-	pShowLayout->SetVisible(true);
-
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	if (pMoneyLabel)
 	if (pMoneyLabel)
 	{
 	{
 		pMoneyLabel->SetText(value.c_str());
 		pMoneyLabel->SetText(value.c_str());
 	}
 	}
 
 
-	m_is_money_init = true;
 	m_money = value;
 	m_money = value;
 }
 }
 
 
-void CXianjinShoukuanWnd::InitFukuanma(std::string fukuanma)
-{
-	std::wstring ws_fukuanma = CLewaimaiString::UTF8ToUnicode(fukuanma);
-
-	CLabelUI* pFukuanmaLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shishou_edit")));
-	if (pFukuanmaLabel)
-	{
-		pFukuanmaLabel->SetText(ws_fukuanma.c_str());
-	}
-
-	std::string shoukuan_setting_mianqueren = CSetting::GetParam("shoukuan_setting_mianqueren");
-	if (shoukuan_setting_mianqueren == "1")
-	{
-		if (m_is_money_init)
-		{
-			//如果金额也是初始化好的,可以直接支付了
-			this->StartShoukuan();
-		}
-	}
-}
-
 void CXianjinShoukuanWnd::SetCommonParams(std::map<string, string> params)
 void CXianjinShoukuanWnd::SetCommonParams(std::map<string, string> params)
 {
 {
 	m_commonParams = params;
 	m_commonParams = params;
@@ -440,25 +413,7 @@ void CXianjinShoukuanWnd::SetCommonParams(std::map<string, string> params)
 
 
 void CXianjinShoukuanWnd::UpdateFocus()
 void CXianjinShoukuanWnd::UpdateFocus()
 {
 {
-	if (m_is_money_init == false)
-	{
-		//如果没初始化,这个时候有2个编辑框,不能抢焦点
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
 
 
-		pMoneyEdit->SetFocus();
-
-		//下一个焦点的,就设置为这个控件
-		m_pm.SetFocusNeeded(pMoneyEdit);
-
-		//这个干嘛的不知道,但是不加好像不行
-		m_pm.SetNextTabControl(false);
-	}
-	else
-	{
-		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shishou_edit")));
-
-		pFukuanEdit->SetFocus();
-	}
 }
 }
 
 
 LRESULT CXianjinShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CXianjinShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
@@ -482,20 +437,11 @@ LRESULT CXianjinShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LP
 
 
 LRESULT CXianjinShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CXianjinShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 {
 {
-	//判断是否要打印
-	/*
-	int dayinji_setting_auto_print = atoi(CSetting::GetParam("system_setting_dayinji_setting_auto_print").c_str());
-	if (dayinji_setting_auto_print == 1)
+	//播放收款成功的金额
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
 	{
 	{
-		m_valueWnd->PrintZhifu(m_out_trade_no);
+		std::thread(&CXianjinShoukuanWnd::ReadShoukuanValue, this).detach();
 	}
 	}
-	}*/
-
-	//播放收款成功的金额
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	std::thread(&CXianjinShoukuanWnd::ReadShoukuanValue, this).detach();
-	//}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
@@ -508,12 +454,6 @@ LRESULT CXianjinShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 
 
-	CHorizontalLayoutUI* wx_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_wx")));
-	CHorizontalLayoutUI* zhifubao_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_zhifubao")));
-
-	wx_logo->SetVisible(true);
-	zhifubao_logo->SetVisible(false);
-
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	attention->SetText(ws_attention.c_str());
 	attention->SetText(ws_attention.c_str());
@@ -530,28 +470,20 @@ LRESULT CXianjinShoukuanWnd::OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lPa
 {
 {
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 
 
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
-	//}
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
+	{
+		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
+	}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
 
 
-	CVerticalLayoutUI* pay_fail_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_fail_layout")));
-	pay_fail_layout->SetVisible(true);
-
-	CHorizontalLayoutUI* title_layout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_title_bkg")));
-	title_layout->SetBkColor(0xFFD33E3A);
-
-	CLabelUI* pFailMessage = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_fail_attention")));
-
-	std::wstring ws_fail_message = L"失败信息:" + m_fail_message + L",按任意键关闭窗口,";
-	std::wstring ws_attention = ws_fail_message + to_wstring(m_timer_now) + L" 秒后自动关闭";
-
-	pFailMessage->SetText(ws_attention.c_str());
+	CVerticalLayoutUI* before_pay_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_before_pay_layout")));
+	before_pay_layout->SetVisible(true);
 
 
-	SetTimer(m_hWnd, WM_TIMER_WND_CLOSE, 1000, NULL);
+	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
+	pLabel->SetText((L"收款失败:" + m_fail_message).c_str());
+	pLabel->SetVisible(true);
 
 
 	SetFocus(m_hWnd);
 	SetFocus(m_hWnd);
 
 
@@ -564,42 +496,43 @@ void CXianjinShoukuanWnd::StartShoukuan()
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 
 
 	//检查收款金额
 	//检查收款金额
-	if (m_is_money_init == false)
+	if (m_money == L"")
 	{
 	{
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
-		m_money = pMoneyEdit->GetText();
+		pLabel->SetText(L"收款金额不能为空,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"")
-		{
-			pLabel->SetText(L"收款金额不能为空,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (m_money == L"0.00")
+	{
+		pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"0.00")
-		{
-			pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
+	if (!money_value || money_value < 0.01)
+	{
+		pLabel->SetText(L"收款金额错误,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
-		if (!money_value || money_value < 0.01)
-		{
-			pLabel->SetText(L"收款金额错误,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (money_value > 50000)
+	{
+		pLabel->SetText(L"单笔收款金额不能大于5万,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
 	}
 	}
 
 
 	CEditUI* pShishouEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shishou_edit")));
 	CEditUI* pShishouEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shishou_edit")));
 	std::wstring ws_Shishou = pShishouEdit->GetText();
 	std::wstring ws_Shishou = pShishouEdit->GetText();
 	m_shishou = CLewaimaiString::UnicodeToUTF8(ws_Shishou);
 	m_shishou = CLewaimaiString::UnicodeToUTF8(ws_Shishou);
 
 
-	double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
 	double shishou_value = atof(m_shishou.c_str());
 	double shishou_value = atof(m_shishou.c_str());
 
 
 	if (shishou_value < money_value)
 	if (shishou_value < money_value)
@@ -610,9 +543,9 @@ void CXianjinShoukuanWnd::StartShoukuan()
 		return;
 		return;
 	}
 	}
 
 
-	if (shishou_value > 100000)
+	if (shishou_value > 50000)
 	{
 	{
-		pLabel->SetText(L"实收金额不能大于10万");
+		pLabel->SetText(L"实收金额不能大于5万");
 		pLabel->SetVisible(true);
 		pLabel->SetVisible(true);
 
 
 		return;
 		return;

+ 1 - 4
zhipuzi_pos_windows/wnd/CXianjinShoukuanWnd.h

@@ -62,8 +62,6 @@ public:
 
 
 	void InitMoney(std::wstring value);
 	void InitMoney(std::wstring value);
 
 
-	void InitFukuanma(std::string fukuanma);
-
 	void SetCommonParams(std::map<string, string> params);
 	void SetCommonParams(std::map<string, string> params);
 
 
 	void UpdateFocus();
 	void UpdateFocus();
@@ -98,7 +96,6 @@ public:
 public:
 public:
 	CPaintManagerUI m_pm;
 	CPaintManagerUI m_pm;
 
 
-	bool m_is_money_init = false;
 	std::wstring m_money;
 	std::wstring m_money;
 
 
 	std::string m_shishou;
 	std::string m_shishou;
@@ -109,7 +106,7 @@ public:
 	std::wstring m_fail_message;
 	std::wstring m_fail_message;
 
 
 	//´°¿Ú¹Ø±ÕµÄ¶¨Ê±Æ÷ʱ¼ä
 	//´°¿Ú¹Ø±ÕµÄ¶¨Ê±Æ÷ʱ¼ä
-	int m_timer_now = 4;
+	int m_timer_now = 2;
 
 
 	std::map<string, string> m_commonParams;
 	std::map<string, string> m_commonParams;
 
 

+ 40 - 106
zhipuzi_pos_windows/wnd/CZidingyiShoukuanWnd.cpp

@@ -282,7 +282,8 @@ LRESULT CZidingyiShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lP
 			}
 			}
 			else if (m_shoukuan_status == 4)
 			else if (m_shoukuan_status == 4)
 			{
 			{
-				Close(IDCANCEL);
+				//Close(IDCANCEL);
+				StartShoukuan();
 			}
 			}
 
 
 			return true;
 			return true;
@@ -323,7 +324,7 @@ LRESULT CZidingyiShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lP
 		}
 		}
 		else if (m_shoukuan_status == 4)
 		else if (m_shoukuan_status == 4)
 		{
 		{
-			Close(IDCANCEL);
+			//Close(IDCANCEL);
 
 
 			return true;
 			return true;
 		}
 		}
@@ -334,43 +335,15 @@ LRESULT CZidingyiShoukuanWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lP
 
 
 void CZidingyiShoukuanWnd::InitMoney(std::wstring value)
 void CZidingyiShoukuanWnd::InitMoney(std::wstring value)
 {
 {
-	CHorizontalLayoutUI* pInputLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_input_layout")));
-	pInputLayout->SetVisible(false);
-
-	CHorizontalLayoutUI* pShowLayout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_money_show_layout")));
-	pShowLayout->SetVisible(true);
-
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	CLabelUI* pMoneyLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuan_money_show_money")));
 	if (pMoneyLabel)
 	if (pMoneyLabel)
 	{
 	{
 		pMoneyLabel->SetText(value.c_str());
 		pMoneyLabel->SetText(value.c_str());
 	}
 	}
 
 
-	m_is_money_init = true;
 	m_money = value;
 	m_money = value;
 }
 }
 
 
-void CZidingyiShoukuanWnd::InitFukuanma(std::string fukuanma)
-{
-	std::wstring ws_fukuanma = CLewaimaiString::UTF8ToUnicode(fukuanma);
-
-	CLabelUI* pFukuanmaLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shishou_edit")));
-	if (pFukuanmaLabel)
-	{
-		pFukuanmaLabel->SetText(ws_fukuanma.c_str());
-	}
-
-	std::string shoukuan_setting_mianqueren = CSetting::GetParam("shoukuan_setting_mianqueren");
-	if (shoukuan_setting_mianqueren == "1")
-	{
-		if (m_is_money_init)
-		{
-			//如果金额也是初始化好的,可以直接支付了
-			this->StartShoukuan();
-		}
-	}
-}
-
 void CZidingyiShoukuanWnd::SetCommonParams(std::map<string, string> params)
 void CZidingyiShoukuanWnd::SetCommonParams(std::map<string, string> params)
 {
 {
 	m_commonParams = params;
 	m_commonParams = params;
@@ -378,25 +351,7 @@ void CZidingyiShoukuanWnd::SetCommonParams(std::map<string, string> params)
 
 
 void CZidingyiShoukuanWnd::UpdateFocus()
 void CZidingyiShoukuanWnd::UpdateFocus()
 {
 {
-	if (m_is_money_init == false)
-	{
-		//如果没初始化,这个时候有2个编辑框,不能抢焦点
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
-
-		pMoneyEdit->SetFocus();
-
-		//下一个焦点的,就设置为这个控件
-		m_pm.SetFocusNeeded(pMoneyEdit);
-
-		//这个干嘛的不知道,但是不加好像不行
-		m_pm.SetNextTabControl(false);
-	}
-	else
-	{
-		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("shishou_edit")));
-
-		pFukuanEdit->SetFocus();
-	}
+	
 }
 }
 
 
 LRESULT CZidingyiShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CZidingyiShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
@@ -420,20 +375,11 @@ LRESULT CZidingyiShoukuanWnd::OnShoukuanNeedPassword(UINT uMsg, WPARAM wParam, L
 
 
 LRESULT CZidingyiShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 LRESULT CZidingyiShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
 {
 {
-	//判断是否要打印
-	/*
-	int dayinji_setting_auto_print = atoi(CSetting::GetParam("system_setting_dayinji_setting_auto_print").c_str());
-	if (dayinji_setting_auto_print == 1)
+	//播放收款成功的金额
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
 	{
 	{
-		m_valueWnd->PrintZhifu(m_out_trade_no);
+		std::thread(&CZidingyiShoukuanWnd::ReadShoukuanValue, this).detach();
 	}
 	}
-	}*/
-
-	//播放收款成功的金额
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	std::thread(&CZidingyiShoukuanWnd::ReadShoukuanValue, this).detach();
-	//}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
@@ -446,12 +392,6 @@ LRESULT CZidingyiShoukuanWnd::OnShoukuanSuccess(UINT uMsg, WPARAM wParam, LPARAM
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	std::wstring valueInfo = L"成功收款:¥" + m_money;
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 	pMoneyPaySuccess->SetText(valueInfo.c_str());
 
 
-	CHorizontalLayoutUI* wx_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_wx")));
-	CHorizontalLayoutUI* zhifubao_logo = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_success_logo_zhifubao")));
-
-	wx_logo->SetVisible(true);
-	zhifubao_logo->SetVisible(false);
-
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	CLabelUI* attention = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_success_attention")));
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	std::wstring ws_attention = L"按任意键关闭窗口," + to_wstring(m_timer_now) + L" 秒后自动关闭";
 	attention->SetText(ws_attention.c_str());
 	attention->SetText(ws_attention.c_str());
@@ -468,28 +408,20 @@ LRESULT CZidingyiShoukuanWnd::OnShoukuanFail(UINT uMsg, WPARAM wParam, LPARAM lP
 {
 {
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 	wstring path = CSystem::GetProgramDir() + L"\\music\\pay_fail.wav";
 
 
-	//if (CSetting::GetParam("shoukuan_setting_yuyinbobao") == "1")
-	//{
-	PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
-	//}
+	if (CSetting::GetParam("setting_is_new_diannei_voice") == "1")
+	{
+		PlaySound(path.c_str(), NULL, SND_FILENAME | SND_ASYNC);
+	}
 
 
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	CVerticalLayoutUI* paying_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_paying_layout")));
 	paying_layout->SetVisible(false);
 	paying_layout->SetVisible(false);
 
 
-	CVerticalLayoutUI* pay_fail_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_pay_fail_layout")));
-	pay_fail_layout->SetVisible(true);
-
-	CHorizontalLayoutUI* title_layout = static_cast<CHorizontalLayoutUI*>(m_pm.FindControl(_T("shoukuan_title_bkg")));
-	title_layout->SetBkColor(0xFFD33E3A);
-
-	CLabelUI* pFailMessage = static_cast<CLabelUI*>(m_pm.FindControl(_T("shouyin_pay_fail_attention")));
-
-	std::wstring ws_fail_message = L"失败信息:" + m_fail_message + L",按任意键关闭窗口,";
-	std::wstring ws_attention = ws_fail_message + to_wstring(m_timer_now) + L" 秒后自动关闭";
-
-	pFailMessage->SetText(ws_attention.c_str());
+	CVerticalLayoutUI* before_pay_layout = static_cast<CVerticalLayoutUI*>(m_pm.FindControl(_T("shoukuan_before_pay_layout")));
+	before_pay_layout->SetVisible(true);
 
 
-	SetTimer(m_hWnd, WM_TIMER_WND_CLOSE, 1000, NULL);
+	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
+	pLabel->SetText((L"收款失败:" + m_fail_message).c_str());
+	pLabel->SetVisible(true);
 
 
 	SetFocus(m_hWnd);
 	SetFocus(m_hWnd);
 
 
@@ -502,35 +434,37 @@ void CZidingyiShoukuanWnd::StartShoukuan()
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("shoukuanresult")));
 
 
 	//检查收款金额
 	//检查收款金额
-	if (m_is_money_init == false)
+	if (m_money == L"")
 	{
 	{
-		CEditUI* pMoneyEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("money_edit")));
-		m_money = pMoneyEdit->GetText();
+		pLabel->SetText(L"收款金额不能为空,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"")
-		{
-			pLabel->SetText(L"收款金额不能为空,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (m_money == L"0.00")
+	{
+		pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		if (m_money == L"0.00")
-		{
-			pLabel->SetText(L"收款金额不能为 0 元,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
+	if (!money_value || money_value < 0.01)
+	{
+		pLabel->SetText(L"收款金额错误,请重新输入!");
+		pLabel->SetVisible(true);
 
 
-		double money_value = atof(CLewaimaiString::UnicodeToUTF8(m_money).c_str());
-		if (!money_value || money_value < 0.01)
-		{
-			pLabel->SetText(L"收款金额错误,请重新输入!");
-			pLabel->SetVisible(true);
+		return;
+	}
 
 
-			return;
-		}
+	if (money_value > 50000)
+	{
+		pLabel->SetText(L"单笔收款金额不能大于5万,请重新输入!");
+		pLabel->SetVisible(true);
+
+		return;
 	}
 	}
 
 
 	//全部验证通过,就可以开始修改状态了
 	//全部验证通过,就可以开始修改状态了

+ 1 - 4
zhipuzi_pos_windows/wnd/CZidingyiShoukuanWnd.h

@@ -62,8 +62,6 @@ public:
 
 
 	void InitMoney(std::wstring value);
 	void InitMoney(std::wstring value);
 
 
-	void InitFukuanma(std::string fukuanma);
-
 	void SetCommonParams(std::map<string, string> params);
 	void SetCommonParams(std::map<string, string> params);
 
 
 	void UpdateFocus();
 	void UpdateFocus();
@@ -99,7 +97,6 @@ public:
 public:
 public:
 	CPaintManagerUI m_pm;
 	CPaintManagerUI m_pm;
 
 
-	bool m_is_money_init = false;
 	std::wstring m_money;
 	std::wstring m_money;
 
 
 	//收款状态 0:未开始 1:请求发给服务器了,但是暂时还没得到反馈 2:查询密码中 3:成功 4:失败 5:正在取消支付
 	//收款状态 0:未开始 1:请求发给服务器了,但是暂时还没得到反馈 2:查询密码中 3:成功 4:失败 5:正在取消支付
@@ -108,7 +105,7 @@ public:
 	std::wstring m_fail_message;
 	std::wstring m_fail_message;
 
 
 	//窗口关闭的定时器时间
 	//窗口关闭的定时器时间
-	int m_timer_now = 4;
+	int m_timer_now = 2;
 
 
 	std::map<string, string> m_commonParams;
 	std::map<string, string> m_commonParams;