|
|
@@ -1,531 +0,0 @@
|
|
|
-#include "../pch/pch.h"
|
|
|
-#include "CWaimaiOrderInfoUI.h"
|
|
|
-
|
|
|
-#include "ControlEx.h"
|
|
|
-
|
|
|
-void CWaimaiOrderInfoUI::DoEvent(TEventUI& event)
|
|
|
-{
|
|
|
- CVerticalLayoutUI::DoEvent(event);
|
|
|
-}
|
|
|
-
|
|
|
-void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
|
|
|
-{
|
|
|
- std::wstring liushuihao_show = L"#" + CLewaimaiString::UTF8ToUnicode(order.m_restaurant_number);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_liushuihao"))->SetText(liushuihao_show.c_str());
|
|
|
-
|
|
|
- std::wstring order_no_show = L"订单号:" + CLewaimaiString::UTF8ToUnicode(order.m_order_no);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_order_no"))->SetText(order_no_show.c_str());
|
|
|
-
|
|
|
- //商品详情的渲染
|
|
|
- CListUI* pFoodList = static_cast<CListUI*>(this->FindSubControl(_T("waimai_order_info_page_foodlist")));
|
|
|
- pFoodList->RemoveAll();
|
|
|
-
|
|
|
- for (std::vector<CWaimaiOrderItem>::iterator it = order.m_order_items.begin(); it != order.m_order_items.end(); it++)
|
|
|
- {
|
|
|
- std::string food_name = (*it).m_food_name;
|
|
|
- std::string food_price = (*it).m_item_price;
|
|
|
- std::string quantity = (*it).m_quantity;
|
|
|
-
|
|
|
- CDialogBuilder builder;
|
|
|
- CListContainerElementUI* pEle = static_cast<CListContainerElementUI *>(builder.Create(_T("waimai_order_info_page_listitem.xml"), (UINT)0, NULL, m_pManager));
|
|
|
-
|
|
|
- CLabelUI *pName = static_cast<CLabelUI *>(pEle->FindSubControl(_T("waimai_order_info_page_listitem_foodname")));
|
|
|
- pName->SetText(CLewaimaiString::UTF8ToUnicode(food_name).c_str());
|
|
|
-
|
|
|
- CLabelUI *pQuantity = static_cast<CLabelUI *>(pEle->FindSubControl(_T("waimai_order_info_page_listitem_quantity")));
|
|
|
- pQuantity->SetText(CLewaimaiString::UTF8ToUnicode(quantity).c_str());
|
|
|
-
|
|
|
- CLabelUI *pPrice = static_cast<CLabelUI *>(pEle->FindSubControl(_T("waimai_order_info_page_listitem_price")));
|
|
|
- pPrice->SetText(CLewaimaiString::UTF8ToUnicode(food_price).c_str());
|
|
|
-
|
|
|
- pFoodList->Add(pEle);
|
|
|
- }
|
|
|
-
|
|
|
- //重设商品列表的高度
|
|
|
- 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")));
|
|
|
- wstring memo = _T("备注:") + CLewaimaiString::UTF8ToUnicode(order.m_memo);
|
|
|
- pMemo->SetText(memo.c_str());
|
|
|
-
|
|
|
- //开始展示各种费用
|
|
|
- CVerticalLayoutUI* pFeesLayout = static_cast<CVerticalLayoutUI *>(this->FindSubControl(_T("waimai_order_info_page_fees")));
|
|
|
- pFeesLayout->RemoveAll();
|
|
|
-
|
|
|
- int fees_num = 0;
|
|
|
-
|
|
|
- if (order.m_delivery > 0)
|
|
|
- {
|
|
|
- CLabelUI *pDlieveryFee = new CLabelUI;
|
|
|
- pDlieveryFee->SetFixedHeight(30);
|
|
|
-
|
|
|
- wstring delivery_fee = L"配送费:" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString((double)order.m_delivery, 2));
|
|
|
- pDlieveryFee->SetText(delivery_fee.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pDlieveryFee);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- if (order.m_is_dabao == "1")
|
|
|
- {
|
|
|
- CLabelUI *pDabaoFee = new CLabelUI;
|
|
|
- pDabaoFee->SetFixedHeight(30);
|
|
|
-
|
|
|
- wstring dabao_fee = L"打包费:" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString((double)order.m_delivery, 2));
|
|
|
- pDabaoFee->SetText(dabao_fee.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pDabaoFee);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- //增值服务费
|
|
|
- if (order.m_addservie.size() > 0)
|
|
|
- {
|
|
|
- for (std::vector<CWaimaiOrderField>::iterator it = order.m_addservie.begin(); it != order.m_addservie.end(); it++)
|
|
|
- {
|
|
|
- wstring addservice = CLewaimaiString::UTF8ToUnicode((*it).name) + L":" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString((double)atof((*it).value.c_str()), 2));
|
|
|
-
|
|
|
- CLabelUI* newField = new CLabelUI();
|
|
|
-
|
|
|
- newField->SetText(addservice.c_str());
|
|
|
- newField->SetFixedHeight(30);
|
|
|
-
|
|
|
- pFeesLayout->Add(newField);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //店铺折扣
|
|
|
- if (order.m_discount < 10)
|
|
|
- {
|
|
|
- CLabelUI *pDiscountFee = new CLabelUI;
|
|
|
- pDiscountFee->SetFixedHeight(30);
|
|
|
-
|
|
|
- wstring discount = L"店铺折扣:" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString((double)order.m_discount, 2)) + L"折";
|
|
|
- pDiscountFee->SetText(discount.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pDiscountFee);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- //会员优惠
|
|
|
- if (order.m_is_member_discount == "1")
|
|
|
- {
|
|
|
- CLabelUI *pMemberFee = new CLabelUI;
|
|
|
- pMemberFee->SetFixedHeight(30);
|
|
|
-
|
|
|
- wstring memberfee = L"会员优惠:-" + CLewaimaiString::UTF8ToUnicode(order.m_member_discount);
|
|
|
- pMemberFee->SetText(memberfee.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pMemberFee);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- //首单优惠
|
|
|
- if (order.m_is_firstcut == "1")
|
|
|
- {
|
|
|
- CLabelUI *pFirstCut = new CLabelUI;
|
|
|
- pFirstCut->SetFixedHeight(30);
|
|
|
-
|
|
|
- wstring firstcut = L"首单优惠:-" + CLewaimaiString::UTF8ToUnicode(order.m_firstcut_value);
|
|
|
- pFirstCut->SetText(firstcut.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pFirstCut);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- //满减
|
|
|
- string::size_type position = order.m_promotion.find(":");
|
|
|
- if (position != order.m_promotion.npos)
|
|
|
- {
|
|
|
- CLabelUI *pManjian = new CLabelUI;
|
|
|
- pManjian->SetFixedHeight(30);
|
|
|
-
|
|
|
- string promotion_value;
|
|
|
- promotion_value.assign(order.m_promotion, position + 1);
|
|
|
-
|
|
|
- wstring promotion = L"满减优惠:-" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString((double)(atof(promotion_value.c_str())), 2));
|
|
|
- pManjian->SetText(promotion.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pManjian);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- //优惠券
|
|
|
- if (order.m_coupon > 0)
|
|
|
- {
|
|
|
- CLabelUI *pCoupon = new CLabelUI;
|
|
|
- pCoupon->SetMaxHeight(30);
|
|
|
-
|
|
|
- wstring coupon = L"优惠券:-" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString((double)order.m_coupon, 2));
|
|
|
- pCoupon->SetText(coupon.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pCoupon);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- //商品券
|
|
|
- if (atof(order.m_goods_coupon_value.c_str()) > 0.0001)
|
|
|
- {
|
|
|
- CLabelUI *pGoodsCoupon = new CLabelUI;
|
|
|
- pGoodsCoupon->SetFixedHeight(30);
|
|
|
-
|
|
|
- wstring goods_coupon = L"商品券:-" + CLewaimaiString::UTF8ToUnicode(order.m_goods_coupon_value);
|
|
|
- pGoodsCoupon->SetText(goods_coupon.c_str());
|
|
|
-
|
|
|
- pFeesLayout->Add(pGoodsCoupon);
|
|
|
-
|
|
|
- fees_num++;
|
|
|
- }
|
|
|
-
|
|
|
- int fees_height;
|
|
|
- if (fees_num == 0)
|
|
|
- {
|
|
|
- pFeesLayout->SetVisible(false);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_fees_line"))->SetVisible(false);
|
|
|
-
|
|
|
- fees_height = 0;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- pFeesLayout->SetVisible(true);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_fees_line"))->SetVisible(true);
|
|
|
- pFeesLayout->SetFixedHeight(fees_num * 30);
|
|
|
-
|
|
|
- fees_height = fees_num * 30;
|
|
|
- }
|
|
|
-
|
|
|
- CLabelUI *pTotalPrice = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_totalprice")));
|
|
|
- wstring price = L"总计:¥" + CLewaimaiString::UTF8ToUnicode(CLewaimaiString::DoubleToString(order.m_price, 2));
|
|
|
- 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);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_name"))->SetText(name_show.c_str());
|
|
|
-
|
|
|
- std::wstring phone_show = L"电话:" + CLewaimaiString::UTF8ToUnicode(order.m_phone);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_phone"))->SetText(phone_show.c_str());
|
|
|
-
|
|
|
- std::wstring address_show = L"地址:" + CLewaimaiString::UTF8ToUnicode(order.m_address);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_address"))->SetText(address_show.c_str());
|
|
|
-
|
|
|
- std::wstring order_date_show = L"下单时间:" + CLewaimaiString::UTF8ToUnicode(order.m_order_date);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_init_date"))->SetText(order_date_show.c_str());
|
|
|
-
|
|
|
- //开始处理骑手信息
|
|
|
- if (atoi(order.m_courier_id.c_str()) > 0)
|
|
|
- {
|
|
|
- //有人接单了
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_qishouinfo"))->SetVisible(true);
|
|
|
-
|
|
|
- std::wstring qishou_name = L"骑手姓名:" + CLewaimaiString::UTF8ToUnicode(order.m_courier_name);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_qishou_name"))->SetText(qishou_name.c_str());
|
|
|
-
|
|
|
- std::wstring qishou_phone = L"骑手电话:" + CLewaimaiString::UTF8ToUnicode(order.m_courier_phone);
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_qishou_phone"))->SetText(qishou_phone.c_str());
|
|
|
-
|
|
|
- std::wstring qishou_type;
|
|
|
- if (order.m_courier_type == "3")
|
|
|
- {
|
|
|
- qishou_type = L"骑手类型:快服务骑手";
|
|
|
- }
|
|
|
- else if (order.m_courier_type == "5")
|
|
|
- {
|
|
|
- qishou_type = L"骑手类型:达达骑手";
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- qishou_type = L"骑手类型:商家自配送骑手";
|
|
|
- }
|
|
|
-
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_qishou_type"))->SetText(qishou_type.c_str());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_qishouinfo"))->SetVisible(false);
|
|
|
- }
|
|
|
-
|
|
|
- //开始处理订单信息
|
|
|
- if (order.m_is_selftake == "1")
|
|
|
- {
|
|
|
- CLabelUI *pDeliveryType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_delivery_type")));
|
|
|
- wstring wsDeliveryType = _T("配送方式:到店自取(取餐号:") + CLewaimaiString::UTF8ToUnicode(order.m_take_food_code) + _T(")");
|
|
|
- pDeliveryType->SetText(wsDeliveryType.c_str());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- CLabelUI *pDeliveryType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_delivery_type")));
|
|
|
- wstring wsDeliveryType = _T("配送方式:外卖配送");
|
|
|
- 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")));
|
|
|
- wstring wsType = _T("订单来源:") + CLewaimaiString::UTF8ToUnicode(order.m_from_type);
|
|
|
- pType->SetText(wsType.c_str());
|
|
|
-
|
|
|
- //预设选项
|
|
|
- CVerticalLayoutUI* pLayout = static_cast<CVerticalLayoutUI *>(this->FindSubControl(_T("waimai_order_info_page_field")));
|
|
|
- pLayout->RemoveAll();
|
|
|
-
|
|
|
- int order_filed_height;
|
|
|
- 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++)
|
|
|
- {
|
|
|
- wstring order_field = CLewaimaiString::UTF8ToUnicode((*it).name) + L":" + CLewaimaiString::UTF8ToUnicode((*it).value);
|
|
|
-
|
|
|
- CLabelUI* newField = new CLabelUI();
|
|
|
-
|
|
|
- newField->SetText(order_field.c_str());
|
|
|
- newField->SetFixedHeight(30);
|
|
|
-
|
|
|
- pLayout->Add(newField);
|
|
|
- }
|
|
|
-
|
|
|
- //这里预设选项默认有一个配送时间,所以要减1
|
|
|
- pLayout->SetFixedHeight((order.m_order_field.size() - 1) * 30);
|
|
|
-
|
|
|
- order_filed_height = (order.m_order_field.size() - 1) * 30;
|
|
|
-
|
|
|
- pLayout->SetVisible(true);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- order_filed_height = 0;
|
|
|
-
|
|
|
- pLayout->SetVisible(false);
|
|
|
- }
|
|
|
-
|
|
|
- //配送时间
|
|
|
- wstring delivery_date;
|
|
|
- if (order.m_is_selftake == "1")
|
|
|
- {
|
|
|
- delivery_date = L"自取时间:" + CLewaimaiString::UTF8ToUnicode(order.m_delivery_date);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- delivery_date = L"配送时间:" + CLewaimaiString::UTF8ToUnicode(order.m_delivery_date);
|
|
|
- }
|
|
|
-
|
|
|
- CLabelUI *pTime = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_delivery_time")));
|
|
|
- pTime->SetText(delivery_date.c_str());
|
|
|
-
|
|
|
- CLabelUI *pPayType = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_pay_type")));
|
|
|
- wstring wsPayType = _T("付款方式:") + CLewaimaiString::UTF8ToUnicode(order.m_pay_type);
|
|
|
- pPayType->SetText(wsPayType.c_str());
|
|
|
-
|
|
|
- if (CLewaimaiString::UTF8ToUnicode(order.m_pay_type) == L"货到付款")
|
|
|
- {
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_huodaofukuan"))->SetVisible(true);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_huodaofukuan"))->SetVisible(false);
|
|
|
- }
|
|
|
-
|
|
|
- //右侧按钮的控制
|
|
|
- CButtonUI* confirm_button = static_cast<CButtonUI *>(m_pManager->FindControl(_T("waimai_order_info_page_confirme")));
|
|
|
- CButtonUI* success_button = static_cast<CButtonUI *>(m_pManager->FindControl(_T("waimai_order_info_page_success")));
|
|
|
- CButtonUI* fail_button = static_cast<CButtonUI *>(m_pManager->FindControl(_T("waimai_order_info_page_fail")));
|
|
|
-
|
|
|
- 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;
|
|
|
- if (_tcscmp(CLewaimaiString::UTF8ToUnicode(order.m_order_status).c_str(), _T("未处理")) == 0)
|
|
|
- {
|
|
|
- confirm_button->SetVisible(true);
|
|
|
- success_button->SetVisible(false);
|
|
|
- fail_button->SetVisible(true);
|
|
|
-
|
|
|
- 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)
|
|
|
- {
|
|
|
- confirm_button->SetVisible(false);
|
|
|
- success_button->SetVisible(true);
|
|
|
- fail_button->SetVisible(true);
|
|
|
-
|
|
|
- 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)
|
|
|
- {
|
|
|
- confirm_button->SetVisible(false);
|
|
|
- success_button->SetVisible(false);
|
|
|
- fail_button->SetVisible(false);
|
|
|
-
|
|
|
- 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)
|
|
|
- {
|
|
|
- confirm_button->SetVisible(false);
|
|
|
- success_button->SetVisible(false);
|
|
|
- fail_button->SetVisible(false);
|
|
|
-
|
|
|
- agree_button->SetVisible(false);
|
|
|
- disagree_button->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)
|
|
|
- {
|
|
|
- confirm_button->SetVisible(false);
|
|
|
- success_button->SetVisible(false);
|
|
|
- fail_button->SetVisible(false);
|
|
|
-
|
|
|
- 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)
|
|
|
- {
|
|
|
- confirm_button->SetVisible(false);
|
|
|
- success_button->SetVisible(false);
|
|
|
- fail_button->SetVisible(false);
|
|
|
-
|
|
|
- refund_button->SetVisible(false);
|
|
|
-
|
|
|
- std::string refund_status = m_order.m_refund_status;
|
|
|
- if (refund_status == "1")
|
|
|
- {
|
|
|
- agree_button->SetVisible(true);
|
|
|
- disagree_button->SetVisible(true);
|
|
|
- }
|
|
|
- else if (refund_status == "5")
|
|
|
- {
|
|
|
- agree_button->SetVisible(true);
|
|
|
- disagree_button->SetVisible(false);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- agree_button->SetVisible(false);
|
|
|
- disagree_button->SetVisible(false);
|
|
|
- }
|
|
|
-
|
|
|
- pRefundStatus->SetVisible(true);
|
|
|
-
|
|
|
- refundHeight = 30;
|
|
|
-
|
|
|
- std::wstring refund_status_text = L"退款状态:";
|
|
|
- if (refund_status == "1")
|
|
|
- {
|
|
|
- refund_status_text += L"顾客申请退款,等待商家处理";
|
|
|
- }
|
|
|
- else if (refund_status == "2")
|
|
|
- {
|
|
|
- refund_status_text += L"退款成功,订单失败";
|
|
|
- }
|
|
|
- else if (refund_status == "3")
|
|
|
- {
|
|
|
- refund_status_text += L"商家已拒绝退款,等待顾客受理";
|
|
|
- }
|
|
|
- else if (refund_status == "4")
|
|
|
- {
|
|
|
- refund_status_text += L"退款失败,订单变为已确认";
|
|
|
- }
|
|
|
- else if (refund_status == "5")
|
|
|
- {
|
|
|
- refund_status_text += L"顾客再次发起退款,等待客服介入处理中";
|
|
|
- }
|
|
|
-
|
|
|
- pRefundStatus->SetText(refund_status_text.c_str());
|
|
|
- }
|
|
|
-
|
|
|
- int configMemoHeight = 0;
|
|
|
- CLabelUI *pConfigmemo = static_cast<CLabelUI *>(this->FindSubControl(_T("waimai_order_info_page_configmemo")));
|
|
|
-
|
|
|
- if (m_order.m_configmemo != "")
|
|
|
- {
|
|
|
- configMemoHeight = 30;
|
|
|
-
|
|
|
- wstring configMemo = L"商家备注:" + CLewaimaiString::UTF8ToUnicode(order.m_configmemo);
|
|
|
- pConfigmemo->SetText(configMemo.c_str());
|
|
|
- pConfigmemo->SetVisible(true);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- configMemoHeight = 0;
|
|
|
-
|
|
|
- pConfigmemo->SetVisible(false);
|
|
|
- }
|
|
|
-
|
|
|
- this->FindSubControl(_T("waimai_order_info_page_layout_3"))->SetFixedHeight(order_filed_height + refundHeight + configMemoHeight + 181);
|
|
|
-}
|