目前在用extjs4做一个会议信息管理系统,以前没接触过ext,有点迷茫。
多条件检索功能哪位大侠能分享下代码吗?
ext菜鸟求助啊   

解决方案 »

  1.   

    那不弄个查询表单,然后点击查询按钮的时候将表单中的参数传递给store重新load下数据就好了store.load({ params: {ok:1,name:'abc'} });将表单组合成{ok:1,name:'abc'}这种json数据
      

  2.   


     var _store = applyUserGrid.getStore();//拿到你要加载的数据                            _store.on('beforeload', function (s) {//绑定事件
                                    s.baseParams = {//带上你的条件
                                        start: 0,
                                        limit: 30,
                                        activeId: _activeId,
                                        beginDate: _beginDate,
                                        endDate: _endDate,
                                        flag: _flag,
                                        ticketType: _ticketType
                                    };
                                });
      

  3.   

    谢谢楼上两位大侠,我也知道需要弄个form panel ,问题在于怎样把建好的表单放到 我现有的panel
    Ext.define('SoYi.view.TabPanel',{
    extend: 'Ext.tab.Panel',
    alias: 'widget.sytablepanel',
    initComponent : function(){
    var panel = Ext.create("Ext.grid.Panel",{
    store:'conferenceinfo_store',
    selModel: selModel, 
    columns: pageVar.confcolumns,
    errorSummary:false,
    title: '会议信息管理',
    id:'会议信息管理12',
    columnLines: true,
    bodyPadding:0,
    closable: true,
    bbar: Ext.create('Ext.PagingToolbar', {
    store:'conferenceinfo_store',
    pageSize: 20,
    displayInfo: true,
    displayMsg: '显示 {0} - {1} 条,共计 {2} 条',
    emptyMsg: '没有数据'
    }),
    dockedItems: [{
    xtype: 'toolbar',
    items: [{
    itemId: 'addButton',
                    text: '添加',
    tooltip:'新增', //显示提示
    iconCls:'icon-add',
    handler: function() {
    showConfWindow( 'add' );
    }
    }, '-', {
    itemId: 'modifyButton',
                    text: '修改',
    iconCls:'modify',
    disabled: true,
    handler: function() {
    var selection = panel.getView().getSelectionModel().getSelection();
    if(selection.length>1){
     Ext.MessageBox.alert("提示", "只能选择一条信息进行编辑"); 
    }else{
    showConfWindow( 'modify', '会议信息管理12' );
    }
    }
                },'-', {
    itemId: 'removeButton',
    text: '删除',
    iconCls: 'icon-delete',
    disabled: true,
    handler: function(){
    var selection = panel.getView().getSelectionModel().getSelection();
    var idAll = "";
        for(var i = 0; i < selection.length; i++){
         idAll += selection[i].get('id');
            if(i<selection.length-1){
                idAll = idAll + ",";
            } 
        }
    var panelStore = this.up("panel").getStore();
    if (selection) {
    Ext.MessageBox.confirm("标题", "数据不可恢复,您确定删除此信息吗?", function (btn) {
    if(btn == 'yes'){
    pageVar.deleteurl = pageVar.baspath + '/json/deleteUnit.xhtml';
    deleteData(idAll,'会议信息管理12');
    }
    });
    }
    }
    }, '-' ,{
    text:'刷新数据',
    iconCls:'icon-refresh',
    handler:function(){
    var panelStore = this.up("panel").getStore();
    var currPage = panelStore.currentPage;
    panelStore.removeAll();
    panelStore.load(currPage);
    }
    },'->','单位名称',new Ext.form.Field(),'省份',new Ext.form.Field(),{
    text:'查询',
    handler: function () { 
    // store.load({ params: { keyword: filed1.getValue()} }); 

    }]
    }],
    listeners: {
    'selectionchange': function(view, records) {
    panel.down('#modifyButton').setDisabled(!records.length);
    panel.down('#removeButton').setDisabled(!records.length);
    }
    }
    });
    Ext.apply(this,{
    id: 'content_panel',
        region: 'center', 
        defaults: {
       autoScroll:true,
       bodyPadding: 10
        },
        activeTab: 0,
        border: false,
       //plain: true,
        items: panel
    });
    this.callParent(arguments);
    }
    })
      

  4.   

    我写好一个form  panel  应该怎样放到上面的代码中?
      

  5.   

    var form=Ext.create("Ext.form.Panel",{/*..配置..*/});
            Ext.apply(this,{
                id: 'content_panel',
                region: 'center', 
                defaults: {
                   autoScroll:true,
                   bodyPadding: 10
                },
                activeTab: 0,
                border: false,
               //plain: true,
                items: [form,panel]
            });
    试试。