From e88c56e0992f65bac7552d1c42898988dbd79930 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期三, 30 七月 2025 15:04:39 +0800 Subject: [PATCH] 生产bug --- DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs | 155 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 92 insertions(+), 63 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs index a6fbbc1..ad9652c 100644 --- a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs +++ b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs @@ -1,4 +1,5 @@ -锘縰sing Gs.DevApp.DevFrm.Work; +锘縰sing DevExpress.XtraGrid.Drawing; +using Gs.DevApp.DevFrm.Work; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; @@ -7,6 +8,7 @@ using System; using System.Collections.Generic; using System.Data; +using System.Data.SqlTypes; using System.Threading.Tasks; using System.Windows.Forms; @@ -75,7 +77,7 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); + ToolBox.MsgHelper.ShowError(ex.Message); } }; frm.ShowDialog(); @@ -86,7 +88,7 @@ string _lotNo = txt_lotNo.Text.Trim(); if (string.IsNullOrEmpty(_lotNo)) { - Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇峰厛閫夋嫨宸ュ崟锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨宸ュ崟锛�"); return; } var frm = new SelectFqcBox(_lotNo); @@ -110,17 +112,15 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); + Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); } }; frm.ShowDialog(); }; // 璇诲彇缂洪櫡绛夌骇 getRptDefectLevel(); - //宸ュ簭 - txt_fmrmode.getSuppler("", " and isnull(isBack,0)=1"); } - + /// <summary> /// 鎵归噺褰曞叆 /// </summary> @@ -162,7 +162,7 @@ string strGuid = lbGuid.Text.Trim(); if (string.IsNullOrEmpty(strGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -179,12 +179,12 @@ } else { - Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtn.rtnMsg); + Gs.DevApp.ToolBox.MsgHelper.ShowError(_rtn.rtnMsg); } } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } /// <summary> @@ -197,7 +197,7 @@ int intHandle = this.gvMx1.FocusedRowHandle; if (intHandle < 0) { - ToolBox.MsgHelper.Warning("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒"); + ToolBox.MsgHelper.ShowError("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒"); return; } if (e.KeyCode == Keys.Enter) @@ -246,7 +246,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } @@ -333,7 +333,7 @@ lbGuid, txt_releaseNo, gridView1, "releaseNo"); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) @@ -350,17 +350,19 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); if (xtraTabControl1.SelectedTabPageIndex == 0) { } else Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); getPageList(this.pageBar1.CurrentPage); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } /// <summary> @@ -455,55 +457,55 @@ string _kbList = txt_kbList.Text.Trim(); if (txt_djType.SelectedIndex <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("鍗曟嵁绫诲瀷涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("鍗曟嵁绫诲瀷涓嶈兘涓虹┖锛�"); txt_djType.Focus(); return; } if (string.IsNullOrEmpty(_txt_lotNo.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("宸ュ崟鍙蜂笉鑳戒负绌猴紒"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("宸ュ崟鍙蜂笉鑳戒负绌猴紒"); txt_lotNo.Focus(); return; } if (string.IsNullOrEmpty(_kbList.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("閫佹绠辩爜涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("閫佹绠辩爜涓嶈兘涓虹┖锛�"); txt_kbList.Focus(); return; } if (string.IsNullOrEmpty(txt_kbSl.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("閫佹鏁伴噺涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("閫佹鏁伴噺涓嶈兘涓虹┖锛�"); txt_kbList.Focus(); return; } if (string.IsNullOrEmpty(_txt_fbatchQty.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥鏁伴噺涓嶈兘涓虹┖锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("鎶芥鏁伴噺涓嶈兘涓虹┖锛�"); txt_fbatchQty.Focus(); return; } if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(_txt_fbatchQty)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇疯緭鍏ユ纭殑鎶芥鏁伴噺锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鎶芥鏁伴噺锛�"); txt_fbatchQty.Focus(); return; } if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(txt_kbSl.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇疯緭鍏ユ纭殑閫佹鏁伴噺锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑閫佹鏁伴噺锛�"); txt_kbList.Focus(); return; } if (Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_txt_fbatchQty) > Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_kbSl.Text.Trim())) { - Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥鏁伴噺涓嶈兘澶т簬閫佹鏁伴噺锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("鎶芥鏁伴噺涓嶈兘澶т簬閫佹鏁伴噺锛�"); txt_fbatchQty.Focus(); return; } //褰撲笉鍚堟牸鏃剁殑妫�鏌� string _txt_fngHandle = txt_fngHandle.Text.Trim(); - string _txt_fmrmode = txt_fmrmode.GetCode(); + string _txt_fmrmode = txt_fmrmode.SelectedText.Trim(); string _txt_fzrId = txt_fzrId.GetId(); string _txt_workNo = txt_workNo.Text.Trim(); string _txt_zrType = txt_zrType.Text.Trim(); @@ -511,41 +513,41 @@ { if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) { - MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒"); + MsgHelper.ShowError("褰撲笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒"); txt_msg.Focus(); return; } if (txt_fngHandle.SelectedIndex <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨澶勭疆缁撴灉锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨澶勭疆缁撴灉锛�"); txt_fngHandle.Focus(); return; } if (txt_zrType.SelectedIndex <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨璐d换鍒ゅ畾锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨璐d换鍒ゅ畾锛�"); txt_zrType.Focus(); return; } if (_txt_fzrId.Length <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨璐d换浜猴紒"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨璐d换浜猴紒"); txt_fzrId.Focus(); return; } //褰撳缃粨鏋滀负鍙嶅伐鏃讹紝瑕侀�夋嫨宸ュ簭鍜屽弽宸ョ紪鍙� if (txt_fngHandle.SelectedIndex == 1) { - if (string.IsNullOrEmpty(_txt_workNo)) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇峰~鍐欏弽宸ュ崟鍙凤紒"); - txt_workNo.Focus(); - return; - } + //if (string.IsNullOrEmpty(_txt_workNo)) + //{ + // Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撲笉鍚堟牸鏃讹紝璇峰~鍐欏弽宸ュ崟鍙凤紒"); + // txt_workNo.Focus(); + // return; + //} if (string.IsNullOrEmpty(_txt_fmrmode)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撲笉鍚堟牸鏃讹紝璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�"); txt_fmrmode.Focus(); return; } @@ -554,13 +556,13 @@ { if (!string.IsNullOrEmpty(_txt_workNo)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒"); txt_workNo.Focus(); return; } if (!string.IsNullOrEmpty(_txt_fmrmode)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�"); txt_fmrmode.Focus(); return; } @@ -627,9 +629,9 @@ { string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); if (_rtn.rtnCode > 0) { + ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); lbGuid.Text = _rtn.rtnData.outGuid; txt_releaseNo.Text = _rtn.rtnData.outNo; toolBarMenu1.isSetBtn = true; @@ -639,10 +641,12 @@ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); getModel(lbGuid.Text, "0"); } + else + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -654,7 +658,6 @@ private void getPageList(int curPage) { gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); - // _sbSqlWhere += " and isnull(fsubmit,0)=0"; PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try @@ -686,7 +689,7 @@ } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } private void getModel(string strGuid, string guid5) @@ -744,13 +747,38 @@ { Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); } + getGxList(dy.aboutGuid.ToString()); } else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); + } + } + + private void getGxList(string daaGuid) + { + txt_fmrmode.Properties.Items.Clear(); + var _obj = new + { + guid = daaGuid, + }; + var json = JsonConvert.SerializeObject(_obj); + try + { + var strReturn = UtilityHelper.HttpPost("", "WomdaaManager/GetGyList", json); + var dd = UtilityHelper.ReturnToList(strReturn); + var dt = dd.rtnData; + foreach (DataRow row in dt.Rows) + { + txt_fmrmode.Properties.Items.Add(row["processNo"].ToString()); + } + } + catch (Exception ex) + { + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -809,7 +837,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -843,7 +871,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } /// <summary> @@ -897,7 +925,7 @@ toolBarMenu1.guidKey = rowGuid; if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) @@ -908,45 +936,45 @@ { if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) { - MsgHelper.Warning("鍗曟嵁涓轰笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒"); + MsgHelper.ShowError("鍗曟嵁涓轰笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒"); return; } string _txt_fngHandle = txt_fngHandle.Text.Trim(); - string _txt_fmrmode = txt_fmrmode.GetCode(); + string _txt_fmrmode = txt_fmrmode.SelectedText.Trim(); string _txt_fzrId = txt_fzrId.GetId(); string _txt_workNo = txt_workNo.Text.Trim(); string _txt_msg = txt_msg.TextTxt; string _txt_zrType = txt_zrType.Text.Trim(); if (txt_fngHandle.SelectedIndex <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨澶勭疆缁撴灉锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨澶勭疆缁撴灉锛�"); txt_fngHandle.Focus(); return; } if (txt_zrType.SelectedIndex <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐d换鍒ゅ畾锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璐d换鍒ゅ畾锛�"); txt_zrType.Focus(); return; } if (_txt_fzrId.Length <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐d换浜猴紒"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璐d换浜猴紒"); txt_fzrId.Focus(); return; } //褰撳缃粨鏋滀负鍙嶅伐鏃讹紝瑕侀�夋嫨宸ュ簭鍜屽弽宸ョ紪鍙� if (txt_fngHandle.SelectedIndex == 1) { - if (string.IsNullOrEmpty(_txt_workNo)) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇峰~鍐欏弽宸ュ崟鍙凤紒"); - txt_workNo.Focus(); - return; - } + //if (string.IsNullOrEmpty(_txt_workNo)) + //{ + // Gs.DevApp.ToolBox.MsgHelper.Warning("璇峰~鍐欏弽宸ュ崟鍙凤紒"); + // txt_workNo.Focus(); + // return; + //} if (string.IsNullOrEmpty(_txt_fmrmode)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�"); txt_fmrmode.Focus(); return; } @@ -955,13 +983,13 @@ { if (!string.IsNullOrEmpty(_txt_workNo)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒"); txt_workNo.Focus(); return; } if (!string.IsNullOrEmpty(_txt_fmrmode)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�"); txt_fmrmode.Focus(); return; } @@ -980,9 +1008,9 @@ _webServiceName + "EditModelSubmit", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg); if (xtraTabControl1.SelectedTabPageIndex == 1) { getModel(lbGuid.Text.Trim(), "0"); @@ -991,12 +1019,13 @@ gridView1.FocusedRowHandle = rowHandle; UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString()); } + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnData.outMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } - } } \ No newline at end of file -- Gitblit v1.9.3