|
|
@@ -379,9 +379,24 @@ void CDiandanPageUI::InitJiesuanShow()
|
|
|
pQuanyikaEdit->SetText(L"未使用");
|
|
|
|
|
|
//抹零
|
|
|
- m_moling_type = 0;
|
|
|
- CCheckBoxUI* pMolingCheck = static_cast<CCheckBoxUI*>(this->FindSubControl(_T("diandan_jiesuan_moling_bumoling")));
|
|
|
- pMolingCheck->Selected(true, false);
|
|
|
+ std::string diandan_moling_type = CSetting::GetInstance()->GetParam("diandan_moling_type");
|
|
|
+ m_moling_type = atoi(diandan_moling_type.c_str());
|
|
|
+
|
|
|
+ if (m_moling_type == 0)
|
|
|
+ {
|
|
|
+ CCheckBoxUI* pMolingCheck = static_cast<CCheckBoxUI*>(this->FindSubControl(_T("diandan_jiesuan_moling_bumoling")));
|
|
|
+ pMolingCheck->Selected(true, false);
|
|
|
+ }
|
|
|
+ else if (m_moling_type == 1)
|
|
|
+ {
|
|
|
+ CCheckBoxUI* pMolingCheck = static_cast<CCheckBoxUI*>(this->FindSubControl(_T("diandan_jiesuan_moling_molingdaojiao")));
|
|
|
+ pMolingCheck->Selected(true, false);
|
|
|
+ }
|
|
|
+ else if (m_moling_type == 2)
|
|
|
+ {
|
|
|
+ CCheckBoxUI* pMolingCheck = static_cast<CCheckBoxUI*>(this->FindSubControl(_T("diandan_jiesuan_moling_molingdaoyuan")));
|
|
|
+ pMolingCheck->Selected(true, false);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void CDiandanPageUI::InitJiesuanZhifu()
|
|
|
@@ -789,17 +804,23 @@ void CDiandanPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
|
{
|
|
|
m_moling_type = 0;
|
|
|
|
|
|
+ CSetting::GetInstance()->SetParam("diandan_moling_type", "0");
|
|
|
+
|
|
|
UpdateJiesuanInfo();
|
|
|
}
|
|
|
else if (name == _T("diandan_jiesuan_moling_molingdaojiao"))
|
|
|
{
|
|
|
m_moling_type = 1;
|
|
|
|
|
|
+ CSetting::GetInstance()->SetParam("diandan_moling_type", "1");
|
|
|
+
|
|
|
UpdateJiesuanInfo();
|
|
|
}
|
|
|
else if (name == _T("diandan_jiesuan_moling_molingdaoyuan"))
|
|
|
{
|
|
|
m_moling_type = 2;
|
|
|
+
|
|
|
+ CSetting::GetInstance()->SetParam("diandan_moling_type", "2");
|
|
|
|
|
|
UpdateJiesuanInfo();
|
|
|
}
|
|
|
@@ -1723,7 +1744,16 @@ void CDiandanPageUI::ClickFoodAction()
|
|
|
MemberPrice newPirce;
|
|
|
newPirce.id = member_price_info["id"].GetString();
|
|
|
newPirce.level = member_price_info["level"].GetString();
|
|
|
- newPirce.price = member_price_info["price"].GetString();
|
|
|
+
|
|
|
+ if (member_price_info["price"].IsString())
|
|
|
+ {
|
|
|
+ newPirce.price = member_price_info["price"].GetString();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ newPirce.price = to_string(member_price_info["price"].GetDouble());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
clickItem.m_member_price.push_back(newPirce);
|
|
|
}
|
|
|
@@ -2878,8 +2908,11 @@ void CDiandanPageUI::StartHuiyuanShoukuan()
|
|
|
UINT ret = pShoukuanWnd->ShowModal();
|
|
|
if (ret == IDOK)
|
|
|
{
|
|
|
+ std::string balance = pShoukuanWnd->m_balance;
|
|
|
+ std::string member_number = pShoukuanWnd->m_member_number;
|
|
|
+
|
|
|
//说明收款成功了,需要进行一些后续的处理
|
|
|
- this->StartWorkAfterShoukuan(pShoukuanWnd->m_kucun_string, pShoukuanWnd->m_take_food_code, pShoukuanWnd->m_show_trade_no, "huiyuanzhifu");
|
|
|
+ this->StartWorkAfterShoukuan(pShoukuanWnd->m_kucun_string, pShoukuanWnd->m_take_food_code, pShoukuanWnd->m_show_trade_no, "huiyuanzhifu", balance, member_number);
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -3474,7 +3507,7 @@ void CDiandanPageUI::StopSerachFood()
|
|
|
this->InitFoodShow();
|
|
|
}
|
|
|
|
|
|
-void CDiandanPageUI::StartWorkAfterShoukuan(std::string kucunstring, std::string take_food_code, std::string show_trade_no, std::string shoukuan_type)
|
|
|
+void CDiandanPageUI::StartWorkAfterShoukuan(std::string kucunstring, std::string take_food_code, std::string show_trade_no, std::string shoukuan_type, std::string balance, std::string member_number)
|
|
|
{
|
|
|
//针对现金收款成功,单独做一个打开钱箱的判断处理
|
|
|
if (shoukuan_type == "xianjinzhifu")
|
|
|
@@ -3492,7 +3525,7 @@ void CDiandanPageUI::StartWorkAfterShoukuan(std::string kucunstring, std::string
|
|
|
this->UpdateFoodStock(kucunstring);
|
|
|
|
|
|
//处理打印
|
|
|
- CDiandanOrder order = this->GetPrintOrderinfo(take_food_code, show_trade_no, shoukuan_type);
|
|
|
+ CDiandanOrder order = this->GetPrintOrderinfo(take_food_code, show_trade_no, shoukuan_type, balance, member_number);
|
|
|
|
|
|
CPosPrinter printer;
|
|
|
printer.PrintDiandanOrder(order);
|
|
|
@@ -3501,11 +3534,13 @@ void CDiandanPageUI::StartWorkAfterShoukuan(std::string kucunstring, std::string
|
|
|
RefreshShow();
|
|
|
}
|
|
|
|
|
|
-CDiandanOrder CDiandanPageUI::GetPrintOrderinfo(std::string take_food_code, std::string show_trade_no, std::string shoukuan_type)
|
|
|
+CDiandanOrder CDiandanPageUI::GetPrintOrderinfo(std::string take_food_code, std::string show_trade_no, std::string shoukuan_type, std::string balance, std::string member_number)
|
|
|
{
|
|
|
m_cur_diandan_order.shopname = CShopinfo::GetInstance()->m_shop_name;
|
|
|
m_cur_diandan_order.take_food_code = take_food_code;
|
|
|
m_cur_diandan_order.show_trade_no = show_trade_no;
|
|
|
+ m_cur_diandan_order.balance = balance;
|
|
|
+ m_cur_diandan_order.member_number = member_number;
|
|
|
|
|
|
if (shoukuan_type == "weixinzhifu")
|
|
|
{
|