提交 7f7a4c41 编写于 作者: U unknown

人员选择组织范围出错

上级 0013a944
...@@ -23,6 +23,10 @@ MWF.xApplication.Selector.Identity = new Class({ ...@@ -23,6 +23,10 @@ MWF.xApplication.Selector.Identity = new Class({
this.className = "Identity"; this.className = "Identity";
}, },
loadSelectItems : function(){ loadSelectItems : function(){
if( this.options.disabled ){
this.afterLoadSelectItem();
return;
}
if( this.className === "Identity" && (this.options.isCheckStatus || this.options.showSelectedCount )) { if( this.className === "Identity" && (this.options.isCheckStatus || this.options.showSelectedCount )) {
var unitList = []; var unitList = [];
......
...@@ -24,8 +24,11 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({ ...@@ -24,8 +24,11 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({
this.className = "IdentityWidthDuty" this.className = "IdentityWidthDuty"
}, },
loadSelectItems: function(addToNext){ loadSelectItems: function(addToNext){
var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this); var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this);
if( this.options.disabled ){
this.afterLoadSelectItem();
return;
}
if( this.options.resultType === "person" ){ if( this.options.resultType === "person" ){
if( this.titleTextNode ){ if( this.titleTextNode ){
......
...@@ -33,6 +33,10 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({ ...@@ -33,6 +33,10 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
this.options.title = MWF.xApplication.Selector.LP.selectPerson; this.options.title = MWF.xApplication.Selector.LP.selectPerson;
} }
} }
if( this.options.disabled ){
this.afterLoadSelectItem();
return;
}
if (this.options.dutys.length){ if (this.options.dutys.length){
this.loadInclude( function () { this.loadInclude( function () {
......
...@@ -21,6 +21,12 @@ MWF.xApplication.Selector.Unit = new Class({ ...@@ -21,6 +21,12 @@ MWF.xApplication.Selector.Unit = new Class({
this.className = "Unit"; this.className = "Unit";
}, },
loadSelectItems: function(addToNext){ loadSelectItems: function(addToNext){
if( this.options.disabled ){
this.afterLoadSelectItem();
return;
}
var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this); var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this);
if (this.options.units.length){ if (this.options.units.length){
......
...@@ -21,6 +21,12 @@ MWF.xApplication.Selector.UnitWithType = new Class({ ...@@ -21,6 +21,12 @@ MWF.xApplication.Selector.UnitWithType = new Class({
this.className = "UnitWithType"; this.className = "UnitWithType";
}, },
loadSelectItems: function(addToNext){ loadSelectItems: function(addToNext){
if( this.options.disabled ){
this.afterLoadSelectItem();
return;
}
var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this); var afterLoadSelectItemFun = this.afterLoadSelectItem.bind(this);
var data = {}; var data = {};
......
...@@ -1725,13 +1725,15 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){ ...@@ -1725,13 +1725,15 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){
if (this.json.identityRange!=="all"){ if (this.json.identityRange!=="all"){
if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){ if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){
this.form.notice(MWF.xApplication.process.Xform.LP.noIdentitySelectRange, "error", this.node); 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.noUnit && this.json.dutyRange && this.json.dutyRange!=="all"){
if (!identityOpt.dutys || !identityOpt.dutys.length){ if (!identityOpt.dutys || !identityOpt.dutys.length){
this.form.notice(MWF.xApplication.process.Xform.LP.noIdentityDutySelectRange, "error", this.node); this.form.notice(MWF.xApplication.process.Xform.LP.noIdentityDutySelectRange, "error", this.node);
return false; identityOpt.disabled = true;
// return false;
} }
} }
if( this.ignoreOldData ){ if( this.ignoreOldData ){
...@@ -1748,7 +1750,8 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){ ...@@ -1748,7 +1750,8 @@ if( MWF.xApplication.process.Xform && MWF.xApplication.process.Xform.Form ){
if (this.json.unitRange!=="all"){ if (this.json.unitRange!=="all"){
if ( !unitOpt.units || !unitOpt.units.length){ if ( !unitOpt.units || !unitOpt.units.length){
this.form.notice(MWF.xApplication.process.Xform.LP.noUnitSelectRange, "error", this.node); this.form.notice(MWF.xApplication.process.Xform.LP.noUnitSelectRange, "error", this.node);
return false; unitOpt.disabled = true;
// return false;
} }
} }
if( this.ignoreOldData ){ if( this.ignoreOldData ){
......
...@@ -166,13 +166,15 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class({ ...@@ -166,13 +166,15 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class({
if (this.json.identityRange!=="all"){ if (this.json.identityRange!=="all"){
if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){ if ( !identityOpt.noUnit && (!identityOpt.units || !identityOpt.units.length) ){
this.form.notice(MWF.xApplication.process.Xform.LP.noIdentitySelectRange, "error", this.node); 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.noUnit && this.json.dutyRange && this.json.dutyRange!=="all"){
if (!identityOpt.dutys || !identityOpt.dutys.length){ if (!identityOpt.dutys || !identityOpt.dutys.length){
this.form.notice(MWF.xApplication.process.Xform.LP.noIdentityDutySelectRange, "error", this.node); 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; identityOpt.values = (this.json.isInput) ? [] : values;
...@@ -186,7 +188,8 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class({ ...@@ -186,7 +188,8 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg = new Class({
if (this.json.unitRange!=="all"){ if (this.json.unitRange!=="all"){
if ( !unitOpt.units || !unitOpt.units.length){ if ( !unitOpt.units || !unitOpt.units.length){
this.form.notice(MWF.xApplication.process.Xform.LP.noUnitSelectRange, "error", this.node); 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; unitOpt.values = (this.json.isInput) ? [] : values;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册