焊接管理,补充公司级树

This commit is contained in:
2025-04-14 15:31:57 +08:00
parent c8b553efc6
commit bb10b1f54e
111 changed files with 6980 additions and 4039 deletions
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AItemEndCheck.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackageManage.AItemEndCheck" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -13,12 +15,22 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="280px" Title="A项尾工录入" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtReportDate" runat="server" Label="月份" LabelWidth="60px" LabelAlign="Right" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
<f:DatePicker ID="txtReportDate" runat="server" Label="月份" LabelWidth="60px" LabelAlign="Right" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
DateFormatString="yyyy-MM" Width="200px">
</f:DatePicker>
</Items>
@@ -12,6 +12,20 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 管线
/// </summary>
public string ISO_ID
@@ -52,6 +66,20 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
if (!IsPostBack)
{
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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.InitTreeMenu();
}
@@ -64,6 +92,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtReportDate.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
@@ -80,16 +112,16 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var unit = BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
if (unit == null || unit.UnitTypeId == BLL.Const.ProjectUnitType_1 || unit.UnitTypeId == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -100,7 +132,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (!this.txtReportDate.Hidden)
{
testPackageLists = (from x in Funs.DB.TP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
where x.ProjectId == this.ProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
select x).ToList();
}
if (units != null)
@@ -129,6 +161,28 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
return;
}
}
private void InitDropDownList()
{
}
/// <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.InitTreeMenu();
}
#endregion
#region
@@ -213,7 +267,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
join y in Funs.DB.TP_TestPackage on x.PTP_ID equals y.PTP_ID
join z in Funs.DB.PW_IsoInfo on x.ISO_ID equals z.ISO_ID
where x.PTP_ID == node.NodeID
&& z.ProjectId == this.CurrUser.LoginProjectId
&& z.ProjectId == this.ProjectId
orderby z.ISO_IsoNo
select z;
foreach (var item in isoInfov)
@@ -419,7 +473,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_AItemEndCheckMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_AItemEndCheckMenuId, button);
}
#endregion
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.TestPackageManage {
public partial class AItemEndCheck {
namespace FineUIPro.Web.HJGL.TestPackageManage
{
public partial class AItemEndCheck
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@@ -47,7 +49,34 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -56,7 +85,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtReportDate 控件。
/// </summary>
@@ -65,7 +94,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtReportDate;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -74,7 +103,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -83,7 +112,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -92,7 +121,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -101,7 +130,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// </summary>
@@ -110,7 +139,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -119,7 +148,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -128,7 +157,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtEIC_CheckMan 控件。
/// </summary>
@@ -137,7 +166,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEIC_CheckMan;
/// <summary>
/// txtEIC_CheckDate 控件。
/// </summary>
@@ -146,7 +175,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEIC_CheckDate;
/// <summary>
/// txtEIC_DealMan 控件。
/// </summary>
@@ -155,7 +184,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEIC_DealMan;
/// <summary>
/// txtEIC_DealDate 控件。
/// </summary>
@@ -164,7 +193,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEIC_DealDate;
/// <summary>
/// txtEIC_Remark 控件。
/// </summary>
@@ -173,7 +202,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEIC_Remark;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -182,7 +211,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -191,7 +220,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BItemEndCheck.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackageManage.BItemEndCheck" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>B项尾工录入</title>
</head>
<body>
@@ -13,12 +15,22 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="280px" Title="B项尾工录入" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtReportDate" runat="server" Label="月份" LabelWidth="60px" LabelAlign="Right" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
<f:DatePicker ID="txtReportDate" runat="server" Label="月份" LabelWidth="60px" LabelAlign="Right" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
DateFormatString="yyyy-MM" Width="200px">
</f:DatePicker>
</Items>
@@ -12,6 +12,20 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 管线
/// </summary>
public string ISO_ID
@@ -52,10 +66,40 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
if (!IsPostBack)
{
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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.InitTreeMenu();
}
}
/// <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.InitTreeMenu();
}
#endregion
#region --
@@ -64,6 +108,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtReportDate.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
@@ -80,16 +128,16 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var unit = BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
if (unit == null || unit.UnitTypeId == BLL.Const.ProjectUnitType_1 || unit.UnitTypeId == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -100,7 +148,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (!this.txtReportDate.Hidden)
{
testPackageLists = (from x in Funs.DB.TP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
where x.ProjectId == this.ProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
select x).ToList();
}
if (units != null)
@@ -213,7 +261,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
join y in Funs.DB.TP_TestPackage on x.PTP_ID equals y.PTP_ID
join z in Funs.DB.PW_IsoInfo on x.ISO_ID equals z.ISO_ID
where x.PTP_ID == node.NodeID
&& z.ProjectId == this.CurrUser.LoginProjectId
&& z.ProjectId == this.ProjectId
orderby z.ISO_IsoNo
select z;
foreach (var item in isoInfov)
@@ -419,7 +467,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_BItemEndCheckMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_BItemEndCheckMenuId, button);
}
#endregion
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.TestPackageManage {
public partial class BItemEndCheck {
namespace FineUIPro.Web.HJGL.TestPackageManage
{
public partial class BItemEndCheck
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@@ -47,7 +49,34 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -56,7 +85,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtReportDate 控件。
/// </summary>
@@ -65,7 +94,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtReportDate;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -74,7 +103,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -83,7 +112,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -92,7 +121,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -101,7 +130,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAdd 控件。
/// </summary>
@@ -110,7 +139,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAdd;
/// <summary>
/// btnSave 控件。
/// </summary>
@@ -119,7 +148,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -128,7 +157,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtEIC_CheckMan 控件。
/// </summary>
@@ -137,7 +166,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEIC_CheckMan;
/// <summary>
/// txtEIC_CheckDate 控件。
/// </summary>
@@ -146,7 +175,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEIC_CheckDate;
/// <summary>
/// txtEIC_DealMan 控件。
/// </summary>
@@ -155,7 +184,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEIC_DealMan;
/// <summary>
/// txtEIC_DealDate 控件。
/// </summary>
@@ -164,7 +193,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEIC_DealDate;
/// <summary>
/// txtEIC_Remark 控件。
/// </summary>
@@ -173,7 +202,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtEIC_Remark;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -182,7 +211,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -191,7 +220,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageImport.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackageManage.TestPackageImport" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -7,11 +9,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>焊口管理</title>
<style>
.color1 {
background-color:yellow;
.color1 {
background-color: yellow;
}
</style>
</head>
<body>
<form id="form1" runat="server">
@@ -19,12 +21,22 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="300px" Title="试压包" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="试压包" OnNodeExpand="tvControlItem_NodeExpand"
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="试压包" OnNodeExpand="tvControlItem_NodeExpand"
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="true"
EnableTextSelection="true">
@@ -37,12 +49,12 @@
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox ID="txtJOT_JointNo" runat="server" Label="管线号" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="txtJOT_JointNo_TextChanged" Width="220px" LabelWidth="100px" LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnImport" runat="server" Text="导入" ToolTip="导入" Icon="ApplicationGet" OnClick="btnImport_Click"></f:Button>
<f:TextBox ID="txtJOT_JointNo" runat="server" Label="管线号" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="txtJOT_JointNo_TextChanged" Width="220px" LabelWidth="100px" LabelAlign="Right">
</f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnImport" runat="server" Text="导入" ToolTip="导入" Icon="ApplicationGet" OnClick="btnImport_Click"></f:Button>
<f:Button ID="btnDelete" Text="删除" ToolTip="删除试压包" ConfirmText="确认删除此试压包?" ConfirmTarget="Top"
Icon="Delete" runat="server" OnClick="btnDelete_Click">
</f:Button>
@@ -51,24 +63,24 @@
<f:Button ID="btnCancelAudit" Text="取消审核" ToolTip="取消审核" Icon="NoteEdit" runat="server" EnablePostBack="true" OnClick="btnCancelAudit_Click"
Hidden="true">
</f:Button>
<f:DropDownList ID="printType" runat="server" Label="打印报表" LabelAlign="Right" LabelWidth="100px">
<f:ListItem Value="0" Text="试压包管线清单" />
<f:ListItem Value="1" Text="管道焊接工作记录" />
<f:ListItem Value="2" Text="管道无损检测结果汇总表" />
<f:ListItem Value="3" Text="弹簧支/吊架安装检验记录" />
<f:ListItem Value="4" Text="滑动/固定管托安装检验" />
<f:ListItem Value="5" Text="管道补偿器安装检验记录" />
<f:ListItem Value="6" Text="管道试压后安装、焊接及检验检查表" />
<f:ListItem Value="7" Text="管道系统压力试验记录" />
</f:DropDownList>
<f:Button ID="btnPrint" runat="server" Icon="Printer" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
<f:DropDownList ID="printType" runat="server" Label="打印报表" LabelAlign="Right" LabelWidth="100px">
<f:ListItem Value="0" Text="试压包管线清单" />
<f:ListItem Value="1" Text="管道焊接工作记录" />
<f:ListItem Value="2" Text="管道无损检测结果汇总表" />
<f:ListItem Value="3" Text="弹簧支/吊架安装检验记录" />
<f:ListItem Value="4" Text="滑动/固定管托安装检验" />
<f:ListItem Value="5" Text="管道补偿器安装检验记录" />
<f:ListItem Value="6" Text="管道试压后安装、焊接及检验检查表" />
<f:ListItem Value="7" Text="管道系统压力试验记录" />
</f:DropDownList>
<f:Button ID="btnAll" runat="server" Icon="Printer" EnablePostBack="true" EnableAjax="false" Text="打印交工资料" ToolTip="打印交工资料" OnClick="btnAll_Click"></f:Button>
<f:Button ID="btnPrint" runat="server" Icon="Printer" Text="打印" ToolTip="打印" OnClick="btnPrint_Click"></f:Button>
<f:Button ID="btnAll" runat="server" Icon="Printer" EnablePostBack="true" EnableAjax="false" Text="打印交工资料" ToolTip="打印交工资料" OnClick="btnAll_Click"></f:Button>
</Items>
</f:Toolbar>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口信息" EnableCollapse="true"
@@ -77,20 +89,19 @@
SortField="ISO_IsoNo" SortDirection="Desc" OnSort="Grid1_Sort" AllowPaging="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
OnRowDataBound="Grid1_RowDataBound"
EnableTextSelection="True" EnableAjax="true"
>
EnableTextSelection="True" EnableAjax="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
TextAlign="Center" />
<f:RenderField HeaderText="管线号" ColumnID="ISO_IsoNo" DataField="ISO_IsoNo" SortField="ISO_IsoNo"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="工作量" ColumnID="JOT_DoneDia" DataField="JOT_DoneDia" SortField="JOT_DoneDia"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="剩余工作量" ColumnID="JOT_NotDoneDia" DataField="JOT_NotDoneDia" SortField="JOT_NotDoneDia"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
</f:RenderField>
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="总焊口" ColumnID="IsoInfoCount" DataField="IsoInfoCount"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
@@ -113,18 +124,18 @@
<f:RenderField HeaderText="承插实际检测比例" ColumnID="RatioJ" DataField="RatioJ"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="150px">
</f:RenderField>
<f:RenderField HeaderText="流体代号" ColumnID="FluidCode" DataField="FluidCode" SortField="FluidCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
<f:RenderField HeaderText="流体代号" ColumnID="FluidCode" DataField="FluidCode" SortField="FluidCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="管道等级" ColumnID="PipingClassCode" DataField="PipingClassCode" SortField="PipingClassCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
<f:RenderField HeaderText="管道等级" ColumnID="PipingClassCode" DataField="PipingClassCode" SortField="PipingClassCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="设计压力" ColumnID="ISO_DesignPress" DataField="ISO_DesignPress" SortField="ISO_DesignPress"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
<f:RenderField HeaderText="设计压力" ColumnID="ISO_DesignPress" DataField="ISO_DesignPress" SortField="ISO_DesignPress"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="设计温度" ColumnID="ISO_DesignTemperature" DataField="ISO_DesignTemperature" SortField="ISO_DesignTemperature"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
<f:RenderField HeaderText="设计温度" ColumnID="ISO_DesignTemperature" DataField="ISO_DesignTemperature" SortField="ISO_DesignTemperature"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="操作压力" ColumnID="OperPress" DataField="OperPress" SortField="OperPress"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
@@ -133,7 +144,7 @@
SortField="DefectCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
<f:RenderField HeaderText="试验介质" ColumnID="MediumName" DataField="MediumName"
<f:RenderField HeaderText="试验介质" ColumnID="MediumName" DataField="MediumName"
SortField="CheckOpportunity" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
</f:RenderField>
@@ -141,37 +152,36 @@
SortField="ISO_IsoNo" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="130px">
</f:RenderField>
<f:RenderField HeaderText="压管级别" ColumnID="PipingGrade" DataField="PipingGrade"
<f:RenderField HeaderText="压管级别" ColumnID="PipingGrade" DataField="PipingGrade"
FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="P&ID NO." ColumnID="PAndID" DataField="PAndID" FieldType="String" HeaderTextAlign="Center">
<f:RenderField HeaderText="P&ID NO." ColumnID="PAndID" DataField="PAndID" FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="抽检代号" ColumnID="NDECode" DataField="NDECode" FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="抽检代号" ColumnID="NDECode" DataField="NDECode" FieldType="String" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="尺寸" ColumnID="Size" DataField="Size"
SortField="Size" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
SortField="Size" FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="管径" ColumnID="Caliber" DataField="Caliber"
SortField="Caliber" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
SortField="Caliber" FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="起点" ColumnID="Start" DataField="Start"
SortField="Start" FieldType="String" HeaderTextAlign="Center"
SortField="Start" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="终点" ColumnID="End" DataField="End"
SortField="End" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
>
SortField="End" FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="泄露试验压力" ColumnID="leakPress" DataField="leakPress" SortField="leakPress"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="吹洗方式" ColumnID="PurgeWay" DataField="PurgeWay" SortField="PurgeWay"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField HeaderText="REMARK" ColumnID="Remark" DataField="Remark" SortField="Remark"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" >
FieldType="String" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
@@ -198,13 +208,13 @@
<f:Window ID="Window1" Title="试压台账" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1100px" Height="740px">
</f:Window>
</f:Window>
<f:Window ID="Window5" Title="打印" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1010px"
Height="680px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<%--<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
<%--<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="TableEdit">
</f:MenuButton>
<f:MenuButton ID="btnMenuCopy" EnablePostBack="true" runat="server"
@@ -215,8 +225,8 @@
</f:MenuButton>
</f:Menu>
<f:Window ID="Window6" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
<f:Window ID="Window6" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
</form>
@@ -1,19 +1,33 @@
using BLL;
using System;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using Newtonsoft.Json.Linq;
using System.IO;
namespace FineUIPro.Web.HJGL.TestPackageManage
{
public partial class TestPackageImport : PageBase
{/// <summary>
/// 未通过数
/// </summary>
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 未通过数
/// </summary>
public int Count
{
get
@@ -36,6 +50,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
ViewState["PTP_ID"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@@ -46,12 +61,41 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
if (!IsPostBack)
{
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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
this.GetButtonPower();
}
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
this.GetButtonPower();
}
}
/// <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.ProjectId))
//{
// btnNew.Hidden = true;
//}
this.GetButtonPower();
this.BindGrid();
}
#endregion
@@ -63,7 +107,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageImportMenuId, BLL.Const.BtnSave))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageImportMenuId, BLL.Const.BtnSave))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TestPackageDataIn.aspx", "导入 - ")));
}
@@ -80,6 +124,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "单位-区域";
@@ -91,23 +139,23 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var unit = BLL.ProjectUnitService.GetProjectUnitById(this.CurrUser.UnitId);
if (unit == null || unit.UnitType == BLL.Const.ProjectUnitType_1 || unit.UnitType == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
{
units = (from x in Funs.DB.Base_Unit where x.UnitId == this.CurrUser.UnitId select x).ToList();
}
List<Model.TP_TestPackageImport> testPackageLists = Funs.DB.TP_TestPackageImport.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).ToList(); ///试压包
List<Model.TP_TestPackageImport> testPackageLists = Funs.DB.TP_TestPackageImport.Where(x => x.ProjectId == this.ProjectId).ToList(); ///试压包
if (units != null)
{
@@ -577,11 +625,11 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageImportMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageImportMenuId, button);
}
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageImportMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageImportMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@@ -696,7 +744,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
// var install = BLL.Project_InstallationService.GetInstallationByInstallationId(workArea.InstallationId);
// keyValuePairs.Add("InstallationName", install.InstallationName);
// keyValuePairs.Add("WorkAreaName", workArea.WorkAreaName);
// keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId));
// keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.ProjectId));
// BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
// string strSql = @"SELECT '' WED_Code, '' WED_Name,'' JOT_WeldDate_Month,''JOT_WeldDate_Day,jointInfo.JOT_ID,
@@ -760,7 +808,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
// + @" WHERE jointInfo.ProjectId= @projectId ";
// List<SqlParameter> listStr = new List<SqlParameter>
//{
// new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
// new SqlParameter("@projectId", this.ProjectId),
//};
// strSql += "AND jointInfo.ISO_ID in ('" + isoIds + "') order by jointInfo.ISO_ID ,JOT_JointNo ";
@@ -852,7 +900,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
// }
// var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_3);
// var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_3);
// if (Unit1 != null)
// {
// var unitNames1 = string.Join(",", Unit1.Select(x => x.UnitName).ToArray());
@@ -1113,7 +1161,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var install = BLL.Project_InstallationService.GetInstallationByInstallationId(workArea.InstallationId);
keyValuePairs.Add("InstallationName", install.InstallationName);
keyValuePairs.Add("WorkAreaName", workArea.WorkAreaName);
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId));
keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.ProjectId));
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
string strSql = @"SELECT '' WED_Code, '' WED_Name,'' JOT_WeldDate_Month,''JOT_WeldDate_Day,jointInfo.JOT_ID,
@@ -1177,7 +1225,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
+ @" WHERE jointInfo.ProjectId= @projectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@projectId", this.ProjectId),
};
strSql += "AND jointInfo.ISO_ID in ('" + isoIds + "') order by jointInfo.ISO_ID ,JOT_JointNo ";
@@ -1270,7 +1318,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
}
var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_3);
var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_3);
if (Unit1 != null)
{
var unitNames1 = string.Join(",", Unit1.Select(x => x.UnitName).ToArray());
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageManageAudit.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackageManage.TestPackageManageAudit" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -8,16 +10,19 @@
<title>试压包审核</title>
<style>
.color1 {
background-color:aqua;
background-color: aqua;
}
.color2 {
.color2 {
background-color: yellow;
}
.color3 {
background-color:green;
}
.color4 {
background-color:blueviolet;
.color3 {
background-color: green;
}
.color4 {
background-color: blueviolet;
}
</style>
</head>
@@ -27,12 +32,22 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="280px" Title="试压包审核" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtReportDate" runat="server" DisplayType="Month" Label="月份" LabelAlign="Right" LabelWidth="60px" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
<f:DatePicker ID="txtReportDate" runat="server" DisplayType="Month" Label="月份" LabelAlign="Right" LabelWidth="60px" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
DateFormatString="yyyy-MM" Width="200px">
</f:DatePicker>
</Items>
@@ -45,7 +60,7 @@
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" BoxConfigAlign="StretchMax"
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" BoxConfigAlign="StretchMax"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="试压包审核"
TitleToolTip="试压包审核" AutoScroll="true">
<Toolbars>
@@ -58,23 +73,23 @@
<f:Button ID="btnCancelAudit" Text="取消审核" ToolTip="取消审核" Icon="NoteEdit" runat="server" EnablePostBack="true" OnClick="btnCancelAudit_Click"
Hidden="true">
</f:Button>
<f:DropDownList ID="printType" runat="server" Label="打印报表" LabelAlign="Right" LabelWidth="100px">
<f:ListItem Value="0" Text="试压包管线清单" />
<f:ListItem Value="1" Text="管道焊接工作记录" />
<f:ListItem Value="2" Text="管道无损检测结果汇总表" />
<f:ListItem Value="3" Text="弹簧支/吊架安装检验记录" />
<f:ListItem Value="4" Text="滑动/固定管托安装检验" />
<f:ListItem Value="5" Text="管道补偿器安装检验记录" />
<f:ListItem Value="6" Text="管道试压后安装、焊接及检验检查表" />
<f:ListItem Value="7" Text="管道系统压力试验记录" />
<f:ListItem Value="8" Text="管道无损检测数量统计表" />
</f:DropDownList>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server" OnClick="btnPrint_Click" DisableControlBeforePostBack="false">
</f:Button>
<f:DropDownList ID="printType" runat="server" Label="打印报表" LabelAlign="Right" LabelWidth="100px">
<f:ListItem Value="0" Text="试压包管线清单" />
<f:ListItem Value="1" Text="管道焊接工作记录" />
<f:ListItem Value="2" Text="管道无损检测结果汇总表" />
<f:ListItem Value="3" Text="弹簧支/吊架安装检验记录" />
<f:ListItem Value="4" Text="滑动/固定管托安装检验" />
<f:ListItem Value="5" Text="管道补偿器安装检验记录" />
<f:ListItem Value="6" Text="管道试压后安装、焊接及检验检查表" />
<f:ListItem Value="7" Text="管道系统压力试验记录" />
<f:ListItem Value="8" Text="管道无损检测数量统计表" />
</f:DropDownList>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server" OnClick="btnPrint_Click" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items >
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BoxFlex="1"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Rows>
@@ -86,14 +101,14 @@
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<Items>
<f:TextBox ID="txtPTP_TightnessTest" runat="server" Label="严密性试验压力" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
<f:TextBox ID="txtPTP_TestPackageNo" runat="server" Label="试压编号" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
<f:TextBox ID="txtPTP_ModifierName" runat="server" Label="修改人" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
</Items>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow>
<Items>
<f:DatePicker ID="txtPTP_ModifyDate" runat="server" Label="修改时间" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:DatePicker>
<f:TextBox ID="txtPTP_LeakageTestService" runat="server" Label="泄露性试验介质" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
@@ -115,13 +130,13 @@
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<Items>
<f:TextBox ID="txtPTP_CleaningMedium" runat="server" Label="清扫介质" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
<f:TextBox ID="txtPTP_TestTypeName" runat="server" Label="试验压力" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
<f:TextBox ID="txtPTP_TestHeat" runat="server" Label="试验压力" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
</Items>
</Items>
</f:FormRow>
<f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtPTP_TestAmbientTemp" runat="server" Label="试验环境温度" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
<f:TextBox ID="txtPTP_TestMediumTemp" runat="server" Label="试验介质温度" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
@@ -143,44 +158,44 @@
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<Items>
<f:TextBox ID="txtPTP_TablerName" runat="server" Label="建档人" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:TextBox>
<f:DatePicker ID="txtPTP_TableDate" runat="server" Label="建档时间" LabelAlign="Right" LabelWidth="120px" Readonly="true"></f:DatePicker>
<f:DropDownList ID="drpPTP_Auditer" runat="server" Label="审核人" LabelAlign="Right" LabelWidth="120px" EnableEdit="true"></f:DropDownList>
</Items>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="33% 66%" >
<Items >
<f:FormRow ColumnWidths="33% 66%">
<Items>
<f:DatePicker ID="txtPTP_AduditDate" runat="server" Label="审核日期" LabelAlign="Right" LabelWidth="120px"></f:DatePicker>
<f:TextBox ID="txtPTP_Remark" runat="server" Label="备注" LabelAlign="Right" MaxLength="100" LabelWidth="120px" Readonly="true"></f:TextBox>
</Items>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
<Items >
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="试压包审核" EnableCollapse="false"
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="试压包审核" EnableCollapse="false"
runat="server" BoxFlex="1" DataKeyNames="ISO_ID" AllowCellEditing="true"
EnableColumnLines="true" DataIDField="ISO_ID" EnableTextSelection="false"
SortField="ISO_IsoNo" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" OnRowDataBound="Grid1_RowDataBound">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Bottom" runat="server" ToolbarAlign="Left">
<Items>
<f:Label ID="Label1" runat="server" Width="40px" CssClass="color1"></f:Label>
<f:Label ID="lab1" runat="server" Label="未焊完" Text="0" LabelAlign="Right" LabelWidth="70px" ></f:Label>
<f:Label ID="Label5" runat="server" Width="70px"></f:Label>
<f:Label ID="Label2" runat="server" Width="40px" CssClass="color2"></f:Label>
<f:Label ID="lab2" runat="server" Label="已焊完,未达检测比例" Text="0" LabelAlign="Right" LabelWidth="160px" ></f:Label>
<f:Label ID="Label6" runat="server" Width="70px"></f:Label>
<f:Label ID="Label3" runat="server" Width="40px" CssClass="color3"></f:Label>
<f:Label ID="lab3" runat="server" Label="已焊完,已达检测比例,但有不合格" Text="0" LabelAlign="Right" LabelWidth="250px"></f:Label>
<f:Label ID="Label7" runat="server" Width="70px"></f:Label>
<f:Label ID="Label4" runat="server" Width="40px" CssClass="color4"></f:Label>
<f:Label ID="lab4" runat="server" Label="已通过" Text="0" LabelAlign="Right" LabelWidth="70px"></f:Label>
</Items>
</f:Toolbar>
</Toolbars>
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Bottom" runat="server" ToolbarAlign="Left">
<Items>
<f:Label ID="Label1" runat="server" Width="40px" CssClass="color1"></f:Label>
<f:Label ID="lab1" runat="server" Label="未焊完" Text="0" LabelAlign="Right" LabelWidth="70px"></f:Label>
<f:Label ID="Label5" runat="server" Width="70px"></f:Label>
<f:Label ID="Label2" runat="server" Width="40px" CssClass="color2"></f:Label>
<f:Label ID="lab2" runat="server" Label="已焊完,未达检测比例" Text="0" LabelAlign="Right" LabelWidth="160px"></f:Label>
<f:Label ID="Label6" runat="server" Width="70px"></f:Label>
<f:Label ID="Label3" runat="server" Width="40px" CssClass="color3"></f:Label>
<f:Label ID="lab3" runat="server" Label="已焊完,已达检测比例,但有不合格" Text="0" LabelAlign="Right" LabelWidth="250px"></f:Label>
<f:Label ID="Label7" runat="server" Width="70px"></f:Label>
<f:Label ID="Label4" runat="server" Width="40px" CssClass="color4"></f:Label>
<f:Label ID="lab4" runat="server" Label="已通过" Text="0" LabelAlign="Right" LabelWidth="70px"></f:Label>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="管线编号" ColumnID="ISO_IsoNo" DataField="ISO_IsoNo" SortField="ISO_IsoNo"
@@ -229,8 +244,8 @@
</f:MenuButton>
</f:Menu>
<f:Window ID="Window6" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
<f:Window ID="Window6" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
</form>
@@ -5,9 +5,6 @@ using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.TestPackageManage
@@ -16,6 +13,20 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
@@ -68,13 +79,48 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
if (!IsPostBack)
{
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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
BLL.UserService.InitUserDropDownList(this.drpPTP_Auditer, this.CurrUser.LoginProjectId, true);//审核人
this.InitTreeMenu();
}
}
private void InitDropDownList()
{
BLL.UserService.InitUserDropDownList(this.drpPTP_Auditer, 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.InitTreeMenu();
}
#endregion
#region --
@@ -83,6 +129,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtReportDate.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
@@ -100,16 +150,16 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var unit = BLL.ProjectUnitService.GetProjectUnitById(this.CurrUser.UnitId);
if (unit == null || unit.UnitType == BLL.Const.ProjectUnitType_1 || unit.UnitType == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -120,7 +170,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (!this.txtReportDate.Hidden)
{
testPackageLists = (from x in Funs.DB.TP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
where x.ProjectId == this.ProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
select x).ToList();
}
if (units != null)
@@ -514,7 +564,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageManageAuditMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageManageAuditMenuId, button);
}
#endregion
@@ -605,7 +655,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
+ @" WHERE jointInfo.ProjectId= @projectId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@projectId", this.ProjectId),
};
strSql += "AND jointInfo.ISO_ID in ('" + isoIds + "') order by jointInfo.ISO_ID ,JOT_JointNo ";
@@ -695,7 +745,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
group by weldType.WeldTypeName,detectionType.DetectionTypeCode,checkItem.CHT_CheckResult";
DataTable dt0 = SQLHelper.GetDataTableRunText(sqlStr, null);
var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_3);
var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_3);
if (Unit1 != null)
{
var unitNames1 = string.Join(",", Unit1.Select(x => x.UnitName).ToArray());
@@ -1312,10 +1362,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var workarea = WorkAreaService.getWorkAreaByWorkAreaId(iosList[0].WorkAreaId);
//var q = BLL.CheckManageService.GetCheckByCHT_CheckID(this.CHT_CheckID);
string varValue = string.Empty;
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
var installation = BLL.Project_InstallationService.GetInstallationByInstallationId(workarea.InstallationId);
//var workarea = WorkAreaService.GetWorkAreaByProjectIdAndInstalltionIdAndUnitId(this.CurrUser.LoginProjectId, q.InstallationId, q.UnitId);
//var workarea = WorkAreaService.GetWorkAreaByProjectIdAndInstalltionIdAndUnitId(this.ProjectId, q.InstallationId, q.UnitId);
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
keyValuePairs.Add("projectName", projectName);
keyValuePairs.Add("install", installation != null ? installation.InstallationName : "");
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageManageEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackageManage.TestPackageManageEdit" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -13,6 +15,16 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="280px" Title="试压包录入" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
@@ -31,8 +43,8 @@
</f:Tree>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" BoxConfigAlign="StretchMax"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="试压包录入"
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" BoxConfigAlign="StretchMax"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="试压包录入"
TitleToolTip="试压包录入" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
@@ -47,7 +59,7 @@
Icon="Delete" runat="server" OnClick="btnDelete_Click">
</f:Button>
<f:Button ID="btnSave" Text="保存" ToolTip="保存试压包" Icon="SystemSave" runat="server" OnClick="btnSave_Click" ValidateForms="SimpleForm1">
</f:Button>
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
@@ -63,18 +75,18 @@
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<Items>
<f:TextBox ID="txtPTP_TightnessTest" runat="server" Label="严密性试验压力" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtPTP_TestPackageNo" runat="server" Label="试压编号" LabelAlign="Right" Required="true" ShowRedStar="true" LabelWidth="120px"></f:TextBox>
<f:DropDownList ID="drpPTP_Modifier" runat="server" Label="修改人" LabelAlign="Right" EnableEdit="true" LabelWidth="120px"></f:DropDownList>
</Items>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:FormRow>
<Items>
<f:DatePicker ID="txtPTP_ModifyDate" runat="server" Label="修改时间" LabelAlign="Right" LabelWidth="120px"></f:DatePicker>
<f:TextBox ID="txtPTP_LeakageTestService" runat="server" Label="泄露性试验介质" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtPTP_TestPackageCode" runat="server" Label="试压包号" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
</Items>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
@@ -91,18 +103,18 @@
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<Items>
<f:TextBox ID="txtPTP_CleaningMedium" runat="server" Label="清扫介质" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:DropDownList ID="drpPTP_TestType" runat="server" Label="试验类型" LabelAlign="Right" EnableEdit="true" LabelWidth="120px"></f:DropDownList>
<f:TextBox ID="txtPTP_TestHeat" runat="server" Label="试验压力" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:FormRow>
<Items>
<f:TextBox ID="txtPTP_TestAmbientTemp" runat="server" Label="试验环境温度" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtPTP_TestMediumTemp" runat="server" Label="试验介质温度" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtPTP_AllowSeepage" runat="server" Label="允许渗水量" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
<f:TextBox ID="txtPTP_AllowSeepage" runat="server" Label="允许渗水量" LabelAlign="Right" LabelWidth="120px"></f:TextBox>
</Items>
</f:FormRow>
<f:FormRow>
@@ -120,8 +132,8 @@
</Items>
</f:FormRow>
<f:FormRow >
<Items>
<f:FormRow>
<Items>
<f:DropDownList ID="drpPTP_Tabler" runat="server" Label="建档人" LabelAlign="Right" EnableEdit="true" Required="true" ShowRedStar="true" LabelWidth="120px"></f:DropDownList>
<f:DatePicker ID="txtPTP_TableDate" runat="server" Label="建档时间" LabelAlign="Right" LabelWidth="120px"></f:DatePicker>
<f:TextBox ID="txtPTP_Remark" runat="server" Label="备注" LabelAlign="Right" MaxLength="100" LabelWidth="120px"></f:TextBox>
@@ -10,6 +10,20 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
@@ -41,43 +55,78 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
if (!IsPostBack)
{
//施工单位、装置
//if (BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId) == null || BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId).UnitTypeId == BLL.Const.ProjectUnitType_1)
//{
// BLL.UnitService.InitUnitNameByUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
// BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, true);
//}
//else
//{
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnitId, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
//}
var pUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2);
if (pUnit != null)
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.drpUnitId.DataTextField = "UnitName";
this.drpUnitId.DataValueField = "UnitId";
this.drpUnitId.DataSource = pUnit;
this.drpUnitId.DataBind();
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
if (CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && CurrUser.UserId != Const.hfnbdId)
{
this.drpUnitId.Enabled = false;
}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
BLL.UserService.InitUserDropDownList(this.drpPTP_Modifier, this.CurrUser.LoginProjectId, true);//修改人
BLL.Base_PressureService.InitPressureDropDownList(this.drpPTP_TestType, true);//试验类型
BLL.UserService.InitUserDropDownList(this.drpPTP_Tabler, this.CurrUser.LoginProjectId, true);//建档人
this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.txtPTP_TableDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.drpPTP_Tabler.SelectedValue = this.CurrUser.UserId;
this.InitTreeMenu();
}
}
private void InitDropDownList()
{
//施工单位、装置
//if (BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId) == null || BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId).UnitTypeId == BLL.Const.ProjectUnitType_1)
//{
// BLL.UnitService.InitUnitNameByUnitTypeDropDownList(this.drpUnitId, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
// BLL.Project_InstallationService.InitInstallationDropDownList(this.drpInstallationId, this.ProjectId, true);
//}
//else
//{
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnitId, this.ProjectId, this.CurrUser.UnitId, true);
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.CurrUser.UnitId, true);
//}
var pUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_2);
if (pUnit != null)
{
this.drpUnitId.DataTextField = "UnitName";
this.drpUnitId.DataValueField = "UnitId";
this.drpUnitId.DataSource = pUnit;
this.drpUnitId.DataBind();
this.drpUnitId.SelectedValue = this.CurrUser.UnitId;
if (CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && CurrUser.UserId != Const.hfnbdId)
{
this.drpUnitId.Enabled = false;
}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnitId.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
BLL.UserService.InitUserDropDownList(this.drpPTP_Modifier, this.ProjectId, true);//修改人
BLL.UserService.InitUserDropDownList(this.drpPTP_Tabler, this.ProjectId, true);//建档人
this.drpPTP_Tabler.SelectedValue = this.CurrUser.UserId;
}
/// <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.InitTreeMenu();
}
#endregion
#region --
@@ -86,6 +135,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtReportDate.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
@@ -102,16 +155,16 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var unit = BLL.ProjectUnitService.GetProjectUnitById(this.CurrUser.UnitId);
if (unit == null || unit.UnitType == BLL.Const.ProjectUnitType_1 || unit.UnitType == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -122,7 +175,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (!this.txtReportDate.Hidden)
{
testPackageLists = (from x in Funs.DB.TP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
where x.ProjectId == this.ProjectId && x.PTP_TableDate >= startTime && x.PTP_TableDate < endTime
select x).ToList();
}
if (units != null)
@@ -495,7 +548,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
return;
}
Model.TP_TestPackage testPackage = new Model.TP_TestPackage();
testPackage.ProjectId = this.CurrUser.LoginProjectId;
testPackage.ProjectId = this.ProjectId;
testPackage.BSU_ID = this.drpUnitId.SelectedValue;
testPackage.InstallationId = this.drpInstallationId.SelectedValue;
testPackage.PTP_TestPackageNo = this.txtPTP_TestPackageNo.Text.Trim();
@@ -547,7 +600,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
testPackage.PTP_ID = PTP_ID;
BLL.TestPackageManageEditService.UpdateTP_TestPackage(testPackage);
// BLL.TestPackageManageEditService.DeleteTP_IsoListByPTP_ID(PTP_ID);
// BLL.TestPackageManageEditService.DeleteTP_IsoListByPTP_ID(PTP_ID);
//BLL.LogService.AddLog(this.CurrUser.UserId, "修改试压单信息");
}
}
@@ -561,7 +614,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
}
var oldios = Funs.DB.TP_IsoList.Where(x => x.PTP_ID == this.PTP_ID).ToList();
var oldios = Funs.DB.TP_IsoList.Where(x => x.PTP_ID == this.PTP_ID).ToList();
//添加新的
foreach (var item in isoInfos)
{
@@ -572,7 +625,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
has = true;
break;
}
}
}
if (!has)
{
@@ -588,7 +641,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
bool has = false;
foreach (var newios in isoInfos)
{
if(old.ISO_ID== newios.ISO_ID)
if (old.ISO_ID == newios.ISO_ID)
{
has = true;
break;
@@ -600,7 +653,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
}
}
Funs.DB.SubmitChanges();
isoInfos.Clear();
isoInfos.Clear();
ShowNotify("保存成功!", MessageBoxIcon.Success);
InitTreeMenu();
}
@@ -706,17 +759,17 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
this.drpInstallationId.Items.Clear();
if (!string.IsNullOrEmpty(this.drpUnitId.SelectedValue) && this.drpUnitId.SelectedValue != BLL.Const._Null)
{
//if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
//if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
//{
// BLL.Project_InstallationService.InitInstallationBySupervisorUnitIdListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, this.CurrUser.UnitId, true);
// BLL.Project_InstallationService.InitInstallationBySupervisorUnitIdListDownList(this.drpInstallationId, this.ProjectId, this.drpUnitId.SelectedValue, this.CurrUser.UnitId, true);
// this.drpInstallationId.SelectedIndex = 0;
//}
//else
//{
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, true);
// BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnitId.SelectedValue, true);
// this.drpInstallationId.SelectedIndex = 0;
//}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnitId.SelectedValue, true);
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnitId.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
else
@@ -724,7 +777,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
Funs.FineUIPleaseSelect(this.drpInstallationId);
}
changeTestPackageNo(sender, e);
}
}
#endregion
#region
@@ -754,7 +807,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageManageMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageManageMenuId, button);
}
#endregion
@@ -775,7 +828,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (install != null && unit != null)
{
string code = unit.UnitCode + "-" + install.InstallationCode + "-SYB-";
txtPTP_TestPackageNo.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.TP_TestPackage", "PTP_TestPackageNo", this.CurrUser.LoginProjectId, code);
txtPTP_TestPackageNo.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.TP_TestPackage", "PTP_TestPackageNo", this.ProjectId, code);
}
}
@@ -798,7 +851,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (testMedium != null)
{
string code = install.InstallationCode + "-" + testMedium.MediumCode + "-";
txtPTP_TestPackageCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.TP_TestPackage", "PTP_TestPackageCode", this.CurrUser.LoginProjectId, code);
txtPTP_TestPackageCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.TP_TestPackage", "PTP_TestPackageCode", this.ProjectId, code);
}
}
}
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageManageView.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackageManage.TestPackageManageView" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
@@ -30,12 +32,22 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<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="panelLeftRegion2" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="280px" Title="试压包审核" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker ID="txtReportDate" runat="server" Label="月份" LabelAlign="Right" LabelWidth="60px" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
<f:DatePicker ID="txtReportDate" runat="server" Label="月份" LabelAlign="Right" LabelWidth="60px" EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
DateFormatString="yyyy-MM" Width="200px">
</f:DatePicker>
</Items>
@@ -10,6 +10,20 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
@@ -62,13 +76,49 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
{
if (!IsPostBack)
{
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.CurrUser.LoginProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtReportDate.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
BLL.UserService.InitUserDropDownList(this.drpPTP_Finisher, this.CurrUser.LoginProjectId, true);//完工人
this.InitTreeMenu();
}
}
private void InitDropDownList()
{
BLL.UserService.InitUserDropDownList(this.drpPTP_Finisher, 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.InitTreeMenu();
}
#endregion
#region --
@@ -77,6 +127,10 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtReportDate.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtReportDate.Text.Trim());
@@ -93,16 +147,16 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
var unit = BLL.UnitService.GetUnitByUnitId(this.CurrUser.UnitId);
if (unit == null || unit.UnitTypeId == BLL.Const.ProjectUnitType_1 || unit.UnitTypeId == BLL.Const.ProjectUnitType_3)
{
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.CurrUser.LoginProjectId))
if (BLL.WorkAreaService.IsSupervisor(this.CurrUser.UnitId, this.ProjectId))
{
units = (from x in Funs.DB.Base_Unit
join y in Funs.DB.ProjectData_WorkArea on x.UnitId equals y.UnitId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.CurrUser.LoginProjectId
where (x.UnitId == this.CurrUser.UnitId || y.SupervisorUnitId == this.CurrUser.UnitId) && y.ProjectId == this.ProjectId
select x).Distinct().ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, "2");
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, "2");
}
}
else
@@ -113,7 +167,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
if (!this.txtReportDate.Hidden)
{
testPackageLists = (from x in Funs.DB.TP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId && x.PTP_AduditDate >= startTime && x.PTP_AduditDate < endTime
where x.ProjectId == this.ProjectId && x.PTP_AduditDate >= startTime && x.PTP_AduditDate < endTime
select x).ToList();
}
if (units != null)
@@ -472,7 +526,7 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageManageViewMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_TestPackageManageViewMenuId, button);
}
#endregion
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.TestPackageManage
/// </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>
/// panelLeftRegion2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion2;
/// <summary>
/// Toolbar1 控件。
/// </summary>