MakeMaterialScrap.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. Ext.define('erp.view.pm.make.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!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. text: '打印备料单',
  79. id: 'print',
  80. width: 95,
  81. iconCls: 'x-button-icon-print',
  82. style: {
  83. marginLeft: '10px'
  84. },
  85. cls: 'x-btn-gray'
  86. },{
  87. text: '生成报废单',
  88. id: 'retreat',
  89. width: 95,
  90. iconCls: 'x-button-icon-add',
  91. style: {
  92. marginLeft: '10px'
  93. },
  94. cls: 'x-btn-gray'
  95. },{
  96. name: 'close',
  97. text: $I18N.common.button.erpCloseButton,
  98. iconCls: 'x-button-icon-close',
  99. cls: 'x-btn-gray',
  100. style: {
  101. marginLeft: '10px'
  102. },
  103. handler: function(btn){
  104. var main = parent.Ext.getCmp("content-panel");
  105. if(main){
  106. main.getActiveTab().close();
  107. } else {
  108. window.close();
  109. }
  110. }
  111. },'->']
  112. }
  113. },{
  114. xtype: 'erpEditorColumnGridPanel',
  115. caller: 'MakeMaterial!Scrap',
  116. condition: '1=2',
  117. anchor: '100% 68%',
  118. plugins: [Ext.create('erp.view.core.plugin.ProdOnhand'),
  119. Ext.create('Ext.grid.plugin.CellEditing', {
  120. clicksToEdit: 1
  121. }), Ext.create('erp.view.core.plugin.CopyPasteMenu')]
  122. }]
  123. }]
  124. });
  125. me.callParent(arguments);
  126. }
  127. });