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

<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 () {
                $(this).attr("checked", true);
            });
        }
        //反选
        function checkReverse() {
            $(".check ").each(function () {
                $(this).attr("checked", !($(this).attr("checked")));
            });
        }
        function checkRemove() {
            $(".check ").each(function () {
                $(this).attr("checked", false);
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <yee:MessageBox ID="msg" runat="server"></yee:MessageBox>
    <div class="subheader">
        <div class="title">
            <%=GetText("箱子批量确认") %>
        </div>
        <div class="command">
        </div>
        <div style="clear: both;">
        </div>
    </div>
    <div class="query">
        <td>
            <%=GetText("仓储中心") %>：
        </td>
        <td>
            <yee:UserWarehousesDropDownList ID="UserWarehousesDropDownList" runat="server" WarehouseType="海外仓储">
            </yee:UserWarehousesDropDownList>
        </td>
        <td>
            <%=GetText("客户代号") %>：
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtCode"></asp:TextBox>
        </td>
        <td>
            <%=GetText("箱子号") %>：
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtBoxserialNo"></asp:TextBox>
        </td>
        <td>
            <asp:Button runat="server" ID="btnQuery" OnClick="btnQuery_Click" Text="搜索" CssClass="button"></asp:Button>
        </td>
    </div>
    <yee:Button ID="btnPiCut" runat="server" Text="批量扣费" OnClick="btnPiCut_Click" />
    <asp:Repeater runat="server" ID="rptBoxList" OnItemDataBound="rptBoxList_ItemDataBound" OnItemCommand="rptBoxList_ItemCommand">
        <HeaderTemplate>
            <table cellpadding="0" cellspacing="0" class="table">
                <tr>
                    <td class="tbheader" width="15px">
                        <input type="checkbox" id="checkboxAll" onclick="check_all_not()" />
                    </td>
                    <td class="tbheader" style="width: 15px">序号</td>
                    <td class="tbheader" style="width: 100px">箱子流水号</td>
                    <td class="tbheader">提货码</td>
                    <td class="tbheader">操作</td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tbrow">
                <td class="tbpost">
                    <input type="checkbox" runat="server" id="cbItem" class="check" value='<%# Eval("BoxId") %>' />
                    <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litSort" runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Label ID="labBoxNo" runat="server" Text='<%# Eval("Serail") %> '></asp:Label>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtVerificationCode" runat="server" Text='<%# Eval("VerificationCode") %> '></asp:TextBox><a href="" target="_blank" id="hfWait" runat="server">未付款，请先支付</a>
                </td>
                <td class="tbpost">
                    <asp:LinkButton ID="lbnRemove" runat="server" Text="移除" CommandArgument='<%# Eval("BoxId") %> ' CommandName="remove"></asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr class="tbrowalter">
                <td class="tbpost">
                    <input type="checkbox" runat="server" id="cbItem" class="check" value='<%# Eval("BoxId") %>' />
                    <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litSort" runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Label ID="labBoxNo" runat="server" Text='<%# Eval("Serail") %> '></asp:Label>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtVerificationCode" runat="server" Text='<%# Eval("VerificationCode") %> '></asp:TextBox><a href="" target="_blank" id="hfWait" runat="server">未付款，请先支付</a>
                </td>
                <td class="tbpost">
                    <asp:LinkButton ID="lbnRemove" runat="server" Text="移除" CommandArgument='<%# Eval("BoxId") %> ' CommandName="remove"></asp:LinkButton>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>

    <yee:Button ID="btnCheck" runat="server" CssClass="button" Text="确认生成提货单" OnClick="btnCheck_Click" />
</asp:Content>