Переглянути джерело

删除几个不要的东西

张洋 3 роки тому
батько
коміт
f3b6ea4d98

+ 0 - 50
bin/Win32/Debug/zhipuzi_pos_windows/skin/jiajia_input_dlg.xml

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window size="700,434" caption="0,0,0,44" roundcorner="4,4" >
-	<Font id="0" name="微软雅黑" size="26" />
-	<Font id="1" name="微软雅黑" size="32" />
-	<Font id="2" name="微软雅黑" size="22" />
-	
-	<VerticalLayout bkimage="shoukuan_bkg.png" >
-		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
-			<Label name="memo_dlg_title" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<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'"/>
-		</HorizontalLayout>
-		
-		<HorizontalLayout>
-			<VerticalLayout width="370">
-				<Label name="name" text="请输入加价金额(0到1000之间的整数)" 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="0xFF3CB371" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" font="1"/>
-					<Label name="name" text="元" height="50" width="50" padding="30,0,0,0" align="left"/>
-				</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>
-			</VerticalLayout>
-			
-			<HorizontalLayout width="330" height="406" bkcolor="#FFF3F3F3">
-				<Button name="jianpan_1" text="1" font="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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>
-		</HorizontalLayout>
-		
-	</VerticalLayout>
-</Window>

+ 0 - 50
bin/Win32/Debug/zhipuzi_pos_windows/skin/rengongyouhui_input_dlg.xml

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window size="700,434" caption="0,0,0,44" roundcorner="4,4" >
-	<Font id="0" name="微软雅黑" size="26" />
-	<Font id="1" name="微软雅黑" size="32" />
-	<Font id="2" name="微软雅黑" size="22" />
-	
-	<VerticalLayout bkimage="shoukuan_bkg.png" >
-		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
-			<Label name="memo_dlg_title" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<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'"/>
-		</HorizontalLayout>
-		
-		<HorizontalLayout>
-			<VerticalLayout width="370">
-				<Label name="name" text="请输入优惠金额(0到1000之间的整数)" 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="0xFF3CB371" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" font="1"/>
-					<Label name="name" text="元" height="50" width="50" padding="30,0,0,0" align="left"/>
-				</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>
-			</VerticalLayout>
-			
-			<HorizontalLayout width="330" height="406" bkcolor="#FFF3F3F3">
-				<Button name="jianpan_1" text="1" font="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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>
-		</HorizontalLayout>
-		
-	</VerticalLayout>
-</Window>

+ 0 - 50
bin/Win32/Debug/zhipuzi_pos_windows/skin/zhekou_input_dlg.xml

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window size="700,434" caption="0,0,0,44" roundcorner="4,4" >
-	<Font id="0" name="微软雅黑" size="26" />
-	<Font id="1" name="微软雅黑" size="32" />
-	<Font id="2" name="微软雅黑" size="22" />
-	
-	<VerticalLayout bkimage="shoukuan_bkg.png" >
-		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
-			<Label name="memo_dlg_title" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<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'"/>
-		</HorizontalLayout>
-		
-		<HorizontalLayout>
-			<VerticalLayout width="370">
-				<Label name="name" 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="0xFF3CB371" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" font="1"/>
-					<Label name="name" text="%" height="50" width="50" padding="30,0,0,0" align="left"/>
-				</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>
-			</VerticalLayout>
-			
-			<HorizontalLayout width="330" height="406" bkcolor="#FFF3F3F3">
-				<Button name="jianpan_1" text="1" font="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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="0" 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>
-		</HorizontalLayout>
-		
-	</VerticalLayout>
-</Window>

+ 1 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/zhengcan_order_item.xml

@@ -15,6 +15,7 @@
 		
 		<HorizontalLayout width="200">
 			<Button name="zhengcan_order_list_info" float="true" pos="100,6,180,44" text="详情" normalimage="file='btn_border_white.png' corner='5,5,5,5'" hotimage="file='btn_border_white_Hover.png' corner='5,5,5,5'" pushedimage="file='btn_border_white_Click.png' corner='5,5,5,5'"/>
+			<Button name="zhengcan_order_list_print" float="true" pos="100,54,180,92" text="打印" normalimage="file='btn_border_white.png' corner='5,5,5,5'" hotimage="file='btn_border_white_Hover.png' corner='5,5,5,5'" pushedimage="file='btn_border_white_Click.png' corner='5,5,5,5'"/>
 		</HorizontalLayout>
 	</ZhengcanOrderItem>
 </Window>

+ 42 - 38
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -9,9 +9,6 @@
 #include "../wnd/CMemoWnd.h"
 #include "../wnd/CYouhuiShowWnd.h"
 #include "../wnd/CMemberLoginWnd.h"
-#include "../wnd/CZhekouWnd.h"
-#include "../wnd/CRengongYouhuiWnd.h"
-#include "../wnd/CJiajiaWnd.h"
 #include "../wnd/CSaomaYouhuiquanWnd.h"
 #include "../wnd/CSaomaShangpinquanWnd.h"
 #include "../wnd/CSaomaCikaWnd.h"
@@ -24,6 +21,7 @@
 #include "../wnd/CZidingyiShoukuanWnd.h"
 #include "../wnd/CChengzhongWnd.h"
 #include "../wnd/CGuadanWnd.h"
+#include "../wnd/CNumInputWnd.h"
 
 #include "../print/CPosPrinter.h"
 
@@ -2276,25 +2274,27 @@ void CDiandanPageUI::ClickZhekou()
 		return;
 	}
 
-	CZhekouWnd* pZhekouDlg = new CZhekouWnd();
+	CNumInputWnd* pNumDlg = new CNumInputWnd();
 
