Viewport.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. Ext.define('erp.view.scm.product.IntegratedQuery.Viewport',{
  2. extend: 'Ext.Viewport',
  3. layout: 'anchor',
  4. hideBorders: true,
  5. initComponent : function(){
  6. var me = this;
  7. Ext.apply(me, {
  8. items: [{
  9. region: 'north',
  10. xtype: "erpIntegratedQueryFormPanel",
  11. anchor: '100% 25%'
  12. },{
  13. region: 'south',
  14. xtype: "erpIntegratedQueryGridPanel",
  15. anchor: '100% 25%'
  16. },{
  17. anchor: '100% 50%',
  18. xtype: "tabpanel",
  19. id:'tabpanel',
  20. minTabWidth:80,
  21. layout:'border',
  22. items:[{
  23. title:'库存明细',
  24. id:'ProductWh',
  25. iconCls:'workrecord-log' ,
  26. /** items:[{
  27. xtype:'DeskProductGridPanel1',
  28. height:height,
  29. }]**/
  30. listeners:{
  31. activate:function(tab){
  32. caller='Desk!ProductWh';
  33. var item={
  34. itemId:'ProductWhgrid',
  35. xtype:'DeskProductGridPanel1',
  36. height:height
  37. };
  38. var tabgrid=tab.getComponent('ProductWhgrid');
  39. if(!tab.getComponent('ProductWhgrid')){
  40. BaseQueryCondition=BaseQueryCondition?BaseQueryCondition:'1=2';
  41. tab.add(item);
  42. }else{
  43. BaseQueryCondition=BaseQueryCondition?BaseQueryCondition:'1=2';
  44. if(tabgrid.LastCondition!=BaseQueryCondition){
  45. tabgrid.getCount("Desk!ProductWh",BaseQueryCondition);
  46. tabgrid.LastCondition=BaseQueryCondition;
  47. }
  48. }
  49. }
  50. }
  51. },
  52. {
  53. title:'在 途',
  54. iconCls:'workrecord-log' ,
  55. id:'MPSPRonorder',
  56. listeners:{
  57. activate:function(tab){
  58. caller='Desk!MPSPRonorder';
  59. var item={
  60. itemId:'MPSPRonordergrid',
  61. xtype:'DeskProductGridPanel2',
  62. height:height,
  63. };
  64. var tabgrid=tab.getComponent('MPSPRonordergrid');
  65. if(!tabgrid){
  66. item.LastCondition=BaseQueryCondition;
  67. tab.add(item);
  68. }else{
  69. if(tabgrid.LastCondition!=BaseQueryCondition){
  70. //说明条件更新了
  71. tabgrid.getCount('MPSPRonordergrid',BaseQueryCondition||'1=2');
  72. tabgrid.LastCondition=BaseQueryCondition;
  73. }
  74. }
  75. }
  76. }
  77. },
  78. {
  79. title:'预 约',
  80. id:'MakeCommit',
  81. iconCls:'workrecord-log' ,
  82. listeners:{
  83. activate:function(tab){
  84. caller='Desk!MakeCommit';
  85. var item={
  86. itemId:'MakeCommitgrid',
  87. xtype:'DeskProductGridPanel3',
  88. height:height,
  89. };
  90. var tabgrid=tab.getComponent('MakeCommitgrid');
  91. if(!tabgrid){
  92. item.LastCondition=BaseQueryCondition;
  93. tab.add(item);
  94. }else{
  95. if(tabgrid.LastCondition!=BaseQueryCondition){
  96. tabgrid.getCount('Desk!MakeCommit',BaseQueryCondition||'1=2');
  97. tabgrid.LastCondition=BaseQueryCondition;
  98. }
  99. }
  100. }
  101. }
  102. },{
  103. title:'在制明细',
  104. id:'MakeOnline',
  105. iconCls:'workrecord-log' ,
  106. listeners:{
  107. activate:function(tab){
  108. caller='Desk!MakeOnline';
  109. var item={
  110. itemId:'MakeOnlinegrid',
  111. xtype:'DeskProductGridPanel7',
  112. height:height,
  113. };
  114. var tabgrid=tab.getComponent('MakeOnlinegrid');
  115. if(!tabgrid){
  116. item.LastCondition=BaseQueryCondition;
  117. tab.add(item);
  118. }else{
  119. if(tabgrid.LastCondition!=BaseQueryCondition){
  120. tabgrid.getCount('Desk!MakeOnline',BaseQueryCondition||'1=2');
  121. tabgrid.LastCondition=BaseQueryCondition;
  122. }
  123. }
  124. }
  125. }
  126. }]
  127. }]
  128. });
  129. me.callParent(arguments);
  130. }
  131. });