Преглед на файлове

优化SOP添加电子印章

callm преди 2 дни
родител
ревизия
3259c29eb2
променени са 2 файла, в които са добавени 25 реда и са изтрити 24 реда
  1. 21 21
      UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.Designer.cs
  2. 4 3
      UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.cs

+ 21 - 21
UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.Designer.cs

@@ -62,11 +62,11 @@ namespace UAS_MES_NEW.Query
             this.label4 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
-            this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
-            this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
+            this.X = new System.Windows.Forms.NumericUpDown();
+            this.Y = new System.Windows.Forms.NumericUpDown();
             ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.X)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Y)).BeginInit();
             this.SuspendLayout();
             // 
             // richTextBox1
@@ -388,20 +388,20 @@ namespace UAS_MES_NEW.Query
             this.label7.TabIndex = 32;
             this.label7.Text = "Y";
             // 
-            // numericUpDown1
+            // X
             // 
-            this.numericUpDown1.Location = new System.Drawing.Point(258, 866);
-            this.numericUpDown1.Name = "numericUpDown1";
-            this.numericUpDown1.Size = new System.Drawing.Size(120, 35);
-            this.numericUpDown1.TabIndex = 33;
+            this.X.Location = new System.Drawing.Point(258, 866);
+            this.X.Name = "X";
+            this.X.Size = new System.Drawing.Size(120, 35);
+            this.X.TabIndex = 33;
             // 
-            // numericUpDown2
+            // Y
             // 
-            this.numericUpDown2.Location = new System.Drawing.Point(464, 866);
-            this.numericUpDown2.Name = "numericUpDown2";
-            this.numericUpDown2.Size = new System.Drawing.Size(120, 35);
-            this.numericUpDown2.TabIndex = 34;
-            this.numericUpDown2.Value = new decimal(new int[] {
+            this.Y.Location = new System.Drawing.Point(464, 866);
+            this.Y.Name = "Y";
+            this.Y.Size = new System.Drawing.Size(120, 35);
+            this.Y.TabIndex = 34;
+            this.Y.Value = new decimal(new int[] {
             18,
             0,
             0,
@@ -412,8 +412,8 @@ namespace UAS_MES_NEW.Query
             this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1945, 1234);
-            this.Controls.Add(this.numericUpDown2);
-            this.Controls.Add(this.numericUpDown1);
+            this.Controls.Add(this.Y);
+            this.Controls.Add(this.X);
             this.Controls.Add(this.label7);
             this.Controls.Add(this.label6);
             this.Controls.Add(this.label4);
@@ -442,8 +442,8 @@ namespace UAS_MES_NEW.Query
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
             this.Load += new System.EventHandler(this.Form3_Load);
             ((System.ComponentModel.ISupportInitialize)(this.SendDGV)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.X)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Y)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -482,7 +482,7 @@ namespace UAS_MES_NEW.Query
         private System.Windows.Forms.Label label4;
         private System.Windows.Forms.Label label6;
         private System.Windows.Forms.Label label7;
-        private System.Windows.Forms.NumericUpDown numericUpDown1;
-        private System.Windows.Forms.NumericUpDown numericUpDown2;
+        private System.Windows.Forms.NumericUpDown X;
+        private System.Windows.Forms.NumericUpDown Y;
     }
 }

+ 4 - 3
UAS_MES_ZKLH/FunctionCode/Query/Query_SOP.cs

@@ -127,9 +127,10 @@ namespace UAS_MES_NEW.Query
                                 options.PrintingPage = PrintingPageType.IgnoreBlank;
 
                                 she.PageSetup.PrintArea = $"A{startRow + 1}:AH{endRow + 1}";
-                                she.Pictures.Add(0, 18, @"电子受控章.png");
-                                //she.Pictures.Add(0, 15, @"图片\签名.png");
-                                // 设置只渲染指定的行范围
+                                if (File.Exists(PrintPath.Text))
+                                {
+                                    she.Pictures.Add(int.Parse(X.Value.ToString()), int.Parse(Y.Value.ToString()), PrintPath.Text);
+                                }
 
                                 // 创建SheetRender对象
                                 SheetRender sr = new SheetRender(she, options);