MakeMaterialIssue.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. Ext.define('erp.view.pm.make.MakeMaterialIssue',{
  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!issue',
  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('editorColumnGridPanel');
  73. grid.BaseUtil.exportexcel(grid);
  74. }
  75. }
  76. }]
  77. },{
  78. text: '生成领料单',
  79. id: 'create',
  80. width: 95,
  81. iconCls: 'x-button-icon-add',
  82. style: {
  83. marginLeft: '10px'
  84. },
  85. cls: 'x-btn-gray'
  86. },/*{
  87. name: 'close',
  88. text: $I18N.common.button.erpCloseButton,
  89. iconCls: 'x-button-icon-close',
  90. cls: 'x-btn-gray',
  91. style: {
  92. marginLeft: '10px'
  93. },
  94. handler: function(btn){
  95. var main = parent.Ext.getCmp("content-panel");
  96. if(main){
  97. main.getActiveTab().close();
  98. } else {
  99. window.close();
  100. }
  101. }
  102. },*/{
  103. text: '生成拨出单',
  104. id: 'createbc',
  105. width: 95,
  106. iconCls: 'x-button-icon-add',
  107. style: {
  108. marginLeft: '10px'
  109. },
  110. cls: 'x-btn-gray',
  111. hidden:true
  112. },'->',{
  113. xtype: 'checkbox',
  114. id: 'ifnullwhman',
  115. boxLabel: '包含空',
  116. labelAlign: 'right',
  117. checked: true
  118. },{
  119. xtype: 'dbfindtrigger',
  120. hideLabel:true,
  121. emptyText:'仓管员',
  122. width:100,
  123. name:'pr_whmancode',
  124. id: 'pr_whmancode',
  125. value: '',
  126. listeners:{
  127. aftertrigger:function(t, d){
  128. t.ownerCt.down('textfield[name=pr_whmancode]').setValue(d.get('em_code'));
  129. }
  130. }
  131. },{
  132. xtype: 'checkbox',
  133. id: 'ifnulllocation',
  134. boxLabel: '包含空',
  135. labelAlign: 'right',
  136. checked: true
  137. },{
  138. xtype: 'textfield',
  139. hideLabel:true,
  140. emptyText:'储位',
  141. width:80,
  142. name:'pr_location',
  143. id: 'pr_location',
  144. value: ''
  145. },{
  146. xtype: 'dbfindtrigger',
  147. hideLabel:true,
  148. emptyText:'中心',
  149. width:100,
  150. name:'wccode',
  151. id: 'wccode',
  152. value: '',
  153. triggerName:'wc_code',
  154. dbCaller:'WorkCenter',
  155. listeners:{
  156. aftertrigger:function(t, d){
  157. t.ownerCt.down('textfield[name=wccode]').setValue(d.get('wc_code'));
  158. }
  159. }
  160. },{
  161. xtype: 'dbfindtrigger',
  162. emptyText:'工序编号',
  163. width:100,
  164. name:'st_code',
  165. id: 'st_code',
  166. value: '',
  167. hidden:true,
  168. dbCaller:'Step',
  169. triggerName:'st_code'
  170. },{
  171. margin: '3 0 0 0',
  172. xtype: 'checkbox',
  173. id: 'set',
  174. boxLabel: '按套数发料',
  175. labelAlign: 'right',
  176. checked: true
  177. },{
  178. xtype: 'checkbox',
  179. id: 'whcode',
  180. boxLabel: '按仓库分组',
  181. labelAlign: 'right',
  182. checked: true
  183. }]
  184. }
  185. },{
  186. xtype: 'erpEditorColumnGridPanel',
  187. caller: 'MakeMaterial!issue',
  188. condition: '1=2',
  189. anchor: '100% 68%',
  190. plugins: [Ext.create('erp.view.core.plugin.ProdOnhand'),
  191. Ext.create('Ext.grid.plugin.CellEditing', {
  192. clicksToEdit: 1
  193. }), Ext.create('erp.view.core.plugin.CopyPasteMenu')]
  194. }]
  195. }]
  196. });
  197. me.callParent(arguments);
  198. }
  199. });