From cc50730523fb08599949109a59ad64983f7415eb Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 18 四月 2025 09:38:39 +0800 Subject: [PATCH] 采购退货 --- DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs | 2 + DevApp/Gs.DevApp/Gs.DevApp.csproj.user | 2 DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.Designer.cs | 46 ++++++++++++++-------- DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs | 10 +++- DevApp/Gs.DevApp/App.config | 4 +- DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.cs | 27 +++++++++---- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 1 7 files changed, 60 insertions(+), 32 deletions(-) diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config index 5bad92a..2ad734f 100644 --- a/DevApp/Gs.DevApp/App.config +++ b/DevApp/Gs.DevApp/App.config @@ -28,8 +28,8 @@ </assemblyBinding> </runtime> <appSettings> - <add key="WebApiUrl" value="http://localhost:5263/" /> - <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />--> + <!--<add key="WebApiUrl" value="http://localhost:5263/" />--> + <add key="WebApiUrl" value="http://192.168.1.145:81/" /> <add key="LogPath" value="logs" /> <add key="ProductName" value="G-MES V2.0" /> <add key="PageSize" value="50" /> diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs index 1befdfc..684ab93 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs @@ -225,6 +225,7 @@ // split1 // this.split1.Dock = System.Windows.Forms.DockStyle.Fill; + this.split1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2; this.split1.Horizontal = false; this.split1.Location = new System.Drawing.Point(0, 0); this.split1.Name = "split1"; @@ -237,7 +238,8 @@ // // split1.Panel2 // - this.split1.Panel2.Text = "Panel2";this.split1.FixedPanel = DevExpress.XtraEditors.SplitFixedPanel.Panel2;this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; + this.split1.Panel2.Text = "Panel2"; + this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; this.split1.Size = new System.Drawing.Size(1126, 570); this.split1.SplitterPosition = 0; this.split1.TabIndex = 0; @@ -477,7 +479,7 @@ this.splitMx1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitMx1.Horizontal = false; this.splitMx1.Location = new System.Drawing.Point(0, 0); - this.splitMx1.Name = "splitMx1";this.splitMx1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; + this.splitMx1.Name = "splitMx1"; // // splitMx1.Panel1 // @@ -488,6 +490,7 @@ // this.splitMx1.Panel2.Controls.Add(this.tabMx); this.splitMx1.Panel2.Text = "Panel2"; + this.splitMx1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True; this.splitMx1.Size = new System.Drawing.Size(1126, 570); this.splitMx1.SplitterPosition = 177; this.splitMx1.TabIndex = 0; @@ -840,11 +843,12 @@ // layoutControlItem9 // this.layoutControlItem9.Control = this.txt_checkUser; + this.layoutControlItem9.CustomizationFormText = "瀹℃牳浜哄憳"; this.layoutControlItem9.Location = new System.Drawing.Point(828, 0); this.layoutControlItem9.Name = "layoutControlItem9"; this.layoutControlItem9.OptionsTableLayoutItem.ColumnIndex = 3; this.layoutControlItem9.Size = new System.Drawing.Size(278, 31); - this.layoutControlItem9.Text = "瀹℃牳浜�"; + this.layoutControlItem9.Text = "瀹℃牳浜哄憳"; this.layoutControlItem9.TextSize = new System.Drawing.Size(90, 18); // // layoutControlItem10 diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs index cfff603..f328809 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs @@ -85,6 +85,8 @@ gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = _oldTable; gcMx1.ForceInitialize(); + gvMx1.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); } catch (Exception ex) { diff --git a/DevApp/Gs.DevApp/Gs.DevApp.csproj.user b/DevApp/Gs.DevApp/Gs.DevApp.csproj.user index 78c201e..ea14450 100644 --- a/DevApp/Gs.DevApp/Gs.DevApp.csproj.user +++ b/DevApp/Gs.DevApp/Gs.DevApp.csproj.user @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> - <ProjectView>ShowAllFiles</ProjectView> + <ProjectView>ProjectFiles</ProjectView> <PublishUrlHistory>publish\</PublishUrlHistory> <InstallUrlHistory /> <SupportUrlHistory /> diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index 4c7f538..e534477 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -2099,7 +2099,6 @@ return decimal.Parse(txt); } - #region 缁樺埗琛ㄥご鍏ㄩ�夊嬀閫夋 /// <summary> /// 缁樺埗琛ㄥご鍏ㄩ�夊嬀閫夋 diff --git a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.Designer.cs b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.Designer.cs index ed66b61..803d30d 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.Designer.cs @@ -48,9 +48,10 @@ this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.colChkInt = new DevExpress.XtraGrid.Columns.GridColumn(); this.panelControl1 = new DevExpress.XtraEditors.PanelControl(); this.btnIn = new DevExpress.XtraEditors.SimpleButton(); - this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.panelControl3)).BeginInit(); this.panelControl3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.radioGroup1.Properties)).BeginInit(); @@ -108,6 +109,7 @@ this.gridView1.Appearance.Row.Options.UseFont = true; this.gridView1.ColumnPanelRowHeight = 50; this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.colChkInt, this.gv_guid, this.gridColumn3, this.gridColumn4, @@ -128,8 +130,6 @@ this.gridView1.IndicatorWidth = 50; this.gridView1.Name = "gridView1"; this.gridView1.OptionsFind.ShowSearchNavButtons = false; - this.gridView1.OptionsSelection.MultiSelect = true; - this.gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect; this.gridView1.OptionsView.ShowAutoFilterRow = true; this.gridView1.OptionsView.ShowGroupPanel = false; // @@ -302,6 +302,31 @@ this.gridColumn8.VisibleIndex = 12; this.gridColumn8.Width = 94; // + // gridColumn11 + // + this.gridColumn11.AppearanceCell.ForeColor = System.Drawing.Color.Blue; + this.gridColumn11.AppearanceCell.Options.UseForeColor = true; + this.gridColumn11.AppearanceHeader.ForeColor = System.Drawing.Color.Blue; + this.gridColumn11.AppearanceHeader.Options.UseForeColor = true; + this.gridColumn11.Caption = "鍙��鏁伴噺"; + this.gridColumn11.FieldName = "ktsl"; + this.gridColumn11.MinWidth = 25; + this.gridColumn11.Name = "gridColumn11"; + this.gridColumn11.Visible = true; + this.gridColumn11.VisibleIndex = 7; + this.gridColumn11.Width = 94; + // + // colChkInt + // + this.colChkInt.Caption = "."; + this.colChkInt.FieldName = "chkInt"; + this.colChkInt.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Left; + this.colChkInt.MinWidth = 25; + this.colChkInt.Name = "colChkInt"; + this.colChkInt.Visible = true; + this.colChkInt.VisibleIndex = 0; + this.colChkInt.Width = 94; + // // panelControl1 // this.panelControl1.Controls.Add(this.btnIn); @@ -322,20 +347,6 @@ this.btnIn.Size = new System.Drawing.Size(94, 39); this.btnIn.TabIndex = 4; this.btnIn.Text = "纭畾瀵煎叆"; - // - // gridColumn11 - // - this.gridColumn11.AppearanceCell.ForeColor = System.Drawing.Color.Blue; - this.gridColumn11.AppearanceCell.Options.UseForeColor = true; - this.gridColumn11.AppearanceHeader.ForeColor = System.Drawing.Color.Blue; - this.gridColumn11.AppearanceHeader.Options.UseForeColor = true; - this.gridColumn11.Caption = "鍙��鏁伴噺"; - this.gridColumn11.FieldName = "ktsl"; - this.gridColumn11.MinWidth = 25; - this.gridColumn11.Name = "gridColumn11"; - this.gridColumn11.Visible = true; - this.gridColumn11.VisibleIndex = 7; - this.gridColumn11.Width = 94; // // SelectMesCgthSq // @@ -388,5 +399,6 @@ private DevExpress.XtraEditors.SimpleButton btnIn; private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; private DevExpress.XtraGrid.Columns.GridColumn gridColumn11; + private DevExpress.XtraGrid.Columns.GridColumn colChkInt; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.cs b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.cs index 26c5e5d..28baaf7 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSq.cs @@ -21,6 +21,12 @@ public SelectMesCgthSq(string _suppId, string _receiveOrgId) { InitializeComponent(); + this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; + this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gridView1); }; + this.colChkInt.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; + this.colChkInt.OptionsFilter.AllowAutoFilter = false; + this.colChkInt.OptionsFilter.AllowFilter = false; + this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False; radioGroup1.SelectedIndex = 0; this.suppId = _suppId; this.receiveOrgId = _receiveOrgId; @@ -28,17 +34,22 @@ getPageList(1); btnIn.Click += (s, e) => { + gridView1.PostEditor(); + gridView1.UpdateCurrentRow(); var list = new List<string>(); - int[] rows = this.gridView1.GetSelectedRows();//鍏堣幏鍙栭�夋嫨琛岀殑琛屽彿 - DataTable dt = this.gcMain.DataSource as DataTable;//寰楀埌GridControl鐨勬暟鎹簮 - foreach (int idx in rows) + DataTable dt = this.gcMain.DataSource as DataTable; { - string _guid = dt.Rows[idx]["guid"].ToString(); - list.Add(_guid); + foreach (DataRow dr in dt.Rows) + { + string checkBox = dr["chkInt"].ToString(); + string _guid = dr["guid"].ToString(); + if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox)) + { + list.Add(_guid); + } + } } - UpdateParent?.Invoke(this, - new UpdateParentEventArgs { StringList = list }); - Close(); + UpdateParent?.Invoke(this, new UpdateParentEventArgs { StringList = list }); Close(); }; radioGroup1.SelectedIndexChanged += (s, e) => { -- Gitblit v1.9.3