From acf9d7b001514b3586166cbd0609e9d836ada792 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期三, 23 七月 2025 16:24:49 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs     |    2 
 DevApp/Gs.DevApp/XtraForm1.Designer.cs              |  113 +++++----
 DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.cs          |    1 
 DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs |  424 +++++++++++++++++++-------------------
 DevApp/Gs.DevApp/XtraForm1.cs                       |   60 +++--
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs           |   22 +
 6 files changed, 327 insertions(+), 295 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs
index c825b91..8ee8dbf 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs
@@ -135,6 +135,8 @@
                         gcMx1.ForceInitialize();
                         gvMx1.PostEditor();
                         gvMx1.UpdateCurrentRow();
+                        gvMx1.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
                     }
                     catch (Exception ex)
                     {
diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs
index 66db1f7..9b1d4ac 100644
--- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.Designer.cs
@@ -31,17 +31,17 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            DevExpress.XtraLayout.ColumnDefinition columnDefinition9 = new DevExpress.XtraLayout.ColumnDefinition();
-            DevExpress.XtraLayout.ColumnDefinition columnDefinition10 = new DevExpress.XtraLayout.ColumnDefinition();
-            DevExpress.XtraLayout.ColumnDefinition columnDefinition11 = new DevExpress.XtraLayout.ColumnDefinition();
-            DevExpress.XtraLayout.ColumnDefinition columnDefinition12 = new DevExpress.XtraLayout.ColumnDefinition();
-            DevExpress.XtraLayout.RowDefinition rowDefinition15 = new DevExpress.XtraLayout.RowDefinition();
-            DevExpress.XtraLayout.RowDefinition rowDefinition16 = new DevExpress.XtraLayout.RowDefinition();
-            DevExpress.XtraLayout.RowDefinition rowDefinition17 = new DevExpress.XtraLayout.RowDefinition();
-            DevExpress.XtraLayout.RowDefinition rowDefinition18 = new DevExpress.XtraLayout.RowDefinition();
-            DevExpress.XtraLayout.RowDefinition rowDefinition19 = new DevExpress.XtraLayout.RowDefinition();
-            DevExpress.XtraLayout.RowDefinition rowDefinition20 = new DevExpress.XtraLayout.RowDefinition();
-            DevExpress.XtraLayout.RowDefinition rowDefinition21 = new DevExpress.XtraLayout.RowDefinition();
+            DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition();
+            DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition();
+            DevExpress.XtraLayout.ColumnDefinition columnDefinition3 = new DevExpress.XtraLayout.ColumnDefinition();
+            DevExpress.XtraLayout.ColumnDefinition columnDefinition4 = new DevExpress.XtraLayout.ColumnDefinition();
+            DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition();
+            DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition();
+            DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition();
+            DevExpress.XtraLayout.RowDefinition rowDefinition4 = new DevExpress.XtraLayout.RowDefinition();
+            DevExpress.XtraLayout.RowDefinition rowDefinition5 = new DevExpress.XtraLayout.RowDefinition();
+            DevExpress.XtraLayout.RowDefinition rowDefinition6 = new DevExpress.XtraLayout.RowDefinition();
+            DevExpress.XtraLayout.RowDefinition rowDefinition7 = new DevExpress.XtraLayout.RowDefinition();
             this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu();
             this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
             this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
@@ -62,6 +62,7 @@
             this.gridColumn23 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.gridColumn37 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.gridColumn38 = new DevExpress.XtraGrid.Columns.GridColumn();
+            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.repositoryItemMemoEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit();
             this.repositoryItemMemoEdit2 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit();
             this.pageBar1 = new UserControls.Data.UcPageBar();
@@ -83,12 +84,23 @@
             this.txt_sjXt = new DevExpress.XtraEditors.TextEdit();
             this.txt_yjDate = new DevExpress.XtraEditors.TextEdit();
             this.txt_sjDate = new DevExpress.XtraEditors.TextEdit();
+            this.txt_barCode = new DevExpress.XtraEditors.TextEdit();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
             this.panel5 = new System.Windows.Forms.Panel();
             this.panel1 = new System.Windows.Forms.Panel();
             this.lbSum1 = new System.Windows.Forms.Label();
@@ -144,18 +156,6 @@
             this.gridColumn14 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.gridColumn25 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.tips = new DevExpress.Utils.ToolTipController(this.components);
-            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txt_barCode = new DevExpress.XtraEditors.TextEdit();
-            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
             ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
             this.xtraTabControl1.SuspendLayout();
             this.xtraTabPage1.SuspendLayout();
@@ -193,12 +193,23 @@
             ((System.ComponentModel.ISupportInitialize)(this.txt_sjXt.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txt_yjDate.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txt_sjDate.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txt_barCode.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
             this.panel5.SuspendLayout();
             this.panel1.SuspendLayout();
             this.panel4.SuspendLayout();
@@ -213,17 +224,6 @@
             this.tabMxPage1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txt_barCode.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
             this.SuspendLayout();
             // 
             // toolBarMenu1
@@ -460,6 +460,16 @@
             this.gridColumn38.Name = "gridColumn38";
             this.gridColumn38.Width = 94;
             // 
+            // gridColumn3
+            // 
+            this.gridColumn3.Caption = "淇悊鐘舵��";
+            this.gridColumn3.FieldName = "repairResult";
+            this.gridColumn3.MinWidth = 25;
+            this.gridColumn3.Name = "gridColumn3";
+            this.gridColumn3.Visible = true;
+            this.gridColumn3.VisibleIndex = 10;
+            this.gridColumn3.Width = 94;
+            // 
             // repositoryItemMemoEdit1
             // 
             this.repositoryItemMemoEdit1.Name = "repositoryItemMemoEdit1";
@@ -689,6 +699,15 @@
             this.txt_sjDate.StyleController = this.layoutMx1;
             this.txt_sjDate.TabIndex = 18;
             // 
+            // txt_barCode
+            // 
+            this.txt_barCode.Location = new System.Drawing.Point(99, 46);
+            this.txt_barCode.Name = "txt_barCode";
+            this.txt_barCode.Properties.ReadOnly = true;
+            this.txt_barCode.Size = new System.Drawing.Size(323, 24);
+            this.txt_barCode.StyleController = this.layoutMx1;
+            this.txt_barCode.TabIndex = 27;
+            // 
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.lbGuid;
@@ -721,41 +740,41 @@
             this.layoutControlItem10});
             this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
             this.Root.Name = "Root";
-            columnDefinition9.SizeType = System.Windows.Forms.SizeType.Percent;
-            columnDefinition9.Width = 100D;
-            columnDefinition10.SizeType = System.Windows.Forms.SizeType.Percent;
-            columnDefinition10.Width = 100D;
-            columnDefinition11.SizeType = System.Windows.Forms.SizeType.Percent;
-            columnDefinition11.Width = 100D;
-            columnDefinition12.SizeType = System.Windows.Forms.SizeType.Percent;
-            columnDefinition12.Width = 100D;
+            columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
+            columnDefinition1.Width = 100D;
+            columnDefinition2.SizeType = System.Windows.Forms.SizeType.Percent;
+            columnDefinition2.Width = 100D;
+            columnDefinition3.SizeType = System.Windows.Forms.SizeType.Percent;
+            columnDefinition3.Width = 100D;
+            columnDefinition4.SizeType = System.Windows.Forms.SizeType.Percent;
+            columnDefinition4.Width = 100D;
             this.Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] {
-            columnDefinition9,
-            columnDefinition10,
-            columnDefinition11,
-            columnDefinition12});
-            rowDefinition15.Height = 100D;
-            rowDefinition15.SizeType = System.Windows.Forms.SizeType.Percent;
-            rowDefinition16.Height = 100D;
-            rowDefinition16.SizeType = System.Windows.Forms.SizeType.Percent;
-            rowDefinition17.Height = 100D;
-            rowDefinition17.SizeType = System.Windows.Forms.SizeType.Percent;
-            rowDefinition18.Height = 100D;
-            rowDefinition18.SizeType = System.Windows.Forms.SizeType.Percent;
-            rowDefinition19.Height = 100D;
-            rowDefinition19.SizeType = System.Windows.Forms.SizeType.Percent;
-            rowDefinition20.Height = 100D;
-            rowDefinition20.SizeType = System.Windows.Forms.SizeType.Percent;
-            rowDefinition21.Height = 100D;
-            rowDefinition21.SizeType = System.Windows.Forms.SizeType.Percent;
+            columnDefinition1,
+            columnDefinition2,
+            columnDefinition3,
+            columnDefinition4});
+            rowDefinition1.Height = 100D;
+            rowDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
+            rowDefinition2.Height = 100D;
+            rowDefinition2.SizeType = System.Windows.Forms.SizeType.Percent;
+            rowDefinition3.Height = 100D;
+            rowDefinition3.SizeType = System.Windows.Forms.SizeType.Percent;
+            rowDefinition4.Height = 100D;
+            rowDefinition4.SizeType = System.Windows.Forms.SizeType.Percent;
+            rowDefinition5.Height = 100D;
+            rowDefinition5.SizeType = System.Windows.Forms.SizeType.Percent;
+            rowDefinition6.Height = 100D;
+            rowDefinition6.SizeType = System.Windows.Forms.SizeType.Percent;
+            rowDefinition7.Height = 100D;
+            rowDefinition7.SizeType = System.Windows.Forms.SizeType.Percent;
             this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] {
-            rowDefinition15,
-            rowDefinition16,
-            rowDefinition17,
-            rowDefinition18,
-            rowDefinition19,
-            rowDefinition20,
-            rowDefinition21});
+            rowDefinition1,
+            rowDefinition2,
+            rowDefinition3,
+            rowDefinition4,
+            rowDefinition5,
+            rowDefinition6,
+            rowDefinition7});
             this.Root.Size = new System.Drawing.Size(849, 260);
             this.Root.TextVisible = false;
             // 
