Ext.define('erp.view.sys.init.InitDataCheck', { extend : 'Ext.grid.Panel', alias : 'widget.initdatacheck', columnLines : true, forceFit : true, /* * viewConfig : { stripeRows : true, enableTextSelection : true }, */ autoScroll : true, columns : [ { text : '检测项', dataIndex : 'desc', flex : 10, renderer : function(val, meta, record) { if (record.get('check') == 'error') { meta.style = 'color: gray'; } return val; } }, { text : '', dataIndex : 'check', style : 'text-align:center', width : 150, renderer : function(val, meta, record) { meta.tdCls = val; return ''; } }, { text : '', dataIndex : 'link', width : 0, renderer : function(val, meta, record) { if (record.get('check') == 'error') { meta.tdCls = 'detail'; return '详细情况'; } return ''; } }, { menuDisabled : true, sortable : false, xtype : 'actioncolumn', width : 50, items : [ { iconCls : 'refresh', tooltip : '开账', handler : function(grid, rowIndex, colIndex) { grid.ownerCt.refreshItem(this, grid.ownerCt, rowIndex); } } ] } ], store : Ext.create('Ext.data.Store', { fields : [ { name : 'link', type : 'string' }, { name : 'desc', type : 'string' }, { name : 'groupName', type : 'string' }, { name : 'detail' } ], groupField : 'groupName', data : [ { link : 'common/GL/refreshLedger.action', desc : '总账开帐', groupName : '科目余额初始化' }, { link : 'common/GL/refreshAR.action', desc : '应收确认开帐', groupName : '应收应付初始化' }, { link : 'common/GL/refreshAP.action', desc : '应付确认开帐', groupName : '应收应付初始化' } ] }), features : [ { id : 'group', ftype : 'grouping', groupHeaderTpl : Ext.create('Ext.XTemplate', '{rows:this.formatName}', { formatName : function(f) { return f[0].data.groupName; } }), enableGroupingMenu : false } ], plugins : [ { ptype : 'rowexpander', rowBodyTpl : [ '