Explorar el Código

Merge branch 'fix/base_authentication_async' into 'wrdp'

只有启用时才执行新建检查

See merge request o2oa/o2oa!2101
胡起 hace 5 años
padre
commit
348a7c65a1
Se han modificado 1 ficheros con 16 adiciones y 16 borrados
  1. 16 16
      o2web/source/x_component_process_Xform/Form.js

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

@@ -1331,7 +1331,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
             //    this.fireEvent("afterClose");
         }
         if (!this.options.readonly) {
-            if (this.businessData.work && this.businessData.work.id && this.json.checkDraft) {
+            if (this.businessData.work && this.businessData.work.id) {
                 if (this.app.inBrowser && navigator.sendBeacon) {
                     debugger;
                     var obj = this.workAction.action.actions["checkDraft"];
@@ -3945,22 +3945,22 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
     finishOnMobile: function () {
         var _self = this;
         //新建检查
-        if (this.json.checkDraft){
-            this.workAction.checkDraft(this.businessData.work.id, function (json) {
-                // var str = JSON.stringify(json);
-                _self.finishOnMobileReal();
-            }.bind(this), function () {
-                _self.finishOnMobileReal();
-            }, false);
-        }else {
-            _self.finishOnMobileReal();
-        }
-        // this.workAction.checkDraft(this.businessData.work.id, function (json) {
-        //     // var str = JSON.stringify(json);
+        // if (this.json.checkDraft){
+        //     this.workAction.checkDraft(this.businessData.work.id, function (json) {
+        //         // var str = JSON.stringify(json);
+        //         _self.finishOnMobileReal();
+        //     }.bind(this), function () {
+        //         _self.finishOnMobileReal();
+        //     }, false);
+        // }else {
         //     _self.finishOnMobileReal();
-        // }.bind(this), function () {
-        //     _self.finishOnMobileReal();
-        // }, false);
+        // }
+        this.workAction.checkDraft(this.businessData.work.id, function (json) {
+            // var str = JSON.stringify(json);
+            _self.finishOnMobileReal();
+        }.bind(this), function () {
+            _self.finishOnMobileReal();
+        }, false);
     },
 
     finishOnMobileReal: function () {