فهرست منبع

打印方法修改

callm 4 ماه پیش
والد
کامیت
12d11b53f2
2فایلهای تغییر یافته به همراه128 افزوده شده و 67 حذف شده
  1. 65 64
      UAS_MES_XZC/FunctionCode/Make/Make_Repair.Designer.cs
  2. 63 3
      UAS_MES_XZC/PublicMethod/Print.cs

+ 65 - 64
UAS_MES_XZC/FunctionCode/Make/Make_Repair.Designer.cs

@@ -224,7 +224,7 @@
             // 
             // GetSNCode_Label
             // 
-            this.GetSNCode_Label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.GetSNCode_Label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode_Label.AutoSize = true;
             this.GetSNCode_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -251,7 +251,7 @@
             // 
             this.BadCodeTree.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.BadCodeTree.Location = new System.Drawing.Point(21, 288);
-            this.BadCodeTree.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.BadCodeTree.Margin = new System.Windows.Forms.Padding(4);
             this.BadCodeTree.Name = "BadCodeTree";
             this.BadCodeTree.Size = new System.Drawing.Size(284, 848);
             this.BadCodeTree.TabIndex = 118;
@@ -326,7 +326,7 @@
             this.normalButton1.Image = null;
             this.normalButton1.IsShowBorder = true;
             this.normalButton1.Location = new System.Drawing.Point(820, 987);
-            this.normalButton1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.normalButton1.Margin = new System.Windows.Forms.Padding(5);
             this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
             this.normalButton1.Name = "normalButton1";
             this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
@@ -369,9 +369,10 @@
             "D壳组件",
             "接口小板",
             "主机",
+            "显示屏组件",
             "其他"});
             this.mbc_component.Location = new System.Drawing.Point(524, 459);
-            this.mbc_component.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.mbc_component.Margin = new System.Windows.Forms.Padding(5);
             this.mbc_component.Name = "mbc_component";
             this.mbc_component.Size = new System.Drawing.Size(239, 32);
             this.mbc_component.TabIndex = 139;
@@ -381,9 +382,9 @@
             this.mbr_dutyname.Condition = null;
             this.mbr_dutyname.Field = null;
             this.mbr_dutyname.Location = new System.Drawing.Point(1467, 379);
-            this.mbr_dutyname.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.mbr_dutyname.Margin = new System.Windows.Forms.Padding(5);
             this.mbr_dutyname.Name = "mbr_dutyname";
-            this.mbr_dutyname.Size = new System.Drawing.Size(243, 47);
+            this.mbr_dutyname.Size = new System.Drawing.Size(243, 35);
             this.mbr_dutyname.TabIndex = 135;
             this.mbr_dutyname.TableName = null;
             this.mbr_dutyname.Value = null;
@@ -395,9 +396,9 @@
             this.so_name.Condition = null;
             this.so_name.Field = null;
             this.so_name.Location = new System.Drawing.Point(1004, 459);
-            this.so_name.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.so_name.Margin = new System.Windows.Forms.Padding(5);
             this.so_name.Name = "so_name";
-            this.so_name.Size = new System.Drawing.Size(243, 47);
+            this.so_name.Size = new System.Drawing.Size(243, 35);
             this.so_name.TabIndex = 133;
             this.so_name.TableName = null;
             this.so_name.Value = null;
@@ -409,9 +410,9 @@
             this.nr_name.Condition = null;
             this.nr_name.Field = null;
             this.nr_name.Location = new System.Drawing.Point(1004, 379);
-            this.nr_name.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.nr_name.Margin = new System.Windows.Forms.Padding(5);
             this.nr_name.Name = "nr_name";
-            this.nr_name.Size = new System.Drawing.Size(243, 47);
+            this.nr_name.Size = new System.Drawing.Size(243, 35);
             this.nr_name.TabIndex = 132;
             this.nr_name.TableName = null;
             this.nr_name.Value = null;
@@ -423,9 +424,9 @@
             this.nrg_name.Condition = null;
             this.nrg_name.Field = null;
             this.nrg_name.Location = new System.Drawing.Point(524, 379);
