补充公司级别树

This commit is contained in:
2025-04-09 19:14:54 +08:00
parent 8514fb0156
commit 023e3d33cf
86 changed files with 5694 additions and 3375 deletions
@@ -11,6 +11,22 @@ namespace FineUIPro.Web.HSSE.Hazard
{
public partial class OtherHazard : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -23,8 +39,21 @@ namespace FineUIPro.Web.HSSE.Hazard
//FilterDataRowItem = FilterDataRowItemImplement;
if (!IsPostBack)
{
////权限按钮方法
this.GetButtonPower();
Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
btnNew.OnClientClick = Window1.GetShowReference("OtherHazardEdit.aspx") + "return false;";
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
@@ -32,12 +61,32 @@ namespace FineUIPro.Web.HSSE.Hazard
BindGrid();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.BindGrid();
this.GetButtonPower();
if (string.IsNullOrEmpty(this.ProjectId))
{
btnNew.Hidden = true;
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT OtherHazard.OtherHazardId,OtherHazard.ProjectId,CodeRecords.Code AS OtherHazardCode,OtherHazard.OtherHazardName,Users.UserName,OtherHazard.CompileDate "
+ @" ,(CASE WHEN OtherHazard.States = " + BLL.Const.State_0 + " OR OtherHazard.States IS NULL THEN '待['+OperateUser.UserName+']提交' WHEN OtherHazard.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperateUser.UserName+']办理' END) AS FlowOperateName"
+ @" FROM Hazard_OtherHazard AS OtherHazard "
@@ -55,7 +104,7 @@ namespace FineUIPro.Web.HSSE.Hazard
}
else
{
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
}
if (!string.IsNullOrEmpty(this.txtOtherHazardCode.Text.Trim()))
{
@@ -224,7 +273,7 @@ namespace FineUIPro.Web.HSSE.Hazard
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.OtherHazardMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.OtherHazardMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))