焊接管理,补充公司级树

This commit is contained in:
夏菊 2025-04-14 09:53:19 +08:00
parent f5344bddfb
commit c8b553efc6
16 changed files with 832 additions and 383 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,8 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HotProessTrust.aspx.cs"
Inherits="FineUIPro.Web.HJGL.HotProcessHard.HotProessTrust" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
@ -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="320px" Title="热处理委托"
ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px"
IconFont="ArrowCircleLeft">
@ -40,7 +52,7 @@
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="热处理委托"
TitleToolTip="热处理委托" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right" >
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:TextBox runat="server" ID="hdHotProessTrustId" Hidden="true">
</f:TextBox>
@ -66,21 +78,19 @@
<f:FormRow>
<Items>
<f:Label ID="txtHotProessTrustNo" Label="委托单号"
runat="server" LabelAlign="Left" >
runat="server" LabelAlign="Left">
</f:Label>
<f:Label ID="txtProessDate" Label="委托日期" runat="server"
LabelAlign="Left" >
LabelAlign="Left">
</f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Label ID="txtTabler" Label="制表人" runat="server" LabelAlign="Left"
>
<f:Label ID="txtTabler" Label="制表人" runat="server" LabelAlign="Left">
</f:Label>
<f:Label ID="txtRemark" Label="备注" runat="server" LabelAlign="Left"
>
<f:Label ID="txtRemark" Label="备注" runat="server" LabelAlign="Left">
</f:Label>
</Items>
</f:FormRow>

View File

@ -11,6 +11,20 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 热处理委托主键
/// </summary>
public string HotProessTrustId
@ -36,13 +50,42 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
{
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();
}
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.HotProessTrustId = string.Empty;
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
@ -57,7 +100,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotProessTrustMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotProessTrustMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
@ -82,6 +125,10 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "装置-单位-工作区";
@ -89,14 +136,14 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
////装置
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.ProjectId select x).ToList();
////区域
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.ProjectId select x).ToList();
////单位
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.ProjectId select x).ToList();
var workAreaIdList = (from x in BLL.Funs.DB.PW_IsoInfo
where x.ProjectId == this.CurrUser.LoginProjectId
where x.ProjectId == this.ProjectId
orderby x.ISO_IsoNo
select x.WorkAreaId).Distinct().ToList();
pWorkArea = pWorkArea.Where(x => workAreaIdList.Contains(x.WorkAreaId)).OrderBy(x => x.WorkAreaCode).ToList();
@ -223,7 +270,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotProessTrustMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_HotProessTrustMenuId);
if (this.tvControlItem.SelectedNode.CommandName == "委托单号")
{
if (buttonList.Contains(BLL.Const.BtnSave))
@ -274,7 +321,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
+ @" FROM dbo.View_HJGL_HotProess_TrustItem AS Trust"
+ @" WHERE Trust.ProjectId= @ProjectId AND Trust.HotProessTrustId=@HotProessTrustId ";
listStr.Add(new SqlParameter("@ProjectId", hotProessTrust != null ? hotProessTrust.ProjectId : this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", hotProessTrust != null ? hotProessTrust.ProjectId : this.ProjectId));
listStr.Add(new SqlParameter("@HotProessTrustId", this.HotProessTrustId));
if (!string.IsNullOrEmpty(this.txtIsoNo.Text.Trim()))
@ -405,7 +452,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// <param name="e"></param>
protected void btnNew_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnAdd))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnAdd))
{
if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.ToolTip == "区域")
{
@ -434,7 +481,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// <param name="e"></param>
protected void btnEdit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnSave))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnSave))
{
var trustManage = BLL.HotProess_TrustService.GetHotProessTrustById(this.HotProessTrustId);
if (trustManage != null)
@ -463,7 +510,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnDelete))
{
var trustManage = BLL.HotProess_TrustService.GetHotProessTrustById(this.HotProessTrustId);
if (trustManage != null)
@ -479,7 +526,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
}
BLL.HotProessTrustItemService.DeleteHotProessTrustItemById(this.HotProessTrustId);
BLL.HotProess_TrustService.DeleteHotProessTrustById(this.HotProessTrustId);
//BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Resources.Lan.DeleteHotProess);
//BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, Resources.Lan.DeleteHotProess);
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
this.InitTreeMenu();
SetTextTemp();
@ -536,7 +583,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// <param name="e"></param>
protected void btnMenuHotProessReport_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnSave))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_HotProessTrustMenuId, Const.BtnSave))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HotProessReport.aspx?HotProessTrustItemId={0}", this.Grid1.SelectedRowID, "编辑热处理报告 - ")));
}

