{layout:default} {class:Shop.Admin.statis.supplierorder}
<lbhead>
    <title><%=Tag("订单报表")%>-<%=site.title%></title>
</lbhead>
<lbfile>
   <script language="javascript" type="text/javascript" src="<%=site.AdminJsPath %>/highcharts/highcharts.js"></script>
   <script language="javascript" type="text/javascript" src="<%=site.AdminJsPath %>/highcharts/exporting.js"></script>
   <script language="javascript" type="text/javascript" src="<%=site.AdminJsPath %>/highcharts/themes/grid.js"></script>
    <style>#body_bottom{height:0;overflow:hidden;display:none}</style>
</lbfile>
<lbpath>
    <div class="tools">
    <ul>
    <%if (PageReturnMsg == ""){%>
    <li class="export"><a href="javascript:void(0);" onclick="exportorder();"><b></b><span><%=Tag("导出")%></span></a></li>
    <%}%>
    <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a>
     > <a href="<%=site.AdminPath %>/statis/supplierorder.aspx"><%=Tag("订单报表")%></a>
     > <%=Tag("按供应商")%>
     </span></li>
    </ul>
    </div>
</lbpath>
<lbbody>
    <script type="text/javascript" src="<%=site.AdminJsPath %>/My97DatePicker/WdatePicker.js"></script>
    <div class="proBox clear">
    <ul class="btns clear">
        <li class="submit" onclick="submit();"><%=Tag("提交")%></li>
    </ul>
    <div class="iTabHead">
        <table class="table">
        <tr>
            <th>
                <%=Tag("关键词")%>：
            </th>
            <td>
                <input type="text" id="key" name="key" class="input-query" value="<%=key %>" />
            </td>
        </tr>
         <tr>
            <th>
                <%=Tag("配送点")%>：
            </th>
            <td>
                <input type="text" id="peisongdian" name="peisongdian" class="input-query" value="<%=peisongdian %>" />
            </td>
        </tr>
        <tr>
            <th>
                <%=Tag("订购日期")%>：
            </th>
            <td>
                <input type="text" name="dateFrom" id="dateFrom" size="12" class="input-calendar" value="<%=dateFrom%>" readonly /> - <input type="text" name="dateTo" id="dateTo" size="12" class="input-calendar" value="<%=dateTo%>" readonly />
            </td>
        </tr>
        <tr>
            <th>
                <%=Tag("支付状态")%>：
            </th>
            <td>
                <select name="IsPay" id="IsPay">
                    <option value="-1">┌<%=Tag("全部")%></option>
                    <option value="0" <%=IsPay == 0?"selected":"" %>><%=Tag("未支付")%></option>
                    <option value="1" <%=IsPay == 1?"selected":"" %>><%=Tag("已支付")%></option>
                </select>
            </td>
        </tr>
        <tr>
            <th>
                <%=Tag("支付方式")%>：
            </th>
            <td>
                <select name="Pay_id" id="Pay_id">
                    <option value="0">┌<%=Tag("全部")%></option>
                    <%foreach (DB.LebiShop.Lebi_Pay pay in pays){%>
                    <option value="<%=pay.id %>" <%=Pay_id == pay.id?"selected":"" %>><%=Shop.Bussiness.Language.Content(pay.Name, CurrentLanguage.Code)%></option>
                    <%} %>
                </select>
            </td>
        </tr>
        <!--<tr>
            <th>
                <%=Tag("配送方式")%>：
            </th>
            <td>
                <select name="Transport_id" id="Transport_id">
                    <option value="0">┌<%=Tag("全部")%></option>
                    <%foreach (DB.LebiShop.Lebi_Transport transport in transports)
                      {%>
                    <option value="<%=transport.id %>" <%=Transport_id == transport.id?"selected":"" %>><%=transport.Name%></option>
                    <%} %>
                </select>
            </td>
        </tr>-->
        <tr>
            <th>
                <%=Tag("供应商")%>：
            </th>
            <td>
                <select name="supplier_id" id="supplier_id">
                    <option value="">┌<%=Tag("全部")%></option>
                    <option value="0">┌<%=Tag("商城")%></option>
                    <%foreach (DB.LebiShop.Lebi_Supplier sup in suppliers){%>
                    <option value="<%=sup.id %>" <%=supplier_id == sup.id.ToString()?"selected":"" %>><%=sup.SubName%></option>
                    <%} %>
                </select>
            </td>
        </tr>
    </table>
    </div>
    </div>
    <table class="datalist">
        <tr class="title">
            <th><%=Tag("序号")%></th>
            <th><%=Tag("供应商")%></th>
            <th><%=Tag("配送点")%></th>
            <th><%=Tag("发货日期")%></th>
            <th><%=Tag("单号")%></th>
            <th><%=Tag("订单金额")%></th>
            <th><%=Tag("应付金额")%></th>
            <th><%=Tag("支付方式")%></th>
            <th><%=Tag("在线支付")%></th>
            <th><%=Tag("订单状态")%></th>
                
        </tr>
        <%
        int i=0;
        foreach(DB.LebiShop.Lebi_Order order in orders){
            
        i++; %>
        <tr class="list">
            <td><%=i%></td>
            <td><%=GetSupplier(order.Supplier_id).SubName%></td>
            <td><%=GetDelivery(order.Supplier_Delivery_id).Name%></td>
            <%if(order.IsShipped==1){ %>
            <td><%=order.Time_Shipped%></td>
            <%}else{ %>
            <td>-</td>
            <%} %>
            <td><%=order.Code%></td>
            <td><%=FormatMoney(order.Money_Order)%></td>
            <td><%=FormatMoney(order.Money_Pay)%></td>
            <td><%=Lang(order.Pay)%></td>
             <% if(Lang(order.Pay)=="在线支付"){ %>
               <td> <%=Lang(order.OnlinePay)%></td>
                <%}else{%>
               <td>-</td>
                <%}%>
            <td><%=Shop.Bussiness.Order.OrderStatus(order, CurrentLanguage.Code) %></td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function submit() {
            var key = $("#key").val();
            var peisongdian = $("#peisongdian").val();
            var dateFrom = $("#dateFrom").val();
            var dateTo = $("#dateTo").val();
            var IsPay = $("#IsPay").val();
            var Pay_id = $("#Pay_id").val();
            var Transport_id = $("#Transport_id").val();
            var supplier_id = $("#supplier_id").val();
            if (dateFrom == "" || dateTo == "") {
                MsgBox(1, "<%=Tag("请选择订购日期")%>", "")
            }
            window.location = "?key=" + escape(key) + "&peisongdian=" + escape(peisongdian) + "&dateFrom=" + dateFrom + "&dateTo=" + dateTo + "&IsPay=" + IsPay + "&Pay_id=" + Pay_id + "&Transport_id=" + Transport_id + "&supplier_id=" + supplier_id;
        }
        function exportorder()
        {
            window.location="../ajax/export.aspx?__Action=SupplierOrder_Export&where=<%=where %>";
        }
    </script>
</lbbody>
<lbbottom>
    <div class="bottom" id="body_bottom">
        <%=PageString%>
    </div>
</lbbottom>