From 55471fb40328ce18dcd6b8a31fdcb70ba314f024 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Mon, 19 Aug 2024 10:51:27 +0800 Subject: [PATCH] =?UTF-8?q?20240819=20=E7=A6=BB=E5=9C=BA=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E3=80=81=E6=9C=BA=E5=85=B7=E7=81=B0=E8=89=B2=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CQMS/Comprehensive/InspectionMachine.aspx | 3 +++ .../CQMS/Comprehensive/InspectionMachine.aspx.cs | 11 +++++++++-- .../CQMS/Comprehensive/InspectionPerson.aspx | 3 +++ .../CQMS/Comprehensive/InspectionPerson.aspx.cs | 16 +++++++++------- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx index ce362a07..91601a21 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx @@ -17,6 +17,9 @@ color: Red; font-size: small; } + .f-grid-row.Gray { + background-color: gray; + } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs index 41427d4a..1e0e8e4f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs @@ -34,7 +34,7 @@ namespace FineUIPro.Web.Comprehensive { string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status, InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate, - InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode + InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount,C.RemarkCode,C.IsOnSite from Comprehensive_InspectionMachine C left join Base_Unit U on C.UnitId=U.UnitId left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId @@ -106,7 +106,7 @@ namespace FineUIPro.Web.Comprehensive DataRowView row = e.DataItem as DataRowView; string IsVerification = row["IsVerification"].ToString(); string NextTestDate = row["NextTestDate"].ToString(); - string InspectionType= row["InspectionType"].ToString(); + string InspectionType = row["InspectionType"].ToString(); if (InspectionType == "计量") { if (IsVerification == "是" && !string.IsNullOrEmpty(NextTestDate)) //在校验期内 @@ -126,6 +126,13 @@ namespace FineUIPro.Web.Comprehensive } } + //离场为灰色 + string LeaveDate = row["LeaveDate"].ToString(); + string IsOnSite = row["IsOnSite"].ToString(); + if (!string.IsNullOrEmpty(LeaveDate) || IsOnSite == "False") + { + e.RowCssClass = "Gray"; + } } #region 查询 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx index b19be888..84e38f00 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx @@ -17,6 +17,9 @@ color: Red; font-size: small; } + .f-grid-row.Gray { + background-color: gray; + } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs index 0b9cb198..06888830 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs @@ -301,25 +301,27 @@ namespace FineUIPro.Web.Comprehensive { DataRowView row = e.DataItem as DataRowView; - string ValidityDate = row["ValidityDate"].ToString(); if (!string.IsNullOrEmpty(ValidityDate)) { if (DateTime.Compare(DateTime.Parse(ValidityDate).AddDays(-15), DateTime.Now) < 0) { - // Grid1.Rows[e.RowIndex].RowCssClass = "Red"; - //过期为红色 + // Grid1.Rows[e.RowIndex].RowCssClass = "Red"; + //过期为红色 e.RowCssClass = "Red"; - } } else { e.RowCssClass = "Yellow"; - - } - + //离场人员为灰色 + string DepartureTime = row["DepartureTime"].ToString(); + string IsOnSite = row["IsOnSite"].ToString(); + if (!string.IsNullOrEmpty(DepartureTime) || IsOnSite == "False") + { + e.RowCssClass = "Gray"; + } } /// /// Grid行点击事件