Browse Source

镝泰项目修改提交

caosy 4 years ago
parent
commit
b865770a25

+ 84 - 78
UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxLabelPrint.Designer.cs

@@ -29,7 +29,7 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip();
+            this.PrintLabel = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.pr_detail_label = new System.Windows.Forms.Label();
@@ -53,16 +53,18 @@
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.CollectRemark = new System.Windows.Forms.CheckBox();
             this.Remark = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
+            this.label3 = new System.Windows.Forms.Label();
             this.SuspendLayout();
             // 
             // PrintLabel
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1052, 244);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.PrintLabel.Location = new System.Drawing.Point(790, 227);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(177, 23);
+            this.PrintLabel.Size = new System.Drawing.Size(134, 20);
             this.PrintLabel.TabIndex = 181;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -70,10 +72,9 @@
             // 
             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(967, 180);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(726, 176);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(72, 27);
+            this.label2.Size = new System.Drawing.Size(58, 21);
             this.label2.TabIndex = 180;
             this.label2.Text = "打印机";
             // 
@@ -81,10 +82,9 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(967, 244);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(726, 227);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(52, 27);
+            this.label1.Size = new System.Drawing.Size(42, 21);
             this.label1.TabIndex = 179;
             this.label1.Text = "标签";
             // 
@@ -92,10 +92,9 @@
             // 
             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(861, 53);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(646, 42);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 171;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -105,10 +104,9 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             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(349, 558);
-            this.sncode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sncode_label.Location = new System.Drawing.Point(262, 446);
             this.sncode_label.Name = "sncode_label";
-            this.sncode_label.Size = new System.Drawing.Size(88, 27);
+            this.sncode_label.Size = new System.Drawing.Size(70, 21);
             this.sncode_label.TabIndex = 170;
             this.sncode_label.Text = "TSN/SN";
             // 
@@ -116,10 +114,9 @@
             // 
             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(861, 111);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(646, 89);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(92, 27);
+            this.label4.Size = new System.Drawing.Size(74, 21);
             this.label4.TabIndex = 167;
             this.label4.Text = "打印张数";
             // 
@@ -127,10 +124,9 @@
             // 
             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(500, 105);
-            this.mcd_remainqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty_label.Location = new System.Drawing.Point(375, 84);
             this.mcd_remainqty_label.Name = "mcd_remainqty_label";
-            this.mcd_remainqty_label.Size = new System.Drawing.Size(72, 27);
+            this.mcd_remainqty_label.Size = new System.Drawing.Size(58, 21);
             this.mcd_remainqty_label.TabIndex = 166;
             this.mcd_remainqty_label.Text = "剩余数";
             // 
@@ -138,10 +134,9 @@
             // 
             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(16, 105);
-            this.mcd_okqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty_label.Location = new System.Drawing.Point(12, 84);
             this.mcd_okqty_label.Name = "mcd_okqty_label";
-            this.mcd_okqty_label.Size = new System.Drawing.Size(92, 27);
+            this.mcd_okqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_okqty_label.TabIndex = 165;
             this.mcd_okqty_label.Text = "打印计数";
             // 
@@ -149,10 +144,9 @@
             // 
             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(500, 52);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(375, 42);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 164;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -160,10 +154,9 @@
             // 
             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(13, 52);
-            this.ms_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.ms_makecode_label.Location = new System.Drawing.Point(10, 42);
             this.ms_makecode_label.Name = "ms_makecode_label";
-            this.ms_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.ms_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_makecode_label.TabIndex = 163;
             this.ms_makecode_label.Text = "归属工单";
             // 
@@ -173,10 +166,9 @@
             this.CheckTSN.Checked = true;
             this.CheckTSN.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CheckTSN.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CheckTSN.Location = new System.Drawing.Point(43, 556);
-            this.CheckTSN.Margin = new System.Windows.Forms.Padding(4);
+            this.CheckTSN.Location = new System.Drawing.Point(32, 445);
             this.CheckTSN.Name = "CheckTSN";
-            this.CheckTSN.Size = new System.Drawing.Size(153, 31);
+            this.CheckTSN.Size = new System.Drawing.Size(124, 25);
             this.CheckTSN.TabIndex = 186;
             this.CheckTSN.Text = "是否检查TSN";
             this.CheckTSN.UseVisualStyleBackColor = true;
@@ -185,9 +177,10 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(972, 307);
+            this.StepCount.Location = new System.Drawing.Point(729, 246);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(106, 28);
+            this.StepCount.Size = new System.Drawing.Size(80, 22);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 189;
@@ -197,10 +190,9 @@
             this.LockMakeCode.AutoSize = true;
             this.LockMakeCode.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.LockMakeCode.LeaveEvent = false;
-            this.LockMakeCode.Location = new System.Drawing.Point(332, 52);
-            this.LockMakeCode.Margin = new System.Windows.Forms.Padding(4);
+            this.LockMakeCode.Location = new System.Drawing.Point(249, 42);
             this.LockMakeCode.Name = "LockMakeCode";
-            this.LockMakeCode.Size = new System.Drawing.Size(61, 24);
+            this.LockMakeCode.Size = new System.Drawing.Size(51, 21);
             this.LockMakeCode.TabIndex = 185;
             this.LockMakeCode.Text = "锁定";
             this.LockMakeCode.UseVisualStyleBackColor = true;
@@ -212,14 +204,13 @@
             this.ma_code.Condition = null;
             this.ma_code.DBTitle = null;
             this.ma_code.FormName = null;
-            this.ma_code.Location = new System.Drawing.Point(120, 52);
-            this.ma_code.Margin = new System.Windows.Forms.Padding(4);
+            this.ma_code.Location = new System.Drawing.Point(90, 42);
             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(199, 26);
+            this.ma_code.Size = new System.Drawing.Size(149, 21);
             this.ma_code.TabIndex = 184;
             this.ma_code.TableName = null;
             this.ma_code.TextBoxEnable = true;
@@ -227,20 +218,19 @@
             // 
             // Printer
             // 
-            this.Printer.Location = new System.Drawing.Point(1052, 180);
-            this.Printer.Margin = new System.Windows.Forms.Padding(5);
+            this.Printer.Location = new System.Drawing.Point(790, 176);
+            this.Printer.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Printer.Name = "Printer";
-            this.Printer.Size = new System.Drawing.Size(179, 31);
+            this.Printer.Size = new System.Drawing.Size(134, 25);
             this.Printer.TabIndex = 178;
             // 
             // 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(617, 105);
-            this.mcd_remainqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_remainqty.Location = new System.Drawing.Point(463, 84);
             this.mcd_remainqty.Name = "mcd_remainqty";
