Browse Source

打印内容调整

callm 4 years ago
parent
commit
a3d4f71f3b

+ 140 - 130
UAS_MES_YD/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -54,25 +54,28 @@ namespace UAS_MES_NEW.Make
             this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
             this.columnHeader10 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
-            this.AutoBadCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
             this.ma_qty_label = new System.Windows.Forms.Label();
             this.ma_prodcode_label = new System.Windows.Forms.Label();
             this.ms_makecode_label = new System.Windows.Forms.Label();
             this.mcd_inqty_label = new System.Windows.Forms.Label();
             this.mc_restqty_label = new System.Windows.Forms.Label();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.mcd_totalng = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label9 = new System.Windows.Forms.Label();
+            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label8 = new System.Windows.Forms.Label();
             this.mcd_ngqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.label1 = new System.Windows.Forms.Label();
-            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label7 = new System.Windows.Forms.Label();
             this.ob_checkno = new System.Windows.Forms.Label();
             this.SendCheck = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.ob_batchqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.ob_sendqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.label7 = new System.Windows.Forms.Label();
             this.ob_batchqty_label = new System.Windows.Forms.Label();
             this.ob_nowcheckqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ob_nowcheckqty_label = new System.Windows.Forms.Label();
-            this.mcd_remainqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.mcd_inqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.ma_softversion_label = new System.Windows.Forms.Label();
             this.BadInfSource = new System.Windows.Forms.BindingSource(this.components);
@@ -100,10 +103,8 @@ namespace UAS_MES_NEW.Make
             this.ms_sncode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.WriteSoftWare = new UAS_MES_NEW.CustomControl.CustomCheckBox.ReSetCheckBox();
             this.SoftWarePath = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.mcd_okqty = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label8 = new System.Windows.Forms.Label();
-            this.mcd_totalng = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
-            this.label9 = new System.Windows.Forms.Label();
+            this.label10 = new System.Windows.Forms.Label();
+            this.Printer = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BadInfSource)).BeginInit();
             this.SuspendLayout();
@@ -320,18 +321,6 @@ namespace UAS_MES_NEW.Make
             this.columnHeader10.Text = "备注";
             this.columnHeader10.Width = 0;
             // 
-            // AutoBadCode
-            // 
-            this.AutoBadCode.AutoSize = true;
-            this.AutoBadCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoBadCode.Location = new System.Drawing.Point(1455, 309);
-            this.AutoBadCode.Margin = new System.Windows.Forms.Padding(4);
-            this.AutoBadCode.Name = "AutoBadCode";
-            this.AutoBadCode.Size = new System.Drawing.Size(190, 35);
-            this.AutoBadCode.TabIndex = 69;
-            this.AutoBadCode.Text = "恢复出厂设置";
-            this.AutoBadCode.UseVisualStyleBackColor = true;
-            // 
             // ma_qty_label
             // 
             this.ma_qty_label.AutoSize = true;
@@ -369,7 +358,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.mcd_inqty_label.AutoSize = true;
             this.mcd_inqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty_label.Location = new System.Drawing.Point(314, 24);
+            this.mcd_inqty_label.Location = new System.Drawing.Point(314, 12);
             this.mcd_inqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(146, 41);
@@ -380,7 +369,7 @@ namespace UAS_MES_NEW.Make
             // 
             this.mc_restqty_label.AutoSize = true;
             this.mc_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mc_restqty_label.Location = new System.Drawing.Point(32, 24);
+            this.mc_restqty_label.Location = new System.Drawing.Point(32, 12);
             this.mc_restqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.mc_restqty_label.Name = "mc_restqty_label";
             this.mc_restqty_label.Size = new System.Drawing.Size(146, 41);
@@ -403,18 +392,66 @@ namespace UAS_MES_NEW.Make
             this.panel1.Controls.Add(this.mc_restqty_label);
             this.panel1.Controls.Add(this.mcd_inqty);
             this.panel1.Controls.Add(this.mcd_inqty_label);
-            this.panel1.Location = new System.Drawing.Point(1074, 28);
+            this.panel1.Location = new System.Drawing.Point(1074, 8);
             this.panel1.Margin = new System.Windows.Forms.Padding(4);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(628, 252);
