From 90d604f8b95e816860f6fc9d07bccd9b4ff63508 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 02 十二月 2024 18:07:15 +0800
Subject: [PATCH] 出库业务

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 50 insertions(+), 6 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
index 7678abf..ef8533e 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
@@ -4,8 +4,10 @@
 using System.Drawing;
 using System.Text;
 using System.Windows.Forms;
+using DevExpress.RichEdit.Export;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
+using DevExpress.XtraGrid.Views.Base.ViewInfo;
 using DevExpress.XtraGrid.Views.Grid;
 using Gs.DevApp.DevFrm.QC.Models;
 using Gs.DevApp.Entity;
@@ -27,7 +29,13 @@
             toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
             toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
             toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
+            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
+            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
+            gridView1.FocusedRowChanged += (s, e) =>
+            {
+                UtilityHelper.SetCheckIco(s, picCheckBox, this, "checkStatus", "");
+            };
             getPageList(1, UtilityHelper.GetPageSize());
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             gridView1.CustomDrawRowIndicator += (s, e) =>
@@ -69,7 +77,34 @@
         {
             getPageList(curPage, pageSize);
         }
+        /// <summary>
+        ///     鍙嶅鏍�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_lookupTypeCode, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
 
+        /// <summary>
+        ///     瀹℃牳浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_lookupTypeCode, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
         /// <summary>
         ///     鍙栨秷浜嬩欢
         /// </summary>
@@ -87,8 +122,10 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
         {
-            UtilityHelper.JumpToTab(xtraTabControl1, 0);
-            getPageList(1, UtilityHelper.GetPageSize());
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+                getModel(lbGuid.Text.Trim(), false, 999);
+            else
+                getPageList(1, UtilityHelper.GetPageSize());
         }
 
         /// <summary>
@@ -106,7 +143,6 @@
                 MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
-
             getModel(rowGuid, true, 1);
         }
 
@@ -124,7 +160,6 @@
                 txt_lookupTypeCode.Focus();
                 return;
             }
-
             gvMx1.CloseEditor();
             gvMx1.UpdateCurrentRow();
             var lst = new List<MesSysLookups>();
@@ -159,8 +194,10 @@
                 {
                     lbGuid.Text = _rtn.rtnData;
                     toolBarMenu1.isSetBtn = true;
-                    UtilityHelper.ChangeEnableByControl(panel1.Controls,
-                        false);
+                    var gridViews = new List<GridView>();
+                    gridViews.Add(gvMx1);
+                    UtilityHelper.ChangeEnableByControl(panel1.Controls, false,
+                        gridViews);
                 }
             }
             catch (Exception ex)
@@ -270,6 +307,8 @@
         private void repositoryItemButtonEdit1_ButtonClick(object sender,
             ButtonPressedEventArgs e)
         {
+            gvMx1.CloseEditor();
+            gvMx1.UpdateCurrentRow();
             var rowhandle = gvMx1.FocusedRowHandle;
             if (rowhandle < 0)
                 return;
@@ -279,6 +318,11 @@
                 var mxGuid = dr["guid"].ToString();
                 if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
                     return;
+                if (string.IsNullOrEmpty(mxGuid))
+                {
+                    gvMx1.DeleteRow(rowhandle);
+                    return;
+                }
                 var strJson = "";
                 var lst = new List<string>();
                 lst.Add(mxGuid);

--
Gitblit v1.9.3