From 7e032e5eafc16d982d09275d3692b1a2d06875a2 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 10 一月 2025 11:17:00 +0800
Subject: [PATCH] 细节

---
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs    |    7 +++++--
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs    |    1 +
 DevApp/Gs.DevApp/DevFrm/WW/Frm_ProductionOrder.Designer.cs |   12 ++++++------
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs                  |   33 ++++++++++++++++++++++++++-------
 4 files changed, 38 insertions(+), 15 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WW/Frm_ProductionOrder.Designer.cs b/DevApp/Gs.DevApp/DevFrm/WW/Frm_ProductionOrder.Designer.cs
index 7ca82c8..77a01d0 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/Frm_ProductionOrder.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/Frm_ProductionOrder.Designer.cs
@@ -2349,7 +2349,7 @@
             this.gv_planReleaseDate.AppearanceCell.Options.UseFont = true;
             this.gv_planReleaseDate.Caption = "璁″垝涓嬭揪鏃ユ湡 ";
             this.gv_planReleaseDate.FieldName = "planReleaseDate";
-            this.gv_planReleaseDate.MinWidth = 50;
+            this.gv_planReleaseDate.MinWidth = 10;
             this.gv_planReleaseDate.Name = "gv_planReleaseDate";
             this.gv_planReleaseDate.OptionsColumn.AllowEdit = false;
             this.gv_planReleaseDate.Tag = "query_a.PLAN_RELEASE_DATE";
@@ -2382,7 +2382,7 @@
             this.gv_estimatedEndTime.AppearanceCell.Options.UseFont = true;
             this.gv_estimatedEndTime.Caption = "棰勮瀹屽伐鏃堕棿 ";
             this.gv_estimatedEndTime.FieldName = "estimatedEndTime";
-            this.gv_estimatedEndTime.MinWidth = 180;
+            this.gv_estimatedEndTime.MinWidth = 10;
             this.gv_estimatedEndTime.Name = "gv_estimatedEndTime";
             this.gv_estimatedEndTime.OptionsColumn.AllowEdit = false;
             this.gv_estimatedEndTime.Tag = "query_a.ESTIMATED_END_TIME";
@@ -2415,7 +2415,7 @@
             this.gv_estimatedStartTime.AppearanceCell.Options.UseFont = true;
             this.gv_estimatedStartTime.Caption = "棰勮寮�宸ユ椂闂� ";
             this.gv_estimatedStartTime.FieldName = "estimatedStartTime";
-            this.gv_estimatedStartTime.MinWidth = 180;
+            this.gv_estimatedStartTime.MinWidth = 10;
             this.gv_estimatedStartTime.Name = "gv_estimatedStartTime";
             this.gv_estimatedStartTime.OptionsColumn.AllowEdit = false;
             this.gv_estimatedStartTime.Tag = "query_a.ESTIMATED_START_TIME";
@@ -2741,7 +2741,7 @@
             // 
             this.gridColumn3.Caption = "浜у搧缂栫爜";
             this.gridColumn3.FieldName = "wlbm";
-            this.gridColumn3.MinWidth = 100;
+            this.gridColumn3.MinWidth = 10;
             this.gridColumn3.Name = "gridColumn3";
             this.gridColumn3.Visible = true;
             this.gridColumn3.VisibleIndex = 2;
@@ -2751,7 +2751,7 @@
             // 
             this.gridColumn2.Caption = "鐗╂枡鍚嶇О";
             this.gridColumn2.FieldName = "wlmc";
-            this.gridColumn2.MinWidth = 150;
+            this.gridColumn2.MinWidth = 10;
             this.gridColumn2.Name = "gridColumn2";
             this.gridColumn2.Visible = true;
             this.gridColumn2.VisibleIndex = 3;
@@ -2761,7 +2761,7 @@
             // 
             this.gridColumn1.Caption = "瑙勬牸鍨嬪彿";
             this.gridColumn1.FieldName = "wlgg";
