From 73effbc7daccee2285717ab70d01df7ba54aa35e Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 20 六月 2025 09:03:01 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
similarity index 96%
rename from DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs
rename to DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
index b41ec7c..c753744 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 = "";//iqc 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);
@@ -126,8 +135,6 @@
                 Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
             };
         }
-
-
         /// <summary>
         /// 鎵归噺褰曞叆
         /// </summary>
@@ -280,10 +287,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 +421,7 @@
             {
                 guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
                 fngDesc = txt_fngDesc.TextTxt.Trim(),
-                ckId= rkckid
+                ckId = rkckid
             };
             try
             {
@@ -443,7 +455,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 +683,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 +695,6 @@
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
         }
-         
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3