From 51e2e408fd48c6454334a90c5dff0e5d0960da0c Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期六, 30 八月 2025 10:19:34 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.Designer.cs |   57 +++++++++---------
 DevApp/Gs.DevApp/UserControl/CopyXls.cs                |   37 ++++++++++-
 DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs          |   32 ++++++++++
 DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs    |    2 
 DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.resx        |   18 ++++++
 5 files changed, 111 insertions(+), 35 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs b/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs
index 88935ef..460b67e 100644
--- a/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs
@@ -229,7 +229,7 @@
         {
             gcMain1.DataSource = null; 
             System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
-            _sbSqlWhere.Append(" and daa.erp_sczz in");
+            _sbSqlWhere.Append(" and bm.FSubsidiary in");
             _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
             _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString());
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.Designer.cs
index a9b72e6..416eb67 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.Designer.cs
@@ -30,6 +30,7 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frm_MesItemQtrk));
             DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition();
             DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition();
             DevExpress.XtraLayout.ColumnDefinition columnDefinition3 = new DevExpress.XtraLayout.ColumnDefinition();
@@ -138,6 +139,8 @@
             this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem38 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.tabMx = new DevExpress.XtraTab.XtraTabControl();
             this.tabMxPage1 = new DevExpress.XtraTab.XtraTabPage();
             this.split99 = new DevExpress.XtraEditors.SplitContainerControl();
@@ -215,8 +218,6 @@
             this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn();
             this.picCheckBox = new System.Windows.Forms.PictureBox();
             this.tips = new DevExpress.Utils.ToolTipController(this.components);
-            this.layoutControlItem38 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
             this.xtraTabControl1.SuspendLayout();
             this.xtraTabPage1.SuspendLayout();
@@ -277,6 +278,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem38)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.tabMx)).BeginInit();
             this.tabMx.SuspendLayout();
             this.tabMxPage1.SuspendLayout();
@@ -326,8 +329,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.gcMx2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.gvMx2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem38)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             this.SuspendLayout();
             // 
             // toolBarMenu1
@@ -730,13 +731,13 @@
             // 
             // btnCopyXls
             // 
-            this.btnCopyXls.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.lookup_reference_16x16;
+            this.btnCopyXls.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnCopyXls.ImageOptions.Image")));
             this.btnCopyXls.Location = new System.Drawing.Point(12, 167);
             this.btnCopyXls.Name = "btnCopyXls";
             this.btnCopyXls.Size = new System.Drawing.Size(131, 27);
             this.btnCopyXls.StyleController = this.layoutMx1;
             this.btnCopyXls.TabIndex = 444;
-            this.btnCopyXls.Text = "浠嶺LS澶嶅埗鏄庣粏";
+            this.btnCopyXls.Text = "蹇嵎褰曞叆";
             // 
             // txt_qt003
             // 
@@ -1299,6 +1300,26 @@
             this.layoutControlItem2.Size = new System.Drawing.Size(323, 31);
             this.layoutControlItem2.Text = "鍗曟嵁绫诲瀷";
             this.layoutControlItem2.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem38
+            // 
+            this.layoutControlItem38.Control = this.txt_qtlx;
+            this.layoutControlItem38.Location = new System.Drawing.Point(322, 0);
+            this.layoutControlItem38.Name = "layoutControlItem38";
+            this.layoutControlItem38.OptionsTableLayoutItem.ColumnIndex = 1;
+            this.layoutControlItem38.Size = new System.Drawing.Size(323, 31);
+            this.layoutControlItem38.Text = "鍏ュ簱绫诲瀷";
+            this.layoutControlItem38.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem3
+            // 
+            this.layoutControlItem3.Control = this.txt_qt019;
+            this.layoutControlItem3.Location = new System.Drawing.Point(645, 0);
+            this.layoutControlItem3.Name = "layoutControlItem3";
+            this.layoutControlItem3.OptionsTableLayoutItem.ColumnIndex = 2;
+            this.layoutControlItem3.Size = new System.Drawing.Size(323, 31);
+            this.layoutControlItem3.Text = "搴撳瓨鏂瑰悜";
+            this.layoutControlItem3.TextSize = new System.Drawing.Size(90, 18);
             // 
             // tabMx
             // 
@@ -2244,26 +2265,6 @@
             this.picCheckBox.TabStop = false;
             this.picCheckBox.Visible = false;
             // 