-            this.nrg_name.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.nrg_name.Margin = new System.Windows.Forms.Padding(5);
             this.nrg_name.Name = "nrg_name";
-            this.nrg_name.Size = new System.Drawing.Size(243, 47);
+            this.nrg_name.Size = new System.Drawing.Size(243, 35);
             this.nrg_name.TabIndex = 131;
             this.nrg_name.TableName = null;
             this.nrg_name.Value = null;
@@ -454,9 +455,9 @@
             this.groupBoxWithBorder1.Controls.Add(this.ms_makecode);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F);
             this.groupBoxWithBorder1.Location = new System.Drawing.Point(19, 16);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(4);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(4);
             this.groupBoxWithBorder1.Size = new System.Drawing.Size(1760, 204);
             this.groupBoxWithBorder1.TabIndex = 130;
             this.groupBoxWithBorder1.TabStop = false;
@@ -472,7 +473,7 @@
             this.cd_stepcode.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.cd_stepcode.FormName = null;
             this.cd_stepcode.Location = new System.Drawing.Point(712, 139);
-            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.cd_stepcode.Margin = new System.Windows.Forms.Padding(5);
             this.cd_stepcode.Name = "cd_stepcode";
             this.cd_stepcode.Power = "ifspecial";
             this.cd_stepcode.ReturnData = null;
@@ -486,11 +487,11 @@
             // 
             // ms_reworkcheckno
             // 
-            this.ms_reworkcheckno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_reworkcheckno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_reworkcheckno.AutoSize = true;
             this.ms_reworkcheckno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_reworkcheckno.Location = new System.Drawing.Point(1585, 119);
+            this.ms_reworkcheckno.Location = new System.Drawing.Point(1586, 120);
             this.ms_reworkcheckno.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_reworkcheckno.Name = "ms_reworkcheckno";
             this.ms_reworkcheckno.Size = new System.Drawing.Size(146, 41);
@@ -500,11 +501,11 @@
             // 
             // ms_makecode_label
             // 
-            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_makecode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(407, 55);
+            this.ms_makecode_label.Location = new System.Drawing.Point(408, 56);
             this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(114, 41);
@@ -513,11 +514,11 @@
             // 
             // ms_sncode_label
             // 
-            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_sncode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(31, 53);
+            this.ms_sncode_label.Location = new System.Drawing.Point(32, 54);
             this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(114, 41);
@@ -526,11 +527,11 @@
             // 
             // ms_checkno
             // 
-            this.ms_checkno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_checkno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_checkno.Location = new System.Drawing.Point(1581, 55);
+            this.ms_checkno.Location = new System.Drawing.Point(1582, 56);
             this.ms_checkno.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_checkno.Name = "ms_checkno";
             this.ms_checkno.Size = new System.Drawing.Size(146, 41);
@@ -547,7 +548,7 @@
             this.RepairComplete.Image = null;
             this.RepairComplete.IsShowBorder = true;
             this.RepairComplete.Location = new System.Drawing.Point(1072, 132);
-            this.RepairComplete.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.RepairComplete.Margin = new System.Windows.Forms.Padding(5);
             this.RepairComplete.MoveImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.MoveImage")));
             this.RepairComplete.Name = "RepairComplete";
             this.RepairComplete.NormalImage = ((System.Drawing.Image)(resources.GetObject("RepairComplete.NormalImage")));
@@ -561,12 +562,12 @@
             // 
             // ms_sncode
             // 
-            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_sncode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode.AutoSize = true;
             this.ms_sncode.CutLength = null;
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode.Location = new System.Drawing.Point(181, 55);
+            this.ms_sncode.Location = new System.Drawing.Point(182, 56);
             this.ms_sncode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_sncode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_sncode.Name = "ms_sncode";
@@ -582,7 +583,7 @@
             this.Scrap.Image = null;
             this.Scrap.IsShowBorder = true;
             this.Scrap.Location = new System.Drawing.Point(1261, 132);
