<%@ Page language="c#" Codebehind="OrderModify.aspx.cs" AutoEventWireup="false" Inherits="XpShop.WebUI.Admin.OrderModify" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	    <!--#include file="inc/head.inc"-->
		<title>OrderModify</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script type="text/javascript" src="inc/OrderModify.js"></script>
		<script language="javascript">
		function CheckMoney(obj)
			{
				document.getElementById(obj).value = document.getElementById(obj).value.replace(/[^\d\.]/g,'');
				if(Number(document.getElementById(obj).value)<1 || document.getElementById(obj).value=="")
				{
					document.getElementById(obj).value = "";
				}
			}
		</script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
	    <div class="container">
		<div class="sub_container">
		<form id="Form1" method="post" runat="server">
		<div class="sub_container_title"><a href="../default.aspx" target="_blank">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />订单编辑</div>
		<div class="sub_container_tabs">
			<div class="tabmenu">
			    <ul>
			        <li class="menuitem tabon">全部信息</li>
			        <li class="menuitem tabout">商品信息</li>
			        <li class="menuitem tabout">订单信息</li>
			        <li class="menuitem tabout">购货人信息</li>
			        <li class="menuitem tabout">收货人信息</li>
			        <li class="menuitem tabout">订单附言</li>
			        <li class="menuitem tabout">修改订单状态</li>
			    </ul>
			</div>
		</div>
		<div class="sub_container_content">
		    <div class="frame tab">
		        <div class="frame_title">商品信息<asp:Label id="lblTitleInfo" runat="server"></asp:Label></div>
		        <div class="frame_content">
		            <TABLE id="Table4" cellSpacing="3" cellPadding="3" width="95%" bgColor="#ffffff" border="0">
				        <TBODY>
					        <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"
							        align="center" width="10" height="26" >商品ID</TD>
						        <TD style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="center" width="64" height="26">商品编号</TD>
						        <TD style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="left" width="184" height="26">商品名称<BR>
						        </TD>
						        <TD style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="left" width="100" height="26">商品规格<BR>
						        </TD>
						        <TD style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="center" width="99" height="26">数量</TD>
						        <TD style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="center" width="98" height="26">单价<BR>
						        </TD>
						        <TD style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="center" width="98" height="26">配件价<BR>
						        </TD>
						        <TD style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="center" width="104" height="26">单项小计</TD>
						        <td style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
							        align="center" width="130">是否参与打折</td>
					        </TR> <!-- BEGIN row -->
					        <asp:repeater id="rptOrderItems" Runat="server">
						        <ItemTemplate>
							        <TR>
										<TD  style=" display:none"><input name="item<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="product<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "OrderProductID")%>' size="9" maxlength="10" /></TD>
								        <TD noWrap align="center" width="64" height="20"><%# GetProductNo(DataBinder.Eval(Container.DataItem, "ProductID").ToString()) %></TD>
								        <TD align="left" width="284" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductName") %><br>
									        <%# GetItemNames(DataBinder.Eval(Container.DataItem, "OrderProductID").ToString()) %>
								        </TD>
								        <TD align="left" width="100" height="20"><%# bShow(DataBinder.Eval(Container.DataItem, "ProductSpecs"))%></TD>
								        <TD align="center" width="99" height="20"><input name="quantity<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="quantity<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "Quantity") %>' size="9" maxlength="10" onkeyup="CheckMoney('quantity<%# Container.ItemIndex+1%>')"/></TD>
								        <TD align="center" width="98" height="20"><input name="unitPrice<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="unitPrice<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "UnitPrice","{0:f2}") %>' size="9" maxlength="10" onkeyup="CheckMoney('unitPrice<%# Container.ItemIndex+1%>')"/></TD>
								        <TD align="center" width="98" height="20"><input name="itemsPrice<%# Container.ItemIndex+1%>" type="text" class="inputstyle" id="itemsPrice<%# Container.ItemIndex+1%>" value='<%# DataBinder.Eval(Container.DataItem, "ItemsPrice","{0:f2}") %>' size="9" maxlength="10" onkeyup="CheckMoney('itemsPrice<%# Container.ItemIndex+1%>')"/></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" ? "是" : "否" %></TD>
							        </TR>
						        </ItemTemplate>
					        </asp:repeater>
					        <TR>
						        <TD align="center" width="64">&nbsp;</TD>
						        <TD width="334">&nbsp;</TD>
						        <TD width="98">&nbsp;</TD>
						        <TD width="99">&nbsp;</TD>
						        <TD width="104">&nbsp;</TD>
					        </TR>
				        </TBODY>
			        </TABLE>
		        </div>
	        </div>
		    <div class="frame tab">
		        <div class="frame_title">订单信息<asp:Label id="Label1" runat="server"></asp:Label></div>
		        <div class="frame_content">
		            <TABLE id="Table1" cellSpacing="0" cellPadding="0" width="95%" bgColor="#ffffff" border="0">
				        <TBODY>
					        <TR>
						        <TD class="body-shoptitle" vAlign="middle" align="center" width="67%">订单号码：<%=order.OrderNo%>
							        下单日期：<%=order.OrderTime%><%if(order.ShipTime!=""){%>
							        送货日期：<%=order.ShipTime%><%}%>
						        </TD>
					        </TR>
				        </TBODY>
			        </TABLE>
			        <TABLE id="Table5" cellSpacing="0" cellPadding="2" width="95%" bgColor="#ffffff" border="0">
				        <tr>
					        <td vAlign="top" width="47%">
						        <table id="Table6" width="100%">
							        <tr>
								        <td>定单状态：<%=orderStatus%></td>
							        </tr>
							        <tr>
								        <td>配送方式：<asp:textbox id="txtDistributionmode" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
							        </tr>
							        <tr>
								        <td>支付方式：<asp:textbox id="txtPaymentmode" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
							        </tr>
						        </table>
					        </td>
					        <td width="48%">
						        <table id="Table7" width="100%">
						            <%if(order.IsAgentFContent!=""){ %>
						            <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%"><%= order.IsAgentFContent%>：</td>
								        <td><%= order.IsAgentF == 1 ? "Yes" : "No"%></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><asp:textbox id="txtProductPrice" runat="server" Size="20" MaxLength="50"></asp:textbox>
									        (
									        <%=order.Discount%>
									        % )</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><asp:textbox id="txtCustomItemPrice" runat="server" Size="20" MaxLength="50"></asp:textbox></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><asp:textbox id="txtShipPrice" runat="server" Size="20" MaxLength="50"></asp:textbox></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><asp:textbox id="txtTotalPrice" runat="server" Size="20" MaxLength="50"></asp:textbox></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><asp:textbox id="txtAdvancePayment" runat="server" Size="20" MaxLength="50"></asp:textbox></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><font color="red"><asp:textbox id="txtPaymentMoney" runat="server" Size="20" MaxLength="50"></asp:textbox></font></td>
							        </tr>
						        </table>
					        </td>
				        </tr>
			        </TABLE>
		        </div>
	        </div>
		    <div class="frame tab">
		        <div class="frame_title">购货人信息</div>
		        <div class="frame_content">
		            <table id="Table9">
						<tr>
							<td align="right">购货人姓名：</td>
							<td><asp:textbox id="txtBuyerName" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">用户名：</td>
							<td><asp:textbox id="txtMemberName" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">联系电话：</td>
							<td><asp:textbox id="txtBuyerPhone" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">Email地址：</td>
							<td><asp:textbox id="txtBuyerEmail" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">购货人地址：</td>
							<td><asp:textbox id="txtBuyerAddress" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">邮政编码：</td>
							<td><asp:textbox id="txtBuyerPostalcode" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
					</table>
		        </div>
	        </div>
		    <div class="frame tab">
		        <div class="frame_title">收货人信息</div>
		        <div class="frame_content">
		            <table id="Table10">
						<tr>
							<td align="right">收货人姓名：</td>
							<td><asp:textbox id="txtReceiverName" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">联系电话：</td>
							<td><asp:textbox id="txtReceiverPhone" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">Email地址：</td>
							<td><asp:textbox id="txtReceiverEmail" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">收货人地址：</td>
							<td><asp:textbox id="txtReceiverAddress" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right">邮政编码：</td>
							<td><asp:textbox id="txtReceiverPostalcode" runat="server" Size="20" MaxLength="50"></asp:textbox></td>
						</tr>
						<tr>
							<td align="right"></td>
							<td></td>
						</tr>
					</table>
		        </div>
	        </div>
		    <div class="frame tab">
		        <div class="frame_title">订单附言<asp:Label id="Label2" runat="server"></asp:Label></div>
		        <div class="frame_content">
		            <table id="Table11" width="95%" bgColor="#ffffff">
				        <tr>
					        <td><asp:textbox id="txtRemark" runat="server" Size="20" height="40" TextMode="Multiline" width="200" MaxLength="50"></asp:textbox></td>
				        </tr>
				        <tr>
					        <td><STRONG><font color="blue">订单管理历史</font></STRONG>
						        <HR noShade SIZE="1">
					        </td>
				        </tr>
				        <tr>
					        <td><%=GetManageHistory()%><HR noShade SIZE="1">
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
			<div class="frame tab">
		        <div class="frame_title">修改订单状态</div>
		        <div class="frame_content">
		            <table id="Table12" width="95%" bgColor="#ffffff">
				        <tr>
					        <td>
						        <asp:CheckBox id="cb1" runat="server" Text="是否已确认" Enabled="false"></asp:CheckBox>
						        <asp:CheckBox id="cb2" runat="server" Text="是否已付款" Enabled="false"></asp:CheckBox>
						        <asp:CheckBox id="cb3" runat="server" Text="是否已发货" Enabled="false"></asp:CheckBox>
						        <asp:CheckBox id="cb4" runat="server" Text="是否已归档" Enabled="false"></asp:CheckBox>
						        <asp:CheckBox id="cb5" runat="server" Text="是否取消该订单" Enabled="false"></asp:CheckBox>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						        <font color="red">归档后赠送积分</font>
						        <br>
						        管理员附言：<asp:TextBox id="txtMessage" runat="server" Text="" width="250" TextMode="Multiline" height="40"></asp:TextBox>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
		</div>
		<div class="save">
		    <table style="width:95%;">
		        <tr>
			        <td height="20" align="center" valign="middle"><asp:Button ID="btnSave" Runat="server" Text="保 存" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid"
					        Width="69" Height="22"></asp:Button>
				        <input type="button" onclick='printOrder(<%=Request.QueryString["OrderID"]%>)' 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">
				        <input type="button" id="btnBack" 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"/>
				        <script language="javascript">
				        function printOrder(oid)
				        {
					        temp=window.open('../OrderPrint.aspx?from=manage&OrderID='+oid,'shopcat','width=700,height=650,scrollbars=yes');
					        temp.focus();
				        }
				        </script>
			        </td>
		        </tr>
		    </table>
		</div>
		</form>
		</div>
		</div>
	</body>
</HTML>
