<%@ page language="C#" autoeventwireup="true" inherits="Admin_GoodsManagement_ManageOrder, ShopWe" enableeventvalidation="false" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Src="../UserControl/AjaxModal.ascx" TagName="AjaxModal" TagPrefix="uc1" %>
<!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 runat="server">
    <title>订单列表</title>
    <link href="../css/my.css" rel="stylesheet" type="text/css" />
    <link href="../JS/TableSort/tablesort.css" rel="stylesheet" type="text/css" />
    <link href="../css/volti.css" rel="stylesheet" type="text/css" />
    <link href="../Themes/Default/Plugin/ThickBox/thickbox.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../css/jquery.js"></script>
    <script type="text/javascript" src="../css/admin.js"></script>
    <script type="text/javascript" src="../Themes/Default/Plugin/ThickBox/thickbox.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="PageScriptManager" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgressPage" runat="server">
        <ProgressTemplate>
            <uc1:AjaxModal ID="AjaxModalPage" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <div class="k_all3">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="name">
            <tr>
                <td style="width: 160px">
                    <div class="name_noe">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="center" style="height: 22px">
                                    默认操作
                                </td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:Button ID="DeleteGoodsOrder" runat="server" Text="删除订单" OnClientClick="return confirm('你真的要删除所选项？')"
                                        OnClick="DeleteGoodsOrder_Click" CssClass="butt_tle" Height="22px" Width="70px" />
                                    <asp:Button ID="OrderToCSV" runat="server" Text="导出Excel" OnClientClick="return confirm('确定导出到Excel？')"
                                        OnClick="OrderToCSV_Click" CssClass="butt_tle" Height="22px" Width="70px" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td style="width: 405px">
                    <div class="name_noe">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="center" style="height: 22px">
                                    搜索订单
                                </td>
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:TextBox ID="OrderNumber" Text="请输入订单号" CssClass="input_tle" runat="server" Width="170"
                                        Height="15"></asp:TextBox>
                                    <asp:TextBox ID="TextBoxName" runat="server" CssClass="input_tle" Style="width: 125px;
                                        height: 15px" Text="请输入下单人"></asp:TextBox>
                                    <asp:Button ID="Search" runat="server" Text="搜索订单" OnClick="Search_Click" CssClass="butt_tle"
                                        Height="22px" Width="70px" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <div class="k_all3">
        <div class="aja">
            <ul>
                <li>
                    <asp:LinkButton ID="LinkButtonAllOrder" runat="server" OnClick="LinkButtonAllOrder_Click"
                        CausesValidation="false" CssClass="grey">全部订单</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonOK" runat="server" OnClick="LinkButtonOK_Click" CausesValidation="false"
                        CssClass="grey">等待核对</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonPay" runat="server" OnClick="LinkButtonPay_Click" CausesValidation="false"
                        CssClass="grey">等待收款</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonSetUp" runat="server" OnClick="LinkButtonSetUp_Click"
                        CausesValidation="false" CssClass="grey">等待配货</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonConsignment" runat="server" OnClick="LinkButtonConsignment_Click"
                        CausesValidation="false" CssClass="grey">等待发货</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonOver" runat="server" OnClick="LinkButtonOver_Click"
                        CausesValidation="false" CssClass="grey">发货完成</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonComplete" runat="server" OnClick="LinkButtonComplete_Click"
                        CausesValidation="false" CssClass="grey">订单完成</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonExchange" runat="server" OnClick="LinkButtonExchange_Click"
                        CausesValidation="false" CssClass="grey">换货记录</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonRefundment" runat="server" OnClick="LinkButtonRefundment_Click"
                        CausesValidation="false" CssClass="grey">退款记录</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonReturnOfGoods" runat="server" OnClick="LinkButtonReturnOfGoods_Click"
                        CausesValidation="false" CssClass="grey">退货记录</asp:LinkButton>
                </li>
                <li>
                    <asp:LinkButton ID="LinkButtonClose" runat="server" OnClick="LinkButtonClose_Click"
                        CausesValidation="false" CssClass="grey">取消订单</asp:LinkButton>
                </li>
            </ul>
        </div>
    </div>
    <div id="all">
        <div class="k_all3">
            <table width="100%" cellpadding="0" cellspacing="0" class="bk">
                <tr>
                    <th style="width: 30px">
                        <input id="ChkAll" type="checkbox" onclick="Check(this,'CheckBoxSelect','RepeaterTable')" />
                    </th>
                    <th style="width: 50px">
                        状态
                    </th>
                    <th style="width: 170px">
                        订单号
                    </th>
                    <th style="width: 120px">
                        <img src="../css/images/icoi.gif" alt="按时间排序" /><asp:LinkButton ID="DateSort" CssClass="blue"
                            runat="server" OnClick="DateSort_Click">按时间</asp:LinkButton>
                    </th>
                    <th style="width: 70px">
                        <img src="../css/images/icoa.gif" alt="按金额排序" /><asp:LinkButton ID="PriceSort" CssClass="blue"
                            runat="server" OnClick="PriceSort_Click">按金额</asp:LinkButton>
                    </th>
                    <th style="width: 100px">
                        下单会员
                    </th>
                    <th>
                        订单操作
                    </th>
                </tr>
                <asp:Repeater ID="RepeaterTable" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <asp:CheckBox ID="CheckBoxSelect" runat="server" ToolTip='<%# Eval("OrderNumber") %>' />
                            </td>
                            <td style="background-color: <%# GetStateColor(Eval("OrderState").ToString()) %>;
                                color: #ffffff;">
                                <%# GetStateName(Eval("OrderState").ToString())%>
                            </td>
                            <td>
                                <asp:LinkButton ID="LinkButtonBody" runat="server" OnClick="LinkButtonBody_Click"
                                    CommandArgument='<%# Eval("OrderNumber") %>' CssClass="blue"><%# Eval("OrderNumber") %></asp:LinkButton>
                                [<a href='OrderInfo.aspx?id=<%# Eval("OrderNumber") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                    class="thickbox" title="查看订单信息">详细</a>][<a href='../../OrderInfo.aspx?ordernumber=<%# Eval("OrderNumber") %>'
                                        class="grey" target="_blank">打印</a>]
                            </td>
                            <td>
                                <%# Eval("CreateDate")%>
                            </td>
                            <td class="ys_1">
                                <%# Eval("OrderPrice").ToString().Substring(0,Eval("OrderPrice").ToString().Length-2)%>
                            </td>
                            <td>
                                <%# GetOrderUser(Eval("OrderNumber").ToString())%>
                            </td>
                            <td>
                                <img src="../css/images/fuwei.png" alt="复位" />
                                <a href='OrderRestore.aspx?id=<%# Eval("OrderNumber") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                    class="thickbox" title="订单复位">复位</a>
                                <img src="../css/images/shop_xl1.png" alt="修改订单价格" />
                                <a href='UpdateOrderPrice.aspx?id=<%# Eval("OrderNumber") %>&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                    class="thickbox" title="订单复位">修改价格</a>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
        </div>
        <div class="k_all3">
            <div id="bk_line">
                <div class="txte">
                </div>
                <webdiyer:AspNetPager ID="AspNetPagerOrder" runat="server" OnPageChanged="AspNetPagerOrder_PageChanged"
                    AlwaysShow="True" CssClass="yahoo2">
                </webdiyer:AspNetPager>
            </div>
        </div>
        <asp:Panel ID="PanelOrderInfo" Visible="false" runat="server">
            <div class="k_all2">
                <div class="come_title">
                    <h2>
                        订单基本信息[当前处理订单号：
                        <asp:Literal ID="LiteralOrderID" runat="server"></asp:Literal>]</h2>
                    <div class="title_help">
                        <a href="http://www.shopwe.cn/bbs/" target="_blank">
                            <img src="../Themes/Default/Images/help_1.jpg" alt="shopwe论坛" width="50" height="20" /></a>
                        <a href="http://help.shopwe.cn/video/order_demo/order_demo.htm" target="_blank">
                            <img src="../Themes/Default/Images/video_help.jpg" alt="shopwe视频教程" width="50" height="20" /></a>
                        <a href="http://help.shopwe.cn/help/Show.asp?id=33" target="_blank">
                            <img src="../Themes/Default/Images/help.jpg" alt="shopwe帮助中心" width="50" height="20" /></a></div>
                </div>
                <asp:UpdatePanel ID="UpdatePanelOrder" runat="server">
                    <ContentTemplate>
                        <div class="ys_bf_bai">
                            <div class="k_all3">
                                <div class="come_title_bai2">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td style="width: 450px;">
                                                <asp:Button ID="ButtonOK" runat="server" Text="确认订单" Enabled="False" OnClick="ButtonOK_Click" />
                                                <asp:Button ID="ButtonPayment" runat="server" Text="已经收款" Enabled="False" OnClick="ButtonPayment_Click" />
                                                <asp:Button ID="ButtonSetUp" runat="server" Text="正在配货" Enabled="False" OnClick="ButtonSetUp_Click" />
                                                <asp:Button ID="ButtonConsignment" runat="server" Text="已经发货" Enabled="False" OnClick="ButtonConsignment_Click" />
                                                <asp:Button ID="ButtonOver" runat="server" Text="订单完成" Enabled="False" OnClick="ButtonOver_Click" />
                                            </td>
                                            <td style="text-align: right;">
                                                <asp:Button ID="ButtonExchange" runat="server" Text="正在换货" Enabled="False" OnClick="ButtonExchange_Click" />
                                                <asp:Button ID="ButtonRefundment" runat="server" Text="等待退款" Enabled="False" OnClick="ButtonRefundment_Click" />
                                                <asp:Button ID="ButtonReturnOfGoods" runat="server" Text="已经退货" Enabled="False" OnClick="ButtonReturnOfGoods_Click" />
                                                <asp:Button ID="ButtonClose" runat="server" Text="取消订单" Enabled="False" OnClick="ButtonClose_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                        <asp:Literal ID="LiteralBody" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <div class="come_title">
                    <h2>
                        请填写当前订单的收款信息</h2>
                </div>
                <div class="ys_bf_bai">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="bg_1" style="width: 90px; text-align: right">
                                收款银行：
                            </td>
                            <td style="width: 300px">
                                <asp:DropDownList ID="AccountBank" Style="width: 120px" runat="server">
                                </asp:DropDownList>
                                <a href='../WebSetting/BankList.aspx?keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                    class="thickbox" title="管理银行信息">[管理]</a>
                            </td>
                            <td class="bg_1" style="width: 70px; text-align: right">
                                银行账号：
                            </td>
                            <td style="width: 150px">
                                <asp:TextBox ID="AccountBankNumber" runat="server" CssClass="input" Style="width: 120px"></asp:TextBox>
                            </td>
                            <td class="bg_1" style="width: 80px; text-align: right">
                                应缴税金：
                            </td>
                            <td>
                                <asp:TextBox ID="Taxation" runat="server" CssClass="input" Text="0" Style="width: 120px;
                                    height: 22px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="bg_1" style="width: 90px; text-align: right">
                                开收发票：
                            </td>
                            <td style="width: 300px">
                                <asp:CheckBox ID="CheckBoxIsInvoice" runat="server" />
                                是
                            </td>
                            <td class="bg_1" style="width: 70px; text-align: right">
                                发票抬头：
                            </td>
                            <td style="width: 150px">
                                <asp:TextBox ID="InvoiceHead" runat="server" CssClass="input" Style="width: 120px"></asp:TextBox>
                            </td>
                            <td class="bg_1" style="width: 70px; text-align: right">
                                &nbsp;
                            </td>
                            <td>
                                <asp:Button ID="AccountSubmit" runat="server" Text="提交所填收款信息" OnClick="AccountSubmit_Click"
                                    CssClass="butt_tle" Height="22px" Width="120px" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="come_title">
                    <h2>
                        请填写当前订单的物流信息</h2>
                </div>
                <div class="ys_bf_bai">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td class="bg_1" style="width: 90px; text-align: right">
                                物流公司：
                            </td>
                            <td style="width: 300px">
                                <asp:DropDownList ID="LogisticsCompany" runat="server" Style="width: 120px">
                                </asp:DropDownList>
                                <a href='../WebSetting/LogisticsCompanyList.aspx?keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=400&width=740'
                                    class="thickbox" title="管理物流公司">[管理]</a>
                            </td>
                            <td class="bg_1" style="width: 70px; text-align: right">
                                快递单号：
                            </td>
                            <td style="width: 150px">
                                <asp:TextBox ID="CourierTrackingNumber" runat="server" CssClass="input" Style="width: 120px"></asp:TextBox>
                            </td>
                            <td class="bg_1" style="width: 80px; text-align: right">
                                &nbsp;
                            </td>
                            <td>
                                <asp:Button ID="LogisticsSubmit" runat="server" Text="提交所填物流信息" OnClick="LogisticsSubmit_Click"
                                    CssClass="butt_tle" Height="22px" Width="120px" />
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="come_title">
                    <h2>
                        对应选中订单操作记录</h2>
                </div>
                <div class="ys_bf_bai">
                    <div class="come_title_bai2">
                        下面是订单操作的基本信息，你可以在下面添加备注或者查看备注</div>
                    <asp:UpdatePanel ID="UpdatePanelOrderState" runat="server">
                        <ContentTemplate>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td>
                                        <asp:Literal ID="LiteralNote" runat="server"></asp:Literal>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