@@ -801,6 +820,121 @@
             this.layoutControlItem9.Text = "涓嶈壇鍘熷洜";
             this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem9.TextVisible = false;
+            // 
+            // layoutControlItem1
+            // 
+            this.layoutControlItem1.Control = this.txt_gdbh;
+            this.layoutControlItem1.Location = new System.Drawing.Point(0, 68);
+            this.layoutControlItem1.Name = "layoutControlItem1";
+            this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 2;
+            this.layoutControlItem1.Size = new System.Drawing.Size(207, 34);
+            this.layoutControlItem1.Text = "宸ュ崟缂栧彿";
+            this.layoutControlItem1.TextSize = new System.Drawing.Size(75, 18);
+            // 
+            // layoutControlItem13
+            // 
+            this.layoutControlItem13.Control = this.txt_sjXt;
+            this.layoutControlItem13.Location = new System.Drawing.Point(207, 68);
+            this.layoutControlItem13.Name = "layoutControlItem13";
+            this.layoutControlItem13.OptionsTableLayoutItem.ColumnIndex = 1;
+            this.layoutControlItem13.OptionsTableLayoutItem.RowIndex = 2;
+            this.layoutControlItem13.Size = new System.Drawing.Size(207, 34);
+            this.layoutControlItem13.Text = "鐢熶骇绾垮埆";
+            this.layoutControlItem13.TextSize = new System.Drawing.Size(75, 18);
+            // 
+            // layoutControlItem2
+            // 
+            this.layoutControlItem2.Control = this.txt_processNo;
+            this.layoutControlItem2.Location = new System.Drawing.Point(414, 102);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 2;
+            this.layoutControlItem2.OptionsTableLayoutItem.RowIndex = 3;
+            this.layoutControlItem2.Size = new System.Drawing.Size(207, 34);
+            this.layoutControlItem2.Text = "涓婃姤宸ュ簭";
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(75, 18);
+            // 
+            // layoutControlItem3
+            // 
+            this.layoutControlItem3.Control = this.txt_createBy;
+            this.layoutControlItem3.Location = new System.Drawing.Point(621, 102);
+            this.layoutControlItem3.Name = "layoutControlItem3";
+            this.layoutControlItem3.OptionsTableLayoutItem.ColumnIndex = 3;
+            this.layoutControlItem3.OptionsTableLayoutItem.RowIndex = 3;
+            this.layoutControlItem3.Size = new System.Drawing.Size(208, 34);
+            this.layoutControlItem3.Text = "涓婃姤鍛樺伐";
+            this.layoutControlItem3.TextSize = new System.Drawing.Size(75, 18);
+            // 
+            // layoutControlItem6
+            // 
+            this.layoutControlItem6.Control = this.txt_barCode;
+            this.layoutControlItem6.Location = new System.Drawing.Point(0, 34);
+            this.layoutControlItem6.Name = "layoutControlItem6";
+            this.layoutControlItem6.OptionsTableLayoutItem.ColumnSpan = 2;
+            this.layoutControlItem6.OptionsTableLayoutItem.RowIndex = 1;
+            this.layoutControlItem6.Size = new System.Drawing.Size(414, 34);
+            this.layoutControlItem6.Text = "褰撳墠杩芥函鐮�";
+            this.layoutControlItem6.TextSize = new System.Drawing.Size(75, 18);
+            // 
+            // layoutControlItem16
+            // 
+            this.layoutControlItem16.Control = this.txt_badDescription;
+            this.layoutControlItem16.Location = new System.Drawing.Point(0, 102);
+            this.layoutControlItem16.Name = "layoutControlItem16";
+            this.layoutControlItem16.OptionsTableLayoutItem.ColumnSpan = 2;
+            this.layoutControlItem16.OptionsTableLayoutItem.RowIndex = 3;
+            this.layoutControlItem16.OptionsTableLayoutItem.RowSpan = 2;
+            this.layoutControlItem16.Size = new System.Drawing.Size(414, 68);
+            this.layoutControlItem16.Text = "涓嶈壇鎻忚堪";
+            this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem16.TextVisible = false;
+            // 
+            // layoutControlItem18
+            // 
+            this.layoutControlItem18.Control = this.txt_repairMethd;
+            this.layoutControlItem18.Location = new System.Drawing.Point(414, 136);
+            this.layoutControlItem18.Name = "layoutControlItem18";
+            this.layoutControlItem18.OptionsTableLayoutItem.ColumnIndex = 2;
+            this.layoutControlItem18.OptionsTableLayoutItem.ColumnSpan = 2;
+            this.layoutControlItem18.OptionsTableLayoutItem.RowIndex = 4;
+            this.layoutControlItem18.OptionsTableLayoutItem.RowSpan = 3;
+            this.layoutControlItem18.Size = new System.Drawing.Size(415, 104);
+            this.layoutControlItem18.Text = "涓嶈壇瀵圭瓥";
+            this.layoutControlItem18.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem18.TextVisible = false;
+            // 
+            // layoutControlItem11
+            // 
+            this.layoutControlItem11.Control = this.txt_itemModel;
+            this.layoutControlItem11.Location = new System.Drawing.Point(414, 68);
+            this.layoutControlItem11.Name = "layoutControlItem11";
+            this.layoutControlItem11.OptionsTableLayoutItem.ColumnIndex = 2;
+            this.layoutControlItem11.OptionsTableLayoutItem.ColumnSpan = 2;
+            this.layoutControlItem11.OptionsTableLayoutItem.RowIndex = 2;
+            this.layoutControlItem11.Size = new System.Drawing.Size(415, 34);
+            this.layoutControlItem11.Text = "浜у搧瑙勬牸";
+            this.layoutControlItem11.TextSize = new System.Drawing.Size(75, 18);
+            // 
+            // layoutControlItem7
+            // 
+            this.layoutControlItem7.Control = this.txt_itemNo;
+            this.layoutControlItem7.Location = new System.Drawing.Point(414, 34);
+            this.layoutControlItem7.Name = "layoutControlItem7";
+            this.layoutControlItem7.OptionsTableLayoutItem.ColumnIndex = 2;
+            this.layoutControlItem7.OptionsTableLayoutItem.RowIndex = 1;
+            this.layoutControlItem7.Size = new System.Drawing.Size(207, 34);
+            this.layoutControlItem7.Text = "浜у搧缂栫爜";
+            this.layoutControlItem7.TextSize = new System.Drawing.Size(75, 18);
+            // 
+            // layoutControlItem10
+            // 
+            this.layoutControlItem10.Control = this.txt_itemName;
+            this.layoutControlItem10.Location = new System.Drawing.Point(621, 34);
+            this.layoutControlItem10.Name = "layoutControlItem10";
+            this.layoutControlItem10.OptionsTableLayoutItem.ColumnIndex = 3;
+            this.layoutControlItem10.OptionsTableLayoutItem.RowIndex = 1;
+            this.layoutControlItem10.Size = new System.Drawing.Size(208, 34);
+            this.layoutControlItem10.Text = "浜у搧鍚嶇О";
+            this.layoutControlItem10.TextSize = new System.Drawing.Size(75, 18);
             // 
             // panel5
             // 
