From c1a18e87764130bd4f2b5d7ed0abff5d88ae0f6a Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 21 五月 2025 17:19:13 +0800 Subject: [PATCH] 称重 --- DevApp/Gs.DevApp/DevFrm/FrmMain.cs | 12 + DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs | 105 ++++++----- DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs | 184 ++++++++++--------- DevApp/Gs.DevApp/App.config | 5 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs | 36 ++-- DevApp/Gs.DevApp/Program.cs | 19 + DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.Designer.cs | 156 ++++++++-------- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs | 2 8 files changed, 281 insertions(+), 238 deletions(-) diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config index c2dd903..2a019e7 100644 --- a/DevApp/Gs.DevApp/App.config +++ b/DevApp/Gs.DevApp/App.config @@ -28,13 +28,14 @@ </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" /> <add key="Version" value="0.1" /> <add key="IsAutoUpdater" value="0" /> + <add key="IsWeight" value="1" /> <add key="AutoUpdaterXml" value="http://192.168.1.145:86/AutoUpdater/AutoUpdater.xml" /> </appSettings> <userSettings> diff --git a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs index 68d8dff..b295357 100644 --- a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs +++ b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs @@ -298,13 +298,25 @@ return; } foreach (XtraTabPage item in tabControl.TabPages) + { if (item.Name == name) { + //鍚庢潵鍔犱笂锛屼负浜嗛噴鏀剧獥浣撹祫婧恇eg + //foreach (Control control in item.Controls) + //{ + // if (control is Form) + // { + // Form myForm = control as Form; + // myForm.Invoke((MethodInvoker)delegate { myForm.Dispose(); }); // 纭繚 UI 绾跨▼瀹夊叏鍦伴噴鏀捐祫婧� + // } + //} + //鍚庢潵鍔犱笂锛屼负浜嗛噴鏀剧獥浣撹祫婧恊nd tabControl.TabPages.Remove(item); item.Dispose(); TabPageDic.Remove(name); return; } + } } /// <summary> diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs index d97a1f1..42c417a 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs @@ -467,7 +467,7 @@ this.gv_lotNo.OptionsColumn.AllowEdit = false; this.gv_lotNo.Tag = "query_a.lot_no"; this.gv_lotNo.Visible = true; - this.gv_lotNo.VisibleIndex = 5; + this.gv_lotNo.VisibleIndex = 6; this.gv_lotNo.Width = 120; // // gv_lifnr @@ -480,7 +480,7 @@ this.gv_lifnr.OptionsColumn.AllowEdit = false; this.gv_lifnr.Tag = "query_a.lifnr"; this.gv_lifnr.Visible = true; - this.gv_lifnr.VisibleIndex = 6; + this.gv_lifnr.VisibleIndex = 7; this.gv_lifnr.Width = 200; // // gv_releaseNo @@ -493,7 +493,7 @@ this.gv_releaseNo.OptionsColumn.AllowEdit = false; this.gv_releaseNo.Tag = "query_a.release_no"; this.gv_releaseNo.Visible = true; - this.gv_releaseNo.VisibleIndex = 4; + this.gv_releaseNo.VisibleIndex = 2; this.gv_releaseNo.Width = 100; // // gv_itemId @@ -506,7 +506,7 @@ this.gv_itemId.OptionsColumn.AllowEdit = false; this.gv_itemId.Tag = "query_a.item_id"; this.gv_itemId.Visible = true; - this.gv_itemId.VisibleIndex = 7; + this.gv_itemId.VisibleIndex = 8; this.gv_itemId.Width = 30; // // gv_itemNo @@ -519,7 +519,7 @@ this.gv_itemNo.OptionsColumn.AllowEdit = false; this.gv_itemNo.Tag = "query_a.item_no"; this.gv_itemNo.Visible = true; - this.gv_itemNo.VisibleIndex = 8; + this.gv_itemNo.VisibleIndex = 9; this.gv_itemNo.Width = 136; // // gv_boardStyle @@ -532,7 +532,7 @@ this.gv_boardStyle.OptionsColumn.AllowEdit = false; this.gv_boardStyle.Tag = "query_a.board_style"; this.gv_boardStyle.Visible = true; - this.gv_boardStyle.VisibleIndex = 9; + this.gv_boardStyle.VisibleIndex = 10; this.gv_boardStyle.Width = 164; // // gridColumn14 @@ -543,7 +543,7 @@ this.gridColumn14.Name = "gridColumn14"; this.gridColumn14.OptionsColumn.ReadOnly = true; this.gridColumn14.Visible = true; - this.gridColumn14.VisibleIndex = 10; + this.gridColumn14.VisibleIndex = 11; this.gridColumn14.Width = 200; // // gv_fbatchQty @@ -556,7 +556,7 @@ this.gv_fbatchQty.OptionsColumn.AllowEdit = false; this.gv_fbatchQty.Tag = "query_a.fbatch_qty"; this.gv_fbatchQty.Visible = true; - this.gv_fbatchQty.VisibleIndex = 11; + this.gv_fbatchQty.VisibleIndex = 12; this.gv_fbatchQty.Width = 80; // // gv_fcheckResu @@ -569,7 +569,7 @@ this.gv_fcheckResu.OptionsColumn.AllowEdit = false; this.gv_fcheckResu.Tag = "query_a.fcheck_resu"; this.gv_fcheckResu.Visible = true; - this.gv_fcheckResu.VisibleIndex = 3; + this.gv_fcheckResu.VisibleIndex = 4; this.gv_fcheckResu.Width = 50; // // gv_fcovertQty @@ -594,7 +594,7 @@ this.gv_remarks.OptionsColumn.AllowEdit = false; this.gv_remarks.Tag = "query_a.remarks"; this.gv_remarks.Visible = true; - this.gv_remarks.VisibleIndex = 12; + this.gv_remarks.VisibleIndex = 13; this.gv_remarks.Width = 100; // // gv_fcheckBy @@ -607,7 +607,7 @@ this.gv_fcheckBy.OptionsColumn.AllowEdit = false; this.gv_fcheckBy.Tag = "query_a.fcheck_by"; this.gv_fcheckBy.Visible = true; - this.gv_fcheckBy.VisibleIndex = 13; + this.gv_fcheckBy.VisibleIndex = 14; this.gv_fcheckBy.Width = 118; // // gv_fcheckDate @@ -620,7 +620,7 @@ this.gv_fcheckDate.OptionsColumn.AllowEdit = false; this.gv_fcheckDate.Tag = "query_a.fcheck_date"; this.gv_fcheckDate.Visible = true; - this.gv_fcheckDate.VisibleIndex = 15; + this.gv_fcheckDate.VisibleIndex = 16; this.gv_fcheckDate.Width = 182; // // gv_createBy @@ -633,7 +633,7 @@ this.gv_createBy.OptionsColumn.AllowEdit = false; this.gv_createBy.Tag = "query_a.create_by"; this.gv_createBy.Visible = true; - this.gv_createBy.VisibleIndex = 14; + this.gv_createBy.VisibleIndex = 15; this.gv_createBy.Width = 67; // // gridColumn15 @@ -643,7 +643,7 @@ this.gridColumn15.MinWidth = 25; this.gridColumn15.Name = "gridColumn15"; this.gridColumn15.Visible = true; - this.gridColumn15.VisibleIndex = 16; + this.gridColumn15.VisibleIndex = 17; this.gridColumn15.Width = 94; // // gv_lastupdateBy @@ -656,7 +656,7 @@ this.gv_lastupdateBy.OptionsColumn.AllowEdit = false; this.gv_lastupdateBy.Tag = "query_a.lastupdate_by"; this.gv_lastupdateBy.Visible = true; - this.gv_lastupdateBy.VisibleIndex = 17; + this.gv_lastupdateBy.VisibleIndex = 18; this.gv_lastupdateBy.Width = 60; // // gv_lastupdateDate @@ -669,7 +669,7 @@ this.gv_lastupdateDate.OptionsColumn.AllowEdit = false; this.gv_lastupdateDate.Tag = "query_a.lastupdate_date"; this.gv_lastupdateDate.Visible = true; - this.gv_lastupdateDate.VisibleIndex = 18; + this.gv_lastupdateDate.VisibleIndex = 19; this.gv_lastupdateDate.Width = 120; // // gv_fngHandle @@ -682,7 +682,7 @@ this.gv_fngHandle.OptionsColumn.AllowEdit = false; this.gv_fngHandle.Tag = "query_a.fng_handle"; this.gv_fngHandle.Visible = true; - this.gv_fngHandle.VisibleIndex = 19; + this.gv_fngHandle.VisibleIndex = 5; this.gv_fngHandle.Width = 100; // // bandedGridColumn1 @@ -750,7 +750,7 @@ this.gridColumn5.Name = "gridColumn5"; this.gridColumn5.OptionsColumn.ReadOnly = true; this.gridColumn5.Visible = true; - this.gridColumn5.VisibleIndex = 2; + this.gridColumn5.VisibleIndex = 3; this.gridColumn5.Width = 94; // // gridColumn6 diff --git a/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.Designer.cs index 9162960..9ffb0e1 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.Designer.cs @@ -29,20 +29,20 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition5 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition6 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition7 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition8 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition6 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition7 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition8 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition9 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition10 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition3 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition4 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition4 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition5 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); + DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); @@ -64,6 +64,8 @@ this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn17 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn(); this.pageBar1 = new UserControls.Data.UcPageBar(); this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage(); this.splitMx1 = new DevExpress.XtraEditors.SplitContainerControl(); @@ -119,8 +121,6 @@ this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); this.tips = new DevExpress.Utils.ToolTipController(this.components); - this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn(); - this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); this.xtraTabControl1.SuspendLayout(); this.xtraTabPage1.SuspendLayout(); @@ -310,7 +310,7 @@ this.gridColumn1.MinWidth = 25; this.gridColumn1.Name = "gridColumn1"; this.gridColumn1.Visible = true; - this.gridColumn1.VisibleIndex = 2; + this.gridColumn1.VisibleIndex = 15; this.gridColumn1.Width = 94; // // gridColumn2 @@ -320,7 +320,7 @@ this.gridColumn2.Name = "gridColumn2"; this.gridColumn2.OptionsColumn.AllowEdit = false; this.gridColumn2.Visible = true; - this.gridColumn2.VisibleIndex = 3; + this.gridColumn2.VisibleIndex = 10; this.gridColumn2.Width = 150; // // gv_checkUser @@ -332,7 +332,7 @@ this.gv_checkUser.OptionsColumn.AllowEdit = false; this.gv_checkUser.Tag = "query_a.check_user"; this.gv_checkUser.Visible = true; - this.gv_checkUser.VisibleIndex = 4; + this.gv_checkUser.VisibleIndex = 11; this.gv_checkUser.Width = 94; // // gv_checkDate @@ -344,7 +344,7 @@ this.gv_checkDate.OptionsColumn.AllowEdit = false; this.gv_checkDate.Tag = "query_a.check_date"; this.gv_checkDate.Visible = true; - this.gv_checkDate.VisibleIndex = 5; + this.gv_checkDate.VisibleIndex = 12; this.gv_checkDate.Width = 180; // // gv_pba005 @@ -356,7 +356,7 @@ this.gv_pba005.OptionsColumn.AllowEdit = false; this.gv_pba005.Tag = "query_a.pba005"; this.gv_pba005.Visible = true; - this.gv_pba005.VisibleIndex = 6; + this.gv_pba005.VisibleIndex = 13; this.gv_pba005.Width = 94; // // gridColumn8 @@ -366,7 +366,7 @@ this.gridColumn8.MinWidth = 25; this.gridColumn8.Name = "gridColumn8"; this.gridColumn8.Visible = true; - this.gridColumn8.VisibleIndex = 7; + this.gridColumn8.VisibleIndex = 5; this.gridColumn8.Width = 94; // // gridColumn9 @@ -376,7 +376,7 @@ this.gridColumn9.MinWidth = 25; this.gridColumn9.Name = "gridColumn9"; this.gridColumn9.Visible = true; - this.gridColumn9.VisibleIndex = 8; + this.gridColumn9.VisibleIndex = 6; this.gridColumn9.Width = 94; // // gridColumn10 @@ -386,7 +386,7 @@ this.gridColumn10.MinWidth = 25; this.gridColumn10.Name = "gridColumn10"; this.gridColumn10.Visible = true; - this.gridColumn10.VisibleIndex = 9; + this.gridColumn10.VisibleIndex = 7; this.gridColumn10.Width = 94; // // gridColumn11 @@ -396,7 +396,7 @@ this.gridColumn11.MinWidth = 25; this.gridColumn11.Name = "gridColumn11"; this.gridColumn11.Visible = true; - this.gridColumn11.VisibleIndex = 10; + this.gridColumn11.VisibleIndex = 8; this.gridColumn11.Width = 94; // // gridColumn12 @@ -406,7 +406,7 @@ this.gridColumn12.MinWidth = 25; this.gridColumn12.Name = "gridColumn12"; this.gridColumn12.Visible = true; - this.gridColumn12.VisibleIndex = 11; + this.gridColumn12.VisibleIndex = 4; this.gridColumn12.Width = 94; // // gridColumn13 @@ -416,7 +416,7 @@ this.gridColumn13.MinWidth = 25; this.gridColumn13.Name = "gridColumn13"; this.gridColumn13.Visible = true; - this.gridColumn13.VisibleIndex = 12; + this.gridColumn13.VisibleIndex = 3; this.gridColumn13.Width = 94; // // gridColumn3 @@ -426,7 +426,7 @@ this.gridColumn3.MinWidth = 25; this.gridColumn3.Name = "gridColumn3"; this.gridColumn3.Visible = true; - this.gridColumn3.VisibleIndex = 13; + this.gridColumn3.VisibleIndex = 14; this.gridColumn3.Width = 94; // // gridColumn17 @@ -438,6 +438,26 @@ this.gridColumn17.Visible = true; this.gridColumn17.VisibleIndex = 1; this.gridColumn17.Width = 94; + // + // gridColumn18 + // + this.gridColumn18.Caption = "OA澶勭悊鐘舵��"; + this.gridColumn18.FieldName = "oaCheckStatusTxt"; + this.gridColumn18.MinWidth = 25; + this.gridColumn18.Name = "gridColumn18"; + this.gridColumn18.Visible = true; + this.gridColumn18.VisibleIndex = 2; + this.gridColumn18.Width = 94; + // + // gridColumn19 + // + this.gridColumn19.Caption = "OA澶勭悊鏃堕棿"; + this.gridColumn19.FieldName = "oaCheckDate"; + this.gridColumn19.MinWidth = 25; + this.gridColumn19.Name = "gridColumn19"; + this.gridColumn19.Visible = true; + this.gridColumn19.VisibleIndex = 9; + this.gridColumn19.Width = 94; // // pageBar1 // @@ -642,35 +662,35 @@ this.layoutControlItem3}); this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; this.Root.Name = "Root"; - columnDefinition5.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition5.Width = 100D; - columnDefinition6.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition6.Width = 100D; - columnDefinition7.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition7.Width = 100D; - columnDefinition8.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition8.Width = 100D; + columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition1.Width = 100D; + columnDefinition2.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition2.Width = 100D; + columnDefinition3.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition3.Width = 100D; + columnDefinition4.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition4.Width = 100D; this.Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { - columnDefinition5, - columnDefinition6, - columnDefinition7, - columnDefinition8}); - rowDefinition6.Height = 100D; - rowDefinition6.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition7.Height = 100D; - rowDefinition7.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition8.Height = 100D; - rowDefinition8.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition9.Height = 100D; - rowDefinition9.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition10.Height = 100D; - rowDefinition10.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition1, + columnDefinition2, + columnDefinition3, + columnDefinition4}); + rowDefinition1.Height = 100D; + rowDefinition1.SizeType = System.Windows.Forms.SizeType.Percent; + rowDefinition2.Height = 100D; + rowDefinition2.SizeType = System.Windows.Forms.SizeType.Percent; + rowDefinition3.Height = 100D; + rowDefinition3.SizeType = System.Windows.Forms.SizeType.Percent; + rowDefinition4.Height = 100D; + rowDefinition4.SizeType = System.Windows.Forms.SizeType.Percent; + rowDefinition5.Height = 100D; + rowDefinition5.SizeType = System.Windows.Forms.SizeType.Percent; this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { - rowDefinition6, - rowDefinition7, - rowDefinition8, - rowDefinition9, - rowDefinition10}); + rowDefinition1, + rowDefinition2, + rowDefinition3, + rowDefinition4, + rowDefinition5}); this.Root.Size = new System.Drawing.Size(1126, 163); this.Root.TextVisible = false; // @@ -1006,10 +1026,10 @@ // repositoryItemButtonEdit1 // this.repositoryItemButtonEdit1.AutoHeight = false; - editorButtonImageOptions2.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; - editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; + editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; + editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { - new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绉诲嚭", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绉诲嚭", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // @@ -1054,26 +1074,6 @@ this.layoutControlItem10.Name = "layoutControlItem10"; this.layoutControlItem10.Size = new System.Drawing.Size(0, 0); this.layoutControlItem10.TextSize = new System.Drawing.Size(50, 20); - // - // gridColumn18 - // - this.gridColumn18.Caption = "OA澶勭悊鐘舵��"; - this.gridColumn18.FieldName = "oaCheckStatusTxt"; - this.gridColumn18.MinWidth = 25; - this.gridColumn18.Name = "gridColumn18"; - this.gridColumn18.Visible = true; - this.gridColumn18.VisibleIndex = 14; - this.gridColumn18.Width = 94; - // - // gridColumn19 - // - this.gridColumn19.Caption = "OA澶勭悊鏃堕棿"; - this.gridColumn19.FieldName = "oaCheckDate"; - this.gridColumn19.MinWidth = 25; - this.gridColumn19.Name = "gridColumn19"; - this.gridColumn19.Visible = true; - this.gridColumn19.VisibleIndex = 15; - this.gridColumn19.Width = 94; // // MesQcExceptional // diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs index 948d1b4..81841d5 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs @@ -210,7 +210,7 @@ } else { - UtilityHelper.SetDefaultTable(gcMx1, gvMx1); + UtilityHelper.SetDefaultTable(gcMx2, gvMx2); } } else diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs index bb6a7f6..8df3115 100644 --- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs @@ -34,7 +34,6 @@ DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition(); DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition(); DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition4 = new DevExpress.XtraLayout.RowDefinition(); this.split1 = new DevExpress.XtraEditors.SplitContainerControl(); this.layoutMx1 = new DevExpress.XtraDataLayout.DataLayoutControl(); this.comLine = new Gs.DevApp.UserControl.UcLookWorkline(); @@ -46,14 +45,14 @@ this.comStopBits = new DevExpress.XtraEditors.ComboBoxEdit(); this.comParity = new DevExpress.XtraEditors.ComboBoxEdit(); this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); - this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); this.cmbBaudRate1111 = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); this.gcMx1 = new DevExpress.XtraGrid.GridControl(); this.gvMx1 = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -62,7 +61,6 @@ this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); - this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn8 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn10 = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -84,14 +82,14 @@ ((System.ComponentModel.ISupportInitialize)(this.comStopBits.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.comParity.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate1111)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit(); this.SuspendLayout(); @@ -113,7 +111,7 @@ this.split1.Panel2.Controls.Add(this.gcMx1); this.split1.Panel2.Text = "Panel2"; this.split1.Size = new System.Drawing.Size(1040, 511); - this.split1.SplitterPosition = 138; + this.split1.SplitterPosition = 109; this.split1.TabIndex = 1; // // layoutMx1 @@ -131,7 +129,7 @@ this.layoutMx1.Name = "layoutMx1"; this.layoutMx1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(310, 455, 812, 500); this.layoutMx1.Root = this.Root; - this.layoutMx1.Size = new System.Drawing.Size(1040, 138); + this.layoutMx1.Size = new System.Drawing.Size(1040, 109); this.layoutMx1.TabIndex = 0; this.layoutMx1.Text = "dataLayoutControl1"; // @@ -148,7 +146,7 @@ this.btnStart.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question; this.btnStart.Appearance.Options.UseBackColor = true; this.btnStart.Appearance.Options.UseFont = true; - this.btnStart.Location = new System.Drawing.Point(262, 105); + this.btnStart.Location = new System.Drawing.Point(512, 74); this.btnStart.Name = "btnStart"; this.btnStart.Size = new System.Drawing.Size(246, 27); this.btnStart.StyleController = this.layoutMx1; @@ -158,11 +156,12 @@ // // cmbSerialPortNum // - this.cmbSerialPortNum.Location = new System.Drawing.Point(94, 43); + this.cmbSerialPortNum.Location = new System.Drawing.Point(344, 12); this.cmbSerialPortNum.Name = "cmbSerialPortNum"; this.cmbSerialPortNum.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); this.cmbSerialPortNum.Properties.NullText = "-璇烽�夋嫨-"; + this.cmbSerialPortNum.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; this.cmbSerialPortNum.Size = new System.Drawing.Size(164, 24); this.cmbSerialPortNum.StyleController = this.layoutMx1; this.cmbSerialPortNum.TabIndex = 4; @@ -181,13 +180,14 @@ "2400", "1200"}); this.cmbBaudRate.Properties.NullText = "-璇烽�夋嫨-"; + this.cmbBaudRate.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; this.cmbBaudRate.Size = new System.Drawing.Size(164, 24); this.cmbBaudRate.StyleController = this.layoutMx1; this.cmbBaudRate.TabIndex = 5; // // txtNum // - this.txtNum.Location = new System.Drawing.Point(594, 53); + this.txtNum.Location = new System.Drawing.Point(594, 22); this.txtNum.Name = "txtNum"; this.txtNum.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 15F); this.txtNum.Properties.Appearance.Options.UseFont = true; @@ -198,7 +198,8 @@ // // comSjw // - this.comSjw.Location = new System.Drawing.Point(94, 74); + this.comSjw.EditValue = "8"; + this.comSjw.Location = new System.Drawing.Point(94, 43); this.comSjw.Name = "comSjw"; this.comSjw.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); @@ -208,12 +209,14 @@ "7", "8"}); this.comSjw.Properties.NullText = "-璇烽�夋嫨-"; + this.comSjw.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; this.comSjw.Size = new System.Drawing.Size(164, 24); this.comSjw.StyleController = this.layoutMx1; this.comSjw.TabIndex = 11; // // comStopBits // + this.comStopBits.EditValue = "1"; this.comStopBits.Location = new System.Drawing.Point(344, 74); this.comStopBits.Name = "comStopBits"; this.comStopBits.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { @@ -222,6 +225,7 @@ "1", "2"}); this.comStopBits.Properties.NullText = "-璇烽�夋嫨-"; + this.comStopBits.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; this.comStopBits.Size = new System.Drawing.Size(164, 24); this.comStopBits.StyleController = this.layoutMx1; this.comStopBits.TabIndex = 12; @@ -229,7 +233,7 @@ // comParity // this.comParity.EditValue = "None"; - this.comParity.Location = new System.Drawing.Point(94, 105); + this.comParity.Location = new System.Drawing.Point(94, 74); this.comParity.Name = "comParity"; this.comParity.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); @@ -238,6 +242,7 @@ "Odd", "Even"}); this.comParity.Properties.NullText = "-璇烽�夋嫨-"; + this.comParity.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; this.comParity.Size = new System.Drawing.Size(164, 24); this.comParity.StyleController = this.layoutMx1; this.comParity.TabIndex = 13; @@ -247,14 +252,14 @@ this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; this.Root.GroupBordersVisible = false; this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { - this.layoutControlItem1, this.cmbBaudRate1111, - this.layoutControlItem7, this.layoutControlItem8, + this.layoutControlItem3, + this.layoutControlItem1, + this.layoutControlItem7, this.layoutControlItem9, this.layoutControlItem4, - this.layoutControlItem2, - this.layoutControlItem3}); + this.layoutControlItem2}); this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; this.Root.Name = "Root"; columnDefinition1.SizeType = System.Windows.Forms.SizeType.Absolute; @@ -273,25 +278,12 @@ rowDefinition2.SizeType = System.Windows.Forms.SizeType.Percent; rowDefinition3.Height = 100D; rowDefinition3.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition4.Height = 100D; - rowDefinition4.SizeType = System.Windows.Forms.SizeType.Percent; this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { rowDefinition1, rowDefinition2, - rowDefinition3, - rowDefinition4}); - this.Root.Size = new System.Drawing.Size(1019, 144); + rowDefinition3}); + this.Root.Size = new System.Drawing.Size(1019, 113); this.Root.TextVisible = false; - // - // layoutControlItem1 - // - this.layoutControlItem1.Control = this.cmbSerialPortNum; - this.layoutControlItem1.Location = new System.Drawing.Point(0, 31); - this.layoutControlItem1.Name = "layoutControlItem1"; - this.layoutControlItem1.OptionsTableLayoutItem.RowIndex = 1; - this.layoutControlItem1.Size = new System.Drawing.Size(250, 31); - this.layoutControlItem1.Text = "涓插彛鍙�"; - this.layoutControlItem1.TextSize = new System.Drawing.Size(70, 18); // // cmbBaudRate1111 // @@ -304,16 +296,6 @@ this.cmbBaudRate1111.Text = "娉㈢壒鐜�"; this.cmbBaudRate1111.TextSize = new System.Drawing.Size(70, 18); // - // layoutControlItem7 - // - this.layoutControlItem7.Control = this.comSjw; - this.layoutControlItem7.Location = new System.Drawing.Point(0, 62); - this.layoutControlItem7.Name = "layoutControlItem7"; - this.layoutControlItem7.OptionsTableLayoutItem.RowIndex = 2; - this.layoutControlItem7.Size = new System.Drawing.Size(250, 31); - this.layoutControlItem7.Text = "鏁版嵁浣�"; - this.layoutControlItem7.TextSize = new System.Drawing.Size(70, 18); - // // layoutControlItem8 // this.layoutControlItem8.Control = this.comStopBits; @@ -325,13 +307,42 @@ this.layoutControlItem8.Text = "鍋滄浣�"; this.layoutControlItem8.TextSize = new System.Drawing.Size(70, 18); // + // layoutControlItem3 + // + this.layoutControlItem3.Control = this.comLine; + this.layoutControlItem3.Location = new System.Drawing.Point(0, 0); + this.layoutControlItem3.Name = "layoutControlItem3"; + this.layoutControlItem3.Size = new System.Drawing.Size(250, 31); + this.layoutControlItem3.Text = "閫夌嚎浣�"; + this.layoutControlItem3.TextSize = new System.Drawing.Size(70, 18); + // + // layoutControlItem1 + // + this.layoutControlItem1.Control = this.cmbSerialPortNum; + this.layoutControlItem1.Location = new System.Drawing.Point(250, 0); + this.layoutControlItem1.Name = "layoutControlItem1"; + this.layoutControlItem1.OptionsTableLayoutItem.ColumnIndex = 1; + this.layoutControlItem1.Size = new System.Drawing.Size(250, 31); + this.layoutControlItem1.Text = "涓插彛鍙�"; + this.layoutControlItem1.TextSize = new System.Drawing.Size(70, 18); + // + // layoutControlItem7 + // + this.layoutControlItem7.Control = this.comSjw; + this.layoutControlItem7.Location = new System.Drawing.Point(0, 31); + this.layoutControlItem7.Name = "layoutControlItem7"; + this.layoutControlItem7.OptionsTableLayoutItem.RowIndex = 1; + this.layoutControlItem7.Size = new System.Drawing.Size(250, 31); + this.layoutControlItem7.Text = "鏁版嵁浣�"; + this.layoutControlItem7.TextSize = new System.Drawing.Size(70, 18); + // // layoutControlItem9 // this.layoutControlItem9.Control = this.comParity; this.layoutControlItem9.CustomizationFormText = "鏍¢獙浣�"; - this.layoutControlItem9.Location = new System.Drawing.Point(0, 93); + this.layoutControlItem9.Location = new System.Drawing.Point(0, 62); this.layoutControlItem9.Name = "layoutControlItem9"; - this.layoutControlItem9.OptionsTableLayoutItem.RowIndex = 3; + this.layoutControlItem9.OptionsTableLayoutItem.RowIndex = 2; this.layoutControlItem9.Size = new System.Drawing.Size(250, 31); this.layoutControlItem9.Text = "鏍¢獙浣�"; this.layoutControlItem9.TextSize = new System.Drawing.Size(70, 18); @@ -342,10 +353,9 @@ this.layoutControlItem4.AppearanceItemCaption.Options.UseFont = true; this.layoutControlItem4.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center; this.layoutControlItem4.Control = this.txtNum; - this.layoutControlItem4.Location = new System.Drawing.Point(500, 31); + this.layoutControlItem4.Location = new System.Drawing.Point(500, 0); this.layoutControlItem4.Name = "layoutControlItem4"; this.layoutControlItem4.OptionsTableLayoutItem.ColumnIndex = 2; - this.layoutControlItem4.OptionsTableLayoutItem.RowIndex = 1; this.layoutControlItem4.OptionsTableLayoutItem.RowSpan = 2; this.layoutControlItem4.Size = new System.Drawing.Size(499, 62); this.layoutControlItem4.Text = "閲嶉噺"; @@ -354,22 +364,17 @@ // layoutControlItem2 // this.layoutControlItem2.Control = this.btnStart; - this.layoutControlItem2.Location = new System.Drawing.Point(250, 93); + this.layoutControlItem2.Location = new System.Drawing.Point(500, 62); + this.layoutControlItem2.MaxSize = new System.Drawing.Size(250, 31); + this.layoutControlItem2.MinSize = new System.Drawing.Size(41, 31); this.layoutControlItem2.Name = "layoutControlItem2"; - this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 1; - this.layoutControlItem2.OptionsTableLayoutItem.RowIndex = 3; - this.layoutControlItem2.Size = new System.Drawing.Size(250, 31); + this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 2; + this.layoutControlItem2.OptionsTableLayoutItem.RowIndex = 2; + this.layoutControlItem2.Size = new System.Drawing.Size(499, 31); + this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; + this.layoutControlItem2.Text = "鍚姩"; this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem2.TextVisible = false; - // - // layoutControlItem3 - // - this.layoutControlItem3.Control = this.comLine; - this.layoutControlItem3.Location = new System.Drawing.Point(0, 0); - this.layoutControlItem3.Name = "layoutControlItem3"; - this.layoutControlItem3.Size = new System.Drawing.Size(250, 31); - this.layoutControlItem3.Text = "閫夌嚎浣�"; - this.layoutControlItem3.TextSize = new System.Drawing.Size(70, 18); // // gcMx1 // @@ -377,7 +382,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(1040, 361); + this.gcMx1.Size = new System.Drawing.Size(1040, 390); this.gcMx1.TabIndex = 0; this.gcMx1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gvMx1}); @@ -391,7 +396,6 @@ this.gridColumn4, this.gridColumn5, this.gridColumn6, - this.gridColumn7, this.gridColumn8, this.gridColumn9, this.gridColumn10, @@ -404,6 +408,7 @@ // gridColumn1 // this.gridColumn1.Caption = "鏉$爜"; + this.gridColumn1.FieldName = "flowCode"; this.gridColumn1.MinWidth = 25; this.gridColumn1.Name = "gridColumn1"; this.gridColumn1.Visible = true; @@ -413,6 +418,7 @@ // gridColumn2 // this.gridColumn2.Caption = "宸ュ崟"; + this.gridColumn2.FieldName = "gdbh"; this.gridColumn2.MinWidth = 25; this.gridColumn2.Name = "gridColumn2"; this.gridColumn2.Visible = true; @@ -422,6 +428,7 @@ // gridColumn3 // this.gridColumn3.Caption = "鐗╂枡缂栫爜"; + this.gridColumn3.FieldName = "itemNo"; this.gridColumn3.MinWidth = 25; this.gridColumn3.Name = "gridColumn3"; this.gridColumn3.Visible = true; @@ -431,6 +438,7 @@ // gridColumn4 // this.gridColumn4.Caption = "鐗╂枡鍚嶇О"; + this.gridColumn4.FieldName = "itemName"; this.gridColumn4.MinWidth = 25; this.gridColumn4.Name = "gridColumn4"; this.gridColumn4.Visible = true; @@ -440,6 +448,7 @@ // gridColumn5 // this.gridColumn5.Caption = "鐗╂枡瑙勬牸"; + this.gridColumn5.FieldName = "itemModel"; this.gridColumn5.MinWidth = 25; this.gridColumn5.Name = "gridColumn5"; this.gridColumn5.Visible = true; @@ -448,74 +457,72 @@ // // gridColumn6 // - this.gridColumn6.Caption = "宸ュ簭缂栧彿"; + this.gridColumn6.Caption = "宸ュ簭"; + this.gridColumn6.FieldName = "processNo"; this.gridColumn6.MinWidth = 25; this.gridColumn6.Name = "gridColumn6"; this.gridColumn6.Visible = true; this.gridColumn6.VisibleIndex = 5; this.gridColumn6.Width = 94; // - // gridColumn7 - // - this.gridColumn7.Caption = "宸ュ簭鍚嶇О"; - this.gridColumn7.MinWidth = 25; - this.gridColumn7.Name = "gridColumn7"; - this.gridColumn7.Visible = true; - this.gridColumn7.VisibleIndex = 6; - this.gridColumn7.Width = 94; - // // gridColumn8 // this.gridColumn8.Caption = "绾垮埆"; + this.gridColumn8.FieldName = "lineName"; this.gridColumn8.MinWidth = 25; this.gridColumn8.Name = "gridColumn8"; this.gridColumn8.Visible = true; - this.gridColumn8.VisibleIndex = 7; + this.gridColumn8.VisibleIndex = 6; this.gridColumn8.Width = 94; // // gridColumn9 // this.gridColumn9.Caption = "浣滀笟浜哄憳"; + this.gridColumn9.FieldName = "createBy"; this.gridColumn9.MinWidth = 25; this.gridColumn9.Name = "gridColumn9"; this.gridColumn9.Visible = true; - this.gridColumn9.VisibleIndex = 8; + this.gridColumn9.VisibleIndex = 7; this.gridColumn9.Width = 94; // // gridColumn10 // this.gridColumn10.Caption = "浣滀笟鏃堕棿"; + this.gridColumn10.FieldName = "createDate"; this.gridColumn10.MinWidth = 25; this.gridColumn10.Name = "gridColumn10"; this.gridColumn10.Visible = true; - this.gridColumn10.VisibleIndex = 9; + this.gridColumn10.VisibleIndex = 8; this.gridColumn10.Width = 94; // // gridColumn11 // this.gridColumn11.Caption = "瀹為檯閲嶉噺"; + this.gridColumn11.FieldName = "sjWeight"; this.gridColumn11.MinWidth = 25; this.gridColumn11.Name = "gridColumn11"; this.gridColumn11.Visible = true; - this.gridColumn11.VisibleIndex = 10; + this.gridColumn11.VisibleIndex = 9; this.gridColumn11.Width = 94; // // gridColumn12 // this.gridColumn12.Caption = "閲嶉噺涓婇檺"; + this.gridColumn12.FieldName = "maxWeight"; this.gridColumn12.MinWidth = 25; this.gridColumn12.Name = "gridColumn12"; this.gridColumn12.Visible = true; - this.gridColumn12.VisibleIndex = 11; + this.gridColumn12.VisibleIndex = 10; this.gridColumn12.Width = 94; // // gridColumn13 // this.gridColumn13.Caption = "閲嶉噺涓嬮檺"; + this.gridColumn13.FieldName = "minWeight"; this.gridColumn13.MinWidth = 25; this.gridColumn13.Name = "gridColumn13"; this.gridColumn13.Visible = true; - this.gridColumn13.VisibleIndex = 12; + this.gridColumn13.VisibleIndex = 11; this.gridColumn13.Width = 94; // // Frm_Work09 @@ -524,8 +531,10 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1040, 511); this.Controls.Add(this.split1); + this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black; this.Name = "Frm_Work09"; this.Text = "绉伴噸閲囬泦"; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).EndInit(); this.split1.Panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.split1.Panel2)).EndInit(); @@ -541,14 +550,14 @@ ((System.ComponentModel.ISupportInitialize)(this.comStopBits.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.comParity.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.cmbBaudRate1111)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).EndInit(); this.ResumeLayout(false); @@ -563,16 +572,11 @@ private DevExpress.XtraEditors.ComboBoxEdit cmbBaudRate; private DevExpress.XtraEditors.TextEdit txtNum; private DevExpress.XtraEditors.ComboBoxEdit comSjw; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraEditors.ComboBoxEdit comStopBits; private DevExpress.XtraEditors.ComboBoxEdit comParity; private DevExpress.XtraLayout.LayoutControlItem cmbBaudRate1111; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; private DevExpress.XtraEditors.SimpleButton btnStart; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraGrid.GridControl gcMx1; private DevExpress.XtraGrid.Views.Grid.GridView gvMx1; private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; @@ -581,7 +585,6 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; private DevExpress.XtraGrid.Columns.GridColumn gridColumn5; private DevExpress.XtraGrid.Columns.GridColumn gridColumn6; - private DevExpress.XtraGrid.Columns.GridColumn gridColumn7; private DevExpress.XtraGrid.Columns.GridColumn gridColumn8; private DevExpress.XtraGrid.Columns.GridColumn gridColumn9; private DevExpress.XtraGrid.Columns.GridColumn gridColumn10; @@ -590,5 +593,10 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn13; private UserControl.UcLookWorkline comLine; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs index bc434a9..19b3a47 100644 --- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs +++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs @@ -1,6 +1,5 @@ 锘縰sing System; using System.Collections.Generic; -using System.Data; using System.IO.Ports; using System.Timers; using System.Windows.Forms; @@ -8,12 +7,12 @@ using Gs.DevApp.ToolBox; using Newtonsoft.Json; - namespace Gs.DevApp.DevFrm.Work { public partial class Frm_Work09 : DevExpress.XtraEditors.XtraForm { string _webServiceName = "WorkWeight/"; + string value = string.Empty; /// <summary> /// 涓插彛绫� /// </summary> @@ -28,12 +27,20 @@ /// </summary> private HandleInterfaceUpdataDelegate interfaceUpdataHandle; - System.Timers.Timer timer = new System.Timers.Timer(10000); // 1000姣闂撮殧 - public Frm_Work09() { InitializeComponent(); + this.FormClosing += (s, e) => + { + if (Sp.IsOpen) + Sp.Close(); + if (timer != null) + { + timer.Stop(); + timer.Dispose(); + } + }; GetComList(); this.comLine.getSuppler(""); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); @@ -51,7 +58,6 @@ cmbSerialPortNum.Properties.Items.Add(port); } } - /// <summary> /// 鍚姩浜嬩欢 /// </summary> @@ -60,11 +66,11 @@ private void btnStart_Click(object sender, EventArgs e) { string _comLine = comLine.GetId(); - string _cmbSerialPortNum = cmbSerialPortNum.SelectedText.Trim(); - string _cmbBaudRate = cmbBaudRate.SelectedText.Trim(); - string _comSjw = comSjw.SelectedText.Trim(); - string _comStopBits = comStopBits.SelectedText.Trim(); - string _comParity = comParity.SelectedText.Trim(); + string _cmbSerialPortNum = cmbSerialPortNum.Text.Trim(); + string _cmbBaudRate = cmbBaudRate.Text.Trim(); + string _comSjw = comSjw.Text.Trim(); + string _comStopBits = comStopBits.Text.Trim(); + string _comParity = comParity.Text.Trim(); if (string.IsNullOrEmpty(_comLine)) { Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨绾夸綋"); @@ -91,7 +97,7 @@ } if (comStopBits.SelectedIndex < 0) { - Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鏁板仠姝綅"); + Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍋滄浣�"); this.comStopBits.Focus(); return; } @@ -104,42 +110,35 @@ try { interfaceUpdataHandle = new HandleInterfaceUpdataDelegate(UpdateTextBox);//瀹炰緥鍖栧鎵樺璞� - Sp.RtsEnable = true; - Sp.DtrEnable = true; Sp.ReceivedBytesThreshold = 1; - Sp.PortName = this.cmbSerialPortNum.Text.Trim(); - Sp.BaudRate = Convert.ToInt32(this.cmbBaudRate.Text.Trim()); - // Sp.Parity = Parity.Even; + Sp.PortName = _cmbSerialPortNum; + Sp.BaudRate = Convert.ToInt32(_cmbBaudRate);//璁剧疆娉㈢壒鐜� if (Enum.TryParse(_comParity, out Parity pt1)) { - Sp.Parity = pt1; + Sp.Parity = pt1;// 璁剧疆鏍¢獙浣� } else { Gs.DevApp.ToolBox.MsgHelper.ShowError("鏃犳硶璇嗗埆鐨勬牎楠�"); } - // Sp.StopBits = StopBits.One; if (Enum.TryParse(_comStopBits, out StopBits pt2)) { - Sp.StopBits = pt2; + Sp.StopBits = pt2;//璁剧疆鍋滄浣� } else { Gs.DevApp.ToolBox.MsgHelper.ShowError("鏃犳硶璇嗗埆鐨勫仠姝綅"); } + Sp.DataBits = int.Parse(_comSjw); // 璁剧疆鏁版嵁浣� Sp.DataReceived += new SerialDataReceivedEventHandler(Sp_DataReceived); Sp.ReceivedBytesThreshold = 1; - LogHelper.Debug(this.ToString(), "鎵撳紑涓插彛閫氫俊"); + LogHelper.Debug(this.ToString(), "鎵撳紑涓插彛閫氫俊PortName-" + Sp.PortName.ToString() + ",BaudRate-" + Sp.BaudRate.ToString() + ",StopBits-" + Sp.StopBits.ToString() + ",Parity-" + Sp.Parity.ToString()); if (!Sp.IsOpen) Sp.Open(); setEnable(false); - //timer1.Enabled = false; - // LogHelper.Debug(this.ToString(), "鍚姩鍒锋柊鏁版嵁瀹氭椂鍣�"); - // timer1.Start(); timer.Elapsed += OnTimedEvent; timer.AutoReset = true; // 璁剧疆涓簍rue琛ㄧず閲嶅鎵ц锛宖alse琛ㄧず鎵ц涓�娆″悗鍋滄 timer.Enabled = true; // 寮�濮嬭鏃� - Gs.DevApp.ToolBox.MsgHelper.ShowInformation("鎵撳紑鎴愬姛锛�"); } catch (Exception exe) @@ -150,36 +149,26 @@ } /// <summary> - /// 涓叉敹鍒版暟鎹� + /// 涓插彛鏀跺埌鏁版嵁 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void Sp_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { - //string start = "\nwn"; string abc = string.Empty; - string strTemp = ""; try { - LogHelper.Debug(this.ToString(), $"1鐩戝惉鍒版暟鎹紑濮�: "); int i = Sp.BytesToRead; - LogHelper.Debug(this.ToString(), $"2鐩戝惉鍒板瓧鑺傛暟:{i}"); if (i > 0) { abc = Sp.ReadExisting(); - LogHelper.Debug(this.ToString(), $"3鐩戝惉鍒版暟鎹�:{abc}"); - //strTemp = abc.Substring(7, 7); - //LogHelper.Debug(this.ToString(), :鎴彇鏁版嵁:{strTemp}"); - //value = Math.Round(float.Parse(strTemp), 2).ToString(); - //LogHelper.Debug(this.ToString(), :杞崲鏁版嵁:{value}"); - //this.Invoke(interfaceUpdataHandle, value); + LogHelper.Debug(this.ToString(), $"鐩戝惉鍒版暟鎹�:{abc}"); this.Invoke(interfaceUpdataHandle, abc); } } catch (Exception ex) { - LogHelper.Debug(this.ToString(), ex.Message); - Gs.DevApp.ToolBox.MsgHelper.ShowError("鏀跺埌鏁版嵁:" + ex.Message); + LogHelper.Debug(this.ToString(), $"鐩戝惉鍒版暟鎹甧rror:{ex.Message}"); return; } } @@ -190,8 +179,26 @@ /// <param name="text"></param> private void UpdateTextBox(string text) { - txtNum.Text = text; - addModel(); + //ST,GS,+ 250.2kg + string _tmpStr = text.Trim(); + if (_tmpStr.Length <= 0) + { + LogHelper.Debug(this.ToString(), "_tmpStr闀垮害<=0锛岄��鍑轰笂鎶�"); + return; + } + if (!_tmpStr.Contains("ST")) + { + LogHelper.Debug(this.ToString(), "_tmpStr閲嶉噺鐘舵�佷笉涓篠T锛岄��鍑轰笂鎶�"); + return; + } + if (!_tmpStr.Contains("+")) + { + LogHelper.Debug(this.ToString(), "_tmpStr閲嶉噺+锛岄��鍑轰笂鎶�"); + return; + } + _tmpStr = _tmpStr.Substring(7); + txtNum.Text = _tmpStr; + addModel(_tmpStr); } /// <summary> /// 鍚敤鎴栫鐢� @@ -210,10 +217,9 @@ /// <summary> /// 涓婁紶绉伴噸鏁版嵁 /// </summary> - private void addModel() + private void addModel(string _realWeight) { string _lineId = comLine.GetId(); - string _realWeight = txtNum.Text.Trim(); var _obj = new { lineId = _lineId, @@ -235,7 +241,12 @@ } } - private void OnTimedEvent(Object source, ElapsedEventArgs e) + /// <summary> + /// 瀹氭椂璇诲彇鍒楄〃 + /// </summary> + /// <param name="source"></param> + /// <param name="e"></param> + private void OnTimedEvent(Object source, ElapsedEventArgs e) { var _obj = new { @@ -244,11 +255,11 @@ try { var lst = new List<string>(); - var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModelList", JsonConvert.SerializeObject(_obj),false); + var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModelList", JsonConvert.SerializeObject(_obj), false); var dd = UtilityHelper.ReturnToList(strReturn); var dt = dd.rtnData; - BeginInvoke(new Action(() => { - // txtNum.Text = DateTime.Now.ToString(); + BeginInvoke(new Action(() => + { gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); @@ -257,9 +268,9 @@ } catch (Exception ex) { - MessageBox.Show(ex.Message); + MessageBox.Show("gvMx1:" + ex.Message); } - } + } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/Program.cs b/DevApp/Gs.DevApp/Program.cs index 7168958..0af929f 100644 --- a/DevApp/Gs.DevApp/Program.cs +++ b/DevApp/Gs.DevApp/Program.cs @@ -1,11 +1,12 @@ 锘縰sing CefSharp; using CefSharp.WinForms; using Gs.DevApp.DevFrm; +using Gs.DevApp.DevFrm.Work; using System; +using System.Configuration; using System.Diagnostics; using System.IO; using System.Windows.Forms; -using static System.Windows.Forms.VisualStyles.VisualStyleElement.ExplorerBar; namespace Gs.DevApp { @@ -41,7 +42,6 @@ { //Application.Run(new XtraForm1()); //return; - CefSettings settings = new CefSettings(); settings.Locale = "zh-CN"; Cef.Initialize(settings); @@ -51,8 +51,19 @@ fmLogin.ShowDialog(); if (fmLogin.DialogResult == DialogResult.OK) { - Application.Run(new FrmMain()); - // Application.Run(new DevFrm.User.SysMenu()); + //Application.Run(new DevFrm.User.SysMenu()); + string IsWeight = "0"; + try + { + IsWeight = ConfigurationManager.AppSettings["IsWeight"]; + } + catch (Exception) + { + } + if (IsWeight == "1") + Application.Run(new Frm_Work09()); + else + Application.Run(new FrmMain()); } } else -- Gitblit v1.9.3