-            // layoutControlItem38
-            // 
-            this.layoutControlItem38.Control = this.txt_qtlx;
-            this.layoutControlItem38.Location = new System.Drawing.Point(322, 0);
-            this.layoutControlItem38.Name = "layoutControlItem38";
-            this.layoutControlItem38.OptionsTableLayoutItem.ColumnIndex = 1;
-            this.layoutControlItem38.Size = new System.Drawing.Size(323, 31);
-            this.layoutControlItem38.Text = "鍏ュ簱绫诲瀷";
-            this.layoutControlItem38.TextSize = new System.Drawing.Size(90, 18);
-            // 
-            // layoutControlItem3
-            // 
-            this.layoutControlItem3.Control = this.txt_qt019;
-            this.layoutControlItem3.Location = new System.Drawing.Point(645, 0);
-            this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.OptionsTableLayoutItem.ColumnIndex = 2;
-            this.layoutControlItem3.Size = new System.Drawing.Size(323, 31);
-            this.layoutControlItem3.Text = "搴撳瓨鏂瑰悜";
-            this.layoutControlItem3.TextSize = new System.Drawing.Size(90, 18);
-            // 
             // Frm_MesItemQtrk
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -2334,6 +2335,8 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem38)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.tabMx)).EndInit();
             this.tabMx.ResumeLayout(false);
             this.tabMxPage1.ResumeLayout(false);
@@ -2383,8 +2386,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.gcMx2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.gvMx2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.picCheckBox)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem38)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             this.ResumeLayout(false);
 
         }
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
index 6fb3acd..b73c4f1 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -197,7 +197,37 @@
                 string filePath = AppContext.BaseDirectory + "xlsCopy.xls";
                 if (File.Exists(filePath))
                 {
-                    var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.鍏跺畠鍏ュ簱.ToString());
+                    var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.鍏跺畠鍏ュ簱.ToString(), txt_qt022.GetId());
+                    frm.UpdateParent += (ss, ee) =>
+                    {
+                        try
+                        {
+                            var lst = ee.DynamicList;
+                            MessageBox.Show(lst.Count.ToString());
+                            //DataTable _Table = (DataTable)gcMx1.DataSource;
+                            //foreach (dynamic dym in lst)
+                            //{
+                            //    DataRow _row = _Table.NewRow();
+                            //    _row["fSeq"] = dym.fSeq;
+                            //    _row["statStatus"] = "Y-鏄�";
+                            //    _row["collectionName"] = "绌�";
+                            //    _row["processNo"] = dym.processNo;
+                            //    _row["processName"] = dym.processName;
+                            //    _Table.Rows.Add(_row);
+                            //}
+                            //gcMx1.BindingContext = new BindingContext();
+                            //gcMx1.DataSource = _Table;
+                            //gcMx1.ForceInitialize();
+                            //gvMx1.CloseEditor();
+                            //gvMx1.PostEditor();
+                            //gvMx1.UpdateCurrentRow();
+                            //gvMx1.BestFitColumns();
+                        }
+                        catch (Exception ex)
+                        {
+                            Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
+                        }
+                    };
                     frm.ShowDialog();
                 }
                 else
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.resx b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.resx
index 25d6b3c..ccc86df 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.resx
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.resx
@@ -117,6 +117,24 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="btnCopyXls.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAG3RFWHRUaXRsZQBNb2RlbDtD
+        b3B5O0NvcHlNb2RlbDuJLVnLAAACYElEQVQ4T43RXUhTYRzH8dV0L24aJL3cdNF93XZRBEEQdFs3kb2A
+        RZBEkVlYLLWac+WS+TqNAmsrGxQZVkqLNoa6FNcLFphQN1npcjvbPNvOtrP9+j+PuM6iiw58kAef//c8
+        e44KQIHRaFR3OoO+btdbdLnekSA6nEG0M/emYCe22+N+2qdZmfk7UNrhnEI+D5LnckxumUxu3pkE7dMX
+        AvSsImpSotVqDYOeGUiSBCGa4MJCApFoCjExg3Q2hxt9ARYoUwbUlt6Az9r3Bi29EyQAi2MMzY4AzORa
+        zxhuDQQREkRImRwsPaMsYFAGSpsdo0XHVh6dHbvR7sePX1Gk0jKa2v0sYFQGNFc7WSAPMZnllpIyFxdl
+        fmyTzYtv8wISkgxTm5cFypUBbX2rl78xlsgiyohZCEsZjr31rPklvswtIk7/u2D1sECFMqA73+Lhx2UD
+        EbqsCP2NUURMZel3y3j2egahcByJVAYvfJ+h1+sraa6EsMtXlZ1qfI6snEcomiYSFgSJ3pbB3MggZhtq
+        Cj6Y9yPQuqMICxhOmoYokMM8DUbiaRpOIxxLYvZyDeB1cSnXdQwc2gwID7n4tJmveeD4xafI0GX9jCx/
+        77vDn3DgykjBCfs51PVvKfJ9+OifQHXdE37bcfYVEhL2nHFjQgTnng5hX/0mLKKfG//axNfKgK7q9H3f
+        kdrHOFz7CO6h9zzQ8GqBq+6e4APOjzu5Sw+28nXX3o2w7l5vY4HVRE8qyBqy4X8CtG8t0fBvqUSPbluV
+        A0q7jq0rsv1gZRsfZs8/AisnMiqUK7C1ltA+leo3c1CK6vE87QgAAAAASUVORK5CYII=
+</value>
+  </data>
   <metadata name="tips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
