提交 cb20bc51 编写于 作者: NoSubject's avatar NoSubject

当work无法获取时,关闭页面

上级 76b2ffd3
......@@ -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(){
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册