ソースを参照

修复支付后报错的bug

zhangyang 4 年 前
コミット
5d75040961

BIN
bin/Win32/Debug/zhipuzi_pos_windows/dump/2021-11-27-22-36-45.dmp


BIN
bin/Win32/Debug/zhipuzi_pos_windows/dump/2021-11-28-00-43-55.dmp


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

@@ -7,7 +7,7 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="福利卡收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="福利卡收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			

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

@@ -7,7 +7,7 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="会员收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="会员收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			

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

@@ -7,7 +7,7 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="500" padding="0,20,0,0">			

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

@@ -8,7 +8,7 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="现金收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="现金收款" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">			
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">			

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

@@ -8,7 +8,7 @@
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 	<VerticalLayout bkimage="shoukuan_bkg.png" >
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 		<HorizontalLayout name="shoukuan_title_bkg" height="44" bkcolor="0xFF3CB371">
 			<Label name="shoukuan_version" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
 			<Label name="shoukuan_version" text="" height="44" align="center" valign="center" padding="0,0,0,0" textcolor="#FFFFFFFF" font="2"/>
-			<Button name="closebtn" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
+			<Button name="closebtn" keyboard="false" padding="0,13,15,0" width="16" height="16" tooltip="关闭" normalimage="file='close_normal.png'" hotimage="file='close_hover.png'" pushedimage="file='close_normal.png'"/>
 		</HorizontalLayout>
 		</HorizontalLayout>
 		
 		
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">			
 		<VerticalLayout visible="true" name="shoukuan_before_pay_layout" height="520" padding="0,20,0,0">			

+ 4 - 0
zhipuzi_pos_windows/page/CDiandanPageUI.cpp

@@ -2732,6 +2732,10 @@ void CDiandanPageUI::StartWeixinzhifuShoukuan()
 			//说明收款成功了,需要进行一些后续的处理
 			//说明收款成功了,需要进行一些后续的处理
 			this->StartWorkAfterShoukuan(pShoukuanWnd->m_kucun_string, pShoukuanWnd->m_take_food_code, pShoukuanWnd->m_show_trade_no, "weixinzhifu");
 			this->StartWorkAfterShoukuan(pShoukuanWnd->m_kucun_string, pShoukuanWnd->m_take_food_code, pShoukuanWnd->m_show_trade_no, "weixinzhifu");
 		}
 		}
+		else
+		{
+			int a = 1;
+		}
 
 
 		m_is_show_modal_wnd = false;
 		m_is_show_modal_wnd = false;
 		delete pShoukuanWnd;
 		delete pShoukuanWnd;

+ 24 - 2
zhipuzi_pos_windows/wnd/CFulikaShoukuanWnd.cpp

