From aa64d5ff0554624339d504f926e955c0ce339b0b Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期一, 14 七月 2025 17:38:29 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs |   78 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 74 insertions(+), 4 deletions(-)

diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index 0d5a642..306e26f 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -55,10 +55,10 @@
         /// <summary>
         /// http璇锋眰
         /// </summary>
-        /// <param name="url"></param>
-        /// <param name="meth"></param>
-        /// <param name="param"></param>
-        /// <param name="isLoading"></param>
+        /// <param name="url">api鏍瑰湴鍧�</param>
+        /// <param name="meth">鏂规硶鍚嶇О</param>
+        /// <param name="param">json鍙傛暟</param>
+        /// <param name="isLoading">鏄惁loading</param>
         /// <returns></returns>
         public static string HttpPost(string url, string meth, string param, bool isLoading = true)
         {
@@ -163,6 +163,7 @@
             gc.BindingContext = new BindingContext();
             gc.DataSource = dt;
             gc.ForceInitialize();
+            gv.BestFitColumns();
         }
 
         /// <summary>
@@ -450,6 +451,15 @@
                                         break;
                                 }
                             txt.Enabled = !isEdt;
+                            continue;
+                        }
+                        //澶氶��
+                        if (colType is RadioGroup)
+                        {
+                            var txt = colType as RadioGroup;
+                            if (txt != null)
+                                txt.SelectedIndex =int.Parse( strVal);
+                            txt.ReadOnly = isEdt;
                             continue;
                         }
                         //鏃堕棿
@@ -746,6 +756,15 @@
                         txt.ReadOnly = isEdt;
                     continue;
                 }
+                //澶氶��
+                if (ctrl is RadioGroup)
+                {
+                    var txt = ctrl as RadioGroup;
+                    if (txt != null)
+                        txt.SelectedIndex = 0;
+                    txt.ReadOnly = isEdt;
+                    continue;
+                }
                 //鏃堕棿
                 if (ctrl is DateTimePicker)
                 {
@@ -1003,6 +1022,13 @@
                 if (ctrl is NumericUpDown)
                 {
                     var txt = ctrl as NumericUpDown;
+                    txt.ReadOnly = isEdt;
+                    continue;
+                }
+                //澶氶��
+                if (ctrl is RadioGroup)
+                {
+                    var txt = ctrl as RadioGroup;
                     txt.ReadOnly = isEdt;
                     continue;
                 }
@@ -2329,6 +2355,32 @@
             }
         }
         #endregion
+
+
+        //璇诲彇榛樿缁勭粐
+        public static string GetFirstOrg(UserControl.UcLookOrg txt_erpSczz)
+        {
+            string userGuid = LoginInfoModel.CurrentUser.LoginUserGuid;
+            var pgq = new PageQueryModel(1, 999999, "FID", "asc", userGuid, " and IS_STATUS=1");
+            var json = JsonConvert.SerializeObject(pgq);
+            try
+            {
+                var strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json);
+                var _obj = UtilityHelper.ReturnToDynamic(strReturn);
+                string _extendText = _obj.rtnData.extendText;
+                string[] _dftOrg = _extendText.Split(',');
+                if (_dftOrg.Length > 0)
+                {
+                    txt_erpSczz.SetIdOrCode(_dftOrg[0].Trim());
+                    return _dftOrg[0].Trim();
+                }
+                return "";
+            }
+            catch (Exception ex)
+            {
+                return "";
+            }
+        }
     }
 
     /// <summary>
@@ -2401,4 +2453,22 @@
 
         public string fileType { get; set; }
     }
+
+
+    public enum QcSeason
+    {
+        iqc,
+        ipqc宸℃,
+        ipqc棣栨,
+        fqc,
+        鐢熶骇閫�鏂欏叆搴撴,
+        鍏跺畠鍏ュ簱妫�,
+        閿�鍞��璐у叆搴撴,
+        瓒呮湡妫�,
+        cqcjyes,//閲嶆鏂规
+        cqcjno,//閲嶆鏂规
+    }
+
+
+
 }
\ No newline at end of file

--
Gitblit v1.9.3