+            this.panel1.Size = new System.Drawing.Size(628, 230);
             this.panel1.TabIndex = 71;
             // 
+            // mcd_totalng
+            // 
+            this.mcd_totalng.AutoSize = true;
+            this.mcd_totalng.CutLength = null;
+            this.mcd_totalng.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_totalng.Location = new System.Drawing.Point(228, 170);
+            this.mcd_totalng.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_totalng.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_totalng.Name = "mcd_totalng";
+            this.mcd_totalng.Size = new System.Drawing.Size(0, 41);
+            this.mcd_totalng.TabIndex = 84;
+            this.mcd_totalng.Tag = "mcd_inqty";
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(32, 170);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(178, 41);
+            this.label9.TabIndex = 83;
+            this.label9.Text = "累计不良数";
+            // 
+            // mcd_okqty
+            // 
+            this.mcd_okqty.AutoSize = true;
+            this.mcd_okqty.CutLength = null;
+            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_okqty.Location = new System.Drawing.Point(499, 87);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_okqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_okqty.Name = "mcd_okqty";
+            this.mcd_okqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_okqty.TabIndex = 82;
+            this.mcd_okqty.Tag = "mcd_inqty";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(318, 87);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(114, 41);
+            this.label8.TabIndex = 81;
+            this.label8.Text = "良品数";
+            // 
             // mcd_ngqty
             // 
             this.mcd_ngqty.AutoSize = true;
             this.mcd_ngqty.CutLength = null;
             this.mcd_ngqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_ngqty.Location = new System.Drawing.Point(228, 99);
+            this.mcd_ngqty.Location = new System.Drawing.Point(228, 87);
             this.mcd_ngqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.mcd_ngqty.MaximumSize = new System.Drawing.Size(300, 0);
             this.mcd_ngqty.Name = "mcd_ngqty";
@@ -426,47 +463,19 @@ namespace UAS_MES_NEW.Make
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(32, 99);
+            this.label1.Location = new System.Drawing.Point(32, 87);
             this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(178, 41);
             this.label1.TabIndex = 79;
             this.label1.Text = "当前不良数";
             // 
-            // ob_sendqty
-            // 
-            this.ob_sendqty.AutoSize = true;
-            this.ob_sendqty.CutLength = null;
-            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_sendqty.Location = new System.Drawing.Point(860, 241);
-            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.ob_sendqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.ob_sendqty.Name = "ob_sendqty";
-            this.ob_sendqty.Size = new System.Drawing.Size(0, 41);
-            this.ob_sendqty.TabIndex = 78;
-            this.ob_sendqty.Tag = "ob_batchqty";
-            this.ob_sendqty.Visible = false;
-            // 
-            // label7
-            // 
-            this.label7.AutoSize = true;
-            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label7.ForeColor = System.Drawing.Color.Black;
-            this.label7.Location = new System.Drawing.Point(674, 241);
-            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(146, 41);
-            this.label7.TabIndex = 77;
-            this.label7.Text = "已送检数";
-            this.label7.Visible = false;
-            // 
             // ob_checkno
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_checkno.ForeColor = System.Drawing.Color.Black;
-            this.ob_checkno.Location = new System.Drawing.Point(570, 180);
+            this.ob_checkno.Location = new System.Drawing.Point(570, 168);
             this.ob_checkno.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 41);
@@ -483,7 +492,7 @@ namespace UAS_MES_NEW.Make
             this.SendCheck.Enabled = false;
             this.SendCheck.Image = null;
             this.SendCheck.IsShowBorder = true;
-            this.SendCheck.Location = new System.Drawing.Point(458, 180);
+            this.SendCheck.Location = new System.Drawing.Point(458, 168);
             this.SendCheck.Margin = new System.Windows.Forms.Padding(4);
             this.SendCheck.MoveImage = ((System.Drawing.Image)(resources.GetObject("SendCheck.MoveImage")));
             this.SendCheck.Name = "SendCheck";
@@ -501,7 +510,7 @@ namespace UAS_MES_NEW.Make
             this.ob_batchqty.CutLength = null;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.ob_batchqty.ForeColor = System.Drawing.Color.Black;