-            this.gridColumn1.MinWidth = 150;
+            this.gridColumn1.MinWidth = 10;
             this.gridColumn1.Name = "gridColumn1";
             this.gridColumn1.Visible = true;
             this.gridColumn1.VisibleIndex = 4;
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
index f7c464e..44cf240 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
@@ -6,6 +6,7 @@
 using System;
 using System.Collections.Generic;
 using System.Data;
+using System.Drawing;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
@@ -34,6 +35,7 @@
                 getPageList(this.pageBar1.CurrentPage);
             });
             getPageList(1);
+           
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             this.ucBtnPrint1.btnDesignClick += (s, e) =>
             {
@@ -172,6 +174,7 @@
                     {
                         gcMain.DataSource = dt;
                         gcMain.ForceInitialize();
+                        gridView1.BestFitColumns();
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -222,7 +225,7 @@
                     {
                         array1.Add(a);
                     }
-                   
+
                     DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(array1.ToString());
                     if (dt1.Rows.Count > 0)
                     {
@@ -274,7 +277,7 @@
                 var _obj = new
                 {
                     mxGuid = mxGuid,
-                    inType="dhtm"
+                    inType = "dhtm"
                 };
                 try
                 {
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs
index b335efe..104c1d8 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_InitialBarcode.cs
@@ -178,6 +178,7 @@
                     {
                         gcMain.DataSource = dt;
                         gcMain.ForceInitialize();
+                        gridView1.BestFitColumns();
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain, gridView1);
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 9bb5c42..ce148f8 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -454,7 +454,7 @@
                             txt.Enabled = !isEdt;
                             continue;
                         }
-                     
+
                         //鏃堕棿
                         if (colType is DateTimePicker)
                         {
@@ -765,7 +765,7 @@
                         txt.ReadOnly = isEdt;
                     continue;
                 }
-             
+
                 //鏃堕棿
                 if (ctrl is DateTimePicker)
                 {
@@ -916,7 +916,7 @@
                 }
             }
         }
-      
+
         /// <summary>
         ///     绂佺敤鎴栧惎鐢ㄥ鍣ㄩ噷闈㈢殑鎺т欢
         /// </summary>
@@ -1168,15 +1168,15 @@
             }
         }
 
-        private static bool _isRead(object obj,bool isEdt=false)
+        private static bool _isRead(object obj, bool isEdt = false)
         {
             ///姘歌繙鏄彧璇荤殑
-            if (obj != null && obj.ToString().ToUpper()==("readOnly".ToUpper()))
+            if (obj != null && obj.ToString().ToUpper() == ("readOnly".ToUpper()))
             {
                 return true;
             }
             ///姘歌繙鏄彲鍐欑殑
-            if (obj != null && obj.ToString().ToUpper()==("readOnly-1".ToUpper()))
+            if (obj != null && obj.ToString().ToUpper() == ("readOnly-1".ToUpper()))
             {
                 return false;
             }
@@ -1715,7 +1715,26 @@
                         view.ActiveEditor.MouseUp += ActiveEditor_MouseUp;
                 };
             }
-
+            gridView1.RowStyle += (s, e) =>
+            {
+                gridView1.OptionsSelection.EnableAppearanceFocusedRow = false;//榛樿閫変腑琛屼笉鍙樿壊
+                gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;//榛樿閫変腑鍗曞厓鏍间笉鍙樿壊
+                if (e.RowHandle >= 0)
+                {
+                    DataRow row = gridView1.GetDataRow(e.RowHandle);
+                    if (row == null)
+                        return;
+                    bool columnExists = row.Table.Columns.Contains("isRed");
+                    if (columnExists == true)
+                    {
+                        string _isRed = row["isRed"].ToString();
+                        if (_isRed == "1")
+                        {
+                            e.Appearance.BackColor = Color.LightPink;
+                        }
+                    }
+                }
+            };
         }
         private static void ActiveEditor_MouseUp(object sender, MouseEventArgs e)
         {

--
Gitblit v1.9.3