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

<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>
            <a href="CollectBoxPrint.aspx">清除数据</a>
        </ShortCuts>
    </yee:PageTitle>

    <yee:MessageBox ID="msg" runat="server"></yee:MessageBox>

    <div class="query">
        <table cellpadding="0" cellspacing="0" style="width: 100%;" border="0" class="table">

            <tr>
                <td class="tbpostheader">
                    <%=GetText("仓储中心") %>：
                </td>
                <td class="tbpost">
                    <yee:UserWarehousesDropDownList ID="ddlWarehouse" runat="server" WarehouseType="海外仓储">
                    </yee:UserWarehousesDropDownList>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("集包号") %>：
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtSerialNo" runat="server" Width="200px" Height="30px" Font-Size="X-Large"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tbfooter"></td>
                <td class="tbfooter">
                    <yee:Button ID="btnQuery" runat="server" CssClass="button" OnClick="btnQuery_Click" Text="扫描流水" /></td>
            </tr>
        </table>
    </div>
    <div id="div_collect" runat="server">
        <table cellpadding="0" cellspacing="0" style="width: 100%;" border="0" class="table">

            <tr>
                <td class="tbpostheader">
                    <%=GetText("集包号") %>：
                </td>
                <td class="tbpost">
                    <asp:Label ID="labCollectSerialNo" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("配送单数") %>：
                </td>
                <td class="tbpost">
                    <asp:Label ID="labDevCount" runat="server"></asp:Label>
                </td>
            </tr>
            <tr class="tbpostheader">
                <td class="tbpostheader">
                    <%=GetText("标签格式") %>：
                </td>
                <td class="tbpost">
                    <asp:RadioButtonList ID="rblTypeId" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="2" Text="70*50" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="1" Text="100*60"></asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td class="tbfooter"></td>
                <td class="tbfooter">
                    <yee:Button ID="btnPrint" runat="server" CssClass="button" Text="打印" OnClick="btnPrint_Click" /></td>
            </tr>
        </table>
    </div>

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

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

        /*
       *在用热敏打印配送 一个箱子的配送单 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.PRINT_DESIGN();
        }

        function printDeliverSigleBox2021(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, 378, 227, "");
            LODOP.SET_PRINT_PAGESIZE(0, 1000, 600, "A4");
            LODOP.SET_PRINT_MODE("RESELECT_PRINTER", true);
            //LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='https://img.loda.cc/upload/package/log.bmp'>");
            //LODOP.SET_SHOW_MODE("BKIMG_LEFT", 8);
            //LODOP.SET_SHOW_MODE("BKIMG_TOP", 8);
            //LODOP.SET_SHOW_MODE("BKIMG_PRINT", true);
            LODOP.ADD_PRINT_TEXT(87, 81, 224, 19, mobile);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(107, 9, 360, 56, "Address：" + address);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.ADD_PRINT_TEXT(65, 82, 225, 24, name);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(12, 152, 107, 46, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
            LODOP.ADD_PRINT_TEXT(66, 13, 68, 20, "Receiver：");
            LODOP.ADD_PRINT_TEXT(87, 12, 67, 20, "Mobile：");
            LODOP.ADD_PRINT_BARCODE(9, 266, 102, 47, "128Auto", order_no);
            LODOP.ADD_PRINT_TEXT(57, 7, 365, 9, "------------------------------------------------------------");
            LODOP.ADD_PRINT_TEXT(161, 8, 359, 9, "------------------------------------------------------------");
            LODOP.ADD_PRINT_LINE(53, 146, 9, 147, 0, 1);
            LODOP.ADD_PRINT_LINE(171, 111, 220, 112, 0, 1);
            LODOP.ADD_PRINT_TEXT(171, 115, 116, 24, code);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);

            LODOP.ADD_PRINT_TEXT(197, 111, 125, 26, box);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_BARCODE(174, 9, 100, 50, "128Auto", order_no);
            LODOP.ADD_PRINT_TEXT(43, 16, 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_LINE(221, 234, 171, 235, 0, 1);
            LODOP.ADD_PRINT_TEXT(198, 238, 131, 25, weight + "KG");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(174, 239, 130, 25, size);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(67, 309, 62, 40, storage);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 26);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.ADD_PRINT_IMAGE(7, 15, 125, 32, "<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.PRINT_DESIGN();

        }
        /*
         *在用热敏打印配送 一个箱子的配送单 100*60
         */
        function CreateDeliveryByCustomerNew(order_no, name, mobile, address, qcaddress, code, box, weight, size, storage) {

            if (needCLodop()) {

                window.On_CLodop_Opened = function () {
                    printDeliverSigleBox2021(order_no, name, mobile, address, qcaddress, code, box, weight, size, storage);
                    window.On_CLodop_Opened = null;
                }

            }
            else {
                printDeliverSigleBox2021(order_no, name, mobile, address, qcaddress, code, box, weight, size, storage);
            }
            //LODOP.PRINT();
        };

        function print_orderno_no_2022(order_no, name, mobile, address, qcaddress, qty) {

            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));
            //配送明细
            LODOP.PRINT_INITA(0, 0, 378, 227, "");
            LODOP.SET_PRINT_PAGESIZE(0, 700, 500, "A4");
            LODOP.SET_PRINT_MODE("RESELECT_PRINTER", true);
            LODOP.ADD_PRINT_TEXT(87, 81, 153, 19, mobile);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(107, 9, 237, 40, "Address：" + address);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.ADD_PRINT_TEXT(65, 82, 156, 24, name);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(66, 13, 68, 20, "Receiver：");
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.ADD_PRINT_TEXT(87, 12, 67, 20, "Mobile：");
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.ADD_PRINT_BARCODE(5, 153, 102, 47, "128Auto", order_no);
            LODOP.ADD_PRINT_TEXT(57, 7, 239, 9, "------------------------------------------------------------");
            LODOP.ADD_PRINT_TEXT(145, 8, 235, 9, "------------------------------------------------------------");
            LODOP.ADD_PRINT_LINE(156, 111, 199, 112, 0, 1);

            LODOP.ADD_PRINT_TEXT(154, 120, 104, 41, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(43, 19, 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(152, 9, 97, 24, "Box Count");
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            //LODOP.ADD_PRINT_IMAGE(7, 15, 125, 32, "<img border='0' src='https://img.loda.cc/upload/package/log.bmp'>");
            LODOP.ADD_PRINT_IMAGE(9, 15, 120, 30, "<img border='0' src='https://img.loda.cc/upload/package/log.bmp'>");
            LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);
            LODOP.ADD_PRINT_TEXT(172, 9, 100, 20, qty);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);

            LODOP.SET_PRINTER_INDEXA("outPrinterGK888t");
            LODOP.PRINT();
            //LODOP.PRINT_DESIGN();
        }

        function print_box_noes_2022(code, mobile, boxes) {
            var arr = eval(boxes);
            var len = parseInt(arr.length);
            var htmlstr = "<table border=1 cellspacing=\"0\" cellpadding=\"0\" style=\"border - collapse: collapse;font-size:12px;text-align:center;width:75%;font-family:Arial,Verdana,Sans-serif;\" > ";
            //htmlstr += "<tr><td>Mobile</td><td  colspan=\"2\">" + mobile + "</td>";
            //htmlstr += "<tr><td>Code</td><td  colspan=\"2\">" + code + "</td>";
            for (var i = 0; i < len; i++) {

                htmlstr += "<tr><td style=\"height: 18px;\">" + arr[i].Code + "</td><td style=\"height: 18px;\">" + arr[i].BoxSerialNo + "</td><td style=\"height: 18px;\">" + arr[i].Weight + "</td>";

            }

            htmlstr += "</table>";

            //打印箱子明细
            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));
            LODOP.PRINT_INITA(0, 0, 313, 199, "");
            LODOP.SET_PRINT_PAGESIZE(0, 700, 500, "A4");
            LODOP.SET_PRINT_MODE("RESELECT_PRINTER", true);
            LODOP.ADD_PRINT_HTM(48, 6, 325, "69.447%", htmlstr);
            LODOP.ADD_PRINT_TEXT(9, 14, 119, 33, code);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(9, 117, 133, 31, mobile);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);

            LODOP.SET_PRINTER_INDEXA("outPrinterGK888t");
            LODOP.PRINT();
            //LODOP.PRINT_DESIGN();

        }

        /**
         * 在用 配送条码 （多个箱子 ） 70*50
         * @param order_no
         * @param name
         * @param mobile
         * @param address
         * @param qcaddress
         * @param qty
         */
        function PrintPeiSong2022(order_no, name, mobile, address, qcaddress, qty, code, boxes) {

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

                    //打印配送信息
                    print_orderno_no_2022(order_no, name, mobile, address, qcaddress, qty);

                    //打印箱子明细
                    print_box_noes_2022(code, mobile, boxes);
                    window.On_CLodop_Opened = null;

                }

            }
            else {
                //打印配送信息
                print_orderno_no_2022(order_no, name, mobile, address, qcaddress, qty);

                //打印箱子明细
                print_box_noes_2022(code, mobile, boxes);
            }

        };

        /**
         * 在用 配送条码 （多个箱子 ） 100*60
         * @param order_no
         * @param name
         * @param mobile
         * @param address
         * @param qcaddress
         * @param qty
         */
        function PrintPeiSong2021(order_no, name, mobile, address, qcaddress, qty, code, boxes) {

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

                    //打印配送信息
                    print_orderno_no_2021(order_no, name, mobile, address, qcaddress, qty);

                    //打印箱子明细
                    print_box_noes_2021(code, mobile, boxes);
                    window.On_CLodop_Opened = null;
                }

            }
            else {
                //打印配送信息
                print_orderno_no_2021(order_no, name, mobile, address, qcaddress, qty);

                //打印箱子明细
                print_box_noes_2021(code, mobile, boxes);
            }

        };

        function print_orderno_no_2021(order_no, name, mobile, address, qcaddress, qty) {

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

            LODOP.PRINT_INITA(0, 0, 378, 227, "");
            LODOP.SET_PRINT_PAGESIZE(0, 1000, 600, "A4");
            LODOP.SET_PRINT_MODE("RESELECT_PRINTER", true);
            LODOP.ADD_PRINT_TEXT(87, 81, 224, 19, mobile);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);

            LODOP.ADD_PRINT_TEXT(107, 9, 350, 56, "Address：" + address);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 8);
            LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
            LODOP.ADD_PRINT_TEXT(65, 82, 225, 24, name);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 13);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(66, 13, 68, 20, "Receiver：");
            LODOP.ADD_PRINT_TEXT(87, 12, 67, 20, "Mobile：");
            LODOP.ADD_PRINT_BARCODE(9, 266, 102, 47, "128Auto", order_no);
            LODOP.ADD_PRINT_TEXT(57, 7, 365, 9, "------------------------------------------------------------");
            LODOP.ADD_PRINT_TEXT(161, 8, 359, 9, "------------------------------------------------------------");
            //LODOP.ADD_PRINT_LINE(53, 146, 61, 147, 0, 1);
            LODOP.ADD_PRINT_LINE(171, 111, 220, 112, 0, 1);
            LODOP.ADD_PRINT_TEXT(173, 122, 105, 50, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontName", "等线");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
            LODOP.ADD_PRINT_BARCODE(174, 9, 100, 50, "128Auto", order_no);
            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_LINE(221, 234, 171, 235, 0, 1);
            LODOP.ADD_PRINT_TEXT(183, 238, 131, 40, "Box Count：" + qty);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_IMAGE(7, 15, 125, 32, "<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.PRINT_DESIGN();
        }

        function print_box_noes_2021(code, mobile, boxes) {
            var arr = eval(boxes);
            var len = parseInt(arr.length);
            var htmlstr = "<table border=1 cellspacing=\"0\" cellpadding=\"0\" style=\"border - collapse: collapse;font-size:12px;text-align:center;width:75%;\" > ";
            //htmlstr += "<tr><td>Mobile</td><td  colspan=\"2\">" + mobile + "</td>";
            //htmlstr += "<tr><td>Code</td><td  colspan=\"2\">" + code + "</td>";
            for (var i = 0; i < len; i++) {

                htmlstr += "<tr><td style=\"height: 18px;\">" + arr[i].Code + "</td><td style=\"height: 18px;\">" + arr[i].BoxSerialNo + "</td><td style=\"height: 18px;\">" + arr[i].Weight + "</td>";

            }

            htmlstr += "</table>";

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

            LODOP.PRINT_INITA(0, 0, 378, 227, "");
            LODOP.SET_PRINT_PAGESIZE(0, 1000, 600, "A4");
            LODOP.SET_PRINT_MODE("RESELECT_PRINTER", true);
            LODOP.ADD_PRINT_HTM(39, 30, 304, "80.264%", htmlstr);
            LODOP.ADD_PRINT_TEXT(7, 31, 143, 33, code);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 17);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(8, 172, 169, 31, mobile);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 17);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.SET_PRINTER_INDEXA("outPrinterGK888t");
            LODOP.PRINT();
            //LODOP.PRINT_DESIGN();
        }
    </script>
</asp:Content>