Bladeren bron

代码框架调整完了

张洋 4 jaren geleden
bovenliggende
commit
2f7e2d9702
29 gewijzigde bestanden met toevoegingen van 2760 en 2472 verwijderingen
  1. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/db/pos.db
  2. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/dump/2021-08-25-10-32-09.dmp
  3. 0 82
      bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_index.xml
  4. 84 0
      bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_page.xml
  5. 2 2
      bin/Win32/Debug/zhipuzi_pos_windows/skin/setting.xml
  6. 0 90
      bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_info.xml
  7. 92 0
      bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_info_page.xml
  8. 0 42
      bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_list.xml
  9. 44 0
      bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_list_page.xml
  10. 0 19
      zhipuzi_pos_windows/control/CSettingUI.cpp
  11. 0 13
      zhipuzi_pos_windows/control/CSettingUI.h
  12. 0 26
      zhipuzi_pos_windows/control/CWaimaiOrderInfoUI.h
  13. 20 11
      zhipuzi_pos_windows/control/ControlEx.h
  14. 0 235
      zhipuzi_pos_windows/control/OrderListUI.cpp
  15. 0 47
      zhipuzi_pos_windows/control/OrderListUI.h
  16. 36 0
      zhipuzi_pos_windows/page/CBasePageUI.h
  17. 37 0
      zhipuzi_pos_windows/page/CDiandanPageUI.cpp
  18. 24 0
      zhipuzi_pos_windows/page/CDiandanPageUI.h
  19. 1281 0
      zhipuzi_pos_windows/page/CSettingPageUI.cpp
  20. 24 0
      zhipuzi_pos_windows/page/CSettingPageUI.h
  21. 183 8
      zhipuzi_pos_windows/control/CWaimaiOrderInfoUI.cpp
  22. 38 0
      zhipuzi_pos_windows/page/CWaimaiOrderInfoPageUI.h
  23. 433 0
      zhipuzi_pos_windows/page/CWaimaiOrderListPageUI.cpp
  24. 57 0
      zhipuzi_pos_windows/page/CWaimaiOrderListPageUI.h
  25. 350 1867
      zhipuzi_pos_windows/wnd/CMainWnd.cpp
  26. 17 6
      zhipuzi_pos_windows/wnd/CMainWnd.h
  27. 9 6
      zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj
  28. 27 18
      zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj.filters
  29. 2 0
      zhipuzi_pos_windows_server/obj/x86/Release/zhipuzi_pos_windows_server_linux.log

BIN
bin/Win32/Debug/zhipuzi_pos_windows/db/pos.db


BIN
bin/Win32/Debug/zhipuzi_pos_windows/dump/2021-08-25-10-32-09.dmp


File diff suppressed because it is too large
+ 0 - 82
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_index.xml


File diff suppressed because it is too large
+ 84 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_page.xml


+ 2 - 2
bin/Win32/Debug/zhipuzi_pos_windows/skin/setting.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
-	<Setting name="setting_page" bkcolor="#FFEFF6EE">
+	<SettingPage name="setting_page" bkcolor="#FFEFF6EE">
 		<HorizontalLayout>
 			<HorizontalLayout width="250" padding="20,20,20,0">
 				<VerticalLayout height="440" bkcolor="#FFFFFFFF" childpadding="15" inset="20,20,20,0">
@@ -198,5 +198,5 @@
 				</VerticalLayout>
 			</TabLayout>
 		</HorizontalLayout>
-	</Setting>
+	</SettingPage>
 </Window>

+ 0 - 90
bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_info.xml

@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window>
-	<WaimaiOrderInfo name="waimaiorder_info_page" bkcolor="#FFEFF6EE">
-		<HorizontalLayout height="44" bkcolor="#FFFFFFFF" padding="0,0,0,0">
-			<Button name="waimai_order_info_page_return" float="true" pos="20,3,120,41" text="返回" textcolor="#FFFFFFFF"/>
-		</HorizontalLayout>
-
-		<HorizontalLayout>
-			<VerticalLayout name="waimai_order_info_page_orderlayout" padding="20,20,20,20" vscrollbar="true">
-				<VerticalLayout name="waimai_order_info_page_layout_1" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<HorizontalLayout height="50">
-						<Label float="true" name="waimai_order_info_page_liushuihao" text="#1" pos="10, 10, 60, 40" />
-						<Label float="true" name="waimai_order_info_page_order_num" text="订单号:" pos="80, 10, 500, 40" />
-					</HorizontalLayout>
-
-					<Control height="1" bkcolor="#FF708090" />
-
-					<List name="waimai_order_info_page_foodlist">
-						<ListHeader />
-						<ListHeaderItem text="商品" align="left" />
-						<ListHeaderItem text="数量" width="200" align="center" />
-						<ListHeaderItem text="单价" width="200" align="center" />
-					</List>  
-
-					<Control height="10" />
-
-					<Label name="waimaorder_info_page_memo" minheight="30" multiline="true" text="备注:" />
-
-					<Control height="1" bkcolor="#FF708090" />
-
-					<VerticalLayout name="waimai_order_info_page_fees">				
-
-					</VerticalLayout>
-					
-					<Control name="waimai_order_info_page_fees_line" height="1" bkcolor="#FF708090" />
-					
-					<Label name="waimai_order_info_page_totalprice" height="40" padding="0,0,30,0" align="right" text="总计:" />
-				</VerticalLayout>
-
-				<VerticalLayout name="waimai_order_info_page_layout_2" height="150" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<Label text="顾客信息" height="30" />
-					<Control height="1" bkcolor="#FF708090" />
-					<Label name="waimai_order_info_page_name" text="姓名:" height="30" />
-					<Label name="waimai_order_info_page_phone" text="电话:" height="30" />
-					<Label name="waimai_order_info_page_address" text="地址:" height="30" />
-					<Label name="waimai_order_info_page_init_date" text="下单时间:" height="30" />
-				</VerticalLayout>
-					
-				<VerticalLayout name="waimai_order_info_page_qishouinfo" height="120" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<Label text="骑手信息" height="30" />
-					<Control height="1" bkcolor="#FF708090" />
-					<Label name="waimai_order_info_page_qishou_name" text="骑手姓名:" height="30" />
-					<Label name="waimai_order_info_page_qishou_phone" text="骑手电话:" height="30" />
-					<Label name="waimai_order_info_page_qishou_type" text="骑手类型:" height="30" />
-				</VerticalLayout>				
-				
-				<VerticalLayout name="waimai_order_info_page_layout_3" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
-					<Label text="订单信息" height="30" />
-					<Control height="1" bkcolor="#FF708090" />
-					<Label name="waimai_order_info_page_shopname" height="30" text="店铺名字:" />
-					<Label name="waimai_order_info_page_status" height="30" text="订单状态:" />
-					<Label name="waimai_order_info_page_type" height="30" text="订单来源:" />
-					<Label name="waimai_order_info_page_pay_type" height="30" text="付款方式:" />
-					<VerticalLayout name="waimai_order_info_page_field">
-
-					</VerticalLayout>
-					<Label name="waimai_order_info_page_delivery_type" height="30" text="配送方式:" />
-					<Label name="waimai_order_info_page_delivery_time" height="30" text="配送时间:" />
-					<Label name="waimai_order_info_page_refund_status" height="30" text="退款状态:" />
-					<Label name="waimai_order_info_page_configmemo" height="30" text="商家备注:" />
-					
-					<Control name="waimai_order_info_page_huodaofukuan" bkimage="huodaofukuan.png" float="true" pos="200,70,312,140" />
-				</VerticalLayout>
-			</VerticalLayout>
-
-			<HorizontalLayout width="250" height="400" bkcolor="#FFFFFFFF" padding="0,20,20,0">
-				<Button name="waimai_order_info_page_print" float="true" pos="50,60,200,98" text="打印" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-				
-				<Button name="waimai_order_info_page_confirme" float="true" pos="50,108,200,146" text="确认" textcolor="#FFFF0FFFF" />
-				<Button name="waimai_order_info_page_success" float="true" pos="50,108,200,146" text="设为成功" textcolor="#FFFF0FFFF" />
-				<Button name="waimai_order_info_page_fail" float="true" pos="50,156,200,192" text="设为失败" textcolor="#FFFFFFFF" 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="waimai_order_info_page_agree" float="true" pos="50,108,200,146" text="同意退款" textcolor="#FFFF0FFFF" />
-				<Button name="waimai_order_info_page_disagree" float="true" pos="50,156,200,192" text="拒绝退款" textcolor="#FFFFFFFF" 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="waimai_order_info_page_refund" float="true" pos="50,108,200,146" text="退款" textcolor="#FFFFFFFF" 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'" />
-			</HorizontalLayout>
-		</HorizontalLayout>
-	</WaimaiOrderInfo>
-</Window>

