|
@@ -1,4 +1,4 @@
|
|
|
-#include "../pch/pch.h"
|
|
|
|
|
|
|
+#include "../pch/pch.h"
|
|
|
#include "CShoukuanPageUI.h"
|
|
#include "CShoukuanPageUI.h"
|
|
|
|
|
|
|
|
#include "../control/ControlEx.h"
|
|
#include "../control/ControlEx.h"
|
|
@@ -24,7 +24,7 @@ CShoukuanPageUI::~CShoukuanPageUI()
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
|
|
|
|
|
|
|
+//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
|
|
|
void CShoukuanPageUI::InitShow()
|
|
void CShoukuanPageUI::InitShow()
|
|
|
{
|
|
{
|
|
|
InitMoney();
|
|
InitMoney();
|
|
@@ -33,17 +33,17 @@ void CShoukuanPageUI::InitShow()
|
|
|
|
|
|
|
|
if (m_is_zidingyizhifu_init == false)
|
|
if (m_is_zidingyizhifu_init == false)
|
|
|
{
|
|
{
|
|
|
- //初始化结算页面的支付方式
|
|
|
|
|
|
|
+ //鍒濆�鍖栫粨绠楅〉闈㈢殑鏀�粯鏂瑰紡
|
|
|
this->InitJiesuanZhifu();
|
|
this->InitJiesuanZhifu();
|
|
|
|
|
|
|
|
m_is_zidingyizhifu_init = true;
|
|
m_is_zidingyizhifu_init = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //更新结算按钮位置
|
|
|
|
|
|
|
+ //鏇存柊缁撶畻鎸夐挳浣嶇疆
|
|
|
UpdateJiesuanZhifuPos();
|
|
UpdateJiesuanZhifuPos();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//处理按钮点击类事件
|
|
|
|
|
|
|
+//处理按钮点击类事件
|
|
|
void CShoukuanPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
void CShoukuanPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
|
{
|
|
{
|
|
|
CDuiString senderName = msg.pSender->GetName();
|
|
CDuiString senderName = msg.pSender->GetName();
|
|
@@ -98,27 +98,27 @@ void CShoukuanPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
|
}
|
|
}
|
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_weixinzhifu_btn")
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_weixinzhifu_btn")
|
|
|
{
|
|
{
|
|
|
- //点击微信支付
|
|
|
|
|
|
|
+ //鐐瑰嚮寰�俊鏀�粯
|
|
|
this->StartWeixinzhifuShoukuan();
|
|
this->StartWeixinzhifuShoukuan();
|
|
|
}
|
|
}
|
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_shoukuan_btn")
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_shoukuan_btn")
|
|
|
{
|
|
{
|
|
|
- //点击会员支付
|
|
|
|
|
|
|
+ //鐐瑰嚮浼氬憳鏀�粯
|
|
|
this->StartHuiyuanShoukuan();
|
|
this->StartHuiyuanShoukuan();
|
|
|
}
|
|
}
|
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_xianjin_btn")
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_xianjin_btn")
|
|
|
{
|
|
{
|
|
|
- //点击现金收款
|
|
|
|
|
|
|
+ //鐐瑰嚮鐜伴噾鏀舵�
|
|
|
this->StartXianjinShoukuan();
|
|
this->StartXianjinShoukuan();
|
|
|
}
|
|
}
|
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_fulika_btn")
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_fulika_btn")
|
|
|
{
|
|
{
|
|
|
- //福利卡收款
|
|
|
|
|
|
|
+ //福利卡收款
|
|
|
this->StartFulikaShoukuan();
|
|
this->StartFulikaShoukuan();
|
|
|
}
|
|
}
|
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_zidingyi_btn")
|
|
else if (senderName == L"diandan_jiesuan_zhifufangshi_zidingyi_btn")
|
|
|
{
|
|
{
|
|
|
- //自定义支付
|
|
|
|
|
|
|
+ //自定义支付
|
|
|
std::wstring name = msg.pSender->GetText();
|
|
std::wstring name = msg.pSender->GetText();
|
|
|
std::wstring selfpay_id = msg.pSender->GetCustomAttribute(L"selfpay_id");
|
|
std::wstring selfpay_id = msg.pSender->GetCustomAttribute(L"selfpay_id");
|
|
|
|
|
|
|
@@ -126,25 +126,25 @@ void CShoukuanPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//处理option切换事件
|
|
|
|
|
|
|
+//澶勭悊option鍒囨崲浜嬩欢
|
|
|
void CShoukuanPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
void CShoukuanPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//处理下拉框、radio的切换事件
|
|
|
|
|
|
|
+//处理下拉框、radio的切换事件
|
|
|
void CShoukuanPageUI::HandleItemSelectMsg(TNotifyUI& msg)
|
|
void CShoukuanPageUI::HandleItemSelectMsg(TNotifyUI& msg)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//处理编辑框输入内容改变事件
|
|
|
|
|
|
|
+//处理编辑框输入内容改变事件
|
|
|
void CShoukuanPageUI::HandleTextChangedMsg(TNotifyUI& msg)
|
|
void CShoukuanPageUI::HandleTextChangedMsg(TNotifyUI& msg)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//处理扫码枪捕捉到的扫码信息
|
|
|
|
|
|
|
+//处理扫码枪捕捉到的扫码信息
|
|
|
void CShoukuanPageUI::HandleTextCapture(std::string content)
|
|
void CShoukuanPageUI::HandleTextCapture(std::string content)
|
|
|
{
|
|
{
|
|
|
if (m_is_show_modal_wnd == true)
|
|
if (m_is_show_modal_wnd == true)
|
|
@@ -153,14 +153,14 @@ void CShoukuanPageUI::HandleTextCapture(std::string content)
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //按付款码处理
|
|
|
|
|
|
|
+ //鎸変粯娆剧爜澶勭悊
|
|
|
std::string s_Fukuanma = content;
|
|
std::string s_Fukuanma = content;
|
|
|
|
|
|
|
|
int length = s_Fukuanma.size();
|
|
int length = s_Fukuanma.size();
|
|
|
if (length != 18 && length != 19)
|
|
if (length != 18 && length != 19)
|
|
|
{
|
|
{
|
|
|
- //肯定不是付款码
|
|
|
|
|
- m_pMainWnd->ShowToast(L"无效的条码!");
|
|
|
|
|
|
|
+ //肯定不是付款码
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"鏃犳晥鐨勬潯鐮侊紒");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -169,8 +169,8 @@ void CShoukuanPageUI::HandleTextCapture(std::string content)
|
|
|
char c = *(s_Fukuanma.c_str() + i);
|
|
char c = *(s_Fukuanma.c_str() + i);
|
|
|
if (isdigit(c) == 0)
|
|
if (isdigit(c) == 0)
|
|
|
{
|
|
{
|
|
|
- //不是数字
|
|
|
|
|
- m_pMainWnd->ShowToast(L"无效的条码!");
|
|
|
|
|
|
|
+ //涓嶆槸鏁板瓧
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"鏃犳晥鐨勬潯鐮侊紒");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -182,7 +182,7 @@ void CShoukuanPageUI::HandleTextCapture(std::string content)
|
|
|
|| s_Fukuanma.find("14") == 0 \
|
|
|| s_Fukuanma.find("14") == 0 \
|
|
|
|| s_Fukuanma.find("15") == 0)
|
|
|| s_Fukuanma.find("15") == 0)
|
|
|
{
|
|
{
|
|
|
- //微信付款码
|
|
|
|
|
|
|
+ //微信付款码
|
|
|
}
|
|
}
|
|
|
else if (s_Fukuanma.find("25") == 0 \
|
|
else if (s_Fukuanma.find("25") == 0 \
|
|
|
|| s_Fukuanma.find("26") == 0 \
|
|
|| s_Fukuanma.find("26") == 0 \
|
|
@@ -191,19 +191,19 @@ void CShoukuanPageUI::HandleTextCapture(std::string content)
|
|
|
|| s_Fukuanma.find("29") == 0 \
|
|
|| s_Fukuanma.find("29") == 0 \
|
|
|
|| s_Fukuanma.find("30") == 0)
|
|
|| s_Fukuanma.find("30") == 0)
|
|
|
{
|
|
{
|
|
|
- //支付宝付款码
|
|
|
|
|
|
|
+ //鏀�粯瀹濅粯娆剧爜
|
|
|
}
|
|
}
|
|
|
else if (s_Fukuanma.find("62") == 0)
|
|
else if (s_Fukuanma.find("62") == 0)
|
|
|
{
|
|
{
|
|
|
- //云闪付付款码
|
|
|
|
|
|
|
+ //浜戦棯浠樹粯娆剧爜
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- m_pMainWnd->ShowToast(L"无效的条码!");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"鏃犳晥鐨勬潯鐮侊紒");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //代码能走到这里,说明肯定就是付款码了,默认唤起支付
|
|
|
|
|
|
|
+ //代码能走到这里,说明肯定就是付款码了,默认唤起支付
|
|
|
this->StartWeixinzhifuShoukuan(content);
|
|
this->StartWeixinzhifuShoukuan(content);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -336,7 +336,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
CHorizontalLayoutUI* pWeixinLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_weixinzhifu")));
|
|
CHorizontalLayoutUI* pWeixinLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_weixinzhifu")));
|
|
|
if (CShopinfo::GetInstance()->m_is_online_pay_open == "1")
|
|
if (CShopinfo::GetInstance()->m_is_online_pay_open == "1")
|
|
|
{
|
|
{
|
|
|
- //展示微信支付,并且调整位置
|
|
|
|
|
|
|
+ //展示微信支付,并且调整位置
|
|
|
pWeixinLayout->SetVisible(true);
|
|
pWeixinLayout->SetVisible(true);
|
|
|
|
|
|
|
|
num++;
|
|
num++;
|
|
@@ -346,7 +346,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
pZhifufangshiLayout->RemoveAt(num);
|
|
pZhifufangshiLayout->RemoveAt(num);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //会员支付
|
|
|
|
|
|
|
+ //浼氬憳鏀�粯
|
|
|
CHorizontalLayoutUI* pHuiyuanLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_huiyuan")));
|
|
CHorizontalLayoutUI* pHuiyuanLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_huiyuan")));
|
|
|
if (CShopinfo::GetInstance()->m_is_vip_pay_open == "1")
|
|
if (CShopinfo::GetInstance()->m_is_vip_pay_open == "1")
|
|
|
{
|
|
{
|
|
@@ -359,7 +359,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
pZhifufangshiLayout->RemoveAt(num);
|
|
pZhifufangshiLayout->RemoveAt(num);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //现金支付
|
|
|
|
|
|
|
+ //鐜伴噾鏀�粯
|
|
|
CHorizontalLayoutUI* pXianjinLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_xianjin")));
|
|
CHorizontalLayoutUI* pXianjinLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_xianjin")));
|
|
|
if (CShopinfo::GetInstance()->m_is_cash_pay_open == "1")
|
|
if (CShopinfo::GetInstance()->m_is_cash_pay_open == "1")
|
|
|
{
|
|
{
|
|
@@ -373,7 +373,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
- //购物卡
|
|
|
|
|
|
|
+ //购物卡
|
|
|
CHorizontalLayoutUI* pGouwukaLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_gouwuka")));
|
|
CHorizontalLayoutUI* pGouwukaLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_gouwuka")));
|
|
|
if (CShopinfo::GetInstance()->m_is_giftcard_pay_open == "1")
|
|
if (CShopinfo::GetInstance()->m_is_giftcard_pay_open == "1")
|
|
|
{
|
|
{
|
|
@@ -386,7 +386,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
pGouwukaLayout->SetVisible(false);
|
|
pGouwukaLayout->SetVisible(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //美食城临时卡
|
|
|
|
|
|
|
+ //缇庨�鍩庝复鏃跺崱
|
|
|
CHorizontalLayoutUI* pMeishichengLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_meishicheng")));
|
|
CHorizontalLayoutUI* pMeishichengLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_meishicheng")));
|
|
|
if (CShopinfo::GetInstance()->m_is_food_town_card_pay_open == "1")
|
|
if (CShopinfo::GetInstance()->m_is_food_town_card_pay_open == "1")
|
|
|
{
|
|
{
|
|
@@ -400,7 +400,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
}
|
|
}
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
- //福利卡
|
|
|
|
|
|
|
+ //福利卡
|
|
|
CHorizontalLayoutUI* pFulikaLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_fulika")));
|
|
CHorizontalLayoutUI* pFulikaLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhifufangshi_fulika")));
|
|
|
if (CShopinfo::GetInstance()->m_is_open_fulika_pay == "1")
|
|
if (CShopinfo::GetInstance()->m_is_open_fulika_pay == "1")
|
|
|
{
|
|
{
|
|
@@ -413,7 +413,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
pZhifufangshiLayout->RemoveAt(num);
|
|
pZhifufangshiLayout->RemoveAt(num);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //接着添加自定义支付的
|
|
|
|
|
|
|
+ //鎺ョ潃娣诲姞鑷�畾涔夋敮浠樼殑
|
|
|
for (std::vector<SelfPay>::iterator it = CShopinfo::GetInstance()->m_self_pay.begin(); it != CShopinfo::GetInstance()->m_self_pay.end(); it++)
|
|
for (std::vector<SelfPay>::iterator it = CShopinfo::GetInstance()->m_self_pay.begin(); it != CShopinfo::GetInstance()->m_self_pay.end(); it++)
|
|
|
{
|
|
{
|
|
|
SelfPay selfpay = *it;
|
|
SelfPay selfpay = *it;
|
|
@@ -430,12 +430,12 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
newButton->SetBorderColor(0xFFC1C1C1);
|
|
newButton->SetBorderColor(0xFFC1C1C1);
|
|
|
newButton->SetBkColor(0xFFF7F7F7);
|
|
newButton->SetBkColor(0xFFF7F7F7);
|
|
|
|
|
|
|
|
- //设置定义属性,在点击按钮的时候好区分
|
|
|
|
|
|
|
+ //璁剧疆瀹氫箟灞炴€э紝鍦ㄧ偣鍑绘寜閽�殑鏃跺€欏ソ鍖哄垎
|
|
|
newButton->SetAttribute(L"name", L"diandan_jiesuan_zhifufangshi_zidingyi_btn");
|
|
newButton->SetAttribute(L"name", L"diandan_jiesuan_zhifufangshi_zidingyi_btn");
|
|
|
newButton->AddCustomAttribute(L"selfpay_id", CLewaimaiString::UTF8ToUnicode(selfpay.id).c_str());
|
|
newButton->AddCustomAttribute(L"selfpay_id", CLewaimaiString::UTF8ToUnicode(selfpay.id).c_str());
|
|
|
newButton->SetAttribute(L"float", L"true");
|
|
newButton->SetAttribute(L"float", L"true");
|
|
|
|
|
|
|
|
- //必须先Add,才能调用下面的SetPos,否则无效
|
|
|
|
|
|
|
+ //必须先Add,才能调用下面的SetPos,否则无效
|
|
|
pZhifufangshiLayout->Add(newButton);
|
|
pZhifufangshiLayout->Add(newButton);
|
|
|
|
|
|
|
|
num++;
|
|
num++;
|
|
@@ -447,7 +447,7 @@ void CShoukuanPageUI::InitJiesuanZhifu()
|
|
|
|
|
|
|
|
void CShoukuanPageUI::UpdateJiesuanZhifuPos()
|
|
void CShoukuanPageUI::UpdateJiesuanZhifuPos()
|
|
|
{
|
|
{
|
|
|
- //添加支付方式
|
|
|
|
|
|
|
+ //娣诲姞鏀�粯鏂瑰紡
|
|
|
int nWidth = m_nPageWidth;
|
|
int nWidth = m_nPageWidth;
|
|
|
if (nWidth == 0)
|
|
if (nWidth == 0)
|
|
|
{
|
|
{
|
|
@@ -462,7 +462,7 @@ void CShoukuanPageUI::UpdateJiesuanZhifuPos()
|
|
|
CVerticalLayoutUI* pZhangdanLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(L"diandan_page_jiesuan_zhangdan_layout"));
|
|
CVerticalLayoutUI* pZhangdanLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(L"diandan_page_jiesuan_zhangdan_layout"));
|
|
|
pZhangdanLayout->SetFixedWidth(nZhangdanWidth);
|
|
pZhangdanLayout->SetFixedWidth(nZhangdanWidth);
|
|
|
|
|
|
|
|
- //根据宽度计算每行显示的数量
|
|
|
|
|
|
|
+ //根据宽度计算每行显示的数量
|
|
|
int nMeihangNum = (nZhangdanWidth) / 144;
|
|
int nMeihangNum = (nZhangdanWidth) / 144;
|
|
|
if (nMeihangNum < 1)
|
|
if (nMeihangNum < 1)
|
|
|
{
|
|
{
|
|
@@ -485,17 +485,24 @@ void CShoukuanPageUI::UpdateJiesuanZhifuPos()
|
|
|
rect.top = (curRow - 1) * 100 + 20;
|
|
rect.top = (curRow - 1) * 100 + 20;
|
|
|
rect.bottom = rect.top + 80;
|
|
rect.bottom = rect.top + 80;
|
|
|
|
|
|
|
|
- curItem->SetPos(rect);
|
|
|
|
|
|
|
+ // 强制设置固定大小和位置
|
|
|
|
|
+ SIZE size;
|
|
|
|
|
+ size.cx = rect.left;
|
|
|
|
|
+ size.cy = rect.top;
|
|
|
|
|
+ curItem->SetFixedXY(size);
|
|
|
|
|
+
|
|
|
|
|
+ curItem->SetFixedWidth(rect.right - rect.left);
|
|
|
|
|
+ curItem->SetFixedHeight(rect.bottom - rect.top);
|
|
|
|
|
|
|
|
num++;
|
|
num++;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //调整区域高度
|
|
|
|
|
|
|
+ //璋冩暣鍖哄煙楂樺害
|
|
|
int lastRow = (num - 1) / nMeihangNum + 1;
|
|
int lastRow = (num - 1) / nMeihangNum + 1;
|
|
|
pZhifufangshiLayout->SetFixedHeight(lastRow * 105);
|
|
pZhifufangshiLayout->SetFixedHeight(lastRow * 105);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//初始化收款金额
|
|
|
|
|
|
|
+//初始化收款金额
|
|
|
void CShoukuanPageUI::InitMoney()
|
|
void CShoukuanPageUI::InitMoney()
|
|
|
{
|
|
{
|
|
|
CEditUI* pMoneyEdit = static_cast<CEditUI*>(this->FindSubControl(_T("shoukuan_page_money_edit")));
|
|
CEditUI* pMoneyEdit = static_cast<CEditUI*>(this->FindSubControl(_T("shoukuan_page_money_edit")));
|
|
@@ -513,7 +520,7 @@ std::string CShoukuanPageUI::GetMoney()
|
|
|
|
|
|
|
|
void CShoukuanPageUI::UpdateJiesuanInfo()
|
|
void CShoukuanPageUI::UpdateJiesuanInfo()
|
|
|
{
|
|
{
|
|
|
- //再刷新账单明细展示
|
|
|
|
|
|
|
+ //再刷新账单明细展示
|
|
|
CVerticalLayoutUI* pmingxiLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhangdanmingxi_jiage_layout")));
|
|
CVerticalLayoutUI* pmingxiLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("diandan_jiesuan_zhangdanmingxi_jiage_layout")));
|
|
|
pmingxiLayout->RemoveAll();
|
|
pmingxiLayout->RemoveAll();
|
|
|
|
|
|
|
@@ -521,7 +528,7 @@ void CShoukuanPageUI::UpdateJiesuanInfo()
|
|
|
|
|
|
|
|
int item_num = 0;
|
|
int item_num = 0;
|
|
|
|
|
|
|
|
- //先显示基础价格
|
|
|
|
|
|
|
+ //鍏堟樉绀哄熀纭€浠锋牸
|
|
|
if (true)
|
|
if (true)
|
|
|
{
|
|
{
|
|
|
CDialogBuilder builder;
|
|
CDialogBuilder builder;
|
|
@@ -532,8 +539,8 @@ void CShoukuanPageUI::UpdateJiesuanInfo()
|
|
|
CLabelUI* pName = static_cast<CLabelUI*>(pItem->FindSubControl(_T("name")));
|
|
CLabelUI* pName = static_cast<CLabelUI*>(pItem->FindSubControl(_T("name")));
|
|
|
CLabelUI* pValue = static_cast<CLabelUI*>(pItem->FindSubControl(_T("value")));
|
|
CLabelUI* pValue = static_cast<CLabelUI*>(pItem->FindSubControl(_T("value")));
|
|
|
|
|
|
|
|
- pName->SetText(L"原价:");
|
|
|
|
|
- pValue->SetText((CLewaimaiString::UTF8ToUnicode(money) + L"元").c_str());
|
|
|
|
|
|
|
+ pName->SetText(L"原价:");
|
|
|
|
|
+ pValue->SetText((CLewaimaiString::UTF8ToUnicode(money) + L"元").c_str());
|
|
|
|
|
|
|
|
item_num++;
|
|
item_num++;
|
|
|
}
|
|
}
|
|
@@ -541,10 +548,10 @@ void CShoukuanPageUI::UpdateJiesuanInfo()
|
|
|
pmingxiLayout->SetFixedHeight(item_num * 40);
|
|
pmingxiLayout->SetFixedHeight(item_num * 40);
|
|
|
|
|
|
|
|
CLabelUI* pYingshou = static_cast<CLabelUI*>(this->FindSubControl(_T("diandan_jiesuan_total_yingshou")));
|
|
CLabelUI* pYingshou = static_cast<CLabelUI*>(this->FindSubControl(_T("diandan_jiesuan_total_yingshou")));
|
|
|
- pYingshou->SetText((L"应收金额:" + CLewaimaiString::UTF8ToUnicode(money) + L"元").c_str());
|
|
|
|
|
|
|
+ pYingshou->SetText((L"应收金额:" + CLewaimaiString::UTF8ToUnicode(money) + L"元").c_str());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//开始进行微信支付收款,如果fukuanma不为空,默认自动唤起支付
|
|
|
|
|
|
|
+//寮€濮嬭繘琛屽井淇℃敮浠樻敹娆撅紝濡傛灉fukuanma涓嶄负绌猴紝榛樿�鑷�姩鍞よ捣鏀�粯
|
|
|
void CShoukuanPageUI::StartWeixinzhifuShoukuan(std::string fukuanma)
|
|
void CShoukuanPageUI::StartWeixinzhifuShoukuan(std::string fukuanma)
|
|
|
{
|
|
{
|
|
|
if (m_is_show_modal_wnd == true)
|
|
if (m_is_show_modal_wnd == true)
|
|
@@ -554,7 +561,7 @@ void CShoukuanPageUI::StartWeixinzhifuShoukuan(std::string fukuanma)
|
|
|
|
|
|
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
|
{
|
|
{
|
|
|
- m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -575,7 +582,7 @@ void CShoukuanPageUI::StartWeixinzhifuShoukuan(std::string fukuanma)
|
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
|
|
|
|
|
|
- //这里要对提交订单的参数进行组装,然后方便请求
|
|
|
|
|
|
|
+ //杩欓噷瑕佸�鎻愪氦璁㈠崟鐨勫弬鏁拌繘琛岀粍瑁咃紝鐒跺悗鏂逛究璇锋眰
|
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
|
|
|
|
|
|
if (fukuanma != "")
|
|
if (fukuanma != "")
|
|
@@ -602,10 +609,10 @@ void CShoukuanPageUI::StartWeixinzhifuShoukuan(std::string fukuanma)
|
|
|
zhifu_type = "yunshanfu";
|
|
zhifu_type = "yunshanfu";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //说明收款成功了,需要进行一些后续的处理
|
|
|
|
|
|
|
+ //璇存槑鏀舵�鎴愬姛浜嗭紝闇€瑕佽繘琛屼竴浜涘悗缁�殑澶勭悊
|
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, zhifu_type);
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, zhifu_type);
|
|
|
|
|
|
|
|
- m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
@@ -617,7 +624,7 @@ void CShoukuanPageUI::StartWeixinzhifuShoukuan(std::string fukuanma)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//开始进行会员收款
|
|
|
|
|
|
|
+//开始进行会员收款
|
|
|
void CShoukuanPageUI::StartHuiyuanShoukuan()
|
|
void CShoukuanPageUI::StartHuiyuanShoukuan()
|
|
|
{
|
|
{
|
|
|
if (m_is_show_modal_wnd == true)
|
|
if (m_is_show_modal_wnd == true)
|
|
@@ -627,7 +634,7 @@ void CShoukuanPageUI::StartHuiyuanShoukuan()
|
|
|
|
|
|
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
|
{
|
|
{
|
|
|
- m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -636,11 +643,11 @@ void CShoukuanPageUI::StartHuiyuanShoukuan()
|
|
|
|
|
|
|
|
if (m_is_member == false)
|
|
if (m_is_member == false)
|
|
|
{
|
|
{
|
|
|
- //说明登录失败了
|
|
|
|
|
|
|
+ //说明登录失败了
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //登录成功了,马上开始进行支付确认
|
|
|
|
|
|
|
+ //登录成功了,马上开始进行支付确认
|
|
|
CHuiyuanShoukuanWnd* pShoukuanWnd = new CHuiyuanShoukuanWnd();
|
|
CHuiyuanShoukuanWnd* pShoukuanWnd = new CHuiyuanShoukuanWnd();
|
|
|
if (pShoukuanWnd != NULL)
|
|
if (pShoukuanWnd != NULL)
|
|
|
{
|
|
{
|
|
@@ -657,10 +664,10 @@ void CShoukuanPageUI::StartHuiyuanShoukuan()
|
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
|
|
|
|
|
|
- //把会员登录的信息传递进去
|
|
|
|
|
|
|
+ //把会员登录的信息传递进去
|
|
|
pShoukuanWnd->SetMemberInfo(m_member_id, m_card_no, m_balance, m_member_name, m_member_level_name);
|
|
pShoukuanWnd->SetMemberInfo(m_member_id, m_card_no, m_balance, m_member_name, m_member_level_name);
|
|
|
|
|
|
|
|
- //这里要对提交订单的参数进行组装,然后方便请求
|
|
|
|
|
|
|
+ //杩欓噷瑕佸�鎻愪氦璁㈠崟鐨勫弬鏁拌繘琛岀粍瑁咃紝鐒跺悗鏂逛究璇锋眰
|
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -676,21 +683,21 @@ void CShoukuanPageUI::StartHuiyuanShoukuan()
|
|
|
std::string balance = pShoukuanWnd->m_balance;
|
|
std::string balance = pShoukuanWnd->m_balance;
|
|
|
std::string member_number = pShoukuanWnd->m_member_number;
|
|
std::string member_number = pShoukuanWnd->m_member_number;
|
|
|
|
|
|
|
|
- //说明收款成功了,需要进行一些后续的处理
|
|
|
|
|
|
|
+ //璇存槑鏀舵�鎴愬姛浜嗭紝闇€瑕佽繘琛屼竴浜涘悗缁�殑澶勭悊
|
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "huiyuanzhifu", balance, member_number);
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "huiyuanzhifu", balance, member_number);
|
|
|
|
|
|
|
|
- m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
m_is_show_modal_wnd = false;
|
|
m_is_show_modal_wnd = false;
|
|
|
delete pShoukuanWnd;
|
|
delete pShoukuanWnd;
|
|
|
|
|
|
|
|
- //不管是会员支付成功还是失败,都清空之前登录的会员信息
|
|
|
|
|
|
|
+ //涓嶇�鏄�細鍛樻敮浠樻垚鍔熻繕鏄�け璐ワ紝閮芥竻绌轰箣鍓嶇櫥褰曠殑浼氬憳淇℃伅
|
|
|
this->ClickMemberLogout();
|
|
this->ClickMemberLogout();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//开始进行现金收款
|
|
|
|
|
|
|
+//开始进行现金收款
|
|
|
void CShoukuanPageUI::StartXianjinShoukuan()
|
|
void CShoukuanPageUI::StartXianjinShoukuan()
|
|
|
{
|
|
{
|
|
|
if (m_is_show_modal_wnd == true)
|
|
if (m_is_show_modal_wnd == true)
|
|
@@ -700,7 +707,7 @@ void CShoukuanPageUI::StartXianjinShoukuan()
|
|
|
|
|
|
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
|
{
|
|
{
|
|
|
- m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -721,7 +728,7 @@ void CShoukuanPageUI::StartXianjinShoukuan()
|
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
|
|
|
|
|
|
- //这里要对提交订单的参数进行组装,然后方便请求
|
|
|
|
|
|
|
+ //杩欓噷瑕佸�鎻愪氦璁㈠崟鐨勫弬鏁拌繘琛岀粍瑁咃紝鐒跺悗鏂逛究璇锋眰
|
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -737,10 +744,10 @@ void CShoukuanPageUI::StartXianjinShoukuan()
|
|
|
m_shishou_value = pShoukuanWnd->m_shishou;
|
|
m_shishou_value = pShoukuanWnd->m_shishou;
|
|
|
m_zhaoling_value = pShoukuanWnd->m_zhaoling;
|
|
m_zhaoling_value = pShoukuanWnd->m_zhaoling;
|
|
|
|
|
|
|
|
- //说明收款成功了,需要进行一些后续的处理
|
|
|
|
|
|
|
+ //璇存槑鏀舵�鎴愬姛浜嗭紝闇€瑕佽繘琛屼竴浜涘悗缁�殑澶勭悊
|
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "xianjinzhifu");
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "xianjinzhifu");
|
|
|
|
|
|
|
|
- m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
m_is_show_modal_wnd = false;
|
|
m_is_show_modal_wnd = false;
|
|
@@ -748,7 +755,7 @@ void CShoukuanPageUI::StartXianjinShoukuan()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//开始进行福利卡收款
|
|
|
|
|
|
|
+//寮€濮嬭繘琛岀�鍒╁崱鏀舵�
|
|
|
void CShoukuanPageUI::StartFulikaShoukuan()
|
|
void CShoukuanPageUI::StartFulikaShoukuan()
|
|
|
{
|
|
{
|
|
|
if (m_is_show_modal_wnd == true)
|
|
if (m_is_show_modal_wnd == true)
|
|
@@ -758,7 +765,7 @@ void CShoukuanPageUI::StartFulikaShoukuan()
|
|
|
|
|
|
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
|
{
|
|
{
|
|
|
- m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -779,7 +786,7 @@ void CShoukuanPageUI::StartFulikaShoukuan()
|
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
|
|
|
|
|
|
- //这里要对提交订单的参数进行组装,然后方便请求
|
|
|
|
|
|
|
+ //杩欓噷瑕佸�鎻愪氦璁㈠崟鐨勫弬鏁拌繘琛岀粍瑁咃紝鐒跺悗鏂逛究璇锋眰
|
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -792,10 +799,10 @@ void CShoukuanPageUI::StartFulikaShoukuan()
|
|
|
UINT ret = pShoukuanWnd->ShowModal();
|
|
UINT ret = pShoukuanWnd->ShowModal();
|
|
|
if (ret == IDOK)
|
|
if (ret == IDOK)
|
|
|
{
|
|
{
|
|
|
- //说明收款成功了,需要进行一些后续的处理
|
|
|
|
|
|
|
+ //璇存槑鏀舵�鎴愬姛浜嗭紝闇€瑕佽繘琛屼竴浜涘悗缁�殑澶勭悊
|
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "fulikazhifu");
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "fulikazhifu");
|
|
|
|
|
|
|
|
- m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
m_is_show_modal_wnd = false;
|
|
m_is_show_modal_wnd = false;
|
|
@@ -803,7 +810,7 @@ void CShoukuanPageUI::StartFulikaShoukuan()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//开始自定义支付收款
|
|
|
|
|
|
|
+//寮€濮嬭嚜瀹氫箟鏀�粯鏀舵�
|
|
|
void CShoukuanPageUI::StartZidingyiShoukuan(std::wstring name, std::wstring selfpay_id)
|
|
void CShoukuanPageUI::StartZidingyiShoukuan(std::wstring name, std::wstring selfpay_id)
|
|
|
{
|
|
{
|
|
|
if (m_is_show_modal_wnd == true)
|
|
if (m_is_show_modal_wnd == true)
|
|
@@ -813,7 +820,7 @@ void CShoukuanPageUI::StartZidingyiShoukuan(std::wstring name, std::wstring self
|
|
|
|
|
|
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
if (atof(GetMoney().c_str()) < 0.0001)
|
|
|
{
|
|
{
|
|
|
- m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款金额不能为0");
|
|
|
|
|
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -834,7 +841,7 @@ void CShoukuanPageUI::StartZidingyiShoukuan(std::wstring name, std::wstring self
|
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
std::wstring watchValue = CLewaimaiString::UTF8ToUnicode(format_string);
|
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
pShoukuanWnd->InitMoney(watchValue);
|
|
|
|
|
|
|
|
- //这里要对提交订单的参数进行组装,然后方便请求
|
|
|
|
|
|
|
+ //杩欓噷瑕佸�鎻愪氦璁㈠崟鐨勫弬鏁拌繘琛岀粍瑁咃紝鐒跺悗鏂逛究璇锋眰
|
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
pShoukuanWnd->SetCommonParams(GetSendorderParams());
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -850,10 +857,10 @@ void CShoukuanPageUI::StartZidingyiShoukuan(std::wstring name, std::wstring self
|
|
|
UINT ret = pShoukuanWnd->ShowModal();
|
|
UINT ret = pShoukuanWnd->ShowModal();
|
|
|
if (ret == IDOK)
|
|
if (ret == IDOK)
|
|
|
{
|
|
{
|
|
|
- //说明收款成功了,需要进行一些后续的处理
|
|
|
|
|
|
|
+ //璇存槑鏀舵�鎴愬姛浜嗭紝闇€瑕佽繘琛屼竴浜涘悗缁�殑澶勭悊
|
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "zidingyizhifu");
|
|
this->StartWorkAfterShoukuan(pShoukuanWnd->m_show_trade_no, "zidingyizhifu");
|
|
|
|
|
|
|
|
- m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
|
|
|
|
+ m_pMainWnd->ShowToast(L"收款成功!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
m_is_show_modal_wnd = false;
|
|
m_is_show_modal_wnd = false;
|
|
@@ -861,8 +868,8 @@ void CShoukuanPageUI::StartZidingyiShoukuan(std::wstring name, std::wstring self
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//获取通用参数,任何支付方式都要用到的参数,个性化参数在弹框里面处理
|
|
|
|
|
-//参考文档 http://apidoc.zhipuzi.com/index.php/home/item/show?item_id=4
|
|
|
|
|
|
|
+//获取通用参数,任何支付方式都要用到的参数,个性化参数在弹框里面处理
|
|
|
|
|
+//参考文档 http://apidoc.zhipuzi.com/index.php/home/item/show?item_id=4
|
|
|
std::map<std::string, std::string> CShoukuanPageUI::GetSendorderParams()
|
|
std::map<std::string, std::string> CShoukuanPageUI::GetSendorderParams()
|
|
|
{
|
|
{
|
|
|
std::map<std::string, std::string> params;
|
|
std::map<std::string, std::string> params;
|
|
@@ -880,29 +887,29 @@ std::map<std::string, std::string> CShoukuanPageUI::GetSendorderParams()
|
|
|
|
|
|
|
|
void CShoukuanPageUI::StartWorkAfterShoukuan(std::string show_trade_no, std::string shoukuan_type, std::string balance, std::string member_number)
|
|
void CShoukuanPageUI::StartWorkAfterShoukuan(std::string show_trade_no, std::string shoukuan_type, std::string balance, std::string member_number)
|
|
|
{
|
|
{
|
|
|
- //针对现金收款成功,单独做一个打开钱箱的判断处理
|
|
|
|
|
|
|
+ //针对现金收款成功,单独做一个打开钱箱的判断处理
|
|
|
if (shoukuan_type == "xianjinzhifu")
|
|
if (shoukuan_type == "xianjinzhifu")
|
|
|
{
|
|
{
|
|
|
std::string setting_is_diannei_xianjin_qianxiang = CSetting::GetInstance()->GetParam("setting_is_diannei_xianjin_qianxiang");
|
|
std::string setting_is_diannei_xianjin_qianxiang = CSetting::GetInstance()->GetParam("setting_is_diannei_xianjin_qianxiang");
|
|
|
if (setting_is_diannei_xianjin_qianxiang == "1")
|
|
if (setting_is_diannei_xianjin_qianxiang == "1")
|
|
|
{
|
|
{
|
|
|
- //打开钱箱
|
|
|
|
|
|
|
+ //鎵撳紑閽辩�
|
|
|
CPosPrinter printer;
|
|
CPosPrinter printer;
|
|
|
printer.OpenQianxiang();
|
|
printer.OpenQianxiang();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //处理小票打印
|
|
|
|
|
- //处理打印
|
|
|
|
|
|
|
+ //澶勭悊灏忕エ鎵撳嵃
|
|
|
|
|
+ //澶勭悊鎵撳嵃
|
|
|
CShoukuanOrder order = this->GetPrintOrderinfo(show_trade_no, shoukuan_type, balance, member_number);
|
|
CShoukuanOrder order = this->GetPrintOrderinfo(show_trade_no, shoukuan_type, balance, member_number);
|
|
|
|
|
|
|
|
CPosPrinter printer;
|
|
CPosPrinter printer;
|
|
|
printer.PrintShoukuanOrder(order);
|
|
printer.PrintShoukuanOrder(order);
|
|
|
|
|
|
|
|
- //最后还原收款金额
|
|
|
|
|
|
|
+ //最后还原收款金额
|
|
|
this->InitMoney();
|
|
this->InitMoney();
|
|
|
|
|
|
|
|
- //还原会员状态
|
|
|
|
|
|
|
+ //还原会员状态
|
|
|
this->ClickMemberLogout();
|
|
this->ClickMemberLogout();
|
|
|
|
|
|
|
|
this->UpdateJiesuanInfo();
|
|
this->UpdateJiesuanInfo();
|
|
@@ -921,31 +928,31 @@ CShoukuanOrder CShoukuanPageUI::GetPrintOrderinfo(std::string show_trade_no, std
|
|
|
|
|
|
|
|
if (shoukuan_type == "weixinzhifu")
|
|
if (shoukuan_type == "weixinzhifu")
|
|
|
{
|
|
{
|
|
|
- newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"微信支付");
|
|
|
|
|
|
|
+ newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"寰�俊鏀�粯");
|
|
|
}
|
|
}
|
|
|
else if (shoukuan_type == "zhifubao")
|
|
else if (shoukuan_type == "zhifubao")
|
|
|
{
|
|
{
|
|
|
- newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"支付宝");
|
|
|
|
|
|
|
+ newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"支付宝");
|
|
|
}
|
|
}
|
|
|
else if (shoukuan_type == "yunshanfu")
|
|
else if (shoukuan_type == "yunshanfu")
|
|
|
{
|
|
{
|
|
|
- newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"云闪付");
|
|
|
|
|
|
|
+ newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"云闪付");
|
|
|
}
|
|
}
|
|
|
else if (shoukuan_type == "huiyuanzhifu")
|
|
else if (shoukuan_type == "huiyuanzhifu")
|
|
|
{
|
|
{
|
|
|
- newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"会员支付");
|
|
|
|
|
|
|
+ newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"浼氬憳鏀�粯");
|
|
|
}
|
|
}
|
|
|
else if (shoukuan_type == "xianjinzhifu")
|
|
else if (shoukuan_type == "xianjinzhifu")
|
|
|
{
|
|
{
|
|
|
- newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"现金支付");
|
|
|
|
|
|
|
+ newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"鐜伴噾鏀�粯");
|
|
|
}
|
|
}
|
|
|
else if (shoukuan_type == "fulikazhifu")
|
|
else if (shoukuan_type == "fulikazhifu")
|
|
|
{
|
|
{
|
|
|
- newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"福利卡支付");
|
|
|
|
|
|
|
+ newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"福利卡支付");
|
|
|
}
|
|
}
|
|
|
else if (shoukuan_type == "zidingyizhifu")
|
|
else if (shoukuan_type == "zidingyizhifu")
|
|
|
{
|
|
{
|
|
|
- newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"自定义支付");
|
|
|
|
|
|
|
+ newOrder.shoukuan_type = CLewaimaiString::UnicodeToUTF8(L"自定义支付");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
newOrder.order_from = 1;
|
|
newOrder.order_from = 1;
|
|
@@ -960,7 +967,7 @@ void CShoukuanPageUI::SetPos(RECT rc, bool bNeedInvalidate)
|
|
|
{
|
|
{
|
|
|
m_nPageWidth = rc.right - rc.left;
|
|
m_nPageWidth = rc.right - rc.left;
|
|
|
|
|
|
|
|
- //拖动窗口的时候,更新位置
|
|
|
|
|
|
|
+ //鎷栧姩绐楀彛鐨勬椂鍊欙紝鏇存柊浣嶇疆
|
|
|
UpdateJiesuanZhifuPos();
|
|
UpdateJiesuanZhifuPos();
|
|
|
|
|
|
|
|
CContainerUI::SetPos(rc, bNeedInvalidate);
|
|
CContainerUI::SetPos(rc, bNeedInvalidate);
|
|
@@ -988,7 +995,7 @@ void CShoukuanPageUI::ClickMemberLogin()
|
|
|
|
|
|
|
|
if (ret == IDOK)
|
|
if (ret == IDOK)
|
|
|
{
|
|
{
|
|
|
- //这说明会员登录成功了
|
|
|
|
|
|
|
+ //杩欒�鏄庝細鍛樼櫥褰曟垚鍔熶簡
|
|
|
m_is_member = true;
|
|
m_is_member = true;
|
|
|
|
|
|
|
|
m_member_name = pMemberLoginDlg->m_name;
|
|
m_member_name = pMemberLoginDlg->m_name;
|
|
@@ -1024,7 +1031,7 @@ void CShoukuanPageUI::ClickMemberLogin()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-//处理会员退出登陆
|
|
|
|
|
|
|
+//处理会员退出登陆
|
|
|
void CShoukuanPageUI::ClickMemberLogout()
|
|
void CShoukuanPageUI::ClickMemberLogout()
|
|
|
{
|
|
{
|
|
|
m_is_member = false;
|
|
m_is_member = false;
|