From b9b29d15b0503e76d5148b6f966404c6580ae6b9 Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期一, 21 七月 2025 14:40:06 +0800 Subject: [PATCH] bug --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 70 +++++++++++++++++++++-------------- 1 files changed, 42 insertions(+), 28 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs index d635599..8ff0765 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs @@ -80,10 +80,10 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } }; - //閫夋嫨srm鏄庣粏 + //閫夋嫨婧愬崟鏄庣粏 txt_qt035.ButtonClick += (s, e) => { string strSrmNo = ""; @@ -171,10 +171,10 @@ { string rowGuid = "", rowName = ""; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_qtck, gridView1,"qtck"); + lbGuid, txt_qtck, gridView1, "qtck"); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) @@ -192,17 +192,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); } } @@ -240,7 +242,7 @@ lbGuid, txt_qtck, gridView1); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); @@ -256,6 +258,9 @@ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); ucLookHuoZhu1.Enabled = true; } + //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼 + txt_qt022.IsReadly = true; + ucLookHuoZhu1.Enabled = false; } /// <summary> /// 鏂板浜嬩欢 @@ -295,35 +300,35 @@ string kcCk = txt_qt008.GetId();//浠撳簱 if (string.IsNullOrEmpty(kcZz)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨缁勭粐锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨搴撳瓨缁勭粐锛�"); txt_qt022.Focus(); return; } if (string.IsNullOrEmpty(inHzlx)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富绫诲瀷锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璐т富绫诲瀷锛�"); return; } if (string.IsNullOrEmpty(inHz)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐т富锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨璐т富锛�"); return; } if (txt_qt003.TextTxt.Length < 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍗曟嵁绫诲瀷锛�"); txt_qt003.Focus(); return; } if (txt_qt019.SelectedIndex <= 0) { - Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨搴撳瓨鏂瑰悜锛�"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨搴撳瓨鏂瑰悜锛�"); txt_qt019.Focus(); return; } if (string.IsNullOrEmpty(kcBm) && string.IsNullOrEmpty(kcGys)) { - Gs.DevApp.ToolBox.MsgHelper.Warning("閮ㄩ棬鎴栦緵搴斿晢蹇呴』閫変竴涓紒"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("閮ㄩ棬鎴栦緵搴斿晢蹇呴』閫変竴涓紒"); txt_qt009.Focus(); return; } @@ -381,9 +386,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_qtck.Text = _rtn.rtnData.outNo; toolBarMenu1.isSetBtn = true; @@ -395,10 +400,12 @@ toolBarMenu1.currentAction = ""; Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); } + else + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -456,7 +463,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -525,11 +532,11 @@ } } else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -542,6 +549,9 @@ gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]); gvMx1.SetFocusedRowCellValue("kcDw", SelectedDataRow["dwName"]); gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"]); + gvMx1.CloseEditor(); + gvMx1.PostEditor(); + gvMx1.UpdateCurrentRow(); } /// <summary> /// 绉诲嚭鏄庣粏 @@ -577,13 +587,15 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - if (_rtn.rtnCode > 0) getModel(lbGuid.Text); + MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); + getModel(lbGuid.Text); } - MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + else + MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } } @@ -663,7 +675,7 @@ case 0: strMsg = "鍙嶅鏍�"; break; - case 30: + case 30: strMsg = "璐㈠姟瀹℃牳"; break; case 31: @@ -675,14 +687,15 @@ case 41: strMsg = "閲囪喘鍙嶅鏍�"; break; - }; + } + ; toolBarMenu1.guidKey = ""; string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_qtck, gridView1, "qtck"); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) @@ -698,9 +711,10 @@ _webServiceName + "EditModelSubmit", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { + MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString()); if (xtraTabControl1.SelectedTabPageIndex == 1) { getModel(lbGuid.Text.Trim()); @@ -708,16 +722,17 @@ //int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); //gridView1.FocusedRowHandle = rowHandle; //UtilityHelper.SetCheckIco(gridView1, "isSh", "qt016", "qt002", picCheckBox, this, _inFieldValue.ToString()); - //娉ㄦ剰锛岃繖閲屽拰鍏跺畠椤甸潰鏈夌偣涓嶄竴鏍� getPageList(this.pageBar1.CurrentPage); int rowHandle = gridView1.LocateByValue("guid", rowGuid); gridView1.FocusedRowHandle = rowHandle; } + else + MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString()); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } private void rptBl_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) @@ -741,6 +756,5 @@ }; frm.ShowDialog(); } - } } \ No newline at end of file -- Gitblit v1.9.3