/**打印*/ onPrint:function(){ var LODOP =_methods.getLodop(); if(LODOP){ LODOP.PRINT_INIT("常州市困難羣衆臨時生活救助申請審批表"); LODOP.SET_PRINT_PAGESIZE(1,0,0,"A4"); LODOP.SET_PRINT_STYLEA(1,"Horient",2); } $.post(_ctx + "/print/printpage" + _suffix,null,function(html){ LODOP.ADD_PRINT_HTM(15,0,"100%","100%",html); LODOP.SET_PREVIEW_WINDOW(1,1,0,0,0,"打印申請表"); LODOP.PREVIEW(); },"html") }, getLodop :function() { var _lodop = $("object[data-id=lodop]"); if (_lodop[0]) return _lodop[0]; var isIE = (navigator.userAgent.indexOf('MSIE') >= 0) || (navigator.userAgent.indexOf('Trident') >= 0); var is64IE = isIE && (navigator.userAgent.indexOf('x64') >= 0); _lodop = $("<object></object>").attr("data-id","lodop"); _lodop.width(20).height(0).attr("style", "position:absolute;left:0px;top:-100px;width:0px;height:0px;"); if (isIE){ _lodop.attr("classid", "clsid:2105C259-1E0C-4534-8141-A753534CB4CA"); }else{ _lodop.attr("type", "application/x-print-lodop"); } _lodop.prependTo("body"); var LODOP = _lodop[0]; var exe = is64IE ? "install_lodop64.exe" : "install_lodop32.exe"; var href = _ctx + "/js/lib/lodop/6.1.9.0/" + exe; var alertstr = "<font color='#FF00FF'>點擊這裏<a href='" + href + "' target='_self'>執行安裝</a>,安裝後請刷新頁面或從新進入。</font>"; if ((LODOP == null) || (typeof (LODOP.VERSION) == "undefined")) { $.messager.alert('提醒', "打印組件未安裝<br/>" + alertstr, 'warning'); return; } else if (LODOP.VERSION < "6.1.9.0") { $.messager.alert('提醒', "打印控件須要升級<br/>" + alertstr, 'info'); } return LODOP; }