|
@@ -56,10 +56,17 @@ void CZhengcanTableItemUI::UpdateShow()
|
|
|
CLabelUI* pRenshu = static_cast<CLabelUI*>(this->FindSubControl(_T("renshu")));
|
|
CLabelUI* pRenshu = static_cast<CLabelUI*>(this->FindSubControl(_T("renshu")));
|
|
|
CLabelUI* pShijian = static_cast<CLabelUI*>(this->FindSubControl(_T("shijian")));
|
|
CLabelUI* pShijian = static_cast<CLabelUI*>(this->FindSubControl(_T("shijian")));
|
|
|
|
|
|
|
|
|
|
+ CControlUI* pPeopleImage = static_cast<CControlUI*>(this->FindSubControl(_T("people_image")));
|
|
|
|
|
+ CControlUI* pTimeImage = static_cast<CControlUI*>(this->FindSubControl(_T("time_image")));
|
|
|
|
|
+
|
|
|
if (m_status == "0")
|
|
if (m_status == "0")
|
|
|
{
|
|
{
|
|
|
//未开台
|
|
//未开台
|
|
|
pStatus->SetText(L"未开台");
|
|
pStatus->SetText(L"未开台");
|
|
|
|
|
+
|
|
|
|
|
+ //隐藏时钟
|
|
|
|
|
+ pTimeImage->SetVisible(false);
|
|
|
|
|
+ pShijian->SetVisible(false);
|
|
|
}
|
|
}
|
|
|
else if (m_status == "1")
|
|
else if (m_status == "1")
|
|
|
{
|
|
{
|
|
@@ -74,6 +81,27 @@ void CZhengcanTableItemUI::UpdateShow()
|
|
|
pRenshu->SetTextColor(0xFFFFFFFF);
|
|
pRenshu->SetTextColor(0xFFFFFFFF);
|
|
|
pShijian->SetTextColor(0xFFFFFFFF);
|
|
pShijian->SetTextColor(0xFFFFFFFF);
|
|
|
|
|
|
|
|
|
|
+ pPeopleImage->SetBkImage(L"zhengcan_people_1.png");
|
|
|
|
|
+ pTimeImage->SetBkImage(L"zhengcan_time_1.png");
|
|
|
|
|
+
|
|
|
|
|
+ time_t now = time(NULL);
|
|
|
|
|
+ time_t init_time = CLewaimaiTime::StringToDatetime(m_order_init_time);
|
|
|
|
|
+
|
|
|
|
|
+ time_t diff = now - init_time;
|
|
|
|
|
+ int fenzhong = (int)(diff / 60);
|
|
|
|
|
+
|
|
|
|
|
+ std::wstring ws_fenzhong;
|
|
|
|
|
+ if (fenzhong > 999)
|
|
|
|
|
+ {
|
|
|
|
|
+ ws_fenzhong = L">999";
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ ws_fenzhong = to_wstring(fenzhong);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ pShijian->SetText((ws_fenzhong + L"分钟").c_str());
|
|
|
|
|
+
|
|
|
CHorizontalLayoutUI* pBottom = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(L"zhengcan_tableitem_bottom"));
|
|
CHorizontalLayoutUI* pBottom = static_cast<CHorizontalLayoutUI*>(this->FindSubControl(L"zhengcan_tableitem_bottom"));
|
|
|
|
|
|
|
|
//区分待下单、待结账、待清台这3个状态
|
|
//区分待下单、待结账、待清台这3个状态
|