From 4b40e0d9657203dd45baa1e6358547f1080491cc Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期二, 02 十二月 2025 16:20:13 +0800
Subject: [PATCH] 采购退货增加向下复制按钮

---
 DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs |   38 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 37 insertions(+), 1 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
index 715f7aa..631638e 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
@@ -159,9 +159,45 @@
             {
                 setSrm();
             };
+
+            #region 2025-10-10 鍚戜笅澶嶅埗beg
+            btnDown.Click += (s, e) =>
+            {
+                // 鑾峰彇褰撳墠閫変腑琛岀殑琛屽彿
+                int focusedRowHandle = gvMx1.FocusedRowHandle;
+                if (focusedRowHandle < 0) return;
+
+                // 鑾峰彇褰撳墠琛岀殑鏃堕暱
+                DataRow currentRow = gvMx1.GetDataRow(focusedRowHandle);
+                if (currentRow == null) return;
+                var hourValue = currentRow["depotId"];
+                var hourValue2 = currentRow["depotName"];
+                if (hourValue == null || string.IsNullOrEmpty(hourValue.ToString()))
+                {
+                    MsgHelper.ShowError("褰撳墠閫変腑鐨勮鏃犱粨搴擄紝澶嶅埗澶辫触锛�");
+                    return;
+                }
+                if (hourValue2 == null)
+                {
+                    MsgHelper.ShowError("褰撳墠閫変腑鐨勮鏃犱粨搴擄紝澶嶅埗澶辫触锛�");
+                    return;
+                }
+                // 鎵归噺璁剧疆涓嬮潰鎵�鏈夎鐨勬椂闀�
+                for (int i = focusedRowHandle + 1; i < gvMx1.DataRowCount; i++)
+                {
+                    var row = gvMx1.GetDataRow(i);
+                    if (row != null)
+                    {
+                        row["depotId"] = hourValue;
+                        row["depotName"] = hourValue2;
+                    }
+                }
+                gvMx1.RefreshData();
+            };
+            #endregion
         }
 
-      
+
         private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
             _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);

--
Gitblit v1.9.3