|
|
@@ -53,7 +53,7 @@ void CYubaozhuangbiaoqianPageUI::InitShow()
|
|
|
//再初始化商品显示
|
|
|
this->InitFoodShow();
|
|
|
|
|
|
- CHorizontalLayoutUI* chegnzhongLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("diandan_page_chengzhong_layout")));
|
|
|
+ CHorizontalLayoutUI* chegnzhongLayout = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_page_chengzhong_layout")));
|
|
|
if (CSetting::GetInstance()->GetParam("setting_dianzicheng_is_lianjie") == "0")
|
|
|
{
|
|
|
chegnzhongLayout->SetVisible(false);
|
|
|
@@ -80,7 +80,7 @@ void CYubaozhuangbiaoqianPageUI::RefreshShow()
|
|
|
void CYubaozhuangbiaoqianPageUI::InitFoodtypeShow()
|
|
|
{
|
|
|
//初始化商品渲染相关的信息
|
|
|
- m_foodtypeLayout = static_cast<CContainerUI*>(this->FindSubControl(_T("diandan_fenlei_layout")));
|
|
|
+ m_foodtypeLayout = static_cast<CContainerUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_fenlei_layout")));
|
|
|
m_foodtypeLayout->RemoveAll();
|
|
|
|
|
|
std::string is_ai_shibie = CSetting::GetInstance()->GetParam("setting_is_ai_recognition_open");
|
|
|
@@ -126,7 +126,7 @@ void CYubaozhuangbiaoqianPageUI::InitFoodtypeShow()
|
|
|
|
|
|
pItem->SetName(L"AI识别结果");
|
|
|
pItem->SetTypeId("ai");
|
|
|
- pItem->SetGroup(L"diandan_foodtype");
|
|
|
+ pItem->SetGroup(L"yubaozhuangbiaoqian_foodtype");
|
|
|
|
|
|
m_foodtypeLayout->Add(pItem);
|
|
|
|
|
|
@@ -147,7 +147,7 @@ void CYubaozhuangbiaoqianPageUI::InitFoodtypeShow()
|
|
|
pItem->SetName(L"商品套餐");
|
|
|
pItem->SetTypeId("taocan");
|
|
|
pItem->SetTaocan();
|
|
|
- pItem->SetGroup(L"diandan_foodtype");
|
|
|
+ pItem->SetGroup(L"yubaozhuangbiaoqian_foodtype");
|
|
|
|
|
|
m_foodtypeLayout->Add(pItem);
|
|
|
|
|
|
@@ -169,7 +169,7 @@ void CYubaozhuangbiaoqianPageUI::InitFoodtypeShow()
|
|
|
|
|
|
pItem->SetName(CLewaimaiString::UTF8ToUnicode(type.name));
|
|
|
pItem->SetTypeId(type.id);
|
|
|
- pItem->SetGroup(L"diandan_foodtype");
|
|
|
+ pItem->SetGroup(L"yubaozhuangbiaoqian_foodtype");
|
|
|
|
|
|
m_foodtypeLayout->Add(pItem);
|
|
|
|
|
|
@@ -213,7 +213,7 @@ void CYubaozhuangbiaoqianPageUI::UpdateFoodtypePos()
|
|
|
|
|
|
int num = 0;
|
|
|
|
|
|
- CContainerUI* pFenleiLayout = static_cast<CContainerUI*>(this->FindSubControl(_T("diandan_fenlei_layout")));
|
|
|
+ CContainerUI* pFenleiLayout = static_cast<CContainerUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_fenlei_layout")));
|
|
|
|
|
|
for (int i = 0; i < nFoodtypeNum; i++)
|
|
|
{
|
|
|
@@ -245,7 +245,7 @@ void CYubaozhuangbiaoqianPageUI::UpdateFoodtypePos()
|
|
|
pFenleiLayout->SetFixedHeight(lastRow * 52 + 10);
|
|
|
|
|
|
//处理滚动条问题
|
|
|
- CVerticalLayoutUI* pFenleiScrollLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("diandan_fenlei_layout_scrolllayout")));
|
|
|
+ CVerticalLayoutUI* pFenleiScrollLayout = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_fenlei_layout_scrolllayout")));
|
|
|
if (lastRow > 2)
|
|
|
{
|
|
|
lastRow = 2;
|
|
|
@@ -263,7 +263,7 @@ void CYubaozhuangbiaoqianPageUI::InitFoodShow()
|
|
|
{
|
|
|
std::string setting_xianshi_is_youtu = CSetting::GetInstance()->GetParam("setting_xianshi_is_youtu");
|
|
|
|
|
|
- m_foodLayout = static_cast<CTileLayoutUI*>(this->FindSubControl(_T("diandan_foodlist")));
|
|
|
+ m_foodLayout = static_cast<CTileLayoutUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_foodlist")));
|
|
|
m_foodLayout->RemoveAll();
|
|
|
|
|
|
std::wstring xml_name;
|
|
|
@@ -444,23 +444,18 @@ void CYubaozhuangbiaoqianPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
|
|
|
|
this->ClickFoodAction();
|
|
|
}
|
|
|
- else if (name == L"diandan_food_search_clear")
|
|
|
+ else if (name == L"yubaozhuangbiaoqian_food_search_clear")
|
|
|
{
|
|
|
- CEditUI* m_pEdit = static_cast<CEditUI*>(m_pManager->FindControl(_T("diandan_food_search_edit")));
|
|
|
+ CEditUI* m_pEdit = static_cast<CEditUI*>(m_pManager->FindControl(_T("yubaozhuangbiaoqian_food_search_edit")));
|
|
|
m_pEdit->SetText(L"");
|
|
|
|
|
|
StopSerachFood();
|
|
|
}
|
|
|
- else if (name == L"btn_diandan_qianxiang")
|
|
|
- {
|
|
|
- CPosPrinter printer;
|
|
|
- printer.OpenQianxiang();
|
|
|
- }
|
|
|
- else if (name == L"diandan_page_chengzhong_zhiling")
|
|
|
+ else if (name == L"yubaozhuangbiaoqian_page_chengzhong_zhiling")
|
|
|
{
|
|
|
this->ZhiLing();
|
|
|
}
|
|
|
- else if (name == L"diandan_page_chengzhong_qupi")
|
|
|
+ else if (name == L"yubaozhuangbiaoqian_page_chengzhong_qupi")
|
|
|
{
|
|
|
this->Qupi();
|
|
|
}
|
|
|
@@ -474,7 +469,7 @@ void CYubaozhuangbiaoqianPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
|
COptionUI* curOption = static_cast<COptionUI*>(msg.pSender);
|
|
|
std::wstring groupname = curOption->GetGroup();
|
|
|
|
|
|
- if (groupname == L"diandan_foodtype")
|
|
|
+ if (groupname == L"yubaozhuangbiaoqian_foodtype")
|
|
|
{
|
|
|
//商品分类切换
|
|
|
CFoodtypeOptionUI* typeUI = static_cast<CFoodtypeOptionUI*>(curOption);
|
|
|
@@ -504,10 +499,10 @@ void CYubaozhuangbiaoqianPageUI::HandleTextChangedMsg(TNotifyUI& msg)
|
|
|
{
|
|
|
CDuiString name = msg.pSender->GetName();
|
|
|
|
|
|
- if (name == L"diandan_food_search_edit")
|
|
|
+ if (name == L"yubaozhuangbiaoqian_food_search_edit")
|
|
|
{
|
|
|
//商品搜索框的输入事件
|
|
|
- CEditUI* m_pEdit = static_cast<CEditUI*>(m_pManager->FindControl(_T("diandan_food_search_edit")));
|
|
|
+ CEditUI* m_pEdit = static_cast<CEditUI*>(m_pManager->FindControl(_T("yubaozhuangbiaoqian_food_search_edit")));
|
|
|
std::wstring ws_Value = m_pEdit->GetText();
|
|
|
std::string strValue = CLewaimaiString::UnicodeToUTF8(ws_Value);
|
|
|
|
|
|
@@ -588,7 +583,7 @@ void CYubaozhuangbiaoqianPageUI::ClickFoodAction()
|
|
|
}
|
|
|
|
|
|
//这里要判断是直接区域称重,还是先弹框再称重
|
|
|
- CLabelUI* pLabel = static_cast<CLabelUI*>(this->FindSubControl(_T("diandan_page_label_chengzhong_value")));
|
|
|
+ CLabelUI* pLabel = static_cast<CLabelUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_page_label_chengzhong_value")));
|
|
|
std::wstring ws_weight_value = pLabel->GetText();
|
|
|
std::string s_weight_value = CLewaimaiString::UnicodeToUTF8(ws_weight_value);
|
|
|
if (atof(s_weight_value.c_str()) < 0.001)
|
|
|
@@ -619,11 +614,11 @@ void CYubaozhuangbiaoqianPageUI::ClickFoodAction()
|
|
|
void CYubaozhuangbiaoqianPageUI::StartSearchFood(std::string foodname)
|
|
|
{
|
|
|
//展示删除按钮
|
|
|
- CButtonUI* pClear = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_food_search_clear")));
|
|
|
+ CButtonUI* pClear = static_cast<CButtonUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_food_search_clear")));
|
|
|
pClear->SetVisible(true);
|
|
|
|
|
|
//隐藏商品分类展示
|
|
|
- CVerticalLayoutUI* pFoodtype = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("diandan_fenlei_layout_scrolllayout")));
|
|
|
+ CVerticalLayoutUI* pFoodtype = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_fenlei_layout_scrolllayout")));
|
|
|
pFoodtype->SetVisible(false);
|
|
|
|
|
|
if (m_cur_type_id != "sousuo")
|
|
|
@@ -635,7 +630,7 @@ void CYubaozhuangbiaoqianPageUI::StartSearchFood(std::string foodname)
|
|
|
|
|
|
m_sousuo_foodname = foodname;
|
|
|
|
|
|
- CLabelUI* pTishi = static_cast<CLabelUI*>(this->FindSubControl(_T("diandan_food_search_tishi")));
|
|
|
+ CLabelUI* pTishi = static_cast<CLabelUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_food_search_tishi")));
|
|
|
pTishi->SetVisible(false);
|
|
|
|
|
|
this->InitFoodShow();
|
|
|
@@ -645,16 +640,16 @@ void CYubaozhuangbiaoqianPageUI::StartSearchFood(std::string foodname)
|
|
|
void CYubaozhuangbiaoqianPageUI::StopSerachFood()
|
|
|
{
|
|
|
//隐藏删除按钮
|
|
|
- CButtonUI* pClear = static_cast<CButtonUI*>(this->FindSubControl(_T("diandan_food_search_clear")));
|
|
|
+ CButtonUI* pClear = static_cast<CButtonUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_food_search_clear")));
|
|
|
pClear->SetVisible(false);
|
|
|
|
|
|
//展示商品分类展示
|
|
|
- CVerticalLayoutUI* pFoodtype = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("diandan_fenlei_layout_scrolllayout")));
|
|
|
+ CVerticalLayoutUI* pFoodtype = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_fenlei_layout_scrolllayout")));
|
|
|
pFoodtype->SetVisible(true);
|
|
|
|
|
|
m_cur_type_id = m_type_id_before_sousuo;
|
|
|
|
|
|
- CLabelUI* pTishi = static_cast<CLabelUI*>(this->FindSubControl(_T("diandan_food_search_tishi")));
|
|
|
+ CLabelUI* pTishi = static_cast<CLabelUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_food_search_tishi")));
|
|
|
pTishi->SetVisible(true);
|
|
|
|
|
|
this->InitFoodShow();
|
|
|
@@ -692,7 +687,7 @@ void CYubaozhuangbiaoqianPageUI::HandleChengzhongValueChange()
|
|
|
{
|
|
|
std::string weight = CChengzhongWorker::GetInstance()->GetWeight();
|
|
|
|
|
|
- CControlUI* pWendingStatus = static_cast<CControlUI*>(this->FindSubControl(_T("diandan_page_status_chengzhong_wending")));
|
|
|
+ CControlUI* pWendingStatus = static_cast<CControlUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_page_status_chengzhong_wending")));
|
|
|
if (CChengzhongWorker::GetInstance()->GetIsWending() == true)
|
|
|
{
|
|
|
pWendingStatus->SetBkImage(L"deng_on.png");
|
|
|
@@ -702,7 +697,7 @@ void CYubaozhuangbiaoqianPageUI::HandleChengzhongValueChange()
|
|
|
pWendingStatus->SetBkImage(L"deng_off.png");
|
|
|
}
|
|
|
|
|
|
- CLabelUI* pLabel = static_cast<CLabelUI*>(this->FindSubControl(_T("diandan_page_label_chengzhong_value")));
|
|
|
+ CLabelUI* pLabel = static_cast<CLabelUI*>(this->FindSubControl(_T("yubaozhuangbiaoqian_page_label_chengzhong_value")));
|
|
|
pLabel->SetText(CLewaimaiString::UTF8ToUnicode(weight).c_str());
|
|
|
}
|
|
|
|