Browse Source

转号后支持打印

callm 5 years ago
parent
commit
dabe23533f
22 changed files with 1636 additions and 90 deletions
  1. 1 1
      UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  2. 91 72
      UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxLoadPrint.Designer.cs
  3. 1 1
      UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxLoadPrint.cs
  4. 1 1
      UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxWeigh.cs
  5. 1 1
      UAS_MES_MAXMADE/FunctionCode/Make/Make_FuselageLabelPrint.cs
  6. 1 1
      UAS_MES_MAXMADE/FunctionCode/Make/Make_GetReMakeSN.cs
  7. 1 1
      UAS_MES_MAXMADE/FunctionCode/Make/Make_RePrintLabel.cs
  8. 706 0
      UAS_MES_MAXMADE/FunctionCode/Make/Make_SeqTransformLabelPrint.Designer.cs
  9. 691 0
      UAS_MES_MAXMADE/FunctionCode/Make/Make_SeqTransformLabelPrint.cs
  10. 120 0
      UAS_MES_MAXMADE/FunctionCode/Make/Make_SeqTransformLabelPrint.resx
  11. 1 1
      UAS_MES_MAXMADE/FunctionCode/Make/Make_SpecialCartonPack.cs
  12. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_BigBoxCollection.cs
  13. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_BigBoxWeight.cs
  14. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_CartonBoxSNWeigh.cs
  15. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_CartonBoxWeigh.cs
  16. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PackageCollection.cs
  17. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PalletCollection.cs
  18. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PalletWeigh.cs
  19. 1 1
      UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PalletWightCollection.cs
  20. 2 2
      UAS_MES_MAXMADE/PublicMethod/BaseUtil.cs
  21. 2 1
      UAS_MES_MAXMADE/PublicMethod/Print.cs
  22. 9 0
      UAS_MES_MAXMADE/UAS_MES_MAXMADE.csproj

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -90,7 +90,7 @@ namespace UAS_MES_MAXMADE.Make
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 91 - 72
UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxLoadPrint.Designer.cs

@@ -38,7 +38,7 @@
             this.pr_detail_label = new System.Windows.Forms.Label();
             this.PrintLabel_label = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
-            this.PrintLabel = new UAS_MES_MAXMADE.CustomControl.ComBoxWithFocus.ComboxWithTip();
+            this.PrintLabel = new UAS_MES_MAXMADE.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.ms_sncode = new System.Windows.Forms.Label();
             this.load = new System.Windows.Forms.RadioButton();
             this.unload = new System.Windows.Forms.RadioButton();
@@ -64,9 +64,10 @@
             // 
             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(19, 16);
+            this.ms_makecode_label.Location = new System.Drawing.Point(38, 32);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_makecode_label.Size = new System.Drawing.Size(114, 41);
             this.ms_makecode_label.TabIndex = 125;
             this.ms_makecode_label.Text = "工单号";
             // 
@@ -74,9 +75,10 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(259, 16);
+            this.pr_code_label.Location = new System.Drawing.Point(518, 32);
+            this.pr_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_code_label.Size = new System.Drawing.Size(146, 41);
             this.pr_code_label.TabIndex = 126;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -84,9 +86,10 @@
             // 
             this.mcd_okqty_label.AutoSize = true;
             this.mcd_okqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_okqty_label.Location = new System.Drawing.Point(259, 63);
+            this.mcd_okqty_label.Location = new System.Drawing.Point(518, 126);
+            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.mcd_okqty_label.Name = "mcd_okqty_label";
-            this.mcd_okqty_label.Size = new System.Drawing.Size(74, 21);
+            this.mcd_okqty_label.Size = new System.Drawing.Size(146, 41);
             this.mcd_okqty_label.TabIndex = 127;
             this.mcd_okqty_label.Text = "打印计数";
             // 
@@ -94,9 +97,10 @@
             // 
             this.mcd_remainqty_label.AutoSize = true;
             this.mcd_remainqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.mcd_remainqty_label.Location = new System.Drawing.Point(471, 63);
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(942, 126);
+            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(58, 21);
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(114, 41);
             this.mcd_remainqty_label.TabIndex = 128;
             this.mcd_remainqty_label.Text = "剩余数";
             // 
@@ -104,9 +108,10 @@
             // 
             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(730, 112);
+            this.label4.Location = new System.Drawing.Point(1460, 224);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(42, 21);
+            this.label4.Size = new System.Drawing.Size(82, 41);
             this.label4.TabIndex = 129;
             this.label4.Text = "份数";
             // 
@@ -116,9 +121,10 @@
             | 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(19, 63);
+            this.ms_sncode_label.Location = new System.Drawing.Point(38, 126);
+            this.ms_sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_sncode_label.Name = "ms_sncode_label";
-            this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
+            this.ms_sncode_label.Size = new System.Drawing.Size(114, 41);
             this.ms_sncode_label.TabIndex = 145;
             this.ms_sncode_label.Text = "序列号";
             // 
@@ -126,9 +132,10 @@
             // 
             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(471, 16);
+            this.pr_detail_label.Location = new System.Drawing.Point(942, 32);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
             this.pr_detail_label.TabIndex = 146;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -136,9 +143,10 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(730, 63);
+            this.PrintLabel_label.Location = new System.Drawing.Point(1460, 126);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(42, 21);
+            this.PrintLabel_label.Size = new System.Drawing.Size(82, 41);
             this.PrintLabel_label.TabIndex = 160;
             this.PrintLabel_label.Text = "标签";
             // 
@@ -146,9 +154,10 @@
             // 
             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(730, 15);
+            this.label2.Location = new System.Drawing.Point(1460, 30);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(58, 21);
+            this.label2.Size = new System.Drawing.Size(114, 41);
             this.label2.TabIndex = 161;
             this.label2.Text = "打印机";
             // 
@@ -156,10 +165,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(808, 63);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(1616, 126);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(132, 20);
+            this.PrintLabel.Size = new System.Drawing.Size(260, 32);
             this.PrintLabel.TabIndex = 162;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -167,10 +176,10 @@
             // 
             this.ms_sncode.AutoSize = true;
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F);
-            this.ms_sncode.Location = new System.Drawing.Point(81, 63);
-            this.ms_sncode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ms_sncode.Location = new System.Drawing.Point(162, 126);
+            this.ms_sncode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.ms_sncode.Name = "ms_sncode";
-            this.ms_sncode.Size = new System.Drawing.Size(0, 21);
+            this.ms_sncode.Size = new System.Drawing.Size(0, 41);
             this.ms_sncode.TabIndex = 163;
             // 
             // load
@@ -178,10 +187,10 @@
             this.load.AutoSize = true;
             this.load.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.load.ForeColor = System.Drawing.Color.Blue;
-            this.load.Location = new System.Drawing.Point(22, 421);
-            this.load.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.load.Location = new System.Drawing.Point(44, 842);
+            this.load.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.load.Name = "load";
-            this.load.Size = new System.Drawing.Size(60, 25);
+            this.load.Size = new System.Drawing.Size(113, 45);
             this.load.TabIndex = 164;
             this.load.TabStop = true;
             this.load.Text = "上料";
@@ -192,10 +201,10 @@
             this.unload.AutoSize = true;
             this.unload.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.unload.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
-            this.unload.Location = new System.Drawing.Point(126, 421);
-            this.unload.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.unload.Location = new System.Drawing.Point(252, 842);
+            this.unload.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.unload.Name = "unload";
-            this.unload.Size = new System.Drawing.Size(60, 25);
+            this.unload.Size = new System.Drawing.Size(113, 45);
             this.unload.TabIndex = 165;
             this.unload.TabStop = true;
             this.unload.Text = "下料";
@@ -205,10 +214,10 @@
             // 
             this.code_label.AutoSize = true;
             this.code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.code_label.Location = new System.Drawing.Point(230, 423);
-            this.code_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.code_label.Location = new System.Drawing.Point(460, 846);
+            this.code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.code_label.Name = "code_label";
-            this.code_label.Size = new System.Drawing.Size(58, 21);
+            this.code_label.Size = new System.Drawing.Size(114, 41);
             this.code_label.TabIndex = 167;
             this.code_label.Text = "录入框";
             // 
@@ -216,9 +225,10 @@
             // 
             this.ms_craftcode.AutoSize = true;
             this.ms_craftcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_craftcode.Location = new System.Drawing.Point(733, 167);
+            this.ms_craftcode.Location = new System.Drawing.Point(1466, 334);
+            this.ms_craftcode.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.ms_craftcode.Name = "ms_craftcode";
-            this.ms_craftcode.Size = new System.Drawing.Size(0, 21);
+            this.ms_craftcode.Size = new System.Drawing.Size(0, 41);
             this.ms_craftcode.TabIndex = 170;
             this.ms_craftcode.Visible = false;
             // 
@@ -226,9 +236,10 @@
             // 
             this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
             this.ClearSn_code.Image = global::UAS_MES_MAXMADE.Properties.Resources.bindingNavigatorDeleteItem_Image;
-            this.ClearSn_code.Location = new System.Drawing.Point(437, 428);
+            this.ClearSn_code.Location = new System.Drawing.Point(874, 856);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.ClearSn_code.Name = "ClearSn_code";
-            this.ClearSn_code.Size = new System.Drawing.Size(16, 16);
+            this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
             this.ClearSn_code.TabIndex = 173;
             this.ClearSn_code.TabStop = false;
             this.ClearSn_code.Click += new System.EventHandler(this.ClearSn_code_Click);
