From c3ef6ffae7f21f622c2d9bbb4476bfba62cdba69 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期日, 23 二月 2025 11:14:44 +0800 Subject: [PATCH] 布局 --- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs | 114 ++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 81 insertions(+), 33 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs index 033d35d..26359d1 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; using System.Data; -using System.Drawing; using System.Threading.Tasks; using System.Windows.Forms; @@ -29,6 +28,7 @@ this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; + toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "shState", "", (value) => { @@ -174,14 +174,15 @@ getModel(lbGuid.Text.Trim()); else { - _filterList.Clear(); - if (gridView1.ActiveFilter.Count > 0) - { - gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; - gridView1.ActiveFilter.Clear(); - gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; - } - getPageList(1); + //_filterList.Clear(); + //if (gridView1.ActiveFilter.Count > 0) + //{ + // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + // gridView1.ActiveFilter.Clear(); + // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + //} + //getPageList(1); + getPageList(this.pageBar1.CurrentPage); } } /// <summary> @@ -201,7 +202,7 @@ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); if (xtraTabControl1.SelectedTabPageIndex == 1) { - getModel(rowGuid); + getModel(lbGuid.Text.Trim()); } else { @@ -233,27 +234,53 @@ private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) { toolBarMenu1.isSetBtn = false; - // string _inCkId = txt_invFcode.GetId();//鍑� - // string _inRkId = txt_fromFcode.GetId();//鍏� - //if (string.IsNullOrEmpty(_inCkId)) - //{ - // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍑鸿揣浠撳簱锛�"); - // txt_invFcode.Focus(); - // return; - //} - //if (string.IsNullOrEmpty(_inRkId)) - //{ - // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀惰揣浠撳簱锛�"); - // txt_fromFcode.Focus(); - // return; - //} + string djlx = txt_djlx.SelectedText.ToString(); + string ywlx = txt_ywlx.SelectedText.ToString(); + string dbfx = txt_ftransferdirect.SelectedText.ToString(); + string sqOrg = txt_sqOrg.GetId(); + string dblx = txt_dblx.SelectedText.ToString(); + string dchzlx = txt_dchzlx.SelectedText.ToString(); + string drhzlx = txt_drhzlx.SelectedText.ToString(); + if (txt_djlx.SelectedIndex <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�"); + txt_djlx.Focus(); + return; + } + if (txt_ftransferdirect.SelectedIndex <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冩嫧鏂瑰悜锛�"); + txt_ftransferdirect.Focus(); + return; + } + if (string.IsNullOrEmpty(sqOrg)) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鐢宠缁勭粐锛�"); + txt_sqOrg.Focus(); + return; + } + if (txt_dchzlx.SelectedIndex <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨嚭璐т富绫诲瀷锛�"); + txt_dchzlx.Focus(); + return; + } + if (txt_drhzlx.SelectedIndex <= 0) + { + Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璋冨叆璐т富绫诲瀷锛�"); + txt_drhzlx.Focus(); + return; + } var _obj = new { guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓 - //inCkId = _inCkId,//鍑轰粨 - //inRkId = _inRkId,//鍏ュ簱 - inDjlx = txt_fbilltypeid.Text.Trim(),//鍗曟嵁绫诲瀷 - inDbfx = txt_ftransferdirect.Text.Trim(),//璋冩嫧鏂瑰悜 + djlx = djlx,//鍗曟嵁绫诲瀷 + ywlx = ywlx,//涓氬姟绫诲瀷 + dbfx = dbfx,//璋冩嫧鏂瑰悜 + sqOrg = sqOrg,//瀹¤缁勭粐 + dblx = dblx,//璋冩嫧绫诲瀷 + dchzlx = dchzlx,//璋冨嚭璐т富绫诲瀷 + drhzlx = drhzlx,//璋冨叆璐т富绫诲瀷 inRemark = txt_remark.Text.Trim(),//澶囨敞 list = new List<dynamic>(), }; @@ -282,6 +309,12 @@ ItemId = (row["itemId"].ToString()), Sqsl = (row["shNum"].ToString()), Bz = (row["remark"].ToString()), + dczz = (row["dcOrg"].ToString()), + dcck = (row["dcCk"].ToString()), + drzz = (row["drOrg"].ToString()), + drck = (row["drCk"].ToString()), + dchz = (row["dcHz"].ToString()), + drhz = (row["drHz"].ToString()), }); } } @@ -295,10 +328,9 @@ lbGuid.Text = _rtn.rtnData.outGuid; txt_billno.Text = _rtn.rtnData.outNo; toolBarMenu1.isSetBtn = true; - //List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); - //gvList.Add(gvMx1); - //UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); - //ucLookHuoZhu1.Enabled = false; + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gvMx1); + UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); toolBarMenu1.currentAction = ""; } } @@ -307,7 +339,19 @@ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } - + /// <summary> + /// 鏃ュ織 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnLogClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_billno, gridView1); + toolBarMenu1.guidKey = rowGuid; + } /// <summary> /// /// </summary> @@ -331,6 +375,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); + gridView1.BestFitColumns(); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -387,6 +432,7 @@ gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); + gvMx1.BestFitColumns(); } else { @@ -487,6 +533,8 @@ gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"].ToString()); gvMx1.SetFocusedRowCellValue("itemMpdel", SelectedDataRow["itemModel"].ToString()); gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString()); + gvMx1.CloseEditor(); + gvMx1.UpdateCurrentRow(); } private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) -- Gitblit v1.9.3