Index: ssts-web/src/main/webapp/homepage/supplyRoomUnfinishedWork.jsp =================================================================== diff -u -r16764 -r27802 --- ssts-web/src/main/webapp/homepage/supplyRoomUnfinishedWork.jsp (.../supplyRoomUnfinishedWork.jsp) (revision 16764) +++ ssts-web/src/main/webapp/homepage/supplyRoomUnfinishedWork.jsp (.../supplyRoomUnfinishedWork.jsp) (revision 27802) @@ -49,8 +49,18 @@ + + + 消毒供应中心未完成工作列表 Index: ssts-web/src/main/webapp/homepage/exportOperateData.jsp =================================================================== diff -u -r12331 -r27802 --- ssts-web/src/main/webapp/homepage/exportOperateData.jsp (.../exportOperateData.jsp) (revision 12331) +++ ssts-web/src/main/webapp/homepage/exportOperateData.jsp (.../exportOperateData.jsp) (revision 27802) @@ -8,14 +8,15 @@ String department = request.getParameter("department"); String startDate = request.getParameter("startDate"); String endDate = request.getParameter("endDate"); +String orgUnitCoding = request.getParameter("orgUnitCoding"); String sDate = startDate.split(" ")[0]; String eDate = endDate.split(" ")[0]; String fileName="消毒供应中心运作监控明细表("+sDate+" ~ "+eDate+").xls"; ServletOutputStream servletOutputStream = response.getOutputStream(); response.setContentType("application/octet-stream"); response.addHeader("Content-Disposition","attachment;filename=" + new String(fileName.getBytes("GBK"), "ISO8859_1")); SupplyRoomControlManager supplyRoomControlManager = (SupplyRoomControlManager)SpringBeanManger.getBean("supplyRoomControlManager"); -supplyRoomControlManager.createOperateData(servletOutputStream,goodNmae,tousseType,department,startDate,endDate); +supplyRoomControlManager.createOperateData(servletOutputStream,goodNmae,tousseType,department,startDate,endDate,orgUnitCoding); servletOutputStream.flush(); out.clear(); out = pageContext.pushBody(); Index: ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js =================================================================== diff -u -r27301 -r27802 --- ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js (.../supplyRoomsUnfinishedWork.js) (revision 27301) +++ ssts-web/src/main/webapp/homepage/supplyRoomsUnfinishedWork.js (.../supplyRoomsUnfinishedWork.js) (revision 27802) @@ -61,31 +61,41 @@ var goodNmae ="";// $Id('goodsSearch').value; var tousseType = $Id('tousseType').value; var department = $Id('department').value; + var orgUnitCoding = Ext.getCmp('querySupplyRoom').getValue(); + if(orgUnitCoding.indexOf(ALL) == 0){ + orgUnitCoding = ""; + } applicationStore.baseParams['tousseName'] = goodNmae; applicationStore.baseParams['tousseType'] = tousseType; applicationStore.baseParams['department'] = department; + applicationStore.baseParams['orgUnitCoding'] = orgUnitCoding; applicationStore.load({params:{start: 0, limit: 10}}); pendingBasketStore.baseParams['department'] = department; + pendingBasketStore.baseParams['orgUnitCoding'] = orgUnitCoding; pendingBasketStore.load({params:{start: 0, limit: 10}}); packingStore.baseParams['tousseName'] = goodNmae; packingStore.baseParams['tousseType'] = tousseType; packingStore.baseParams['department'] = department; + packingStore.baseParams['orgUnitCoding'] = orgUnitCoding; packingStore.load({params:{start: 0, limit: 10}}); reviewStore.baseParams['tousseName'] = goodNmae; reviewStore.baseParams['tousseType'] = tousseType; + reviewStore.baseParams['orgUnitCoding'] = orgUnitCoding; reviewStore.load({params:{start: 0, limit: 10}}); sterilizationStore.baseParams['tousseName'] = goodNmae; sterilizationStore.baseParams['tousseType'] = tousseType; + sterilizationStore.baseParams['orgUnitCoding'] = orgUnitCoding; sterilizationStore.load({params:{start: 0, limit: 10}}); invoicePlanStore.baseParams['tousseName'] = goodNmae; invoicePlanStore.baseParams['tousseType'] = tousseType; invoicePlanStore.baseParams['department'] = department; + invoicePlanStore.baseParams['orgUnitCoding'] = orgUnitCoding; invoicePlanStore.load({params:{start: 0, limit: 10}}); } @@ -279,6 +289,71 @@ ) }); + var supplyRoomRecord = Ext.data.Record.create([ + {name: 'departCode', type: 'string'}, + {name: 'name', type: 'string'} + ]); + + var supplyRoomStore = new Ext.data.SimpleStore({ + fields : ['departCode','name'] + }); + + /** + * “供应室combo”的store,仅用于普通的ajax请求的数据源 + */ + var supplyRoomRemoteStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do', + method : 'POST' + }), + baseParams :{type:"12"}, + reader : new Ext.data.JsonReader({ + fields : [ + {name : 'id', mapping : 'id'}, + {name : 'departCode', mapping : 'departId'}, + {name : 'name', mapping : 'name'} + ] + }), + listeners:{ + beforeload : function(){ + loadMask = new Ext.LoadMask(Ext.getBody(), { + msg: '正在加载供应室...,请稍候!',removeMask: true + }); + loadMask.show(); + }, + load :function (thiz,records,options ){ + loadMask.hide(); + var currentOrgUnitIsSupplyRoom = false; + if(records && records.length > 0){ + for (var i = 0; i < records.length; i++) { + var supplyRoomData = records[i].data; + var departCodeTemp = supplyRoomData.departCode; + //如果没有查看其它供应室权限时,只显示是当前用户的科室 + if(SSTS_View_All_Supply_Room_Report){ + if(departCodeTemp == currentOrgUnitCoding){ + supplyRoomStore.add(new supplyRoomRecord({'departCode':departCodeTemp,'name':supplyRoomData.name})); + currentOrgUnitIsSupplyRoom = true; + } + }else{ + supplyRoomStore.add(new supplyRoomRecord({'departCode':departCodeTemp,'name':supplyRoomData.name})); + if(departCodeTemp == currentOrgUnitCoding){ + currentOrgUnitIsSupplyRoom = true; + } + } + } + } + if(supplyRoomStore.getCount() > 1){ + supplyRoomStore.insert(0 , new supplyRoomRecord({'departCode':ALL,'name':ALL})); + } + //最后使供应室下拉框默认选中用户所属的当前的科室(前提是用户所属的当前的科室也在选项中) + if(currentOrgUnitIsSupplyRoom){ + Ext.getCmp('querySupplyRoom').setValue(currentOrgUnitCoding); + } + } + } + }); + supplyRoomRemoteStore.load();//20181225 end + var form = new Ext.form.FormPanel({ title : entityName, region : 'north', @@ -355,6 +430,63 @@ } }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 70, + //labelSeparator : '选择供应室:', + items : [{//20181225 + xtype : 'multiSelect', + fieldLabel : '选择供应室', + id : 'querySupplyRoom', + name : 'querySupplyRoom', + valueField : 'departCode', + displayField : 'name', + minChars : 0, + listWidth : 260, + allowBlank : true, + editable : false, + store : supplyRoomStore, + forceSelection : false, + mode : 'local', + triggerAction : 'all', + lazyInit : true, + typeAhead : false, + anchor : '95%', + listeners: { + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('departCode') == ALL) { + if (record.get('checked')) { + combo.selectAll(); + } else { + combo.deselectAll(); + } + } + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('departCode') != ALL && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); + } else { + all.set(combo.checkField, false); + } + combo.setValue(combo.getCheckedValue()); + //taskGroupStore.reload(); + /* if(!combo.getValue()){ + taskGroupStore.removeAll(); + } */ + } + } + }] }] }], buttonAlign :'center', Index: ssts-web/src/main/webapp/homepage/supplyRoomOperate.js =================================================================== diff -u -r27770 -r27802 --- ssts-web/src/main/webapp/homepage/supplyRoomOperate.js (.../supplyRoomOperate.js) (revision 27770) +++ ssts-web/src/main/webapp/homepage/supplyRoomOperate.js (.../supplyRoomOperate.js) (revision 27802) @@ -74,6 +74,10 @@ var goodName = $Id('goodsSearch').value; var tousseType = $Id('tousseType').value; var department = Ext.getCmp('department').getValue(); + var orgUnitCoding = Ext.getCmp('querySupplyRoom').getValue(); + if(orgUnitCoding.indexOf(ALL) == 0){ + orgUnitCoding = ""; + } //ie下不加IDS也能找到对应的dom var startDate= $Id('startDate' + IDS).value || $Id('startDate').value; var endDate= $Id('endDate' + IDS).value || $Id('endDate').value; @@ -100,6 +104,7 @@ var queryParam = { tousseName : goodName, tousseType : tousseType, + orgUnitCoding:orgUnitCoding, startDate : startDate, endDate : endDate, taskGroup : taskGroup, @@ -220,8 +225,71 @@ ] }); + var supplyRoomRecord = Ext.data.Record.create([ + {name: 'departCode', type: 'string'}, + {name: 'name', type: 'string'} + ]); + + var supplyRoomStore = new Ext.data.SimpleStore({ + fields : ['departCode','name'] + }); + + /** + * “供应室combo”的store,仅用于普通的ajax请求的数据源 + */ + var supplyRoomRemoteStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do', + method : 'POST' + }), + baseParams :{type:"12"}, + reader : new Ext.data.JsonReader({ + fields : [ + {name : 'id', mapping : 'id'}, + {name : 'departCode', mapping : 'departId'}, + {name : 'name', mapping : 'name'} + ] + }), + listeners:{ + beforeload : function(){ + loadMask = new Ext.LoadMask(Ext.getBody(), { + msg: '正在加载供应室...,请稍候!',removeMask: true + }); + loadMask.show(); + }, + load :function (thiz,records,options ){ + loadMask.hide(); + var currentOrgUnitIsSupplyRoom = false; + if(records && records.length > 0){ + for (var i = 0; i < records.length; i++) { + var supplyRoomData = records[i].data; + var departCodeTemp = supplyRoomData.departCode; + //如果没有查看其它供应室权限时,只显示是当前用户的科室 + if(SSTS_View_All_Supply_Room_Report){ + if(departCodeTemp == currentOrgUnitCoding){ + supplyRoomStore.add(new supplyRoomRecord({'departCode':departCodeTemp,'name':supplyRoomData.name})); + currentOrgUnitIsSupplyRoom = true; + } + }else{ + supplyRoomStore.add(new supplyRoomRecord({'departCode':departCodeTemp,'name':supplyRoomData.name})); + if(departCodeTemp == currentOrgUnitCoding){ + currentOrgUnitIsSupplyRoom = true; + } + } + } + } + if(supplyRoomStore.getCount() > 1){ + supplyRoomStore.insert(0 , new supplyRoomRecord({'departCode':ALL,'name':ALL})); + } + //最后使供应室下拉框默认选中用户所属的当前的科室(前提是用户所属的当前的科室也在选项中) + if(currentOrgUnitIsSupplyRoom){ + Ext.getCmp('querySupplyRoom').setValue(currentOrgUnitCoding); + } + } + } + }); - + supplyRoomRemoteStore.load();//20181225 end var startDate = new Date(); startDate.setHours(0,0,0); @@ -236,14 +304,15 @@ border : 0, frame : true, bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; - height : 103, + height : 133, items : [{ id:'tousseType', name:'tousseType', xtype : 'hidden' },{ layout : 'column', height : 40, + height : 103, labelWidth : 70, items : [{ columnWidth : .18, @@ -274,7 +343,7 @@ } }] },{ - columnWidth : .15, + columnWidth : .18, layout : 'form', labelWidth : 60, items : [{ @@ -300,6 +369,63 @@ } } }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 90, + //labelSeparator : '选择供应室:', + items : [{//20181225 + xtype : 'multiSelect', + fieldLabel : '选择供应室', + id : 'querySupplyRoom', + name : 'querySupplyRoom', + valueField : 'departCode', + displayField : 'name', + minChars : 0, + listWidth : 260, + allowBlank : true, + editable : false, + store : supplyRoomStore, + forceSelection : false, + mode : 'local', + triggerAction : 'all', + lazyInit : true, + typeAhead : false, + anchor : '95%', + listeners: { + select: function (combo, record, index) { + //1、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 + if (record.get('departCode') == ALL) { + if (record.get('checked')) { + combo.selectAll(); + } else { + combo.deselectAll(); + } + } + + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 + var selectAll = true; + combo.store.each(function(record) { + if (record.get('departCode') != ALL && !record.get(this.checkField)) { + selectAll = false; + return; + } + }, combo); + + var all = combo.store.getAt(0); + if (selectAll) { + all.set(combo.checkField, true); + } else { + all.set(combo.checkField, false); + } + combo.setValue(combo.getCheckedValue()); + //taskGroupStore.reload(); + /* if(!combo.getValue()){ + taskGroupStore.removeAll(); + } */ + } + } + }] },{ columnWidth : .15, layout : 'form', @@ -356,6 +482,7 @@ columnWidth : .18, layout : 'form', labelWidth : 60, + height:28, items : [{ xtype : 'datefieldWithMin', id:'startDate'+IDS, @@ -384,6 +511,7 @@ columnWidth : .18, layout : 'form', labelWidth : 60, + height:28, items : [{ xtype : 'datefieldWithMin', id:'endDate'+IDS, @@ -430,6 +558,7 @@ var goodNmae = $Id('goodsSearch').value; var tousseType = $Id('tousseType').value; var department = Ext.getCmp('department').getValue(); + var orgUnitCoding = Ext.getCmp('querySupplyRoom').getValue(); var startDate= $Id('startDate' + IDS).value; var endDate= $Id('endDate' + IDS).value; @@ -438,7 +567,7 @@ showResult('查询时间有误,请正确选择查询时间。'); return false; } - exportData(goodNmae,tousseType,department,startDate,endDate); + exportData(goodNmae,tousseType,department,startDate,endDate,orgUnitCoding); } },{ @@ -897,9 +1026,10 @@ }); }); -function exportData(goodNmae,tousseType,department,startDate,endDate){ +function exportData(goodNmae,tousseType,department,startDate,endDate,orgUnitCoding){ location.href = WWWROOT + "/homepage/exportOperateData.jsp?" - +"goodNmae="+goodNmae+"&tousseType="+tousseType + +"goodNmae="+goodNmae+"&tousseType="+tousseType +"&department="+department+"&startDate="+startDate - +"&endDate="+endDate; + +"&endDate="+endDate + +"&orgUnitCoding="+orgUnitCoding; } \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/supplyRoomOperate.jsp =================================================================== diff -u -r15785 -r27802 --- ssts-web/src/main/webapp/homepage/supplyRoomOperate.jsp (.../supplyRoomOperate.jsp) (revision 15785) +++ ssts-web/src/main/webapp/homepage/supplyRoomOperate.jsp (.../supplyRoomOperate.jsp) (revision 27802) @@ -24,8 +24,18 @@ + + + 消毒供应中心运作监控管理