From d8737264b137b8f37fc3c902031b17eb2a3acc19 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 25 六月 2025 16:04:54 +0800 Subject: [PATCH] 超期复检 --- DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs | 58 +++++++++++++++++++++++++++++++--------------------------- 1 files changed, 31 insertions(+), 27 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs index 1f2f5c5..63142db 100644 --- a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs +++ b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs @@ -1,5 +1,4 @@ -锘縰sing DevExpress.XtraPivotGrid.Data; -using Gs.DevApp.Entity; +锘縰sing Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; using Newtonsoft.Json; @@ -44,13 +43,33 @@ //绉诲叆 btnIn.Click += (s, e) => { + if (lbGuid.Text.Length <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("鎻愮ず锛氳鍏堜繚瀛樻柟妗堬紒"); + return; + } string strItemsGuids = frm_CqfaItems2.GetSelect(); + if (string.IsNullOrEmpty(strItemsGuids)) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("鎻愮ず锛氳鍏堝嬀閫夐渶瑕佺Щ鍏ョ殑鐗╂枡锛�"); + return; + } _toolOutIn(1, strItemsGuids); }; //绉诲嚭 btnOut.Click += (s, e) => { + if (lbGuid.Text.Length <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("鎻愮ず锛氳鍏堜繚瀛樻柟妗堬紒"); + return; + } string strItemsGuids = frm_CqfaItems1.GetSelect(); + if (string.IsNullOrEmpty(strItemsGuids)) + { + Gs.DevApp.ToolBox.MsgHelper.ShowError("鎻愮ず锛氳鍏堝嬀閫夐渶瑕佺Щ鍑虹殑鐗╂枡锛�"); + return; + } _toolOutIn(0, strItemsGuids); }; } @@ -148,23 +167,24 @@ try { var strJson = UtilityHelper.HttpPost("", - _webServiceName + "DeleteModelOrMx", + _webServiceName + "DeleteModel", JsonConvert.SerializeObject(_obj)); 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); } } @@ -213,7 +233,6 @@ txt_fabm.ReadOnly = true; txt_fSubsidiary.Enabled = false; } - } /// <summary> /// 鏂板浜嬩欢 @@ -238,23 +257,15 @@ private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) { toolBarMenu1.isSetBtn = false; - string _fabm = txt_fabm.Text.Trim(); string _famc = txt_famc.Text.Trim(); string _yjrq = txt_yjrq.Text.Trim(); string _bzqx = txt_bzqx.Text.Trim(); - string _fjxz = txt_fjxz.Text.Trim(); string _bz = txt_bz.Text.Trim(); string _fSubsidiary = txt_fSubsidiary.GetId(); if (string.IsNullOrEmpty(_fSubsidiary)) { MsgHelper.ShowError("缁勭粐涓嶈兘涓虹┖锛�"); txt_fSubsidiary.Focus(); - return; - } - if (string.IsNullOrEmpty(_famc)) - { - MsgHelper.ShowError("鏂规缂栫爜涓嶈兘涓虹┖锛�"); - txt_fabm.Focus(); return; } if (string.IsNullOrEmpty(_famc)) @@ -275,20 +286,13 @@ txt_bzqx.Focus(); return; } - if (string.IsNullOrEmpty(_fjxz)) - { - MsgHelper.ShowError("澶嶆闄愬��(娆�)涓嶈兘涓虹┖锛�"); - txt_fjxz.Focus(); - return; - } var _obj = new { guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), yjrq = (_yjrq), bzqx = (_bzqx), - fjxz = (_fjxz), + fjxz = (0), famc = _famc.Trim(), - fabm = _fabm.Trim(), bz = _bz.Trim(), fSubsidiary = _fSubsidiary.Trim(), }; @@ -298,7 +302,6 @@ _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) { MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); @@ -308,6 +311,7 @@ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); toolBarMenu1.currentAction = ""; Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); + getModel(lbGuid.Text); } else MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); @@ -371,7 +375,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -387,7 +391,7 @@ dynamic dy = _rtn.rtnData; lbGuid.Text = strGuid; UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); - frm_CqfaItems1.Initialize(lbGuid.Text.Trim(), QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId()); + frm_CqfaItems1.Initialize(lbGuid.Text.Trim(), QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId()); frm_CqfaItems2.Initialize(lbGuid.Text.Trim(), QcSeason.cqcjno.ToString(), txt_fSubsidiary.GetId()); } else @@ -479,7 +483,7 @@ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) + if (!MsgHelper.AskQuestion("纭畾鎶婃墍閫夋嫨鐨勭墿鏂欍��"+ strMsg + "銆戞柟妗堛��" + rowName + "銆戝悧锛�")) return; var _obj = new { -- Gitblit v1.9.3