Import.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. Ext.define('erp.view.common.init.Import',{
  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. region: 'center',
  11. layout: 'anchor',
  12. items: [{
  13. anchor: "100% 5%",
  14. xtype: 'panel',
  15. bodyStyle: 'background: #f1f2f5;',
  16. layout: {
  17. type: 'hbox'
  18. },
  19. defaults: {
  20. cls: 'custom-button',
  21. margin: '2 0 0 2'
  22. },
  23. items: [{
  24. xtype: 'button',
  25. text: '导入历史',
  26. iconCls: 'history',
  27. id: 'history'
  28. },{
  29. xtype: 'button',
  30. text: '导入配置',
  31. iconCls: 'rule',
  32. id: 'rule'
  33. },{
  34. xtype: 'button',
  35. text: '下载模板',
  36. iconCls: 'export',
  37. id: 'export'
  38. },{
  39. xtype: 'upexcel',
  40. text: '导入数据',
  41. iconCls: 'upexcel',
  42. itemCls: 'up',
  43. id: 'upexcel',
  44. hidden: true,
  45. height: 23,
  46. width: 90
  47. },{
  48. xtype: 'button',
  49. text: '导出所有数据',
  50. iconCls: 'upexcel',
  51. id: 'alldownload',
  52. hidden: true
  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: title||'数据模板',
  102. xtype: 'panel',
  103. region: 'center',
  104. height: '100%',
  105. width: '100%',
  106. id: 'template',
  107. layout: 'anchor',
  108. autoScroll: true
  109. }]
  110. }]
  111. }]
  112. });
  113. me.callParent(arguments);
  114. }
  115. });