-            this.ob_batchqty.Location = new System.Drawing.Point(376, 180);
+            this.ob_batchqty.Location = new System.Drawing.Point(376, 168);
             this.ob_batchqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ob_batchqty.MaximumSize = new System.Drawing.Size(300, 0);
             this.ob_batchqty.Name = "ob_batchqty";
@@ -509,6 +518,60 @@ namespace UAS_MES_NEW.Make
             this.ob_batchqty.TabIndex = 75;
             this.ob_batchqty.Tag = "ob_batchqty";
             // 
+            // mcd_remainqty
+            // 
+            this.mcd_remainqty.AutoSize = true;
+            this.mcd_remainqty.CutLength = null;
+            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_remainqty.Location = new System.Drawing.Point(229, 12);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_remainqty.Name = "mcd_remainqty";
+            this.mcd_remainqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_remainqty.TabIndex = 57;
+            this.mcd_remainqty.Tag = "mcd_remainqty";
+            // 
+            // mcd_inqty
+            // 
+            this.mcd_inqty.AutoSize = true;
+            this.mcd_inqty.CutLength = null;
+            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.mcd_inqty.Location = new System.Drawing.Point(496, 12);
+            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.mcd_inqty.Name = "mcd_inqty";
+            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
+            this.mcd_inqty.TabIndex = 54;
+            this.mcd_inqty.Tag = "mcd_inqty";
+            // 
+            // ob_sendqty
+            // 
+            this.ob_sendqty.AutoSize = true;
+            this.ob_sendqty.CutLength = null;
+            this.ob_sendqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ob_sendqty.ForeColor = System.Drawing.Color.Black;
+            this.ob_sendqty.Location = new System.Drawing.Point(860, 241);
+            this.ob_sendqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ob_sendqty.MaximumSize = new System.Drawing.Size(300, 0);
+            this.ob_sendqty.Name = "ob_sendqty";
+            this.ob_sendqty.Size = new System.Drawing.Size(0, 41);
+            this.ob_sendqty.TabIndex = 78;
+            this.ob_sendqty.Tag = "ob_batchqty";
+            this.ob_sendqty.Visible = false;
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.ForeColor = System.Drawing.Color.Black;
+            this.label7.Location = new System.Drawing.Point(674, 241);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(146, 41);
+            this.label7.TabIndex = 77;
+            this.label7.Text = "已送检数";
+            this.label7.Visible = false;
+            // 
             // ob_batchqty_label
             // 
             this.ob_batchqty_label.AutoSize = true;
@@ -550,32 +613,6 @@ namespace UAS_MES_NEW.Make
             this.ob_nowcheckqty_label.Text = "当前批数";
             this.ob_nowcheckqty_label.Visible = false;
             // 
-            // mcd_remainqty
-            // 
-            this.mcd_remainqty.AutoSize = true;
-            this.mcd_remainqty.CutLength = null;
-            this.mcd_remainqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty.Location = new System.Drawing.Point(229, 24);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_remainqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(0, 41);
-            this.mcd_remainqty.TabIndex = 57;
-            this.mcd_remainqty.Tag = "mcd_remainqty";
-            // 
-            // mcd_inqty
-            // 
-            this.mcd_inqty.AutoSize = true;
-            this.mcd_inqty.CutLength = null;
-            this.mcd_inqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_inqty.Location = new System.Drawing.Point(496, 24);
-            this.mcd_inqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_inqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_inqty.Name = "mcd_inqty";
-            this.mcd_inqty.Size = new System.Drawing.Size(0, 41);
-            this.mcd_inqty.TabIndex = 54;
-            this.mcd_inqty.Tag = "mcd_inqty";
-            // 
             // pr_detail_label
             // 
             this.pr_detail_label.AutoSize = true;
@@ -910,53 +947,24 @@ namespace UAS_MES_NEW.Make
             this.SoftWarePath.Str2 = null;
             this.SoftWarePath.TabIndex = 196;
             // 
-            // mcd_okqty
+            // label10
             // 