@@ -20,8 +20,30 @@ void CFulikaShoukuanWnd::Notify(TNotifyUI& msg)
 	{
 	{
 		if (msg.pSender->GetName() == _T("closebtn"))
 		if (msg.pSender->GetName() == _T("closebtn"))
 		{
 		{
-			Close(IDCANCEL);
-			return;
+			if (m_shoukuan_status == 0)
+			{
+				//还没开始支付,直接退出
+				Close(IDCANCEL);
+			}
+			else if (m_shoukuan_status == 1 || m_shoukuan_status == 5)
+			{
+				//不能做任何处理
+			}
+			else if (m_shoukuan_status == 2)
+			{
+				//查询密码的过程中,取消付款
+				CancelShoukuanPassword();
+			}
+			else if (m_shoukuan_status == 3)
+			{
+				Sleep(100);
+				Close(IDOK);
+			}
+			else if (m_shoukuan_status == 4)
+			{
+				Sleep(100);
+				Close(IDCANCEL);
+			}
 		}
 		}
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		{
 		{

+ 24 - 2
zhipuzi_pos_windows/wnd/CHuiyuanShoukuanWnd.cpp

@@ -20,8 +20,30 @@ void CHuiyuanShoukuanWnd::Notify(TNotifyUI& msg)
 	{
 	{
 		if (msg.pSender->GetName() == _T("closebtn"))
 		if (msg.pSender->GetName() == _T("closebtn"))
 		{
 		{
-			Close(IDCANCEL);
-			return;
+			if (m_shoukuan_status == 0)
+			{
+				//还没开始支付,直接退出
+				Close(IDCANCEL);
+			}
+			else if (m_shoukuan_status == 1 || m_shoukuan_status == 5)
+			{
+				//不能做任何处理
+			}
+			else if (m_shoukuan_status == 2)
+			{
+				//查询密码的过程中,取消付款
+				CancelShoukuanPassword();
+			}
+			else if (m_shoukuan_status == 3)
+			{
+				Sleep(100);
+				Close(IDOK);
+			}
+			else if (m_shoukuan_status == 4)
+			{
+				Sleep(100);
+				Close(IDCANCEL);
+			}
 		}
 		}
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		{
 		{

+ 24 - 2
zhipuzi_pos_windows/wnd/CWeixinzhifuShoukuanWnd.cpp

@@ -18,8 +18,30 @@ void CWeixinzhifuShoukuanWnd::Notify(TNotifyUI& msg)
 	{
 	{
 		if (msg.pSender->GetName() == _T("closebtn"))
 		if (msg.pSender->GetName() == _T("closebtn"))
 		{
 		{
-			Close(IDCANCEL);
-			return;
+			if (m_shoukuan_status == 0)
+			{
+				//还没开始支付,直接退出
+				Close(IDCANCEL);
+			}
+			else if (m_shoukuan_status == 1 || m_shoukuan_status == 5)
+			{
+				//不能做任何处理
+			}
+			else if (m_shoukuan_status == 2)
+			{
+				//查询密码的过程中,取消付款
+				CancelShoukuanPassword();
+			}
+			else if (m_shoukuan_status == 3)
+			{
+				Sleep(100);
+				Close(IDOK);
+			}
+			else if (m_shoukuan_status == 4)
+			{
+				Sleep(100);
+				Close(IDCANCEL);
+			}
 		}
 		}
 	}
 	}
 }
 }

+ 24 - 2
zhipuzi_pos_windows/wnd/CXianjinShoukuanWnd.cpp

@@ -20,8 +20,30 @@ void CXianjinShoukuanWnd::Notify(TNotifyUI& msg)
 	{
 	{
 		if (msg.pSender->GetName() == _T("closebtn"))
 		if (msg.pSender->GetName() == _T("closebtn"))
 		{
 		{
-			Close(IDCANCEL);
-			return;
+			if (m_shoukuan_status == 0)
+			{
+				//还没开始支付,直接退出
+				Close(IDCANCEL);
+			}
+			else if (m_shoukuan_status == 1 || m_shoukuan_status == 5)
+			{
+				//不能做任何处理
+			}
+			else if (m_shoukuan_status == 2)
+			{
+				//查询密码的过程中,取消付款
+				CancelShoukuanPassword();
+			}
+			else if (m_shoukuan_status == 3)
+			{
+				Sleep(100);
+				Close(IDOK);
+			}
+			else if (m_shoukuan_status == 4)
+			{
+				Sleep(100);
+				Close(IDCANCEL);
+			}
 		}
 		}
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		{
 		{

+ 24 - 2
zhipuzi_pos_windows/wnd/CZidingyiShoukuanWnd.cpp

@@ -20,8 +20,30 @@ void CZidingyiShoukuanWnd::Notify(TNotifyUI& msg)
 	{
 	{
 		if (msg.pSender->GetName() == _T("closebtn"))
 		if (msg.pSender->GetName() == _T("closebtn"))
 		{
 		{
-			Close(IDCANCEL);
-			return;
+			if (m_shoukuan_status == 0)
+			{
+				//还没开始支付,直接退出
+				Close(IDCANCEL);
+			}
+			else if (m_shoukuan_status == 1 || m_shoukuan_status == 5)
+			{
+				//不能做任何处理
+			}
+			else if (m_shoukuan_status == 2)
+			{
+				//查询密码的过程中,取消付款
+				CancelShoukuanPassword();
+			}
+			else if (m_shoukuan_status == 3)
+			{
+				Sleep(100);
+				Close(IDOK);
+			}
+			else if (m_shoukuan_status == 4)
+			{
+				Sleep(100);
+				Close(IDCANCEL);
+			}
 		}
 		}
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		else if (msg.pSender->GetName() == _T("shoukuanBtn"))
 		{
 		{