-            this.mcd_remainqty.Size = new System.Drawing.Size(24, 27);
+            this.mcd_remainqty.Size = new System.Drawing.Size(19, 21);
             this.mcd_remainqty.TabIndex = 177;
             this.mcd_remainqty.Text = "0";
             // 
@@ -248,10 +238,9 @@
             // 
             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(115, 105);
-            this.mcd_okqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.mcd_okqty.Location = new System.Drawing.Point(86, 84);
             this.mcd_okqty.Name = "mcd_okqty";
-            this.mcd_okqty.Size = new System.Drawing.Size(24, 27);
+            this.mcd_okqty.Size = new System.Drawing.Size(19, 21);
             this.mcd_okqty.TabIndex = 176;
             this.mcd_okqty.Text = "0";
             // 
@@ -260,11 +249,10 @@
             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(617, 53);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_code.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pr_code.Location = new System.Drawing.Point(463, 42);
+            this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_code.Name = "pr_code";
-            this.pr_code.Size = new System.Drawing.Size(0, 27);
+            this.pr_code.Size = new System.Drawing.Size(0, 21);
             this.pr_code.TabIndex = 175;
             this.pr_code.TextChanged += new System.EventHandler(this.pr_code_TextChanged);
             // 
@@ -273,11 +261,10 @@
             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(979, 52);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pr_detail.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pr_detail.Location = new System.Drawing.Point(734, 42);
+            this.pr_detail.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_detail.Name = "pr_detail";
-            this.pr_detail.Size = new System.Drawing.Size(0, 27);
+            this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 174;
             // 
             // PrintNum
@@ -286,12 +273,11 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(979, 111);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintNum.Location = new System.Drawing.Point(734, 89);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Negative = false;
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(199, 25);
+            this.PrintNum.Size = new System.Drawing.Size(150, 21);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -305,11 +291,10 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.sncode.BackColor = System.Drawing.Color.White;
             this.sncode.ID = null;
-            this.sncode.Location = new System.Drawing.Point(468, 559);
-            this.sncode.Margin = new System.Windows.Forms.Padding(4);
+            this.sncode.Location = new System.Drawing.Point(351, 447);
             this.sncode.Name = "sncode";
             this.sncode.Power = null;
-            this.sncode.Size = new System.Drawing.Size(260, 25);
+            this.sncode.Size = new System.Drawing.Size(196, 21);
             this.sncode.Str = null;
             this.sncode.Str1 = null;
             this.sncode.Str2 = null;
@@ -320,10 +305,9 @@
             // 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(19, 161);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(14, 129);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(940, 380);
+            this.OperateResult.Size = new System.Drawing.Size(706, 305);
             this.OperateResult.TabIndex = 168;
             this.OperateResult.Text = "";
             // 
@@ -333,10 +317,9 @@
             this.CollectRemark.Checked = true;
             this.CollectRemark.CheckState = System.Windows.Forms.CheckState.Checked;
             this.CollectRemark.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.CollectRemark.Location = new System.Drawing.Point(972, 361);
-            this.CollectRemark.Margin = new System.Windows.Forms.Padding(4);
+            this.CollectRemark.Location = new System.Drawing.Point(729, 289);
             this.CollectRemark.Name = "CollectRemark";
-            this.CollectRemark.Size = new System.Drawing.Size(100, 27);
+            this.CollectRemark.Size = new System.Drawing.Size(84, 24);
             this.CollectRemark.TabIndex = 197;
             this.CollectRemark.Text = "采集备注";
             this.CollectRemark.UseVisualStyleBackColor = true;
@@ -344,18 +327,40 @@
             // Remark
             // 
             this.Remark.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Remark.Location = new System.Drawing.Point(967, 395);
-            this.Remark.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2);
+            this.Remark.Location = new System.Drawing.Point(725, 316);
+            this.Remark.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Remark.Name = "Remark";
-            this.Remark.Size = new System.Drawing.Size(271, 99);
+            this.Remark.Size = new System.Drawing.Size(204, 80);
             this.Remark.TabIndex = 196;
             this.Remark.Text = "";
             // 
+            // comboBox1
+            // 
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Items.AddRange(new object[] {
+            "CODESOFT",
+            "BARTENDER"});
+            this.comboBox1.Location = new System.Drawing.Point(790, 129);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(134, 20);
+            this.comboBox1.TabIndex = 198;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(729, 136);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(53, 12);
+            this.label3.TabIndex = 199;
+            this.label3.Text = "打印程序";
+            // 
             // Make_ColorBoxLabelPrint
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1251, 600);
+            this.ClientSize = new System.Drawing.Size(938, 480);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.comboBox1);
             this.Controls.Add(this.CollectRemark);
             this.Controls.Add(this.Remark);
             this.Controls.Add(this.StepCount);
@@ -381,7 +386,6 @@
             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(4);
             this.Name = "Make_ColorBoxLabelPrint";
             this.Tag = "Make!ColorBoxLabelPrint";
             this.Text = "标签打印";
@@ -389,7 +393,7 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Make_ColorBoxLabelPrint_FormClosing);
             this.Load += new System.EventHandler(this.Make_ColorBoxLabelPrint_Load);
             this.SizeChanged += new System.EventHandler(this.Make_ColorBoxLabelPrint_SizeChanged);
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -420,5 +424,7 @@
         private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
         private System.Windows.Forms.CheckBox CollectRemark;
         private CustomControl.RichText.RichTextAutoBottom Remark;
+        private System.Windows.Forms.ComboBox comboBox1;
+        private System.Windows.Forms.Label label3;
     }
 }

+ 37 - 10
UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxWeigh.Designer.cs

@@ -87,6 +87,8 @@
             this.OperateResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
             this.LockMakeCode = new UAS_MES_NEW.CustomControl.CustomCheckBox.LockCheckBox();
             this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.MaCodeSearchTextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
             this.panel4.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
             this.SuspendLayout();
@@ -212,7 +214,7 @@
             // 
             this.Printer_label.AutoSize = true;
             this.Printer_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Printer_label.Location = new System.Drawing.Point(770, 86);
+            this.Printer_label.Location = new System.Drawing.Point(770, 121);
             this.Printer_label.Name = "Printer_label";
             this.Printer_label.Size = new System.Drawing.Size(84, 20);
             this.Printer_label.TabIndex = 162;
@@ -222,7 +224,7 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(770, 118);
+            this.PrintLabel_label.Location = new System.Drawing.Point(770, 153);
             this.PrintLabel_label.Name = "PrintLabel_label";
             this.PrintLabel_label.Size = new System.Drawing.Size(69, 20);
             this.PrintLabel_label.TabIndex = 163;