@@ -236,10 +247,10 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(734, 167);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
+            this.StepCount.Location = new System.Drawing.Point(1468, 334);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(79, 23);
+            this.StepCount.Size = new System.Drawing.Size(158, 57);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 189;
@@ -250,10 +261,11 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(808, 112);
+            this.PrintNum.Location = new System.Drawing.Point(1616, 224);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(132, 21);
+            this.PrintNum.Size = new System.Drawing.Size(260, 35);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -264,10 +276,10 @@
             this.Lock.AutoSize = true;
             this.Lock.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Lock.LeaveEvent = false;
-            this.Lock.Location = new System.Drawing.Point(202, 17);
-            this.Lock.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.Lock.Location = new System.Drawing.Point(404, 34);
+            this.Lock.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.Lock.Name = "Lock";
-            this.Lock.Size = new System.Drawing.Size(51, 21);
+            this.Lock.Size = new System.Drawing.Size(94, 35);
             this.Lock.TabIndex = 172;
             this.Lock.Text = "锁定";
             this.Lock.UseVisualStyleBackColor = true;
@@ -279,14 +291,14 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(85, 17);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.ma_code.Location = new System.Drawing.Point(170, 34);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.ma_code.Name = "ma_code";
             this.ma_code.Power = null;
             this.ma_code.ReturnData = null;
             this.ma_code.SelectField = null;
             this.ma_code.SetValueField = null;
-            this.ma_code.Size = new System.Drawing.Size(109, 20);
+            this.ma_code.Size = new System.Drawing.Size(218, 40);
             this.ma_code.TabIndex = 171;
             this.ma_code.TableName = null;
             this.ma_code.TextBoxEnable = true;
@@ -296,10 +308,11 @@
             this.ma_bomversion.AutoSize = true;
             this.ma_bomversion.CutLength = null;
             this.ma_bomversion.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_bomversion.Location = new System.Drawing.Point(772, 187);
-            this.ma_bomversion.MaximumSize = new System.Drawing.Size(150, 0);
+            this.ma_bomversion.Location = new System.Drawing.Point(1544, 374);
+            this.ma_bomversion.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_bomversion.MaximumSize = new System.Drawing.Size(300, 0);
             this.ma_bomversion.Name = "ma_bomversion";
-            this.ma_bomversion.Size = new System.Drawing.Size(0, 21);
+            this.ma_bomversion.Size = new System.Drawing.Size(0, 41);
             this.ma_bomversion.TabIndex = 169;
             this.ma_bomversion.Visible = false;
             // 
@@ -308,11 +321,11 @@
             this.code.AllPower = null;
             this.code.BackColor = System.Drawing.Color.White;
             this.code.ID = null;
-            this.code.Location = new System.Drawing.Point(301, 425);
-            this.code.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.code.Location = new System.Drawing.Point(602, 850);
+            this.code.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
             this.code.Name = "code";
             this.code.Power = null;
-            this.code.Size = new System.Drawing.Size(132, 21);
+            this.code.Size = new System.Drawing.Size(260, 35);
             this.code.Str = null;
             this.code.Str1 = null;
             this.code.Str2 = null;
@@ -321,19 +334,20 @@
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(808, 15);
-            this.Printer.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Printer.Location = new System.Drawing.Point(1616, 30);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
             this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(131, 25);
+            this.Printer.Size = new System.Drawing.Size(262, 50);
             this.Printer.TabIndex = 159;
             // 
             // mcd_remainqty
             // 
             this.mcd_remainqty.AutoSize = true;
             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(559, 63);
+            this.mcd_remainqty.Location = new System.Drawing.Point(1118, 126);
+            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(19, 21);
+            this.mcd_remainqty.Size = new System.Drawing.Size(37, 41);
             this.mcd_remainqty.TabIndex = 158;
             this.mcd_remainqty.Text = "0";
             // 
@@ -341,9 +355,10 @@
             // 
             this.mcd_okqty.AutoSize = true;
             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(347, 63);
+            this.mcd_okqty.Location = new System.Drawing.Point(694, 126);
+            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(19, 21);
+            this.mcd_okqty.Size = new System.Drawing.Size(37, 41);
             this.mcd_okqty.TabIndex = 157;
             this.mcd_okqty.Text = "0";
             // 
@@ -352,10 +367,11 @@
             this.pr_code.AutoSize = true;
             this.pr_code.CutLength = null;
             this.pr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code.Location = new System.Drawing.Point(347, 16);
-            this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_code.Location = new System.Drawing.Point(694, 32);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_code.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 21);
+            this.pr_code.Size = new System.Drawing.Size(0, 41);
             this.pr_code.TabIndex = 156;
             this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
@@ -364,26 +380,28 @@
             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(559, 16);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pr_detail.Location = new System.Drawing.Point(1118, 32);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(300, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 21);
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
             this.pr_detail.TabIndex = 154;
             // 
             // OperateResult
             // 
             this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OperateResult.Location = new System.Drawing.Point(22, 105);
+            this.OperateResult.Location = new System.Drawing.Point(44, 210);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(691, 305);
+            this.OperateResult.Size = new System.Drawing.Size(1378, 606);
             this.OperateResult.TabIndex = 143;
             this.OperateResult.Text = "";
             // 
             // Make_ColorBoxLoadPrint
             // 
-            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(969, 452);
+            this.ClientSize = new System.Drawing.Size(1938, 904);
             this.Controls.Add(this.StepCount);
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.ClearSn_code);
@@ -413,6 +431,7 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.ms_makecode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "Make_ColorBoxLoadPrint";
             this.Tag = "Make!ColorBoxLoadPrint";
             this.Text = "    ";

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxLoadPrint.cs