-            this.mcd_okqty.AutoSize = true;
-            this.mcd_okqty.CutLength = null;
-            this.mcd_okqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty.Location = new System.Drawing.Point(499, 99);
-            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_okqty.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(0, 41);
-            this.mcd_okqty.TabIndex = 82;
-            this.mcd_okqty.Tag = "mcd_inqty";
+            this.label10.AutoSize = true;
+            this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label10.Location = new System.Drawing.Point(1285, 250);
+            this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label10.Name = "label10";
+            this.label10.Size = new System.Drawing.Size(114, 41);
+            this.label10.TabIndex = 198;
+            this.label10.Text = "打印机";
             // 
-            // label8
+            // Printer
             // 
-            this.label8.AutoSize = true;
-            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label8.Location = new System.Drawing.Point(318, 99);
-            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(114, 41);
-            this.label8.TabIndex = 81;
-            this.label8.Text = "良品数";
-            // 
-            // mcd_totalng
-            // 
-            this.mcd_totalng.AutoSize = true;
-            this.mcd_totalng.CutLength = null;
-            this.mcd_totalng.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_totalng.Location = new System.Drawing.Point(228, 182);
-            this.mcd_totalng.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.mcd_totalng.MaximumSize = new System.Drawing.Size(300, 0);
-            this.mcd_totalng.Name = "mcd_totalng";
-            this.mcd_totalng.Size = new System.Drawing.Size(0, 41);
-            this.mcd_totalng.TabIndex = 84;
-            this.mcd_totalng.Tag = "mcd_inqty";
-            // 
-            // label9
-            // 
-            this.label9.AutoSize = true;
-            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label9.Location = new System.Drawing.Point(32, 182);
-            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
-            this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(178, 41);
-            this.label9.TabIndex = 83;
-            this.label9.Text = "累计不良数";
+            this.Printer.Location = new System.Drawing.Point(1413, 250);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
+            this.Printer.Name = "Printer";
+            this.Printer.Size = new System.Drawing.Size(268, 50);
+            this.Printer.TabIndex = 197;
             // 
             // Make_TestCollection
             // 
@@ -964,6 +972,8 @@ namespace UAS_MES_NEW.Make
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
             this.ClientSize = new System.Drawing.Size(1724, 1070);
+            this.Controls.Add(this.label10);
+            this.Controls.Add(this.Printer);
             this.Controls.Add(this.SoftWarePath);
             this.Controls.Add(this.WriteSoftWare);
             this.Controls.Add(this.ob_sendqty);
@@ -981,7 +991,6 @@ namespace UAS_MES_NEW.Make
             this.Controls.Add(this.ma_softversion_label);
             this.Controls.Add(this.panel1);
             this.Controls.Add(this.Save);
-            this.Controls.Add(this.AutoBadCode);
             this.Controls.Add(this.bc_code);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.LockMakeCode);
@@ -1067,7 +1076,6 @@ namespace UAS_MES_NEW.Make
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
         private CustomControl.TextBoxWithIcon.EnterTextBox bc_code;
-        private ReSetCheckBox AutoBadCode;
         private System.Windows.Forms.ColumnHeader columnHeader4;
         private CustomControl.ButtonUtil.NormalButton Save;
         private System.Windows.Forms.Panel panel1;
@@ -1102,5 +1110,7 @@ namespace UAS_MES_NEW.Make
         private System.Windows.Forms.Label label9;
         private CustomControl.ValueLabel.ValueLabel mcd_okqty;
         private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label10;
+        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
     }
 }

+ 31 - 2
UAS_MES_YD/FunctionCode/Make/Make_TestCollection.cs

@@ -9,6 +9,7 @@ using UAS_MES_NEW.Entity;
 using UAS_MES_NEW.PublicMethod;
 using System.Collections.Generic;
 using UAS_MES_NEW.CustomControl.PowerControlForm;
