Index: ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js =================================================================== diff -u -r19642 -r21986 --- ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 19642) +++ ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 21986) @@ -210,6 +210,28 @@ showResult(result.cause); } }); + }else if(sstsConfig.printRecyclingDetailWithDepartGroup){ + //按科室分组打印回收清单 + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/recyclingRecordAction!printRecyclingDetailWithDepartmentGroup.do', + params : { + startDateTime : startDateTime, + endDateTime : endDateTime, + handlerDepartCoding : handlerDepartCoding + }, + success : function(response, options) { + var obj = JSON.parse(response.responseText); + if(obj.success){ + printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,obj.printUser,obj); + }else{ + showResult(obj.message); + } + }, + failure : function(response, options) { + var result = Ext.decode(response.responseText); + showResult(result.cause); + } + }); } // 根据项目的JSON配置进行打印 else { @@ -447,6 +469,42 @@ return ""; } +function printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,printUser,recyclingDetail){ + var LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM')); + LODOP.SET_PRINT_STYLE("FontSize",17); + LODOP.ADD_PRINT_TEXT(5,300,"100%",5,"CSSD每日回收登记表"); + LODOP.SET_PRINT_STYLE("FontSize",11); + LODOP.ADD_PRINT_TEXT(35,50,"100%",5,"制单人: " + printUser); + LODOP.ADD_PRINT_TEXT(35,200,"100%",5,"开始时间:" + startDateTime); + LODOP.ADD_PRINT_TEXT(35,450,"100%",5,"结束时间: " + endDateTime); + +// LODOP.SET_PRINT_STYLE("ItemType", 2); +// LODOP.ADD_PRINT_TEXT(10,600,"95%",5,"第#页/共&页"); + + var htmlTable =""; + var departmentGroupNames = recyclingDetail.departmentGroupNames + for(var i = 0; i < departmentGroupNames.length;++i){ + //分院 + htmlTable += ""; + } + //备注 +// htmlTable += ""; + + + htmlContent = "" + htmlTable + ""; + LODOP.ADD_PRINT_HTM(55,5,"100%","100%",htmlContent); + + if(printType == 0){//直接打印 + LODOP.PRINT(); + }else{//打印预览 + LODOP.SET_SHOW_MODE("HIDE_PAPER_BOARD",1); + LODOP.PREVIEW(); + } +} function dongGuangZhongYiYuanRecyclingDetailPrint(printType,startDateTime,endDateTime,printUser,recyclingDetail){ var LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM')); LODOP.SET_PRINT_STYLE("FontSize",17);
"; + htmlTable += buildDepartTable(recyclingDetail,departmentGroupNames[i]); + htmlTable += "
"; +// htmlTable += buildRemarkTable(recyclingDetail.remarks,"备注"); +// htmlTable += "