@@ -232,7 +234,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(770, 58);
+            this.label1.Location = new System.Drawing.Point(770, 93);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(69, 20);
             this.label1.TabIndex = 170;
@@ -268,10 +270,10 @@
             this.columnHeader3,
             this.columnHeader4});
             this.WeighRecord.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.WeighRecord.Location = new System.Drawing.Point(377, 218);
+            this.WeighRecord.Location = new System.Drawing.Point(377, 261);
             this.WeighRecord.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.WeighRecord.Name = "WeighRecord";
-            this.WeighRecord.Size = new System.Drawing.Size(381, 334);
+            this.WeighRecord.Size = new System.Drawing.Size(381, 291);
             this.WeighRecord.TabIndex = 173;
             this.WeighRecord.UseCompatibleStateImageBehavior = false;
             this.WeighRecord.View = System.Windows.Forms.View.Details;
@@ -387,7 +389,7 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(773, 146);
+            this.StepCount.Location = new System.Drawing.Point(377, 221);
             this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(80, 22);
@@ -420,7 +422,7 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(878, 58);
+            this.PrintNum.Location = new System.Drawing.Point(858, 94);
             this.PrintNum.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
@@ -567,7 +569,7 @@
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(878, 86);
+            this.PrinterList.Location = new System.Drawing.Point(858, 121);
             this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(118, 20);
@@ -577,7 +579,7 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(878, 118);
+            this.PrintLabel.Location = new System.Drawing.Point(856, 154);
             this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.PrintLabel.Name = "PrintLabel";
             this.PrintLabel.Size = new System.Drawing.Size(120, 20);
@@ -629,7 +631,7 @@
             this.Confirm.DownImage = ((System.Drawing.Image)(resources.GetObject("Confirm.DownImage")));
             this.Confirm.Image = ((System.Drawing.Image)(resources.GetObject("Confirm.Image")));
             this.Confirm.IsShowBorder = true;
-            this.Confirm.Location = new System.Drawing.Point(878, 146);
+            this.Confirm.Location = new System.Drawing.Point(878, 174);
             this.Confirm.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.Confirm.MoveImage = ((System.Drawing.Image)(resources.GetObject("Confirm.MoveImage")));
             this.Confirm.Name = "Confirm";
@@ -768,11 +770,34 @@
             this.ma_code.TableName = null;
             this.ma_code.TextBoxEnable = true;
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(777, 75);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(53, 12);
+            this.label3.TabIndex = 208;
+            this.label3.Text = "打印程序";
+            // 
+            // comboBox1
+            // 
+            this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Items.AddRange(new object[] {
+            "CODESOFT",
+            "BARTENDER"});
+            this.comboBox1.Location = new System.Drawing.Point(858, 68);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(134, 20);
+            this.comboBox1.TabIndex = 207;
+            // 
             // Make_ColorBoxWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1013, 584);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.comboBox1);
             this.Controls.Add(this.LockMakeCode);
             this.Controls.Add(this.ma_code);
             this.Controls.Add(this.locksalecode);
@@ -891,5 +916,7 @@
         public System.Windows.Forms.Label ob_checkno;
         private CustomControl.CustomCheckBox.LockCheckBox LockMakeCode;
         private CustomControl.TextBoxWithIcon.MaCodeSearchTextBox ma_code;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ComboBox comboBox1;
     }
 }

