DeptCostGrid.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. *
  3. */
  4. Ext.define('erp.view.fa.gla.DeptCostGrid',{
  5. extend: 'Ext.grid.Panel',
  6. alias: 'widget.deptcostgrid',
  7. layout : 'fit',
  8. id: 'deptcost',
  9. emptyText : $I18N.common.grid.emptyText,
  10. columnLines : true,
  11. autoScroll : true,
  12. store: Ext.create('Ext.data.Store', {
  13. fields:[{
  14. name: 'am_yearmonth',
  15. type: 'string'
  16. },{
  17. name: 'ca_code',
  18. type: 'string'
  19. },{
  20. name: 'ca_name',
  21. type: 'string'
  22. }],
  23. data: []
  24. }),
  25. columns: [{
  26. dataIndex: 'am_yearmonth',
  27. cls: 'x-grid-header-1',
  28. sortable: false,
  29. text: '期间',
  30. width: 120
  31. },{
  32. dataIndex: 'ca_code',
  33. cls: 'x-grid-header-1',
  34. sortable: false,
  35. text: '科目编号',
  36. width: 120
  37. },{
  38. dataIndex: 'ca_name',
  39. cls: 'x-grid-header-1',
  40. sortable: false,
  41. text: '科目名称',
  42. width: 150
  43. }/*,{
  44. dataIndex: 'sl_balance',
  45. cls: 'x-grid-header-1',
  46. sortable: false,
  47. text: '余额',
  48. width: 120,
  49. xtype: 'numbercolumn',
  50. format: '0,000.000',
  51. align: 'right'
  52. }*/],
  53. bodyStyle:'background-color:#f1f1f1;',
  54. GridUtil: Ext.create('erp.util.GridUtil'),
  55. initComponent : function(){
  56. this.callParent(arguments);
  57. },
  58. viewConfig: {
  59. getRowClass: function(record) {
  60. return record.get('isCount') ? 'isCount' : null;
  61. }
  62. }
  63. });