Parcourir la source

完成部分优化,保存一下

张洋 il y a 4 ans
Parent
commit
7efada459d
38 fichiers modifiés avec 551 ajouts et 19 suppressions
  1. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/app_qrcode.png
  2. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/contact_me_qr.png
  3. 1 1
      bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_page.xml
  4. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/download_dianji.png
  5. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/download_n.png
  6. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/download_xuanfu.png
  7. 1 1
      bin/Win32/Debug/zhipuzi_pos_windows/skin/foodtype_option.xml
  8. 20 2
      bin/Win32/Debug/zhipuzi_pos_windows/skin/huiyuan_page.xml
  9. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_close_dianji.png
  10. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_close_n.png
  11. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_close_xuanfu.png
  12. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_fangda_dianji.png
  13. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_fangda_n.png
  14. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_fangda_xuanfu.png
  15. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_kefu.png
  16. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_shou_dianji.png
  17. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_shou_n.png
  18. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_shou_xuanfu.png
  19. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_suoxiao_dianji.png
  20. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_suoxiao_n.png
  21. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/icon_suoxiao_xuanfu.png
  22. 23 0
      bin/Win32/Debug/zhipuzi_pos_windows/skin/image_attention_dlg.xml
  23. 1 1
      bin/Win32/Debug/zhipuzi_pos_windows/skin/jiaoban_page.xml
  24. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/kefu_dianji.png
  25. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/kefu_n.png
  26. BIN
      bin/Win32/Debug/zhipuzi_pos_windows/skin/kefu_xuanfu.png
  27. 8 5
      bin/Win32/Debug/zhipuzi_pos_windows/skin/main.xml
  28. 50 0
      zhipuzi_pos_windows/page/CDiandanPageUI.cpp
  29. 2 0
      zhipuzi_pos_windows/page/CDiandanPageUI.h
  30. 124 4
      zhipuzi_pos_windows/page/CHuiyuanPageUI.cpp
  31. 11 2
      zhipuzi_pos_windows/page/CJiaobanPageUI.cpp
  32. 168 0
      zhipuzi_pos_windows/wnd/CImageAttentionWnd.cpp
  33. 78 0
      zhipuzi_pos_windows/wnd/CImageAttentionWnd.h
  34. 49 2
      zhipuzi_pos_windows/wnd/CMainWnd.cpp
  35. 6 0
      zhipuzi_pos_windows/wnd/CMainWnd.h
  36. 1 1
      zhipuzi_pos_windows/worker/CMessagePushWorker.cpp
  37. 2 0
      zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj
  38. 6 0
      zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj.filters

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


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


+ 1 - 1
bin/Win32/Debug/zhipuzi_pos_windows/skin/diandan_page.xml

@@ -51,7 +51,7 @@
 						<Button name="btn_diandan_cundan" width="90" height="46" padding="15,50,15,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="btn_diandan_qudan" width="90" height="46" padding="15,15,15,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="diandan_page_qudan_num" text="10" mouse="false" width="19" height="19" align="center" textcolor="#FFFFFFFF" bkimage="num_bkg.png" float="true" pos="85,450,104,469" bordercolor="#FFFF0000" bordersize="0"></Label>
+						<Label name="diandan_page_qudan_num" text="10" mouse="false" width="19" height="19" align="center" textcolor="#FFFFFFFF" bkimage="num_bkg.png" float="true" pos="85,490,104,509" bordercolor="#FFFF0000" bordersize="0"></Label>
 						
 						<Button name="btn_diandan_zhengdanbeizhu" width="90" height="46" padding="15,15,15,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'" />
 						

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


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


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


+ 1 - 1
bin/Win32/Debug/zhipuzi_pos_windows/skin/foodtype_option.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window>
-	<FoodtypeOption endellipsis="true" align="center" valign="center" width="120" height="42" padding="15,19,0,0" bkcolor="#FFECECEC" selectedtextcolor="#FFFFFFFF">
+	<FoodtypeOption endellipsis="true" align="center" valign="center" width="120" height="42" float="true" padding="15,19,0,0" bkcolor="#FFECECEC" selectedtextcolor="#FFFFFFFF">
 	</FoodtypeOption>
 </Window>