-	if (pZhekouDlg != NULL)
+	if (pNumDlg != NULL)
 	{
 		m_is_show_modal_wnd = true;
-		m_curModalWnd = pZhekouDlg;
+		m_curModalWnd = pNumDlg;
 
-		pZhekouDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
-		pZhekouDlg->SetIcon(IDI_ICON_DUILIB);
-		pZhekouDlg->CenterWindow();
+		pNumDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pNumDlg->SetIcon(IDI_ICON_DUILIB);
+		pNumDlg->CenterWindow();
 
-		pZhekouDlg->SetTitle(L"输入折扣值");
+		pNumDlg->SetTitle(L"输入折扣值");
+		pNumDlg->SetAttention(L"请输入折扣值(1到100之间的整数)");
+		pNumDlg->SetRange(1, 100);
 
-		UINT ret = pZhekouDlg->ShowModal();
+		UINT ret = pNumDlg->ShowModal();
 
 		if (ret == IDOK)
 		{
 			//这说明折扣输入了
-			std::string zhekou = pZhekouDlg->getContent();
+			std::string zhekou = pNumDlg->GetNum();
 
 			CButtonUI* pZhekouEdit = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_jiesuan_zhekou_value")));
 			pZhekouEdit->SetText(CLewaimaiString::UTF8ToUnicode(zhekou).c_str());
@@ -2302,12 +2302,12 @@ void CDiandanPageUI::ClickZhekou()
 			this->UpdateJiesuanInfo();
 
 			m_is_show_modal_wnd = false;
-			delete pZhekouDlg;
+			delete pNumDlg;
 		}
 		else
 		{
 			m_is_show_modal_wnd = false;
-			delete pZhekouDlg;
+			delete pNumDlg;
 
 			return;
 		}
@@ -2321,25 +2321,27 @@ void CDiandanPageUI::ClickJiajia()
 		return;
 	}
 
-	CjiajiaWnd* pJiajiaDlg = new CjiajiaWnd();
+	CNumInputWnd* pNumDlg = new CNumInputWnd();
 
-	if (pJiajiaDlg != NULL)
+	if (pNumDlg != NULL)
 	{
 		m_is_show_modal_wnd = true;
-		m_curModalWnd = pJiajiaDlg;
+		m_curModalWnd = pNumDlg;
 
-		pJiajiaDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
-		pJiajiaDlg->SetIcon(IDI_ICON_DUILIB);
-		pJiajiaDlg->CenterWindow();
+		pNumDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pNumDlg->SetIcon(IDI_ICON_DUILIB);
+		pNumDlg->CenterWindow();
 
-		pJiajiaDlg->SetTitle(L"输入加价金额");
+		pNumDlg->SetTitle(L"输入加价金额");
+		pNumDlg->SetAttention(L"请输入加价金额(0到1000之间的整数)");
+		pNumDlg->SetRange(0, 1000);
 
-		UINT ret = pJiajiaDlg->ShowModal();
+		UINT ret = pNumDlg->ShowModal();
 
 		if (ret == IDOK)
 		{
-			//这说明折扣输入了
-			std::string jiajia = pJiajiaDlg->getContent();
+			//这说明加价金额输入了
+			std::string jiajia = pNumDlg->GetNum();
 
 			CButtonUI* pJiajiaEdit = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_jiesuan_jiajia_value")));
 			pJiajiaEdit->SetText(CLewaimaiString::UTF8ToUnicode(jiajia).c_str());
@@ -2347,12 +2349,12 @@ void CDiandanPageUI::ClickJiajia()
 			this->UpdateJiesuanInfo();
 
 			m_is_show_modal_wnd = false;
-			delete pJiajiaDlg;
+			delete pNumDlg;
 		}
 		else
 		{
 			m_is_show_modal_wnd = false;
-			delete pJiajiaDlg;
+			delete pNumDlg;
 
 			return;
 		}
@@ -2366,25 +2368,27 @@ void CDiandanPageUI::ClickRengongyouhui()
 		return;
 	}
 
-	CRengongYouhuiWnd* pYouhuiDlg = new CRengongYouhuiWnd();
+	CNumInputWnd* pNumDlg = new CNumInputWnd();
 
-	if (pYouhuiDlg != NULL)
+	if (pNumDlg != NULL)
 	{
 		m_is_show_modal_wnd = true;
-		m_curModalWnd = pYouhuiDlg;
+		m_curModalWnd = pNumDlg;
 
-		pYouhuiDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
-		pYouhuiDlg->SetIcon(IDI_ICON_DUILIB);
-		pYouhuiDlg->CenterWindow();
+		pNumDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pNumDlg->SetIcon(IDI_ICON_DUILIB);
+		pNumDlg->CenterWindow();
 
-		pYouhuiDlg->SetTitle(L"输入优惠金额");
+		pNumDlg->SetTitle(L"输入优惠金额");
+		pNumDlg->SetAttention(L"请输入优惠金额(0到1000之间的整数)");
+		pNumDlg->SetRange(0, 1000);
 
-		UINT ret = pYouhuiDlg->ShowModal();
+		UINT ret = pNumDlg->ShowModal();
 
 		if (ret == IDOK)
 		{
-			//这说明折扣输入了
-			std::string youhui = pYouhuiDlg->getContent();
+			//这说明优惠金额输入了
+			std::string youhui = pNumDlg->GetNum();
 
 			CButtonUI* pYouhuiEdit = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_jiesuan_youhui_value")));
 			pYouhuiEdit->SetText(CLewaimaiString::UTF8ToUnicode(youhui).c_str());
@@ -2392,12 +2396,12 @@ void CDiandanPageUI::ClickRengongyouhui()
 			this->UpdateJiesuanInfo();
 
 			m_is_show_modal_wnd = false;
-			delete pYouhuiDlg;
+			delete pNumDlg;
 		}
 		else
 		{
 			m_is_show_modal_wnd = false;
-			delete pYouhuiDlg;
+			delete pNumDlg;
 
 			return;
 		}

+ 41 - 38
zhipuzi_pos_windows/page/CZhengcanDiandanPageUI.cpp

@@ -9,9 +9,6 @@
 #include "../wnd/CMemoWnd.h"
 #include "../wnd/CYouhuiShowWnd.h"
 #include "../wnd/CMemberLoginWnd.h"
-#include "../wnd/CZhekouWnd.h"
-#include "../wnd/CRengongYouhuiWnd.h"
-#include "../wnd/CJiajiaWnd.h"
 #include "../wnd/CSaomaYouhuiquanWnd.h"
 #include "../wnd/CSaomaShangpinquanWnd.h"
 #include "../wnd/CSaomaCikaWnd.h"
@@ -2880,25 +2877,27 @@ void CZhengcanDiandanPageUI::ClickZhekou()
 		return;
 	}
 
