From f5570a2f60dc9b9c201dcc8b227510a89bf69042 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 01 七月 2025 11:29:32 +0800 Subject: [PATCH] 工序增加是否追溯码 --- DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs | 67 ++++++++++++++++++--------------- 1 files changed, 37 insertions(+), 30 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs index b8236e3..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> /// 鏂板浜嬩欢 @@ -224,6 +243,9 @@ { lbGuid.Text = ""; Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); + UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true); + frm_CqfaItems1.Clean(); + frm_CqfaItems2.Clean(); //澧炲姞鏃讹紝榛樿缁勭粐 string deftOrg = UtilityHelper.GetFirstOrg(txt_fSubsidiary); } @@ -235,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)) @@ -272,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(), }; @@ -295,7 +302,6 @@ _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) { MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg); @@ -305,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); @@ -368,7 +375,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -384,8 +391,8 @@ dynamic dy = _rtn.rtnData; lbGuid.Text = strGuid; UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); - frm_CqfaItems1.Initialize(QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId()); - frm_CqfaItems2.Initialize(QcSeason.cqcjno.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 ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); @@ -476,7 +483,7 @@ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) + if (!MsgHelper.AskQuestion("纭畾鎶婃墍閫夋嫨鐨勭墿鏂欍��"+ strMsg + "銆戞柟妗堛��" + rowName + "銆戝悧锛�")) return; var _obj = new { @@ -493,8 +500,8 @@ if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg.ToString()); - frm_CqfaItems1.Initialize(QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId()); - frm_CqfaItems2.Initialize(QcSeason.cqcjno.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 MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString()); -- Gitblit v1.9.3