From 8114becd3aa125191bf0ed06cb8b17379b5757aa Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期五, 12 十二月 2025 13:38:48 +0800
Subject: [PATCH] 其它入库单据类型改为可维护

---
 DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs |   77 +++++++++++++++++++++++++++++++++-----
 1 files changed, 67 insertions(+), 10 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
index b3460b0..ee181f8 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) =>
@@ -195,11 +195,12 @@
             };
             #endregion
 
+          
             #region 2025-08-27 澧炲姞濮斿渚涘簲鍟�
-            txt_qtlx.SelectedIndexChanged += (s, e) =>
+            txt_qtlx.ChangedEvent += (s, e) =>
             {
                 int idx = txt_qtlx.SelectedIndex;
-                if (idx == 7)
+                if (idx == 6)
                 {
                     layItemWwgys.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
                 }
@@ -210,7 +211,46 @@
                 }
             };
             #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>
         /// 鏉ユ簮鏄庣粏闄愬埗锛�
@@ -457,13 +497,13 @@
             string inHzlx = ucLookHuoZhu1.GetHzLx();//璐т富绫诲瀷
             string inHz = ucLookHuoZhu1.GetHzId();//璐т富
             string inRkyy = txt_qt010.Text.Trim();//鍘熷洜
-            string inDjlx = txt_qt019.Text.Trim();//鍗曟嵁绫诲瀷
+            string inDjlx = txt_qt019.TextTxt.Trim();//鍗曟嵁绫诲瀷
            // string inLyOrg = txt_qt024.GetId();//棰嗙敤缁勭粐
             string inLyOrg = inOrgId;//棰嗙敤缁勭粐绛変簬搴撳瓨缁勭粐
             string inLyCus = txt_qt013.GetId();//棰嗙敤瀹㈡埛
             string inLyDepart = txt_qt009.GetId();//棰嗙敤閮ㄩ棬
             string inKcfx = txt_qt020.Text.Trim();//搴撳瓨鏂瑰悜
-            string qtlx = txt_qtlx.Text.Trim();//鍚庢潵澧炲姞鐨勭被鍨�
+            string qtlx = txt_qtlx.TextTxt.Trim();//鍚庢潵澧炲姞鐨勭被鍨�
             string wwgys = txt_wwgys.GetId();
             if (string.IsNullOrEmpty(inOrgId))
             {
@@ -481,20 +521,26 @@
                 Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璐т富锛�");
                 return;
             }
+            if (inDjlx.Length <= 0)
+            {
+                MsgHelper.ShowError("璇烽�夋嫨閫�鍗曟嵁绫诲瀷锛�");
+                txt_qt019.Focus();
+                return;
+            }
             //if (string.IsNullOrEmpty(inLyOrg))
             //{
             //    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨棰嗙敤缁勭粐锛�");
             //    txt_qt024.Focus();
             //    return;
             //}
-            if (txt_qtlx.SelectedIndex <= 0)
+            if (qtlx.Length <= 0)
             {
                 Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍑哄簱绫诲瀷锛�");
                 txt_qtlx.Focus();
                 return;
             }
             //杩欐槸闈炲澶栫殑闃插憜
-            if (txt_qtlx.SelectedIndex != 7)
+            if (txt_qtlx.SelectedIndex != 6)
             {
                 if (string.IsNullOrEmpty(inLyCus) && string.IsNullOrEmpty(inLyDepart))
                 {
@@ -508,7 +554,7 @@
                 }
             }
             //杩欐槸濮斿鐨勯槻鍛�
-            if (txt_qtlx.SelectedIndex == 7)
+            if (txt_qtlx.SelectedIndex == 6)
             {
                 if (string.IsNullOrEmpty(wwgys))
                 {
@@ -722,7 +768,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 +876,9 @@
                 case 0:
                     strMsg = "鍙嶅鏍�";
                     break;
+                case 2:
+                    strMsg = "瀹岀粨";
+                    break;
                 case 20:
                     strMsg = "鍞悗瀹℃牳";
                     break;
@@ -879,7 +937,6 @@
                         int rowHandle = gridView1.LocateByValue("guid", rowGuid);
                         gridView1.FocusedRowHandle = rowHandle;
                     }
-
                 }
                 else
                     MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());

--
Gitblit v1.9.3