<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="OrderDetail.aspx.cs" Inherits="SocoShop.Web.Admin.OrderDetail" %>
<%@ Register Namespace="SkyCES.EntLib" Assembly="SkyCES.EntLib" TagPrefix="SkyCES"%>
<%@ Import Namespace="SocoShop.Business" %>
<%@ Import Namespace="SocoShop.Common" %>
<%@ Import Namespace="SocoShop.Entity" %>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<script language="javascript" src="/Admin/js/calendar.js" type="text/javascript"></script>
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>订单详细</div>
<div class="add">
    <ul>
		<li class="orderBlock">基本信息</li>
	</ul>
	<ul>
		<li class="left">订单号：</li>
		<li class="right"><%=order.OrderNumber %><%if(order.IsActivity==(int)BoolType.True){ %>（活动订单）<%} %></li>
		<li class="left">订单状态：</li>
		<li class="right"><%=OrderBLL.ReadOrderStatus(order.OrderStatus) %></li>
	</ul>
	<ul>
		<li class="left">支付方式：</li>
		<li class="right"><%=order.PayName%></li>	
		<li class="left">用户：</li>
		<li class="right"><%=order.UserName %></li>		
	</ul>
	<ul>
	    <li class="left">下单时间：</li>
		<li class="right"><%=order.AddDate %></li>	
		<%if(order.AddDate!=order.PayDate){ %>	    
		<li class="left">付款时间：</li>
		<li class="right"><%=order.PayDate%></li>	
		<%} %>	
	</ul>	
</div>
<div class="add">
    <ul>
		<li class="orderBlock">邮寄信息 <% if (canEdit){ %><a href="javascript:pop('OrderAdd.aspx?ID=<%=order.ID %>&Action=Shipping',600,400,'邮寄信息修改','OrderAdd<%# Eval("ID") %>')"><img src="Style/Images/edit.gif" alt="邮寄信息修改" title="邮寄信息修改" /></a><%} %> </li>
	</ul>
	<ul>
		<li class="left">收货人：</li>
		<li class="right"><%=order.Consignee %></li>
		<li class="left">收货地区：</li>
		<li class="right"><%=RegionBLL.RegionNameList(order.RegionID)%></li>
	</ul>
	<ul>
		<li class="left">收货地址：</li>
		<li class="right"><%=order.Address %></li>
		<li class="left">邮编：</li>
		<li class="right"><%=order.ZipCode %></li>
	</ul>
	<ul>
		<li class="left">联系电话：</li>
		<li class="right"><%=order.Tel %></li>
		<li class="left">Email：</li>
		<li class="right"><%=order.Email %></li>
	</ul>
	<ul>
		<li class="left">手机：</li>
		<li class="right"><%=order.Mobile %></li>
		<li class="left">配送方式：</li>
		<li class="right"><%=ShippingBLL.ReadShippingCache(order.ShippingID).Name %></li>
	</ul>
	<%if (order.OrderStatus> (int)OrderStatus.Shipping){ %>
	<ul>
		<li class="left">配送日期：</li>
		<li class="right"><%=order.ShippingDate.ToString("yyyy-MM-dd")%></li>
		<li class="left">配送单号：</li>
		<li class="right"><%=order.ShippingNumber%></li>
	</ul>
	<%} %>
</div>
<div class="add">
    <ul>
		<li class="orderBlock">其他信息 <% if (canEdit){ %><a href="javascript:pop('OrderAdd.aspx?ID=<%=order.ID %>&Action=Other',600,300,'其他信息修改','OrderAdd<%# Eval("ID") %>')"><img src="Style/Images/edit.gif" alt="其他信息修改" title="其他信息修改" /></a><%} %></li>
	</ul>
	<ul>
		<li class="left">发票标题：</li>
		<li class="right"><%=order.InvoiceTitle %></li>	
		<li class="left">发票内容：</li>
		<li class="right"><%=order.InvoiceContent %></li>
	</ul>
	<ul>
		<li class="left">用户留言：</li>
		<li class="right"><%=order.UserMessage %></li>	
	    <li class="left">订单备注：</li>
		<li class="right"><%=order.OrderNote %></li>
	</ul>