@@ -91,7 +91,7 @@ namespace UAS_MES_MAXMADE.Make
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
             }
             catch (Exception)
             {

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -103,7 +103,7 @@ namespace UAS_MES_MAXMADE.Make
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Make/Make_FuselageLabelPrint.cs

@@ -66,7 +66,7 @@ namespace UAS_MES_MAXMADE.Make
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Make/Make_GetReMakeSN.cs

@@ -44,7 +44,7 @@ namespace UAS_MES_MAXMADE.Make
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Make/Make_RePrintLabel.cs

@@ -72,7 +72,7 @@ namespace UAS_MES_MAXMADE.Make
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 706 - 0
UAS_MES_MAXMADE/FunctionCode/Make/Make_SeqTransformLabelPrint.Designer.cs

@@ -0,0 +1,706 @@
+namespace UAS_MES_MAXMADE.Make
+{
+    partial class Make_SeqTransformLabelPrint
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.ms_makecode_label = new System.Windows.Forms.Label();
+            this.pr_detail_label = new System.Windows.Forms.Label();
+            this.ma_prodcode_label = new System.Windows.Forms.Label();
+            this.sncode_label = new System.Windows.Forms.Label();
+            this.beforeTransSNLength_checkBox = new System.Windows.Forms.CheckBox();
+            this.afterTransSNLength_checkBox = new System.Windows.Forms.CheckBox();
+            this.beforeTransSNPre_checkBox = new System.Windows.Forms.CheckBox();
+            this.afterTransSNPre_checkBox = new System.Windows.Forms.CheckBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.ma_code = new System.Windows.Forms.Label();
+            this.changenum = new System.Windows.Forms.Label();
+            this.remain_qty = new System.Windows.Forms.Label();
+            this.PrintNum_label = new System.Windows.Forms.Label();
+            this.remain_qty_label = new System.Windows.Forms.Label();
+            this.ClearSn_code = new System.Windows.Forms.PictureBox();
+            this.sn_code_label = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.ma_softversion = new System.Windows.Forms.Label();
+            this.SameReamrk = new System.Windows.Forms.CheckBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.IFONLY = new System.Windows.Forms.CheckBox();
+            this.CollectRemark = new System.Windows.Forms.CheckBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.ma_salecode = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.PrintLabel_label = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.PrintNum = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.PrintLabel = new UAS_MES_MAXMADE.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
+            this.Printer = new UAS_MES_MAXMADE.CustomControl.ComBoxWithFocus.PrinterCombox();
+            this.Remark = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Seq_Remark_PreFix = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.StepCount = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.SourceStepCount();
+            this.ChangeResult = new UAS_MES_MAXMADE.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.show_sncode = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pr_detail = new UAS_MES_MAXMADE.CustomControl.ValueLabel.ValueLabel();
+            this.ma_prodcode = new UAS_MES_MAXMADE.CustomControl.ValueLabel.ValueLabel();
+            this.afterTransSNLength = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
+            this.beforeTransSNLength = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.TextBoxNumOnly();
+            this.afterTransSNPre = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.beforeTransSNPre = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperateResult = new UAS_MES_MAXMADE.CustomControl.RichText.RichTextAutoBottom();
+            this.sncode = new UAS_MES_MAXMADE.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // ms_makecode_label
+            // 
+            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(30, 34);
+            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ms_makecode_label.Name = "ms_makecode_label";
+            this.ms_makecode_label.Size = new System.Drawing.Size(0, 41);
+            this.ms_makecode_label.TabIndex = 61;
+            // 
+            // pr_detail_label
+            // 
+            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(1100, 30);
+            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.pr_detail_label.Name = "pr_detail_label";
+            this.pr_detail_label.Size = new System.Drawing.Size(146, 41);
+            this.pr_detail_label.TabIndex = 62;
+            this.pr_detail_label.Text = "产品名称";
+            // 
+            // ma_prodcode_label
+            // 
+            this.ma_prodcode_label.AutoSize = true;
+            this.ma_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ma_prodcode_label.Location = new System.Drawing.Point(614, 30);
+            this.ma_prodcode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.ma_prodcode_label.Name = "ma_prodcode_label";
+            this.ma_prodcode_label.Size = new System.Drawing.Size(146, 41);
+            this.ma_prodcode_label.TabIndex = 63;
+            this.ma_prodcode_label.Text = "产品编号";
+            // 
+            // sncode_label
+            // 
+            this.sncode_label.AutoSize = true;
+            this.sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sncode_label.Location = new System.Drawing.Point(34, 862);
+            this.sncode_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sncode_label.Name = "sncode_label";
+            this.sncode_label.Size = new System.Drawing.Size(114, 41);
+            this.sncode_label.TabIndex = 68;
+            this.sncode_label.Text = "录入框";
+            // 
+            // beforeTransSNLength_checkBox
+            // 
+            this.beforeTransSNLength_checkBox.AutoSize = true;
+            this.beforeTransSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.beforeTransSNLength_checkBox.Location = new System.Drawing.Point(38, 162);
+            this.beforeTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.beforeTransSNLength_checkBox.Name = "beforeTransSNLength_checkBox";
+            this.beforeTransSNLength_checkBox.Size = new System.Drawing.Size(154, 39);
+            this.beforeTransSNLength_checkBox.TabIndex = 81;
+            this.beforeTransSNLength_checkBox.Text = "TSN长度";
+            this.beforeTransSNLength_checkBox.UseVisualStyleBackColor = true;
+            // 
+            // afterTransSNLength_checkBox
+            // 
+            this.afterTransSNLength_checkBox.AutoSize = true;
+            this.afterTransSNLength_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.afterTransSNLength_checkBox.Location = new System.Drawing.Point(38, 226);
+            this.afterTransSNLength_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.afterTransSNLength_checkBox.Name = "afterTransSNLength_checkBox";
+            this.afterTransSNLength_checkBox.Size = new System.Drawing.Size(139, 39);
+            this.afterTransSNLength_checkBox.TabIndex = 82;
+            this.afterTransSNLength_checkBox.Text = "SN长度";
+            this.afterTransSNLength_checkBox.UseVisualStyleBackColor = true;
+            // 
+            // beforeTransSNPre_checkBox
+            // 
+            this.beforeTransSNPre_checkBox.AutoSize = true;
+            this.beforeTransSNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.beforeTransSNPre_checkBox.Location = new System.Drawing.Point(621, 168);
+            this.beforeTransSNPre_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.beforeTransSNPre_checkBox.Name = "beforeTransSNPre_checkBox";
+            this.beforeTransSNPre_checkBox.Size = new System.Drawing.Size(154, 39);
+            this.beforeTransSNPre_checkBox.TabIndex = 83;
+            this.beforeTransSNPre_checkBox.Text = "TSN前缀";
+            this.beforeTransSNPre_checkBox.UseVisualStyleBackColor = true;
+            // 
+            // afterTransSNPre_checkBox
+            // 
+            this.afterTransSNPre_checkBox.AutoSize = true;
+            this.afterTransSNPre_checkBox.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.afterTransSNPre_checkBox.Location = new System.Drawing.Point(621, 234);
+            this.afterTransSNPre_checkBox.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.afterTransSNPre_checkBox.Name = "afterTransSNPre_checkBox";
+            this.afterTransSNPre_checkBox.Size = new System.Drawing.Size(139, 39);
+            this.afterTransSNPre_checkBox.TabIndex = 84;
+            this.afterTransSNPre_checkBox.Text = "SN前缀";
+            this.afterTransSNPre_checkBox.UseVisualStyleBackColor = true;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label1.Location = new System.Drawing.Point(30, 30);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 93;
+            this.label1.Text = "工单编号";
+            // 
+            // ma_code
+            // 
+            this.ma_code.AutoSize = true;
+            this.ma_code.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_code.Location = new System.Drawing.Point(182, 30);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Size = new System.Drawing.Size(0, 41);
+            this.ma_code.TabIndex = 95;
+            this.ma_code.TextChanged += new System.EventHandler(this.ms_makecode_UserControlTextChanged);
+            // 
+            // changenum
+            // 
+            this.changenum.AutoSize = true;
+            this.changenum.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.changenum.Location = new System.Drawing.Point(1502, 854);
+            this.changenum.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.changenum.Name = "changenum";
+            this.changenum.Size = new System.Drawing.Size(37, 41);
+            this.changenum.TabIndex = 100;
+            this.changenum.Text = "0";
+            this.changenum.Visible = false;
+            // 
+            // remain_qty
+            // 
+            this.remain_qty.AutoSize = true;
+            this.remain_qty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.remain_qty.Location = new System.Drawing.Point(186, 102);
+            this.remain_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.remain_qty.Name = "remain_qty";
+            this.remain_qty.Size = new System.Drawing.Size(0, 41);
+            this.remain_qty.TabIndex = 99;
+            // 
+            // PrintNum_label
+            // 
+            this.PrintNum_label.AutoSize = true;
+            this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.PrintNum_label.Location = new System.Drawing.Point(1354, 854);
+            this.PrintNum_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintNum_label.Name = "PrintNum_label";
+            this.PrintNum_label.Size = new System.Drawing.Size(82, 41);
+            this.PrintNum_label.TabIndex = 98;
+            this.PrintNum_label.Text = "计数";
+            this.PrintNum_label.Visible = false;
+            // 
+            // remain_qty_label
+            // 
+            this.remain_qty_label.AutoSize = true;
+            this.remain_qty_label.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.remain_qty_label.Location = new System.Drawing.Point(36, 102);
+            this.remain_qty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.remain_qty_label.Name = "remain_qty_label";
+            this.remain_qty_label.Size = new System.Drawing.Size(114, 41);
+            this.remain_qty_label.TabIndex = 97;
+            this.remain_qty_label.Text = "剩余数";
+            // 
+            // ClearSn_code
+            // 
+            this.ClearSn_code.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.ClearSn_code.Image = global::UAS_MES_MAXMADE.Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.ClearSn_code.Location = new System.Drawing.Point(560, 798);
+            this.ClearSn_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ClearSn_code.Name = "ClearSn_code";
+            this.ClearSn_code.Size = new System.Drawing.Size(32, 32);
+            this.ClearSn_code.TabIndex = 141;
+            this.ClearSn_code.TabStop = false;
+            this.ClearSn_code.Click += new System.EventHandler(this.ReCall_Click);
+            // 
+            // sn_code_label
+            // 
+            this.sn_code_label.AutoSize = true;
+            this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.sn_code_label.Location = new System.Drawing.Point(34, 792);
+            this.sn_code_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.sn_code_label.Name = "sn_code_label";
+            this.sn_code_label.Size = new System.Drawing.Size(114, 41);
+            this.sn_code_label.TabIndex = 139;
+            this.sn_code_label.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(1100, 102);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 147;
+            this.label2.Text = "软件版本";
+            // 
+            // ma_softversion
+            // 
+            this.ma_softversion.AutoSize = true;
+            this.ma_softversion.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_softversion.Location = new System.Drawing.Point(1246, 102);
+            this.ma_softversion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_softversion.Name = "ma_softversion";
+            this.ma_softversion.Size = new System.Drawing.Size(0, 41);
+            this.ma_softversion.TabIndex = 148;
+            // 
+            // SameReamrk
+            // 
+            this.SameReamrk.AutoSize = true;
+            this.SameReamrk.Location = new System.Drawing.Point(928, 880);
+            this.SameReamrk.Margin = new System.Windows.Forms.Padding(6);
+            this.SameReamrk.Name = "SameReamrk";
+            this.SameReamrk.Size = new System.Drawing.Size(186, 28);
+            this.SameReamrk.TabIndex = 224;
+            this.SameReamrk.Text = "固定录入备注";
+            this.SameReamrk.UseVisualStyleBackColor = true;
+            this.SameReamrk.CheckedChanged += new System.EventHandler(this.SameReamrk_CheckedChanged);
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(742, 818);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(71, 36);
+            this.label3.TabIndex = 223;
+            this.label3.Text = "前缀";
+            // 
+            // IFONLY
+            // 
+            this.IFONLY.AutoSize = true;
+            this.IFONLY.Location = new System.Drawing.Point(748, 880);
+            this.IFONLY.Margin = new System.Windows.Forms.Padding(6);
+            this.IFONLY.Name = "IFONLY";
+            this.IFONLY.Size = new System.Drawing.Size(162, 28);
+            this.IFONLY.TabIndex = 222;
+            this.IFONLY.Text = "不允许重复";
+            this.IFONLY.UseVisualStyleBackColor = true;
+            this.IFONLY.CheckedChanged += new System.EventHandler(this.IFONLY_CheckedChanged);
+            // 
+            // CollectRemark
+            // 
+            this.CollectRemark.AutoSize = true;
+            this.CollectRemark.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.CollectRemark.Location = new System.Drawing.Point(1132, 880);
+            this.CollectRemark.Margin = new System.Windows.Forms.Padding(6);
+            this.CollectRemark.Name = "CollectRemark";
+            this.CollectRemark.Size = new System.Drawing.Size(138, 28);
+            this.CollectRemark.TabIndex = 221;
+            this.CollectRemark.Text = "采集备注";
+            this.CollectRemark.UseVisualStyleBackColor = true;
+            this.CollectRemark.CheckedChanged += new System.EventHandler(this.CollectRemark_CheckedChanged);
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label4.Location = new System.Drawing.Point(614, 102);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(114, 41);
+            this.label4.TabIndex = 227;
+            this.label4.Text = "合同号";
+            // 
+            // ma_salecode
+            // 
+            this.ma_salecode.AutoSize = true;
+            this.ma_salecode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_salecode.Location = new System.Drawing.Point(762, 102);
+            this.ma_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ma_salecode.Name = "ma_salecode";
+            this.ma_salecode.Size = new System.Drawing.Size(0, 41);
+            this.ma_salecode.TabIndex = 228;
+            // 
+            // 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(1258, 330);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(114, 41);
+            this.label5.TabIndex = 231;
+            this.label5.Text = "打印机";
+            // 
+            // PrintLabel_label
+            // 
+            this.PrintLabel_label.AutoSize = true;
+            this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.PrintLabel_label.Location = new System.Drawing.Point(1258, 426);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.PrintLabel_label.Name = "PrintLabel_label";
+            this.PrintLabel_label.Size = new System.Drawing.Size(82, 41);
+            this.PrintLabel_label.TabIndex = 230;
+            this.PrintLabel_label.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(1258, 515);
+            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 = 233;
+            this.label6.Text = "份数";
+            // 
+            // PrintNum
+            // 
+            this.PrintNum.AllPower = null;
+            this.PrintNum.BackColor = System.Drawing.Color.White;
+            this.PrintNum.Enabled = false;
+            this.PrintNum.ID = null;
+            this.PrintNum.Location = new System.Drawing.Point(1403, 521);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(6);
+            this.PrintNum.Name = "PrintNum";
+            this.PrintNum.Power = null;
+            this.PrintNum.Size = new System.Drawing.Size(260, 35);
+            this.PrintNum.Str = null;
+            this.PrintNum.Str1 = null;
+            this.PrintNum.Str2 = null;
+            this.PrintNum.TabIndex = 234;
+            // 
+            // PrintLabel
+            // 
+            this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.PrintLabel.FormattingEnabled = true;
+            this.PrintLabel.Location = new System.Drawing.Point(1403, 435);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.PrintLabel.Name = "PrintLabel";
+            this.PrintLabel.Size = new System.Drawing.Size(260, 32);
+            this.PrintLabel.TabIndex = 232;
+            this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
+            // 
+            // Printer
+            // 
+            this.Printer.Location = new System.Drawing.Point(1403, 330);
+            this.Printer.Margin = new System.Windows.Forms.Padding(8);
+            this.Printer.Name = "Printer";
+            this.Printer.Size = new System.Drawing.Size(262, 41);
+            this.Printer.TabIndex = 229;
+            // 
+            // Remark
+            // 
+            this.Remark.AllPower = null;
+            this.Remark.BackColor = System.Drawing.Color.White;
+            this.Remark.ID = null;
+            this.Remark.Location = new System.Drawing.Point(928, 768);
+            this.Remark.Margin = new System.Windows.Forms.Padding(6);
+            this.Remark.Multiline = true;
+            this.Remark.Name = "Remark";
+            this.Remark.Power = null;
+            this.Remark.Size = new System.Drawing.Size(314, 96);
+            this.Remark.Str = null;
+            this.Remark.Str1 = null;
+            this.Remark.Str2 = null;
+            this.Remark.TabIndex = 226;
+            this.Remark.Enter += new System.EventHandler(this.Remark_Enter);
+            this.Remark.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_KeyDown);
+            this.Remark.Leave += new System.EventHandler(this.Remark_Leave);
+            // 
+            // Seq_Remark_PreFix
+            // 
+            this.Seq_Remark_PreFix.AllPower = null;
+            this.Seq_Remark_PreFix.BackColor = System.Drawing.Color.White;
+            this.Seq_Remark_PreFix.ID = null;
+            this.Seq_Remark_PreFix.Location = new System.Drawing.Point(828, 816);
+            this.Seq_Remark_PreFix.Margin = new System.Windows.Forms.Padding(6);
+            this.Seq_Remark_PreFix.Name = "Seq_Remark_PreFix";
+            this.Seq_Remark_PreFix.Power = null;
+            this.Seq_Remark_PreFix.Size = new System.Drawing.Size(84, 35);
+            this.Seq_Remark_PreFix.Str = null;
+            this.Seq_Remark_PreFix.Str1 = null;
+            this.Seq_Remark_PreFix.Str2 = null;
+            this.Seq_Remark_PreFix.TabIndex = 225;
+            this.Seq_Remark_PreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Seq_Remark_PreFix_KeyDown);
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(1175, 232);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(176, 44);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 196;
+            // 
+            // ChangeResult
+            // 
+            this.ChangeResult.AllPower = "ifall";
+            this.ChangeResult.AutoSize = true;
+            this.ChangeResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.ChangeResult.Location = new System.Drawing.Point(560, 854);
+            this.ChangeResult.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.ChangeResult.Name = "ChangeResult";
+            this.ChangeResult.Power = "ifspecial";
+            this.ChangeResult.Size = new System.Drawing.Size(178, 45);
+            this.ChangeResult.TabIndex = 146;
+            this.ChangeResult.Text = "重新转换";
+            this.ChangeResult.UseVisualStyleBackColor = true;
+            this.ChangeResult.CheckedChanged += new System.EventHandler(this.ChangeResult_CheckedChanged);
+            // 
+            // show_sncode
+            // 
+            this.show_sncode.AllPower = null;
+            this.show_sncode.BackColor = System.Drawing.Color.White;
+            this.show_sncode.Enabled = false;
+            this.show_sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.show_sncode.ID = null;
+            this.show_sncode.Location = new System.Drawing.Point(194, 792);
+            this.show_sncode.Margin = new System.Windows.Forms.Padding(6);
+            this.show_sncode.Name = "show_sncode";
+            this.show_sncode.Power = null;
+            this.show_sncode.Size = new System.Drawing.Size(316, 43);
+            this.show_sncode.Str = null;
+            this.show_sncode.Str1 = null;
+            this.show_sncode.Str2 = null;
+            this.show_sncode.TabIndex = 140;
+            // 
+            // pr_detail
+            // 
+            this.pr_detail.AutoSize = true;
+            this.pr_detail.CutLength = null;
+            this.pr_detail.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pr_detail.Location = new System.Drawing.Point(1246, 30);
+            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(266, 0);
+            this.pr_detail.Name = "pr_detail";
+            this.pr_detail.Size = new System.Drawing.Size(0, 41);
+            this.pr_detail.TabIndex = 96;
+            // 
+            // ma_prodcode
+            // 
+            this.ma_prodcode.AutoSize = true;
+            this.ma_prodcode.CutLength = null;
+            this.ma_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.ma_prodcode.Location = new System.Drawing.Point(768, 34);
+            this.ma_prodcode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ma_prodcode.MaximumSize = new System.Drawing.Size(266, 0);
+            this.ma_prodcode.Name = "ma_prodcode";
+            this.ma_prodcode.Size = new System.Drawing.Size(0, 41);
+            this.ma_prodcode.TabIndex = 94;
+            this.ma_prodcode.TextChanged += new System.EventHandler(this.ma_prodcode_TextChanged);
+            // 
+            // afterTransSNLength
+            // 
+            this.afterTransSNLength.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.afterTransSNLength.Location = new System.Drawing.Point(222, 230);
+            this.afterTransSNLength.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.afterTransSNLength.Name = "afterTransSNLength";
+            this.afterTransSNLength.Size = new System.Drawing.Size(332, 43);
+            this.afterTransSNLength.TabIndex = 90;
+            this.afterTransSNLength.Text = "0";
+            // 
+            // beforeTransSNLength
+            // 
+            this.beforeTransSNLength.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.beforeTransSNLength.Location = new System.Drawing.Point(222, 162);
+            this.beforeTransSNLength.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.beforeTransSNLength.Name = "beforeTransSNLength";
+            this.beforeTransSNLength.Size = new System.Drawing.Size(332, 43);
+            this.beforeTransSNLength.TabIndex = 89;
+            this.beforeTransSNLength.Text = "0";
+            // 
+            // afterTransSNPre
+            // 
+            this.afterTransSNPre.AllPower = null;
+            this.afterTransSNPre.BackColor = System.Drawing.Color.White;
+            this.afterTransSNPre.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.afterTransSNPre.ID = null;
+            this.afterTransSNPre.Location = new System.Drawing.Point(805, 232);
+            this.afterTransSNPre.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.afterTransSNPre.Name = "afterTransSNPre";
+            this.afterTransSNPre.Power = null;
+            this.afterTransSNPre.Size = new System.Drawing.Size(332, 43);
+            this.afterTransSNPre.Str = null;
+            this.afterTransSNPre.Str1 = null;
+            this.afterTransSNPre.Str2 = null;
+            this.afterTransSNPre.TabIndex = 88;
+            // 
+            // beforeTransSNPre
+            // 
+            this.beforeTransSNPre.AllPower = null;
+            this.beforeTransSNPre.BackColor = System.Drawing.Color.White;
+            this.beforeTransSNPre.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.beforeTransSNPre.ID = null;
+            this.beforeTransSNPre.Location = new System.Drawing.Point(805, 164);
+            this.beforeTransSNPre.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.beforeTransSNPre.Name = "beforeTransSNPre";
+            this.beforeTransSNPre.Power = null;
+            this.beforeTransSNPre.Size = new System.Drawing.Size(332, 43);
+            this.beforeTransSNPre.Str = null;
+            this.beforeTransSNPre.Str1 = null;
+            this.beforeTransSNPre.Str2 = null;
+            this.beforeTransSNPre.TabIndex = 87;
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 15F);
+            this.OperateResult.Location = new System.Drawing.Point(38, 294);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(6);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(1208, 458);
+            this.OperateResult.TabIndex = 78;
+            this.OperateResult.Text = "";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = "ifall";
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(194, 858);
+            this.sncode.Margin = new System.Windows.Forms.Padding(6);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = "ifread";
+            this.sncode.Size = new System.Drawing.Size(316, 43);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 77;
+            this.sncode.Tag = "IfRead";
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // Make_SeqTransformLabelPrint
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1698, 934);
+            this.Controls.Add(this.PrintNum);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.PrintLabel);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.PrintLabel_label);
+            this.Controls.Add(this.Printer);
+            this.Controls.Add(this.ma_salecode);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.Remark);
+            this.Controls.Add(this.Seq_Remark_PreFix);
+            this.Controls.Add(this.SameReamrk);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.IFONLY);
+            this.Controls.Add(this.CollectRemark);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.ma_softversion);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.ChangeResult);
+            this.Controls.Add(this.ClearSn_code);
+            this.Controls.Add(this.show_sncode);
+            this.Controls.Add(this.sn_code_label);
+            this.Controls.Add(this.changenum);
+            this.Controls.Add(this.remain_qty);
+            this.Controls.Add(this.PrintNum_label);
+            this.Controls.Add(this.remain_qty_label);
+            this.Controls.Add(this.pr_detail);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.ma_prodcode);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.afterTransSNLength);
+            this.Controls.Add(this.beforeTransSNLength);
+            this.Controls.Add(this.afterTransSNPre);
+            this.Controls.Add(this.beforeTransSNPre);
+            this.Controls.Add(this.afterTransSNPre_checkBox);
+            this.Controls.Add(this.beforeTransSNPre_checkBox);
+            this.Controls.Add(this.afterTransSNLength_checkBox);
+            this.Controls.Add(this.beforeTransSNLength_checkBox);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.sncode_label);
+            this.Controls.Add(this.ms_makecode_label);
+            this.Controls.Add(this.pr_detail_label);
+            this.Controls.Add(this.ma_prodcode_label);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Make_SeqTransformLabelPrint";
+            this.Tag = "Make!SeqTransformLabelPrint";
+            this.Text = " ";
+            this.Load += new System.EventHandler(this.Make_SeqTransform_Load);
+            this.SizeChanged += new System.EventHandler(this.Make_SeqTransform_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.ClearSn_code)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+        private System.Windows.Forms.Label ms_makecode_label;
+        private System.Windows.Forms.Label pr_detail_label;
+        private System.Windows.Forms.Label ma_prodcode_label;
+        private System.Windows.Forms.Label sncode_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox sncode;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+        private System.Windows.Forms.CheckBox beforeTransSNLength_checkBox;
+        private System.Windows.Forms.CheckBox afterTransSNLength_checkBox;
+        private System.Windows.Forms.CheckBox beforeTransSNPre_checkBox;
+        private System.Windows.Forms.CheckBox afterTransSNPre_checkBox;
+        private CustomControl.TextBoxWithIcon.EnterTextBox beforeTransSNPre;
+        private CustomControl.TextBoxWithIcon.EnterTextBox afterTransSNPre;
+        private CustomControl.TextBoxWithIcon.TextBoxNumOnly beforeTransSNLength;
+        private CustomControl.TextBoxWithIcon.TextBoxNumOnly afterTransSNLength;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ValueLabel.ValueLabel ma_prodcode;
+        private System.Windows.Forms.Label ma_code;
+        private CustomControl.ValueLabel.ValueLabel pr_detail;
+        private System.Windows.Forms.Label changenum;
+        private System.Windows.Forms.Label remain_qty;
+        private System.Windows.Forms.Label PrintNum_label;
+        private System.Windows.Forms.Label remain_qty_label;
+        private System.Windows.Forms.PictureBox ClearSn_code;
+        private CustomControl.TextBoxWithIcon.EnterTextBox show_sncode;
+        private System.Windows.Forms.Label sn_code_label;
+        private CustomControl.CustomCheckBox.CustomCheckBox ChangeResult;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label ma_softversion;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
+        private CustomControl.TextBoxWithIcon.EnterTextBox Remark;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox Seq_Remark_PreFix;
+        private System.Windows.Forms.CheckBox SameReamrk;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.CheckBox IFONLY;
+        private System.Windows.Forms.CheckBox CollectRemark;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label ma_salecode;
+        private CustomControl.ComBoxWithFocus.ComboxWithTip PrintLabel;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label PrintLabel_label;
+        private CustomControl.ComBoxWithFocus.PrinterCombox Printer;
+        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
+        private System.Windows.Forms.Label label6;
+    }
+}

