@@ -78,6 +78,12 @@ var bootstrap = function ($, learun) { | |||||
// 编辑 | // 编辑 | ||||
$('#lr_edit').on('click', function () { | $('#lr_edit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
var ApplyUser = $('#gridtable').jfGridValue('ApplyUser'); | |||||
var user = learun.clientdata.get(['userinfo']).userId; | |||||
if (ApplyUser != user) { | |||||
learun.alert.warning("当前项不可编辑!"); | |||||
return; | |||||
} | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var Status = $('#gridtable').jfGridValue('Status'); | var Status = $('#gridtable').jfGridValue('Status'); | ||||
if (Status !== 0) { | if (Status !== 0) { | ||||
@@ -109,6 +115,12 @@ var bootstrap = function ($, learun) { | |||||
// 删除 | // 删除 | ||||
$('#lr_delete').on('click', function () { | $('#lr_delete').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
var ApplyUser = $('#gridtable').jfGridValue('ApplyUser'); | |||||
var user = learun.clientdata.get(['userinfo']).userId; | |||||
if (ApplyUser != user) { | |||||
learun.alert.warning("当前项不可删除!"); | |||||
return; | |||||
} | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var Status = $('#gridtable').jfGridValue('Status'); | var Status = $('#gridtable').jfGridValue('Status'); | ||||
if (Status !== 0) { | if (Status !== 0) { | ||||
@@ -131,6 +143,12 @@ var bootstrap = function ($, learun) { | |||||
// 提交 | // 提交 | ||||
$('#lr_submit').on('click', function () { | $('#lr_submit').on('click', function () { | ||||
var keyValue = $('#gridtable').jfGridValue('Id'); | var keyValue = $('#gridtable').jfGridValue('Id'); | ||||
var ApplyUser = $('#gridtable').jfGridValue('ApplyUser'); | |||||
var user = learun.clientdata.get(['userinfo']).userId; | |||||
if (ApplyUser != user) { | |||||
learun.alert.warning("当前项不可编辑提交!"); | |||||
return; | |||||
} | |||||
if (learun.checkrow(keyValue)) { | if (learun.checkrow(keyValue)) { | ||||
var Status = $('#gridtable').jfGridValue('Status'); | var Status = $('#gridtable').jfGridValue('Status'); | ||||
if (Status !== 0) { | if (Status !== 0) { | ||||
@@ -168,12 +168,14 @@ | |||||
<!--注册教师生成编号 金隅:jy;西昌:xc;大厂:dc--> | <!--注册教师生成编号 金隅:jy;西昌:xc;大厂:dc--> | ||||
<add key="EmpNoRule" value="jy"/> | <add key="EmpNoRule" value="jy"/> | ||||
<!--校长角色Id--> | <!--校长角色Id--> | ||||
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" /> | |||||
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" /> | |||||
<!--考勤明细统计时查询的职工编号前缀 大厂:DCZZ--> | <!--考勤明细统计时查询的职工编号前缀 大厂:DCZZ--> | ||||
<add key="ADR_RecordUserNoPrev" value=""/> | <add key="ADR_RecordUserNoPrev" value=""/> | ||||
<!--第三方登录跳转地址(最后不加/)--> | <!--第三方登录跳转地址(最后不加/)--> | ||||
<add key="redirect_url" value="http://localhost:20472"/> | <add key="redirect_url" value="http://localhost:20472"/> | ||||
<add key="QJUrl" value="www.qj.com"/> | <add key="QJUrl" value="www.qj.com"/> | ||||
<!--经费开支角色Id--> | |||||
<add key="FundsApplyRoleId" value="8881181c-23ea-46f2-a9ed-19e6a24b527b" /> | |||||
<!--系主任角色Id--> | <!--系主任角色Id--> | ||||
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" /> | <add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" /> | ||||
<!--排课管理角色Id 有权限查看所有人的课--> | <!--排课管理角色Id 有权限查看所有人的课--> | ||||
@@ -104,6 +104,8 @@ | |||||
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" /> | <add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" /> | ||||
<!--校长角色Id--> | <!--校长角色Id--> | ||||
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" /> | <add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" /> | ||||
<!--经费开支角色Id--> | |||||
<add key="FundsApplyRoleId" value="8881181c-23ea-46f2-a9ed-19e6a24b527b" /> | |||||
<add key="QJUrl" value="www.qj.com"/> | <add key="QJUrl" value="www.qj.com"/> | ||||
<!-- 报名选修课的最大课程数 --> | <!-- 报名选修课的最大课程数 --> | ||||
<add key="ElectiveLessonApplyMax" value="2" /> | <add key="ElectiveLessonApplyMax" value="2" /> | ||||
@@ -47,9 +47,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
strSql.Append(" AND ( t.ApplyTime >= @startTime AND t.ApplyTime <= @endTime ) "); | strSql.Append(" AND ( t.ApplyTime >= @startTime AND t.ApplyTime <= @endTime ) "); | ||||
} | } | ||||
var userLogin = LoginUserInfo.Get(); | var userLogin = LoginUserInfo.Get(); | ||||
//校长 | |||||
var PrincipalRole = Config.GetValue("PrincipalRoleId"); | var PrincipalRole = Config.GetValue("PrincipalRoleId"); | ||||
//按角色查询是否有查看的权限 | |||||
var FundsApplyRole = Config.GetValue("FundsApplyRoleId"); | |||||
var loginInfoRoleIds = LoginUserInfo.Get().roleIds; | var loginInfoRoleIds = LoginUserInfo.Get().roleIds; | ||||
if (!userLogin.Description.Contains("管理员") && !loginInfoRoleIds.Split(',').Contains(PrincipalRole)) | |||||
if (!userLogin.Description.Contains("管理员") && !loginInfoRoleIds.Split(',').Contains(PrincipalRole)&& !loginInfoRoleIds.Split(',').Contains(FundsApplyRole)) | |||||
{ | { | ||||
strSql.Append(" AND t.ApplyUser = '" + userLogin.userId + "' "); | strSql.Append(" AND t.ApplyUser = '" + userLogin.userId + "' "); | ||||
} | } | ||||