View File

@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
/// </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>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JointInfo.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.JointInfo" %>
<%@ 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="300px" Title="焊口信息" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>

View File

@ -1,20 +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;
using NPOI.XSSF.UserModel;
using NPOI.SS.UserModel;
using System.Runtime.Serialization;
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class JointInfo : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -25,6 +38,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
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.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
//显示列
@ -35,6 +62,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
/// <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 --
@ -43,6 +86,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "装置-单位-工作区";
@ -50,14 +97,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
////装置
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.ProjectId select x).ToList();
////区域
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.ProjectId select x).ToList();
////单位
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.ProjectId select x).ToList();
var workAreaIdList = (from x in BLL.Funs.DB.PW_IsoInfo
where x.ProjectId == this.CurrUser.LoginProjectId && x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
where x.ProjectId == this.ProjectId && x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
orderby x.ISO_IsoNo
select x.WorkAreaId).Distinct().ToList();
pWorkArea = pWorkArea.Where(x => workAreaIdList.Contains(x.WorkAreaId)).OrderBy(x => x.WorkAreaCode).ToList();
@ -145,14 +192,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
workAreas = workAreas.OrderByDescending(x => x.WorkAreaCode);
foreach (var q in workAreas)
{
int a = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId && x.Is_Standard== true select x).Count();
int a = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.ProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId && x.Is_Standard== true select x).Count();
TreeNode newNode1 = new TreeNode();
newNode1.Text = q.WorkAreaCode + "【" + a.ToString() + "非标管线】";
newNode1.NodeID = q.WorkAreaId+ "_NoStandard";
newNode1.EnableExpandEvent = true;
newNode1.ToolTip = "区域非标管线";
node.Nodes.Add(newNode1);
int b = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId && x.Is_Standard != true select x).Count();
int b = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.ProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId && x.Is_Standard != true select x).Count();
TreeNode newNode2 = new TreeNode();
newNode2.Text = q.WorkAreaCode + "【" + b.ToString() + "标准管线】";
newNode2.NodeID = q.WorkAreaId+ "_Standard";
@ -193,7 +240,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
e.Node.Nodes.Clear();
List<Model.PW_IsoInfo> isoInfo = new List<Model.PW_IsoInfo>();
isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard==true
where x.ProjectId == this.ProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard==true
&& x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
orderby x.ISO_IsoNo
select x).ToList();
@ -221,7 +268,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
e.Node.Nodes.Clear();
List<Model.PW_IsoInfo> isoInfo = new List<Model.PW_IsoInfo>();
isoInfo = (from x in BLL.Funs.DB.PW_IsoInfo
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard == false
where x.ProjectId == this.ProjectId && x.WorkAreaId == e.Node.NodeID.Split('_')[0] && x.Is_Standard == false
&& x.ISO_IsoNo.Contains(this.txtIsono.Text.Trim())
orderby x.ISO_IsoNo
select x).ToList();
@ -350,7 +397,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
+ @" WHERE jointInfo.ProjectId= @projectId AND jointInfo.ISO_ID=@isoId";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@projectId", this.ProjectId),
new SqlParameter("@isoId", this.tvControlItem.SelectedNodeID),
};
if (!string.IsNullOrEmpty(this.txtJOT_JointNo.Text.Trim()))
@ -561,11 +608,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
else if (judgementDelete(rowID, isShow))
{
BLL.PW_JointInfoService.DeleteJointInfo(rowID);
//BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
//BLL.Sys_LogService.AddLog(BLL.Const.System_7, this.ProjectId, this.CurrUser.UserId, "删除焊口信息");
}
}
Project_HJGLData_HJGLService.StatisticalData(this.CurrUser.LoginProjectId, Project_HJGLData_HJGLService.HJGLDateType.ArrivalFactor);
Project_HJGLData_HJGLService.StatisticalData(this.ProjectId, Project_HJGLData_HJGLService.HJGLDateType.ArrivalFactor);
//ShowNotify("删除成功!", MessageBoxIcon.Success);
this.BindGrid();
}
@ -597,7 +644,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
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.ResetData();
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
@ -668,7 +715,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@projectId", this.ProjectId),
new SqlParameter("@isoId", this.tvControlItem.SelectedNodeID),
};
@ -825,7 +872,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// + @" WHERE jointInfo.ProjectId= @projectId AND jointInfo.ISO_ID=@isoId order by JOT_JointNo ";
// List<SqlParameter> listStr = new List<SqlParameter>
//{
// new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
// new SqlParameter("@projectId", this.ProjectId),
// new SqlParameter("@isoId", this.tvControlItem.SelectedNodeID),
//};
@ -889,7 +936,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
// {
// hssfworkbook.Write(filess);
// }
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
// //PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
// FileInfo filet = new FileInfo(ReportFileName);
// Response.Clear();
@ -996,7 +1043,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
+ @" WHERE jointInfo.ProjectId= @projectId AND jointInfo.ISO_ID=@isoId ";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@projectId", this.ProjectId),
new SqlParameter("@isoId", this.tvControlItem.SelectedNodeID),
};
if (!string.IsNullOrEmpty(this.txtJOT_JointNo.Text.Trim()))
@ -1085,7 +1132,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//{
// hssfworkbook.Write(filess);
//}
////PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.CurrUser.LoginProjectId)));
////PageContext.RegisterStartupScript(Window5.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointInfoReportId, isoId, varValue, this.ProjectId)));
//FileInfo filet = new FileInfo(ReportFileName);
//Response.Clear();
@ -1136,7 +1183,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
List<SqlParameter> listStr1 = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@projectId", this.ProjectId),
new SqlParameter("@isoId", this.tvControlItem.SelectedNodeID),
};
if (!string.IsNullOrEmpty(this.txtJOT_JointNo.Text.Trim()))
@ -1399,7 +1446,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_JointInfoMenuId, button);
}
#endregion

