From 49e7d052cc72a98b10ba9c06268c8a1d79e94a5b Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 15 四月 2025 11:14:10 +0800 Subject: [PATCH] fqc --- DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs | 118 ++++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 76 insertions(+), 42 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs index 8c1224e..230fc67 100644 --- a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs +++ b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs @@ -51,16 +51,10 @@ gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; btnIpt.Click += BtnIpt_Click; txt_suppId.getSuppler(""); - txt_lineId.getSuppler(""); - txt_itemId.Click += (s, e) => + //閫夋嫨宸ュ崟 + txt_lotNo.Click += (s, e) => { - string _lineId = txt_lineId.GetId(); - if (string.IsNullOrEmpty(_lineId)) - { - Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇峰厛閫夋嫨浜х嚎锛�"); - return; - } - var frm = new SelectFqcItem(_lineId); + var frm = new SelectFqcDaa(); frm.UpdateParent += (ss, ee) => { try @@ -72,6 +66,46 @@ txt_itemName.Text = lst[0].itemName; txt_itemNo.Text = lst[0].itemNo; txt_lotNo.Text = lst[0].gdbh; + txt_lineName.Text = lst[0].lineName; + txt_lineId.Text = lst[0].lineId; + txt_checkStates.Text = "W:鏈煡"; + txt_fcheckResu.Text = "W:鏈煡"; + txt_freceQty.Text = "W:鏈煡"; + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } + }; + frm.ShowDialog(); + }; + //閫夋嫨绠辩爜 + txt_kbList.Click += (s, e) => + { + string _lotNo = txt_lotNo.Text.Trim(); + if (string.IsNullOrEmpty(_lotNo)) + { + Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇峰厛閫夋嫨宸ュ崟锛�"); + return; + } + var frm = new SelectFqcBox(_lotNo); + frm.UpdateParent += (ss, ee) => + { + try + { + var lst = new List<dynamic>(); + lst = ee.DynamicList; + System.Text.StringBuilder sb = new System.Text.StringBuilder(); + decimal kbSl = 0; + foreach (var item in lst) + { + if (sb.Length > 0) + sb.Append(","); + sb.Append(item.itemBarcode); + kbSl += decimal.Parse(item.sl.ToString()); + }; + txt_kbList.Text = sb.ToString(); + txt_kbSl.Text = kbSl.ToString(); } catch (Exception ex) { @@ -407,6 +441,7 @@ UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); this.ucUpFileList1.pGuid = ""; + this.ucChouJianList1.pGuid = ""; } /// <summary> /// 淇敼浜嬩欢 @@ -450,14 +485,15 @@ string _txt_fbatchQty = txt_fbatchQty.Text.Trim();//鎶芥鏁伴噺 string _txt_lifnr = txt_lifnr.Text.Trim();//瀹㈡埛璁㈠崟 string _txt_suppId = txt_suppId.GetId();//瀹㈡埛id - string _txt_lineId = txt_lineId.GetId();//浜х嚎 - string _txt_itemId = txt_itemId.Text.Trim();//浜у搧 + string _txt_lineId = "";//浜х嚎 + string _txt_itemId = "";//浜у搧 string _txt_remarks = txt_remarks.Text.Trim();//澶囨敞 string _txt_epTag = txt_epTag.Text.Trim();//鐜繚 string _txt_msg = txt_msg.TextTxt;//寮傚父 string _txt_fmanageNo = txt_fmanageNo.Text.Trim();//娴佺▼缂栧彿 string _txt_lotNo1 = txt_lotNo1.Text.Trim();//閫佹鎵瑰彿 string _txt_lotNo = txt_lotNo.Text.Trim();//鐢熶骇宸ュ崟 + string _kbList = txt_kbList.Text.Trim(); if (txt_djType.SelectedIndex <= 0) { Gs.DevApp.ToolBox.MsgHelper.Warning("鍗曟嵁绫诲瀷涓嶈兘涓虹┖锛�"); @@ -468,18 +504,6 @@ { Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥鏁伴噺涓嶈兘涓虹┖锛�"); txt_fbatchQty.Focus(); - return; - } - if (string.IsNullOrEmpty(_txt_lineId.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎涓嶈兘涓虹┖锛�"); - txt_lineId.Focus(); - return; - } - if (string.IsNullOrEmpty(_txt_itemId.Trim())) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("浜у搧涓嶈兘涓虹┖锛�"); - txt_itemId.Focus(); return; } if (string.IsNullOrEmpty(_txt_lotNo.Trim())) @@ -504,6 +528,7 @@ lotNo1 = _txt_lotNo1,//閫佹鎵瑰彿 lotNo = _txt_lotNo,//鐢熶骇宸ュ崟 edtType = 0, + kbList = _kbList, list = new List<dynamic>(), }; gvMx1.CloseEditor(); @@ -515,24 +540,28 @@ if (row != null) { Guid _guid = UtilityHelper.ToGuid(row["guid"].ToString()); - string defectLevel = row["defectLevel"].ToString(); - string defectDetails = row["defectDetails"].ToString(); - if (string.IsNullOrEmpty(defectLevel)) + string _defectLevel = row["defectLevel"].ToString(); + string _defectDetails = row["defectDetails"].ToString(); + string _fcheckResu = row["fcheckResu"].ToString(); + if (_fcheckResu == "涓嶅悎鏍�") { - MsgHelper.ShowError("璇烽�夋嫨缂洪櫡绛夌骇锛�"); - return; + if (string.IsNullOrEmpty(_defectLevel)) + { + MsgHelper.ShowError("璇烽�夋嫨缂洪櫡绛夌骇锛�"); + return; + } + if (string.IsNullOrEmpty(_defectDetails)) + { + MsgHelper.ShowError("璇峰~鍐欑己闄锋弿杩帮紒"); + return; + } + _obj.list.Add(new + { + guid5 = _guid, + defectLevel = _defectLevel, + defectDetails = _defectDetails, + }); } - if (string.IsNullOrEmpty(defectDetails)) - { - MsgHelper.ShowError("璇峰~鍐欑己闄锋弿杩帮紒"); - return; - } - _obj.list.Add(new - { - guid5 = _guid, - defectLevel = defectLevel, - defectDetails = defectDetails, - }); } } try @@ -642,6 +671,7 @@ gcMx1.ForceInitialize(); gvMx1.BestFitColumns(); ucUpFileList1.pGuid = lbGuid.Text.Trim(); + ucChouJianList1.pGuid = lbGuid.Text.Trim(); if (guid5.Length > 10) { int rowHandle = 0; @@ -673,6 +703,11 @@ private void XtraTabControl2_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e) { if (e.Page.Name == "tabMxPage2") + { + ucChouJianList1.getList14(); + + } + if (e.Page.Name == "tabMxPage3") { ucUpFileList1.getFileList(); } @@ -723,9 +758,10 @@ { txtJianYan.ReadOnly = !bl; btnLoad.Enabled = bl; + ucChouJianList1.IsReadOnly(!bl); btnIpt.Text = (bl == true ? "褰曞叆鏍锋湰" : "鏌ョ湅鏍锋湰"); - } + } /// <summary> /// 璇诲彇缂洪櫡绛夌骇 @@ -777,7 +813,5 @@ }; frm.ShowDialog(); } - - } } \ No newline at end of file -- Gitblit v1.9.3