@@ -1387,140 +1521,6 @@
             this.gridColumn25.VisibleIndex = 12;
             this.gridColumn25.Width = 94;
             // 
-            // layoutControlItem1
-            // 
-            this.layoutControlItem1.Control = this.txt_gdbh;
-            this.layoutControlItem1.Location = new System.Drawing.Point(0, 68);
-            this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 2;
-            this.layoutControlItem1.Size = new System.Drawing.Size(207, 34);
-            this.layoutControlItem1.Text = "宸ュ崟缂栧彿";
-            this.layoutControlItem1.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // layoutControlItem13
-            // 
-            this.layoutControlItem13.Control = this.txt_sjXt;
-            this.layoutControlItem13.Location = new System.Drawing.Point(207, 68);
-            this.layoutControlItem13.Name = "layoutControlItem13";
-            this.layoutControlItem13.OptionsTableLayoutItem.ColumnIndex = 1;
-            this.layoutControlItem13.OptionsTableLayoutItem.RowIndex = 2;
-            this.layoutControlItem13.Size = new System.Drawing.Size(207, 34);
-            this.layoutControlItem13.Text = "鐢熶骇绾垮埆";
-            this.layoutControlItem13.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // layoutControlItem2
-            // 
-            this.layoutControlItem2.Control = this.txt_processNo;
-            this.layoutControlItem2.Location = new System.Drawing.Point(414, 102);
-            this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 2;
-            this.layoutControlItem2.OptionsTableLayoutItem.RowIndex = 3;
-            this.layoutControlItem2.Size = new System.Drawing.Size(207, 34);
-            this.layoutControlItem2.Text = "涓婃姤宸ュ簭";
-            this.layoutControlItem2.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // layoutControlItem3
-            // 
-            this.layoutControlItem3.Control = this.txt_createBy;
-            this.layoutControlItem3.Location = new System.Drawing.Point(621, 102);
-            this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.OptionsTableLayoutItem.ColumnIndex = 3;
-            this.layoutControlItem3.OptionsTableLayoutItem.RowIndex = 3;
-            this.layoutControlItem3.Size = new System.Drawing.Size(208, 34);
-            this.layoutControlItem3.Text = "涓婃姤鍛樺伐";
-            this.layoutControlItem3.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // txt_barCode
-            // 
-            this.txt_barCode.Location = new System.Drawing.Point(99, 46);
-            this.txt_barCode.Name = "txt_barCode";
-            this.txt_barCode.Properties.ReadOnly = true;
-            this.txt_barCode.Size = new System.Drawing.Size(323, 24);
-            this.txt_barCode.StyleController = this.layoutMx1;
-            this.txt_barCode.TabIndex = 27;
-            // 
-            // layoutControlItem6
-            // 
-            this.layoutControlItem6.Control = this.txt_barCode;
-            this.layoutControlItem6.Location = new System.Drawing.Point(0, 34);
-            this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.OptionsTableLayoutItem.ColumnSpan = 2;
-            this.layoutControlItem6.OptionsTableLayoutItem.RowIndex = 1;
-            this.layoutControlItem6.Size = new System.Drawing.Size(414, 34);
-            this.layoutControlItem6.Text = "褰撳墠杩芥函鐮�";
-            this.layoutControlItem6.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // layoutControlItem16
-            // 
-            this.layoutControlItem16.Control = this.txt_badDescription;
-            this.layoutControlItem16.Location = new System.Drawing.Point(0, 102);
-            this.layoutControlItem16.Name = "layoutControlItem16";
-            this.layoutControlItem16.OptionsTableLayoutItem.ColumnSpan = 2;
-            this.layoutControlItem16.OptionsTableLayoutItem.RowIndex = 3;
-            this.layoutControlItem16.OptionsTableLayoutItem.RowSpan = 2;
-            this.layoutControlItem16.Size = new System.Drawing.Size(414, 68);
-            this.layoutControlItem16.Text = "涓嶈壇鎻忚堪";
-            this.layoutControlItem16.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem16.TextVisible = false;
-            // 
-            // layoutControlItem18
-            // 
-            this.layoutControlItem18.Control = this.txt_repairMethd;
-            this.layoutControlItem18.Location = new System.Drawing.Point(414, 136);
-            this.layoutControlItem18.Name = "layoutControlItem18";
-            this.layoutControlItem18.OptionsTableLayoutItem.ColumnIndex = 2;
-            this.layoutControlItem18.OptionsTableLayoutItem.ColumnSpan = 2;
-            this.layoutControlItem18.OptionsTableLayoutItem.RowIndex = 4;
-            this.layoutControlItem18.OptionsTableLayoutItem.RowSpan = 3;
-            this.layoutControlItem18.Size = new System.Drawing.Size(415, 104);
-            this.layoutControlItem18.Text = "涓嶈壇瀵圭瓥";
-            this.layoutControlItem18.TextSize = new System.Drawing.Size(0, 0);
-            this.layoutControlItem18.TextVisible = false;
-            // 
-            // layoutControlItem11
-            // 
-            this.layoutControlItem11.Control = this.txt_itemModel;
-            this.layoutControlItem11.Location = new System.Drawing.Point(414, 68);
-            this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.OptionsTableLayoutItem.ColumnIndex = 2;
-            this.layoutControlItem11.OptionsTableLayoutItem.ColumnSpan = 2;
-            this.layoutControlItem11.OptionsTableLayoutItem.RowIndex = 2;
-            this.layoutControlItem11.Size = new System.Drawing.Size(415, 34);
-            this.layoutControlItem11.Text = "浜у搧瑙勬牸";
-            this.layoutControlItem11.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // layoutControlItem7
-            // 
-            this.layoutControlItem7.Control = this.txt_itemNo;
-            this.layoutControlItem7.Location = new System.Drawing.Point(414, 34);
-            this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.OptionsTableLayoutItem.ColumnIndex = 2;
-            this.layoutControlItem7.OptionsTableLayoutItem.RowIndex = 1;
-            this.layoutControlItem7.Size = new System.Drawing.Size(207, 34);
-            this.layoutControlItem7.Text = "浜у搧缂栫爜";
-            this.layoutControlItem7.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // layoutControlItem10
-            // 
-            this.layoutControlItem10.Control = this.txt_itemName;
-            this.layoutControlItem10.Location = new System.Drawing.Point(621, 34);
-            this.layoutControlItem10.Name = "layoutControlItem10";
-            this.layoutControlItem10.OptionsTableLayoutItem.ColumnIndex = 3;
-            this.layoutControlItem10.OptionsTableLayoutItem.RowIndex = 1;
-            this.layoutControlItem10.Size = new System.Drawing.Size(208, 34);
-            this.layoutControlItem10.Text = "浜у搧鍚嶇О";
-            this.layoutControlItem10.TextSize = new System.Drawing.Size(75, 18);
-            // 
-            // gridColumn3
-            // 
-            this.gridColumn3.Caption = "淇悊鐘舵��";
-            this.gridColumn3.FieldName = "repairResult";
-            this.gridColumn3.MinWidth = 25;
-            this.gridColumn3.Name = "gridColumn3";
-            this.gridColumn3.Visible = true;
-            this.gridColumn3.VisibleIndex = 10;
-            this.gridColumn3.Width = 94;
-            // 
             // Frm_Repair
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -1567,12 +1567,23 @@
             ((System.ComponentModel.ISupportInitialize)(this.txt_sjXt.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txt_yjDate.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txt_sjDate.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txt_barCode.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem15)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
             this.panel5.ResumeLayout(false);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
@@ -1590,17 +1601,6 @@
             this.tabMxPage1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txt_barCode.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem16)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem18)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
             this.ResumeLayout(false);
 
         }
diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.cs
index 7bcd22d..f3ce19c 100644
--- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Repair.cs
@@ -49,7 +49,6 @@
             };
             btnBad.Click += (s, e) =>
             {
-
                 getModel(lbGuid.Text.Trim(), txt_badDescription.TextTxt, txt_repairReson.TextTxt.Trim(), txt_repairMethd.TextTxt.Trim(), badTag);
             };
         }
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 8037a34..67b3d33 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -2196,8 +2196,6 @@
                 txt_iCount_1.ReadOnly = true;
         }
 
-
-
         #region 鑷畾涔夎繘搴︽潯鍒�
 
         /// <summary>
@@ -2292,7 +2290,6 @@
         // private GridColumn checkBoxColumn = null;
         public static void CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e)
         {
-
             Rectangle checkBoxColumnHeaderRect = new Rectangle(51, 1, 37, 57);
             if (e.Column != null && e.Column.AbsoluteIndex == 0)
             {
@@ -2336,10 +2333,26 @@
                     else
                     {
                         checkBoxColumn.Tag = "1";
+                        /********2025-07-23淇ˉ杩囨护bug 鏁呮敞閲� beg ************/
+                        //foreach (DataRow row in _Table.Rows)
+                        //{
+                        //    row["chkInt"] = true;
+                        //}
+                        /********2025-07-23淇ˉ杩囨护bug 鏁呮敞閲� end ************/
+                        /********2025-07-23淇ˉ杩囨护bug beg ************/
+                        System.Collections.IList ftRow = gridView1.DataController.GetAllFilteredAndSortedRows();
+                        System.Collections.ArrayList ftAry = new System.Collections.ArrayList();
+                        foreach (System.Data.DataRowView _ft in ftRow)
+                        {
+                            string guid = _ft["guid"].ToString();
+                            ftAry.Add(guid);
+                        }
                         foreach (DataRow row in _Table.Rows)
                         {
-                            row["chkInt"] = true;
+                            if (ftAry.Contains(row["guid"].ToString()))
+                                row["chkInt"] = true;
                         }
+                        /********2025-07-23淇ˉ杩囨护bug end ************/
                     }
                     gcMain.BindingContext = new BindingContext();
                     gcMain.DataSource = _Table;
@@ -2352,7 +2365,6 @@
             }
         }
         #endregion
