From e9a56abf54b3f8b311f4ea360649c4564974349f Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 19 二月 2025 15:24:28 +0800 Subject: [PATCH] 工单 --- DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.Designer.cs | 360 +++++++++++++++++++++++++++++++ DevApp/Gs.DevApp/UserControl/showLayOut.cs | 71 +++--- DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs | 11 + DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs | 11 DevApp/Gs.DevApp/UserControl/showLayOut.Designer.cs | 69 ++---- DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 85 ++++-- 6 files changed, 485 insertions(+), 122 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs index 9303a6f..3f56171 100644 --- a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs +++ b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs @@ -1,15 +1,21 @@ 锘縰sing System; using System.Collections.Generic; using System.Data; +using System.Drawing; using System.Windows.Forms; using DevExpress.Office.Utils; +using DevExpress.XtraBars.Ribbon; +using DevExpress.XtraBars; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; using DevExpress.XtraGrid.Columns; +using DevExpress.XtraGrid.Menu; +using DevExpress.XtraGrid.Views.Grid; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; using Newtonsoft.Json; +using System.Linq; namespace Gs.DevApp.DevFrm.Sys { @@ -53,9 +59,8 @@ txt_noLength.ValueChanged += (s, e) => { DoPreviewCode(); }; txt_isIncludeDoc.CheckedChanged += (s, e) => { DoPreviewCode(); }; txt_isSpilit.CheckedChanged += (s, e) => { DoPreviewCode(); }; + } - - /// <summary> /// 鍒嗛〉浜嬩欢 @@ -298,6 +303,8 @@ pageBar1.CurrentPage = curPage;//褰撳墠椤� pageBar1.RecordCount = dd.rtnData.total;//鎬昏褰曟暟 gridView1.BestFitColumns(); + + } else { diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.Designer.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.Designer.cs index 9562418..a06237b 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.Designer.cs @@ -107,6 +107,28 @@ this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn21 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn22 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn23 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn24 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn25 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn26 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn27 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn28 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn29 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn30 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn31 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn32 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn33 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn34 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn35 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn36 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn37 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn38 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn39 = new DevExpress.XtraGrid.Columns.GridColumn(); this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); this.pageBar1 = new UserControls.Data.UcPageBar(); @@ -126,6 +148,10 @@ this.lbGuid = new System.Windows.Forms.Label(); this.lb_erpid = new DevExpress.XtraEditors.LabelControl(); this.picCheckBox = new System.Windows.Forms.PictureBox(); + this.labelControl5 = new DevExpress.XtraEditors.LabelControl(); + this.txt_scOrg = new DevExpress.XtraEditors.TextEdit(); + this.labelControl6 = new DevExpress.XtraEditors.LabelControl(); + this.txt_wtOrg = new DevExpress.XtraEditors.TextEdit(); this.tabMxPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit(); @@ -155,6 +181,8 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_gdzt.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_dptName.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_scOrg.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_wtOrg.Properties)).BeginInit(); this.SuspendLayout(); // // gvMx1scraprate @@ -354,7 +382,7 @@ // this.tabMxPage1.Controls.Add(this.gcMx1); this.tabMxPage1.Name = "tabMxPage1"; - this.tabMxPage1.Size = new System.Drawing.Size(1124, 356); + this.tabMxPage1.Size = new System.Drawing.Size(1124, 357); this.tabMxPage1.Text = "鏄庣粏"; // // gcMx1 @@ -363,7 +391,7 @@ this.gcMx1.Location = new System.Drawing.Point(0, 0); this.gcMx1.MainView = this.gvMx1; this.gcMx1.Name = "gcMx1"; - this.gcMx1.Size = new System.Drawing.Size(1124, 356); + this.gcMx1.Size = new System.Drawing.Size(1124, 357); this.gcMx1.TabIndex = 0; this.gcMx1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gvMx1}); @@ -1001,7 +1029,29 @@ this.gv_caa016, this.gridColumn7, this.gridColumn4, - this.gv_caa005}); + this.gv_caa005, + this.gridColumn18, + this.gridColumn19, + this.gridColumn20, + this.gridColumn21, + this.gridColumn22, + this.gridColumn23, + this.gridColumn24, + this.gridColumn25, + this.gridColumn26, + this.gridColumn27, + this.gridColumn28, + this.gridColumn29, + this.gridColumn30, + this.gridColumn31, + this.gridColumn32, + this.gridColumn33, + this.gridColumn34, + this.gridColumn35, + this.gridColumn36, + this.gridColumn37, + this.gridColumn38, + this.gridColumn39}); this.gridView1.GridControl = this.gcMain; this.gridView1.IndicatorWidth = 50; this.gridView1.Name = "gridView1"; @@ -1034,8 +1084,8 @@ // // gridColumn1 // - this.gridColumn1.Caption = "宸ュ崟鐘舵��"; - this.gridColumn1.FieldName = "gdzt"; + this.gridColumn1.Caption = "涓氬姟鐘舵��"; + this.gridColumn1.FieldName = "ywzt"; this.gridColumn1.MinWidth = 50; this.gridColumn1.Name = "gridColumn1"; this.gridColumn1.OptionsColumn.AllowEdit = false; @@ -1098,6 +1148,226 @@ this.gridColumn4.VisibleIndex = 23; this.gridColumn4.Width = 50; // + // gridColumn18 + // + this.gridColumn18.Caption = "宸ヨ壓璺嚎"; + this.gridColumn18.FieldName = "routingId"; + this.gridColumn18.MinWidth = 25; + this.gridColumn18.Name = "gridColumn18"; + this.gridColumn18.Visible = true; + this.gridColumn18.VisibleIndex = 25; + this.gridColumn18.Width = 94; + // + // gridColumn19 + // + this.gridColumn19.Caption = "浜х嚎"; + this.gridColumn19.FieldName = "wShopId"; + this.gridColumn19.MinWidth = 25; + this.gridColumn19.Name = "gridColumn19"; + this.gridColumn19.Visible = true; + this.gridColumn19.VisibleIndex = 26; + this.gridColumn19.Width = 94; + // + // gridColumn20 + // + this.gridColumn20.Caption = "浠撳簱"; + this.gridColumn20.FieldName = "depotCode"; + this.gridColumn20.MinWidth = 25; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 27; + this.gridColumn20.Width = 94; + // + // gridColumn21 + // + this.gridColumn21.Caption = "璁″垝缁�"; + this.gridColumn21.FieldName = "workGroupId"; + this.gridColumn21.MinWidth = 25; + this.gridColumn21.Name = "gridColumn21"; + this.gridColumn21.Visible = true; + this.gridColumn21.VisibleIndex = 28; + this.gridColumn21.Width = 94; + // + // gridColumn22 + // + this.gridColumn22.Caption = "璁″垝鍛�"; + this.gridColumn22.FieldName = "planID"; + this.gridColumn22.MinWidth = 25; + this.gridColumn22.Name = "gridColumn22"; + this.gridColumn22.Visible = true; + this.gridColumn22.VisibleIndex = 29; + this.gridColumn22.Width = 94; + // + // gridColumn23 + // + this.gridColumn23.Caption = "涓嬭揪鏃ユ湡"; + this.gridColumn23.FieldName = "caa005"; + this.gridColumn23.MinWidth = 25; + this.gridColumn23.Name = "gridColumn23"; + this.gridColumn23.Visible = true; + this.gridColumn23.VisibleIndex = 30; + this.gridColumn23.Width = 94; + // + // gridColumn24 + // + this.gridColumn24.Caption = "鍏ュ簱涓婇檺"; + this.gridColumn24.FieldName = "stockInLimitH"; + this.gridColumn24.MinWidth = 25; + this.gridColumn24.Name = "gridColumn24"; + this.gridColumn24.Visible = true; + this.gridColumn24.VisibleIndex = 31; + this.gridColumn24.Width = 94; + // + // gridColumn25 + // + this.gridColumn25.Caption = "鍏ュ簱涓嬮檺"; + this.gridColumn25.FieldName = "stockInLimitL"; + this.gridColumn25.MinWidth = 25; + this.gridColumn25.Name = "gridColumn25"; + this.gridColumn25.Visible = true; + this.gridColumn25.VisibleIndex = 32; + this.gridColumn25.Width = 94; + // + // gridColumn26 + // + this.gridColumn26.Caption = "璁″垝璺熻釜鍙�"; + this.gridColumn26.FieldName = "mtono"; + this.gridColumn26.MinWidth = 25; + this.gridColumn26.Name = "gridColumn26"; + this.gridColumn26.Visible = true; + this.gridColumn26.VisibleIndex = 33; + this.gridColumn26.Width = 94; + // + // gridColumn27 + // + this.gridColumn27.Caption = "鎵瑰彿"; + this.gridColumn27.FieldName = "lot"; + this.gridColumn27.MinWidth = 25; + this.gridColumn27.Name = "gridColumn27"; + this.gridColumn27.Visible = true; + this.gridColumn27.VisibleIndex = 34; + this.gridColumn27.Width = 94; + // + // gridColumn28 + // + this.gridColumn28.Caption = "BOM"; + this.gridColumn28.FieldName = "caa013"; + this.gridColumn28.MinWidth = 25; + this.gridColumn28.Name = "gridColumn28"; + this.gridColumn28.Visible = true; + this.gridColumn28.VisibleIndex = 35; + this.gridColumn28.Width = 94; + // + // gridColumn29 + // + this.gridColumn29.Caption = "閿�鍞鍗曞彿"; + this.gridColumn29.FieldName = "caa015"; + this.gridColumn29.MinWidth = 25; + this.gridColumn29.Name = "gridColumn29"; + this.gridColumn29.Visible = true; + this.gridColumn29.VisibleIndex = 36; + this.gridColumn29.Width = 94; + // + // gridColumn30 + // + this.gridColumn30.Caption = "閿�鍞鍗曡鍙�"; + this.gridColumn30.FieldName = "caa015Head"; + this.gridColumn30.MinWidth = 25; + this.gridColumn30.Name = "gridColumn30"; + this.gridColumn30.Visible = true; + this.gridColumn30.VisibleIndex = 37; + this.gridColumn30.Width = 94; + // + // gridColumn31 + // + this.gridColumn31.Caption = "鐢熸垚鏂瑰紡"; + this.gridColumn31.FieldName = "createTypeTxt"; + this.gridColumn31.MinWidth = 25; + this.gridColumn31.Name = "gridColumn31"; + this.gridColumn31.Visible = true; + this.gridColumn31.VisibleIndex = 38; + this.gridColumn31.Width = 94; + // + // gridColumn32 + // + this.gridColumn32.Caption = "ERP鐢熶骇璁㈠崟ID"; + this.gridColumn32.FieldName = "caa018"; + this.gridColumn32.MinWidth = 25; + this.gridColumn32.Name = "gridColumn32"; + this.gridColumn32.Visible = true; + this.gridColumn32.VisibleIndex = 39; + this.gridColumn32.Width = 94; + // + // gridColumn33 + // + this.gridColumn33.Caption = "ERP鐢熶骇璁㈠崟搴忓彿"; + this.gridColumn33.FieldName = "caa019"; + this.gridColumn33.MinWidth = 25; + this.gridColumn33.Name = "gridColumn33"; + this.gridColumn33.Visible = true; + this.gridColumn33.VisibleIndex = 40; + this.gridColumn33.Width = 94; + // + // gridColumn34 + // + this.gridColumn34.Caption = "ERP鐢熶骇璁㈠崟鍗曞彿"; + this.gridColumn34.FieldName = "caa020"; + this.gridColumn34.MinWidth = 25; + this.gridColumn34.Name = "gridColumn34"; + this.gridColumn34.Visible = true; + this.gridColumn34.VisibleIndex = 41; + this.gridColumn34.Width = 94; + // + // gridColumn35 + // + this.gridColumn35.Caption = "婧愬崟绫诲瀷"; + this.gridColumn35.FieldName = "srcBillType"; + this.gridColumn35.MinWidth = 25; + this.gridColumn35.Name = "gridColumn35"; + this.gridColumn35.Visible = true; + this.gridColumn35.VisibleIndex = 42; + this.gridColumn35.Width = 94; + // + // gridColumn36 + // + this.gridColumn36.Caption = "婧愬崟缂栫爜"; + this.gridColumn36.FieldName = "srcBillNo"; + this.gridColumn36.MinWidth = 25; + this.gridColumn36.Name = "gridColumn36"; + this.gridColumn36.Visible = true; + this.gridColumn36.VisibleIndex = 43; + this.gridColumn36.Width = 94; + // + // gridColumn37 + // + this.gridColumn37.Caption = "婧愬崟鍒嗗綍琛屽彿"; + this.gridColumn37.FieldName = "srcBillEntrySeq"; + this.gridColumn37.MinWidth = 25; + this.gridColumn37.Name = "gridColumn37"; + this.gridColumn37.Visible = true; + this.gridColumn37.VisibleIndex = 44; + this.gridColumn37.Width = 94; + // + // gridColumn38 + // + this.gridColumn38.Caption = "鍗曟嵁鐘舵��"; + this.gridColumn38.FieldName = "typeATxt"; + this.gridColumn38.MinWidth = 25; + this.gridColumn38.Name = "gridColumn38"; + this.gridColumn38.Visible = true; + this.gridColumn38.VisibleIndex = 45; + this.gridColumn38.Width = 94; + // + // gridColumn39 + // + this.gridColumn39.Caption = "濮旀墭缁勭粐"; + this.gridColumn39.FieldName = "wtOrg"; + this.gridColumn39.MinWidth = 25; + this.gridColumn39.Name = "gridColumn39"; + this.gridColumn39.Visible = true; + this.gridColumn39.VisibleIndex = 46; + this.gridColumn39.Width = 94; + // // xtraTabControl1 // this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -1141,10 +1411,10 @@ // tabMx // this.tabMx.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabMx.Location = new System.Drawing.Point(0, 182); + this.tabMx.Location = new System.Drawing.Point(0, 181); this.tabMx.Name = "tabMx"; this.tabMx.SelectedTabPage = this.tabMxPage1; - this.tabMx.Size = new System.Drawing.Size(1126, 388); + this.tabMx.Size = new System.Drawing.Size(1126, 389); this.tabMx.TabIndex = 2; this.tabMx.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.tabMxPage1}); @@ -1152,6 +1422,10 @@ // panel1 // this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.labelControl6); + this.panel1.Controls.Add(this.txt_wtOrg); + this.panel1.Controls.Add(this.labelControl5); + this.panel1.Controls.Add(this.txt_scOrg); this.panel1.Controls.Add(this.txt_caa004); this.panel1.Controls.Add(this.labelControl4); this.panel1.Controls.Add(this.labelControl3); @@ -1190,7 +1464,7 @@ this.panel1.Font = new System.Drawing.Font("Tahoma", 10F); this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1126, 182); + this.panel1.Size = new System.Drawing.Size(1126, 181); this.panel1.TabIndex = 1; // // txt_caa004 @@ -1280,7 +1554,7 @@ // // labelControl11 // - this.labelControl11.Location = new System.Drawing.Point(905, 150); + this.labelControl11.Location = new System.Drawing.Point(1070, 35); this.labelControl11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.labelControl11.Name = "labelControl11"; this.labelControl11.Size = new System.Drawing.Size(45, 18); @@ -1291,7 +1565,7 @@ // lbGuid // this.lbGuid.AutoSize = true; - this.lbGuid.Location = new System.Drawing.Point(956, 150); + this.lbGuid.Location = new System.Drawing.Point(1121, 35); this.lbGuid.Name = "lbGuid"; this.lbGuid.Size = new System.Drawing.Size(0, 21); this.lbGuid.TabIndex = 1; @@ -1317,6 +1591,44 @@ this.picCheckBox.TabIndex = 6; this.picCheckBox.TabStop = false; this.picCheckBox.Visible = false; + // + // labelControl5 + // + this.labelControl5.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.labelControl5.Appearance.Options.UseFont = true; + this.labelControl5.Location = new System.Drawing.Point(780, 116); + this.labelControl5.Name = "labelControl5"; + this.labelControl5.Size = new System.Drawing.Size(68, 21); + this.labelControl5.TabIndex = 462; + this.labelControl5.Text = "鐢熶骇缁勭粐"; + // + // txt_scOrg + // + this.txt_scOrg.Location = new System.Drawing.Point(854, 112); + this.txt_scOrg.Name = "txt_scOrg"; + this.txt_scOrg.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.txt_scOrg.Properties.Appearance.Options.UseFont = true; + this.txt_scOrg.Size = new System.Drawing.Size(218, 28); + this.txt_scOrg.TabIndex = 463; + // + // labelControl6 + // + this.labelControl6.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.labelControl6.Appearance.Options.UseFont = true; + this.labelControl6.Location = new System.Drawing.Point(780, 153); + this.labelControl6.Name = "labelControl6"; + this.labelControl6.Size = new System.Drawing.Size(68, 21); + this.labelControl6.TabIndex = 464; + this.labelControl6.Text = "濮旀墭缁勭粐"; + // + // txt_wtOrg + // + this.txt_wtOrg.Location = new System.Drawing.Point(854, 149); + this.txt_wtOrg.Name = "txt_wtOrg"; + this.txt_wtOrg.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.txt_wtOrg.Properties.Appearance.Options.UseFont = true; + this.txt_wtOrg.Size = new System.Drawing.Size(218, 28); + this.txt_wtOrg.TabIndex = 465; // // Frm_Womcaa // @@ -1358,6 +1670,8 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_gdzt.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_dptName.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_scOrg.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_wtOrg.Properties)).EndInit(); this.ResumeLayout(false); } @@ -1469,5 +1783,31 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn12; private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; private DevExpress.XtraGrid.Columns.GridColumn gridColumn17; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn18; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn19; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn21; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn22; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn23; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn24; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn25; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn26; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn27; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn28; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn29; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn30; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn31; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn32; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn33; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn34; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn35; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn36; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn37; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn38; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn39; + private DevExpress.XtraEditors.LabelControl labelControl6; + private DevExpress.XtraEditors.TextEdit txt_wtOrg; + private DevExpress.XtraEditors.LabelControl labelControl5; + private DevExpress.XtraEditors.TextEdit txt_scOrg; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs index bd722e1..7c87bac 100644 --- a/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs +++ b/DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs @@ -20,8 +20,10 @@ InitializeComponent(); this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; + toolBarMenu1.btnLayoutClick += ToolBarMenu1_btnLayoutClick; List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gvList.Add(gridView1); + gvList.Add(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fstatus", "", (value) => @@ -147,6 +149,15 @@ } } + private void ToolBarMenu1_btnLayoutClick(object sender, EventArgs e) + { + string _formNamespace = this.GetType().FullName; + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gridView1); + gvList.Add(gvMx1); + Gs.DevApp.UserControl.showLayOut DevFrm = new showLayOut(_formNamespace, gvList); + DevFrm.ShowDialog(); + } private void getModel(string strGuid) { bool isEdit = false; diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs index 708a1cd..ceaafaf 100644 --- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs +++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs @@ -19,6 +19,7 @@ using DevExpress.XtraEditors.Controls; using DevExpress.XtraGrid; using DevExpress.XtraGrid.Columns; +using DevExpress.XtraGrid.Menu; using DevExpress.XtraGrid.Views.Grid; using DevExpress.XtraTab; using DevExpress.XtraTreeList; @@ -1921,48 +1922,68 @@ public static void getGridViewConfig(string namespaceFullName, List<DevExpress.XtraGrid.Views.Grid.GridView> gvList) { + // gridView1.ShowCustomization(); + // gridView1.OptionsMenu.EnableColumnMenu = false; + JArray array = new JArray(); + var _obj = new + { + formPath = namespaceFullName, + }; + try + { + string strJson = UtilityHelper.HttpPost("", "Fm/GetModel", JsonConvert.SerializeObject(_obj)); + ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); + if (_rtn.rtnCode > 0) + { + JObject _job = JObject.Parse(strJson); + foreach (var a in _job["rtnData"]["list"]) + { + array.Add(a); + } + } + else + ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + } + catch (Exception ex) + { + ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } foreach (GridView gridView1 in gvList) { - gridView1.OptionsView.ShowGroupPanel = false; - // gridView1.OptionsMenu.EnableColumnMenu = false; - gridView1.OptionsCustomization.AllowGroup = false; - if (string.IsNullOrEmpty(namespaceFullName)) return; - var _obj = new + gridView1.PopupMenuShowing += (s, e) => { - formPath = namespaceFullName, - }; - try - { - string strJson = UtilityHelper.HttpPost("", "Fm/GetModel", JsonConvert.SerializeObject(_obj)); - ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) + if (e.MenuType == DevExpress.XtraGrid.Views.Grid.GridMenuType.Column) { - JObject _job = JObject.Parse(strJson); - JArray array = new JArray(); - foreach (var a in _job["rtnData"]["list"]) + GridViewColumnMenu menu = e.Menu as GridViewColumnMenu; + if (menu != null) { - array.Add(a); - } - foreach (GridColumn column in gridView1.Columns) - { - JToken john = array.FirstOrDefault(t => t["controlId"].ToString().ToUpper() == column.Name.ToString().Trim().ToUpper()); - if (john != null) + string[] ary = { "Column Chooser", "Hide This Column", "Clear All Sorting", "Clear Sorting", "Sort Descending", "Sort Ascending", "Best Fit (all columns)" }; + for (int i = menu.Items.Count - 1; i >= 0; i--) { - string controlIdx = john["controlIdx"].ToString(); - string controlVisible = john["controlVisible"].ToString(); - if (!string.IsNullOrEmpty(controlIdx)) - column.VisibleIndex = int.Parse(controlIdx); - if (!string.IsNullOrEmpty(controlVisible)) - column.Visible = bool.Parse(controlVisible); + string _caption = menu.Items[i].Caption; + if (!ary.Contains(_caption)) + { + menu.Items.Remove(menu.Items[i]); + } } } } - else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); - } - catch (Exception ex) + }; + gridView1.OptionsView.ShowGroupPanel = false; + gridView1.OptionsCustomization.AllowGroup = false; + if (string.IsNullOrEmpty(namespaceFullName)) return; + foreach (GridColumn column in gridView1.Columns) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + JToken john = array.FirstOrDefault(t => t["controlId"].ToString().ToUpper() == column.Name.ToString().Trim().ToUpper()); + if (john != null) + { + string controlIdx = john["controlIdx"].ToString(); + string controlVisible = john["controlVisible"].ToString(); + if (!string.IsNullOrEmpty(controlIdx)) + column.VisibleIndex = int.Parse(controlIdx); + if (!string.IsNullOrEmpty(controlVisible)) + column.Visible = bool.Parse(controlVisible); + } } } } diff --git a/DevApp/Gs.DevApp/UserControl/showLayOut.Designer.cs b/DevApp/Gs.DevApp/UserControl/showLayOut.Designer.cs index f208d1a..3bd966c 100644 --- a/DevApp/Gs.DevApp/UserControl/showLayOut.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/showLayOut.Designer.cs @@ -30,12 +30,11 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(showLayOut)); this.panel1 = new System.Windows.Forms.Panel(); - this.labelControl1 = new DevExpress.XtraEditors.LabelControl(); - this.labelControl2 = new DevExpress.XtraEditors.LabelControl(); this.btnHf = new DevExpress.XtraEditors.SimpleButton(); this.txt_layOut = new DevExpress.XtraEditors.ComboBoxEdit(); this.btnCancel = new DevExpress.XtraEditors.SimpleButton(); this.btnSave = new DevExpress.XtraEditors.SimpleButton(); + this.labelControl1 = new DevExpress.XtraEditors.LabelControl(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txt_layOut.Properties)).BeginInit(); this.SuspendLayout(); @@ -43,41 +42,16 @@ // panel1 // this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.labelControl1); this.panel1.Controls.Add(this.btnHf); - this.panel1.Controls.Add(this.labelControl2); this.panel1.Controls.Add(this.txt_layOut); this.panel1.Controls.Add(this.btnCancel); this.panel1.Controls.Add(this.btnSave); - this.panel1.Controls.Add(this.labelControl1); this.panel1.Font = new System.Drawing.Font("Tahoma", 12F); this.panel1.Location = new System.Drawing.Point(11, 12); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(374, 215); + this.panel1.Size = new System.Drawing.Size(360, 215); this.panel1.TabIndex = 2; - // - // labelControl1 - // - this.labelControl1.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); - this.labelControl1.Appearance.ForeColor = System.Drawing.Color.Black; - this.labelControl1.Appearance.Options.UseFont = true; - this.labelControl1.Appearance.Options.UseForeColor = true; - this.labelControl1.Appearance.Options.UseTextOptions = true; - this.labelControl1.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; - this.labelControl1.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None; - this.labelControl1.Location = new System.Drawing.Point(23, 97); - this.labelControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.labelControl1.Name = "labelControl1"; - this.labelControl1.Size = new System.Drawing.Size(93, 18); - this.labelControl1.TabIndex = 236; - this.labelControl1.Text = "閫傜敤鑼冨洿锛�"; - // - // labelControl2 - // - this.labelControl2.Location = new System.Drawing.Point(34, 15); - this.labelControl2.Name = "labelControl2"; - this.labelControl2.Size = new System.Drawing.Size(165, 54); - this.labelControl2.TabIndex = 240; - this.labelControl2.Text = "閫傜敤鑼冨洿鍙嬫儏鎻愮ず锛歕r\n鍏湁灏嗕細褰卞搷鍒版墍鏈夌敤鎴穃r\n绉佹湁鍙細褰卞搷鑷繁"; // // btnHf // @@ -86,26 +60,26 @@ this.btnHf.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat; this.btnHf.Cursor = System.Windows.Forms.Cursors.Hand; this.btnHf.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.convert_16x161; - this.btnHf.Location = new System.Drawing.Point(137, 141); + this.btnHf.Location = new System.Drawing.Point(140, 110); this.btnHf.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnHf.Name = "btnHf"; - this.btnHf.Size = new System.Drawing.Size(98, 37); + this.btnHf.Size = new System.Drawing.Size(69, 37); this.btnHf.TabIndex = 241; - this.btnHf.Text = "鎭㈠榛樿"; + this.btnHf.Text = "娓呯┖"; // // txt_layOut // this.txt_layOut.EditValue = "-璇烽�夋嫨-"; - this.txt_layOut.Location = new System.Drawing.Point(122, 95); + this.txt_layOut.Location = new System.Drawing.Point(143, 52); this.txt_layOut.Name = "txt_layOut"; this.txt_layOut.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.txt_layOut.Properties.Items.AddRange(new object[] { "-璇烽�夋嫨-", - "鍏湁", - "绉佹湁"}); + "鏍囧噯鐗�", + "涓汉鐗�"}); this.txt_layOut.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - this.txt_layOut.Size = new System.Drawing.Size(128, 24); + this.txt_layOut.Size = new System.Drawing.Size(149, 24); this.txt_layOut.TabIndex = 239; // // btnCancel @@ -115,10 +89,10 @@ this.btnCancel.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat; this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCancel.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnCancel.ImageOptions.Image"))); - this.btnCancel.Location = new System.Drawing.Point(260, 141); + this.btnCancel.Location = new System.Drawing.Point(228, 110); this.btnCancel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(98, 37); + this.btnCancel.Size = new System.Drawing.Size(69, 37); this.btnCancel.TabIndex = 238; this.btnCancel.Text = "鍙栨秷"; // @@ -129,18 +103,26 @@ this.btnSave.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.HotFlat; this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSave.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.ImageOptions.Image"))); - this.btnSave.Location = new System.Drawing.Point(16, 141); + this.btnSave.Location = new System.Drawing.Point(53, 110); this.btnSave.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.btnSave.Name = "btnSave"; - this.btnSave.Size = new System.Drawing.Size(98, 37); + this.btnSave.Size = new System.Drawing.Size(69, 37); this.btnSave.TabIndex = 237; - this.btnSave.Text = "淇濆瓨璁剧疆"; + this.btnSave.Text = "淇濆瓨"; + // + // labelControl1 + // + this.labelControl1.Location = new System.Drawing.Point(53, 55); + this.labelControl1.Name = "labelControl1"; + this.labelControl1.Size = new System.Drawing.Size(90, 18); + this.labelControl1.TabIndex = 242; + this.labelControl1.Text = "璇烽�夋嫨鑼冨洿锛�"; // // showLayOut // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(397, 250); + this.ClientSize = new System.Drawing.Size(389, 250); this.Controls.Add(this.panel1); this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; this.MaximizeBox = false; @@ -161,8 +143,7 @@ private DevExpress.XtraEditors.ComboBoxEdit txt_layOut; private DevExpress.XtraEditors.SimpleButton btnCancel; private DevExpress.XtraEditors.SimpleButton btnSave; - private DevExpress.XtraEditors.LabelControl labelControl1; - private DevExpress.XtraEditors.LabelControl labelControl2; private DevExpress.XtraEditors.SimpleButton btnHf; + private DevExpress.XtraEditors.LabelControl labelControl1; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/showLayOut.cs b/DevApp/Gs.DevApp/UserControl/showLayOut.cs index 503f370..4eb4524 100644 --- a/DevApp/Gs.DevApp/UserControl/showLayOut.cs +++ b/DevApp/Gs.DevApp/UserControl/showLayOut.cs @@ -46,48 +46,51 @@ MsgHelper.Warning("璇烽�夋嫨閫傜敤鑼冨洿锛�"); return; } - GridView gridView1 = gridViews[0]; + System.Text.StringBuilder sb = new System.Text.StringBuilder(); - foreach (GridColumn column in gridView1.Columns) + foreach (GridView gridView1 in gridViews) { - string controlId = column.Name; - int controlPosX = 0; - int controlPosY = 0; - int controlWidth = 0; - int controlMinWidth = column.MinWidth; - int controlMaxWidth = column.MaxWidth; - int controlHeight = 0; - int controlVisible = column.Visible == true ? 1 : 0; - string controlTitle = string.IsNullOrEmpty(column.Caption.Trim()) ? "鏈畾涔�" : column.Caption.Trim(); - int controlIdx = column.VisibleIndex; - if (sb.Length > 0) - sb.Append("&"); - sb.Append(controlId); - sb.Append(","); - sb.Append(controlPosX); - sb.Append(","); - sb.Append(controlPosY); - sb.Append(","); - sb.Append(controlWidth); - sb.Append(","); - sb.Append(controlMinWidth); - sb.Append(","); - sb.Append(controlMaxWidth); - sb.Append(","); - sb.Append(controlHeight); - sb.Append(","); - sb.Append(controlVisible); - sb.Append(","); - sb.Append(controlTitle); - sb.Append(","); - sb.Append(controlIdx); + foreach (GridColumn column in gridView1.Columns) + { + string controlId = column.Name; + int controlPosX = 0; + int controlPosY = 0; + int controlWidth = 0; + int controlMinWidth = column.MinWidth; + int controlMaxWidth = column.MaxWidth; + int controlHeight = 0; + int controlVisible = column.Visible == true ? 1 : 0; + string controlTitle = string.IsNullOrEmpty(column.Caption.Trim()) ? "鏈畾涔�" : column.Caption.Trim(); + int controlIdx = column.VisibleIndex; + if (sb.Length > 0) + sb.Append("&"); + sb.Append(controlId); + sb.Append(","); + sb.Append(controlPosX); + sb.Append(","); + sb.Append(controlPosY); + sb.Append(","); + sb.Append(controlWidth); + sb.Append(","); + sb.Append(controlMinWidth); + sb.Append(","); + sb.Append(controlMaxWidth); + sb.Append(","); + sb.Append(controlHeight); + sb.Append(","); + sb.Append(controlVisible); + sb.Append(","); + sb.Append(controlTitle); + sb.Append(","); + sb.Append(controlIdx); + } } var _obj = new { applyUserGuid = txt_layOut.SelectedIndex, layoutLst = sb.ToString(), formPath = formNamespace, - intType= type + intType = type }; try { -- Gitblit v1.9.3