From 1708934e25d663104182867b4c238a0c1531352f Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期五, 28 十一月 2025 13:44:10 +0800
Subject: [PATCH] Merge branch 'master' of http://git.gs-mes.com:8080/r/~tjx/GsMesClient

---
 DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs |   68 ++++++++++++++++++++++++++++-----
 1 files changed, 57 insertions(+), 11 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs b/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs
index 8aacf17..87f9925 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/SelectItemTbl.cs
@@ -1,4 +1,5 @@
-锘縰sing Gs.DevApp.ToolBox;
+锘縰sing DevExpress.XtraEditors;
+using Gs.DevApp.ToolBox;
 using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
@@ -11,25 +12,70 @@
     {
         private readonly string _webServiceName = "MesItemTblManager/";
         private string daaGuid = "";
+        //鍕鹃�夋搴�
+        Dictionary<string, int> ageDict = new Dictionary<string, int>();
+
         public SelectItemTbl(string _daaGuid)
         {
             InitializeComponent();
+            #region  鍕鹃��
+            this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); };
+            this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gridView1); };
+            this.colChkInt.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
+            this.colChkInt.OptionsFilter.AllowAutoFilter = false;
+            this.colChkInt.OptionsFilter.AllowFilter = false;
+            this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False;
+            this.colChkInt.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left;
+            this.colChkInt.VisibleIndex = 0;
+            #endregion
+
+
+            #region 鍕鹃�夋搴�2025-11-24
+            this.gridView1.CellValueChanged += (s, e) =>
+            {
+                var row = gridView1.GetDataRow(e.RowHandle);
+                var mxGuid = row["guid"].ToString();
+                bool isChecked = (bool)e.Value;
+                int dicCount = ageDict.Count + 1;
+                if (isChecked)
+                {
+                    ageDict.Add(mxGuid, dicCount); // 娣诲姞鏂伴敭鍊煎
+                }
+            };
+            #endregion
+
             this.daaGuid = _daaGuid;
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false);
             getPageList(1);
             btnIn.Click += (s, e) =>
             {
-                var list = new List<string>();
-                int[] rows = this.gridView1.GetSelectedRows();//鍏堣幏鍙栭�夋嫨琛岀殑琛屽彿
-                DataTable dt = this.gcMain.DataSource as DataTable;//寰楀埌GridControl鐨勬暟鎹簮
-                foreach (int idx in rows)
+                gridView1.PostEditor();
+                gridView1.UpdateCurrentRow();
+                var list = new List<dynamic>();
+                DataTable dt = this.gcMain.DataSource as DataTable;
                 {
-                    string _guid = dt.Rows[idx]["dabGuid"].ToString();
-                    list.Add(_guid);
+                    foreach (DataRow dr in dt.Rows)
+                    {
+                        string checkBox = dr["chkInt"].ToString();
+                        string _guid = dr["guid"].ToString();
+                        int _idx = 0;
+                        // 瀹夊叏鑾峰彇锛堟帹鑽愶級
+                        if (ageDict.TryGetValue(_guid, out _idx))
+                        {
+                        }
+                        else
+                            _idx = 0;
+                        if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox))
+                        {
+                            list.Add(new
+                            {
+                                guid = _guid,
+                                index = _idx
+                            });
+                        }
+                    }
                 }
-                UpdateParent?.Invoke(this,
-                    new UpdateParentEventArgs { StringList = list });
-                Close();
+                UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list }); Close();
             };
         }
 
@@ -38,7 +84,7 @@
         /// </summary>
         public event EventHandler<UpdateParentEventArgs> UpdateParent;
 
-       
+
 
         /// <summary>
         /// </summary>

--
Gitblit v1.9.3