安全不符合项
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--项目级:HSE不符合清单
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '664ACF2F-6750-4389-AF11-F429010FC987')
|
||||
BEGIN
|
||||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||||
VALUES (N'664ACF2F-6750-4389-AF11-F429010FC987', N'HSE不符合清单', N'Check/HSE/CheckProblem.aspx', 10, N'467A0CB9-737D-4451-965E-869EBC3A4BD6', N'Menu_HSSE', 0,1, 1);
|
||||
END
|
||||
GO
|
||||
|
||||
update Sys_Menu
|
||||
set IsUsed=0
|
||||
where MenuId='2FC8AA2A-F421-4174-A05E-2711167AF141'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
<f:DropDownList ID="drpNature" runat="server" Label="问题性质" EnableEdit="true" EmptyText="请选择问题性质" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" LabelAlign="right" LabelWidth="80px" Width="180px">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnRset" OnClick="btnRset_Click" ToolTip="重置查询条件" Icon="ArrowUndo" EnablePostBack="true" runat="server">
|
||||
<f:Button ID="btnRset" OnClick="btnRset_Click" Text="重置查询" ToolTip="重置查询条件" Icon="ArrowUndo" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnQuery" OnClick="btnQuery_Click" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
<f:Button ID="btnQuery" OnClick="btnQuery_Click" Text="查询" ToolTip="查询" Icon="SystemSearch" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
@@ -109,9 +109,9 @@
|
||||
<f:RadioItem Value="0" Text="已闭环" />
|
||||
</f:RadioButtonList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
|
||||
<f:Button ID="btnNew" Text="新增" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Hidden="true">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
<f:Button ID="btnImport" Text="导入" ToolTip="导入" Icon="ApplicationGet" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
||||
@@ -42,6 +42,12 @@ namespace FineUIPro.Web.Check.HSE
|
||||
}
|
||||
//权限按钮方法
|
||||
GetButtonPower();
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId) || (this.CurrUser.UnitId != null && this.CurrUser.UnitId != Const.UnitId_XJYJ))
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
this.btnImport.Hidden = true;
|
||||
}
|
||||
|
||||
InitDropDownList();
|
||||
|
||||
//Funs.FineUIPleaseSelect(this.dpState);
|
||||
@@ -136,8 +142,16 @@ namespace FineUIPro.Web.Check.HSE
|
||||
sb.Append("WHERE 1=1 ");
|
||||
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
if (this.CurrUser.UnitId != null && this.CurrUser.UnitId != Const.UnitId_XJYJ && (this.CurrUser.UserId != Const.hfnbdId || this.CurrUser.UserId != Const.sysglyId))
|
||||
{
|
||||
sb.Append("AND tba.UnitId=@UnitId ");
|
||||
listStr.Add(new SqlParameter("@UnitId", this.CurrUser.UnitId));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId))
|
||||
{
|
||||
sb.Append("AND tba.ProjectId=@ProjectId ");
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.txtSearch.Text.Trim()))
|
||||
{
|
||||
sb.Append("AND (tba.UnitName LIKE @SearchTxt OR tba.ProjectName LIKE @SearchTxt OR tba.Description LIKE @SearchTxt OR tba.CheckTeamUser LIKE @SearchTxt) ");
|
||||
@@ -331,12 +345,21 @@ namespace FineUIPro.Web.Check.HSE
|
||||
var model = CheckProblemSafetyService.GetCheckProblemById(checkId);
|
||||
if (model != null)
|
||||
{
|
||||
if (model.State == (int)CheckProblemSafetyService.StateInt.已闭环) //双击事件 已闭环
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId) || (this.CurrUser.UnitId != null && this.CurrUser.UnitId != Const.UnitId_XJYJ))
|
||||
{
|
||||
Alert.ShowInTop("当前隐患已闭环,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckProblemView.aspx?CheckId={0}", checkId), "查看安全不符合项"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (model.State == (int)CheckProblemSafetyService.StateInt.已闭环) //双击事件 已闭环
|
||||
{
|
||||
Alert.ShowInTop("当前隐患已闭环,无法编辑,请右键查看!", MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckProblemEdit.aspx?CheckId={0}", checkId), "编辑安全不符合项"));
|
||||
}
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckProblemEdit.aspx?CheckId={0}", checkId), "编辑安全不符合项"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user