|
|
@@ -326,6 +326,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
CButtonUI* agree_button = static_cast<CButtonUI *>(m_pManager->FindControl(_T("waimai_order_info_page_agree")));
|
|
|
CButtonUI* disagree_button = static_cast<CButtonUI *>(m_pManager->FindControl(_T("waimai_order_info_page_disagree")));
|
|
|
|
|
|
+ CButtonUI* refund_button = static_cast<CButtonUI *>(m_pManager->FindControl(_T("waimai_order_info_page_refund")));
|
|
|
+
|
|
|
CLabelUI *pRefundStatus = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_refund_status")));
|
|
|
|
|
|
int refundHeight = 0;
|
|
|
@@ -338,6 +340,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
agree_button->SetVisible(false);
|
|
|
disagree_button->SetVisible(false);
|
|
|
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+
|
|
|
pRefundStatus->SetVisible(false);
|
|
|
}
|
|
|
else if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("已确认")) == 0)
|
|
|
@@ -349,6 +353,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
agree_button->SetVisible(false);
|
|
|
disagree_button->SetVisible(false);
|
|
|
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+
|
|
|
pRefundStatus->SetVisible(false);
|
|
|
}
|
|
|
else if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("交易成功")) == 0)
|
|
|
@@ -360,6 +366,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
agree_button->SetVisible(false);
|
|
|
disagree_button->SetVisible(false);
|
|
|
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+
|
|
|
pRefundStatus->SetVisible(false);
|
|
|
}
|
|
|
else if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("交易失败")) == 0)
|
|
|
@@ -371,7 +379,43 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
agree_button->SetVisible(false);
|
|
|
disagree_button->SetVisible(false);
|
|
|
|
|
|
- pRefundStatus->SetVisible(false);
|
|
|
+ std::string refund_status = m_order.m_refund_status;
|
|
|
+
|
|
|
+ if (CLewaimaiString::UTF8ToUnicode(order.m_pay_type) != L"货到付款")
|
|
|
+ {
|
|
|
+ pRefundStatus->SetVisible(true);
|
|
|
+ refundHeight = 30;
|
|
|
+
|
|
|
+ std::wstring refund_status_text = L"退款状态:";
|
|
|
+ if (refund_status == "0")
|
|
|
+ {
|
|
|
+ refund_button->SetVisible(true);
|
|
|
+ refund_status_text += L"未处理";
|
|
|
+ }
|
|
|
+ else if (refund_status == "10")
|
|
|
+ {
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+ refund_status_text += L"退款处理中,等待退款结果";
|
|
|
+ }
|
|
|
+ else if (refund_status == "11")
|
|
|
+ {
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+ refund_status_text += L"退款已完成";
|
|
|
+ }
|
|
|
+ else if (refund_status == "12")
|
|
|
+ {
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+ refund_status_text += L"退款失败,原因:" + CLewaimaiString::UTF8ToUnicode(order.m_refund_failed_reason);
|
|
|
+ }
|
|
|
+
|
|
|
+ pRefundStatus->SetText(refund_status_text.c_str());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+
|
|
|
+ pRefundStatus->SetVisible(false);
|
|
|
+ }
|
|
|
}
|
|
|
else if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("已取消")) == 0)
|
|
|
{
|
|
|
@@ -382,6 +426,8 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
agree_button->SetVisible(false);
|
|
|
disagree_button->SetVisible(false);
|
|
|
|
|
|
+ refund_button->SetVisible(false);
|
|
|
+
|
|
|
pRefundStatus->SetVisible(false);
|
|
|
}
|
|
|
else if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("退款中")) == 0)
|
|
|
@@ -407,8 +453,9 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
disagree_button->SetVisible(false);
|
|
|
}
|
|
|
|
|
|
- pRefundStatus->SetVisible(true);
|
|
|
+ refund_button->SetVisible(false);
|
|
|
|
|
|
+ pRefundStatus->SetVisible(true);
|
|
|
refundHeight = 30;
|
|
|
|
|
|
std::wstring refund_status_text = L"退款状态:";
|
|
|
@@ -432,18 +479,6 @@ void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
{
|
|
|
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());
|
|
|
}
|