Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js =================================================================== diff -u -r16499 -r17461 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 16499) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 17461) @@ -10,11 +10,33 @@ var selectedTousseType; var appFormType = ''; var invoiceDepartGroups = ''; +var appDepartCode = ''; +//申请科室Store +var appDepartJsonStore = new Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/baseData/supplyRoomConfigAction!getApplicationDepartJson.do', + method : 'POST' + }), + reader : new Ext.data.JsonReader({ + root : 'data' + },[ + {name : 'id',mapping : 'id'}, + {name : 'departCode',mapping : 'departCode'}, + {name : 'name',mapping : 'name'} + ] + ) +}); function processListParams(isSetDateValue,isLoad){ selectedApplyDate = Ext.getCmp('applyDate').getValue(); selectedTousseType = Ext.getCmp('tousseType').getValue(); - invoiceDepartGroups = Ext.getCmp('invoiceDepartGroup').getValue(); + + appDepartCode = Ext.getCmp('appDepart').getValue(); + if(!isUndefinedOrNullOrEmpty(appDepartCode)){ + invoiceDepartGroups = appDepartCode; + }else{ + invoiceDepartGroups = Ext.getCmp('invoiceDepartGroup').getValue(); + } var startDate = Ext.getCmp('startDate'); var endDate = Ext.getCmp('endDate'); @@ -246,12 +268,6 @@ }, loadMask:{msg:'正在加载,请稍候...'}, title : '发货计划列表', - listeners : { - render : function(grid){ - Ext.getCmp('tousseType').selectAll(); - refreshList(); - } - }, tbar : [{ text : '科室分组:' },{ @@ -348,16 +364,56 @@ }, anchor : '95%' },{ - text : '申请单类型:' - }, - createAppFormCombo() - ,{ text : '刷新列表', iconCls : 'btn_ext_refresh1', handler : function() { refreshList(false,true); } - }] + }], + listeners: { + render : function() { + var tbar2 = new Ext.Toolbar ({ + items : [{ + text : '申请单类型:' + }, + createAppFormCombo() + ,{ + text : '申请科室:' + }, + { + xtype : 'combo', + id : 'appDepart', + name : 'appDepart', + queryParam : 'spell', + minChars : 0, + valueField : 'departCode', + displayField : 'name', + store : appDepartJsonStore, + forceSelection : true, + lazyInit : true, + triggerAction : 'all', +// hideTrigger : true, + typeAhead : false, + allowBlank : true, +// anchor : '99%', + listeners:{ + select:function(combo, record, index){ + + refreshList(); + }, + focus : function(thiz){ + thiz.selectText(); + } + } + } + ] + }); + tbar2.render(grid.tbar); + // 自动加载列表 + Ext.getCmp('tousseType').selectAll(); + refreshList(); + } + } }); @@ -372,6 +428,7 @@ items:grid }] }); + g_stopDefault = false; globalOnKeyDown(openInvoicePlanByBarcode); window.focus(); }); \ No newline at end of file Index: ssts-web/src/main/webapp/js/globalKeyDown.js =================================================================== diff -u -r15437 -r17461 --- ssts-web/src/main/webapp/js/globalKeyDown.js (.../globalKeyDown.js) (revision 15437) +++ ssts-web/src/main/webapp/js/globalKeyDown.js (.../globalKeyDown.js) (revision 17461) @@ -3,6 +3,7 @@ * 调用此方法后,需要再调用focus方法获取焦点,以便触发onkeydown事件 * @param callback */ +var g_stopDefault = true; function globalOnKeyDown(callback){ document.onkeydown = showKeyDown; @@ -59,6 +60,8 @@ barcodeTemp = ''; } stopBubble(event); - stopDefault(event); + if(g_stopDefault){ + stopDefault(event); + } } } \ No newline at end of file