-
 
         //璇诲彇榛樿缁勭粐
         public static string GetFirstOrg(UserControl.UcLookOrg txt_erpSczz)
diff --git a/DevApp/Gs.DevApp/XtraForm1.Designer.cs b/DevApp/Gs.DevApp/XtraForm1.Designer.cs
index 4849e5e..df355c2 100644
--- a/DevApp/Gs.DevApp/XtraForm1.Designer.cs
+++ b/DevApp/Gs.DevApp/XtraForm1.Designer.cs
@@ -28,94 +28,105 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
             this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton();
             this.richTextBox1 = new System.Windows.Forms.RichTextBox();
-            this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton();
-            this.buttonEdit1 = new DevExpress.XtraEditors.ButtonEdit();
-            this.toggleSwitch1 = new DevExpress.XtraEditors.ToggleSwitch();
-            ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitch1.Properties)).BeginInit();
+            this.txtGs = new DevExpress.XtraEditors.TextEdit();
+            this.labelControl1 = new DevExpress.XtraEditors.LabelControl();
+            this.label1 = new System.Windows.Forms.Label();
+            this.txt_slaveAddress = new DevExpress.XtraEditors.ComboBoxEdit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtGs.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txt_slaveAddress.Properties)).BeginInit();
             this.SuspendLayout();
