{xtype: 'textfield',
name: 'ruleCode',
id:'ruleCode_'+brUnitRuleGrid.moduleId,
fieldLabel: '规则编号',
labelWidth:60,
width:120
},
{
xtype:'button',
text:'搜索',
iconCls:'find',
id:'brUnitRuleSearchButton-'+brUnitRuleGrid.moduleId,
handler:function () {
var code = Ext.getCmp('ruleCode_'+brUnitRuleGrid.moduleId).getValue(); //获取文本框值
brUnitRuleGrid.store.pageNum = 1; //向后台传的页面
}
}
name: 'ruleCode',
id:'ruleCode_'+brUnitRuleGrid.moduleId,
fieldLabel: '规则编号',
labelWidth:60,
width:120
},
{
xtype:'button',
text:'搜索',
iconCls:'find',
id:'brUnitRuleSearchButton-'+brUnitRuleGrid.moduleId,
handler:function () {
var code = Ext.getCmp('ruleCode_'+brUnitRuleGrid.moduleId).getValue(); //获取文本框值
brUnitRuleGrid.store.pageNum = 1; //向后台传的页面
brUnitRuleGrid.store.condition = code; //给Store中的条件赋值,
brUnitRuleGridStore.loadPage(1); //加载后显示第一页}
}
本文介绍了一个基于规则编号进行搜索的功能实现方法。通过设置文本输入框并结合按钮触发搜索操作,可以将用户输入的规则编号传递给后端进行匹配查询,并重新加载数据表格以展示搜索结果。
139

被折叠的 条评论
为什么被折叠?



