|
|
@@ -82,7 +82,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
|
|
|
dockedItems:[{
|
|
|
xtype:'toolbar',
|
|
|
dock:'top',
|
|
|
- items:me.dbSearchFields.concat([{
|
|
|
+ items:me.getSearchFields().concat([{
|
|
|
xtype:'button',
|
|
|
text:'查询',
|
|
|
handler:function(b){
|
|
|
@@ -265,6 +265,30 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
|
|
|
me.callParent(arguments);
|
|
|
},
|
|
|
|
|
|
+ getSearchFields: function() {
|
|
|
+ var me = this,
|
|
|
+ searchFields = me.dbSearchFields;
|
|
|
+
|
|
|
+ Ext.Array.each(searchFields, function(f) {
|
|
|
+ f.enableKeyEvents = true;
|
|
|
+ f.listeners = {
|
|
|
+ keydown: function(th, e, eOpts) {
|
|
|
+ if(e.keyCode == 13) {
|
|
|
+ me.condition = '', items = [];
|
|
|
+ Ext.Array.each(searchFields,function(f) {
|
|
|
+ var field = th.ownerCt.down('[name='+f.name+']')
|
|
|
+ items.push(field);
|
|
|
+ });
|
|
|
+ me.condition = me.getCondition(items);
|
|
|
+ me.store.loadPage(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ return searchFields;
|
|
|
+ },
|
|
|
+
|
|
|
/**
|
|
|
* 获得过滤条件
|
|
|
*/
|