<%@ Page language="c#" Codebehind="OrderModify.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.OrderModify" %>
<!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>
	    <!--#include file="inc/head.inc"-->
		<title>OrderModify</title>
		<script type="text/javascript" src="inc/OrderModify.js"></script>
		<script type="text/javascript" src="inc/jquery.easydrag.handler.beta2.js"></script>
		<script type="text/javascript" src="inc/multi_popup.js"></script>
		<script type="text/javascript" src="inc/receipt.js"></script>
		<link type="text/css" rel="stylesheet" href="style/multi_popup.css" />
		<script type="text/javascript">
			var status = '<%= order.Status%>';
			var paytype = '<%= order.PayType%>';
			var orderID = '<%= order.OrderID %>';
			var discount = <%=order.Discount %>;
			var memberID = <%=order.MemberID %>;
		</script>
		<style type="text/css">
		    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>
	    <div class="container">
		<div class="sub_container">
		<form id="Form1" method="post" runat="server">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</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>
			        <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">
		            <%if (pnum > 0){%>
		            购买的商品
		            <table id="tbPdts" width="95%" class="thinBorder">
				        <tbody>
					        <tr>
						        <td align="center" height="26">商品编号</td>
						        <td align="left">商品名称</td>
						        <td align="left">商品属性</td>
						        <td align="center">数量</td>
						        <td align="center">单价</td>
						        <td align="center">单项小计</td>
						        <td style="width:50px;" align="center">是否打折</td>
						        <td style="width:30px; text-align:center;">删除</td>
					        </tr> <!-- BEGIN row -->
					        <asp:repeater id="rptOrderItems" Runat="server">
						        <ItemTemplate>
							        <tr>
								        <td noWrap align="center" width="120" height="20"><%# GetProductNo(DataBinder.Eval(Container.DataItem, "ProductID").ToString()) %></td>
								        <td align="left"><%# DataBinder.Eval(Container.DataItem, "ProductName") %><br>
									        <input type="hidden" name='item' value='<%# DataBinder.Eval(Container.DataItem, "OrderProductID") %>' />
									        <input type="hidden" name='orderpid' value='<%# DataBinder.Eval(Container.DataItem, "ProductID") %>' />
									        <input type="hidden" name='GID' value='<%# DataBinder.Eval(Container.DataItem, "GoodsID") %>' />
									        <asp:Repeater runat="server" ID="rptPresents" DataSource='<%# GetPresent(DataBinder.Eval(Container.DataItem, "OrderID").ToString(),(int)DataBinder.Eval(Container.DataItem, "ProductID")) %>'>
									        <ItemTemplate>
									        <span style="color:Red;"><br />[赠品]</span><%# DataBinder.Eval(Container.DataItem,"PresentName") %>  <span style="color:Red;">×<%# DataBinder.Eval(Container.DataItem,"PresentNum") %></span>
									        </ItemTemplate>
									        </asp:Repeater>
								        </td>
								        <td align="left"><%# DataBinder.Eval(Container.DataItem, "ProductSpecs") %></td>
								        <td align="center"><input name="quantity" type="text" class="inputstyle" value='<%# DataBinder.Eval(Container.DataItem, "Quantity") %>' size="7" maxlength="10"/></td>
								        <td align="left"><input name="unitPrice" type="text" value='<%# DataBinder.Eval(Container.DataItem, "UnitPrice","{0:f2}") %>' size="7" maxlength="10"/><%# DataBinder.Eval(Container.DataItem, "IsDiscount").ToString() == "1" ? "×" + order.Discount + "%" : ""%></td>
								        <td align="center"><span name="SubPrice"><%# DataBinder.Eval(Container.DataItem,"SubPrice") %></span><input type="hidden" name="SubPrice" value="<%# DataBinder.Eval(Container.DataItem,"SubPrice") %>" /></td>
								        <%--<td align="center"><%# DataBinder.Eval(Container.DataItem, "IsDiscount").ToString() == "1" ? "是" : "否" %><input type="hidden" name="discount" value="<%# DataBinder.Eval(Container.DataItem, "IsDiscount").ToString() == "1" ? (decimal.Parse(order.Discount) / 100).ToString() : "1" %>"/></td>--%>
								        <td align="center"><%# DataBinder.Eval(Container.DataItem, "IsDiscount").ToString() == "1" ? "是" : "否" %><input type="hidden" name="discount" value="<%# DataBinder.Eval(Container.DataItem, "IsDiscount") %>"/></td>
								        <td align="center"><span class="hand deletePdt" style="color:Red;">删除</span></td>
							        </tr>
						        </ItemTemplate>
					        </asp:repeater>
				        </tbody>
			        </table>
			        <table width="95%" class="thinBorder">
			            <tr>
			                <td width="120">增加商品：</td>
			                <td>
			                    <input type="radio" name="rdQueryType" checked="checked" value="1" />
			                    商品编号<input type="radio" name="rdQueryType" value="2" />
			                    商品ID<input type="text" name="txtQueryKey" id="txtQueryKey" class="disabled" />
			                    <input type="button" id="btnQuery" class="inputbtn" value="查询" />
			                    <input type="button" id="btnAddPdt" class="inputbtn" value="添加商品" disabled="disabled" />
			                    
			                    <input type="hidden" id="OrderPID_old" />
			                    <input type="hidden" id="OrderPID_curr" />
			                    <input type="hidden" id="OrderPID_new" name="OrderPID_new" />
			                    <input type="hidden" id="OrderPID_deleted" name="OrderPID_deleted" />
			                    
			                    <input type="hidden" id="OrderGID_old" />
			                    <input type="hidden" id="OrderGID_curr" />
			                    <input type="hidden" id="OrderGID_new" name="OrderGID_new" />
			                    <input type="hidden" id="OrderGID_deleted" name="OrderGID_deleted" />
			                    
			                    <input type="hidden" id="tmp_GID" name="tmp_GID" value="0" />
			                    <input type="hidden" id="spectext" name="spectext" value="" />
			                </td>
			            </tr>
			            <tr id="queryResult"></tr>
			            <tr id="Specs" style="display:none;">
			                <td>可选属性：</td>
			                <td><table id="SpecItems" class="thinBorder"></table></td>
			            </tr>
			            <tr><td></td><td></td></tr>
			        </table>
			        <%} %>
			        
			        <%if(gnum > 0) {%>
			        <br />
			        兑换的礼品
			        <table width="95%" class="thinBorder">
				        <tbody>
					        <tr>
						        <td align="left" height="26">礼品名称<BR>
						        </td>
						        <td align="center">数量</td>
						        <td align="center">所需积分<BR>
						        </td>
						        <td align="center">单项小计</td>
					        </tr> <!-- BEGIN row -->
					        <asp:repeater id="rptGiftItems" Runat="server">
						        <ItemTemplate>
							        <tr>
								        <td align="left" height="20"><%# DataBinder.Eval(Container.DataItem, "ProductName") %></td>
								        <td align="center"><%# DataBinder.Eval(Container.DataItem, "Quantity") %></td>
								        <td align="center"><%# DataBinder.Eval(Container.DataItem, "GiftScore") %></td>
								        <td align="center"><%# (int)DataBinder.Eval(Container.DataItem, "GiftScore") * (int)DataBinder.Eval(Container.DataItem, "Quantity")%></td>
							        </tr>
						        </ItemTemplate>
					        </asp:repeater>
				        </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%>
							        &nbsp;&nbsp;&nbsp;&nbsp;下单日期：<%=order.OrderTime%><%if(order.ShipTime!=""){%>
							        &nbsp;&nbsp;&nbsp;&nbsp;送货日期：<%=order.ShipTime%><%}%>
						        </td>
					        </tr>
                            <tr>
                                <td>
                                    <hr noshade size="1">
                                    <div id="favourable" style="line-height:20px;">
                                        <%=order.Favourable%>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="7">
                                    <hr noshade size="1">
                                </td>
                            </tr>
                            
				        </tbody>
			        </table>
			        <table id="Table5" cellSpacing="0" cellPadding="2" width="95%" bgColor="#ffffff" border="0">
				        <tr>
					        <td vAlign="top" width="47%">
						        <table width="100%">
							        <tr>
								        <td>定单状态：<%=orderStatus%></td>
							        </tr>
							        <tr>
							            <td>
							                支付类型：<asp:DropDownList ID="ddlPayType" runat="server"></asp:DropDownList><asp:DropDownList ID="ddlOnlinePayment" runat="server"></asp:DropDownList><asp:DropDownList ID="ddlZtds" runat="server"></asp:DropDownList>
							            </td>
							        </tr>
							        <tr>
							            <td>
							                配送方式：<asp:DropDownList ID="ddlShipping" runat="server"></asp:DropDownList>
							            </td>
							        </tr>
						        </table>
					        </td>
					        <td width="48%">
						        <table id="Table7" width="100%">
							        <tr>
								        <td class="tdborder" align="right">订单总金额：</td>
								        <td><asp:textbox id="txtTotalPrice" runat="server" Size="10" MaxLength="50" ReadOnly="true" CssClass="disabled"></asp:textbox></td>
							        </tr>
                                    <tr>
								        <td class="tdborder" align="right">商品总金额：</td>
								        <td><asp:textbox id="txtProductPrice" runat="server" Size="10" MaxLength="50" ReadOnly="true" CssClass="disabled"></asp:textbox></td>
							        </tr>
									<%if(order.IsAgentFContent!=""){ %>
						            <tr>
								        <td class="tdborder" align="right"><%= order.IsAgentFContent%>：</td>
								        <td><%= order.IsAgentF == 1 ? "Yes" : "No"%></td>
							        </tr>
							        <%} %>
							        
							        <tr style="display:none;">
								        <td class="tdborder" align="right">配件价格：</td>
								        <td><asp:textbox id="txtCustomItemPrice" runat="server" Size="10" MaxLength="50"></asp:textbox></td>
							        </tr>
							        <tr>
								        <td class="tdborder" align="right">商品运费：</td>
								        <td><asp:textbox id="txtShipPrice" runat="server" Size="10" MaxLength="50"></asp:textbox></td>
							        </tr>
							        <tr>
							            <td class="tdborder" align="right">发票税金：</td>
							            <td><asp:textbox id="txtTaxPrice" runat="server" Size="10" MaxLength="50"></asp:textbox><asp:CheckBox runat="server" ID="chkNeedInvoice" Text="是否需要发票" ></asp:CheckBox></td>
							        </tr>
							        <tr>
								        <td class="tdborder" align="right">使用预付款金额：</td>
								        <td><asp:textbox id="txtAdvancePayment" runat="server" Size="10" MaxLength="50" ReadOnly="true" CssClass="disabled"></asp:textbox></td>
							        </tr>
							        <tr>
								        <td class="tdborder" align="right">积分抵消金额：</td>
								        <td><%=string.Format("{0:f}",order.ScoreAmount) %></td>
							        </tr>
							        <tr>
								        <td class="tdborder" align="right">还需付款金额：</td>
								        <td><font color="red"><asp:textbox id="txtPaymentMoney" runat="server" Size="10" MaxLength="50" ReadOnly="true" CssClass="disabled"></asp:textbox></font></td>
							        </tr>
							        <tr>
								        <td class="tdborder" align="right">订单折扣或涨价：</td>
								        <td><font color="red"><asp:textbox id="txtChangedPrice" runat="server" Size="10" MaxLength="50">0</asp:textbox></font></td>
							        </tr>
						        </table>
					        </td>
				        </tr>
			        </table>
		        </div>
	        </div>
	        <div style="display:none;">
		    <div class="frame">
		        <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>
		    <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 style="display:none;">
							<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="cb0" runat="server" Text="未付款"></asp:CheckBox>
                                <asp:CheckBox ID="cb1" runat="server" Text="部分付款"></asp:CheckBox>
                                <asp:CheckBox ID="cb2" runat="server" Text="已付款"></asp:CheckBox>
                                <asp:CheckBox ID="cb3" runat="server" Text="已确认"></asp:CheckBox>
                                <asp:CheckBox ID="cb4" runat="server" Text="正在配货"></asp:CheckBox>
                                <asp:CheckBox ID="cb5" runat="server" Text="部分发货"></asp:CheckBox>
                                <asp:CheckBox ID="cb6" runat="server" Text="已发货"></asp:CheckBox>
                                <asp:CheckBox ID="cb7" runat="server" Text="已签收"></asp:CheckBox>
                                <asp:CheckBox ID="cb8" runat="server" Text="已退单"></asp:CheckBox>
                                <asp:CheckBox ID="cb9" runat="server" Text="已退款"></asp:CheckBox>
                                <asp:CheckBox ID="cb10" runat="server" Text="已作废"></asp:CheckBox>
                                <asp:CheckBox ID="cb12" runat="server" Text="已归档"></asp:CheckBox>
                                
						        <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 class="frame tab">
	            <div class="frame_title">单据</div>
	            <div class="frame_content">
	                <table width="95%" bgColor="#ffffff">
	                    <tr>
	                        <td colspan="2">
	                            <input type="button" id="btnShowReceivePay" value="填写收款单" Class="inputbtn" <%=disalbeAddReceivepay %> />
	                            <input type="button" id="btnShowRefund" value="填写退款单" Class="inputbtn" <%=disableAddRefund %>  />
	                            <input type="button" id="btnShowShippingGoods" value="填写发货单" Class="inputbtn" <%=disableAddShippingGoods %> />
	                            <input type="button" id="btnShowReturnGoods" value="填写退货单" Class="inputbtn" <%=disableAddReturnGoods %> />
	                        </td>
	                    </tr>
	                    <tr>
	                        <td>
	                            <table class="thinBorder" style="width:500px;">
	                                <tr>
	                                    <th colspan="4">收款单据</th>
	                                </tr>
	                                <tr>
	                                    <th>填写日期</th>
	                                    <th>收款金额</th>
	                                    <th>支付方式</th>
	                                    <th>管理员</th>
	                                </tr>
                                    <asp:Repeater runat="server" ID="rptReceivePay">
                                        <ItemTemplate>
    	                                    <tr>
    	                                        <td><%# DataBinder.Eval(Container.DataItem,"AddTime") %></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "Money")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "PaymentName")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "WorkPeople")%></td>
    	                                    </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
	                            </table>
	                        </td>
	                        <td>
	                            <table class="thinBorder" style="width:500px;">
	                                <tr>
	                                    <th colspan="4">退款单据</th>
	                                </tr>
	                                <tr>
	                                    <th>填写日期</th>
	                                    <th>退款金额</th>
	                                    <th>退款方式</th>
	                                    <th>管理员</th>
	                                </tr>
                                    <asp:Repeater runat="server" ID="rptRefund">
                                        <ItemTemplate>
    	                                    <tr>
    	                                        <td><%# DataBinder.Eval(Container.DataItem,"AddTime") %></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "Money")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "PaymentName")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "WorkPeople")%></td>
    	                                    </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
	                            </table>
	                        </td>
	                    </tr>
	                    <tr>
	                        <td>
	                            <table class="thinBorder" style="width:500px;">
	                                <tr>
	                                    <th colspan="5">发货单据</th>
	                                </tr>
	                                <tr>
	                                    <th>填写日期</th>
	                                    <th>物流单号</th>
	                                    <th>收件人</th>
	                                    <th>配送方式</th>
	                                    <th>管理员</th>
	                                </tr>
                                    <asp:Repeater runat="server" ID="rptShippingGoods">
                                        <ItemTemplate>
    	                                    <tr>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "AddTime")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "ShippingNo")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "ReceiverName")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "ShippingName")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "Admin")%></td>
    	                                    </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
	                            </table>
	                        </td>
	                        <td>
	                            <table class="thinBorder" style="width:500px;">
	                                <tr>
	                                    <th colspan="5">退货单据</th>
	                                </tr>
	                                <tr>
	                                    <th>填写日期</th>
	                                    <th>物流单号</th>
	                                    <th>退货人</th>
	                                    <th>配送方式</th>
	                                    <th>管理员</th>
	                                </tr>
                                    <asp:Repeater runat="server" ID="rptReturnGoods">
                                        <ItemTemplate>
    	                                    <tr>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "AddTime")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "ShippingNo")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "ReceiverName")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "ShippingName")%></td>
    	                                        <td><%# DataBinder.Eval(Container.DataItem, "Admin")%></td>
    	                                    </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
	                            </table>
	                        </td>
	                    </tr>
                        <tr>
	                        <td colspan="2">
	                            <%if(order.NeedInvoice){%>
                                <table class="thinBorder" style="width:500px;">
                                	<tr>
                                    	<th colspan="2">发票</th>
                                    </tr>
                                    <tr>
                                    	<th width="15%">发票类型:</th>
                                        <td><%=orderInvoice.InvoiceType == 0 ? "普通发票" : "增值税发票"%></td>
                                    </tr>
                                	<tr>
                                    	<th>发票抬头:</th>
                                        <td><%=orderInvoice.InvoiceHead%></td>
                                    </tr>
                                    <tr>
                                    	<th>发票内容:</th>
                                        <td><%=orderInvoice.IsDetails ? orderInvoice.InvoiceContent : "商品明细"%></td>
                                    </tr>
                                    <tr>
                                    	<th>税金:</th>
                                        <td><%=order.TaxPrice%></td>
                                    </tr>
                                </table>
                                <%}%>
	                        </td>
	                    </tr>
	                </table>
	            </div>
	        </div>
	        
	        <div class="frame tab">
		        <div class="frame_title">客户留言</div>
		        <div class="frame_content">
		            <table class="thinBorder">
                        <tr>
                            <th>留言内容</th>
                            <th>回复内容</th>
                            <th>回复</th>
                        </tr>
                        <asp:Repeater runat="server" ID="rptReview">
                            <ItemTemplate>
                                <tr>
                                    <td><%# DataBinder.Eval(Container.DataItem, "Body") %></td>
                                    <td style="width:300px;"><%# DataBinder.Eval(Container.DataItem, "Reply") %><input type="text" id="txtReview_<%# DataBinder.Eval(Container.DataItem, "OrderReviewID") %>" size="50" style="display:none;" /></td>
                                    <td><%# DataBinder.Eval(Container.DataItem, "Reply").ToString().Trim() == "" ? "<span class='hand' revid='" + DataBinder.Eval(Container.DataItem, "OrderReviewID") + "'>点击回复</span>　<span class='hand' id='saverev_" + DataBinder.Eval(Container.DataItem, "OrderReviewID") + "' style='display:none'>提交回复</span>　<span class='hand' style='display:none' id='cancelrev_" + DataBinder.Eval(Container.DataItem, "OrderReviewID") + "'>取消</span>" : "已回复"%></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
		        </div>
	        </div>
		</div>
		<div class="save">
		    <table cellpadding="0" cellspacing="0" style="width:95%;">
		        <tr>
			        <td height="20" align="center" valign="middle"><asp:Button ID="btnSave" OnClick="btnSave_Click" Runat="server" Text="保 存" Class="inputbtn"></asp:Button>
				        <input type="button" onclick='printOrder(<%=Request.QueryString["OrderID"]%>)' value="打 印" Class="inputbtn">
				        <input type="button" id="btnPre" value="上一单"  onclick='javascritp:window.location.href="OrderModify.aspx?<%=Request.QueryString.ToString()+"&PreNext=0" %>"' class="inputbtn"/>
				        <input type="button" id="btnNext" value="下一单" onclick='javascritp:window.location.href="OrderModify.aspx?<%=Request.QueryString.ToString()+"&PreNext=1" %>"' class="inputbtn"/>
				        <input type="button" id="btnBack" value="返回列表" class="inputbtn"/>
				        <script type="text/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>
		
		<div id="ShowReceivePay" class="popupContact" style="z-index:2; width:800px;">
            <div id="ReceivePayHead" class="popupHead">
                <div class="popupTitle">收款单</div>
                <div class="popupClose" id="ReceivePayClose" title="关闭">关闭</div>
                <div style="clear:both;"></div>
            </div>
            <div style=" padding:10px;">
                <form action="Receipt.aspx" id="frmAddReceivePay" onsubmit="return false;">
                    <table style="width:100%;" class="thinBorder">
                        <tr>
                            <td style="width:15%;">订单号：</td>
                            <td style="width:35%;"><%=order.OrderNo%><input type="hidden" id="PayOrderNo" name="orderno" value="<%=order.OrderNo%>" /></td>
                            <td style="width:15%">下订日期：</td>
                            <td style="width:35%;"><%=order.OrderTime%></td>
                        </tr>
                        <tr>
                            <td>订单总金额：</td>
                            <td><%=string.Format("{0:f}",order.TotalPrice)%></td>
                            <td>未付余款：</td>
                            <td><span id="span_leftreceive"></span></td>
                        </tr>
                        <tr>
                            <td>支付类型：</td>
                            <td>
                                <input type="radio" id="paytmethod_1" name="paytmethod" value="1" /><label for="paytmethod_1">在线支付</label>
                                <input type="radio" id="paytmethod_2" name="paytmethod" value="2" /><label for="paytmethod_2">线下支付</label>
                                <input type="radio" id="paytmethod_3" name="paytmethod" value="3" /><label for="paytmethod_3">预付款支付</label>
                            </td>
                            <td>支付人：</td>
                            <td><input type="text" name="txtPayerName" value='<%=order.BuyerName %>' /><input type="hidden" name="membername" value="" /></td>
                        </tr>
                        <tr>
                            <td>支付方式：</td>
                            <td colspan="3">
                                <input type="text" name="txtPaymentName" />
                                <select id="ddlPayment" name="ddlPayment">
                                    <option value="">选择</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>收款银行：</td>
                            <td colspan="3">
                                <input type="text" name="txtReceiveBank" />
                                <select id="ddlBrankInfo">
                                    <option value="]-[">-----使用已存在的账户-----</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>收款账号：</td>
                            <td><input type="text" name="txtReceiveAccount" /></td>
                            <td>收款金额：</td>
                            <td><input type="text" id="txtReceivePrice" name="txtReceivePrice" value='<%=string.Format("{0:f}",order.TotalPrice)%>' /></td>
                        </tr>
                        <tr>
                            <td>备注：</td>
                            <td colspan="3"><textarea id="txtReceivePayRemark" name="txtReceivePayRemark" cols="50" rows="3" ></textarea><span id="showLen"></span></td>
                        </tr>
                        <tr>
                            <td colspan="4" align="center"><input type="submit" value="保存"class="inputbtn" /></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div id="ShowRefund" class="popupContact" style="z-index:2; width:800px;">
            <div id="RefundHead" class="popupHead">
                <div class="popupTitle">退款单</div>
                <div class="popupClose" id="RefundClose" title="关闭">关闭</div>
                <div style="clear:both;"></div>
            </div>
            <div style="padding:10px;">
                <form action="Receipt.aspx" id="frmRefund" onsubmit="return false;">
                    <table style="width:100%;" class="thinBorder">
                        <tr>
                            <td style="width:15%;">订单号：</td>
                            <td style="width:35%;"><%=order.OrderNo%><input type="hidden" id="RefundOrderNo" name="orderno" value="<%=order.OrderNo%>" /></td>
                            <td style="width:15%">下订日期：</td>
                            <td style="width:35%;"><%=order.OrderTime%></td>
                        </tr>
                        <tr>
                            <td>订单总金额：</td>
                            <td><%=string.Format("{0:f}",order.TotalPrice)%></td>
                            <td>已收金额：</td>
                            <td><span id="span_leftrefund"></span></td>
                        </tr>
                        <tr>
                            <td>退款类型：</td>
                            <td>
                                <input type="radio" id="refundpaymethod_1" name="paytmethod" value="1" /><label for="refundpaymethod_1">在线支付</label>
                                <input type="radio" id="refundpaymethod_2" name="paytmethod" value="2" /><label for="refundpaymethod_2">线下支付</label>
                                <input type="radio" id="refundpaymethod_3" name="paytmethod" value="3" /><label for="refundpaymethod_3">预付款支付</label>
                            </td>
                            <td>收款人：</td>
                            <td><input type="text" name="txtReceiverName" value='<%=order.BuyerName %>' /><input type="hidden" name="membername" value="" /></td>
                        </tr>
                        <tr>
                            <td>退款方式：</td>
                            <td colspan="3">
                                <input type="text" name="txtRefundPaymentName" />
                                <select id="ddlRefundPayment" name="ddlPayment">
                                    <option value="">选择</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>退款银行：</td>
                            <td colspan="3">
                                <input type="text" name="txtRefundBank" />
                                <select id="ddlRefundBank">
                                    <option value="]-[">-----使用已存在的账户-----</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>退款账号：</td>
                            <td><input type="text" name="txtRefundAccount" /></td>
                            <td>退款金额：</td>
                            <td><input type="text" id="txtRefundPrice" name="txtRefundPrice" value='<%=string.Format("{0:f}",order.TotalPrice)%>' /></td>
                        </tr>
                        <tr>
                            <td>备注：</td>
                            <td colspan="3"><textarea id="txtRefunRemark" name="txtRefunRemark" cols="50" rows="3" ></textarea><span id="refund_showLen"></span></td>
                        </tr>
                        <tr>
                            <td colspan="4" align="center"><input type="submit" value="保存" class="inputbtn" /></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div id="ShowShipping" class="popupContact" style="z-index:2; width:800px;">
            <div id="ShippingHead" class="popupHead">
                <div class="popupTitle"><span id="span_shiptitle">发货单</span></div>
                <div class="popupClose" id="ShippingClose" title="关闭">关闭</div>
                <div style="clear:both;"></div>
            </div>
            <div style="padding:10px;">
                <form action="Receipt.aspx" id="AddShipping" onsubmit="return false;">
                    <table style="width:100%;" class="thinBorder">
                        <tr>
                            <td style="width:15%;">订单号：</td>
                            <td style="width:35%;"><%=order.OrderNo%><input type="hidden" id="Hidden1" name="orderno" value="<%=order.OrderNo%>" /></td>
                            <td style="width:15%">下订日期：</td>
                            <td style="width:35%;"><%=order.OrderTime%></td>
                        </tr>
                        <tr>
                            <td>配送方式：</td>
                            <td>
                                <input type="text" id="txtShippingName" name="txtShippingName" maxlength="50" />
                                <select id="ddlShippingName" name="ddlShippingName">
                                    <option value="">----选择----</option>
                                </select>
                            </td>
                            <td>物流公司：</td>
                            <td>
                                <input type="text" id="txtCompanyName" name="txtCompanyName" />
                                <select id="ddlShippingCompany">
                                    <option>----选择已有----</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>物流单号：</td>
                            <td>
                                <input type="text" name="txtShippingNo" />
                            </td>
                            <td>配送费用：</td>
                            <td><input type="text" name="txtShippingPrice" value="<%=order.ShipPrice%>" /></td>
                        </tr>
                        <tr>
                            <td><span id="span_name">收货人</span>：</td>
                            <td><input type="text" name="txtReceiverName" value="<%=order.ReceiverName%>" /><input type="hidden" name="membername" value="" /></td>
                            <td>E-mail：</td>
                            <td><input type="text" name="txtEmail" value="<%=order.ReceiverEmail%>" /></td>
                        </tr>
                        <tr>
                            <td>联系电话：</td>
                            <td><input type="text" name="txtTel" value="<%=order.ReceiverPhone%>"/></td>
                            <td>邮政编码：</td>
                            <td><input type="text" name="txtPostalCode" value="<%=order.ReceiverPostalcode%>" /></td>
                        </tr>
                        <tr>
                            <td>地址：</td>
                            <td colspan="3"><input type="text" name="txtAdress" size="50" value="<%=order.ReceiverAddress%>" /></td>
                        </tr>
                        <tr>
                            <td><span id="span_remark">发货备注</span>：</td>
                            <td colspan="3"><textarea id="txtShippingRemark" name="txtShippingRemark" cols="50" rows="3" ></textarea><%--<span id="shipping_showLen"></span>--%></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="4" align="center"><input type="submit" id="btnAddShipping" value="保存" class="inputbtn"/><input type="hidden" id="IsReturn" name="IsReturn" value="0" /></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div id="backgroundPopup" class="backgroundPopup"></div>
        
	    
	    
	</body>
</html>