+using Seagull.BarTender.Print;
 
 namespace UAS_MES_NEW.Make
 {
@@ -48,6 +49,12 @@ namespace UAS_MES_NEW.Make
 
         DataTable Dbfind;
 
+        LabelFormatDocument format;
+
+        Engine engine;
+
+        bool EnablePrint;
+
         public Make_TestCollection()
         {
             InitializeComponent();
@@ -77,6 +84,19 @@ namespace UAS_MES_NEW.Make
             StepCount.LineCode = User.UserLineCode;
             StepCount.Dh = dh;
             StepCount.Start();
+
+            try
+            {
+                engine = new Engine();
+                engine.Start();
+                format = engine.Documents.Open(Application.StartupPath + "/BadCode.btw");
+                EnablePrint = true;
+            }
+            catch (Exception)
+            {
+                EnablePrint = false;
+                OperateResult.AppendText("未正确安装BarTender");
+            }
         }
 
         private void ControlLockTimer_Tick(object sender, EventArgs e)
@@ -371,8 +391,7 @@ namespace UAS_MES_NEW.Make
                             LastSncode = ms_sncode.Text;
                             OperateResult.AppendText(">>" + ms_sncode.Text + "良品采集成功\n", Color.Green, ms_sncode);
                             //恢复出厂设置
-                            if (AutoBadCode.Checked)
-                                BaseUtil.GetDataFromDevice("RESET");
+
                             //记录操作日志
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集良品", "采集良品成功", LastSncode, ob_checkno.Text);
                         }
@@ -543,6 +562,16 @@ namespace UAS_MES_NEW.Make
                         else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
                     }
                     else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                    //打印不良代码贴纸
+                    if (EnablePrint) {
+                        for (int i = 0; i < bcname.Length; i++)
+                        {
+                            format.SubStrings["SN1"].Value = bcname[i];
+                            format.PrintSetup.PrinterName = Printer.Text;
+                            format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                            format.Print();
+                        }
+                    }
                     LastSncode = ms_sncode.Text;
                     //采集完不良,聚焦序列号
                     ms_sncode.Focus();

+ 277 - 31
UAS_MES_YD/FunctionCode/SystemSetting/SystemSetting_PrinterTest.Designer.cs

@@ -30,9 +30,24 @@
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SystemSetting_PrinterTest));
             this.ma_salecode_label = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.Date = new System.Windows.Forms.DateTimePicker();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.Mark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.MachineType = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Rn = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Prefix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Setting = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.PrinterList = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.PrintTest = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
-            this.Setting = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.SuspendLayout();
             // 
             // ma_salecode_label
@@ -42,19 +57,238 @@
             | System.Windows.Forms.AnchorStyles.Right)));
             this.ma_salecode_label.AutoSize = true;
             this.ma_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_salecode_label.Location = new System.Drawing.Point(71, 60);
