Просмотр исходного кода

修复提交界面路由未按照设置的排序号列式问题

unknown 5 лет назад
Родитель
Сommit
58b1fdf843
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      o2web/source/x_component_process_Work/Processor.js

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

@@ -1167,6 +1167,11 @@ MWF.xApplication.process.Work.Processor = new Class({
         debugger;
         if(this.routeDataList)return this.routeDataList;
         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){
                 d.selectConfigList = JSON.parse(d.selectConfig || "[]");
             }.bind(this));
@@ -1174,6 +1179,11 @@ MWF.xApplication.process.Work.Processor = new Class({
         }
         if (!this.routeDataList) {
             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) {
                     d.selectConfigList = JSON.parse(d.selectConfig || "[]");
                 }.bind(this));