From 73370e94530afffd9608481e74e6bd5e55c4f69f Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 10 十月 2025 11:07:11 +0800
Subject: [PATCH] 调拨向下复制

---
 DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs |   44 +++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
index 48daa38..065f19c 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
@@ -123,6 +123,7 @@
                                 //榛樿浠撳簱鍜屼粨搴撴暟閲�
                                 _row["dcCk"] = dym.depotName;
                                 _row["dcCkGuid"] = dym.depotId;
+                                _row["kcQty"] = dym.kcQty;
                                 if (!string.IsNullOrEmpty(_orgId))
                                 {
                                     _row["dcOrg"] = _orgName;
@@ -155,6 +156,40 @@
                 {
                     Gs.DevApp.ToolBox.MsgHelper.ShowError("鎵句笉鍒皒lsCopy.xls鏂囦欢锛岃鑱旂郴绠$悊鍛橈紒");
                 }
+            };
+            #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["drCkGuid"];
+                var hourValue2 = currentRow["drCk"];
+                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["drCkGuid"] = hourValue;
+                        row["drCk"] = hourValue2;
+                    }
+                }
+                gvMx1.RefreshData();
             };
             #endregion
         }
@@ -679,8 +714,8 @@
                         getModel(lbGuid.Text.Trim());
                         int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                         gridView1.FocusedRowHandle = rowHandle;
-                        if (_inFieldValue <= 1) 
-                        UtilityHelper.SetCheckIco(gridView1, "chkStatus", "FAPPROVEBY", "FAPPROVEDATE", picCheckBox, this, _inFieldValue.ToString());
+                        if (_inFieldValue <= 1)
+                            UtilityHelper.SetCheckIco(gridView1, "chkStatus", "FAPPROVEBY", "FAPPROVEDATE", picCheckBox, this, _inFieldValue.ToString());
                     }
                     else
                     {
@@ -714,10 +749,9 @@
             gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString());
             gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"].ToString());
             gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
-
             gvMx1.SetFocusedRowCellValue("dcCk", SelectedDataRow["depotName"]);
             gvMx1.SetFocusedRowCellValue("dcCkGuid", SelectedDataRow["depotId"]);
-
+            gvMx1.SetFocusedRowCellValue("kcQty", SelectedDataRow["kcQty"]);
             gvMx1.CloseEditor();
             gvMx1.PostEditor();
             gvMx1.UpdateCurrentRow();
@@ -762,7 +796,7 @@
                         getModel(lbGuid.Text);
                     }
                     else
-                    MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+                        MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
                 }
                 catch (Exception ex)
                 {

--
Gitblit v1.9.3