+            this.ma_salecode_label.Location = new System.Drawing.Point(142, 120);
+            this.ma_salecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ma_salecode_label.Name = "ma_salecode_label";
-            this.ma_salecode_label.Size = new System.Drawing.Size(90, 21);
+            this.ma_salecode_label.Size = new System.Drawing.Size(178, 41);
             this.ma_salecode_label.TabIndex = 20;
             this.ma_salecode_label.Text = "打印机列表";
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(211, 364);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(82, 41);
+            this.label3.TabIndex = 31;
+            this.label3.Text = "流水";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(1238, 454);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(82, 41);
+            this.label2.TabIndex = 29;
+            this.label2.Text = "日期";
+            this.label2.Visible = false;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(211, 275);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(82, 41);
+            this.label1.TabIndex = 28;
+            this.label1.Text = "数量";
+            // 
+            // Date
+            // 
+            this.Date.Location = new System.Drawing.Point(1383, 454);
+            this.Date.Name = "Date";
+            this.Date.Size = new System.Drawing.Size(278, 35);
+            this.Date.TabIndex = 26;
+            this.Date.Visible = false;
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(1238, 544);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(82, 41);
+            this.label5.TabIndex = 24;
+            this.label5.Text = "前缀";
+            this.label5.Visible = false;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(211, 190);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(114, 41);
+            this.label4.TabIndex = 33;
+            this.label4.Text = "工单号";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(725, 196);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(82, 41);
+            this.label6.TabIndex = 35;
+            this.label6.Text = "机型";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(725, 284);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(82, 41);
+            this.label7.TabIndex = 37;
+            this.label7.Text = "标记";
+            // 
+            // Mark
+            // 
+            this.Mark.AllPower = null;
+            this.Mark.BackColor = System.Drawing.Color.White;
+            this.Mark.ID = null;
+            this.Mark.Location = new System.Drawing.Point(870, 290);
+            this.Mark.Margin = new System.Windows.Forms.Padding(6);
+            this.Mark.Name = "Mark";
+            this.Mark.Power = null;
+            this.Mark.Size = new System.Drawing.Size(278, 35);
+            this.Mark.Str = null;
+            this.Mark.Str1 = null;
+            this.Mark.Str2 = null;
+            this.Mark.TabIndex = 38;
+            // 
+            // MachineType
+            // 
+            this.MachineType.AllPower = null;
+            this.MachineType.BackColor = System.Drawing.Color.White;
+            this.MachineType.ID = null;
+            this.MachineType.Location = new System.Drawing.Point(870, 202);
+            this.MachineType.Margin = new System.Windows.Forms.Padding(6);
+            this.MachineType.Name = "MachineType";
+            this.MachineType.Power = null;
+            this.MachineType.Size = new System.Drawing.Size(278, 35);
+            this.MachineType.Str = null;
+            this.MachineType.Str1 = null;
+            this.MachineType.Str2 = null;
+            this.MachineType.TabIndex = 36;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.BackColor = System.Drawing.Color.White;
+            this.ma_code.ID = null;
+            this.ma_code.Location = new System.Drawing.Point(356, 196);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.Size = new System.Drawing.Size(278, 35);
+            this.ma_code.Str = null;
+            this.ma_code.Str1 = null;
+            this.ma_code.Str2 = null;
+            this.ma_code.TabIndex = 34;
+            // 
+            // Export
+            // 
+            this.Export.AllPower = null;
+            this.Export.BackColor = System.Drawing.Color.Transparent;
+            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
+            this.Export.Image = null;
+            this.Export.IsShowBorder = true;
+            this.Export.Location = new System.Drawing.Point(356, 497);
+            this.Export.Margin = new System.Windows.Forms.Padding(6);
+            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
+            this.Export.Name = "Export";
+            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
+            this.Export.Power = null;
+            this.Export.Size = new System.Drawing.Size(150, 56);
+            this.Export.TabIndex = 32;
+            this.Export.Text = "打印";
+            this.Export.UseVisualStyleBackColor = false;
+            this.Export.Click += new System.EventHandler(this.Export_Click);
+            // 
+            // Rn
+            // 
+            this.Rn.AllPower = null;
+            this.Rn.BackColor = System.Drawing.Color.White;
+            this.Rn.ID = null;
+            this.Rn.Location = new System.Drawing.Point(356, 370);
+            this.Rn.Margin = new System.Windows.Forms.Padding(6);
+            this.Rn.Name = "Rn";
+            this.Rn.Power = null;
+            this.Rn.Size = new System.Drawing.Size(278, 35);
+            this.Rn.Str = null;
+            this.Rn.Str1 = null;
+            this.Rn.Str2 = null;
+            this.Rn.TabIndex = 30;
+            this.Rn.Text = "1";
+            // 
+            // Num
+            // 
+            this.Num.AllPower = null;
+            this.Num.BackColor = System.Drawing.Color.White;
+            this.Num.ID = null;
+            this.Num.Location = new System.Drawing.Point(356, 281);
+            this.Num.Margin = new System.Windows.Forms.Padding(6);
+            this.Num.Name = "Num";
+            this.Num.Power = null;
+            this.Num.Size = new System.Drawing.Size(278, 35);
+            this.Num.Str = null;
+            this.Num.Str1 = null;
+            this.Num.Str2 = null;
+            this.Num.TabIndex = 27;
+            // 
+            // Prefix
+            // 
+            this.Prefix.AllPower = null;
+            this.Prefix.BackColor = System.Drawing.Color.White;
+            this.Prefix.ID = null;
+            this.Prefix.Location = new System.Drawing.Point(1383, 550);
+            this.Prefix.Margin = new System.Windows.Forms.Padding(6);
+            this.Prefix.Name = "Prefix";
+            this.Prefix.Power = null;
+            this.Prefix.Size = new System.Drawing.Size(278, 35);
+            this.Prefix.Str = null;
+            this.Prefix.Str1 = null;
+            this.Prefix.Str2 = null;
+            this.Prefix.TabIndex = 25;
+            this.Prefix.Visible = false;
+            // 
+            // Setting
+            // 
+            this.Setting.AllPower = null;
+            this.Setting.BackColor = System.Drawing.Color.Transparent;
+            this.Setting.DownImage = ((System.Drawing.Image)(resources.GetObject("Setting.DownImage")));
+            this.Setting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Setting.Image = ((System.Drawing.Image)(resources.GetObject("Setting.Image")));
+            this.Setting.IsShowBorder = true;
+            this.Setting.Location = new System.Drawing.Point(988, 120);
+            this.Setting.Margin = new System.Windows.Forms.Padding(4);
+            this.Setting.MoveImage = ((System.Drawing.Image)(resources.GetObject("Setting.MoveImage")));
+            this.Setting.Name = "Setting";
+            this.Setting.NormalImage = ((System.Drawing.Image)(resources.GetObject("Setting.NormalImage")));
+            this.Setting.Power = null;
+            this.Setting.Size = new System.Drawing.Size(126, 48);
+            this.Setting.TabIndex = 23;
+            this.Setting.Text = "参数设置";
+            this.Setting.UseVisualStyleBackColor = true;
+            this.Setting.Click += new System.EventHandler(this.Setting_Click);
+            // 
             // PrinterList
             // 
             this.PrinterList.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrinterList.Location = new System.Drawing.Point(178, 60);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+            this.PrinterList.Location = new System.Drawing.Point(356, 120);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(6, 8, 6, 8);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(213, 31);
