MakeMaterialScrap.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Ext.define('erp.view.pm.outsource.MakeMaterialScrap',{
  2. extend: 'Ext.Viewport',
  3. layout: 'fit',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. layout: 'anchor',
  10. items: [{
  11. xtype: 'erpGridPanel5',
  12. anchor: '100% 32%',
  13. caller: 'Make!OS!Scrap',
  14. necessaryField: 'ma_code',
  15. bbar: {
  16. xtype: 'toolbar',
  17. items: [{
  18. xtype: 'tool',
  19. type: 'restore',
  20. tooltip: '最大化',
  21. listeners:{
  22. click: function(btn){
  23. window.open(window.location.href);
  24. }
  25. }
  26. },'->',{
  27. name: 'query',
  28. id: 'query',
  29. text: $I18N.common.button.erpQueryButton,
  30. iconCls: 'x-button-icon-query',
  31. cls: 'x-btn-gray'
  32. },{
  33. xtype: 'combo',
  34. fieldLabel:'集团采购料',
  35. id: 'groupPurs',
  36. width:150,
  37. labelWidth:75,
  38. store: Ext.create('Ext.data.Store', {
  39. fields: ['display', 'value'],
  40. data : [{"display": '是', "value": 'pr_isgrouppurc<>0'},
  41. {"display": '否', "value": 'NVL(pr_isgrouppurc,0)=0'},
  42. {"display": '全部', "value": ''}]
  43. }),
  44. displayField: 'display',
  45. valueField: 'value',
  46. queryMode: 'local',
  47. value:'',
  48. editable:false,
  49. hidden:true
  50. },{
  51. name: 'export',
  52. text: $I18N.common.button.erpExportButton,
  53. iconCls: 'x-button-icon-excel',
  54. cls: 'x-btn-gray',
  55. style: {
  56. marginLeft: '10px'
  57. },
  58. menu: [{
  59. iconCls: 'main-msg',
  60. text: '发料主表',
  61. listeners: {
  62. click: function(m){
  63. var grid = Ext.getCmp('grid');
  64. grid.BaseUtil.exportexcel(grid);
  65. }
  66. }
  67. },{
  68. iconCls: 'main-msg',
  69. text: '发料从表',
  70. listeners: {
  71. click: function(m){
  72. var grid = Ext.getCmp('makeMaterialGrid');
  73. grid.BaseUtil.exportexcel(grid);
  74. }
  75. }
  76. }]
  77. },{
  78. name: 'close',
  79. text: $I18N.common.button.erpCloseButton,
  80. iconCls: 'x-button-icon-close',
  81. cls: 'x-btn-gray',
  82. style: {
  83. marginLeft: '10px'
  84. },
  85. handler: function(btn){
  86. var main = parent.Ext.getCmp("content-panel");
  87. if(main){
  88. main.getActiveTab().close();
  89. } else {
  90. window.close();
  91. }
  92. }
  93. },{
  94. text: '打印备料单',
  95. id: 'print',
  96. width: 95,
  97. iconCls: 'x-button-icon-print',
  98. style: {
  99. marginLeft: '10px'
  100. },
  101. cls: 'x-btn-gray'
  102. },{
  103. text: '生成报废单',
  104. id: 'retreat',
  105. width: 95,
  106. iconCls: 'x-button-icon-add',
  107. style: {
  108. marginLeft: '10px'
  109. },
  110. cls: 'x-btn-gray'
  111. },'->']
  112. }
  113. },{
  114. xtype: 'erpEditorColumnGridPanel',
  115. caller: 'MakeMaterial!OS!Scrap',
  116. condition: '1=2',
  117. anchor: '100% 68%',
  118. pluginConfig: [Ext.create('erp.view.core.plugin.ProdOnhand')]
  119. }]
  120. }]
  121. });
  122. me.callParent(arguments);
  123. }
  124. });