From be94e54dc7cd0eb2e66f25d7def9a873c563564c Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 10 一月 2025 09:53:30 +0800
Subject: [PATCH] 细节

---
 DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs |   65 +++++++++++++++-----------------
 1 files changed, 31 insertions(+), 34 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
index c1a178e..e77afd7 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womdaa.cs
@@ -27,9 +27,9 @@
             this.toolBarMenu1.btnTzblClick += ToolBarMenu1_btnTzblClick;
             this.toolBarMenu1.btnKgClick += ToolBarMenu1_btnKgClick;
             this.toolBarMenu1.btnWgClick += ToolBarMenu1_btnWgClick;
-            toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
-            toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
+            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
@@ -44,8 +44,15 @@
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             txt_sjXt.getSuppler("");
+            this.ucBtnPrint1.btnDesignClick += (s, e) =>
+            {
+                ucBtnPrint1.rptParameter = "rpt_daa{}";
+            };
+            this.ucBtnPrint1.btnReportClick += (s, e) =>
+            {
+                _print();
+            };
         }
-
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
             _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
@@ -116,7 +123,19 @@
         {
             _toolCk(8);
         }
-
+        /// <summary>
+        /// 鏃ュ織
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_daa001, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
         /// <summary>
         /// 鍙栨秷浜嬩欢
         /// </summary>
@@ -124,7 +143,7 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
         {
-            UtilityHelper.JumpToTab(xtraTabControl1, 0);
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
         }
 
         /// <summary>
@@ -269,6 +288,7 @@
                     lbGuid.Text = strGuid;
                     List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                     gvList.Add(gvMx1);
+                    gvList.Add(gvMx2);
                     UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
                     JObject _job = JObject.Parse(strJson);
                     JArray array = new JArray();
@@ -293,7 +313,7 @@
                         array2.Add(a);
                     }
                     DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString());
-                    if (dt.Rows.Count > 0)
+                    if (dt2.Rows.Count > 0)
                     {
                         gcMx2.BindingContext = new BindingContext();
                         gcMx2.DataSource = dt2;
@@ -312,21 +332,6 @@
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
         }
-
-        private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e)
-        {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_daa001, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
-            toolBarMenu1.rptParameter = "rpt_daa{}";
-        }
-        private void ToolBarMenu1_btnReportClick(object sender, EventArgs e)
-        {
-            _print();
-        }
-
 
         /// <summary>
         /// 宸ュ叿鏉′簨浠�
@@ -402,41 +407,33 @@
             }
         }
 
-
         private void _print()
         {
-            toolBarMenu1.guidKey = "";
             string rowGuid, rowName;
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                 lbGuid, txt_daa001, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
-            if (xtraTabControl1.SelectedTabPageIndex == 0)
-            {
-                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 5);
-                this.toolBarMenu1.rptParameter = "return false";
-                return;
-            }
+            ucBtnPrint1.guidKey = rowGuid;
             if (rowGuid.Length < 36)
             {
                 Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浣犺鎵撳嵃鐨勮锛�");
-                this.toolBarMenu1.rptParameter = "return false";
+                this.ucBtnPrint1.rptParameter = "return false";
                 return;
             }
             if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
             {
                 Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜寮犳暟锛�");
                 txt_iCount_1.Focus();
-                this.toolBarMenu1.rptParameter = "return false";
+                this.ucBtnPrint1.rptParameter = "return false";
                 return;
             }
             if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
             {
                 Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
                 txt_psnQty_1.Focus();
-                this.toolBarMenu1.rptParameter = "return false";
+                this.ucBtnPrint1.rptParameter = "return false";
                 return;
             }
-            this.toolBarMenu1.rptParameter = "rpt_daa{" + ""
+            this.ucBtnPrint1.rptParameter = "rpt_daa{" + ""
                    + "," + txt_printRemark.Text.Trim()
                    + "," + ""
                    + "," + txt_iCount_1.Text.Trim()

--
Gitblit v1.9.3