Index: ssts-web/src/main/webapp/disinfectsystem/config/dgsetyy/print/recyclingDetailPrintConfig.js =================================================================== diff -u -r31732 -r32040 --- ssts-web/src/main/webapp/disinfectsystem/config/dgsetyy/print/recyclingDetailPrintConfig.js (.../recyclingDetailPrintConfig.js) (revision 31732) +++ ssts-web/src/main/webapp/disinfectsystem/config/dgsetyy/print/recyclingDetailPrintConfig.js (.../recyclingDetailPrintConfig.js) (revision 32040) @@ -1,18 +1,23 @@ { - "headerContent" : //表格头定义 - [ - {"label" : "CSSD每日回收登记表", "dataIndex" : "", "fontSize" : 15, "position" : ["5","40%","99%",5]}, // 标题 - {"label" : "制单人:", "dataIndex" : "applicant", "fontSize" : 11, "position" : ["35","2%","90%",5]}, - {"label" : "开始时间:", "dataIndex" : "startTime", "fontSize" : 11, "position" : ["35","35%","90%",5]}, - {"label" : "结束时间:", "dataIndex" : "endTime", "fontSize" : 11, "position" : ["35","75%","90%",5]} + "headerContent" : [//表格头定义 + {"label" : "CSSD每日回收登记表", "dataIndex" : "", "fontSize" : 17, "position" : [5,300,"100%",5]}, // 标题 + {"label" : "制单人:", "dataIndex" : "applicant", "fontSize" : 11, "position" : [35,12,"100%",5]}, + {"label" : "开始时间:", "dataIndex" : "startTime", "fontSize" : 11, "position" : [35,162,"100%",5]}, + {"label" : "结束时间:", "dataIndex" : "endTime", "fontSize" : 11, "position" : [35,412,"100%",5]}, + {"label" : "打印时间:", "dataIndex" : "endTime", "fontSize" : 11, "position" : [35,662,"100%",5]} ], "tables": [ // 表格定义,数组类型,支持可以定义多个表格 { "tableName": "新院总部", "rowHeight" : 24, - "tableLayout": "noTousseColumns", + "tableLayout": "tousseNameAndAmountInSeperateColumns", + "tousseNameAndAmountInSeperateColumnsConfig": { // 物品名称和数量分开的表格的列的设置 + "textOfTousseNameColumn": "包名称", //物品名称列的标题 + "textOfTousseAmountColumn": "数量", //物品数量列的标题 + "amountOfTousseNameAndAmountColumnGroups": 1 //设置物品名称和数量列的数量,即一行显示几种物品 + }, "showDepartGroupColumn": true, "departGroups": [ { Index: ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js =================================================================== diff -u -r31433 -r32040 --- ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 31433) +++ ssts-web/src/main/webapp/disinfectsystem/packing/printRecyclingDetailWin.js (.../printRecyclingDetailWin.js) (revision 32040) @@ -7,6 +7,9 @@ ] }); +var tousseGroupItemArray = []; +var deptGroupItemArray = []; + var assetBelongStore = new Ext.data.SimpleStore({ fields : [ 'departId','name' ], data : [['01','供应室'],[ '02','手术室']] @@ -25,6 +28,34 @@ } } }); +function onAllChoosedOrNot(combo, record,index,nameOfFiled){ + var choose = record.get(combo.checkField); + var fristRecord = combo.store.getAt(0); + if(index != 0){ + if(!choose) { + fristRecord.set(combo.checkField, false); + combo.setValue(combo.getCheckedValue()); + }else{ + var isAllChoosed = true; + combo.store.each(function (thisRecord) + { + if(thisRecord.get(nameOfFiled) != ('全部') && !thisRecord.get(combo.checkField)){ + isAllChoosed = false; + } + }); + if(isAllChoosed){ + fristRecord.set(combo.checkField, true); + combo.setValue(combo.getCheckedValue()); + } + } + return; + } + if(choose){ + combo.selectAll(); + }else{ + combo.deselectAll(); + } +} supplyRoomStore.on('load', function(){ Ext.getCmp('depart').setValue(supplyRoomStore.getAt(0).data.departId); @@ -277,6 +308,131 @@ //获取开始时间、结束时间 var startDateTime = ""; var endDateTime = ""; + + /*************** DGSETYY-12 start *****************/ + //任务组数据源 + var taskGroupStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/taskGroupAction!loadTaskGroupStore.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + root : 'data', + totalProperty: 'totalCount' + },[ + {name : 'id',mapping : 'valueField'}, + {name : 'taskGroupName',mapping : 'displayField'} + ] + ) + }); + + //任务组 + var taskGroupItem = new Ext.form.MultiSelect({ + id : 'taskGroupName', + name : 'taskGroupName', + valueField : 'taskGroupName', + displayField : 'taskGroupName', + allowBlank : true, + editable : false, + fieldLabel:'任务分组', + triggerAction : 'all', + store : taskGroupStore, + anchor : '95%', + listeners : { + select : function(combo, record, index){ + onAllChoosedOrNot(combo, record,index,'taskGroupName'); + } + } + }) + + taskGroupStore.on('load', function () { + taskGroupItem.selectAll(); //全选 + }); + + //器械包分组数据源 + var tousseGroupStore = new Ext.data.JsonStore({ + url : WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', + fields : ['tousseGroupName','id'], + listeners : { + beforeload : function(_this, options) { + _this.baseParams.needAll = '是'; + } + } + }); + + //器械包分组 + var tousseGroupItem = new Ext.form.MultiSelect({ + id : 'tousseGroupName', + name : 'tousseGroupName', + valueField : 'id', + displayField : 'tousseGroupName', + allowBlank : true, + editable : false, + fieldLabel:'器械包分组', + listeners : { + select : function(combo, record, index){ + onAllChoosedOrNot(combo, record,index,'tousseGroupName'); + } + }, + triggerAction : 'all', + store : tousseGroupStore, + anchor : '95%' + }) + + tousseGroupStore.on('load', function (thiz, records, options) { + tousseGroupItem.selectAll(); //全选 + for(var i=1;i (48*3600*1000)){ - alert('开始时间、结束时间跨度不能超过两天!!'); - return ; + //alert('开始时间、结束时间跨度不能超过两天!!'); + //return ; } + //东莞市中医院定制开发 if(projectName == "dgszyy"){ Ext.Ajax.request({ url : WWWROOT + '/disinfectSystem/recyclingRecordAction!dongGuanZhongYiYuanProcess.do', params : { startDateTime : startDateTime, endDateTime : endDateTime, - handlerDepartCoding : handlerDepartCoding + handlerDepartCoding : handlerDepartCoding, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); @@ -469,7 +673,10 @@ params : { startDateTime : startDateTime, endDateTime : endDateTime, - handlerDepartCoding : handlerDepartCoding + handlerDepartCoding : handlerDepartCoding, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); @@ -491,7 +698,10 @@ params : { startDateTime : startDateTime, endDateTime : endDateTime, - handlerDepartCoding : handlerDepartCoding + handlerDepartCoding : handlerDepartCoding, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); @@ -515,7 +725,10 @@ params : { startDateTime : startDateTime, endDateTime : endDateTime, - handlerDepartCoding : handlerDepartCoding + handlerDepartCoding : handlerDepartCoding, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); @@ -537,7 +750,10 @@ params : { startDateTime : startDateTime, endDateTime : endDateTime, - handlerDepartCoding : handlerDepartCoding + handlerDepartCoding : handlerDepartCoding, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); @@ -559,7 +775,10 @@ params : { startDateTime : startDateTime, endDateTime : endDateTime, - departType : departName + departType : departName, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); @@ -579,12 +798,15 @@ params : { startDateTime : startDateTime, endDateTime : endDateTime, - handlerDepartCoding : handlerDepartCoding + handlerDepartCoding : handlerDepartCoding, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); if(obj.success){ - printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,obj.printUser,obj); + printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,obj,params); }else{ showResult(obj.message); } @@ -601,12 +823,15 @@ params : { startDateTime : startDateTime, endDateTime : endDateTime, - handlerDepartCoding : handlerDepartCoding + handlerDepartCoding : handlerDepartCoding, + taskGroups:taskGroups, + tousseGroupIds:tousseGroupIds, + recyDepartmentGroupDepartCodes:recyDepartmentGroupDepartCodes }, success : function(response, options) { var obj = JSON.parse(response.responseText); if(obj.success){ - printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,obj.printUser,obj); + printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,obj,params); }else{ showResult(obj.message); } @@ -630,6 +855,9 @@ var printParams = getPrintJsonParams("printRecyclingItems", '' , config); printParams.fromTime = startDateTime; printParams.toTime = endDateTime; + printParams.taskGroups = taskGroups; + printParams.tousseGroupIds = tousseGroupIds; + printParams.recyDepartmentGroupDepartCodes = recyDepartmentGroupDepartCodes; printParams.printScope.sortDisinfcetGoodsByDepartShift = config.sortDisinfcetGoodsByDepartShift; printParams.printScope.handlerDepartCoding = handlerDepartCoding; DWREngine.setAsync(false); @@ -889,7 +1117,7 @@ return false; } } -function printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,printUser,recyclingDetail){ +function printRecyclingDetailWithDepartgroup(printType,startDateTime,endDateTime,recyclingDetail,params){ var LODOP = getLodop(document.getElementById('LODOP'), document.getElementById('LODOP_EM')); var DONT_ENUM = "propertyIsEnumerable,isPrototypeOf,hasOwnProperty,toLocaleString,toString,valueOf,constructor".split(","), hasOwn = ({}).hasOwnProperty; @@ -913,31 +1141,43 @@ } return result; }; - - if(recyclingDetail.headerContent && recyclingDetail.headerContent.length > 0){ - var headerContent0 = recyclingDetail.headerContent[0]; + + var printUser = recyclingDetail.printUser || ''; + var printDate = recyclingDetail.printDate || ''; + var configTable = recyclingDetail['配置文件']; + if(configTable.headerContent && configTable.headerContent.length > 0){ + var headerContent0 = configTable.headerContent[0]; var position0 = headerContent0.position; - var headerContent1 = recyclingDetail.headerContent[1]; - var headerContent2 = recyclingDetail.headerContent[2]; - var headerContent3 = recyclingDetail.headerContent[3]; + var headerContent1 = configTable.headerContent[1]; + var headerContent2 = configTable.headerContent[2]; + var headerContent3 = configTable.headerContent[3]; + var headerContent4 = configTable.headerContent[4]; var position1 = headerContent1.position; var position2 = headerContent2.position; var position3 = headerContent3.position; + var position4 = headerContent4.position; LODOP.SET_PRINT_STYLE("FontSize",headerContent0.fontSize); LODOP.ADD_PRINT_TEXT(position0[0],position0[1],position0[2],position0[3],headerContent0.label); LODOP.SET_PRINT_STYLE("FontSize",headerContent1.fontSize); LODOP.ADD_PRINT_TEXT(position1[0],position1[1],position1[2],position1[3],headerContent1.label + ' ' + printUser); LODOP.ADD_PRINT_TEXT(position2[0],position2[1],position2[2],position2[3],headerContent2.label + ' ' + startDateTime); LODOP.ADD_PRINT_TEXT(position3[0],position3[1],position3[2],position3[3],headerContent3.label + ' ' + endDateTime); + LODOP.ADD_PRINT_TEXT(position4[0],position4[1],position4[2],position4[3],headerContent4.label + ' ' + printDate); }else { 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,12,"100%",5,"制单人: " + printUser); + LODOP.ADD_PRINT_TEXT(35,162,"100%",5,"开始时间:" + startDateTime); + LODOP.ADD_PRINT_TEXT(35,412,"100%",5,"结束时间: " + endDateTime); + LODOP.ADD_PRINT_TEXT(35,662,"100%",5,"打印时间: " + printDate); } - var configTable = recyclingDetail['配置文件']; + if(params){ + LODOP.SET_PRINT_STYLE("FontSize",11); + LODOP.ADD_PRINT_TEXT(55,12,"100%",5,"任务组: " + params.taskGroupNames); + LODOP.ADD_PRINT_TEXT(75,12,"100%",5,"器械包分组:" + params.tousseGroupNames); + LODOP.ADD_PRINT_TEXT(95,12,"100%",5,"回收科室分组: " + params.deptGroupNames); + } if(configTable){ var htmlTable = ""; for(var i=0;i 0){ + for(var z=0;z"+childItem+""; + } + for(var o=0;o"; + tbodyHtml += ""+resultAmount+""; + } + tbodyHtml += ""; + k++; + childItemIndex++; + parentItemIndex++; + } + } + } + } + htmlTable += ""; + if(table.showDepartGroupColumn == true){ + htmlTable += ""+item+""; + } + htmlTable += "科室"; + if(table.tousseNameAndAmountInSeperateColumnsConfig){ + var textOfTousseNameColumn = table.tousseNameAndAmountInSeperateColumnsConfig.textOfTousseNameColumn || '包名称'; + var textOfTousseAmountColumn = table.tousseNameAndAmountInSeperateColumnsConfig.textOfTousseAmountColumn || '数量'; + for(var z=0;z"; + htmlTable += ""+textOfTousseAmountColumn+""; + } + }else { + htmlTable += "包名称"; + htmlTable += "数量"; + } + htmlTable += ""; + htmlTable += tbodyHtml; + parentItemIndex++; + } + htmlTable += ""; + htmlTable += ''; + } + } } }else { var htmlTable =""; @@ -1057,8 +1370,12 @@ } } htmlContent = "" + htmlTable + ""; - LODOP.ADD_PRINT_HTM(55,5,"100%","100%",htmlContent); + LODOP.ADD_PRINT_HTM(115,5,"100%","100%",htmlContent); + LODOP.SET_PRINT_STYLE("ItemType",2); + LODOP.ADD_PRINT_TEXT(5,"90%","90%",5,"第#页/共&页"); + LODOP.SET_PRINT_STYLE("ItemType",0); + if(printType == 0){//直接打印 LODOP.PRINT(); }else{//打印预览 Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.jsp =================================================================== diff -u -r31793 -r32040 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.jsp (.../packingView.jsp) (revision 31793) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.jsp (.../packingView.jsp) (revision 32040) @@ -215,6 +215,10 @@ + + + +