<%@ Page language="c#" Codebehind="OrderList.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Supplier.OrderList" %>
<%@ Import Namespace="System.Data"%>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="SupplierMenu" Src="Modules/SupplierMenu.ascx" %>
<%@	Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox"	%>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<!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>商家中心 <%=config.SiteTitle%></title>
        <script type="text/javascript" src="inc/OrderPayList.js"></script>
        <script type="text/javascript" src="inc/commond.js"></script>
        <script src="inc/ui.datepicker.cn.js" type="text/javascript"></script>
		<link type="text/css" rel="stylesheet" href="style/ui.datepicker.css" />
		
	    <style type="text/css">
        .pro_hlist table{border:1px solid #c8dcf4;border-width:1px 0 0 1px;margin:2px 0 2px 0;text-align:center;border-collapse:collapse;}

        .pro_hlist td,th{border:1px solid #c8dcf4;border-width:0 1px 1px 0;margin:2px 0 2px 0;text-align:center;}
        .pro_hlist tfoot{padding:10px;}
        .pro_hlist tfoot td{ height:25px;}
        </style>		
		
	</head>


	<body>
		<uc1:Header id="Header" runat="server"></uc1:Header>
        <form id="Form1" runat="server">

			 <!--位置导航开始-->
			 <div class="path"><a href="<%=webSite %>supplier/default.<%=config.html%>">商家桌面</a> > 订单管理 > 订单列表 ></div>
			<!--位置导航结束-->
			<div class="xp-w clear">
				<div class="content-left">
					<!--会员中心导航开始-->
					<uc1:SupplierMenu id="SupplierMenu1" runat="server"></uc1:SupplierMenu>
					<!--会员中心导航结束-->
				</div>
				<div class="content-middle">	
					<%--<h3>欢迎您,<%=CurrentSupplier.RealName%></h3>
					<hr class="itemhr" />--%>
                    <div class="rframe">
                        <div class="tm">订单列表</div>
                        <div class="mm clear">
                            <table>
                                <tr>
                                <td class="right" width="100">订单编号：</td>
                                <td width="200">
                                <asp:TextBox ID="txtOrderNo" runat="server" ></asp:TextBox>
                                </td>
                                    <td class="right">订单状态：</td>
                                    <td>
                                        <asp:DropDownList ID="ddlStatus" runat=server>
                                            <asp:ListItem Value="-1">全部</asp:ListItem>
                                            <asp:ListItem Value=0>等待到款</asp:ListItem>
                                            <asp:ListItem Value=1>等待发货</asp:ListItem>
                                            <asp:ListItem Value=2>已发货</asp:ListItem>
                                            <asp:ListItem Value=3>已送达</asp:ListItem>
                                            <asp:ListItem Value=4>交易成功</asp:ListItem>
                                            <asp:ListItem Value=5>取消</asp:ListItem>
                                            <asp:ListItem Value=6>交易失败</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                              <tr>
                                    <td width="100" class="right">收货人姓名：</td>
                                    <td width="250">
                                    <asp:TextBox ID="txtReceiverName" runat="server" ></asp:TextBox>
                                    </td>
                                    <td width="100" class="right">订单类型：</td>
                                    <td width="250">
                                    <asp:DropDownList ID="ddlPayType" runat=server>
                                        <asp:ListItem Value=-1>全部</asp:ListItem>
                                        <asp:ListItem Value=0>款到发货</asp:ListItem>
                                        <asp:ListItem Value=1>货到付款</asp:ListItem>
                                    </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="right">下单时间：</td>
                                    <td><asp:TextBox id="txtStartTime" runat="server"  name="txtStartTime" value="" size="10" ></asp:TextBox>-<asp:TextBox id="txtEndTime" runat="server" type="text" name="txtEndTime" value="" size="10" ></asp:TextBox>&nbsp;</td>
                                </tr>
                        </table>
                            <hr class="itemhr" />
                            <div style="float:right ;padding:5px 0px">
                                <input type=hidden  id=hidePage value=""/>
                                <asp:Button  id="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click"></asp:Button>&nbsp;&nbsp;
                                <asp:Button  id="btnReset" runat="server" Text="重置" OnClick="btnReset_Click" ></asp:Button>&nbsp;&nbsp;
                            </div>
                            <div style="clear:right"></div>
                            
    					    <div class="pro_hlist">
                                <asp:repeater id="rptOrder" runat="server" >
                                    <HeaderTemplate>
			            	            <table cellpadding="3" cellspacing="0" width="100%" align="center">
			            	            <thead>
                                        <tr align=center class="datagrid-header"> 
                                        <th width="10%">
                                            订单编号
						                </th>
    <%--                                    <th width="10%">
                                            图片
						                </th>--%>
                                        <th width="25%">
                                            商品名称
						                </th>
                                        <th width="5%">
                                            价格
						                </th>										
                                        <th width="5%">
                                            数量
						                </th>
                                        <th width="10%">
                                            订单总金额
						                </th>
						                <th width="10%">
                                            收货人/电话
						                </th>
						                <th width="11%">
                                            期望送货时间
						                </th>
						                <th width="10%">
                                            付款时间
						                </th>
                                        <th width="10%">
                                            订单状态
						                </th>
						                <th width="4%">
                                            操作
						                </th>
                                        </tr>
			            	            </thead>
			            	            <tbody>
                                    </HeaderTemplate>
                                    <ItemTemplate>
	    		                        <tr align=center class="datagrid-item"> 
                                            <%--<%#Container.ItemIndex%><%#Container.Parent%>--%>
                                            <td runat="server" id="tdOrderNo"><%#DataBinder.Eval(Container.DataItem, "OrderNo")%></td>
    <%--                                        <td runat="server" id="tdImg"><%#DataBinder.Eval(Container.DataItem, "thumbnailimg")%></td>--%>
                                            <td runat="server" id="tdProductName">
                                            <a href='<%=webSite %>products/product-<%# DataBinder.Eval(Container.DataItem, "ProductID") %>.<%=config.html %>' target="_blank" style="color:#3665cd;">
                                            <%#DataBinder.Eval(Container.DataItem, "ProductName")%></a></td>
                                            <td runat="server" id="tdUnitPrice"><%#DataBinder.Eval(Container.DataItem, "UnitPrice")%></td>
                                            <td runat="server" id="tdQuantity"><%#DataBinder.Eval(Container.DataItem, "Quantity")%></td>
                                            <td runat="server" id="tdTotalPrice"><%#DataBinder.Eval(Container.DataItem, "TotalPrice")%></td>
                                            <td runat="server" id="tdReceiverName"><%#DataBinder.Eval(Container.DataItem, "receivername")%><br />
                                            <%#DataBinder.Eval(Container.DataItem, "ReceiverMobile")%>
                                            <%#DataBinder.Eval(Container.DataItem, "ReceiverPhone")%></td>
                                            <td runat="server" id="tdShipTime"><%#DataBinder.Eval(Container.DataItem, "ShipTime")%></td>
                                            <%--<td runat="server" id="tdPayType"><%# GetPayType((DataBinder.Eval(Container.DataItem, "PayType").ToString()))%></td> --%>
                                            <td runat="server" id="tdPayTime"><%#DataBinder.Eval(Container.DataItem, "PayTime")%></td>
                                            <td runat="server" id="tdStatus"><%# GetOrderStatus((DataBinder.Eval(Container.DataItem, "PayType").ToString()),(DataBinder.Eval(Container.DataItem, "status").ToString()))%></td> 
                                            <td runat="server" id="tdOperator"><a href='OrderDetailView.aspx?OrderID=<%#DataBinder.Eval(Container.DataItem,"OrderID")%> '>查看</a></td>
                                        </tr>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                                <td colspan="3" align=right>本页合计</td><td><%=pageQuantity%></td><td><%=pageTotalPrice%></td><td  colspan="5"></td>
                                            </tr>
                                        </tfoot>
                                        </table>
                                    </FooterTemplate>                                                
                                </asp:repeater>

				                <asp:panel id="plPage" visible="true" runat="server">
				                <!-- 翻页开始-->
				                <div class="page clear">
					                <div class="fpage1">
                                        <asp:Label ID="lblPagerInfo" runat="server"></asp:Label>

                                <asp:textbox id="gopage"  runat="server" class="gopage" size="1" />
                                <asp:button id="go" runat="server" text="Go" class="go" onclick="go_Click" />
                                    </div>
                                    <div class="fpage2">
                                        <span class="prepage"></span>
                                        <asp:Label ID="lbPage" runat="server"></asp:Label>
                                        <span class="nextpage"></span>
                                    </div>                                
				                </div>
				                <!-- 翻页结束-->
				                </asp:panel>
				                <asp:panel id="plNoProduct" visible="false" runat="server">
					                <div style="margin:20px;">
						                <h3>抱歉，没有找到符合条件的订单！</h3>
					                </div>
				                </asp:panel>
						    </div>
                        </div>
                    </div>
			    </div>
			</div>

	    </form>
		<uc1:Helper id="Helper" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer" runat="server"></uc1:Footer>
    </body>
</html>