This commit is contained in:
2025-06-04 23:15:08 +08:00
35 changed files with 857 additions and 228 deletions
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="12/17/2024 19:27:14" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="05/22/2025 14:28:48" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -45,7 +45,8 @@ namespace FastReport
Table4.PrintColumns();
Table4.PrintRow(5);
Table4.PrintColumns();
Table4.PrintRow(6);
Table4.PrintColumns();
// go next data source row
rowData.Next();
@@ -89,7 +90,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWREru9g6JqYbbf0PYErYyKgC">
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFKSkSpVqWLPMnhcSXZfZi3">
<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_TrustCode" DataType="System.String"/>
@@ -169,8 +170,8 @@ namespace FastReport
<Parameter Name="TrustBatchId" DataType="System.String"/>
</Dictionary>
<ReportPage Name="Page1" RawPaperSize="9" Guides="75.6">
<PageHeaderBand Name="PageHeader1" Width="718.2" Height="283.5">
<TableObject Name="Table4" Left="18.9" Top="37.8" Width="699.25" Height="246.02" ManualBuildEvent="Table4_ManualBuild">
<PageHeaderBand Name="PageHeader1" Width="718.2" Height="318.22">
<TableObject Name="Table4" Left="18.9" Top="37.8" Width="699.25" Height="280.42" ManualBuildEvent="Table4_ManualBuild">
<TableColumn Name="Column13" Width="94.73"/>
<TableColumn Name="Column14" Width="94.73"/>
<TableColumn Name="Column15" Width="75.83"/>
@@ -239,9 +240,24 @@ namespace FastReport
<TableCell Name="Cell66" Border.Lines="All" Text="[Table1.CH_NDTRate]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt" ColSpan="2"/>
<TableCell Name="Cell71" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
</TableRow>
<TableRow Name="Row31" Height="34.4">
<TableCell Name="Cell237" Border.Lines="All" Text="检测时机" HorzAlign="Center" VertAlign="Center" Font="宋体, 10pt"/>
<TableCell Name="Cell238" Border.Lines="All" AllowExpressions="false" ColSpan="7">
<CheckBoxObject Name="CheckBox1" Left="94.5" Top="15.12" Width="9.45" Height="9.45" Border.Lines="All" Cursor="IBeam" Checked="false"/>
<CheckBoxObject Name="CheckBox2" Left="321.3" Top="15.12" Width="9.45" Height="9.45" Border.Lines="All" Cursor="IBeam" Checked="false"/>
<TextObject Name="Text1" Left="113.4" Top="9.45" Width="94.5" Height="18.9" Text="工厂化预制焊口" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
<TextObject Name="Text2" Left="340.2" Top="9.45" Width="94.5" Height="18.9" Text="安装施工焊口" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
</TableCell>
<TableCell Name="Cell239" Border.Lines="All"/>
<TableCell Name="Cell240" Border.Lines="All"/>
<TableCell Name="Cell241" Border.Lines="All"/>
<TableCell Name="Cell242" Border.Lines="All"/>
<TableCell Name="Cell243" Border.Lines="All"/>
<TableCell Name="Cell244" Border.Lines="All"/>
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="287.54" Width="718.2" Height="71.82">
<DataBand Name="Data1" Top="321.35" Width="718.2" Height="71.82">
<TableObject Name="Tabel_Data" Left="18.9" Width="699.18" Height="71.82" Border.Lines="Top" ManualBuildEvent="Tabel_Data_ManualBuild">
<TableColumn Name="Column21" Width="69.91"/>
<TableColumn Name="Column22" Width="117.16"/>
@@ -272,8 +288,8 @@ namespace FastReport
<TableCell Name="Cell144" Border.Lines="All" Text="[Data.Remark]" HorzAlign="Center" VertAlign="Center"/>
</TableRow>
</TableObject>
<DataFooterBand Name="DataFooter1" Top="416.58" Width="718.2">
<ChildBand Name="Child2" Top="363.4" Width="718.2" Height="49.14" FillUnusedSpace="true">
<DataFooterBand Name="DataFooter1" Top="448.55" Width="718.2">
<ChildBand Name="Child2" Top="396.29" Width="718.2" Height="49.14" FillUnusedSpace="true">
<TableObject Name="Table6" Left="18.9" Width="699.18" Height="49.14" Border.Lines="Top">
<TableColumn Name="Column53" Width="69.91"/>
<TableColumn Name="Column54" Width="117.16"/>
@@ -297,7 +313,7 @@ namespace FastReport
</ChildBand>
</DataFooterBand>
</DataBand>
<PageFooterBand Name="PageFooter1" Top="420.62" Width="718.2" Height="181.43">
<PageFooterBand Name="PageFooter1" Top="451.68" Width="718.2" Height="181.43">
<TableObject Name="Table5" Left="18.9" Width="699.21" Height="135.6" Border.Lines="All" RepeatHeaders="false">
<TableColumn Name="Column37" Width="99.45"/>
<TableColumn Name="Column38" Width="90"/>
@@ -338,7 +354,7 @@ namespace FastReport
<TableCell Name="Cell192" Border.Lines="All"/>
</TableRow>
</TableObject>
<ChildBand Name="Child1" Top="606.09" Width="718.2" Height="17.77" PrintOnBottom="true"/>
<ChildBand Name="Child1" Top="636.23" Width="718.2" Height="32.13" PrintOnBottom="true"/>
</PageFooterBand>
</ReportPage>
</Report>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/13/2022 11:00:20" ReportInfo.Modified="11/01/2022 16:58:33" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="03/13/2022 11:00:20" ReportInfo.Modified="05/13/2025 10:35:40" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -42,7 +42,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFfNnlsPZ6nuhwpLtU3gTu4"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFk8mQo03zVTethv81G+TDI"/>
<TableDataSource Name="Data" ReferenceName="Data" DataType="System.Int32" Enabled="true">
<Column Name="PipelineComponentId" DataType="System.String"/>
<Column Name="PipelineComponentCode" DataType="System.String"/>
@@ -487,14 +487,18 @@ namespace FineUIPro.Web.HJGL.InfoQuery
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
string fileName = "";
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2) //单位工程
{
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
View_HJGL_WeldJoint = list;
/* PrintByUnitWork(this.tvControlItem.SelectedNodeID);
return;*/
fileName = UnitWorkService.GetNameById(model.UnitWorkId);
}
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
{
fileName = PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID)?.PipelineCode;
}
string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx";
@@ -537,7 +541,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
}).ToList();
MiniExcel.SaveAs(path, q);
string fileName = "焊口信息总览.xlsx";
fileName = fileName+ "-焊口信息总览.xlsx";
FileInfo info = new FileInfo(path);
long fileSize = info.Length;
System.Web.HttpContext.Current.Response.Clear();
@@ -1082,9 +1082,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
//{
//}
#endregion
#endregion
#region
@@ -75,7 +75,7 @@
</f:Button>--%>
<f:Button ID="btnDelete" Text="删除" Icon="Delete" runat="server" Hidden="true"
OnClick="btnDelete_Click">
</f:Button>
</f:Button>
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
OnClick="btnPrint_Click" Hidden="true">
</f:Button>
@@ -989,6 +989,9 @@ namespace FineUIPro.Web.HJGL.PointTrust
}
}
protected void btnBack_Click(object sender, EventArgs e)
{
}
#region
/// <summary>
/// 判断是否可以删除
+39 -37
View File
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.PointTrust {
public partial class TrustBatch {
namespace FineUIPro.Web.HJGL.PointTrust
{
public partial class TrustBatch
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// drpUnit 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// Toolbar4 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar4;
/// <summary>
/// txtWelderCode 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWelderCode;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtTrustDateMonth 控件。
/// </summary>
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtTrustDateMonth;
/// <summary>
/// tvControlItem 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree tvControlItem;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnAudit 控件。
/// </summary>
@@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnDelete 控件。
/// </summary>
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// btnPrint 控件。
/// </summary>
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrint;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// txtTrustBatchCode 控件。
/// </summary>
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTrustBatchCode;
/// <summary>
/// txtTrustDate 控件。
/// </summary>
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtTrustDate;
/// <summary>
/// txtDetectionTypeCode 控件。
/// </summary>
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtDetectionTypeCode;
/// <summary>
/// lbNDEUnit 控件。
/// </summary>
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbNDEUnit;
/// <summary>
/// lbIsTrust 控件。
/// </summary>
@@ -218,7 +220,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbIsTrust;
/// <summary>
/// lbIsAudit 控件。
/// </summary>
@@ -227,7 +229,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbIsAudit;
/// <summary>
/// Button1 控件。
/// </summary>
@@ -236,7 +238,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button1;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -245,7 +247,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -254,7 +256,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -263,7 +265,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -272,7 +274,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -281,7 +283,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@@ -290,7 +292,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -299,7 +301,7 @@ namespace FineUIPro.Web.HJGL.PointTrust {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnPointAudit 控件。
/// </summary>
@@ -229,36 +229,36 @@ namespace FineUIPro.Web.HJGL.PreDesign
private DataTable BindData()
{
string strSql = @"WITH cte as (select pipeline.PipelineCode as PipelineCode,
comonent.PipelineComponentCode as PipelineComponentCode,
'' as matdef,
packdetail.Number as Number,
pack.PackagingCode as PackagingCode,
trainnumber.TrainNumber as TrainNumber,
pipeline.FlowingSection as FlowingSection,
pipeline.UnitWorkId as UnitWorkId
from HJGL_Pipeline pipeline
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
left join HJGL_Pipeline_Component comonent
on packdetail.PipelineComponentId = comonent.PipelineComponentId
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '')
union all
select pipeline.PipelineCode as PipelineCode,
packdetail.MaterialCode as PipelineComponentCode,
matlib.MaterialDef as matdef,
packdetail.Number as Number,
pack.PackagingCode as PackagingCode,
trainnumber.TrainNumber as TrainNumber,
pipeline.FlowingSection as FlowingSection,
pipeline.UnitWorkId as UnitWorkId
from HJGL_Pipeline pipeline
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
left join HJGL_MaterialCodeLib matlib on packdetail.MaterialCode = matlib.MaterialCode
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
where (packdetail.PipelineComponentId is null or packdetail.PipelineComponentId = ''))
SELECT * FROM cte WHERE 1=1 ";
comonent.PipelineComponentCode as PipelineComponentCode,
'' as matdef,
packdetail.Number as Number,
pack.PackagingCode as PackagingCode,
trainnumber.TrainNumber as TrainNumber,
pipeline.FlowingSection as FlowingSection,
pipeline.UnitWorkId as UnitWorkId
from HJGL_Pipeline pipeline
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
left join HJGL_Pipeline_Component comonent
on packdetail.PipelineComponentId = comonent.PipelineComponentId
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '')
union all
select pipeline.PipelineCode as PipelineCode,
packdetail.MaterialCode as PipelineComponentCode,
matlib.MaterialDef as matdef,
packdetail.Number as Number,
pack.PackagingCode as PackagingCode,
trainnumber.TrainNumber as TrainNumber,
pipeline.FlowingSection as FlowingSection,
pipeline.UnitWorkId as UnitWorkId
from HJGL_Pipeline pipeline
left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId
left join HJGL_MaterialCodeLib matlib on packdetail.MaterialCode = matlib.MaterialCode
left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId
left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id
where (packdetail.PipelineComponentId is null or packdetail.PipelineComponentId = ''))
SELECT * FROM cte WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
@@ -390,7 +390,7 @@ SELECT * FROM cte WHERE 1=1 ";
线 = x.Field<string>("PipelineCode"),
= x.Field<string>("PipelineComponentCode"),
= !string.IsNullOrWhiteSpace(x.Field<string>("matdef")) ? x.Field<string>("matdef") : "-",
= x.Field<string>("Number"),
= x.Field<decimal?>("Number"),
= x.Field<string>("PackagingCode"),
= x.Field<string>("TrainNumber"),
= x.Field<string>("FlowingSection")
@@ -1,4 +1,5 @@
using BLL;
using Model;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -122,6 +123,27 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values);
var newDetailList= new List<Model.HJGL_PackagingManageDetail>();
foreach (var item in dropPipelineComponentCode.Values)
{
var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(item);
if (ComponentModel != null)
{
var model = new Model.HJGL_PackagingManageDetail()
{
Id = SQLHelper.GetNewID(),
PackagingManageId = this.PackagingManageId,
PipelineId = ComponentModel.PipelineId,
PipelineComponentId = item,
CreateTime = DateTime.Now,
CreateUser = this.CurrUser.PersonId,
};
newDetailList.Add(model);
}
}
HJGLPackagingmanagedetailService.DeleteByPackagingManageId(this.PackagingManageId);
HJGLPackagingmanagedetailService.AddBulk(newDetailList);
}
}
BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table);
@@ -53,7 +53,7 @@
</f:ToolbarFill>
<f:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存" Icon="SystemSave"></f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出"
Icon="TableGo" EnableAjax="false" EnablePostBack="true" Hidden="true">
Icon="TableGo" EnableAjax="false" EnablePostBack="true" >
</f:Button>
</Items>
</f:Toolbar>
@@ -103,45 +103,41 @@
DataField="PriorityTotalDyne" SortField="PriorityTotalDyne" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<Editor>
<f:NumberBox ID="txtPriorityTotalDyne" runat="server"></f:NumberBox>
<f:NumberBox ID="txtPriorityTotalDyne" runat="server"></f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="计划开始时间" ColumnID="PlanStartDate"
DataField="PlanStartDate" SortField="PlanStartDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<Editor>
<f:DatePicker ID="txtPlanStartDate" runat="server"></f:DatePicker>
<f:DatePicker ID="txtPlanStartDate" runat="server"></f:DatePicker>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="计划结束时间" ColumnID="PlanEndDate"
DataField="PlanEndDate" SortField="PlanEndDate" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<Editor>
<f:DatePicker ID="txtPlanEndDate" runat="server"></f:DatePicker>
<f:DatePicker ID="txtPlanEndDate" runat="server"></f:DatePicker>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="天数" ColumnID="Days"
DataField="Days" SortField="Days" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
Width="90px">
<Editor>
<f:NumberBox ID="txtDays" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
<f:NumberBox ID="txtDays" runat="server" NoDecimal="true" NoNegative="true"></f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="平均每天工作量" ColumnID="AvgDailyWorkload"
DataField="AvgDailyWorkload" SortField="AvgDailyWorkload" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<Editor>
<f:NumberBox ID="txtAvgDailyWorkload" runat="server" NoDecimal="true" ></f:NumberBox>
<f:NumberBox ID="txtAvgDailyWorkload" runat="server" NoNegative="true"></f:NumberBox>
</Editor>
</f:RenderField>
<%--<f:RenderField HeaderText="主键" ColumnID="ProductionSchedulingPlanId"
DataField="ProductionSchedulingPlanId" SortField="ProductionSchedulingPlanId" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="120px">
<Editor>
<f:TextBox ID="NumberBox1" runat="server"></f:TextBox>
</Editor>
</f:RenderField>--%>
</Columns>
<Listeners>
<f:Listener Event="dataload" Handler="onGridDataLoad" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
@@ -166,6 +162,10 @@
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
function onGridDataLoad(event) {
this.mergeColumns(['FlowNum', 'MainItemName', 'Material', 'TotalDyne']);
}
</script>
</body>
</html>
@@ -26,17 +26,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.InitTreeMenu();//加载树
//HJGL_PipelineComponentService.InitMainItemDownList(drpState, true);
//HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState, true);
//var pipeline = (from x in Funs.DB.HJGL_Pipeline
// where x.ProjectId == this.CurrUser.LoginProjectId
// select x.FlowingSection).Distinct().ToList();
//this.drpFlowingSection.DataTextField = "Value";
//this.drpFlowingSection.DataValueField = "Value";
//this.drpFlowingSection.DataSource = pipeline;
//this.drpFlowingSection.DataBind();
//Funs.FineUIPleaseSelect(drpFlowingSection);
}
}
@@ -123,11 +112,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
foreach (var q in unitWork2)
{
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x).Count();
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x.FlowingSection).Distinct().Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
//tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn2.Text = q.UnitWorkName;
if (q.UnitWorkId == this.hdUnitWorkId.Text)
{
tn2.Expanded = true;
@@ -155,42 +145,42 @@ namespace FineUIPro.Web.HJGL.PreDesign
private void BindNodes(TreeNode node)
{
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
var pipelines = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" select x;
pipeline = (from x in pipelines
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
orderby x.PipelineCode
select x).ToList();
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
if (pageindex <= pageCount)
List<string> flowingSection = new List<string>();
//List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
var list = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x.FlowingSection).ToList();
flowingSection = list.Where(x => !string.IsNullOrWhiteSpace(x) == true).Distinct().OrderBy(x => x).ToList();
//int pageindex = int.Parse(node.CommandName.Split('|')[0]);
//int pageCount = int.Parse(node.CommandName.Split('|')[1]);
//if (pageindex <= pageCount)
//{
// flowingSection = flowingSection.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
foreach (var item in flowingSection)
{
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList();
foreach (var item in pipeline)
{
var comCount = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineId == item.PipelineId select x).Count();
TreeNode newNode = new TreeNode();
newNode.Text = item.PipelineCode + "【" + comCount.ToString() + " " + "组件" + "】";
newNode.ToolTip = "管线号【组件数】";
newNode.CommandName = "管线";
newNode.NodeID = item.PipelineId;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
if (pageindex < pageCount)
{
TreeNode newNode = new TreeNode();
newNode.Text = "加载";
newNode.NodeID = SQLHelper.GetNewID();
newNode.CommandName = "加载";
newNode.Icon = Icon.ArrowDown;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
//var comCount = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineId == item.PipelineId select x).Count();
TreeNode newNode = new TreeNode();
//newNode.Text = item.PipelineCode + "【" + comCount.ToString() + " " + "组件" + "】";
newNode.Text = item;
newNode.ToolTip = "流水段";
newNode.CommandName = "流水段";
newNode.NodeID = SQLHelper.GetNewID();
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
// if (pageindex < pageCount)
// {
// TreeNode newNode = new TreeNode();
// newNode.Text = "加载";
// newNode.NodeID = "加载";
// //newNode.NodeID = SQLHelper.GetNewID();
// newNode.CommandName = "加载";
// newNode.Icon = Icon.ArrowDown;
// newNode.EnableClickEvent = true;
// node.Nodes.Add(newNode);
// }
//}
}
#endregion
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
{
@@ -209,13 +199,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
if (e.CommandName.Split('|').Length == 2)
if (e.CommandName == "流水段")
{
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
}
else if (e.CommandName == "管线")
{
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByFlowingSection(this.tvControlItem.SelectedNode.Text);
this.hdUnitWorkId.Text = string.Empty;
if (pipeline != null)
{
@@ -223,14 +209,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
SaveProductionSchedulingPlan();
}
}
else if (e.CommandName == "加载")
{
string CommandName = e.Node.ParentNode.CommandName;
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
TreeNode treeNode = e.Node.ParentNode;
treeNode.Nodes.Remove(e.Node);
BindNodes(e.Node.ParentNode);
}
this.BindGrid();
}
@@ -242,27 +220,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
var schedulingPlan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanByPipelineId(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNodeID);
if (schedulingPlan == null)
List<Model.View_HJGL_ProductionSchedulingPlanStatistics> lists = (from x in Funs.DB.View_HJGL_ProductionSchedulingPlanStatistics.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.FlowingSection == this.tvControlItem.SelectedNode.Text) select x).ToList();
foreach (var item in lists)
{
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
newPlan.ProjectId = this.CurrUser.LoginProjectId;
newPlan.PipelineId = this.tvControlItem.SelectedNodeID;
var pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
if (pipeline!=null)
var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, item.FlowingSection, item.UnitWorkName, item.Material, item.Caliber);
if (plan == null)
{
newPlan.FlowNum = pipeline.FlowingSection;
if (!string.IsNullOrEmpty(pipeline.UnitWorkId))
{
newPlan.MainItemName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(pipeline.UnitWorkId).UnitWorkName;
}
if (!string.IsNullOrEmpty(pipeline.PipingClassId))
{
newPlan.Material = BLL.Base_PipingClassService.GetPipingClassByPipingClassId(pipeline.PipingClassId).SteelType;
}
Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan();
newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan));
newPlan.ProjectId = this.CurrUser.LoginProjectId;
//newPlan.PipelineId = this.tvControlItem.SelectedNodeID;
newPlan.FlowNum = item.FlowingSection;
newPlan.MainItemName = item.UnitWorkName;
newPlan.Material = item.Material;
newPlan.Caliber = item.Caliber;
newPlan.Dain = item.Dia;
newPlan.TotalDyne = lists.Sum(x => x.Dia);
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
}
BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan);
}
}
}
@@ -289,23 +264,21 @@ namespace FineUIPro.Web.HJGL.PreDesign
p.PlanStartDate,
p.PlanEndDate,
p.Days,
p.AvgDailyWorkload,
pipeline.UnitWorkId
p.AvgDailyWorkload
FROM HJGL_ProductionSchedulingPlan p
left join HJGL_Pipeline as pipeline on pipeline.PipelineId = p.PipelineId
WHERE 1=1 ";
List<SqlParameter> listStr = new List<SqlParameter>();
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
{
strSql += " and pipeline.UnitWorkId =@UnitWorkId";
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
strSql += " and p.MainItemName =@UnitWorkId";
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNode.Text));
}
else if (tvControlItem.SelectedNode.CommandName == "管线")
else if (tvControlItem.SelectedNode.CommandName == "流水段")
{
strSql += " and p.PipelineId = @PipelineId ";
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
strSql += " and p.FlowNum = @FlowNum ";
listStr.Add(new SqlParameter("@FlowNum", this.tvControlItem.SelectedNode.Text));
}
SqlParameter[] parameter = listStr.ToArray();
@@ -419,8 +392,134 @@ namespace FineUIPro.Web.HJGL.PreDesign
#region
protected void btnOut_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.HJGL_ProductionSchedulingPlanPath;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
uploadfilepath = rootPath + initTemplatePath;
var lists = (from x in Funs.DB.HJGL_ProductionSchedulingPlan
where x.ProjectId == this.CurrUser.LoginProjectId
select x);
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
{
lists = lists.Where(x => x.MainItemName == this.tvControlItem.SelectedNode.Text);
}
else if (tvControlItem.SelectedNode.CommandName == "流水段")
{
lists = lists.Where(x => x.FlowNum == this.tvControlItem.SelectedNode.Text);
}
if (lists != null)
{
newUrl = uploadfilepath.Replace("排产计划导出模板", "排产计划(" + DateTime.Now.ToString("yyyyMMdd") + ")");
if (File.Exists(newUrl))
{
File.Delete(newUrl);
}
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
{
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
//workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
}
// 创建单元格样式
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
NPOI.SS.UserModel.ICell cell;
int i = 1;
foreach (var item in lists)
{
// 第二步:创建新数据行
row = sheet.CreateRow(i);
// 添加数据
cell = row.CreateCell(0);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.FlowNum);//流水段号
cell = row.CreateCell(1);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.MainItemName);//主项名称
cell = row.CreateCell(2);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Material);//材质
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Caliber);//口径
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Dain.HasValue ? item.Dain.ToString() : "");//达因数
cell = row.CreateCell(5);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.TotalDyne.HasValue?item.TotalDyne.ToString():"");//总达因数
cell = row.CreateCell(6);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.TotalPriority);//总优先级
cell = row.CreateCell(7);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.PriorityTotalDyne.HasValue ? item.PriorityTotalDyne.ToString() : "");//优先级总达因
cell = row.CreateCell(8);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.PlanStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PlanStartDate) : "");//计划开始时间
cell = row.CreateCell(9);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.PlanEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PlanEndDate) : "");//计划结束时间
cell = row.CreateCell(10);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Days.HasValue?item.Days.ToString():"");//天数
cell = row.CreateCell(11);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.AvgDailyWorkload.HasValue ? item.AvgDailyWorkload.ToString():"");//平均每天工作量
i++;
}
// 第三步:写入文件流
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
{
workbook.Write(stream);
workbook.Close();
}
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);
}
}
#endregion
}
@@ -32,6 +32,8 @@
<f:Button ID="btnNew" Text="新增" Icon="Add" EnablePostBack="false" Hidden="true"
runat="server">
</f:Button>
<f:Button ID="Button1" Text="推送" Icon="Add" runat="server" OnClick="Button1_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
@@ -329,5 +329,35 @@ namespace FineUIPro.Web.HSSE.CostGoods
PrinterDocService.PrinterDocMethod(Const.ProjectCostManageMenuId, Grid1.SelectedRowID, "HSSE费用管理");
}
protected void Button1_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string costManageId = Grid1.SelectedRowID;
var costManage = CostManageService.GetCostManageById(costManageId);
if (costManage != null && costManage.States == Const.State_2)
{
if (string.IsNullOrEmpty(costManage.ContractNum))
{
Alert.ShowInTop("未关联合同,无法推送!", MessageBoxIcon.Warning);
}
else
{
string messaage = CostManageService.PushDataToHSE(this.CurrUser.LoginProjectId, costManage.ContractNum);
}
}
else
{
Alert.ShowInTop("未审核完成无法推送!", MessageBoxIcon.Warning);
}
}
}
}
@@ -86,6 +86,15 @@ namespace FineUIPro.Web.HSSE.CostGoods
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// Button1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button Button1;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -187,7 +187,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
/// </summary>
/// <param name="type"></param>
private void SaveData()
{
{
var getCost = CostManageService.GetCostManageById(this.CostManageId);
if (getCost != null)
{
@@ -227,7 +227,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
}
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
}
#endregion
#region
@@ -29,8 +29,10 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtContractNum" runat="server" Label="合同号" MaxLength="50" FocusOnPageLoad="true">
</f:TextBox>
<%--<f:TextBox ID="txtContractNum" runat="server" Label="合同号" MaxLength="50" FocusOnPageLoad="true">
</f:TextBox>--%>
<f:DropDownList ID="drpContractNum" runat="server" Label="合同号" Required="true" ShowRedStar="true" EmptyText="-请选择-">
</f:DropDownList>
<f:DatePicker ID="txtCostManageDate" runat="server" Label="日期" EnableEdit="false">
</f:DatePicker>
</Items>
@@ -39,8 +41,9 @@
<Items>
<f:TextBox ID="txtHseCost" runat="server" Label="HSE费用总金额(元)" LabelWidth="180px" Readonly="true">
</f:TextBox>
<f:TextBox ID="txtGetCost" runat="server" Label="已支付的HSE费用(元)" LabelWidth="180px" Readonly="true">
<f:TextBox ID="txtGetCost" runat="server" Label="已支付的HSE费用(元)" LabelWidth="180px" Readonly="true">
</f:TextBox>
<f:NumberBox ID="txtSumMoney" runat="server" Label="本次申请费用(元)" LabelWidth="180px" MinValue="0" NoDecimal="false" NoNegative="true" DecimalPrecision="2" Required="true" ShowRedStar="true" Increment="0.01"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
@@ -52,7 +52,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
{
this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference();
this.ProjectId = this.CurrUser.LoginProjectId;
BLL.ContractService.InitCompletedContractsDropDownList(this.ProjectId,this.drpContractNum);
BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, false);
this.CostManageId = Request.Params["CostManageId"] ?? SQLHelper.GetNewID();
var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId);
@@ -68,7 +68,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
{
this.drpUnit.SelectedValue = costManage.UnitId;
}
this.txtContractNum.Text = costManage.ContractNum;
this.drpContractNum.SelectedValue = costManage.ContractNum;
this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate);
}
@@ -303,13 +303,17 @@ namespace FineUIPro.Web.HSSE.CostGoods
{
ProjectId = this.ProjectId,
UnitId = this.drpUnit.SelectedValue == Const._Null ? null : this.drpUnit.SelectedValue,
ContractNum = this.txtContractNum.Text.Trim(),
ContractNum = this.drpContractNum.SelectedValue,
CostManageDate = Funs.GetNewDateTime(this.txtCostManageDate.Text.Trim()),
States = BLL.Const.State_0,
CompileMan = this.CurrUser.PersonId,
CompileDate = DateTime.Now,
};
var costManageItems = CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId);
if (costManageItems.Count ==0)
{
costManage.SumMoney = decimal.Parse(txtHseCost.Text.Trim());
}
if (type == Const.BtnSubmit)
{
costManage.States = BLL.Const.State_1;
@@ -60,13 +60,13 @@ namespace FineUIPro.Web.HSSE.CostGoods
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// txtContractNum 控件。
/// drpContractNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtContractNum;
protected global::FineUIPro.DropDownList drpContractNum;
/// <summary>
/// txtCostManageDate 控件。
@@ -95,6 +95,15 @@ namespace FineUIPro.Web.HSSE.CostGoods
/// </remarks>
protected global::FineUIPro.TextBox txtGetCost;
/// <summary>
/// txtSumMoney 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSumMoney;
/// <summary>
/// Grid1 控件。
/// </summary>
+1
View File
@@ -18,6 +18,7 @@
<TreeNode id="EEC0D060-C15E-4D25-B015-C2B91F735DAC" Text="车次管理" NavigateUrl="HJGL/PreDesign/TrainNumberManager.aspx"></TreeNode>
<TreeNode id="53948077-B51D-4FF3-BFB0-AB4E27C42875" Text="排产计划" NavigateUrl="HJGL/PreDesign/ProductionSchedulingPlan.aspx"></TreeNode>
<TreeNode id="BD9C587E-17C2-49F1-82AE-A05117E41D89" Text="安装清单" NavigateUrl="HJGL/PreDesign/InstallList.aspx"></TreeNode>
<TreeNode id="53948077-B51D-4FF3-BFB0-AB4E27C42875" Text="排产计划" NavigateUrl="HJGL/PreDesign/ProductionSchedulingPlan.aspx"></TreeNode>
</TreeNode>
<TreeNode id="9B828E92-733B-4AF9-9DD0-55ECD8B64AB8" Text="材料管理" NavigateUrl=""><TreeNode id="E29C1839-3530-45EC-A752-B26A0027E2CD" Text="入库管理" NavigateUrl=""><TreeNode id="324C72AF-447A-4308-AFB7-ABF788C58240" Text="入库申请" NavigateUrl="CLGL/InPlanMaster.aspx"></TreeNode>
<TreeNode id="4A55351A-2440-4A2D-8509-3FFEE5FC8861" Text="入库单管理" NavigateUrl="CLGL/InputMaster.aspx"></TreeNode>