Index: ssts-web/src/main/webapp/disinfectsystem/print/LodopFuncs.js =================================================================== diff -u -r25143 -r28309 --- ssts-web/src/main/webapp/disinfectsystem/print/LodopFuncs.js (.../LodopFuncs.js) (revision 25143) +++ ssts-web/src/main/webapp/disinfectsystem/print/LodopFuncs.js (.../LodopFuncs.js) (revision 28309) @@ -60,7 +60,6 @@ //====获取LODOP对象的主过程:==== function getLodop(oOBJECT, oEMBED) { - var strHtmInstall = "
lodop32_V6.175.exe打印控件未安装!点击这里执行安装,安装后请刷新页面或重新进入。"; var strHtmUpdate = "
lodop32_V6.175.exe打印控件需要升级!点击这里执行升级,升级后请重新进入。"; var strHtm64_Install = "
lodop64_V6.175.exe打印控件未安装!点击这里执行安装,安装后请刷新页面或重新进入。"; @@ -80,60 +79,61 @@ LODOP = getCLodop(); } catch (err) {} if (!LODOP && document.readyState !== "complete") { - alert("网页还没下载完毕,请稍等一下再操作."); return; } if (!LODOP) { throw strCLodopInstall_1 + strCLodopInstall_3 ; -// document.documentElement.innerHTML = strCLodopInstall_1 + (CLodopIsLocal ? strCLodopInstall_2 : "") + strCLodopInstall_3 + document.documentElement.innerHTML; -// return; } else { if (CLODOP.CVERSION < "3.0.6.0") { throw strCLodopUpdate; -// document.body.innerHTML = strCLodopUpdate + document.body.innerHTML; } - if (oEMBED && oEMBED.parentNode) - oEMBED.parentNode.removeChild(oEMBED); - if (oOBJECT && oOBJECT.parentNode) - oOBJECT.parentNode.removeChild(oOBJECT); + if (oEMBED && oEMBED.parentNode){ + oEMBED.parentNode.removeChild(oEMBED); + } + if (oOBJECT && oOBJECT.parentNode){ + oOBJECT.parentNode.removeChild(oOBJECT); + } + alert('标签模板设计器在该浏览器下只能查看,不支持进行设计,请使用IE浏览器进行模板设计!'); } } else { var is64IE = isIE && !!(ua.match(/x64/i)); //=====如果页面有Lodop就直接使用,没有则新建:========== if (oOBJECT || oEMBED) { - if (isIE) - LODOP = oOBJECT; - else - LODOP = oEMBED; + if (isIE){ + LODOP = oOBJECT; + } else { + LODOP = oEMBED; + } } else if (!CreatedOKLodop7766) { LODOP = document.createElement("object"); LODOP.setAttribute("width", 0); LODOP.setAttribute("height", 0); LODOP.setAttribute("style", "position:absolute;left:0px;top:-100px;width:0px;height:0px;"); - if (isIE) - LODOP.setAttribute("classid", "clsid:2105C259-1E0C-4534-8141-A753534CB4CA"); - else - LODOP.setAttribute("type", "application/x-print-lodop"); + if (isIE){ + LODOP.setAttribute("classid", "clsid:2105C259-1E0C-4534-8141-A753534CB4CA"); + }else { + LODOP.setAttribute("type", "application/x-print-lodop"); + } document.documentElement.appendChild(LODOP); CreatedOKLodop7766 = LODOP; - } else - LODOP = CreatedOKLodop7766; + } else { + LODOP = CreatedOKLodop7766; + } //=====Lodop插件未安装时提示下载地址:========== if ((!LODOP) || (!LODOP.VERSION)) { - if (ua.indexOf('Chrome') >= 0) -// document.body.innerHTML = strHtmChrome + document.body.innerHTML; - throw strHtmChrome; - if (ua.indexOf('Firefox') >= 0) - throw (is64IE ? strHtm64_Install : strHtmInstall); + if (ua.indexOf('Chrome') >= 0){ + throw strHtmChrome; + } + if (ua.indexOf('Firefox') >= 0){ + throw (is64IE ? strHtm64_Install : strHtmInstall); + } throw (is64IE ? strHtm64_Install : strHtmInstall); -// document.body.innerHTML = strHtmFireFox + document.body.innerHTML; -// document.body.innerHTML = (is64IE ? strHtm64_Install : strHtmInstall) + document.body.innerHTML; -// return LODOP; } } if (LODOP.VERSION < "6.0.3.0") { - if (!needCLodop()) - throw (is64IE ? strHtm64_Update : strHtmUpdate); + if (!needCLodop()){ + throw (is64IE ? strHtm64_Update : strHtmUpdate); + } // document.body.innerHTML = (is64IE ? strHtm64_Update : strHtmUpdate) + document.body.innerHTML; // return LODOP; } Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r28275 -r28309 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 28275) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 28309) @@ -2498,7 +2498,7 @@ return; } var paperType = idCardInstance.idCardPaperType; - idCardInstance.name = idCardInstance.tousseDefinition.name; + //idCardInstance.name = idCardInstance.tousseDefinition.name; if(isTemplatePageType(paperType)){ if(invokeTemplatePrintFunction(paperType,idCardInstance)){ return; @@ -2507,8 +2507,6 @@ doGetLodop(); LODOP.PRINT_INIT(""); if(isUndefinedOrNullOrEmpty(idCardInstance.configKey)){ - - formTypeOfPrinted = "idCardLargeLabel"; if(paperType == "大标签"){ formTypeOfPrinted = "idCardLargeLabel"; @@ -2527,9 +2525,6 @@ } var configObj = printConfig[idCardInstance.configKey]; if(isUndefinedOrNullOrEmpty(configObj)){ -// var msg = '未找到('+idCardInstance.configKey+')的打印配置!'; -// alert(msg); -// return; configObj = idCardLargeLabelConfig_default; } setPrinterByConfig();