</div>
<div id="OrderAjax"></div>
<div class="add">
    <ul>
		<li class="orderBlock">订单操作</li>
	</ul>	
    <ul>
		<li class="left">备注：</li>
		<li><SkyCES:TextBox ID="Note" runat="server" TextMode="MultiLine" Width="400px" Height="50px" /></li>	
	</ul>
	<%if(SendButton.Visible){ %>
	<ul>
		<li class="left">配送日期：</li>
		<li><SkyCES:TextBox ID="ShippingDate" runat="server"  onfocus="cdr.show(this);" CssClass="input" /></li>	
		<li class="left">配送单号：</li>
		<li><SkyCES:TextBox ID="ShippingNumber" runat="server" CssClass="input" /></li>	
	</ul>
	<%} %>
    <ul>
        <li class="left"></li>
		<li>
		    <asp:Button CssClass="button" ID="PayButton" runat="server" Text=" 付 款 " Visible="false" OnClick="PayButton_Click"  />
		    <asp:Button CssClass="button" ID="CheckButton" runat="server" Text=" 审 核 " Visible="false" OnClick="CheckButton_Click"  />		    
		    <asp:Button CssClass="button" ID="CancelButton" runat="server" Text=" 取 消 "  Visible="false" OnClick="CancelButton_Click" />
		    <asp:Button CssClass="button" ID="SendButton" runat="server" Text=" 发 货 "  Visible="false" OnClick="SendButton_Click" OnClientClick="return send()"/>
		    <asp:Button CssClass="button" ID="ReceivedButton" runat="server" Text="收货确认"  Visible="false" OnClick="ReceivedButton_Click"  OnClientClick="return received()"/>
		    <asp:Button CssClass="button" ID="ChangeButton" runat="server" Text="换货确认"  Visible="false" OnClick="ChangeButton_Click" />
		    <asp:Button CssClass="button" ID="ReturnButton" runat="server" Text="退货确认"  Visible="false" OnClick="ReturnButton_Click" />
		    <asp:Button CssClass="button" ID="BackButton" runat="server" Text=" 撤 销 " Visible="false"  OnClick="BackButton_Click" OnClientClick="return back()"/> 
		    <asp:Button CssClass="button" ID="RefundButton" runat="server" Text=" 退 款 " Visible="false"  OnClick="RefundButton_Click" style="width:auto"/> 		    
		</li>
	</ul>
	<%if(orderActionList.Count>0){ %>
    <ul class="listHead">
        <li style="width:15%">订单操作</li>
	    <li style="width:30%">订单状态变化</li>
	    <li style="width:15%">操作时间</li>
	    <li style="width:10%">操作人</li>
	    <li style="width:30%">备注</li>
	</ul>
	<%foreach (OrderActionInfo orderAction in orderActionList){ %>
	<ul class="listMain">
	    <li style="width:15%"><%=OrderActionBLL.ReadOrderOperate(orderAction.OrderOperate) %></li>
	    <li style="width:30%"><%=OrderBLL.ReadOrderStatus(orderAction.StartOrderStatus) %> ——> <%=OrderBLL.ReadOrderStatus(orderAction.EndOrderStatus) %></li>
	    <li style="width:15%"><%=orderAction.Date %></li>
	    <li style="width:10%"><%=orderAction.AdminName %></li>
	    <li style="width:30%"><%=orderAction.Note %></li>
	</ul>
	<%} %>
	<%} %>
</div>
<style type="text/css">
.add ul .right {width:200px;}
</style>
<script language="javascript" type="text/javascript" src="Js/OrderDetail.js"></script>
<script language="javascript" type="text/javascript">    
    var sendPoint="<%=sendPoint %>";
    var isActivity="<%=order.IsActivity%>";
    var orderStatus="<%=order.OrderStatus %>";
    showProduct(<%=order.ID %>);
</script>
</asp:Content>
