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

人员选择组织范围出错

unknown 5 лет назад
Родитель
Сommit
0545b77deb

+ 4 - 0
o2web/source/x_component_Selector/Identity.js

@@ -23,6 +23,10 @@ MWF.xApplication.Selector.Identity = new Class({
         this.className = "Identity";
     },
     loadSelectItems : function(){
+        if( this.options.disabled ){
+            this.afterLoadSelectItem();
+            return;
+        }
         if( this.className === "Identity" && (this.options.isCheckStatus || this.options.showSelectedCount )) {
 
             var unitList = [];

+ 4 - 1
o2web/source/x_component_Selector/IdentityWidthDuty.js

@@ -24,8 +24,11 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({
 	    this.className = "IdentityWidthDuty"
     },
     loadSelectItems: function(addToNext){
-
         var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this);
+        if( this.options.disabled ){
+            this.afterLoadSelectItem();
+            return;
+        }
 
         if( this.options.resultType === "person" ){
             if( this.titleTextNode ){

+ 4 - 0
o2web/source/x_component_Selector/IdentityWidthDutyCategoryByUnit.js

@@ -33,6 +33,10 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
                 this.options.title = MWF.xApplication.Selector.LP.selectPerson;
             }
         }
+        if( this.options.disabled ){
+            this.afterLoadSelectItem();
+            return;
+        }
 
         if (this.options.dutys.length){
             this.loadInclude( function () {

+ 6 - 0
o2web/source/x_component_Selector/Unit.js

@@ -21,6 +21,12 @@ MWF.xApplication.Selector.Unit = new Class({
         this.className = "Unit";
     },
     loadSelectItems: function(addToNext){
+
+        if( this.options.disabled ){
+            this.afterLoadSelectItem();
+            return;
+        }
+
         var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this);
 
         if (this.options.units.length){

+ 6 - 0
o2web/source/x_component_Selector/UnitWithType.js

@@ -21,6 +21,12 @@ MWF.xApplication.Selector.UnitWithType = new Class({
         this.className = "UnitWithType";
     },
     loadSelectItems: function(addToNext){
+
+        if( this.options.disabled ){
+            this.afterLoadSelectItem();
+            return;
+        }
+
         var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this);
 
         var data = {};

+ 6 - 3
o2web/source/x_component_process_Work/Processor.js

@@ -1725,13 +1725,15 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){
                 if (this.json.identityRange!=="all"){
                     if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){
                         this.form.notice(MWF.xApplication.process.Xform.LP.noIdentitySelectRange, "error", this.node);
-                        return false;
+                        identityOpt.disabled = true;
+                        // return false;
                     }
                 }
                 if ( !identityOpt.noUnit && this.json.dutyRange && this.json.dutyRange!=="all"){
                     if (!identityOpt.dutys || !identityOpt.dutys.length){
                         this.form.notice(MWF.xApplication.process.Xform.LP.noIdentityDutySelectRange, "error", this.node);
-                        return false;
+                        identityOpt.disabled = true;
+                        // return false;
                     }
                 }
                 if( this.ignoreOldData ){
@@ -1748,7 +1750,8 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){
                 if (this.json.unitRange!=="all"){
                     if ( !unitOpt.units || !unitOpt.units.length){
                         this.form.notice(MWF.xApplication.process.Xform.LP.noUnitSelectRange, "error", this.node);
-                        return false;
+                        unitOpt.disabled = true;
+                        // return false;
                     }
                 }
                 if( this.ignoreOldData ){

+ 6 - 3
o2web/source/x_component_process_Xform/Org.js

@@ -166,13 +166,15 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
             if (this.json.identityRange!=="all"){
                 if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){
                     this.form.notice(MWF.xApplication.process.Xform.LP.noIdentitySelectRange, "error", this.node);
-                    return false;
+                    identityOpt.disabled = true;
+                    // return false;
                 }
             }
             if ( !identityOpt.noUnit && this.json.dutyRange && this.json.dutyRange!=="all"){
                 if (!identityOpt.dutys || !identityOpt.dutys.length){
                     this.form.notice(MWF.xApplication.process.Xform.LP.noIdentityDutySelectRange, "error", this.node);
-                    return false;
+                    identityOpt.disabled = true;
+                    // return false;
                 }
             }
             identityOpt.values = (this.json.isInput) ? [] : values;
@@ -186,7 +188,8 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
             if (this.json.unitRange!=="all"){
                 if ( !unitOpt.units || !unitOpt.units.length){
                     this.form.notice(MWF.xApplication.process.Xform.LP.noUnitSelectRange, "error", this.node);
-                    return false;
+                    unitOpt.disabled = true;
+                    // return false;
                 }
             }
             unitOpt.values = (this.json.isInput) ? [] : values;