From f23d33d0cf77a73d449cd7c38effda9e50c8fda4 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 06 三月 2025 08:13:37 +0800 Subject: [PATCH] 版面 --- DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs | 93 ++++++++++++++++++++++++++++------------------ 1 files changed, 56 insertions(+), 37 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs index 76da4de..18375fb 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs @@ -3,7 +3,6 @@ using System.Data; using System.Threading.Tasks; using System.Windows.Forms; -using DevExpress.RichEdit.Export; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using DevExpress.XtraGrid.Views.Grid; @@ -33,11 +32,14 @@ toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick; toolBarMenu1.btnFjianYanClick += ToolBarMenu1_btnFjianYanClick; toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gridView1); + Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) => - { - Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); - }); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fstatus", "", (value) => + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => { getModel(value); @@ -46,11 +48,16 @@ getPageList(this.pageBar1.CurrentPage); }); getPageList(1); + //浠ヤ笅涓よ鏈夊奖鍝嶆�ц兘锛屼絾鐩墠娌″ソ鏂规 + txt_suppId.getSuppler(""); + txt_depotsId.getSuppler(""); pageBar1.PagerEvent += PageBar1_PagerEvent; //璁剧疆缁勭粐 this.txt_receiveOrgId.EditChanged += (s, e) => { string _orgId = txt_receiveOrgId.GetId(); + if (string.IsNullOrEmpty(_orgId)) + return; txt_suppId.getSuppler(_orgId); txt_depotsId.getSuppler(_orgId); }; @@ -72,7 +79,7 @@ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨渚涘簲鍟嗭紝鎵嶈兘閫夋嫨鏉ユ枡鏄庣粏锛�"); return; } - var frm = new SelectCgMx(this.txt_suppId.GetId()); + var frm = new SelectCgMx(this.txt_suppId.GetId(), txt_receiveOrgId.GetId(), (txt_fType.Checked == true ? 2 : 1).ToString()); //璧嬪�肩粰鏄庣粏琛� frm.UpdateParent += (ss, ee) => { @@ -81,9 +88,7 @@ var lst = new List<string>(); lst = ee.StringList; var _obj = lst; - var strReturn = UtilityHelper.HttpPost("", - _webServiceName + "SelectDialogToView", - JsonConvert.SerializeObject(_obj)); + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "SelectFormTo", JsonConvert.SerializeObject(_obj)); var dt = UtilityHelper.ReturnToList(strReturn); DataTable _newTable = dt.rtnData; DataTable _oldTable = (DataTable)gcMx1.DataSource; @@ -98,10 +103,8 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); } - }; frm.ShowDialog(); }; @@ -109,11 +112,11 @@ private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); + Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } - + /// <summary> /// 鍒嗛〉浜嬩欢 /// </summary> @@ -189,7 +192,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> @@ -200,8 +203,7 @@ private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) { string rowGuid = "", rowName = ""; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_billNo, gridView1); + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "billNo"); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); @@ -222,8 +224,11 @@ var _rtn = UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); - getPageList(1); + if (xtraTabControl1.SelectedTabPageIndex == 0) + { } + else + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); + getPageList(this.pageBar1.CurrentPage); } MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); } @@ -244,14 +249,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); } } @@ -271,7 +277,16 @@ return; } Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); - UtilityHelper.ChangeEnableByControl(panel1.Controls, true); + if (xtraTabControl1.SelectedTabPageIndex == 1) + { + getModel(rowGuid); + } + else + { + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gvMx1); + UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList); + } } /// <summary> @@ -367,8 +382,11 @@ MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); if (_rtn.rtnCode > 0) { - lbGuid.Text = _rtn.rtnData; + 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(panel1.Controls, false); } } @@ -402,6 +420,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); + gridView1.BestFitColumns(); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -459,6 +478,7 @@ gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); + gvMx1.BestFitColumns(); } else { @@ -562,10 +582,8 @@ { MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - } } - /// <summary> /// 妫�楠屽拰鍙嶆楠� @@ -573,11 +591,8 @@ /// <param name="inFieldValue"></param> private void _toolCk(string _meth) { - toolBarMenu1.guidKey = ""; string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_billNo, gridView1, "billNo"); - toolBarMenu1.guidKey = rowGuid; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "billNo"); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); @@ -596,12 +611,16 @@ JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg); - 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; + int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1); + UtilityHelper.SetCheckIco(gridView1, "fstatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); } } catch (Exception ex) -- Gitblit v1.9.3