-            this.Scrap.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Scrap.Margin = new System.Windows.Forms.Padding(5);
             this.Scrap.MoveImage = ((System.Drawing.Image)(resources.GetObject("Scrap.MoveImage")));
             this.Scrap.Name = "Scrap";
             this.Scrap.NormalImage = ((System.Drawing.Image)(resources.GetObject("Scrap.NormalImage")));
@@ -599,7 +600,7 @@
             this.nr_code.AutoSize = true;
             this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_code.ForeColor = System.Drawing.Color.Black;
-            this.nr_code.Location = new System.Drawing.Point(1681, 445);
+            this.nr_code.Location = new System.Drawing.Point(1682, 446);
             this.nr_code.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.nr_code.Name = "nr_code";
             this.nr_code.Size = new System.Drawing.Size(0, 41);
@@ -607,11 +608,11 @@
             // 
             // st_rstepcode_label
             // 
-            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.st_rstepcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.st_rstepcode_label.AutoSize = true;
             this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_rstepcode_label.Location = new System.Drawing.Point(531, 131);
+            this.st_rstepcode_label.Location = new System.Drawing.Point(532, 132);
             this.st_rstepcode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.st_rstepcode_label.Name = "st_rstepcode_label";
             this.st_rstepcode_label.Size = new System.Drawing.Size(146, 41);
@@ -620,11 +621,11 @@
             // 
             // ma_craftcode_label
             // 
-            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ma_craftcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ma_craftcode_label.AutoSize = true;
             this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode_label.Location = new System.Drawing.Point(31, 131);
+            this.ma_craftcode_label.Location = new System.Drawing.Point(32, 132);
             this.ma_craftcode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ma_craftcode_label.Name = "ma_craftcode_label";
             this.ma_craftcode_label.Size = new System.Drawing.Size(146, 41);
@@ -640,7 +641,7 @@
             this.cr_code.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.cr_code.FormName = null;
             this.cr_code.Location = new System.Drawing.Point(181, 139);
-            this.cr_code.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.cr_code.Margin = new System.Windows.Forms.Padding(5);
             this.cr_code.Name = "cr_code";
             this.cr_code.Power = "ifspecial";
             this.cr_code.ReturnData = null;
@@ -655,11 +656,11 @@
             // 
             // pr_detail_label
             // 
-            this.pr_detail_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.pr_detail_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(1275, 55);
+            this.pr_detail_label.Location = new System.Drawing.Point(1276, 56);
             this.pr_detail_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
@@ -668,11 +669,11 @@
             // 
             // ms_prodcode_label
             // 
-            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_prodcode_label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode_label.AutoSize = true;
             this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode_label.Location = new System.Drawing.Point(817, 55);
+            this.ms_prodcode_label.Location = new System.Drawing.Point(818, 56);
             this.ms_prodcode_label.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_prodcode_label.Name = "ms_prodcode_label";
             this.ms_prodcode_label.Size = new System.Drawing.Size(146, 41);
@@ -681,12 +682,12 @@
             // 
             // pr_detail
             // 
-            this.pr_detail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.pr_detail.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail.AutoSize = true;
             this.pr_detail.CutLength = null;
             this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail.Location = new System.Drawing.Point(1467, 55);
+            this.pr_detail.Location = new System.Drawing.Point(1468, 56);
             this.pr_detail.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_detail.Name = "pr_detail";
@@ -695,12 +696,12 @@
             // 
             // ms_prodcode
             // 
-            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_prodcode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.CutLength = null;
             this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode.Location = new System.Drawing.Point(1009, 55);
+            this.ms_prodcode.Location = new System.Drawing.Point(1010, 56);
             this.ms_prodcode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_prodcode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_prodcode.Name = "ms_prodcode";
@@ -710,12 +711,12 @@
             // 
             // ms_makecode
             // 
-            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.ms_makecode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(567, 55);
+            this.ms_makecode.Location = new System.Drawing.Point(568, 56);
             this.ms_makecode.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(300, 0);
             this.ms_makecode.Name = "ms_makecode";
