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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title><%=GetText("箱子列表") %> </title>
    <link href="../Scripts/bootstrap_3.3.7_css_bootstrap.min[1].css" rel="stylesheet" />
    <link href="../Scripts/bootstrap-select.min.css" rel="stylesheet" />

    <script src="../Scripts/jquery-3.3.1.min.js"></script>
    <script src="../Scripts/bootstrap_3.3.7_js_bootstrap.min.js"></script>
    <script src="../Scripts/bootstrap-select.min.js"></script>
    <script language="javascript" src="../lodop/LodopFuncs.js"></script>
    <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);
            });
        }

        function Invoices() {
            if (check_customer()) {

                var ids = "";
                var cb = $(".check:checked").each(function () {
                    ids += $(this).next().val() + ",";
                });
                location.href = "CustomerInvoices.aspx?ids=" + ids;
            }
            return false;
        }

        function PickUpGoods() {
            if (check_customer()) {

                var ids = "";
                var cb = $(".check:checked").each(function () {
                    ids += $(this).next().val() + ",";
                });
                location.href = "CustomerPickUpGoods.aspx?ids=" + ids;
            }
            return false;
        }

        function CustomerSelf() {
            if (check_customer()) {

                var ids = "";
                var cb = $(".check:checked").each(function () {
                    ids += $(this).next().val() + ",";

                });
                $("#iframeBox").dialog("open");
                $("#BoxIframe").attr("src", "CustomerTakedBySelf.aspx?ids=" + ids);
            }
            return false;
        }

        function delegate_express() {
            if (check_customer()) {

                var ids = "";
                var cb = $(".check:checked").each(function () {
                    ids += $(this).next().val() + ",";

                });
                $("#iframeEdit").dialog("open");
                $("#EditIframe").attr("src", "DelegateExpress.aspx?ids=" + ids);

            }
            return false;
        }

        //检查是否是同一个会员
        function check_customer() {
            var count = 0;
            var num = 0;
            var code = "";
            $(".check:checked").each(function () {
                count++;
                if (code == $(this).val()) {
                    num++;
                }
                code = $(this).val();
            });

            if (count == 0) {
                alert("请选择数据行");
                return false;
            }
            if (count - 1 != num) {
                alert("请选择同一个会员");
                return false;
            }
            return true;
        }

        $(function () {
            $("#iframeEdit").dialog({
                title: '<%=GetText("第三方快递") %>',
                autoOpen: false,
                resizable: false,
                //height: 600,
                width: $("#EditIframe").width() + 20,
                modal: true
            });
        });
        $(function () {
            $("#iframeBox").dialog({
                title: '<%=GetText("客户自提") %>',
                autoOpen: false,
                resizable: false,
                //height: 600,
                width: $("#BoxIframe").width() + 20,
                modal: true
            });
        });
    </script>
    <style type="text/css">
        .sml_input {
            width: 98px;
        }

        #EditIframe {
            width: 1200px;
            height: 400px;
        }

        #BoxIframe {
            width: 1200px;
            height: 400px;
        }

        .input-sm {
            width: 120px;
        }
         .red {
     background: #FFC0CB !important;
 }
        .ui-dialog-titlebar-close .ui-corner-all span {
            display: none;
        }
    </style>
     <script type="text/javascript">
         $(function () {

             $(".litIsPrint").each(function () {

                 var IsPrint = $(this).next().val()
                 //alert(IsPrint);
                 if (IsPrint =='True') {
                     $(this).parents("tr").find("td").addClass("red");
                 }
             })

         })
     </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">
        <ShortCuts>
             <a href="GetAbroadHasArriveAndNoTransferInfo.aspx" target="_blank" >已到货未中转箱子</a>
             <a href="GetAbroadHasTransferAndNoSignInfo.aspx" target="_blank" >已中转未签收箱子</a>
            <a href="GetAbroadTimeOutBoxRecord.aspx" target="_blank" >超时箱子统计</a>
            <asp:LinkButton ID="lbnStockBoxExcel" runat="server" Text='导出当前在库的箱子' OnClick="lbnStockBoxExcel_Click"></asp:LinkButton>
        </ShortCuts>
    </yee:PageTitle>
    <yee:MessageBox ID="msg" runat="server">
    </yee:MessageBox>

    <div class="query">
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
               <td>
                  <%=GetText("集包号") %>
              </td>
              <td>
                  <asp:TextBox ID="txtCollectSerialNo" runat="server" CssClass="sml_input"></asp:TextBox>
              </td>
                <td>
                    <%=GetText("国际订单号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtCTWOrderNo" runat="server" CssClass="sml_input"></asp:TextBox>
                </td>
                <td>
                    <%=GetText("状态") %>
                </td>
                <td>
                    <asp:DropDownList ID="ddlInStockStatu" runat="server">
                    </asp:DropDownList>
                </td>
                <td>
                    <%=GetText("仓储中心") %>
                </td>
                <td>
                    <asp:DropDownList ID="ddlWarehouse" runat="server" data-live-search="true" CssClass="selectpicker" OnSelectedIndexChanged="ddlWarehouse_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                </td>
                <td>
                    <%=GetText("库区") %>
                </td>
                <td colspan="3">
                    <asp:RadioButtonList ID="rblStorage" runat="server" RepeatDirection="Horizontal"></asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                 <td><%=GetText("快递单号") %>
                 </td>
                 <td>
                     <asp:TextBox ID="txtExpressNo" CssClass="sml_input" runat="server"></asp:TextBox>
                 </td>
                <td>
                    <%=GetText("箱子流水号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtSerialNo" runat="server" CssClass="sml_input"></asp:TextBox>
                </td>
                <td>
                    <%=GetText("客户代号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtCustomerCode" runat="server" CssClass="sml_input"></asp:TextBox>
                </td>
                <td>
                    <%=GetText("收费类型") %>
                </td>
                <td colspan="4">
                    <asp:RadioButtonList ID="rblPayFreightType" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="1" Text="全部" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="2" Text="二次收费"></asp:ListItem>
                        <asp:ListItem Value="3" Text="非二次收费"></asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>

                <td>
                    <%=GetText("会员订单号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtCustomerOrderNo" runat="server" CssClass="sml_input"></asp:TextBox>
                </td>
                <td>
                    <%=GetText("柜号") %>
                </td>
                <td>
                    <asp:TextBox ID="txtCabinetNo" CssClass="sml_input" runat="server"></asp:TextBox>
                </td>
                <td><%=GetText("是否扣费") %></td>

                <td colspan="2">
                    <asp:RadioButtonList ID="rblIsPay" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="1" Text="全部" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="2" Text="已扣"></asp:ListItem>
                        <asp:ListItem Value="3" Text="未扣"></asp:ListItem>
                    </asp:RadioButtonList>
                </td>
              
                <td>
                    <yee:Button ID="btnSearch" runat="server" CssClass="button" OnClick="btnSearch_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    <%=GetText("日期") %>
                </td>
                <td>
                    <yee:DatePicker ID="dpStartDate" runat="server" />
                    -
                    <yee:DatePicker ID="dpEndDate" runat="server" IsRequired="false" />
                </td>
                <td><%=GetText("日期类型") %></td>
                <td colspan="3">
                    <asp:RadioButtonList ID="rblDateType" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="1" Text="大陆出库" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="2" Text="海外签收"></asp:ListItem>
                        <asp:ListItem Value="3" Text="海外出库"></asp:ListItem>
                    </asp:RadioButtonList></td>

                <td>
                    <%=GetText("运输方式") %>
                </td>
                <td colspan="6">
                    <yee:DictionaryRadios ID="rblTypeId" runat="server" Dictionary="TransnationalFreightTypes" RepeatDirection="Horizontal" IsShowAllAtFirst="true" IsFirstSelected="true"></yee:DictionaryRadios>
                </td>
            </tr>
            <tr>

               
                <td>
                    <%=GetText("类型") %>
                </td>
                <td colspan="3">
                    <asp:RadioButtonList ID="ddlBoxType" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Value="0" Text="全部" Selected="True"></asp:ListItem>
                        <asp:ListItem Value="1" Text="网购"></asp:ListItem>
                        <asp:ListItem Value="2" Text="转运"></asp:ListItem>
                        <asp:ListItem Value="3" Text="末端"></asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td><%=GetText("分页") %></td>
                <td>
                    <asp:TextBox ID="txtPage" runat="server" Width="80px" ></asp:TextBox>    
                </td>
            </tr>
        </table>
    </div>
    <yee:TabControl ID="tabMenu" runat="server">
    </yee:TabControl>
    <yee:SortIndicator ID="ddlSort" runat="server" OnSortConditionsChanged="ddlSort_SortConditionsChanged" />

    <table cellpadding="0" cellspacing="0" border="0" class="table">
        <tr>
            <td class="tbheader" width="15px" rowspan="2">
                <input type="checkbox" id="checkboxAll" onclick="check_all_not()" />
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("库区") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("集包号") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("箱子流水号") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("国际订单号") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("会员订单号") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("状态") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("发往海外日期") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("出库日期") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("重量") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("体积") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("签收日期") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("目标仓") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("单据") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("收费") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("类型") %>
            </td>
            <td class="tbheader" colspan="2">
                <%=GetText("二次运费") %>
            </td>
            <td class="tbheader" rowspan="2">
                <%=GetText("操作") %>
            </td>
        </tr>
        <tr>
            <td class="tbheader">
                <%=GetText("国际") %>
            </td>
            <td class="tbheader">
                <%=GetText("海外") %>
            </td>
        </tr>
        <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand" OnItemDataBound="rptList_ItemDataBound">
            <HeaderTemplate>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="tbrow">
                    <td class="tbpost">
                        <input type="checkbox" runat="server" id="cbItem" class="check" value='<%# Eval("CustomerCode") %>' />
                        <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                         
                    </td>
                    <td class="tbpost">
                        <%# Eval("StorageCode")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CollectionNo")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Serail")%><asp:Label ID="labCode" runat="server"></asp:Label><br />
                        <%# Eval("CabinetNo")%> <br />
                        尺寸： <%# Eval("BoxLong")%>*<%# Eval("BoxWidth")%>*<%# Eval("BoxHeight")%>
                    </td>
                    <td class="tbpost">
                        <%#Eval("CTWOrderNo")%> <br />
                        <%#Eval("PickUpType")%>- <%#Eval("SourceType")%><br />
                        Pcs:<%#Eval("PackageCount")%>
                    </td>
                    <td class="tbpost">
                        <asp:HyperLink ID="hlkCustomerOrderNo" runat="server" Text='<%#Eval("OrderNo") %>'></asp:HyperLink>
                    </td>
                    <td class="tbpost">
                        <%#Eval("InStockStatus")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CreatedOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("StockOutOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Weight")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Size")%>
                    </td>

                    <td class="tbpost">
                        <%# Eval("ReceivedOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("TransferWarehouseName")%>
                    </td>
                    <td class="tbpost">
                        <asp:Literal ID="litIsInvoices" runat="server"></asp:Literal>
                    </td>
                    <td class="tbpost">
                        <asp:Literal ID="litIsFreight"   runat="server"></asp:Literal>
                        <asp:Label ID="litIsPrint" CssClass="litIsPrint" ClientIDMode="Static" runat="server" ></asp:Label>
                        <asp:HiddenField ID="hfIsBoxVolume" runat="server" Value='<%#Eval("IsBoxVolume") %>' ClientIDMode="Static" /> 
                    </td>
                    <td class="tbpost">
                        <asp:Literal ID="litType" runat="server" Text='<%#Eval("CalculateBoxType") %>'></asp:Literal>
                    </td>
                    <td class="tbpost">
                        <%#Eval("CN2THFreightAmount")%>
                    </td>
                    <td class="tbpost">
                        <%#Eval("TH2THFreightAmount")%>
                    </td>
                    <td class="tbpost">
                        <asp:LinkButton ID="lbnEdit" runat="server" CommandName="edit" CommandArgument='<%#Eval("UniqueId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnRePrice" runat="server" CommandName="reprice" CommandArgument='<%#Eval("UniqueId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnSendEmail" runat="server" CommandName="sendemail" CommandArgument='<%#Eval("BoxId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnCutFreight" runat="server" CommandName="freight" CommandArgument='<%#Eval("BoxId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnBoxInf" runat="server" CommandName="BoxInf" CommandArgument='<%#Eval("Serail") %>'></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="tbrowalter">
                    <td class="tbpost">
                        <input type="checkbox" runat="server" id="cbItem" class="check" value='<%# Eval("CustomerCode") %>' />
                        <asp:HiddenField ID="hfBoxId" runat="server" Value='<%#Eval("BoxId") %>' />
                         
                    </td>
                    <td class="tbpost">
                        <%# Eval("StorageCode")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CollectionNo")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Serail")%><asp:Label ID="labCode" runat="server"></asp:Label><br />
                        <%# Eval("CabinetNo")%> <br />
                        尺寸： <%# Eval("BoxLong")%>*<%# Eval("BoxWidth")%>*<%# Eval("BoxHeight")%>
                    </td>
                    <td class="tbpost">
                       <%#Eval("CTWOrderNo")%> <br />
                        <%#Eval("PickUpType")%>- <%#Eval("SourceType")%><br />
                       Pcs:<%#Eval("PackageCount")%>
                    </td>
                    <td class="tbpost">
                        <asp:HyperLink ID="hlkCustomerOrderNo" runat="server" Text='<%#Eval("OrderNo") %>'></asp:HyperLink>
                    </td>
                    <td class="tbpost">
                        <%#Eval("InStockStatus")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CreatedOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("StockOutOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Weight")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Size")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("ReceivedOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("TransferWarehouseName")%>
                    </td>
                    <td class="tbpost">
                        <asp:Literal ID="litIsInvoices" runat="server"></asp:Literal>
                    </td>
                    <td class="tbpost">
                        <asp:Literal ID="litIsFreight" runat="server"></asp:Literal>
                        <asp:Label ID="litIsPrint" CssClass="litIsPrint" ClientIDMode="Static" runat="server" ></asp:Label>
                        <asp:HiddenField ID="hfIsBoxVolume" runat="server" Value='<%#Eval("IsBoxVolume") %>' ClientIDMode="Static" /> 
                        </td>
                    <td class="tbpost">
                        <asp:Literal ID="litType" runat="server" Text='<%#Eval("CalculateBoxType") %>'></asp:Literal>
                    </td>
                    <td class="tbpost">
                        <%#Eval("CN2THFreightAmount")%>
                    </td>
                    <td class="tbpost">
                        <%#Eval("TH2THFreightAmount")%>
                    </td>
                    <td class="tbpost">
                        <asp:LinkButton ID="lbnEdit" runat="server" CommandName="edit" CommandArgument='<%#Eval("UniqueId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnRePrice" runat="server" CommandName="reprice" CommandArgument='<%#Eval("UniqueId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnSendEmail" runat="server" CommandName="sendemail" CommandArgument='<%#Eval("BoxId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnCutFreight" runat="server" CommandName="freight" CommandArgument='<%#Eval("BoxId") %>'></asp:LinkButton>
                        <asp:LinkButton ID="lbnBoxInf" runat="server" CommandName="BoxInf" CommandArgument='<%#Eval("Serail") %>'></asp:LinkButton>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:Repeater>
        <tr>
            <td class="tbfooter" colspan="14">
                <asp:Button ID="btCustomerSelf" runat="server" CssClass="button" OnClientClick="return CustomerSelf()" Visible="false"
                    OnClick="btCustomerSelf_Click" />
                <asp:Button ID="btDelegateExpress" runat="server" OnClientClick="return delegate_express()"
                    CssClass="button" />
                <asp:Button ID="btPickUpGoods" runat="server" OnClientClick="return PickUpGoods()" Visible="false"
                    CssClass="button" Text="" />
                <asp:Button ID="btInvoices" runat="server" OnClientClick="return Invoices()"
                    CssClass="button" Text="" />
                <asp:Button ID="btnCheckBox" runat="server" Visible="false"
                    CssClass="button" Text="" />
            </td>
        </tr>
    </table>
    <yee:Pager ID="Pager1" runat="server" PageSize="20" PagerType="1" OnPageIndex_Changed="Pager1_PageIndex_Changed"
        PageIndex="0" />
    <div id="iframeEdit" class="iframeEdit">
        <iframe id="EditIframe" frameborder="0" class="EditIframe"></iframe>
    </div>
    <div id="iframeBox" class="iframeBox">
        <iframe id="BoxIframe" frameborder="0" class="BoxIframe"></iframe>
    </div>

    <div>
    </div>

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

        var LODOP; //声明为全局变量
        function prn1_preview() {

            CreateOneFormPage();
            LODOP.PRINT_DESIGN();

        };
        function prn2_preview() {
            var count = 0;
            $(".check:checked").each(function () {
                count++;

            });
            if (count == 0) {
                alert('<%=GetText("请选择数据行") %>');
                return false;
            }

            var ids = "";
            var cb = $(".check:checked").each(function () {
                ids += $(this).next().val() + ",";

            });
            $.post("../Ajax/AjaxPage.aspx", { boxIds: ids }, function (result) {
                CreateNormalFormPageNew(result);
                LODOP.PREVIEW();
                //LODOP.PRINT_DESIGN();
            });

        };
        function CreateOneFormPage() {
            LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM'));
            LODOP.PRINT_INITA("打印发货单");
            LODOP.SET_PRINT_PAGESIZE(2, "100mm", "150mm", null);
            LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED", 1);

            LODOP.ADD_PRINT_IMAGE(25, 0, "512mm", "345mm", "<img border='0' src='../App_Themes/Default/stock.jpg?v=1'>");
            LODOP.ADD_PRINT_TEXT(179, 66, 131, 25, "客户代号1");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(177, 269, 224, 25, "收货人");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(218, 83, 131, 25, "会员订单");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(218, 270, 225, 25, "地区");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(266, 55, 440, 52, "收货地址");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(335, 57, 439, 27, "电话");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);

            LODOP.ADD_PRINT_IMAGE(25, 560, "512mm", "345mm", "<img border='0' src='../App_Themes/Default/stock.jpg?v=1'>");
            LODOP.ADD_PRINT_TEXT(179, 621, 131, 25, "客户代号2");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(177, 836, 224, 25, "收货人");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(218, 642, 131, 25, "会员订单");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(218, 835, 225, 25, "地区");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(264, 617, 440, 52, "收货地址");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(333, 614, 439, 27, "电话");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);

            LODOP.ADD_PRINT_IMAGE(400, 0, "512mm", "345mm", "<img border='0' src='../App_Themes/Default/stock.jpg?v=1'>");
            LODOP.ADD_PRINT_TEXT(553, 66, 131, 25, "客户代号3");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(551, 267, 224, 25, "收货人");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(594, 83, 131, 25, "会员订单");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(594, 270, 225, 25, "地区");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(644, 56, 444, 52, "收货地址");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(710, 53, 450, 27, "电话");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);

            LODOP.ADD_PRINT_IMAGE(400, 560, "512mm", "345mm", "<img border='0' src='../App_Themes/Default/stock.jpg?v=1'>");
            LODOP.ADD_PRINT_TEXT(553, 621, 131, 25, "客户代号4");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(551, 831, 224, 25, "收货人");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(594, 646, 131, 25, "会员订单");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(594, 834, 220, 25, "地区");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
            LODOP.SET_PRINT_STYLEA(0, "FontColor", "#FF0000");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(644, 615, 441, 52, "收货地址");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.ADD_PRINT_TEXT(710, 611, 450, 27, "电话");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINTER_INDEXA("outPrinterAB58GK");

        };
        function CreateNormalFormPage(data) {

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

            var arr = eval(data);
            var len = parseInt(arr.length);

            var htmlstr = "<table border=\"1\" width=\"700mm\"><tr><td width=\"100mm\">客户代号</td><td width=\"100mm\">箱子流水号</td><td width=\"100mm\">箱子重量</td><td width=\"100mm\">箱子体积</td><td width=\"100mm\"> 国际运费</td><td width=\"100mm\">海外运费</td></tr>";
            for (var i = 0; i < len; i++) {
                htmlstr += "<tr><td>" + arr[i].CustomerCode + "</td><td>" + arr[i].BoxSerialNo + "</td><td>" + arr[i].BoxAbroadWeight + "</td><td>" + arr[i].BoxAbroadVolume + "</td><td>" + arr[i].CN2THFreight + "</td><td>" + arr[i].TH2THFreight + "</td></tr>";

            }
            htmlstr += "</table>";

            var strStyle = "<style> table,td,th {border:solid 1px black;border-collapse: collapse} table{width:100%}</style>"

            LODOP.PRINT_INITA(0, 0, 945, 401, "打印控件");
            LODOP.SET_PRINT_PAGESIZE(1, 2800, 1080, "");
            LODOP.ADD_PRINT_TABLE(67, "4.254%", "92%", 280, strStyle + htmlstr);
            LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
            LODOP.SET_PRINT_STYLEA(0, "TableHeightScope", 1);
            LODOP.ADD_PRINT_TABLE(20, "4.995%", "92%", 150, "LODA提货单");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.SET_PRINT_STYLEA(0, "LinkedItem", 1);
            LODOP.ADD_PRINT_TEXT("88.279%", 512, 135, 20, "第#页/共&页");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
            LODOP.SET_PRINT_STYLEA(0, "Horient", 1);
            LODOP.ADD_PRINT_TEXT(12, 94, 592, 50, "LODA提货单");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 21);
            LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
            LODOP.SET_PRINTER_INDEXA("outPrinterAB58GK");

        };

        function CreateNormalFormPageNew(data) {

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

            var arr = eval(data);
            var len = parseInt(arr.length);

            var htmlstr = "<table border=\"1\" width=\"700mm\"> <tr><td width=\"4%\">NO</td><td width=\"5%\">BoxNo</td><td width=\"5%\">Qty</td><td width=\"8%\">Inter Freight</td><td width=\"8%\"> Local Freight</td><td width=\"8%\">Insureance Freight</td><td width=\"5%\">Others</td><td width=\"8%\">Total Freight</td><td width=\"5%\">Remark</td></tr>";
            for (var i = 0; i < len; i++) {
                htmlstr += "<tr><td>" + (i + 1) + "</td><td>" + arr[i].BoxSerialNo + "</td><td>" + arr[i].BoxAbroadWeight + "</td><td>" + arr[i].BoxAbroadVolume + "</td><td>" + arr[i].CN2THFreight + "</td><td>" + arr[i].TH2THFreight + "</td><td>" + arr[i].BoxAbroadVolume + "</td><td>" + arr[i].CN2THFreight + "</td><td></td></tr>";

            }
            htmlstr += "</table>";

            var strStyle = "<style> table,td,th {border:solid 1px black;border-collapse: collapse;text-align:center} table{}</style>"

            LODOP.PRINT_INITA(0, 0, 816, 354, "打印控件");
            LODOP.SET_PRINT_PAGESIZE(1, 2100, 980, "");
            LODOP.ADD_PRINT_TEXT(4, 38, 223, 25, "Easy Fortune(Cambodia) Co.1td");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(49, 274, 107, 30, "Invoice");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 17);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(52, 645, 100, 20, "第#页/共&页");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 2);
            LODOP.ADD_PRINT_TEXT(72, 629, 123, 20, "No: 2015110100001");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(92, 628, 128, 20, "Date: 15/11/2015");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(286, 39, 366, 25, "Note：Guests with e-mail notification, payment to the Treasury, then with delivery to the warehouse delivery code");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(315, 38, 343, 20, "First：Financial ; Second：Delivery ; Third：Customer");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TABLE("28.58mm", 36, "190.95mm", 176, strStyle + htmlstr);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 4);
            LODOP.ADD_PRINT_TEXT(93, 38, 141, 20, "Customer：KH160001");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(93, 415, 105, 20, "Currency:USD");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(25, 38, 476, 20, "#E05,Street Emerald,Sangkat Tom Nop Teuk,Khan Chamkar Mon, Phnom Penh");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(43, 38, 105, 20, "Tel: 023 213 997");
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(57, 37, 178, 20, "Email:server@kh-mall.com");
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
            LODOP.ADD_PRINT_TEXT(289, 480, 180, 30, "Total Freight:36000");
            LODOP.SET_PRINT_STYLEA(0, "FontSize", 10);
            LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
            LODOP.SET_PRINT_STYLEA(0, "PageIndex", "last");
            LODOP.SET_PRINTER_INDEXA("outPrinterAB58GK");

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