Przeglądaj źródła

Merge branch 'fix/Process.submit_execption' into 'wrdp'

Merge of fix/Process.submit_execption 修复提交界面路由未按照设置的排序号列式问题 to wrdp

See merge request o2oa/o2oa!2520
蔡祥熠 5 lat temu
rodzic
commit
fb93b4e767

+ 10 - 0
o2web/source/x_component_process_Work/Processor.js

@@ -1167,6 +1167,11 @@ MWF.xApplication.process.Work.Processor = new Class({
         debugger;
         debugger;
         if(this.routeDataList)return this.routeDataList;
         if(this.routeDataList)return this.routeDataList;
         if( this.form && this.form.businessData && this.form.businessData.routeList ){
         if( this.form && this.form.businessData && this.form.businessData.routeList ){
+            this.form.businessData.routeList.sort( function(a, b){
+                var aIdx = parseInt(a.orderNumber || "9999999");
+                var bIdx = parseInt(b.orderNumber || "9999999");
+                return aIdx - bIdx;
+            }.bind(this));
             this.form.businessData.routeList.each( function(d){
             this.form.businessData.routeList.each( function(d){
                 d.selectConfigList = JSON.parse(d.selectConfig || "[]");
                 d.selectConfigList = JSON.parse(d.selectConfig || "[]");
             }.bind(this));
             }.bind(this));
@@ -1174,6 +1179,11 @@ MWF.xApplication.process.Work.Processor = new Class({
         }
         }
         if (!this.routeDataList) {
         if (!this.routeDataList) {
             o2.Actions.get("x_processplatform_assemble_surface").listRoute({"valueList": this.task.routeList}, function (json) {
             o2.Actions.get("x_processplatform_assemble_surface").listRoute({"valueList": this.task.routeList}, function (json) {
+                json.data.sort(function(a, b){
+                    var aIdx = parseInt(a.orderNumber || "9999999");
+                    var bIdx = parseInt(b.orderNumber || "9999999");
+                    return aIdx - bIdx;
+                }.bind(this));
                 json.data.each(function (d) {
                 json.data.each(function (d) {
                     d.selectConfigList = JSON.parse(d.selectConfig || "[]");
                     d.selectConfigList = JSON.parse(d.selectConfig || "[]");
                 }.bind(this));
                 }.bind(this));