|
@@ -0,0 +1,433 @@
|
|
|
|
|
+#include "../pch/pch.h"
|
|
|
|
|
+#include "CWaimaiOrderListPageUI.h"
|
|
|
|
|
+
|
|
|
|
|
+#include "../control/CWaimaiOrderItemUI.h"
|
|
|
|
|
+
|
|
|
|
|
+#include "../control/ControlEx.h"
|
|
|
|
|
+
|
|
|
|
|
+#include "../network/CMessagePush.h"
|
|
|
|
|
+#include "../wnd/CWaimaiOrderFailReasonWnd.h"
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+CWaimaiOrderListPageUI::CWaimaiOrderListPageUI()
|
|
|
|
|
+{
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+CWaimaiOrderListPageUI::~CWaimaiOrderListPageUI()
|
|
|
|
|
+{
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//初始化当前页面的展示,处理默认展示效果,在页面被加载的时候调用
|
|
|
|
|
+void CWaimaiOrderListPageUI::InitShow()
|
|
|
|
|
+{
|
|
|
|
|
+ m_pOrderListLayout = static_cast<CContainerUI*>(this->FindSubControl(_T("orderlist")));
|
|
|
|
|
+
|
|
|
|
|
+ //默认显示未处理的
|
|
|
|
|
+ COptionUI* option = static_cast<COptionUI*>(this->FindSubControl(_T("waimai_open_switch")));
|
|
|
|
|
+ option->Selected(true, false);
|
|
|
|
|
+
|
|
|
|
|
+ SetStatus(1);
|
|
|
|
|
+ SetPage(1);
|
|
|
|
|
+ Refresh();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//处理按钮点击类事件
|
|
|
|
|
+void CWaimaiOrderListPageUI::HandleClickMsg(TNotifyUI& msg)
|
|
|
|
|
+{
|
|
|
|
|
+ CDuiString name = msg.pSender->GetName();
|
|
|
|
|
+
|
|
|
|
|
+ if (name == _T("waimai_order_list_print"))
|
|
|
|
|
+ {
|
|
|
|
|
+ CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
|
|
|
|
|
+ std::string waimai_order_id = item->getOrderID();
|
|
|
|
|
+ std::string waimai_order_no = item->getOrderNo();
|
|
|
|
|
+ m_pMainWnd->getMessagePush()->AddPinter(waimai_order_id, waimai_order_no, 2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_confirme"))
|
|
|
|
|
+ {
|
|
|
|
|
+ CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
|
|
|
|
|
+ std::string waimai_order_id = item->getOrderID();
|
|
|
|
|
+ CWaimaiOrder order;
|
|
|
|
|
+ bool ret = order.ConfirmeOrder(waimai_order_id);
|
|
|
|
|
+
|
|
|
|
|
+ if (ret)
|
|
|
|
|
+ {
|
|
|
|
|
+ //如果确认成功,将被确认的订单删除掉
|
|
|
|
|
+ CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
|
|
|
|
|
+ int index = orderlist->GetItemIndex(item);
|
|
|
|
|
+ orderlist->RemoveAt(index);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_success"))
|
|
|
|
|
+ {
|
|
|
|
|
+ CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
|
|
|
|
|
+ std::string waimai_order_id = item->getOrderID();
|
|
|
|
|
+ CWaimaiOrder order;
|
|
|
|
|
+ bool ret = order.SuccessOrder(waimai_order_id);
|
|
|
|
|
+
|
|
|
|
|
+ if (ret)
|
|
|
|
|
+ {
|
|
|
|
|
+ //如果确认成功,将被确认的订单删除掉
|
|
|
|
|
+ CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
|
|
|
|
|
+ int index = orderlist->GetItemIndex(item);
|
|
|
|
|
+ orderlist->RemoveAt(index);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_fail"))
|
|
|
|
|
+ {
|
|
|
|
|
+ //外卖订单的打印
|
|
|
|
|
+ CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
|
|
|
|
|
+ std::string waimai_order_id = item->getOrderID();
|
|
|
|
|
+
|
|
|
|
|
+ CWaimaiOrderFailReasonWnd* pWaimaiFailFrame = new CWaimaiOrderFailReasonWnd();
|
|
|
|
|
+ pWaimaiFailFrame->Create(m_pMainWnd->GetHWND(), _T(""), UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE);
|
|
|
|
|
+ pWaimaiFailFrame->SetIcon(IDI_ICON_DUILIB);
|
|
|
|
|
+ pWaimaiFailFrame->CenterWindow();
|
|
|
|
|
+ UINT ret = pWaimaiFailFrame->ShowModal();
|
|
|
|
|
+
|
|
|
|
|
+ if (ret == IDOK)
|
|
|
|
|
+ {
|
|
|
|
|
+ std::string sReason = pWaimaiFailFrame->getReason();
|
|
|
|
|
+ CWaimaiOrder order;
|
|
|
|
|
+ bool ret = order.FailOrder(waimai_order_id, sReason);
|
|
|
|
|
+
|
|
|
|
|
+ if (ret)
|
|
|
|
|
+ {
|
|
|
|
|
+ //如果设为失败成功,将被设为失败的订单删除掉
|
|
|
|
|
+ CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
|
|
|
|
|
+ int index = orderlist->GetItemIndex(item);
|
|
|
|
|
+ orderlist->RemoveAt(index);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ delete pWaimaiFailFrame;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_agree"))
|
|
|
|
|
+ {
|
|
|
|
|
+ CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
|
|
|
|
|
+ std::string waimai_order_id = item->getOrderID();
|
|
|
|
|
+ CWaimaiOrder order;
|
|
|
|
|
+ bool ret = order.AgreeRefund(waimai_order_id);
|
|
|
|
|
+
|
|
|
|
|
+ if (ret)
|
|
|
|
|
+ {
|
|
|
|
|
+ //同意退款之后,订单变为失败状态
|
|
|
|
|
+ CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
|
|
|
|
|
+ int index = orderlist->GetItemIndex(item);
|
|
|
|
|
+ orderlist->RemoveAt(index);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_disagree"))
|
|
|
|
|
+ {
|
|
|
|
|
+ CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
|
|
|
|
|
+ std::string waimai_order_id = item->getOrderID();
|
|
|
|
|
+ CWaimaiOrder order;
|
|
|
|
|
+ bool ret = order.DisagreeRefund(waimai_order_id);
|
|
|
|
|
+
|
|
|
|
|
+ if (ret)
|
|
|
|
|
+ {
|
|
|
|
|
+ //不同意退款,订单还是退款中,等待第三方客服处理
|
|
|
|
|
+ //CVerticalLayoutUI* orderlist = static_cast<CVerticalLayoutUI*>(this->FindSubControl(_T("orderlist")));
|
|
|
|
|
+ //int index = orderlist->GetItemIndex(item);
|
|
|
|
|
+ //orderlist->RemoveAt(index);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_info"))
|
|
|
|
|
+ {
|
|
|
|
|
+ CWaimaiOrderItemUI* item = static_cast<CWaimaiOrderItemUI*>(msg.pSender->GetParent()->GetParent());
|
|
|
|
|
+ std::string waimai_order_id = item->getOrderID();
|
|
|
|
|
+ std::string waimai_order_no = item->getOrderNo();
|
|
|
|
|
+
|
|
|
|
|
+ m_pMainWnd->SetInfopageWaimaiorderParam(waimai_order_id, waimai_order_no);
|
|
|
|
|
+
|
|
|
|
|
+ m_pMainWnd->SwitchPage(CMainWnd::WAIMAIINFO);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_last"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->LastPage();
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_next"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->NextPage();
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_order_list_refresh"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->Refresh();
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//处理option切换事件
|
|
|
|
|
+void CWaimaiOrderListPageUI::HandleSelectChangeMsg(TNotifyUI& msg)
|
|
|
|
|
+{
|
|
|
|
|
+ CDuiString name = msg.pSender->GetName();
|
|
|
|
|
+
|
|
|
|
|
+ //判断外卖的tab
|
|
|
|
|
+ if (name == _T("waimai_open_switch") || name == _T("waimai_confirmed_switch") || name == _T("waimai_delivery_switch") || name == _T("waimai_success_switch") || name == _T("waimai_fail_switch") || name == _T("waimai_cancel_switch") || name == _T("waimai_refund_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ //切换状态全部重新开始从第1页
|
|
|
|
|
+ this->SetPage(1);
|
|
|
|
|
+
|
|
|
|
|
+ if (name == _T("waimai_open_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->SetStatus(1);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_confirmed_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->SetStatus(2);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_delivery_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->SetStatus(3);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_success_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->SetStatus(4);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_fail_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->SetStatus(5);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_cancel_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->SetStatus(6);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (name == _T("waimai_refund_switch"))
|
|
|
|
|
+ {
|
|
|
|
|
+ this->SetStatus(7);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this->Refresh();
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+//处理下拉框、radio的切换事件
|
|
|
|
|
+void CWaimaiOrderListPageUI::HandleItemSelectMsg(TNotifyUI& msg)
|
|
|
|
|
+{
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void CWaimaiOrderListPageUI::Refresh()
|
|
|
|
|
+{
|
|
|
|
|
+ //开始转菊花
|
|
|
|
|
+ m_pOrderListLayout->SetVisible(false);
|
|
|
|
|
+
|
|
|
|
|
+ this->FindSubControl(_T("main_orderlist_loading"))->SetVisible(true);
|
|
|
|
|
+
|
|
|
|
|
+ //启动一个线程,进行网络请求操作
|
|
|
|
|
+ OrderListStatus* status = new OrderListStatus;
|
|
|
|
|
+ status->m_status = m_status;
|
|
|
|
|
+ status->m_page = m_page;
|
|
|
|
|
+
|
|
|
|
|
+ std::thread t(&CWaimaiOrderListPageUI::HandleRefresh, this, status);
|
|
|
|
|
+ t.detach();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void CWaimaiOrderListPageUI::HandleRefresh(OrderListStatus* status)
|
|
|
|
|
+{
|
|
|
|
|
+ std::string url;
|
|
|
|
|
+ if (status->m_status == 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "/waimaiorder/getopenlist";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (status->m_status == 2)
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "/waimaiorder/getconfirmedlist";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (status->m_status == 3)
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "/waimaiorder/getdeliverylist";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (status->m_status == 4)
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "/waimaiorder/getsucceededlist";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (status->m_status == 5)
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "/waimaiorder/getfailedlist";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (status->m_status == 6)
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "/waimaiorder/getcancelledlist";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (status->m_status == 7)
|
|
|
|
|
+ {
|
|
|
|
|
+ url = "/waimaiorder/getrefundlist";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //请求外卖的未处理订单,直接用当前的page值去请求
|
|
|
|
|
+ std::map<string, string> params;
|
|
|
|
|
+ params["page"] = to_string(status->m_page);
|
|
|
|
|
+ std::string response;
|
|
|
|
|
+
|
|
|
|
|
+ CZhipuziHttpClient::Request(url.c_str(), params, response);
|
|
|
|
|
+
|
|
|
|
|
+ //走到这里,网络请求结束了,对比状态是否发生了改变
|
|
|
|
|
+ if (status->m_page != m_page || status->m_status != m_status)
|
|
|
|
|
+ {
|
|
|
|
|
+ //用户已经点击了其他状态,这个状态结果无效了,直接返回
|
|
|
|
|
+ delete status;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //将网络返回结果保存起来,等待消息处理重新渲染页面
|
|
|
|
|
+ m_response = response;
|
|
|
|
|
+
|
|
|
|
|
+ ::PostMessage(m_pManager->GetPaintWindow(), WM_ORDERLIST_REFRESH, 0, 0);
|
|
|
|
|
+
|
|
|
|
|
+ delete status;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void CWaimaiOrderListPageUI::DoRefresh()
|
|
|
|
|
+{
|
|
|
|
|
+ //请求成功之后,清空之前的数据
|
|
|
|
|
+ m_pOrderListLayout->RemoveAll();
|
|
|
|
|
+
|
|
|
|
|
+ rapidjson::Document document;
|
|
|
|
|
+ document.Parse(m_response.c_str());
|
|
|
|
|
+
|
|
|
|
|
+ if (document.HasParseError())
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_INFO("parse response error!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!document.HasMember("errcode") || !document.HasMember("errmsg") || !document.HasMember("data"))
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_INFO("json error!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ rapidjson::Value& v_errcode = document["errcode"];
|
|
|
|
|
+ int errcode = v_errcode.GetInt();
|
|
|
|
|
+ if (errcode != 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_INFO("response failed! message:" << document["errmsg"].GetString());
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //获得数据成功
|
|
|
|
|
+ rapidjson::Value& data = document["data"];
|
|
|
|
|
+
|
|
|
|
|
+ rapidjson::Value& v_count = data["count"];
|
|
|
|
|
+ string count = v_count.GetString();
|
|
|
|
|
+
|
|
|
|
|
+ //处理页数
|
|
|
|
|
+ int nCount = atoi(count.c_str());
|
|
|
|
|
+ m_total_page = (int)ceil(nCount / 20.0);
|
|
|
|
|
+ if (m_total_page < 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_total_page = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (m_page <= 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_page = 1;
|
|
|
|
|
+ CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_last")));
|
|
|
|
|
+ pControl->SetEnabled(false);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (m_page >= m_total_page)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_page = m_total_page;
|
|
|
|
|
+ CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_next")));
|
|
|
|
|
+ pControl->SetEnabled(false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (m_page > 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_last")));
|
|
|
|
|
+ pControl->SetEnabled(true);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (m_page < m_total_page)
|
|
|
|
|
+ {
|
|
|
|
|
+ CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_next")));
|
|
|
|
|
+ pControl->SetEnabled(true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ CLabelUI* pControl = static_cast<CLabelUI*>(this->FindSubControl(_T("waimai_order_list_page")));
|
|
|
|
|
+ wstring pageinfo = _T("第 ") + CLewaimaiString::ANSIToUnicode(to_string(m_page)) + _T("页/共 ") + CLewaimaiString::ANSIToUnicode(to_string(m_total_page)) + _T("页");
|
|
|
|
|
+ pControl->SetText(pageinfo.c_str());
|
|
|
|
|
+
|
|
|
|
|
+ rapidjson::Value& v_rows = data["rows"];
|
|
|
|
|
+
|
|
|
|
|
+ for (rapidjson::SizeType i = 0; i < v_rows.Size(); ++i)
|
|
|
|
|
+ {
|
|
|
|
|
+ rapidjson::Value& v_row_i = v_rows[i];
|
|
|
|
|
+
|
|
|
|
|
+ //创建一个对象
|
|
|
|
|
+ CDialogBuilder builder;
|
|
|
|
|
+ CDialogBuilderCallbackEx cb;
|
|
|
|
|
+
|
|
|
|
|
+ CWaimaiOrderItemUI* pItem = static_cast<CWaimaiOrderItemUI*>(builder.Create(_T("waimai_order_item.xml"), (UINT)0, &cb, m_pManager));
|
|
|
|
|
+ if (pItem != NULL)
|
|
|
|
|
+ {
|
|
|
|
|
+ //初始化该对应的数据
|
|
|
|
|
+ pItem->SetStatus(m_status);
|
|
|
|
|
+
|
|
|
|
|
+ pItem->SetData(v_row_i);
|
|
|
|
|
+
|
|
|
|
|
+ m_pOrderListLayout->Add(pItem);
|
|
|
|
|
+
|
|
|
|
|
+ pItem = NULL;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_INFO("create waimai_order_item fail!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //重置滚动条的位置
|
|
|
|
|
+ tagSIZE size;
|
|
|
|
|
+ size.cx = 0;
|
|
|
|
|
+ size.cy = 0;
|
|
|
|
|
+ m_pOrderListLayout->SetScrollPos(size);
|
|
|
|
|
+
|
|
|
|
|
+ m_pOrderListLayout->SetVisible(true);
|
|
|
|
|
+
|
|
|
|
|
+ this->FindSubControl(_T("main_orderlist_loading"))->SetVisible(false);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void CWaimaiOrderListPageUI::LastPage()
|
|
|
|
|
+{
|
|
|
|
|
+ m_page--;
|
|
|
|
|
+ if (m_page < 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_page = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (m_page == 1)
|
|
|
|
|
+ {
|
|
|
|
|
+ CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_last")));
|
|
|
|
|
+ pControl->SetEnabled(false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Refresh();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void CWaimaiOrderListPageUI::NextPage()
|
|
|
|
|
+{
|
|
|
|
|
+ m_page++;
|
|
|
|
|
+ if (m_page > m_total_page)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_page = m_total_page;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (m_page == m_total_page)
|
|
|
|
|
+ {
|
|
|
|
|
+ CButtonUI* pControl = static_cast<CButtonUI*>(this->FindSubControl(_T("waimai_order_list_next")));
|
|
|
|
|
+ pControl->SetEnabled(false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Refresh();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void CWaimaiOrderListPageUI::SetStatus(int status)
|
|
|
|
|
+{
|
|
|
|
|
+ m_status = status;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void CWaimaiOrderListPageUI::SetPage(int n)
|
|
|
|
|
+{
|
|
|
|
|
+ m_page = n;
|
|
|
|
|
+}
|