-            // 
-            // simpleButton1
-            // 
-            this.simpleButton1.Location = new System.Drawing.Point(57, 107);
-            this.simpleButton1.Name = "simpleButton1";
-            this.simpleButton1.Size = new System.Drawing.Size(94, 29);
-            this.simpleButton1.TabIndex = 0;
-            this.simpleButton1.Text = "鐢垫鏁版嵁";
-         
             // 
             // simpleButton2
             // 
-            this.simpleButton2.Location = new System.Drawing.Point(57, 173);
+            this.simpleButton2.Location = new System.Drawing.Point(313, 34);
             this.simpleButton2.Name = "simpleButton2";
-            this.simpleButton2.Size = new System.Drawing.Size(94, 29);
+            this.simpleButton2.Size = new System.Drawing.Size(201, 29);
             this.simpleButton2.TabIndex = 1;
-            this.simpleButton2.Text = "姘存鏁版嵁";
+            this.simpleButton2.Text = "纭畾璇诲彇姘存鎬绘暟鎹�";
             this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click);
             // 
             // richTextBox1
             // 
-            this.richTextBox1.Location = new System.Drawing.Point(57, 227);
+            this.richTextBox1.Location = new System.Drawing.Point(57, 74);
             this.richTextBox1.Name = "richTextBox1";
-            this.richTextBox1.Size = new System.Drawing.Size(740, 240);
+            this.richTextBox1.Size = new System.Drawing.Size(740, 377);
             this.richTextBox1.TabIndex = 2;
             this.richTextBox1.Text = "";
             // 
-            // simpleButton3
+            // txtGs
             // 
-            this.simpleButton3.Location = new System.Drawing.Point(471, 85);
-            this.simpleButton3.Name = "simpleButton3";
-            this.simpleButton3.Size = new System.Drawing.Size(94, 29);
-            this.simpleButton3.TabIndex = 3;
-            this.simpleButton3.Text = "simpleButton3";
+            this.txtGs.Location = new System.Drawing.Point(153, 37);
+            this.txtGs.Name = "txtGs";
+            this.txtGs.Size = new System.Drawing.Size(125, 24);
+            this.txtGs.TabIndex = 3;
             // 
-            // buttonEdit1
+            // labelControl1
             // 
