From ce701f953bd952bf8303ccb93520a8a3af33860e Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期四, 21 八月 2025 13:45:42 +0800
Subject: [PATCH] iqc称重

---
 DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs |  133 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 111 insertions(+), 22 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
index 1ca35cd..26e02be 100644
--- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -3,8 +3,10 @@
 using DevExpress.XtraGrid;
 using DevExpress.XtraGrid.Views.Grid;
 using DevExpress.XtraLayout;
+using Gs.DevApp.DevFrm.QC;
 using Gs.DevApp.DevFrm.Rpt;
 using Gs.DevApp.DevFrm.Sys;
+using Gs.DevApp.DevFrm.Work;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Newtonsoft.Json;
@@ -56,6 +58,12 @@
             btnCaiWuFchk.ItemClick += BtnCaiWuFchk_ItemClick;
             btnShouHouChk.ItemClick += BtnShouHouChk_ItemClick;
             btnShouHouFchk.ItemClick += BtnShouHouFchk_ItemClick;
+            btnAll.ItemClick += BtnAll_ItemClick;
+            btnGongZi.ItemClick += BtnGongZi_ItemClick;
+            btnLianBan.ItemClick += BtnLianBan_ItemClick;
+            btnGx.ItemClick += BtnGx_ItemClick;
+            btnWeight.ItemClick += BtnWeight_ItemClick;
+            btnBaoGao.ItemClick += BtnBaoGao_ItemClick;
             var lst = new List<string>();
             foreach (BarItem item in barManager1.Items)
                 if (item is BarLargeButtonItem largeButtonItem)
@@ -64,7 +72,36 @@
             actions = lst;
         }
 
-    
+
+
+        /// <summary>
+        /// 鍚姩绉伴噸
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void BtnWeight_ItemClick(object sender, ItemClickEventArgs e)
+        {
+            bool isOpen = false;
+            foreach (Form form in Application.OpenForms)
+            {
+                if (form is WeightIqc)
+                {
+                    isOpen = true;
+                    //form.Activate(); // 婵�娲诲凡瀛樺湪鐨勭獥浣�
+                    //form.MaximizeBox = true;
+                    //form.TopMost = true;
+                    MsgHelper.ShowInformation("宸茬粡鎵撳紑浜嗭紝璇峰嬁閲嶅鎵撳紑锛�");
+                    break;
+                }
+            }
+            if (!isOpen)
+            {
+                var form = new WeightIqc();
+                form.Show();
+            }
+        }
+
         /// <summary>
         ///     鍒濆鍖栨寜閽姸鎬�
         /// </summary>
@@ -109,7 +146,7 @@
             }
             return false;
         }
-       
+
         private void BtnCaiGouFchk_ItemClick(object sender, ItemClickEventArgs e)
         {
             if (btnCaiGouFchkClick != null)
@@ -144,7 +181,7 @@
             if (btnShouHouChkClick != null)
                 btnShouHouChkClick(this, e);
         }
-       
+
         private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e)
         {
             bool bl = _isCk(0);
@@ -228,9 +265,10 @@
                 strType = xlsInService.Split('&')[1];
                 strService = xlsInService.Split('&')[0];
             }
-            else {
-                 strType = "";
-                 strService = xlsInService;
+            else
+            {
+                strType = "";
+                strService = xlsInService;
             }
             //杩欐槸涓�涓殢鏈哄�硷紝灏嗕細琚綋浣滅埗浜瞘uid瀛樺埌file琛ㄤ腑锛屾湇鍔$鏍规嵁杩欎釜guid璇诲彇鐩稿簲鐨勬枃浠�
             string upGuid = Guid.NewGuid().ToString();
@@ -252,7 +290,7 @@
                 }
                 catch (Exception ex)
                 {
-                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                    MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
                 }
             };
             frm.ShowDialog();
@@ -360,6 +398,33 @@
             if (btnQueryClick != null) btnQueryClick(this, e);
         }
 
