From 2066a7e10e20433f7445431d6d34a9026c29f663 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期一, 23 十二月 2024 08:43:43 +0800 Subject: [PATCH] 细节 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs | 37 +++--- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs | 60 ++++----- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs | 58 ++++----- DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.Designer.cs | 6 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs | 19 +++ DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs | 47 ++++--- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.Designer.cs | 2 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.Designer.cs | 32 ++-- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.Designer.cs | 43 +++--- 9 files changed, 158 insertions(+), 146 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.Designer.cs index 1c9d345..a49a62a 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.Designer.cs @@ -226,6 +226,7 @@ // toolBarMenu1 // this.toolBarMenu1.chkParameter = "MES_SYS_LOOKUP_TYPES,check_date,check_status,check_by"; + this.toolBarMenu1.currentAction = null; this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; this.toolBarMenu1.guidKey = null; this.toolBarMenu1.isSetBtn = false; @@ -292,12 +293,12 @@ // this.gridColumn1.Caption = "瀹℃牳鏃堕棿"; this.gridColumn1.FieldName = "checkDate"; - this.gridColumn1.MinWidth = 25; + this.gridColumn1.MinWidth = 180; this.gridColumn1.Name = "gridColumn1"; this.gridColumn1.OptionsColumn.AllowEdit = false; this.gridColumn1.Visible = true; this.gridColumn1.VisibleIndex = 4; - this.gridColumn1.Width = 94; + this.gridColumn1.Width = 180; // // xtraTabControl1 // @@ -336,7 +337,6 @@ this.xtraTabPage2.Controls.Add(this.tabMx); this.xtraTabPage2.Controls.Add(this.panel1); this.xtraTabPage2.Name = "xtraTabPage2"; - this.xtraTabPage2.Size = new System.Drawing.Size(1126, 570); this.xtraTabPage2.Text = "鏁版嵁璇︾粏"; // diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs index 8fafd11..b9b819e 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.Designer.cs @@ -192,6 +192,7 @@ this.lb_modify1Flag = new DevExpress.XtraEditors.LabelControl(); this.lb_lotNo = new DevExpress.XtraEditors.LabelControl(); this.txt_lotNo = new DevExpress.XtraEditors.TextEdit(); + this.picCheckBox = new System.Windows.Forms.PictureBox(); this.tabMxPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).BeginInit(); @@ -236,6 +237,7 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_itemModel.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_itemNo.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_lotNo.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).BeginInit(); this.SuspendLayout(); // // tabMxPage1 @@ -777,6 +779,7 @@ // toolBarMenu1 // this.toolBarMenu1.chkParameter = "0,0,0,0,000chk_iqc_detect01_submit"; + this.toolBarMenu1.currentAction = null; this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; this.toolBarMenu1.guidKey = null; this.toolBarMenu1.isSetBtn = false; @@ -1556,7 +1559,6 @@ this.xtraTabPage2.Controls.Add(this.xtraTabControl2); this.xtraTabPage2.Controls.Add(this.panel1); this.xtraTabPage2.Name = "xtraTabPage2"; - this.xtraTabPage2.Size = new System.Drawing.Size(1342, 688); this.xtraTabPage2.Text = "鏁版嵁璇︾粏"; // @@ -1973,14 +1975,27 @@ this.txt_lotNo.Size = new System.Drawing.Size(150, 28); this.txt_lotNo.TabIndex = 262; // + // picCheckBox + // + this.picCheckBox.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck; + this.picCheckBox.Location = new System.Drawing.Point(921, 42); + this.picCheckBox.Name = "picCheckBox"; + this.picCheckBox.Size = new System.Drawing.Size(100, 50); + this.picCheckBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.picCheckBox.TabIndex = 6; + this.picCheckBox.TabStop = false; + this.picCheckBox.Visible = false; + // // Frm_MesQaItemsDetect01 // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1344, 800); + this.Controls.Add(this.picCheckBox); this.Controls.Add(this.xtraTabControl1); this.Controls.Add(this.toolBarMenu1); this.Name = "Frm_MesQaItemsDetect01"; + this.Text = "鏉ユ枡妫�楠岀敵璇�"; this.tabMxPage1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl1.Panel1)).EndInit(); this.splitContainerControl1.Panel1.ResumeLayout(false); @@ -2027,6 +2042,7 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_itemModel.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_itemNo.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_lotNo.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).EndInit(); this.ResumeLayout(false); } @@ -2184,5 +2200,6 @@ private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand17; private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand24; private DevExpress.XtraGrid.Views.BandedGrid.GridBand gridBand25; + private System.Windows.Forms.PictureBox picCheckBox; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs index b6bff5c..c235171 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs @@ -1,17 +1,12 @@ -using DevExpress.Utils.About; -using DevExpress.XtraGrid.Views.Grid.ViewInfo; -using DevExpress.XtraRichEdit.Model; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; -using MES.Service.Modes; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Configuration; using System.Data; -using System.Drawing; using System.Net; using System.Threading.Tasks; using System.Windows.Forms; @@ -35,12 +30,22 @@ this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick; - gcMx1.MouseClick += GcMx1_MouseClick; Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "modify1FlagTxt", "", (value) => + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + getModel(value); + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; txt_itemId.EditChanged += (s, e) => @@ -52,7 +57,6 @@ this.btnLoad.Click += BtnLoad_Click; ucUpFile1.UpChanged += UcUpFile1_UpChanged; xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged; - } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { @@ -95,7 +99,7 @@ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); } } catch (Exception ex) @@ -179,7 +183,7 @@ if (_rtn.rtnCode > 0) { txtJianYan.Text = ""; - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); } } catch (Exception ex) @@ -189,17 +193,6 @@ } } - /// <summary> - /// 鍙屽嚮浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) - { - string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); - if (!string.IsNullOrEmpty(rowGuid)) - getModel(rowGuid, false, 999); - } /// <summary> /// 鍒嗛〉浜嬩欢 /// </summary> @@ -281,9 +274,9 @@ if (_rtn.rtnCode > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else - getPageList(1); + getPageList(this.pageBar1.CurrentPage); } } catch (Exception ex) @@ -300,7 +293,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> @@ -328,8 +321,10 @@ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); if (_rtn.rtnCode > 0) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); - getPageList(1); + if (xtraTabControl1.SelectedTabPageIndex == 0) + getPageList(this.pageBar1.CurrentPage); + else + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); } ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); } @@ -347,7 +342,7 @@ private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else { _filterList.Clear(); @@ -374,7 +369,8 @@ ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - getModel(rowGuid, true, 1); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); + UtilityHelper.ChangeEnableByControl(panel1.Controls, true); } /// <summary> /// 鏂板浜嬩欢 @@ -383,8 +379,8 @@ /// <param name="e"></param> private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 1); lbGuid.Text = ""; + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gridViews.Add(gvMx1); gridViews.Add(gvMx2); @@ -442,7 +438,6 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); @@ -478,15 +473,16 @@ } } - private void getModel(string strGuid, bool isEdit, int tabIdx) + private void getModel(string strGuid) { + bool isEdit = false; + if (toolBarMenu1.currentAction == "add") return; + if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); - var _obj = new { guid = strGuid,//涓诲缓 diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.Designer.cs index 001380a..014022f 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.Designer.cs @@ -716,6 +716,7 @@ // toolBarMenu1 // this.toolBarMenu1.chkParameter = "1,1,1,1,000chk_iqc_detect01_check"; + this.toolBarMenu1.currentAction = null; this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; this.toolBarMenu1.guidKey = null; this.toolBarMenu1.isSetBtn = false; @@ -1215,7 +1216,6 @@ this.xtraTabPage2.Controls.Add(this.xtraTabControl2); this.xtraTabPage2.Controls.Add(this.panel1); this.xtraTabPage2.Name = "xtraTabPage2"; - this.xtraTabPage2.Size = new System.Drawing.Size(1342, 688); this.xtraTabPage2.Text = "鏁版嵁璇︾粏"; // diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs index 401855b..fa6f27f 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Check.cs @@ -32,12 +32,22 @@ this.toolBarMenu1.btnCaiGouFchkClick += ToolBarMenu1_btnCaiGouFchkClick; this.toolBarMenu1.btnBoHuiClick += ToolBarMenu1_btnBoHuiClick; toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; - gcMx1.MouseClick += GcMx1_MouseClick; Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + getModel(value); + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; //鍒濆鍖栫墿鏂欓�夋嫨鍜屽悇绉嶄笅鎷� @@ -62,17 +72,7 @@ return; getList12(rowGuid); } - /// <summary> - /// 鍙屽嚮浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) - { - string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); - if (!string.IsNullOrEmpty(rowGuid)) - getModel(rowGuid, false, 999); - } + /// <summary> /// 鍒嗛〉浜嬩欢 /// </summary> @@ -121,7 +121,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> /// 淇濆瓨浜嬩欢 @@ -181,7 +181,8 @@ ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - getModel(rowGuid, true, 1); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); + UtilityHelper.ChangeEnableByControl(panel1.Controls, true); } /// <summary> /// 椹冲洖 @@ -388,7 +389,6 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); @@ -424,15 +424,16 @@ } } - private void getModel(string strGuid, bool isEdit, int tabIdx) + private void getModel(string strGuid) { + bool isEdit = false; + if (toolBarMenu1.currentAction == "add") return; + if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); - var _obj = new { guid = strGuid,//涓诲缓 diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.Designer.cs index 80f51ab..39ffaa2 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.Designer.cs @@ -108,7 +108,7 @@ this.gv_suppNo.OptionsColumn.AllowEdit = false; this.gv_suppNo.Tag = "query_a.SUPP_NO"; this.gv_suppNo.Visible = true; - this.gv_suppNo.VisibleIndex = 4; + this.gv_suppNo.VisibleIndex = 5; this.gv_suppNo.Width = 94; // // lb_itemId @@ -132,7 +132,7 @@ this.gv_itemId.OptionsColumn.AllowEdit = false; this.gv_itemId.Tag = "query_a.ITEM_ID"; this.gv_itemId.Visible = true; - this.gv_itemId.VisibleIndex = 1; + this.gv_itemId.VisibleIndex = 2; this.gv_itemId.Width = 94; // // lb_status @@ -157,7 +157,7 @@ this.gv_status.Tag = "query_a.STATUS"; this.gv_status.UnboundDataType = typeof(bool); this.gv_status.Visible = true; - this.gv_status.VisibleIndex = 10; + this.gv_status.VisibleIndex = 1; this.gv_status.Width = 94; // // lb_checkDate @@ -254,13 +254,13 @@ this.gv_lastupdateDate.AppearanceCell.Options.UseFont = true; this.gv_lastupdateDate.Caption = "鏈�鍚庢洿鏂版椂闂�"; this.gv_lastupdateDate.FieldName = "lastupdateDate"; - this.gv_lastupdateDate.MinWidth = 120; + this.gv_lastupdateDate.MinWidth = 180; this.gv_lastupdateDate.Name = "gv_lastupdateDate"; this.gv_lastupdateDate.OptionsColumn.AllowEdit = false; this.gv_lastupdateDate.Tag = "query_a.LASTUPDATE_DATE"; this.gv_lastupdateDate.Visible = true; - this.gv_lastupdateDate.VisibleIndex = 9; - this.gv_lastupdateDate.Width = 120; + this.gv_lastupdateDate.VisibleIndex = 10; + this.gv_lastupdateDate.Width = 180; // // lb_lastupdateBy // @@ -293,7 +293,7 @@ this.gv_lastupdateBy.OptionsColumn.AllowEdit = false; this.gv_lastupdateBy.Tag = "query_a.LASTUPDATE_BY"; this.gv_lastupdateBy.Visible = true; - this.gv_lastupdateBy.VisibleIndex = 8; + this.gv_lastupdateBy.VisibleIndex = 9; this.gv_lastupdateBy.Width = 94; // // gv_createDate @@ -302,13 +302,13 @@ this.gv_createDate.AppearanceCell.Options.UseFont = true; this.gv_createDate.Caption = "鍒涘缓鏃堕棿"; this.gv_createDate.FieldName = "createDate"; - this.gv_createDate.MinWidth = 120; + this.gv_createDate.MinWidth = 180; this.gv_createDate.Name = "gv_createDate"; this.gv_createDate.OptionsColumn.AllowEdit = false; this.gv_createDate.Tag = "query_a.CREATE_DATE"; this.gv_createDate.Visible = true; - this.gv_createDate.VisibleIndex = 7; - this.gv_createDate.Width = 120; + this.gv_createDate.VisibleIndex = 8; + this.gv_createDate.Width = 180; // // gv_createBy // @@ -321,7 +321,7 @@ this.gv_createBy.OptionsColumn.AllowEdit = false; this.gv_createBy.Tag = "query_a.CREATE_BY"; this.gv_createBy.Visible = true; - this.gv_createBy.VisibleIndex = 6; + this.gv_createBy.VisibleIndex = 7; this.gv_createBy.Width = 94; // // lb_itemNo @@ -355,12 +355,13 @@ this.gv_itemNo.OptionsColumn.AllowEdit = false; this.gv_itemNo.Tag = "query_a.ITEM_NO"; this.gv_itemNo.Visible = true; - this.gv_itemNo.VisibleIndex = 3; + this.gv_itemNo.VisibleIndex = 4; this.gv_itemNo.Width = 94; // // toolBarMenu1 // this.toolBarMenu1.chkParameter = "MES_QA_MJ,CHECK_DATE,STATUS,CHECK_USER"; + this.toolBarMenu1.currentAction = null; this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; this.toolBarMenu1.guidKey = null; this.toolBarMenu1.isSetBtn = false; @@ -390,6 +391,7 @@ this.gridView1.Appearance.Row.Options.UseFont = true; this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.gridColumn1, + this.gv_status, this.gv_itemId, this.gv_itemNo, this.gridColumn2, @@ -399,7 +401,6 @@ this.gv_createDate, this.gv_lastupdateBy, this.gv_lastupdateDate, - this.gv_status, this.gv_checkUser, this.gv_checkDate}); this.gridView1.GridControl = this.gcMain; @@ -430,7 +431,7 @@ this.gridColumn2.OptionsColumn.AllowEdit = false; this.gridColumn2.Tag = "query_b.item_name"; this.gridColumn2.Visible = true; - this.gridColumn2.VisibleIndex = 2; + this.gridColumn2.VisibleIndex = 3; this.gridColumn2.Width = 125; // // gridColumn3 @@ -442,7 +443,7 @@ this.gridColumn3.OptionsColumn.AllowEdit = false; this.gridColumn3.Tag = "d.supp_name"; this.gridColumn3.Visible = true; - this.gridColumn3.VisibleIndex = 5; + this.gridColumn3.VisibleIndex = 6; this.gridColumn3.Width = 125; // // xtraTabControl1 @@ -481,7 +482,6 @@ // this.xtraTabPage2.Controls.Add(this.panel1); this.xtraTabPage2.Name = "xtraTabPage2"; - this.xtraTabPage2.Size = new System.Drawing.Size(1213, 570); this.xtraTabPage2.Text = "鏁版嵁璇︾粏"; // diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs index 29dd963..eaae209 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs @@ -28,8 +28,17 @@ this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; - - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", ""); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "", (value) => + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + getModel(value); + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; txt_itemId.EditChanged += (s, e) => @@ -49,17 +58,7 @@ getPageList(1); } - /// <summary> - /// 鍙屽嚮浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) - { - string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); - if (!string.IsNullOrEmpty(rowGuid)) - getModel(rowGuid, false, 999); - } + /// <summary> /// 鍒嗛〉浜嬩欢 /// </summary> @@ -101,7 +100,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> @@ -148,7 +147,7 @@ private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else { _filterList.Clear(); @@ -175,7 +174,8 @@ ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - getModel(rowGuid, true, 1); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); + UtilityHelper.ChangeEnableByControl(panel1.Controls, true); } /// <summary> /// 鏂板浜嬩欢 @@ -184,9 +184,9 @@ /// <param name="e"></param> private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 1); lbGuid.Text = ""; - UtilityHelper.CleanValueByControl(this.panel1.Controls, true); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); + UtilityHelper.CleanValueByControl(panel1.Controls, true); } /// <summary> /// 淇濆瓨浜嬩欢 @@ -284,14 +284,16 @@ /// <param name="strGuid">涓婚敭</param> /// <param name="isEdit">鏄惁鍙紪杈�</param> /// <param name="tabIdx">閫夐」鍗″簭鍙�</param> - private void getModel(string strGuid, bool isEdit, int tabIdx) + private void getModel(string strGuid) { + bool isEdit = false; + if (toolBarMenu1.currentAction == "add") return; + if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); var _obj = new { guid = strGuid,//涓诲缓 @@ -380,16 +382,15 @@ if (_rtn.rtnCode > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else - getPageList(1); + getPageList(this.pageBar1.CurrentPage); } } catch (Exception ex) { MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - } } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.Designer.cs index 77e516e..21de1bc 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.Designer.cs @@ -29,16 +29,16 @@ /// </summary> private void InitializeComponent() { - DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions4 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject13 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject(); + 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(); + 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(); this.gvMx1pid = new DevExpress.XtraGrid.Columns.GridColumn(); this.gvMx1facLevel = new DevExpress.XtraGrid.Columns.GridColumn(); this.rptJSSP = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); @@ -444,10 +444,10 @@ // repositoryItemButtonEdit1 // this.repositoryItemButtonEdit1.AutoHeight = false; - editorButtonImageOptions3.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; - editorButtonImageOptions3.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, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", 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; this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick); @@ -478,13 +478,14 @@ this.gv_isenabled.AppearanceCell.Options.UseFont = true; this.gv_isenabled.Caption = "鏄惁鍙敤"; this.gv_isenabled.FieldName = "isenabled"; + this.gv_isenabled.MaxWidth = 50; this.gv_isenabled.MinWidth = 50; this.gv_isenabled.Name = "gv_isenabled"; this.gv_isenabled.OptionsColumn.AllowEdit = false; this.gv_isenabled.Tag = "query_a.ISENABLED"; this.gv_isenabled.Visible = true; this.gv_isenabled.VisibleIndex = 1; - this.gv_isenabled.Width = 94; + this.gv_isenabled.Width = 50; // // lb_fversion // @@ -590,13 +591,14 @@ this.gv_ftwoChecked.AppearanceCell.Options.UseFont = true; this.gv_ftwoChecked.Caption = "鎵瑰噯鏍囪"; this.gv_ftwoChecked.FieldName = "ftwoChecked"; + this.gv_ftwoChecked.MaxWidth = 50; this.gv_ftwoChecked.MinWidth = 50; this.gv_ftwoChecked.Name = "gv_ftwoChecked"; this.gv_ftwoChecked.OptionsColumn.AllowEdit = false; this.gv_ftwoChecked.Tag = "query_a.FTWO_CHECKED"; this.gv_ftwoChecked.Visible = true; this.gv_ftwoChecked.VisibleIndex = 3; - this.gv_ftwoChecked.Width = 94; + this.gv_ftwoChecked.Width = 50; // // lb_foneCheckdate // @@ -682,13 +684,14 @@ this.gv_foneChecked.AppearanceCell.Options.UseFont = true; this.gv_foneChecked.Caption = "瀹℃牳鏍囪"; this.gv_foneChecked.FieldName = "foneChecked"; + this.gv_foneChecked.MaxWidth = 50; this.gv_foneChecked.MinWidth = 50; this.gv_foneChecked.Name = "gv_foneChecked"; this.gv_foneChecked.OptionsColumn.AllowEdit = false; this.gv_foneChecked.Tag = "query_a.FONE_CHECKED"; this.gv_foneChecked.Visible = true; this.gv_foneChecked.VisibleIndex = 2; - this.gv_foneChecked.Width = 94; + this.gv_foneChecked.Width = 50; // // lb_itemNo // @@ -750,6 +753,7 @@ // toolBarMenu1 // this.toolBarMenu1.chkParameter = " 0,0,0,0,000chk_mes_CHECKITEM"; + this.toolBarMenu1.currentAction = null; this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; this.toolBarMenu1.guidKey = null; this.toolBarMenu1.isSetBtn = false; @@ -912,7 +916,6 @@ this.xtraTabPage2.Controls.Add(this.tabMx); this.xtraTabPage2.Controls.Add(this.panel1); this.xtraTabPage2.Name = "xtraTabPage2"; - this.xtraTabPage2.Size = new System.Drawing.Size(1127, 570); this.xtraTabPage2.Text = "鏁版嵁璇︾粏"; // @@ -1045,10 +1048,10 @@ // repositoryItemButtonEdit3 // this.repositoryItemButtonEdit3.AutoHeight = false; - editorButtonImageOptions4.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; - editorButtonImageOptions4.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; + editorButtonImageOptions2.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; + editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; this.repositoryItemButtonEdit3.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { - new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "绉诲嚭", -1, true, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); + 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)}); this.repositoryItemButtonEdit3.Name = "repositoryItemButtonEdit3"; this.repositoryItemButtonEdit3.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; this.repositoryItemButtonEdit3.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit3_ButtonClick); diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs index 26c9857..414edf0 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs @@ -31,33 +31,28 @@ toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick; - - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", ""); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", "", (value) => + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + getModel(value); + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; _setIno(); btnSave.Click += BtnSave_Click; } - private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); Task.Delay(100); getPageList(1); - } - /// <summary> - /// 鍙屽嚮浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) - { - var rowGuid = - UtilityHelper.GetCurrentDoubleRow(gridView1, - e, "guid"); - if (!string.IsNullOrEmpty(rowGuid)) - getModel(rowGuid, false, 999); } /// <summary> @@ -142,7 +137,7 @@ private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else { _filterList.Clear(); @@ -170,7 +165,8 @@ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - getModel(rowGuid, true, 1); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); + UtilityHelper.ChangeEnableByControl(panel1.Controls, true); } @@ -181,13 +177,11 @@ /// <param name="e"></param> private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 1); lbGuid.Text = ""; - var gridViews = - new List<GridView>(); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); + var gridViews = new List<GridView>(); gridViews.Add(gvMx1); - UtilityHelper.CleanValueByControl(panel1.Controls, true, - gridViews); + UtilityHelper.CleanValueByControl(panel1.Controls, true, gridViews); UtilityHelper.SetDefaultTable(gcMx1, gvMx1); xtraTabPageCopy.PageEnabled = false; } @@ -309,14 +303,16 @@ } - private void getModel(string strGuid, bool isEdit, int tabIdx) + private void getModel(string strGuid) { + bool isEdit = false; + if (toolBarMenu1.currentAction == "add") return; + if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); xtraTabPageCopy.PageEnabled = !isEdit; var _obj = new { @@ -353,11 +349,9 @@ } else { - UtilityHelper.SetDefaultTable(gcMx1, - gvMx1); + UtilityHelper.SetDefaultTable(gcMx1,gvMx1); } - UtilityHelper.SetDefaultTable(gridControl2, - gridView2); + UtilityHelper.SetDefaultTable(gridControl2, gridView2); } else { @@ -415,9 +409,9 @@ if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else - getPageList(1); + getPageList(this.pageBar1.CurrentPage); } } catch (Exception ex) @@ -619,7 +613,7 @@ _webServiceName + "DeleteModelMx", JsonConvert.SerializeObject(lst)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); + if (_rtn.rtnCode > 0) getModel(lbGuid.Text); MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) -- Gitblit v1.9.3