@@ -725,7 +726,7 @@
             // mb_badremark
             // 
             this.mb_badremark.Location = new System.Drawing.Point(1467, 285);
-            this.mb_badremark.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
+            this.mb_badremark.Margin = new System.Windows.Forms.Padding(8);
             this.mb_badremark.Name = "mb_badremark";
             this.mb_badremark.Size = new System.Drawing.Size(280, 43);
             this.mb_badremark.TabIndex = 127;
@@ -740,7 +741,7 @@
             this.bd_soncode.DBTitle = null;
             this.bd_soncode.FormName = null;
             this.bd_soncode.Location = new System.Drawing.Point(1056, 576);
-            this.bd_soncode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.bd_soncode.Margin = new System.Windows.Forms.Padding(4);
             this.bd_soncode.Name = "bd_soncode";
             this.bd_soncode.Power = null;
             this.bd_soncode.ReturnData = null;
@@ -761,7 +762,7 @@
             this.DeleteCom,
             this.mbp_id});
             this.mbp_partdgv.Location = new System.Drawing.Point(916, 651);
-            this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(4);
             this.mbp_partdgv.Name = "mbp_partdgv";
             this.mbp_partdgv.RowHeadersWidth = 62;
             this.mbp_partdgv.RowTemplate.Height = 27;
@@ -807,7 +808,7 @@
             this.DeletePos,
             this.mbl_id});
             this.mbl_locdgv.Location = new System.Drawing.Point(332, 651);
-            this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(4);
             this.mbl_locdgv.Name = "mbl_locdgv";
             this.mbl_locdgv.RowHeadersWidth = 62;
             this.mbl_locdgv.RowTemplate.Height = 27;
@@ -848,7 +849,7 @@
             this.RefreshTreeView.Cursor = System.Windows.Forms.Cursors.Hand;
             this.RefreshTreeView.Image = global::UAS_MES_NEW.Properties.Resources.refresh;
             this.RefreshTreeView.Location = new System.Drawing.Point(171, 236);
-            this.RefreshTreeView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.RefreshTreeView.Margin = new System.Windows.Forms.Padding(4);
             this.RefreshTreeView.Name = "RefreshTreeView";
             this.RefreshTreeView.Power = null;
             this.RefreshTreeView.Size = new System.Drawing.Size(40, 40);
@@ -860,12 +861,12 @@
             // GetSNCode
             // 
             this.GetSNCode.AllPower = null;
-            this.GetSNCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.GetSNCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode.BackColor = System.Drawing.Color.White;
             this.GetSNCode.ID = null;
             this.GetSNCode.Location = new System.Drawing.Point(488, 1068);
-            this.GetSNCode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.GetSNCode.Margin = new System.Windows.Forms.Padding(5);
             this.GetSNCode.Name = "GetSNCode";
             this.GetSNCode.Power = null;
             this.GetSNCode.Size = new System.Drawing.Size(372, 35);
@@ -884,7 +885,7 @@
             this.NewRepairInf.Image = null;
             this.NewRepairInf.IsShowBorder = true;
             this.NewRepairInf.Location = new System.Drawing.Point(584, 987);
-            this.NewRepairInf.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.NewRepairInf.Margin = new System.Windows.Forms.Padding(5);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
             this.NewRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.NormalImage")));
@@ -904,7 +905,7 @@
             this.SaveRepairInf.Image = null;
             this.SaveRepairInf.IsShowBorder = true;
             this.SaveRepairInf.Location = new System.Drawing.Point(1312, 453);
-            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.SaveRepairInf.Margin = new System.Windows.Forms.Padding(5);
             this.SaveRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.MoveImage")));
             this.SaveRepairInf.Name = "SaveRepairInf";
             this.SaveRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveRepairInf.NormalImage")));
@@ -924,7 +925,7 @@
             this.DeleteRepairInf.Image = null;
             this.DeleteRepairInf.IsShowBorder = true;
             this.DeleteRepairInf.Location = new System.Drawing.Point(1036, 987);
