<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrintOrder.aspx.cs" Inherits="Hidistro.UI.Web.Admin.sales.PrintOrder" %>

<%@ Import Namespace="Hidistro.Core" %>
<%@ Import Namespace="Hidistro.Entities.Sales" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.Common.Controls" Assembly="Hidistro.UI.Common.Controls" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.ControlPanel.Utility" Assembly="Hidistro.UI.ControlPanel.Utility" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<%@ Register TagPrefix="Hi" Namespace="Hidistro.UI.Common.Validator" Assembly="Hidistro.UI.Common.Validator" %>
<%@ Import Namespace="Hidistro.Membership.Context" %>
<!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">
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <Hi:PageTitle ID="PageTitle1" runat="server" />
    <Hi:HeadContainer runat="server" />
    <link rel="stylesheet" href="/admin/css/css.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/admin/css/windows.css" type="text/css" media="screen" />
    <Hi:Script ID="Script2" runat="server" Src="/utility/jquery-1.3.2.min.js" />
    <style type="text/css" media="print">
        .border_top1p
        {
            border-top: solid 1px #555;
        }
        .Order_Info
        {
            padding: 5px 5px 5px 5px;
            width: 930px;
            overflow: hidden;
        }
        .Order_Info td
        {
            text-align: left;
            line-height: 28px;
            padding: 2px 5px;
            vertical-align: top;
        }
        .Order_Item
        {
            padding: 5px 5px 5px 5px;
        }
        .Order_Item table
        {
            background: #555;
            border: 1px solid #555;
        }
        .Order_Item table tr td, .Order_Item table tr th
        {
            background: #FFF;
            text-align: left;
            padding: 2px 5px;
        }
        .Noprn
        {
            display: none;
        }
    </style>
    <style type="text/css" media="screen">
        .border_top1p
        {
            border-top: solid 1px #555;
        }
        .Order_Info
        {
            padding: 5px 5px 5px 5px;
            width: 930px;
            overflow: hidden;
        }
        .Order_Info td
        {
            text-align: left;
            line-height: 28px;
            padding: 2px 5px;
            vertical-align: top;
        }
        .Order_Item
        {
            padding: 5px 5px 5px 5px;
        }
        .Order_Item table
        {
            background: #555;
            border: 1px solid #555;
        }
        .Order_Item table tr td, .Order_Item table tr th
        {
            background: #FFF;
            text-align: left;
            padding: 2px 5px;
        }
        .mainwidth
        {
        	text-align: center;
        	margin:0 auto;
        	width:960px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="dataarea mainwidth" style="border-style: none;">
        <div class="Order_Info border_top1p">
            <table cellpadding="3" cellspacing="0" width="100%">
                <tr>
                    <td width="33.3%">
                        订单号：<asp:Literal ID="litOrderId" runat="server" />
                    </td>
                    <td width="33.3%">
                        订购日期：<asp:Literal runat="server" ID="litOrderDate" />
                    </td>
                    <td width="33.4%">
                        订单状态：<asp:Literal ID="litOrderStatus" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        收货人：<asp:Literal ID="litSkipTo" runat="server" />
                    </td>
                    <td>
                        电话号码：<asp:Literal ID="litTelPhone" runat="server" /><asp:Literal ID="litConn" runat="server" /><asp:Literal
                            ID="litCellPhone" runat="server" />
                    </td>
                    <td>
                        邮政编码：<asp:Literal ID="litZipCode" runat="server" />
                    </td>
                    
                </tr>
                <tr>
                    <td>
                        支付方式：<asp:Literal ID="litPayType" runat="server" />
                    </td>
                    <td>
                        配送方式：<asp:Literal ID="litShipperMode" runat="server" />
                    </td>
                    <td>
                        发货单号：<asp:Literal ID="litShippNo" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td colspan="3">
                        收货地址：<asp:Literal ID="litAddress" runat="server" />
                    </td>
                </tr>
                <tr id="trRemark" runat="server">
                    <td colspan="3">
                        备注：<asp:Literal ID="litRemark" runat="server" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="Order_Item">
            <div>
                <UI:Grid runat="server" ID="grdOrderItems" AutoGenerateColumns="false" Width="100%"
                    BorderWidth="0">
                    <Columns>
                        <asp:TemplateField HeaderText="图片" HeaderStyle-Width="6%">
                            <ItemTemplate>
                            <img src='<%# RawUrl(Eval("ThumbnailsUrl"))%>' height="40"/>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="货号" HeaderStyle-Width="15%">
                            <ItemTemplate>
                                <div class="colorC">
                                    <%#Eval("sku") %></div>
                                <div>
                                    <%# Eval("SKUContent") %></div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ItemDescription" HeaderText="商品" HeaderStyle-Width="30%" />
                        <asp:TemplateField HeaderText="商品单价">
                        <ItemTemplate>
                        <%# Math.Round((decimal)Eval("ItemAdjustedPrice"),2) %>
                        </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Quantity" HeaderText="购买数量"/>                        
                        <asp:BoundField DataField="ShipmentQuantity" HeaderText="发货数量" />
                        <asp:TemplateField HeaderText="小计">
                            <ItemTemplate>
                                <%# Math.Round((decimal)Eval("ItemAdjustedPrice") * (long)Eval("Quantity"),2)%>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </UI:Grid>
            </div>
            <div style="margin-top: 5px;">
                <UI:Grid runat="server" ID="grdOrderGifts" AutoGenerateColumns="false" Width="100%"
                    BorderWidth="0">
                    <Columns>
                        <asp:TemplateField HeaderText="图片" HeaderStyle-Width="6%">
                            <ItemTemplate>
                            <img src='<%# RawUrl(Eval("ThumbnailsUrl"))%>'/>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="GiftName" HeaderText="礼品名称" HeaderStyle-Width="62%" />
                        <asp:TemplateField HeaderText="成本价" HeaderStyle-Width="20%">
                        <ItemTemplate>
                        <%# Math.Round((decimal)Eval("CostPrice"), 2)%>
                        </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Quantity" HeaderText="赠送数量" />
                    </Columns>
                </UI:Grid>
            </div>
        </div>
        <div class="Order_Info">
            <table cellpadding="3" cellspacing="0" width="100%">
                <tr>
                    <td>
                        商品金额：<Hi:FormatedMoneyLabel ID="litItemsMoney" runat="server" />
                    </td>
                    
                    <td>
                        运费：<Hi:FormatedMoneyLabel ID="litShippMoney" runat="server" />
                    </td>
                    <td>
                        支付手续费：<Hi:FormatedMoneyLabel ID="litPayMoney" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        订单选项费用：<Hi:FormatedMoneyLabel ID="litOptionMoney" runat="server" /><asp:Literal ID="litOptionDes"
                            runat="server" />
                    </td>
                    <td>
                        优惠券抵扣金额：<Hi:FormatedMoneyLabel ID="litCouponMoney" runat="server" />
                    </td>
                    <td>
                        买家折扣：<Hi:FormatedMoneyLabel ID="litDiscountMoney" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td>
                        满额打折活动：<Hi:FormatedMoneyLabel ID="litActivity" runat="server" />
                    </td>
                    <td>
                        订单实付金额：<Hi:FormatedMoneyLabel ID="litTotalMoney" runat="server" />
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
        <div class="Order_Item border_top1p" style="height: 40px; margin-top: 10px;">
            <strong>签名：</strong></div>
    </div>
    <div style="text-align: center; margin-top: 10px; margin-bottom: 20px;">
        <input class="Noprn" type="button" onclick="window.print()" value="确认打印" style="width: 100px;
            height: 27px;" />
    </div>
    </form>
</body>
</html>
