焊接管理,补充公司级树

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,27 +1,39 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrustManageAudit.aspx.cs" Inherits="FineUIPro.Web.HJGL.TrustManage.TrustManageAudit" %>
<%@ 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>
<style>
span {
white-space: nowrap; /*强制span不换行*/
display: inline-block; /*将span当做块级元素对待*/
overflow: hidden; /*超出宽度部分隐藏*/
text-overflow: ellipsis; /*超出部分以点号代替*/
line-height: 0.9; /*数字与之前的文字对齐*/
white-space: nowrap; /*强制span不换行*/
display: inline-block; /*将span当做块级元素对待*/
overflow: hidden; /*超出宽度部分隐藏*/
text-overflow: ellipsis; /*超出部分以点号代替*/
line-height: 0.9; /*数字与之前的文字对齐*/
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" 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">
@@ -48,22 +60,21 @@
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Button ID="btnAudit" Text="审核" Icon="TableKey" runat="server" EnablePostBack="true" OnClick="btnAudit_Click" Hidden="true"
>
<f:Button ID="btnAudit" Text="审核" Icon="TableKey" runat="server" EnablePostBack="true" OnClick="btnAudit_Click" Hidden="true">
</f:Button>
<f:Button ID="btnCancelAudit" Text="取消审核" Icon="ArrowUndo" runat="server" EnablePostBack="true" OnClick="btnCancelAudit_Click"
Hidden="true">
</f:Button>
<f:Button ID="btnPrint" runat="server" Icon="Printer" ToolTip="管道焊口打印" Text="管道" OnClick="btnPrint_Click"></f:Button>
<f:Button ID="Button1" runat="server" Icon="Printer" ToolTip="设备焊口打印" Text="设备" OnClick="btnPrint1_Click"></f:Button>
</Items>
Hidden="true">
</f:Button>
<f:Button ID="btnPrint" runat="server" Icon="Printer" ToolTip="管道焊口打印" Text="管道" OnClick="btnPrint_Click"></f:Button>
<f:Button ID="Button1" runat="server" Icon="Printer" ToolTip="设备焊口打印" Text="设备" OnClick="btnPrint1_Click"></f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
runat="server" RedStarPosition="BeforeText" LabelAlign="Left">
<Rows>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustCode" Label="委托单号" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -76,7 +87,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustDate" Label="委托日期" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -89,7 +100,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustType" Label="委托类型" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -102,7 +113,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustMan" Label="委托人" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -115,7 +126,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_Tabler" Label="制单人" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -128,7 +139,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_WeldMethod" Label="焊接方法" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -141,18 +152,18 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_RequestDate" Label="需检日期" runat="server"
LabelWidth="100px" LabelAlign="Right">
</f:Label>
<f:DropDownList ID="drpCH_AuditMan" Label="审核人" runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
</f:DropDownList>
<f:DropDownList ID="drpCH_AuditMan" Label="审核人" runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px" LabelAlign="Right">
</f:DropDownList>
<f:DatePicker ID="txtCH_AuditDate" Label="审核日期" runat="server" ShowRedStar="true" Required="true" LabelWidth="100px" DateFormatString="yyyy-MM-dd" LabelAlign="Right">
</f:DatePicker>
</f:DatePicker>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_Remark" Label="备注" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -179,11 +190,11 @@
Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="管线编号" ColumnID="ISO_IsoNo"
DataField="ISO_IsoNo" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="180px" >
TextAlign="Left" Width="180px">
</f:RenderField>
<f:RenderField HeaderText="焊口编号" ColumnID="JOT_JointNo"
DataField="JOT_JointNo" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="100px" >
TextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="备注" ColumnID="CH_Remark"
DataField="CH_Remark" FieldType="String" HeaderTextAlign="Center"
@@ -230,9 +241,9 @@
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1200px" Height="650px">
</f:Window>
</f:Window>
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
</form>
@@ -1,17 +1,10 @@
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;
using NPOI.SS.Util;
using NPOI.HSSF.UserModel;
namespace FineUIPro.Web.HJGL.TrustManage
{
@@ -19,6 +12,20 @@ namespace FineUIPro.Web.HJGL.TrustManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 委托主键
/// </summary>
public string CH_TrustID
@@ -52,6 +59,20 @@ namespace FineUIPro.Web.HJGL.TrustManage
{
if (!IsPostBack&&string.IsNullOrEmpty(CH_TrustID))
{
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();
this.InitTreeMenu();//加载树
@@ -60,25 +81,47 @@ namespace FineUIPro.Web.HJGL.TrustManage
}
}
/// <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)
@@ -94,7 +137,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
var instaRe = (from x in Funs.DB.CH_Trust
join y in Funs.DB.Project_Installation
on x.InstallationId equals y.InstallationId
where x.CH_TrustUnit == unit.UnitId && x.ProjectId == this.CurrUser.LoginProjectId && x.CH_TrustType == "1"
where x.CH_TrustUnit == unit.UnitId && x.ProjectId == this.ProjectId && x.CH_TrustType == "1"
select y).Distinct();
foreach (var ins in instaRe)
{
@@ -217,7 +260,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
CH_TrustID = this.tvControlItem.SelectedNodeID;
this.drpCH_AuditMan.DataTextField = "UserName";
this.drpCH_AuditMan.DataValueField = "UserId";
this.drpCH_AuditMan.DataSource = BLL.UserService.GetProjectUserListByProjectId(this.CurrUser.LoginProjectId);
this.drpCH_AuditMan.DataSource = BLL.UserService.GetProjectUserListByProjectId(this.ProjectId);
this.drpCH_AuditMan.DataBind();
Funs.FineUIPleaseSelect(this.drpCH_AuditMan);
Model.CH_Trust trust = BLL.TrustManageEditService.GetCH_TrustByID(CH_TrustID);
@@ -425,7 +468,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrustManageAuditMenuId, BLL.Const.BtnAuditing))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.TrustManageAuditMenuId, BLL.Const.BtnAuditing))
{
var updatetrust = BLL.TrustManageEditService.GetCH_TrustByID(CH_TrustID);
if (updatetrust != null && !String.IsNullOrEmpty(this.CH_TrustID))
@@ -470,7 +513,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// <param name="e"></param>
protected void btnCancelAudit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrustManageAuditMenuId, BLL.Const.BtnCancelAuditing))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.TrustManageAuditMenuId, BLL.Const.BtnCancelAuditing))
{
var updatetrust = BLL.TrustManageEditService.GetCH_TrustByID(CH_TrustID);
if (updatetrust != null && !String.IsNullOrEmpty(this.CH_TrustID))
@@ -564,7 +607,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// if (q != null)
// {
// string varValue = string.Empty;
// //var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId);
// //var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.ProjectId);
// //var installationName = BLL.Project_InstallationService.GetInstallationByInstallationId(q.InstallationId).InstallationName;
// //var unitName = BLL.UnitService.GetUnitNameByUnitId(q.UnitId);
@@ -575,24 +618,24 @@ namespace FineUIPro.Web.HJGL.TrustManage
// varValue = Microsoft.JScript.GlobalObject.escape(varValue.Replace("/", ","));
// }
// if (BLL.Project_SysSetService.IsAuto("3", this.CurrUser.LoginProjectId) == true) //3表示无损委托
// if (BLL.Project_SysSetService.IsAuto("3", this.ProjectId) == true) //3表示无损委托
// {
// PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.TrustReportId, reportId, 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.TrustReportId, reportId, varValue, this.ProjectId)));
// }
// else if (BLL.Project_SysSetService.IsAuto("3", this.CurrUser.LoginProjectId) == false)
// else if (BLL.Project_SysSetService.IsAuto("3", this.ProjectId) == false)
// {
// PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.TrustReport2Id, reportId, 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.TrustReport2Id, reportId, varValue, this.ProjectId)));
// }
// else if (BLL.Project_SysSetService.IsAuto("3", this.CurrUser.LoginProjectId) == null)
// else if (BLL.Project_SysSetService.IsAuto("3", this.ProjectId) == null)
// {
// var p = BLL.Project_SysSetService.GetSysSetBySetId("3", this.CurrUser.LoginProjectId);
// var p = BLL.Project_SysSetService.GetSysSetBySetId("3", this.ProjectId);
// if (p.SetValue == "3")
// {
// PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.TrustReport3Id, reportId, 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.TrustReport3Id, reportId, varValue, this.ProjectId)));
// }
// else // 4表示为神化委托单
// {
// PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}&projectId={3}", BLL.Const.TrustReport4Id, reportId, 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.TrustReport4Id, reportId, varValue, this.ProjectId)));
// }
// }
@@ -643,7 +686,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
if (trust != null)
{
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(trust.InstallationId);
dr["ProjectName"] = projectName;
@@ -776,7 +819,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// Session["CH_TrustID"] = reportId;
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.SetId == "3").FirstOrDefault();
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.ProjectId && x.SetId == "3").FirstOrDefault();
if (sysSet != null && sysSet.IsAuto.HasValue && sysSet.IsAuto.Value)
{
initTemplatePath = "File\\Fastreport\\管道焊口检测委托单NoPic.frx";
@@ -794,7 +837,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
//if (trust != null)
//{
// 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(trust.InstallationId);
@@ -1024,7 +1067,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// 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();
@@ -1081,7 +1124,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
if (trust != null)
{
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(trust.InstallationId);
dr["ProjectName"] = projectName;
@@ -1214,7 +1257,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// Session["CH_TrustID"] = reportId;
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.SetId == "3").FirstOrDefault();
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.ProjectId && x.SetId == "3").FirstOrDefault();
if (sysSet != null && sysSet.IsAuto.HasValue && sysSet.IsAuto.Value)
{
initTemplatePath = "File\\Fastreport\\设备焊口检测委托单NoPic.frx";
@@ -1232,7 +1275,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
//if (trust != null)
//{
// 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(trust.InstallationId);
@@ -1462,7 +1505,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// 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();
@@ -1495,7 +1538,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// if (trust != null)
// {
// 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(trust.InstallationId);
@@ -1725,7 +1768,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// 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();
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// </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,11 +1,13 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrustManageEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.TrustManage.TrustManageEdit" %>
<%@ 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">
@@ -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">
@@ -39,34 +51,32 @@
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Button ID="btnNew" ToolTip="新增" Text="新增" Icon="Add" EnablePostBack="false" runat="server" >
<f:Button ID="btnNew" ToolTip="新增" Text="新增" Icon="Add" EnablePostBack="false" runat="server">
</f:Button>
<f:Button ID="btnEdit" ToolTip="编辑" Text="编辑" Icon="BulletEdit" runat="server" EnablePostBack="true" OnClick="btnEdit_Click">
<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="btnPrint" runat="server" Icon="Printer" EnablePostBack="true" Text="管道" ToolTip="管道焊口打印" OnClick="btnPrint_Click" DisableControlBeforePostBack="false">
<f:Button ID="btnPrint" runat="server" Icon="Printer" EnablePostBack="true" Text="管道" ToolTip="管道焊口打印" OnClick="btnPrint_Click" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="Button1" runat="server" Icon="Printer" EnablePostBack="true" Text="设备" ToolTip="设备焊口打印" OnClick="btnPrint1_Click" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="Button1" runat="server" Icon="Printer" EnablePostBack="true" Text="设备" ToolTip="设备焊口打印" OnClick="btnPrint1_Click" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Items>
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
runat="server" RedStarPosition="BeforeText" LabelAlign="Left">
<Rows>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustCode" Label="委托单号" runat="server"
LabelWidth="100px" LabelAlign="Right">
</f:Label>
<f:Label ID="txtCH_TrustUnit" Label="委托单位" runat="server"
<f:Label ID="txtCH_TrustUnit" Label="委托单位" runat="server"
LabelWidth="100px" LabelAlign="Right">
</f:Label>
<f:Label ID="txtInstallation" Label="装置名称" runat="server"
@@ -74,7 +84,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustDate" Label="委托日期" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -87,7 +97,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustType" Label="委托类型" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -100,7 +110,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_TrustMan" Label="委托人" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -113,7 +123,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_Tabler" Label="制单人" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -126,7 +136,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_WeldMethod" Label="焊接方法" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -139,7 +149,7 @@
</f:Label>
</Items>
</f:FormRow>
<f:FormRow Height="30px" >
<f:FormRow Height="30px">
<Items>
<f:Label ID="txtCH_RequestDate" Label="需检日期" runat="server"
LabelWidth="100px" LabelAlign="Right">
@@ -166,11 +176,11 @@
Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField HeaderText="管线编号" ColumnID="ISO_IsoNo"
DataField="ISO_IsoNo" FieldType="String" HeaderTextAlign="Center"
TextAlign="Left" Width="180px" >
TextAlign="Left" Width="180px">
</f:RenderField>
<f:RenderField HeaderText="焊口编号" ColumnID="JOT_JointNo"
DataField="JOT_JointNo" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="100px" >
TextAlign="Center" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="备注" ColumnID="CH_Remark"
DataField="CH_Remark" FieldType="String" HeaderTextAlign="Center"
@@ -217,9 +227,9 @@
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1010px" Height="650px">
</f:Window>
</f:Window>
<f:Window ID="Window2" Title="打印" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
EnableMaximize="true" Target="Top" EnableResize="false" runat="server"
IsModal="true" Width="1010px" Height="660px">
</f:Window>
</form>
@@ -1,5 +1,4 @@
using BLL;
using FineUIPro.Web.DataShow;
using System;
using System.Collections.Generic;
using System.Data;
@@ -13,6 +12,20 @@ namespace FineUIPro.Web.HJGL.TrustManage
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
/// <summary>
/// 委托主键
/// </summary>
public string CH_TrustID
@@ -46,6 +59,20 @@ namespace FineUIPro.Web.HJGL.TrustManage
{
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("TrustManageEditAdd.aspx") + "return false;";
@@ -53,25 +80,45 @@ namespace FineUIPro.Web.HJGL.TrustManage
}
}
/// <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)
@@ -87,7 +134,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
var instaRe = (from x in Funs.DB.CH_Trust
join y in Funs.DB.Project_Installation
on x.InstallationId equals y.InstallationId
where x.CH_TrustUnit == unit.UnitId && x.ProjectId == this.CurrUser.LoginProjectId && x.CH_TrustType == "1"
where x.CH_TrustUnit == unit.UnitId && x.ProjectId == this.ProjectId && x.CH_TrustType == "1"
select y).Distinct();
foreach (var ins in instaRe)
{
@@ -387,7 +434,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// <param name="e"></param>
protected void btnEdit_Click(object sender, EventArgs e)
{
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TrustManageEditMenuId, BLL.Const.BtnModify))
if (BLL.CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, BLL.Const.TrustManageEditMenuId, BLL.Const.BtnModify))
{
var trust = BLL.TrustManageEditService.GetCH_TrustByID(tvControlItem.SelectedNodeID);
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID) && trust != null)
@@ -417,7 +464,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TrustManageEditMenuId, Const.BtnDelete))
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.TrustManageEditMenuId, Const.BtnDelete))
{
var trust = BLL.TrustManageEditService.GetCH_TrustByID(tvControlItem.SelectedNodeID);
if (trust == null)
@@ -530,7 +577,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
if (trust != null)
{
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(trust.InstallationId);
dr["ProjectName"] = projectName;
@@ -662,7 +709,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// Session["CH_TrustID"] = reportId;
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.SetId == "3").FirstOrDefault();
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.ProjectId && x.SetId == "3").FirstOrDefault();
if (sysSet != null && sysSet.IsAuto .HasValue && sysSet.IsAuto .Value)
{
initTemplatePath = "File\\Fastreport\\管道焊口检测委托单NoPic.frx";
@@ -680,7 +727,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
//if (trust != null)
//{
// 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(trust.InstallationId);
@@ -910,7 +957,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// 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();
@@ -968,7 +1015,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
if (trust != null)
{
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(trust.InstallationId);
dr["ProjectName"] = projectName;
@@ -1102,7 +1149,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// Session["CH_TrustID"] = reportId;
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.SetId == "3").FirstOrDefault();
var sysSet = Funs.DB.Project_Sys_Set.Where(x => x.ProjectId == this.ProjectId && x.SetId == "3").FirstOrDefault();
if (sysSet != null && sysSet.IsAuto.HasValue && sysSet.IsAuto.Value)
{
initTemplatePath = "File\\Fastreport\\设备焊口检测委托单NoPic.frx";
@@ -1120,7 +1167,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
//if (trust != null)
//{
// 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(trust.InstallationId);
@@ -1350,7 +1397,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// 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();
@@ -1383,7 +1430,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// if (trust != null)
// {
// 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(trust.InstallationId);
@@ -1613,7 +1660,7 @@ namespace FineUIPro.Web.HJGL.TrustManage
// {
// 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();
@@ -50,6 +50,33 @@ namespace FineUIPro.Web.HJGL.TrustManage
/// </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>