From 92c92d9bfb4431a8e2f4b8ac494547d50ea3a7f6 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 18 二月 2025 17:25:06 +0800 Subject: [PATCH] 板面 --- DevApp/Gs.DevApp/DevFrm/Ck/UcBlclDj.cs | 57 ++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 38 insertions(+), 19 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlclDj.cs b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlclDj.cs index 300afe5..c65b2ee 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlclDj.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlclDj.cs @@ -1,16 +1,11 @@ -锘縰sing DevExpress.XtraEditors; -using Gs.DevApp.Entity; +锘縰sing Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; @@ -37,8 +32,11 @@ this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; + toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; Form parentForm = this.FindForm(); - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, parentForm, "statusChk", "", (value) => + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(this.GetType().FullName, gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(this.GetType().FullName,gvMx2); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(this.GetType().FullName,gridView1,picCheckBox, parentForm, "statusChk", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); }); @@ -60,7 +58,19 @@ getPageList(1); } - + /// <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_itemOutNo, gridView1); + toolBarMenu1.guidKey = rowGuid; + } /// <summary> /// 鍒嗛〉浜嬩欢 /// </summary> @@ -136,14 +146,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); } } @@ -155,6 +166,7 @@ private void getPageList(int curPage) { var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); + _sbSqlWhere += " and a.out_type='" + strType + "'"; PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "item_out_no", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try @@ -170,6 +182,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); + gridView1.BestFitColumns(); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -226,6 +239,7 @@ gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); + gvMx1.BestFitColumns(); } else { @@ -242,6 +256,7 @@ gcMx2.BindingContext = new BindingContext(); gcMx2.DataSource = dt1; gcMx2.ForceInitialize(); + gvMx2.BestFitColumns(); } else { @@ -296,12 +311,16 @@ JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); - if (_rtn.rtnCode > 0) + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) + { getModel(lbGuid.Text.Trim()); - else - getPageList(this.pageBar1.CurrentPage); + } + int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); + gridView1.FocusedRowHandle = rowHandle; + Form parentForm = this.FindForm(); + UtilityHelper.SetCheckIco(gridView1, "statusChk", "checkUser", "checkDate", picCheckBox, parentForm, _inFieldValue.ToString()); } } catch (Exception ex) -- Gitblit v1.9.3