+ 20 - 2
bin/Win32/Debug/zhipuzi_pos_windows/skin/huiyuan_page.xml

@@ -12,16 +12,34 @@
 			<Control width="1" bkcolor="#FFD1D1D1"></Control>
 			
 			<VerticalLayout width="486" bkcolor="#FFFFFFFF">
-				<Label text="请输入会员手机号" heiht="30" padding="43,50,10,10"></Label>
+				<Label text="请输入会员手机号" heiht="30" padding="43,30,10,10"></Label>
 					
 				<Edit name="huiyuan_page_shoujihao_edit" tooltip="请输入会员手机号搜索" width="400" height="50" padding="43,10,0,10" borderround="10,10" bkcolor="#FFF2F2F2" nativebkcolor="#FFF2F2F2" />
 				
 				<Button name="huiiyuan_page_sousuo_btn" width="155" height="50" padding="166,30,0,0" text="搜索" textcolor="#FFFFFFFF" normalimage="file='green_zhengchang.png' corner='5,5,5,5'" hotimage="file='green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='green_dianji.png' corner='5,5,5,5'" />
 				
-				<Label name="errorinfo" text="" width="400" height="30" padding="43,50,10,10" textcolor="#FFFF0000" visible="false"></Label>
+				<HorizontalLayout width="340" height="416" bkcolor="#FFF3F3F3" padding="73,20,73,10">
+					<Button name="jianpan_1" text="1" font="0" heiht="60" width="60" float="true" pos="10,10,110,100" 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,10,220,100" 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,10,330,100" 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,110,110,200" 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,110,220,200" 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,110,330,200" 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,210,110,300" 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,210,220,300" 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,210,330,300" 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,310,110,400" 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,310,220,400" 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,310,330,400" 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>
 				
 				<Control></Control>
 				
+				<Label name="errorinfo" text="" width="400" height="30" padding="43,50,10,10" textcolor="#FFFF0000" visible="false" align="center"></Label>
+				
 				<HorizontalLayout height="60" width="400" padding="43,0,0,80">
 					<Button name="huiyuan_page_add_btn" width="400" height="60" text="添加会员" textcolor="#FFFFFFFF" normalimage="file='green_zhengchang.png' corner='5,5,5,5'" hotimage="file='green_xuanfu.png' corner='5,5,5,5'" pushedimage="file='green_dianji.png' corner='5,5,5,5'" />
 				</HorizontalLayout>

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


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


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


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


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


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


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


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


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


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


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


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


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


+ 23 - 0
bin/Win32/Debug/zhipuzi_pos_windows/skin/image_attention_dlg.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Window size="700,550" 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>
+		
+		<VerticalLayout>
+			<HorizontalLayout padding="0,20,0,0">
+				<Control></Control>
+				<Control name="image"></Control>
+				<Control></Control>
+			</HorizontalLayout>
+			<Label name="text" text="" height="30" padding="30,50,0,30" align="center"/>
+		</VerticalLayout>
+	
+	</VerticalLayout>
+</Window>

+ 1 - 1
bin/Win32/Debug/zhipuzi_pos_windows/skin/jiaoban_page.xml

@@ -9,7 +9,7 @@
 			<HorizontalLayout height="180" padding="20,20,20,0" bkcolor="#FFFFFFFF">
 				<VerticalLayout width="474">
 					<Label text="开班时间" font="2" padding="30,30,0,0"></Label>
-					<Combo name="jiaoban_page_init_time_select" padding="30,20,0,0" width="200" height="32" tooltip="请点击这里选择您的标签纸出纸方向" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
+					<Combo name="jiaoban_page_init_time_select" vscrollbar="false" dropboxsize="0,300" padding="30,20,0,0" width="200" height="32" tooltip="请点击这里选择您的标签纸出纸方向" normalimage="file='Setting_Combox_Normal.png' corner='2,2,24,2'" hotimage="file='Setting_Combox_Hover.png' corner='2,2,24,2'" pushedimage="Setting_Combox_Click.png' corner='2,2,24,2'" textpadding="10,1,1,1" >
 						
 					</Combo>
 					<Label text="默认为最近一次本账号登录收银系统的时间" padding="30,15,0,0"></Label>

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


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


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


+ 8 - 5
bin/Win32/Debug/zhipuzi_pos_windows/skin/main.xml

