Explorar el Código

Merge branch 'fix/attachment_notshow_completed' into 'develop'

Merge of fix/attachment_notshow_completed to develop 草稿模式bug修复(归档后不显示附件)

See merge request o2oa/o2oa!398
胡起 hace 5 años
padre
commit
5f9508a6bb

+ 1 - 1
o2web/source/x_component_process_Xform/Attachment.js

@@ -1031,7 +1031,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
 
 
     _loadUserInterface: function () {
     _loadUserInterface: function () {
         this.node.empty();
         this.node.empty();
-        if (this.form.businessData.activity && this.form.businessData.activity.id){
+        if (this.form.businessData.work.startTime){
             this.loadAttachmentController();
             this.loadAttachmentController();
             this.fireEvent("load");
             this.fireEvent("load");
         }
         }

+ 4 - 4
o2web/source/x_component_process_Xform/Form.js

@@ -1076,7 +1076,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
     },
     },
 
 
     saveFormData: function (callback, failure, history, data, issubmit) {
     saveFormData: function (callback, failure, history, data, issubmit) {
-        if (this.businessData.activity && this.businessData.activity.id) {
+        if (this.businessData.work.startTime) {
             this.saveFormDataInstance(callback, failure, history, data, issubmit);
             this.saveFormDataInstance(callback, failure, history, data, issubmit);
         } else {
         } else {
             this.saveFormDataDraft(callback, failure, history, data, issubmit);
             this.saveFormDataDraft(callback, failure, history, data, issubmit);
@@ -1678,7 +1678,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
     },
     },
 
 
     processWork: function () {
     processWork: function () {
-        if (!this.businessData.activity || !this.businessData.activity.id) {
+        if (!this.businessData.work.startTime) {
             this.startDraftProcess();
             this.startDraftProcess();
         } else {
         } else {
             if (this.json.mode == "Mobile") {
             if (this.json.mode == "Mobile") {
@@ -3319,7 +3319,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         }
         }
     },
     },
     deleteWork: function () {
     deleteWork: function () {
-        if (!this.businessData.activity || !this.businessData.activity.id) {
+        if (!this.businessData.work.startTime) {
             this.deleteDraftWork();
             this.deleteDraftWork();
         } else {
         } else {
             var _self = this;
             var _self = this;
@@ -3420,7 +3420,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
         }, this.businessData.work.id);
         }, this.businessData.work.id);
     },
     },
     doDeleteWork: function (success, failure) {
     doDeleteWork: function (success, failure) {
-        if (!this.businessData.activity || !this.businessData.activity.id) {
+        if (!this.businessData.work.startTime) {
             this.doDeleteDraftWork(success, failure);
             this.doDeleteDraftWork(success, failure);
         } else {
         } else {
             if (this.businessData.control["allowDelete"]) {
             if (this.businessData.control["allowDelete"]) {