From e97f3a0b90112386f96def011c6d4864d974594a Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 14 二月 2025 10:26:08 +0800 Subject: [PATCH] 生产报工 --- DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs | 46 +++++++++++++++++++++++++++++----------------- 1 files changed, 29 insertions(+), 17 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs b/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs index 303276c..4af2b84 100644 --- a/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs +++ b/DevApp/Gs.DevApp/UserControl/UcLookHuoZhu.cs @@ -18,18 +18,24 @@ get; set; } + public string HzId + { + get; + set; + } public bool IsReadly { get; set; } public UcLookHuoZhu() { InitializeComponent(); - txt_qt018.Properties.NullText = "璇烽�夋嫨"; - this.txt_qt025.SelectedIndexChanged += (s, e) => + txt_hzabc.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,18 +206,22 @@ { 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> /// 璁剧疆 /// </summary> /// <param name="Code"></param> - public void SetHzLx(int Code) + public void SetHzLx(string Code) { - txt_qt025.SelectedIndex = Code; + if (string.IsNullOrEmpty(Code)) + txt_hzlxabc.SelectedIndex = 0; + else + txt_hzlxabc.Text = Code; } } } -- Gitblit v1.9.3