From 855d6d0e62af450f66e8a4ebcd06415f5a6814f1 Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期三, 10 十二月 2025 23:18:04 +0800
Subject: [PATCH] Merge branch 'master' of http://43.142.96.171:8080/r/~kyy/LB_MesClient

---
 DevApp/Gs.DevApp/DevFrm/WOM/Frm_MesScrksqDj.cs |  171 ++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 121 insertions(+), 50 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_MesScrksqDj.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_MesScrksqDj.cs
index fc2bda6..7ca78b6 100644
--- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_MesScrksqDj.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_MesScrksqDj.cs
@@ -23,10 +23,16 @@
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
-            toolBarMenu1.btnChbgClick += ToolBarMenu1_btnChbgClick;
+            //toolBarMenu1.btnChbgClick += ToolBarMenu1_btnChbgClick;
             this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+            }, tips, true, (strGuid) => {
+                getModelList(strGuid);
+            });
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
@@ -109,10 +115,10 @@
         /// </summary>
         /// <param name="sender"></param>
         /// <param name="e"></param>
-        private void ToolBarMenu1_btnChbgClick(object sender, EventArgs e)
-        {
-            _toolChbg(1);
-        }
+        //private void ToolBarMenu1_btnChbgClick(object sender, EventArgs e)
+        //{
+        //    _toolChbg(1);
+        //}
 
         /// <summary>
         ///     鍙嶅鏍�
@@ -265,6 +271,71 @@
             }
         }
 
+        private void getModelList(string strGuid)
+        {
+            gcMxL1.DataSource = null;
+            gcMxL2.DataSource = null;
+
+            var _obj = new
+            {
+                guid = strGuid,//涓诲缓
+            };
+            try
+            {
+                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                if (_rtn.rtnCode > 0)
+                {
+                    dynamic dy = _rtn.rtnData;
+
+                    JArray array1 = new JArray();
+                    foreach (var a in dy["list"])
+                    {
+                        array1.Add(a);
+                    }
+                    DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(array1.ToString());
+                    if (dt1.Rows.Count > 0)
+                    {
+                        gcMxL1.BindingContext = new BindingContext();
+                        gcMxL1.DataSource = dt1;
+                        gcMxL1.ForceInitialize();
+                        gvMxL1.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMxL1);
+                    }
+                    else
+                    {
+                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMxL1, gvMxL1);
+                    }
+                    JArray array2 = new JArray();
+                    foreach (var a in dy["list2"])
+                    {
+                        array2.Add(a);
+                    }
+
+                    DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString());
+                    if (dt2.Rows.Count > 0)
+                    {
+                        gcMxL2.BindingContext = new BindingContext();
+                        gcMxL2.DataSource = dt2;
+                        gcMxL2.ForceInitialize();
+                        gvMxL2.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMxL2);
+                    }
+                    else
+                    {
+                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMxL2, gvMxL2);
+                    }
+
+                }
+                else
+                    ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+
         /// <summary>
         /// 
         /// </summary>
@@ -311,51 +382,51 @@
         }
 
 
-        /// <summary>
-        /// 
-        /// </summary>
-        /// <param name="inFieldValue"></param>
-        private void _toolChbg(int _inFieldValue)
-        {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_billNo, gridView1, "billNo");
-            toolBarMenu1.guidKey = rowGuid;
-            if (string.IsNullOrEmpty(rowGuid))
-            {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
-                return;
-            }
-            if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
-                return;
-            var _obj = new
-            {
-                guid = rowGuid,
-                billNo= rowName,
-                inFieldValue = _inFieldValue
-            };
-            try
-            {
-                var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelChbg", JsonConvert.SerializeObject(_obj));
-                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
-                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
-                {
-                    if (xtraTabControl1.SelectedTabPageIndex == 1)
-                    {
-                        getModel(lbGuid.Text.Trim());
-                    }
-                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
-                    gridView1.FocusedRowHandle = rowHandle;
-                    //UtilityHelper.SetCheckIco(gridView1, "checkStatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString());
-                }
-            }
-                catch (Exception ex)
-            {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
-            }
-        }
+        ///// <summary>
+        ///// 
+        ///// </summary>
+        ///// <param name="inFieldValue"></param>
+        //private void _toolChbg(int _inFieldValue)
+        //{
+        //    toolBarMenu1.guidKey = "";
+        //    string rowGuid, rowName;
+        //    (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+        //        lbGuid, txt_billNo, gridView1, "billNo");
+        //    toolBarMenu1.guidKey = rowGuid;
+        //    if (string.IsNullOrEmpty(rowGuid))
+        //    {
+        //        MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+        //        return;
+        //    }
+        //    if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
+        //        return;
+        //    var _obj = new
+        //    {
+        //        guid = rowGuid,
+        //        billNo= rowName,
+        //        inFieldValue = _inFieldValue
+        //    };
+        //    try
+        //    {
+        //        var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelChbg", JsonConvert.SerializeObject(_obj));
+        //        var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+        //        MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
+        //        if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
+        //        {
+        //            if (xtraTabControl1.SelectedTabPageIndex == 1)
+        //            {
+        //                getModel(lbGuid.Text.Trim());
+        //            }
+        //            int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+        //            gridView1.FocusedRowHandle = rowHandle;
+        //            //UtilityHelper.SetCheckIco(gridView1, "checkStatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString());
+        //        }
+        //    }
+        //        catch (Exception ex)
+        //    {
+        //        MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+        //    }
+        //}
 
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3