Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseWorkLoadView.js =================================================================== diff -u -r34017 -r35382 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseWorkLoadView.js (.../tousseWorkLoadView.js) (revision 34017) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/tousseWorkLoadView.js (.../tousseWorkLoadView.js) (revision 35382) @@ -6,7 +6,7 @@ * */ var myMask; -function reloadReport(){ +function reloadReport() { if (!form.getForm().isValid()) { showResult('请正确填写表单各值'); return false; @@ -16,27 +16,27 @@ //接受时间 var endTime = $Id('endTime').value; //选择供应室 - var departCoding = ($Id('querySupplyRoom').value == '全部')?'':Ext.getCmp('querySupplyRoom').getValue(); + var departCoding = ($Id('querySupplyRoom').value == '全部') ? '' : Ext.getCmp('querySupplyRoom').getValue(); //器械包类型 - var tousseTypes = ($Id('tousseType').value == '全部')?'':$Id('tousseType').value; + var tousseTypes = ($Id('tousseType').value == '全部') ? '' : $Id('tousseType').value; //包装类型 - var packageType = ($Id('packageType').value == '全部')?'':$Id('packageType').value; + var packageType = ($Id('packageType').value == '全部') ? '' : $Id('packageType').value; //任务分组 var taskGroup = $Id('taskGroup').value; //器械包分组 - var tousseGroupName = ($Id('tousseGroupName').value == '全部')?'':$Id('tousseGroupName').value; + var tousseGroupName = ($Id('tousseGroupName').value == '全部') ? '' : $Id('tousseGroupName').value; //灭菌方式 - var sterilizationMode = ($Id('sterilizationMode').value == '全部')?'':$Id('sterilizationMode').value; + var sterilizationMode = ($Id('sterilizationMode').value == '全部') ? '' : $Id('sterilizationMode').value; //人员 var operator = $Id('operator').value; //是否禁用标识牌 var isDisableIDCard = $Id('isDisableIDCard').value; //是否代理灭菌包 var isProxyDisinfection = $Id('isProxyDisinfection').value; //申请科室 - var applicationDepart = ($Id('applicationDepart').value == '全部')?'':$Id('applicationDepart').value; + var applicationDepart = ($Id('applicationDepart').value == '全部') ? '' : $Id('applicationDepart').value; //回收科室分组 - var groupIds = ($Id('deptGroupName').value == '全部')?'':Ext.getCmp('deptGroupName').getValue(); + var groupIds = ($Id('deptGroupName').value == '全部') ? '' : Ext.getCmp('deptGroupName').getValue(); //统计方式 var statType = Ext.getCmp('statType').getValue(); myMask = new Ext.LoadMask(Ext.getBody(), { @@ -45,108 +45,108 @@ }); myMask.show(); var jasperreportName = ''; - if(sstsConfig.enablePackagingRecordFunction){ + if (sstsConfig.enablePackagingRecordFunction) { jasperreportName = 'tousseWorkLoadAddPackaging.jasper'; - if(statType == 'sumQuery'){ + if (statType == 'sumQuery') { jasperreportName = 'tousseWorkLoadSumAddPackaging.jasper'; } - }else{ + } else { jasperreportName = 'tousseWorkLoad.jasper'; - if(statType == 'sumQuery'){ + if (statType == 'sumQuery') { jasperreportName = 'tousseWorkLoadSum.jasper'; } } var url = WWWROOT + '/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do'; var params = { - jasperreportName : jasperreportName, - startDay : startTime, - endDay : endTime, - departCoding : departCoding, - tousseTypes : tousseTypes, - operator : operator, - isDisableIDCard : isDisableIDCard, - isProxyDisinfection:isProxyDisinfection, - taskGroup : taskGroup, - tousseGroupName : tousseGroupName, - reportName:'tousseWorkLoad', - packageType:packageType, - sterilizationMode:sterilizationMode, - applicationDepart:applicationDepart, - groupIds:groupIds, - queryType:statType + jasperreportName: jasperreportName, + startDay: startTime, + endDay: endTime, + departCoding: departCoding, + tousseTypes: tousseTypes, + operator: operator, + isDisableIDCard: isDisableIDCard, + isProxyDisinfection: isProxyDisinfection, + taskGroup: taskGroup, + tousseGroupName: tousseGroupName, + reportName: 'tousseWorkLoad', + packageType: packageType, + sterilizationMode: sterilizationMode, + applicationDepart: applicationDepart, + groupIds: groupIds, + queryType: statType } - if(sstsConfig.enableInstrumentSetTypeSetting){ + if (sstsConfig.enableInstrumentSetTypeSetting) { var instrumentSetTypes = Ext.getCmp('instrumentSetTypes').getValue(); - if(instrumentSetTypes !== ''){ - instrumentSetTypes = instrumentSetTypes.replace(/;/g,','); + if (instrumentSetTypes !== '') { + instrumentSetTypes = instrumentSetTypes.replace(/;/g, ','); } params.instrumentSetTypes = instrumentSetTypes; } - - searchReport(url,params); + + searchReport(url, params); } -Ext.onReady(function() { +Ext.onReady(function () { Ext.QuickTips.init(); //20181225 var supplyRoomRecord = Ext.data.Record.create([ - {name: 'departCode', type: 'string'}, - {name: 'name', type: 'string'} + { name: 'departCode', type: 'string' }, + { name: 'name', type: 'string' } ]); var supplyRoomStore = new Ext.data.SimpleStore({ - fields : ['departCode','name'] + fields: ['departCode', 'name'] }); - + var supplyRoomRemoteStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!loadSupplyRoomConfigRoom.do', + method: 'POST' }), - baseParams :{type:"12"}, + baseParams: { type: "12" }, // reader : rd, - reader : new Ext.data.JsonReader({ - fields : [ - {name : 'id', mapping : 'id'}, - {name : 'departCode', mapping : 'departId'}, - {name : 'name', mapping : 'name'} + reader: new Ext.data.JsonReader({ + fields: [ + { name: 'id', mapping: 'id' }, + { name: 'departCode', mapping: 'departId' }, + { name: 'name', mapping: 'name' } ] }), - listeners:{ - beforeload : function(){ + listeners: { + beforeload: function () { loadMask = new Ext.LoadMask(Ext.getBody(), { - msg: '正在加载供应室...,请稍候!',removeMask: true + msg: '正在加载供应室...,请稍候!', removeMask: true }); loadMask.show(); }, - load :function (thiz,records,options ){ + load: function (thiz, records, options) { loadMask.hide(); var currentOrgUnitIsSupplyRoom = false; - if(records && records.length > 0){ + 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})); + 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){ + } 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 (supplyRoomStore.getCount() > 1) { + supplyRoomStore.insert(0, new supplyRoomRecord({ 'departCode': ALL, 'name': ALL })); } //最后使供应室下拉框默认选中用户所属的当前的科室(前提是用户所属的当前的科室也在选项中) - if(currentOrgUnitIsSupplyRoom){ + if (currentOrgUnitIsSupplyRoom) { Ext.getCmp('querySupplyRoom').setValue(currentOrgUnitCoding); } } @@ -157,202 +157,202 @@ var startDayofMonth = dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/01"; var currentDate = dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/" + dt.getDate(); var endOfToday = new Date(Date.parse(currentDate + " 23:59:59")); - + /** * 器械包combo的store */ - var tousseTypeStore = new Ext.data.SimpleStore( { - fields : ['value'], - data : [[ALL],[INSIDE],[DRESSING],[COMBO],[DISINFECTION],[FOREIGNPROXY],[FOREIGN],[FOREIGNSPLIT],[CUSTOM],[MATERIAL]] + var tousseTypeStore = new Ext.data.SimpleStore({ + fields: ['value'], + data: [[ALL], [INSIDE], [DRESSING], [COMBO], [DISINFECTION], [FOREIGNPROXY], [FOREIGN], [FOREIGNSPLIT], [CUSTOM], [MATERIAL]] }); - + //人员 var readerDetail = Ext.data.Record.create([{ - name : 'id' + name: 'id' }, { - name : 'name' - } ]); + name: 'name' + }]); var userJsonStore = new Ext.data.Store({ - autoLoad : false, - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/systemmanage/user/loadUserByDepartmentCode!loadUserByDepartmentCode.do', - method : 'POST' + autoLoad: false, + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/systemmanage/user/loadUserByDepartmentCode!loadUserByDepartmentCode.do', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - root : 'data', - totalProperty : 'totalCount' - },readerDetail), - listeners : { - beforeload : function(_this, options) { + reader: new Ext.data.JsonReader({ + root: 'data', + totalProperty: 'totalCount' + }, readerDetail), + listeners: { + beforeload: function (_this, options) { _this.baseParams.needAll = 'yes'; _this.baseParams.departmentCode = Ext.getCmp('querySupplyRoom').getValue(); } } }); //包装类型 var packageTypeJsonStore = new Ext.data.SimpleStore({ - fields : [ 'typeName' ], - url : WWWROOT + '/disinfectSystem/baseData/expirationDateInfoAction!getPackageType.do', + fields: ['typeName'], + url: WWWROOT + '/disinfectSystem/baseData/expirationDateInfoAction!getPackageType.do', listeners: { - load:function(store){ - var data = {'typeName': '全部'}; - var rs = [new Ext.data.Record(data)]; - store.insert(0, rs); - } - } + load: function (store) { + var data = { 'typeName': '全部' }; + var rs = [new Ext.data.Record(data)]; + store.insert(0, rs); + } + } }); - + //任务组combo的store var taskGroupJsonStore = new Ext.data.SimpleStore({ - fields : [ 'taskGroupName' ], - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getTaskGroupName.do', - listeners : { - beforeload : function(_this, options) { + fields: ['taskGroupName'], + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!getTaskGroupName.do', + listeners: { + beforeload: function (_this, options) { _this.baseParams.handlerDepartCode = Ext.getCmp('querySupplyRoom').getValue(); } } }); - + //器械包分组combo的store var tousseGroupStore = new Ext.data.JsonStore({ - fields : [ 'tousseGroupName','id' ], - url : WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', + fields: ['tousseGroupName', 'id'], + url: WWWROOT + '/disinfectSystem/baseData/tousseGroupAction!getAllTousseGroup.do', listeners: { - load:function(store){ - var data = {'id':'','tousseGroupName': '全部'}; - var rs = [new Ext.data.Record(data)]; - store.insert(0, rs); - } - } + load: function (store) { + var data = { 'id': '', 'tousseGroupName': '全部' }; + var rs = [new Ext.data.Record(data)]; + store.insert(0, rs); + } + } }); //申请科室 var departJsonStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/systemmanage/orgUnit/searchApplyDepartmentByKeyWord.do', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/systemmanage/orgUnit/searchApplyDepartmentByKeyWord.do', + method: 'POST' }), - baseParams :{ - onlyOneself : false, - showDisableOrgUnit:false + baseParams: { + onlyOneself: false, + showDisableOrgUnit: false }, - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'id',mapping : 'departmentCode'}, - {name : 'name',mapping : 'departmentName'} - ] + reader: new Ext.data.JsonReader({ + root: 'data' + }, [ + { name: 'id', mapping: 'departmentCode' }, + { name: 'name', mapping: 'departmentName' } + ] ), listeners: { - load:function(store){ - var data = {'id':'','name': '全部'}; - var rs = [new Ext.data.Record(data)]; - store.insert(0, rs); - } - } + load: function (store) { + var data = { 'id': '', 'name': '全部' }; + var rs = [new Ext.data.Record(data)]; + store.insert(0, rs); + } + } }); //回收科室分组数据源 var deptGroupStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/departmentGroupAction!loadDeptGroupIdAndName.do', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/departmentGroupAction!loadDeptGroupIdAndName.do', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - root : 'data', + reader: new Ext.data.JsonReader({ + root: 'data', totalProperty: 'totalCount' - },[ - {name : 'departCodes',mapping : 'valueField'}, - {name : 'deptGroupName',mapping : 'displayField'} + }, [ + { name: 'departCodes', mapping: 'valueField' }, + { name: 'deptGroupName', mapping: 'displayField' } ] ) }); //灭菌方式 var sterilingModeStore = new Ext.data.JsonStore({ - url : WWWROOT + '/disinfectSystem/core/httpOptionController/getHttpOptionList.mhtml', - root: 'data', - baseParams : {optionListId: 'sterilizationMode'}, - fields: [ - {name : 'value',mapping : 'value'}, - ], - listeners: { - load:function(store){ - var data = {'value': '全部'}; - var rs = [new Ext.data.Record(data)]; - store.insert(0, rs); - } - } + url: WWWROOT + '/disinfectSystem/core/httpOptionController/getHttpOptionList.mhtml', + root: 'data', + baseParams: { optionListId: 'sterilizationMode' }, + fields: [ + { name: 'value', mapping: 'value' }, + ], + listeners: { + load: function (store) { + var data = { 'value': '全部' }; + var rs = [new Ext.data.Record(data)]; + store.insert(0, rs); + } + } }); - + 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 : 170, - labelWidth : 105, - items : [{ - layout : 'column', - items : [{ - columnWidth:.2, - layout : 'form', - items : [{ - xtype : 'datefieldWithMin', - fieldLabel : '开始时间', - id : 'startTime', - name : 'startTime', - editable : false, - 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', - allowBlank : false, - anchor : '95%', + 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: 170, + labelWidth: 105, + items: [{ + layout: 'column', + items: [{ + columnWidth: .2, + layout: 'form', + items: [{ + xtype: 'datefieldWithMin', + fieldLabel: '开始时间', + id: 'startTime', + name: 'startTime', + editable: false, + 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', + allowBlank: false, + anchor: '95%', value: new Date(startDayofMonth), - theHours : 0, - theMinutes : 0, - listeners : { - specialkey : function(field, e) { + theHours: 0, + theMinutes: 0, + listeners: { + specialkey: function (field, e) { if (e.getKey() == Ext.EventObject.ENTER) { var isOK = field.validate(); - if(isOK){ + if (isOK) { var value = field.getValue(); field.setValue(value); var endTime = Ext.getCmp('endTime'); endTime.selectText(); endTime.focus(); } - + } } } }] - },{ - columnWidth:.2, - layout : 'form', - items : [{ - xtype : 'datefieldWithMin', - fieldLabel : '结束时间', - id : 'endTime', - name : 'endTime', - editable : false, - 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', - allowBlank : false, - anchor : '95%', + }, { + columnWidth: .2, + layout: 'form', + items: [{ + xtype: 'datefieldWithMin', + fieldLabel: '结束时间', + id: 'endTime', + name: 'endTime', + editable: false, + 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', + allowBlank: false, + anchor: '95%', value: endOfToday, - theHours : 23, - theMinutes : 59, - listeners : { - specialkey : function(field, e) { + theHours: 23, + theMinutes: 59, + listeners: { + specialkey: function (field, e) { if (e.getKey() == Ext.EventObject.ENTER) { var isOK = field.validate(); - if(isOK){ + if (isOK) { var value = field.getValue(); field.setValue(value); reloadReport(); @@ -361,26 +361,26 @@ } } }] - },{ - columnWidth:.2, - layout : 'form', - labelSeparator : '选择供应室:', - items : [{//20181225 - xtype : 'multiSelect', - id : 'querySupplyRoom', - name : 'querySupplyRoom', - valueField : 'departCode', - displayField : 'name', - minChars : 0, - allowBlank : true, - editable : false, - store : supplyRoomStore, - forceSelection : false, - mode : 'local', - triggerAction : 'all', - lazyInit : true, - typeAhead : false, - anchor : '95%', + }, { + columnWidth: .2, + layout: 'form', + labelSeparator: '选择供应室:', + items: [{//20181225 + xtype: 'multiSelect', + id: 'querySupplyRoom', + name: 'querySupplyRoom', + valueField: 'departCode', + displayField: 'name', + minChars: 0, + 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、如果选中“全部”的项,则把所有的项选中,反之全部取消选择 @@ -391,10 +391,10 @@ combo.deselectAll(); } } - + //2、如果已经选中所有的项,则把“全部”项选中,反之把“全部”项取消选择 var selectAll = true; - combo.store.each(function(record) { + combo.store.each(function (record) { if (record.get('departCode') != ALL && !record.get(this.checkField)) { selectAll = false; return; @@ -403,23 +403,23 @@ } } }] - },{ - columnWidth:.2, - layout : 'form', - items : [{ - xtype : 'multiSelect', - fieldLabel : "器械包类型", - valueField : 'value', - displayField : 'value', - store : tousseTypeStore, - triggerAction : 'all', - id : 'tousseType', - name : 'tousseType', - allowBlank : false, - editable : false, - mode : 'local', - value : ALL, - anchor : '95%', + }, { + columnWidth: .2, + layout: 'form', + items: [{ + xtype: 'multiSelect', + fieldLabel: "器械包类型", + valueField: 'value', + displayField: 'value', + store: tousseTypeStore, + triggerAction: 'all', + id: 'tousseType', + name: 'tousseType', + allowBlank: false, + editable: false, + mode: 'local', + value: ALL, + anchor: '95%', listeners: { select: function (combo, record, index) { if (record.get('value') == '全部') { @@ -432,21 +432,21 @@ } } }] - },{ - columnWidth:.2, - layout : 'form', - items : [{ - xtype : 'multiSelect', - fieldLabel : "包装类型", - valueField : 'typeName', - displayField : 'typeName', - store : packageTypeJsonStore, - triggerAction : 'all', - name : "packageType", - id : "packageType", - editable : false, - allowBlank : true, - anchor : '95%', + }, { + columnWidth: .2, + layout: 'form', + items: [{ + xtype: 'multiSelect', + fieldLabel: "包装类型", + valueField: 'typeName', + displayField: 'typeName', + store: packageTypeJsonStore, + triggerAction: 'all', + name: "packageType", + id: "packageType", + editable: false, + allowBlank: true, + anchor: '95%', listeners: { select: function (combo, record, index) { if (record.get('typeName') == '全部') { @@ -459,37 +459,37 @@ } } }] - },{ - layout:'form', - columnWidth:.2, - items:[{ - xtype : 'combo', - fieldLabel : '任务组', - id : 'taskGroup', - name : 'taskGroup', - valueField : 'taskGroupName', - displayField : 'taskGroupName', - store : taskGroupJsonStore, - forceSelection : true, - allowBlank : true, - triggerAction : 'all', - anchor : '95%' - }] - },{ - layout:'form', - columnWidth:.2, - items:[{ - xtype : 'multiSelect', - fieldLabel : '器械包分组', - id : 'tousseGroupName', - name : 'tousseGroupName', - valueField : 'tousseGroupName', - displayField : 'tousseGroupName', - store : tousseGroupStore, - editable : false, - allowBlank : true, - triggerAction : 'all', - anchor : '95%', + }, { + layout: 'form', + columnWidth: .2, + items: [{ + xtype: 'combo', + fieldLabel: '任务组', + id: 'taskGroup', + name: 'taskGroup', + valueField: 'taskGroupName', + displayField: 'taskGroupName', + store: taskGroupJsonStore, + forceSelection: true, + allowBlank: true, + triggerAction: 'all', + anchor: '95%' + }] + }, { + layout: 'form', + columnWidth: .2, + items: [{ + xtype: 'multiSelect', + fieldLabel: '器械包分组', + id: 'tousseGroupName', + name: 'tousseGroupName', + valueField: 'tousseGroupName', + displayField: 'tousseGroupName', + store: tousseGroupStore, + editable: false, + allowBlank: true, + triggerAction: 'all', + anchor: '95%', listeners: { select: function (combo, record, index) { if (record.get('tousseGroupName') == '全部') { @@ -501,162 +501,162 @@ } } } - }] - },{ - layout:'form', - columnWidth:.2, - hidden:!sstsConfig.enableInstrumentSetTypeSetting, - items:[{ + }] + }, { + layout: 'form', + columnWidth: .2, + hidden: !sstsConfig.enableInstrumentSetTypeSetting, + items: [{ //用于保存时:传递器械包种类id - xtype : 'hidden', - id : 'instrumentSetTypes', - name : 'instrumentSetTypes' - },{ - xtype : 'trigger', - fieldLabel : "所属种类", - allowBlank : true, - name : "tousseSetTypeName", - id : "tousseSetTypeName", - msgTarget:'side', - readOnly:true, - onTriggerClick : function(){ + xtype: 'hidden', + id: 'instrumentSetTypes', + name: 'instrumentSetTypes' + }, { + xtype: 'trigger', + fieldLabel: "所属种类", + allowBlank: true, + name: "tousseSetTypeName", + id: "tousseSetTypeName", + msgTarget: 'side', + readOnly: true, + onTriggerClick: function () { var ids = Ext.getCmp('instrumentSetTypes').getValue(); var names = Ext.getCmp('tousseSetTypeName').getValue(); - setInstrumentSetType('instrumentSetTypes' , 'tousseSetTypeName' , ids, names); + setInstrumentSetType('instrumentSetTypes', 'tousseSetTypeName', ids, names); }, - triggerClass : 'x-form-search-trigger', - anchor : '95%' + triggerClass: 'x-form-search-trigger', + anchor: '95%' }] - },{ - layout:'form', - columnWidth:.2, - items:[{ - xtype : 'combo', - fieldLabel : '灭菌方式', - id : 'sterilizationMode', - name : 'sterilizationMode', - valueField : 'value', - displayField : 'value', - store : sterilingModeStore, - allowBlank : true, - editable : false, - triggerAction : 'all', - anchor : '95%' - }] - },{ - layout:'form', - columnWidth:.2, - hidden : sstsConfig.disableIdCard, - items:[{ - xtype : 'combo', - fieldLabel : '禁用标识牌', - id : 'isDisableIDCard', - name : 'isDisableIDCard', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore({ - fields : [ 'value'], - data : [['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : true, - triggerAction : 'all', - anchor : '95%' - }] - },{ - layout:'form', - columnWidth:.2, - labelWidth : 170, - items:[{ - xtype : 'combo', - fieldLabel : '是否代理灭菌单上的包', - id : 'isProxyDisinfection', - name : 'isProxyDisinfection', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore({ - fields : [ 'value'], - data : [['全部'],['是'],['否']] - }), - editable : false, - forceSelection : true, - mode : 'local', - allowBlank : true, - triggerAction : 'all', - anchor : '95%' - }] - },{ - layout:'form', - columnWidth:.2, - hidden : !sstsConfig.tousseWorkLoadIncreasePersonnelFilter, - items:[{ - xtype : 'combo', - id : 'operator', - name : 'operator', - queryParam : 'spell', - fieldLabel : '人员', - minChars : 0, - valueField : 'id', - displayField : 'name', - store : userJsonStore, - pageSize : 50, - forceSelection : true, - lazyInit : true, - anchor : '95%', - listWidth:300, - triggerAction : 'all', -// hideTrigger : true, - typeAhead : false, - allowBlank : true + }, { + layout: 'form', + columnWidth: .2, + items: [{ + xtype: 'combo', + fieldLabel: '灭菌方式', + id: 'sterilizationMode', + name: 'sterilizationMode', + valueField: 'value', + displayField: 'value', + store: sterilingModeStore, + allowBlank: true, + editable: false, + triggerAction: 'all', + anchor: '95%' }] - },{ - layout:'form', - columnWidth:.2, - items:[{ - xtype : 'multiSelect', - id : 'applicationDepart', - name : 'applicationDepart', - valueField : 'name', - displayField : 'name', + }, { + layout: 'form', + columnWidth: .2, + hidden: sstsConfig.disableIdCard, + items: [{ + xtype: 'combo', + fieldLabel: '禁用标识牌', + id: 'isDisableIDCard', + name: 'isDisableIDCard', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: true, + triggerAction: 'all', + anchor: '95%' + }] + }, { + layout: 'form', + columnWidth: .2, + labelWidth: 170, + items: [{ + xtype: 'combo', + fieldLabel: '是否代理灭菌单上的包', + id: 'isProxyDisinfection', + name: 'isProxyDisinfection', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['全部'], ['是'], ['否']] + }), + editable: false, + forceSelection: true, + mode: 'local', + allowBlank: true, + triggerAction: 'all', + anchor: '95%' + }] + }, { + layout: 'form', + columnWidth: .2, + hidden: !sstsConfig.tousseWorkLoadIncreasePersonnelFilter, + items: [{ + xtype: 'combo', + id: 'operator', + name: 'operator', + queryParam: 'spell', + fieldLabel: '人员', minChars: 0, + valueField: 'id', + displayField: 'name', + store: userJsonStore, + pageSize: 50, + forceSelection: true, + lazyInit: true, + anchor: '95%', + listWidth: 300, + triggerAction: 'all', + // hideTrigger : true, + typeAhead: false, + allowBlank: true + }] + }, { + layout: 'form', + columnWidth: .2, + items: [{ + xtype: 'multiSelect', + id: 'applicationDepart', + name: 'applicationDepart', + valueField: 'name', + displayField: 'name', + minChars: 0, queryParam: 'spell', - allowBlank : true, - editable : true, - fieldLabel:'申请科室', - triggerAction : 'all', - store : departJsonStore, - anchor : '95%', + allowBlank: true, + editable: true, + fieldLabel: '申请科室', + triggerAction: 'all', + store: departJsonStore, + anchor: '95%', mode: 'remote', - multiSelectIsClear:false, + multiSelectIsClear: false, listeners: { select: function (combo, record, index) { if (record.get('name') == '全部') { if (record.get('checked')) { combo.selectAll() } else { - combo.deselectAll() + combo.deselectAll() } } } } }] - },{ - layout:'form', - columnWidth:.2, - items:[{ - xtype : 'multiSelect', - id : 'deptGroupName', - name : 'deptGroupName', - valueField : 'departCodes', - displayField : 'deptGroupName', - allowBlank : true, - editable : false, - fieldLabel:'回收科室分组', - triggerAction : 'all', - store : deptGroupStore, - anchor : '95%', + }, { + layout: 'form', + columnWidth: .2, + items: [{ + xtype: 'multiSelect', + id: 'deptGroupName', + name: 'deptGroupName', + valueField: 'departCodes', + displayField: 'deptGroupName', + allowBlank: true, + editable: false, + fieldLabel: '回收科室分组', + triggerAction: 'all', + store: deptGroupStore, + anchor: '95%', listeners: { select: function (combo, record, index) { if (record.get('deptGroupName') == '全部') { @@ -669,83 +669,83 @@ } } }] - },{ - layout:'form', - columnWidth:.2, - items:[{ - xtype : 'combo', - fieldLabel : '统计方式', - id : 'statType', - name : 'statType', - valueField : 'id', - displayField : 'value', - store : new Ext.data.SimpleStore({ - fields : ['id', 'value'], - data : [['detailQuery','明细查询'],['sumQuery','汇总查询']] + }, { + layout: 'form', + columnWidth: .2, + items: [{ + xtype: 'combo', + fieldLabel: '统计方式', + id: 'statType', + name: 'statType', + valueField: 'id', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['id', 'value'], + data: [['detailQuery', '明细查询'], ['sumQuery', '汇总查询']] }), - editable : false, - forceSelection : true, - mode : 'local', - value:'detailQuery', - allowBlank : false, - triggerAction : 'all', - anchor : '95%' + editable: false, + forceSelection: true, + mode: 'local', + value: 'detailQuery', + allowBlank: false, + triggerAction: 'all', + anchor: '95%' }] }] }], - buttons:[{ - xtype : 'button', - text : '查询', - minWidth : 70, - iconCls : 'icon_search', - handler : function() { + buttons: [{ + xtype: 'button', + text: '查询', + minWidth: 70, + iconCls: 'icon_search', + handler: function () { reloadReport(); } - },{ - xtype : 'button', - text : '重置', - minWidth : 70, - iconCls : 'icon_set', - handler : function() { + }, { + xtype: 'button', + text: '重置', + minWidth: 70, + iconCls: 'icon_set', + handler: function () { $Id('startTime').value = ""; $Id('endTime').value = ""; $Id('isProxyDisinfection').value = ""; } - },{ - xtype : 'button', - text : '设置统计的物品', - minWidth : 100, - iconCls : 'icon_set', - handler : function(){ + }, { + xtype: 'button', + text: '设置统计的物品', + minWidth: 100, + iconCls: 'icon_set', + handler: function () { var code = Ext.getCmp('querySupplyRoom').getValue(); - if(code.length <= 0){ + if (code.length <= 0) { showResult("请选择供应室"); return false; } setNeedStatisticsTousse(model, code, null, 'id'); } }] }); - - + + var reportForm = new Ext.Panel({ - frame:false,//渲染面板 - autoScroll:true,//自动显示滚动条 - collapsible:true,//允许展开和收缩 - bodyPadding:5, - html:'' + 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 + layout: 'border', + items: [form, { + region: 'center', + margins: '0 0 0 0', + layout: 'fit', + items: reportForm }] }); supplyRoomRemoteStore.load();//20181225 - + }); \ No newline at end of file