Przeglądaj źródła

审批人增加部门负责人代码

新疆影视学院高职
liangkun 3 lat temu
rodzic
commit
65fb0acac5
3 zmienionych plików z 63 dodań i 1 usunięć
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml
  2. +16
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js
  3. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.cshtml Wyświetl plik

@@ -199,6 +199,7 @@
<a id="lr_node_auditor" class="btn btn-warning"><i class="fa fa-user"></i>&nbsp;添加节点执行人</a>
<a id="lr_form_auditor" class="btn btn-success"><i class="fa fa-user"></i>&nbsp;添加表字段</a>
<a id="lr_form_schoolmaster" class="btn btn-success"><i class="fa fa-user"></i>&nbsp;添加分管校长</a>
<a id="lr_form_deptmaster" class="btn btn-warning"><i class="fa fa-user"></i>&nbsp;添加部门负责人</a>
<a id="lr_delete_auditor" class="btn btn-danger"><i class="fa fa-trash-o"></i>&nbsp;移除</a>
</div>
</div>


+ 16
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFScheme/NodeForm.js Wyświetl plik

@@ -185,6 +185,9 @@ var bootstrap = function ($, learun) {
case '7':
return '分管校长';
break;
case '8':
return '部门负责人';
break;
}
}
},
@@ -350,7 +353,19 @@ var bootstrap = function ($, learun) {
}
});
});

//添加部门负责人
$('#lr_form_deptmaster').on('click', function () {
learun.layerConfirm('是否确认增加部门负责人?', function (res) {
if (res) {
var data = { auditorId: 'bmfzrid', type: '8', auditorName: '部门负责人' };
if (!isRepeat(data.auditorId)) {
data.id = learun.newGuid();
auditors.push(data);
$('#auditor_girdtable').jfGridSet('refreshdata', auditors);
}
}
});
});
/*表单添加*/
$('#workform_girdtable').jfGrid({
headData: [


+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Process/NWFProcessBLL.cs Wyświetl plik

@@ -795,6 +795,52 @@ namespace Learun.Application.WorkFlow
});
}

}
break;
case 8://liang 20210706新增部门负责人判断
//获取流程创建用户的分管领导
//判断用户所在部门是否有上级部门:如果有,找到上级部门的负责人;如果没有,找本部门的分管校长;
string deptMasterId = "";
var selfDepart2 = departmentIBLL.GetEntity(paramConfig.CreateUser.DepartmentId);
if (selfDepart2 != null)
{
//本部门存在部门负责人
if (!string.IsNullOrEmpty(selfDepart2.F_Manager))
{
deptMasterId = selfDepart2.F_Manager;
}
else
{
//本部门不存在就找上级部门
var parentDepart = departmentIBLL.GetEntity(selfDepart2.F_ParentId);
if (parentDepart != null)
{
if (!string.IsNullOrEmpty(selfDepart2.F_Manager))
{
deptMasterId = parentDepart.F_Manager;
}
}
}
}
//找到部门负责人就增加审批人
if (!string.IsNullOrEmpty(deptMasterId))
{
var userEntity7 = userIBLL.GetEntityByUserId(deptMasterId);

if (null != userEntity7)
{
if (!list.Exists(m => m.Id == userEntity7.F_UserId))
{
list.Add(new NWFUserInfo()
{
Id = userEntity7.F_UserId,
Account = userEntity7.F_Account,
Name = userEntity7.F_RealName
});
}

}

}
break;
}


Ładowanie…
Anuluj
Zapisz