2023-09-11

This commit is contained in:
李鹏飞 2023-09-11 11:40:38 +08:00
parent 7a58819def
commit bfa6749202
8 changed files with 164 additions and 49 deletions

Binary file not shown.

View File

@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using Model;
namespace BLL namespace BLL
{ {
@ -272,17 +273,24 @@ namespace BLL
db.SubmitChanges(); db.SubmitChanges();
} }
} }
/// <summary> /// <summary>
/// 获取已经验收的预制组件 /// 获取已经验收的预制组件
/// </summary> /// </summary>
/// <param name="projectid"></param> /// <param name="projectId"></param>
/// <param name="pipelineCode"></param>
/// <param name="pipelineComponentCode"></param>
/// <returns></returns> /// <returns></returns>
public static List<Model.HJGL_Pipeline_Component> GetAcceptedPipelineComponent(string projectid) public static List<HJGL_Pipeline_Component> GetAcceptedPipelineComponent(string projectId, string pipelineCode,
string pipelineComponentCode,string flowingSection)
{ {
Model.SGGLDB db = Funs.DB; Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_Pipeline_Component var q = (from x in db.HJGL_Pipeline_Component
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
where y.ProjectId.Contains(projectid) && x.State.Equals(state_1) where y.ProjectId.Contains(projectId) && x.State.Equals(state_1) &&
(string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) &&
(string.IsNullOrEmpty(pipelineComponentCode) || x.PipelineComponentCode.Contains(pipelineComponentCode)) &&
(string.IsNullOrEmpty(flowingSection) || y.FlowingSection.Contains(flowingSection))
select x).ToList(); select x).ToList();
return q; return q;
@ -297,22 +305,23 @@ namespace BLL
return q; return q;
} }
/// <summary> ///// <summary>
/// 管线下拉框 ///// 管线下拉框
/// </summary> ///// </summary>
/// <param name="dropName">下拉框名字</param> ///// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param> ///// <param name="isShowPlease">是否显示请选择</param>
public static void InitPipelineDownList(FineUIPro.DropDownList dropName,string projectid, bool isShowPlease) //public static void InitPipelineDownList(FineUIPro.DropDownList dropName,string projectid, string pipelineCode,
{ // string pipelineComponentCode, bool isShowPlease)
dropName.DataValueField = "PipelineComponentId"; //{
dropName.DataTextField = "PipelineComponentCode"; // dropName.DataValueField = "PipelineComponentId";
dropName.DataSource = GetAcceptedPipelineComponent(projectid); // dropName.DataTextField = "PipelineComponentCode";
dropName.DataBind(); // dropName.DataSource = GetAcceptedPipelineComponent(projectid, pipelineCode, pipelineComponentCode);
if (isShowPlease) // dropName.DataBind();
{ // if (isShowPlease)
Funs.FineUIPleaseSelect(dropName); // {
} // Funs.FineUIPleaseSelect(dropName);
} // }
//}
public static void InitMainItemDownList(FineUIPro.DropDownList dropName, bool isShowPlease) public static void InitMainItemDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
{ {
dropName.DataValueField = "Value"; dropName.DataValueField = "Value";

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="09/07/2023 16:31:45" ReportInfo.CreatorVersion="2017.1.16.0"> <Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="09/09/2023 21:57:15" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System; <ScriptText>using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -89,7 +89,7 @@ namespace FastReport
} }
</ScriptText> </ScriptText>
<Dictionary> <Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRE3tB+HA6hG9IKF+MBymee2"> <MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFcxhCjhMIeesNn1NxRCHvA">
<TableDataSource Name="Table1" Alias="Head" DataType="System.Int32" Enabled="true" SelectCommand="select * from CH_Trust where CH_TrustID=@CH_TrustID"> <TableDataSource Name="Table1" Alias="Head" DataType="System.Int32" Enabled="true" SelectCommand="select * from CH_Trust where CH_TrustID=@CH_TrustID">
<Column Name="CH_TrustID" DataType="System.String"/> <Column Name="CH_TrustID" DataType="System.String"/>
<Column Name="CH_TrustCode" DataType="System.String"/> <Column Name="CH_TrustCode" DataType="System.String"/>

View File

@ -10443,6 +10443,7 @@
</Compile> </Compile>
<Compile Include="HSSE\InformationProject\EPSummaryReport.aspx.cs"> <Compile Include="HSSE\InformationProject\EPSummaryReport.aspx.cs">
<DependentUpon>EPSummaryReport.aspx</DependentUpon> <DependentUpon>EPSummaryReport.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile> </Compile>
<Compile Include="HSSE\InformationProject\EPSummaryReport.aspx.designer.cs"> <Compile Include="HSSE\InformationProject\EPSummaryReport.aspx.designer.cs">
<DependentUpon>EPSummaryReport.aspx</DependentUpon> <DependentUpon>EPSummaryReport.aspx</DependentUpon>

View File

