Viewport.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. tab.add(item);
  41. }else{
  42. if(tabgrid.LastCondition!=BaseQueryCondition){
  43. tabgrid.getCount("Desk!ProductWh",BaseQueryCondition);
  44. tabgrid.LastCondition=BaseQueryCondition;
  45. }
  46. }
  47. }
  48. }
  49. },
  50. {
  51. title:'在 途',
  52. iconCls:'workrecord-log' ,
  53. id:'MPSPRonorder',
  54. listeners:{
  55. activate:function(tab){
  56. caller='Desk!MPSPRonorder';
  57. var item={
  58. itemId:'MPSPRonordergrid',
  59. xtype:'DeskProductGridPanel2',
  60. height:height,
  61. };
  62. var tabgrid=tab.getComponent('MPSPRonordergrid');
  63. if(!tabgrid){
  64. item.LastCondition=BaseQueryCondition;
  65. tab.add(item);
  66. }else{
  67. if(tabgrid.LastCondition!=BaseQueryCondition){
  68. //说明条件更新了
  69. tabgrid.getCount('MPSPRonordergrid',BaseQueryCondition);
  70. tabgrid.LastCondition=BaseQueryCondition;
  71. }
  72. }
  73. }
  74. }
  75. },
  76. {
  77. title:'预 约',
  78. id:'MakeCommit',
  79. iconCls:'workrecord-log' ,
  80. listeners:{
  81. activate:function(tab){
  82. caller='Desk!MakeCommit';
  83. var item={
  84. itemId:'MakeCommitgrid',
  85. xtype:'DeskProductGridPanel3',
  86. height:height,
  87. };
  88. var tabgrid=tab.getComponent('MakeCommitgrid');
  89. if(!tabgrid){
  90. item.LastCondition=BaseQueryCondition;
  91. tab.add(item);
  92. }else{
  93. if(tabgrid.LastCondition!=BaseQueryCondition){
  94. tabgrid.getCount('Desk!MakeCommit',BaseQueryCondition);
  95. tabgrid.LastCondition=BaseQueryCondition;
  96. }
  97. }
  98. }
  99. }
  100. }]
  101. }]
  102. });
  103. me.callParent(arguments);
  104. }
  105. });