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

<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")));
                }
            });
        }
        function checkRemove() {
            $(".check ").each(function () {
                var able = $(this).attr("disabled");
                if (able != 'disabled') {
                    $(this).attr("checked", false);
                }
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <yee:PageTitle ID="pgTitle" runat="server">
        <ShortCuts>
            <a href="AbroadReceiveList.aspx">返回</a>
        </ShortCuts>
    </yee:PageTitle>
    <yee:MessageBox runat="server" ID="msg">
    </yee:MessageBox>

    <!--  查询及搜索物流信息 -->
    <div class="query">
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td class="queryLeft">
                    <%=GetText("收货日期") %>：
                </td>
                <td class="queryRigth">
                    <yee:DatePicker ID="dpFrom" runat="server" IsRequired="false" />
                    -<yee:DatePicker ID="dpTo" runat="server" IsRequired="false" />
                </td>
                <td class="queryLeft">
                    <%=GetText("国际单号") %>：
                </td>
                <td class="queryRigth">
                    <asp:TextBox ID="txtOrderNo" runat="server"></asp:TextBox>
                    <asp:Button ID="btnClick" runat="server" Text=" "
                        Style="border: none" OnClick="btnClick_Click" />
                </td>

                <td class="queryLeft">
                    <%=GetText("仓储中心") %>：
                </td>
                <td class="queryRigth">
                    <yee:UserWarehousesDropDownList ID="ddlWarehouse" runat="server" WarehouseType="海外仓储" IsShowAllAtFirst="true">
                    </yee:UserWarehousesDropDownList>
                </td>
                <td>
                    <asp:CheckBox ID="cbNoPage" runat="server" Text="不分页" />
                </td>
                <td></td>
                <td class="queryLeft">
                    <yee:Button ID="btnQuery" runat="server" CssClass="button" OnClick="btnQuery_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetText("运输方式") %>
                </td>
                <td colspan="3">
                    <yee:DictionaryRadios ID="rblTypeId" runat="server" Dictionary="TransnationalFreightTypes" RepeatDirection="Horizontal" IsShowAllAtFirst="true" IsFirstSelected="true"></yee:DictionaryRadios>
                </td>
                <td>
                    <%=GetText("是否确认") %>
                </td>
                <td colspan="3">
                    <asp:RadioButtonList ID="rblSure" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="0" Text="全部"></asp:ListItem>
                        <asp:ListItem Value="1" Text="已确认"></asp:ListItem>
                        <asp:ListItem Value="2" Text="未确认" Selected="True"></asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td class="queryLeft">
                    <%=GetText("集包流水") %>/<%=GetText("外箱号") %>：
                </td>
                <td class="queryRigth">
                    <asp:TextBox ID="txtCollectSerialNo" runat="server"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:Repeater ID="rptClaim" runat="server" OnItemDataBound="rptClaim_ItemDataBound">
            <HeaderTemplate>
                <table cellpadding="0" class="table" cellspacing="0" border="0" id="table1">
                    <tr>
                        <td class="tbheader" width="30px">
                            <input type="checkbox" id="checkboxAll" class="checkboxAll" onclick="check_all_not()" />
                        </td>
                        <td class="tbheader" align="center" width="100px">
                            <%=GetText("国际单号") %>
                        </td>
                        <td class="tbheader" align="center" width="200px">
                            <%=GetText("创建日期") %>
                        </td>
                        <td class="tbheader" align="center" width="100px">
                            <%=GetText("集包号") %>
                        </td>
                        <td class="tbheader" align="center" width="100px">
                            <%=GetText("重量") %>
                        </td>
                        <td class="tbheader" align="center" width="100px">
                            <%=GetText("体积") %>
                        </td>
                        <td class="tbheader" align="center" width="100px">
                            <%=GetText("运输方式") %>
                        </td>
                        <td class="tbheader"></td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="tbrow">
                    <td class="tbpost">
                        <input type="checkbox" id="cbItem" runat="server" class="check" />
                    </td>
                    <td class="tbpost">
                        <%# Eval("CTWOrderNo")%>
                        <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("CollectUniqueId") %>' />
                    </td>
                    <td class="tbpost">
                        <%#Eval("CreatedOn") %>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SerialNo")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Weight")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Volume")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("FreightType")%>
                    </td>
                    <td width="20px" class="tbpost">
                        <asp:LinkButton ID="lbnAddList" runat="server" CommandArgument='<%#Eval("CollectUniqueId") %>'
                            CommandName="AddList" OnClick="lbnAddList_Click"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="tbrowalter">
                    <td class="tbpost">
                        <input type="checkbox" id="cbItem" runat="server" class="check" />
                    </td>
                    <td class="tbpost">
                        <%# Eval("CTWOrderNo")%>
                        <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("CollectUniqueId") %>' />
                    </td>
                    <td class="tbpost">
                        <%#Eval("CreatedOn") %>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SerialNo")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Weight")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Volume")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("FreightType")%>
                    </td>
                    <td width="20px" class="tbpost">
                        <asp:LinkButton ID="lbnAddList" runat="server" CommandArgument='<%#Eval("CollectUniqueId") %>'
                            CommandName="AddList" OnClick="lbnAddList_Click"></asp:LinkButton>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:Repeater>
        <yee:Pager ID="Pager1" runat="server" PageSize="5" PagerType="1" OnPageIndex_Changed="Pager1_PageIndex_Changed"
            PageIndex="0" />
    </div>
    <div>
        <yee:Button ID="btnPiAdd" runat="server" Text="批量添加" OnClick="btnPiAdd_Click" />
        <yee:Button ID="btnAllRemove" runat="server" Text="全部移除" OnClick="btnAllRemove_Click" />
    </div>
    <div class="subheader">
        <div class="title">
            <%=GetText("确认收货信息") %>
        </div>
        <div style="clear: both">
        </div>
    </div>
    <!-- 这一块可直接一起发往的列表 -->
    <asp:Repeater ID="rptBoxList" runat="server">
        <HeaderTemplate>
            <table cellpadding="0" class="table" cellspacing="0" border="0" id="table2">
                <tr>
                    <td class="tbheader" align="center" width="200px">
                        <%=GetText("国际单号") %>
                    </td>
                    <td class="tbheader" align="center" width="300px">
                        <%=GetText("创建日期") %>
                    </td>
                    <td class="tbheader" align="center" width="100px">
                        <%=GetText("集包号") %>
                    </td>
                    <td class="tbheader" align="center" width="100px">
                        <%=GetText("目标仓") %>
                    </td>
                    <td class="tbheader" align="center" width="100px">
                        <%=GetText("重量") %>
                    </td>
                    <td class="tbheader" align="center" width="100px">
                        <%=GetText("体积") %>
                    </td>

                    <td class="tbheader" align="center" width="100px">
                        <%=GetText("移除") %>
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tbrow">

                <td class="tbpost">
                    <%# Eval("CTWOrderNo")%>
                    <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("CollectUniqueId") %>' />
                </td>
                <td class="tbpost">
                    <%#Eval("CreatedOn") %>
                </td>
                <td class="tbpost">
                    <%# Eval("SerialNo")%>
                </td>
                <td class="tbpost">
                    <%# Eval("WarehouseName")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Weight")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Volume")%>
                </td>

                <td class="tbpost">
                    <asp:LinkButton ID="lbnRemove" runat="server" OnClick="lbnRemove_click"
                        CommandArgument='<%#Eval("CollectUniqueId") %>'><%=GetText("移除") %></asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr class="tbrowalter">
                <td class="tbpost">
                    <%# Eval("CTWOrderNo")%>
                    <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("CollectUniqueId") %>' />
                </td>
                <td class="tbpost">
                    <%#Eval("CreatedOn") %>
                </td>
                <td class="tbpost">
                    <%# Eval("SerialNo")%>
                </td>
                <td class="tbpost">
                    <%# Eval("WarehouseName")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Weight")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Volume")%>
                </td>
                <td class="tbpost">
                    <asp:LinkButton ID="lbnRemove" runat="server" OnClick="lbnRemove_click"
                        CommandArgument='<%#Eval("CollectUniqueId") %>'><%=GetText("移除") %></asp:LinkButton>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
        </FooterTemplate>
    </asp:Repeater>
    <asp:HiddenField ID="hfFreightType" runat="server" />
    <asp:HiddenField ID="hfWarehouse" runat="server" />
    <!-- 物流信息 -->
    <table cellpadding="0" cellspacing="0" class="table">

        <tr>
            <td class="tbpostheader">
                <%=GetText("选中集包数") %>
            </td>

            <td class="tbpost">
                <asp:Literal ID="litCount" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("重量") %>
            </td>
            <td class="tbpost">
                <asp:Literal ID="litWeight" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("体积") %>
            </td>
            <td class="tbpost">
                <asp:Literal ID="litVolume" runat="server"></asp:Literal>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("库区") %>
            </td>
            <td class="tbpost">
                <asp:DropDownList runat="server" ID="ddlStorageId" ></asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("收货日期") %>
            </td>
            <td class="tbpost">
                <yee:DatePicker ID="dpReceiveOn" runat="server" IsRequired="true" />
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("国际物流公司") %>
            </td>
            <td class="tbpost">
                <asp:RadioButtonList ID="rblCompany" runat="server" RepeatDirection="Horizontal"></asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("单据上重量") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtWeight" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("单据上体积") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtVolume" runat="server"></asp:TextBox>
            </td>
        </tr>

        <tr>
            <td class="tbpostheader">
                <%=GetText("备注") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tbfooter"></td>
            <td class="tbfooter">
                <asp:Button ID="btSave" runat="server" CssClass="button" OnClick="btSave_Click" />
            </td>
        </tr>
    </table>
</asp:Content>