From 98e93a53c3407b9785eba27faec13fe7afc1255b Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 20 六月 2025 16:55:46 +0800 Subject: [PATCH] bug --- DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs | 46 +++++++++++++++++++++++++++++++++------------- 1 files changed, 33 insertions(+), 13 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs similarity index 95% rename from DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs rename to DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs index b41ec7c..3a0f394 100644 --- a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs +++ b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs @@ -13,14 +13,22 @@ namespace Gs.DevApp.DevFrm.RkQC { - public partial class Frm_RkDetect01 : DevExpress.XtraEditors.XtraForm + public partial class RkDetect01 : DevExpress.XtraEditors.XtraUserControl { string _strTag = "N:涓嶅悎鏍�"; List<FilterEntity> _filterList = new List<FilterEntity>(); - public Frm_RkDetect01() + public string strType = "";//鐢熶骇閫�鏂� type + public RkDetect01(string _strType) { InitializeComponent(); + strType = _strType; + } + + protected override void OnCreateControl() + { + base.OnCreateControl(); + if (Parent == null) return; this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; @@ -33,7 +41,8 @@ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1, tips); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fsubmitTxt", "", (value) => + Form parentForm = this.FindForm(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, parentForm, "fsubmitTxt", "", (value) => { Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); }, tips); @@ -51,6 +60,12 @@ xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged; gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged; btnIpt.Click += BtnIpt_Click; + string rptName = ""; + if (strType == QcSeason.鐢熶骇閫�鏂欏叆搴撴.ToString()) + rptName = "rpt_SCTL"; + else + if (strType == QcSeason.鍏跺畠鍏ュ簱妫�.ToString()) + rptName = "rpt_Qtrk"; this.ucBtnPrint1.btnPrintClick += (s, e) => { ucBtnPrint1.guidKey = ""; @@ -76,7 +91,8 @@ this.ucBtnPrint1.rptParameter = "return false"; return; } - this.ucBtnPrint1.rptParameter = "rpt_SCTL{" + rowGuid.Trim() + + this.ucBtnPrint1.rptParameter = rptName + "{" + rowGuid.Trim() + "," + "" + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim()) + "," + txt_iCount_1.Text.Trim() @@ -86,7 +102,7 @@ this.ucBtnPrint1.btnAllClick += (s, e) => { string rowGuid = txt_aboutGuid.Text.Trim(); - SelectDeleteBar frm = new SelectDeleteBar(rowGuid, "閲囪喘鍏ュ簱"); + SelectDeleteBar frm = new SelectDeleteBar(rowGuid, strType); string strCodeList = ""; frm.UpdateParent += (ss, ee) => { @@ -97,7 +113,7 @@ return; try { - string rptParameter = "rpt_SCTL{" + string rptParameter = rptName + "{" + "100" + "," + "" + "," + "" @@ -126,8 +142,6 @@ Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1); }; } - - /// <summary> /// 鎵归噺褰曞叆 /// </summary> @@ -280,10 +294,15 @@ /// <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, this.GetType().FullName); + var frm = new ShowFilter(gridView1.Columns, _filterList, parentForm.GetType().FullName); frm.UpdateParent += Frm_UpdateParent; frm.ShowDialog(); } @@ -409,7 +428,7 @@ { guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓 fngDesc = txt_fngDesc.TextTxt.Trim(), - ckId= rkckid + ckId = rkckid }; try { @@ -443,7 +462,7 @@ private void getPageList(int curPage) { gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); - PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString()); + PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", " and a.order_type='" + strType + "' " + _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try { @@ -671,10 +690,11 @@ { getModel(lbGuid.Text.Trim(), "0"); } + Form parentForm = this.FindForm(); int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); gridView1.FocusedRowHandle = rowHandle; int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1); - UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString()); + UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, parentForm, _inFieldValue.ToString()); } } catch (Exception ex) @@ -682,6 +702,6 @@ MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } - + } } \ No newline at end of file -- Gitblit v1.9.3