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

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <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">
        <ShortCuts>
            <a href="javascript:PreviousPage()" title="返回中转扫描页面">返回</a>
        </ShortCuts>
    </yee:PageTitle>
    <div>
        <asp:Button ID="btnPrintMergeNO" runat="server" CssClass="button"  OnClick="btnPrintMergeNO_Click" />
        <!-- <a href="javascript:loda_preview()" id="A1" runat="server" clientidmode="Static"><%=GetText("打印预览") %></a> -->
    </div>
    <yee:MessageBox ID="msg" runat="server">
    </yee:MessageBox>
   
<div>
    <asp:Repeater ID="rptCollect" runat="server" >
        <HeaderTemplate>
            <table cellpadding="0" class="table" cellspacing="0" border="0">
                <tr>   
                    <td class="tbheader">
                        <%=GetText("和包号") %>
                    </td>
                    <td class="tbheader">
                        <%=GetText("明细流水号") %>
                    </td>
                    <td class="tbheader">
                        <%=GetText("明细来源") %>
                    </td>
                     <td class="tbheader">
                        <%=GetText("操作时间") %>
                    </td>
                     <td class="tbheader">
                         <%=GetText("操作人") %>
                   </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tbrow">
                <td class="tbpost">
                    <%#Eval("MergeNO") %>
                </td>  
                <td class="tbpost">
                    <%#Eval("SerialNO") %>
                </td>
                <td class="tbpost">
                    <%#Eval("SerialType") %>
                </td>
                <td class="tbpost">
                    <%#Eval("CreatedByName") %>
                </td>
                <td class="tbpost">
                    <%#Eval("CreatedOn") %>
                </td>
            </tr>
        </ItemTemplate>

        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
</div>

<asp:HiddenField ID="hfMergeNO" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfWarehouseTel" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfWareKnName" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfWareGroup" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfRecordId" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="hfNum" runat="server" ClientIDMode="Static" />
<script language="javascript" type="text/javascript">

    function PreviousPage() {
        //window.history.back();
        // 
        //window.location.href = "TransferLoadCar.aspx?id=" + $("#hfRecordId").val();
        window.location.href = "TransferSign.aspx";
    };

    var LODOP; //声明为全局变量
    
     function loda_preview() {
        PrintMergeNOLabel('Merge2503060003',  '金边东站');
     };
    
    
    // 和包号标签打印
    function PrintMergeNOLabel(mergeno, warehouseTel,wareKnName,wareGroup,num,operationName) {

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

         if (needCLodop()) {
             //C-Lodop----begin----
             window.On_CLodop_Opened = function () {
                 PrintMergeNOLabelNew(mergeno, warehouseTel,wareKnName,wareGroup,num,operationName);
                 window.On_CLodop_Opened = null;
             };
             //C-Lodop----end----
         } else {
             window.onload = function () { 
                PrintMergeNOLabelNew(mergeno, warehouseTel,wareKnName,wareGroup,num,operationName);
             }; //使用lodop控件时的调用
         }
   };

    function PrintMergeNOLabelNew(mergeno,warehouseTel,wareKnName,wareGroup,num,operationName){
         
         LODOP.PRINT_INITA(0,1,265,189,"");
         LODOP.SET_PRINT_PAGESIZE(0,700,500,"");
         LODOP.SET_PRINT_MODE("RESELECT_PRINTER",true);
         
         LODOP.ADD_PRINT_TEXT(114,2,255,35,wareKnName); //站点名称(柬文)
         LODOP.SET_PRINT_STYLEA(0,"FontName","等线");
         LODOP.SET_PRINT_STYLEA(0,"FontSize",20);
         LODOP.SET_PRINT_STYLEA(0,"Bold",1);
         
         LODOP.ADD_PRINT_BARCODE(9,103,165,52,"128Auto",mergeno);// 和包号
         
         LODOP.ADD_PRINT_TEXT(16,42,62,35,num);// 和包数量
         LODOP.SET_PRINT_STYLEA(0,"FontName","等线");
         LODOP.SET_PRINT_STYLEA(0,"FontSize",18);
         LODOP.SET_PRINT_STYLEA(0,"Bold",1);
         
         LODOP.ADD_PRINT_TEXT(18,2,51,35,"Pcs:"); // 单位
         LODOP.SET_PRINT_STYLEA(0,"FontName","等线");
         LODOP.SET_PRINT_STYLEA(0,"FontSize",15);
         LODOP.SET_PRINT_STYLEA(0,"Bold",1);
         LODOP.ADD_PRINT_SHAPE(4,66,5,247,45,0,1,"#000000");
         
         LODOP.ADD_PRINT_TEXT(69,2,261,41,wareGroup); // 仓库Code 
         LODOP.SET_PRINT_STYLEA(0,"FontName","等线");
         LODOP.SET_PRINT_STYLEA(0,"FontSize",26);
         LODOP.SET_PRINT_STYLEA(0,"FontColor","#FFFFFF");
         LODOP.SET_PRINT_STYLEA(0,"Alignment",2);
         LODOP.SET_PRINT_STYLEA(0,"Bold",1);
         
         LODOP.ADD_PRINT_TEXT(150,0,210,40,warehouseTel); //站点电话
         LODOP.SET_PRINT_STYLEA(0,"FontName","等线");
         LODOP.SET_PRINT_STYLEA(0,"FontSize",20);
         LODOP.SET_PRINT_STYLEA(0,"Bold",1);
         
         LODOP.ADD_PRINT_TEXT(164,192,100,20,operationName); //操作账户名称
         LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
         LODOP.SET_PRINT_STYLEA(0,"Bold",1);

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


</script>

</asp:Content>