+ 691 - 0
UAS_MES_MAXMADE/FunctionCode/Make/Make_SeqTransformLabelPrint.cs

@@ -0,0 +1,691 @@
+using Seagull.BarTender.Print;
+using System;
+using System.Data;
+using System.Drawing;
+using System.Threading;
+using System.Windows.Forms;
+using UAS_MES_MAXMADE.DataOperate;
+using UAS_MES_MAXMADE.Entity;
+using UAS_MES_MAXMADE.PublicForm;
+using UAS_MES_MAXMADE.PublicMethod;
+
+namespace UAS_MES_MAXMADE.Make
+{
+    public partial class Make_SeqTransformLabelPrint : Form
+    {
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        DataHelper dh;
+
+        DataTable dt;
+
+        DataTable rules;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        string bsncode = "";//转换前序列号
+
+        string errorMessage = "";
+
+        DataTable ListA;
+        //存放工单中数量
+        int ma_qty;
+
+        string oMakeCode = "";
+
+        string oMsId = "";
+
+        bool onlyPass = false;
+        bool hasSnList = false;//记录是否有转换后SN清单
+
+        bool hasMakeRule = false;//记录是否有工单防呆规则
+        bool hasSaleRule = false;//记录是否有合同防呆规则
+
+        Engine engine;
+
+        Thread InitPrint;
+
+        public Make_SeqTransformLabelPrint()
+        {
+            InitializeComponent();
+        }
+
+
+        private void InPrint()
+        {
+            try
+            {
+                engine = new Engine(true);
+            }
+            catch (Exception)
+            {
+                OperateResult.AppendText("未正确安装BarTender软件\n", Color.Red);
+            }
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (sncode.Text != "")
+                {
+                    if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out errorMessage))
+                    {
+                        OperateResult.AppendText(">>" + sncode.Text + "\n", Color.Black);
+                        //如果用户没有输入工单号自行去后台查询
+                        //通过工单序列号关系验证
+                        //bsncode为空,就说明是输入转换之前的序列号
+                        if (bsncode == "")
+                        {
+                            if (!ChangeResult.Checked)
+                            {
+                                //用户填写了工单号,那么序列号必须要是该工单的,否则提示错误
+                                if (!LogicHandler.CheckStepSNAndMacode("", User.UserSourceCode, sncode.Text, User.UserCode, out oMakeCode, out oMsId, out errorMessage))
+                                {
+                                    OperateResult.AppendText("<<" + errorMessage + "\n", Color.Red, sncode);
+                                    return;
+                                }
+                            }
+                            else//勾选
+                            {
+                                oMsId = dh.getFieldDataByCondition("makeserial", "max(ms_id)", "ms_sncode in (select '" + sncode.Text + "' from dual union select sn from makesnrelation where beforesn='" + sncode.Text + "' and sn<>' ' union select beforesn from makesnrelation where sn='" + sncode.Text + "' and beforesn<>' ')").ToString();
+                                if (oMsId == "")
+                                {
+                                    OperateResult.AppendText("<<TSN号错误\n", Color.Red, sncode);
+                                    return;
+                                }
+                                //根据ms_id查询
+                                sql.Clear();
+                                sql.Append("select ms_stepcode,nvl(ms_downstatus,'0') ms_downstatus from makeserial where ms_id='" + oMsId + "' and ms_beforesn='" + sncode.Text + "' and ms_nextmacode is null and ms_outboxcode is null");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                //如果行数大于0则允许转号
+                                if (dt.Rows.Count > 0)
+                                {
+                                    if (dt.Rows[0]["ms_downstatus"].ToString() != "0")
+                                    {
+                                        OperateResult.AppendText("<<当前TSN号处于下地状态不允许操作\n", Color.Red, sncode);
+                                        return;
+                                    }
+                                    if (dt.Rows[0]["ms_stepcode"].ToString() == User.CurrentStepCode)
+                                    {
+                                        bsncode = sncode.Text;
+                                        //显示序列号
+                                        show_sncode.Text = bsncode;
+                                        ChangeResult.Enabled = false;
+                                    }
+                                    else
+                                    {
+                                        OperateResult.AppendText("<<当前工序不允许重新转号\n", Color.Red, sncode);
+                                        return;
+                                    }
+                                }
+                                else
+                                {
+                                    OperateResult.AppendText("<<TSN号" + sncode.Text + "未转号不允许重新转号\n", Color.Red, sncode);
+                                    return;
+                                }
+                            }
+                            //如果用户没有选择工单号
+                            if (ma_code.Text == "" || ma_code.Text != oMakeCode || ChangeResult.Checked)
+                            {
+                                //按照out出的工单号查出工单相关信息,并赋值到相关控件
+                                sql.Clear();
+                                sql.Append("select ma_code,ma_softversion,ma_prodcode,pr_detail,ma_salecode,ma_qty,ma_qty-mcd_inqty as remain_qty ");
+                                sql.Append("from makeserial left join make on ms_makecode=ma_code left join product on ");
+                                sql.Append("ms_prodcode=pr_code left join makecraftdetail on ms_makecode=mcd_macode where ms_id='" + oMsId + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    //记录数量
+                                    ma_qty = int.Parse(dt.Rows[0]["ma_qty"].ToString());
+                                    BaseUtil.SetFormValue(this.Controls, dt);
+                                }
+                            }
+                            //获取需要关联采集的信息,以及校验规则
+                            ListA = (DataTable)dh.ExecuteSql("select * from productsnrelation where psr_prodcode='" + ma_prodcode.Text + "' order by psr_detno", "select");
+                            //没有获取到就提示错误请维护产品对应的关联采集信息
+                            if (ListA.Rows.Count > 0)
+                            {
+                                OperateResult.AppendText("<<产品已维护关联采集信息,不允许只做转号\n", Color.Red, sncode);
+                                OperateResult.AppendText(">>请输入TSN\n", Color.Black);
+                                if (ChangeResult.Checked)
+                                {
+                                    bsncode = "";
+                                    ChangeResult.Enabled = true;
+                                    show_sncode.Text = "";
+                                }
+                                return;
+                            }
+                            if (ChangeResult.Checked)
+                            {
+                                OperateResult.AppendText(">>请输入SN号\n", Color.Green, sncode);
+                            }
+                            switch (ChangeResult.CheckState)
+                            {
+                                //勾选是修改已转换的序列,矫正修改错了的序列号
+                                case CheckState.Checked:
+                                    break;
+                                case CheckState.Unchecked:
+
+                                    //string beforesn = dh.getFieldDataByCondition("makeserial", "ms_beforesn", "ms_sncode='" + sncode.Text + "'").ToString().Trim();
+                                    //为空,就说明,没有进行过序列号的转换
+                                    if (dh.CheckExist("makeserial", "ms_id='" + oMsId + "' and  ms_sncode='" + sncode.Text + "' and ms_beforesn is null"))
+                                    {
+                                        //记录转换前的序列号
+                                        bsncode = sncode.Text;
+                                        //显示序列号
+                                        show_sncode.Text = bsncode;
+                                        OperateResult.AppendText(">>请输入SN号\n", Color.Green, sncode);
+                                        ChangeResult.Enabled = false;
+                                    }
+                                    else
+                                    //不为空,进行过转换。不勾选修改结果,就不能再修改
+                                    {
+                                        //修改转换结果时,输入两次SN直接过站
+                                        if (dh.CheckExist("MakeSerial", "ms_id='" + oMsId + "' and  ms_sncode='" + sncode.Text + "' and ms_beforesn is not null"))
+                                        {
+                                            string nextstepcode = dh.getFieldDataByCondition("makeserial", "ms_nextstepcode", "ms_id='" + oMsId + "'").ToString();
+                                            if (nextstepcode == User.CurrentStepCode)
+                                            {
+                                                bsncode = sncode.Text;
+                                                //显示序列号
+                                                show_sncode.Text = bsncode;
+                                                OperateResult.AppendText(">>请输入SN号\n", Color.Green, sncode);
+                                                ChangeResult.Enabled = false;
+                                                onlyPass = true;
+                                            }
+                                            else
+                                            {
+                                                OperateResult.AppendText("<<序列号:" + sncode.Text + "下一工序是" + nextstepcode + ",不是当前岗位的工序\n", Color.Red, sncode);
+                                                OperateResult.AppendText(">>请重新输入TSN号\n", Color.Black);
+                                            }
+                                        }
+                                        else
+                                        {
+                                            OperateResult.AppendText("<<序列号:" + sncode.Text + "已转换过\n", Color.Red, sncode);
+                                            OperateResult.AppendText(">>请重新输入TSN号\n", Color.Black);
+                                        }
+                                    }
+                                    break;
+                                default:
+                                    break;
+                            }
+                        }
+                        //bsncode不为空,说明输入的是转换后的序列号
+                        else
+                        {
+                            //判断工单是否导入了序列号清单
+                            if (hasSnList)
+                            {
+                                if (!dh.CheckExist("makesnlist", "msl_sncode='" + sncode.Text + "' and msl_makecode='" + ma_code.Text + "' and msl_type='after'"))
+                                {
+                                    //有序列号清单,输入的序列号却不在范围内
+                                    OperateResult.AppendText("<<SN号" + sncode.Text + "错误,不在工单设定的转换后序列号清单中\n", Color.Red, sncode);
+                                    return;
+                                }
+                            }
+                            else if (hasMakeRule)//判断工单防呆
+                            {
+                                if (!dh.CheckExist("makesnruledetail", "msd_sncode='" + sncode.Text + "' and  msd_makecode='" + ma_code.Text + "' and msd_type='after'"))
+                                {
+                                    OperateResult.AppendText("<<SN号" + sncode.Text + "校验错误,不在工单防呆规则指定范围内!\n", Color.Red, sncode);
+                                    return;
+                                }
+                            }
+                            else if (hasSaleRule)//判断合同防呆
+                            {
+                                if (!dh.CheckExist("makesnruledetail", "msd_sncode='" + sncode.Text + "' and  msd_salecode='" + ma_salecode.Text + "' and msd_type='after'"))
+                                {
+                                    OperateResult.AppendText("<<SN号" + sncode.Text + "校验错误,不在合同防呆规则指定范围内!\n", Color.Red, sncode);
+                                    return;
+                                }
+                            }
+                            else//判断产品防呆
+                            {
+                                //判断用户是否锁定输入转换后序列号长度,
+                                if (!checkLengthOrPre(afterTransSNLength_checkBox, afterTransSNLength, "长度"))
+                                    return;
+                                //判断用户是否锁定输入转换后序列号前缀,
+                                if (!checkLengthOrPre(afterTransSNPre_checkBox, afterTransSNPre, "前缀"))
+                                    return;
+                            }
+                            //防呆验证完成
+                            if ((!ChangeResult.Checked && (!dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "' and ms_id <>'" + oMsId + "' and nvl(ms_nextmacode,' ') =' '") && !onlyPass || onlyPass && bsncode == sncode.Text)) || (ChangeResult.Checked && !dh.CheckExist("makeserial", "ms_sncode='" + sncode.Text + "' and ms_id <>'" + oMsId + "' and nvl(ms_nextmacode,' ') =' '")))
+                            {
+                                if (CollectRemark.Checked || SameReamrk.Checked)
+                                {
+                                    if (Remark.Text == "")
+                                    {
+                                        OperateResult.AppendText(">>备注栏信息为空,录入备注信息\n", Color.Black);
+                                        Remark.SelectAll();
+                                        Remark.Focus();
+                                        return;
+                                    }
+                                    if (IFONLY.Checked)
+                                    {
+                                        if (!CheckPre())
+                                        {
+                                            return;
+                                        }
+                                        string UsedSncode = dh.getFieldDataByCondition("SNRELATIONINFORECORD", "SIR_SNCODE", "sir_remark = '" + Remark.Text + "'").ToString();
+                                        if (UsedSncode != "")
+                                        {
+                                            OperateResult.AppendText(">>备注信息" + Remark.Text + "已被" + UsedSncode + "采集,不可重复采集\n", Color.Red);
+                                            Remark.SelectAll();
+                                            Remark.Focus();
+                                            return;
+                                        }
+                                        LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                        OperateResult.AppendText(">>备注:" + Remark.Text + "\n", Color.Black);
+                                        if (CollectRemark.Checked)
+                                        {
+                                            Remark.Text = "";
+                                        }
+                                    }
+                                    else
+                                    {
+                                        if (!CheckPre())
+                                        {
+                                            return;
+                                        }
+                                        LogicHandler.CollectRemarkInf(show_sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                        OperateResult.AppendText(">>备注:" + Remark.Text + "\n", Color.Black);
+                                        if (CollectRemark.Checked)
+                                        {
+                                            Remark.Text = "";
+                                        }
+                                    }
+                                }
+
+                                if (!ChangeResult.Checked && !onlyPass || bsncode != sncode.Text)
+                                {
+                                    string firstsn = "";
+                                    string updateSql = "";
+                                    //勾选了修改转换结果
+                                    if (ChangeResult.Checked)
+                                    {
+                                        //查询ms_firstsn
+                                        firstsn = dh.getFieldDataByCondition("makeserial", "ms_firstsn", "ms_id='" + oMsId + "' and  ms_beforesn='" + bsncode + "'").ToString();
+                                        //记录本次修改,存入makesnrelation表中
+                                        updateSql = "update makeserial set ms_sncode='" + sncode.Text + "' where ms_id='" + oMsId + "' and  ms_beforesn='" + bsncode + "'";
+                                        //删除最近一条转换记录
+                                        dh.ExecuteSql("delete from makesnrelation where BEFORESN='" + bsncode + "' and makecode='" + ma_code.Text + "'", "delete");
+                                    }
+                                    //未勾选修改转换结果
+                                    else
+                                    {
+                                        //查询ms_firstsn
+                                        firstsn = dh.getFieldDataByCondition("makeserial", "ms_firstsn", "ms_id='" + oMsId + "' and  ms_sncode='" + bsncode + "'").ToString();
+                                        //记录本次修改,存入makesnrelation表中
+                                        updateSql = "update makeserial set ms_sncode='" + sncode.Text + "', ms_beforesn='" + bsncode + "' where ms_id='" + oMsId + "' and  ms_sncode='" + bsncode + "'";
+                                    }
+                                    string insertSql = "insert into  makesnrelation (BEFORESN,SN,FIRSTSN,MAKECODE,msr_indate, msr_inman)values('" + bsncode + "','" + sncode.Text + "','" + firstsn + "','" + ma_code.Text + "', sysdate ,'" + User.UserCode + "')";
+                                    dh.ExecuteSQLTran(updateSql, insertSql);
+                                }
+                                onlyPass = false;
+                                OperateResult.AppendText("<<序列号" + bsncode + "成功转换为" + sncode.Text + "\n", Color.Green);
+                                //记录日志
+                                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "序列转换", bsncode + "转换为" + sncode.Text, sncode.Text, "");
+                                //if (CollectRemark.Checked && Remark.Text != "")
+                                //{
+                                //    LogicHandler.CollectRemarkInf(sncode.Text, "", "", oMakeCode, ma_prodcode.Text, Remark.Text);
+                                //}
+                                LogManager.DoLog("修改序列号:" + bsncode + "为" + sncode.Text + "成功!" + "操作人:" + User.UserCode);
+                                //写入日志
+                                if (!LogicHandler.SetStepResult(ma_code.Text, User.UserSourceCode, sncode.Text, "序列转换", "序列转换成功", User.UserCode, out errorMessage))
+                                {
+                                    OperateResult.AppendText(">>" + errorMessage + "\n", Color.Red, sncode);
+                                }
+                                if (!Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), Printer.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, ma_prodcode.Text, "彩盒标", "0", out errorMessage))
+                                {
+                                    OperateResult.AppendText(errorMessage + "\n", Color.Red);
+                                }
+                                OperateResult.AppendText(">>" + sncode.Text + "标签打印成功\n", Color.Green);
+                                OperateResult.AppendText(">>请输入TSN号\n", Color.Black);
+                                //置空
+                                bsncode = "";
+                                show_sncode.Text = "";
+                                //获取剩余数,刷新页面
+                                sql.Clear();
+                                sql.Append("select mcd_inqty from makecraftdetail where mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                                if (dt.Rows.Count > 0)
+                                {
+                                    remain_qty.Text = ma_qty - int.Parse(dt.Rows[0]["mcd_inqty"].ToString()) + "";
+                                }
+                                //更新数量
+                                changenum.Text = int.Parse(changenum.Text) + 1 + "";
+                                ChangeResult.Enabled = true;
+                            }
+                            else
+                            {
+                                if (onlyPass)
+                                {
+                                    OperateResult.AppendText("<<SN号" + sncode.Text + "错误,已完成转号只允许SN转SN\n", Color.Red);
+                                }
+                                else
+                                {
+                                    OperateResult.AppendText("<<SN号" + sncode.Text + "已存在,请输入其他序列号\n", Color.Red);
+                                }
+                            }
+                            sncode.Text = "";
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText("<<" + errorMessage + "\n", Color.Red, sncode);
+                    }
+                }
+                else
+                {
+                    OperateResult.AppendText("<<序列号不能为空\n", Color.Red);
+                }
+                sncode.Text = "";
+            }
+        }
+
+        private void Confirm_Click(object sender, EventArgs e)
+        {
+            KeyEventArgs ky = new KeyEventArgs(Keys.Enter);
+            sncode_KeyDown(sender, ky);
+        }
+
+        private void ReCall_Click(object sender, EventArgs e)
+        {
+            bsncode = "";
+            OperateResult.AppendText(">>请输入TSN号\n", Color.Green, show_sncode);
+            ChangeResult.Enabled = true;
+            onlyPass = false;
+        }
+        /// <summary>
+        /// 工单号keydown
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ms_makecode_KeyDown(object sender, KeyEventArgs e)
+        {
+
+        }
+        /// <summary>
+        /// 如果清空了工单号,或者更换了工单号则将 : 转换前序列号长度,转换前序列号前缀
+        ///转换后序列号长度,转换后序列号前缀 四个字段值清空。
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ms_makecode_UserControlTextChanged(object sender, EventArgs e)
+        {
+            hasSnList = false;
+            hasMakeRule = false;
+            hasSaleRule = false;
+            //清空
+            beforeTransSNPre.Text = "";
+            beforeTransSNLength.Text = "";
+            afterTransSNPre.Text = "";
+            afterTransSNLength.Text = "";
+
+            //取消勾选
+            beforeTransSNPre_checkBox.Checked = false;
+            beforeTransSNLength_checkBox.Checked = false;
+            afterTransSNPre_checkBox.Checked = false;
+            afterTransSNLength_checkBox.Checked = false;
+
+            //设置可编辑
+            beforeTransSNLength.Enabled = true;
+            beforeTransSNPre.Enabled = true;
+            afterTransSNLength.Enabled = true;
+            afterTransSNPre.Enabled = true;
+
+            beforeTransSNPre_checkBox.Enabled = true;
+            beforeTransSNLength_checkBox.Enabled = true;
+            afterTransSNPre_checkBox.Enabled = true;
+            afterTransSNLength_checkBox.Enabled = true;
+            //判断工单是否导入了序列号清单
+            if (dh.CheckExist("makesnlist", "msl_makecode='" + ma_code.Text + "' and msl_type='after'"))
+            {
+                hasSnList = true;
+                return;
+            }
+            //查询表工单序列号防呆规则表
+            rules = (DataTable)dh.ExecuteSql("select msr_startno from makesnrule where msr_makecode='" + ma_code.Text + "' and msr_type='after'", "select");
+            if (rules.Rows.Count > 0)
+            {
+                hasMakeRule = true;
+            }
+            else
+            {
+                ma_salecode.Text = dh.getFieldDataByCondition("make", "ma_salecode", "ma_code='" + ma_code.Text + "'").ToString();
+                //查询表合同序列号防呆规则表
+                rules = (DataTable)dh.ExecuteSql("select msr_startno from makesnrule where msr_salecode='" + ma_salecode.Text + "' and msr_type='after'", "select");
+                if (rules.Rows.Count > 0)
+                {
+                    hasSaleRule = true;
+                }
+                else
+                {
+                    /*	如果转换前没有值,则取 select productsnrule where psr_prodcode=? 产品编号,
+                     *	有值则赋值到 转换前,并且自动勾选不可编辑。*/
+                    rules = (DataTable)dh.ExecuteSql("select psr_prefix ,psr_length from productsnrule where psr_prodcode = '" + dt.Rows[0]["ma_prodcode"].ToString() + "' and psr_type='after'", "select");
+                    if (rules.Rows.Count > 0)
+                    {
+                        //将产品序列号防呆规则查出的数据填充
+                        if (rules.Rows[0]["psr_prefix"].ToString() != "")
+                        {
+                            afterTransSNPre.Text = rules.Rows[0]["psr_prefix"].ToString();
+                            afterTransSNPre.Enabled = false;
+                            afterTransSNPre_checkBox.Checked = true;
+                            afterTransSNPre_checkBox.Enabled = false;
+                        }
+                        if (rules.Rows[0]["psr_length"].ToString() != "")
+                        {
+                            afterTransSNLength.Text = rules.Rows[0]["psr_length"].ToString();
+                            afterTransSNLength.Enabled = false;
+                            afterTransSNLength_checkBox.Checked = true;
+                            afterTransSNLength_checkBox.Enabled = false;
+                        }
+                    }
+                }
+            }
+        }
+        /// <summary>
+        /// 检验长度或者前缀是否合法
+        /// </summary>
+        /// <param name="checkbox"></param>
+        /// <param name="c"></param>
+        /// <param name="info"></param>
+        private bool checkLengthOrPre(CheckBox checkbox, TextBox textbox, string type)
+        {
+            if (checkbox.Checked == true)
+            {
+                //如果勾选没有填值
+                if (textbox.Text == "")
+                {
+                    OperateResult.AppendText("<<勾选长度或者前缀需要填写内容\n", Color.Red);
+                    return false;
+                }
+                if (type == "长度")
+                {
+                    //则判断输入转换前的序列号长度是否合法,不合法则提示
+                    if (sncode.Text.Trim().Length != int.Parse(textbox.Text))
+                    {
+                        //序列号校验错误,长度错误
+                        OperateResult.AppendText("<<序列号" + sncode.Text + "校验错误,长度错误\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>请重新输入SN号\n", Color.Black);
+                        return false;
+                    }
+                }
+                else if (type == "前缀")
+                {
+                    string[] pres = textbox.Text.Split('|');
+                    bool f = false;
+                    for (int i = 0; i < pres.Length; i++)
+                    {
+                        if (pres[i] == "" ? true : sncode.Text.StartsWith(pres[i]))
+                        {
+                            //满足其中一条即可
+                            f = true;
+                            break;
+                        }
+                    }
+                    //则判断输入转换前的序列号前缀是否合法,不合法则提示
+                    if (!f)
+                    {
+                        //序列号校验错误,前缀错误
+                        OperateResult.AppendText("<<序列号" + sncode.Text + "校验错误,前缀错误\n", Color.Red, sncode);
+                        OperateResult.AppendText(">>请重新输入SN号\n", Color.Black);
+                        return false;
+                    }
+                }
+                return true;
+            }
+            return true;
+        }
+
+        private void ChangeResult_CheckedChanged(object sender, EventArgs e)
+        {
+            if (ChangeResult.Checked)
+            {
+                //勾选的时候提示输入TSN
+                OperateResult.AppendText(">>请输入TSN号\n", Color.Black);
+            }
+        }
+
+        private void Make_SeqTransform_Load(object sender, EventArgs e)
+        {
+            asc.controllInitializeSize(this);
+            InitPrint = new Thread(InPrint);
+            SetLoadingWindow stw = new SetLoadingWindow(InitPrint, "初始化打印程序");
+            BaseUtil.SetFormCenter(stw);
+            stw.ShowDialog();
+            dh = SystemInf.dh;
+            sncode.Focus();
+            OperateResult.AppendText(">>请输入TSN号\n", Color.Black);
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
+            Seq_Remark_PreFix.Text = BaseUtil.GetCacheData("Seq_Remark_PreFix").ToString();
+        }
+
+        private void Make_SeqTransform_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+
+        private void Remark_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                try
+                {
+                    if ((CollectRemark.Checked || SameReamrk.Checked) && Remark.Text != "")
+                    {
+                        sncode.Enabled = true;
+                        sncode.Focus();
+                        sncode_KeyDown(this, new KeyEventArgs(Keys.Enter));
+                    }
+                    else
+                    {
+                        sncode.Enabled = true;
+                        sncode.Focus();
+                    }
+                }
+                catch
+                {
+                    sncode.Enabled = true;
+                    sncode.Focus();
+                }
+            }
+        }
+
+        private void IFONLY_CheckedChanged(object sender, EventArgs e)
+        {
+            if (IFONLY.Checked)
+            {
+                SameReamrk.Checked = false;
+                CollectRemark.Checked = true;
+            }
+        }
+
+        private void SameReamrk_CheckedChanged(object sender, EventArgs e)
+        {
+            if (SameReamrk.Checked)
+            {
+                IFONLY.Checked = false;
+                CollectRemark.Checked = false;
+            }
+        }
+
+        private void Seq_Remark_PreFix_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                BaseUtil.SetCacheData("Seq_Remark_PreFix", Seq_Remark_PreFix.Text);
+                if (CollectRemark.Checked || SameReamrk.Checked)
+                {
+                    Remark.SelectAll();
+                    Remark.Focus();
+                }
+            }
+        }
+
+
+        //校验备注前缀
+        private Boolean CheckPre()
+        {
+            try
+            {
+                if (Remark.Text.Substring(0, Seq_Remark_PreFix.Text.Length) != Seq_Remark_PreFix.Text)
+                {
+                    OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                    Remark.SelectAll();
+                    Remark.Focus();
+                    return false;
+                }
+            }
+            catch (Exception)
+            {
+                OperateResult.AppendText(">>备注前缀不匹配,请重新输入备注信息\n", Color.Red);
+                Remark.SelectAll();
+                Remark.Focus();
+                return false;
+            }
+            return true;
+        }
+
+        private void CollectRemark_CheckedChanged(object sender, EventArgs e)
+        {
+            if (CollectRemark.Checked)
+            {
+                SameReamrk.Checked = false;
+            }
+        }
+
+        private void Remark_Leave(object sender, EventArgs e)
+        {
+            sncode.Enabled = true;
+        }
+
+        private void Remark_Enter(object sender, EventArgs e)
+        {
+            sncode.Enabled = false;
+        }
+
+        private void PrintLabel_SelectedValueChanged(object sender, EventArgs e)
+        {
+            if (PrintLabel.SelectedValue != null && PrintLabel.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                string PrintNums = dh.getFieldDataByCondition("label", "la_printnos", "la_id='" + PrintLabel.SelectedValue.ToString() + "'").ToString();
+                PrintNum.Text = (PrintNums == "" ? "1" : PrintNums);
+            }
+        }
+
+        private void ma_prodcode_TextChanged(object sender, EventArgs e)
+        {
+            DataTable _dt = (DataTable)dh.ExecuteSql("select la_id,la_url,la_isdefault from label where la_prodcode='" + ma_prodcode.Text + "' and la_templatetype='彩盒标' and la_statuscode='AUDITED' order by la_isdefault", "select");
+            PrintLabel.DataSource = _dt;
+            PrintLabel.DisplayMember = "la_url";
+            PrintLabel.ValueMember = "la_id";
+        }
+    }
+}