-	CZhekouWnd* pZhekouDlg = new CZhekouWnd();
+	CNumInputWnd* pNumDlg = new CNumInputWnd();
 
-	if (pZhekouDlg != NULL)
+	if (pNumDlg != NULL)
 	{
 		m_is_show_modal_wnd = true;
-		m_curModalWnd = pZhekouDlg;
+		m_curModalWnd = pNumDlg;
 
-		pZhekouDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
-		pZhekouDlg->SetIcon(IDI_ICON_DUILIB);
-		pZhekouDlg->CenterWindow();
+		pNumDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pNumDlg->SetIcon(IDI_ICON_DUILIB);
+		pNumDlg->CenterWindow();
 
-		pZhekouDlg->SetTitle(L"输入折扣值");
+		pNumDlg->SetTitle(L"输入折扣值");
+		pNumDlg->SetAttention(L"请输入折扣值(1到100之间的整数)");
+		pNumDlg->SetRange(1, 100);
 
-		UINT ret = pZhekouDlg->ShowModal();
+		UINT ret = pNumDlg->ShowModal();
 
 		if (ret == IDOK)
 		{
 			//这说明折扣输入了
-			std::string zhekou = pZhekouDlg->getContent();
+			std::string zhekou = pNumDlg->GetNum();
 
 			CButtonUI* pZhekouEdit = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_jiesuan_zhekou_value")));
 			pZhekouEdit->SetText(CLewaimaiString::UTF8ToUnicode(zhekou).c_str());
@@ -2906,12 +2905,12 @@ void CZhengcanDiandanPageUI::ClickZhekou()
 			this->UpdateJiesuanInfo();
 
 			m_is_show_modal_wnd = false;
-			delete pZhekouDlg;
+			delete pNumDlg;
 		}
 		else
 		{
 			m_is_show_modal_wnd = false;
-			delete pZhekouDlg;
+			delete pNumDlg;
 
 			return;
 		}
@@ -2925,25 +2924,27 @@ void CZhengcanDiandanPageUI::ClickJiajia()
 		return;
 	}
 
-	CjiajiaWnd* pJiajiaDlg = new CjiajiaWnd();
+	CNumInputWnd* pNumDlg = new CNumInputWnd();
 
-	if (pJiajiaDlg != NULL)
+	if (pNumDlg != NULL)
 	{
 		m_is_show_modal_wnd = true;
-		m_curModalWnd = pJiajiaDlg;
+		m_curModalWnd = pNumDlg;
 
-		pJiajiaDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
-		pJiajiaDlg->SetIcon(IDI_ICON_DUILIB);
-		pJiajiaDlg->CenterWindow();
+		pNumDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pNumDlg->SetIcon(IDI_ICON_DUILIB);
+		pNumDlg->CenterWindow();
 
-		pJiajiaDlg->SetTitle(L"输入加价金额");
+		pNumDlg->SetTitle(L"输入加价金额");
+		pNumDlg->SetAttention(L"请输入加价金额(0到1000之间的整数)");
+		pNumDlg->SetRange(0, 1000);
 
-		UINT ret = pJiajiaDlg->ShowModal();
+		UINT ret = pNumDlg->ShowModal();
 
 		if (ret == IDOK)
 		{
-			//这说明折扣输入了
-			std::string jiajia = pJiajiaDlg->getContent();
+			//这说明加价金额输入了
+			std::string jiajia = pNumDlg->GetNum();
 
 			CButtonUI* pJiajiaEdit = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_jiesuan_jiajia_value")));
 			pJiajiaEdit->SetText(CLewaimaiString::UTF8ToUnicode(jiajia).c_str());
@@ -2951,12 +2952,12 @@ void CZhengcanDiandanPageUI::ClickJiajia()
 			this->UpdateJiesuanInfo();
 
 			m_is_show_modal_wnd = false;
-			delete pJiajiaDlg;
+			delete pNumDlg;
 		}
 		else
 		{
 			m_is_show_modal_wnd = false;
-			delete pJiajiaDlg;
+			delete pNumDlg;
 
 			return;
 		}
@@ -2970,25 +2971,27 @@ void CZhengcanDiandanPageUI::ClickRengongyouhui()
 		return;
 	}
 
-	CRengongYouhuiWnd* pYouhuiDlg = new CRengongYouhuiWnd();
+	CNumInputWnd* pNumDlg = new CNumInputWnd();
 
