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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>收货详情
    </title>
    <script type="text/javascript">

        function check_all_not() {
            var check = document.getElementById("checkboxAll").checked;
            //alert(check);
            if (check == true) {
                checkAll();
            }
            else {
                checkReverse();
            }
            click_cbitem();
        }
        function setRowColor(cbo) {
            if ($(cbo).is(":checked")) {
                $(cbo).parent().parent().find("td").attr("style", "background-color: #C6E0B4;");
            } else {
                $(cbo).parent().parent().find("td").removeAttr("style");
            }
            click_cbitem();

        }
        function checkAll() {
            $(".set-bk ").each(function () {
                var able = $(this).attr("disabled");
                if (able != 'disabled') {
                    $(this).attr("checked", "checked");
                    $(this).parent().parent().find("td").attr("style", "background-color: #C6E0B4;");
                }
            });
        }
        //反选
        function checkReverse() {
            $(".set-bk ").each(function () {
                var able = $(this).attr("disabled");
                if (able != 'disabled') {
                    $(this).attr("checked", !($(this).attr("checked")));
                    $(this).parent().parent().find("td").removeAttr("style");
                }
            });
        }
        function checkRemove() {
            $(".set-bk ").each(function () {
                var able = $(this).attr("disabled");
                if (able != 'disabled') {
                    $(this).attr("checked", false);
                    $(this).parent().parent().find("td").removeAttr("style");
                }
            });
        }
        function click_cbitem() {

            var count = 0;
            $(".set-bk").each(function () {

                var a = $(this).is(":checked");

                if ($(this).is(":checked") == true) {

                    count += 1;
                }

            })

            $("#litSureCount").text(count);

        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <yee:PageTitle ID="title" runat="server" Title="收货详情">
        <ShortCuts>
          
        </ShortCuts>
    </yee:PageTitle>
    <yee:MessageBox ID="msg" runat="server"></yee:MessageBox>
    <table cellpadding="0" cellspacing="0" class="table" border="0">
        <tr>
            <td class="tbpostheader">
                <%=GetText("收货日期") %>：
            </td>
            <td class="tbpost" style="float: left">
                <yee:DatePicker ID="dpDate" runat="server" />
            </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:Literal ID="litCTWOrderNo" runat="server"></asp:Literal>
            </td>
        </tr>

        <tr>
            <td class="tbfooter"></td>
            <td class="tbfooter">
                <asp:Button ID="btSave" runat="server" CssClass="button" Text="编辑" OnClick="btSave_Click" />
            </td>
        </tr>
    </table>

    <div>
        <table cellpadding="0" cellspacing="0" border="0" class="table">
            <tr>
                <td class="tbpost"><%=GetText("集包流水") %>：
                    <asp:TextBox runat="server" ID="txtCollect"></asp:TextBox>
                    <asp:Button ID="btnAdd" runat="server" CssClass="button" Text="添加集包" OnClick="btnAdd_Click" /></td>
                <td></td>
            </tr>
        </table>


        勾选笔数：<asp:Label ID="litSureCount" runat="server" ClientIDMode="Static" Font-Size="XX-Large"></asp:Label>
        <asp:Button ID="btnCreateRece" runat="server" CssClass="button" Text="创建新的收货记录" OnClick="btnCreateRece_Click" />
        <asp:Button ID="btnBatchRel" runat="server" CssClass="button" Text="批量释放" OnClick="btnBatchRel_Click" />

           <div class="query">
        <table cellpadding="0" cellspacing="0" border="0">

            <tr>
                 
               <td>
                    <%=GetText("站点类型") %>
                </td>
                <td>
                   <asp:RadioButtonList ID="rblType" runat="server" RepeatDirection="Horizontal"  >
                         <asp:ListItem Value="0" Text="全部" Selected="True" ></asp:ListItem>
                         <asp:ListItem Value="1" Text="总站" ></asp:ListItem>
                         <asp:ListItem Value="5" Text="分站" ></asp:ListItem>
                         <asp:ListItem Value="10" Text="代理" ></asp:ListItem>
                      </asp:RadioButtonList>
                </td>
                <td>
                    <%=GetText("国际单号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtCtwOrderNo" runat="server" Width="100px"></asp:TextBox>
                </td> 
                 <td>
                    <%=GetText("分页") %>
                </td>
                <td>
                    <asp:TextBox ID="txtPage" runat="server"></asp:TextBox>
                </td>
                <td>
                    <yee:Button ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click1" />
                    <yee:Button ID="btnUpdate" runat="server" Text="同步集包确认" OnClick="btnUpdate_Click" />
                </td>
            </tr>
            <tr>
                 <td>
                    <%=GetText("是否确认") %>
                </td>
                <td >
                  <asp:RadioButtonList ID="rblIsCheck" runat="server" RepeatDirection="Horizontal" >
                         <asp:ListItem Value="0" Text="全部" Selected="True" ></asp:ListItem>
                         <asp:ListItem Value="1" Text="已确认" ></asp:ListItem>
                         <asp:ListItem Value="2" Text="未确认" ></asp:ListItem>
                      </asp:RadioButtonList>
                </td>
                 <td>
                    <%=GetText("是否扣费") %>
                </td>
                <td>
                   <asp:RadioButtonList ID="rblIsPay" runat="server" RepeatDirection="Horizontal"  >
                         <asp:ListItem Value="0" Text="全部" Selected="True" ></asp:ListItem>
                         <asp:ListItem Value="1" Text="已扣费" ></asp:ListItem>
                         <asp:ListItem Value="2" Text="未扣费" ></asp:ListItem> 
                      </asp:RadioButtonList>
                </td>
                 
            </tr>
        </table>
    </div>
     
        <asp:Repeater ID="rptClaim" runat="server" OnItemDataBound="rptClaim_ItemDataBound" OnItemCommand="rptClaim_ItemCommand">
            <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" 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">
                        <input type="checkbox" id="cbitem" class="set-bk" runat="server" clientidmode="Static" onclick="setRowColor(this)" value='<%#Eval("UniqueId") %>' />
                    </td>
                    <td class="tbpost">

                        <asp:HyperLink ID="hlOrderNo" runat="server" Text='<%# Eval("CTWOrderNo")%>'></asp:HyperLink>
                        <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("UniqueId") %>' />
                    </td>
                    <td class="tbpost">
                        <%#Eval("CreatedOn") %>
                    </td>
                    <td class="tbpost" width="200px">
                        <asp:HyperLink ID="hlSerialNo" runat="server"></asp:HyperLink>
                         <%#Eval("VipCode") %>
                      <%--  <asp:LinkButton runat="server" ID="lbnCollectDetail" Text="集包箱子确认" CommandArgument='<%# Eval("CollectUniqueId")%>' CommandName="collectDetail"></asp:LinkButton>--%>
                    </td>
                     <td class="tbpost">
                        <%# Eval("WarehouseName")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("TotalWeight")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("TotalVolume")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("FreightType")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SignInOn")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SignByName")%>
                    </td>
                    <td class="tbpost">
                        <asp:LinkButton runat="server" ID="lbnRelease" Text="释放" CommandArgument='<%# Eval("UniqueId")%>' CommandName="release"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="tbrowalter">
                    <td class="tbpost">
                        <input type="checkbox" id="cbitem" class="set-bk" runat="server" clientidmode="Static" onclick="setRowColor(this)" value='<%#Eval("UniqueId") %>' />
                    </td>
                    <td class="tbpost">

                        <asp:HyperLink ID="hlOrderNo" runat="server" Text='<%# Eval("CTWOrderNo")%>'></asp:HyperLink>
                        <asp:HiddenField ID="hfId" runat="server" Value='<%#Eval("UniqueId") %>' />
                    </td>
                    <td class="tbpost">
                        <%#Eval("CreatedOn") %>
                    </td>
                    <td class="tbpost" width="200px">
                        <asp:HyperLink ID="hlSerialNo" runat="server"></asp:HyperLink>
                          <%#Eval("VipCode") %>
                        <%--<asp:LinkButton runat="server" ID="lbnCollectDetail" Text="集包箱子确认" CommandArgument='<%# Eval("CollectUniqueId")%>' CommandName="collectDetail"></asp:LinkButton>--%>
                    </td>
                     <td class="tbpost">
                        <%# Eval("WarehouseName")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("TotalWeight")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("TotalVolume")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("FreightType")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SignInOn")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SignByName")%>
                    </td>
                    <td class="tbpost">
                        <asp:LinkButton runat="server" ID="lbnRelease" Text="释放" CommandArgument='<%# Eval("UniqueId")%>' CommandName="release"></asp:LinkButton>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <yee:Pager ID="Pager1" runat="server" PageSize="20" PagerType="1" OnPageIndex_Changed="Pager1_PageIndex_Changed"
        PageIndex="0" />
    </div>
</asp:Content>