From f23d33d0cf77a73d449cd7c38effda9e50c8fda4 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 06 三月 2025 08:13:37 +0800
Subject: [PATCH] 版面

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectType.cs |   47 +++++++++++++++++++++++++++++++----------------
 1 files changed, 31 insertions(+), 16 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectType.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectType.cs
index 78543c2..5c850b7 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectType.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectType.cs
@@ -25,7 +25,10 @@
             this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
             this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
             this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
+            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+            gvList.Add(gridView1);
+            Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1,null, null, "", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
             });
@@ -41,11 +44,11 @@
         }
         private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
-            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
+            Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
             await Task.Delay(100);
             getPageList(1);
         }
-      
+
         /// <summary>
         /// 鍒嗛〉浜嬩欢
         /// </summary>
@@ -98,7 +101,7 @@
         private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
         {
             string rowGuid = "", rowName = "";
-             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_typeNo, gridView1, "typeNo");
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_typeNo, gridView1, "typeNo");
             if (string.IsNullOrEmpty(rowGuid))
             {
                 ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -116,9 +119,10 @@
                 if (_rtn.rtnCode > 0)
                 {
                     if (xtraTabControl1.SelectedTabPageIndex == 0)
-                        getPageList(this.pageBar1.CurrentPage);
+                    { }
                     else
                         Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
+                    getPageList(this.pageBar1.CurrentPage);
                 }
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
             }
@@ -139,14 +143,15 @@
                 getModel(lbGuid.Text.Trim());
             else
             {
-                _filterList.Clear();
-                if (gridView1.ActiveFilter.Count > 0)
-                {
-                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
-                    gridView1.ActiveFilter.Clear();
-                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
-                }
-                getPageList(1);
+                //_filterList.Clear();
+                //if (gridView1.ActiveFilter.Count > 0)
+                //{
+                //    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+                //    gridView1.ActiveFilter.Clear();
+                //    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+                //}
+                //getPageList(1);
+                getPageList(this.pageBar1.CurrentPage);
             }
         }
         /// <summary>
@@ -164,7 +169,14 @@
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
-            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+            {
+                getModel(rowGuid);
+            }
+            else
+            {
+                UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+            }
         }
         /// <summary>
         /// 鏂板浜嬩欢
@@ -194,8 +206,8 @@
             var _obj = new MesDefectType()
             {
                 Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()),
-                TypeNo=txt_typeNo.Text.Trim(),
-                TypeMemo=txt_typeMemo.Text.Trim(),
+                TypeNo = txt_typeNo.Text.Trim(),
+                TypeMemo = txt_typeMemo.Text.Trim(),
             };
             try
             {
@@ -207,6 +219,7 @@
                     lbGuid.Text = _rtn.rtnData;
                     toolBarMenu1.isSetBtn = true;
                     UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
+                    toolBarMenu1.currentAction = "";
                 }
             }
             catch (Exception ex)
@@ -240,6 +253,8 @@
                     {
                         gcMain.DataSource = dt;
                         gcMain.ForceInitialize();
+                        gridView1.BestFitColumns();
+                        gridView1.BestFitColumns();
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain, gridView1);

--
Gitblit v1.9.3