-	if (pYouhuiDlg != NULL)
+	if (pNumDlg != NULL)
 	{
 		m_is_show_modal_wnd = true;
-		m_curModalWnd = pYouhuiDlg;
+		m_curModalWnd = pNumDlg;
 
-		pYouhuiDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
-		pYouhuiDlg->SetIcon(IDI_ICON_DUILIB);
-		pYouhuiDlg->CenterWindow();
+		pNumDlg->Create(m_pManager->GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pNumDlg->SetIcon(IDI_ICON_DUILIB);
+		pNumDlg->CenterWindow();
 
-		pYouhuiDlg->SetTitle(L"输入优惠金额");
+		pNumDlg->SetTitle(L"输入优惠金额");
+		pNumDlg->SetAttention(L"请输入优惠金额(0到1000之间的整数)");
+		pNumDlg->SetRange(0, 1000);
 
-		UINT ret = pYouhuiDlg->ShowModal();
+		UINT ret = pNumDlg->ShowModal();
 
 		if (ret == IDOK)
 		{
-			//这说明折扣输入了
-			std::string youhui = pYouhuiDlg->getContent();
+			//这说明优惠金额输入了
+			std::string youhui = pNumDlg->GetNum();
 
 			CButtonUI* pYouhuiEdit = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_jiesuan_youhui_value")));
 			pYouhuiEdit->SetText(CLewaimaiString::UTF8ToUnicode(youhui).c_str());
@@ -2996,12 +2999,12 @@ void CZhengcanDiandanPageUI::ClickRengongyouhui()
 			this->UpdateJiesuanInfo();
 
 			m_is_show_modal_wnd = false;
-			delete pYouhuiDlg;
+			delete pNumDlg;
 		}
 		else
 		{
 			m_is_show_modal_wnd = false;
-			delete pYouhuiDlg;
+			delete pNumDlg;
 
 			return;
 		}

+ 9 - 1
zhipuzi_pos_windows/page/CZhengcanOrderListPageUI.cpp

@@ -33,7 +33,15 @@ void CZhengcanOrderListPageUI::HandleClickMsg(TNotifyUI& msg)
 {
 	CDuiString name = msg.pSender->GetName();
 
-	if (name == _T("zhengcan_order_list_info"))
+	if (name == _T("zhengcan_order_list_print"))
+	{
+		CZhengcanOrderItemUI* item = static_cast<CZhengcanOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string zhengcan_order_id = item->getOrderID();
+
+		CPosPrinter printer;
+		printer.PrintZhengcanOrderJiesuan(zhengcan_order_id);
+	}
+	else if (name == _T("zhengcan_order_list_info"))
 	{
 		CZhengcanOrderItemUI* item = static_cast<CZhengcanOrderItemUI*>(msg.pSender->GetParent()->GetParent());
 		std::string zhengcan_order_id = item->getOrderID();

+ 0 - 338
zhipuzi_pos_windows/wnd/CJiajiaWnd.cpp

@@ -1,338 +0,0 @@
-#include "../pch/pch.h"
-#include "CjiajiaWnd.h"
-
-LRESULT CjiajiaWnd::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	POINT pt;
-	pt.x = GET_X_LPARAM(lParam);
-	pt.y = GET_Y_LPARAM(lParam);
-	::ScreenToClient(*this, &pt);
-
-	RECT rcClient;
-	::GetClientRect(*this, &rcClient);
-
-	RECT rcCaption = m_pm.GetCaptionRect();
-	if (pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \
-		&& pt.y >= rcCaption.top && pt.y < rcCaption.bottom)
-	{
-		CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(pt));
-		if (pControl && _tcscmp(pControl->GetClass(), DUI_CTR_BUTTON) != 0)
-		{
-			return HTCAPTION;
-		}
-	}
-
-	return HTCLIENT;
-}
-
-LRESULT CjiajiaWnd::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	SIZE szRoundCorner = m_pm.GetRoundCorner();
-	if (!::IsIconic(*this) && (szRoundCorner.cx != 0 || szRoundCorner.cy != 0))
-	{
-		CDuiRect rcWnd;
-		::GetWindowRect(*this, &rcWnd);
-		rcWnd.Offset(-rcWnd.left, -rcWnd.top);
-		rcWnd.right++;
-		rcWnd.bottom++;
-		HRGN hRgn = ::CreateRoundRectRgn(rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom, szRoundCorner.cx, szRoundCorner.cy);
-		::SetWindowRgn(*this, hRgn, TRUE);
-		::DeleteObject(hRgn);
-	}
-
-	bHandled = FALSE;
-	return 0;
-}
-
-LRESULT CjiajiaWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
-	LRESULT lRes = 0;
-	BOOL bHandled = TRUE;
-	switch (uMsg)
-	{
-	case WM_CREATE:
-		lRes = OnCreate(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCACTIVATE:
-		lRes = OnNcActivate(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCCALCSIZE:
-		lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCPAINT:
-		lRes = OnNcPaint(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCHITTEST:
-		lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_SIZE:
-		lRes = OnSize(uMsg, wParam, lParam, bHandled);
-		break;
-	default:
-		bHandled = FALSE;
-	}
-	if (bHandled)
-	{
-		return lRes;
-	}
-	if (m_pm.MessageHandler(uMsg, wParam, lParam, lRes))
-	{
-		return lRes;
-	}
-	return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
-}
-
-LRESULT CjiajiaWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
-{
-	if (uMsg == WM_KEYDOWN)
-	{
-		if (wParam == VK_RETURN)
-		{
-			StartYanzheng();
-
-			return true;
-		}
-		else if (wParam == VK_ESCAPE)
-		{
-			Close(IDCANCEL);
-
-			return true;
-		}
-	}
-
-	return false;
-}
-
-LRESULT CjiajiaWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	LONG styleValue = ::GetWindowLong(*this, GWL_STYLE);
-	styleValue &= ~WS_CAPTION;
-	::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
-
-	// 把自己的窗口句柄与窗口绘制管理器挂接在一起
-	m_pm.Init(m_hWnd);
-
-	m_pm.AddPreMessageFilter(this);
-
-	CDialogBuilder builder;
-
-	CControlUI* pRoot = builder.Create(_T("jiajia_input_dlg.xml"), (UINT)0, NULL, &m_pm);
-	ASSERT(pRoot && "Failed to parse XML");
-
-	// 把这些控件绘制到本窗口上
-	m_pm.AttachDialog(pRoot);
-
-	// 把自己加入到CPaintManagerUI的m_aNotifiers数组中,用于处理Notify函数
-	m_pm.AddNotifier(this);
-
-	Init();
-
-	return 0;
-}
-
-void CjiajiaWnd::Notify(TNotifyUI& msg)
-{
-	if (msg.sType == _T("click"))
-	{
-		DuiLib::CDuiString senderName = msg.pSender->GetName();
-
-		if (senderName == _T("closebtn"))
-		{
-			Close(IDCANCEL);
-			return;
-		}
-		else if (senderName == _T("save"))
-		{
-			StartYanzheng();
-		}
-		else if (senderName == L"jianpan_1")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"1";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_2")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"2";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_3")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"3";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_4")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"4";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_5")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"5";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_6")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"6";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_7")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"7";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_8")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"8";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_9")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"9";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_0")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"0";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_x")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason = wsReason.substr(0, wsReason.length() - 1);
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_qingkong")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason.clear();
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-	}
-	else if (msg.sType == _T("textchanged"))
-	{
-		//只能输入数字,其他的全部删除
-		CEditUI* m_pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-		if (!m_pEdit->GetText().IsEmpty())
-		{
-			wstring ws_Value = m_pEdit->GetText();
-			string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
-
-			for (size_t nIndex = 0; nIndex < strValue.length(); nIndex++)
-			{
-				unsigned char tmp = strValue.at(nIndex);
-				if (tmp > 57 || tmp < 48)
-				{
-					//ASCII码不是数字的都过滤掉
-					strValue = strValue.substr(0, nIndex);
-
-					m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
-					m_pEdit->SetSel(strValue.length(), strValue.length());//重设给光标设置位置
-
-					break;
-				}
-			}
-		}
-	}
-	else if (msg.sType == L"windowinit")
-	{
-		m_pm.SetNextTabControl(false);
-
-		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-		pFukuanEdit->SetFocus();
-	}
-}
-
-void CjiajiaWnd::Init()
-{
-
-}
-
-
-std::string CjiajiaWnd::getContent()
-{
-	return m_content;
-}
-
-void CjiajiaWnd::SetTitle(std::wstring title)
-{
-	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("memo_dlg_title")));
-	pLabel->SetText(title.c_str());
-}
-
-void CjiajiaWnd::StartYanzheng()
-{
-	CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-	wstring wsReason = pContent->GetText();
-
-	m_content = CLewaimaiString::UnicodeToUTF8(wsReason);
-
-	int zhekou = atoi(m_content.c_str());
-	if (zhekou > 100 || zhekou < 0)
-	{
-		CLabelUI* pErrorInfo = static_cast<CLabelUI*>(m_pm.FindControl(_T("errinfo")));
-		pErrorInfo->SetText(L"加价金额只能为0到100之间的整数");
-		pErrorInfo->SetVisible(true);
-
-		return;
-	}
-
-	Close(IDOK);
-}

