VoucherFlowGrid.js 954 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. *
  3. */
  4. Ext.define('erp.view.fa.ars.VoucherFlowGrid',{
  5. extend: 'Ext.grid.Panel',
  6. alias: 'widget.voucherflowgrid',
  7. layout : 'fit',
  8. id: 'flowgrid',
  9. emptyText : $I18N.common.grid.emptyText,
  10. columnLines : true,
  11. autoScroll : true,
  12. detno: 'vf_detno',
  13. keyField: 'vf_id',
  14. mainField: 'vf_voucherid',
  15. necessaryField: 'vf_flowcode',
  16. columns: new Array(),
  17. bodyStyle:'background-color:#f1f1f1;',
  18. plugins: Ext.create('Ext.grid.plugin.CellEditing', {
  19. clicksToEdit: 1
  20. }),
  21. GridUtil: Ext.create('erp.util.GridUtil'),
  22. initComponent : function(){
  23. this.callParent(arguments);
  24. },
  25. getMyData: function(id){
  26. var me = this;
  27. var params = {
  28. caller: "Voucher!Flow",
  29. condition: "vf_voucherid=" + id
  30. };
  31. if(me.columns && me.columns.length > 0){
  32. me.GridUtil.loadNewStore(me, params);
  33. } else {
  34. me.GridUtil.getGridColumnsAndStore(me, 'common/singleGridPanel.action', params);
  35. }
  36. }
  37. });