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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title><%=GetText("海外签收") %> </title>
    <style type="text/css">
        .fixDiv {
            height: 102px;
            width: 1200px;
            display: none;
        }

        .fix {
            position: fixed;
            width: 1200px;
            height: 102px;
            top: 0px;
            margin: 0px !important;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            var $table = $("#tb");
            var $tbTop = $table.offset().top;
            $(window).scroll(function () {
                var scrollTop = $(document).scrollTop();
                if (scrollTop >= $tbTop) {
                    $table.addClass("fix");
                    $(".fixDiv").show();
                } else if (scrollTop <= $tbTop) {
                    $table.removeClass("fix");
                    $(".fixDiv").hide();
                }
            });
        });
    </script>
    <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:MessageBox ID="msg" runat="server">
    </yee:MessageBox>
    <yee:PageTitle ID="title" runat="server">
    </yee:PageTitle>

    <div class="fixDiv"></div>
    <table id="tb" cellpadding="0" cellspacing="0" border="0" class="table">
        <tr>
            <td class="tbpostheader" style="width: 30%">
                <%=GetText("箱子号") %>：
            </td>
            <td class="tbpost">
                <asp:TextBox ID="txtBoxSerialNo" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr class="tbpostheader">
            <td class="tbpostheader">
                <%=GetText("当前所在仓库") %>：
            </td>
            <td class="tbpost">

                <yee:UserWarehousesDropDownList ID="ddlWarehouse" runat="server" WarehouseType="海外仓储" OnSelectedIndexChanged="ddlWarehouse_SelectedIndexChanged" AutoPostBack="true">
                </yee:UserWarehousesDropDownList>
            </td>
        </tr>
        <tr class="tbpostheader">
            <td class="tbpostheader">
                <%=GetText("库区") %>：
            </td>
            <td class="tbpost">
                <asp:RadioButtonList ID="rblStorage" runat="server" RepeatDirection="Horizontal"></asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="tbfooter"></td>
            <td class="tbfooter">
                <yee:Button ID="btnCheck" CssClass="button" runat="server" OnClick="btnCheck_Click" />
            </td>
        </tr>
    </table>
    <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_ItemDataBound">
        <HeaderTemplate>
            <table cellpadding="0" cellspacing="0" border="0" class="table">
                <tr>
                    <td rowspan="2" class="tbheader center">
                        <%#GetText("库区") %>
                    </td>
                    <td rowspan="2" class="tbheader center">
                        <%#GetText("国际订单号") %>
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("外箱条码") %>
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("发货时间") %>
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("客户代号") %>
                    </td>
                    <td colspan="2" class="tbheader">
                        <%#GetText("重量") %>（KG）
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("长") %>(cm)
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("宽") %>(cm)
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("高") %>(cm)
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("海外体积") %>
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("类型") %>
                    </td>
                    <td rowspan="2" class="tbheader">
                        <%#GetText("备注") %>
                    </td>
                </tr>
                <tr>
                    <td class="tbheader" style="width: 50px;"><%#GetText("原重量") %></td>
                    <td class="tbheader" style="width: 50px;"><%#GetText("现重量") %></td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tbrow">
                <td class="tbpost">
                    <asp:Literal ID="litStorage" Text='<%#Eval("StorageCode") %>' runat="server"></asp:Literal>
                    <asp:HiddenField ID="hfStorageId" runat="server" Value='<%#Eval("StorageId") %>' />
                </td>
                <td class="tbpost center">
                    <asp:Literal ID="litCTWNo" Text='<%#Eval("CTWOrderNo") %>' runat="server"></asp:Literal>
                    <asp:HiddenField ID="hfWarehouseId" runat="server" Value='<%#Eval("WarehouseId") %>' />
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litBoxSerialNo" Text='<%#Eval("Serail") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litSendOn" Text='<%#Eval("CreatedOn") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litCustomerCode" Text='<%#Eval("CustomerCode") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litWeight" Text='<%#Eval("Weight") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtWeight" runat="server" Text='<%#Eval("Weight") %>' CssClass="input-small"></asp:TextBox>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litLength" Text='<%#Eval("BoxLong") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litWidth" Text='<%#Eval("BoxWidth") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litHeight" Text='<%#Eval("BoxHeight") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtAbroadVolume" runat="server" Text='<%#Eval("AbroadVolume","{0:F3}") %>'></asp:TextBox>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litType" Text='<%#Eval("CalculateBoxType") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtRemark" runat="server" Text='<%#Eval("Remark") %>' TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr class="tbrowalter">
                <td class="tbpost">
                    <asp:Literal ID="litStorage" Text='<%#Eval("StorageCode") %>' runat="server"></asp:Literal>
                    <asp:HiddenField ID="hfStorageId" runat="server" Value='<%#Eval("StorageId") %>' />
                </td>
                <td class="tbpost center">
                    <asp:Literal ID="litCTWNo" Text='<%#Eval("CTWOrderNo") %>' runat="server"></asp:Literal>
                    <asp:HiddenField ID="hfWarehouseId" runat="server" Value='<%#Eval("WarehouseId") %>' />
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litBoxSerialNo" Text='<%#Eval("Serail") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litSendOn" Text='<%#Eval("CreatedOn") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litCustomerCode" Text='<%#Eval("CustomerCode") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litWeight" Text='<%#Eval("Weight") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtWeight" runat="server" Text='<%#Eval("Weight") %>' CssClass="input-small"></asp:TextBox>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litLength" Text='<%#Eval("BoxLong") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litWidth" Text='<%#Eval("BoxWidth") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litHeight" Text='<%#Eval("BoxHeight") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtAbroadVolume" runat="server" Text='<%#Eval("AbroadVolume","{0:F3}") %>'></asp:TextBox>
                </td>
                <td class="tbpost">
                    <asp:Literal ID="litType" Text='<%#Eval("CalculateBoxType") %>' runat="server"></asp:Literal>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtRemark" runat="server" Text='<%#Eval("Remark") %>' TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <div id="express" runat="server">
        <asp:Button ID="btSaveInfo_Click" runat="server" CssClass="button" OnClick="btSaveInfo_Click_Click" />
    </div>
    <script language="javascript" type="text/javascript">

        var LODOP; //声明为全局变量
        function prn1_print(code, box) {

            if (needCLodop()) {

                window.On_CLodop_Opened = function () {

                    CreateOneFormPage(code, box);
                    window.On_CLodop_Opened = null;
                }

            }
            else {
                CreateOneFormPage(code, box);
            }

            //window.location.reload();
        };

        function CreateOneFormPage(code, box) {

            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));

            var fontSize = 58;
            if (code.length > 5) {
                fontSize = 45;
            }

            LODOP.PRINT_INITA(0, 0, 265, 189, "");
            LODOP.SET_PRINT_PAGESIZE(0, 700, 500, "A4");
            LODOP.ADD_PRINT_TEXT(72, -1, 270, 111, code);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "tahoma");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", fontSize);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(18, 7, 250, 51, box);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "Tahoma");
            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();
        };
        /*
         *在用热敏打印配送 一个箱子的配送单 70*50
         */
        function CreateDeliveryByCustomerNew2022(order_no, name, mobile, address, qcaddress, code, box, weight, size, storage) {

            if (needCLodop()) {
                window.On_CLodop_Opened = function () {

                    printDeliverSigleBox2022(order_no, name, mobile, address, qcaddress, code, box, weight, size, storage);
                    //LODOP.PRINT_DESIGN();
                    //LODOP.PRINT();
                    window.On_CLodop_Opened = null;

                }
            }
            else {
                printDeliverSigleBox2022(order_no, name, mobile, address, qcaddress, code, box, weight, size, storage);
            }

        };
        function printDeliverSigleBox2022(order_no, name, mobile, address, qcaddress, code, box, weight, size, storage) {
            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));

            LODOP.PRINT_INITA(0, 0, 262, 203, "");
            LODOP.SET_PRINT_PAGESIZE(0, 700, 500, "A4");
            LODOP.SET_PRINT_MODE("RESELECT_PRINTER", true);
            LODOP.ADD_PRINT_TEXT(84, 81, 129, 19, mobile);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(103, 9, 240, 36, "Address：" + address);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.ADD_PRINT_TEXT(65, 82, 130, 24, name);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);

            LODOP.ADD_PRINT_TEXT(148, 5, 95, 46, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 9);
            LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
            LODOP.ADD_PRINT_TEXT(66, 13, 68, 20, "Receiver：");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.ADD_PRINT_TEXT(84, 12, 67, 20, "Mobile：");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.ADD_PRINT_BARCODE(8, 156, 102, 47, "128Auto", order_no);
            LODOP.ADD_PRINT_TEXT(57, 7, 245, 9, "-----------------------------------------------");
            LODOP.ADD_PRINT_TEXT(139, 8, 238, 9, "----------------------------------------------------");
            LODOP.ADD_PRINT_LINE(53, 146, 9, 147, 0, 1);
            LODOP.ADD_PRINT_LINE(145, 111, 194, 112, 0, 1);
            LODOP.ADD_PRINT_TEXT(146, 117, 116, 19, code);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(162, 116, 110, 21, box);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(43, 17, 130, 20, "www.loda.com.kh");
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(177, 196, 52, 25, weight + "KG");
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(177, 114, 87, 20, size);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(64, 204, 48, 40, storage);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 23);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);

            LODOP.ADD_PRINT_IMAGE(10, 15, 115, 29, "<img border='0' src='https://img.loda.cc/upload/package/log.bmp'>");
            LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);

            LODOP.SET_PRINTER_INDEXA("outPrinterGK888t");
            LODOP.PRINT();
            //LODOP.PREVIEW();
        }
    </script>
</asp:Content>