根据创建人角色选中路由
本帖最后由 ༺中༒隐༻ 于 2024-11-17 19:31 编辑怎么更加创建人汇报对象角色选着路由
return this.org.listDutyNameWithIdentity(this.org.getPerson(this.workContext.getWork().creatorPersonDn).superior)=="总裁";
以上命令达不到效果(如果汇报对象是总裁由总裁直接审批)。
首先,this.org.getPerson(this.workContext.getWork().creatorPersonDn).superior,获取到的是一个人person,
其次,this.org.listDutyNameWithIdentity,这个方法是根据身份Identity去获取职务名称,您这里传参传入的是person个人,就已经不对了,您要在这里根据个人person先获取到身份Identity,使用方法var identityList = this.org.listIdentityWithPerson( person );获取
最后,this.org.listDutyNameWithIdentity返回的是一个数组,您直接arr=="总裁";这样判断肯定是不对的,您得到数组后,是一个对象,要进行循环判断 论坛管理员 发表于 2024-11-18 10:31
首先,this.org.getPerson(this.workContext.getWork().creatorPersonDn).superior,获取到的是一个人perso ...
大佬具体代码怎么写 管理员这边没有现成的代码,您可以按照上面的思路先写一下
页:
[1]