VoucherNumber.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Ext.define('erp.view.fa.ars.VoucherNumber', {
  2. extend: 'Ext.Viewport',
  3. layout: 'anchor',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. anchor: '100% 10%',
  10. xtype: 'form',
  11. bodyStyle: 'background:#f1f1f1;',
  12. layout: 'column',
  13. defaults: {
  14. margin: '5 10 0 10',
  15. labelWidth: 80
  16. },
  17. items: [{
  18. xtype: 'monthdatefield',
  19. id: 'vo_yearmonth',
  20. name: 'vo_yearmonth',
  21. fieldLabel: '总账期间',
  22. fieldStyle: 'background:#FFFAFA;color:#515151;',
  23. columnWidth: .25
  24. },{
  25. xtype: 'displayfield',
  26. id: 'vo_breaks',
  27. columnWidth: .75,
  28. fieldLabel: '断号'
  29. }],
  30. tbar: [{
  31. name: 'query',
  32. id: 'query',
  33. text: $I18N.common.button.erpQueryButton,
  34. iconCls: 'x-button-icon-query',
  35. cls: 'x-btn-gray'
  36. },'->', {
  37. id: 'number',
  38. iconCls: 'x-button-icon-add',
  39. cls: 'x-btn-gray',
  40. text: $I18N.common.button.erpVoucherNumberButton
  41. },'-',{
  42. id: 'save',
  43. iconCls: 'x-button-icon-save',
  44. cls: 'x-btn-gray',
  45. text: $I18N.common.button.erpSaveButton
  46. },'-',{
  47. text: $I18N.common.button.erpCloseButton,
  48. iconCls: 'x-button-icon-close',
  49. cls: 'x-btn-gray',
  50. handler: function(){
  51. var main = parent.Ext.getCmp("content-panel");
  52. main.getActiveTab().close();
  53. }
  54. }]
  55. },{
  56. anchor: '100% 90%',
  57. xtype: 'erpEditorColumnGridPanel',
  58. caller: 'VoucherNumber',
  59. selModel: Ext.create('Ext.selection.RowModel'),
  60. condition: 'vo_yearmonth=' + Ext.Date.format(new Date(), 'Ym') +
  61. ' order by vo_lead,vo_number',
  62. autoRowNumber: true
  63. }]
  64. });
  65. me.callParent(arguments);
  66. }
  67. });