Browse Source

完善订单详情

zhangyang 6 years ago
parent
commit
8803468bd2

+ 34 - 13
bin/Win32/Debug/zhipuzi_pos_windows/skin/GameRes/waimaiorder_info.xml

@@ -7,21 +7,42 @@
 			</HorizontalLayout>
 			
 			<HorizontalLayout>
-				<HorizontalLayout bkcolor="#FFFFFFFF" padding="20,20,20,20">
-					<Label float="true" name="waimai_order_list_name" text="姓名:" textcolor="#FF558CC4" pos="0,6,182,36" mouse="false" />
-					<Label float="true" name="waimai_order_list_phone" text="电话:" textcolor="#FF558CC4" pos="0,36,182,66" mouse="false" />
-					<Label float="true" name="waimai_order_list_address" text="地址:" textcolor="#FF558CC4" pos="0,66,182,96" mouse="false" />
-					<Label float="true" name="waimai_order_list_init_date" text="下单时间:" textcolor="#FF558CC4" pos="0,96,182,126" mouse="false" />
+				<VerticalLayout padding="20,20,20,20">
+					<VerticalLayout bkcolor="#FFFFFFFF">
+						<HorizontalLayout height="50">
+							<Label float="true" name="waimai_order_info_page_liushuihao" text="#1" pos="10, 10, 30, 40" />
+							<Label float="true" name="waimai_order_info_page_order_no" text="订单号:" pos="50, 10, 500, 40" />
+						</HorizontalLayout>
+						
+						<Control height="1" bkcolor="#FF708090" />
+						
+						<List name="waimai_order_info_page_foodlist" height="260">
+							<ListHeader />
+							<ListHeaderItem text="商品" align="left" />
+							<ListHeaderItem text="数量" width="200" />
+							<ListHeaderItem text="单价" width="200" />
+						</List>  
+					</VerticalLayout>
 					
-					<Label float="true" name="waimai_order_list_price" text="价格:" textcolor="#FF558CC4" pos="300,6,482,36" mouse="false" />
-					<Label float="true" name="waimai_order_list_order_no" text="订单编号:" textcolor="#FF558CC4" pos="300,36,600,66" mouse="false" />
-				</HorizontalLayout>
+					<VerticalLayout heigh="100" padding="0, 15, 0, 0" bkcolor="#FFFFFFFF">
+						<Label float="true" name="waimai_order_info_page_name" text="姓名:" textcolor="#FF558CC4" pos="0,6,182,36" mouse="false" />
+						<Label float="true" name="waimai_order_info_page_phone" text="电话:" textcolor="#FF558CC4" pos="200,6,350,36" mouse="false" />
+						<Label float="true" name="waimai_order_info_page_address" text="地址:" textcolor="#FF558CC4" pos="0,36,182,66" mouse="false" />
+						<Label float="true" name="waimai_order_info_page_init_date" text="下单时间:" textcolor="#FF558CC4" pos="0,66,182,96" mouse="false" />
+					</VerticalLayout>
+					
+					<VerticalLayout padding="0, 15, 0, 0" bkcolor="#FFFFFFFF">
+						<Label name="waimai_order_info_page_type" text="订单来源:" />
+						<Label name="waimai_order_info_page_pay_type" text="付款方式:" />
+						<Label name="waimai_order_info_page_delivery_type" text="配送方式:" />
+						<Label name="waimai_order_info_page_delivery_time" text="配送时间:" />
+					</VerticalLayout>
+				</VerticalLayout>
 				
-				<HorizontalLayout width="200">
-					<Button name="waimai_order_list_info" float="true" pos="20,20,120,50" text="详情" textcolor="#FFFF0000" bkcolor="#FFFFFF00"/>
-					<Button name="waimai_order_list_print" float="true" pos="20,60,120,90" text="打印" textcolor="#FFFF0000" bkcolor="#FFFFFF00"/>
-					<Button name="waimai_order_list_confirme" float="true" pos="20,100,120,130" text="确认" textcolor="#FFFF0000" bkcolor="#FFFFFF00"/>
-					<Button name="waimai_order_list_fail" float="true" pos="20,140,120,170" text="设为失败" textcolor="#FFFF0000" bkcolor="#FFFFFF00"/>
+				<HorizontalLayout width="300" height="500" bkcolor="#FFFFFFFF" padding="0,20,0,0">
+					<Button name="waimai_order_info_page_print" float="true" pos="20,60,120,90" text="打印" textcolor="#FFFF0000" bkcolor="#FFFFFF00"/>
+					<Button name="waimai_order_info_page_confirme" float="true" pos="20,100,120,130" text="确认" textcolor="#FFFF0000" bkcolor="#FFFFFF00"/>
+					<Button name="waimai_order_info_page_fail" float="true" pos="20,140,120,170" text="设为失败" textcolor="#FFFF0000" bkcolor="#FFFFFF00"/>
 				</HorizontalLayout>
 			</HorizontalLayout>
 		</VerticalLayout>

BIN
bin/Win32/Debug/zhipuzi_pos_windows/zhipuzi_pos_windows.exe


+ 21 - 1
lewaimai_dispatch/wnd/CWaimaiOrderInfoUI.cpp

@@ -10,8 +10,28 @@ void CWaimaiOrderInfoUI::DoEvent(TEventUI& 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* pUserList = static_cast<CListUI*>(this->FindSubControl(_T("waimai_order_info_page_foodlist")));
+	//pUserList->SetTextCallback(this);
+	//for (int i = 0; i < 400; i++) {
+	//	CListTextElementUI* pListElement = new CListTextElementUI;
+	//	pUserList->Add(pListElement);
+	//}
+
 	std::wstring name_show = L"姓名:" + CLewaimaiString::UTF8ToUnicode(order.m_customer_name);
-	this->FindSubControl(_T("waimai_order_list_name"))->SetText(name_show.c_str());
+	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());
 }