• EXT gridGroup


                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: '跟进内容',
                         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: "客户名称",
                             200,
                            dataIndex: 'Customer_name'
                        },
    ...............
  • 相关阅读:
    中介模式与外观模式(门面模式)区别
    java反射
    Spring注解@ResponseBody,@RequestBody
    Spring事务管理
    Junit运行在Spring环境下
    java开发常用到的jar包总结
    java二维数组
    Android开发之执行定时任务AlarmManager,Timer,Thread
    Android开发之Android Context,上下文(Activity Context, Application Context)
    Android开发之创建App Widget和更新Widget内容
  • 原文地址:https://www.cnblogs.com/Celebrator/p/4573592.html
Copyright © 2020-2023  润新知