com.awd.jlsjlsgl.queryformpanel = Ext.extend(Ext.form.FormPanel,{
initComponent:function() {
Ext.apply(this,{
labelAlign:'right',
labelWidth:80,
defaultType:'textfield',
bodyStyle:'padding:20px;',
defaults:{width:290},
items:[{
xtype:'panel',
html:'请在下面输入查询条件:',
width:370,
border:false,
style:'padding:10 0 0 3;margin:0 0 20 10;border-bottom:1px solid #ccc;font-size:14px;font-weight:bold;'
}
,{
xtype:'panel',
layout:'column',
width:400,
border:false,
defaults:{border:false}
}
,{xtype:'textfield',fieldLabel:'条件一',name:'s_kssmc',width:288}
,{xtype:'cboFY',fieldLabel:'条件二'',name:'s_dj',field_type:'DJ',pageSize:10,editable:true,width:288}
]
});
com.awd.jlsjlsgl.queryformpanel.superclass.initComponent.call(this);
}
});
/**
* 查询窗口
* @class com.awd.py.querywin
* @extends Ext.Window
*/
com.awd.jlsjlsgl.querywin = Ext.extend(Ext.Window,{
initComponent:function() {
Ext.apply(this,{
title:'高级查询',
width:455,
height:395,
modal:true,
closeAction:'hide',
layout:'fit'
});
com.awd.jlsjlsgl.querywin.superclass.initComponent.call(this);
}
});
this.queryformpanel = new com.awd.jlsjlsgl.queryformpanel();
this.querywin = new com.awd.jlsjlsgl.querywin({items:this.queryformpanel,buttons:[{
text:'确定',
handler:this.queryResult,
scope:this
},{
text:'重置',
handler:function(){this.queryformpanel.getForm().reset();},
scope:this
},{
text:'取消',
handler:function(){this.querywin.hide();},
scope:this
}]});
//查询
,queryResult:function(){
Ext.each(this.queryformpanel.form.items.items, function(f) {
this.getStore().baseParams[f.name] = f.getValue();
},this);
this.getStore().load();
this.querywin.hide();
}