@@ -55,6 +55,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 分管领导 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormLeader() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -150,10 +160,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
public ActionResult DepartmentForm(string keyValue, string strEntity) | |||
{ | |||
SafetyCheckEntity entity = strEntity.ToObject<SafetyCheckEntity>(); | |||
if (entity.Status != 0) | |||
if (entity.Status == 1) | |||
{ | |||
entity.Status = 2; | |||
} | |||
else if (entity.Status == 2) | |||
{ | |||
entity.Status = 3; | |||
} | |||
else | |||
{ | |||
entity.Status = 0; | |||
@@ -40,7 +40,7 @@ | |||
<div id="Status"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">部门建议</div> | |||
<div class="lr-form-item-title">审验提醒</div> | |||
<textarea id="DepartmentRemark" class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
</div> | |||
@@ -0,0 +1,47 @@ | |||
@{ | |||
ViewBag.Title = "安全排查流程"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">网络格员</div> | |||
<input id="Name" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">处室部门</div> | |||
<input id="Department" type="text" readonly class="form-control currentInfo lr-currentInfo-department" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">责任区域<font face="宋体">*</font></div> | |||
<input id="Area" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">排查时间<font face="宋体">*</font></div> | |||
<input id="CheckTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CheckTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">发现的隐患<font face="宋体">*</font></div> | |||
<textarea id="Question" class="form-control" style="height:100px;" isvalid="yes" readonly="readonly" checkexpession="NotNull"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">整改措施及建议</div> | |||
<textarea id="idea" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Path"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;" readonly="readonly"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">审验提醒</div> | |||
<textarea id="DepartmentRemark" readonly class="form-control" style="height:100px;"></textarea> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck"> | |||
<div class="lr-form-item-title">继续上报</div> | |||
<div id="Status"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/FormLeader.js") |
@@ -0,0 +1,65 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2024-09-12 09:46 | |||
* 描 述:安全排查流程 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||
$('#Name').val(learun.clientdata.get(['userinfo']).realName); | |||
$('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: learun.clientdata.get(['userinfo']).departmentId, | |||
callback: function (_data) { | |||
$('#名称').val(_data.name); | |||
} | |||
}); | |||
$('#Path').lrUploader({ isUpload: false }); | |||
$("#Status").lrselect({ | |||
data: [{ text: "继续上报", value: "1" }, { text: "退回", value: "0" }], | |||
text: "text", | |||
value: "value" | |||
}) | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/DepartmentForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -37,6 +37,8 @@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search"></i> 查看</a> | |||
<a id="lr_department" class="btn btn-default"><i class="fa fa-search"></i> 部门审查</a> | |||
<a id="lr_leader" class="btn btn-default"><i class="fa fa-search"></i> 分管领导</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -160,17 +160,33 @@ var bootstrap = function ($, learun) { | |||
}); | |||
// 部门审查 | |||
$('#lr_department').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formformcheck', | |||
title: '部门审查', | |||
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormCheck?keyValue=' + keyValue, | |||
width: 600, | |||
height: 680, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 分管领导 | |||
$('#lr_leader').on('click', function () { | |||
var Status = $('#gridtable').jfGridValue('Status'); | |||
if (Status != 1) { | |||
learun.alert.warning("当前项目不可进行审查!"); | |||
if (Status != 2) { | |||
learun.alert.warning("当前项目操作项不允许!"); | |||
return; | |||
} | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formFormCheck', | |||
id: 'formformleader', | |||
title: '部门审查', | |||
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormCheck?keyValue=' + keyValue, | |||
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormLeader?keyValue=' + keyValue, | |||
width: 600, | |||
height: 680, | |||
callBack: function (id) { | |||
@@ -191,10 +207,13 @@ var bootstrap = function ($, learun) { | |||
if (cellvalue === 1) { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === 2) { | |||
return '<span class=\"label label-success\">完成</span>'; | |||
} else if (cellvalue === 0) { | |||
return '<span class=\"label label-info\">分管领导</span>'; | |||
} else if (cellvalue === 3) { | |||
return '<span class=\"label label-default\" >安全办</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ | |||
@@ -1089,6 +1089,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ClassPlan\IndexSchool.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\qrCode.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormLeader.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormCheck.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuArriveSchool\Form.js" /> | |||
@@ -1381,6 +1382,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormCheck.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OfficeEquipment\qrCode.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SafetyCheck\FormLeader.cshtml" /> | |||
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | |||
@@ -80,12 +80,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("MODIFYTIME")] | |||
public DateTime? Modifytime { get; set; } | |||
/// <summary> | |||
/// 0草稿 1提交/部门 2教务 | |||
/// 0草稿 1提交/部门 2分管领导 3 安全办 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int? Status { get; set; } | |||
/// <summary> | |||
/// 部门建议 | |||
/// 审验提醒 | |||
/// </summary> | |||
[Column("DEPARTMENTREMARK")] | |||
public string DepartmentRemark { get; set; } | |||
@@ -1,9 +1,11 @@ | |||
using Dapper; | |||
using Learun.Application.Organization; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -17,6 +19,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// </summary> | |||
public class SafetyCheckService : RepositoryFactory | |||
{ | |||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | |||
#region 获取数据 | |||
/// <summary> | |||
@@ -52,6 +55,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime); | |||
strSql.Append(" AND ( t.CheckTime >= @startTime AND t.CheckTime <= @endTime ) "); | |||
} | |||
var user = LoginUserInfo.Get(); | |||
if (!user.isSystem) | |||
{ | |||
if (user.roleIds.Contains("9593aeff-a62b-45ea-bfd1-c9766669c1a8"))//分管领导 | |||
{ | |||
strSql.Append(" AND (t.Status = 2 or t.Name = '" + user.userId + "')"); | |||
} | |||
else if (user.roleIds.Contains("ab90ee97-c8e2-4bc9-80b4-68aff407c777"))//部门领导 | |||
{ | |||
strSql.Append(" AND t.Department = '" + user.departmentId + "'"); | |||
} | |||
else | |||
{ | |||
strSql.Append(" AND t.Name = '" + user.userId + "' "); | |||
} | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<SafetyCheckEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||