补充公司级别树

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
@@ -9,7 +9,7 @@ using AspNet = System.Web.UI.WebControls;
namespace FineUIPro.Web.HSSE.Check
{
public partial class ContactList :PageBase
public partial class ContactList : PageBase
{
#region
/// <summary>
@@ -38,16 +38,21 @@ namespace FineUIPro.Web.HSSE.Check
{
if (!IsPostBack)
{
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"];
}
//发起单位
BLL.UnitService.InitUnitDropDownList(this.drpSponsorUnit, this.ProjectId, true);
//接收单位
BLL.UnitService.InitUnitDropDownList(this.drpReceivingUnits, this.ProjectId, true);
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
////权限按钮方法
this.GetButtonPower();
this.btnNew.OnClientClick = Window1.GetShowReference("ContactListEdit.aspx") + "return false;";
@@ -60,11 +65,41 @@ namespace FineUIPro.Web.HSSE.Check
this.BindGrid();
}
}
private void InitDropDownList()
{
//发起单位
BLL.UnitService.InitUnitDropDownList(this.drpSponsorUnit, this.ProjectId, true);
//接收单位
BLL.UnitService.InitUnitDropDownList(this.drpReceivingUnits, this.ProjectId, true);
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
this.InitDropDownList();
this.GetButtonPower();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.BindGrid();
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT T.ContactListId,T.ProjectId,CodeRecords.Code,T.SponsorUnitId,Unit.UnitName AS SponsorUnitName,T.ReceivingUnits,T.ReceivingUnitNames,T.CompileDate,Users.UserName AS CompileManName,T.Remark,T.AttachUrl,T.SeeFile"
+ @" FROM Check_ContactList AS T "
+ @" LEFT JOIN Sys_User AS Users ON T.CompileMan=Users.UserId"
@@ -75,7 +110,7 @@ namespace FineUIPro.Web.HSSE.Check
strSql += " AND T.ProjectId = @ProjectId";
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.drpSponsorUnit.SelectedValue != BLL.Const._Null)
if (this.drpSponsorUnit.SelectedValue != null && this.drpSponsorUnit.SelectedValue != BLL.Const._Null)
{
strSql += " AND T.SponsorUnitId = @SponsorUnitId";
listStr.Add(new SqlParameter("@SponsorUnitId", this.drpSponsorUnit.SelectedValue));
@@ -227,7 +262,7 @@ namespace FineUIPro.Web.HSSE.Check
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectContactListMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectContactListMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))