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

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!2009
蔡祥熠 5 лет назад
Родитель
Сommit
b5317aef96

+ 2 - 0
o2web/source/x_component_process_Work/Main.js

@@ -446,6 +446,7 @@ MWF.xApplication.process.Work.Main = new Class({
         this.currentTask = this.getCurrentTaskData(workData);
         this.taskList = workData.taskList;
         this.readList = workData.readList;
+        this.routeList = workData.routeList;
         this.work = workData.work;
         this.workCompleted = (workData.work.completedTime) ? workData.work : null;
 
@@ -661,6 +662,7 @@ MWF.xApplication.process.Work.Main = new Class({
                     "task": this.currentTask,
                     "workLogList": this.workLogList,
                     "recordList": this.recordList,
+                    "routeList" : this.routeList,
                     "attachmentList": this.attachmentList,
                     "inheritedAttachmentList": this.inheritedAttachmentList,
                     "formInfor": this.formInfor,

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

@@ -1164,6 +1164,14 @@ MWF.xApplication.process.Work.Processor = new Class({
         delete this.okButton;
     },
     getRouteDataList: function () {
+        debugger;
+        if(this.routeDataList)return this.routeDataList;
+        if( this.form && this.form.businessData && this.form.businessData.routeList ){
+            this.form.businessData.routeList.each( function(d){
+                d.selectConfigList = JSON.parse(d.selectConfig || "[]");
+            }.bind(this));
+            this.routeDataList = this.form.businessData.routeList;
+        }
         if (!this.routeDataList) {
             o2.Actions.get("x_processplatform_assemble_surface").listRoute({"valueList": this.task.routeList}, function (json) {
                 json.data.each(function (d) {
@@ -1783,6 +1791,26 @@ MWF.xApplication.process.Work.Processor = new Class({
     },
     saveOrgsWithCheckEmpower: function (callback) {
         debugger;
+        var currentRoute = this.selectedRoute ? this.selectedRoute.retrieve("route") : "";
+
+        var visableOrg = this.getVisableOrgData( currentRoute );
+        var needOrgLength = visableOrg.length;
+
+        var loadedOrgLength = 0;
+        if ( this.orgItems && this.orgItems.length)loadedOrgLength = this.orgItems.length;
+
+        if( needOrgLength !== loadedOrgLength ){
+            MWF.xDesktop.notice(
+                "error",
+                {"x": "center", "y": "center"},
+                MWF.xApplication.process.Work.LP.loadedOrgCountUnexpected,
+                this.node,
+                {"x": 0, "y": 30},
+                {"closeOnBoxClick": true, "closeOnBodyClick": true, "fixed": true, "delayClose": 6000}
+            );
+            return false;
+        }
+
         if (!this.orgItems || !this.orgItems.length) {
             if (callback) callback();
             return true;