+ 120 - 0
UAS_MES_MAXMADE/FunctionCode/Make/Make_SeqTransformLabelPrint.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -61,7 +61,7 @@ namespace UAS_MES_MAXMADE.Make
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_BigBoxCollection.cs

@@ -49,7 +49,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_BigBoxWeight.cs

@@ -87,7 +87,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_CartonBoxSNWeigh.cs

@@ -102,7 +102,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_CartonBoxWeigh.cs

@@ -92,7 +92,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -46,7 +46,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
             }
             catch (Exception ex)

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -54,7 +54,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PalletWeigh.cs

@@ -75,7 +75,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 lbl = new ApplicationClass();
                 BaseUtil.WriteLbl();
             }

+ 1 - 1
UAS_MES_MAXMADE/FunctionCode/Packing/Packing_PalletWightCollection.cs

@@ -68,7 +68,7 @@ namespace UAS_MES_MAXMADE.Packing
         {
             try
             {
-                engine = new Engine();
+                engine = new Engine(true);
                 //lbl = new ApplicationClass();
                 //BaseUtil.WriteLbl();
             }

+ 2 - 2
UAS_MES_MAXMADE/PublicMethod/BaseUtil.cs

@@ -1060,13 +1060,13 @@ namespace UAS_MES_MAXMADE.PublicMethod
 
         public static void WriteLbl()
         {
-            Process[] processes = System.Diagnostics.Process.GetProcessesByName("lppa");
+            Process[] processes = Process.GetProcessesByName("bartend");
             Dictionary<string, int> ProInf = new Dictionary<string, int>();
             for (int i = 0; i < processes.Length; i++)
             {
                 try
                 {
-                    if (processes[i].ProcessName == "lppa")
+                    if (processes[i].ProcessName == "bartend")
                     {
                         ProInf.Add(processes[i].StartTime.ToString(), processes[i].Id);
                     }

+ 2 - 1
UAS_MES_MAXMADE/PublicMethod/Print.cs

@@ -158,7 +158,7 @@ namespace UAS_MES_MAXMADE.PublicMethod
             if (filechangetime != filelastwritetime)
             {
                 lbl.Stop();
-                lbl = new Engine();
+                lbl = new Engine(true);
                 BaseUtil.WriteLbl();
                 filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
                 string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
@@ -214,6 +214,7 @@ namespace UAS_MES_MAXMADE.PublicMethod
             LogManager.DoLog(sb.ToString());
             //保存本次赋值进行打印
             format.PrintSetup.PrinterName = PrinterName;
+            format.PrintSetup.IdenticalCopiesOfLabel = PrintNum;
             format.Print();
             LogicHandler.DoCommandLog(iCaller, User.UserCode, "", User.UserLineCode, User.UserSourceCode, "打印", "成功打印", SnCode, "");
             for (int k = 0; k < format.SubStrings.Count; k++)

+ 9 - 0
UAS_MES_MAXMADE/UAS_MES_MAXMADE.csproj

@@ -530,6 +530,12 @@
     <Compile Include="FunctionCode\Make\Make_CollectElec.Designer.cs">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Make\Make_SeqTransformLabelPrint.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Make\Make_SeqTransformLabelPrint.Designer.cs">
+      <DependentUpon>Make_SeqTransformLabelPrint.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Make\Make_SmtTestCollection.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1223,6 +1229,9 @@
     <EmbeddedResource Include="FunctionCode\Make\Make_CollectElec.resx">
       <DependentUpon>Make_CollectElec.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Make\Make_SeqTransformLabelPrint.resx">
+      <DependentUpon>Make_SeqTransformLabelPrint.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_SmtTestCollection.resx">
       <DependentUpon>Make_SmtTestCollection.cs</DependentUpon>
     </EmbeddedResource>