-            this.buttonEdit1.Location = new System.Drawing.Point(312, 147);
-            this.buttonEdit1.Name = "buttonEdit1";
-            this.buttonEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton()});
-            this.buttonEdit1.Size = new System.Drawing.Size(125, 24);
-            this.buttonEdit1.TabIndex = 4;
+            this.labelControl1.Location = new System.Drawing.Point(57, 40);
+            this.labelControl1.Name = "labelControl1";
+            this.labelControl1.Size = new System.Drawing.Size(90, 18);
+            this.labelControl1.TabIndex = 4;
+            this.labelControl1.Text = "瀵勫瓨鍣ㄤ釜鏁帮細";
             // 
-            // toggleSwitch1
+            // label1
             // 
-            this.toggleSwitch1.Location = new System.Drawing.Point(293, 13);
-            this.toggleSwitch1.Name = "toggleSwitch1";
-            this.toggleSwitch1.Properties.OffText = "Off";
-            this.toggleSwitch1.Properties.OnText = "On";
-            this.toggleSwitch1.Size = new System.Drawing.Size(288, 24);
-            this.toggleSwitch1.TabIndex = 5;
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(57, 13);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(68, 18);
+            this.label1.TabIndex = 5;
+            this.label1.Text = "姘存鍦板潃";
+            // 
+            // txt_slaveAddress
+            // 
+            this.txt_slaveAddress.Location = new System.Drawing.Point(153, 5);
+            this.txt_slaveAddress.Name = "txt_slaveAddress";
+            this.txt_slaveAddress.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txt_slaveAddress.Properties.Items.AddRange(new object[] {
+            "0",
+            "10",
+            "20",
+            "30",
+            "40",
+            "50",
+            "60",
+            "70",
+            "80",
+            "90",
+            "100",
+            "110"});
+            this.txt_slaveAddress.Size = new System.Drawing.Size(125, 24);
+            this.txt_slaveAddress.TabIndex = 6;
             // 
             // XtraForm1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(887, 659);
-            this.Controls.Add(this.toggleSwitch1);
-            this.Controls.Add(this.buttonEdit1);
-            this.Controls.Add(this.simpleButton3);
+            this.Controls.Add(this.txt_slaveAddress);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.labelControl1);
+            this.Controls.Add(this.txtGs);
             this.Controls.Add(this.richTextBox1);
             this.Controls.Add(this.simpleButton2);
-            this.Controls.Add(this.simpleButton1);
             this.Name = "XtraForm1";
             this.Text = "XtraForm1";
-            ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.toggleSwitch1.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtGs.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txt_slaveAddress.Properties)).EndInit();
             this.ResumeLayout(false);
+            this.PerformLayout();
 
         }
 
         #endregion
-
-        private DevExpress.XtraEditors.SimpleButton simpleButton1;
         private DevExpress.XtraEditors.SimpleButton simpleButton2;
         private System.Windows.Forms.RichTextBox richTextBox1;
-        private DevExpress.XtraEditors.SimpleButton simpleButton3;
-        private DevExpress.XtraEditors.ButtonEdit buttonEdit1;
-        private DevExpress.XtraEditors.ToggleSwitch toggleSwitch1;
+        private DevExpress.XtraEditors.TextEdit txtGs;
+        private DevExpress.XtraEditors.LabelControl labelControl1;
+        private System.Windows.Forms.Label label1;
+        private DevExpress.XtraEditors.ComboBoxEdit txt_slaveAddress;
     }
 }
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/XtraForm1.cs b/DevApp/Gs.DevApp/XtraForm1.cs
index b78e750..bc9910d 100644
--- a/DevApp/Gs.DevApp/XtraForm1.cs
+++ b/DevApp/Gs.DevApp/XtraForm1.cs
@@ -16,13 +16,6 @@
 
         }
 
-       
-        /// <summary>
-        /// 姘存
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-
         private void simpleButton2_Click(object sender, EventArgs e)
         {
             string strCsl1 = "";
@@ -39,73 +32,89 @@
             try//姘存鍙栨暟锛屽悗闈㈣ˉ鍏�
             {
                 System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
+                System.Text.StringBuilder sbFj = new System.Text.StringBuilder();
+                string hx = "\r\n";
                 string hostname = "192.168.60.51";
                 ModbusFactory modbusFactory = new ModbusFactory();
                 IModbusMaster master = modbusFactory.CreateMaster(new TcpClient(hostname, 502));
                 master.Transport.ReadTimeout = 10000;
                 master.Transport.Retries = 10000;
-                DataTable dt = new DataTable();
+
                 //鍙傛暟(鍒嗗埆涓轰粠绔欏湴鍧�,璧峰鍦板潃,闀垮害)
-                byte slaveAddress = byte.Parse(1.ToString());
+                byte slaveAddress = byte.Parse(txt_slaveAddress.SelectedText.Trim());
                 ushort numberOfPoints = ushort.Parse("1");
                 float fsw = 0;
-                DataTable dt1 = new DataTable();
+
+                //妯″紡1鍑烘按閲�
                 ushort[] csl1 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(32.ToString()), numberOfPoints);
                 strCsl1 = csl1[0].ToString();
-
+                sbFj.Append("妯″紡1鍑烘按閲�:" + strCsl1 + hx);
+                //妯″紡1姘存俯
                 ushort[] sw1 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(31.ToString()), numberOfPoints);
                 strSw1 = (float.Parse(sw1[0].ToString()) / 10).ToString();
