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