ExchangeGl.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. Ext.define('erp.view.fa.gla.ExchangeGl',{
  2. extend: 'Ext.Viewport',
  3. layout: {
  4. type: 'vbox',
  5. align: 'center'
  6. },
  7. hideBorders: true,
  8. initComponent : function(){
  9. var me = this;
  10. Ext.apply(me, {
  11. items: [{
  12. xtype: 'form',
  13. flex: 3,
  14. width: '70%',
  15. bodyStyle: 'background: #f1f1f1;',
  16. title: '汇兑损益',
  17. layout: 'vbox',
  18. fieldDefaults: {
  19. margin: '2 3 2 60'
  20. },
  21. items: [{
  22. xtype: 'displayfield',
  23. fieldLabel: '总账期间',
  24. name: 'yearmonth',
  25. id: 'yearmonth'
  26. },{
  27. xtype: 'cateTreeDbfindTrigger',
  28. fieldLabel: '汇兑损益科目',
  29. name: 'ca_code',
  30. id: 'ca_code'
  31. },{
  32. xtype: 'checkbox',
  33. boxLabel: '将期末调汇产生的凭证立即登账',
  34. name: 'account',
  35. id: 'account'
  36. }],
  37. buttonAlign: 'center',
  38. buttons: [{
  39. text: '执行',
  40. id: 'deal',
  41. cls: 'x-btn-gray',
  42. iconCls: 'x-button-icon-submit'
  43. }, {
  44. xtype: 'erpCloseButton'
  45. }]
  46. }, {
  47. flex: 7,
  48. width: '70%',
  49. xtype: 'gridpanel',
  50. columnLines: true,
  51. columns: [{
  52. text: '编号',
  53. flex: 0.4,
  54. dataIndex: 'cm_code',
  55. cls: 'x-grid-header-1',
  56. align: 'center',
  57. tdCls: 'x-grid-cell-special'
  58. },{
  59. text: '币别',
  60. flex: 0.5,
  61. dataIndex: 'cm_crname',
  62. align: 'center',
  63. cls: 'x-grid-header-1'
  64. },{
  65. text: '汇率',
  66. flex: 1.5,
  67. dataIndex: 'cm_endrate',
  68. cls: 'x-grid-header-1',
  69. xtype: 'numbercolumn',
  70. align: 'center',
  71. format: '0,000.00000000',
  72. editor: {
  73. xtype: 'numberfield',
  74. hideTrigger: true
  75. }
  76. }],
  77. plugins: [Ext.create('Ext.grid.plugin.CellEditing', {
  78. clicksToEdit: 1
  79. })],
  80. store: new Ext.data.Store({
  81. fields: ['cm_code', 'cm_crname', 'cm_endrate'],
  82. data: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
  83. })
  84. }]
  85. });
  86. this.callParent(arguments);
  87. }
  88. });