Преглед изворни кода

经费开支申报 添加管理角色控制编辑权限

新疆警官学校中职
ndbs пре 1 година
родитељ
комит
e82bb0e359
4 измењених фајлова са 27 додато и 2 уклоњено
  1. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js
  2. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  3. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config
  4. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs

+ 18
- 0
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) {


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config Прегледај датотеку

@@ -168,12 +168,14 @@
<!--注册教师生成编号 金隅:jy;西昌:xc;大厂:dc-->
<add key="EmpNoRule" value="jy"/>
<!--校长角色Id-->
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" />
<add key="PrincipalRoleId" value="72b0df2d-66cc-4c84-a7d7-f3728c787d92" />
<!--考勤明细统计时查询的职工编号前缀 大厂:DCZZ-->
<add key="ADR_RecordUserNoPrev" value=""/>
<!--第三方登录跳转地址(最后不加/)-->
<add key="redirect_url" value="http://localhost:20472"/>
<add key="QJUrl" value="www.qj.com"/>
<!--经费开支角色Id-->
<add key="FundsApplyRoleId" value="8881181c-23ea-46f2-a9ed-19e6a24b527b" />
<!--系主任角色Id-->
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
<!--排课管理角色Id 有权限查看所有人的课-->


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/XmlConfig/system.config Прегледај датотеку

@@ -104,6 +104,8 @@
<add key="DeptDirectorRoleId" value="cccde0ce-ebfe-41f2-9a78-e49aaa21cd5a" />
<!--校长角色Id-->
<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="ElectiveLessonApplyMax" value="2" />


+ 4
- 1
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 + "' ");
}


Loading…
Откажи
Сачувај