Przeglądaj źródła

修改增加分支为V2AddSplit

huqi 5 lat temu
rodzic
commit
19be9b50a3
1 zmienionych plików z 30 dodań i 18 usunięć
  1. 30 18
      o2web/source/x_component_process_Xform/Form.js

+ 30 - 18
o2web/source/x_component_process_Xform/Form.js

@@ -2261,27 +2261,39 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class({
     addSplitWork: function (splitValue, trimExist, success, failure) {
         var data = { "splitValueList": splitValue, "trimExist": trimExist };
         if (this.options.readonly) {
-            this.workAction.addSplit(
-                function (json) {
-                    if (success) success(json);
-                }.bind(this),
-                function (xhr, text, error) {
-                    if (failure) failure(xhr, text, error);
-                },
-                this.businessData.work.id, data
-            );
+            o2.Actions.load("x_processplatform_assemble_surface").WorkAction.V2AddSplit(this.businessData.work.id, data,function (json) {
+                if (success) success(json);
+            }.bind(this),
+            function (xhr, text, error) {
+                if (failure) failure(xhr, text, error);
+            });
+            // this.workAction.addSplit(
+            //     function (json) {
+            //         if (success) success(json);
+            //     }.bind(this),
+            //     function (xhr, text, error) {
+            //         if (failure) failure(xhr, text, error);
+            //     },
+            //     this.businessData.work.id, data
+            // );
         } else {
             this.saveFormData(
                 function (json) {
-                    this.workAction.addSplit(
-                        function (json) {
-                            if (success) success(json);
-                        }.bind(this),
-                        function (xhr, text, error) {
-                            if (failure) failure(xhr, text, error);
-                        },
-                        this.businessData.work.id, data
-                    );
+                    o2.Actions.load("x_processplatform_assemble_surface").WorkAction.V2AddSplit(this.businessData.work.id, data,function (json) {
+                        if (success) success(json);
+                    }.bind(this),
+                    function (xhr, text, error) {
+                        if (failure) failure(xhr, text, error);
+                    });
+                    // this.workAction.addSplit(
+                    //     function (json) {
+                    //         if (success) success(json);
+                    //     }.bind(this),
+                    //     function (xhr, text, error) {
+                    //         if (failure) failure(xhr, text, error);
+                    //     },
+                    //     this.businessData.work.id, data
+                    // );
                 }.bind(this),
                 function (xhr, text, error) {
                     if (failure) failure(xhr, text, error);