+ 32 - 2
UAS_MES_NEW/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -19,6 +19,8 @@ namespace UAS_MES_NEW.Make
     public partial class Make_ColorBoxWeigh : Form
     {
         AutoSizeFormClass asc = new AutoSizeFormClass();
+
+        public BarTender.Application engine;
         ApplicationClass lbl;
         Document doc;
         DataHelper dh;
@@ -76,6 +78,7 @@ namespace UAS_MES_NEW.Make
             ma_code.DbChange += Ma_code_DbChange;
             StartWeight.PerformClick();
             dh = SystemInf.dh;
+            comboBox1.SelectedIndex = 0;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;
@@ -103,6 +106,7 @@ namespace UAS_MES_NEW.Make
         {
             try
             {
+                engine = new BarTender.Application();
                 lbl = new ApplicationClass();
                 BaseUtil.WriteLbl();
             }
@@ -282,6 +286,8 @@ namespace UAS_MES_NEW.Make
         //关闭窗口的时候停止进程读取串口数据
         private void 彩盒称重_FormClosing(object sender, FormClosingEventArgs e)
         {
+            if (engine != null)
+                engine.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
             BaseUtil.ClosePrint(lbl);
             StopWeight.PerformClick();
             InitPrint.Abort();
@@ -301,9 +307,33 @@ namespace UAS_MES_NEW.Make
             {
                 //doc = lbl.Documents.Open(PrintLabel.Text);
                 string oErrorMessage;
-                if (!Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
+
+                if (comboBox1.Text == "CODESOFT")
+                {
+                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
+                    {
+                        OperateResult.AppendText(">>打印彩盒" + sncode.Text + "\n", Color.Black);
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                    }
+                }
+                else if (comboBox1.Text == "BARTENDER")
+                {
+                    if (Print.SinglePrint(Tag.ToString(), engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, sncode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "彩盒标", "0", out oErrorMessage))
+                    {
+                        OperateResult.AppendText(">>打印彩盒" + sncode.Text + "\n", Color.Black);
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                    }
+                }
+                else if (comboBox1.Text == "")
                 {
-                    OperateResult.AppendText(oErrorMessage + "\n", Color.Red);
+                    OperateResult.AppendText("未选择打印方式\n", Color.Red);
+                    return;
                 }
             }
             else

+ 1 - 1
UAS_MES_NEW/FunctionCode/Make/Make_Decompose.cs

@@ -347,7 +347,7 @@ namespace UAS_MES_NEW.Make
                             {
                                 //判断生产信息
                                 sql.Clear();
-                                sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "' and cm_materialtype ='1' and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
+                                sql.Append("select ms_id,ms_sncode,cm_barcode from craftmaterial left join makeserial on cm_barcode = ms_sncode and cm_soncode = ms_prodcode where cm_id = '" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'  and ms_id>'0' and ms_nextmacode = '" + LabelDataGridView.Rows[i].Cells["cm_makecode"].Value.ToString() + "'");
                                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                                 //制造件
                                 if (dt.Rows.Count > 0)

+ 56 - 29
UAS_MES_NEW/FunctionCode/Packing/Packing_PackageCollection.Designer.cs

@@ -58,6 +58,8 @@
             this.IP = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.pa_remark = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.groupBoxWithBorder2 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.label4 = new System.Windows.Forms.Label();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
             this.PrintNum = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.label1 = new System.Windows.Forms.Label();
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
@@ -427,6 +429,8 @@
             // groupBoxWithBorder2
             // 
             this.groupBoxWithBorder2.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder2.Controls.Add(this.label4);
+            this.groupBoxWithBorder2.Controls.Add(this.comboBox1);
             this.groupBoxWithBorder2.Controls.Add(this.PrintNum);
             this.groupBoxWithBorder2.Controls.Add(this.label1);
             this.groupBoxWithBorder2.Controls.Add(this.StepCount);
@@ -456,6 +460,27 @@
             this.groupBoxWithBorder2.Text = "打印";
             this.groupBoxWithBorder2.TextColor = System.Drawing.Color.Black;
             // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(41, 21);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(74, 21);
+            this.label4.TabIndex = 210;
+            this.label4.Text = "打印程序";
+            // 
+            // comboBox1
+            // 
+            this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Items.AddRange(new object[] {
+            "CODESOFT",
+            "BARTENDER"});
+            this.comboBox1.Location = new System.Drawing.Point(122, 14);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(134, 29);
+            this.comboBox1.TabIndex = 209;
+            // 
             // PrintNum
             // 
             this.PrintNum.AllPower = null;
@@ -476,7 +501,7 @@
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(264, 15);
+            this.label1.Location = new System.Drawing.Point(263, 14);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 181;
@@ -498,7 +523,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(27, 23);
+            this.checkweightlabel.Location = new System.Drawing.Point(26, 22);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(200, 0);
             this.checkweightlabel.Name = "checkweightlabel";
             this.checkweightlabel.Size = new System.Drawing.Size(0, 21);
@@ -508,7 +533,7 @@
             // 
             this.ob_nowcheckqty.AutoSize = true;
             this.ob_nowcheckqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty.Location = new System.Drawing.Point(345, 87);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(344, 86);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
             this.ob_nowcheckqty.TabIndex = 178;
@@ -517,7 +542,7 @@
             // 
             this.ob_batchqty.AutoSize = true;
             this.ob_batchqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty.Location = new System.Drawing.Point(345, 49);
+            this.ob_batchqty.Location = new System.Drawing.Point(344, 48);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
             this.ob_batchqty.TabIndex = 177;
@@ -526,7 +551,7 @@
             // 
             this.ob_nowcheckqty_label.AutoSize = true;
             this.ob_nowcheckqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(264, 87);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(263, 86);
             this.ob_nowcheckqty_label.Name = "ob_nowcheckqty_label";
             this.ob_nowcheckqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_nowcheckqty_label.TabIndex = 176;
@@ -536,7 +561,7 @@
             // 
             this.ob_batchqty_label.AutoSize = true;
             this.ob_batchqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_batchqty_label.Location = new System.Drawing.Point(264, 51);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(263, 50);
             this.ob_batchqty_label.Name = "ob_batchqty_label";
             this.ob_batchqty_label.Size = new System.Drawing.Size(74, 21);
             this.ob_batchqty_label.TabIndex = 175;
@@ -546,7 +571,7 @@
             // 
             this.ob_checkno.AutoSize = true;
             this.ob_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ob_checkno.Location = new System.Drawing.Point(345, 15);
+            this.ob_checkno.Location = new System.Drawing.Point(344, 14);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 21);
             this.ob_checkno.TabIndex = 175;
@@ -608,7 +633,7 @@
             // 
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label3.Location = new System.Drawing.Point(7, 88);
+            this.label3.Location = new System.Drawing.Point(6, 87);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 160;
@@ -656,7 +681,7 @@
             // 
             this.PrintList_label.AutoSize = true;
             this.PrintList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintList_label.Location = new System.Drawing.Point(7, 48);
+            this.PrintList_label.Location = new System.Drawing.Point(6, 47);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(90, 21);
             this.PrintList_label.TabIndex = 116;
@@ -666,7 +691,7 @@
             // 
             this.PrintNum_label.AutoSize = true;
             this.PrintNum_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintNum_label.Location = new System.Drawing.Point(207, 129);
+            this.PrintNum_label.Location = new System.Drawing.Point(206, 128);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
             this.PrintNum_label.TabIndex = 124;
@@ -714,7 +739,7 @@
             this.locksalecode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.locksalecode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.locksalecode.ForeColor = System.Drawing.Color.Red;
-            this.locksalecode.Location = new System.Drawing.Point(291, 16);
+            this.locksalecode.Location = new System.Drawing.Point(290, 15);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(96, 16);
             this.locksalecode.TabIndex = 196;
@@ -725,7 +750,7 @@
             // 
             this.PreFix_label.AutoSize = true;
             this.PreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PreFix_label.Location = new System.Drawing.Point(178, 14);
+            this.PreFix_label.Location = new System.Drawing.Point(177, 13);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(37, 20);
             this.PreFix_label.TabIndex = 195;
@@ -752,7 +777,7 @@
             // 
             this.pa_salecode_label.AutoSize = true;
             this.pa_salecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode_label.Location = new System.Drawing.Point(209, 136);
+            this.pa_salecode_label.Location = new System.Drawing.Point(208, 135);
             this.pa_salecode_label.Name = "pa_salecode_label";
             this.pa_salecode_label.Size = new System.Drawing.Size(74, 21);
             this.pa_salecode_label.TabIndex = 185;
@@ -762,7 +787,7 @@
             // 
             this.ma_code_label.AutoSize = true;
             this.ma_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_code_label.Location = new System.Drawing.Point(5, 136);
+            this.ma_code_label.Location = new System.Drawing.Point(4, 135);
             this.ma_code_label.Name = "ma_code_label";
             this.ma_code_label.Size = new System.Drawing.Size(58, 21);
             this.ma_code_label.TabIndex = 186;
@@ -772,7 +797,7 @@
             // 
             this.ms_salecode.AutoSize = true;
             this.ms_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_salecode.Location = new System.Drawing.Point(290, 136);
+            this.ms_salecode.Location = new System.Drawing.Point(289, 135);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 21);
             this.ms_salecode.TabIndex = 188;
@@ -781,7 +806,7 @@
             // 
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(91, 136);
+            this.ms_makecode.Location = new System.Drawing.Point(90, 135);
             this.ms_makecode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_makecode.Name = "ms_makecode";
             this.ms_makecode.Size = new System.Drawing.Size(0, 21);
@@ -791,7 +816,7 @@
             // 
             this.OutBoxLength_label.AutoSize = true;
             this.OutBoxLength_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.OutBoxLength_label.Location = new System.Drawing.Point(80, 14);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(79, 13);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
             this.OutBoxLength_label.TabIndex = 184;
@@ -852,7 +877,7 @@
             // AutoGenBoxCode
             // 
             this.AutoGenBoxCode.AutoSize = true;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(247, 44);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(246, 43);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(2);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(93, 25);
@@ -865,7 +890,7 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(211, 76);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(210, 75);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
             this.pa_currentqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_currentqty_label.TabIndex = 95;
@@ -875,7 +900,7 @@
             // 
             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(209, 104);
+            this.pr_detail_label.Location = new System.Drawing.Point(208, 103);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 80;
@@ -903,7 +928,7 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty.Location = new System.Drawing.Point(289, 74);
+            this.pa_currentqty.Location = new System.Drawing.Point(288, 73);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
             this.pa_currentqty.TabIndex = 169;
@@ -912,7 +937,7 @@
             // 
             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(5, 104);
+            this.pr_code_label.Location = new System.Drawing.Point(4, 103);
             this.pr_code_label.Name = "pr_code_label";
             this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 81;
@@ -922,7 +947,7 @@
             // 
             this.pr_detail.AutoSize = true;
             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(290, 104);
+            this.pr_detail.Location = new System.Drawing.Point(289, 103);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 168;
@@ -931,7 +956,7 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(5, 73);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(4, 72);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
             this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(74, 21);
             this.pr_outboxinnerqty_label.TabIndex = 97;
@@ -941,7 +966,7 @@
             // 
             this.pr_code.AutoSize = true;
             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(91, 104);
+            this.pr_code.Location = new System.Drawing.Point(90, 103);
             this.pr_code.MaximumSize = new System.Drawing.Size(150, 0);
             this.pr_code.Name = "pr_code";
             this.pr_code.Size = new System.Drawing.Size(0, 21);
@@ -952,7 +977,7 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(5, 43);
+            this.pa_code_label.Location = new System.Drawing.Point(4, 42);
             this.pa_code_label.Name = "pa_code_label";
             this.pa_code_label.Size = new System.Drawing.Size(42, 21);
             this.pa_code_label.TabIndex = 113;
@@ -1124,12 +1149,12 @@
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.PackCollection_FormClosing);
             this.Load += new System.EventHandler(this.PackCollection_Load);
             this.SizeChanged += new System.EventHandler(this.PackCollection_SizeChanged);
-            this.groupBoxWithBorder2.ResumeLayout(true);
+            this.groupBoxWithBorder2.ResumeLayout(false);
             this.groupBoxWithBorder2.PerformLayout();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1214,5 +1239,7 @@
         private System.Windows.Forms.CheckBox AllowRepeat;
         private System.Windows.Forms.Label label2;
         private CustomControl.TextBoxWithIcon.SnCollectionBox Remark_PreFix;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.ComboBox comboBox1;
     }
 }

+ 27 - 7
UAS_MES_NEW/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -47,8 +47,8 @@ namespace UAS_MES_NEW.Packing
             try
             {
                 engine = new BarTender.Application();
-              //  lbl = new ApplicationClass();
-             //   BaseUtil.WriteLbl();
+                lbl = new ApplicationClass();
+                BaseUtil.WriteLbl();
             }
             catch (Exception ex)
             {
@@ -88,6 +88,7 @@ namespace UAS_MES_NEW.Packing
             catch (Exception) { }
             sn_code.Focus();
             dh = SystemInf.dh;
+            comboBox1.SelectedIndex = 0;
             StepCount.StepCode = User.CurrentStepCode;
             StepCount.Source = User.UserSourceCode;
             StepCount.LineCode = User.UserLineCode;
@@ -158,13 +159,32 @@ namespace UAS_MES_NEW.Packing
                 {
                     dh.ExecuteSql("update package set pa_printcount=pa_printcount+1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                     //doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.SinglePrint(Tag.ToString(),  engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                    if (comboBox1.Text == "CODESOFT")
                     {
-                        OperateResult.AppendText(">>开始打印箱号" + pa_outboxcode.Text + "\n", Color.Black);
+                        if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>打印卡通箱" + pa_outboxcode.Text + "\n", Color.Black);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
                     }
-                    else
+                    else if (comboBox1.Text == "BARTENDER")
+                    {
+                        if (Print.SinglePrint(Tag.ToString(), engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrintList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), oMakeCode == "" ? pa_makecode.Text : oMakeCode, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>打印卡通箱" + pa_outboxcode.Text + "\n", Color.Black);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
+                    }
+                    else if (comboBox1.Text == "")
                     {
-                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        OperateResult.AppendText("未选择打印方式\n", Color.Red);
+                        return;
                     }
                     if (!AutoGenBoxCode.Checked)
                     {
@@ -566,7 +586,7 @@ namespace UAS_MES_NEW.Packing
 
         private void PackCollection_FormClosing(object sender, FormClosingEventArgs e)
         {
-            //  BaseUtil.ClosePrint(lbl);
+              BaseUtil.ClosePrint(lbl);
             if (engine != null)
                 engine.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
             dh.Dispose();

+ 32 - 5
UAS_MES_NEW/FunctionCode/Packing/Packing_PalletCollection.Designer.cs

@@ -76,6 +76,8 @@
             this.StepCount = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.PalletPreFix_label = new System.Windows.Forms.Label();
             this.PalletPreFix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -273,7 +275,7 @@
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.ID = null;
             this.pa_standardqty.Location = new System.Drawing.Point(85, 84);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Power = null;
             this.pa_standardqty.Size = new System.Drawing.Size(114, 21);
@@ -319,7 +321,7 @@
             // PrinterList
             // 
             this.PrinterList.Location = new System.Drawing.Point(592, 83);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
             this.PrinterList.Name = "PrinterList";
             this.PrinterList.Size = new System.Drawing.Size(132, 20);
             this.PrinterList.TabIndex = 171;
@@ -552,10 +554,10 @@
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(757, 174);
+            this.AutoPrint.Location = new System.Drawing.Point(757, 186);
             this.AutoPrint.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(84, 22);
+            this.AutoPrint.Size = new System.Drawing.Size(111, 22);
             this.AutoPrint.TabIndex = 191;
             // 
             // OutBoxLength_label
@@ -589,7 +591,7 @@
             // 
             this.StepCount.LineCode = null;
             this.StepCount.Location = new System.Drawing.Point(482, 11);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(88, 22);
             this.StepCount.Source = null;
@@ -623,11 +625,34 @@
             this.PalletPreFix.TabIndex = 195;
             this.PalletPreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PalletPreFix_KeyDown);
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(761, 163);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(53, 12);
+            this.label3.TabIndex = 210;
+            this.label3.Text = "打印程序";
+            // 
+            // comboBox1
+            // 
+            this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Items.AddRange(new object[] {
+            "CODESOFT",
+            "BARTENDER"});
+            this.comboBox1.Location = new System.Drawing.Point(842, 156);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(134, 20);
+            this.comboBox1.TabIndex = 209;
+            // 
             // Packing_PalletCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(997, 552);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.comboBox1);
             this.Controls.Add(this.PalletPreFix_label);
             this.Controls.Add(this.PalletPreFix);
             this.Controls.Add(this.StepCount);
@@ -729,5 +754,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ComboBox comboBox1;
     }
 }

+ 33 - 6
UAS_MES_NEW/FunctionCode/Packing/Packing_PalletCollection.cs

@@ -25,6 +25,8 @@ namespace UAS_MES_NEW.Packing
 
         Packing_NewPallet NewPallet;
 
+        public BarTender.Application engine;
+
         string pa_nextstep = "";
         //箱类型
         string pa_type;
@@ -51,6 +53,7 @@ namespace UAS_MES_NEW.Packing
         {
             try
             {
+                engine = new BarTender.Application();
                 lbl = new ApplicationClass();
                 BaseUtil.WriteLbl();
             }
@@ -67,6 +70,7 @@ namespace UAS_MES_NEW.Packing
             SetLoadingWindow stw = new SetLoadingWindow(thread, "初始化打印程序");
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
+            comboBox1.SelectedIndex = 0;
             OutBoxLength.Text = BaseUtil.GetCacheData("PalletLength").ToString();
             PalletPreFix.Text = BaseUtil.GetCacheData("PalletPreFix").ToString();
             dh = SystemInf.dh;
@@ -152,7 +156,7 @@ namespace UAS_MES_NEW.Packing
                         pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
                         if (pa_nextstep != User.CurrentStepCode && pa_nextstep != "" && (unfinpack == "0" || unfinpack == ""))
                         {
-                            OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序不是当前岗位资源对应工序\n", Color.Red, outboxcode);
+                            OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序为" + pa_nextstep + ",不是当前岗位资源对应工序\\n", Color.Red, outboxcode);
                             return;
                         }
                         sql.Clear();
@@ -207,6 +211,7 @@ namespace UAS_MES_NEW.Packing
                             else
                             {
                                 pa_outboxcode.Text = LogicHandler.GetOutBoxCode("PALLET", "", pa_prodcode.Text, User.UserCode);
+                                pa_standardqty.Text = dh.getFieldDataByCondition("product", "pr_palletqty", "pr_code = '" + pd_prodcode.Text + "'").ToString();
                             }
                         }
                         else if (pa_outboxcode.Text != "" && pa_status.Text == "1" && AutoOutBoxCode.Checked)
@@ -423,15 +428,34 @@ namespace UAS_MES_NEW.Packing
                         outboxcode.SelectAll();
                     }
                     //doc = lbl.Documents.Open(PrintLabel.Text);
-                    if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+
+                    if (comboBox1.Text == "CODESOFT")
                     {
-                        OperateResult.AppendText(">>打印栈板" + pa_outboxcode.Text + "\n", Color.Black);
+                        if (Print.CodeSoft(Tag.ToString(), ref lbl, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>打印栈板" + pa_outboxcode.Text + "\n", Color.Black);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
                     }
-                    else
+                    else if (comboBox1.Text == "BARTENDER")
                     {
-                        OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        if (Print.SinglePrint(Tag.ToString(),  engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, pa_outboxcode.Text, int.Parse(PrintNum.Text), pa_makecode.Text, pa_prodcode.Text, "栈板标", "0", out ErrorMessage))
+                        {
+                            OperateResult.AppendText(">>打印栈板" + pa_outboxcode.Text + "\n", Color.Black);
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(ErrorMessage + "\n", Color.Red);
+                        }
+                    }
+                    else if (comboBox1.Text == "")
+                    {
+                        OperateResult.AppendText("未选择打印方式\n", Color.Red);
+                        return;
                     }
-
                 }
                 else OperateResult.AppendText(">>必须封栈板才能进行打印\n", Color.Red);
             }
@@ -472,6 +496,7 @@ namespace UAS_MES_NEW.Packing
                         SQLS.Add("update package set pa_mothercode='' where pa_mothercode='" + pa_outboxcode.Text + "'");
                         dh.ExecuteSQLTran(SQLS.ToArray());
                     }
+                    dh.ExecuteSql("delete package where pa_outboxcode = '" + pa_outboxcode.Text + "'", "select");
                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "栈板采集", "解除栈板" + pa_outboxcode.Text + "成功", pa_outboxcode.Text, "");
                     OperateResult.AppendText(">>栈板号" + pa_outboxcode.Text + "解除成功\n", Color.Green);
                     palletcode_KeyDown(new object(), new KeyEventArgs(Keys.Enter));
@@ -482,6 +507,8 @@ namespace UAS_MES_NEW.Packing
 
         private void Make_PalletCollection_FormClosing(object sender, FormClosingEventArgs e)
         {
+            if (engine != null)
+                engine.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
             BaseUtil.ClosePrint(lbl);
         }
 

+ 176 - 0
UAS_MES_NEW/FunctionCode/Special/Special_GetBad.Designer.cs

@@ -0,0 +1,176 @@
+namespace UAS_MES_NEW.Special
+{
+    partial class Special_GetBad
+    {
+        /// <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()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Special_GetBad));
+            this.Split = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.Pallet_label = new System.Windows.Forms.Label();
+            this.SN = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.OperatResult = new UAS_MES_NEW.CustomControl.RichText.RichTextAutoBottom();
+            this.NewBadCode = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.makecode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // Split
+            // 
+            this.Split.AllPower = null;
+            this.Split.BackColor = System.Drawing.Color.Transparent;
+            this.Split.DownImage = ((System.Drawing.Image)(resources.GetObject("Split.DownImage")));
+            this.Split.Image = null;
+            this.Split.IsShowBorder = true;
+            this.Split.Location = new System.Drawing.Point(267, 133);
+            this.Split.Margin = new System.Windows.Forms.Padding(2);
+            this.Split.MoveImage = ((System.Drawing.Image)(resources.GetObject("Split.MoveImage")));
+            this.Split.Name = "Split";
+            this.Split.NormalImage = ((System.Drawing.Image)(resources.GetObject("Split.NormalImage")));
+            this.Split.Power = null;
+            this.Split.Size = new System.Drawing.Size(56, 22);
+            this.Split.TabIndex = 0;
+            this.Split.Text = "线外不良";
+            this.Split.UseVisualStyleBackColor = false;
+            this.Split.Click += new System.EventHandler(this.Split_Click);
+            // 
+            // Pallet_label
+            // 
+            this.Pallet_label.AutoSize = true;
+            this.Pallet_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.Pallet_label.Location = new System.Drawing.Point(18, 131);
+            this.Pallet_label.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.Pallet_label.Name = "Pallet_label";
+            this.Pallet_label.Size = new System.Drawing.Size(32, 21);
+            this.Pallet_label.TabIndex = 1;
+            this.Pallet_label.Text = "SN";
+            // 
+            // SN
+            // 
+            this.SN.AllPower = null;
+            this.SN.BackColor = System.Drawing.Color.White;
+            this.SN.ID = null;
+            this.SN.Location = new System.Drawing.Point(91, 133);
+            this.SN.Margin = new System.Windows.Forms.Padding(2);
+            this.SN.Name = "SN";
+            this.SN.Power = null;
+            this.SN.Size = new System.Drawing.Size(148, 21);
+            this.SN.Str = null;
+            this.SN.Str1 = null;
+            this.SN.Str2 = null;
+            this.SN.TabIndex = 2;
+            this.SN.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SN_KeyDown);
+            // 
+            // OperatResult
+            // 
+            this.OperatResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperatResult.Location = new System.Drawing.Point(408, 59);
+            this.OperatResult.Margin = new System.Windows.Forms.Padding(2);
+            this.OperatResult.Name = "OperatResult";
+            this.OperatResult.Size = new System.Drawing.Size(204, 310);
+            this.OperatResult.TabIndex = 3;
+            this.OperatResult.Text = "";
+            // 
+            // NewBadCode
+            // 
+            this.NewBadCode.AllPower = "ifall";
+            this.NewBadCode.BackColor = System.Drawing.Color.Transparent;
+            this.NewBadCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.DownImage")));
+            this.NewBadCode.Image = null;
+            this.NewBadCode.IsShowBorder = true;
+            this.NewBadCode.Location = new System.Drawing.Point(91, 215);
+            this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
+            this.NewBadCode.Name = "NewBadCode";
+            this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
+            this.NewBadCode.Power = null;
+            this.NewBadCode.Size = new System.Drawing.Size(86, 24);
+            this.NewBadCode.TabIndex = 61;
+            this.NewBadCode.Tag = "IfRead";
+            this.NewBadCode.Text = "新增不良代码";
+            this.NewBadCode.UseVisualStyleBackColor = true;
+            this.NewBadCode.Click += new System.EventHandler(this.NewBadCode_Click);
+            // 
+            // makecode
+            // 
+            this.makecode.AllPower = null;
+            this.makecode.BackColor = System.Drawing.Color.White;
+            this.makecode.ID = null;
+            this.makecode.Location = new System.Drawing.Point(91, 177);
+            this.makecode.Margin = new System.Windows.Forms.Padding(2);
+            this.makecode.Name = "makecode";
+            this.makecode.Power = null;
+            this.makecode.ReadOnly = true;
+            this.makecode.Size = new System.Drawing.Size(148, 21);
+            this.makecode.Str = null;
+            this.makecode.Str1 = null;
+            this.makecode.Str2 = null;
+            this.makecode.TabIndex = 63;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(18, 175);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(42, 21);
+            this.label1.TabIndex = 62;
+            this.label1.Text = "工单";
+            // 
+            // Special_GetBad
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(692, 527);
+            this.Controls.Add(this.makecode);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.NewBadCode);
+            this.Controls.Add(this.OperatResult);
+            this.Controls.Add(this.SN);
+            this.Controls.Add(this.Pallet_label);
+            this.Controls.Add(this.Split);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Name = "Special_GetBad";
+            this.Tag = "Special!GetBad";
+            this.Text = "线外不良采集";
+            this.Load += new System.EventHandler(this.Special_BoxSplit_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ButtonUtil.NormalButton Split;
+        private System.Windows.Forms.Label Pallet_label;
+        private CustomControl.TextBoxWithIcon.EnterTextBox SN;
+        private CustomControl.RichText.RichTextAutoBottom OperatResult;
+        private CustomControl.ButtonUtil.NormalButton NewBadCode;
+        private CustomControl.TextBoxWithIcon.EnterTextBox makecode;
+        private System.Windows.Forms.Label label1;
+    }
+}