@ -92,7 +92,7 @@
</f:Panel> </f:Panel>
<f:Window ID="Window1" Title="编辑包装管理台账" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window1" Title="编辑包装管理台账" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="900px" Height="300px"> Width="900px" Height="500px">
</f:Window> </f:Window>
<f:Window ID="Window3" Title="装箱明细" Hidden="true" EnableIFrame="true" EnableMaximize="true" <f:Window ID="Window3" Title="装箱明细" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"

View File

@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server"> <head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title> <title></title>
</head> </head>
<body> <body>
@ -16,10 +16,49 @@
<Items> <Items>
<f:DropDownList runat="server" ID="txtPackagingCode" EnableEdit="true" ForceSelection="false" Label="包装编号" LabelWidth="140px" LabelAlign="Right"> <f:DropDownList runat="server" ID="txtPackagingCode" EnableEdit="true" ForceSelection="false" Label="包装编号" LabelWidth="140px" LabelAlign="Right">
</f:DropDownList> </f:DropDownList>
<f:DropDownBox runat="server" ID="dropPipelineComponentCode" EmptyText="请从下拉表格中选择" EnableMultiSelect="true" MatchFieldWidth="false">
<f:DropDownList ID="drpPipelineComponentCode" runat="server" Required="true" ShowRedStar="true" OnSelectedIndexChanged="drpPipelineComponentCode_SelectedIndexChanged" <PopPanel>
<f:Grid ID="Grid1" Width="650px" Height="400px" Hidden="true"
DataIDField="PipelineComponentId" DataTextField="PipelineComponentCode" EnableMultiSelect="true" KeepCurrentSelection="true"
PageSize="10" ShowBorder="true" ShowHeader="false"
AllowPaging="true" IsDatabasePaging="true" runat="server" EnableCheckBoxSelect="true"
DataKeyNames="PipelineComponentId" EnableBigData="True"
AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC"
>
<Columns>
<f:RowNumberField />
<f:BoundField Width="300px" DataField="PipelineComponentCode" SortField="PipelineComponentCode" DataFormatString="{0}"
HeaderText="预制组件编号" />
<f:TemplateField runat="server" HeaderText="流水段">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# BLL.PipelineService.GetPipelineByPipelineId(Eval("PipelineId").ToString()).FlowingSection %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
</Columns>
<Toolbars>
<f:Toolbar runat="server" Position="Top">
<Items>
<f:TextBox ID="txtpipelineCode" runat="server" Label="管线编号" LabelAlign="Right" EmptyText="主项号+区域编号"
LabelWidth="180px">
</f:TextBox>
<f:TextBox ID="txtpipelineComponentCode" runat="server" Label=预制组件编号 LabelAlign="Right"
LabelWidth="180px">
</f:TextBox>
<f:TextBox ID="txtflowingSection" runat="server" Label="流水段" LabelAlign="Right"
LabelWidth="180px">
</f:TextBox>
<f:Button ID="btnFind" ToolTip="查询" Icon="SystemSearch"
EnablePostBack="true" OnClick="btnFind_Click1" runat="server">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:Grid>
</PopPanel>
</f:DropDownBox>
<%--<f:DropDownList ID="drpPipelineComponentCode" runat="server" Required="true" ShowRedStar="true" OnSelectedIndexChanged="drpPipelineComponentCode_SelectedIndexChanged"
Label="预制组件编号" LabelAlign="Right" LabelWidth="180px" EnableEdit="true" EnableMultiSelect="true" AutoSelectFirstItem="false" EmptyText="请选择一项"> Label="预制组件编号" LabelAlign="Right" LabelWidth="180px" EnableEdit="true" EnableMultiSelect="true" AutoSelectFirstItem="false" EmptyText="请选择一项">
</f:DropDownList> </f:DropDownList>--%>
</Items> </Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
@ -48,7 +87,7 @@
<f:Toolbar ID="Toolbar2" Position="Bottom" ToolbarAlign="Right" runat="server"> <f:Toolbar ID="Toolbar2" Position="Bottom" ToolbarAlign="Right" runat="server">
<Items> <Items>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="Form2" Hidden="true" <f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="Form2" Hidden="true"
OnClick="btnSave_Click"> OnClick="btnSave_Click">
</f:Button> </f:Button>
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose"> <f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
</f:Button> </f:Button>

View File