-            this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.DeleteRepairInf.Margin = new System.Windows.Forms.Padding(5);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
             this.DeleteRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.NormalImage")));
@@ -939,12 +940,12 @@
             // mbl_loc
             // 
             this.mbl_loc.AllPower = null;
-            this.mbl_loc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.mbl_loc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbl_loc.BackColor = System.Drawing.Color.White;
             this.mbl_loc.ID = null;
             this.mbl_loc.Location = new System.Drawing.Point(524, 579);
-            this.mbl_loc.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.mbl_loc.Margin = new System.Windows.Forms.Padding(5);
             this.mbl_loc.Name = "mbl_loc";
             this.mbl_loc.Power = null;
             this.mbl_loc.Size = new System.Drawing.Size(240, 35);
@@ -958,13 +959,13 @@
             // bc_name
             // 
             this.bc_name.AllPower = null;
-            this.bc_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.bc_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.bc_name.BackColor = System.Drawing.Color.White;
             this.bc_name.Enabled = false;
             this.bc_name.ID = null;
             this.bc_name.Location = new System.Drawing.Point(1004, 285);
-            this.bc_name.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.bc_name.Margin = new System.Windows.Forms.Padding(5);
             this.bc_name.Name = "bc_name";
             this.bc_name.Power = null;
             this.bc_name.Size = new System.Drawing.Size(239, 35);
@@ -977,14 +978,14 @@
             // bg_name
             // 
             this.bg_name.AllPower = null;
-            this.bg_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            this.bg_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
             | System.Windows.Forms.AnchorStyles.Left)));
             this.bg_name.BackColor = System.Drawing.Color.White;
             this.bg_name.Enabled = false;
             this.bg_name.ForeColor = System.Drawing.Color.Red;
             this.bg_name.ID = null;
             this.bg_name.Location = new System.Drawing.Point(524, 288);
-            this.bg_name.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.bg_name.Margin = new System.Windows.Forms.Padding(5);
             this.bg_name.Name = "bg_name";
             this.bg_name.Power = null;
             this.bg_name.Size = new System.Drawing.Size(239, 35);
@@ -998,7 +999,7 @@
             // 
             this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.OperatResult.Location = new System.Drawing.Point(1467, 573);
-            this.OperatResult.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(5);
             this.OperatResult.Name = "OperatResult";
             this.OperatResult.Size = new System.Drawing.Size(311, 496);
             this.OperatResult.TabIndex = 87;
@@ -1012,7 +1013,7 @@
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
             this.Clean.Location = new System.Drawing.Point(1564, 1084);
-            this.Clean.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Clean.Margin = new System.Windows.Forms.Padding(5);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
@@ -1032,7 +1033,7 @@
             this.NewBadCode.Image = null;
             this.NewBadCode.IsShowBorder = true;
             this.NewBadCode.Location = new System.Drawing.Point(328, 987);
-            this.NewBadCode.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.NewBadCode.Margin = new System.Windows.Forms.Padding(5);
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.Name = "NewBadCode";
             this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
@@ -1053,7 +1054,7 @@
             this.SaveBadLocation.Image = null;
             this.SaveBadLocation.IsShowBorder = true;
             this.SaveBadLocation.Location = new System.Drawing.Point(771, 573);
-            this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.SaveBadLocation.Margin = new System.Windows.Forms.Padding(5);
             this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
             this.SaveBadLocation.Name = "SaveBadLocation";
             this.SaveBadLocation.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.NormalImage")));
@@ -1112,7 +1113,7 @@
             this.Controls.Add(this.bc_name_label);
             this.Controls.Add(this.bg_name_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Margin = new System.Windows.Forms.Padding(5);
             this.Name = "Make_Repair";
             this.Tag = "Make!Repair";
             this.Text = "维修作业";

+ 63 - 3
UAS_MES_XZC/PublicMethod/Print.cs

@@ -235,7 +235,67 @@ namespace UAS_MES_NEW.PublicMethod
                 //}
             }
             //  string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
