From eedfab0cc6288b09227ee6970c8071114dd831de Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期四, 11 九月 2025 18:52:55 +0800 Subject: [PATCH] 首检 --- DevApp/Gs.DevApp/DevFrm/WOM/FrmAutoRk.cs | 73 ++++++++++++++++++++++++++++++------ 1 files changed, 60 insertions(+), 13 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/FrmAutoRk.cs b/DevApp/Gs.DevApp/DevFrm/WOM/FrmAutoRk.cs index 45a2ee8..816ed9b 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/FrmAutoRk.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/FrmAutoRk.cs @@ -10,17 +10,20 @@ namespace Gs.DevApp.DevFrm.WOM { - public partial class FrmBackFlash : DevExpress.XtraEditors.XtraForm + public partial class FrmAutoRk : DevExpress.XtraEditors.XtraForm { - string _webServiceName = "MesBackFlash/"; + string _webServiceName = "MesAutoRk/"; List<FilterEntity> _filterList = new List<FilterEntity>(); string _ucBm = "";//棰嗘枡閮ㄩ棬 string _ucCk = "";//鍙戞枡浠撳簱 + string _ucKw = "";//鍙戞枡搴撲綅 string _ucWl = "";//鏂� - public FrmBackFlash() + string _orgId = ""; + public FrmAutoRk() { InitializeComponent(); this.toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; + this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1; @@ -45,7 +48,7 @@ //閫夋嫨搴撳瓨缁勭粐锛堝彉鏄庣粏涓殑鐗╂枡鍜屽彉璐т富锛� this.txt_orgId.EditChanged += (s, e) => { - string _orgId = txt_orgId.GetId(); + _orgId = txt_orgId.GetId(); if (string.IsNullOrEmpty(_orgId)) return; txt_depotId.getSuppler(_orgId, _ucCk); @@ -57,7 +60,13 @@ txt_itemNo.Text = txt_ItemId.GetCode(); txt_itemModel.Text = txt_ItemId.GetModel(); }; + this.txt_depotId.EditChanged += (s, e) => + { + string _depotId = txt_depotId.GetId(); + txt_kwId.getSuppler(_orgId, _depotId, _ucKw); + }; } + private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) { _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); @@ -136,7 +145,7 @@ private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) { string rowGuid = "", rowName = ""; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "guid"); + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemNo"); if (string.IsNullOrEmpty(rowGuid)) { ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); @@ -145,8 +154,10 @@ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵")) return; List<dynamic> lst = new List<dynamic>(); - lst.Add(rowGuid); - var _obj = lst; + var _obj = new + { + guid = UtilityHelper.ToGuid(rowGuid), + }; try { string strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModel", JsonConvert.SerializeObject(_obj)); @@ -203,6 +214,31 @@ //澧炲姞鏃讹紝榛樿缁勭粐 string deftOrg = UtilityHelper.GetFirstOrg(txt_orgId); } + + /// <summary> + /// 淇敼浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) + { + toolBarMenu1.currentAction = "edit"; + string rowGuid = "", rowName = ""; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1); + if (string.IsNullOrEmpty(rowGuid)) + { + ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + return; + } + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); + if (xtraTabControl1.SelectedTabPageIndex == 1) + { + getModel(rowGuid); + } + + } + + /// <summary> /// 淇濆瓨浜嬩欢 /// </summary> @@ -235,11 +271,19 @@ txt_depotId.Focus(); return; } + if (string.IsNullOrEmpty(txt_kwId.GetId().Trim())) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("搴撲綅涓嶈兘涓虹┖锛�"); + txt_depotId.Focus(); + return; + } var _obj = new { + guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), itemId = txt_ItemId.GetId(), departmentId = txt_departmentId.GetId().Trim(), depotId = txt_depotId.GetId().Trim(), + depotlocid = txt_kwId.GetId().Trim() }; try { @@ -269,7 +313,7 @@ private void getPageList(int curPage) { gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); - var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc, d.depot_code asc,i.item_no", + var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.guid", "asc", "", _sbSqlWhere.ToString()); var json = JsonConvert.SerializeObject(pgq); try @@ -286,7 +330,8 @@ { gcMain1.DataSource = dt; gcMain1.ForceInitialize(); - gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); + gridView1.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain1, gridView1); @@ -335,11 +380,13 @@ _ucBm = dy.departmentId; _ucCk = dy.depotId; _ucWl = dy.ItemId; + _ucKw = dy.kwId; lbGuid.Text = strGuid; UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); _ucBm = ""; _ucCk = ""; _ucWl = ""; + _ucKw = ""; } else ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); @@ -369,7 +416,7 @@ }; toolBarMenu1.guidKey = ""; string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "guid"); + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemNo"); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); @@ -380,12 +427,12 @@ var _obj = new { guid = rowGuid, - ckValue = _inFieldValue, - parameter = "MES_BACK_FLASH,checkDate,checkStatus,createBy" + inFieldValue = _inFieldValue, + parameter = "MES_AUTO_RK,checkDate,checkStatus,createBy" }; try { - var strJson = UtilityHelper.HttpPost("", "General/GeneralCheck", + var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelSubmit", JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) -- Gitblit v1.9.3