+ 110 - 0
UAS_MES_NEW/FunctionCode/Special/Special_GetBad.cs

@@ -0,0 +1,110 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.Make;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Special
+{
+    public partial class Special_GetBad : Form
+    {
+        DataHelper dh;
+
+        LogStringBuilder sql = new LogStringBuilder();
+
+        DataTable dt;
+
+        public Special_GetBad()
+        {
+            InitializeComponent();
+        }
+
+        private void Special_BoxSplit_Load(object sender, EventArgs e)
+        {
+            dh = SystemInf.dh;
+        }
+
+        private void Split_Click(object sender, EventArgs e)
+        {
+            if (SN.Text == "" || makecode.Text == null || makecode.Text == "")
+            {
+                OperatResult.AppendText(">>序列号和工单号不允许为空\n", Color.Red);
+            }
+            else
+            {
+                //如果存在送检批号则进行删除
+                if (dh.CheckExist("oqcbatchdetail", "obd_sncode='" + SN.Text + "'"))
+                {
+                    string checkno = dh.getFieldDataByCondition("oqcbatchdetail", "obd_checkno", "obd_sncode='" + SN.Text + "'").ToString();
+                    string ifng = dh.getFieldDataByCondition("oqcbatchdetail", "obd_ifng", "obd_sncode='" + SN.Text + "'").ToString();
+                    if (ifng == "-1")
+                    {
+                        dh.ExecuteSql("delete OQCITEMSAMPLES where ois_sncode = '" + SN.Text + "'", "select");
+                        dh.ExecuteSql("update oqcbatch set ob_nowcheckqty=ob_nowcheckqty-1,ob_ngqty =  ob_ngqty -1 where ob_checkno='" + checkno + "'", "update");
+                    }
+                    dh.ExecuteSql("delete from oqcbatchdetail where obd_sncode='" + SN.Text + "'", "delete");
+                }
+                //之前保存的不良就不再调用
+                DataTable dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_stepcode", "nvl(ms_ifrework,0)ms_ifrework", "ms_status" }, "ms_sncode='" + SN.Text + "' and ms_makecode='" + makecode.Text + "'");
+                if (dt.Rows.Count > 0)
+                {
+                    string ifrework = dt.Rows[0]["ms_ifrework"].ToString();
+                    string ms_stepcode = dt.Rows[0]["ms_stepcode"].ToString();
+                    string ms_status = dt.Rows[0]["ms_status"].ToString();
+                    if (ms_status == "2")
+                    {
+                        dh.UpdateByCondition("make", "ma_madeqty=nvl(ma_madeqty,0)-1", "ma_code='" + makecode.Text + "'");
+                    }
+                    dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_status=3", "ms_sncode='" + SN.Text + "' and ms_makecode='" + makecode.Text + "' ");
+                }
+
+                LogicHandler.InsertMakeProcess(SN.Text, makecode.Text, User.UserSourceCode, "采集成不良", "特殊测试不良", User.UserCode);
+                LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, makecode.Text, User.UserLineCode, User.UserSourceCode, "采集成不良", "特殊采集不良", SN.Text,"");
+                OperatResult.AppendText(">>序列号:" + SN.Text + "不良采集成功\n", Color.Green);
+                BaseUtil.CleanControls(this.Controls);
+            }
+        }
+
+        private void SN_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                sql.Clear();
+                sql.Append("select ms_makecode makecode  from makeserial left join make ");
+                sql.Append("on ms_makecode=ma_code where ms_sncode = '" + SN.Text + "' order by ms_id desc");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                BaseUtil.SetFormValue(this.Controls, dt);
+                string ms_paststep = "";
+                if (!(dt.Rows.Count > 0))
+                {
+                    OperatResult.AppendText(">>序列号:" + SN.Text + "不存在\n", Color.Red);
+                    BaseUtil.CleanForm(this);
+                    return;
+                }
+
+            }
+        }
+
+        private void NewBadCode_Click(object sender, EventArgs e)
+        {
+            if (SN.Text == "" || makecode.Text == null || makecode.Text == "")
+            {
+                OperatResult.AppendText(">>序列号和工单号不允许为空\n", Color.Red);
+            }
+            else
+            {
+                Make_NewBadCode badcode = new Make_NewBadCode(SN.Text, makecode.Text);
+               // badcode.FormClosed += LoadBadInfTree;
+                BaseUtil.SetFormCenter(badcode);
+                badcode.ShowDialog();
+            }
+        }
+    }
+}