-            // FileInfo PrintFile = new FileInfo(LabelName);
+            string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
+            string LA_SOFTTYPE = dh.getFieldDataByCondition("label", "LA_SOFTTYPE", "la_id = '" + LaID + "'").ToString();
+            //如果有附件上传的话
+            string fp_name = "";
+            //下载附件
+            FileInfo PrintFile = new FileInfo(@"C:\打印标签\" + LabelName);
+            if (!PrintFile.Exists)
+            {
+                if (LA_SOFTTYPE != "")
+                {
+                    string[] fpid = LA_SOFTTYPE.Split(';');
+                    for (int i = 0; i < fpid.Length; i++)
+                    {
+                        if (fpid[i] != "")
+                        {
+                            DataTable label = (DataTable)dh.ExecuteSql("select FP_PATH, FP_DATE, FP_NAME from FILEPATH where fp_id='" + fpid[i] + "'", "select");
+                            if (label.Rows.Count > 0)
+                            {
+                                string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
+                                fp_name = label.Rows[0]["fp_name"].ToString();
+                                WebClient wc = new WebClient();
+                                wc.DownloadFile("http://192.168.110.18:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                            }
+                        }
+                    }
+                    lbl = new BarTender.Application();
+                    BaseUtil.WriteLbl();
+                }
+            }
+            else
+            {
+                string filechangetime = PrintFile.LastWriteTime.ToString();
+                System.DateTime dateTime1 = System.DateTime.Parse(filechangetime);
+                System.DateTime dateTime2 = System.DateTime.Parse(filelastwritetime);
+                if (dateTime1 < dateTime2)
+                {
+                    if (LA_SOFTTYPE != "")
+                    {
+                        string[] fpid = LA_SOFTTYPE.Split(';');
+                        for (int i = 0; i < fpid.Length; i++)
+                        {
+                            if (fpid[i] != "")
+                            {
+                                DataTable label = (DataTable)dh.ExecuteSql("select FP_PATH, FP_DATE, FP_NAME from FILEPATH where fp_id='" + fpid[i] + "'", "select");
+                                if (label.Rows.Count > 0)
+                                {
+                                    string fp_path = label.Rows[0]["FP_PATH"].ToString().Replace("/app/uas/webapps/", "");
+                                    fp_name = label.Rows[0]["fp_name"].ToString();
+                                    WebClient wc = new WebClient();
+                                    wc.DownloadFile("http://192.168.110.18:8099/" + fp_path, @"C:\打印标签\" + fp_name);
+                                    FileInfo file = new FileInfo(@"C:\打印标签\" + fp_name);
+                                    file.CreationTime = Convert.ToDateTime(filelastwritetime);
+                                }
+                            }
+                        }
+                    }
+                    lbl = new  BarTender.Application();
+                    BaseUtil.WriteLbl();
+                }
+            }
+            PrintFile = new FileInfo(@"C:\打印标签\" + LabelName);
             //打开模板路径
             //查询模板对应的取值SQL和参数名称
             dt = (DataTable)dh.ExecuteSql("select lp_name,lp_sql from label left join LABELPARAMETER on la_id=lp_laid where la_id='" + LaID + "'", "select");
@@ -255,7 +315,7 @@ namespace UAS_MES_NEW.PublicMethod
             //    string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
             //    dh.UpdateByCondition("label", update, "la_id = '" + LaID + "'");
             //}
-            doc2 = lbl.Formats.Open(LabelName);
+            doc2 = lbl.Formats.Open(@"C:\打印标签\" + LabelName);
             if (doc2 == null)
             {
                 MessageBox.Show("标签文件打开失败");
@@ -329,7 +389,7 @@ namespace UAS_MES_NEW.PublicMethod
             ErrorMessage = "";
             DataTable dt = new DataTable();
             if (PrintNum == 0)
-            {
+            {   
                 PrintNum = 1;
             }
             if (IfRePrint == "-1")