<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderPrint.aspx.cs" Inherits="XpShop.Manage.OrderPrint" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>订单打印</title>
    <SCRIPT language="JavaScript">
	function printPage() 
	{
		eval("printOrder" + ".style.display=\"none\";");
		window.print(); 
	}
	</SCRIPT>
        <style type="text/css">
        body{margin:0px;padding:0px;background:#FFFFFF;color:#424041;font-size: 12px;font-family: "宋体",Arial,Lucida,Verdana,Helvetica,sans-serif; position:relative;}
        body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0px; padding:0px;} 
        iframe,form,input,select,textarea,table,th,td{margin:0; padding:0;font-size:12px;}
        table.thinBorder {border-collapse:collapse;border:solid #999;border-width:1px 0 0 1px;}
        table.thinBorder caption {font-size:14px;font-weight:bolder;}
        table.thinBorder th,table.thinBorder td {border:solid #999;border-width:0 1px 1px 0;padding:2px;}
        table.thinBorder tfoot td {text-align:center;}            
        .tdborder {BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid}
	</style>
</head>
<body>
    <form id="Form1" method="post" runat="server">
	<div class="twidth">
	<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
		<TBODY>
			<TR>
				<TD vAlign="middle" width="3%"><STRONG><BR>
					</STRONG>
				</TD>
				<TD vAlign="middle" align="center" width="27%">
					<%=config.SiteLogo%>
				</TD>
				<TD vAlign="middle" width="3%"><STRONG><BR>
					</STRONG>
				</TD>
				<TD class="body-shoptitle" vAlign="center"  width="64%"style="font-size:24px;font-weight:bold">
				<%=config.SiteName %>(<%=config.SiteUrl %>)购物清单
<%--							<%=GetResourceString("OrderNo")%>：<%=order.OrderNo%><br>
					<%=GetResourceString("OrderTime")%>：<%=order.OrderTime%><%if(order.ShipTime!=""){%><BR>
					<%=GetResourceString("DeliverGoodsDate")%>：<%=order.ShipTime%><%}%>--%>
				</TD>
			</TR>
		</TBODY>
	</TABLE>
	<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
		<TBODY>
			<TR>
				<TD>&nbsp;</TD>
			</TR>
		</TBODY>
	</TABLE>
	
    <TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
		<TBODY>
			<TR>
				<TD><%=GetResourceString("OrderNo")%>：<%=order.OrderNo%><br></TD>
<%--						<TD><%=GetResourceString("OrderTime")%>：<%=order.OrderTime%></TD>--%>		
				<TD>订购时间：<%=order.OrderTime%></TD>
				<TD>客户姓名：<%=order.ReceiverName%></TD>
				<TD>商品总数：<%=order.Quantity %>件</TD>
            </TR>
		</TBODY>
	</TABLE>
	<HR noShade SIZE="1">
	<%if(havePdt) {%>
	购买的商品
	<TABLE width="100%" class="thinBorder">
		<TBODY>
			<TR>
				<TD align="center" width="64" height="26"><%=GetResourceString("NO.")%></TD>
				<TD align="left" width="284" height="26"><%=GetResourceString("OrderEmail_ProductName")%><BR>
				</TD>
				<TD	align="center" width="99" height="26"><%=GetResourceString("OrderEmail_Quantity")%></TD>
				<TD	align="center" width="98" height="26"><%=GetResourceString("OrderEmail_UnitPrice")%><BR>
				</TD>
				<TD align="center" width="104" height="26"><%=GetResourceString("SumPrice")%></TD>
			</TR>
			<asp:repeater id="rptOrderItems" Runat="server">
				<ItemTemplate>
					<TR>
						<TD noWrap align="center" width="64" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductNo") %></TD>
						<TD align="left" width="334" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductName") %></TD>
						<TD align="center" width="99" height="20"><%# DataBinder.Eval(Container.DataItem, "Quantity") %></TD>
						<TD align="center" width="98" height="20"><%# DataBinder.Eval(Container.DataItem, "UnitPrice","{0:f2}") %></TD>
						<%--<TD align="center" width="98" height="20"><%# DataBinder.Eval(Container.DataItem, "ItemsPrice","{0:f2}") %></TD>--%>
						<TD align="center" width="104" height="20"><%# DataBinder.Eval(Container.DataItem, "SubPrice","{0:f2}") %></TD>
						<%--<TD width="80" align="center"><%# DataBinder.Eval(Container.DataItem, "IsDiscount").ToString() == "1" ? "Yes" : "No" %></TD>--%>
					</TR>
				</ItemTemplate>
			</asp:repeater>
		</TBODY>
	</TABLE>
    <div style="margin:10px"> <span style="font-weight:bolder;float:right">总价 : <%=string.Format("{0:f}",order.ProductPrice)%></span></div>
	<%} %>
	
    <%if(haveGift) {%>
	<HR noShade SIZE="1">
	<br />
	兑换的礼品
    <TABLE width="100%" class="thinBorder">
		<TBODY>
			<TR>
				<TD align="left">礼品名称<BR>
				</TD>
				<TD align="center">数量</TD>
				<TD align="center">单件积分
				</TD>
				<TD align="center">小计
				</TD>
			</TR>
			<asp:repeater id="rptGiftItems" Runat="server">
				<ItemTemplate>
					<TR>
						<TD align="left"><%# DataBinder.Eval(Container.DataItem, "GiftName") %></TD>
						<TD align="center"><%# DataBinder.Eval(Container.DataItem, "Quantity") %></TD>
						<TD align="center"><%# DataBinder.Eval(Container.DataItem, "GiftScore") %></TD>
						<TD align="center"><%# DataBinder.Eval(Container.DataItem, "Total")%></TD>
					</TR>
				</ItemTemplate>
			</asp:repeater>
		</TBODY>
	</TABLE>
	<%} %>
    <table id="Table1" cellSpacing="0" cellPadding="0" width="100%" bgColor="#ffffff" border="0">
        <tbody>
            
            <tr>
                <td>
                    <%--<hr noshade size="1">--%>
                    <div id="total" style="line-height:20px; float:right;">
                        <%=order.Favourable%>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="7">
                    <hr noshade size="1">
                </td>
            </tr>
            
        </tbody>
    </table>
    
	<TABLE cellSpacing="0" cellPadding="2" width="100%" border="0">
		<tr>
			<td vAlign="top" width="50%">
				<table width="100%">
				    <tr style="display:none">
						<td><%=GetResourceString("OrderStatus")%>：<%=orderStatus%></td>
					</tr>
					<tr>
						<td><%=GetResourceString("ShippingWay")%>：<%= order.ShippingName%></td>
					</tr>
                    <tr>
						<td>送货日期：<%= order.ShipTime%></td>
					</tr>
					<tr>
						<td><%=GetResourceString("PaymentInfo")%>：<%= order.PayMemntName%></td>
					</tr>
                    <%if(order.NeedInvoice){%>
					<tr>
						<td>发票信息：<%=orderInvoice.InvoiceType == 0 ? "普通发票" : "增值税发票"%> 发票抬头:<%=orderInvoice.InvoiceHead%>
						发票内容:<%=orderInvoice.IsDetails ? orderInvoice.InvoiceContent : "商品明细"%>
<%--								税金:<%=order.TaxPrice%>--%>
                        </td>
					</tr>
                    <%}%>

				</table>
			</td>
			<td width="50%">
				<table width="100%">							
				    <tr style="display:none">
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%"><%=GetResourceString("ProductPrice")%>：</td>
						<td width="10%"></td>
						<td><%=string.Format("{0:f}",order.ProductPrice)%>( <%=order.Discount%>% )</td>
					</tr>
					
					<%if(order.IsAgentFContent!=""){ %>
				    <tr style="display:none">
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%"><%= order.IsAgentFContent%>：</td>
						<td width="10%"></td>
						<td><%= order.IsAgentF == 1 ? "Yes" : "No"%></td>
					</tr>
					<%} %>
					
				    <tr style="display:none">
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%"><%=GetResourceString("OrderEmail_CustomItemPrice")%>：</td>
						<td width="10%"></td>
						<td><%=string.Format("{0:f}",order.CustomItemPrice)%></td>
					</tr>
					<tr>
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%"><%=GetResourceString("OrderEmail_ShipPrice")%>：</td>
						<td width="10%"></td>
						<td><%=string.Format("{0:f}",order.ShipPrice)%><%if (order.IsShippingFree == 1){ %>（<%=GetResourceString("ShippingFree")%>）<%} %></td>
					</tr>
				    <tr style="display:none">
			            <td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%">发票税金：</td>
							<td width="10%"></td>
				            <td><%=string.Format("{0:f}",order.TaxPrice)%>&nbsp;</td>
    					
		            </tr>
					<tr>
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%"><%=GetResourceString("OrderEmail_TotalPrice")%>：</td>
						<td width="10%"></td>
						<td><%=string.Format("{0:f}",order.TotalPrice)%></td>
					</tr>
					<tr>
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%"><%=GetResourceString("OrderEmail_AdvancePayment")%>：</td>
						<td width="10%"></td>
						<td><%=string.Format("{0:f}",order.AdvancePayment)%></td>
					</tr>
					<tr>
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="60%">积分抵消金额：</td>
						<td width="10%"></td>
						<td><%=string.Format("{0:f}", order.ScoreAmount)%></td>
					</tr>
					<tr>
						<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							align="right" width="50%">应付款金额：</td>
						<td width="10%"></td>
						<td><span style="font-weight:bold"><%=order.NeedPayMoney%></span></td>
					</tr>
				</table>
			</td>
		</tr>
	</TABLE>
	<TABLE cellSpacing="3" cellPadding="3" width="100%" border="0">
		<tr>
			<td style="display:none;"><%=GetResourceString("BuyerInfo")%></td>
			<td><span style="font-weight:bolder;font-size:18px"><%=GetResourceString("ReceiverInfo")%></span></td>
		</tr>
		<tr>
			<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; display:none;"
				width="50%">
				<table>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_BuyerName")%>：</td>
						<td><%=order.BuyerName%></td>
					</tr>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_BuyerAccount")%>：</td>
						<td><%=order.BuyerName%></td>
					</tr>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_Phone")%>：</td>
						<td><%=order.BuyerPhone%><%=order.BuyerMobile%></td>
					</tr>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_Email")%>：</td>
						<td><%=order.BuyerEmail%></td>
					</tr>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_BuyerAddress")%>：</td>
						<td><%=order.BuyerAddress%></td>
					</tr>
					<tr style="display:none;">
						<td align="right"><%=GetResourceString("OrderEmail_Postalcode")%>：</td>
						<td><%=order.BuyerPostalcode%></td>
					</tr>
				</table>
			</td>
			<td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
				width="50%">
				<table>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_ReceiverName")%>：</td>
						<td><%=order.ReceiverName%></td>
					</tr>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_Phone")%>：</td>
						<td><%=order.ReceiverPhone=="" ? "" : order.ReceiverPhone+"/"%><%=order.ReceiverMobile%></td>
					</tr>
				    <tr style="display:none">
						<td align="right"><%=GetResourceString("OrderEmail_Email")%>：</td>
						<td><%=order.ReceiverEmail%></td>
					</tr>
					<tr>
						<td align="right"><%=GetResourceString("OrderEmail_ReceiverAddress")%>：</td>
						<td><%=order.ReceiverAddress%></td>
					</tr>
					<tr style="display:none;">
						<td align="right"><%=GetResourceString("OrderEmail_Postalcode")%>：</td>
						<td><%=order.ReceiverPostalcode%></td>
					</tr>
					<tr>
						<td align="right"></td>
						<td></td>
					</tr>
				</table>
			</td>
		</tr>
	</TABLE>
	<table width="100%">
	<%if (order.Remark!="") {%>
		<tr>
			<td><span style="font-weight:bolder;font-size:18px"><%=GetResourceString("OrderComment")%></span></td>
		</tr>
		<tr>
			<td><%=order.Remark%></td>
		</tr>
    <% }%>
		<tr>
		    <td>
                <div style="float:right">用户签字：&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</div>
                <div class="clear"></div>
                <div style="float:right">
		            <span>家用电器、手机、数码、电脑、日用百货尽在<%=config.SiteName %>&nbsp&nbsp服务热线：<%=config.Phone %></span>
                </div>
		    </td>
		</tr>
		<tr>
			<td height="20" align="center" valign="middle">
			<SPAN id="printOrder"><input type="button" onClick="printPage()" value="打 印" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 69px; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 22px"></SPAN></td>
		</tr>
	</table>
	</div>
</form>
</body>
</html>
