From 8366fcbfed5c66fa1fab4f6dba964a3451c24091 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期五, 12 九月 2025 16:26:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs |   41 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
index e1f8649..911f17c 100644
--- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs
@@ -1,15 +1,15 @@
-using Gs.DevApp.Entity;
-using Gs.DevApp.ToolBox;
-using Gs.DevApp.UserControl;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
 using System.Data;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using Gs.DevApp.Entity;
+using Gs.DevApp.ToolBox;
+using Gs.DevApp.UserControl;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 
-namespace Gs.DevApp.DevFrm
+namespace Gs.DevApp.DevFrm.Ck
 {
     public partial class Frm_MesCgthSq : DevExpress.XtraEditors.XtraForm
     {
@@ -30,6 +30,7 @@
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+            toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick;
             this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "", (value) =>
@@ -174,6 +175,27 @@
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                 lbGuid, txt_billNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
+        }
+        private void ToolBarMenu1_btnPrintClick(object sender, EventArgs e)
+        {
+            //guidKey, rptParameter
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_billNo, gridView1, "billNo");
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            this.toolBarMenu1.rptParameter = "rpt_CGTH{"
+                                               + ""
+                                               + "," + ""
+                                               + "," + ""
+                                               + "," + ""
+                                               + "," + ""
+                                               + "}";
+            this.toolBarMenu1.guidKey = rowGuid;
+
         }
         /// <summary>
         /// 鍒嗛〉浜嬩欢
@@ -737,6 +759,9 @@
             var rowhandle = gvMx1.FocusedRowHandle;
             if (rowhandle < 0)
                 return;
+            var dr = gvMx1.GetDataRow(rowhandle);
+            var strItemId = dr["itemId"].ToString();
+
             var strOrgGuid = txt_thOrgId.GetId();
             if (string.IsNullOrEmpty(strOrgGuid))
             {
@@ -744,13 +769,15 @@
                 return;
             }
             ;
-            SelectCk frm = new SelectCk(strOrgGuid);
+            SelectCk frm = new SelectCk(strOrgGuid, strItemId);
             frm.UpdateParent += (ss, ee) =>
             {
                 var lst = new List<dynamic>();
                 lst = ee.DynamicList;
                 gvMx1.SetFocusedRowCellValue("depotName", lst[0].name);
                 gvMx1.SetFocusedRowCellValue("depotId", lst[0].guid);
+                gvMx1.SetFocusedRowCellValue("kcQty", lst[0].kcQty);
+                gvMx1.BestFitColumns();
             };
             frm.ShowDialog();
         }

--
Gitblit v1.9.3