+ 92 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_info_page.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Window>
+	<WaimaiOrderInfoPage bkcolor="#FFEFF6EE">
+		<VerticalLayout>
+			<HorizontalLayout height="44" bkcolor="#FFFFFFFF" padding="0,0,0,0">
+				<Button name="waimai_order_info_page_return" float="true" pos="20,3,120,41" text="返回" textcolor="#FFFFFFFF"/>
+			</HorizontalLayout>
+
+			<HorizontalLayout>
+				<VerticalLayout name="waimai_order_info_page_orderlayout" padding="20,20,20,20" vscrollbar="true">
+					<VerticalLayout name="waimai_order_info_page_layout_1" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
+						<HorizontalLayout height="50">
+							<Label float="true" name="waimai_order_info_page_liushuihao" text="#1" pos="10, 10, 60, 40" />
+							<Label float="true" name="waimai_order_info_page_order_num" text="订单号:" pos="80, 10, 500, 40" />
+						</HorizontalLayout>
+
+						<Control height="1" bkcolor="#FF708090" />
+
+						<List name="waimai_order_info_page_foodlist">
+							<ListHeader />
+							<ListHeaderItem text="商品" align="left" />
+							<ListHeaderItem text="数量" width="200" align="center" />
+							<ListHeaderItem text="单价" width="200" align="center" />
+						</List>  
+
+						<Control height="10" />
+
+						<Label name="waimaorder_info_page_memo" minheight="30" multiline="true" text="备注:" />
+
+						<Control height="1" bkcolor="#FF708090" />
+
+						<VerticalLayout name="waimai_order_info_page_fees">				
+
+						</VerticalLayout>
+						
+						<Control name="waimai_order_info_page_fees_line" height="1" bkcolor="#FF708090" />
+						
+						<Label name="waimai_order_info_page_totalprice" height="40" padding="0,0,30,0" align="right" text="总计:" />
+					</VerticalLayout>
+
+					<VerticalLayout name="waimai_order_info_page_layout_2" height="150" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
+						<Label text="顾客信息" height="30" />
+						<Control height="1" bkcolor="#FF708090" />
+						<Label name="waimai_order_info_page_name" text="姓名:" height="30" />
+						<Label name="waimai_order_info_page_phone" text="电话:" height="30" />
+						<Label name="waimai_order_info_page_address" text="地址:" height="30" />
+						<Label name="waimai_order_info_page_init_date" text="下单时间:" height="30" />
+					</VerticalLayout>
+						
+					<VerticalLayout name="waimai_order_info_page_qishouinfo" height="120" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
+						<Label text="骑手信息" height="30" />
+						<Control height="1" bkcolor="#FF708090" />
+						<Label name="waimai_order_info_page_qishou_name" text="骑手姓名:" height="30" />
+						<Label name="waimai_order_info_page_qishou_phone" text="骑手电话:" height="30" />
+						<Label name="waimai_order_info_page_qishou_type" text="骑手类型:" height="30" />
+					</VerticalLayout>				
+					
+					<VerticalLayout name="waimai_order_info_page_layout_3" bkcolor="#FFFFFFFF" padding="0,0,0,20" inset="10,0,10,0">
+						<Label text="订单信息" height="30" />
+						<Control height="1" bkcolor="#FF708090" />
+						<Label name="waimai_order_info_page_shopname" height="30" text="店铺名字:" />
+						<Label name="waimai_order_info_page_status" height="30" text="订单状态:" />
+						<Label name="waimai_order_info_page_type" height="30" text="订单来源:" />
+						<Label name="waimai_order_info_page_pay_type" height="30" text="付款方式:" />
+						<VerticalLayout name="waimai_order_info_page_field">
+
+						</VerticalLayout>
+						<Label name="waimai_order_info_page_delivery_type" height="30" text="配送方式:" />
+						<Label name="waimai_order_info_page_delivery_time" height="30" text="配送时间:" />
+						<Label name="waimai_order_info_page_refund_status" height="30" text="退款状态:" />
+						<Label name="waimai_order_info_page_configmemo" height="30" text="商家备注:" />
+						
+						<Control name="waimai_order_info_page_huodaofukuan" bkimage="huodaofukuan.png" float="true" pos="200,70,312,140" />
+					</VerticalLayout>
+				</VerticalLayout>
+
+				<HorizontalLayout width="250" height="400" bkcolor="#FFFFFFFF" padding="0,20,20,0">
+					<Button name="waimai_order_info_page_print" float="true" pos="50,60,200,98" text="打印" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
+					
+					<Button name="waimai_order_info_page_confirme" float="true" pos="50,108,200,146" text="确认" textcolor="#FFFF0FFFF" />
+					<Button name="waimai_order_info_page_success" float="true" pos="50,108,200,146" text="设为成功" textcolor="#FFFF0FFFF" />
+					<Button name="waimai_order_info_page_fail" float="true" pos="50,156,200,192" text="设为失败" textcolor="#FFFFFFFF" 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="waimai_order_info_page_agree" float="true" pos="50,108,200,146" text="同意退款" textcolor="#FFFF0FFFF" />
+					<Button name="waimai_order_info_page_disagree" float="true" pos="50,156,200,192" text="拒绝退款" textcolor="#FFFFFFFF" 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="waimai_order_info_page_refund" float="true" pos="50,108,200,146" text="退款" textcolor="#FFFFFFFF" 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'" />
+				</HorizontalLayout>
+			</HorizontalLayout>
+		</VerticalLayout>
+	</WaimaiOrderInfoPage>
+</Window>

+ 0 - 42
bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_list.xml

@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Window>
-	<VerticalLayout bkcolor="#FFEFF6EE">
-		<HorizontalLayout height="44" bkcolor="#FFFFFFFF" >
-			<Control />
-			<Button name="waimai_order_list_refresh" width="70" height="36" padding="20,4,0,0" text="刷新" textcolor="#FFFFFFFF" />
-			<Button name="waimai_order_list_last" width="70" height="36" padding="20,4,0,0" text="上一页" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-			<Button name="waimai_order_list_next" width="70" height="36" padding="20,4,0,0" text="下一页" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
-			<Label name="waimai_order_list_page" width="150" height="36" padding="20,4,0,0" />
-		</HorizontalLayout>
-		
-		<HorizontalLayout>
-			<HorizontalLayout width="250" padding="20,20,20,0">
-				<VerticalLayout height="400" bkcolor="#FFFFFFFF" childpadding="15" inset="20,20,20,0">
-					<Option name="waimai_open_switch" selected="true" text="未处理" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="waimai_confirmed_switch" text="已确认" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="waimai_delivery_switch" text="配送中" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="waimai_success_switch" text="成功" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="waimai_fail_switch" text="失败"  group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="waimai_cancel_switch" text="已取消"  group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-					<Option name="waimai_refund_switch" text="退款中" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
-				</VerticalLayout>
-			</HorizontalLayout>
-									
-			<WaimaiOrderList name="orderlist" vscrollbar="true">
-			
-			</WaimaiOrderList>
-			
-			<HorizontalLayout name="main_orderlist_loading">
-				<Control></Control>
-				<VerticalLayout width="24">
-					<Control></Control>
-					<HorizontalLayout height="24">
-						<GifAnim bkimage="loading.gif" autosize="true"></GifAnim>
-					</HorizontalLayout>
-					<Control></Control>
-				</VerticalLayout>
-				<Control></Control>
-			</HorizontalLayout>
-		</HorizontalLayout>
-	</VerticalLayout>
-</Window>