+            this.PrinterList.Size = new System.Drawing.Size(426, 62);
             this.PrinterList.TabIndex = 22;
             // 
             // PrintTest
@@ -65,51 +299,48 @@
             this.PrintTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
             this.PrintTest.IsShowBorder = true;
-            this.PrintTest.Location = new System.Drawing.Point(413, 60);
-            this.PrintTest.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.PrintTest.Location = new System.Drawing.Point(826, 120);
+            this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
             this.PrintTest.MoveImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.MoveImage")));
             this.PrintTest.Name = "PrintTest";
             this.PrintTest.NormalImage = ((System.Drawing.Image)(resources.GetObject("PrintTest.NormalImage")));
             this.PrintTest.Power = null;
-            this.PrintTest.Size = new System.Drawing.Size(63, 24);
+            this.PrintTest.Size = new System.Drawing.Size(126, 48);
             this.PrintTest.TabIndex = 21;
             this.PrintTest.Text = "打印测试";
             this.PrintTest.UseVisualStyleBackColor = true;
             this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
             // 
-            // Setting
-            // 
-            this.Setting.AllPower = null;
-            this.Setting.BackColor = System.Drawing.Color.Transparent;
-            this.Setting.DownImage = ((System.Drawing.Image)(resources.GetObject("Setting.DownImage")));
-            this.Setting.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Setting.Image = ((System.Drawing.Image)(resources.GetObject("Setting.Image")));
-            this.Setting.IsShowBorder = true;
-            this.Setting.Location = new System.Drawing.Point(494, 60);
-            this.Setting.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.Setting.MoveImage = ((System.Drawing.Image)(resources.GetObject("Setting.MoveImage")));
-            this.Setting.Name = "Setting";
-            this.Setting.NormalImage = ((System.Drawing.Image)(resources.GetObject("Setting.NormalImage")));
-            this.Setting.Power = null;
-            this.Setting.Size = new System.Drawing.Size(63, 24);
-            this.Setting.TabIndex = 23;
-            this.Setting.Text = "参数设置";
-            this.Setting.UseVisualStyleBackColor = true;
-            this.Setting.Click += new System.EventHandler(this.Setting_Click);
-            // 
             // SystemSetting_PrinterTest
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1017, 559);
+            this.ClientSize = new System.Drawing.Size(2034, 1118);
+            this.Controls.Add(this.Mark);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.MachineType);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.Export);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.Rn);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.Num);
+            this.Controls.Add(this.Date);
+            this.Controls.Add(this.Prefix);
+            this.Controls.Add(this.label5);
             this.Controls.Add(this.Setting);
             this.Controls.Add(this.PrinterList);
             this.Controls.Add(this.PrintTest);
             this.Controls.Add(this.ma_salecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
             this.Name = "SystemSetting_PrinterTest";
             this.Tag = "Setup!PrinterTest";
             this.Text = "打印机调试";
+            this.Load += new System.EventHandler(this.SystemSetting_PrinterTest_Load);
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -120,5 +351,20 @@
         private CustomControl.ButtonUtil.NormalButton PrintTest;
         private CustomControl.ComBoxWithFocus.PrinterCombox PrinterList;
         private CustomControl.ButtonUtil.NormalButton Setting;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Rn;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Num;
+        private System.Windows.Forms.DateTimePicker Date;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Prefix;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.ButtonUtil.NormalButton Export;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ma_code;
+        private System.Windows.Forms.Label label4;
+        private CustomControl.TextBoxWithIcon.EnterTextBox MachineType;
+        private System.Windows.Forms.Label label6;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Mark;
+        private System.Windows.Forms.Label label7;
     }
 }

