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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>转运空运箱子
    </title>
    <script language="javascript" src="../lodop/LodopFuncs.js"></script>
    <object id="LODOP" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0"
        height="0">
        <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0" pluginspage="../lodop/install_lodop.exe"></embed>
    </object>
</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" border="0" class="table">
        <tr runat="server">
            <td class="tbpostheader">
                <%=GetText("快递单号") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtExpressNo" runat="server" ClientIDMode="Static" autocomplete="off"></asp:TextBox>
                <asp:Button ID="btnDetail" runat="server" Text="检查快递单" OnClick="btnDetail_Click" CssClass="button" />
            </td>
        </tr>
        <tr runat="server">
            <td class="tbpostheader">
                <%=GetText("客户代号") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtCustomerCode" runat="server" ClientIDMode="Static"></asp:TextBox>
            </td>
        </tr>

        <tr runat="server">
            <td class="tbpostheader">
                <%=GetText("重量") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtBoxWeight" runat="server" ClientIDMode="Static" autocomplete="off"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
                    ControlToValidate="txtBoxWeight" ErrorMessage="输入格式不正确"
                    ValidationExpression="^\d*\.{0,1}\d{0,3}$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("长（cm）") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtBoxLength" runat="server" ClientIDMode="Static" autocomplete="off"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
                    ControlToValidate="txtBoxLength" ErrorMessage="输入格式不正确"
                    ValidationExpression="^\d*\.{0,1}\d{0,3}$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("宽（cm）") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtBoxWidth" runat="server" ClientIDMode="Static" autocomplete="off"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
                    ControlToValidate="txtBoxWidth" ErrorMessage="输入格式不正确"
                    ValidationExpression="^\d*\.{0,1}\d{0,3}$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("高（cm）") %>
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtBoxHeight" runat="server" ClientIDMode="Static" autocomplete="off"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server"
                    ControlToValidate="txtBoxHeight" ErrorMessage="输入格式不正确"
                    ValidationExpression="^\d*\.{0,1}\d{0,3}$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("目标仓") %>
            </td>
            <td class="tbpost">
                <asp:RadioButtonList ID="rblTarWareId" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="6" Text="金边仓" Selected="True"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="tbfooter" colspan="2">

                <asp:Button ID="btSaveBoxIn" CssClass="button" runat="server" ClientIDMode="Static" OnClientClick='return confirm("确定装箱？？？")' OnClick="btSaveBoxIn_Click" Text="装箱" />
            </td>
        </tr>
    </table>

    <yee:PageTitle ID="pgTitle" runat="server" Title="未集包的箱子">
        <ShortCuts>
            <a href="http://admin.trueloda.com/wms/box/TransportPackageCollectBoxList.aspx">集包列表</a>
            <asp:Button ID="btnPrice" runat="server" Text="空运包裹报价" CssClass="button" OnClick="btnPrice_Click" />
        </ShortCuts>
    </yee:PageTitle>
    <div>
        目标仓：
        <asp:RadioButtonList ID="rblWare" runat="server" RepeatDirection="Horizontal" AutoPostBack="true" OnSelectedIndexChanged="rblWare_SelectedIndexChanged">
            <asp:ListItem Value="6" Text="金边仓" Selected="True"></asp:ListItem>
            <asp:ListItem Value="30" Text="西港仓"></asp:ListItem>
            <asp:ListItem Value="31" Text="木牌仓"></asp:ListItem>
            <asp:ListItem Value="32" Text="波贝仓"></asp:ListItem>
        </asp:RadioButtonList>
    </div>
    <asp:Repeater ID="rptList" runat="server">
        <HeaderTemplate>
            <table cellpadding="0" cellspacing="0" border="0" class="table" id="table">
                <tr>

                    <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("尺寸") %>(CM)
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tbrow">

                <td class="tbpost">
                    <%# Eval("SerailNo")%>
                    <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId")%>' />
                </td>
                <td class="tbpost">
                    <%#Eval("TargetwarehouseName")%>
                </td>

                <td class="tbpost">
                    <%#Eval("OrderNo")%>
                </td>
                <td class="tbpost">
                    <%#Eval("CreatedByName")%>
                </td>
                <td class="tbpost">
                    <%# Eval("CreatedOn")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Weight")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Size")%>
                </td>
                <td class="tbpost">
                    <%# Eval("BoxLength")%>*<%# Eval("BoxWidth")%>*<%# Eval("BoxHeight")%>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr class="tbrowalter">
                <td class="tbpost">
                    <%# Eval("SerailNo")%>
                    <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId")%>' />
                </td>
                <td class="tbpost">
                    <%#Eval("TargetwarehouseName")%>
                </td>

                <td class="tbpost">
                    <%#Eval("OrderNo")%>
                </td>
                <td class="tbpost">
                    <%#Eval("CreatedByName")%>
                </td>
                <td class="tbpost">
                    <%# Eval("CreatedOn")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Weight")%>
                </td>
                <td class="tbpost">
                    <%# Eval("Size")%>
                </td>
                <td class="tbpost">
                    <%# Eval("BoxLength")%>*<%# Eval("BoxWidth")%>*<%# Eval("BoxHeight")%>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>

    <yee:Button ID="btnCollect" runat="server" Text="集包" OnClick="btnCollect_Click" />

    <script language="javascript" type="text/javascript">

        var LODOP; //声明为全局变量

        function prn1_printBox(serialNo, customerCode, orderNo, createdOn, employNo, printName) {

            CreateOneFormPageBox(serialNo, customerCode, orderNo, createdOn, employNo, printName);

        };

        function CreateOneFormPageBox(serialNo, customerCode, orderNo, createdOn, employNo, printName) {

            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));
            LODOP.PRINT_INITA("打印外箱条码");

            LODOP.SET_PRINT_PAGESIZE(0, 700, 500, "A4");
            LODOP.ADD_PRINT_BARCODE(40, 28, 228, 50, "128A", serialNo);
            LODOP.ADD_PRINT_TEXT(99, 18, 247, 25, "客户代号  " + customerCode);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(118, 18, 242, 25, "快递单号  " + orderNo);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(137, 18, 224, 25, "装箱时间  " + createdOn);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_ELLIPSE(154, 62, 49, 31, 0, 1);
            LODOP.ADD_PRINT_TEXT(160, 72, 49, 22, employNo);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(9, 27, 209, 30, "外箱条码");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 18);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(162, 142, 110, 25, printName);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 18);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINTER_INDEXA("outPrinterGK888t")
            LODOP.PRINT();

        };
    </script>
</asp:Content>