补充公司级树

This commit is contained in:
夏菊 2025-04-11 15:19:17 +08:00
parent 35e0ebb3b9
commit fc7601612a
9 changed files with 635 additions and 319 deletions

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactList.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.ContactList" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactList.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.ContactList" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -21,6 +23,7 @@
color: Red; color: Red;
font-size: small; font-size: small;
} }
.red { .red {
background-color: red; background-color: red;
} }
@ -56,10 +59,21 @@
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" /> <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> <Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ContactListId" AllowCellEditing="true" runat="server" BoxFlex="1" DataKeyNames="ContactListId" AllowCellEditing="true"
OnRowDataBound="Grid1_RowDataBound" OnRowDataBound="Grid1_RowDataBound"
@ -127,9 +141,12 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
</Items>
</f:Panel>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px" Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px"></f:Window> Height="500px">
</f:Window>
<f:Window ID="Window1" Title="工程联络单管理" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="工程联络单管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="750px" Height="300px"> Width="750px" Height="300px">

View File

@ -14,27 +14,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
public partial class ContactList : PageBase public partial class ContactList : PageBase
{ {
#region #region
/// <summary> /// <summary>
/// 获取按钮权限 /// 项目主键
/// </summary> /// </summary>
/// <param name="button"></param> public string ProjectId
/// <returns></returns>
private void GetButtonPower()
{ {
if (Request.Params["value"] == "0") get
{ {
return; return (string)ViewState["ProjectId"];
} }
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSContactLitMenuId); set
if (buttonList.Count() > 0)
{ {
ViewState["ProjectId"] = value;
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
} }
} }
#endregion #endregion
@ -42,11 +34,20 @@ namespace FineUIPro.Web.CQMS.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
this.ProjectId = this.CurrUser.LoginProjectId;
GetButtonPower(); if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
//BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpSolutionType, true); {
//Funs.FineUIPleaseSelect(drpState); this.ProjectId = Request.Params["projectId"];
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpProposeUnit, CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, 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();
}
btnNew.OnClientClick = Window1.GetShowReference("ContactListEdit.aspx") + "return false;"; btnNew.OnClientClick = Window1.GetShowReference("ContactListEdit.aspx") + "return false;";
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId) if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
@ -63,6 +64,27 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
} }
private void InitDropDownList()
{
UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpProposeUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, 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();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
protected string ConvertEdition(object edition) protected string ConvertEdition(object edition)
{ {
return string.Format("{0:#0.#}",((int)edition)/10.0); return string.Format("{0:#0.#}",((int)edition)/10.0);
@ -73,9 +95,31 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string id = Grid1.Rows[i].DataKeys[0].ToString(); string id = Grid1.Rows[i].DataKeys[0].ToString();
} }
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = CommonService.GetAllButtonList(CurrUser.LoginProjectId, CurrUser.UserId, Const.CQMSContactLitMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(Const.BtnDelete))
{
btnMenuDel.Hidden = false;
}
}
}
#endregion
protected DataTable ChecklistData() protected DataTable ChecklistData()
{ {
string strSql = @"SELECT ContactListId string strSql = @"SELECT ContactListId
,ProjectId ,ProjectId
,unit.UnitId ,unit.UnitId
@ -87,7 +131,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
where ProjectId=@ProjectId"; where ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId) if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
{ {
strSql += " AND contact.UnitId='" + this.CurrUser.UnitId+"'"; strSql += " AND contact.UnitId='" + this.CurrUser.UnitId+"'";
@ -136,10 +180,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
private void BindGrid() private void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
var list = ChecklistData(); var list = ChecklistData();
Grid1.RecordCount = list.Rows.Count; Grid1.RecordCount = list.Rows.Count;
var CNProfessional = CNProfessionalService.GetCNProfessionalItem(); var CNProfessional = CNProfessionalService.GetCNProfessionalItem();
var uniWork = UnitWorkService.GetUnitWorkLists(CurrUser.LoginProjectId); var uniWork = UnitWorkService.GetUnitWorkLists(this.ProjectId);
list = GetFilteredTable(Grid1.FilteredData, list); list = GetFilteredTable(Grid1.FilteredData, list);
var table = GetPagedDataTable(Grid1, list); var table = GetPagedDataTable(Grid1, list);

View File

@ -41,6 +41,42 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDetails.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DesignDetails" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDetails.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.DesignDetails" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" /> <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> <Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设计交底管理" EnableCollapse="true" ForceFit="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设计交底管理" EnableCollapse="true" ForceFit="true"
runat="server" BoxFlex="1" DataKeyNames="DesignDetailsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDetailsId" AllowSorting="true" runat="server" BoxFlex="1" DataKeyNames="DesignDetailsId" AllowCellEditing="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="DesignDetailsId" AllowSorting="true"
@ -83,6 +97,8 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="设计交底管理" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="设计交底管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="360px"> Width="900px" Height="360px">

View File

@ -8,6 +8,23 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class DesignDetails : PageBase public partial class DesignDetails : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -18,20 +35,54 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
GetButtonPower(); 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();
}
BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true);
BindGrid(); BindGrid();
} }
} }
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void changeTree(object sender, EventArgs e)
{
this.ProjectId = this.ucTree.ProjectId;
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId,Status, string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId,Status,
UnitName, AttachUrl, CompileMan, CN.ProfessionalName UnitName, AttachUrl, CompileMan, CN.ProfessionalName
from Comprehensive_DesignDetails C from Comprehensive_DesignDetails C
left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId
where C.ProjectId = @ProjectId"; where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null) if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND C.CNProfessionalId=@CNProfessionalId"; strSql += " AND C.CNProfessionalId=@CNProfessionalId";
@ -245,7 +296,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DesignDetailsMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.DesignDetailsMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class DesignDetails { public partial class DesignDetails
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SiteVisaManagement.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.SiteVisaManagement" %> <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SiteVisaManagement.aspx.cs" Inherits="FineUIPro.Web.Comprehensive.SiteVisaManagement" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
@ -9,9 +11,21 @@
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1"/> <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" <f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> <Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
<Items>
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
BodyPadding="0px">
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
</f:ContentPanel>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="现场签证管理" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="现场签证管理" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="VisaId" AllowCellEditing="true" EnableColumnLines="true" runat="server" BoxFlex="1" DataKeyNames="VisaId" AllowCellEditing="true" EnableColumnLines="true"
@ -104,6 +118,8 @@
</f:Grid> </f:Grid>
</Items> </Items>
</f:Panel> </f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="现场签证管理" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="现场签证管理" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close" Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="550px"> Width="900px" Height="550px">

View File

@ -8,6 +8,23 @@ namespace FineUIPro.Web.Comprehensive
{ {
public partial class SiteVisaManagement : PageBase public partial class SiteVisaManagement : PageBase
{ {
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region #region
/// <summary> /// <summary>
/// 加载页面 /// 加载页面
@ -18,18 +35,57 @@ namespace FineUIPro.Web.Comprehensive
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); //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.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true);
GetButtonPower();
BindGrid(); BindGrid();
} }
} }
private void InitDropDownList()
{
BLL.UnitService.InitUnitDownList(this.sdrpUnitId, 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();
if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
btnNew.Hidden = true;
}
this.GetButtonPower();
this.BindGrid();
}
/// <summary> /// <summary>
/// 数据绑定 /// 数据绑定
/// </summary> /// </summary>
public void BindGrid() public void BindGrid()
{ {
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"select VisaId,VisaCode, VisaReson, VisaDate, Status, string strSql = @"select VisaId,VisaCode, VisaReson, VisaDate, Status,
EstimatedCost, Confirmation, ConstructionManager, ControlManager, ProcessingState, EstimatedCost, Confirmation, ConstructionManager, ControlManager, ProcessingState,
AccountingExpenses,VisaContent, Remark, U.UnitName,CN.ProfessionalName ,SignMan,AuditMan,unitWork.UnitWorkName AccountingExpenses,VisaContent, Remark, U.UnitName,CN.ProfessionalName ,SignMan,AuditMan,unitWork.UnitWorkName
@ -39,7 +95,7 @@ namespace FineUIPro.Web.Comprehensive
left join WBS_UnitWork as unitWork on unitWork.UnitWorkId = C.UnitWorkId left join WBS_UnitWork as unitWork on unitWork.UnitWorkId = C.UnitWorkId
where C.ProjectId = @ProjectId"; where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (sdrpUnitId.SelectedValue != BLL.Const._Null) if (sdrpUnitId.SelectedValue != BLL.Const._Null)
{ {
strSql += " AND C.UnitId=@UnitId"; strSql += " AND C.UnitId=@UnitId";
@ -202,7 +258,7 @@ namespace FineUIPro.Web.Comprehensive
{ {
return; return;
} }
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SiteVisaManagementMenuId); var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.SiteVisaManagementMenuId);
if (buttonList.Count() > 0) if (buttonList.Count() > 0)
{ {
if (buttonList.Contains(BLL.Const.BtnAdd)) if (buttonList.Contains(BLL.Const.BtnAdd))

View File

@ -7,10 +7,12 @@
// </自动生成> // </自动生成>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace FineUIPro.Web.Comprehensive { namespace FineUIPro.Web.Comprehensive
{
public partial class SiteVisaManagement { public partial class SiteVisaManagement
{
/// <summary> /// <summary>
/// form1 控件。 /// form1 控件。
@ -39,6 +41,42 @@ namespace FineUIPro.Web.Comprehensive {
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel Panel1; protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// ucTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary> /// <summary>
/// Grid1 控件。 /// Grid1 控件。
/// </summary> /// </summary>