@@ -16,11 +16,14 @@
 			<Control width="1" padding="20,27,15,20" bkcolor="#FFFFFFFF"></Control>
 			<Label name="main_shopname" text="" width="600" padding="15,0,0,0" textcolor="#FFFFFFFF" font="28"/>
 			<Control></Control>
-			<HorizontalLayout width="94" >
-				<Button name="minbtn" maxwidth="26" maxheight="18" normalimage="file='frame_btn_min.bmp' source='0,0,26,18' mask='#FFFF00FF'" hotimage="file='frame_btn_min.bmp' source='26,0,52,18' mask='#FFFF00FF'" pushedimage="file='frame_btn_min.bmp' source='52,0,78,18' mask='#FFFF00FF'"/>
-				<Button name="maxbtn" visible="false" maxwidth="26" maxheight="18" normalimage="file='frame_btn_max.bmp' source='0,0,26,18' mask='#FFFF00FF'" hotimage="file='frame_btn_max.bmp' source='26,0,52,18' mask='#FFFF00FF'" pushedimage="file='frame_btn_max.bmp' source='52,0,78,18' mask='#FFFF00FF'"/>
-				<Button name="restorebtn" maxwidth="26" maxheight="18" normalimage="file='frame_btn_max.bmp' source='104,0,130,18' mask='#FFFF00FF'" hotimage="file='frame_btn_max.bmp' source='130,0,156,18' mask='#FFFF00FF'" pushedimage="file='frame_btn_max.bmp' source='156,0,182,18' mask='#FFFF00FF'" />
-				<Button name="closebtn" maxwidth="42" maxheight="18" normalimage="file='frame_btn_close_normal.bmp' mask='#FFFF00FF'" hotimage="file='frame_btn_close_hot.bmp' mask='#FFFF00FF'" pushedimage="file='frame_btn_close_down.bmp' mask='#FFFF00FF'"/>
+			<HorizontalLayout width="300" height="36" padding="0,21,20,0">
+				<Control></Control>
+				<Button name="main_appbtn" width="36" height="36" padding="0,0,20,0" normalimage="file='download_n.png'" hotimage="file='download_xuanfu.png'" pushedimage="file='download_dianji.png'"/>
+				<Button name="main_kefubtn" width="36" height="36" padding="0,0,20,0" normalimage="file='kefu_n.png'" hotimage="file='kefu_xuanfu.png'" pushedimage="file='kefu_dianji.png'"/>
+				<Button name="minbtn" width="36" height="36" normalimage="file='icon_shou_n.png'" hotimage="file='icon_shou_xuanfu.png'" pushedimage="file='icon_shou_dianji.png'"/>
+				<Button name="maxbtn" visible="false" width="36" height="36" normalimage="file='icon_fangda_n.png'" hotimage="file='icon_fangda_xuanfu.png'" pushedimage="file='icon_fangda_dianji.png'"/>
+				<Button name="restorebtn" width="36" height="36" normalimage="file='icon_suoxiao_n.png'" hotimage="file='icon_suoxiao_xuanfu.png'" pushedimage="file='icon_suoxiao_dianji.png'"/>
+				<Button name="closebtn" width="36" height="36" normalimage="file='icon_close_n.png'" hotimage="file='icon_close_xuanfu.png'" pushedimage="file='icon_close_dianji.png'"/>
 			</HorizontalLayout>
 		</HorizontalLayout>
 		

+ 50 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -162,6 +162,53 @@ void CDiandanPageUI::InitFoodtypeShow()
 
 		curTypeUI->Selected(true, false);
 	}
