MakeMaterialGive.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. Ext.define('erp.view.pm.outsource.MakeMaterialGive',{
  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!Give',
  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: 'create',
  96. width: 95,
  97. iconCls: 'x-button-icon-add',
  98. style: {
  99. marginLeft: '10px'
  100. },
  101. cls: 'x-btn-gray'
  102. },'->',{
  103. xtype: 'checkbox',
  104. id: 'ifnulllocation',
  105. boxLabel: '包含空',
  106. labelAlign: 'right',
  107. checked: true
  108. },{
  109. xtype: 'textfield',
  110. hideLabel:true,
  111. emptyText:'储位',
  112. width:100,
  113. name:'pr_location',
  114. id: 'pr_location',
  115. value: ''
  116. },{
  117. xtype: 'checkbox',
  118. id: 'whcode',
  119. boxLabel: '按仓库分组',
  120. labelAlign: 'right',
  121. checked: true
  122. }]
  123. }
  124. },{
  125. xtype: 'erpEditorColumnGridPanel',
  126. caller: 'MakeMaterial!Give',
  127. condition: '1=2',
  128. detno: 'mm_detno',
  129. anchor: '100% 68%',
  130. pluginConfig: [Ext.create('erp.view.core.plugin.ProdOnhand')]
  131. }]
  132. }]
  133. });
  134. me.callParent(arguments);
  135. }
  136. });