From cdca5a70b3fac5f804a6eabb7a3976f8c00e35e8 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 08 四月 2025 16:40:30 +0800
Subject: [PATCH] fqc

---
 DevApp/Gs.DevApp/UserControl/UcLookDaa.cs |   52 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/UcLookDaa.cs b/DevApp/Gs.DevApp/UserControl/UcLookDaa.cs
index 94e319d..50f984f 100644
--- a/DevApp/Gs.DevApp/UserControl/UcLookDaa.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcLookDaa.cs
@@ -22,10 +22,10 @@
             lookSearchSupplier.Properties.NullText = "璇烽�夋嫨";
             lookSearchSupplier.EditValueChanged +=
                 LookSearchSupplier_EditValueChanged;
-            getSuppler();
+           // getSuppler();
         }
 
-        public bool IsReadly { get; set; }
+          private bool _rdy; public bool IsReadly { set{ _rdy = value; this.lookSearchSupplier.ReadOnly = _rdy; } get { return _rdy; } }
 
         /// <summary>
         ///     鏀瑰彉浜嬩欢
@@ -37,10 +37,18 @@
         {
             if (EditChanged != null) EditChanged(this, e);
         }
-
-        private void getSuppler()
+        /// <summary>
+        /// 璇诲彇宸ュ崟
+        /// </summary>
+        /// <param name="orgId"></param>
+        public void getSuppler(string orgId,string _dftVale = "")
         {
-            var pgq = new PageQueryModel(1, 999999, "a.daa001", "asc", "", " and 1=1");
+            lookSearchSupplier.EditValue = null;
+            string _keyWhere = "";
+            if (!string.IsNullOrEmpty(orgId))
+                _keyWhere = " and a.erp_sczz ='" + orgId + "'";
+            var pgq = new PageQueryModel(1, 999999, "a.daa001", "asc", "",
+                " and 1=1" + _keyWhere);
             var json = JsonConvert.SerializeObject(pgq);
             try
             {
@@ -50,6 +58,10 @@
                 lookSearchSupplier.Properties.DataSource = dt;
                 lookSearchSupplier.Properties.DisplayMember = "daa001";
                 lookSearchSupplier.Properties.ValueMember = "guid";
+                lookSearchSupplier.ForceInitialize();
+                lookSearchSupplier.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
+                if (!string.IsNullOrEmpty(_dftVale))
+                    SetIdOrCode(_dftVale);
             }
             catch (Exception ex)
             {
@@ -194,5 +206,35 @@
             }
             return "";
         }
+
+        /// <summary>
+        /// 浠诲姟鍗曞彿
+        /// </summary>
+        /// <returns></returns>
+        public string GetRwd()
+        {
+            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
+            if (row != null)
+            {
+                string id = row["daa021"].ToString();
+                return id;
+            }
+            return "";
+        }
+
+        /// <summary>
+        /// 鎶曟枡鍗曞彿
+        /// </summary>
+        /// <returns></returns>
+        public string GetTldh()
+        {
+            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
+            if (row != null)
+            {
+                string id = row["daa014"].ToString();
+                return id;
+            }
+            return "";
+        }
     }
 }

--
Gitblit v1.9.3