From cd5483b6c38111f9b45cd39b8201cc1ceb847e48 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 05 三月 2025 09:22:44 +0800
Subject: [PATCH] 委外退料版面

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs |   42 +++++++++++++++++++++++++++++-------------
 1 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
index 2dbb895..04d1019 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
@@ -58,12 +58,15 @@
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick;
+            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+            gvList.Add(gridView1);
+            Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", "", (value) =>
-            {
-                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
-            });
+           {
+               Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+           });
             Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
             {
                 getModel(value);
@@ -89,16 +92,25 @@
         {
             string rowGuid, rowName;
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_sampleSizeNo, gridView1);
+                lbGuid, txt_sampleSizeNo, gridView1, "sampleSizeNo");
             try
             {
                 string strJson = UtilityHelper.HttpPost("", _webServiceName + "Approval", JsonConvert.SerializeObject(rowGuid));
                 ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
                 if (_rtn.rtnCode > 0)
                 {
-                    getPageList(this.pageBar1.CurrentPage);
+                    if (xtraTabControl1.SelectedTabPageIndex == 1)
+                    {
+                        getModel(lbGuid.Text.Trim());
+                    }
+                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+                    gridView1.FocusedRowHandle = rowHandle;
+                    gridView1.SetFocusedRowCellValue("ftwoChecked", true);
+                    gridView1.SetFocusedRowCellValue("isenabled", true);
+                    gridView1.SetFocusedRowCellValue("ftwoCheckor", "宸叉壒鍑�");
+                    gridView1.SetFocusedRowCellValue("ftwoCheckdate", DateTime.Now.ToString());
                 }
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
@@ -126,7 +138,7 @@
         {
             _toolCk(1);
         }
-       
+
         /// <summary>
         /// 鍒嗛〉浜嬩欢
         /// </summary>
@@ -178,7 +190,7 @@
         private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
         {
             string rowGuid = "", rowName = "";
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1);
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1, "sampleSizeNo");
             if (string.IsNullOrEmpty(rowGuid))
             {
                 ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -250,7 +262,8 @@
             {
                 getModel(rowGuid);
             }
-            else {
+            else
+            {
                 List<GridView> gridViews = new List<GridView>();
                 gridViews.Add(gvMx1);
                 gridViews.Add(gvMx2);
@@ -270,7 +283,7 @@
             gridViews.Add(gvMx1);
             gridViews.Add(gvMx2);
             UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
-             UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+            UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
             UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
             txt_createDate.Text = DateTime.Now.ToString("G");
             txt_fversion.Text = "1";
@@ -412,6 +425,7 @@
                         gridViews.Add(gvMx1);
                         gridViews.Add(gvMx2);
                         UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gridViews);
+                        toolBarMenu1.currentAction = "";
                     }
                 }
                 catch (Exception ex)
@@ -424,7 +438,7 @@
 
                 ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
-          
+
         }
 
         /// <summary>
@@ -660,9 +674,11 @@
                 if (_rtn.rtnCode > 0)
                 {
                     if (xtraTabControl1.SelectedTabPageIndex == 1)
+                    {
                         getModel(lbGuid.Text.Trim());
-                    else
-                        getPageList(this.pageBar1.CurrentPage);
+                    }
+                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+                    gridView1.FocusedRowHandle = rowHandle;
                     UtilityHelper.SetCheckIco(gridView1, "foneChecked", "foneCheckor", "foneCheckdate", picCheckBox, this, _inFieldValue.ToString());
                 }
             }

--
Gitblit v1.9.3