Import.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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: '1 0 0 1'
  22. },
  23. items: [{
  24. xtype: 'button',
  25. text: '导入历史',
  26. id: 'history'
  27. },{
  28. xtype: 'button',
  29. text: '导入配置',
  30. id: 'rule'
  31. },{
  32. xtype: 'button',
  33. text: '下载模板',
  34. id: 'export'
  35. },{
  36. xtype: 'upexcel',
  37. text: '导入数据',
  38. iconCls: 'upexcel',
  39. itemCls: 'up',
  40. id: 'upexcel',
  41. hidden: true,
  42. height: 23,
  43. width: 90
  44. },{
  45. xtype: 'button',
  46. text: '匹配料号',
  47. id: 'matchingcode',
  48. hidden: true
  49. },{
  50. xtype: 'button',
  51. text: '导出所有数据',
  52. id: 'alldownload',
  53. hidden: true
  54. },{
  55. xtype: 'button',
  56. text: '导出错误数据',
  57. id: 'errdownload',
  58. hidden: true
  59. },{
  60. xtype: 'button',
  61. text: '删除错误数据',
  62. id: 'errdelete',
  63. hidden: true
  64. },{
  65. xtype: 'button',
  66. text: '保存修改',
  67. id: 'saveupdates',
  68. hidden: true
  69. },{
  70. xtype: 'button',
  71. text: '导出错误数据',
  72. id: 'errdownload',
  73. hidden: true
  74. },{
  75. xtype: 'checkbox',
  76. baseBodyCls: 'style="padding-top: 0px;"',
  77. boxLabel: '只显示错误行',
  78. boxLabelCls:'style="font-size:11px;' +
  79. 'font-family:tahoma, arial, verdana, sans-serif;' +
  80. 'font-weight: normal;' +
  81. 'padding: 0 4px;"',
  82. id: 'onlyerror',
  83. hidden: true,
  84. height: 23,
  85. width: 100
  86. },{
  87. xtype: 'button',
  88. text: '校验数据',
  89. id: 'check',
  90. hidden: true
  91. },{
  92. xtype: 'button',
  93. text: '转入正式',
  94. id: 'toformal',
  95. hidden: true
  96. },{
  97. xtype: 'button',
  98. text: '保存到示例数据',
  99. id: 'todemo',
  100. hidden: true
  101. }]
  102. },{
  103. anchor: "100% 95%",
  104. xtype: 'panel',
  105. autoScroll: true,
  106. layout: 'border',
  107. items: [{
  108. title: title||'数据模板',
  109. xtype: 'panel',
  110. region: 'center',
  111. height: '100%',
  112. width: '100%',
  113. id: 'template',
  114. layout: 'anchor',
  115. autoScroll: true
  116. }]
  117. }]
  118. }]
  119. });
  120. me.callParent(arguments);
  121. }
  122. });