dockedItems:[{
xtype:'toolbar',
items:[{
xtype:'textfield',
id:'processUser',
name:'processUser',
labelWidth:50,
fieldLabel:'理货员',
enableKeyEvents:true,
listeners:{
keyup:function (value, e, eOpts) {
page_param={processUser:"",start:0,limit: 20};
if (e.getKey() == e.ENTER && this.getValue().length > 0) {
page_param={processUser:value.getValue(),start:0,limit: 20};
Ext.getCmp("personnelStatGrid").getStore().load({params:{processUser:value.getValue()}});
}else if(e.getKey() == e.ENTER && this.getValue().length == 0){
Ext.getCmp("personnelStatGrid").getStore().load({callback:function(r, options, success){
if (success) {
var currentpage = Ext.getCmp("personnelStatPagingToolbar").store.currentPage;
var totalpage = Ext.getCmp("personnelStatPagingToolbar").store.totalCount / Ext.getCmp("personnelStatPagingToolbar").store.pageSize + 1;
if (currentpage > totalpage ){
Ext.getCmp("personnelStatPagingToolbar").moveFirst();
}
}else{
Ext.getCmp('personnelStatGrid').store.removeAll();
}
}});
}
}
}
}]}]