diff --git a/o2web/source/x_component_process_Work/Main.js b/o2web/source/x_component_process_Work/Main.js index f465d0d72752f59ffe7bb56b61efedc48bf1d46d..bb13a3a88fafc4b5a973d6cb853c8e73cf38c7af 100644 --- a/o2web/source/x_component_process_Work/Main.js +++ b/o2web/source/x_component_process_Work/Main.js @@ -144,7 +144,6 @@ MWF.xApplication.process.Work.Main = new Class({ loadWorkByWork: function(id){ //var getWorkLogMothed = "getWorkLog"; //以前使用worklog,现在改成record了 //var getWorkLogMothed = (this.options.worklogType.toLowerCase()==="worklog") ? "getWorkLog" : "getRecordLog"; - var loadFormFlag = false; var loadWorkFlag = false; @@ -172,12 +171,12 @@ MWF.xApplication.process.Work.Main = new Class({ } }.bind(this); - if (this.options.form && this.options.form.id && this.options.form.app){ + if (this.options.form && this.options.form.id){ o2.Actions.invokeAsync([ {"action": this.action, "name": "loadWorkV2"}, {"action": this.action, "name": "getWorkLog"}, {"action": this.action, "name": "getWorkControl"}, - {"action": this.action, "name": "getForm"} + {"action": this.action, "name": ((layout.mobile) ? "getFormV2Mobile": "getFormV2")} ], {"success": function(jsonWork, jsonLog, jsonControl, jsonForm){ json_work = jsonWork; json_log = jsonLog; @@ -188,18 +187,25 @@ MWF.xApplication.process.Work.Main = new Class({ check(); }.bind(this), "failure": function(){ //this.close(); - }.bind(this)}, id, id, id, [this.options.form.id, this.options.form.app]); + }.bind(this)}, id, id, id, [this.options.form.id]); }else{ this.action.lookupFormWithWork(id, function(json){ var formId = json.data.id; - this.action[((layout.mobile) ? "getFormV2Mobile": "getFormV2")](formId, function(formJson){ - json_form = formJson; - loadFormFlag = true; - check(); - }, function(){ + if (json.data.form){ + json_form = json; loadFormFlag = true; check(); - }); + }else{ + this.action[((layout.mobile) ? "getFormV2Mobile": "getFormV2")](formId, function(formJson){ + json_form = formJson; + loadFormFlag = true; + check(); + }, function(){ + loadFormFlag = true; + check(); + }); + } + }.bind(this), function(){ loadFormFlag = true; check(); diff --git a/o2web/source/x_desktop/printWork.html b/o2web/source/x_desktop/printWork.html index a008c1b3ad066e84aeaa88a598e4598f5ea8b855..2568bd39a0ae87f6dcef2b05bc71eaf6a6504c2f 100644 --- a/o2web/source/x_desktop/printWork.html +++ b/o2web/source/x_desktop/printWork.html @@ -6,9 +6,8 @@ - + - WORK