提交 7675ca40 编写于 作者: 蔡祥熠

Merge branch 'fix/Org_add_person_execption' into 'develop'

Merge of fix/[组织管理]修复组织管理新建人员某些情况报错的问题 to develop

See merge request o2oa/o2oa!1228
...@@ -157,13 +157,21 @@ MWF.xApplication.Org.PersonExplorer.PersonContent = new Class({ ...@@ -157,13 +157,21 @@ MWF.xApplication.Org.PersonExplorer.PersonContent = new Class({
}, },
_loadContent: function(){ _loadContent: function(){
this._listBaseInfor(); this._listBaseInfor();
if( this.data && this.data.id ){
this._listAttribute();
this._listIdentity();
this._listRole();
this.loadListCount();
}
//
// this.showAttribute();
},
loadList : function(){
this._listAttribute(); this._listAttribute();
this._listIdentity(); this._listIdentity();
this._listRole(); this._listRole();
this.loadListCount(); this.loadListCount();
//
// this.showAttribute();
}, },
loadListCount: function(){ loadListCount: function(){
if (this.data.woIdentityList){ if (this.data.woIdentityList){
...@@ -227,7 +235,7 @@ MWF.xApplication.Org.PersonExplorer.PersonContent = new Class({ ...@@ -227,7 +235,7 @@ MWF.xApplication.Org.PersonExplorer.PersonContent = new Class({
}, },
"attr": ["name", { "attr": ["name", {
"get": function(){return this.attributeList.join(",")}, "get": function(){return this.attributeList.join(",")},
"set": function(value){this.attributeList = value.split(/,\s*/g)} "set": function(value){ this.attributeList = value.split(/,\s*/g)}
}, "description"], }, "description"],
"onPostSave": function(item, id){ "onPostSave": function(item, id){
if (!item.data.id){ if (!item.data.id){
...@@ -489,12 +497,14 @@ MWF.xApplication.Org.PersonExplorer.PersonContent = new Class({ ...@@ -489,12 +497,14 @@ MWF.xApplication.Org.PersonExplorer.PersonContent = new Class({
{"style": "width: 30px", "text": ""} {"style": "width: 30px", "text": ""}
]); ]);
o2.Actions.load("x_organization_assemble_control").RoleAction.listWithPerson(this.data.id, function (json) { if( this.data.id ){
this.roleDataList = json.data; o2.Actions.load("x_organization_assemble_control").RoleAction.listWithPerson(this.data.id, function (json) {
json.data.each( function ( item ) { this.roleDataList = json.data;
this.roleList.push(item); json.data.each( function ( item ) {
}.bind(this)) this.roleList.push(item);
}.bind(this), null, false); }.bind(this))
}.bind(this), null, false);
}
// this.data.woPersonAttributeList.each(function(item){ // this.data.woPersonAttributeList.each(function(item){
// this.roleList.push(item); // this.roleList.push(item);
...@@ -896,6 +906,7 @@ MWF.xApplication.Org.PersonExplorer.PersonContent.BaseInfor = new Class({ ...@@ -896,6 +906,7 @@ MWF.xApplication.Org.PersonExplorer.PersonContent.BaseInfor = new Class({
} }
} }
this.explorer.actions.savePerson(data, function(json){ this.explorer.actions.savePerson(data, function(json){
debugger;
Object.merge(this.data, data); Object.merge(this.data, data);
if (this.data.id){ if (this.data.id){
this.data.id = json.data.id; this.data.id = json.data.id;
...@@ -906,6 +917,9 @@ MWF.xApplication.Org.PersonExplorer.PersonContent.BaseInfor = new Class({ ...@@ -906,6 +917,9 @@ MWF.xApplication.Org.PersonExplorer.PersonContent.BaseInfor = new Class({
this.data = Object.merge(this.data, json.data); this.data = Object.merge(this.data, json.data);
this.item.data = this.data; this.item.data = this.data;
this.item.refresh(); this.item.refresh();
this.content.loadList();
if (callback) callback(); if (callback) callback();
}.bind(this), null, json.data.id); }.bind(this), null, json.data.id);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册