+
+	UpdateFoodtypePos();
+}
+
+void CDiandanPageUI::UpdateFoodtypePos()
+{
+	int nFoodtypeNum = m_types.size();
+	if (m_nFoodpackageNum > 0)
+	{
+		nFoodtypeNum++;
+	}
+
+	//添加支付方式
+	int nWidth = m_nPageWidth;
+	if (nWidth == 0)
+	{
+		return;
+	}
+
+	//根据宽度计算每行显示的数量
+	int nMeihangNum = (nWidth - 521) / 135;
+
+	int num = 0;
+
+	CHorizontalLayoutUI* pFenleiLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_fenlei_layout")));
+	for (int i = 0; i < nFoodtypeNum; i++)
+	{
+		CButtonUI* curItem = static_cast<CButtonUI*>(pFenleiLayout->GetItemAt(i));
+
+		int curRow = num / nMeihangNum + 1;
+		int curCol = num % nMeihangNum + 1;
+
+		RECT rect;
+		rect.left = (curCol - 1) * 135 + 15;
+		rect.right = rect.left + 120;
+		rect.top = (curRow - 1) * 61 + 19;
+		rect.bottom = rect.top + 42;
+
+		curItem->SetFloat(true);
+		curItem->SetPos(rect);
+
+		num++;
+	}
+
+	//调整区域高度
+	int lastRow = (num - 1) / nMeihangNum + 1;
+	pFenleiLayout->SetFixedHeight(lastRow * 61 + 19);
 }
 
 void CDiandanPageUI::InitFoodShow()
@@ -3536,5 +3583,8 @@ void CDiandanPageUI::SetPos(RECT rc, bool bNeedInvalidate)
 	//拖动窗口的时候,更新位置
 	UpdateJiesuanZhifuPos();
 
+	//更新分类位置
+	UpdateFoodtypePos();
+
 	CContainerUI::SetPos(rc, bNeedInvalidate);
 }

+ 2 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.h

@@ -27,6 +27,8 @@ public:
 	//初始化商品分类的显示
 	void InitFoodtypeShow();
 
+	void UpdateFoodtypePos();
+
 	//根据当前选择的分类,刷新商品展示
 	void InitFoodShow();
 

+ 124 - 4
zhipuzi_pos_windows/page/CHuiyuanPageUI.cpp

@@ -24,9 +24,129 @@ void CHuiyuanPageUI::InitShow()
 //处理按钮点击类事件
 void CHuiyuanPageUI::HandleClickMsg(TNotifyUI& msg)
 {
-	CDuiString name = msg.pSender->GetName();
+	CDuiString senderName = msg.pSender->GetName();
 
-	if (name == _T("huiiyuan_page_sousuo_btn"))
+	if (senderName == L"jianpan_1")
+	{
+		CEditUI* pContent = static_cast<CEditUI*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		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*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
+		wstring wsReason = pContent->GetText();
+
+		wsReason.clear();
+
+		pContent->SetText(wsReason.c_str());
+		pContent->SetFocus();
+	}
+	else if (senderName == _T("huiiyuan_page_sousuo_btn"))
 	{
 		//如果是手动点击了,就重置这个搜索手机号
 		CEditUI* m_pEdit = static_cast<CEditUI*>(this->FindSubControl(_T("huiyuan_page_shoujihao_edit")));
@@ -35,11 +155,11 @@ void CHuiyuanPageUI::HandleClickMsg(TNotifyUI& msg)
 
 		StartHuiyuanSousuo();
 	}
-	else if (name == L"huiiyuan_page_chongzhi_btn")
+	else if (senderName == L"huiiyuan_page_chongzhi_btn")
 	{
 		StartHuiyuanChongzhi();
 	}
-	else if (name == L"huiyuan_page_add_btn")
+	else if (senderName == L"huiyuan_page_add_btn")
 	{
 		StartAddHuiyuan();
 	}

+ 11 - 2
zhipuzi_pos_windows/page/CJiaobanPageUI.cpp

@@ -156,7 +156,16 @@ void CJiaobanPageUI::HandleJiaobanShijian()
 	com = static_cast<CComboUI*>(this->FindSubControl(_T("jiaoban_page_init_time_select")));
 	com->RemoveAll();
 
-	for (rapidjson::SizeType i = 0; i < rows.Size(); ++i)
+	int qidian = 0;
+	int num = rows.Size();
+	if (num > 10)
+	{
+		//只选最多10个
+		qidian = rows.Size() - 10;
+		num = 10;
+	}
+
+	for (rapidjson::SizeType i = qidian; i < rows.Size(); ++i)
 	{
 		std::string cur_time = rows[i]["init_time"].GetString();
 
@@ -168,7 +177,7 @@ void CJiaobanPageUI::HandleJiaobanShijian()
 	}
 
 	com->SetInternVisible(true);
-	com->SelectItem(rows.Size() - 1, false, false);
+	com->SelectItem(num - 1, false, false);
 	com->SetText(CLewaimaiString::UTF8ToUnicode(m_init_time).c_str());
 
 	//到这里了,开始处理数据刷新

+ 168 - 0
zhipuzi_pos_windows/wnd/CImageAttentionWnd.cpp

@@ -0,0 +1,168 @@
+#include "../pch/pch.h"
+#include "CImageAttentionWnd.h"
+
+LRESULT CImageAttentionWnd::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 CImageAttentionWnd::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 CImageAttentionWnd::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 CImageAttentionWnd::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled)
+{
+	if (uMsg == WM_KEYDOWN)
+	{
+		if (wParam == VK_RETURN)
+		{
+			return true;
+		}
+		else if (wParam == VK_ESCAPE)
+		{
+			Close(IDCANCEL);
+
+			return true;
+		}
+	}
+	return false;
+}
+
+LRESULT CImageAttentionWnd::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("image_attention_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 CImageAttentionWnd::Notify(TNotifyUI& msg)
+{
+	if (msg.sType == _T("click"))
+	{
+		DuiLib::CDuiString senderName = msg.pSender->GetName();
+
+		if (senderName == _T("closebtn"))
+		{
+			Close(IDCANCEL);
+			return;
+		}
+	}
+}
+
+void CImageAttentionWnd::Init()
+{
+
+}
+
+void CImageAttentionWnd::SetTitle(std::wstring title)
+{
+	CLabelUI* pLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("memo_dlg_title")));
+	pLabel->SetText(title.c_str());
+}
+
+void CImageAttentionWnd::SetAttentionText(std::wstring text)
+{
+	CLabelUI* pText = static_cast<CLabelUI*>(m_pm.FindControl(_T("text")));
+	pText->SetText(text.c_str());
+}
+
+void CImageAttentionWnd::SetAttentionImage(std::wstring image, int width, int height)
+{
+	CControlUI* pImage = static_cast<CControlUI*>(m_pm.FindControl(_T("image")));
+	pImage->SetBkImage(image.c_str());
+
+	pImage->SetFixedWidth(width);
+	pImage->SetFixedHeight(height);
+}

