Index: ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js =================================================================== diff -u -r32076 -r32079 --- ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 32076) +++ ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 32079) @@ -663,7 +663,7 @@ success : function(response, options) { var obj = JSON.parse(response.responseText); if(obj.success){ - dongGuangZhongYiYuanRecyclingDetailPrint(printType,startDateTime,endDateTime,obj.printUser,obj); + dongGuangZhongYiYuanRecyclingDetailPrint(printType,startDateTime,endDateTime,obj,params); }else{ showResult(obj.message); } @@ -688,7 +688,7 @@ success : function(response, options) { var obj = JSON.parse(response.responseText); if(obj.success){ - doPrintRecyclingDetailWithTousseAndOther(printType,startDateTime,endDateTime,obj.printUser,obj); + doPrintRecyclingDetailWithTousseAndOther(printType,startDateTime,endDateTime,obj,params); }else{ showResult(obj.message); } @@ -715,7 +715,7 @@ //对obj处理,将供应室器械表格(supplyRoomTousse)进行排序 obj.supplyRoomTousse = sortForsupplyRoomTousse(obj.supplyRoomTousse); if(obj.success){ - doPrintRecyclingDetailForGzzyyfy(printType,startDateTime,endDateTime,obj.printUser,obj); + doPrintRecyclingDetailForGzzyyfy(printType,startDateTime,endDateTime,obj,params); }else{ showResult(obj.message); } @@ -740,7 +740,7 @@ success : function(response, options) { var obj = JSON.parse(response.responseText); if(obj.success){ - doPrintRecyclingDetailForSzsskrmyy(printType,startDateTime,endDateTime,obj.printUser,obj); + doPrintRecyclingDetailForSzsskrmyy(printType,startDateTime,endDateTime,obj,params); }else{ showResult(obj.message); } @@ -765,7 +765,7 @@ success : function(response, options) { var obj = JSON.parse(response.responseText); if(obj.success){ - doPrintRecyclingDetailWithTousseAndOther_szszlyy(printType,startDateTime,endDateTime,obj.printUser,obj); + doPrintRecyclingDetailWithTousseAndOther_szszlyy(printType,startDateTime,endDateTime,obj,params); }else{ showResult(obj.message); } @@ -790,7 +790,7 @@ success : function(response, options) { var obj = JSON.parse(response.responseText); if(obj.success == true){ - lodopPrint(printType,startDateTime,endDateTime,obj.printUser,obj.data,obj.disinfectionGoods,obj.tableRowSize); + lodopPrint(printType,startDateTime,endDateTime,obj,params); } }, failure : function(response, options) { @@ -881,6 +881,7 @@ closable:false }); } + obj.params = params; print2(obj); if(printType == 0){//直接打印 LODOP.PRINT(); @@ -1391,19 +1392,30 @@ LODOP.PREVIEW(); } } -function dongGuangZhongYiYuanRecyclingDetailPrint(printType,startDateTime,endDateTime,printUser,recyclingDetail){ +function dongGuangZhongYiYuanRecyclingDetailPrint(printType,startDateTime,endDateTime,recyclingDetail,params){ + var printDate = recyclingDetail.printDate || ''; + var printUser = recyclingDetail.printUser || ''; 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.ADD_PRINT_TEXT(35,15,"100%",5,"制单人:" + printUser); + LODOP.ADD_PRINT_TEXT(35,130,"100%",5,"开始时间:" + startDateTime); + LODOP.ADD_PRINT_TEXT(35,350,"100%",5,"结束时间:" + endDateTime); + LODOP.ADD_PRINT_TEXT(35,570,"100%",5,"打印时间:" + printDate); // LODOP.SET_PRINT_STYLE("ItemType", 2); // LODOP.ADD_PRINT_TEXT(10,600,"95%",5,"第#页/共&页"); - - var htmlTable =""; + + var htmlTable = ""; + if(params){ + htmlTable += "
"; + htmlTable += "
任务组:"+ ' ' + params.taskGroupNames+"
"; + htmlTable += "
器械包分组:"+ ' ' + params.tousseGroupNames+"
"; + htmlTable += "
回收科室分组:"+ ' ' + params.deptGroupNames+"
"; + htmlTable += "
"; + } + htmlTable +="
"; //普通器械 htmlTable += "
"; htmlTable += buildTable(recyclingDetail,"普通器械列头",24); @@ -1449,19 +1461,29 @@ } } -function doPrintRecyclingDetailWithTousseAndOther(printType,startDateTime,endDateTime,printUser,recyclingDetail){ +function doPrintRecyclingDetailWithTousseAndOther(printType,startDateTime,endDateTime,recyclingDetail,params){ + var printDate = recyclingDetail.printDate || ''; + var printUser = recyclingDetail.printUser || ''; 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.ADD_PRINT_TEXT(35,15,"100%",5,"制单人:" + printUser); + LODOP.ADD_PRINT_TEXT(35,130,"100%",5,"开始时间:" + startDateTime); + LODOP.ADD_PRINT_TEXT(35,350,"100%",5,"结束时间:" + endDateTime); + LODOP.ADD_PRINT_TEXT(35,570,"100%",5,"打印时间:" + printDate); // LODOP.SET_PRINT_STYLE("ItemType", 2); // LODOP.ADD_PRINT_TEXT(10,600,"95%",5,"第#页/共&页"); - - var htmlTable =""; + var htmlTable = ""; + if(params){ + htmlTable += "
"; + htmlTable += "
任务组:"+ ' ' + params.taskGroupNames+"
"; + htmlTable += "
器械包分组:"+ ' ' + params.tousseGroupNames+"
"; + htmlTable += "
回收科室分组:"+ ' ' + params.deptGroupNames+"
"; + htmlTable += "
"; + } + htmlTable +="
"; //普通器械 htmlTable += "
"; htmlTable += buildTable(recyclingDetail,"普通器械列头",24); @@ -1488,16 +1510,24 @@ } //广州中医药附一打印回收清单 -function doPrintRecyclingDetailForGzzyyfy(printType,startDateTime,endDateTime,printUser,recyclingDetail){ +function doPrintRecyclingDetailForGzzyyfy(printType,startDateTime,endDateTime,recyclingDetail,params){ + var printDate = recyclingDetail.printDate || ''; var LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM')); LODOP.SET_PRINT_STYLE("FontSize",17); LODOP.ADD_PRINT_TEXT(5,300,"100%",5,"器械回收汇总"); LODOP.SET_PRINT_STYLE("FontSize",11); - LODOP.ADD_PRINT_TEXT(35,20,"100%",5,"开始时间:" + startDateTime); - LODOP.ADD_PRINT_TEXT(35,270,"100%",5,"结束时间:" + endDateTime); - LODOP.ADD_PRINT_TEXT(35,520,"100%",5,"打印时间:" + new Date().format('Y-m-d H:i:s')); - - var htmlTable =""; + LODOP.ADD_PRINT_TEXT(35,15,"100%",5,"开始时间:" + startDateTime); + LODOP.ADD_PRINT_TEXT(35,265,"100%",5,"结束时间:" + endDateTime); + LODOP.ADD_PRINT_TEXT(35,515,"100%",5,"打印时间:" + printDate); + var htmlTable = ""; + if(params){ + htmlTable += "
"; + htmlTable += "
任务组:"+ ' ' + params.taskGroupNames+"
"; + htmlTable += "
器械包分组:"+ ' ' + params.tousseGroupNames+"
"; + htmlTable += "
回收科室分组:"+ ' ' + params.deptGroupNames+"
"; + htmlTable += "
"; + } + htmlTable +="
"; //供应室器械包(一行抬头+一行数据) htmlTable += ""; if(recyclingDetail.supplyRoomTousse && recyclingDetail.supplyRoomTousse.length > 0){ @@ -1560,16 +1590,25 @@ } //深圳市蛇口人民医院打印回收清单 -function doPrintRecyclingDetailForSzsskrmyy(printType,startDateTime,endDateTime,printUser,recyclingDetail){ +function doPrintRecyclingDetailForSzsskrmyy(printType,startDateTime,endDateTime,recyclingDetail,params){ + var printDate = recyclingDetail.printDate || ''; var LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM')); LODOP.SET_PRINT_STYLE("FontSize",17); LODOP.ADD_PRINT_TEXT(5,300,"100%",5,"器械回收汇总"); LODOP.SET_PRINT_STYLE("FontSize",11); - LODOP.ADD_PRINT_TEXT(35,20,"100%",5,"开始时间:" + startDateTime); - LODOP.ADD_PRINT_TEXT(35,270,"100%",5,"结束时间:" + endDateTime); - LODOP.ADD_PRINT_TEXT(35,520,"100%",5,"打印时间:" + new Date().format('Y-m-d H:i:s')); - - var htmlTable ="
供应室器械
"; + LODOP.ADD_PRINT_TEXT(35,15,"100%",5,"开始时间:" + startDateTime); + LODOP.ADD_PRINT_TEXT(35,265,"100%",5,"结束时间:" + endDateTime); + LODOP.ADD_PRINT_TEXT(35,515,"100%",5,"打印时间:" + printDate); + + var htmlTable = ""; + if(params){ + htmlTable += "
"; + htmlTable += "
任务组:"+ ' ' + params.taskGroupNames+"
"; + htmlTable += "
器械包分组:"+ ' ' + params.tousseGroupNames+"
"; + htmlTable += "
回收科室分组:"+ ' ' + params.deptGroupNames+"
"; + htmlTable += "
"; + } + htmlTable +="
"; //各科室的器械包(一行抬头+多行数据(每个科室1行、需要遍历)) htmlTable += "" + "" + @@ -1598,19 +1637,30 @@ } } -function doPrintRecyclingDetailWithTousseAndOther_szszlyy(printType,startDateTime,endDateTime,printUser,recyclingDetail){ +function doPrintRecyclingDetailWithTousseAndOther_szszlyy(printType,startDateTime,endDateTime,recyclingDetail,params){ + var printDate = recyclingDetail.printDate || ''; + var printUser = recyclingDetail.printUser || ''; 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.ADD_PRINT_TEXT(35,15,"100%",5,"制单人:" + printUser); + LODOP.ADD_PRINT_TEXT(35,130,"100%",5,"开始时间:" + startDateTime); + LODOP.ADD_PRINT_TEXT(35,350,"100%",5,"结束时间:" + endDateTime); + LODOP.ADD_PRINT_TEXT(35,570,"100%",5,"打印时间:" + printDate); // LODOP.SET_PRINT_STYLE("ItemType", 2); // LODOP.ADD_PRINT_TEXT(10,600,"95%",5,"第#页/共&页"); + var htmlTable = ""; + if(params){ + htmlTable += "
"; + htmlTable += "
任务组:"+ ' ' + params.taskGroupNames+"
"; + htmlTable += "
器械包分组:"+ ' ' + params.tousseGroupNames+"
"; + htmlTable += "
回收科室分组:"+ ' ' + params.deptGroupNames+"
"; + htmlTable += "
"; + } - var htmlTable ="
科室
"; + htmlTable +="
"; //普通器械 htmlTable += "
"; htmlTable += buildTable(recyclingDetail,"普通器械列头",24); @@ -1634,16 +1684,30 @@ } } -function lodopPrint(printType,startDateTime,endDateTime,printUser,printDetail,disinfectionDetail,tableRowSize){ +function lodopPrint(printType,startDateTime,endDateTime,obj,params){ + var printUser = obj.printUser || ''; + var printDetail = obj.printDetail || []; + var disinfectionDetail = obj.disinfectionDetail || []; + var tableRowSize = obj.tableRowSize || 1; + 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); + + var htmlTable = ""; + if(params){ + htmlTable += "
"; + htmlTable += "
任务组:"+ ' ' + params.taskGroupNames+"
"; + htmlTable += "
器械包分组:"+ ' ' + params.tousseGroupNames+"
"; + htmlTable += "
回收科室分组:"+ ' ' + params.deptGroupNames+"
"; + htmlTable += "
"; + } - var htmlTable =""; + htmlTable +="
"; htmlTable += ""; var length = printDetail.length;