diff --git a/o2web/source/x_component_process_Work/Main.js b/o2web/source/x_component_process_Work/Main.js index ca0ba61cb303debfc51b08fe3927eb76838112ab..4177c2654558bcac4a02af590ba7e9b79f9e6301 100644 --- a/o2web/source/x_component_process_Work/Main.js +++ b/o2web/source/x_component_process_Work/Main.js @@ -142,6 +142,7 @@ MWF.xApplication.process.Work.Main = new Class({ } }, loadWorkByWork: function(id){ + debugger; //var getWorkLogMothed = "getWorkLog"; //以前使用worklog,现在改成record了 //var getWorkLogMothed = (this.options.worklogType.toLowerCase()==="worklog") ? "getWorkLog" : "getRecordLog"; var loadFormFlag = false; @@ -151,7 +152,7 @@ MWF.xApplication.process.Work.Main = new Class({ var json_work, json_log, json_control, json_form; var check = function(){ - if (loadWorkFlag && loadFormFlag && loadModuleFlag){ + if (loadWorkFlag && loadFormFlag && loadModuleFlag){ if (json_work && json_control && json_form && json_log){ this.parseData(json_work.data, json_control.data, json_form.data, json_log.data, json_work.data.recordList, json_work.data.attachmentList); if (this.mask) this.mask.hide(); @@ -164,7 +165,7 @@ MWF.xApplication.process.Work.Main = new Class({ layout.sessionPromise.then(function(){ this.openWork(); this.unLoading(); - }.bind(this)); + }.bind(this), function(){}); } } } else{ @@ -175,6 +176,9 @@ MWF.xApplication.process.Work.Main = new Class({ delete this.options.workcompletedid; this.loadWork(); }else{ + layout.sessionPromise.then(function(){ + this.close(); + }.bind(this), function(){}); //this.close(); } } @@ -196,6 +200,9 @@ MWF.xApplication.process.Work.Main = new Class({ loadFormFlag = true; check(); }.bind(this), "failure": function(){ + layout.sessionPromise.then(function(){ + this.close(); + }.bind(this), function(){}); //this.close(); }.bind(this)}, id, id, id, [this.options.formid || this.options.form.id]); }else{ @@ -242,6 +249,9 @@ MWF.xApplication.process.Work.Main = new Class({ loadWorkFlag = true; check(); }.bind(this), "failure": function(){ + layout.sessionPromise.then(function(){ + this.close(); + }.bind(this), function(){}); //this.close(); }.bind(this)}, id ); @@ -348,6 +358,9 @@ MWF.xApplication.process.Work.Main = new Class({ } } }else{ + layout.sessionPromise.then(function(){ + this.close(); + }.bind(this), function(){}); //this.close(); } }.bind(this), function(){