+ 197 - 0
UAS_MES_NEW/FunctionCode/Special/Special_GetBad.resx

@@ -0,0 +1,197 @@
+<?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>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Split.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Split.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Split.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="NewBadCode.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="NewBadCode.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="NewBadCode.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>

+ 7 - 6
UAS_MES_NEW/PublicMethod/LogicHandler.cs

@@ -498,23 +498,24 @@ namespace UAS_MES_NEW.PublicMethod
             {
                 sql.Clear();
                 sql.Append("merge into makeserial using mes_package_view on (v_outboxcode='" + iOutBoxCode + "' and ms_sncode=");
-                sql.Append("v_barcode and ms_makecode=v_makecode and ms_status=2) when matched then update set ms_nextstepcode=ms_stepcode");
+                sql.Append("v_barcode and ms_makecode=v_makecode ) when matched then update set ms_nextstepcode=ms_stepcode");
                 sql.Append(",ms_status=1,ms_sccode='" + iSourceCode + "' ");
             }
             ExeSQL.Add(sql.ToString());
             //更新完工数量
             ExeSQL.Add("update make set ma_madeqty=(select count(1) from makeserial where ms_makecode='" + iMakeCode + "' and ms_status=2) where ma_code='" + iMakeCode + "'");
             //删除StepPassed数据
