| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- /**
- * 服务端计算合计栏
- */
- Ext.define('uas.view.grid.summary.Summary3', {
- extend: 'uas.view.grid.basic.Panel',
- xtype: 'summary3',
- requires: [
- 'Ext.grid.feature.Summary'
- ],
- features: [{
- ftype: 'summary',
- fixed: true,
- remoteRoot: 'data.summary'
- }],
- bbar: {
- xtype: 'pagingtoolbar',
- displayInfo: true
- },
- store: {
- type: 'companies',
- autoLoad: true,
- pageSize: 10,
- },
- columns: [{
- text: 'Company',
- width: 600,
- dataIndex: 'name',
- summaryType: 'count',
- summaryRenderer: function(value, summaryData, dataIndex) {
- return Ext.String.format('共有{0}条数据', value);
- }
- }, {
- text: 'Price',
- width: 150,
- formatter: 'usMoney',
- dataIndex: 'price',
- summaryType: 'average',
- summaryRenderer: function(value, summaryData, dataIndex) {
- return Ext.String.format('平均价格:{0}', Ext.util.Format.usMoney(value));
- }
- }, {
- text: 'Change',
- width: 80,
- renderer: 'renderChange',
- dataIndex: 'priceChange'
- }, {
- text: '% Change',
- width: 100,
- renderer: 'renderPercent',
- dataIndex: 'priceChangePct'
- }, {
- text: 'Last Updated',
- width: 115,
- formatter: 'date("m/d/Y")',
- dataIndex: 'priceLastChange'
- }, {
- xtype: 'actioncolumn',
- width: 50,
- menuDisabled: true,
- sortable: false,
- items: [{
- iconCls: 'x-fa fa-check green',
- handler: 'onApprove'
- }, {
- iconCls: 'x-fa fa-ban red',
- handler: 'onDecline'
- }]
- }]
- });
|