Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressRecycleForTouchScreen.jsp =================================================================== diff -u -r15539 -r15694 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressRecycleForTouchScreen.jsp (.../expressRecycleForTouchScreen.jsp) (revision 15539) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressRecycleForTouchScreen.jsp (.../expressRecycleForTouchScreen.jsp) (revision 15694) @@ -1,3 +1,6 @@ +<%@page import="java.util.List"%> +<%@page import="com.forgon.disinfectsystem.entity.recycledepartmentgroup.DepartmentGroup"%> +<%@page import="com.forgon.disinfectsystem.basedatamanager.departmentgroup.service.DepartmentGroupManager"%> <%@page import="com.forgon.disinfectsystem.basedatamanager.supplyroomconfig.service.SupplyRoomConfigManager"%> <%@page import="com.forgon.disinfectsystem.entity.recyclingerror.RecyclingError"%> <%@page import="com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseInstance"%> @@ -29,7 +32,7 @@ - + @@ -52,6 +55,15 @@ text-shadow: 0px 0px 0 #fff; } + + @@ -66,11 +78,16 @@ request.setAttribute("today", dateFormat.format(new Date())); request.setAttribute("orgUnitCoding",orgUnitCoding); request.setAttribute("orgUnitName",orgUnitName); + + DepartmentGroupManager departmentGroupManager = (DepartmentGroupManager)SpringBeanManger.getBean("departmentGroupManager"); + List groups = departmentGroupManager.getAllGroups(); + request.setAttribute("departmentGroups", groups); + %> - + @@ -112,6 +129,18 @@
+ + +
+ 按科室分组过滤 + +
+ @@ -219,6 +248,44 @@ //动态加载JS和CSS document.write(''); + +function isShowTousseItem(groupId,departGroupIds){ + //加载全部 + if(groupId == ""){ + return true; + }else{ + if(departGroupIds != ""){ + var departGroupArray = departGroupIds.split(";"); + var isShow = false; + for(var j = 0 ;j < departGroupArray.length ; j++){ + if(departGroupArray[j] == groupId){ + isShow = true; + } + } + if(isShow){ + return true; + }else{ + return false; + } + }else{ + return false; + } + } +} + +function filterApplication(){ + var groupId = $("#inputselect").val(); + $('#tousseItemTable').children().first().children().each(function(i,element){ + var departGroupIds = $('#departGroupId'+i).val(); + var isShow = isShowTousseItem(groupId,departGroupIds); + if(isShow){ + $('#tousseItemsTr' + i).show(); + }else{ + $('#tousseItemsTr' + i).hide(); + } + }); +} + function showMessage(message){ if(document.getElementById('messageDiv') == null || !$('#messageDiv').dialog('isOpen')){ $("
"+message+"
").dialog({ @@ -720,7 +787,7 @@ }); } -function addToussItem(row,tousseItemId,tousseName,applicationAmount,recycleAmount,loadedAmount,isApplyEntireTousse,isCleanedEntirely,tousseType,isThereIdentificationCard,depart,applicationId,tousseDefinitionID){ +function addToussItem(row,tousseItemId,tousseName,applicationAmount,recycleAmount,loadedAmount,isApplyEntireTousse,isCleanedEntirely,tousseType,isThereIdentificationCard,depart,applicationId,tousseDefinitionID,departGroupId){ var showTousseName = tousseName; var _index = tousseName.indexOf('_'); if (_index >= 0){ @@ -743,6 +810,7 @@ var trElement = $(''+ ''+ ''+ + ''+ ''+ ''+ ''+ @@ -762,6 +830,13 @@ '入筐'+ ''); $("#tousseItemTable").append(trElement); + + var groupId = $("#inputselect").val(); + var isShow = isShowTousseItem(groupId,departGroupId); + if(!isShow){ + $('#tousseItemsTr' + row).hide(); + } + return true; } @@ -1015,7 +1090,12 @@ } } +function init(){ + $.divselect("#divselect","#inputselect"); +} + function loadItem() { + $("#tousseItemTable").empty(); $("#basketsUl").empty(); document.onkeydown = showKeyDown; @@ -1033,7 +1113,7 @@ addToussItem(i, '', msg[i].tousseName, msg[i].amount, recycleAmount, '',msg[i].isApplyEntireTousse, msg[i].isCleanedEntirely, msg[i].tousseType, '否', msg[i].depart, - msg[i].applicationId,msg[i].tousseDefinitionID); + msg[i].applicationId,msg[i].tousseDefinitionID,msg[i].departGroupId); } }, error : function() {