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/Rpt/CKTmkc.cs |   85 ++++++++++++++++++++++++++++++++++++++----
 1 files changed, 77 insertions(+), 8 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.cs
index ad1a9d5..90f3627 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.cs
@@ -1,14 +1,14 @@
-using Gs.DevApp.Entity;
-using Gs.DevApp.ToolBox;
-using Gs.DevApp.UserControl;
-using Newtonsoft.Json;
 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;
 
-namespace Gs.DevApp.DevFrm
+namespace Gs.DevApp.DevFrm.Rpt
 {
     public partial class CKTmkc : DevExpress.XtraEditors.XtraForm
     {
@@ -22,16 +22,25 @@
             this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", (value) =>
             {
-
+                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
             });
             Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
             {
+                getModel(value);
             }, (value) =>
             {
                 getPageList(this.pageBar1.CurrentPage);
-            });
+            },lbGuid);
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
+
+
+            //杩欐槸浠撳簱鏍囪瘑鍗★紝浠呬粎鎵撳嵃
+            this.ucBtnPrint101.SetPlButton(false);
+            this.ucBtnPrint101.btnPrintClick += (s, e) =>
+            {
+                _print101();
+            };
         }
         private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
@@ -108,7 +117,6 @@
                         gcMain1.DataSource = dt;
                         gcMain1.ForceInitialize();
                         gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
-
                     }
                     else
                         UtilityHelper.SetDefaultTable(gcMain1, gridView1);
@@ -127,5 +135,66 @@
                 ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
+
+        private void getModel(string strGuid)
+        {
+            bool isEdit = false;
+            if (toolBarMenu1.currentAction == "add") return;
+            if (toolBarMenu1.currentAction == "edit") isEdit = true;
+            if (string.IsNullOrEmpty(strGuid))
+            {
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            var _obj = new
+            {
+                guid = strGuid //涓诲缓
+            };
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("",
+                    _webServiceName + "GetModel",
+                    JsonConvert.SerializeObject(_obj));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                if (_rtn.rtnCode > 0)
+                {
+                    var dy = _rtn.rtnData;
+                    lbGuid.Text = strGuid;
+                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
+                }
+                else
+                {
+                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                }
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 杩欐槸浠撳簱
+        /// </summary>
+        private void _print101()
+        {
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_itemBarcode, gridView1);
+            ucBtnPrint101.guidKey = rowGuid;
+            if (rowGuid.Length < 36)
+            {
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浣犺鎵撳嵃鐨勮锛�");
+                this.ucBtnPrint101.rptParameter = "return false";
+                return;
+            }
+            this.ucBtnPrint101.rptParameter = "rpt_cktm{"
+                   + ""
+                   + "," + ""
+                   + "," + ""
+                   + "," + ""
+                   + "," + ""
+                   + "}";
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3