|
@@ -34,7 +34,7 @@ void CZhengcanTableItemUI::DoEvent(TEventUI& event)
|
|
|
CVerticalLayoutUI::DoEvent(event);
|
|
CVerticalLayoutUI::DoEvent(event);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CZhengcanTableItemUI::SetInfo(std::string table_id, std::string table_name, std::string type_id, std::string status, std::string order_init_time, std::string from_type, std::string order_status)
|
|
|
|
|
|
|
+void CZhengcanTableItemUI::SetInfo(std::string table_id, std::string table_name, std::string type_id, std::string status, std::string order_init_time, std::string from_type, std::string order_status, std::string order_id)
|
|
|
{
|
|
{
|
|
|
m_table_id = table_id;
|
|
m_table_id = table_id;
|
|
|
m_table_name = table_name;
|
|
m_table_name = table_name;
|
|
@@ -43,6 +43,7 @@ void CZhengcanTableItemUI::SetInfo(std::string table_id, std::string table_name,
|
|
|
m_order_init_time = order_init_time;
|
|
m_order_init_time = order_init_time;
|
|
|
m_from_type = from_type;
|
|
m_from_type = from_type;
|
|
|
m_order_status = order_status;
|
|
m_order_status = order_status;
|
|
|
|
|
+ m_order_id = order_id;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void CZhengcanTableItemUI::UpdateShow()
|
|
void CZhengcanTableItemUI::UpdateShow()
|
|
@@ -52,6 +53,9 @@ void CZhengcanTableItemUI::UpdateShow()
|
|
|
|
|
|
|
|
CLabelUI* pStatus = static_cast<CLabelUI*>(this->FindSubControl(_T("status")));
|
|
CLabelUI* pStatus = static_cast<CLabelUI*>(this->FindSubControl(_T("status")));
|
|
|
|
|
|
|
|
|
|
+ CLabelUI* pRenshu = static_cast<CLabelUI*>(this->FindSubControl(_T("renshu")));
|
|
|
|
|
+ CLabelUI* pShijian = static_cast<CLabelUI*>(this->FindSubControl(_T("shijian")));
|
|
|
|
|
+
|
|
|
if (m_status == "0")
|
|
if (m_status == "0")
|
|
|
{
|
|
{
|
|
|
//未开台
|
|
//未开台
|
|
@@ -64,6 +68,38 @@ void CZhengcanTableItemUI::UpdateShow()
|
|
|
else if (m_status == "2")
|
|
else if (m_status == "2")
|
|
|
{
|
|
{
|
|
|
//已开台
|
|
//已开台
|
|
|
- pStatus->SetText(L"已开台");
|
|
|
|
|
|
|
+ pName->SetTextColor(0xFFFFFFFF);
|
|
|
|
|
+ pStatus->SetTextColor(0xFFFFFFFF);
|
|
|
|
|
+
|
|
|
|
|
+ pRenshu->SetTextColor(0xFFFFFFFF);
|
|
|
|
|
+ pShijian->SetTextColor(0xFFFFFFFF);
|
|
|
|
|
+
|
|
|
|
|
+ CHorizontalLayoutUI* pBottom = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(L"zhengcan_tableitem_bottom"));
|
|
|
|
|
+
|
|
|
|
|
+ //区分待下单、待结账、待清台这3个状态
|
|
|
|
|
+ if (m_order_id == "0")
|
|
|
|
|
+ {
|
|
|
|
|
+ //说明还未下单,处于待下单状态,用绿色
|
|
|
|
|
+ this->SetBkColor(0xFF3CB371);
|
|
|
|
|
+ pBottom->SetBkColor(0xFF28A25E);
|
|
|
|
|
+
|
|
|
|
|
+ pStatus->SetText(L"待下单");
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (m_order_status == "OPEN")
|
|
|
|
|
+ {
|
|
|
|
|
+ //说明已下单,未支付,处于待支付状态,用红色
|
|
|
|
|
+ this->SetBkColor(0xFFF95252);
|
|
|
|
|
+ pBottom->SetBkColor(0xFFF73F3F);
|
|
|
|
|
+
|
|
|
|
|
+ pStatus->SetText(L"待结账");
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (m_order_status == "SUCCESS")
|
|
|
|
|
+ {
|
|
|
|
|
+ //待清台,用蓝色
|
|
|
|
|
+ this->SetBkColor(0xFF497FC7);
|
|
|
|
|
+ pBottom->SetBkColor(0xFF3A74C2);
|
|
|
|
|
+
|
|
|
|
|
+ pStatus->SetText(L"待清台");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|