@ -26,15 +26,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!IsPostBack) if (!IsPostBack)
{ {
PackagingManageId = Request.Params["PackagingManageId"]; PackagingManageId = Request.Params["PackagingManageId"];
//HJGL_PipelineComponentService.InitPipelineDownList(drpPipelineComponentCode, this.CurrUser.LoginProjectId, false);
HJGL_PipelineComponentService.InitPipelineDownList(drpPipelineComponentCode, this.CurrUser.LoginProjectId, false); BindGrid();
HJGL_PackagingmanageService.InitPipelineDownList(txtPackagingCode, this.CurrUser.LoginProjectId, false); HJGL_PackagingmanageService.InitPipelineDownList(txtPackagingCode, this.CurrUser.LoginProjectId, false);
btnClose.OnClientClick = ActiveWindow.GetHideReference(); btnClose.OnClientClick = ActiveWindow.GetHideReference();
if (!string.IsNullOrEmpty(PackagingManageId)) if (!string.IsNullOrEmpty(PackagingManageId))
{ {
var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId);
txtPackagingCode.SelectedValue = model.PackagingCode; txtPackagingCode.SelectedValue = model.PackagingCode;
drpPipelineComponentCode.SelectedValueArray = model.PipelineComponentId.Split(','); dropPipelineComponentCode.Values = model.PipelineComponentId.Split(',');
txtStackingPosition.Text = model.StackingPosition; txtStackingPosition.Text = model.StackingPosition;
txtContactName.Text = model.ContactName; txtContactName.Text = model.ContactName;
txtContactPhone.Text = model.ContactPhone; txtContactPhone.Text = model.ContactPhone;
@ -51,26 +51,33 @@ namespace FineUIPro.Web.HJGL.PreDesign
} }
} }
protected void drpPipelineComponentCode_SelectedIndexChanged(object sender, EventArgs e) private void BindGrid()
{ {
if (!string .IsNullOrEmpty(drpPipelineComponentCode.SelectedValue)) Grid1.DataSource = HJGL_PipelineComponentService.GetAcceptedPipelineComponent(CurrUser.LoginProjectId,
{ txtpipelineCode.Text.Trim(), txtpipelineComponentCode.Text.Trim(), txtflowingSection.Text.Trim());
var model_Component = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(drpPipelineComponentCode.SelectedValue); Grid1 .DataBind();
var model_pipe=BLL.PipelineService.GetPipelineByPipelineId(model_Component.PipelineId);
txtPlanStartDate.Text= model_Component.PlanStartDate.ToString();
}
else
{
txtPlanStartDate.Text =String.Empty;
}
} }
//protected void drpPipelineComponentCode_SelectedIndexChanged(object sender, EventArgs e)
//{
// if (!string .IsNullOrEmpty(drpPipelineComponentCode.SelectedValue))
// {
// var model_Component = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(drpPipelineComponentCode.SelectedValue);
// var model_pipe=BLL.PipelineService.GetPipelineByPipelineId(model_Component.PipelineId);
// txtPlanStartDate.Text= model_Component.PlanStartDate.ToString();
// }
// else
// {
// txtPlanStartDate.Text =String.Empty;
// }
//}
protected void btnSave_Click(object sender, EventArgs e) protected void btnSave_Click(object sender, EventArgs e)
{ {
if (string.IsNullOrEmpty(drpPipelineComponentCode.SelectedValue)) if (dropPipelineComponentCode.Values.Length==0)
{ {
ShowNotify("请选择预制组件", MessageBoxIcon.Warning); ShowNotify("请选择预制组件", MessageBoxIcon.Warning);
return; return;
@ -82,7 +89,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
table.PackagingManageId = SQLHelper.GetNewID(); table.PackagingManageId = SQLHelper.GetNewID();
table.PackagingCode = txtPackagingCode.Text; table.PackagingCode = txtPackagingCode.Text;
table.ProjectId = this.CurrUser.LoginProjectId; table.ProjectId = this.CurrUser.LoginProjectId;
table.PipelineComponentId = string.Join(",", drpPipelineComponentCode.SelectedValueArray); table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
table.StackingPosition = txtStackingPosition.Text; table.StackingPosition = txtStackingPosition.Text;
table.State = 0; table.State = 0;
table.ContactName = txtContactName.Text; table.ContactName = txtContactName.Text;
@ -96,7 +103,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
{ {
table.PackagingCode = txtPackagingCode.Text; table.PackagingCode = txtPackagingCode.Text;
table.ProjectId = this.CurrUser.LoginProjectId; table.ProjectId = this.CurrUser.LoginProjectId;
table.PipelineComponentId = string.Join(",", drpPipelineComponentCode.SelectedValueArray); table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
table.StackingPosition = txtStackingPosition.Text ; table.StackingPosition = txtStackingPosition.Text ;
table.State = 0; table.State = 0;
table.ContactName = txtContactName.Text; table.ContactName = txtContactName.Text;
@ -107,5 +114,10 @@ namespace FineUIPro.Web.HJGL.PreDesign
ShowNotify("保存成功!", MessageBoxIcon.Success); ShowNotify("保存成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
} }
protected void btnFind_Click1(object sender, EventArgs e)
{
BindGrid();
}
} }
} }

View File

@ -51,13 +51,67 @@ namespace FineUIPro.Web.HJGL.PreDesign
protected global::FineUIPro.DropDownList txtPackagingCode; protected global::FineUIPro.DropDownList txtPackagingCode;
/// <summary> /// <summary>
/// drpPipelineComponentCode 控件。 /// dropPipelineComponentCode 控件。
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// 自动生成的字段。 /// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.DropDownList drpPipelineComponentCode; protected global::FineUIPro.DropDownBox dropPipelineComponentCode;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// txtpipelineCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtpipelineCode;
/// <summary>
/// txtpipelineComponentCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtpipelineComponentCode;
/// <summary>
/// txtflowingSection 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtflowingSection;
/// <summary>
/// btnFind 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnFind;
/// <summary> /// <summary>
/// txtPlanStartDate 控件。 /// txtPlanStartDate 控件。