diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx index f6f23483..59c3cb35 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -89,7 +89,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx new file mode 100644 index 00000000..539d7f15 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx @@ -0,0 +1,344 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + + private void Table4_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Table1"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + Table4.PrintRow(0); + // each PrintRow call must be followed by either PrintColumn or PrintColumns call + // to print cells on the row + Table4.PrintColumns(); + + // now enumerate the data source and print the table body + + // print the table body + Table4.PrintRow(1); + Table4.PrintColumns(); + Table4.PrintRow(2); + Table4.PrintColumns(); + Table4.PrintRow(3); + Table4.PrintColumns(); + Table4.PrintRow(4); + Table4.PrintColumns(); + Table4.PrintRow(5); + Table4.PrintColumns(); + + // go next data source row + rowData.Next(); + + } + + private void Table5_ManualBuild(object sender, EventArgs e) + { + Table5.PrintRow(0); + Table5.PrintColumns(); + Table5.PrintRow(1); + Table5.PrintColumns(); + } + + + private int x; + private void Tabel_Data_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + Tabel_Data.PrintRow(0); + // each PrintRow call must be followed by either PrintColumn or PrintColumns call + // to print cells on the row + Tabel_Data.PrintColumns(); + x=0; + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + x++; + // print the table body + Tabel_Data.PrintRow(1); + Tabel_Data.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx b/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx index c05040e6..9938dabe 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -99,7 +99,7 @@ namespace FastReport } - + @@ -114,15 +114,8 @@ namespace FastReport - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs index aab12ce5..cb7f9fb9 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs @@ -572,7 +572,8 @@ namespace FineUIPro.Web.HJGL.PointTrust { if (!batch.EndDate.HasValue) { - PointBatchService.UpdateBatchIsClosed2(this.PointBatchId, DateTime.Now); + PointBatchService.UpdateBatchIsClosed(this.PointBatchId, DateTime.Now); + /*PointBatchService.UpdateBatchIsClosed2(this.PointBatchId, DateTime.Now); //生成委托单 Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust(); var project = BLL.ProjectService.GetProjectByProjectId(batch.ProjectId); @@ -595,7 +596,7 @@ namespace FineUIPro.Web.HJGL.PointTrust newBatchTrust.DetectionTypeId = batch.DetectionTypeId; newBatchTrust.DetectionRateId = batch.DetectionRateId; newBatchTrust.PointBatchId = this.PointBatchId; - BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单 + BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单*/ this.BindGrid(); Alert.ShowInTop("关批成功!", MessageBoxIcon.Success); } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs index cd01605b..14b62b2f 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs @@ -355,13 +355,68 @@ namespace FineUIPro.Web.HJGL.PreDesign } protected void btnPrint_Click(object sender, EventArgs e) { - Print(tvControlItem.SelectedNodeID,""); + Print(tvControlItem.SelectedNodeID, Grid1.SelectedRowIDArray); } - private void Print(string PipelineId ,string PipelineComponentId) + private void Print(string PipelineId ,string[] PipelineComponentId) { + var db = Funs.DB; BLL.FastReportService.ResetData(); - string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,unitwork.UnitWorkName, + var query = + from com in db.HJGL_Pipeline_Component + join mat in db.HJGL_PipeLineMat on com.PipeLineMatId equals mat.PipeLineMatId into matJoin + from mat in matJoin.DefaultIfEmpty() + join pipe in db.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeJoin + from pipe in pipeJoin.DefaultIfEmpty() + join punit in db.Base_Unit on com.PreUnit equals punit.UnitId into punitJoin + from punit in punitJoin.DefaultIfEmpty() + join aunit in db.Base_Unit on com.AssembleUnit equals aunit.UnitId into aunitJoin + from aunit in aunitJoin.DefaultIfEmpty() + join unitwork in db.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkJoin + from unitwork in unitworkJoin.DefaultIfEmpty() + join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin + from mater in materJoin.DefaultIfEmpty() + where com.QRCode != "" & com.PipelineId == PipelineId + select new + { + com.PipelineComponentId, + com.PipelineComponentCode, + com.BoxNumber, + UnitWorkName = unitwork.UnitWorkName, + com.PipelineId, + PreUnit = punit.UnitName, + AssembleUnit = aunit.UnitName, + mat.PrefabricatedComponents, + com.QRCode, + com.State, + PlanStartDate = string.Format("yyyy-MM-dd", pipe.PlanStartDate), + pipe.PipelineCode, + pipe.FlowingSection, + QRCode2 = "PrePipeline$" + com.PipelineComponentId, + mater.MaterialCode + }; + + var result = query.ToList(); + if (PipelineComponentId.Length>0) + { + result = result.Where(x => PipelineComponentId.Contains(x.PipelineComponentId)).ToList(); + } + var tb = LINQToDataTable(result); + if (tb != null) + { + tb.TableName = "Table1"; + } + BLL.FastReportService.AddFastreportTable(tb); + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + initTemplatePath = "File\\Fastreport\\组件打印.frx"; + + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + + } + /*string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,unitwork.UnitWorkName, com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,mat.PrefabricatedComponents, com.QRCode,com.State,CONVERT(varchar(100), pipe.PlanStartDate, 23) as PlanStartDate,pipe.PipelineCode,pipe.FlowingSection, ('PrePipeline$'+com.PipelineComponentId )as QRCode2,mater.* @@ -377,11 +432,7 @@ namespace FineUIPro.Web.HJGL.PreDesign strSql += " AND com.PipelineId =@PipelineId"; listStr.Add(new SqlParameter("@PipelineId", PipelineId)); - if (PipelineComponentId!="") - { - strSql += " AND com.PipelineComponentId =@PipelineComponentId"; - listStr.Add(new SqlParameter("@PipelineComponentId", PipelineComponentId)); - } + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); if (tb != null) @@ -397,8 +448,9 @@ namespace FineUIPro.Web.HJGL.PreDesign { PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); - } + }*/ } + /// /// 增加焊口信息 /// @@ -500,11 +552,6 @@ namespace FineUIPro.Web.HJGL.PreDesign } } } - else if (e.CommandName == "cmd_print") - { - string Id = this.Grid1.SelectedRowID; - Print(tvControlItem.SelectedNodeID, Id); - } } protected void btnSearch_Click(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx index 21bc9392..56cd9dbc 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx @@ -170,6 +170,11 @@ EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Width="1050px" Height="650px"> + +