View File

@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </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>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipelineManage.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.PipelineManage" %>
<%@ 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="300px" Title="管线信息" ShowBorder="true" Layout="VBox"
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
<Toolbars>
@ -67,7 +79,7 @@
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" AllowColumnLocking="true">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" Locked="true"/>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" Locked="true" />
<f:RenderField Width="200px" ColumnID="ISO_IsoNo" DataField="ISO_IsoNo"
FieldType="String" HeaderText="管线代号" HeaderTextAlign="Center" Locked="true">
</f:RenderField>

View File

@ -11,6 +11,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
public partial class PipelineManage : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
public string treeNodeId
{
get
@ -34,6 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
#endregion
#region
/// <summary>
/// 加载页面
@ -44,10 +60,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
if (!IsPostBack)
{
//Funs.DropDownPageSize(this.ddlPageSize);
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
{
this.ProjectId = Request.Params["projectId"];
}
this.InitDropDownList();
this.ucTree.UnitId = this.CurrUser.UnitId;
this.ucTree.ProjectId = this.ProjectId;
if (!string.IsNullOrEmpty(this.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
BLL.Base_TestMediumService.InitMediumDropDownList(this.drpSer, true);//介质
BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(this.drpNDT, true);//探伤类型
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpSteId, true,this.CurrUser.LoginProjectId);//材质
ListItem[] lis = new ListItem[3];
lis[0] = new ListItem("- 请选择 -", "");
lis[1] = new ListItem("是","1");
@ -66,6 +96,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
private void InitDropDownList()
{
BLL.Base_MaterialService.InitMaterialDropDownList(this.drpSteId, true, this.CurrUser.LoginProjectId);//材质
}
/// <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.ProjectId))
{
btnNew.Hidden = true;
}
//this.GetButtonPower();
this.InitTreeMenu();
}
#endregion
#region --
@ -74,6 +126,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "装置-单位-工作区";
@ -81,11 +137,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
rootNode.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode);
////装置
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pInstallation = (from x in Funs.DB.Project_Installation where x.ProjectId == this.ProjectId select x).ToList();
////区域
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pWorkArea = (from x in Funs.DB.ProjectData_WorkArea where x.ProjectId == this.ProjectId select x).ToList();
////单位
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.ProjectId select x).ToList();
if (!string.IsNullOrEmpty(this.txtWorkArea.Text))
{
@ -175,7 +231,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
workAreas = workAreas.OrderByDescending(x => x.WorkAreaCode);
foreach (var q in workAreas)
{
int a = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId select x).Count();
int a = (from x in BLL.Funs.DB.PW_IsoInfo where x.ProjectId == this.ProjectId && x.UnitId == node.NodeID.Split('|')[0] && x.WorkAreaId == q.WorkAreaId select x).Count();
TreeNode newNode = new TreeNode();
newNode.Text = q.WorkAreaCode + "【" + a.ToString() + "】管线";
newNode.NodeID = q.WorkAreaId;
@ -208,6 +264,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </summary>
private void BindGrid(string treeNodeId="")
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @"SELECT iso.ISO_ID,
iso.ProjectId,
iso.ISO_IsoNo,
@ -260,7 +320,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
+ @" LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId = iso.PipingClassId"
+ @" WHERE iso.ProjectId=@ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(treeNodeId))
{
@ -512,7 +572,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
Project_HJGLData_HJGLService.StatisticalData(this.CurrUser.LoginProjectId, Project_HJGLData_HJGLService.HJGLDateType.ArrivalFactor);
Project_HJGLData_HJGLService.StatisticalData(this.ProjectId, Project_HJGLData_HJGLService.HJGLDateType.ArrivalFactor);
if (!string.IsNullOrEmpty(isoRes))
{
@ -774,7 +834,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <returns></returns>
private bool GetButtonPower(string button)
{
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_PipelineManageMenuId, button);
return BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_PipelineManageMenuId, button);
}
#endregion
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingManage {
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class PipelineManage {
public partial class PipelineManage
{
/// <summary>
/// form1 控件。
@ -48,6 +50,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </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>

View File

@ -1,5 +1,7 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointManage.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.PointManage" %>
<%@ 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>

View File

@ -10,6 +10,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 点口管理主键
/// </summary>
public string PW_PointID
@ -53,59 +67,25 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
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.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtPointManageDate.Text = string.Format("{0:yyyy-MM}", System.DateTime.Now);
this.InitTreeMenu();//加载树
#region
BLL.UserService.InitUserDropDownList(this.drpTabler, this.CurrUser.LoginProjectId, true);//制单人
//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))
// {
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
// }
// else
// {
// BLL.UnitService.InitUnitNameByUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
// }
//}
//else
//{
// BLL.UnitService.InitSubUnitNameListDownList(this.drpUnit, this.CurrUser.LoginProjectId, this.CurrUser.UnitId, true);
//}
var pUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2);
if (pUnit != null)
{
this.drpUnit.DataTextField = "UnitName";
this.drpUnit.DataValueField = "UnitId";
this.drpUnit.DataSource = pUnit;
this.drpUnit.DataBind();
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
if (CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId)
{
this.drpUnit.Enabled = false;
}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
//Funs.FineUIPleaseSelect(this.drpInstallationId);
this.drpTabler.SelectedValue = this.CurrUser.UserId;
this.txtTableDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
this.txtPointDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
//if (BLL.Project_SysSetService.IsAuto("2", this.CurrUser.LoginProjectId) == true)
var set = BLL.Project_SysSetService.GetSysSetBySetId("2", this.CurrUser.LoginProjectId);
if (set != null && set.IsAuto == true)
{
string date = this.txtPointDate.Text.Trim().Replace("-", "");
this.txtPointID.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode3ByProjectPrefix", "dbo.BO_Point", "PW_PointNo", this.CurrUser.LoginProjectId, date + "-");
}
else
{
this.txtPointID.Readonly = false;
}
#endregion
this.InitTreeMenu();//加载树
}
else
{
@ -117,6 +97,72 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
private void InitDropDownList()
{
BLL.UserService.InitUserDropDownList(this.drpTabler, this.ProjectId, true);//制单人
//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.ProjectId))
// {
// BLL.UnitService.InitSubUnitNameDownList(this.drpUnit, this.ProjectId, this.CurrUser.UnitId, true);
// }
// else
// {
// BLL.UnitService.InitUnitNameByUnitTypeDropDownList(this.drpUnit, this.ProjectId, BLL.Const.ProjectUnitType_2, true);
// }
//}
//else
//{
// BLL.UnitService.InitSubUnitNameListDownList(this.drpUnit, this.ProjectId, this.CurrUser.UnitId, true);
//}
var pUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_2);
if (pUnit != null)
{
this.drpUnit.DataTextField = "UnitName";
this.drpUnit.DataValueField = "UnitId";
this.drpUnit.DataSource = pUnit;
this.drpUnit.DataBind();
this.drpUnit.SelectedValue = this.CurrUser.UnitId;
if (CommonService.GetProjectUnitType(this.ProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId)
{
this.drpUnit.Enabled = false;
}
BLL.Project_InstallationService.InitInstallationListDownList(this.drpInstallationId, this.ProjectId, this.drpUnit.SelectedValue, true);
this.drpInstallationId.SelectedIndex = 0;
}
//Funs.FineUIPleaseSelect(this.drpInstallationId);
this.drpTabler.SelectedValue = this.CurrUser.UserId;
//if (BLL.Project_SysSetService.IsAuto("2", this.ProjectId) == true)
var set = BLL.Project_SysSetService.GetSysSetBySetId("2", this.ProjectId);
if (set != null && set.IsAuto == true)
{
string date = this.txtPointDate.Text.Trim().Replace("-", "");
this.txtPointID.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode3ByProjectPrefix", "dbo.BO_Point", "PW_PointNo", this.ProjectId, date + "-");
}
else
{
this.txtPointID.Readonly = false;
}
}
/// <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
private void seTGV()
@ -166,6 +212,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtPointManageDate.Text.Trim()))
{
DateTime? startTime = Funs.GetNewDateTime(this.txtPointManageDate.Text.Trim());

View File

@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </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>

View File

@ -1,10 +1,12 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeldReport.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.WeldReport" %>
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>焊接日报</title>
<title>焊接日报</title>
</head>
<body>
<form id="form1" runat="server">
@ -12,6 +14,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="300px" Title="焊接日报"
ShowBorder="true" Layout="VBox" ShowHeader="true" AutoScroll="true" BodyPadding="5px"
IconFont="ArrowCircleLeft">
@ -43,7 +55,7 @@
<f:Button ID="btnEdit" ToolTip="编辑" Text="编辑" Icon="BulletEdit" runat="server" EnablePostBack="true" OnClick="btnEdit_Click">
</f:Button>
<f:Button ID="btnDelete" ToolTip="删除" Text="删除" Icon="Delete" runat="server" ConfirmText="删除选中记录?" ConfirmTarget="Top"
EnablePostBack="true" OnClick="btnDelete_Click" >
EnablePostBack="true" OnClick="btnDelete_Click">
</f:Button>
<f:Button ID="btnImport" runat="server" ToolTip="导入" Text="导入" Icon="ApplicationGet" OnClick="btnImport_Click"></f:Button>
<f:Button ID="btnPrint" ToolTip="打印" Icon="Printer" Text="打印" runat="server" OnClick="btnPrint_Click">

View File

@ -11,6 +11,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 焊接日报主键
/// </summary>
public string DReportID
@ -29,6 +43,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
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.ProjectId))
{
this.panelLeftRegion.Hidden = true;
////权限按钮方法
//this.GetButtonPower();
}
this.txtMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
btnNew.OnClientClick = Window1.GetShowReference("WeldReportEdit.aspx") + "return false;";
@ -36,25 +64,45 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
/// <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();
}
#region -
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
if (!string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
{
this.tvControlItem.Nodes.Clear();
List<Model.Base_Unit> units = null;
var getUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
var getUnit = BLL.ProjectUnitService.GetProjectUnitByUnitIdProjectId(this.ProjectId, this.CurrUser.UnitId);
if (getUnit != null && getUnit.UnitType == BLL.Const.ProjectUnitType_2)
{
units = (from x in Funs.DB.Base_Unit where x.UnitId == this.CurrUser.UnitId select x).ToList();
}
else
{
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2);
units = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.ProjectId, BLL.Const.ProjectUnitType_2);
}
if (units != null)
@ -70,13 +118,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var instaRe = (from x in Funs.DB.BO_WeldReportMain
join y in Funs.DB.Project_Installation
on x.InstallationId equals y.InstallationId
where x.UnitId == unit.UnitId && x.ProjectId == this.CurrUser.LoginProjectId
where x.UnitId == unit.UnitId && x.ProjectId == this.ProjectId
select y).Distinct();
foreach (var ins in instaRe)
{
TreeNode newNode = new TreeNode();
newNode.Text = ins.InstallationName;
newNode.NodeID = ins.InstallationId+"|"+rootNode.NodeID;
newNode.NodeID = ins.InstallationId + "|" + rootNode.NodeID;
newNode.EnableExpandEvent = true;
newNode.CommandName = "Installation";
rootNode.Nodes.Add(newNode);
@ -112,7 +160,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
TreeNode newNode = new TreeNode();
newNode.Text = this.txtMonth.Text.Trim();
newNode.NodeID = this.txtMonth.Text.Trim()+"|"+e.NodeID;
newNode.NodeID = this.txtMonth.Text.Trim() + "|" + e.NodeID;
newNode.EnableExpandEvent = true;
newNode.CommandName = "Month";
e.Node.Nodes.Add(newNode);
@ -135,7 +183,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
TreeNode newNode = new TreeNode();
newNode.Text = string.Format("{0:yyyy-MM-dd}", day);
newNode.NodeID = day.ToString()+"|"+e.NodeID;
newNode.NodeID = day.ToString() + "|" + e.NodeID;
newNode.EnableExpandEvent = true;
newNode.CommandName = "Day";
e.Node.Nodes.Add(newNode);
@ -387,7 +435,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <param name="e"></param>
protected void btnEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HJGL_WeldReportMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_WeldReportMenuId, BLL.Const.BtnModify))
{
var daily = BLL.WeldReportService.GetWeldReportByDReportID(tvControlItem.SelectedNodeID);
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID) && daily != null)
@ -422,7 +470,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_WeldReportMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_WeldReportMenuId, Const.BtnDelete))
{
var daily = BLL.WeldReportService.GetWeldReportByDReportID(tvControlItem.SelectedNodeID);
if (daily == null)
@ -529,7 +577,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
string varValue = string.Empty;
var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
var project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
var unitName = BLL.UnitService.GetUnitNameByUnitId(report.UnitId);
var ins = BLL.Project_InstallationService.GetInstallationByInstallationId(report.InstallationId);
@ -539,7 +587,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
}
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointReportDayReportId, DReportID, varValue, this.CurrUser.LoginProjectId)));
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.HJGL_JointReportDayReportId, DReportID, varValue, this.ProjectId)));
}
else
{
@ -557,7 +605,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// <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_WeldReportMenuId, BLL.Const.BtnSave))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HJGL_WeldReportMenuId, BLL.Const.BtnSave))
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeldReportDataInNews.aspx", "导入 - ")));
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingManage {
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class WeldReport {
public partial class WeldReport
{
/// <summary>
/// form1 控件。
@ -48,6 +50,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// </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>