Manage.js 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. Ext.QuickTips.init();
  2. Ext.define('erp.controller.oa.officialDocument.sendODManagement.Manage', {
  3. extend: 'Ext.app.Controller',
  4. FormUtil: Ext.create('erp.util.FormUtil'),
  5. GridUtil: Ext.create('erp.util.GridUtil'),
  6. BaseUtil: Ext.create('erp.util.BaseUtil'),
  7. views:[
  8. 'oa.officialDocument.sendODManagement.manage.Viewport','oa.officialDocument.sendODManagement.manage.GridPanel','oa.officialDocument.sendODManagement.manage.Form',
  9. 'core.trigger.DbfindTrigger','core.form.ConDateField','core.form.WordSizeField','oa.mail.MailPaging'
  10. ],
  11. init:function(){
  12. this.control({
  13. 'erpSODManageGridPanel': {
  14. itemclick: this.onGridItemClick
  15. // },
  16. // 'erpSynergyManageFormPanel button[name=confirm]': {
  17. // click: function(btn){
  18. //
  19. // }
  20. }
  21. });
  22. },
  23. onGridItemClick: function(selModel, record){//grid行选择
  24. console.log(record);
  25. var me = this;
  26. if(record.data.sod_statuscode == 'OVERED'){
  27. var id = record.data.sod_id;
  28. var panel = Ext.getCmp("msod" + id);
  29. var main = parent.Ext.getCmp("content-panel");
  30. if(!panel){
  31. var title = "发文分发";
  32. panel = {
  33. title : title,
  34. tag : 'iframe',
  35. tabConfig:{tooltip: record.data['sod_title']},
  36. frame : true,
  37. border : false,
  38. layout : 'fit',
  39. iconCls : 'x-tree-icon-tab-tab1',
  40. html : '<iframe id="iframe_' + id + '" src="' + basePath + "jsps/oa/officialDocument/sendODManagement/sodDetail.jsp?flag=manage&id=" + id + '" height="100%" width="100%" frameborder="0" scrolling="yes"></iframe>',
  41. closable : true,
  42. listeners : {
  43. close : function(){
  44. main.setActiveTab(main.getActiveTab().id);
  45. }
  46. }
  47. };
  48. me.FormUtil.openTab(panel, "msod" + id);
  49. }else{
  50. main.setActiveTab(panel);
  51. }
  52. } else {
  53. return;
  54. }
  55. // var win = new Ext.window.Window({
  56. // id : 'win',
  57. // title: "协同查看",
  58. // height: "80%",
  59. // width: "80%",
  60. // maximizable : false,
  61. // buttonAlign : 'left',
  62. // layout : 'anchor',
  63. // items: [{
  64. // tag : 'iframe',
  65. // frame : true,
  66. // anchor : '100% 100%',
  67. // layout : 'fit',
  68. // html : '<iframe id="iframe_' + id + '" src="' + basePath + 'jsps/oa/myProcess/synergy/seeSynergy.jsp?id=' + id + '" height="100%" width="100%" frameborder="0" scrolling="yes"></iframe>'
  69. // }]
  70. // });
  71. // win.show();
  72. }
  73. });