+ 61 - 6
UAS_MES_YD/FunctionCode/SystemSetting/SystemSetting_PrinterTest.cs

@@ -1,17 +1,22 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
+using Seagull.BarTender.Print;
+using System;
 using System.Drawing;
 using System.Drawing.Printing;
-using System.Linq;
-using System.Text;
 using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
 
 namespace UAS_MES_NEW.SystemSetting
 {
     public partial class SystemSetting_PrinterTest : Form
     {
+
+        Engine engine = new Engine();
+
+        LabelFormatDocument format;
+
+        DataHelper dh = SystemInf.dh;
+
         public SystemSetting_PrinterTest()
         {
             InitializeComponent();
@@ -42,5 +47,55 @@ namespace UAS_MES_NEW.SystemSetting
             printd.PrinterSettings.PrinterName = PrinterList.Text;
             printd.ShowDialog();
         }
+
+        private void Export_Click(object sender, EventArgs e)
+        {
+            //if (!dh.CheckExist("make", "ma_code='" + ma_code.Text + "'"))
+            //{
+            //    MessageBox.Show("工单号不存在");
+            //    return;
+            //}
+            format.SubStrings["Type"].Value = MachineType.Text;
+            format.SubStrings["Mark"].Value = Mark.Text;
+            for (int i = int.Parse(Rn.Text); i < (int.Parse(Num.Text) + int.Parse(Rn.Text)); i = i + 2)
+            {
+                int temp = i;
+                for (int j = 0; j < format.SubStrings.Count; j++)
+                {
+                    switch (format.SubStrings[j].Name)
+                    {
+                        case "SN":
+                            format.SubStrings[j].Value = (ma_code.Text +  lpad(4, (temp).ToString()));
+                            dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
+                            break;
+                        case "SN2":
+                            format.SubStrings[j].Value = (ma_code.Text +lpad(4, (temp + 1).ToString()));
+                            dh.ExecuteSql("insert into makesnlist(msl_id,msl_indate,msl_makecode,msl_sncode,msl_type)values(makesnlist_seq.nextval,sysdate,'" + ma_code.Text + "','" + format.SubStrings[j].Value + "','before')", "insert");
+                            break;
+                        default:
+                            break;
+                    }
+                }
+                format.PrintSetup.PrinterName = PrinterList.Text;
+                format.PrintSetup.IdenticalCopiesOfLabel = 1;
+                format.Print();
+            }
+        }
+
+        private static string lpad(int length, string number)
+        {
+            while (number.Length < length)
+            {
+                number = "0" + number;
+            }
+            number = number.Substring(number.Length - length, length);
+            return number;
+        }
+
+        private void SystemSetting_PrinterTest_Load(object sender, EventArgs e)
+        {
+            engine.Start();
+            format = engine.Documents.Open(Application.StartupPath + "/Label.btw");
+        }
     }
 }

+ 46 - 8
UAS_MES_YD/FunctionCode/SystemSetting/SystemSetting_PrinterTest.resx

@@ -118,7 +118,7 @@
     <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="PrintTest.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -130,7 +130,45 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="PrintTest.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Export.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Setting.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Setting.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -223,7 +261,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="PrintTest.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -236,7 +274,7 @@
         gg==
 </value>
   </data>
-  <data name="PrintTest.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Setting.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -249,7 +287,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Setting.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="PrintTest.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -261,7 +299,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Setting.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="PrintTest.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -354,7 +392,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Setting.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="PrintTest.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -367,7 +405,7 @@
         gg==
 </value>
   </data>
-  <data name="Setting.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="PrintTest.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE