Template.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. Ext.define('erp.view.common.init.Template',{
  2. extend: 'Ext.Viewport',
  3. layout: 'border',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. xtype: 'panel',
  10. id: 'tree',
  11. region: 'west',
  12. width: '20%',
  13. layout: 'accordion'
  14. },{
  15. xtype: 'panel',
  16. region: 'center',
  17. layout: 'anchor',
  18. items: [{
  19. anchor: "100% 5%",
  20. xtype: 'panel',
  21. bodyStyle: 'background: #f1f2f5;',
  22. layout: {
  23. type: 'hbox'
  24. },
  25. defaults: {
  26. cls: 'custom-button',
  27. margin: '1 0 0 2'
  28. },
  29. items: [{
  30. xtype: 'button',
  31. text: '导入历史',
  32. iconCls: 'history',
  33. id: 'history'
  34. },{
  35. xtype: 'button',
  36. text: '导入配置',
  37. iconCls: 'rule',
  38. id: 'rule'
  39. },{
  40. xtype: 'button',
  41. text: '下载模板',
  42. iconCls: 'export',
  43. id: 'export'
  44. },{
  45. xtype: 'upexcel',
  46. text: '导入数据',
  47. iconCls: 'upexcel',
  48. itemCls: 'up',
  49. id: 'upexcel',
  50. hidden: true,
  51. height: 23,
  52. width: 90
  53. },{
  54. xtype: 'button',
  55. text: '导出错误数据',
  56. iconCls: 'upexcel',
  57. id: 'errdownload',
  58. hidden: true
  59. },{
  60. xtype: 'button',
  61. text: '删除错误数据',
  62. iconCls: 'delete',
  63. id: 'errdelete',
  64. hidden: true
  65. },{
  66. xtype: 'button',
  67. text: '保存修改',
  68. iconCls: 'save',
  69. id: 'saveupdates',
  70. hidden: true
  71. },{
  72. xtype: 'button',
  73. text: '导出错误数据',
  74. iconCls: 'upexcel',
  75. id: 'errdownload',
  76. hidden: true
  77. },{
  78. xtype: 'checkbox',
  79. boxLabel: '只显示错误行',
  80. id: 'onlyerror',
  81. hidden: true
  82. },{
  83. xtype: 'button',
  84. text: '校验数据',
  85. iconCls: 'check',
  86. id: 'check',
  87. hidden: true
  88. },{
  89. xtype: 'button',
  90. text: '转入正式',
  91. iconCls: 'save',
  92. id: 'toformal',
  93. hidden: true
  94. }]
  95. },{
  96. anchor: "100% 95%",
  97. xtype: 'panel',
  98. autoScroll: true,
  99. layout: 'border',
  100. items: [{
  101. title: '数据模板',
  102. xtype: 'panel',
  103. bodyStyle: 'background: #f1f2f5;',
  104. region: 'center',
  105. height: '100%',
  106. width: '100%',
  107. id: 'template',
  108. layout: 'anchor',
  109. autoScroll: true
  110. }]
  111. }]
  112. }]
  113. });
  114. me.callParent(arguments);
  115. }
  116. });