安全不符合项
This commit is contained in:
@@ -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