<%@ Page Title="" Language="C#" MasterPageFile="~/SignBox/Site1.Master" AutoEventWireup="true" CodeBehind="PlatformSummaryList.aspx.cs" Inherits="GxHub.Wms.Abroad.Web.SignBox.PlatformSummaryList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>平台件目标仓更新列表</title>

    <script type="text/javascript">

        //使用checkbox当做全选反选
        function check_all_not() {
            var check = document.getElementById("checkboxAll").checked;
            //alert(check);
            if (check == true) {
                checkAll();
            }
            else {
                checkReverse();
            }
        }
    
        //选择
        function checkAll() {
            $(".check ").each(function () {
                var able = $(this).attr("disabled");
                if (able != 'disabled') {
                    $(this).attr("checked", true);
                }
            });
        }
    
        //反选
        function checkReverse() {
            $(".check ").each(function () {
                var able = $(this).attr("disabled");
                if (able != 'disabled') {
                    $(this).attr("checked", !($(this).attr("checked")));
                }
            });
        }
   
    
    </script>    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <yee:PageTitle ID="ptTitle" runat="server">
        <ShortCuts></ShortCuts>
    </yee:PageTitle>
    <yee:MessageBox ID="msg" runat="server"></yee:MessageBox>
    <div class="query">
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td>
                    <%=GetText("客户代号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtCustomerCode" runat="server" width="100px"></asp:TextBox>
                </td>
                <td>
                    <%=GetText("单号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtDocumentNo" runat="server" width="100px"></asp:TextBox>
                </td>
                <td>
                    <%=GetText("客户电话") %>
                </td>
                <td>
                    <asp:TextBox ID="txtTelPhone" runat="server" width="100px"></asp:TextBox>
                </td>
                <td>
                    <%=GetText("旧仓库") %>
                </td>
                <td>
                    <yee:UserWarehousesDropDownList ID="ddlWarehouse" runat="server" WarehouseType="海外仓储" IsShowAllAtFirst="true">
                    </yee:UserWarehousesDropDownList>
                </td>

                <td><%=GetText("类型") %></td>
                <td>
                    <asp:DropDownList ID="ddlOperationType" runat="server">
                        <asp:ListItem Value="0" Selected="True" Text="全部"></asp:ListItem>
                        <asp:ListItem Value="1" Text="转运包裹"></asp:ListItem>
                        <asp:ListItem Value="2" Text="出库单"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                
                <td><%=GetText("状态") %></td>
                <td>
                    <asp:DropDownList ID="ddlStatuType" runat="server">
                        <asp:ListItem Value="0" Text="全部"></asp:ListItem>
                        <asp:ListItem Value="1" Selected="True" Text="待处理"></asp:ListItem>
                        <asp:ListItem Value="2" Text="已确认"></asp:ListItem>
                        <asp:ListItem Value="3" Text="已处理"></asp:ListItem>
                    </asp:DropDownList>
                </td>

                <td><%=GetText("添加日期") %></td>
                <td >
                    <yee:DatePicker ID="dtFrom" runat="server" IsRequired="false" />-<yee:DatePicker ID="dtTo" runat="server" IsRequired="false" />
                </td>
              
                <td colspan="2">
                    <yee:Button ID="btnSearch" runat="server" CssClass="button" OnClick="btnSearch_Click" />
                </td>
            </tr>
            <tr>
        </table>
    </div>

    <yee:PageTitle ID="pgTitleSelect" runat="server" Title = "">
        <ShortCuts>
            <div style = "margin-top: 10px; text-align: left;">
                <asp:Button ID="btnBatchChange" CssClass="button"  runat="server" Text="批量修改目标仓" OnClick="btnBatchChange_Click" />
                <asp:Button ID="btnBatchConfirm" CssClass="button"  runat="server" Text="批量确认" OnClick="btnBatchConfirm_Click" OnClientClick = "return confirm('状态确定变更成已确认吗')" />
            </div>
        </ShortCuts>
    </yee:PageTitle>

    <div>
        <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
            <HeaderTemplate>
                <table cellpadding="0" cellspacing="0" border="0" class="table" id="table" style="text-align: center;">
                    <thead>
                        <tr>
                            <td class="tbheader" width="30px">
                                <input type="checkbox" id="checkboxAll" class="checkboxAll" onclick="check_all_not()" />
                            </td>
                            <td class="tbheader"><%=GetText("单号") %></td>
                            <td class="tbheader"><%=GetText("类型") %></td>
                            <td class="tbheader"><%=GetText("状态") %></td>
                            <td class="tbheader"><%=GetText("旧仓库") %></td>
                            <td class="tbheader"><%=GetText("新仓库") %></td>
                            <td class="tbheader"><%=GetText("操作信息") %></td>
                            <td class="tbheader"><%=GetText("更新信息") %></td>
                            <td class="tbheader"><%=GetText("地址信息") %></td>
                            <td class="tbheader"><%=GetText("客户电话") %></td>
                            <td class="tbheader"><%=GetText("操作") %></td>
                        </tr>
                    </thead>
                    <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="tbrow">
                    <td class="tbpost">
                        <input type="checkbox" id="cbItem" runat="server" class="check" />
                        <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("UniqueId") %>' />
                    </td>
                    <td class="tbpost"><%#Eval("OrderNo") %></br> <%#Eval("CustomerCode") %></td>
                    <td class="tbpost"><%#Eval("OrderTypeName") %></td>
                    <td class="tbpost"><%#Eval("ProcessStatusName") %></td>
                    <td class="tbpost"><%#Eval("OldWareHouseName") %></td>
                    <td class="tbpost"><%#Eval("NewWareHouseName") %></td>
                    <td class="tbpost"><%#Eval("CreatedByName") %> </br> <%#Eval("CreatedOn") %> </td>
                    <td class="tbpost"><%#Eval("ModifiedByName") %> </br> <%#Eval("ModifiedOn") %> </td>
                    <td class="tbpost"><%#Eval("ProvinceName") %> </br> <%#Eval("CityName") %> </br> <%#Eval("DistrictName") %> </br> <%#Eval("DetailAddress") %></td>
                    <td class="tbpost"><%#Eval("TelPhone") %></td>                    
                    <td class="tbpost">
                         <asp:LinkButton ID="lbnCh" runat="server"  CommandName="change" CommandArgument='<%#Eval("UniqueId") %>'><%=GetText("修改目标仓") %></asp:LinkButton>
                         <asp:LinkButton ID="lbnSure" runat="server"  CommandName="sure" CommandArgument='<%#Eval("UniqueId") %>' OnClientClick = "return confirm('状态确定变更成已确认吗')" ><%=GetText("已确认") %></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="altertbrow">
                    <td class="tbpost">
                        <input type="checkbox" id="cbItem" runat="server" class="check" />
                        <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("UniqueId") %>' />
                    </td>
                    <td class="tbpost"><%#Eval("OrderNo") %></br> <%#Eval("CustomerCode") %></td>
                    <td class="tbpost"><%#Eval("OrderTypeName") %></td>
                    <td class="tbpost"><%#Eval("ProcessStatusName") %></td>
                    <td class="tbpost"><%#Eval("OldWareHouseName") %></td>
                    <td class="tbpost"><%#Eval("NewWareHouseName") %></td>
                    <td class="tbpost"><%#Eval("CreatedByName") %> </br> <%#Eval("CreatedOn") %> </td>
                    <td class="tbpost"><%#Eval("ModifiedByName") %> </br> <%#Eval("ModifiedOn") %> </td>
                    <td class="tbpost"><%#Eval("ProvinceName") %> </br> <%#Eval("CityName") %> </br> <%#Eval("DistrictName") %> </br> <%#Eval("DetailAddress") %> </td>
                    <td class="tbpost"><%#Eval("TelPhone") %></td> 
                    <td class="tbpost"> 
                        <asp:LinkButton ID="lbnCh" runat="server"  CommandName="change" CommandArgument='<%#Eval("UniqueId") %>'><%=GetText("修改目标仓") %></asp:LinkButton>
                        <asp:LinkButton ID="lbnSure" runat="server"  CommandName="sure" CommandArgument='<%#Eval("UniqueId") %>' OnClientClick = "return confirm('状态确定变更成已确认吗')" ><%=GetText("已确认") %></asp:LinkButton>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </tbody>
        </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>

    <yee:Pager ID="Pager1" runat="server" PageSize="20" PagerType="1" OnPageIndex_Changed="Pager1_PageIndex_Changed" PageIndex="0" />
</asp:Content>