diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js index 6d6d17f6b..1b439277b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js @@ -78,6 +78,12 @@ var bootstrap = function ($, learun) { // 编辑 $('#lr_edit').on('click', function () { 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)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status !== 0) { @@ -109,6 +115,12 @@ var bootstrap = function ($, learun) { // 删除 $('#lr_delete').on('click', function () { 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)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status !== 0) { @@ -131,6 +143,12 @@ var bootstrap = function ($, learun) { // 提交 $('#lr_submit').on('click', function () { 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)) { var Status = $('#gridtable').jfGridValue('Status'); if (Status !== 0) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config index 954157655..1d3ee6f77 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config @@ -168,12 +168,14 @@ - + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config index 170d37aac..7882b9183 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config @@ -104,6 +104,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs index fe2c7fb7a..c465774c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs @@ -47,9 +47,12 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem strSql.Append(" AND ( t.ApplyTime >= @startTime AND t.ApplyTime <= @endTime ) "); } var userLogin = LoginUserInfo.Get(); + //校长 var PrincipalRole = Config.GetValue("PrincipalRoleId"); + //按角色查询是否有查看的权限 + var FundsApplyRole = Config.GetValue("FundsApplyRoleId"); 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 + "' "); }