日期:2014-05-16 浏览次数:20502 次
var store = new Ext.data.JsonStore({
url : "supplier_queryListUp",
root : "rows",
totalProperty:"totalProperty",//总条数
fields: [{
name: 'id'
},{
name: 'supplier'
},{
name: 'linkmanName'
},{
name: 'linkmanSex'
},{
name: 'phoneCode'
},{
name: 'address'
},{
name: 'remark'
}]
});
store.setBaseParam("factorQuery",false);
//读取数据
store.load({
params:{start:0, limit:_pageSize}
});
text : "查看",
iconCls :"cwms-query",
tooltip : "根据条件查询人员档案信息",
listeners:{
"click":function(){
var _tbar = grid.getTopToolbar();
var _name = _tbar.items.get(1).getValue();
var _link_name = _tbar.items.get(4).getValue();
var _link_phone = _tbar.items.get(7).getValue();
grid.getStore().baseParams={'supplier.supplier':_name,
'supplier.linkmanName':_link_name,
'supplier.phoneCode':_link_phone,
'factorQuery':true};
store.load();
}
}
public static String getJsonList(PageBean pageBean){
JSONArray jsonArray = JSONArray.fromObject(pageBean.getData());
String result = "{totalProperty:"+pageBean.getCout()+",rows:"+jsonArray+"}";
return result;
}
public static int PAGE_SIZE = 12;
public static int getCurrentPage(int start){
int currentPage = 1;
if(start!=0){
currentPage = start/PAGE_SIZE+1;
}
return currentPage;
}