Index: ssts-web/src/main/webapp/disinfectsystem/print/print.js =================================================================== diff -u -r27672 -r28275 --- ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 27672) +++ ssts-web/src/main/webapp/disinfectsystem/print/print.js (.../print.js) (revision 28275) @@ -1155,7 +1155,6 @@ tableHtml += ""; LODOP.ADD_PRINT_HTM(0,0,"100%","100%",""+tableHtml+""); LODOP.SET_PRINT_MODE("PRINT_PAGE_PERCENT","Full-Page"); - }; // 直接打印 @@ -1175,7 +1174,7 @@ var t = getTemplateByDatasourceAndStyle(obj.dataSourceName, obj.styleName); if(t){ var pageType = t.fullName; - if(invokeTemplatePrintFunction(pageType,obj)){ + if(invokeTemplatePrintFunction(pageType,obj,t)){ return; } }else{ @@ -1565,11 +1564,7 @@ LODOP.SET_PRINT_STYLE('FontSize', 6); LODOP.SET_PRINT_STYLE('NotOnlyHighPrecision', true); - var fontSize = getFontSizeByStr(obj.name,[ - {maxLen:10,fontSize:10}, - {maxLen:20,fontSize:6}, - {maxLen:1000,fontSize:4} - ]); + var fontSize = getFontSizeByStr(obj.name,[{maxLen:10,fontSize:10},{maxLen:20,fontSize:6},{maxLen:1000,fontSize:4}]); LODOP.ADD_PRINT_TEXT("1mm","0mm","RightMargin:0mm","5mm", obj.name); setFontSizeBold(fontSize,1);// 设置字体 setAlignment('center');// 对齐 @@ -2593,7 +2588,7 @@ } } -function buildTousseDefinitionMeterialTable(tousseDefinition,unit){ +function buildTousseDefinitionMeterialTable(tousseDefinition,unit,idCardPaperType,description){ if(isUndefinedOrNullOrEmpty(tousseDefinition)){ alert('包定义不能为空!'); return null; @@ -2691,6 +2686,13 @@ tableHtml += ""; } + + if(idCardPaperType == '大标签'){ + //打印备注 + tableHtml += ""; + tableHtml += ""+description+""; + tableHtml += ""; + } tableHtml += ""; @@ -2711,8 +2713,9 @@ var date = idCardInstance.printDate; var userName = idCardInstance.userName; var unit = idCardInstance.unit; - - var ret = buildTousseDefinitionMeterialTable(idCardInstance.tousseDefinition,unit); + var description = idCardInstance.description; + var idCardPaperType = idCardInstance.idCardPaperType; + var ret = buildTousseDefinitionMeterialTable(idCardInstance.tousseDefinition,unit,idCardPaperType,description); var tableHtml = ret.tableHtml + ""; //条码,打印人和时间和器械数量 if(barcode != '' && userName != '' && date != ''){ @@ -3839,24 +3842,29 @@ if(templateConfig != null){ var width = templateConfig.width; var height = templateConfig.height; - alert(width+','+height) if(!isUndefinedOrNullOrEmpty(width) && !isUndefinedOrNullOrEmpty(height)){ doGetLodop(); -// LODOP.SET_PRINT_PAGESIZE(1,width,height,""); LODOP.SET_PRINT_PAGESIZE(1,"80mm","60mm",""); } } } -function invokeTemplatePrintFunction(pageType,obj){ +function invokeTemplatePrintFunction(pageType,obj,labelTemplate){ var funName = getTemplatePrintFunName(pageType); if(funName != null && !isUndefinedOrNull(window[funName])){ - logPrintTousse(obj,obj.barcode); doGetLodop(); -// alert(window[funName]) window[funName](obj); intrinsicDeletingFunctions(obj); setPrinterByConfigName(pageType); + + if(labelTemplate){ + if(labelTemplate.paperType == '连续纸张'){ + LODOP.SET_PRINT_PAGESIZE(3,labelTemplate.width,labelTemplate.height,''); + }else { + LODOP.SET_PRINT_PAGESIZE(1,labelTemplate.width,labelTemplate.height,''); + } + } + if(obj._printType){ switch(obj._printType){ case'preview':