@@ -29,7 +29,7 @@ | |||||
</div> | </div> | ||||
<div class="col-xs-12 lr-form-item" data-table="CdDept"> | <div class="col-xs-12 lr-form-item" data-table="CdDept"> | ||||
<div class="lr-form-item-title">系部负责人</div> | <div class="lr-form-item-title">系部负责人</div> | ||||
<input id="DeptDirector" type="text" class="form-control" /> | |||||
<div id="DeptDirector"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CdDept/Form.js") | @Html.AppendJsFile("/Areas/EducationalAdministration/Views/CdDept/Form.js") |
@@ -16,6 +16,7 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
bind: function () { | bind: function () { | ||||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | ||||
$('#DeptDirector').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); | |||||
}, | }, | ||||
initData: function () { | initData: function () { | ||||
if (!!keyValue) { | if (!!keyValue) { | ||||
@@ -90,7 +90,18 @@ var bootstrap = function ($, learun) { | |||||
{ label: "名称缩写", name: "DeptShortName", width: 100, align: "left" }, | { label: "名称缩写", name: "DeptShortName", width: 100, align: "left" }, | ||||
{ label: "英文名称", name: "DeptEnBrief", width: 100, align: "left" }, | { label: "英文名称", name: "DeptEnBrief", width: 100, align: "left" }, | ||||
{ label: "排序号", name: "DeptSort", width: 100, align: "left" }, | { label: "排序号", name: "DeptSort", width: 100, align: "left" }, | ||||
{ label: "系部负责人", name: "DeptDirector", width: 100, align: "left" }, | |||||
{ | |||||
label: "系部负责人", name: "DeptDirector", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||||
key: value, | |||||
keyId: 'f_encode', | |||||
callback: function (_data) { | |||||
callback(_data['f_realname']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
], | ], | ||||
mainId: 'DeptId', | mainId: 'DeptId', | ||||
isMultiselect: true, | isMultiselect: true, | ||||
@@ -201,6 +201,7 @@ | |||||
<a id="lr_form_schoolmaster" class="btn btn-success"><i class="fa fa-user"></i> 添加分管校长</a> | <a id="lr_form_schoolmaster" class="btn btn-success"><i class="fa fa-user"></i> 添加分管校长</a> | ||||
<a id="lr_form_deptmaster" class="btn btn-warning"><i class="fa fa-user"></i> 添加部门负责人</a> | <a id="lr_form_deptmaster" class="btn btn-warning"><i class="fa fa-user"></i> 添加部门负责人</a> | ||||
<a id="lr_form_diredctor" class="btn btn-warning"><i class="fa fa-user"></i> 添加班主任/辅导员</a> | <a id="lr_form_diredctor" class="btn btn-warning"><i class="fa fa-user"></i> 添加班主任/辅导员</a> | ||||
<a id="lr_form_deptdiredctor" class="btn btn-warning"><i class="fa fa-user"></i> 添加系部负责人</a> | |||||
<a id="lr_delete_auditor" class="btn btn-danger"><i class="fa fa-trash-o"></i> 移除</a> | <a id="lr_delete_auditor" class="btn btn-danger"><i class="fa fa-trash-o"></i> 移除</a> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -191,6 +191,9 @@ var bootstrap = function ($, learun) { | |||||
case '9': | case '9': | ||||
return '班主任/辅导员'; | return '班主任/辅导员'; | ||||
break; | break; | ||||
case '10': | |||||
return '系部负责人'; | |||||
break; | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
@@ -382,6 +385,19 @@ var bootstrap = function ($, learun) { | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
//添加系部负责人 | |||||
$('#lr_form_deptdiredctor').on('click', function () { | |||||
learun.layerConfirm('是否确认增加系部负责人?', function (res) { | |||||
if (res) { | |||||
var data = { auditorId: 'xbfzrid', type: '10', auditorName: '系部负责人' }; | |||||
if (!isRepeat(data.auditorId)) { | |||||
data.id = learun.newGuid(); | |||||
auditors.push(data); | |||||
$('#auditor_girdtable').jfGridSet('refreshdata', auditors); | |||||
} | |||||
} | |||||
}); | |||||
}); | |||||
/*表单添加*/ | /*表单添加*/ | ||||
$('#workform_girdtable').jfGrid({ | $('#workform_girdtable').jfGrid({ | ||||
headData: [ | headData: [ | ||||
@@ -48,6 +48,7 @@ namespace Learun.Application.WorkFlow | |||||
private ImgIBLL imgIBLL = new ImgBLL(); | private ImgIBLL imgIBLL = new ImgBLL(); | ||||
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); | ||||
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); | ||||
private CdDeptIBLL deptIbll = new CdDeptBLL(); | |||||
#region 获取数据 | #region 获取数据 | ||||
/// <summary> | /// <summary> | ||||
@@ -639,6 +640,7 @@ namespace Learun.Application.WorkFlow | |||||
switch (item.type)//1.岗位2.角色3.用户4.上下级5.表单指定字段6.某一个节点执行人 | switch (item.type)//1.岗位2.角色3.用户4.上下级5.表单指定字段6.某一个节点执行人 | ||||
//liang 20200813 新增type=7 分管校长 | //liang 20200813 新增type=7 分管校长 | ||||
//dyy 20220715 新增type=9 班主任/辅导员 | //dyy 20220715 新增type=9 班主任/辅导员 | ||||
//liang 20230315 新增type=10 系部负责人 | |||||
{ | { | ||||
case 1:// 岗位 | case 1:// 岗位 | ||||
var userRelationList = userRelationIBLL.GetUserIdList(item.auditorId); | var userRelationList = userRelationIBLL.GetUserIdList(item.auditorId); | ||||
@@ -947,7 +949,7 @@ namespace Learun.Application.WorkFlow | |||||
//判断用户所在班级是否有班主任/辅导员:如果有,找到班主任/辅导员;如果没有,不发; | //判断用户所在班级是否有班主任/辅导员:如果有,找到班主任/辅导员;如果没有,不发; | ||||
string diredctorId = "";//班主任 | string diredctorId = "";//班主任 | ||||
string tutorId = "";//辅导员 | string tutorId = "";//辅导员 | ||||
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuNoByAccount(paramConfig.CurrentUser.Account); | |||||
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuNoByAccount(paramConfig.CreateUser.Account); | |||||
if (stuInfoBasicEntity != null) | if (stuInfoBasicEntity != null) | ||||
{ | { | ||||
var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(stuInfoBasicEntity.ClassNo); | var classInfoEntity = classInfoIBLL.GetClassInfoEntityByClassNo(stuInfoBasicEntity.ClassNo); | ||||
@@ -986,6 +988,29 @@ namespace Learun.Application.WorkFlow | |||||
} | } | ||||
} | } | ||||
break; | break; | ||||
case 10://liang 20230315 新增type=10 系部负责人 | |||||
var stuInfoBasicEntitydept = stuInfoBasicIBLL.GetStuNoByAccount(paramConfig.CreateUser.Account); | |||||
if (stuInfoBasicEntitydept != null) | |||||
{ | |||||
var deptinfo = deptIbll.GetCdDeptEntityByNo(stuInfoBasicEntitydept.DeptNo); | |||||
if (deptinfo != null) | |||||
{ | |||||
var directorEntity = userIBLL.GetEntityByAccount(deptinfo.DeptDirector); | |||||
if (directorEntity != null) | |||||
{ | |||||
if (!list.Exists(m => m.Id == directorEntity.F_UserId)) | |||||
{ | |||||
list.Add(new NWFUserInfo() | |||||
{ | |||||
Id = directorEntity.F_UserId, | |||||
Account = directorEntity.F_Account, | |||||
Name = directorEntity.F_RealName | |||||
}); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
break; | |||||
} | } | ||||
} | } | ||||
} | } | ||||