Ext.define(‘Task‘, { extend: ‘Ext.data.Model‘, idProperty: ‘id‘, fields: [ { name: ‘Customer_name‘, type: ‘string‘ }, { name: ‘Follow‘, type: ‘string‘ }, { name: ‘Follow_Type‘, type: ‘string‘ }, { name: ‘department_name‘, type: ‘string‘ }, { name: ‘employee_name‘, type: ‘string‘ }, { name: ‘Follow_date‘, type: ‘date‘, dateFormat: ‘Y-d-m‘ } ] }); var store = Ext.create(‘Ext.data.Store‘, { model: ‘Task‘, pageSize: 20, remoteSort: false, remoteFilter: true, proxy: { type: ‘ajax‘, url: ‘/data/customer/FollowHandler.ashx?action=personGrid‘, reader: { type: ‘json‘, root: ‘rows‘, totalProperty: ‘total‘ } }, sorters: [ { property: ‘id‘, direction: ‘desc‘ } ], groupField: ‘Customer_name‘,//分组 autoLoad: true });
var grid = Ext.create(‘Ext.grid.Panel‘, { id: ‘PersonContactsList_grid‘, floatable: false, border: false, store: store, reload: true, bbar: pagebbar, title: ‘个人客户‘, features: [{//分组选项 id: ‘persongroup‘, ftype: ‘groupingsummary‘, groupHeaderTpl: ‘{name}‘, hideGroupedHeader: true, enableGroupingMenu: false, startCollapsed: true }], columns: [{ text: ‘跟进内容‘, width: 600, locked: true, tdCls: ‘task‘, sortable: true, dataIndex: ‘Follow‘, hideable: false, summaryType: ‘count‘, summaryRenderer: function (value, summaryData, dataIndex) {//组内数量统计 return ((value === 0 || value > 1) ? ‘(‘ + value + ‘ 跟进)‘ : ‘(1 跟进)‘); }, renderer: function (value, meta, record) { return ‘<div style="white-space:normal;overflow: visible;">‘ + value + ‘</div>‘; } }, { text: "客户名称", width: 200, dataIndex: ‘Customer_name‘ },...............
时间: 2024-09-30 18:36:16