-            sql.Clear();
-            sql.Append("delete from steppassed where sp_sncode in (select v_barcode from mes_package_view where v_outboxcode='" + iOutBoxCode + "') ");
-            sql.Append("and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + CurrentStep + "'");
-            ExeSQL.Add(sql.ToString());
+            //sql.Clear();
+            //sql.Append("delete from steppassed where sp_sncode in (select v_barcode from mes_package_view where v_outboxcode='" + iOutBoxCode + "') ");
+            //sql.Append("and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + CurrentStep + "'");
+            //ExeSQL.Add(sql.ToString());
             //更新大箱或栈板的母箱编号为空
             ExeSQL.Add("update package set pa_mothercode='' where pa_outboxcode in(select PD_INNERBOXCODE from package left join packagedetail on pa_id=pd_paid where pa_outboxcode='" + iOutBoxCode + "')");
             //删除从表明细
             ExeSQL.Add("delete from packagedetail where pd_paid=(select pa_id from package where pa_outboxcode='" + iOutBoxCode + "')");
             //设置大箱或栈板的已装数量为0
-            ExeSQL.Add("update package set pa_totalqty=0,pa_status=0,pa_currentqty=0,pa_packageqty=0 where pa_outboxcode='" + iOutBoxCode + "'");
+            //ExeSQL.Add("update package set pa_totalqty=0,pa_status=0,pa_currentqty=0,pa_packageqty=0 where pa_outboxcode='" + iOutBoxCode + "'");
+            ExeSQL.Add("delete package  where pa_outboxcode='" + iOutBoxCode + "'");
             dh.ExecuteSQLTran(ExeSQL.ToArray());
         }
 

