From 4d44c3e74f5872c85ce2eb4453978c7e9176a338 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期六, 09 十一月 2024 18:04:03 +0800
Subject: [PATCH] 11

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs |   90 +++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 82 insertions(+), 8 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
index 34e9695..e21b553 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs
@@ -8,6 +8,7 @@
 using System.Data;
 using System.Drawing;
 using System.Windows.Forms;
+using static DevExpress.XtraPrinting.Native.PageSizeInfo;
 
 namespace Gs.DevApp.DevFrm.QC
 {
@@ -114,6 +115,11 @@
                 lbGuid, txt_releaseNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
         }
+        /// <summary>
+        /// 椹冲洖
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolBarMenu1_btnBoHuiClick(object sender, EventArgs e)
         {
             toolBarMenu1.guidKey = "";
@@ -122,6 +128,11 @@
                 lbGuid, txt_releaseNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
         }
+        /// <summary>
+        /// 閲囪喘鍙嶅鏍�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolBarMenu1_btnCaiGouFchkClick(object sender, EventArgs e)
         {
             toolBarMenu1.guidKey = "";
@@ -130,6 +141,11 @@
                 lbGuid, txt_releaseNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
         }
+        /// <summary>
+        /// 閲囪喘瀹℃牳
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolBarMenu1_btnCaiGouChkClick(object sender, EventArgs e)
         {
             toolBarMenu1.guidKey = "";
@@ -138,7 +154,11 @@
                 lbGuid, txt_releaseNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
         }
-
+        /// <summary>
+        /// 璐ㄩ噺鍙嶅鏍�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolBarMenu1_btnZhiLiangFchkClick(object sender, EventArgs e)
         {
             toolBarMenu1.guidKey = "";
@@ -146,8 +166,34 @@
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                 lbGuid, txt_releaseNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
-        }
 
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+
+            if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾璐ㄩ噺瀹℃牳鍚楋紵"))
+                return;
+
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcSubmit11",
+                    JsonConvert.SerializeObject(rowGuid));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+
+                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+        /// <summary>
+        /// 璐ㄩ噺瀹℃牳
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
         private void ToolBarMenu1_btnZhiLiangChkClick(object sender, EventArgs e)
         {
             toolBarMenu1.guidKey = "";
@@ -155,6 +201,28 @@
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                 lbGuid, txt_releaseNo, gridView1);
             toolBarMenu1.guidKey = rowGuid;
+
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+
+            if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾璐ㄩ噺瀹℃牳鍚楋紵"))
+                return;
+
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("", _webServiceName + "IqcQcSubmit",
+                    JsonConvert.SerializeObject(rowGuid));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+
+                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
         }
 
         /// <summary>
@@ -164,8 +232,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>
@@ -211,7 +281,7 @@
             }
             _loading.Stop();
         }
-        private void getModel(string strGuid, bool isEdit, int tabIdx)
+        private async void getModel(string strGuid, bool isEdit, int tabIdx)
         {
             if (string.IsNullOrEmpty(strGuid))
             {
@@ -219,13 +289,14 @@
                 return;
             }
             UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
+            UcLoading _loading = new UcLoading();
             var _obj = new
             {
                 guid = strGuid,//涓诲缓
             };
             try
             {
-                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
+                string strJson = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
                 ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                 if (_rtn.rtnCode > 0)
                 {
@@ -261,6 +332,7 @@
             {
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
+            _loading.Stop();
         }
         /// <summary>
         /// 閫夐」鍗″垏鎹�
@@ -314,8 +386,9 @@
         /// 鏍规嵁妫�楠岄」鐩鍙栨娊鏍风粨鏋� 
         /// </summary>
         /// <param name="guid5"></param>
-        private void getList12(string guid5)
+        private async void getList12(string guid5)
         {
+            UcLoading _loading = new UcLoading();
             var _obj = new
             {
                 parentGuid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
@@ -323,7 +396,7 @@
             };
             try
             {
-                var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModel12", JsonConvert.SerializeObject(_obj));
+                var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetModel12", JsonConvert.SerializeObject(_obj));
                 var dd = UtilityHelper.ReturnToList(strReturn);
                 var dt = dd.rtnData;
                 gcMx2.BindingContext = new BindingContext();
@@ -334,6 +407,7 @@
             {
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
+            _loading.Stop();
         }
         private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
         {

--
Gitblit v1.9.3