From e6a7247a28acc148d8f4099ab4b02064e808d11f Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 17 十二月 2024 11:10:20 +0800
Subject: [PATCH] 打印

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs |   67 ++++++++++++++++++++++++++++-----
 1 files changed, 56 insertions(+), 11 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
index 5eae8dc..29dd963 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
@@ -28,9 +28,9 @@
             this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
-            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
+            
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "");
             getPageList(1);
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1, picCheckBox, this, "status", "");
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             txt_itemId.EditChanged += (s, e) =>
             {
@@ -147,7 +147,6 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
         {
-
             if (xtraTabControl1.SelectedTabPageIndex == 1)
                 getModel(lbGuid.Text.Trim(), false, 999);
             else
@@ -326,11 +325,7 @@
         /// <exception cref="NotImplementedException"></exception>
         private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
         {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_itemNo, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
+            _toolCk(0);
         }
 
         /// <summary>
@@ -340,11 +335,61 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
         {
+            _toolCk(1);
+        }
+
+        /// <summary>
+        /// 宸ュ叿鏉′簨浠�
+        /// </summary>
+        /// <param name="inFieldValue"></param>
+        private void _toolCk(int _inFieldValue)
+        {
+            string strMsg = "";
+            switch (_inFieldValue)
+            {
+                case 1:
+                    strMsg = "瀹℃牳";
+                    break;
+                case 0:
+                    strMsg = "鍙嶅鏍�";
+                    break;
+            };
             toolBarMenu1.guidKey = "";
             string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_itemNo, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemName");
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
+                return;
+
+            var _obj = new
+            {
+                guid = rowGuid,
+                ckValue = _inFieldValue,
+                parameter = "MES_QA_MJ,CHECK_DATE,STATUS,CHECK_USER"
+            };
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("", "General/GeneralCheck",
+                    JsonConvert.SerializeObject(_obj));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
+                if (_rtn.rtnCode > 0)
+                {
+                    if (xtraTabControl1.SelectedTabPageIndex == 1)
+                        getModel(lbGuid.Text.Trim(), false, 999);
+                    else
+                        getPageList(1);
+                }
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3