Przeglądaj źródła

Merge branch 'fix/Process.Org.unit_save_execption' into 'release'

Merge of fix/Process.Org.unit_save_execption to release

See merge request o2oa/o2oa!918

(cherry picked from commit fb51b8570462c45011a6a43df5fb3a62ed01c58b)

9221a1d8 修复保存组织的时候,管理员没有及时刷新的问题
蔡祥熠 5 lat temu
rodzic
commit
ac0c727410
1 zmienionych plików z 6 dodań i 6 usunięć
  1. 6 6
      o2web/source/x_component_Org/UnitExplorer.js

+ 6 - 6
o2web/source/x_component_Org/UnitExplorer.js

@@ -488,7 +488,6 @@ MWF.xApplication.Org.UnitExplorer.UnitContent = new Class({
         }
         }
     },
     },
     _loadContent: function(){
     _loadContent: function(){
-        debugger;
         this._listBaseInfor();
         this._listBaseInfor();
         this.loadListCount();
         this.loadListCount();
         this._listIdentityMembers();
         this._listIdentityMembers();
@@ -1053,7 +1052,6 @@ MWF.xApplication.Org.UnitExplorer.UnitContent.BaseInfor = new Class({
         this.loadAction();
         this.loadAction();
     },
     },
     getContentHtml: function(){
     getContentHtml: function(){
-        debugger;
         var html = "<table width='100%' cellpadding='3px' cellspacing='5px'>";
         var html = "<table width='100%' cellpadding='3px' cellspacing='5px'>";
         html += "<tr><td class='inforTitle'>"+this.explorer.app.lp.unitName+":</td><td class='inforContent infor_name'></td>";
         html += "<tr><td class='inforTitle'>"+this.explorer.app.lp.unitName+":</td><td class='inforContent infor_name'></td>";
         if (this.data.control.allowEdit) html += "<td class='inforTitle'>"+this.explorer.app.lp.unitUnique+":</td><td class='inforContent infor_unique'></td>";
         if (this.data.control.allowEdit) html += "<td class='inforTitle'>"+this.explorer.app.lp.unitUnique+":</td><td class='inforContent infor_unique'></td>";
@@ -1264,7 +1262,7 @@ MWF.xApplication.Org.UnitExplorer.UnitContent.BaseInfor = new Class({
         });
         });
 
 
         this.saveUnit(function(){
         this.saveUnit(function(){
-            this.cancel();
+            this.cancel(  null,true );
             this.content.propertyContentScrollNode.unmask();
             this.content.propertyContentScrollNode.unmask();
         }.bind(this), function(xhr, text, error){
         }.bind(this), function(xhr, text, error){
             var errorText = error;
             var errorText = error;
@@ -1304,7 +1302,7 @@ MWF.xApplication.Org.UnitExplorer.UnitContent.BaseInfor = new Class({
             if (cancel) cancel(xhr, text, error);
             if (cancel) cancel(xhr, text, error);
         }.bind(this));
         }.bind(this));
     },
     },
-    cancel: function(){
+    cancel: function( ev, flag ){
         if (this.data.id){
         if (this.data.id){
             var tdContents = this.editContentNode.getElements("td.inforContent");
             var tdContents = this.editContentNode.getElements("td.inforContent");
             tdContents[0].setStyles(this.style.baseInforContentNode).set("text", this.data.name || "");
             tdContents[0].setStyles(this.style.baseInforContentNode).set("text", this.data.name || "");
@@ -1317,8 +1315,10 @@ MWF.xApplication.Org.UnitExplorer.UnitContent.BaseInfor = new Class({
             tdContents[6].setStyles(this.style.baseInforContentNode).empty();
             tdContents[6].setStyles(this.style.baseInforContentNode).empty();
             tdContents[7].setStyles(this.style.baseInforContentNode).set("text", this.data.orderNumber || "");
             tdContents[7].setStyles(this.style.baseInforContentNode).set("text", this.data.orderNumber || "");
 
 
-            if (this.data.oldSuperior) this.data.superior = this.data.oldSuperior;
-            if (this.data.oldControllerList) this.data.controllerList = this.data.oldControllerList;
+            if( !flag ){
+                if (this.data.oldSuperior) this.data.superior = this.data.oldSuperior;
+                if (this.data.oldControllerList) this.data.controllerList = this.data.oldControllerList;
+            }
             delete this.data.oldSuperior;
             delete this.data.oldSuperior;
             delete this.data.oldControllerList;
             delete this.data.oldControllerList;