+ 0 - 80
zhipuzi_pos_windows/wnd/CJiajiaWnd.h

@@ -1,80 +0,0 @@
-#pragma once
-
-#include "../pch/pch.h"
-#include "CMainWnd.h"
-#include "CModalWnd.h"
-
-class CjiajiaWnd : public CModalWnd
-{
-public:
-	LPCTSTR GetWindowClassName() const
-	{
-		return _T("UIMemoWndFrame");
-	};
-
-	UINT GetClassStyle() const
-	{
-		return UI_CLASSSTYLE_DIALOG;
-	};
-
-	void OnFinalMessage(HWND /*hWnd*/)
-	{
-		//WindowImplBase::OnFinalMessage(hWnd);
-		m_pm.RemovePreMessageFilter(this);
-
-		//delete this;
-	};
-
-	void Init();
-
-	std::string getContent();
-
-	void SetTitle(std::wstring title);
-
-	void Notify(TNotifyUI& msg);
-
-	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		if (::IsIconic(*this))
-		{
-			bHandled = FALSE;
-		}
-		return (wParam == 0) ? TRUE : FALSE;
-	}
-
-	LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		return 0;
-	}
-
-	LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		return 0;
-	}
-
-	LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
-
-	LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
-
-	void StartYanzheng();
-
-	//´¦Àí¼üÅ̲¶×½½á¹û
-	void HandleTextCapture(std::string content)
-	{
-
-	}
-
-public:
-	CPaintManagerUI m_pm;
-
-	std::string m_content;
-
-	std::wstring m_errorInfo;
-};
-

+ 0 - 338
zhipuzi_pos_windows/wnd/CRengongYouhuiWnd.cpp

