From 1544b9ba3902d93a3d701db3656227cc3b46dce8 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期五, 01 八月 2025 14:45:09 +0800 Subject: [PATCH] 过站bug --- DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs | 153 ++++++++++++++++++++++++++++++-------------------- 1 files changed, 92 insertions(+), 61 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs index 3d36ed3..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,7 +112,7 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); + Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); } }; frm.ShowDialog(); @@ -118,7 +120,7 @@ // 璇诲彇缂洪櫡绛夌骇 getRptDefectLevel(); } - + /// <summary> /// 鎵归噺褰曞叆 /// </summary> @@ -160,7 +162,7 @@ string strGuid = lbGuid.Text.Trim(); if (string.IsNullOrEmpty(strGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -177,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> @@ -195,7 +197,7 @@ int intHandle = this.gvMx1.FocusedRowHandle; if (intHandle < 0) { - ToolBox.MsgHelper.Warning("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒"); + ToolBox.MsgHelper.ShowError("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒"); return; } if (e.KeyCode == Keys.Enter) @@ -244,7 +246,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } @@ -331,7 +333,7 @@ lbGuid, txt_releaseNo, gridView1, "releaseNo"); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) @@ -348,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> @@ -453,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(); @@ -509,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; } @@ -552,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; } @@ -625,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; @@ -637,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); } } @@ -652,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 @@ -684,7 +689,7 @@ } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } private void getModel(string strGuid, string guid5) @@ -742,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); } } @@ -807,7 +837,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -841,7 +871,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } /// <summary> @@ -895,7 +925,7 @@ toolBarMenu1.guidKey = rowGuid; if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) @@ -906,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; } @@ -953,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; } @@ -978,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"); @@ -989,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