Index: ssts-web/src/main/webapp/disinfectsystem/reportforms/foreignTousseApplicationReport.js =================================================================== diff -u -r32535 -r33231 --- ssts-web/src/main/webapp/disinfectsystem/reportforms/foreignTousseApplicationReport.js (.../foreignTousseApplicationReport.js) (revision 32535) +++ ssts-web/src/main/webapp/disinfectsystem/reportforms/foreignTousseApplicationReport.js (.../foreignTousseApplicationReport.js) (revision 33231) @@ -2,52 +2,52 @@ var grid; var apparatusInfuTypeStore; var formWindow; -function removeGridItem(){ +function removeGridItem() { var rows = top.Ext.getCmp('configGrid').getSelectionModel().getSelections();// 返回值为 if (rows) { - for ( var i = 0; i < rows.length; i++) { + for (var i = 0; i < rows.length; i++) { apparatusInfuTypeStore.remove(rows[i]); } } } var myMask; var enableShowForeignTousseApplicationReportMaterials; -Ext.onReady(function() { +Ext.onReady(function () { Ext.QuickTips.init(); - if(sstsConfig.hasOwnProperty('enableShowForeignTousseApplicationReportMaterials') && sstsConfig.enableShowForeignTousseApplicationReportMaterials){ + if (sstsConfig.hasOwnProperty('enableShowForeignTousseApplicationReportMaterials') && sstsConfig.enableShowForeignTousseApplicationReportMaterials) { enableShowForeignTousseApplicationReportMaterials = true; - }else{ + } else { enableShowForeignTousseApplicationReportMaterials = false; } - function reloadReport(){ - var startTime= $Id('startTime').value; + function reloadReport() { + var startTime = $Id('startTime').value; var endTime = $Id('endTime').value; var deptName = $Id('departSearch').value; var patientName = $Id('patientName').value; var deliverStatus = $Id('deliverStatus').value; -// var goodsName = $Id('goodsSearch').value; + // var goodsName = $Id('goodsSearch').value; var departOfPatient = $Id('departOfPatient').value; var companyName = $Id('companyName').value; var goodsName = ''; var noDisplayTerminatedIPValue = $Id('noDisplayTerminatedIP').value; var noDisplayTerminatedIP = true; - if(noDisplayTerminatedIPValue == '是'){ + if (noDisplayTerminatedIPValue == '是') { noDisplayTerminatedIP = false; } var showNoInvoieValue = $Id('showNoInvoie').value; var showNoInvoie = true; - if(showNoInvoieValue == '否'){ + if (showNoInvoieValue == '否') { showNoInvoie = false; } var used = $Id('used').value; - if('全部' == used){ + if ('全部' == used) { used = ""; } var timeType = $Id('timeType').value; var materialId; - if(enableShowForeignTousseApplicationReportMaterials){ + if (enableShowForeignTousseApplicationReportMaterials) { materialId = Ext.getCmp('materialSearch').getValue();//材料id - if(!Ext.getCmp('materialSearch').getRawValue() || Ext.getCmp('materialSearch').getRawValue() == ""){//避免清空后还有id的情况 + if (!Ext.getCmp('materialSearch').getRawValue() || Ext.getCmp('materialSearch').getRawValue() == "") {//避免清空后还有id的情况 materialId = ""; } } @@ -58,407 +58,407 @@ }); myMask.show(); var jasperreportName; - if(enableShowForeignTousseApplicationReportMaterials){ + if (enableShowForeignTousseApplicationReportMaterials) { jasperreportName = 'foreignTousseApplicationShowMaterialsReport.jasper'; - }else{ + } else { jasperreportName = 'foreignTousseApplicationReport.jasper'; } var url = WWWROOT + '/jasperreports/jasperreportsAction!createReportFromJavaBeanSource.do'; var params = { - jasperreportName : jasperreportName, - startDay : startTime, - endDay : endTime, - deptName : deptName, - goodsName : goodsName, - patientName : patientName, - deliverStatus : deliverStatus, - departOfPatient : departOfPatient, - companyName : companyName, - noDisplayTerminatedIP : noDisplayTerminatedIP, - materialId:materialId, - showNoInvoie:showNoInvoie, - foreignTousseName:foreignTousseName, - timeType:timeType, - used : used, - reportName:'foreignTousseApplicationReport' + jasperreportName: jasperreportName, + startDay: startTime, + endDay: endTime, + deptName: deptName, + goodsName: goodsName, + patientName: patientName, + deliverStatus: deliverStatus, + departOfPatient: departOfPatient, + companyName: companyName, + noDisplayTerminatedIP: noDisplayTerminatedIP, + materialId: materialId, + showNoInvoie: showNoInvoie, + foreignTousseName: foreignTousseName, + timeType: timeType, + used: used, + reportName: 'foreignTousseApplicationReport' } - searchReport(url,params); + searchReport(url, params); } - + var dt = new Date(); var startDayofMonth = dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/01"; var endDayofMonth = dt.getFullYear() + "/" + (dt.getMonth() + 1) + "/" + dt.getDate() + " 23:59"; - + //外来器械包的store var foreignTousseJsonStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!queryForeignOrSplitTousseName.do', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!queryForeignOrSplitTousseName.do', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'name',mapping : 'name'} - ] + reader: new Ext.data.JsonReader({ + root: 'data' + }, [ + { name: 'name', mapping: 'name' } + ] ) }); var departJsonStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getSettleAccountsDepartJson.do', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'id',mapping : 'id'}, - {name : 'name',mapping : 'name'} - ] + reader: new Ext.data.JsonReader({ + root: 'data' + }, [ + { name: 'id', mapping: 'id' }, + { name: 'name', mapping: 'name' } + ] ) }); var supplierStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/supplierAction!getSupplierInfoByType.do?supplierType=' + encodeURI(supplierType), - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/supplierAction!getSupplierInfoByType.do?supplierType=' + encodeURI(supplierType), + method: 'POST' }), - reader : new Ext.data.JsonReader({ - root : 'data' - },[ - {name : 'id',mapping : 'id'}, - {name : 'companyName',mapping : 'companyName'} - ] + reader: new Ext.data.JsonReader({ + root: 'data' + }, [ + { name: 'id', mapping: 'id' }, + { name: 'companyName', mapping: 'companyName' } + ] ) }); //材料名称store var materialStore; var formHigth; - if(enableShowForeignTousseApplicationReportMaterials){ + if (enableShowForeignTousseApplicationReportMaterials) { materialStore = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: WWWROOT + '/disinfectSystem/baseData/materialDefinitionAction!getForeignMaterialDefinitionData.do', method: 'POST' }), - reader : new Ext.data.JsonReader({ - totalProperty : 'totalCount', - root : 'data' + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data' }, [ - {name : 'id',mapping : 'materialDefinitionId'}, - {name : 'name',mapping : 'name'}, - {name : 'showName',mapping : 'showName'}, - {name : 'isImplant',mapping : 'isImplant'} + { name: 'id', mapping: 'materialDefinitionId' }, + { name: 'name', mapping: 'name' }, + { name: 'showName', mapping: 'showName' }, + { name: 'isImplant', mapping: 'isImplant' } ]) }); formHigth = 180; - }else{ + } else { formHigth = 153; } var tousseAndDiposableGoodsStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchInsideTousseAndDiposableGoods.do?showUnAppDiposableGoods=true', - method : 'POST' + proxy: new Ext.data.HttpProxy({ + url: WWWROOT + '/disinfectSystem/baseData/tousseDefinitionAction!searchInsideTousseAndDiposableGoods.do?showUnAppDiposableGoods=true', + method: 'POST' }), - reader : new Ext.data.JsonReader({ - totalProperty : 'totalCount', - root : 'data' + reader: new Ext.data.JsonReader({ + totalProperty: 'totalCount', + root: 'data' }, [ - {name : 'id',mapping : 'id'}, - {name : 'spelling',mapping : 'spelling'}, - {name : 'name',mapping : 'name'}, - {name : 'displayName',mapping : 'displayName'}, - {name : 'amount',mapping : 'amount'}] + { name: 'id', mapping: 'id' }, + { name: 'spelling', mapping: 'spelling' }, + { name: 'name', mapping: 'name' }, + { name: 'displayName', mapping: 'displayName' }, + { name: 'amount', mapping: 'amount' }] ) }); - + 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 : formHigth, - items : [{ - layout : 'column', - height : 150, - labelWidth : 120, - items : [{ - xtype : 'hidden', - name : 'departCoding', - id : 'departCoding' - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - fieldLabel : '查询时间类型', - id : 'timeType', - name : 'timeType', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : ['value'], - data : [ ['接收时间'],['发货时间'] ] + 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: formHigth, + items: [{ + layout: 'column', + height: 150, + labelWidth: 120, + items: [{ + xtype: 'hidden', + name: 'departCoding', + id: 'departCoding' + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '查询时间类型', + id: 'timeType', + name: 'timeType', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['接收时间'], ['发货时间']] }), - forceSelection : true, - value:'接收时间', - editable : false, - mode : 'local', - triggerAction : 'all', + forceSelection: true, + value: '接收时间', + editable: false, + mode: 'local', + triggerAction: 'all', anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [ { - xtype : 'datefield', - 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%', + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'datefield', + 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), - listeners : { - specialkey : function(field, e) { + 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 : .25, - layout : 'form', - items : [ { - xtype : 'datefield', - 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, + }] + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'datefield', + 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: new Date(endDayofMonth), - listeners : { - specialkey : function(field, e) { + 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(); } } } } - } ] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - fieldLabel : '查询已终止的申请单', - id : 'noDisplayTerminatedIP', - name : 'noDisplayTerminatedIP', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : ['value'], - data : [ ['是'],['否'] ] + }] + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '查询已终止的申请单', + id: 'noDisplayTerminatedIP', + name: 'noDisplayTerminatedIP', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] }), - forceSelection : true, - value:'否', - editable : false, - mode : 'local', - triggerAction : 'all', + forceSelection: true, + value: '否', + editable: false, + mode: 'local', + triggerAction: 'all', anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - id : 'departSearch', - name : 'departSearch', - queryParam : 'spell', - fieldLabel : '申请科室', - minChars : 0, - valueField : 'id', - displayField : 'name', - store : departJsonStore, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : true, - typeAhead : false, - allowBlank : true, + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + id: 'departSearch', + name: 'departSearch', + queryParam: 'spell', + fieldLabel: '申请科室', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: departJsonStore, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + allowBlank: true, anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - id : 'departOfPatient', - name : 'departOfPatient', - queryParam : 'spell', - fieldLabel : '病人所属科室', - minChars : 0, - valueField : 'id', - displayField : 'name', - store : departJsonStore, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : true, - typeAhead : false, - allowBlank : true, + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + id: 'departOfPatient', + name: 'departOfPatient', + queryParam: 'spell', + fieldLabel: '病人所属科室', + minChars: 0, + valueField: 'id', + displayField: 'name', + store: departJsonStore, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: true, + typeAhead: false, + allowBlank: true, anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'textfield', - fieldLabel : '病人姓名', - allowBlank : true, - name : "patientName", - id : "patientName", + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'textfield', + fieldLabel: '病人姓名', + allowBlank: true, + name: "patientName", + id: "patientName", anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - id : 'deliverStatus', - name : 'deliverStatus', - queryParam : 'spell', - fieldLabel : '发货状态', - minChars : 0, - valueField : 'name', - displayField : 'name', - store : new Ext.data.SimpleStore({ - fields : ['name'], - data : [['待发货'],['部分发货'],['已发货']] + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + id: 'deliverStatus', + name: 'deliverStatus', + queryParam: 'spell', + fieldLabel: '发货状态', + minChars: 0, + valueField: 'name', + displayField: 'name', + store: new Ext.data.SimpleStore({ + fields: ['name'], + data: [['待发货'], ['部分发货'], ['已发货']] }), - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - mode : 'local', - hideTrigger : false, - typeAhead : false, - allowBlank : true, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + mode: 'local', + hideTrigger: false, + typeAhead: false, + allowBlank: true, anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - fieldLabel : '物品名称', - id : 'foreignTousseName', - name : 'foreignTousseName', - queryParam : 'spell', - minChars : 0, - valueField : 'name', - displayField : 'name', - width : 240, + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '物品名称', + id: 'foreignTousseName', + name: 'foreignTousseName', + queryParam: 'spell', + minChars: 0, + valueField: 'name', + displayField: 'name', + width: 240, anchor: '95%', - listConfig: {width : 270}, + listConfig: { width: 270 }, matchFieldWidth: false, - store : foreignTousseJsonStore, - pageSize : 12, - lazyInit : true, - triggerAction : 'all', - hideTrigger : false, - typeAhead : false, - allowBlank : true, - queryDelay : 0, - forceSelection : false + store: foreignTousseJsonStore, + pageSize: 12, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: true, + queryDelay: 0, + forceSelection: false }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - id : 'companyName', - name : 'companyName', - queryParam : 'spell', - fieldLabel : '供应商', - minChars : 0, - valueField : 'companyName', - displayField : 'companyName', - store : supplierStore, - forceSelection : true, - lazyInit : true, - triggerAction : 'all', - hideTrigger : false, - typeAhead : false, - allowBlank : true, + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + id: 'companyName', + name: 'companyName', + queryParam: 'spell', + fieldLabel: '供应商', + minChars: 0, + valueField: 'companyName', + displayField: 'companyName', + store: supplierStore, + forceSelection: true, + lazyInit: true, + triggerAction: 'all', + hideTrigger: false, + typeAhead: false, + allowBlank: true, anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - fieldLabel : '显示未发货物品', - id : 'showNoInvoie', - name : 'showNoInvoie', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : ['value'], - data : [ ['是'],['否'] ] + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '显示未发货物品', + id: 'showNoInvoie', + name: 'showNoInvoie', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['是'], ['否']] }), - forceSelection : true, - value:'是', - editable : false, - mode : 'local', - triggerAction : 'all', + forceSelection: true, + value: '是', + editable: false, + mode: 'local', + triggerAction: 'all', anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - items : [{ - xtype : 'combo', - fieldLabel : '外来器械包已使用', - id : 'used', - name : 'used', - valueField : 'value', - displayField : 'value', - store : new Ext.data.SimpleStore( { - fields : ['value'], - data : [ ['全部'],['是'],['否'] ] + }, { + columnWidth: .25, + layout: 'form', + items: [{ + xtype: 'combo', + fieldLabel: '外来器械包已使用', + id: 'used', + name: 'used', + valueField: 'value', + displayField: 'value', + store: new Ext.data.SimpleStore({ + fields: ['value'], + data: [['全部'], ['是'], ['否']] }), - forceSelection : true, - value:'全部', - editable : true, - mode : 'local', - triggerAction : 'all', + forceSelection: true, + value: '全部', + editable: true, + mode: 'local', + triggerAction: 'all', anchor: '95%' }] - },{ - columnWidth : .25, - layout : 'form', - hidden:!enableShowForeignTousseApplicationReportMaterials, + }, { + columnWidth: .25, + layout: 'form', + hidden: !enableShowForeignTousseApplicationReportMaterials, items: [{ xtype: 'combo', id: 'materialSearch', @@ -480,23 +480,23 @@ }] }] }], - 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('goodsSearch').value = ""; + // $Id('goodsSearch').value = ""; $Id('departSearch').value = ""; $Id('patientName').value = ""; $Id('deliverStatus').value = ""; @@ -505,30 +505,30 @@ } }] }); - - + + 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 }] }); - - if(supplyRoomType == 1 || supplyRoomType == "1"){ + + if (supplyRoomType == 1 || supplyRoomType == "1") { departJsonStore.load(); - }else{ + } else { var departSearch = Ext.getCmp('departSearch'); departSearch.setValue(orgUnitName); departSearch.disable();