diff --git a/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx b/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx index 9941607..557c146 100644 --- a/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx +++ b/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx @@ -10,7 +10,7 @@ .f-grid-row .f-grid-cell-inner { white-space: normal; word-break: break-all; - } + } @@ -30,6 +30,9 @@ + + @@ -41,7 +44,7 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -70,7 +73,6 @@ - - + EnableAjax="false" DisableControlBeforePostBack="false"> + - + + HeaderText="施工号" HeaderTextAlign="Center" TextAlign="left" Width="120px"> + HeaderText="批编号" HeaderTextAlign="Center" TextAlign="left" Width="90px"> @@ -115,24 +117,55 @@ FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="75px"> + HeaderText="要求完成日期" HeaderTextAlign="Center" TextAlign="Center" Width="120px" RendererArgument="yyyy-MM-dd"> - + SortField="ReportFeedback" HeaderTextAlign="Center" TextAlign="Left" Width="105px" + RendererArgument="yyyy-MM-dd" FieldType="Date" Renderer="Date"> + + Icon="Pencil" ToolTipType="Title" ToolTip="编辑完成报告反馈时间" DataTextFormatString="{0}" DataIFrameUrlFields="BatchId" + DataIFrameUrlFormatString="../HJGL/WeldingManage/CompleteReportDateEdit.aspx?batchId={0}" DataWindowTitleFormatString="编辑 - {1}" + HeaderTextAlign="Center" TextAlign="Center" /> - + - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -140,9 +173,9 @@ + Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true" + Width="420px" Height="280px"> + diff --git a/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.cs b/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.cs index fbc6cb6..c6cc647 100644 --- a/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.cs @@ -25,6 +25,15 @@ namespace FineUIPro.Web.common this.drpProject.DataBind(); Funs.FineUIPleaseSelect(this.drpProject); this.drpProject.SelectedValue = this.CurrUser.LoginProjectId; + + + this.drpPro.DataTextField = "ProjectCode"; + this.drpPro.DataValueField = "ProjectId"; + this.drpPro.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1"); + this.drpPro.DataBind(); + Funs.FineUIPleaseSelect(this.drpPro); + this.drpPro.SelectedValue = this.CurrUser.LoginProjectId; + //委托单不为null且 对应批明细的委托单明细状态为2 List Allbatch = (from x in Funs.DB.HJGL_BO_Batch where x.ProjectId == this.drpProject.SelectedValue && !x.AskCompleteDate.HasValue @@ -35,18 +44,18 @@ namespace FineUIPro.Web.common select x; //获取所以批明细 var trustdetails = from x in Funs.DB.HJGL_CH_TrustItem join y in Funs.DB.HJGL_BO_BatchDetail on x.BatchDetailId equals y.BatchDetailId - join z in Funs.DB.HJGL_BO_Batch on y.BatchId equals z.BatchId + join z in Funs.DB.HJGL_BO_Batch on y.BatchId equals z.BatchId where z.ProjectId == this.drpProject.SelectedValue && !z.AskCompleteDate.HasValue select x; //获取所有批明细对应委托明细 List batchLists2 = (from x in Allbatch join m in Funs.DB.HJGL_BS_NDTRate on x.NDTR_ID equals m.NDTR_ID join n in Funs.DB.HJGL_CH_Trust on x.BatchId equals n.BatchId into g from t in g.DefaultIfEmpty() - where m.NDTR_Rate.Value==0 && t==null + where m.NDTR_Rate.Value == 0 && t == null select x).Distinct().ToList(); //获取委托单为null且检测比例是0的 var batchLists = (from x in Allbatch - join n in Funs.DB.HJGL_CH_Trust on x.BatchId equals n.BatchId into g - select x).Distinct().ToList(); + join n in Funs.DB.HJGL_CH_Trust on x.BatchId equals n.BatchId into g + select x).Distinct().ToList(); var batchdetailsList = batchdetails.ToList(); var trustdetailsList = trustdetails.ToList(); var batchLists4 = ( @@ -58,14 +67,14 @@ namespace FineUIPro.Web.common select g.First().x ).Distinct().ToList(); batchLists2.AddRange(batchLists4); - batchLists2= batchLists2.Distinct().ToList(); + batchLists2 = batchLists2.Distinct().ToList(); foreach (var item in batchLists2) - { + { var batchdetail = from x in batchdetails where x.BatchId == item.BatchId select x.BatchDetailId; //获取批次详情ID var trustdetail = from x in trustdetails where batchdetail.Contains(x.BatchDetailId) orderby x.FeedbackDate descending select x; - + //检测合格,更新要求完成日期 - if ( item.BatchIsClosed == true) + if (item.BatchIsClosed == true) { DateTime date = DateTime.Now; @@ -141,6 +150,7 @@ namespace FineUIPro.Web.common BindProject(); BindBatch(); + BindRepair(); //BindGetWelder(); //BindGetWelderLimitDate(); //BindPointNoTrust(); @@ -149,17 +159,21 @@ namespace FineUIPro.Web.common //BindCheckNoAudit(); } } - #region 绑定数据 + #region 绑定数据 /// /// 绑定项目数据 /// private void BindProject() { var project = BLL.Base_ProjectService.GetOnProjectListByUser(this.CurrUser.UserId, "1"); - if (!string.IsNullOrEmpty(txtProjectCode.Text)) + if (!string.IsNullOrEmpty(txtProjectCode.Text.Trim())) { project = project.Where(e => e.ProjectCode.Contains(txtProjectCode.Text.Trim())).ToList(); } + if (!string.IsNullOrEmpty(txtProjectName.Text.Trim())) + { + project = project.Where(e => e.ProjectName.Contains(txtProjectName.Text.Trim())).ToList(); + } GridProject.RecordCount = project.Count; var table = GetPagedDataTable(GridProject, project); this.GridProject.DataSource = table; @@ -212,13 +226,13 @@ namespace FineUIPro.Web.common // left join dbo.Base_Project p on p.ProjectId=b.ProjectId"; //DataTable dt = SQLHelper.GetDataTableRunText(strSql, null); // 这个字段不要了 - //(case when(select Count(*) from dbo.HJGL_CH_TrustItem item + //(case when(select Count(*) from dbo.HJGL_CH_TrustItem item - // --left - // join dbo.HJGL_BO_BatchDetail batchDetail on batchDetail.BatchDetailId = item.BatchDetailId - // -- where item.States != '2' and batchDetail.BatchId = v.BatchId) > 0 OR - // --(SELECT COUNT(*) FROM dbo.HJGL_BO_Batch b WHERE b.BatchId = v.BatchId AND b.BatchIsClosed = 1) = 0 - // -- THEN '否' else '是' end) as IsPass, + // --left + // join dbo.HJGL_BO_BatchDetail batchDetail on batchDetail.BatchDetailId = item.BatchDetailId + // -- where item.States != '2' and batchDetail.BatchId = v.BatchId) > 0 OR + // --(SELECT COUNT(*) FROM dbo.HJGL_BO_Batch b WHERE b.BatchId = v.BatchId AND b.BatchIsClosed = 1) = 0 + // -- THEN '否' else '是' end) as IsPass, string strSql = @"select project.ProjectCode, v.BatchId,batch.BatchCode,ty.JOTY_Name,rate.NDTR_Name, batch.SubmitAskDate, batch.AskCompleteDate, @@ -394,5 +408,39 @@ namespace FineUIPro.Web.common { BindBatch(); } + + private void BindRepair() + { + string strSql = @"select repairItemRecord.RepairItemRecordId,repairItemRecord.ProjectId,repairItemRecord.ISO_ID,repairItemRecord.JOT_ID,repairItemRecord.FilmNum,repairItemRecord.FeedbackDate, + jointInfo.JOT_JointNo,isoInfo.ISO_IsoNo,project.ProjectCode from HJGL_CH_RepairItemRecord repairItemRecord + left join HJGL_PW_JointInfo jointInfo on jointInfo.JOT_ID = repairItemRecord.JOT_ID + left join HJGL_PW_IsoInfo isoInfo on isoInfo.ISO_ID = jointInfo.ISO_ID + left join Base_Project project on project.ProjectId = repairItemRecord.ProjectId + where repairItemRecord.ProjectId = @projectId + order by repairItemRecord.FeedbackDate asc"; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.drpPro.SelectedValue) && this.drpPro.SelectedValue != BLL.Const._Null) + { + listStr.Add(new SqlParameter("@projectId", this.drpPro.SelectedValue)); + } + else + { + listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + this.GridRepair.DataSource = tb; + this.GridRepair.DataBind(); + } + + protected void GridRepair_Sort(object sender, GridSortEventArgs e) + { + BindRepair(); + } + + protected void drpPro_SelectedIndexChanged(object sender, EventArgs e) + { + BindRepair(); + } } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.designer.cs index 01d3bbb..aca9a21 100644 --- a/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/common/mainGdaz.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.common { - - - public partial class mainGdaz { - +namespace FineUIPro.Web.common +{ + + + public partial class mainGdaz + { + /// /// Head1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - + /// /// form1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel2 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Panel1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Panel3 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel3; - + /// /// Toolbar2 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtProjectCode 控件。 /// @@ -83,7 +85,16 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtProjectCode; - + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + /// /// btnSelect 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelect; - + /// /// ToolbarFill1 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// GridProject 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid GridProject; - + /// /// ToolbarSeparator1 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Panel4 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel4; - + /// /// Panel5 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel5; - + /// /// Panel7 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel7; - + /// /// GridBatch 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid GridBatch; - + /// /// Toolbar1 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// drpProject 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProject; - + /// /// cbIsReportFeedback 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox cbIsReportFeedback; - + /// /// btnSelect2 控件。 /// @@ -209,7 +220,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelect2; - + /// /// btnOut 控件。 /// @@ -218,7 +229,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// ToolbarFill2 控件。 /// @@ -227,7 +238,7 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill2; - + /// /// Panel8 控件。 /// @@ -236,16 +247,43 @@ namespace FineUIPro.Web.common { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel8; - + /// - /// Label5 控件。 + /// GridRepair 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label5; - + protected global::FineUIPro.Grid GridRepair; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// drpPro 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpPro; + + /// + /// ToolbarFill3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill3; + /// /// Window1 控件。 ///