var columns = [];
Ext.define('OnlyCarApp.view.OnlyCarListView' ,{
extend : 'Ext.grid.Panel',
alias : 'widget.onlycarListView',
title: '单车利润统计列表',
autoWidth: true,
autoHeight : true,
region: "center",
border: true,
frame: true,
id:'onlycarlistview',
multiSelect: true,
stripeRows:true, //表格是否隔行换色,默认为false
loadMask:true, //是否在加载数据时显示遮罩效果,默认为false
columns: columns,
store : "OnlyCarListStore",
tbar:[{
text:'Excel导出',
iconCls:'common-excel-icon',
action : 'export'
}],
bbar : {
xtype : 'pagingtoolbar',
store: "OnlyCarListStore",
displayInfo: true,
displayMsg: '显示 {0} - {1} 条,共计 {2} 条',
emptyMsg: "没有数据"
}
}
);
Ext.Ajax.request({
url: window.BIZCTX_PATH + '/summary/summaryjson/selOnlyCarRow.action',
success: function(response,selfobj){
var text = response.responseText;
var textobj=eval('('+text+')');
var columns = textobj.result.list;
var store = Ext.StoreManager.get('OnlyCarListStore');
Ext.getCmp('onlycarlistview').reconfigure(store, columns);
},
failure: function(){
Ext.Msg.alert('提示','加载错误,请重试');
}
});