-
+                sbFj.Append("妯″紡1姘存俯:" + strSw1 + hx);
+                //妯″紡2鍑烘按閲�
                 ushort[] csl2 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(34.ToString()), numberOfPoints);
                 strCsl2 = csl2[0].ToString();
-
+                sbFj.Append("妯″紡2鍑烘按閲�:" + strCsl2 + hx);
+                //妯″紡2姘存俯
                 ushort[] sw2 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(33.ToString()), numberOfPoints);
                 strSw2 = (float.Parse(sw2[0].ToString()) / 10).ToString();
-
+                sbFj.Append("妯″紡2姘存俯:" + strSw2 + hx);
+                //妯″紡3鍑烘按閲�
                 ushort[] csl3 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(36.ToString()), numberOfPoints);
                 strCsl3 = csl3[0].ToString();
-
+                sbFj.Append("妯″紡3鍑烘按閲�:" + strCsl3 + hx);
+                //妯″紡3姘存俯
                 ushort[] sw3 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(35.ToString()), numberOfPoints);
                 strSw3 = (float.Parse(sw3[0].ToString()) / 10).ToString();
-
+                sbFj.Append("妯″紡3姘存俯:" + strSw3 + hx);
+                //妯″紡4鍑烘按閲�
                 ushort[] csl4 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(38.ToString()), numberOfPoints);
                 strCsl4 = csl4[0].ToString();
-
+                sbFj.Append("妯″紡4鍑烘按閲�:" + strCsl4 + hx);
+                //妯″紡4姘存俯
                 ushort[] sw4 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(37.ToString()), numberOfPoints);
                 strSw4 = (float.Parse(sw4[0].ToString()) / 10).ToString();
-
+                sbFj.Append("妯″紡4姘存俯:" + strSw4 + hx);
+                //妯″紡5鍑烘按閲�
                 ushort[] csl5 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(40.ToString()), numberOfPoints);
                 strCsl5 = csl5[0].ToString();
-
+                sbFj.Append("妯″紡5鍑烘按閲�:" + strCsl5 + hx);
+                //妯″紡5姘存俯
                 ushort[] sw5 = master.ReadHoldingRegisters(slaveAddress, ushort.Parse(39.ToString()), numberOfPoints);
                 strSw5 = (float.Parse(sw5[0].ToString()) / 10).ToString();
-
+                sbFj.Append("妯″紡5姘存俯:" + strSw5 + hx);
+                //缁撴灉
                 bool[] sjjg = master.ReadCoils(slaveAddress, ushort.Parse(77.ToString()), numberOfPoints);
                 SJJG = sjjg[0].ToString();
+                sbFj.Append("缁撴灉:" + SJJG + hx);
                 ///////////////////
-                ///
 
-                // 3. 璇诲彇浠庣珯璁惧鐨勫瘎瀛樺櫒
+                // 3. 璇诲彇浠庣珯璁惧鐨勫瘎瀛樺櫒short锛堟棤绗﹀彿鐭暣鍨嬶級鏄竴绉嶆暟鎹被鍨嬶紝鐢ㄤ簬琛ㄧず16浣嶆棤绗﹀彿鏁存暟锛屽叾鍙栧�艰寖鍥翠粠0鍒�65,535
                 ushort startAddress = 0;   // 瀵勫瓨鍣ㄨ捣濮嬪湴鍧�
-                ushort numRegisters = 125;  // 璇诲彇 10 涓瘎瀛樺櫒
+                ushort numRegisters = ushort.Parse(txtGs.Text.Trim());  // 璇诲彇 10 涓瘎瀛樺櫒
                 try
                 {
                     // 璇诲彇淇濇寔瀵勫瓨鍣紙浠庣珯鍦板潃涓� 1锛�
+                    // 鍙傛暟(鍒嗗埆涓轰粠绔欏湴鍧�,璧峰鍦板潃,闀垮害)
                     ushort[] registers = master.ReadHoldingRegisters(1, startAddress, numRegisters);
                     // 杈撳嚭缁撴灉
                     Console.WriteLine("璇诲彇鍒扮殑瀵勫瓨鍣ㄥ�硷細");
+                    stringBuilder.Append("鎬诲瓧鑺備覆锛�");
                     foreach (var register in registers)
                     {
                         Console.WriteLine(register);
-                        stringBuilder.Append(register.ToString());
+                        stringBuilder.Append(register);
                     }
+                    stringBuilder.Append(hx + "瑙f瀽缁撴灉锛�" + hx);
+                    stringBuilder.Append(sbFj);
                     richTextBox1.Text = stringBuilder.ToString();
                 }
                 catch (Exception ex)
                 {
                     Console.WriteLine($"璇诲彇閿欒: {ex.Message}");
                 }
-
             }
             catch (Exception ex)
             {
@@ -113,7 +122,6 @@
                 //txtGWM.EditValue = "";
                 return;
             }
-
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3