From 9c38dbf93ea5b7dea6b34b03cb3143812b20147d Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 02 七月 2025 23:05:41 +0800 Subject: [PATCH] BUG --- DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs | 236 +++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 132 insertions(+), 104 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs index 3e0ca04..3d36ed3 100644 --- a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs +++ b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs @@ -29,6 +29,7 @@ this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; + toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; this.toolBarMenu1.getXmlConfig(); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); @@ -302,111 +303,12 @@ /// <exception cref="NotImplementedException"></exception> private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) { - toolBarMenu1.guidKey = ""; - string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_releaseNo, gridView1, "releaseNo"); - toolBarMenu1.guidKey = rowGuid; - if (string.IsNullOrEmpty(rowGuid)) - { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); - return; - } - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎻愪氦妫�楠屽悧锛�")) - return; - if (txt_fcheckResu.Text.Trim() == _strTag) - { - if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) - { - MsgHelper.Warning("鍗曟嵁涓轰笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒"); - return; - } - string _txt_fngHandle = txt_fngHandle.Text.Trim(); - string _txt_fmrmode = txt_fmrmode.GetCode(); - 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("璇烽�夋嫨澶勭疆缁撴灉锛�"); - txt_fngHandle.Focus(); - return; - } - if (txt_zrType.SelectedIndex <= 0) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐d换鍒ゅ畾锛�"); - txt_zrType.Focus(); - return; - } - if (_txt_fzrId.Length <= 0) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐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_fmrmode)) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�"); - txt_fmrmode.Focus(); - return; - } - } - else - { - if (!string.IsNullOrEmpty(_txt_workNo)) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒"); - txt_workNo.Focus(); - return; - } - if (!string.IsNullOrEmpty(_txt_fmrmode)) - { - Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�"); - txt_fmrmode.Focus(); - return; - } - } - }; - - var _obj = new - { - guid = rowGuid, - }; - try - { - var strJson = UtilityHelper.HttpPost("", - _webServiceName + "EditModelSubmit", - JsonConvert.SerializeObject(_obj)); - var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); - if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) - { - if (xtraTabControl1.SelectedTabPageIndex == 1) - { - getModel(lbGuid.Text.Trim(), "0"); - } - int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); - gridView1.FocusedRowHandle = rowHandle; - int _inFieldValue = 1; - UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString()); - } - } - catch (Exception ex) - { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); - } + _toolCk(1); } - + private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) + { + _toolCk(0); + } /// <summary> /// 鍙栨秷浜嬩欢 /// </summary> @@ -968,5 +870,131 @@ }; frm.ShowDialog(); } + + + /// <summary> + /// 妫�楠屽拰鍙嶆楠� + /// </summary> + /// <param name="inFieldValue"></param> + private void _toolCk(int _inFieldValue) + { + string strMsg = ""; + switch (_inFieldValue) + { + case 1: + strMsg = "瀹℃牳"; + break; + case 0: + strMsg = "鍙嶅鏍�"; + break; + }; + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_releaseNo, gridView1, "releaseNo"); + toolBarMenu1.guidKey = rowGuid; + if (string.IsNullOrEmpty(rowGuid)) + { + MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) + return; + if (_inFieldValue == 1) + { + if (txt_fcheckResu.Text.Trim() == _strTag) + { + if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim())) + { + MsgHelper.Warning("鍗曟嵁涓轰笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒"); + return; + } + string _txt_fngHandle = txt_fngHandle.Text.Trim(); + string _txt_fmrmode = txt_fmrmode.GetCode(); + 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("璇烽�夋嫨澶勭疆缁撴灉锛�"); + txt_fngHandle.Focus(); + return; + } + if (txt_zrType.SelectedIndex <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐d换鍒ゅ畾锛�"); + txt_zrType.Focus(); + return; + } + if (_txt_fzrId.Length <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐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_fmrmode)) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�"); + txt_fmrmode.Focus(); + return; + } + } + else + { + if (!string.IsNullOrEmpty(_txt_workNo)) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒"); + txt_workNo.Focus(); + return; + } + if (!string.IsNullOrEmpty(_txt_fmrmode)) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�"); + txt_fmrmode.Focus(); + return; + } + } + }; + } + + var _obj = new + { + guid = rowGuid, + inFieldValue = _inFieldValue, + }; + try + { + var strJson = UtilityHelper.HttpPost("", + _webServiceName + "EditModelSubmit", + JsonConvert.SerializeObject(_obj)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) + { + if (xtraTabControl1.SelectedTabPageIndex == 1) + { + getModel(lbGuid.Text.Trim(), "0"); + } + int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); + gridView1.FocusedRowHandle = rowHandle; + UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString()); + } + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } + } } \ No newline at end of file -- Gitblit v1.9.3