|
@@ -42,7 +42,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//重设商品列表的高度
|
|
//重设商品列表的高度
|
|
|
- pFoodList->SetFixedHeight((order.m_order_items.size() + 1) * 30);
|
|
|
|
|
|
|
+ int order_item_height = (order.m_order_items.size() + 1) * 30;
|
|
|
|
|
+ pFoodList->SetFixedHeight(order_item_height);
|
|
|
|
|
|
|
|
CLabelUI *pMemo = static_cast<CLabelUI *>(this->FindSubControl(_T("waimaorder_info_page_memo")));
|
|
CLabelUI *pMemo = static_cast<CLabelUI *>(this->FindSubControl(_T("waimaorder_info_page_memo")));
|
|
|
wstring memo = _T("备注:") + CLewaimaiString::UTF8ToUnicode(order.m_memo);
|
|
wstring memo = _T("备注:") + CLewaimaiString::UTF8ToUnicode(order.m_memo);
|
|
@@ -186,22 +187,31 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
fees_num++;
|
|
fees_num++;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ int fees_height;
|
|
|
if (fees_num == 0)
|
|
if (fees_num == 0)
|
|
|
{
|
|
{
|
|
|
pFeesLayout->SetVisible(false);
|
|
pFeesLayout->SetVisible(false);
|
|
|
this->FindSubControl(_T("waimai_order_info_page_fees_line"))->SetVisible(false);
|
|
this->FindSubControl(_T("waimai_order_info_page_fees_line"))->SetVisible(false);
|
|
|
|
|
+
|
|
|
|
|
+ fees_height = 0;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
pFeesLayout->SetVisible(true);
|
|
pFeesLayout->SetVisible(true);
|
|
|
this->FindSubControl(_T("waimai_order_info_page_fees_line"))->SetVisible(true);
|
|
this->FindSubControl(_T("waimai_order_info_page_fees_line"))->SetVisible(true);
|
|
|
pFeesLayout->SetFixedHeight(fees_num * 30);
|
|
pFeesLayout->SetFixedHeight(fees_num * 30);
|
|
|
|
|
+
|
|
|
|
|
+ fees_height = fees_num * 30;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
CLabelUI *pTotalPrice = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_totalprice")));
|
|
CLabelUI *pTotalPrice = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_totalprice")));
|
|
|
wstring price = L"总计:¥" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString(order.m_price, 2));
|
|
wstring price = L"总计:¥" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString(order.m_price, 2));
|
|
|
pTotalPrice->SetText(price.c_str());
|
|
pTotalPrice->SetText(price.c_str());
|
|
|
|
|
|
|
|
|
|
+ int nTotalHeight = order_item_height + fees_height + 133;
|
|
|
|
|
+ this->FindSubControl(_T("waimai_order_info_page_layout_1"))->SetFixedHeight(nTotalHeight);
|
|
|
|
|
+
|
|
|
|
|
+ //开始显示顾客信息
|
|
|
std::wstring name_show = L"姓名:" + CLewaimaiString::UTF8ToUnicode(order.m_customer_name);
|
|
std::wstring name_show = L"姓名:" + CLewaimaiString::UTF8ToUnicode(order.m_customer_name);
|
|
|
this->FindSubControl(_T("waimai_order_info_page_name"))->SetText(name_show.c_str());
|
|
this->FindSubControl(_T("waimai_order_info_page_name"))->SetText(name_show.c_str());
|
|
|
|
|
|
|
@@ -247,6 +257,7 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
this->FindSubControl(_T("waimai_order_info_page_qishouinfo"))->SetVisible(false);
|
|
this->FindSubControl(_T("waimai_order_info_page_qishouinfo"))->SetVisible(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //开始处理订单信息
|
|
|
if (order.m_is_selftake == "1")
|
|
if (order.m_is_selftake == "1")
|
|
|
{
|
|
{
|
|
|
CLabelUI *pDeliveryType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_delivery_type")));
|
|
CLabelUI *pDeliveryType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_delivery_type")));
|
|
@@ -260,6 +271,14 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
pDeliveryType->SetText(wsDeliveryType.c_str());
|
|
pDeliveryType->SetText(wsDeliveryType.c_str());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ CLabelUI *pStatus = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_status")));
|
|
|
|
|
+ wstring wsStatus = _T("订单状态:") + CLewaimaiString::UTF8ToUnicode(order.m_order_status);
|
|
|
|
|
+ if (CLewaimaiString::UTF8ToUnicode(order.m_order_status) == _T("交易失败"))
|
|
|
|
|
+ {
|
|
|
|
|
+ wsStatus += _T(",失败原因:") + CLewaimaiString::UTF8ToUnicode(order.m_failed_reason);
|
|
|
|
|
+ }
|
|
|
|
|
+ pStatus->SetText(wsStatus.c_str());
|
|
|
|
|
+
|
|
|
CLabelUI *pType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_type")));
|
|
CLabelUI *pType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_type")));
|
|
|
wstring wsType = _T("订单来源:") + CLewaimaiString::UTF8ToUnicode(order.m_from_type);
|
|
wstring wsType = _T("订单来源:") + CLewaimaiString::UTF8ToUnicode(order.m_from_type);
|
|
|
pType->SetText(wsType.c_str());
|
|
pType->SetText(wsType.c_str());
|
|
@@ -268,6 +287,7 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
CVerticalLayoutUI* pLayout = static_cast<CVerticalLayoutUI *>(this->FindSubControl(_T("waimai_order_info_page_field")));
|
|
CVerticalLayoutUI* pLayout = static_cast<CVerticalLayoutUI *>(this->FindSubControl(_T("waimai_order_info_page_field")));
|
|
|
pLayout->RemoveAll();
|
|
pLayout->RemoveAll();
|
|
|
|
|
|
|
|
|
|
+ int order_filed_height;
|
|
|
if (order.m_order_field.size() > 1)
|
|
if (order.m_order_field.size() > 1)
|
|
|
{
|
|
{
|
|
|
for (std::vector<CWaimaiOrderField>::iterator it = order.m_order_field.begin(); it != order.m_order_field.end() - 1; it++)
|
|
for (std::vector<CWaimaiOrderField>::iterator it = order.m_order_field.begin(); it != order.m_order_field.end() - 1; it++)
|
|
@@ -285,10 +305,14 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
//这里预设选项默认有一个配送时间,所以要减1
|
|
//这里预设选项默认有一个配送时间,所以要减1
|
|
|
pLayout->SetFixedHeight((order.m_order_field.size() - 1) * 30);
|
|
pLayout->SetFixedHeight((order.m_order_field.size() - 1) * 30);
|
|
|
|
|
|
|
|
|
|
+ order_filed_height = (order.m_order_field.size() - 1) * 30;
|
|
|
|
|
+
|
|
|
pLayout->SetVisible(true);
|
|
pLayout->SetVisible(true);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
|
|
+ order_filed_height = 0;
|
|
|
|
|
+
|
|
|
pLayout->SetVisible(false);
|
|
pLayout->SetVisible(false);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -320,6 +344,7 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
|
|
|
|
|
CLabelUI *pRefundStatus = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_refund_status")));
|
|
CLabelUI *pRefundStatus = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_refund_status")));
|
|
|
|
|
|
|
|
|
|
+ int refundHeight = 0;
|
|
|
if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("未处理")) == 0)
|
|
if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("未处理")) == 0)
|
|
|
{
|
|
{
|
|
|
confirm_button->SetVisible(true);
|
|
confirm_button->SetVisible(true);
|
|
@@ -400,6 +425,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
|
|
|
|
|
pRefundStatus->SetVisible(true);
|
|
pRefundStatus->SetVisible(true);
|
|
|
|
|
|
|
|
|
|
+ refundHeight = 30;
|
|
|
|
|
+
|
|
|
std::wstring refund_status_text = L"退款状态:";
|
|
std::wstring refund_status_text = L"退款状态:";
|
|
|
if (refund_status == "1")
|
|
if (refund_status == "1")
|
|
|
{
|
|
{
|
|
@@ -421,7 +448,21 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
{
|
|
{
|
|
|
refund_status_text += L"顾客再次发起退款,等待客服介入处理中";
|
|
refund_status_text += L"顾客再次发起退款,等待客服介入处理中";
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (refund_status == "10")
|
|
|
|
|
+ {
|
|
|
|
|
+ refund_status_text += L"退款处理中,等待退款结果";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (refund_status == "11")
|
|
|
|
|
+ {
|
|
|
|
|
+ refund_status_text += L"退款已完成";
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (refund_status == "12")
|
|
|
|
|
+ {
|
|
|
|
|
+ refund_status_text += L"退款失败,原因:" + CLewaimaiString::UTF8ToUnicode(order.m_refund_failed_reason);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
pRefundStatus->SetText(refund_status_text.c_str());
|
|
pRefundStatus->SetText(refund_status_text.c_str());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ this->FindSubControl(_T("waimai_order_info_page_layout_3"))->SetFixedHeight(order_filed_height + refundHeight + 181);
|
|
|
}
|
|
}
|