From ecb7a60de1639f520712ce95f99414b0dd2c9713 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 14 四月 2025 08:30:40 +0800
Subject: [PATCH] 自动打印

---
 DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs |   50 +++++++++++++++++++++++++++++++-------------------
 1 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs b/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs
index 77e21a0..be4673d 100644
--- a/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs
@@ -1,5 +1,4 @@
-锘縰sing DevExpress.XtraEditors;
-using Gs.DevApp.Entity;
+锘縰sing Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Newtonsoft.Json;
 using System;
@@ -18,18 +17,25 @@
             get;
             set;
         }
-        public bool IsReadly { get; set; }
+        public string HzId
+        {
+            get;
+            set;
+        }
+        public bool IsReadly { set; get; }
 
         public UcLookHuoZhu()
         {
             InitializeComponent();
-            txt_qt018.Properties.NullText = "璇烽�夋嫨";
-            this.txt_qt025.SelectedIndexChanged += (s, e) =>
+            txt_hzabc.Properties.NullText = "璇烽�夋嫨璐т富";
+            txt_hzlxabc.Properties.NullText = "璇烽�夋嫨璐т富绫诲瀷";
+            this.txt_hzlxabc.SelectedIndexChanged += (s, e) =>
             {
-                int _strType = txt_qt025.SelectedIndex;
+                txt_hzabc.EditValue = null;
+                int _strType = txt_hzlxabc.SelectedIndex;
                 string _orgId = OrgId;
                 this.searchLookUpEdit1View.Columns.Clear();
-                txt_qt018.Properties.DataSource = null;
+                txt_hzabc.Properties.DataSource = null;
                 if (_strType <= 0) return;
                 string _strMeth = "";
                 string _DisplayMember = "";
@@ -150,11 +156,13 @@
                     var strReturn = UtilityHelper.HttpPost("", _strMeth, json);
                     var rtn = UtilityHelper.ReturnToTablePage(strReturn);
                     var dt = rtn.rtnData.list;
-                    txt_qt018.Properties.DataSource = dt;
-                    txt_qt018.Properties.DisplayMember = _DisplayMember;
-                    txt_qt018.Properties.ValueMember = _ValueMember;
-                    txt_qt018.ForceInitialize();
-                    txt_qt018.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
+                    txt_hzabc.Properties.DataSource = dt;
+                    txt_hzabc.Properties.DisplayMember = _DisplayMember;
+                    txt_hzabc.Properties.ValueMember = _ValueMember;
+                    txt_hzabc.ForceInitialize();
+                    txt_hzabc.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup;
+                    if (!string.IsNullOrEmpty(HzId))
+                        SetHzId(HzId);
                 }
                 catch (Exception ex)
                 {
@@ -169,10 +177,10 @@
         /// <returns></returns>
         public string GetHzId()
         {
-            var row2 = txt_qt018.GetSelectedDataRow() as DataRowView;
+            var row2 = txt_hzabc.GetSelectedDataRow() as DataRowView;
             if (row2 != null)
             {
-                string inHz = txt_qt025.SelectedIndex > 1 ? row2["Id"].ToString() : row2["fid"].ToString();
+                string inHz = txt_hzlxabc.SelectedIndex > 1 ? row2["Id"].ToString() : row2["fid"].ToString();
                 return inHz;
             }
             return "";
@@ -183,9 +191,9 @@
         /// <returns></returns>
         public string GetHzLx()
         {
-            if (txt_qt025.SelectedIndex <= 0)
+            if (txt_hzlxabc.SelectedIndex <= 0)
                 return "";
-            string id = txt_qt025.Text.Trim();
+            string id = txt_hzlxabc.Text.Trim();
             return id;
         }
 
@@ -198,10 +206,11 @@
         {
             if (Code == "-1" || string.IsNullOrEmpty(Code))
             {
-                txt_qt018.EditValue = null;
+                txt_hzabc.EditValue = null;
                 return;
             }
-            txt_qt018.EditValue = Int64.Parse(((Code.ToString().Trim())));
+            txt_hzabc.EditValue = Int64.Parse(((Code.ToString().Trim())));
+            txt_hzabc.Text = Code;
         }
         /// <summary>
         /// 璁剧疆
@@ -209,7 +218,10 @@
         /// <param name="Code"></param>
         public void SetHzLx(string Code)
         {
-            txt_qt018.Text = Code;
+            if (string.IsNullOrEmpty(Code))
+                txt_hzlxabc.SelectedIndex = 0;
+            else
+                txt_hzlxabc.Text = Code;
         }
     }
 }

--
Gitblit v1.9.3