@@ -1,338 +0,0 @@
-#include "../pch/pch.h"
-#include "CRengongYouhuiWnd.h"
-
-LRESULT CRengongYouhuiWnd::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	POINT pt;
-	pt.x = GET_X_LPARAM(lParam);
-	pt.y = GET_Y_LPARAM(lParam);
-	::ScreenToClient(*this, &pt);
-
-	RECT rcClient;
-	::GetClientRect(*this, &rcClient);
-
-	RECT rcCaption = m_pm.GetCaptionRect();
-	if (pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \
-		&& pt.y >= rcCaption.top && pt.y < rcCaption.bottom)
-	{
-		CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(pt));
-		if (pControl && _tcscmp(pControl->GetClass(), DUI_CTR_BUTTON) != 0)
-		{
-			return HTCAPTION;
-		}
-	}
-
-	return HTCLIENT;
-}
-
-LRESULT CRengongYouhuiWnd::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	SIZE szRoundCorner = m_pm.GetRoundCorner();
-	if (!::IsIconic(*this) && (szRoundCorner.cx != 0 || szRoundCorner.cy != 0))
-	{
-		CDuiRect rcWnd;
-		::GetWindowRect(*this, &rcWnd);
-		rcWnd.Offset(-rcWnd.left, -rcWnd.top);
-		rcWnd.right++;
-		rcWnd.bottom++;
-		HRGN hRgn = ::CreateRoundRectRgn(rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom, szRoundCorner.cx, szRoundCorner.cy);
-		::SetWindowRgn(*this, hRgn, TRUE);
-		::DeleteObject(hRgn);
-	}
-
-	bHandled = FALSE;
-	return 0;
-}
-
-LRESULT CRengongYouhuiWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
-	LRESULT lRes = 0;
-	BOOL bHandled = TRUE;
-	switch (uMsg)
-	{
-	case WM_CREATE:
-		lRes = OnCreate(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCACTIVATE:
-		lRes = OnNcActivate(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCCALCSIZE:
-		lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCPAINT:
-		lRes = OnNcPaint(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCHITTEST:
-		lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_SIZE:
-		lRes = OnSize(uMsg, wParam, lParam, bHandled);
-		break;
-	default:
-		bHandled = FALSE;
-	}
-	if (bHandled)
-	{
-		return lRes;
-	}
-	if (m_pm.MessageHandler(uMsg, wParam, lParam, lRes))
-	{
-		return lRes;
-	}
-	return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
-}
-
-LRESULT CRengongYouhuiWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
-{
-	if (uMsg == WM_KEYDOWN)
-	{
-		if (wParam == VK_RETURN)
-		{
-			StartYanzheng();
-
-			return true;
-		}
-		else if (wParam == VK_ESCAPE)
-		{
-			Close(IDCANCEL);
-
-			return true;
-		}
-	}
-
-	return false;
-}
-
-LRESULT CRengongYouhuiWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	LONG styleValue = ::GetWindowLong(*this, GWL_STYLE);
-	styleValue &= ~WS_CAPTION;
-	::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
-
-	// 把自己的窗口句柄与窗口绘制管理器挂接在一起
-	m_pm.Init(m_hWnd);
-
-	m_pm.AddPreMessageFilter(this);
-
-	CDialogBuilder builder;
-
-	CControlUI* pRoot = builder.Create(_T("rengongyouhui_input_dlg.xml"), (UINT)0, NULL, &m_pm);
-	ASSERT(pRoot && "Failed to parse XML");
-
-	// 把这些控件绘制到本窗口上
-	m_pm.AttachDialog(pRoot);
-
-	// 把自己加入到CPaintManagerUI的m_aNotifiers数组中,用于处理Notify函数
-	m_pm.AddNotifier(this);
-
-	Init();
-
-	return 0;
-}
-
-void CRengongYouhuiWnd::Notify(TNotifyUI& msg)
-{
-	if (msg.sType == _T("click"))
-	{
-		DuiLib::CDuiString senderName = msg.pSender->GetName();
-
-		if (senderName == _T("closebtn"))
-		{
-			Close(IDCANCEL);
-			return;
-		}
-		else if (senderName == _T("save"))
-		{
-			StartYanzheng();
-		}
-		else if (senderName == L"jianpan_1")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"1";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_2")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"2";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_3")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"3";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_4")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"4";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_5")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"5";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_6")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"6";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_7")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"7";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_8")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"8";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_9")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"9";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_0")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"0";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_x")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason = wsReason.substr(0, wsReason.length() - 1);
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_qingkong")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason.clear();
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-	}
-	else if (msg.sType == _T("textchanged"))
-	{
-		//只能输入数字,其他的全部删除
-		CEditUI* m_pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-		if (!m_pEdit->GetText().IsEmpty())
-		{
-			wstring ws_Value = m_pEdit->GetText();
-			string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
-
-			for (size_t nIndex = 0; nIndex < strValue.length(); nIndex++)
-			{
-				unsigned char tmp = strValue.at(nIndex);
-				if (tmp > 57 || tmp < 48)
-				{
-					//ASCII码不是数字的都过滤掉
-					strValue = strValue.substr(0, nIndex);
-
-					m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
-					m_pEdit->SetSel(strValue.length(), strValue.length());//重设给光标设置位置
-
-					break;
-				}
-			}
-		}
-	}
-	else if (msg.sType == L"windowinit")
-	{
-		m_pm.SetNextTabControl(false);
-
-		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-		pFukuanEdit->SetFocus();
-	}
-}
-
-void CRengongYouhuiWnd::Init()
-{
-
-}
-
-
-std::string CRengongYouhuiWnd::getContent()
-{
-	return m_content;
-}
-
-void CRengongYouhuiWnd::SetTitle(std::wstring title)
-{
-	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("memo_dlg_title")));
-	pLabel->SetText(title.c_str());
-}
-
-void CRengongYouhuiWnd::StartYanzheng()
-{
-	CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-	wstring wsReason = pContent->GetText();
-
-	m_content = CLewaimaiString::UnicodeToUTF8(wsReason);
-
-	int zhekou = atoi(m_content.c_str());
-	if (zhekou > 100 || zhekou < 0)
-	{
-		CLabelUI* pErrorInfo = static_cast<CLabelUI*>(m_pm.FindControl(_T("errinfo")));
-		pErrorInfo->SetText(L"优惠金额只能为0到100之间的整数");
-		pErrorInfo->SetVisible(true);
-
-		return;
-	}
-
-	Close(IDOK);
-}

+ 0 - 80
zhipuzi_pos_windows/wnd/CRengongYouhuiWnd.h

@@ -1,80 +0,0 @@
-#pragma once
-
-#include "../pch/pch.h"
-#include "CMainWnd.h"
-#include "CModalWnd.h"
-
-class CRengongYouhuiWnd : public CModalWnd
-{
-public:
-	LPCTSTR GetWindowClassName() const
-	{
-		return _T("UIMemoWndFrame");
-	};
-
-	UINT GetClassStyle() const
-	{
-		return UI_CLASSSTYLE_DIALOG;
-	};
-
-	void OnFinalMessage(HWND /*hWnd*/)
-	{
-		//WindowImplBase::OnFinalMessage(hWnd);
-		m_pm.RemovePreMessageFilter(this);
-
-		//delete this;
-	};
-
-	void Init();
-
-	std::string getContent();
-
-	void SetTitle(std::wstring title);
-
-	void Notify(TNotifyUI& msg);
-
-	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		if (::IsIconic(*this))
-		{
-			bHandled = FALSE;
-		}
-		return (wParam == 0) ? TRUE : FALSE;
-	}
-
-	LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		return 0;
-	}
-
-	LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		return 0;
-	}
-
-	LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
-
-	LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
-
-	void StartYanzheng();
-
-	//´¦Àí¼üÅ̲¶×½½á¹û
-	void HandleTextCapture(std::string content)
-	{
-
-	}
-
-public:
-	CPaintManagerUI m_pm;
-
-	std::string m_content;
-
-	std::wstring m_errorInfo;
-};
-

