 <%@ Page language="c#" Codebehind="OrderModify.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.OrderModify" %>
<%@ Import Namespace="System.Data"%>
<!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/jquery.validate.js"></script>
		<script type="text/javascript" src="inc/multi_popup.js"></script>
		<script type="text/javascript" src="inc/receipt.js"></script>
        <script src="inc/ui.datepicker.cn.js" type="text/javascript"></script>
		<link type="text/css" rel="stylesheet" href="style/multi_popup.css" />
        <link type="text/css" rel="stylesheet" href="style/ui.datepicker.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}
            /*弹出窗口*/
            .popupWindow{position: absolute; z-index: 100;display: none;background-color:#FFFFFF;border:solid 1px #ccc;width: 550px;}
            .popupHead{}
            .popupTitle{}
            .popupClose{}
            .popupContent{padding:0px;width: 100%;height:auto !important; max-height:350px;overflow:auto;}
            .tips{font-size:14px;height:24px;padding-left:15px;padding-top:10px}
            .item{font-size:12px;padding-left:15px;margin-top:5px;margin-bottom:5px}
            .popupFooter{width:100%;text-align:center;margin:10px 0 10px 0}
            .btn{height:20px;}
             #maskLayer{background-color:#e3e3e3; position:absolute; z-index:99; left:0; top:0; display:none; width:100%; height:1000px;opacity:0.5;filter: alpha(opacity=50);-moz-opacity: 0.5;}
 	        .save{z-index:1;text-align:center;}
 	    </style>
        <script type="text/javascript">
		    $(document).ready(function(){
		    
		        $("input[@name=hiddeRemark]").blur(function(){
		        if($(this).val()!='')
		        {
    		        $(this).prev().children('input').val("其它原因,取消订单(备注:"+$(this).val()+")");
		        }
		        });
		        
	            $("input[@name=txtRefundPayTime]").datepicker().click(function(){$(this).blur()});
	            $("input[@name=txtReceivePayTime]").datepicker().click(function(){$(this).blur()});
                var pageH = $(document.body).height();
                var pageW = $(document.body).width();
                var winH = $(window).height();
                var maxH = Math.max(winH, pageH);

               $('.sub_container').scroll(function() {
		            $('#SendGoodsDiv').css("top",$('.sub_container').scrollTop()+50);
                    $('#CancelDiv').css("top",$('.sub_container').scrollTop()+50);
		            $('#RefundDiv').css("top",$('.sub_container').scrollTop()+50);
                    $('#ConfirmDiv').css("top",$('.sub_container').scrollTop()+50);
                    $('#ReceiveDiv').css("top",$('.sub_container').scrollTop()+50);
                });
                                
                //收款单
                $('#doReceive').click(function(){
		            $('#ReceiveDiv').css("left",($('.sub_container_content').width()-$('#ReceiveDiv').width())/2);
		            $('#ReceiveDiv').css("top",$('.sub_container_content').scrollTop()+50);
		            $('#ReceiveDiv').show();
                    $('#maskLayer').show().width(pageW).height(maxH);         
		        })
                $('#closeReceive').click(function(){
		            $('#ReceiveDiv').hide();
		            $('#maskLayer').hide();
		        });
                $('#btnReceive').click(function(){
                    if(!CheckReceive())
                    return false;
		            if(confirm("这个操作将会改变订单的状态，确定收款吗?"))
		            return true;
		            else
		            return false;
		        });
		        
                //发货单
		        $('#doSend').click(function(){
		            $('#SendGoodsDiv').css("left",($('.sub_container').width()-$('#SendGoodsDiv').width())/2);
                    $('#SendGoodsDiv').css("top",$('.sub_container').scrollTop()+50);
                    $('#SendGoodsDiv').show();
                    $('#maskLayer').show().width(pageW).height(maxH);

    	        });
                $('#closeSend').click(function(){
		            $('#SendGoodsDiv').hide();
		            $('#maskLayer').hide();
		        });
                $('#btnSend').click(function(){
		            if(!CheckSend())
		            return false;
		            if(confirm("这个操作将会改变订单的状态，确定发货吗?"))
		            return true;
		            else
		            return false;
		        });
		        
		        //取消订单
		        $('#doCancel').click(function(){
		            $('#CancelDiv').css("left",($('.sub_container_content').width()-$('#CancelDiv').width())/2);
		            $('#CancelDiv').css("top",$('.sub_container_content').scrollTop()+50);
		            $('#CancelDiv').show();
                    $('#maskLayer').show().width(pageW).height(maxH);                
		        })
                $('#closeCancel').click(function(){
		            $('#CancelDiv').hide();
		            $('#maskLayer').hide();
                });
                $('#btnCancel').click(function(){
		            if(confirm("这个操作将会改变订单的状态，确定取消订单吗?"))
		            return true;
		            else
		            return false;
		        });
		        
		        //退款单
		        $('#doRefund').click(function(){
		            $('#RefundDiv').css("left",($('.sub_container_content').width()-$('#RefundDiv').width())/2);
		            $('#RefundDiv').css("top",$('.sub_container_content').scrollTop()+50);
		            $('#RefundDiv').show();
                    $('#maskLayer').show().width(pageW).height(maxH);         
		        })
                $('#closeRefund').click(function(){
		            $('#RefundDiv').hide();
		            $('#maskLayer').hide();
		        });
                $('#btnRefund').click(function(){
                    if(!CheckRefund())
                    return false;
		            if(confirm("这个操作将会改变订单的状态，确定已退还货款给顾客了吗?"))
		            return true;
		            else
		            return false;
		        });

                //货到付款，确认订单
                $('#doConfirm').click(function(){
		            $('#ConfirmDiv').css("left",($('.sub_container_content').width()-$('#ConfirmDiv').width())/2);
		            $('#ConfirmDiv').css("top",$('.sub_container_content').scrollTop()+50);
		            $('#ConfirmDiv').show();
                    $('#maskLayer').show().width(pageW).height(maxH);         
		        })
                $('#closeConfirm').click(function(){
		            $('#ConfirmDiv').hide();
		            $('#maskLayer').hide();
		        });		        
                $('#btnConfirm').click(function(){
		            if(confirm("这个操作将会改变订单的状态，确定这个订单吗?"))
		            return true;
		            else
		            return false;
		        });		        
		        
	            //发货表中的物流公司改变事件            
                 $('#ddlExpress').change(function(){
                    if($('#ddlExpress :selected').val()=="0"){
		                $('input[name=txtQueryUrl]').val("");
		            }
                    else if($('#ddlExpress :selected').val()=="门店自提"){
		                $('input[name=txtTransNum]').val('门店自提,无需物流单号');
		            }
		            else{
		                $('input[name=txtQueryUrl]').val($('#ddlExpress :selected').attr("value"));
		            }
		        });		        
		        
		        //检查发货表单中的数据
                function CheckSend(){
                    if($('#ddlExpress').attr("value")=="0"){
                        alert("请选择物流公司");
                        $('#ddlExpress').focus();
                        return false 
                    }
                    if($('#txtTransNum').val()==''){
                        alert("物流单号不能为空");
                        $('#txtTransNum').focus();
                        return false 
                    }
                    if(!CheckLength('#txtTransNum',50)){
                        alert("物流单号长度不能超过50个字符");
                        $('#txtTransNum').focus();
                        return false;
                    }
                    return true;                     
                }  	       
	        
                //退款单中的付款方式
                $('input[@name=txtRefundPaymentName]').val($('#ddlRefundPayment :selected').text());
		        $('#ddlRefundPayment').change(function(){
		            if($('#ddlRefundPayment :selected').val()=="0"){
                        $('input[@name=txtRefundPaymentName]').val("");
		            }
		            else{
		                $('input[@name=txtRefundPaymentName]').val($('#ddlRefundPayment :selected').text());
		            }
		        });

                //收款单中的付款方式
                $('input[@name=txtReceivePaymentName]').val($('#ddlReceivePayment :selected').text());
		        $('#ddlReceivePayment').change(function(){
		            if($('#ddlReceivePayment :selected').val()=="0"){
                        $('input[@name=txtReceivePaymentName]').val("");
		            }
		            else{
		                $('input[@name=txtReceivePaymentName]').val($('#ddlReceivePayment :selected').text());
		            }
		        });        
                  
                //检查收款单中的数据
                function CheckReceive(){
                    if($("input[@name=receivePayMethod][@checked]").val()==undefined){
                    alert("支付类型不能为空");
                    $('input[@name=receivePayMethod]').focus();
                    return false 
                    }
                    if($('input[@name=txtReceivePayBank]').val()==''){
                    alert("付款银行不能为空");
                    $('input[@name=txtReceivePayBank]').focus();
                    return false   
                    }
                    if($('input[@name=txtReceivePayAccount]').val()==''){
                    alert("付款账号不能为空");
                    $('input[@name=txtReceivePayAccount]').focus();
                    return false 
                    }
                    
                    if($('input[@name=txtReceivePrice]').val()==''){
                    alert("收款金额不能为空");
                    $('input[@name=txtReceivePrice]').focus();
                    return false 
                    }  
                    if($('input[@name=txtReceiveBank]').val()==''){
                    alert("收款银行不能为空");
                    $('input[@name=txtReceiveBank]').focus();
                    return false   
                    }
                    if($('input[@name=txtReceiveAccount]').val()==''){
                    alert("收款账号不能为空");
                    $('input[@name=txtReceiveAccount]').focus();
                    return false
                    }
                    if($('input[@name=txtReceiveReceiverName]').val()==''){
                    alert("付款人不能为空");
                    $('input[@name=txtReceiveReceiverName]').focus();
                    return false;
                    }
                    if($('#txtNeedPay').val()-$('input[@name=txtReceivePrice]').val()!=0){
                    alert("收款金额跟需付款金额要相同");  
                    return false;
                    }
                    if($('input[@name=txtReceivePayTime]').val()==''){
                    alert("收款款时间不能为空");  
                    return false;
                    }
                    return true;                   
                }                           

                //检查退款表单中的数据
                function CheckRefund(){
                    if($("input[@name=refundpaymethod]:checked").val()==undefined){
                    alert("支付类型不能为空");
                    $('input[@name=refundpaymethod]').focus();
                    return false 
                    }
                    if($('input[@name=txtRefundPaymentName]').val()==''){
                    alert("退款方式不能为空");
                    $('input[@name=txtRefundPaymentName]').focus();
                    return false
                    }
                    if($('input[@name=txtRefundPayBank]').val()==''){
                    alert("退款银行不能为空");
                    $('input[@name=txtRefundPayBank]').focus();
                    return false   
                    }
                    if($('input[@name=txtRefundPayAccount]').val()==''){
                    alert("退款账号不能为空");
                    $('input[@name=txtRefundPayAccount]').focus();
                    return false 
                    }
                    if($('input[@name=txtRefundPrice]').val()==''){
                    alert("退款金额不能为空");
                    $('input[@name=txtRefundPrice]').focus();
                    return false 
                    }  
                    if($('input[@name=txtRefundBank]').val()==''){
                    alert("收款银行不能为空");
                    $('input[@name=txtRefundBank]').focus();
                    return false   
                    }
                    if($('input[@name=txtRefundAccount]').val()==''){
                    alert("收款账号不能为空");
                    $('input[@name=txtRefundAccount]').focus();
                    return false
                    }
                    if($('input[@name=txtRefundReceiverName]').val()==''){
                    alert("收款人不能为空");
                    $('input[@name=txtRefundReceiverName]').focus();
                    return false;
                    }
                    if($('#txtPaid').val()-$('input[@name=txtRefundPrice]').val()<0){
                    alert("退款金额不能大于已收款的金额");  
                    return false;
                    }
                    if($('input[@name=txtRefundPayTime]').val()==''){
                    alert("退款时间不能为空");  
                    return false;
                    }
                    return true;                   
                }
                
                //检测长度是否符合要求                
                function CheckLength(element,maxLen){
                    if($(element).val().length>maxLen)
                    return false;
                    return true;
                }
            })
		</script>
	</head>
	<body>
	    <!-- 遮罩层 -->
	    <div id=maskLayer></div>
	    <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>
			    </ul>
			</div>
		</div>
		<div class="sub_container_content"style="position:relative;z-index:1">
			<div class="frame tab">
		        <div class="frame_title">订单状态</div>
		        <div class="frame_content" style="text-align:left">
			        <div class="order_operator">
			            <div>订单状态：<span style="color:red;font-size:14px;font-weight:bold;"><%=orderStatus%></span></div>
                        <div><%=tips%></div>
                        <div>
                            <table width="100%" cellspacing="0" cellpadding="0">
                                <tbody>
                                    <tr>
                                        <th style="text-align:left"width="20%">操作角色</th>
                                        <th width="30%">操作时间</th>
                                        <th width="50%">操作</th>
                                    </tr>
                                    <asp:repeater id="rptOrderOpLog" Runat="server">
                                        <ItemTemplate>
                                            <tr>
                                                <td><%# DataBinder.Eval(Container.DataItem, "OpRule")%></td>
                                                <td><%# DataBinder.Eval(Container.DataItem, "OPTime")%></td>
                                                <td><%# DataBinder.Eval(Container.DataItem, "OPDesc")%></td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:repeater>
                                    <tr>
                                    <%if (order.Status <2 &&order.PayType<5){%>
                                        <td>管理员</td>
                                        <td>------</td>
                                        <td><a id="doReceive" style="cursor:pointer;color:blue">确认收款</a>(收到顾客支付的货款后,填写收款单)<br />
                                        <a id="doCancel" style="cursor:pointer;color:blue">取消订单</a>(超时未付款或顾客要求取消订单)</td>
                                    <%}%>
                                    <%else if (order.Status <=2 && order.PayType >=5 && order.SupplierID == 0){%>
                                        <td>商家</td>
                                        <td>------</td>
                                        <td><a id="doConfirm" style="cursor:pointer;color:blue">确认订单</a>(货到付款的订单要商家先确认订单)<br />
                                        <a id="doCancel" style="cursor:pointer;color:blue">取消订单</a>(超时未确认或顾客要求取消订单)</td>
                                    <%}%>
                                    
                                    <%else if (order.Status >= 2 && order.Status<=5 && order.PayType <= 4 && order.SupplierID == 0)
                                    {%>
                                        <td>商家</td>
                                        <td>------</td>
                                        <td><a id="doSend" style="cursor:pointer;color:blue">发货</a>(可进行全部或部分发货)<br />
                                        <a id="doCancel" style="cursor:pointer;color:blue">取消订单</a>(全部缺货、无法配送等时可取消订单,进行退款)</td>
                                    <%}else if (order.Status == 3 && order.PayType >= 5 && order.SupplierID == 0){ %>
                                        <td>商家</td>
                                        <td>------</td>
                                        <td><a id="doSend" style="cursor:pointer;color:blue">发货</a>(可进行全部或部分发货)<br />
                                        <a id="doCancel" style="cursor:pointer;color:blue">取消订单</a>(全部缺货、无法配送等时可取消订单)</td>
                                    <%} %>
                                    <%else if(order.Status==6){ %>
                                        <td>管理员</td>
                                        <td>------</td>
                                        <td>
                                            <a id="doReceived" style="cursor:pointer;color:blue">签收</a><br />
                                            <a id="doCancel" style="cursor:pointer;color:blue">取消订单</a>(商品未能送达，取消订单,进行退款)
                                        </td>
                                    <%} %>
                                    <%else if(order.Status==7){ %>
                                        <td>管理员</td>
                                        <td>------</td>
                                        <td>
                                            <a id="doComplete" style="cursor:pointer;color:blue">交易完成</a>
                                        </td>
                                    <%} %>
                                    <%else if (order.Status == 8){%>
                                        <td>管理员</td>
                                        <td>------</td>
                                        <td><a id="doRefund" style="cursor:pointer;color:blue">退款</a>(商家同意退款后,运营商可以退还货款给顾客)</td>
                                    <%}%>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
	        </div>
		    <div class="frame tab">
		        <div class="frame_title">订单信息<asp:Label id="Label1" runat="server"></asp:Label></div>
		        <div class="frame_content">
		            <table cellSpacing="0" cellPadding="0" width="100%" bgColor="#ffffff" border="0">
				        <tbody>
					        <tr>
						        <td class="body-shoptitle" vAlign="middle" style="text-align:center;width:67%;font-weight:bold;">订单号码：<%=order.OrderNo%>
							        &nbsp;&nbsp;&nbsp;&nbsp;下单日期：<%=order.OrderTime%>
							        <%if(order.ShipTime!=""){%>&nbsp;&nbsp;&nbsp;&nbsp;送货日期：<%=order.ShipTime%><%}%>
							        <%if(order.Remark.Length>0){%>&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">备注：<%=order.Remark%><%}%></font>
						        </td>
					        </tr>
                            <tr>
                                <td>
                                    <hr noshade size="1">
                                </td>
                            </tr>                            
				        </tbody>
			        </table>
	                <div class="orderinfo xp-clear">
                        <div class="mc" style="float:left;">
                            <dl class="fore">
                                <dt>收货人信息</dt>
                                <dd>
                                    <ul>
                                        <li>收 货 人：<%=order.ReceiverName %></li>
                                        <li>固定电话：<%=order.ReceiverPhone %></li>
                                        <li>手机号码：<%=order.ReceiverMobile %></li>
                                        <li>电子邮件：<%=order.ReceiverEmail %></li> 
                                        <li>收货地址：<%=order.ReceiverAddress %></li>
                                        <li>邮政编码：<%=order.ReceiverPostalcode%></li>                                          
                                    </ul>
                                </dd>
                            </dl>
                            <dl class="fore">
                                <dt>支付及配送方式</dt>
                                <dd>
                                    <ul>
                                        <li>支付类型：<%=order.PayMemntName%></li>
                                        <li>配送方式：<%=order.ShippingName%></li>                                              
                                    </ul>
                                </dd>
                            </dl>
                            <%if(order.NeedInvoice){%>
                            <dl class="fore">
				                <dt>发票信息</dt>
				                <dd>
                                    <ul>
                                        <li>发票类型：<%=orderInvoice.InvoiceType == 0 ? "普通发票" : "增值税发票"%></li>
                                        <li>发票抬头：<%=orderInvoice.InvoiceHead%></li> 
                                        <li>发票内容：<%=orderInvoice.IsDetails ? "商品明细" : orderInvoice.InvoiceContent%></li>                                            
                                    </ul>
                                </dd>
                            </dl>
				            <%}%>
                        </div>
                        <div class="mc" style="float:right;">
			                <dl class="fore">
			                    <dt>订单结算信息</dt>
                                <dd>
                                    <ul>
                                        <li>商品总金额：￥<%=string.Format("{0:f}", order.ProductPrice+order.LessMoney)%></li>
                                        <li>+ 商品运费：￥<%=string.Format("{0:f}", order.ShipPrice)%><%if (order.IsShippingFree == 1){ %>（免运费）<%} %></li>
                                        <%if (order.PayType == 5){ %><li>+ 货到付款手续费：￥<%=string.Format("{0:f}", order.CltCharge)%></li><%} %>
                                        <li>- 优惠金额：￥<%=string.Format("{0:f}", order.LessMoney+order.CouponValue)%></li>
                                        <li>- 积分抵扣金额：￥<%=string.Format("{0:f}", order.ScoreAmount)%></li>
                                        <li>- 余额支付：￥<%=string.Format("{0:f}", order.AdvancePayment)%></li>
                                        <li style="border-top:2px solid 1px solid #CDCDCD;font-size:16px; font-weight:bold;"><em>订单支付金额：￥<%=string.Format("{0:f}", order.TotalPrice - order.AdvancePayment)%></em></li>                                              
                                        <li style="border-top:2px solid 1px solid #CDCDCD;font-size:16px; font-weight:bold;"><em>还需支付金额：￥<%=string.Format("{0:f}", order.NeedPayMoney)%></em></li>                                              
                                        <%if (order.Status < 2 && CurrentAdmin.Powers.OrderPriceModify && order.SupplierID == 0){%>
                                            <li style="padding-top:15px;text-align:center;"><input type="button" id="btnChangePrice" value="修改价格"/></li>
                                        <%}%>
                                        
                                    </ul>
                                </dd>
                            </dl>
                        </div>
                    </div>
		        </div>
	        </div>
	        <div class="frame tab">
		        <div class="frame_title">商品信息<asp:Label id="lblTitleInfo" runat="server"></asp:Label></div>
		        <div class="frame_content">
		            <%if (pnum > 0){%>
		            <h4>商品清单</h4>
		            <table id="tbPdts" width="95%" class="thinBorder">
				        <tbody>
					        <tr>
						        <td align="center" height="26">商品编号</td>
						        <td align="left">商品名称</td>
						        <td align="center">购买价</td>
						        <td align="center">已优惠</td>
						        <td align="center">数量</td>
						        <td style="width:100px;" 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"><%# DataBinder.Eval(Container.DataItem, "ProductNo") %></td>
								        <td align="left">
								            <%# DataBinder.Eval(Container.DataItem, "ProductName") %>									        
									        <asp:Repeater runat="server" ID="rptCoupon" DataSource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("PdtCoupon") %>'>
	                                        <ItemTemplate>
	                                            <div><font color="Red">[赠品]</font><%# DataBinder.Eval(Container.DataItem, "[\"CouponName\"]")%>  <font color="Red">×<%# DataBinder.Eval(Container.DataItem, "[\"Number\"]")%><%# DataBinder.Eval(Container.DataItem, "[\"Status\"]")%></font></div>
	                                        </ItemTemplate>
	                                        </asp:Repeater>
	                                        <asp:Repeater runat="server" ID="rptPresents" DataSource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("PdtGift") %>'>
	                                        <ItemTemplate>
	                                            <div><font color="Red">[赠品]</font><%# DataBinder.Eval(Container.DataItem, "[\"PresentName\"]")%>  <font color="Red">×<%# DataBinder.Eval(Container.DataItem, "[\"PresentNum\"]")%></font></div>
	                                        </ItemTemplate>
	                                        </asp:Repeater>	
	                                        <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") %>' />
								        </td>
								        <td align="center"><%# DataBinder.Eval(Container.DataItem, "UnitPrice", "{0:f2}")%></td>
								        <td align="center"><%# DataBinder.Eval(Container.DataItem, "LessMoney", "{0:f2}")%></td>
								        <td align="center"><%# DataBinder.Eval(Container.DataItem, "Quantity")%></td>
								        <td align="center"><%# DataBinder.Eval(Container.DataItem, "SubPrice", "{0:f2}")%></td>
								        <!--<td align="center"><span class="hand deletePdt" style="color:Red;">删除</span></td>-->
							        </tr>
						        </ItemTemplate>
					        </asp:repeater>
				        </tbody>
			        </table>
			        <table width="95%" class="thinBorder hide">
			            <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 />
			        <h4>礼品清单</h4>
			        <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>
			        <%} %>
			        <br />
			        <%if (dtSendCoupon.Rows.Count > 0){%>
			        <h4>返券清单</h4>
			        <table cellSpacing="0" cellPadding="0" class="thinBorder">
                        <tbody>
                            <tr>
                                <th width="30%">券名</th>
                                <th width="10%">面值</th>
                                <th width="10%">数量</th>
                            </tr>
                            <%for (int i = 0; i < dtSendCoupon.Rows.Count; i++)
                              {%>
                            <tr>
                                <td><%=dtSendCoupon.Rows[i]["CouponName"]%><font color="red"><%=dtSendCoupon.Rows[i]["Status"]%></font></td>
                                <td><%=dtSendCoupon.Rows[i]["CouponValue"]%></td>
                                <td><%=dtSendCoupon.Rows[i]["SubNumber"]%></td>
                            </tr>
                            <%} %>                                					
                        </tbody>
                    </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="200px" MaxLength="50"></asp:textbox><br /><br />
					        <input type="button" id="btnChangeRemark" value="修改订单附言" onclick="UpdateOrderRemark()"/></td>
					        <td></td>
				        </tr>
			        </table>
		        </div>
	        </div>
	
	        <div class="frame tab">
	            <div class="frame_title">单据</div>
	            <div class="frame_content">
	                <table width="95%" bgColor="#ffffff">
	                    <tr style="display:none">
	                        <td colspan="2">
	                            <input type="button" id="btnShowReceivePay" value="填写收款单" Class="inputbtn" />
	                            <input type="button" id="Button1" 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>
	                </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 id="showChangePrice" class="popupWindow xp-clear" style="width:350px;height:auto;boder:1px solid red;" >
            <div class="popupHead" id="ChangePriceHeader">
            <div class="popupTitle">修改订单金额</div>
            <div class="popupClose" id="ChangePriceClose"><span>×</span></div>
            <div class="clear" ></div>
            </div>
            <div class="popupContent">
                <table style="width:99%;" class="thinBorder">
                    <tr>
                        <td style="width:25%;">订单金额：￥<%=string.Format("{0:f2}", order.TotalPrice - order.AdvancePayment)%></td>
                        <td style="width:50%">涨价或优惠：<input type="text" style="width:50px" value="0.00" id="dprice" /></td>
                        <td style="width:25%;">运费：<input type="text" style="width:50px" value="<%=string.Format("{0:f2}", order.ShipPrice)%>" id="sprice" /></td>
                    </tr>
                    <tr>
                        <td style="text-align:right;">操作备注：</td>
                        <td colspan="2"><textarea style="width:99%;height:100px;" id="cpRemark">修改订单金额</textarea></td>
                    </tr>
                </table>
                <div style="padding:10px;">温馨提示：您可以在这里修改订单总额或者调整运费<br />优惠订单金额请在价格前面输入“-”<br />调整运费请直接输入调整后的运费</div>
            </div>
            <div class="popupFooter">
                    <input type="button" value="修 改" class="btn" onclick="ChangePriceConfirm()" />
            </div>
        </div>
        
	    <div id="SendGoodsDiv" class="popupWindow" >
            <div class="popupHead">
                <div class="popupTitle">发货</div>
                <div class="popupClose" id="closesend"><span id="closeSend">×</span></div>
                <div class="clear" ></div>
            </div>
            <div class="popupContent">
                <table style="width:100%;" class="thinBorder">
                    <tr>
                        <td>物流公司：</td>
                        <td>
                            <div>
                                <asp:DropDownList ID=ddlExpress runat=server>
                                </asp:DropDownList><em>*</em>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>物流单号：</td>
                        <td>
                            <span><asp:TextBox ID=txtTransNum runat=server></asp:TextBox><em>*</em>(最多输入50个字符)</span>
                        </td>
                    </tr>
                    <tr>
                        <td>快件查询网址：</td>
                        <td><input type="text" name="txtQueryUrl" value="" /></td>
                    </tr>
                    <tr>
                        <td><span id="span2">发货备注</span>：</td>
                        <td colspan="3"><textarea id="areaShippingRemark" name="tarSendShippingRemark" cols="50" rows="5" ></textarea><br />(最多255个字符)</td>
                    </tr>
                </table>
                <div class="tips">请确认发货的商品及数量：(货到付款的订单只支持全部发货)</div>
                <div class="item">
                    <div style="padding-left: 10px;">
                    <span style="width: 400px; float: left;"><b>商品名称</b></span>
                    <span style="text-align: center; width: 60px; float: left;"><b>发货数量</b></span></div>
                        <asp:Repeater ID="rptSendProduct" runat="server" >
                              <ItemTemplate>
                                    <div style="padding-left: 10px ;">
                                        <span style="width: 400px; float: left;margin:5px 0px;"><%# DataBinder.Eval(Container.DataItem, "ProductName") %></span>
                                        <input type=hidden name="pdtID" value="<%# DataBinder.Eval(Container.DataItem, "ProductID") %>">
                                        <input type=hidden name="goodsID" value="<%# DataBinder.Eval(Container.DataItem, "GoodsID") %>">
                                        <input type=hidden name="pdtName" value="<%# DataBinder.Eval(Container.DataItem, "ProductName") %>">
                                        <span style="width: 60px; text-align: center; float: left;margin:5px 0px">
                                           <%# CreateSelect(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "PayType")),Convert.ToInt32(DataBinder.Eval(Container.DataItem, "Stockout")))%>
                                        </span>
                                    </div>
                               </ItemTemplate> 
                        </asp:Repeater> 
                    <input type=hidden name="orderQuantity" value=<%=order.Quantity%>>
                    <div style="clear:both"></div>
                </div>
                <input type="hidden" name="txtSendShippingPrice" value="<%=order.ShipPrice%>" />
                <input type="hidden" name="txtShippingType" value="<%=order.ShippingType%>" />
                <input type="hidden" name="txtSendReceiverName" value="<%=order.ReceiverName%>" />
                <input type="hidden" name="txtSendReceiverEmail" value="<%=order.ReceiverEmail%>" />
                <input type="hidden" name="txtSendReceiverPhone" value="<%=order.ReceiverPhone%>"/>
                <input type="hidden" name="txtSendReceiverPostalCode" value="<%=order.ReceiverPostalcode%>" />
                <input type="hidden" name="txtSendReceiverAdress" size="50" value="<%=order.ReceiverAddress%>" />
            </div>
            <div class="popupFooter">
                <asp:button text="确认发货" class="btn" id="btnSend" runat=server onclick="btnSend_Click" />
            </div>
        </div>
    
        <div id="CancelDiv" class="popupWindow" style="width:350px;height:auto;" >
            <div class="popupHead">
            <div class="popupTitle">取消订单</div>
            <div class="popupClose" id="closeCancel"><span id="Span3">×</span></div>
            <div class="clear" ></div>
            </div>
            <div class="popupContent">
                <div class="tips">  请选择取消订单的理由</div>
                <div style="margin-top:-5px">
                    <%if ((order.Status <2 &&order.PayType<5)||(order.Status <=2 && order.PayType >=5 && order.SupplierID == 0))
                      {  %>
                        <div class="item"><label><input type="radio" value="超时,取消订单" name="cancelRemark" checked="checked"/>订单超时</label></div>
                        <div class="item"><label><input type="radio" value="顾客要求,取消订单" name="cancelRemark"/>顾客要求</label></div>
                        <div class="item"><label><input type="radio" value="其它原因,取消订单" name="cancelRemark"/>其它原因</label>&nbsp<input type="text" value="" name="hiddeRemark" /></div>
                    <%}else if (((order.Status >= 2 && order.Status<=5) && order.PayType <= 4 && order.SupplierID == 0) || (order.Status == 3 && order.PayType >= 5 && order.SupplierID == 0))
                      {  %>
                        <div class="item"><label><input type="radio" value="缺货,取消订单" name="cancelRemark" checked="checked"/>全部缺货</label></div>
                        <div class="item"><label><input type="radio" value="无法送达,取消订单" name="cancelRemark"/>无法送达</label></div>
                        <div class="item"><label><input type="radio" value="顾客要求退款,取消订单" name="cancelRemark"/>顾客要求退款</label></div>
                        <div class="item"><label><input type="radio" value="其它原因,取消订单" name="cancelRemark"/>其它原因</label>&nbsp<input type="text" value="" name="hiddeRemark" /></div>
                    <%}
                      else if (order.Status == 6)
                      {  %>
                        <div class="item"><label><input type="radio" value="商品无法送达,取消订单" name="cancelRemark" checked="checked" />商品无法送达</label></div>
                        <div class="item"><label><input type="radio" value="客户拒签,取消订单" name="cancelRemark" />客户拒签</label></div>
                        <div class="item"><label><input type="radio" value="其它原因,取消订单" name="cancelRemark"/>其它原因</label>&nbsp<input type="text" value="" name="hiddeRemark" /></div>
                    <%} %>
                </div>
            </div>
            <div class="popupFooter">
                    <asp:button text="确认取消" class="btn" id="btnCancel" runat=server onclick="btnCancel_Click" />
            </div>
        </div>
        
        <div id="ConfirmDiv" class="popupWindow" style="width:350px;height:200px;" >
            <div class="popupHead">
                <div class="popupTitle">确认订单</div>
                <div class="popupClose" id="closeConfirm"><span id="Span5">×</span></div>
                <div class="clear" ></div>
            </div>
            <div class="popupContent">
                <div class="tips">请选择确认方式</div>
                <div>
                    <div class="item"><input type="radio" value="已通过电话确认订单" name="confirmRemark" checked=checked >已跟顾客通过电话确认订单</div>
                    <div class="item"><input type="radio" value="已通过其它方式确认订单" name="confirmRemark">已跟顾客通过其它方式确认订单</div>
                </div>
            </div>
            <div class="popupFooter">
                    <asp:button text="确认订单" class="btn" id="btnConfirm" runat=server onclick="btnConfirm_Click" />
            </div>
        </div>
        
        <div id="RefundDiv" class="popupWindow">
            <div class="popupHead">
                <div class="popupTitle">退款单</div>
                <div class="popupClose" id="closeRefund"><span>×</span></div>
                <div class="clear" ></div>
            </div>
            <div class="popupContent">
                <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"><asp:TextBox ID=txtPaid runat=server></asp:TextBox></span></td>
                    </tr>
                    <tr>
                        <td>支付类型：</td>
                        <td colspan="3">
                            <input type="radio" id="refundpaymethod_1" name="refundpaymethod" value="1" /><label for="refundpaymethod_1">在线支付</label>
                            <input type="radio" id="refundpaymethod_2" name="refundpaymethod" value="2" /><label for="refundpaymethod_2">线下支付</label>
                            <input type="radio" id="refundpaymethod_3" name="refundpaymethod" value="3" /><label for="refundpaymethod_3">预付款支付</label><em>*</em>
                        </td>
                    </tr>
                    <tr>
                        <td>退款方式：</td>
                        <td colspan="3">
                            <input type="text" name="txtRefundPaymentName" />
                             <asp:DropDownList ID="ddlRefundPayment" runat=server>
                            </asp:DropDownList><em>*</em>
                        </td>
                    </tr>
                    <tr>
                        <td>退款银行：</td>
                        <td>
                            <input type="text" name="txtRefundPayBank" /><em>*</em>
                        </td>
<%--                                 <asp:DropDownList ID="ddlRefundPayBank" runat=server>
                            </asp:DropDownList>--%>
                        <td>退款账号：</td>
                        <td><input type="text" name="txtRefundPayAccount" /><em>*</em></td>
                    </tr>
                    <tr>

                    </tr>
                    <tr>
                        <td>收款银行：</td>
                        <td>
                        <input type="text" name="txtRefundBank" /><em>*</em>
<%--                                 <asp:DropDownList ID="ddlRefundBank" runat=server>
                            </asp:DropDownList>--%>
                        <td>收款账号：</td>
                        <td><input type="text" name="txtRefundAccount" /><em>*</em></td>
                    </td>
                    </tr>
                    <tr>
                        <td>退款金额：</td>
                        <td><input type="text" id="txtRefundPrice" name="txtRefundPrice" value='<%=string.Format("{0:f}",order.TotalPrice)%>' /><em>*</em></td>
                        <td>收款人：</td>
                        <td><input type="text" name="txtRefundReceiverName" value='<%=order.ReceiverName %>' /><em>*</em>
                        </td>
                    </tr>
                    <tr>
                        <td>外部交易号：</td>
                        <td><input type="text" name="txtRefundOutTradeNo" /></td>
                        <td>退款时间：</td>
                        <td><input type="text" name="txtRefundPayTime" /><em>*</em></td>                        
                    </tr> 
                    <tr>
                        <td>备注：</td>
                        <td colspan="3"><textarea id="txtRefundRemark" name="txtRefundRemark" cols="50" rows="5" ></textarea><br />最多255个字符</td>
                    </tr>
                </table>
            </div>
            <div class="popupFooter">
                    <asp:button text="确认退款" class="btn" id="btnRefund" runat=server onclick="btnRefund_Click" />
            </div>
        </div>

        <div id="ReceiveDiv" class="popupWindow" >
            <div class="popupHead">
            <div class="popupTitle">收款单</div>
            <div class="popupClose" id="closeReceive"><span id="Span6">×</span></div>
            <div class="clear" ></div>
            </div>
            <div class="popupContent">
                <table style="width:100%;" class="thinBorder">
                    <tr>
                        <td style="width:15%;">订单号：</td>
                        <td style="width:35%;"><%=order.OrderNo%><input type="hidden" id="txtReceiveOrderNo" name="txtReceiveOrderNo" 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="span7"><asp:TextBox ID=txtNeedPay runat=server></asp:TextBox></span></td>
                    </tr>
                    <tr>
                        <td>支付类型：</td>
                        <td colspan="3">
                            <input type="radio" id="receivePayMethod_1" name="receivePayMethod" value="1" /><label for="receivePayMethod_1">在线支付</label>
                            <input type="radio" id="receivePayMethod_2" name="receivePayMethod" value="2" /><label for="receivePayMethod_2">线下支付</label>
                            <input type="radio" id="receivePayMethod_3" name="receivePayMethod" value="3" /><label for="receivePayMethod_3">预付款支付</label><em>*</em>
                        </td>
                    </tr>
                    <tr>
                        <td>付款方式：</td>
                        <td colspan="3">
                            <input type="text" name="txtReceivePaymentName" />
                             <asp:DropDownList ID="ddlReceivePayment" runat=server>
                            </asp:DropDownList><em>*</em>
                        </td>
                    </tr>
                    <tr>
                        <td>付款银行：</td>
                        <td>
                            <input type="text" name="txtReceivePayBank" /><em>*</em>
<%--                                 <asp:DropDownList ID="ddlReceivePayBank" runat=server>
                            </asp:DropDownList>--%>
                        </td>
                        <td>付款账号：</td>
                        <td><input type="text" name="txtReceivePayAccount" /><em>*</em></td>
                    </tr>
                    <tr>
                        <td>收款银行：</td>
                        <td>
                            <input type="text" name="txtReceiveBank" /><em>*</em>
<%--                                 <asp:DropDownList ID="ddlReceiveBank" runat=server>
                            </asp:DropDownList>--%>
                        </td>
                        <td>收款账号：</td>
                        <td><input type="text" name="txtReceiveAccount" /><em>*</em></td>
                    </tr>
                    <tr>
                        <td>收款金额：</td>
                        <td><input type="text" id="Text2" name="txtReceivePrice" value='<%=string.Format("{0:f}",order.TotalPrice)%>' /><em>*</em></td>
                        <td>付款人：</td>
                        <td><input type="text" name="txtReceiveReceiverName" value='<%=order.ReceiverName %>' /><em>*</em>
                        </td>
                    </tr> 
                    <tr>
                        <td>外部交易号：</td>
                        <td><input type="text" name="txtReceiveOutTradeNo" /><em>*</em></td>
                        <td>付款时间：</td>
                        <td><input type="text" name="txtReceivePayTime" /><em>*</em></td>                 
                    </tr> 
                    <tr>
                        <td>备注：</td>
                        <td colspan="3"><textarea id="Textarea1" name="txtReceiveRemark" cols="50" rows="5" ></textarea><br />最多255个字符</td>
                    </tr>
                </table>
            </div>
            <div class="popupFooter">
                <asp:button text="确认收款" class="btn" id="btnReceive"  runat=server onclick="btnReceive_Click" />
            </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?OrderID='+oid+'&NoCopyright=1','shopcat','width=700,height=650,scrollbars=yes');
					        temp.focus();
				        }
				        </script>
			        </td>
		        </tr>
		    </table>
		</div>
		</form>
		</div>
	</div>
	</body>
</html>
