ReandpunishGrid.js 986 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. Ext.define('erp.view.hr.emplmana.ReandpunishGrid',{
  2. extend: 'Ext.grid.Panel',
  3. alias: 'widget.reandpunishgrid',
  4. layout : 'fit',
  5. id: 'reandpunishgrid',
  6. caller: 'Arreandpunish',
  7. emptyText : $I18N.common.grid.emptyText,
  8. columnLines : true,
  9. autoScroll : true,
  10. detno: 'ar_detno',
  11. keyField: 'ar_id',
  12. mainField: 'ar_arid',
  13. columns: [],
  14. bodyStyle:'background-color:#f1f1f1;',
  15. plugins: Ext.create('Ext.grid.plugin.CellEditing', {
  16. clicksToEdit: 1
  17. }),
  18. bbar: {xtype: 'erpToolbar'},
  19. GridUtil: Ext.create('erp.util.GridUtil'),
  20. initComponent : function(){
  21. this.callParent(arguments);
  22. },
  23. getMyData: function(id){
  24. if(!id){
  25. id = 0;
  26. }
  27. var me = this;
  28. var params = {
  29. caller: "Arreandpunish",
  30. condition: "ar_arid=" + id
  31. };
  32. if(me.columns && me.columns.length > 2){
  33. me.GridUtil.loadNewStore(me, params);
  34. } else {
  35. me.GridUtil.getGridColumnsAndStore(me, 'common/singleGridPanel.action', params);
  36. }
  37. }
  38. });