diff --git a/DevApp/Gs.DevApp/UserControl/CopyXls.cs b/DevApp/Gs.DevApp/UserControl/CopyXls.cs
index ac32e5a..031e8ca 100644
--- a/DevApp/Gs.DevApp/UserControl/CopyXls.cs
+++ b/DevApp/Gs.DevApp/UserControl/CopyXls.cs
@@ -1,6 +1,7 @@
 锘縰sing CefSharp.DevTools.Debugger;
 using DevExpress.Spreadsheet;
 using DevExpress.XtraEditors;
+using Gs.DevApp.ToolBox;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -19,14 +20,15 @@
     {
         private string orderType;
         private string orderGuid;
+        private string orgId;
         private static readonly string filePath = AppContext.BaseDirectory + "xlsCopy.xls";
 
-        public CopyXls(string orgId, string _orderGuid, string _orderType)
+        public CopyXls(string orgId, string _orderGuid, string _orderType, string _orgId)
         {
             InitializeComponent();
-            this.Text = "姝e湪澶嶅埗锛�" + _orderType;
             this.orderType = _orderType;
             this.orderGuid = _orderGuid;
+            this.orgId = _orgId;
             this.spreadsheetControl1.DocumentLoaded += new EventHandler(spreadsheetControl1_DocumentLoaded);
             if (!string.IsNullOrEmpty(filePath))
             {
@@ -34,7 +36,10 @@
                 {
                     IWorkbook workbook = spreadsheetControl1.Document;
                     workbook.LoadDocument(filePath);
-                    SetCellText(spreadsheetControl1.ActiveWorksheet, "A1", "ddd", true);
+                    SetCellText(spreadsheetControl1.ActiveWorksheet, "A1", "鐗╂枡缂栧彿", true);
+                    SetCellText(spreadsheetControl1.ActiveWorksheet, "B1", "鐢宠鏁伴噺", true);
+                    SetCellText(spreadsheetControl1.ActiveWorksheet, "C1", "鐢宠澶囨敞", true);
+                    SetCellText(spreadsheetControl1.ActiveWorksheet, "D1", "涓嶈壇绫诲瀷", true);
                 }
                 else
                 {
@@ -56,7 +61,7 @@
             else
             {
                 //Text = "姝e湪浠庛��" + fileName + "銆戝鍒跺埌銆�" + this.orderType.ToString()+"銆�";
-                Text = "姝e湪澶嶅埗鍒般��" + this.orderType.ToString() + "銆�";
+                Text = "姝e湪蹇嵎褰曞叆鍒般��" + this.orderType.ToString() + "銆戯紝缁勭粐ID涓恒��" + this.orgId.ToString() + "銆�";
             }
         }
 
@@ -67,7 +72,24 @@
         /// <param name="e"></param>
         private void btnSave_Click(object sender, EventArgs e)
         {
-            spreadsheetControl1.SaveDocument();
+            var list = new List<dynamic>();
+            for (int row = 2; row <= spreadsheetControl1.ActiveWorksheet.GetUsedRange().RowCount; row++)
+            {
+                string itemNo = spreadsheetControl1.ActiveWorksheet.Cells["A1"].Value.ToString();
+                string sl = spreadsheetControl1.ActiveWorksheet.Cells["B1"].Value.ToString();
+                string bz = spreadsheetControl1.ActiveWorksheet.Cells["C1"].Value.ToString();
+                string bllx = spreadsheetControl1.ActiveWorksheet.Cells["D1"].Value.ToString();
+                list.Add(new
+                {
+                    itemNo = itemNo,
+                    sl = sl,
+                    bz = bz,
+                    bllx = bllx,
+                });
+            }
+            UpdateParent?.Invoke(this,
+                new UpdateParentEventArgs { DynamicList = list });
+            Close();
         }
 
         /// <summary>
@@ -83,5 +105,10 @@
             workSheet.Cells[coordinates].Style.Font.Bold = isBold;
         }
 
+        /// <summary>
+        /// 閫夋嫨鍚庣殑鍥炶皟浜嬩欢
+        /// </summary>
+        public event EventHandler<UpdateParentEventArgs> UpdateParent;
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3