From 45658068e0fb7bc4359c9ec4ce194f17aaab5e3e Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期一, 17 十一月 2025 18:00:56 +0800
Subject: [PATCH] ID转人名:计时单价、异常工时、部门产线对应维护、排班管理、工艺设置、现场修理

---
 DevApp/Gs.DevApp/DevFrm/Rpt/RptQT.cs |   48 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/RptQT.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/RptQT.cs
index 27d46c2..459d962 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rpt/RptQT.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rpt/RptQT.cs
@@ -1,6 +1,5 @@
-using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections;
 using DevExpress.Utils;
-using DevExpress.Utils.DirectXPaint;
+using DevExpress.XtraGrid.Views.Grid;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Gs.DevApp.UserControl;
@@ -9,7 +8,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
-using System.Data.SqlTypes;
+using System.Drawing;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
@@ -23,6 +22,7 @@
         public RptQT()
         {
             InitializeComponent();
+            gridView2.RowCellStyle += gridView2_RowCellStyle;
             this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
             this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
             this.toolBarMenu1.getXmlConfig();
@@ -31,6 +31,7 @@
             // 娣诲姞gridView1鐨勮閫夋嫨鍙樺寲浜嬩欢
             gridView1.FocusedRowChanged += GridView1_FocusedRowChanged;
             // 璁剧疆gridView2鍙傛暟
+            gridView1.RowCellStyle += gridView1_RowCellStyle;
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gridView2);
             Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
             {
@@ -236,5 +237,46 @@
                 ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
+
+        private void gridView1_RowCellStyle(object sender, RowCellStyleEventArgs e)
+        {
+            // 纭繚鍙鐞唌inQT鍒�
+            if (e.Column.FieldName == "minQT")
+            {
+                // 鑾峰彇褰撳墠琛岀殑鏁版嵁
+                DataRowView row = gridView1.GetRow(e.RowHandle) as DataRowView;
+                if (row != null && row["minQT"] != DBNull.Value)
+                {
+
+                    double minQT = Convert.ToDouble(row["minQT"]);
+                    if (minQT < 1.0)
+                    {
+                        e.Appearance.ForeColor = Color.Red;
+                    }
+                }
+            }
+        }
+
+        private void gridView2_RowCellStyle(object sender, RowCellStyleEventArgs e)
+        {
+            // 纭繚鍙鐞唓tNum鍒�
+            if (e.Column.FieldName == "qtNum")
+            {
+                // 鑾峰彇褰撳墠琛岀殑鏁版嵁
+                DataRowView row = gridView2.GetRow(e.RowHandle) as DataRowView;
+                if (row != null)
+                {
+                    // 妫�鏌tNum鍊兼槸鍚﹀皬浜�1锛�100%锛�
+                    if (row["qtNum"] != DBNull.Value)
+                    {
+                        double qtNum = Convert.ToDouble(row["qtNum"]);
+                        if (qtNum < 1.0)
+                        {
+                            e.Appearance.ForeColor = Color.Red;
+                        }
+                    }
+                }
+            }
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3