From 71663cce25f3f2a6687a1fdb3e666896e144d2e3 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期五, 28 十一月 2025 13:43:58 +0800
Subject: [PATCH] 其它出库增加向下复制功能

---
 DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
index b3460b0..b4a358a 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
@@ -1,4 +1,3 @@
-using DevExpress.XtraCharts.GLGraphics.Platform;
 using DevExpress.XtraEditors;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
@@ -43,6 +42,7 @@
             toolBarMenu1.btnCaiWuChkClick += ToolBarMenu1_btnCaiWuChkClick;
             toolBarMenu1.btnCaiWuFchkClick += ToolBarMenu1_btnCaiWuFchkClick;
             toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick;
+            toolBarMenu1.btnWjClick += ToolBarMenu1_btnWjClick;
             this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "isChk", "", (value) =>
@@ -210,7 +210,45 @@
                 }
             };
             #endregion
+
+            #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
         }
+
+
 
         /// <summary>
         /// 鏉ユ簮鏄庣粏闄愬埗锛�
@@ -722,7 +760,16 @@
             }
         }
 
-
+        /// <summary>
+        /// 瀹岀粨
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void ToolBarMenu1_btnWjClick(object sender, EventArgs e)
+        {
+            _toolCk(2);
+        }
         /// <summary>
         ///     瀹℃牳浜嬩欢
         /// </summary>
@@ -821,6 +868,9 @@
                 case 0:
                     strMsg = "鍙嶅鏍�";
                     break;
+                case 2:
+                    strMsg = "瀹岀粨";
+                    break;
                 case 20:
                     strMsg = "鍞悗瀹℃牳";
                     break;
@@ -879,7 +929,6 @@
                         int rowHandle = gridView1.LocateByValue("guid", rowGuid);
                         gridView1.FocusedRowHandle = rowHandle;
                     }
-
                 }
                 else
                     MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());

--
Gitblit v1.9.3