+        private void BtnAll_ItemClick(object sender, ItemClickEventArgs e)
+        {
+            if (btnAllClick != null)
+                btnAllClick(this, e);
+        }
+
+        private void BtnLianBan_ItemClick(object sender, ItemClickEventArgs e)
+        {
+            if (btnLianBanClick != null)
+                btnLianBanClick(this, e);
+        }
+
+        private void BtnGongZi_ItemClick(object sender, ItemClickEventArgs e)
+        {
+            if (btnGongZiClick != null)
+                btnGongZiClick(this, e);
+        }
+        private void BtnGx_ItemClick(object sender, ItemClickEventArgs e)
+        {
+            if (btnGxClick != null)
+                btnGxClick(this, e);
+        }
+        private void BtnBaoGao_ItemClick(object sender, ItemClickEventArgs e)
+        {
+            if (btnBaoGaoClick != null)
+                btnBaoGaoClick(this, e);
+        }
         /// <summary>
         /// 鍙栨秷鏃讹紝杩樺師鎸夐挳鍙敤鎬�
         /// </summary>
@@ -397,6 +462,11 @@
                 lst.Add(btnCaiGouFchk.Name);
                 lst.Add(btnShouHouChk.Name);
                 lst.Add(btnShouHouFchk.Name);
+                lst.Add(btnGongZi.Name);
+                lst.Add(btnLianBan.Name);
+                // lst.Add(btnEsc.Name);
+                lst.Add(btnGx.Name);
+                lst.Add(btnWeight.Name);
                 _enabledBtn(lst);
                 this.currentAction = "esc";
                 if (btnEscClick != null) btnEscClick(this, e);
@@ -443,10 +513,15 @@
                     lst.Add(btnCaiGouFchk.Name);
                     lst.Add(btnShouHouChk.Name);
                     lst.Add(btnShouHouFchk.Name);
+                    lst.Add(btnIn.Name);
+                    lst.Add(btnOut.Name);
+                    lst.Add(btnGongZi.Name);
+                    lst.Add(btnLianBan.Name);
+                    // lst.Add(btnEsc.Name);
+                    lst.Add(btnGx.Name);
+                    lst.Add(btnWeight.Name);
                     _enabledBtn(lst);
                 }
-
-
             }
         }
 
@@ -469,8 +544,8 @@
             lst.Add(btnHelp.Name);
             lst.Add(btnLayout.Name);
             lst.Add(btnFont.Name);
-            lst.Add(btnFont.Name);
             lst.Add(btnLog.Name);
+            lst.Add(btnWeight.Name);
             _enabledBtn(lst);
             this.currentAction = "edit";
             if (btnEdtClick != null) btnEdtClick(this, e);
@@ -498,6 +573,7 @@
             lst.Add(btnHelp.Name);
             lst.Add(btnLayout.Name);
             lst.Add(btnFont.Name);
+            lst.Add(btnWeight.Name);
             _enabledBtn(lst);
             this.currentAction = "add";
             if (btnAddClick != null) btnAddClick(this, e);
@@ -831,18 +907,6 @@
         /// </summary>
         public event EventHandler btnFChkClick;
 
-
-        /// <summary>
-        ///     妫�楠�
-        /// </summary>
-        public event EventHandler btnJianYanClick;
-
-        /// <summary>
-        ///     鍙嶆楠�
-        /// </summary>
-        public event EventHandler btnFjianYanClick;
-
-
         /// <summary>
         ///    鎵瑰噯
         /// </summary>
@@ -966,6 +1030,31 @@
         /// </summary>
         public event EventHandler btnOutClick;
 
+        /// <summary>
+        /// 鎵归噺璁剧疆
+        /// </summary>
+        public event EventHandler btnAllClick;
+
+        /// <summary>
+        /// 杩炵彮璁剧疆
+        /// </summary>
+        public event EventHandler btnLianBanClick;
+
+
+        /// <summary>
+        /// 璁$畻宸ヨ祫
+        /// </summary>
+        public event EventHandler btnGongZiClick;
+
+        /// <summary>
+        /// 宸ュ簭鍙樻洿
+        /// </summary>
+        public event EventHandler btnGxClick;
+
+        /// <summary>
+        /// 鐢熸垚鎶ュ憡
+        /// </summary>
+        public event EventHandler btnBaoGaoClick;
         #endregion
 
         #region 鍏叡灞炴��

--
Gitblit v1.9.3