Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseOperate.js =================================================================== diff -u -r28343 -r28408 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseOperate.js (.../tousseOperate.js) (revision 28343) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseOperate.js (.../tousseOperate.js) (revision 28408) @@ -1,8 +1,65 @@ var entityName = "器械包运作统计"; var grid; var myMask; +var reportFormGrid; +var windowObj = null; +function checkInfo() { + //器械包 + var tousseReader = new Ext.data.JsonReader( { + fields : [ + {name : 'tousseName'}, + {name : 'applicationAmount'}, + {name : 'tousseName'}, + {name : 'amount'} + ] + }); + + /** + * 器械包实例远程数据源 + */ + var tousseInfoStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/JasperreportsAction!getSummaryInformationOfDepartmentOperationMonitoring.do', + method : 'POST' + }), + reader : tousseReader + }); + + var tousseCm = new Ext.grid.ColumnModel([ + {header : "器械包名称",dataIndex : 'barcode',width : 100,menuDisabled : true}, + {header : "名称",dataIndex : 'tousseName',id : 'tousseName',width : 280,menuDisabled : true}, + {header : "数量",dataIndex : 'amount',width : 75,menuDisabled : true}, + {header : '删除操作',id : 'delAction',width : 50} + ]); + + var tousseInfoGrid = new top.Ext.grid.EditorGridPanel({ + id : 'tousseInfoGrid', + store : tousseInfoStore, + cm : tousseCm, + width : 700, + height : 400, + autoHeight : true, + autoExpandColumn : 'tousseName', + frame : false, + viewConfig: { + forceFit:true + } + }) + + windowObj = new top.Ext.Window({ + layout : 'fit', + title : '明细信息', + width : 700, + height : 400, + border : false, + modal : true, + plain : true, + items :tousseInfoGrid + }); + + windowObj.show() +} Ext.onReady(function() { - Ext.QuickTips.init(); function reloadReport(){ var startDate= $Id('startDate').value; @@ -14,28 +71,102 @@ } var goodsSearch = $Id('goodsSearch').value; - var tousseType = $Id('tousseType').value; + var tousseType = Ext.getCmp('comboTousseType').getValue(); + var sterilizationMode = Ext.getCmp('sterilizationMode').getValue(); + var taskGroupName = $Id('tousseGroupName').value; myMask = new Ext.LoadMask(Ext.getBody(), { msg: '正在加载,请稍候!', removeMask: true }); - myMask.show(); - - goodsSearch = encodeURIComponent(goodsSearch); + //myMask.show(); - var url = WWWROOT + '/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do'; var params = { - jasperreportName : 'tousseOperate.jasper', goodsName : goodsSearch, startDate : startDate, endDate : endDate, tousseType : tousseType, - reportName:'tousseOperate' + sterilizationMode:sterilizationMode, + taskGroupName:taskGroupName } - seachReport(url,params); + loadStoreByParams(reportFormGrid,'reportFormGrid',params); } + + /** + * 根据参数加载对应的store + * @param store 要加载的store + * @param queryParam 请求的参数 + */ + function loadStoreByParams(store,title,queryParam) { + var loader = store.getLoader(); + loader.baseParams = queryParam; + loader.load(store.root, function() { + var length = store.root.childNodes.length; + if (length <= 0) { + Ext.getCmp(title).setTitle("汇总信息"); + myMask.hide(); + return; + } + var totalApplicationAmount = 0; + var totalRecyAmount = 0; + var totalInvoiceAmount = 0; + var totalSignAmount = 0; + var totalUseAmount = 0; + store.root.eachChild(function(child){ + var attributes = child.attributes; + totalApplicationAmount += attributes.applicationAmount || 0; + totalRecyAmount += attributes.recyAmount || 0; + totalInvoiceAmount += attributes.invoiceAmount || 0; + totalSignAmount += attributes.signAmount || 0; + totalUseAmount += attributes.useAmount || 0; + }); + + var newTitle = "汇总信息"+"(申请数量" + totalApplicationAmount + ",回收数量" + totalRecyAmount + ",发货数量" + totalInvoiceAmount + ",签收数量" + totalSignAmount + ",使用数量" + totalUseAmount + ")"; + + Ext.getCmp(title).setTitle(newTitle); + myMask.hide(); + }); + } + + function renderModifyFun(v, p, record){ + //var cell = '' + v + ''; + var cell = v; + return cell; + } + + //器械包分组combo的store + var tousseGroupStore = new Ext.data.JsonStore({ + fields : [ 'tousseGroupName','id' ], + url : WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', + listeners : { + beforeload : function(_this, options) { + _this.baseParams.needAll = '是'; + } + } + }); + + //物品类型 + var tousseTypeStore = new Ext.data.SimpleStore( { + fields : ['key', 'value'], + data : [ + ['all','全部'] + ,['allTousse','全部器械包'] + ,['tousse','器械包'] + ,['dressing','敷料包'] + ,['disinfection','消毒物品'] + ,['foreign','外来器械包'] + ,['custom','自定义器械包'] + ,['foreignProxy','外部代理灭菌包'] + ,['disposableGood','一次性物品'] + ] + }); + + //灭菌方式数据源定义 + var sterilizationModeJsonStore = new Ext.data.SimpleStore({ + fields : [ 'optionText' ], + url : WWWROOT + '/disinfectSystem/baseData/sterilisationAction!getSterilizationModeList.do' + }); var tousseAndDiposableGoodsStore = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ @@ -57,154 +188,260 @@ var startDate = new Date(); startDate.setHours(0,0,0); var endDateValue = startDate.getFullYear() + "/" + (startDate.getMonth() + 1) + "/" + startDate.getDate() + " 23:59"; - - var form = new Ext.form.FormPanel({ - title : entityName+"报表", - region : 'north', - labelAlign : 'right', - buttonAlign : 'center', - collapsible : true, - collapseMode : 'mini', - split : true, - border : 0, - frame : true, - bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; - height : 65, + var defaultStartDate = startDate.getFullYear() + "-" + (startDate.getMonth() + 1) + "-" + startDate.getDate() + " 00:00"; + var defaultEndDate = startDate.getFullYear() + "-" + (startDate.getMonth() + 1) + "-" + startDate.getDate() + " 23:59"; + var form = new Ext.form.FormPanel({ + title : entityName+"报表", + region : 'north', + buttonAlign : 'center', + labelAlign : 'right', + collapsible : true, + collapseMode : 'mini', + split : true, + border : 0, + frame : true, + bodyStyle : 'padding:0px auto;margin:0px', + height :100, + items : [{ + id:'tousseType', + name:'tousseType', + xtype : 'hidden' + },{ + layout : 'column', + labelWidth : 70, items : [{ - id:'tousseType', - name:'tousseType', - xtype : 'hidden' - },{ - layout : 'column', - height : 40, - labelWidth : 70, + columnWidth : .2, + layout : 'form', + labelWidth : 90, + height:30, items : [{ - width : 270, - layout : 'form', - labelWidth : 60, - items : [{ - xtype : 'combo', - id : 'goodsSearch', - name : 'goodsSearch', - queryParam : 'spell', - fieldLabel : '物品名称', - minChars : 0, - valueField : 'id', - displayField : 'displayName', - anchor : '100%', - listWidth:370, - store : tousseAndDiposableGoodsStore, - lazyInit : true, - triggerAction : 'all', - hideTrigger : true, - typeAhead : false, - allowBlank : true, - listeners : { - select : function(combo, record, index) { - Ext.getCmp('tousseType').setValue(record.data.type); - Ext.getCmp('goodsSearch').setValue(record.data.name); - } - } - }] - },{ - width : 250, - layout : 'form', - labelWidth : 60, - items : [{ - xtype : 'datefieldWithMin', - id:'startDate', - name : 'startDate', - fieldLabel : '开始时间', -// readOnly : true, - format : 'Y-m-d H:i', -// altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', - value : startDate, - theHours : 0, - theMinutes : 0, - anchor : '95%', - listeners : { - specialkey : function(field, e) { - if (e.getKey() == Ext.EventObject.ENTER) { - var isOK = field.validate(); - if(isOK){ - var value = field.getValue(); - field.setValue(value); - var endTime = Ext.getCmp('endDate'); - endTime.setValue(''); - endTime.focus(); - } - - } + xtype : 'datefieldWithMin', + id:'startDate', + name : 'startDate', + fieldLabel : '开始时间', + format : 'Y-m-d H:i', + value : startDate, + theHours : 0, + theMinutes : 0, + anchor : '95%', + listeners : { + specialkey : function(field, e) { + if (e.getKey() == Ext.EventObject.ENTER) { + var isOK = field.validate(); + if(isOK){ + var value = field.getValue(); + field.setValue(value); + var endTime = Ext.getCmp('endDate'); + endTime.setValue(''); + endTime.focus(); } + } - - }] - },{ - - width : 250, - layout : 'form', - labelWidth : 60, - items : [{ - xtype : 'datefieldWithMin', - id:'endDate', - name : 'endDate', - fieldLabel : '结束时间', -// readOnly : true, - format : 'Y-m-d H:i', - theHours : 23, - theMinutes : 59, -// altFormats:'Y-m-d|Y-n-j|y-n-j|y-m-j|y-m-d|y-n-d|Y-n-d|Y-m-j|Ymd|Ynj|ynj|ymj|ymd|ynd|Ynd|Ymj|Y/m/d|Y/n/j|y/n/j|y/m/j|y/m/d|y/n/d|Y/n/d|Y/m/j', - value : new Date(endDateValue), - anchor : '95%' - }] - - },{ - width : 70, - layout : 'form', - items : [{ - xtype : 'button', - text : '查询', - minWidth : 70, - iconCls : 'icon_search', - handler : function() { - reloadReport(); } - }] - }, { - width : 70, - layout : 'form', - items : [{ - xtype : 'button', - text : '重置', - minWidth : 70, - iconCls : 'icon_set', - handler : function() { - $Id('startDate').value = ""; - $Id('endDate').value = ""; - $Id('goodsSearch').value = ""; + } + }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 90, + height:30, + items : [{ + xtype : 'datefieldWithMin', + id:'endDate', + name : 'endDate', + fieldLabel : '结束时间', + format : 'Y-m-d H:i', + theHours : 23, + theMinutes : 59, + value : new Date(endDateValue), + anchor : '95%' + }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 90, + height:30, + items : [{ + xtype : 'combo', + id : 'goodsSearch', + name : 'goodsSearch', + queryParam : 'spell', + fieldLabel : '物品名称', + minChars : 0, + valueField : 'id', + displayField : 'displayName', + anchor : '100%', + listWidth:370, + store : tousseAndDiposableGoodsStore, + lazyInit : true, + triggerAction : 'all', + hideTrigger : true, + typeAhead : false, + allowBlank : true, + listeners : { + select : function(combo, record, index) { + Ext.getCmp('tousseType').setValue(record.data.type); + Ext.getCmp('goodsSearch').setValue(record.data.name); } - }] + } }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 90, + height:30, + items : [{ + xtype : 'combo', + fieldLabel : '器械包分组', + id : 'tousseGroupName', + name : 'tousseGroupName', + valueField : 'tousseGroupName', + displayField : 'tousseGroupName', + store : tousseGroupStore, + forceSelection : true, + allowBlank : true, + triggerAction : 'all', + anchor : '95%' + }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 90, + height:30, + items : [{ + xtype : 'combo', + fieldLabel : '物品类型', + id : 'comboTousseType', + name : 'comboTousseType', + valueField : 'value', + displayField : 'value', + store : tousseTypeStore, + forceSelection : true, + value:'全部',//需要改成all,否则如果没有选择此下拉框的选项直接点查询时传到后台是"全部",不是"all" + editable : false, + mode : 'local', + triggerAction : 'all', + anchor : '95%', + listeners : { + select : function(store, record){ + } + } + }] + },{ + columnWidth : .2, + layout : 'form', + labelWidth : 90, + height:30, + items : [{ + xtype : 'combo', + fieldLabel : "灭菌方式", + editable:false, + valueField : 'optionText', + displayField : 'optionText', + store : sterilizationModeJsonStore, + forceSelection : true, + triggerAction : 'all', + allowBlank : true, + blankText : '请选择灭菌方式!', + name : "sterilizationMode", + id : "sterilizationMode", + anchor : '95%' + }] + },{ + width : 70, + layout : 'form', + items : [{ + xtype : 'button', + text : '查询', + minWidth : 70, + iconCls : 'icon_search', + handler : function() { + reloadReport(); + } + }] + },{ + width : 70, + layout : 'form', + style:"margin-left:10px", + items : [{ + xtype : 'button', + text : '重置', + minWidth : 70, + iconCls : 'icon_set', + handler : function() { + $Id('startDate').value = ""; + $Id('endDate').value = ""; + $Id('goodsSearch').value = ""; + } + }] }] - }); - - var reportForm = new Ext.Panel({ - frame:false,//渲染面板 - autoScroll:true,//自动显示滚动条 - collapsible:true,//允许展开和收缩 - bodyPadding:5, - html:'' - }); - - var viewport = new Ext.Viewport({ - layout : 'border', - items : [form, { - region : 'center', - margins : '0 0 0 0', - layout : 'fit', - items : reportForm + }] + }); + + var applicationColumns = [ + {header : "器械包名称",width : 180,dataIndex : 'tousseName'}, + {header : "申请数量",width : 60,dataIndex : 'applicationAmount',renderer : renderModifyFun}, + {header : "回收数量",width : 60,dataIndex : 'recyAmount',renderer : renderModifyFun}, + {header : "发货数量",width : 60,dataIndex : 'invoiceAmount',renderer : renderModifyFun}, + {header : "签收数量",width : 130,dataIndex : 'signAmount',renderer : renderModifyFun}, + {header : "使用数量",width : 130,dataIndex : 'useAmount',renderer : renderModifyFun} + ]; + + var height = Ext.getBody().getSize().height; + + reportFormGrid = new Ext.tree.ColumnTree({ + rootVisible : false, + autoScroll : true, + title : '汇总信息', + frame : false, + id : 'reportFormGrid', + height:height-70, + columns : applicationColumns, + loader : new Ext.tree.TreeLoader({ + url: WWWROOT + '/jasperreports/jasperreportsAction!getSummaryInformationOfDepartmentOperationMonitoring.do', + baseParams : { + startDate : defaultStartDate, + endDate : defaultEndDate, + goodsName : '', + tousseType : '', + sterilizationMode : '', + taskGroupName : '' + }, + uiProviders:{ + 'col': top.Ext.tree.ColumnNodeUI + } + }), + root: new top.Ext.tree.AsyncTreeNode({ + text:'器械包名称' + }) + }); + + var reportForm = new Ext.form.FormPanel({ + id:'reportFormID', + frame:false,//渲染面板 + autoScroll:false,//自动显示滚动条 + collapsible:false,//允许展开和收缩 + bodyPadding:0, + anchor:'100% 100%', + items:[{ + layout : 'column', + height:height-70, + items:[{ + columnWidth : 1, + layout : 'form', + height:height-70, + items : [reportFormGrid] }] - }); - + }] + }); - }); \ No newline at end of file + var viewport = new Ext.Viewport({ + layout : 'border', + items : [form, { + region : 'center', + margins : '0 0 0 0', + layout : 'fit', + items : reportForm + }] + }); +}); \ No newline at end of file Index: ssts-web/src/main/webapp/homepage/supplyRoomOperate.jsp =================================================================== diff -u -r28330 -r28408 --- ssts-web/src/main/webapp/homepage/supplyRoomOperate.jsp (.../supplyRoomOperate.jsp) (revision 28330) +++ ssts-web/src/main/webapp/homepage/supplyRoomOperate.jsp (.../supplyRoomOperate.jsp) (revision 28408) @@ -24,18 +24,23 @@ - - + + + + + + + 消毒供应中心运作监控管理 @@ -58,4 +63,23 @@ + + \ No newline at end of file Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseOperate.jsp =================================================================== diff -u -r12331 -r28408 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseOperate.jsp (.../tousseOperate.jsp) (revision 12331) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseOperate.jsp (.../tousseOperate.jsp) (revision 28408) @@ -15,6 +15,10 @@ + + + +