+ 6 - 6
UAS_MES_NEW/PublicMethod/Print.cs

@@ -122,11 +122,11 @@ namespace UAS_MES_NEW.PublicMethod
                     dt = (DataTable)dh.ExecuteSql("select lpl_id from labelprintlog where lpl_value='" + SnCode + "' and lpl_makecode='" + MakeCode + "' and lpl_type='" + LabelType + "' and lpl_stepcode='" + User.CurrentStepCode + "'", "select");
                 }
                 ////如果已经打印过了,则不允许再打印
-                if (dt.Rows.Count > 0)
-                {
-                    ErrorMessage = SnCode + LabelType + "已打印";
-                    return false;
-                }
+                //if (dt.Rows.Count > 0)
+                //{
+                //    ErrorMessage = SnCode + LabelType + "已打印";
+                //    return false;
+                //}
             }
             string filelastwritetime = dh.getFieldDataByCondition("label", "la_lastwritetime", "la_id = '" + LaID + "'").ToString();
             FileInfo PrintFile = new FileInfo(LabelName);
@@ -183,7 +183,7 @@ namespace UAS_MES_NEW.PublicMethod
                                     doc.Variables.FormVariables.Item(k + 1).Value = Param.Rows[0][0].ToString();
                                 }
                                 //使用SN开头的参数赋值SN1,SN2,SN3等参数
-                                if (doc.Variables.FormVariables.Item(k + 1).Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper() + (j + 1))
+                                if (j != 0&&doc.Variables.FormVariables.Item(k + 1).Name.ToUpper() == dt.Rows[i]["lp_name"].ToString().ToUpper() + (j))
                                 {
                                     doc.Variables.FormVariables.Item(k + 1).Value = Param.Rows[j][0].ToString();
                                 }