20260310 隐蔽工程验收记录
This commit is contained in:
parent
85f4064684
commit
b9d1517070
|
|
@ -2500,6 +2500,11 @@ namespace BLL
|
|||
/// 质量控制点检查记录导出模板
|
||||
/// </summary>
|
||||
public const string JGZL_QualityControlPointInspectionUrl = "File\\Word\\JGZL\\质量控制点检查记录导出模板.docx";
|
||||
|
||||
/// <summary>
|
||||
/// 隐蔽工程验收记录导出模板
|
||||
/// </summary>
|
||||
public const string JGZL_ConcealedWorksInspectionRecordUrl = "File\\Word\\JGZL\\隐蔽工程验收记录导出模板.docx";
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,16 @@ namespace BLL
|
|||
return Funs.DB.JGZL_ConcealedWorksInspectionRecord.FirstOrDefault(e => e.RecordId == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取隐蔽工程验收记录
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.JGZL_ConcealedWorksInspectionRecord GetConcealedWorksInspectionRecordByProjectId(string projectId)
|
||||
{
|
||||
return Funs.DB.JGZL_ConcealedWorksInspectionRecord.FirstOrDefault(e => e.ProjectId == projectId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加隐蔽工程验收记录
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,47 @@
|
|||
SH/T 3503 -- J112
|
||||
隐蔽工程验收记录
|
||||
工程名称:
|
||||
单位工程名称:管道安装工程
|
||||
隐蔽项目
|
||||
|
||||
施工图号
|
||||
|
||||
隐
|
||||
蔽
|
||||
内
|
||||
容
|
||||
及
|
||||
简
|
||||
图
|
||||
|
||||
检
|
||||
查
|
||||
结
|
||||
果
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
建设/监理单位
|
||||
总承包单位
|
||||
施工单位
|
||||
专业工程师:
|
||||
|
||||
|
||||
日期: 年 月 日
|
||||
专业工程师:
|
||||
|
||||
|
||||
日期: 年 月 日
|
||||
施工班组长:
|
||||
质量检查员:
|
||||
专业工程师:
|
||||
日期: 年 月 日
|
||||
|
||||
|
|
@ -39,14 +39,46 @@
|
|||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnAdd" runat="server" Icon="Add" Text="增加" OnClick="btnAdd_Click"></f:Button>--%>
|
||||
<f:Button ID="btnPrint" Text="隐蔽工程验收记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出Word" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="隐蔽工程验收记录" EnableCollapse="true"
|
||||
<f:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtConcealedWorks" runat="server" Label="隐蔽项目" LabelAlign="Right" MaxLength="50" LabelWidth="120px" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:TextBox ID="txtDrawingNumber" runat="server" Label="施工图号" LabelAlign="Right" MaxLength="20" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtConcealedContentAndDiagram" runat="server" Label="隐蔽内容及简图" LabelAlign="Right" LabelWidth="120px" MaxLength="500" Height="200px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtInspectionResults" runat="server" Label="检查结果" LabelAlign="Right" LabelWidth="120px" MaxLength="500" Height="120px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%--<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="Right" LabelWidth="150px" MaxLength="500"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
<%--<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="隐蔽工程验收记录" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="RecordId" AllowCellEditing="true"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="RecordId" AllowSorting="true"
|
||||
SortField="DrawingNumber" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
|
|
@ -87,35 +119,35 @@
|
|||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</f:Grid>--%>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="隐蔽工程验收记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
<%--<f:Window ID="Window1" Title="隐蔽工程验收记录" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="900px" Height="600px">
|
||||
</f:Window>
|
||||
</f:Window>--%>
|
||||
<f:Window ID="WindowPrint" Title="打印隐蔽工程验收记录" Hidden="true" EnableIFrame="true" EnableMaximize="false"
|
||||
Target="Top" EnableResize="true" runat="server" IsModal="true" Width="1024px"
|
||||
Height="600px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<%--<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="编辑" Icon="TableEdit">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server" Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</f:Menu>--%>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
<%--<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</script>--%>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,53 @@
|
|||
using BLL;
|
||||
using Aspose.Words;
|
||||
using BLL;
|
||||
using FastReport;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FineUIPro.Web.JGZL
|
||||
{
|
||||
public partial class ConcealedWorksInspectionRecord : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
private string RecordId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["RecordId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["RecordId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
private string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
|
|
@ -23,7 +58,7 @@ namespace FineUIPro.Web.JGZL
|
|||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
//this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
|
||||
this.drpProjectId.DataTextField = "ProjectCode";
|
||||
this.drpProjectId.DataValueField = "ProjectId";
|
||||
|
|
@ -34,7 +69,40 @@ namespace FineUIPro.Web.JGZL
|
|||
this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
this.InitTreeMenu();//加载树
|
||||
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
|
||||
this.BindGrid();
|
||||
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||
DataInfo();
|
||||
//this.BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void DataInfo()
|
||||
{
|
||||
this.RecordId = string.Empty;
|
||||
this.txtDrawingNumber.Text = string.Empty;
|
||||
this.txtConcealedWorks.Text = string.Empty;
|
||||
this.txtConcealedContentAndDiagram.Text = string.Empty;
|
||||
this.txtInspectionResults.Text = string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
{
|
||||
var report = BLL.ConcealedWorksInspectionRecordService.GetConcealedWorksInspectionRecordByProjectId(this.ProjectId);
|
||||
if (report != null)
|
||||
{
|
||||
this.RecordId = report.RecordId;
|
||||
this.txtDrawingNumber.Text = report.DrawingNumber;
|
||||
this.txtConcealedWorks.Text = report.ConcealedWorks;
|
||||
this.txtConcealedContentAndDiagram.Text = report.ConcealedContentAndDiagram;
|
||||
this.txtInspectionResults.Text = report.InspectionResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
//默认值
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -82,7 +150,9 @@ namespace FineUIPro.Web.JGZL
|
|||
{
|
||||
if (this.tvControlItem.SelectedNodeID != "0")
|
||||
{
|
||||
this.BindGrid();
|
||||
this.ProjectId = this.tvControlItem.SelectedNodeID;
|
||||
DataInfo();
|
||||
//this.BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
|
@ -91,30 +161,30 @@ namespace FineUIPro.Web.JGZL
|
|||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
//string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
|
||||
string strSql = @"SELECT * from JGZL_ConcealedWorksInspectionRecord where 1=1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
strSql += " AND ProjectId = @ProjectId";
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
|
||||
// listStr.Add(new SqlParameter("@ProjectId", projectIds));
|
||||
//}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
//private void BindGrid()
|
||||
//{
|
||||
// //string projectIds = BLL.Base_ProjectService.GetStrOnProjectIds(this.CurrUser.UserId, "1");
|
||||
// string strSql = @"SELECT * from JGZL_ConcealedWorksInspectionRecord where 1=1";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
// {
|
||||
// strSql += " AND ProjectId = @ProjectId";
|
||||
// listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
|
||||
// }
|
||||
// //else
|
||||
// //{
|
||||
// // strSql += " AND CHARINDEX(ProjectId,@ProjectId)>0 ";
|
||||
// // listStr.Add(new SqlParameter("@ProjectId", projectIds));
|
||||
// //}
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// // 2.获取当前分页数据
|
||||
// Grid1.RecordCount = tb.Rows.Count;
|
||||
// //tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
// var table = this.GetPagedDataTable(Grid1, tb);
|
||||
// Grid1.DataSource = table;
|
||||
// Grid1.DataBind();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 分页排序
|
||||
|
|
@ -124,10 +194,10 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
//protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
//{
|
||||
// BindGrid();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 排序
|
||||
|
|
@ -136,10 +206,10 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
//protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
//{
|
||||
// BindGrid();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 分页选择下拉改变事件
|
||||
|
|
@ -148,11 +218,11 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
//protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
// BindGrid();
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
|
@ -164,9 +234,10 @@ namespace FineUIPro.Web.JGZL
|
|||
///<param name="e"></param>
|
||||
protected void drpProjectId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
|
||||
this.ProjectId = this.drpProjectId.SelectedValue;
|
||||
this.InitTreeMenu();
|
||||
BindGrid();
|
||||
this.tvControlItem.SelectedNodeID = this.ProjectId;
|
||||
DataInfo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -176,7 +247,7 @@ namespace FineUIPro.Web.JGZL
|
|||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
//this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
@ -197,23 +268,23 @@ namespace FineUIPro.Web.JGZL
|
|||
BLL.Common.FastReportService.ResetData();
|
||||
|
||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||
{
|
||||
var report = BLL.ConcealedWorksInspectionRecordService.GetConcealedWorksInspectionRecordById(this.Grid1.SelectedRowID);
|
||||
if (report != null)
|
||||
{
|
||||
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
||||
keyValuePairs.Add("ConcealedWorks", report.ConcealedWorks);
|
||||
keyValuePairs.Add("DrawingNumber", report.DrawingNumber);
|
||||
keyValuePairs.Add("ConcealedContentAndDiagram", report.ConcealedContentAndDiagram);
|
||||
keyValuePairs.Add("InspectionResults", report.InspectionResults);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||
//{
|
||||
// var report = BLL.ConcealedWorksInspectionRecordService.GetConcealedWorksInspectionRecordById(this.Grid1.SelectedRowID);
|
||||
// if (report != null)
|
||||
// {
|
||||
keyValuePairs.Add("ProjectName", BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName);
|
||||
keyValuePairs.Add("ConcealedWorks",txtConcealedWorks.Text.Trim());
|
||||
keyValuePairs.Add("DrawingNumber", txtDrawingNumber.Text.Trim());
|
||||
keyValuePairs.Add("ConcealedContentAndDiagram", txtConcealedContentAndDiagram.Text);
|
||||
keyValuePairs.Add("InspectionResults", txtInspectionResults.Text);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
|
||||
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
|
||||
initTemplatePath = "File\\Fastreport\\JGZL\\隐蔽工程验收记录.frx";
|
||||
|
|
@ -236,139 +307,139 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConcealedWorksInspectionRecordEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//protected void btnAdd_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
// {
|
||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConcealedWorksInspectionRecordEdit.aspx?projectId={0}", this.tvControlItem.SelectedNodeID, "新增 - ")));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 双击编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ConcealedWorksInspectionRecordMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConcealedWorksInspectionRecordEdit.aspx?recordId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
//protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
//{
|
||||
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ConcealedWorksInspectionRecordMenuId, BLL.Const.BtnModify))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID))
|
||||
// {
|
||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConcealedWorksInspectionRecordEdit.aspx?recordId={0}", this.Grid1.SelectedRowID, "编辑 - ")));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ConcealedWorksInspectionRecordMenuId, BLL.Const.BtnModify))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConcealedWorksInspectionRecordEdit.aspx?recordId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
//protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.JGZL_ConcealedWorksInspectionRecordMenuId, BLL.Const.BtnModify))
|
||||
// {
|
||||
// if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConcealedWorksInspectionRecordEdit.aspx?recordId={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 右键删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ConcealedWorksInspectionRecordMenuId, Const.BtnDelete))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ConcealedWorksInspectionRecordMenuId, Const.BtnDelete))
|
||||
// {
|
||||
// if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
// {
|
||||
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
// }
|
||||
|
||||
bool isShow = true;
|
||||
if (Grid1.SelectedRowIndexArray.Length > 1)
|
||||
{
|
||||
isShow = false;
|
||||
}
|
||||
bool isDelete = false;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
if (judgementDelete(rowID, isShow))
|
||||
{
|
||||
isDelete = true;
|
||||
BLL.ConcealedWorksInspectionRecordService.DeleteConcealedWorksInspectionRecordById(rowID);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除隐蔽工程验收记录");
|
||||
}
|
||||
}
|
||||
if (isDelete)
|
||||
{
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
// bool isShow = true;
|
||||
// if (Grid1.SelectedRowIndexArray.Length > 1)
|
||||
// {
|
||||
// isShow = false;
|
||||
// }
|
||||
// bool isDelete = false;
|
||||
// foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
// {
|
||||
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
// if (judgementDelete(rowID, isShow))
|
||||
// {
|
||||
// isDelete = true;
|
||||
// BLL.ConcealedWorksInspectionRecordService.DeleteConcealedWorksInspectionRecordById(rowID);
|
||||
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除隐蔽工程验收记录");
|
||||
// }
|
||||
// }
|
||||
// if (isDelete)
|
||||
// {
|
||||
// ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
// }
|
||||
// this.BindGrid();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
// }
|
||||
//}
|
||||
|
||||
#region 判断是否可删除
|
||||
/// <summary>
|
||||
/// 判断是否可以删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool judgementDelete(string id, bool isShow)
|
||||
{
|
||||
string content = string.Empty;
|
||||
//private bool judgementDelete(string id, bool isShow)
|
||||
//{
|
||||
// string content = string.Empty;
|
||||
|
||||
if (string.IsNullOrEmpty(content))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isShow)
|
||||
{
|
||||
Alert.ShowInTop(content, MessageBoxIcon.Error);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// if (string.IsNullOrEmpty(content))
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (isShow)
|
||||
// {
|
||||
// Alert.ShowInTop(content, MessageBoxIcon.Error);
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
|
|
@ -378,10 +449,128 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
//protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
//{
|
||||
// this.InitTreeMenu();//加载树
|
||||
// this.BindGrid();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 提交按钮
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.InitTreeMenu();//加载树
|
||||
this.BindGrid();
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.JGZL_ConcealedWorksInspectionRecordMenuId, Const.BtnSave))
|
||||
{
|
||||
Model.JGZL_ConcealedWorksInspectionRecord newReport = new Model.JGZL_ConcealedWorksInspectionRecord();
|
||||
newReport.DrawingNumber = this.txtDrawingNumber.Text.Trim();
|
||||
newReport.ConcealedWorks = this.txtConcealedWorks.Text.Trim();
|
||||
newReport.ConcealedContentAndDiagram = this.txtConcealedContentAndDiagram.Text.Trim();
|
||||
newReport.InspectionResults = this.txtInspectionResults.Text.Trim();
|
||||
//newReport.Remark = this.txtRemark.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.RecordId))
|
||||
{
|
||||
newReport.RecordId = this.RecordId;
|
||||
BLL.ConcealedWorksInspectionRecordService.UpdateConcealedWorksInspectionRecord(newReport);
|
||||
}
|
||||
else
|
||||
{
|
||||
newReport.ProjectId = this.ProjectId;
|
||||
newReport.CompileMan = this.CurrUser.UserId;
|
||||
newReport.CompileDate = DateTime.Now;
|
||||
newReport.Reviewer = this.CurrUser.UserId;
|
||||
newReport.RevieweDate = DateTime.Now;
|
||||
newReport.RecordId = SQLHelper.GetNewID(typeof(Model.JGZL_ConcealedWorksInspectionRecord));
|
||||
this.RecordId = newReport.RecordId;
|
||||
BLL.ConcealedWorksInspectionRecordService.AddConcealedWorksInspectionRecord(newReport);
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = string.Empty;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
|
||||
string projectId = this.tvControlItem.SelectedNodeID;
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
initTemplatePath = Const.JGZL_ConcealedWorksInspectionRecordUrl;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
|
||||
newUrl = uploadfilepath.Replace("隐蔽工程验收记录导出模板", "隐蔽工程验收记录");
|
||||
if (File.Exists(newUrl))
|
||||
{
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
Document doc = new Aspose.Words.Document(uploadfilepath);
|
||||
|
||||
Bookmark projectName = doc.Range.Bookmarks["ProjectName"];
|
||||
if (projectName != null)
|
||||
{
|
||||
projectName.Text = BLL.Base_ProjectService.GetProjectByProjectId(projectId).ProjectName;
|
||||
}
|
||||
Bookmark concealedWorks = doc.Range.Bookmarks["ConcealedWorks"];
|
||||
if (concealedWorks != null)
|
||||
{
|
||||
concealedWorks.Text = this.txtConcealedWorks.Text;
|
||||
}
|
||||
Bookmark drawingNumber = doc.Range.Bookmarks["DrawingNumber"];
|
||||
if (drawingNumber != null)
|
||||
{
|
||||
drawingNumber.Text = this.txtDrawingNumber.Text;
|
||||
}
|
||||
Bookmark concealedContentAndDiagram = doc.Range.Bookmarks["ConcealedContentAndDiagram"];
|
||||
if (concealedContentAndDiagram != null)
|
||||
{
|
||||
concealedContentAndDiagram.Text = this.txtConcealedContentAndDiagram.Text;
|
||||
}
|
||||
Bookmark inspectionResults = doc.Range.Bookmarks["InspectionResults"];
|
||||
if (inspectionResults != null)
|
||||
{
|
||||
inspectionResults.Text = this.txtInspectionResults.Text;
|
||||
}
|
||||
doc.Save(newUrl);
|
||||
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,13 +105,13 @@ namespace FineUIPro.Web.JGZL
|
|||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 控件。
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAdd;
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
|
|
@ -123,49 +123,58 @@ namespace FineUIPro.Web.JGZL
|
|||
protected global::FineUIPro.Button btnPrint;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// txtConcealedWorks 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
protected global::FineUIPro.TextBox txtConcealedWorks;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// txtDrawingNumber 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
protected global::FineUIPro.TextBox txtDrawingNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// txtConcealedContentAndDiagram 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
protected global::FineUIPro.TextArea txtConcealedContentAndDiagram;
|
||||
|
||||
/// <summary>
|
||||
/// txtInspectionResults 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtInspectionResults;
|
||||
|
||||
/// <summary>
|
||||
/// WindowPrint 控件。
|
||||
|
|
@ -175,32 +184,5 @@ namespace FineUIPro.Web.JGZL
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowPrint;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtCheckContents" runat="server" MaxLength="2000"></f:TextArea>
|
||||
<f:TextArea ID="txtCheckContents" runat="server" MaxLength="2000" Height="200px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ namespace FineUIPro.Web.JGZL
|
|||
/// </summary>
|
||||
private void DataInfo()
|
||||
{
|
||||
this.QualityControlPointInspectionId = string.Empty;
|
||||
txtProfessional.Text = string.Empty;
|
||||
txtConstructionStandards.Text = string.Empty;
|
||||
txtControlPointName.Text = string.Empty;
|
||||
|
|
@ -104,6 +105,8 @@ namespace FineUIPro.Web.JGZL
|
|||
{
|
||||
this.txtProfessional.Text = "管道安装工程";
|
||||
this.txtConstructionStandards.Text = "SH/T3501-2021";
|
||||
this.txtControlPointName.Text = "管道安装整体质量控制";
|
||||
this.txtCheckContents.Text = "1、经检查该管道安装下料尺寸精准,切口平整、无毛刺、无裂纹;坡口形式、角度、钝边厚度符合焊接工艺要求,坡口表面清洁无油污、铁锈、杂质,偏差均控制在规范允许范围内;\r\n2、该管道组对间隙、错边量符合规范要求,同轴度达标;严格按照审批通过的焊接工艺施焊,焊工均持证上岗,焊接参数合规,焊缝外观无咬边、气孔、夹渣、未焊透等缺陷;\r\n3、该管道的安装坐标、标高、坡度精准复核,符合设计图纸要求,坡度方向适配介质输送需求,偏差均在规范允许范围内且安装位置无偏移、无错位;\r\n4、该管线的支吊架材质、规格、安装位置、间距符合设计及规范要求,安装牢固、平整,无松动、歪斜;固定支吊架、滑动支吊架类型适配,不妨碍管道热胀冷缩,焊接部位饱满无缺陷;\r\n5、焊缝外观质量验收合格,无各类表面缺陷;按设计及规范要求比例进行RT、UT、MT、PT等无损检测,检测报告完整,不合格焊缝及时返修,返修后重新检测合格;\r\n6、该管道按照设计要求使用水压行强度试验,试验压力及稳压时间达标,无渗漏、无变形、无异常声响;严密性试验压力合规,全线检查无渗漏。";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue