From ba29df0e68f9997670bfe62f8bbe3a76dec8bcfb Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 01 四月 2025 09:47:57 +0800 Subject: [PATCH] iqc --- DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs b/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs index 2d3ecbc..f88c295 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Jyxm.cs @@ -24,7 +24,6 @@ { InitializeComponent(); strType = _strType; - } protected override void OnCreateControl() { @@ -39,6 +38,11 @@ toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick; + //iqc鐨勬牱鍝佹暟閲忛粯璁�5锛屽惁鍒�1 + decimal _dfValue = 1; + if (strType == "iqc") + _dfValue = 5; + this.gvMx1.InitNewRow += (s, e) => { this.gvMx1.SetRowCellValue(e.RowHandle, "ypsl", _dfValue); }; this.toolBarMenu1.getXmlConfig(); Form parentForm = this.FindForm(); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); @@ -77,14 +81,12 @@ frm.ShowDialog(); }; btnSave.Click += BtnSave_Click; - } - private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + _filterList= Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } @@ -106,10 +108,16 @@ /// <param name="e"></param> private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) { + Form parentForm; + if (this.Parent is Form) + parentForm = this.Parent as Form; + else + parentForm = this.Parent.Parent as Form; + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; gridView1.ActiveFilter.Clear(); gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; - var frm = new ShowFilter(gridView1.Columns, _filterList); + var frm = new ShowFilter(gridView1.Columns, _filterList, parentForm.GetType().FullName); frm.UpdateParent += Frm_UpdateParent; frm.ShowDialog(); } @@ -292,6 +300,11 @@ MsgHelper.ShowError("鎺ュ彈姘村钩涓嶈兘涓虹┖锛�"); return; } + if (string.IsNullOrEmpty(row["ypsl"].ToString())) + { + MsgHelper.ShowError("鏍峰搧鏁伴噺骞充笉鑳戒负绌猴紒"); + return; + } string _Fstand = row["Fstand"].ToString(); string _FupAllow = row["FupAllow"].ToString(); string _FdownAllow = row["FdownAllow"].ToString(); @@ -334,7 +347,7 @@ Memo = row["memo"].ToString(), FupAllow = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["FupAllow"].ToString()), FdownAllow = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["FdownAllow"].ToString()), - FqaType = this.strType, + ypsl = Gs.DevApp.ToolBox.UtilityHelper.GetDecimal(row["ypsl"].ToString()), }); } } @@ -344,7 +357,7 @@ ItemId = long.Parse(_ItemId), Memo = txt_memo.Text.Trim(), ItemNo = txt_itemNo.Text.Trim(), - Ftype = "1", + Ftype = this.strType, Fversion = Gs.DevApp.ToolBox.UtilityHelper.ToLong(txt_fversion.Text.Trim()), list = lst }; @@ -375,7 +388,6 @@ { MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } - } /// <summary> @@ -386,6 +398,7 @@ { var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); _sbSqlWhere += " and b.guid is not null"; + _sbSqlWhere += " and a.FTYPE='" + this.strType + "'"; var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,b.item_no asc,a.FVERSION desc", "", "", _sbSqlWhere.ToString()); var json = JsonConvert.SerializeObject(pgq); @@ -405,7 +418,8 @@ { gcMain1.DataSource = dt; gcMain1.ForceInitialize(); - gridView1.BestFitColumns(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); + } else UtilityHelper.SetDefaultTable(gcMain1, gridView1); -- Gitblit v1.9.3