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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <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>
    <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="ptTitle" runat="server" Title="拣货单详情">
        <ShortCuts>
            <a href="PickingHandOversList.aspx">返回拣货单列表</a>
        </ShortCuts>
    </yee:PageTitle>
    <yee:MessageBox ID="msg" runat="server">
    </yee:MessageBox>
    <div class="query">
        <table cellpadding="0" cellspacing="0" border="0" class="table">
            <tr>
                <td class="tbpostheader">
                    <%=GetText("仓库") %>
                </td>
                <td class="tbpost">
                    <yee:UserWarehousesDropDownList runat="server" WarehouseType="海外仓储" ID="ddlWare"></yee:UserWarehousesDropDownList>
                </td>
            </tr>

            <tr>
                <td class="tbpostheader">
                    <%=GetText("配送单") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtOrderNo" runat="server" Font-Size="XX-Large"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader"></td>
                <td class="tbpost">
                    <asp:Button ID="btnPickingHand" runat="server" CssClass="button" OnClick="btnPickingHand_Click" Text="扫描配送单" />
                    <asp:Literal ID="litPickMsg" runat="server"></asp:Literal>
                </td>
            </tr>
            <tr>
                <td class="tbpostheader">
                    <%=GetText("备注") %>
                </td>
                <td class="tbpost">
                    <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Width="100px" Height="50px"></asp:TextBox>
                    <yee:Button ID="btnSaveRemark" runat="server" Text="保存" OnClick="btnSaveRemark_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div>
        标签格式：
        <asp:RadioButtonList ID="rblTypeId" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Value="1" Text="100*60" Selected="True"></asp:ListItem>
            <asp:ListItem Value="2" Text="70*50"></asp:ListItem>
        </asp:RadioButtonList>
    </div>
    <div>

        <%--<asp:Button ID="btnSure" runat="server" CssClass="button" Text="旧版配送确认交接" OnClick="btnSure_Click" />--%>
        <asp:Button ID="btnSureNew" runat="server" CssClass="button" Text="新版配送确认交接" OnClick="btnSureNew_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnExport" runat="server" CssClass="button" OnClick="btnExport_Click" Text="导出Excel" />
        <asp:Button ID="btnPrint" runat="server" CssClass="button" OnClick="btnPrint_Click" Text="小票打印拣货单" />
        <asp:Button ID="btnPrintOrderNo" runat="server" CssClass="button" Text="打印拣货单条码" OnClick="btnPrintOrderNo_Click" />
        <asp:Button ID="btnReMinPrint" runat="server" CssClass="button" OnClick="btnReMinPrint_Click" Text="热敏打印配送单" />
    </div>
    <div>
        <br />
        <asp:DropDownList ID="ddlDistrict" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlDistrict_SelectedIndexChanged"></asp:DropDownList>
        <asp:Button ID="btnCreateOrder" runat="server" CssClass="button" Text="生成新的拣货单" OnClick="btnCreateOrder_Click" />
    </div>

    <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_ItemDataBound" OnItemCommand="rptList_ItemCommand">
        <HeaderTemplate>
            <table cellpadding="0" class="table" cellspacing="0" border="0">
                <tr>
                    <td class="tbheader">
                        <input type="checkbox" id="checkboxAll" onclick="check_all_not()" /></td>
                    <td class="tbheader" width="50px">
                        <%=GetText("序号") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("配送单号") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("城市") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("状态") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("拣货时间") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("拣货员") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("装车时间") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("装车员") %>
                    </td>
                    <td class="tbheader" width="200px">
                        <%=GetText("操作") %>
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tbrow">
                <td class="tbpost">
                    <input id="cb" type="checkbox" class="check" runat="server" value='<%#Eval("TransnationalId") %>' />
                </td>
                <td class="tbpost">
                    <%#Eval("number") %>
                </td>
                <td class="tbpost">
                    <%#Eval("OrderNo") %>
                </td>
                <td class="tbpost">
                    <%#Eval("CityName") %>
                </td>
                <td class="tbpost">
                    <%#Eval("StatuName") %>
                </td>
                <td class="tbpost">
                    <%#Eval("OperationTime") %>
                </td>
                <td class="tbpost">
                    <%#Eval("OperationByName") %>
                </td>
                <td class="tbpost">
                    <%#Eval("CardTime") %>
                </td>
                <td class="tbpost">
                    <%#Eval("CardByName") %>
                </td>
                <td class="tbpost">
                    <asp:LinkButton ID="lbnDetail" runat="server" CommandArgument='<%#Eval("TransnationalId") %>' CommandName="detail" Text="配送详情"></asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>

        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <asp:HiddenField ID="hfDistrictName" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hfTotalCount" runat="server" ClientIDMode="Static" />

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

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

        //拣货单打印
        function prn_print_order(userid, username, id) {

            $.get("../Ajax/PickingOrderPrintDetail.ashx", { id: id, userid: userid, username: username }, function (data) {

                print_picking_order(data);
                //LODOP.PRINT_DESIGN();
                //LODOP.PREVIEW();
            });

        };
        function print_picking_order(data) {

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

            var handOrder = eval(data);

            var districtName = $("#hfDistrictName").val();
            var serialNo = handOrder.OrderNo;//拣货单号

            var record = eval(handOrder.OrderList);//配送单列表

            var reLen = parseInt(record.length);
            var customer = "";
            var htmlstr = "<table style=\"font-size:12px;font-family:SimSun;text-align:center;font-weight:100\"  >";
            var index = 1;

            for (var i = 0; i < reLen; i++) {

                var orderNo = record[i].OrderNo;

                var code = record[i].CustomerCode;
                var isDisCode = "1";
                if (customer != "") {
                    if (customer == code) {
                        //同一个客户的单
                        isDisCode = "0";
                    }
                }
                if (isDisCode == "1") {
                    if (customer != "") {
                        htmlstr += "<tr ><td >-----------------</td></tr>";
                    }
                    htmlstr += "<tr><td  style=\"font - size: 15px; font - weight: 600\">" + code + "</td></tr>";//显示客户代号
                }
                customer = code;
                htmlstr += "<tr style=\"border: 1;\"><td >No." + index + "&nbsp;&nbsp;" + orderNo + "</td></tr>";

                //判断当前配送单有多少箱子号
                var arr = eval(record[i].List);

                var len = parseInt(arr.length);

                for (var j = 0; j < len; j++) {
                    htmlstr += "<tr><td >" + arr[j].Serail + "&nbsp;&nbsp;" + arr[j].StorageCode + "</td></tr>";
                    htmlstr += "<tr><td >" + arr[j].PostalCode + "&nbsp;/&nbsp;" + arr[j].AbroadWeight + "kg</td></tr>";
                }
                index = index + 1;
                htmlstr += "<tr ><td ></td></tr>";
                htmlstr += "<tr ><td ></td></tr>";
            }

            htmlstr += "</table>";

            LODOP.PRINT_INITA(0, 0, 197, 495, "");
            LODOP.SET_PRINT_PAGESIZE(3, 520, 0, "CreateCustomPage");
            LODOP.ADD_PRINT_HTM("36.14mm", "18.325%", "55.01mm", "1014.364%", htmlstr);
            LODOP.ADD_PRINT_BARCODE(71, 44, 138, 63, "128Auto", serialNo);
            LODOP.ADD_PRINT_TEXT(7, 25, 166, 30, "Picking Order");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(38, 47, 100, 30, districtName);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINTER_INDEXA("outPrinterAB58GK");
            //LODOP.PREVIEW();
            //LODOP.PRINT();
            LODOP.PRINT_DESIGN();
        };
        /** 拣货单号条码小票打印
         */
        function print_picking_order_no_new(serialNo, number, qcaddress) {
            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));

            LODOP.PRINT_INITA(0, 0, 197, 235, "");
            LODOP.SET_PRINT_PAGESIZE(3, 520, 0, "CreateCustomPage");
            LODOP.ADD_PRINT_BARCODE(51, 44, 138, 74, "128Auto", serialNo);
            LODOP.ADD_PRINT_TEXT(7, 25, 166, 30, "Picking Order");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(136, 36, 136, 35, number + " pcs");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 17);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(178, 9, 176, 49, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 11);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINTER_INDEXA("outPrinterAB58GK");
            LODOP.PRINT();
        };
        /** 拣货单号条码100*60 热敏打印
         */
        function print_picking_order_no(serialNo, number, qcaddress, type_id) {

            if (needCLodop()) {
                window.On_CLodop_Opened = function () {
                    if (type_id == "1") {
                        print_picking_order_no_100_60(serialNo, number, qcaddress);
                    }
                    else {
                        print_picking_order_no_70_50(serialNo, number, qcaddress);
                    }
                    window.On_CLodop_Opened = null;
                }

            }
            else {
                if (type_id == "1") {
                    print_picking_order_no_100_60(serialNo, number, qcaddress);
                }
                else {
                    print_picking_order_no_70_50(serialNo, number, qcaddress);
                }
            }

        };

        function print_picking_order_no_100_60(serialNo, number, qcaddress) {
            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.ADD_PRINT_BARCODE(52, 135, 108, 74, "128Auto", serialNo);
            LODOP.ADD_PRINT_TEXT(7, 20, 347, 40, "Picking Order");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 16);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(136, 21, 343, 34, number + " pcs");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 22);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(175, 21, 342, 48, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 16);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINTER_INDEXA("outPrinterGK888t");
            LODOP.PRINT();
        };

        function print_picking_order_no_70_50(serialNo, number, qcaddress) {
            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));

            LODOP.PRINT_INITA(0, 0, 378, 227, "");
            LODOP.SET_PRINT_PAGESIZE(0, 700, 50, "A4");
            LODOP.ADD_PRINT_BARCODE(52, 135, 108, 74, "128Auto", serialNo);
            LODOP.ADD_PRINT_TEXT(7, 20, 347, 40, "Picking Order");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 16);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(136, 21, 343, 34, number + " pcs");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 22);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(175, 21, 342, 48, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 16);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINTER_INDEXA("outPrinterGK888t");
            LODOP.PRINT();
        };
        //拣货单打印 100*60
        function print_2020(userid, username, id) {

            $.get("../Ajax/PickingOrderListPrint.ashx", { id: id, userid: userid, username: username }, function (data) {

                var handOrder = eval(data);

                var record = eval(handOrder.OrderList);//配送单列表

                var reLen = parseInt(record.length);

                print_2020_detail(reLen, record);

            });
        };

        function print_2020_detail(reLen, record) {
            if (needCLodop()) {

                window.On_CLodop_Opened = function () {

                    for (var i = 0; i < reLen; i++) {

                        var order_no = record[i].OrderNo;
                        var mobile = record[i].Mobile;
                        var address = record[i].Address;
                        var qcaddress = record[i].QcAddress;
                        var name = record[i].Receiver;
                        var box = record[i].BoxSerialNo;
                        var code = record[i].CustomerCode;
                        var weight = record[i].Weight;
                        var size = record[i].Size;
                        var storage = record[i].Storage;

                        print_pick_order_detail_2020(order_no, code, name, mobile, address, qcaddress, box, weight, size, storage);

                    }

                    window.On_CLodop_Opened = null;
                }

            }
            else {

                for (var i = 0; i < reLen; i++) {

                    var order_no = record[i].OrderNo;
                    var mobile = record[i].Mobile;
                    var address = record[i].Address;
                    var qcaddress = record[i].QcAddress;
                    var name = record[i].Receiver;
                    var box = record[i].BoxSerialNo;
                    var code = record[i].CustomerCode;
                    var weight = record[i].Weight;
                    var size = record[i].Size;
                    var storage = record[i].Storage;

                    print_pick_order_detail_2020(order_no, code, name, mobile, address, qcaddress, box, weight, size, storage);

                }
            }
        }

        //拣货单打印 70*50
        function print_2022(userid, username, id) {

            $.get("../Ajax/PickingOrderListPrint.ashx", { id: id, userid: userid, username: username }, function (data) {

                var handOrder = eval(data);

                var record = eval(handOrder.OrderList);//配送单列表

                var reLen = parseInt(record.length);

                print_2022_detail(reLen, record);

            });
        };

        function print_2022_detail(reLen, record) {
            if (needCLodop()) {

                window.On_CLodop_Opened = function () {

                    for (var i = 0; i < reLen; i++) {

                        var order_no = record[i].OrderNo;
                        var mobile = record[i].Mobile;
                        var address = record[i].Address;
                        var qcaddress = record[i].QcAddress;
                        var name = record[i].Receiver;
                        var box = record[i].BoxSerialNo;
                        var code = record[i].CustomerCode;
                        var weight = record[i].Weight;
                        var size = record[i].Size;
                        var storage = record[i].Storage;

                        print_pick_order_detail_2022(order_no, code, name, mobile, address, qcaddress, box, weight, size, storage);

                    }

                    window.On_CLodop_Opened = null;
                }

            } else {

                for (var i = 0; i < reLen; i++) {

                    var order_no = record[i].OrderNo;
                    var mobile = record[i].Mobile;
                    var address = record[i].Address;
                    var qcaddress = record[i].QcAddress;
                    var name = record[i].Receiver;
                    var box = record[i].BoxSerialNo;
                    var code = record[i].CustomerCode;
                    var weight = record[i].Weight;
                    var size = record[i].Size;
                    var storage = record[i].Storage;

                    print_pick_order_detail_2022(order_no, code, name, mobile, address, qcaddress, box, weight, size, storage);

                }
            }
        }
        function print_pick_order_detail_2020(order_no, code, name, mobile, address, qcaddress, 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, 365, 56, "Address：" + address);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            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(7, 149, 113, 51, qcaddress);
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 14);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            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, 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, 116, 115, 26, box);
            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, 12, 130, 20, "www.loda.com.kh");
            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.PREVIEW();
        }

        /**
         * 70*50 配送单
         * @param order_no
         * @param code
         * @param name
         * @param mobile
         * @param address
         * @param qcaddress
         * @param box
         * @param weight
         * @param size
         * @param storage
         */
        function print_pick_order_detail_2022(order_no, code, name, mobile, address, qcaddress, 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();
        }
    </script>
</asp:Content>