+ 44 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/waimaiorder_list_page.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Window>
+	<WaimaiOrderListPage>
+		<VerticalLayout bkcolor="#FFEFF6EE">
+			<HorizontalLayout height="44" bkcolor="#FFFFFFFF" >
+				<Control />
+				<Button name="waimai_order_list_refresh" width="70" height="36" padding="20,4,0,0" text="刷新" textcolor="#FFFFFFFF" />
+				<Button name="waimai_order_list_last" width="70" height="36" padding="20,4,0,0" text="上一页" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
+				<Button name="waimai_order_list_next" width="70" height="36" padding="20,4,0,0" text="下一页" normalimage="file='Btn_White.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" pushedimage="file='Btn_White_Click.png' corner='5,5,5,5'" />
+				<Label name="waimai_order_list_page" width="150" height="36" padding="20,4,0,0" />
+			</HorizontalLayout>
+			
+			<HorizontalLayout>
+				<HorizontalLayout width="250" padding="20,20,20,0">
+					<VerticalLayout height="400" bkcolor="#FFFFFFFF" childpadding="15" inset="20,20,20,0">
+						<Option name="waimai_open_switch" text="未处理" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
+						<Option name="waimai_confirmed_switch" text="已确认" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
+						<Option name="waimai_delivery_switch" text="配送中" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
+						<Option name="waimai_success_switch" text="成功" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
+						<Option name="waimai_fail_switch" text="失败"  group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
+						<Option name="waimai_cancel_switch" text="已取消"  group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
+						<Option name="waimai_refund_switch" text="退款中" group="waimai_status_switch" align="center" height="36" normalimage="file='Btn_White.png' corner='5,5,5,5'" selectedimage="file='Btn_Red_Click.png' corner='5,5,5,5'" hotimage="file='Btn_White_Hover.png' corner='5,5,5,5'" hottextcolor="#CC1010" selectedtextcolor="#FFFFFFFF" />
+					</VerticalLayout>
+				</HorizontalLayout>
+										
+				<VerticalLayout name="orderlist" vscrollbar="true">
+				
+				</VerticalLayout>
+				
+				<HorizontalLayout name="main_orderlist_loading">
+					<Control></Control>
+					<VerticalLayout width="24">
+						<Control></Control>
+						<HorizontalLayout height="24">
+							<GifAnim bkimage="loading.gif" autosize="true"></GifAnim>
+						</HorizontalLayout>
+						<Control></Control>
+					</VerticalLayout>
+					<Control></Control>
+				</HorizontalLayout>
+			</HorizontalLayout>
+		</VerticalLayout>
+	</WaimaiOrderListPage>
+</Window>

+ 0 - 19
zhipuzi_pos_windows/control/CSettingUI.cpp

@@ -1,19 +0,0 @@
-#include "../pch/pch.h"
-#include "CSettingUI.h"
-
-
-
-CSettingUI::CSettingUI()
-{
-
-}
-
-
-CSettingUI::~CSettingUI()
-{
-}
-
-void CSettingUI::DoEvent(TEventUI& event)
-{
-	CVerticalLayoutUI::DoEvent(event);
-}

+ 0 - 13
zhipuzi_pos_windows/control/CSettingUI.h

@@ -1,13 +0,0 @@
-#pragma once
-
-#include "../pch/pch.h"
-
-class CSettingUI : public CVerticalLayoutUI
-{
-public:
-	CSettingUI();
-	~CSettingUI();
-
-	void DoEvent(TEventUI& event);
-};
-

+ 0 - 26
zhipuzi_pos_windows/control/CWaimaiOrderInfoUI.h

@@ -1,26 +0,0 @@
-#pragma once
-
-#include "../order/CWaimaiOrder.h"
-
-class CWaimaiOrderInfoUI : public CVerticalLayoutUI
-{
-public:
-	CWaimaiOrderInfoUI()
-	{
-
-	}
-
-	//刷新当前页面的内容,注意这个函数不会改变当前的订单状态以及“页数”
-	void DoEvent(TEventUI& event);
-
-	void SetDate(CWaimaiOrder& order)
-	{
-		m_order = order;
-	}
-
-	//根据外卖订单数据,刷新订单详情页的显示
-	void Refresh(CWaimaiOrder& order);
-
-public:
-	CWaimaiOrder m_order;
-};

+ 20 - 11
zhipuzi_pos_windows/control/ControlEx.h

@@ -2,10 +2,12 @@
 
 #include "../pch/pch.h"
 
+#include "../page/CDiandanPageUI.h"
+#include "../page/CWaimaiOrderListPageUI.h"
+#include "../page/CWaimaiOrderInfoPageUI.h"
+#include "../page/CSettingPageUI.h"
+
 #include "CWaimaiOrderItemUI.h"
-#include "OrderListUI.h"
-#include "CWaimaiOrderInfoUI.h"
-#include "CSettingUI.h"
 #include "CFoodlistUI.h"
 #include "CDiandanFoodItemUI.h"
 
