From 941f0ab5a6b2e869d064813e25f9186d4662e5d6 Mon Sep 17 00:00:00 2001
From: cnf <3283105747@qq.com>
Date: 星期五, 05 十二月 2025 13:32:21 +0800
Subject: [PATCH] 退料增加直接打印

---
 DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs |   75 +++++++++++++++++++++----------------
 1 files changed, 43 insertions(+), 32 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs
index 4cdb1bf..6344d80 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs
@@ -115,39 +115,14 @@
                 frm.ShowDialog();
             };
             //鎵撳嵃浜嬩欢
+
+            this.ucBtnPrint1.btnZhiJieClick += (s, e) =>
+            {
+                _print(1);
+            };
             this.ucBtnPrint1.btnPrintClick += (s, e) =>
             {
-                string rowGuid = lbMxGuid.Text.Trim();
-                ucBtnPrint1.guidKey = rowGuid;
-                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
-                {
-                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
-                    txt_iCount_1.Focus();
-                    this.ucBtnPrint1.rptParameter = "return false";
-                    return;
-                }
-                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
-                {
-                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
-                    txt_psnQty_1.Focus();
-                    this.ucBtnPrint1.rptParameter = "return false";
-                    return;
-                }
-                if (lbMxGuid.Text.Trim().Length < 10)
-                {
-                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
-                    this.ucBtnPrint1.rptParameter = "return false";
-                    return;
-                }
-                this.ucBtnPrint1.rptParameter = "rpt_SCTL{"
-                       + lbMxGuid.Text.Trim()//鍏宠仈涓婚敭
-                       + "," + ""
-                       + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())//浣欐暟
-                       + "," + txt_iCount_1.Text.Trim()//寮犳暟
-                       + "," + txt_psnQty_1.Text.Trim()//姣忓紶鏉$爜鏁伴噺
-                       + "}";
-                txt_iCount_1.Text = "";
-                txt_psnQty_1.Text = "";
+                _print(0);
             };
             //鎵撳嵃鎵归噺鎿嶄綔浜嬩欢
             this.ucBtnPrint1.btnAllClick += (s, e) =>
@@ -206,6 +181,42 @@
             await Task.Delay(100);
             getPageList(1);
         }
+
+        private void _print(int type)
+        {
+            string rowGuid = lbMxGuid.Text.Trim();
+            ucBtnPrint1.guidKey = rowGuid;
+            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
+                txt_iCount_1.Focus();
+                this.ucBtnPrint1.rptParameter = "return false";
+                return;
+            }
+            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
+                txt_psnQty_1.Focus();
+                this.ucBtnPrint1.rptParameter = "return false";
+                return;
+            }
+            if (lbMxGuid.Text.Trim().Length < 10)
+            {
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
+                this.ucBtnPrint1.rptParameter = "return false";
+                return;
+            }
+            this.ucBtnPrint1.rptParameter = "rpt_SCTL{"
+                   + lbMxGuid.Text.Trim()//鍏宠仈涓婚敭
+                   + "," + ""
+                   + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())//浣欐暟
+                   + "," + txt_iCount_1.Text.Trim()//寮犳暟
+                   + "," + txt_psnQty_1.Text.Trim()//姣忓紶鏉$爜鏁伴噺
+                   + "}";
+            txt_iCount_1.Text = "";
+            txt_psnQty_1.Text = "";
+        }
+
         /// <summary>
         /// 鏃ュ織
         /// </summary>
@@ -835,7 +846,7 @@
                 txtQuantity.Text = row["tld005"].ToString();//鐢宠鎬婚噺
                 txt_yQty.Text = row["ydy"].ToString();//宸叉墦鍗版�婚噺
                 txt_kQty.Text = row["kdy"].ToString();//鍙墦鍗版�婚噺
-                txt_psnQty_1.Text = row["tld005"].ToString(); //榛樿姣忓紶鏉$爜鏁伴噺
+                txt_psnQty_1.Text = row["kdy"].ToString(); //榛樿姣忓紶鏉$爜鏁伴噺
             }
             else
             {

--
Gitblit v1.9.3