+ 78 - 0
zhipuzi_pos_windows/wnd/CImageAttentionWnd.h

@@ -0,0 +1,78 @@
+#pragma once
+
+#include "../pch/pch.h"
+#include "CMainWnd.h"
+#include "CModalWnd.h"
+
+class CImageAttentionWnd : 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();
+
+	void SetTitle(std::wstring title);
+	void SetAttentionText(std::wstring text);
+	void SetAttentionImage(std::wstring image, int width, int height);
+
+	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::wstring m_errorInfo;
+};
+

+ 49 - 2
zhipuzi_pos_windows/wnd/CMainWnd.cpp

@@ -14,6 +14,8 @@
 
 #include "../worker/CMessagePushWorker.h"
 
+#include "../wnd/CImageAttentionWnd.h"
+
 void CMainWnd::Init()
 {
 	//设置店铺名字
@@ -217,6 +219,8 @@ void CMainWnd::Notify(TNotifyUI& msg)
 
 void CMainWnd::HandleClickMsg(TNotifyUI& msg)
 {
+	CDuiString name = msg.pSender->GetName();
+
     if(msg.pSender == m_pCloseBtn)
     {
         if(CSetting::GetParam("setting_is_close_min") == "1")
@@ -245,13 +249,20 @@ void CMainWnd::HandleClickMsg(TNotifyUI& msg)
         SendMessage(WM_SYSCOMMAND, SC_RESTORE, 0);
         return;
     }
+	else if (name == L"main_kefubtn")
+	{
+		//展示客服二维码
+		this->ShowKefu();
+	}
+	else if (name == L"main_appbtn")
+	{
+		this->ShowAppDownload();
+	}
 	else if (msg.pSender->GetName() == L"main_web_login_btn")
 	{
 		ShellExecute(NULL, _T("open"), _T("explorer.exe"), _T("https://www.zhipuzi.com/login.html"), NULL, SW_SHOW);
 	}
 
-    CDuiString name = msg.pSender->GetName();
-
     if(name == _T("quitbtn"))
     {
 		QuitApp();
@@ -1090,4 +1101,40 @@ void CMainWnd::QuitApp()
 	this->End();
 
 	PostQuitMessage(0);
+}
+
+void CMainWnd::ShowKefu()
+{
+	CImageAttentionWnd* pYouhuiDlg = new CImageAttentionWnd();
+
+	if (pYouhuiDlg != NULL)
+	{
+		pYouhuiDlg->Create(m_pm.GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pYouhuiDlg->SetIcon(IDI_ICON_DUILIB);
+		pYouhuiDlg->CenterWindow();
+
+		pYouhuiDlg->SetTitle(L"联系客服");
+		pYouhuiDlg->SetAttentionText(L"请微信扫描二维码,添加客服微信,处理售后问题");
+		pYouhuiDlg->SetAttentionImage(L"contact_me_qr.png", 396, 396);
+
+		pYouhuiDlg->ShowModal();
+	}
+}
+
+void CMainWnd::ShowAppDownload()
+{
+	CImageAttentionWnd* pYouhuiDlg = new CImageAttentionWnd();
+
+	if (pYouhuiDlg != NULL)
+	{
+		pYouhuiDlg->Create(m_pm.GetPaintWindow(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
+		pYouhuiDlg->SetIcon(IDI_ICON_DUILIB);
+		pYouhuiDlg->CenterWindow();
+
+		pYouhuiDlg->SetTitle(L"下载商家app");
+		pYouhuiDlg->SetAttentionText(L"请微信扫描二维码,下载智铺子商家app,管理店铺更方便,功能更多");
+		pYouhuiDlg->SetAttentionImage(L"app_qrcode.png", 300, 300);
+
+		pYouhuiDlg->ShowModal();
+	}
 }

+ 6 - 0
zhipuzi_pos_windows/wnd/CMainWnd.h

@@ -117,6 +117,12 @@ private:
 	//退出应用时调用
 	void QuitApp();
 
+	//弹框展示客服二维码
+	void ShowKefu();
+
+	//弹框展示下载二维码
+	void ShowAppDownload();
+
 public:
     CPaintManagerUI m_pm;
 

+ 1 - 1
zhipuzi_pos_windows/worker/CMessagePushWorker.cpp

@@ -70,7 +70,7 @@ void CMessagePushWorker::KeepAlive()
 			try
 			{
 				//发送失败,重新建立连接
-				char host[] = "pushserver.lewaimai.com";
+				char host[] = "pospush.zhipuzi.com";
 				char port[] = "9001";
 
 				tcp::resolver resolver(m_io_context);

+ 2 - 0
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj

@@ -228,6 +228,7 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
   </ItemDefinitionGroup>
   <ItemGroup>
     <ClInclude Include="CAppEnv.h" />
+    <ClInclude Include="wnd\CImageAttentionWnd.h" />
     <ClInclude Include="worker\CCommonWorker.h" />
     <ClInclude Include="worker\CVoiceWorker.h" />
     <ClInclude Include="page\CJiaobanPageUI.h" />
@@ -311,6 +312,7 @@ copy $(ProjectDir)conf\ $(SolutionDir)bin\$(Platform)\$(Configuration)\conf\</Co
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="CAppEnv.cpp" />
+    <ClCompile Include="wnd\CImageAttentionWnd.cpp" />
     <ClCompile Include="worker\CCommonWorker.cpp" />
     <ClCompile Include="worker\CVoiceWorker.cpp" />
     <ClCompile Include="page\CJiaobanPageUI.cpp" />

+ 6 - 0
zhipuzi_pos_windows/zhipuzi_pos_windows.vcxproj.filters

@@ -258,6 +258,9 @@
     <ClInclude Include="worker\CChengzhongWorker.h">
       <Filter>头文件</Filter>
     </ClInclude>
+    <ClInclude Include="wnd\CImageAttentionWnd.h">
+      <Filter>头文件</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="pch\pch.cpp">
@@ -479,6 +482,9 @@
     <ClCompile Include="worker\CChengzhongWorker.cpp">
       <Filter>源文件</Filter>
     </ClCompile>
+    <ClCompile Include="wnd\CImageAttentionWnd.cpp">
+      <Filter>源文件</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <Image Include="resource\zhipuzi.ico">