@@ -14,22 +16,29 @@ class CDialogBuilderCallbackEx : public IDialogBuilderCallback
 public:
 	CControlUI* CreateControl(LPCTSTR pstrClass)
 	{
-		if (_tcscmp(pstrClass, _T("WaimaiOrderList")) == 0)
+		//page相关的
+		if (_tcscmp(pstrClass, _T("DiandanPage")) == 0)
 		{
-			return new OrderListUI;
+			return new CDiandanPageUI;
 		}
-		else if (_tcscmp(pstrClass, _T("WaimaiOrderItem")) == 0)
+		else if (_tcscmp(pstrClass, _T("WaimaiOrderListPage")) == 0)
 		{
-			return new CWaimaiOrderItemUI;
+			return new CWaimaiOrderListPageUI;
 		}
-		else if (_tcscmp(pstrClass, _T("WaimaiOrderInfo")) == 0)
+		else if (_tcscmp(pstrClass, _T("WaimaiOrderInfoPage")) == 0)
 		{
-			return new CWaimaiOrderInfoUI;
+			return new CWaimaiOrderInfoPageUI;
 		}
-		else if (_tcscmp(pstrClass, _T("Setting")) == 0)
+		else if (_tcscmp(pstrClass, _T("SettingPage")) == 0)
 		{
-			return new CSettingUI;
+			return new CSettingPageUI;
 		}
+
+		//控件相关的
+		else if (_tcscmp(pstrClass, _T("WaimaiOrderItem")) == 0)
+		{
+			return new CWaimaiOrderItemUI;
+		}		
 		else if (_tcscmp(pstrClass, _T("FoodList")) == 0)
 		{
 			return new CFoodlistUI;

+ 0 - 235
zhipuzi_pos_windows/control/OrderListUI.cpp

@@ -1,235 +0,0 @@
-#include "../pch/pch.h"
-#include "OrderListUI.h"
-
-#include "CWaimaiOrderItemUI.h"
-
-#include "ControlEx.h"
-
-OrderListUI::OrderListUI()
-{
-	
-}
-
-OrderListUI::~OrderListUI()
-{
-	
-}
-
-void OrderListUI::Refresh()
-{
-	//开始转菊花
-	this->SetVisible(false);
-
-	m_pManager->FindControl(_T("main_orderlist_loading"))->SetVisible(true);
-
-	//启动一个线程,进行网络请求操作
-	OrderListStatus* status =  new OrderListStatus;
-	status->m_status = m_status;
-	status->m_page = m_page;
-
-	std::thread t(&OrderListUI::HandleRefresh, this, status);
-	t.detach();
-}
-
-void OrderListUI::HandleRefresh(OrderListStatus* status)
-{
-	std::string url;
-	if (status->m_status == 1)
-	{
-		url = "/waimaiorder/getopenlist";
-	}
-	else if (status->m_status == 2)
-	{
-		url = "/waimaiorder/getconfirmedlist";
-	}
-	else if (status->m_status == 3)
-	{
-		url = "/waimaiorder/getdeliverylist";
-	}
-	else if (status->m_status == 4)
-	{
-		url = "/waimaiorder/getsucceededlist";
-	}
-	else if (status->m_status == 5)
-	{
-		url = "/waimaiorder/getfailedlist";
-	}
-	else if (status->m_status == 6)
-	{
-		url = "/waimaiorder/getcancelledlist";
-	}
-	else if (status->m_status == 7)
-	{
-		url = "/waimaiorder/getrefundlist";
-	}
-
-	//请求外卖的未处理订单,直接用当前的page值去请求
-	std::map<string, string> params;
-	params["page"] = to_string(status->m_page);
-	std::string response;
-
-	CZhipuziHttpClient::Request(url.c_str(), params, response);
-
-	//走到这里,网络请求结束了,对比状态是否发生了改变
-	if (status->m_page != m_page || status->m_status != m_status)
-	{
-		//用户已经点击了其他状态,这个状态结果无效了,直接返回
-		delete status;
-		return;
-	}
-		
-	//将网络返回结果保存起来,等待消息处理重新渲染页面
-	m_response = response;
-
-	::PostMessage(m_pManager->GetPaintWindow(), WM_ORDERLIST_REFRESH, 0, 0);
-
-	delete status;
-}
-
-void OrderListUI::DoRefresh()
-{
-	//请求成功之后,清空之前的数据
-	this->RemoveAll();
-
-	rapidjson::Document document;
-	document.Parse(m_response.c_str());
-
-	if (document.HasParseError())
-	{
-		LOG_INFO("parse response error!");
-		return;
-	}
-
-	if (!document.HasMember("errcode") || !document.HasMember("errmsg") || !document.HasMember("data"))
-	{
-		LOG_INFO("json error!");
-		return;
-	}
-
-	rapidjson::Value& v_errcode = document["errcode"];
-	int errcode = v_errcode.GetInt();
-	if (errcode != 0)
-	{
-		LOG_INFO("response failed! message:" << document["errmsg"].GetString());
-		return;
-	}
-
-	//获得数据成功
-	rapidjson::Value& data = document["data"];
-
-	rapidjson::Value& v_count = data["count"];
-	string count = v_count.GetString();
-
-	//处理页数
-	int nCount = atoi(count.c_str());
-	m_total_page = (int)ceil(nCount / 20.0);
-	if (m_total_page < 1)
-	{
-		m_total_page = 1;
-	}
-
-	if (m_page <= 1)
-	{
-		m_page = 1;
-		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_last")));
-		pControl->SetEnabled(false);
-	}
-	if (m_page >= m_total_page)
-	{
-		m_page = m_total_page;
-		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_next")));
-		pControl->SetEnabled(false);
-	}
-
-	if (m_page > 1)
-	{
-		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_last")));
-		pControl->SetEnabled(true);
-	}
-	if (m_page < m_total_page)
-	{
-		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_next")));
-		pControl->SetEnabled(true);
-	}
-
-	CLabelUI* pControl = static_cast<CLabelUI*>(m_pManager->FindControl(_T("waimai_order_list_page")));
-	wstring pageinfo = _T("第 ") + CLewaimaiString::ANSIToUnicode(to_string(m_page)) + _T("页/共 ") + CLewaimaiString::ANSIToUnicode(to_string(m_total_page)) + _T("页");
-	pControl->SetText(pageinfo.c_str());
-
-	rapidjson::Value& v_rows = data["rows"];
-
-	for (rapidjson::SizeType i = 0; i < v_rows.Size(); ++i)
-	{
-		rapidjson::Value& v_row_i = v_rows[i];
-
-		//创建一个对象
-		CDialogBuilder builder;
-		CDialogBuilderCallbackEx cb;
-
-		CWaimaiOrderItemUI* pItem = static_cast<CWaimaiOrderItemUI*>(builder.Create(_T("waimai_order_item.xml"), (UINT)0, &cb, m_pManager));
-		if (pItem != NULL)
-		{
-			//初始化该对应的数据
-			pItem->SetStatus(m_status);
-
-			pItem->SetData(v_row_i);
-
-			this->Add(pItem);
-
-			pItem = NULL;
-		}
-		else
-		{
-			LOG_INFO("create waimai_order_item fail!");
-		}
-	}
-
-	//重置滚动条的位置
-	tagSIZE size;
-	size.cx = 0;
-	size.cy = 0;
-	this->SetScrollPos(size);
-
-	this->SetVisible(true);
-
-	m_pManager->FindControl(_T("main_orderlist_loading"))->SetVisible(false);
-}
-
-void OrderListUI::LastPage()
-{
-	m_page--;
-	if (m_page < 1)
-	{
-		m_page = 1;
-	}
-
-	if (m_page == 1)
-	{
-		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_last")));
-		pControl->SetEnabled(false);
-	}
-
-	Refresh();
-}
-
-void OrderListUI::NextPage()
-{
-	m_page++;
-	if (m_page > m_total_page)
-	{
-		m_page = m_total_page;
-	}
-
-	if (m_page == m_total_page)
-	{
-		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_next")));
-		pControl->SetEnabled(false);
-	}
-
-	Refresh();
-}
-
-void OrderListUI::DoEvent(TEventUI& event)
-{
-	CVerticalLayoutUI::DoEvent(event);
-}

+ 0 - 47
zhipuzi_pos_windows/control/OrderListUI.h

@@ -1,47 +0,0 @@
-#pragma once
-
-class OrderListStatus
-{
-public:
-	int m_status;
-	int m_page;
-};
-
-class OrderListUI : public CVerticalLayoutUI
-{
-public:
-	OrderListUI();
-
-	~OrderListUI();
-
-    //刷新当前页面的内容,注意这个函数不会改变当前的订单状态以及“页数”
-    void Refresh();
-
-	void LastPage();
-
-	void NextPage();
-
-	void DoEvent(TEventUI& event);
-
-	void SetStatus(int status)
-	{
-		m_status = status;
-	}
-
-	void SetPage(int n)
-	{
-		m_page = n;
-	}
-
-	void HandleRefresh(OrderListStatus* status);
-
-	void DoRefresh();
-
-private:
-    int m_status = 1; //1:未处理 2:已确认 3:配送中 4:成功 5:失败 6:已取消 7:退款中
-	int m_page = 1;
-
-	int m_total_page; //总页数
-
-	std::string m_response;
-};

+ 36 - 0
zhipuzi_pos_windows/page/CBasePageUI.h

@@ -0,0 +1,36 @@
+#pragma once
+
+#include "../pch/pch.h"
+
+class CMainWnd;
+
+class CBasePageUI : public CContainerUI
+{
+public:
+	CBasePageUI()
+	{}
+
+	virtual ~CBasePageUI()
+	{
+	}
+
+	//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+	virtual void InitShow() = 0;
+
+	//处理按钮点击类事件
+	virtual void HandleClickMsg(TNotifyUI& msg) = 0;
+
+	//处理option切换事件
+	virtual void HandleSelectChangeMsg(TNotifyUI& msg) = 0;
+
+	//处理下拉框、radio的切换事件
+	virtual void HandleItemSelectMsg(TNotifyUI& msg) = 0;
+
+	void SetMainWnd(CMainWnd* wnd)
+	{
+		m_pMainWnd = wnd;
+	}
+
+protected:
+	CMainWnd* m_pMainWnd;
+};

+ 37 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -0,0 +1,37 @@
+#include "../pch/pch.h"
+#include "CDiandanPageUI.h"
+
+
+
+CDiandanPageUI::CDiandanPageUI()
+{
+}
+
+
+CDiandanPageUI::~CDiandanPageUI()
+{
+}
+
+//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+void CDiandanPageUI::InitShow()
+{
+
+}
+
+//处理按钮点击类事件
+void CDiandanPageUI::HandleClickMsg(TNotifyUI& msg)
+{
+
+}
+
+//处理option切换事件
+void CDiandanPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
+{
+
+}
+
+//处理下拉框、radio的切换事件
+void CDiandanPageUI::HandleItemSelectMsg(TNotifyUI& msg)
+{
+
+}

+ 24 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.h

@@ -0,0 +1,24 @@
+#pragma once
+
+#include "../pch/pch.h"
+#include "CBasePageUI.h"
+
+class CDiandanPageUI : public CBasePageUI
+{
+public:
+	CDiandanPageUI();
+	~CDiandanPageUI();
+
+	//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+	void InitShow();
+
+	//处理按钮点击类事件
+	void HandleClickMsg(TNotifyUI& msg);
+
+	//处理option切换事件
+	void HandleSelectChangeMsg(TNotifyUI& msg);
+
+	//处理下拉框、radio的切换事件
+	void HandleItemSelectMsg(TNotifyUI& msg);
+};
+

File diff suppressed because it is too large
+ 1281 - 0
zhipuzi_pos_windows/page/CSettingPageUI.cpp


+ 24 - 0
zhipuzi_pos_windows/page/CSettingPageUI.h

@@ -0,0 +1,24 @@
+#pragma once
+
+#include "../pch/pch.h"
+#include "CBasePageUI.h"
+
+class CSettingPageUI : public CBasePageUI
+{
+public:
+	CSettingPageUI();
+	~CSettingPageUI();
+
+	//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+	void InitShow();
+
+	//处理按钮点击类事件
+	void HandleClickMsg(TNotifyUI& msg);
+
+	//处理option切换事件
+	void HandleSelectChangeMsg(TNotifyUI& msg);
+
+	//处理下拉框、radio的切换事件
+	void HandleItemSelectMsg(TNotifyUI& msg);
+};
+

+ 183 - 8
zhipuzi_pos_windows/control/CWaimaiOrderInfoUI.cpp

@@ -1,14 +1,189 @@
 #include "../pch/pch.h"
-#include "CWaimaiOrderInfoUI.h"
+#include "CWaimaiOrderInfoPageUI.h"
 
-#include "ControlEx.h"
+#include "../control/ControlEx.h"
 
-void CWaimaiOrderInfoUI::DoEvent(TEventUI& event)
+#include "../wnd/CWaimaiOrderFailReasonWnd.h"
+
+#include "../network/CMessagePush.h"
+
+CWaimaiOrderInfoPageUI::CWaimaiOrderInfoPageUI()
+{
+
+}
+
+CWaimaiOrderInfoPageUI::~CWaimaiOrderInfoPageUI()
+{
+
+}
+
+//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+void CWaimaiOrderInfoPageUI::InitShow()
+{
+	//请求服务器,获取订单数据
+	CWaimaiOrder order;
+	order.InitData(m_order_id, m_order_no);
+
+	//刷新订单详情页数据
+	this->SetDate(order);
+	this->Refresh(order);
+}
+
+//处理按钮点击类事件
+void CWaimaiOrderInfoPageUI::HandleClickMsg(TNotifyUI& msg)
+{
+	CDuiString name = msg.pSender->GetName();
+
+	if (name == _T("waimai_order_info_page_return"))
+	{
+		m_pMainWnd->SwitchPage(CMainWnd::DINGDAN);
+	}
+	else if (name == _T("waimai_order_info_page_print"))
+	{
+		m_pMainWnd->getMessagePush()->AddPinter(this->m_order.m_order_id, this->m_order.m_order_no, 2);
+	}
+	else if (name == _T("waimai_order_info_page_confirme"))
+	{
+		std::string waimai_order_id = this->m_order.m_order_id;
+		std::string waimai_order_no = this->m_order.m_order_no;
+		CWaimaiOrder order;
+		bool ret = order.ConfirmeOrder(waimai_order_id);
+
+		if (ret)
+		{
+			//确认成功,这里怎么处理
+			//请求服务器,获取订单数据
+			CWaimaiOrder new_order;
+			new_order.InitData(waimai_order_id, waimai_order_no);
+			//刷新订单详情页数据
+			this->SetDate(new_order);
+			this->Refresh(new_order);
+		}
+	}
+	else if (name == _T("waimai_order_info_page_success"))
+	{
+		std::string waimai_order_id = this->m_order.m_order_id;
+		std::string waimai_order_no = this->m_order.m_order_no;
+		CWaimaiOrder order;
+		bool ret = order.SuccessOrder(waimai_order_id);
+
+		if (ret)
+		{
+			//订单设为成功,这里怎么处理
+			//请求服务器,获取订单数据
+			CWaimaiOrder new_order;
+			new_order.InitData(waimai_order_id, waimai_order_no);
+			//刷新订单详情页数据
+			this->SetDate(new_order);
+			this->Refresh(new_order);
+		}
+	}
+	else if (name == _T("waimai_order_info_page_fail"))
+	{
+		std::string waimai_order_id = this->m_order.m_order_id;
+		std::string waimai_order_no = this->m_order.m_order_no;
+
+		CWaimaiOrderFailReasonWnd* pWaimaiFailFrame = new CWaimaiOrderFailReasonWnd();
+		pWaimaiFailFrame->Create(m_pMainWnd->GetHWND(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pWaimaiFailFrame->SetIcon(IDI_ICON_DUILIB);
+		pWaimaiFailFrame->CenterWindow();
+		UINT ret = pWaimaiFailFrame->ShowModal();
+
+		if (ret == IDOK)
+		{
+			std::string sReason = pWaimaiFailFrame->getReason();
+			CWaimaiOrder order;
+			bool ret = order.FailOrder(waimai_order_id, sReason);
+
+			if (ret)
+			{
+				//订单设为失败,这里怎么处理
+				//请求服务器,获取订单数据
+				CWaimaiOrder new_order;
+				new_order.InitData(waimai_order_id, waimai_order_no);
+				//刷新订单详情页数据
+				this->SetDate(new_order);
+				this->Refresh(new_order);
+			}
+		}
+
+		delete pWaimaiFailFrame;
+	}
+	else if (name == _T("waimai_order_info_page_agree"))
+	{
+		std::string waimai_order_id = this->m_order.m_order_id;
+		std::string waimai_order_no = this->m_order.m_order_no;
+		CWaimaiOrder order;
+		bool ret = order.AgreeRefund(waimai_order_id);
+
+		if (ret)
+		{
+			//订单设为成功,这里怎么处理
+			//请求服务器,获取订单数据
+			CWaimaiOrder new_order;
+			new_order.InitData(waimai_order_id, waimai_order_no);
+			//刷新订单详情页数据
+			this->SetDate(new_order);
+			this->Refresh(new_order);
+		}
+	}
+	else if (name == _T("waimai_order_info_page_disagree"))
+	{
+		std::string waimai_order_id = this->m_order.m_order_id;
+		std::string waimai_order_no = this->m_order.m_order_no;
+		CWaimaiOrder order;
+		bool ret = order.DisagreeRefund(waimai_order_id);
+
+		if (ret)
+		{
+			//订单设为成功,这里怎么处理
+			//请求服务器,获取订单数据
+			CWaimaiOrder new_order;
+			new_order.InitData(waimai_order_id, waimai_order_no);
+			//刷新订单详情页数据
+			this->SetDate(new_order);
+			this->Refresh(new_order);
+		}
+	}
+	else if (name == _T("waimai_order_info_page_refund"))
+	{
+		std::string waimai_order_id = this->m_order.m_order_id;
+		std::string waimai_order_no = this->m_order.m_order_no;
+		CWaimaiOrder order;
+		bool ret = order.Refund(waimai_order_id);
+
+		if (ret)
+		{
+			//订单设为成功,这里怎么处理
+			//请求服务器,获取订单数据
+			CWaimaiOrder new_order;
+			new_order.InitData(waimai_order_id, waimai_order_no);
+			//刷新订单详情页数据
+			this->SetDate(new_order);
+			this->Refresh(new_order);
+		}
+	}
+}
+
+//处理option切换事件
+void CWaimaiOrderInfoPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
 {
-	CVerticalLayoutUI::DoEvent(event);
+
 }
 
-void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
+//处理下拉框、radio的切换事件
+void CWaimaiOrderInfoPageUI::HandleItemSelectMsg(TNotifyUI& msg)
+{
+
+}
+
+//刷新当前页面的内容,注意这个函数不会改变当前的订单状态以及“页数”
+void CWaimaiOrderInfoPageUI::SetDate(CWaimaiOrder& order)
+{
+	m_order = order;
+}
+
+void CWaimaiOrderInfoPageUI::Refresh(CWaimaiOrder& order)
 {
 	std::wstring liushuihao_show = L"#" + CLewaimaiString::UTF8ToUnicode(order.m_restaurant_number);
 	this->FindSubControl(_T("waimai_order_info_page_liushuihao"))->SetText(liushuihao_show.c_str());
@@ -54,7 +229,7 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
 	pFeesLayout->RemoveAll();
 
 	int fees_num = 0;
-	
+
 	if (order.m_delivery > 0)
 	{
 		CLabelUI *pDlieveryFee = new CLabelUI;
@@ -441,7 +616,7 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
 			refund_button->SetVisible(false);
 
 			pRefundStatus->SetVisible(false);
-		}		
+		}
 	}
 	else if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("已取消")) == 0)
 	{
@@ -515,7 +690,7 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
 	if (m_order.m_configmemo != "")
 	{
 		configMemoHeight = 30;
-		
+
 		wstring configMemo = L"商家备注:" + CLewaimaiString::UTF8ToUnicode(order.m_configmemo);
 		pConfigmemo->SetText(configMemo.c_str());
 		pConfigmemo->SetVisible(true);

+ 38 - 0
zhipuzi_pos_windows/page/CWaimaiOrderInfoPageUI.h

@@ -0,0 +1,38 @@
+#pragma once
+
+#include "../pch/pch.h"
+#include "CBasePageUI.h"
+
+#include "../order/CWaimaiOrder.h"
+
+class CWaimaiOrderInfoPageUI : public CBasePageUI
+{
+public:
+	CWaimaiOrderInfoPageUI();
+
+	~CWaimaiOrderInfoPageUI();
+
+	//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+	void InitShow();
+
+	//处理按钮点击类事件
+	void HandleClickMsg(TNotifyUI& msg);
+
+	//处理option切换事件
+	void HandleSelectChangeMsg(TNotifyUI& msg);
+
+	//处理下拉框、radio的切换事件
+	void HandleItemSelectMsg(TNotifyUI& msg);
+
+	//刷新当前页面的内容,注意这个函数不会改变当前的订单状态以及“页数”
+	void SetDate(CWaimaiOrder& order);
+
+	//根据外卖订单数据,刷新订单详情页的显示
+	void Refresh(CWaimaiOrder& order);
+
+public:
+	CWaimaiOrder m_order;
+
+	std::string m_order_id;
+	std::string m_order_no;
+};

+ 433 - 0
zhipuzi_pos_windows/page/CWaimaiOrderListPageUI.cpp

@@ -0,0 +1,433 @@
+#include "../pch/pch.h"
+#include "CWaimaiOrderListPageUI.h"
+
+#include "../control/CWaimaiOrderItemUI.h"
+
+#include "../control/ControlEx.h"
+
+#include "../network/CMessagePush.h"
+#include "../wnd/CWaimaiOrderFailReasonWnd.h"
+
+
+CWaimaiOrderListPageUI::CWaimaiOrderListPageUI()
+{
+
+}
+
+
+CWaimaiOrderListPageUI::~CWaimaiOrderListPageUI()
+{
+}
+
+//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+void CWaimaiOrderListPageUI::InitShow()
+{
+	m_pOrderListLayout = static_cast<CContainerUI*>(this->FindSubControl(_T("orderlist")));
+
+	//默认显示未处理的
+	COptionUI* option = static_cast<COptionUI*>(this->FindSubControl(_T("waimai_open_switch")));
+	option->Selected(true, false);
+
+	SetStatus(1);
+	SetPage(1);
+	Refresh();
+}
+
+//处理按钮点击类事件
+void CWaimaiOrderListPageUI::HandleClickMsg(TNotifyUI& msg)
+{
+	CDuiString name = msg.pSender->GetName();
+
+	if (name == _T("waimai_order_list_print"))
+	{
+		CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string waimai_order_id = item->getOrderID();
+		std::string waimai_order_no = item->getOrderNo();
+		m_pMainWnd->getMessagePush()->AddPinter(waimai_order_id, waimai_order_no, 2);
+	}
+	else if (name == _T("waimai_order_list_confirme"))
+	{
+		CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string waimai_order_id = item->getOrderID();
+		CWaimaiOrder order;
+		bool ret = order.ConfirmeOrder(waimai_order_id);
+
+		if (ret)
+		{
+			//如果确认成功,将被确认的订单删除掉
+			CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
+			int index = orderlist->GetItemIndex(item);
+			orderlist->RemoveAt(index);
+		}
+	}
+	else if (name == _T("waimai_order_list_success"))
+	{
+		CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string waimai_order_id = item->getOrderID();
+		CWaimaiOrder order;
+		bool ret = order.SuccessOrder(waimai_order_id);
+
+		if (ret)
+		{
+			//如果确认成功,将被确认的订单删除掉
+			CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
+			int index = orderlist->GetItemIndex(item);
+			orderlist->RemoveAt(index);
+		}
+	}
+	else if (name == _T("waimai_order_list_fail"))
+	{
+		//外卖订单的打印
+		CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string waimai_order_id = item->getOrderID();
+
+		CWaimaiOrderFailReasonWnd* pWaimaiFailFrame = new CWaimaiOrderFailReasonWnd();
+		pWaimaiFailFrame->Create(m_pMainWnd->GetHWND(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pWaimaiFailFrame->SetIcon(IDI_ICON_DUILIB);
+		pWaimaiFailFrame->CenterWindow();
+		UINT ret = pWaimaiFailFrame->ShowModal();
+
+		if (ret == IDOK)
+		{
+			std::string sReason = pWaimaiFailFrame->getReason();
+			CWaimaiOrder order;
+			bool ret = order.FailOrder(waimai_order_id, sReason);
+
+			if (ret)
+			{
+				//如果设为失败成功,将被设为失败的订单删除掉
+				CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
+				int index = orderlist->GetItemIndex(item);
+				orderlist->RemoveAt(index);
+			}
+		}
+
+		delete pWaimaiFailFrame;
+	}
+	else if (name == _T("waimai_order_list_agree"))
+	{
+		CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string waimai_order_id = item->getOrderID();
+		CWaimaiOrder order;
+		bool ret = order.AgreeRefund(waimai_order_id);
+
+		if (ret)
+		{
+			//同意退款之后,订单变为失败状态
+			CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
+			int index = orderlist->GetItemIndex(item);
+			orderlist->RemoveAt(index);
+		}
+	}
+	else if (name == _T("waimai_order_list_disagree"))
+	{
+		CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string waimai_order_id = item->getOrderID();
+		CWaimaiOrder order;
+		bool ret = order.DisagreeRefund(waimai_order_id);
+
+		if (ret)
+		{
+			//不同意退款,订单还是退款中,等待第三方客服处理
+			//CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
+			//int index = orderlist->GetItemIndex(item);
+			//orderlist->RemoveAt(index);
+		}
+	}
+	else if (name == _T("waimai_order_list_info"))
+	{
+		CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
+		std::string waimai_order_id = item->getOrderID();
+		std::string waimai_order_no = item->getOrderNo();
+
+		m_pMainWnd->SetInfopageWaimaiorderParam(waimai_order_id, waimai_order_no);
+
+		m_pMainWnd->SwitchPage(CMainWnd::WAIMAIINFO);
+	}
+	else if (name == _T("waimai_order_list_last"))
+	{
+		this->LastPage();
+	}
+	else if (name == _T("waimai_order_list_next"))
+	{
+		this->NextPage();
+	}
+	else if (name == _T("waimai_order_list_refresh"))
+	{
+		this->Refresh();
+	}
+}
+
+//处理option切换事件
+void CWaimaiOrderListPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
+{
+	CDuiString name = msg.pSender->GetName();
+
+	//判断外卖的tab
+	if (name == _T("waimai_open_switch") || name == _T("waimai_confirmed_switch") || name == _T("waimai_delivery_switch") || name == _T("waimai_success_switch") || name == _T("waimai_fail_switch") || name == _T("waimai_cancel_switch") || name == _T("waimai_refund_switch"))
+	{
+		//切换状态全部重新开始从第1页
+		this->SetPage(1);
+
+		if (name == _T("waimai_open_switch"))
+		{
+			this->SetStatus(1);
+		}
+		else if (name == _T("waimai_confirmed_switch"))
+		{
+			this->SetStatus(2);
+		}
+		else if (name == _T("waimai_delivery_switch"))
+		{
+			this->SetStatus(3);
+		}
+		else if (name == _T("waimai_success_switch"))
+		{
+			this->SetStatus(4);
+		}
+		else if (name == _T("waimai_fail_switch"))
+		{
+			this->SetStatus(5);
+		}
+		else if (name == _T("waimai_cancel_switch"))
+		{
+			this->SetStatus(6);
+		}
+		else if (name == _T("waimai_refund_switch"))
+		{
+			this->SetStatus(7);
+		}
+
+		this->Refresh();
+	}
+}
+
+//处理下拉框、radio的切换事件
+void CWaimaiOrderListPageUI::HandleItemSelectMsg(TNotifyUI& msg)
+{
+
+}
+
+void CWaimaiOrderListPageUI::Refresh()
+{
+	//开始转菊花
+	m_pOrderListLayout->SetVisible(false);
+
+	this->FindSubControl(_T("main_orderlist_loading"))->SetVisible(true);
+
+	//启动一个线程,进行网络请求操作
+	OrderListStatus* status = new OrderListStatus;
+	status->m_status = m_status;
+	status->m_page = m_page;
+
+	std::thread t(&CWaimaiOrderListPageUI::HandleRefresh, this, status);
+	t.detach();
+}
+
+void CWaimaiOrderListPageUI::HandleRefresh(OrderListStatus* status)
+{
+	std::string url;
+	if (status->m_status == 1)
+	{
+		url = "/waimaiorder/getopenlist";
+	}
+	else if (status->m_status == 2)
+	{
+		url = "/waimaiorder/getconfirmedlist";
+	}
+	else if (status->m_status == 3)
+	{
+		url = "/waimaiorder/getdeliverylist";
+	}
+	else if (status->m_status == 4)
+	{
+		url = "/waimaiorder/getsucceededlist";
+	}
+	else if (status->m_status == 5)
+	{
+		url = "/waimaiorder/getfailedlist";
+	}
+	else if (status->m_status == 6)
+	{
+		url = "/waimaiorder/getcancelledlist";
+	}
+	else if (status->m_status == 7)
+	{
+		url = "/waimaiorder/getrefundlist";
+	}
+
+	//请求外卖的未处理订单,直接用当前的page值去请求
+	std::map<string, string> params;
+	params["page"] = to_string(status->m_page);
+	std::string response;
+
+	CZhipuziHttpClient::Request(url.c_str(), params, response);
+
+	//走到这里,网络请求结束了,对比状态是否发生了改变
+	if (status->m_page != m_page || status->m_status != m_status)
+	{
+		//用户已经点击了其他状态,这个状态结果无效了,直接返回
+		delete status;
+		return;
+	}
+
+	//将网络返回结果保存起来,等待消息处理重新渲染页面
+	m_response = response;
+
+	::PostMessage(m_pManager->GetPaintWindow(), WM_ORDERLIST_REFRESH, 0, 0);
+
+	delete status;
+}
+
+void CWaimaiOrderListPageUI::DoRefresh()
+{
+	//请求成功之后,清空之前的数据
+	m_pOrderListLayout->RemoveAll();
+
+	rapidjson::Document document;
+	document.Parse(m_response.c_str());
+
+	if (document.HasParseError())
+	{
+		LOG_INFO("parse response error!");
+		return;
+	}
+
+	if (!document.HasMember("errcode") || !document.HasMember("errmsg") || !document.HasMember("data"))
+	{
+		LOG_INFO("json error!");
+		return;
+	}
+
+	rapidjson::Value& v_errcode = document["errcode"];
+	int errcode = v_errcode.GetInt();
+	if (errcode != 0)
+	{
+		LOG_INFO("response failed! message:" << document["errmsg"].GetString());
+		return;
+	}
+
+	//获得数据成功
+	rapidjson::Value& data = document["data"];
+
+	rapidjson::Value& v_count = data["count"];
+	string count = v_count.GetString();
+
+	//处理页数
+	int nCount = atoi(count.c_str());
+	m_total_page = (int)ceil(nCount / 20.0);
+	if (m_total_page < 1)
+	{
+		m_total_page = 1;
+	}
+
+	if (m_page <= 1)
+	{
+		m_page = 1;
+		CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_last")));
+		pControl->SetEnabled(false);
+	}
+	if (m_page >= m_total_page)
+	{
+		m_page = m_total_page;
+		CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_next")));
+		pControl->SetEnabled(false);
+	}
+
+	if (m_page > 1)
+	{
+		CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_last")));
+		pControl->SetEnabled(true);
+	}
+	if (m_page < m_total_page)
+	{
+		CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_next")));
+		pControl->SetEnabled(true);
+	}
+
+	CLabelUI* pControl = static_cast<CLabelUI*>(this->FindSubControl(_T("waimai_order_list_page")));
+	wstring pageinfo = _T("第 ") + CLewaimaiString::ANSIToUnicode(to_string(m_page)) + _T("页/共 ") + CLewaimaiString::ANSIToUnicode(to_string(m_total_page)) + _T("页");
+	pControl->SetText(pageinfo.c_str());
+
+	rapidjson::Value& v_rows = data["rows"];
+
+	for (rapidjson::SizeType i = 0; i < v_rows.Size(); ++i)
+	{
+		rapidjson::Value& v_row_i = v_rows[i];
+
+		//创建一个对象
+		CDialogBuilder builder;
+		CDialogBuilderCallbackEx cb;
+
+		CWaimaiOrderItemUI* pItem = static_cast<CWaimaiOrderItemUI*>(builder.Create(_T("waimai_order_item.xml"), (UINT)0, &cb, m_pManager));
+		if (pItem != NULL)
+		{
+			//初始化该对应的数据
+			pItem->SetStatus(m_status);
+
+			pItem->SetData(v_row_i);
+
+			m_pOrderListLayout->Add(pItem);
+
+			pItem = NULL;
+		}
+		else
+		{
+			LOG_INFO("create waimai_order_item fail!");
+		}
+	}
+
+	//重置滚动条的位置
+	tagSIZE size;
+	size.cx = 0;
+	size.cy = 0;
+	m_pOrderListLayout->SetScrollPos(size);
+
+	m_pOrderListLayout->SetVisible(true);
+
+	this->FindSubControl(_T("main_orderlist_loading"))->SetVisible(false);
+}
+
+void CWaimaiOrderListPageUI::LastPage()
+{
+	m_page--;
+	if (m_page < 1)
+	{
+		m_page = 1;
+	}
+
+	if (m_page == 1)
+	{
+		CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_last")));
+		pControl->SetEnabled(false);
+	}
+
+	Refresh();
+}
+
+void CWaimaiOrderListPageUI::NextPage()
+{
+	m_page++;
+	if (m_page > m_total_page)
+	{
+		m_page = m_total_page;
+	}
+
+	if (m_page == m_total_page)
+	{
+		CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_next")));
+		pControl->SetEnabled(false);
+	}
+
+	Refresh();
+}
+
+void CWaimaiOrderListPageUI::SetStatus(int status)
+{
+	m_status = status;
+}
+
+void CWaimaiOrderListPageUI::SetPage(int n)
+{
+	m_page = n;
+}

+ 57 - 0
zhipuzi_pos_windows/page/CWaimaiOrderListPageUI.h

@@ -0,0 +1,57 @@
+#pragma once
+
+#include "../pch/pch.h"
+
+#include "CBasePageUI.h"
+
+class OrderListStatus
+{
+public:
+	int m_status;
+	int m_page;
+};
+
+class CWaimaiOrderListPageUI : public CBasePageUI
+{
+public:
+	CWaimaiOrderListPageUI();
+	~CWaimaiOrderListPageUI();
+
+	//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
+	void InitShow();
+
+	//处理按钮点击类事件
+	void HandleClickMsg(TNotifyUI& msg);
+
+	//处理option切换事件
+	void HandleSelectChangeMsg(TNotifyUI& msg);
+
+	//处理下拉框、radio的切换事件
+	void HandleItemSelectMsg(TNotifyUI& msg);
+
+	//刷新当前页面的内容,注意这个函数不会改变当前的订单状态以及“页数”
+	void Refresh();
+
+	void LastPage();
+
+	void NextPage();
+
+	void SetStatus(int status);
+
+	void SetPage(int n);
+
+	void HandleRefresh(OrderListStatus* status);
+
+	void DoRefresh();
+
+private:
+	int m_status = 1; //1:未处理 2:已确认 3:配送中 4:成功 5:失败 6:已取消 7:退款中
+	int m_page = 1;
+
+	int m_total_page; //总页数
+
+	std::string m_response;
+
+	CContainerUI* m_pOrderListLayout;
+};
+

File diff suppressed because it is too large
+ 350 - 1867
zhipuzi_pos_windows/wnd/CMainWnd.cpp


+ 17 - 6
zhipuzi_pos_windows/wnd/CMainWnd.h

@@ -6,6 +6,8 @@
 #include "../order/CWaimaiOrder.h"
 #include "../tool/CPosPrinter.h"
 
+#include "../page/CBasePageUI.h"
+
 class CMessagePush;
 
 class CMainWnd : public CWindowWnd, public INotifyUI, public IMessageFilterUI
@@ -52,8 +54,6 @@ public:
     void HandleSelectChangeMsg(TNotifyUI& msg);
     void HandleItemSelectMsg(TNotifyUI& msg);
 
-    void InitSettingStatus();
-
     LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
 
     LRESULT OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
@@ -76,11 +76,10 @@ public:
 
     LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
 
-	LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
+	//这个是用来处理一些自定义的消息
+	bool HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
 
-	LRESULT OnOrderlistRefresh(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
-
-	LRESULT OnLoginOut(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+	LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
 
     //添加托盘图标(初始化)
     void AddTrayIcon();
@@ -90,6 +89,10 @@ public:
 
 	void LoginOut(int mode);
 
+	CMessagePush* getMessagePush();
+
+	void SetInfopageWaimaiorderParam(std::string order_id, std::string order_no);
+
 public:
     CPaintManagerUI m_pm;
 
@@ -104,5 +107,13 @@ private:
 
     CMessagePush* m_push = NULL;
 
+	//当前页面类型
 	MainPageName m_curPageName = NOPAGE;
+
+	//当前页面指针
+	CBasePageUI* m_curPageUI = NULL;
+
+	//这2个保存在这里,用于进去订单详情之前设置,进入订单详情之后获取订单信息
+	std::string m_infopage_waimaiorder_id;
+	std::string m_infopage_waimaiorder_no;
 };

+ 9 - 6
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj

@@ -225,6 +225,9 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     </PostBuildEvent>
   </ItemDefinitionGroup>
   <ItemGroup>
+    <ClInclude Include="page\CBasePageUI.h" />
+    <ClInclude Include="page\CWaimaiOrderListPageUI.h" />
+    <ClInclude Include="page\CDiandanPageUI.h" />
     <ClInclude Include="helper\CLewaimaiJson.h" />
     <ClInclude Include="control\CDiandanFoodItemUI.h" />
     <ClInclude Include="control\CFoodlistUI.h" />
@@ -237,8 +240,8 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClInclude Include="wnd\CWaimaiOrderFailReasonWnd.h" />
     <ClInclude Include="network\PosMessage.h" />
     <ClInclude Include="wnd\CChufangSettingWnd.h" />
-    <ClInclude Include="control\CWaimaiOrderInfoUI.h" />
-    <ClInclude Include="control\CSettingUI.h" />
+    <ClInclude Include="page\CWaimaiOrderInfoPageUI.h" />
+    <ClInclude Include="page\CSettingPageUI.h" />
     <ClInclude Include="tool\CSetting.h" />
     <ClInclude Include="tool\CSqlite3.h" />
     <ClInclude Include="network\CMessagePush.h" />
@@ -259,9 +262,10 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClInclude Include="pch\pch.h" />
     <ClInclude Include="tool\CLewaimaiTime.h" />
     <ClInclude Include="helper\CSystem.h" />
-    <ClInclude Include="control\OrderListUI.h" />
   </ItemGroup>
   <ItemGroup>
+    <ClCompile Include="page\CWaimaiOrderListPageUI.cpp" />
+    <ClCompile Include="page\CDiandanPageUI.cpp" />
     <ClCompile Include="helper\CLewaimaiJson.cpp" />
     <ClCompile Include="control\CDiandanFoodItemUI.cpp" />
     <ClCompile Include="control\CFoodlistUI.cpp" />
@@ -272,8 +276,8 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClCompile Include="wnd\CUpdateWnd.cpp" />
     <ClCompile Include="wnd\CWaimaiOrderFailReasonWnd.cpp" />
     <ClCompile Include="wnd\CChufangSettingWnd.cpp" />
-    <ClCompile Include="control\CWaimaiOrderInfoUI.cpp" />
-    <ClCompile Include="control\CSettingUI.cpp" />
+    <ClCompile Include="page\CWaimaiOrderInfoPageUI.cpp" />
+    <ClCompile Include="page\CSettingPageUI.cpp" />
     <ClCompile Include="tool\CSetting.cpp" />
     <ClCompile Include="tool\CSqlite3.cpp" />
     <ClCompile Include="network\CMessagePush.cpp" />
@@ -292,7 +296,6 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
     <ClCompile Include="zhipuzi_pos_windows.cpp" />
     <ClCompile Include="pch\pch.cpp" />
     <ClCompile Include="tool\CLewaimaiTime.cpp" />
-    <ClCompile Include="control\OrderListUI.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="resource\zhipuzi_pos_windows.rc" />

+ 27 - 18
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj.filters

@@ -57,18 +57,9 @@
     <ClInclude Include="control\ControlEx.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="control\CWaimaiOrderInfoUI.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
     <ClInclude Include="control\CWaimaiOrderItemUI.h">
       <Filter>头文件</Filter>
     </ClInclude>
-    <ClInclude Include="control\OrderListUI.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
-    <ClInclude Include="control\CSettingUI.h">
-      <Filter>头文件</Filter>
-    </ClInclude>
     <ClInclude Include="tool\CSqlite3.h">
       <Filter>头文件</Filter>
     </ClInclude>
@@ -120,6 +111,21 @@
     <ClInclude Include="helper\CLewaimaiJson.h">
       <Filter>头文件</Filter>
     </ClInclude>
+    <ClInclude Include="page\CDiandanPageUI.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="page\CWaimaiOrderInfoPageUI.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="page\CWaimaiOrderListPageUI.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="page\CSettingPageUI.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
+    <ClInclude Include="page\CBasePageUI.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="pch\pch.cpp">
@@ -158,18 +164,9 @@
     <ClCompile Include="wnd\CMainWnd.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="control\CWaimaiOrderInfoUI.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
-    <ClCompile Include="control\OrderListUI.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
     <ClCompile Include="control\CWaimaiOrderItemUI.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
-    <ClCompile Include="control\CSettingUI.cpp">
-      <Filter>源文件</Filter>
-    </ClCompile>
     <ClCompile Include="tool\CSqlite3.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
@@ -215,6 +212,18 @@
     <ClCompile Include="helper\CLewaimaiJson.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
+    <ClCompile Include="page\CDiandanPageUI.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="page\CWaimaiOrderInfoPageUI.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="page\CWaimaiOrderListPageUI.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
+    <ClCompile Include="page\CSettingPageUI.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <Image Include="resource\zhipuzi.ico">

+ 2 - 0
zhipuzi_pos_windows_server/obj/x86/Release/zhipuzi_pos_windows_server_linux.log

@@ -0,0 +1,2 @@
+  Cleaning remote project directory
+D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Application Type\Linux\1.0\Linux.targets(210,6): error : Could not connect to the remote system. Please verify your connection settings, and that your machine is on the network and reachable.