+ 0 - 337
zhipuzi_pos_windows/wnd/CZhekouWnd.cpp

@@ -1,337 +0,0 @@
-#include "../pch/pch.h"
-#include "CZhekouWnd.h"
-
-LRESULT CZhekouWnd::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	POINT pt;
-	pt.x = GET_X_LPARAM(lParam);
-	pt.y = GET_Y_LPARAM(lParam);
-	::ScreenToClient(*this, &pt);
-
-	RECT rcClient;
-	::GetClientRect(*this, &rcClient);
-
-	RECT rcCaption = m_pm.GetCaptionRect();
-	if (pt.x >= rcClient.left + rcCaption.left && pt.x < rcClient.right - rcCaption.right \
-		&& pt.y >= rcCaption.top && pt.y < rcCaption.bottom)
-	{
-		CControlUI* pControl = static_cast<CControlUI*>(m_pm.FindControl(pt));
-		if (pControl && _tcscmp(pControl->GetClass(), DUI_CTR_BUTTON) != 0)
-		{
-			return HTCAPTION;
-		}
-	}
-
-	return HTCLIENT;
-}
-
-LRESULT CZhekouWnd::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	SIZE szRoundCorner = m_pm.GetRoundCorner();
-	if (!::IsIconic(*this) && (szRoundCorner.cx != 0 || szRoundCorner.cy != 0))
-	{
-		CDuiRect rcWnd;
-		::GetWindowRect(*this, &rcWnd);
-		rcWnd.Offset(-rcWnd.left, -rcWnd.top);
-		rcWnd.right++;
-		rcWnd.bottom++;
-		HRGN hRgn = ::CreateRoundRectRgn(rcWnd.left, rcWnd.top, rcWnd.right, rcWnd.bottom, szRoundCorner.cx, szRoundCorner.cy);
-		::SetWindowRgn(*this, hRgn, TRUE);
-		::DeleteObject(hRgn);
-	}
-
-	bHandled = FALSE;
-	return 0;
-}
-
-LRESULT CZhekouWnd::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
-	LRESULT lRes = 0;
-	BOOL bHandled = TRUE;
-	switch (uMsg)
-	{
-	case WM_CREATE:
-		lRes = OnCreate(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCACTIVATE:
-		lRes = OnNcActivate(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCCALCSIZE:
-		lRes = OnNcCalcSize(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCPAINT:
-		lRes = OnNcPaint(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_NCHITTEST:
-		lRes = OnNcHitTest(uMsg, wParam, lParam, bHandled);
-		break;
-	case WM_SIZE:
-		lRes = OnSize(uMsg, wParam, lParam, bHandled);
-		break;
-	default:
-		bHandled = FALSE;
-	}
-	if (bHandled)
-	{
-		return lRes;
-	}
-	if (m_pm.MessageHandler(uMsg, wParam, lParam, lRes))
-	{
-		return lRes;
-	}
-	return CWindowWnd::HandleMessage(uMsg, wParam, lParam);
-}
-
-LRESULT CZhekouWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
-{
-	if (uMsg == WM_KEYDOWN)
-	{
-		if (wParam == VK_RETURN)
-		{
-			StartYanzheng();
-
-			return true;
-		}
-		else if (wParam == VK_ESCAPE)
-		{
-			Close(IDCANCEL);
-
-			return true;
-		}
-	}
-
-	return false;
-}
-
-LRESULT CZhekouWnd::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-{
-	LONG styleValue = ::GetWindowLong(*this, GWL_STYLE);
-	styleValue &= ~WS_CAPTION;
-	::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
-
-	// 把自己的窗口句柄与窗口绘制管理器挂接在一起
-	m_pm.Init(m_hWnd);
-
-	m_pm.AddPreMessageFilter(this);
-
-	CDialogBuilder builder;
-
-	CControlUI* pRoot = builder.Create(_T("zhekou_input_dlg.xml"), (UINT)0, NULL, &m_pm);
-	ASSERT(pRoot && "Failed to parse XML");
-
-	// 把这些控件绘制到本窗口上
-	m_pm.AttachDialog(pRoot);
-
-	// 把自己加入到CPaintManagerUI的m_aNotifiers数组中,用于处理Notify函数
-	m_pm.AddNotifier(this);
-
-	Init();
-
-	return 0;
-}
-
-void CZhekouWnd::Notify(TNotifyUI& msg)
-{
-	if (msg.sType == _T("click"))
-	{
-		DuiLib::CDuiString senderName = msg.pSender->GetName();
-
-		if (senderName == _T("closebtn"))
-		{
-			Close(IDCANCEL);
-			return;
-		}
-		else if (senderName == _T("save"))
-		{
-			StartYanzheng();
-		}
-		else if (senderName == L"jianpan_1")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"1";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_2")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"2";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_3")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"3";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_4")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"4";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_5")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"5";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_6")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"6";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_7")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"7";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_8")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"8";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_9")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"9";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_0")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason += L"0";
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_x")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason = wsReason.substr(0, wsReason.length() - 1);
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-		else if (senderName == L"jianpan_qingkong")
-		{
-			CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-			wstring wsReason = pContent->GetText();
-
-			wsReason.clear();
-
-			pContent->SetText(wsReason.c_str());
-			pContent->SetFocus();
-		}
-	}
-	else if (msg.sType == _T("textchanged"))
-	{
-		//只能输入数字,其他的全部删除
-		CEditUI* m_pEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-		if (!m_pEdit->GetText().IsEmpty())
-		{
-			wstring ws_Value = m_pEdit->GetText();
-			string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
-
-			for (size_t nIndex = 0; nIndex < strValue.length(); nIndex++)
-			{
-				unsigned char tmp = strValue.at(nIndex);
-				if (tmp > 57 || tmp < 48)
-				{
-					//ASCII码不是数字的都过滤掉
-					strValue = strValue.substr(0, nIndex);
-
-					m_pEdit->SetText(CLewaimaiString::UTF8ToUnicode(strValue).c_str());
-					m_pEdit->SetSel(strValue.length(), strValue.length());//重设给光标设置位置
-
-					break;
-				}
-			}
-		}
-	}
-	else if (msg.sType == L"windowinit")
-	{
-		m_pm.SetNextTabControl(false);
-
-		CEditUI* pFukuanEdit = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-		pFukuanEdit->SetFocus();
-	}
-}
-
-void CZhekouWnd::Init()
-{
-
-}
-
-std::string CZhekouWnd::getContent()
-{
-	return m_content;
-}
-
-void CZhekouWnd::SetTitle(std::wstring title)
-{
-	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("memo_dlg_title")));
-	pLabel->SetText(title.c_str());
-}
-
-void CZhekouWnd::StartYanzheng()
-{
-	CEditUI* pContent = static_cast<CEditUI*>(m_pm.FindControl(_T("content")));
-	wstring wsReason = pContent->GetText();
-
-	m_content = CLewaimaiString::UnicodeToUTF8(wsReason);
-
-	int zhekou = atoi(m_content.c_str());
-	if (zhekou > 100 || zhekou < 1)
-	{
-		CLabelUI* pErrorInfo = static_cast<CLabelUI*>(m_pm.FindControl(_T("errinfo")));
-		pErrorInfo->SetText(L"折扣值只能为1到100之间的整数");
-		pErrorInfo->SetVisible(true);
-
-		return;
-	}
-
-	Close(IDOK);
-}

+ 0 - 80
zhipuzi_pos_windows/wnd/CZhekouWnd.h

@@ -1,80 +0,0 @@
-#pragma once
-
-#include "../pch/pch.h"
-#include "CMainWnd.h"
-#include "CModalWnd.h"
-
-class CZhekouWnd : public CModalWnd
-{
-public:
-	LPCTSTR GetWindowClassName() const
-	{
-		return _T("UIMemoWndFrame");
-	};
-
-	UINT GetClassStyle() const
-	{
-		return UI_CLASSSTYLE_DIALOG;
-	};
-
-	void OnFinalMessage(HWND /*hWnd*/)
-	{
-		//WindowImplBase::OnFinalMessage(hWnd);
-		m_pm.RemovePreMessageFilter(this);
-
-		//delete this;
-	};
-
-	void Init();
-
-	std::string getContent();
-
-	void SetTitle(std::wstring title);
-
-	void Notify(TNotifyUI& msg);
-
-	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT OnNcActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		if (::IsIconic(*this))
-		{
-			bHandled = FALSE;
-		}
-		return (wParam == 0) ? TRUE : FALSE;
-	}
-
-	LRESULT OnNcCalcSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		return 0;
-	}
-
-	LRESULT OnNcPaint(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
-	{
-		return 0;
-	}
-
-	LRESULT OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
-
-	LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
-
-	void StartYanzheng();
-
-	//´¦Àí¼üÅ̲¶×½½á¹û
-	void HandleTextCapture(std::string content)
-	{
-
-	}
-
-public:
-	CPaintManagerUI m_pm;
-
-	std::string m_content;
-
-	std::wstring m_errorInfo;
-};
-

+ 0 - 6
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj

@@ -287,10 +287,7 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClInclude Include="wnd\CSaomaQuanyikaWnd.h" />
     <ClInclude Include="wnd\CSaomaShangpinquanWnd.h" />
     <ClInclude Include="wnd\CSaomaYouhuiquanWnd.h" />
-    <ClInclude Include="wnd\CJiajiaWnd.h" />
-    <ClInclude Include="wnd\CRengongYouhuiWnd.h" />
     <ClInclude Include="wnd\CWeixinzhifuShoukuanWnd.h" />
-    <ClInclude Include="wnd\CZhekouWnd.h" />
     <ClInclude Include="wnd\CMemberLoginWnd.h" />
     <ClInclude Include="wnd\CYouhuiShowWnd.h" />
     <ClInclude Include="zhipuzi\CDiandanOrderItem.h" />
@@ -400,10 +397,7 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClCompile Include="wnd\CSaomaQuanyikaWnd.cpp" />
     <ClCompile Include="wnd\CSaomaShangpinquanWnd.cpp" />
     <ClCompile Include="wnd\CSaomaYouhuiquanWnd.cpp" />
-    <ClCompile Include="wnd\CJiajiaWnd.cpp" />
-    <ClCompile Include="wnd\CRengongYouhuiWnd.cpp" />
     <ClCompile Include="wnd\CWeixinzhifuShoukuanWnd.cpp" />
-    <ClCompile Include="wnd\CZhekouWnd.cpp" />
     <ClCompile Include="wnd\CMemberLoginWnd.cpp" />
     <ClCompile Include="wnd\CYouhuiShowWnd.cpp" />
     <ClCompile Include="zhipuzi\CDiandanOrderItem.cpp" />

+ 0 - 18
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj.filters

@@ -138,15 +138,6 @@
     <ClInclude Include="wnd\CMemberLoginWnd.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="wnd\CZhekouWnd.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="wnd\CJiajiaWnd.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="wnd\CRengongYouhuiWnd.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
     <ClInclude Include="wnd\CSaomaYouhuiquanWnd.h">
       <Filter>头文件</Filter>
     </ClInclude>
@@ -452,15 +443,6 @@
     <ClCompile Include="wnd\CMemberLoginWnd.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="wnd\CZhekouWnd.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-    <ClCompile Include="wnd\CJiajiaWnd.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-    <ClCompile Include="wnd\CRengongYouhuiWnd.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
     <ClCompile Include="wnd\CSaomaYouhuiquanWnd.cpp">
       <Filter>源文件</Filter>
     </ClCompile>