Browse Source

Merge branch 'master' of repos.ubtob.net:usoft/mes-client

callm 4 years ago
parent
commit
1e92dc1083
31 changed files with 1720 additions and 1065 deletions
  1. 112 31
      UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs
  2. 39 2
      UAS-MES/FunctionCode/Make/Make_PackageCollection.cs
  3. 83 2
      UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs
  4. 39 2
      UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs
  5. 18 0
      UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.resx
  6. 228 181
      UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs
  7. 33 1
      UAS-MES/FunctionCode/Make/Make_PalletCollection.cs
  8. 1 1
      UAS-MES/Login.cs
  9. 3 1
      UAS-MES/UAS-MES.csproj
  10. 1 1
      UAS_MES_JH/App.config
  11. 6 0
      UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.cs
  12. 1 0
      UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.Designer.cs
  13. 9 9
      UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs
  14. 2 2
      UAS_MES_JH/Login.cs
  15. 2 2
      UAS_MES_JH/Properties/Settings.Designer.cs
  16. 1 1
      UAS_MES_JH/Properties/Settings.settings
  17. 3 0
      UAS_MES_WEIP/App.config
  18. 2 1
      UAS_MES_WEIP/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.Designer.cs
  19. 2 1
      UAS_MES_WEIP/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.cs
  20. 167 32
      UAS_MES_WEIP/FunctionCode/Make/Make_Repair.Designer.cs
  21. 191 8
      UAS_MES_WEIP/FunctionCode/Make/Make_Repair.cs
  22. 41 0
      UAS_MES_WEIP/FunctionCode/Make/Make_Repair.resx
  23. 2 2
      UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.Designer.cs
  24. 160 6
      UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.cs
  25. 310 691
      UAS_MES_WEIP/FunctionCode/Query/Query_MakeInf.Designer.cs
  26. 3 14
      UAS_MES_WEIP/FunctionCode/Query/Query_MakeInf.cs
  27. 18 72
      UAS_MES_WEIP/FunctionCode/Query/Query_MakeInf.resx
  28. 3 0
      UAS_MES_WEIP/Properties/Settings.settings
  29. 157 0
      UAS_MES_WEIP/Properties/Settings1.Designer.cs
  30. 82 1
      UAS_MES_WEIP/PublicMethod/LogicHandler.cs
  31. 1 1
      UAS_MES_WEIP/UAS_MES_WEIP.csproj

+ 112 - 31
UAS-MES/FunctionCode/Make/Make_PackageCollection.Designer.cs

@@ -58,6 +58,7 @@
             this.IP = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.pa_remark = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.groupBoxWithBorder2 = new UAS_MES.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.checkbox11 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
             this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.label1 = new System.Windows.Forms.Label();
             this.StepCount = new UAS_MES.CustomControl.TextBoxWithIcon.SourceStepCount();
@@ -108,6 +109,10 @@
             this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pd_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.outinfo = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.ininfo = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label5 = new System.Windows.Forms.Label();
             this.groupBoxWithBorder2.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
@@ -429,6 +434,7 @@
             // groupBoxWithBorder2
             // 
             this.groupBoxWithBorder2.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder2.Controls.Add(this.checkbox11);
             this.groupBoxWithBorder2.Controls.Add(this.PrintNum);
             this.groupBoxWithBorder2.Controls.Add(this.label1);
             this.groupBoxWithBorder2.Controls.Add(this.StepCount);
@@ -458,6 +464,19 @@
             this.groupBoxWithBorder2.Text = "打印";
             this.groupBoxWithBorder2.TextColor = System.Drawing.Color.Black;
             // 
+            // checkbox11
+            // 
+            this.checkbox11.AutoSize = true;
+            this.checkbox11.Checked = true;
+            this.checkbox11.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.checkbox11.Location = new System.Drawing.Point(15, 21);
+            this.checkbox11.Name = "checkbox11";
+            this.checkbox11.Power = null;
+            this.checkbox11.Size = new System.Drawing.Size(125, 25);
+            this.checkbox11.TabIndex = 194;
+            this.checkbox11.Text = "彩箱信息校验";
+            this.checkbox11.UseVisualStyleBackColor = true;
+            // 
             // PrintNum
             // 
             this.PrintNum.AllPower = null;
@@ -478,7 +497,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(263, 16);
+            this.label1.Location = new System.Drawing.Point(262, 15);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 181;
@@ -487,7 +506,7 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(122, 18);
+            this.StepCount.Location = new System.Drawing.Point(146, 19);
             this.StepCount.Margin = new System.Windows.Forms.Padding(3, 7, 3, 7);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(63, 23);
@@ -500,7 +519,7 @@
             this.checkweightlabel.AutoSize = true;
             this.checkweightlabel.CutLength = null;
             this.checkweightlabel.ForeColor = System.Drawing.Color.Red;
-            this.checkweightlabel.Location = new System.Drawing.Point(18, 22);
+            this.checkweightlabel.Location = new System.Drawing.Point(17, 21);
             this.checkweightlabel.MaximumSize = new System.Drawing.Size(200, 0);
             this.checkweightlabel.Name = "checkweightlabel";
             this.checkweightlabel.Size = new System.Drawing.Size(0, 21);
@@ -510,7 +529,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(344, 90);
+            this.ob_nowcheckqty.Location = new System.Drawing.Point(343, 89);
             this.ob_nowcheckqty.Name = "ob_nowcheckqty";
             this.ob_nowcheckqty.Size = new System.Drawing.Size(0, 21);
             this.ob_nowcheckqty.TabIndex = 178;
@@ -519,7 +538,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(344, 52);
+            this.ob_batchqty.Location = new System.Drawing.Point(343, 51);
             this.ob_batchqty.Name = "ob_batchqty";
             this.ob_batchqty.Size = new System.Drawing.Size(0, 21);
             this.ob_batchqty.TabIndex = 177;
@@ -528,7 +547,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(263, 90);
+            this.ob_nowcheckqty_label.Location = new System.Drawing.Point(262, 89);
             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;
@@ -538,7 +557,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(263, 54);
+            this.ob_batchqty_label.Location = new System.Drawing.Point(262, 53);
             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;
@@ -548,7 +567,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(344, 16);
+            this.ob_checkno.Location = new System.Drawing.Point(343, 15);
             this.ob_checkno.Name = "ob_checkno";
             this.ob_checkno.Size = new System.Drawing.Size(0, 21);
             this.ob_checkno.TabIndex = 175;
@@ -610,7 +629,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(5, 91);
+            this.label3.Location = new System.Drawing.Point(4, 90);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 160;
@@ -658,7 +677,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(5, 51);
+            this.PrintList_label.Location = new System.Drawing.Point(4, 50);
             this.PrintList_label.Name = "PrintList_label";
             this.PrintList_label.Size = new System.Drawing.Size(90, 21);
             this.PrintList_label.TabIndex = 116;
@@ -668,7 +687,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(206, 127);
+            this.PrintNum_label.Location = new System.Drawing.Point(205, 126);
             this.PrintNum_label.Name = "PrintNum_label";
             this.PrintNum_label.Size = new System.Drawing.Size(42, 21);
             this.PrintNum_label.TabIndex = 124;
@@ -716,7 +735,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(290, 15);
+            this.locksalecode.Location = new System.Drawing.Point(289, 14);
             this.locksalecode.Name = "locksalecode";
             this.locksalecode.Size = new System.Drawing.Size(96, 16);
             this.locksalecode.TabIndex = 196;
@@ -727,7 +746,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(177, 13);
+            this.PreFix_label.Location = new System.Drawing.Point(176, 12);
             this.PreFix_label.Name = "PreFix_label";
             this.PreFix_label.Size = new System.Drawing.Size(37, 20);
             this.PreFix_label.TabIndex = 195;
@@ -754,7 +773,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(208, 133);
+            this.pa_salecode_label.Location = new System.Drawing.Point(207, 132);
             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;
@@ -764,7 +783,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(4, 134);
+            this.ma_code_label.Location = new System.Drawing.Point(3, 133);
             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;
@@ -774,7 +793,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(289, 133);
+            this.ms_salecode.Location = new System.Drawing.Point(288, 132);
             this.ms_salecode.Name = "ms_salecode";
             this.ms_salecode.Size = new System.Drawing.Size(0, 21);
             this.ms_salecode.TabIndex = 188;
@@ -783,7 +802,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(90, 134);
+            this.ms_makecode.Location = new System.Drawing.Point(89, 133);
             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);
@@ -793,7 +812,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(79, 13);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(78, 12);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
             this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
             this.OutBoxLength_label.TabIndex = 184;
@@ -854,7 +873,7 @@
             // AutoGenBoxCode
             // 
             this.AutoGenBoxCode.AutoSize = true;
-            this.AutoGenBoxCode.Location = new System.Drawing.Point(246, 42);
+            this.AutoGenBoxCode.Location = new System.Drawing.Point(245, 41);
             this.AutoGenBoxCode.Margin = new System.Windows.Forms.Padding(2);
             this.AutoGenBoxCode.Name = "AutoGenBoxCode";
             this.AutoGenBoxCode.Size = new System.Drawing.Size(93, 25);
@@ -867,7 +886,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(210, 73);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(209, 72);
             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;
@@ -877,7 +896,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(208, 101);
+            this.pr_detail_label.Location = new System.Drawing.Point(207, 100);
             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;
@@ -905,7 +924,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(288, 71);
+            this.pa_currentqty.Location = new System.Drawing.Point(287, 70);
             this.pa_currentqty.Name = "pa_currentqty";
             this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
             this.pa_currentqty.TabIndex = 169;
@@ -914,7 +933,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(4, 102);
+            this.pr_code_label.Location = new System.Drawing.Point(3, 101);
             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;
@@ -924,7 +943,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(289, 101);
+            this.pr_detail.Location = new System.Drawing.Point(288, 100);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Size = new System.Drawing.Size(0, 21);
             this.pr_detail.TabIndex = 168;
@@ -933,7 +952,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(4, 71);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(3, 70);
             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;
@@ -943,7 +962,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(90, 102);
+            this.pr_code.Location = new System.Drawing.Point(89, 101);
             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);
@@ -954,7 +973,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(4, 41);
+            this.pa_code_label.Location = new System.Drawing.Point(3, 40);
             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;
@@ -1079,12 +1098,69 @@
             this.pd_id.ReadOnly = true;
             this.pd_id.Visible = false;
             // 
+            // outinfo
+            // 
+            this.outinfo.AllPower = "ifall";
+            this.outinfo.BackColor = System.Drawing.Color.White;
+            this.outinfo.ID = null;
+            this.outinfo.Location = new System.Drawing.Point(74, 588);
+            this.outinfo.Name = "outinfo";
+            this.outinfo.Power = "ifread";
+            this.outinfo.Size = new System.Drawing.Size(268, 21);
+            this.outinfo.Str = null;
+            this.outinfo.Str1 = null;
+            this.outinfo.Str2 = null;
+            this.outinfo.TabIndex = 212;
+            this.outinfo.Tag = "ifread";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.ForeColor = System.Drawing.Color.Black;
+            this.label4.Location = new System.Drawing.Point(7, 588);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(74, 21);
+            this.label4.TabIndex = 211;
+            this.label4.Text = "整箱信息";
+            // 
+            // ininfo
+            // 
+            this.ininfo.AllPower = "ifall";
+            this.ininfo.BackColor = System.Drawing.Color.White;
+            this.ininfo.ID = null;
+            this.ininfo.Location = new System.Drawing.Point(521, 588);
+            this.ininfo.Name = "ininfo";
+            this.ininfo.Power = "ifread";
+            this.ininfo.Size = new System.Drawing.Size(239, 21);
+            this.ininfo.Str = null;
+            this.ininfo.Str1 = null;
+            this.ininfo.Str2 = null;
+            this.ininfo.TabIndex = 214;
+            this.ininfo.Tag = "ifread";
+            this.ininfo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ininfo_KeyDown);
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.ForeColor = System.Drawing.Color.Black;
+            this.label5.Location = new System.Drawing.Point(437, 588);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(74, 21);
+            this.label5.TabIndex = 213;
+            this.label5.Text = "彩箱信息";
+            // 
             // Make_PackageCollection
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.ClientSize = new System.Drawing.Size(879, 584);
+            this.ClientSize = new System.Drawing.Size(879, 621);
+            this.Controls.Add(this.ininfo);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.outinfo);
+            this.Controls.Add(this.label4);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.Remark_PreFix);
             this.Controls.Add(this.AllowRepeat);
@@ -1126,12 +1202,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();
 
         }
@@ -1216,5 +1292,10 @@
         private System.Windows.Forms.CheckBox AllowRepeat;
         private System.Windows.Forms.Label label2;
         private CustomControl.TextBoxWithIcon.SnCollectionBox Remark_PreFix;
+        private CustomControl.CustomCheckBox.CustomCheckBox checkbox11;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox outinfo;
+        private System.Windows.Forms.Label label4;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox ininfo;
+        private System.Windows.Forms.Label label5;
     }
 }

+ 39 - 2
UAS-MES/FunctionCode/Make/Make_PackageCollection.cs

@@ -214,6 +214,7 @@ namespace UAS_MES.Make
                                 return;
                             }
                         }
+                      
                         //if (dh.CheckExist("configs", "code = 'checkpack' and data = '1'"))
                         //{
                         //    if (dt.Rows[0]["ms_checkpack"].ToString() != "0")
@@ -389,6 +390,23 @@ namespace UAS_MES.Make
                                     return;
                                 }
                                 ////箱号不存在的情况
+                                if (checkbox11.Checked)
+                                {
+                                    if (outinfo.Text == "" || ininfo.Text == "")
+                                    {
+                                        OperateResult.AppendText("彩箱信息校验,请输入彩箱信息\n", Color.Red);
+                                        ininfo.Focus();
+                                        ininfo.SelectAll();
+                                        return;
+                                    }
+                                    if (outinfo.Text != ininfo.Text)
+                                    {
+                                        OperateResult.AppendText("彩箱信息校验,整箱信息与彩箱信息不一致\n", Color.Red);
+                                        ininfo.Focus();
+                                        ininfo.SelectAll();
+                                        return;
+                                    }
+                                }
                                 if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
                                     if (md.IsOpen)
@@ -400,7 +418,8 @@ namespace UAS_MES.Make
                                         OperateResult.AppendText(">>" + ErrorMessage + "\n");
                                     LastSncode = sn_code.Text;
                                     OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "采集成功", sn_code.Text, "");
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "采集成功,额外信息:" + ininfo.Text, sn_code.Text, "");
+                                    ininfo.Clear();
                                     //满箱更新状态为1
                                     LoadData();
                                     LoadGridData();
@@ -497,7 +516,11 @@ namespace UAS_MES.Make
                                     }
                                     sn_code.Clear();
                                 }
-                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                                else
+                                {
+                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
+                                    ininfo.Clear();
+                                }
                             }
                         }
                         //勾选了取消箱号先验证箱号存不存在,存在的话移除掉,重新加载一次数据
@@ -535,6 +558,7 @@ namespace UAS_MES.Make
                                 LoadGridData();
                                 pa_status.Text = "0";
                                 OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green, sn_code);
+                                ininfo.Clear();
                             }
                             else
                             {
@@ -1134,5 +1158,18 @@ namespace UAS_MES.Make
                 PreFix.Enabled = true;
             }
         }
+
+        private void ininfo_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (checkbox11.Checked && ininfo.Text != "")
+                {
+                    sn_code.Focus();
+                    sn_code.SelectAll();
+                    barcode_KeyDown(sender, e);
+                }
+            }
+        }
     }
 }

+ 83 - 2
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.Designer.cs

@@ -112,6 +112,11 @@
             this.AllowRepeat = new System.Windows.Forms.CheckBox();
             this.label6 = new System.Windows.Forms.Label();
             this.Remark_PreFix = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.checkbox11 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.ininfo = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label7 = new System.Windows.Forms.Label();
+            this.outinfo = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label8 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageDetail)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             this.groupBoxWithBorder2.SuspendLayout();
@@ -648,7 +653,7 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(111, 19);
+            this.StepCount.Location = new System.Drawing.Point(139, 17);
             this.StepCount.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.StepCount.Name = "StepCount";
             this.StepCount.Size = new System.Drawing.Size(88, 23);
@@ -659,6 +664,7 @@
             // groupBoxWithBorder2
             // 
             this.groupBoxWithBorder2.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder2.Controls.Add(this.checkbox11);
             this.groupBoxWithBorder2.Controls.Add(this.StepCount);
             this.groupBoxWithBorder2.Controls.Add(this.PrintNum);
             this.groupBoxWithBorder2.Controls.Add(this.label1);
@@ -1119,11 +1125,81 @@
             this.Remark_PreFix.TabIndex = 211;
             this.Remark_PreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Remark_PreFix_KeyDown);
             // 
+            // checkbox11
+            // 
+            this.checkbox11.AutoSize = true;
+            this.checkbox11.Checked = true;
+            this.checkbox11.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.checkbox11.Location = new System.Drawing.Point(8, 21);
+            this.checkbox11.Name = "checkbox11";
+            this.checkbox11.Power = null;
+            this.checkbox11.Size = new System.Drawing.Size(125, 25);
+            this.checkbox11.TabIndex = 195;
+            this.checkbox11.Text = "彩箱信息校验";
+            this.checkbox11.UseVisualStyleBackColor = true;
+            // 
+            // ininfo
+            // 
+            this.ininfo.AllPower = "ifall";
+            this.ininfo.BackColor = System.Drawing.Color.White;
+            this.ininfo.ID = null;
+            this.ininfo.Location = new System.Drawing.Point(521, 584);
+            this.ininfo.Name = "ininfo";
+            this.ininfo.Power = "ifread";
+            this.ininfo.Size = new System.Drawing.Size(239, 21);
+            this.ininfo.Str = null;
+            this.ininfo.Str1 = null;
+            this.ininfo.Str2 = null;
+            this.ininfo.TabIndex = 218;
+            this.ininfo.Tag = "ifread";
+            this.ininfo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ininfo_KeyDown);
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.ForeColor = System.Drawing.Color.Black;
+            this.label7.Location = new System.Drawing.Point(437, 584);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(74, 21);
+            this.label7.TabIndex = 217;
+            this.label7.Text = "彩箱信息";
+            // 
+            // outinfo
+            // 
+            this.outinfo.AllPower = "ifall";
+            this.outinfo.BackColor = System.Drawing.Color.White;
+            this.outinfo.ID = null;
+            this.outinfo.Location = new System.Drawing.Point(74, 584);
+            this.outinfo.Name = "outinfo";
+            this.outinfo.Power = "ifread";
+            this.outinfo.Size = new System.Drawing.Size(268, 21);
+            this.outinfo.Str = null;
+            this.outinfo.Str1 = null;
+            this.outinfo.Str2 = null;
+            this.outinfo.TabIndex = 216;
+            this.outinfo.Tag = "ifread";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.ForeColor = System.Drawing.Color.Black;
+            this.label8.Location = new System.Drawing.Point(7, 584);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(74, 21);
+            this.label8.TabIndex = 215;
+            this.label8.Text = "整箱信息";
+            // 
             // Make_PackageCollectionWeigh
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(879, 582);
+            this.ClientSize = new System.Drawing.Size(879, 617);
+            this.Controls.Add(this.ininfo);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.outinfo);
+            this.Controls.Add(this.label8);
             this.Controls.Add(this.label6);
             this.Controls.Add(this.Remark_PreFix);
             this.Controls.Add(this.AllowRepeat);
@@ -1258,5 +1334,10 @@
         private System.Windows.Forms.CheckBox AllowRepeat;
         private System.Windows.Forms.Label label6;
         private CustomControl.TextBoxWithIcon.SnCollectionBox Remark_PreFix;
+        private CustomControl.CustomCheckBox.CustomCheckBox checkbox11;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox ininfo;
+        private System.Windows.Forms.Label label7;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox outinfo;
+        private System.Windows.Forms.Label label8;
     }
 }

+ 39 - 2
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -284,6 +284,7 @@ namespace UAS_MES.Make
                                 return;
                             }
                         }
+                    
                         //if (dh.CheckExist("configs", "code = 'checkpack' and data = '1'"))
                         //{
                         //    if (dt.Rows[0]["ms_checkpack"].ToString() != "0")
@@ -415,6 +416,23 @@ namespace UAS_MES.Make
                                 {
                                     return;
                                 }
+                                if (checkbox11.Checked)
+                                {
+                                    if (outinfo.Text == "" || ininfo.Text == "")
+                                    {
+                                        OperateResult.AppendText("彩箱信息校验,请输入彩箱信息\n", Color.Red);
+                                        ininfo.Focus();
+                                        ininfo.SelectAll();
+                                        return;
+                                    }
+                                    if (outinfo.Text != ininfo.Text)
+                                    {
+                                        OperateResult.AppendText("彩箱信息校验,整箱信息与彩箱信息不一致\n", Color.Red);
+                                        ininfo.Focus();
+                                        ininfo.SelectAll();
+                                        return;
+                                    }
+                                }
                                 ////箱号不存在的情况
                                 if (LogicHandler.Packing(sn_code.Text, pa_outboxcode.Text, AutoGenBoxCode.Checked, "标准", User.UserSourceCode, User.UserCode, pr_outboxinnerqty.Text, Cancel.Checked, out oOutBoxCode, out ErrorMessage))
                                 {
@@ -424,7 +442,8 @@ namespace UAS_MES.Make
                                     LoadCheckQTY();
                                     LoadCollectedNum();
                                     OperateResult.AppendText(">>序列号" + sn_code.Text + "采集成功!\n", Color.Green);
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "采集成功", sn_code.Text, "");
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, oMakeCode, User.UserLineCode, User.UserSourceCode, "卡通箱采集", "卡通箱" + pa_outboxcode.Text + "采集成功,额外信息:" + ininfo.Text, sn_code.Text, "");
+                                    ininfo.Clear();
                                     LastSncode = sn_code.Text;
                                     //满箱更新状态为1
                                     LoadData();
@@ -534,7 +553,11 @@ namespace UAS_MES.Make
                                         }
                                     }
                                 }
-                                else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                else
+                                {
+                                    OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                                    ininfo.Clear();
+                                }
                             }
                         }
                         //勾选了取消箱号先验证箱号存不存在,存在的话移除掉,重新加载一次数据
@@ -572,6 +595,7 @@ namespace UAS_MES.Make
                                 LoadGridData();
                                 pa_status.Text = "0";
                                 OperateResult.AppendText(">>已从该箱中移除序列号" + sn_code.Text + "\n", Color.Green, sn_code);
+                                ininfo.Clear();
                             }
                             else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, sn_code);
                         }
@@ -1116,5 +1140,18 @@ namespace UAS_MES.Make
                 PreFix.Enabled = true;
             }
         }
+
+        private void ininfo_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (checkbox11.Checked && ininfo.Text != "")
+                {
+                    sn_code.Focus();
+                    sn_code.SelectAll();
+                    barcode_KeyDown(sender, e);
+                }
+            }
+        }
     }
 }

+ 18 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.resx

@@ -212,6 +212,24 @@
   <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_barcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_outboxcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_prodcode1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pa_indate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="pd_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <data name="DeleteAll.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 228 - 181
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -28,6 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
+            this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Make_PalletCollection));
             this.pa_outboxcode_label = new System.Windows.Forms.Label();
             this.pa_totalqty_label = new System.Windows.Forms.Label();
@@ -36,7 +37,7 @@
             this.pa_salecode_label = new System.Windows.Forms.Label();
             this.outboxcode_label = new System.Windows.Forms.Label();
             this.pa_prodcode_label = new System.Windows.Forms.Label();
-            this.PrintLabel = new UAS_MES.CustomControl.ComBoxWithFocus.ComboxWithTip();
+            this.PrintLabel = new UAS_MES.CustomControl.ComBoxWithFocus.ComboxWithTip(this.components);
             this.PrintLabel_label = new System.Windows.Forms.Label();
             this.PrinterList_label = new System.Windows.Forms.Label();
             this.pa_packageqty_label = new System.Windows.Forms.Label();
@@ -62,6 +63,11 @@
             this.NewPalletCode = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.pa_custcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PackageInf = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
+            this.pd_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.AutoPrint = new UAS_MES.CustomControl.CustomCheckBox.AutoPrintCheckBox();
@@ -70,11 +76,11 @@
             this.StepCount = new UAS_MES.CustomControl.TextBoxWithIcon.SourceStepCount();
             this.PalletPreFix_label = new System.Windows.Forms.Label();
             this.PalletPreFix = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
-            this.pd_outboxcode = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.pd_innerqty = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.checkbox11 = new UAS_MES.CustomControl.CustomCheckBox.CustomCheckBox();
+            this.ininfo = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.outinfo = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.label4 = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -82,10 +88,9 @@
             // 
             this.pa_outboxcode_label.AutoSize = true;
             this.pa_outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_outboxcode_label.Location = new System.Drawing.Point(5, 52);
-            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(4, 42);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(72, 27);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(58, 21);
             this.pa_outboxcode_label.TabIndex = 102;
             this.pa_outboxcode_label.Text = "栈板号";
             // 
@@ -93,10 +98,9 @@
             // 
             this.pa_totalqty_label.AutoSize = true;
             this.pa_totalqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty_label.Location = new System.Drawing.Point(387, 104);
-            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(290, 83);
             this.pa_totalqty_label.Name = "pa_totalqty_label";
-            this.pa_totalqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_totalqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_totalqty_label.TabIndex = 104;
             this.pa_totalqty_label.Text = "已装数量";
             // 
@@ -104,10 +108,9 @@
             // 
             this.pa_makecode_label.AutoSize = true;
             this.pa_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode_label.Location = new System.Drawing.Point(387, 52);
-            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode_label.Location = new System.Drawing.Point(290, 42);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_makecode_label.Size = new System.Drawing.Size(74, 21);
             this.pa_makecode_label.TabIndex = 108;
             this.pa_makecode_label.Text = "制造单号";
             // 
@@ -115,10 +118,9 @@
             // 
             this.pa_restqty_label.AutoSize = true;
             this.pa_restqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_restqty_label.Location = new System.Drawing.Point(1004, 159);
-            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_restqty_label.Location = new System.Drawing.Point(753, 127);
             this.pa_restqty_label.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_restqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_restqty_label.TabIndex = 154;
             this.pa_restqty_label.Text = "打印张数";
             // 
@@ -126,10 +128,9 @@
             // 
             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(1004, 52);
-            this.pa_salecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_salecode_label.Location = new System.Drawing.Point(753, 42);
             this.pa_salecode_label.Name = "pa_salecode_label";
-            this.pa_salecode_label.Size = new System.Drawing.Size(52, 27);
+            this.pa_salecode_label.Size = new System.Drawing.Size(42, 21);
             this.pa_salecode_label.TabIndex = 157;
             this.pa_salecode_label.Text = "合同";
             // 
@@ -137,10 +138,9 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(951, 326);
-            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.outboxcode_label.Location = new System.Drawing.Point(713, 261);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(52, 27);
+            this.outboxcode_label.Size = new System.Drawing.Size(42, 21);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "箱号";
             // 
@@ -148,10 +148,9 @@
             // 
             this.pa_prodcode_label.AutoSize = true;
             this.pa_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode_label.Location = new System.Drawing.Point(643, 52);
-            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(482, 42);
             this.pa_prodcode_label.Name = "pa_prodcode_label";
-            this.pa_prodcode_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.pa_prodcode_label.TabIndex = 169;
             this.pa_prodcode_label.Text = "产品编号";
             // 
@@ -159,10 +158,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1127, 104);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(845, 83);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(157, 23);
+            this.PrintLabel.Size = new System.Drawing.Size(119, 20);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -170,10 +169,9 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(1004, 104);
-            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintLabel_label.Location = new System.Drawing.Point(753, 83);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(92, 27);
+            this.PrintLabel_label.Size = new System.Drawing.Size(74, 21);
             this.PrintLabel_label.TabIndex = 174;
             this.PrintLabel_label.Text = "标签文件";
             // 
@@ -181,10 +179,9 @@
             // 
             this.PrinterList_label.AutoSize = true;
             this.PrinterList_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrinterList_label.Location = new System.Drawing.Point(643, 104);
-            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrinterList_label.Location = new System.Drawing.Point(482, 83);
             this.PrinterList_label.Name = "PrinterList_label";
-            this.PrinterList_label.Size = new System.Drawing.Size(112, 27);
+            this.PrinterList_label.Size = new System.Drawing.Size(90, 21);
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
@@ -192,10 +189,9 @@
             // 
             this.pa_packageqty_label.AutoSize = true;
             this.pa_packageqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_packageqty_label.Location = new System.Drawing.Point(5, 104);
-            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(4, 83);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(92, 27);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "栈板容量";
             // 
@@ -203,10 +199,9 @@
             // 
             this.AutoOutBoxCode.AutoSize = true;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(10, 20);
-            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(8, 16);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(100, 27);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(84, 24);
             this.AutoOutBoxCode.TabIndex = 180;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -215,10 +210,9 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(1157, 218);
-            this.pa_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_status.Location = new System.Drawing.Point(868, 174);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 27);
+            this.pa_status.Size = new System.Drawing.Size(0, 21);
             this.pa_status.TabIndex = 181;
             this.pa_status.Visible = false;
             // 
@@ -226,10 +220,9 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.Cancel.Location = new System.Drawing.Point(1216, 324);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.Cancel.Location = new System.Drawing.Point(912, 259);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(100, 27);
+            this.Cancel.Size = new System.Drawing.Size(84, 24);
             this.Cancel.TabIndex = 185;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
@@ -237,10 +230,9 @@
             // pr_packrule
             // 
             this.pr_packrule.AutoSize = true;
-            this.pr_packrule.Location = new System.Drawing.Point(999, 651);
-            this.pr_packrule.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_packrule.Location = new System.Drawing.Point(749, 521);
             this.pr_packrule.Name = "pr_packrule";
-            this.pr_packrule.Size = new System.Drawing.Size(0, 15);
+            this.pr_packrule.Size = new System.Drawing.Size(0, 12);
             this.pr_packrule.TabIndex = 186;
             this.pr_packrule.Visible = false;
             // 
@@ -248,39 +240,35 @@
             // 
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_salecode.Location = new System.Drawing.Point(1125, 52);
-            this.pa_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_salecode.Location = new System.Drawing.Point(844, 42);
             this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_salecode.Size = new System.Drawing.Size(0, 21);
             this.pa_salecode.TabIndex = 187;
             // 
             // pd_makecode
             // 
             this.pd_makecode.AutoSize = true;
-            this.pd_makecode.Location = new System.Drawing.Point(1064, 375);
-            this.pd_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_makecode.Location = new System.Drawing.Point(798, 300);
             this.pd_makecode.Name = "pd_makecode";
-            this.pd_makecode.Size = new System.Drawing.Size(0, 15);
+            this.pd_makecode.Size = new System.Drawing.Size(0, 12);
             this.pd_makecode.TabIndex = 188;
             this.pd_makecode.Visible = false;
             // 
             // pd_prodcode
             // 
             this.pd_prodcode.AutoSize = true;
-            this.pd_prodcode.Location = new System.Drawing.Point(999, 374);
-            this.pd_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_prodcode.Location = new System.Drawing.Point(749, 299);
             this.pd_prodcode.Name = "pd_prodcode";
-            this.pd_prodcode.Size = new System.Drawing.Size(0, 15);
+            this.pd_prodcode.Size = new System.Drawing.Size(0, 12);
             this.pd_prodcode.TabIndex = 189;
             this.pd_prodcode.Visible = false;
             // 
             // pd_salecode
             // 
             this.pd_salecode.AutoSize = true;
-            this.pd_salecode.Location = new System.Drawing.Point(1221, 372);
-            this.pd_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_salecode.Location = new System.Drawing.Point(916, 298);
             this.pd_salecode.Name = "pd_salecode";
-            this.pd_salecode.Size = new System.Drawing.Size(0, 15);
+            this.pd_salecode.Size = new System.Drawing.Size(0, 12);
             this.pd_salecode.TabIndex = 190;
             this.pd_salecode.Visible = false;
             // 
@@ -289,11 +277,11 @@
             this.pa_standardqty.AllPower = null;
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.ID = null;
-            this.pa_standardqty.Location = new System.Drawing.Point(113, 105);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.pa_standardqty.Location = new System.Drawing.Point(85, 84);
+            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(151, 25);
+            this.pa_standardqty.Size = new System.Drawing.Size(114, 21);
             this.pa_standardqty.Str = null;
             this.pa_standardqty.Str1 = null;
             this.pa_standardqty.Str2 = null;
@@ -306,11 +294,10 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1127, 161);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintNum.Location = new System.Drawing.Point(845, 129);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(157, 25);
+            this.PrintNum.Size = new System.Drawing.Size(119, 21);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -323,13 +310,12 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(1203, 266);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4);
+            this.Packing.Location = new System.Drawing.Point(902, 213);
             this.Packing.MoveImage = ((System.Drawing.Image)(resources.GetObject("Packing.MoveImage")));
             this.Packing.Name = "Packing";
             this.Packing.NormalImage = ((System.Drawing.Image)(resources.GetObject("Packing.NormalImage")));
             this.Packing.Power = null;
-            this.Packing.Size = new System.Drawing.Size(75, 30);
+            this.Packing.Size = new System.Drawing.Size(56, 24);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封栈板";
             this.Packing.UseVisualStyleBackColor = true;
@@ -337,10 +323,10 @@
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(789, 104);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
+            this.PrinterList.Location = new System.Drawing.Point(592, 83);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(176, 25);
+            this.PrinterList.Size = new System.Drawing.Size(132, 20);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -348,11 +334,10 @@
             this.pa_prodcode.AutoSize = true;
             this.pa_prodcode.CutLength = null;
             this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_prodcode.Location = new System.Drawing.Point(784, 52);
-            this.pa_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_prodcode.Location = new System.Drawing.Point(588, 42);
+            this.pa_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.pa_prodcode.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 21);
             this.pa_prodcode.TabIndex = 170;
             this.pa_prodcode.Tag = "1";
             this.pa_prodcode.TextChanged += new System.EventHandler(this.pa_prodcode_TextChanged);
@@ -364,13 +349,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1105, 638);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(829, 510);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(80, 30);
+            this.Clean.Size = new System.Drawing.Size(60, 24);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -379,10 +363,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(953, 375);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(715, 300);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(368, 254);
+            this.OperateResult.Size = new System.Drawing.Size(277, 204);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -391,11 +374,10 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1019, 326);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.outboxcode.Location = new System.Drawing.Point(764, 261);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(175, 25);
+            this.outboxcode.Size = new System.Drawing.Size(132, 21);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -408,11 +390,10 @@
             this.pa_outboxcode.AllPower = "ifall";
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(113, 55);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_outboxcode.Location = new System.Drawing.Point(85, 44);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(229, 25);
+            this.pa_outboxcode.Size = new System.Drawing.Size(173, 21);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -427,13 +408,12 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(1101, 266);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
+            this.Printlab.Location = new System.Drawing.Point(826, 213);
             this.Printlab.MoveImage = ((System.Drawing.Image)(resources.GetObject("Printlab.MoveImage")));
             this.Printlab.Name = "Printlab";
             this.Printlab.NormalImage = ((System.Drawing.Image)(resources.GetObject("Printlab.NormalImage")));
             this.Printlab.Power = null;
-            this.Printlab.Size = new System.Drawing.Size(60, 30);
+            this.Printlab.Size = new System.Drawing.Size(45, 24);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -446,13 +426,12 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(987, 266);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
+            this.ReleasePallet.Location = new System.Drawing.Point(740, 213);
             this.ReleasePallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.MoveImage")));
             this.ReleasePallet.Name = "ReleasePallet";
             this.ReleasePallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.NormalImage")));
             this.ReleasePallet.Power = null;
-            this.ReleasePallet.Size = new System.Drawing.Size(75, 30);
+            this.ReleasePallet.Size = new System.Drawing.Size(56, 24);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除栈板";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -465,13 +444,12 @@
             this.NewPalletCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.DownImage")));
             this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
             this.NewPalletCode.IsShowBorder = true;
-            this.NewPalletCode.Location = new System.Drawing.Point(1221, 20);
-            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4);
+            this.NewPalletCode.Location = new System.Drawing.Point(916, 16);
             this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
             this.NewPalletCode.Name = "NewPalletCode";
             this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
             this.NewPalletCode.Power = "ifread";
-            this.NewPalletCode.Size = new System.Drawing.Size(80, 30);
+            this.NewPalletCode.Size = new System.Drawing.Size(60, 24);
             this.NewPalletCode.TabIndex = 159;
             this.NewPalletCode.Text = "新增栈板";
             this.NewPalletCode.UseVisualStyleBackColor = true;
@@ -483,11 +461,10 @@
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
             this.pa_custcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode.Location = new System.Drawing.Point(965, 218);
-            this.pa_custcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_custcode.Location = new System.Drawing.Point(724, 174);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 21);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -502,23 +479,66 @@
             this.Column4,
             this.Column5});
             this.PackageInf.EnableContentClick = true;
-            this.PackageInf.Location = new System.Drawing.Point(4, 161);
-            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
+            this.PackageInf.Location = new System.Drawing.Point(3, 129);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(941, 519);
+            this.PackageInf.Size = new System.Drawing.Size(706, 415);
             this.PackageInf.TabIndex = 156;
             // 
+            // pd_outboxcode
+            // 
+            this.pd_outboxcode.DataPropertyName = "code";
+            this.pd_outboxcode.HeaderText = "箱号";
+            this.pd_outboxcode.MinimumWidth = 200;
+            this.pd_outboxcode.Name = "pd_outboxcode";
+            this.pd_outboxcode.ReadOnly = true;
+            this.pd_outboxcode.Width = 200;
+            // 
+            // pd_innerqty
+            // 
+            this.pd_innerqty.DataPropertyName = "pd_innerqty";
+            this.pd_innerqty.HeaderText = "数量";
+            this.pd_innerqty.MinimumWidth = 70;
+            this.pd_innerqty.Name = "pd_innerqty";
+            this.pd_innerqty.ReadOnly = true;
+            this.pd_innerqty.Width = 70;
+            // 
+            // Column3
+            // 
+            this.Column3.DataPropertyName = "pd_prodcode";
+            this.Column3.HeaderText = "产品编号";
+            this.Column3.MinimumWidth = 150;
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            this.Column3.Width = 150;
+            // 
+            // Column4
+            // 
+            this.Column4.DataPropertyName = "pd_makecode";
+            this.Column4.HeaderText = "工单号";
+            this.Column4.MinimumWidth = 150;
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            this.Column4.Width = 150;
+            // 
+            // Column5
+            // 
+            this.Column5.DataPropertyName = "pa_salecode";
+            this.Column5.HeaderText = "合同";
+            this.Column5.MinimumWidth = 150;
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            this.Column5.Width = 150;
+            // 
             // pa_makecode
             // 
             this.pa_makecode.AutoSize = true;
             this.pa_makecode.CutLength = null;
             this.pa_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_makecode.Location = new System.Drawing.Point(499, 52);
-            this.pa_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(374, 42);
+            this.pa_makecode.MaximumSize = new System.Drawing.Size(150, 0);
             this.pa_makecode.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 21);
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
@@ -527,31 +547,29 @@
             this.pa_totalqty.AutoSize = true;
             this.pa_totalqty.CutLength = null;
             this.pa_totalqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_totalqty.Location = new System.Drawing.Point(499, 104);
-            this.pa_totalqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_totalqty.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_totalqty.Location = new System.Drawing.Point(374, 83);
+            this.pa_totalqty.MaximumSize = new System.Drawing.Size(150, 0);
             this.pa_totalqty.Name = "pa_totalqty";
-            this.pa_totalqty.Size = new System.Drawing.Size(0, 27);
+            this.pa_totalqty.Size = new System.Drawing.Size(0, 21);
             this.pa_totalqty.TabIndex = 105;
             this.pa_totalqty.Tag = "1";
             // 
             // AutoPrint
             // 
             this.AutoPrint.Checked = false;
-            this.AutoPrint.Location = new System.Drawing.Point(1009, 218);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.AutoPrint.Location = new System.Drawing.Point(757, 174);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(112, 28);
+            this.AutoPrint.Size = new System.Drawing.Size(84, 22);
             this.AutoPrint.TabIndex = 191;
             // 
             // OutBoxLength_label
             // 
             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(122, 21);
-            this.OutBoxLength_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.OutBoxLength_label.Location = new System.Drawing.Point(92, 17);
             this.OutBoxLength_label.Name = "OutBoxLength_label";
-            this.OutBoxLength_label.Size = new System.Drawing.Size(46, 24);
+            this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
             this.OutBoxLength_label.TabIndex = 193;
             this.OutBoxLength_label.Text = "长度";
             // 
@@ -561,11 +579,11 @@
             this.OutBoxLength.BackColor = System.Drawing.Color.White;
             this.OutBoxLength.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.OutBoxLength.ID = null;
-            this.OutBoxLength.Location = new System.Drawing.Point(179, 20);
-            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.OutBoxLength.Location = new System.Drawing.Point(134, 16);
+            this.OutBoxLength.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.OutBoxLength.Name = "OutBoxLength";
             this.OutBoxLength.Power = null;
-            this.OutBoxLength.Size = new System.Drawing.Size(49, 27);
+            this.OutBoxLength.Size = new System.Drawing.Size(38, 23);
             this.OutBoxLength.Str = null;
             this.OutBoxLength.Str1 = null;
             this.OutBoxLength.Str2 = null;
@@ -575,10 +593,10 @@
             // StepCount
             // 
             this.StepCount.LineCode = null;
-            this.StepCount.Location = new System.Drawing.Point(643, 14);
-            this.StepCount.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.StepCount.Location = new System.Drawing.Point(482, 11);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2);
             this.StepCount.Name = "StepCount";
-            this.StepCount.Size = new System.Drawing.Size(117, 28);
+            this.StepCount.Size = new System.Drawing.Size(88, 22);
             this.StepCount.Source = null;
             this.StepCount.StepCode = null;
             this.StepCount.TabIndex = 194;
@@ -587,10 +605,9 @@
             // 
             this.PalletPreFix_label.AutoSize = true;
             this.PalletPreFix_label.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PalletPreFix_label.Location = new System.Drawing.Point(242, 21);
-            this.PalletPreFix_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PalletPreFix_label.Location = new System.Drawing.Point(182, 17);
             this.PalletPreFix_label.Name = "PalletPreFix_label";
-            this.PalletPreFix_label.Size = new System.Drawing.Size(46, 24);
+            this.PalletPreFix_label.Size = new System.Drawing.Size(37, 20);
             this.PalletPreFix_label.TabIndex = 196;
             this.PalletPreFix_label.Text = "前缀";
             // 
@@ -600,67 +617,93 @@
             this.PalletPreFix.BackColor = System.Drawing.Color.White;
             this.PalletPreFix.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.PalletPreFix.ID = null;
-            this.PalletPreFix.Location = new System.Drawing.Point(293, 20);
-            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(8, 9, 8, 9);
+            this.PalletPreFix.Location = new System.Drawing.Point(220, 16);
+            this.PalletPreFix.Margin = new System.Windows.Forms.Padding(6, 7, 6, 7);
             this.PalletPreFix.Name = "PalletPreFix";
             this.PalletPreFix.Power = null;
-            this.PalletPreFix.Size = new System.Drawing.Size(49, 27);
+            this.PalletPreFix.Size = new System.Drawing.Size(38, 23);
             this.PalletPreFix.Str = null;
             this.PalletPreFix.Str1 = null;
             this.PalletPreFix.Str2 = null;
             this.PalletPreFix.TabIndex = 195;
             this.PalletPreFix.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PalletPreFix_KeyDown);
             // 
-            // pd_outboxcode
-            // 
-            this.pd_outboxcode.DataPropertyName = "code";
-            this.pd_outboxcode.HeaderText = "箱号";
-            this.pd_outboxcode.MinimumWidth = 200;
-            this.pd_outboxcode.Name = "pd_outboxcode";
-            this.pd_outboxcode.ReadOnly = true;
-            this.pd_outboxcode.Width = 200;
-            // 
-            // pd_innerqty
-            // 
-            this.pd_innerqty.DataPropertyName = "pd_innerqty";
-            this.pd_innerqty.HeaderText = "数量";
-            this.pd_innerqty.MinimumWidth = 70;
-            this.pd_innerqty.Name = "pd_innerqty";
-            this.pd_innerqty.ReadOnly = true;
-            this.pd_innerqty.Width = 70;
-            // 
-            // Column3
-            // 
-            this.Column3.DataPropertyName = "pd_prodcode";
-            this.Column3.HeaderText = "产品编号";
-            this.Column3.MinimumWidth = 150;
-            this.Column3.Name = "Column3";
-            this.Column3.ReadOnly = true;
-            this.Column3.Width = 150;
-            // 
-            // Column4
-            // 
-            this.Column4.DataPropertyName = "pd_makecode";
-            this.Column4.HeaderText = "工单号";
-            this.Column4.MinimumWidth = 150;
-            this.Column4.Name = "Column4";
-            this.Column4.ReadOnly = true;
-            this.Column4.Width = 150;
-            // 
-            // Column5
-            // 
-            this.Column5.DataPropertyName = "pa_salecode";
-            this.Column5.HeaderText = "合同";
-            this.Column5.MinimumWidth = 150;
-            this.Column5.Name = "Column5";
-            this.Column5.ReadOnly = true;
-            this.Column5.Width = 150;
+            // checkbox11
+            // 
+            this.checkbox11.AutoSize = true;
+            this.checkbox11.Checked = true;
+            this.checkbox11.CheckState = System.Windows.Forms.CheckState.Checked;
+            this.checkbox11.Location = new System.Drawing.Point(294, 17);
+            this.checkbox11.Name = "checkbox11";
+            this.checkbox11.Power = null;
+            this.checkbox11.Size = new System.Drawing.Size(96, 16);
+            this.checkbox11.TabIndex = 197;
+            this.checkbox11.Text = "箱号信息校验";
+            this.checkbox11.UseVisualStyleBackColor = true;
+            // 
+            // ininfo
+            // 
+            this.ininfo.AllPower = "ifall";
+            this.ininfo.BackColor = System.Drawing.Color.White;
+            this.ininfo.ID = null;
+            this.ininfo.Location = new System.Drawing.Point(531, 554);
+            this.ininfo.Name = "ininfo";
+            this.ininfo.Power = "ifread";
+            this.ininfo.Size = new System.Drawing.Size(239, 21);
+            this.ininfo.Str = null;
+            this.ininfo.Str1 = null;
+            this.ininfo.Str2 = null;
+            this.ininfo.TabIndex = 218;
+            this.ininfo.Tag = "ifread";
+            this.ininfo.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ininfo_KeyDown);
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.ForeColor = System.Drawing.Color.Black;
+            this.label5.Location = new System.Drawing.Point(447, 554);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(74, 21);
+            this.label5.TabIndex = 217;
+            this.label5.Text = "外箱信息";
+            // 
+            // outinfo
+            // 
+            this.outinfo.AllPower = "ifall";
+            this.outinfo.BackColor = System.Drawing.Color.White;
+            this.outinfo.ID = null;
+            this.outinfo.Location = new System.Drawing.Point(96, 554);
+            this.outinfo.Name = "outinfo";
+            this.outinfo.Power = "ifread";
+            this.outinfo.Size = new System.Drawing.Size(268, 21);
+            this.outinfo.Str = null;
+            this.outinfo.Str1 = null;
+            this.outinfo.Str2 = null;
+            this.outinfo.TabIndex = 216;
+            this.outinfo.Tag = "ifread";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.ForeColor = System.Drawing.Color.Black;
+            this.label4.Location = new System.Drawing.Point(17, 554);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(74, 21);
+            this.label4.TabIndex = 215;
+            this.label4.Text = "栈板信息";
             // 
             // Make_PalletCollection
             // 
-            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(1329, 690);
+            this.ClientSize = new System.Drawing.Size(997, 587);
+            this.Controls.Add(this.ininfo);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.outinfo);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.checkbox11);
             this.Controls.Add(this.PalletPreFix_label);
             this.Controls.Add(this.PalletPreFix);
             this.Controls.Add(this.StepCount);
@@ -703,7 +746,6 @@
             this.Controls.Add(this.pa_totalqty_label);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PalletCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = " ";
@@ -711,7 +753,7 @@
             this.Load += new System.EventHandler(this.Make_PalletCollection_Load);
             this.SizeChanged += new System.EventHandler(this.Make_PalletCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -763,5 +805,10 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private CustomControl.CustomCheckBox.CustomCheckBox checkbox11;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox ininfo;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox outinfo;
+        private System.Windows.Forms.Label label4;
     }
 }

+ 33 - 1
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -131,6 +131,7 @@ namespace UAS_MES.Make
                         OperateResult.AppendText(">>箱号不能为空\n", Color.Red);
                         return;
                     }
+                 
                     sql.Clear();
                     sql.Append("select nvl(pa_iostatus,0)pa_iostatus,pa_outno,pa_makecode pd_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_salecode pd_salecode,pr_packrule,pa_id,pa_prodcode pd_prodcode,pa_status,pa_mothercode,pa_nextstep,pa_weight  ");
                     sql.Append("from packagedetail left join package on pd_paid=pa_id left join product on pd_prodcode=pr_code where pd_outboxcode='" + outboxcode.Text + "'");
@@ -285,6 +286,23 @@ namespace UAS_MES.Make
                                         OperateResult.AppendText(">>采集箱号" + outboxcode.Text + "后超出容量\n", Color.Red, outboxcode);
                                         return;
                                     }
+                                    if (checkbox11.Checked)
+                                    {
+                                        if (outinfo.Text == "" || ininfo.Text == "")
+                                        {
+                                            OperateResult.AppendText("箱号信息校验,请输入外箱信息\n", Color.Red);
+                                            ininfo.Focus();
+                                            ininfo.SelectAll();
+                                            return;
+                                        }
+                                        if (outinfo.Text != ininfo.Text)
+                                        {
+                                            OperateResult.AppendText("箱号信息校验,外箱信息与栈板信息不一致\n", Color.Red);
+                                            ininfo.Focus();
+                                            ininfo.SelectAll();
+                                            return;
+                                        }
+                                    }
                                     if (int.Parse(pa_totalqty.Text == "" ? "0" : pa_totalqty.Text) == 0)
                                     {
                                         dh.ExecuteSql("update package set pa_prodcode='" + pd_prodcode.Text + "',pa_salecode='" + pd_salecode.Text + "',pa_makecode='" + pd_makecode.Text + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
@@ -317,8 +335,9 @@ namespace UAS_MES.Make
                                         string nextstepcode = dh.getFieldDataByCondition("mes_package_view left join makeserial on ms_sncode=v_barcode", "ms_nextstepcode", "v_outboxcode='" + outboxcode.Text + "'").ToString();
                                         dh.UpdateByCondition("package", "pa_nextstep='" + nextstepcode + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
                                     }
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板" + pa_outboxcode.Text + "采集箱" + outboxcode.Text + "成功", pa_outboxcode.Text, "");
+                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, "", User.UserLineCode, User.UserSourceCode, "栈板采集", "栈板" + pa_outboxcode.Text + "采集箱" + outboxcode.Text + "成功,额外信息:"+ininfo.Text, pa_outboxcode.Text, "");
                                     OperateResult.AppendText(">>箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
+                                    ininfo.Clear();
                                     LoadCollectNum();
                                     palletcode_KeyDown(sender, e);
                                     if (pa_standardqty.Text == pa_totalqty.Text)
@@ -660,5 +679,18 @@ namespace UAS_MES.Make
                 pa_outboxcode.Focus();
             }
         }
+
+        private void ininfo_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (checkbox11.Checked && ininfo.Text != "")
+                {
+                    outboxcode.Focus();
+                    outboxcode.SelectAll();
+                    outboxcode_KeyDown(sender, e);
+                }
+            }
+        }
     }
 }

+ 1 - 1
UAS-MES/Login.cs

@@ -108,7 +108,7 @@ namespace UAS_MES
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="+Address+")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=117.25.180.218)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 3 - 1
UAS-MES/UAS-MES.csproj

@@ -81,7 +81,7 @@
     <GenerateManifests>true</GenerateManifests>
   </PropertyGroup>
   <PropertyGroup>
-    <SignManifests>true</SignManifests>
+    <SignManifests>false</SignManifests>
   </PropertyGroup>
   <PropertyGroup>
     <StartupObject>UAS_MES.Program</StartupObject>
@@ -1276,6 +1276,7 @@
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_MakeInf.resx">
       <DependentUpon>Query_MakeInf.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SnMessage.resx">
       <DependentUpon>Query_SnMessage.cs</DependentUpon>
@@ -1359,6 +1360,7 @@
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_PositionStock.resx">
       <DependentUpon>Make_PositionStock.cs</DependentUpon>
+      <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Make\Make_CheckNoRelpace.resx">
       <DependentUpon>Make_CheckNoRelpace.cs</DependentUpon>

+ 1 - 1
UAS_MES_JH/App.config

@@ -72,7 +72,7 @@
   <applicationSettings>
     <UAS_MES_NEW.Properties.Settings>
       <setting name="MES" serializeAs="String">
-        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
+        <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=joyhong.tpddns.cn)(PORT=1522)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
       </setting>
     </UAS_MES_NEW.Properties.Settings>
   </applicationSettings>

+ 6 - 0
UAS_MES_JH/FunctionCode/Make/Make_ColorBoxLabelPrint.cs

@@ -200,6 +200,12 @@ namespace UAS_MES_NEW.Make
                             //提示用户“<< 序列号:XXXX”
                             OperateResult.AppendText("<<序列号:" + sncode.Text + "\n", Color.Black);
                             string softversion = dh.GetConfig("softversion", "sys").ToString();
+                            if (version == sncode.Text)
+                            {
+                                OperateResult.AppendText("<<序列号:" + sncode.Text + "与对应软件版本" + version + "相同,不允许采集\n", Color.Red);
+                                version = "";
+                                return;
+                            }
                             if (version != ma_softversion.Text && version != ""&& softversion !="0")
                             {
                                 OperateResult.AppendText("<<序列号:" + sncode.Text + "对应软件版本" + version + "与工单维护软件版本" + ma_softversion.Text + "不一致\n", Color.Red);

+ 1 - 0
UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.Designer.cs

@@ -867,6 +867,7 @@
             this.DeleteAll.TabIndex = 181;
             this.DeleteAll.Text = "拆箱";
             this.DeleteAll.UseVisualStyleBackColor = true;
+            this.DeleteAll.Visible = false;
             this.DeleteAll.Click += new System.EventHandler(this.DeleteAll_Click);
             // 
             // AutoGenBoxCode

+ 9 - 9
UAS_MES_JH/FunctionCode/Packing/Packing_PackageCollection.cs

@@ -277,15 +277,15 @@ namespace UAS_MES_NEW.Packing
                                 }
                                 return;
                             }
-                            if (ms_netcode == " ")
-                            {
-                                OperateResult.AppendText(">>序列号" + sn_code.Text + "WIFIBOX为空,无法采集,请检查\n", Color.Red, sn_code);
-                                if (md.IsOpen)
-                                {
-                                    md.SendOrder("M502_ON");
-                                }
-                                return;
-                            }
+                            //if (ms_netcode == " ")
+                            //{
+                            //    OperateResult.AppendText(">>序列号" + sn_code.Text + "WIFIBOX为空,无法采集,请检查\n", Color.Red, sn_code);
+                            //    if (md.IsOpen)
+                            //    {
+                            //        md.SendOrder("M502_ON");
+                            //    }
+                            //    return;
+                            //}
 
                             if (dh.getFieldDataByCondition("stepproduct left join makeserial on sp_mothercode = ms_prodcode and sp_craftcode = ms_craftcode", "count(*)", "ms_sncode =  '"+ sn_code.Text + "'").ToString() != dh.getFieldDataByCondition("craftmaterial", "count(*)", "cm_sncode = '" + sn_code.Text + "' and cm_status = 0").ToString())
                             {

+ 2 - 2
UAS_MES_JH/Login.cs

@@ -88,8 +88,8 @@ namespace UAS_MES_NEW
             //设置选中数据库的链接
             string DBUser = DB.SelectedValue.ToString().Split('#')[0];
             string Address = DB.SelectedValue.ToString().Split('#')[1];
-            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="+ Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
-            //DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=joyhong.tpddns.cn)(PORT=1522)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            //DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="+ Address + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            DataHelper.DBConnectionString = "Password=select!#%*(;User ID=" + DBUser + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=joyhong.tpddns.cn)(PORT=1522)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             SystemInf.CurrentDB = DBUser;
             //设置屏幕的宽高信息
             SystemInf.ScreenWidth = Screen.PrimaryScreen.WorkingArea.Width;

+ 2 - 2
UAS_MES_JH/Properties/Settings.Designer.cs

@@ -122,8 +122,8 @@ namespace UAS_MES_NEW.Properties {
         [global::System.Configuration.ApplicationScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
         [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false" +
-            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5" +
-            ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=joyhong.tpd" +
+            "dns.cn)(PORT=1522)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         public string MES {
             get {
                 return ((string)(this["MES"]));

+ 1 - 1
UAS_MES_JH/Properties/Settings.settings

@@ -27,7 +27,7 @@
       <Value Profile="(Default)">\\172.16.66.51\lable</Value>
     </Setting>
     <Setting Name="MES" Type="System.String" Scope="Application">
-      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.5)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=joyhong.tpddns.cn)(PORT=1522)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 3 - 0
UAS_MES_WEIP/App.config

@@ -44,6 +44,9 @@
       <setting name="SMTBIND" serializeAs="String">
         <value>True</value>
       </setting>
+      <setting name="DefaultBadGroup" serializeAs="String">
+        <value />
+      </setting>
     </UAS_MES_NEW.Properties.Settings>
     <UAS_MES.Properties.Settings>
       <setting name="ProjectName" serializeAs="String">

+ 2 - 1
UAS_MES_WEIP/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.Designer.cs

@@ -40,13 +40,14 @@
             this.TextBox.Location = new System.Drawing.Point(0, 0);
             this.TextBox.Name = "TextBox";
             this.TextBox.Power = null;
-            this.TextBox.Size = new System.Drawing.Size(241, 25);
+            this.TextBox.Size = new System.Drawing.Size(241, 21);
             this.TextBox.Str = null;
             this.TextBox.Str1 = null;
             this.TextBox.Str2 = null;
             this.TextBox.TabIndex = 0;
             this.TextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged);
             this.TextBox.Enter += new System.EventHandler(this.TextBox_Enter);
+            this.TextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBox_KeyDown_1);
             this.TextBox.Leave += new System.EventHandler(this.TextBox_Leave);
             // 
             // TextBoxWithPlaceHolder

+ 2 - 1
UAS_MES_WEIP/CustomControl/TextBoxWithIcon/TextBoxWithPlaceHolder.cs

@@ -83,7 +83,8 @@ namespace UAS_MES_NEW.CustomControl.TextBoxWithIcon
             UserControlTextChanged?.Invoke(sender, new EventArgs());
         }
 
-        private void TextBox_KeyDown(object sender, KeyEventArgs e)
+
+        private void TextBox_KeyDown_1(object sender, KeyEventArgs e)
         {
             UserControlOnKeyDown?.Invoke(sender, e);
         }

+ 167 - 32
UAS_MES_WEIP/FunctionCode/Make/Make_Repair.Designer.cs

@@ -50,6 +50,18 @@
             this.nrg_code = new System.Windows.Forms.Label();
             this.so_code = new System.Windows.Forms.Label();
             this.mbr_dutycode = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.WaitRejectList = new System.Windows.Forms.ListView();
+            this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_code1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bg_name1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_code1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.bc_name1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+            this.BadInfo = new System.Windows.Forms.BindingSource(this.components);
+            this.Filter = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder();
+            this.badgroup = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
+            this.normalButton1 = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             this.mbc_component = new UAS_MES_NEW.CustomControl.ComBoxWithFocus.ComBoxWithFocus();
             this.mbr_dutyname = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
             this.so_name = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.BlurSearch();
@@ -97,6 +109,7 @@
             this.SaveBadLocation = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfo)).BeginInit();
             this.groupBoxWithBorder1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).BeginInit();
@@ -194,7 +207,7 @@
             this.mbl_loc_label.AutoSize = true;
             this.mbl_loc_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbl_loc_label.ForeColor = System.Drawing.Color.Black;
-            this.mbl_loc_label.Location = new System.Drawing.Point(163, 287);
+            this.mbl_loc_label.Location = new System.Drawing.Point(250, 283);
             this.mbl_loc_label.Name = "mbl_loc_label";
             this.mbl_loc_label.Size = new System.Drawing.Size(74, 21);
             this.mbl_loc_label.TabIndex = 103;
@@ -205,7 +218,7 @@
             this.mbp_part_label.AutoSize = true;
             this.mbp_part_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.mbp_part_label.ForeColor = System.Drawing.Color.Black;
-            this.mbp_part_label.Location = new System.Drawing.Point(454, 287);
+            this.mbp_part_label.Location = new System.Drawing.Point(511, 282);
             this.mbp_part_label.Name = "mbp_part_label";
             this.mbp_part_label.Size = new System.Drawing.Size(74, 21);
             this.mbp_part_label.TabIndex = 105;
@@ -217,7 +230,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode_Label.AutoSize = true;
             this.GetSNCode_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.GetSNCode_Label.Location = new System.Drawing.Point(163, 533);
+            this.GetSNCode_Label.Location = new System.Drawing.Point(320, 533);
             this.GetSNCode_Label.Name = "GetSNCode_Label";
             this.GetSNCode_Label.Size = new System.Drawing.Size(58, 21);
             this.GetSNCode_Label.TabIndex = 113;
@@ -240,7 +253,7 @@
             this.BadCodeTree.Location = new System.Drawing.Point(11, 144);
             this.BadCodeTree.Margin = new System.Windows.Forms.Padding(2);
             this.BadCodeTree.Name = "BadCodeTree";
-            this.BadCodeTree.Size = new System.Drawing.Size(144, 426);
+            this.BadCodeTree.Size = new System.Drawing.Size(144, 102);
             this.BadCodeTree.TabIndex = 118;
             this.BadCodeTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.BadCodeTree_NodeMouseClick);
             // 
@@ -299,6 +312,109 @@
             this.mbr_dutycode.TabIndex = 138;
             this.mbr_dutycode.Visible = false;
             // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(5, 291);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(74, 21);
+            this.label1.TabIndex = 144;
+            this.label1.Text = "待选不良";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(5, 259);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(90, 21);
+            this.label3.TabIndex = 142;
+            this.label3.Text = "不良代码组";
+            // 
+            // WaitRejectList
+            // 
+            this.WaitRejectList.CheckBoxes = true;
+            this.WaitRejectList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader5,
+            this.bg_code1,
+            this.bg_name1,
+            this.bc_code1,
+            this.bc_name1});
+            this.WaitRejectList.Location = new System.Drawing.Point(6, 325);
+            this.WaitRejectList.Name = "WaitRejectList";
+            this.WaitRejectList.Size = new System.Drawing.Size(244, 244);
+            this.WaitRejectList.TabIndex = 141;
+            this.WaitRejectList.UseCompatibleStateImageBehavior = false;
+            this.WaitRejectList.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader5
+            // 
+            this.columnHeader5.Text = " ";
+            this.columnHeader5.Width = 20;
+            // 
+            // bg_code1
+            // 
+            this.bg_code1.Text = "不良代码组编号";
+            this.bg_code1.Width = 0;
+            // 
+            // bg_name1
+            // 
+            this.bg_name1.Text = "不良组";
+            // 
+            // bc_code1
+            // 
+            this.bc_code1.Text = "不良代码";
+            this.bc_code1.Width = 80;
+            // 
+            // bc_name1
+            // 
+            this.bc_name1.Text = "不良名称";
+            this.bc_name1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            this.bc_name1.Width = 80;
+            // 
+            // Filter
+            // 
+            this.Filter.BackColor = System.Drawing.Color.Transparent;
+            this.Filter.Font = new System.Drawing.Font("宋体", 10.8F);
+            this.Filter.Location = new System.Drawing.Point(87, 291);
+            this.Filter.Margin = new System.Windows.Forms.Padding(2);
+            this.Filter.Name = "Filter";
+            this.Filter.PlaceHolder = "不良代码搜索";
+            this.Filter.Size = new System.Drawing.Size(158, 22);
+            this.Filter.TabIndex = 145;
+            this.Filter.UserControlTextChanged += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnTextChange(this.Filter_UserControlTextChanged);
+            this.Filter.UserControlOnKeyDown += new UAS_MES_NEW.CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder.OnKeyDown(this.Filter_UserControlOnKeyDown);
+            // 
+            // badgroup
+            // 
+            this.badgroup.FormattingEnabled = true;
+            this.badgroup.Location = new System.Drawing.Point(97, 260);
+            this.badgroup.Margin = new System.Windows.Forms.Padding(2);
+            this.badgroup.Name = "badgroup";
+            this.badgroup.Size = new System.Drawing.Size(148, 20);
+            this.badgroup.TabIndex = 143;
+            this.badgroup.SelectedIndexChanged += new System.EventHandler(this.badgroup_SelectedIndexChanged);
+            // 
+            // normalButton1
+            // 
+            this.normalButton1.AllPower = "ifall";
+            this.normalButton1.BackColor = System.Drawing.Color.Transparent;
+            this.normalButton1.DownImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.DownImage")));
+            this.normalButton1.Image = null;
+            this.normalButton1.IsShowBorder = true;
+            this.normalButton1.Location = new System.Drawing.Point(110, 114);
+            this.normalButton1.MoveImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.MoveImage")));
+            this.normalButton1.Name = "normalButton1";
+            this.normalButton1.NormalImage = ((System.Drawing.Image)(resources.GetObject("normalButton1.NormalImage")));
+            this.normalButton1.Power = null;
+            this.normalButton1.Size = new System.Drawing.Size(107, 24);
+            this.normalButton1.TabIndex = 140;
+            this.normalButton1.Tag = "IfRead";
+            this.normalButton1.Text = "删除不良现象";
+            this.normalButton1.UseVisualStyleBackColor = true;
+            this.normalButton1.Click += new System.EventHandler(this.normalButton1_Click);
+            // 
             // mbc_component
             // 
             this.mbc_component.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -427,7 +543,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_reworkcheckno.AutoSize = true;
             this.ms_reworkcheckno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_reworkcheckno.Location = new System.Drawing.Point(791, 58);
+            this.ms_reworkcheckno.Location = new System.Drawing.Point(790, 57);
             this.ms_reworkcheckno.Name = "ms_reworkcheckno";
             this.ms_reworkcheckno.Size = new System.Drawing.Size(74, 21);
             this.ms_reworkcheckno.TabIndex = 129;
@@ -440,7 +556,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_makecode_label.AutoSize = true;
             this.ms_makecode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode_label.Location = new System.Drawing.Point(202, 26);
+            this.ms_makecode_label.Location = new System.Drawing.Point(201, 25);
             this.ms_makecode_label.Name = "ms_makecode_label";
             this.ms_makecode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_makecode_label.TabIndex = 37;
@@ -452,7 +568,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_sncode_label.AutoSize = true;
             this.ms_sncode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode_label.Location = new System.Drawing.Point(14, 25);
+            this.ms_sncode_label.Location = new System.Drawing.Point(13, 24);
             this.ms_sncode_label.Name = "ms_sncode_label";
             this.ms_sncode_label.Size = new System.Drawing.Size(58, 21);
             this.ms_sncode_label.TabIndex = 38;
@@ -464,7 +580,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_checkno.AutoSize = true;
             this.ms_checkno.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_checkno.Location = new System.Drawing.Point(789, 26);
+            this.ms_checkno.Location = new System.Drawing.Point(788, 25);
             this.ms_checkno.Name = "ms_checkno";
             this.ms_checkno.Size = new System.Drawing.Size(74, 21);
             this.ms_checkno.TabIndex = 128;
@@ -498,7 +614,7 @@
             this.ms_sncode.AutoSize = true;
             this.ms_sncode.CutLength = null;
             this.ms_sncode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_sncode.Location = new System.Drawing.Point(89, 26);
+            this.ms_sncode.Location = new System.Drawing.Point(88, 25);
             this.ms_sncode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_sncode.Name = "ms_sncode";
             this.ms_sncode.Size = new System.Drawing.Size(0, 21);
@@ -529,7 +645,7 @@
             this.nr_code.AutoSize = true;
             this.nr_code.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.nr_code.ForeColor = System.Drawing.Color.Black;
-            this.nr_code.Location = new System.Drawing.Point(839, 221);
+            this.nr_code.Location = new System.Drawing.Point(838, 220);
             this.nr_code.Name = "nr_code";
             this.nr_code.Size = new System.Drawing.Size(0, 21);
             this.nr_code.TabIndex = 125;
@@ -540,7 +656,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.st_rstepcode_label.AutoSize = true;
             this.st_rstepcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.st_rstepcode_label.Location = new System.Drawing.Point(264, 64);
+            this.st_rstepcode_label.Location = new System.Drawing.Point(263, 63);
             this.st_rstepcode_label.Name = "st_rstepcode_label";
             this.st_rstepcode_label.Size = new System.Drawing.Size(74, 21);
             this.st_rstepcode_label.TabIndex = 65;
@@ -552,7 +668,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ma_craftcode_label.AutoSize = true;
             this.ma_craftcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ma_craftcode_label.Location = new System.Drawing.Point(14, 64);
+            this.ma_craftcode_label.Location = new System.Drawing.Point(13, 63);
             this.ma_craftcode_label.Name = "ma_craftcode_label";
             this.ma_craftcode_label.Size = new System.Drawing.Size(74, 21);
             this.ma_craftcode_label.TabIndex = 66;
@@ -585,7 +701,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(636, 26);
+            this.pr_detail_label.Location = new System.Drawing.Point(635, 25);
             this.pr_detail_label.Name = "pr_detail_label";
             this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 61;
@@ -597,7 +713,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.ms_prodcode_label.AutoSize = true;
             this.ms_prodcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode_label.Location = new System.Drawing.Point(407, 26);
+            this.ms_prodcode_label.Location = new System.Drawing.Point(406, 25);
             this.ms_prodcode_label.Name = "ms_prodcode_label";
             this.ms_prodcode_label.Size = new System.Drawing.Size(74, 21);
             this.ms_prodcode_label.TabIndex = 62;
@@ -610,7 +726,7 @@
             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(732, 26);
+            this.pr_detail.Location = new System.Drawing.Point(731, 25);
             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, 21);
@@ -623,7 +739,7 @@
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.CutLength = null;
             this.ms_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_prodcode.Location = new System.Drawing.Point(503, 26);
+            this.ms_prodcode.Location = new System.Drawing.Point(502, 25);
             this.ms_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.ms_prodcode.Name = "ms_prodcode";
             this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
@@ -637,7 +753,7 @@
             this.ms_makecode.AutoSize = true;
             this.ms_makecode.CutLength = null;
             this.ms_makecode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.ms_makecode.Location = new System.Drawing.Point(282, 26);
+            this.ms_makecode.Location = new System.Drawing.Point(281, 25);
             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);
@@ -660,7 +776,7 @@
             this.bd_soncode.Condition = null;
             this.bd_soncode.DBTitle = null;
             this.bd_soncode.FormName = null;
-            this.bd_soncode.Location = new System.Drawing.Point(528, 288);
+            this.bd_soncode.Location = new System.Drawing.Point(591, 282);
             this.bd_soncode.Margin = new System.Windows.Forms.Padding(2);
             this.bd_soncode.Name = "bd_soncode";
             this.bd_soncode.Power = null;
@@ -681,11 +797,11 @@
             this.mbp_part1,
             this.DeleteCom,
             this.mbp_id});
-            this.mbp_partdgv.Location = new System.Drawing.Point(458, 325);
+            this.mbp_partdgv.Location = new System.Drawing.Point(502, 325);
             this.mbp_partdgv.Margin = new System.Windows.Forms.Padding(2);
             this.mbp_partdgv.Name = "mbp_partdgv";
             this.mbp_partdgv.RowTemplate.Height = 27;
-            this.mbp_partdgv.Size = new System.Drawing.Size(262, 152);
+            this.mbp_partdgv.Size = new System.Drawing.Size(218, 152);
             this.mbp_partdgv.TabIndex = 121;
             this.mbp_partdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbp_partdgv_CellContentClick);
             // 
@@ -722,11 +838,11 @@
             this.mbl_loc1,
             this.DeletePos,
             this.mbl_id});
-            this.mbl_locdgv.Location = new System.Drawing.Point(166, 325);
+            this.mbl_locdgv.Location = new System.Drawing.Point(262, 325);
             this.mbl_locdgv.Margin = new System.Windows.Forms.Padding(2);
             this.mbl_locdgv.Name = "mbl_locdgv";
             this.mbl_locdgv.RowTemplate.Height = 27;
-            this.mbl_locdgv.Size = new System.Drawing.Size(262, 152);
+            this.mbl_locdgv.Size = new System.Drawing.Size(236, 152);
             this.mbl_locdgv.TabIndex = 120;
             this.mbl_locdgv.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.mbl_locdgv_CellContentClick);
             // 
@@ -775,7 +891,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.GetSNCode.BackColor = System.Drawing.Color.White;
             this.GetSNCode.ID = null;
-            this.GetSNCode.Location = new System.Drawing.Point(244, 534);
+            this.GetSNCode.Location = new System.Drawing.Point(419, 533);
             this.GetSNCode.Name = "GetSNCode";
             this.GetSNCode.Power = null;
             this.GetSNCode.Size = new System.Drawing.Size(188, 21);
@@ -793,7 +909,7 @@
             this.NewRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.DownImage")));
             this.NewRepairInf.Image = null;
             this.NewRepairInf.IsShowBorder = true;
-            this.NewRepairInf.Location = new System.Drawing.Point(292, 493);
+            this.NewRepairInf.Location = new System.Drawing.Point(376, 493);
             this.NewRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.MoveImage")));
             this.NewRepairInf.Name = "NewRepairInf";
             this.NewRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewRepairInf.NormalImage")));
@@ -831,15 +947,15 @@
             this.DeleteRepairInf.DownImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.DownImage")));
             this.DeleteRepairInf.Image = null;
             this.DeleteRepairInf.IsShowBorder = true;
-            this.DeleteRepairInf.Location = new System.Drawing.Point(421, 493);
+            this.DeleteRepairInf.Location = new System.Drawing.Point(478, 493);
             this.DeleteRepairInf.MoveImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.MoveImage")));
             this.DeleteRepairInf.Name = "DeleteRepairInf";
             this.DeleteRepairInf.NormalImage = ((System.Drawing.Image)(resources.GetObject("DeleteRepairInf.NormalImage")));
             this.DeleteRepairInf.Power = null;
-            this.DeleteRepairInf.Size = new System.Drawing.Size(57, 24);
+            this.DeleteRepairInf.Size = new System.Drawing.Size(107, 24);
             this.DeleteRepairInf.TabIndex = 110;
             this.DeleteRepairInf.Tag = "IfRead";
-            this.DeleteRepairInf.Text = "删除";
+            this.DeleteRepairInf.Text = "删除不良原因";
             this.DeleteRepairInf.UseVisualStyleBackColor = true;
             this.DeleteRepairInf.Click += new System.EventHandler(this.DeleteRepairInf_Click);
             // 
@@ -850,7 +966,7 @@
             | System.Windows.Forms.AnchorStyles.Left)));
             this.mbl_loc.BackColor = System.Drawing.Color.White;
             this.mbl_loc.ID = null;
-            this.mbl_loc.Location = new System.Drawing.Point(262, 289);
+            this.mbl_loc.Location = new System.Drawing.Point(330, 280);
             this.mbl_loc.Name = "mbl_loc";
             this.mbl_loc.Power = null;
             this.mbl_loc.Size = new System.Drawing.Size(122, 21);
@@ -933,7 +1049,7 @@
             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(164, 493);
+            this.NewBadCode.Location = new System.Drawing.Point(274, 493);
             this.NewBadCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.MoveImage")));
             this.NewBadCode.Name = "NewBadCode";
             this.NewBadCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewBadCode.NormalImage")));
@@ -953,7 +1069,7 @@
             this.SaveBadLocation.Enabled = false;
             this.SaveBadLocation.Image = null;
             this.SaveBadLocation.IsShowBorder = true;
-            this.SaveBadLocation.Location = new System.Drawing.Point(385, 287);
+            this.SaveBadLocation.Location = new System.Drawing.Point(458, 280);
             this.SaveBadLocation.MoveImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.MoveImage")));
             this.SaveBadLocation.Name = "SaveBadLocation";
             this.SaveBadLocation.NormalImage = ((System.Drawing.Image)(resources.GetObject("SaveBadLocation.NormalImage")));
@@ -970,6 +1086,12 @@
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(900, 579);
+            this.Controls.Add(this.Filter);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.badgroup);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.WaitRejectList);
+            this.Controls.Add(this.normalButton1);
             this.Controls.Add(this.mbc_component);
             this.Controls.Add(this.mbr_dutycode);
             this.Controls.Add(this.so_code);
@@ -1019,12 +1141,13 @@
             this.SizeChanged += new System.EventHandler(this.Make_Repair_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.LocationSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.ComponentSource)).EndInit();
-            this.groupBoxWithBorder1.ResumeLayout(true);
+            ((System.ComponentModel.ISupportInitialize)(this.BadInfo)).EndInit();
+            this.groupBoxWithBorder1.ResumeLayout(false);
             this.groupBoxWithBorder1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.mbp_partdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.mbl_locdgv)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.RefreshTreeView)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -1095,5 +1218,17 @@
         private System.Windows.Forms.Label so_code;
         private System.Windows.Forms.Label mbr_dutycode;
         private CustomControl.ComBoxWithFocus.ComBoxWithFocus mbc_component;
+        private CustomControl.ButtonUtil.NormalButton normalButton1;
+        private CustomControl.TextBoxWithIcon.TextBoxWithPlaceHolder Filter;
+        private System.Windows.Forms.Label label1;
+        private CustomControl.ComBoxWithFocus.ComBoxWithFocus badgroup;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ListView WaitRejectList;
+        private System.Windows.Forms.ColumnHeader columnHeader5;
+        private System.Windows.Forms.ColumnHeader bg_code1;
+        private System.Windows.Forms.ColumnHeader bg_name1;
+        private System.Windows.Forms.ColumnHeader bc_code1;
+        private System.Windows.Forms.ColumnHeader bc_name1;
+        private System.Windows.Forms.BindingSource BadInfo;
     }
 }

+ 191 - 8
UAS_MES_WEIP/FunctionCode/Make/Make_Repair.cs

@@ -9,6 +9,7 @@ using UAS_MES_NEW.CustomControl.DataGrid_View;
 using UAS_MES_NEW.CustomControl.TextBoxWithIcon;
 using UAS_MES_NEW.DataOperate;
 using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.Properties;
 using UAS_MES_NEW.PublicMethod;
 
 namespace UAS_MES_NEW.Make
@@ -458,13 +459,23 @@ namespace UAS_MES_NEW.Make
                         BadInf_2.Add(mbr_id, dic1);
                     tnode_0.Nodes.Add(tnode_1);
                 }
+
+            }
+            if (BadCodeTree.Nodes.Count > 0)
+            {
+                BadCodeTree.SelectedNode = BadCodeTree.Nodes[0];
+                BadCodeTree_NodeMouseClick(this, new TreeNodeMouseClickEventArgs(BadCodeTree.SelectedNode,MouseButtons.Left,1,0,0));
             }
+
             try
             {
                 if (bg_code.Text != "")
                     BadCodeTree.Nodes[bg_code.Text].Expand();
             }
             catch (Exception) { }
+
+            LoadBadcodeGroup();
+
         }
 
         private void RefreshTreeView_Click(object sender, EventArgs e)
@@ -501,14 +512,14 @@ namespace UAS_MES_NEW.Make
                 return;
             }
             //如果岗位资源对应工序的版面不为空的时候
-            if (dh.getFieldDataByCondition("makeserial left join step on ms_stepcode=st_code", "st_table", "ms_id='" + msid + "'").ToString() != "")
-            {
-                if (!dh.CheckExist("makebadrsloc", "mbl_mbrid='" + mbr_id + "' and mbl_makecode='" + ms_makecode.Text + "' and mbl_sncode='" + GetSNCode.Text + "' "))
-                {
-                    OperatResult.AppendText(">>工序存在版面必须维护不良位置\n", Color.Red);
-                    return;
-                }
-            }
+            //if (dh.getFieldDataByCondition("makeserial left join step on ms_stepcode=st_code", "st_table", "ms_id='" + msid + "'").ToString() != "")
+            //{
+            //    if (!dh.CheckExist("makebadrsloc", "mbl_mbrid='" + mbr_id + "' and mbl_makecode='" + ms_makecode.Text + "' and mbl_sncode='" + GetSNCode.Text + "' "))
+            //    {
+            //        OperatResult.AppendText(">>工序存在版面必须维护不良位置\n", Color.Red);
+            //        return;
+            //    }
+            //}
             //查询拆解的物料
             sql.Clear();
             sql.Append("select distinct cm_soncode from craftmaterial where cm_sncode in (select '" + firstsn + "' from dual union ");
@@ -580,6 +591,7 @@ namespace UAS_MES_NEW.Make
                     BaseUtil.CleanForm(this);
                     BadCodeTree.Nodes.Clear();
                     GetSNCode.Clear();
+                    GetSNCode.Focus();
                 }
             }
         }
@@ -938,5 +950,176 @@ namespace UAS_MES_NEW.Make
             if (so_code.Text == "" || (so_code.Text != "" && so_code.Text != so_name.Value))
                 so_code.Text = so_name.Value;
         }
+
+        private void normalButton1_Click(object sender, EventArgs e)
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select ms_makecode from makeserial where ms_id='" + msid + "' and ms_sncode='" + GetSNCode.Text + "' and ms_status=3", "select");
+            if (dt.Rows.Count > 0)
+            {
+                if (mb_id != "")
+                {
+
+                    string delete1 = "delete from makebadrsloc where mbl_mbrid in (select mbr_id from makebadreason where mbr_mbid = '"+ mb_id + "' )";
+                    string delete2 = "delete from makebadrspart where mbp_mbrid in (select mbr_id from makebadreason where mbr_mbid = '" + mb_id + "' )";
+                    string delete3 = "delete from makebadrscom where mbc_mbrid in (select mbr_id from makebadreason where mbr_mbid = '" + mb_id + "' )";
+                    string delete4 = "delete from makebadreason where mbr_mbid='" + mb_id + "'";
+                    string delete = "delete from makebad where mb_id = '" + mb_id + "'";
+                    dh.ExecuteSQLTran(delete1, delete2, delete3, delete4, delete);
+                    OperatResult.AppendText(">>删除成功\n", Color.Green);
+                    BaseUtil.CleanControlsText(bc_name, bc_code, bg_name, bg_code, mb_badremark, nrg_name, nrg_code, nr_name, nr_code, so_name, so_code, mbr_dutyname, mbr_dutycode, mbc_component);
+                    mbp_partdgv.DataSource = null;
+                    mbl_locdgv.DataSource = null;
+                    mb_id = "";
+                    //删除后重新加载Tree的信息
+                    LoadBadInfTree(sender, e);
+                }
+                else OperatResult.AppendText(">>必须选择不良现象\n", Color.Red);
+            }
+            else OperatResult.AppendText(">>" + GetSNCode.Text + "序列号错误,不存在或者不处于维修状态\n", Color.Red);
+        }
+
+
+        private void LoadBadcodeGroup()
+        {
+            string pr_code = dh.getFieldDataByCondition("makeserial", "ms_prodcode", "ms_sncode='" + ms_sncode.Text + "' and ms_makecode='" + macode + "'").ToString();
+            sql.Clear();
+            sql.Append("select bg_code,bg_name from product left join productkind  on pr_kind =pk_name ");
+            sql.Append("left join productbadgroup on pb_kindcode= pk_code left join badgroup on ");
+            sql.Append("bg_code=pb_badgroup  where pr_code='" + pr_code + "' and nvl(pb_kindcode,'')<>'' and bg_statuscode='AUDITED' order by case when bg_code='" + Settings.Default.DefaultBadGroup + "' then 0 else 1 end");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            //如果未查询到数据则获取全部的不良组别
+            if (dt.Rows.Count == 0)
+            {
+                sql.Clear();
+                sql.Append("select bg_code,bg_name from badgroup where bg_statuscode='AUDITED' order by case when bg_code='" + Settings.Default.DefaultBadGroup + "' then 0 else 1 end");
+                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+                badgroup.DataSource = dt;
+                badgroup.DisplayMember = "bg_name";
+                badgroup.ValueMember = "bg_code";
+                LoadBadCodeListView();
+            }
+            else
+            {
+                badgroup.DataSource = dt;
+                badgroup.DisplayMember = "bg_name";
+                badgroup.ValueMember = "bg_code";
+                LoadBadCodeListView();
+            }
+        }
+
+        /// <summary>
+        /// 加载不良代码的ListView的信息
+        /// </summary>
+        private void LoadBadCodeListView()
+        {
+            string bg_id = badgroup.SelectedValue.ToString();
+            sql.Clear();
+            sql.Append("select bg_code,bg_name,bc_code,bc_name,bc_note from badgroupdetail left join badgroup on bgd_bgid=bg_id ");
+            sql.Append("left join badcode on bgd_badcode=bc_code where bg_code='" + ((bg_id != "" && bg_id != "System.Data.DataRowView") ? bg_id.ToString() : "") + "' and bg_code is not null ");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            BadInfo.DataSource = dt;
+            //往listview中添加数据
+            WaitRejectList.Items.Clear();
+            WaitRejectList.BeginUpdate();
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                ListViewItem lvi = new ListViewItem();
+                //第一列是勾选列,设置列头文本为空
+                lvi.Text = "";
+                for (int j = 0; j < dt.Columns.Count; j++)
+                    lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                WaitRejectList.Items.Add(lvi);
+            }
+            WaitRejectList.EndUpdate();
+
+
+        }
+
+        private void badgroup_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            if (badgroup.SelectedValue.ToString() != "System.Data.DataRowView")
+            {
+                Settings.Default.DefaultBadGroup = badgroup.SelectedValue.ToString();
+                Settings.Default.Save();
+            }
+            LoadBadCodeListView();
+        }
+
+        private void Filter_UserControlTextChanged(object sender, EventArgs e)
+        {
+            try
+            {
+                DataRow[] dr = (BadInfo.DataSource as DataTable).Select(" bc_code like '%" + Filter.Text + "%'");
+                DataTable dt = (BadInfo.DataSource as DataTable).Clone();
+                for (int i = 0; i < dr.Length; i++)
+                {
+                    dt.Rows.Add(dr[i].ItemArray);
+                }
+                WaitRejectList.Items.Clear();
+                WaitRejectList.BeginUpdate();
+                for (int i = 0; i < dt.Rows.Count; i++)
+                {
+                    ListViewItem lvi = new ListViewItem();
+                    //第一列是勾选列,设置列头文本为空
+                    lvi.Text = "";
+
+                    for (int j = 0; j < dt.Columns.Count; j++)
+                        lvi.SubItems.Add(dt.Rows[i][j].ToString());
+                    WaitRejectList.Items.Add(lvi);
+                }
+                WaitRejectList.EndUpdate();
+            }
+            catch (Exception)
+            {
+
+            }
+        }
+
+
+        private void Filter_UserControlOnKeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                if (WaitRejectList.Items.Count == 1)
+                {
+                    int RejectCount = WaitRejectList.Items.Count;
+                    string[] bccode = new string[RejectCount];
+                    string[] bgcode = new string[RejectCount];
+                    string[] id = new string[RejectCount];
+                    string ErrorMessage = "";
+                    if (WaitRejectList.Items.Count == 0)
+                    {
+                        MessageBox.Show("不良品必须选择不良原因和不良代码!");
+                        return;
+                    }
+                    else
+                    {
+                        //用户未填写不良代码一切按照正常逻辑,填写了从index=1开始执行
+                        for (int i = 0; i < RejectCount; i++)
+                        {
+                            bgcode[i] = WaitRejectList.Items[i].SubItems[1].Text;
+                            //获取所有的不良代码
+                            bccode[i] = WaitRejectList.Items[i].SubItems[3].Text;
+                            //获取所有的不良备注
+                            id[i] = dh.GetSEQ("MakeBad_seq");
+                        }
+                    }
+                    sql.Clear();
+                    sql.Append("insert when (not exists(select 1 from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + macode + "' and  ");
+                    sql.Append("mb_status=0 and mb_badcode=:bc_code)) then into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,");
+                    sql.Append("mb_indate,mb_stepcode,mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status)");
+                    sql.Append("select DISTINCT :id,ma_code,ms_code,ms_sncode,'" + User.UserCode + "',sysdate,'" + User.CurrentStepCode + "',ms_sourcecode,:bd_code,:bg_code,'',");
+                    sql.Append("'0' from make left join makeSerial on ms_makecode=ma_code left join stepProduct on ");
+                    sql.Append("sp_mothercode=ma_prodcode and sp_stepcode=ms_nextstepcode and ms_craftcode = sp_craftcode  where ms_sncode='" + ms_sncode.Text + "' and ms_makecode = '" + macode + "'");
+                    dh.BatchInsert(sql.GetString(), new string[] { "bc_code", "id", "bd_code", "bg_code" }, bccode, id, bccode, bgcode);
+                    OperatResult.AppendText(">>不良插入成功\n", Color.Green);
+                    LoadBadInfTree(sender, e);
+                }
+                else
+                {
+                    OperatResult.AppendText(">>不良代码不存在或存在多个\n", Color.Red);
+                }
+            }
+        }
     }
 }

+ 41 - 0
UAS_MES_WEIP/FunctionCode/Make/Make_Repair.resx

@@ -123,7 +123,48 @@
   <metadata name="ComponentSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>190, 17</value>
   </metadata>
+  <metadata name="BadInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>352, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="normalButton1.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="normalButton1.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="normalButton1.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="RepairComplete.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m

+ 2 - 2
UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.Designer.cs

@@ -350,7 +350,7 @@
             this.mcd_inqty_label.Name = "mcd_inqty_label";
             this.mcd_inqty_label.Size = new System.Drawing.Size(74, 21);
             this.mcd_inqty_label.TabIndex = 14;
-            this.mcd_inqty_label.Text = "采集数";
+            this.mcd_inqty_label.Text = "采集数";
             // 
             // mc_restqty_label
             // 
@@ -360,7 +360,7 @@
             this.mc_restqty_label.Name = "mc_restqty_label";
             this.mc_restqty_label.Size = new System.Drawing.Size(74, 21);
             this.mc_restqty_label.TabIndex = 17;
-            this.mc_restqty_label.Text = "待采集数";
+            this.mc_restqty_label.Text = "良品采集";
             // 
             // panel1
             // 

+ 160 - 6
UAS_MES_WEIP/FunctionCode/Make/Make_TestCollection.cs

@@ -336,11 +336,163 @@ namespace UAS_MES_NEW.Make
             {
                 LoadBadCodeListView();
                 LoadChoosedBadListView();
-                OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
-                bc_code.Focus();
-                //勾选了自动产生代码
-                if (AutoBadCode.Checked)
-                    Save_Click(new object(), new EventArgs());
+                //OperateResult.AppendText(">>请采集不良代码\n", Color.Green);
+                //bc_code.Focus();
+                ////勾选了自动产生代码
+                //if (AutoBadCode.Checked)
+                //    Save_Click(new object(), new EventArgs());
+                if (ms_sncode.Text == "")
+                {
+                    OperateResult.AppendText(">>序列号不允许为空\n", Color.Red);
+                    return;
+                }
+                if (GoodProduct.Checked)
+                    ms_code_KeyDown_one(this, new KeyEventArgs(Keys.Enter));
+                else if (Reject.Checked)
+                {
+                    if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out ErrorMessage))
+                    {
+                        //判断界面工单是否为空时的序列号是否自动归属工单
+                        string oStatus = "";
+                        if (!LogicHandler.GetMakeInfo(ms_sncode.Text, out oMakeCode, out oStatus, out ErrorMessage))
+                        {
+                            if (ma_code.Text == "")
+                            {
+                                OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                                return;
+                            }
+                        }
+                        if (LogicHandler.CheckStepSNAndMacode(ma_code.Text == "" ? oMakeCode : ma_code.Text, User.UserSourceCode, ms_sncode.Text, User.UserCode, out oMakeCode, out oMSID, out ErrorMessage))
+                        {
+                            dt = (DataTable)dh.ExecuteSql("select ma_code,ma_prodcode,ma_softversion,pr_spec,ma_qty from make left join product on ma_prodcode=pr_code where ma_code='" + oMakeCode + "'", "select");
+                            if (dt.Rows.Count > 0)
+                            {
+                                BaseUtil.SetFormValue(this.Controls, dt);
+                                LockMakeCode.Checked = true;
+                            }
+                        }
+                        else
+                        {
+                            OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                            return;
+                        }
+                    }
+                    else
+                    {
+                        OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, ms_sncode);
+                        return;
+                    }
+                    //int RejectCount = ChoosedRejectList.Items.Count;
+                    //string[] bccode = new string[RejectCount];
+                    //string[] bcremark = new string[RejectCount];
+                    //string[] bgcode = new string[RejectCount];
+                    //string[] bgname = new string[RejectCount];
+                    //string[] bcname = new string[RejectCount];
+                    //if (AutoBadCode.Checked)
+                    //{
+                    //    string defaultvalue = Properties.Settings.Default.DefaultCollectionValue;
+                    //    bccode = new string[] { defaultvalue };
+                    //    bcremark = new string[] { defaultvalue };
+                    //    bgcode = new string[] { defaultvalue };
+                    //    bgname = new string[] { defaultvalue };
+                    //    bcname = new string[] { defaultvalue };
+                    //}
+                    //else
+                    //{
+                    //    if (ChoosedRejectList.Items.Count == 0)
+                    //    {
+                    //        OperateResult.AppendText(">>不良品必须选择不良原因和不良代码!\n", Color.Red);
+                    //        return;
+                    //    }
+                    //    else
+                    //    {
+                    //        for (int i = 0; i < RejectCount; i++)
+                    //        {
+                    //            //获取不良代码组
+                    //            bgcode[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[0];
+                    //            //获取不良代码组名称
+                    //            bgname[i] = ChoosedRejectList.Items[i].SubItems[1].Text.Split(':')[1];
+                    //            //获取所有的不良代码
+                    //            bccode[i] = ChoosedRejectList.Items[i].SubItems[2].Text;
+                    //            //获取不良名称
+                    //            bcname[i] = ChoosedRejectList.Items[i].SubItems[3].Text;
+                    //            //获取所有的不良备注
+                    //            bcremark[i] = bc_remark.Text;
+                    //        }
+                    //    }
+                    //}
+                    //如果之前是良品的
+                    dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_status", "ms_checkno" }, "ms_id='" + oMSID + "' and ms_stepcode='" + User.CurrentStepCode + "'");
+                    if (dt.Rows.Count > 0)
+                    {
+                        string status = dt.Rows[0]["ms_status"].ToString();
+                        if (status == "1" || status == "2")
+                        {
+                            dh.UpdateByCondition("steppassed", "sp_result='不良品',sp_ifng=-1,sp_ymd=to_char(sysdate,'yyyymmdd'),sp_hm=to_char(sysdate,'hh24miss')", "sp_id=(select max(sp_id) from steppassed where sp_sncode='" + ms_sncode.Text + "')");
+                            dh.UpdateByCondition("makecraftdetail", "mcd_okqty=mcd_okqty-1", "mcd_macode='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'");
+                            dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_badtimes=nvl(ms_badtimes,0)+1", "ms_id='" + oMSID + "'");
+                            LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "良品采集成不良", "测试不良", User.UserCode);
+                            LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "测试不良", "良品采集成不良", ms_sncode.Text, ob_checkno.Text);
+                        }
+                        string checkno = dt.Rows[0]["ms_checkno"].ToString();
+                        //存在抽检批次更新为空
+                        if (checkno != "")
+                            dh.UpdateByCondition("makeserial", "ms_checkno=''", "ms_id='" + oMSID + "'");
+                    }
+                    else
+                    {
+                        LogicHandler.InsertMakeProcess(ms_sncode.Text, ma_code.Text, User.UserSourceCode, "采集成不良", "测试不良", User.UserCode);
+                        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "采集成不良", "测试不良", ms_sncode.Text, ob_checkno.Text);
+                    }
+                    //不良信息采集,mb_status<>0的是之前维修保存的,不能删除
+                    dh.ExecuteSql("delete from makebad where mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and nvl(mb_status,0)=0", "delete");
+                    if (LogicHandler.SetTestNGDetail(ms_sncode.Text, ma_code.Text, User.UserCode, User.UserSourceCode, "检查未通过", out ErrorMessage))
+                    {
+                        ////存在的不良代码和
+                        //dt = (DataTable)dh.ExecuteSql("select sr_badcode from STEPRETURN where sr_stepcode='" + User.CurrentStepCode + "'", "select");
+                        //if (dt.Rows.Count > 0)
+                        //{
+                        //    int BadCodeInStep = 0;
+                        //    string badname = "";
+                        //    for (int i = 0; i < dt.Rows.Count; i++)
+                        //    {
+                        //        for (int j = 0; j < bccode.Length; j++)
+                        //        {
+                        //            if (dt.Rows[i]["sr_badcode"].ToString() == bccode[j])
+                        //            {
+                        //                badname += "[" + bcname[j] + "]";
+                        //                BadCodeInStep += 1;
+                        //            }
+                        //        }
+                        //    }
+                        //    //选中的不良代码必须全在工序默认的不良代码中才通过判断
+                        //    if (BadCodeInStep == bccode.Length)
+                        //    {
+                        //        dh.UpdateByCondition("makebad", "mb_status=-1", "mb_sncode='" + ms_sncode.Text + "' and mb_makecode='" + ma_code.Text + "' and mb_stepcode='" + User.CurrentStepCode + "'");
+                        //        dh.UpdateByCondition("makeserial", "ms_stepcode='',ms_status=1,ms_nextstepcode='" + User.CurrentStepCode + "'", "ms_id='" + oMSID + "'");
+                        //        LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "快速维修成功", "快速维修", "", ob_checkno.Text);
+                        //        OperateResult.AppendText(">>本次采集不良代码" + badname + "存在于本工序" + User.CurrentStepCode + "中,请解除故障后重新测试本站\n", Color.Black);
+                        //    }
+                        //    else OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                        //}
+                        //else
+                        OperateResult.AppendText(">>" + ms_sncode.Text + "成功采集为不良\n", Color.Green);
+                        LastSncode = ms_sncode.Text;
+                        //采集完不良,聚焦序列号
+                        ms_sncode.Focus();
+                        //记录操作日志
+                        ms_sncode.Text = "";
+                        //清除不良信息
+                        bc_code.Text = "";
+                        ChoosedRejectList.Items.Clear();
+                        LoadCollectedNum();
+                        WaitList.Clear();
+                        ChoosedList.Clear();
+                    }
+                    else OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red);
+                }
+
+
             }
             else if (GoodProduct.Checked)
             {
@@ -409,7 +561,9 @@ namespace UAS_MES_NEW.Make
 
         private void LoadCollectedNum()
         {
-            dt = (DataTable)dh.ExecuteSql("select mcd_inqty,ma_qty-mcd_inqty mcd_remainqty from make left join makecraftdetail on mcd_macode=ma_code where ma_code='" + ma_code.Text + "' and mcd_stepcode='" + User.CurrentStepCode + "'", "select");
+            dt = (DataTable)dh.ExecuteSql("select mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode) mcd_inqty,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode)-nvl(count(distinct B.ms_sncode),0) mcd_remainqty from MAKECRAFTdetail left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '"+ ma_code.Text + "' and mcd_stepcode  =  '"+ User.CurrentStepCode + "' group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc", "select");
+
+
             BaseUtil.SetFormValue(Controls, dt);
         }
 

File diff suppressed because it is too large
+ 310 - 691
UAS_MES_WEIP/FunctionCode/Query/Query_MakeInf.Designer.cs


+ 3 - 14
UAS_MES_WEIP/FunctionCode/Query/Query_MakeInf.cs

@@ -85,7 +85,6 @@ namespace UAS_MES_NEW.Query
                     rangeafter = dt.Rows[0]["aftersn_qty"].ToString();
                     BaseUtil.SetFormValue(this.Controls, dt);
                 }
-                rangesn_qty.Text = rangebefore + "/" + rangeafter;
                 sql.Clear();
                 sql.Append("select count(1) beforesn_qty from makesnlist where msl_makecode='" + MakeCode.Text + "' and msl_type='before'");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
@@ -102,25 +101,15 @@ namespace UAS_MES_NEW.Query
                     rangeafter = dt.Rows[0]["aftersn_qty"].ToString();
                     BaseUtil.SetFormValue(this.Controls, dt);
                 }
-                importsn_qty.Text = rangebefore + "/" + rangeafter;
-                //获取SN关联信息
-                Mac_Num.Text = dh.getFieldDataByCondition("Makeaddresslist", "count(1)", "mal_makecode='" + MakeCode.Text + "' and mal_mac is not null").ToString();
-                BT_Num.Text = dh.getFieldDataByCondition("Makeaddresslist", "count(1)", "mal_makecode='" + MakeCode.Text + "' and mal_bt is not null").ToString();
-                IMEI_Num.Text = dh.getFieldDataByCondition("Makeimeilist", "count(1)", "mil_makecode='" + MakeCode.Text + "' and mil_imei1 is not null").ToString();
                 sql.Clear();
-                sql.Append("select * from StepProduct left join product on pr_code=sp_soncode where sp_bomversion='" + ma_bomversion + "' and sp_mothercode='" + ma_prodcode + "' and sp_craftcode='" + ma_craftcode + "'");
+                sql.Append("select mcd_detno,mcd_stepcode,mcd_stepname,nvl(count(distinct A.ms_sncode),0) n,nvl(count(distinct B.ms_sncode),0) bn,(select nvl(count(distinct sp_sncode),0) from STEPPASSED where SP_MAKECODE = mcd_macode AND SP_STEPCODE = mcd_stepcode) inqty from MAKECRAFTdetail ");
+                sql.Append("left join makeserial A on mcd_macode = A.ms_makecode and mcd_stepcode = ");
+                sql.Append("A.ms_nextstepcode AND A.MS_STATUS = 1 LEFT JOIN MAKESERIAL B ON mcd_macode = B.ms_makecode AND MCD_STEPCODE = B.MS_STEPCODE AND B.MS_STATUS = 3 where mcd_macode = '"+ MakeCode.Text + "'  group by mcd_macode,mcd_detno, mcd_stepcode, mcd_stepname order by mcd_detno asc");
                 dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {
                     BaseUtil.FillDgvWithDataTable(BOM, dt);
                 }
-                sql.Clear();
-                sql.Append("select * from label where la_prodcode='" + ma_prodcode + "'");
-                dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
-                if (dt.Rows.Count > 0)
-                {
-                    BaseUtil.FillDgvWithDataTable(Label, dt);
-                }
                 LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, MakeCode.Text, User.UserLineCode, User.UserSourceCode, "查询工单综合信息", "查询成功", "", "");
             }
             else MessageBox.Show("工单号不存在");

+ 18 - 72
UAS_MES_WEIP/FunctionCode/Query/Query_MakeInf.resx

@@ -117,6 +117,24 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="mcd_detno.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mcd_stepcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="mcd_stepname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="n.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="bn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="inqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="CD_STEPNO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
@@ -189,78 +207,6 @@
   <metadata name="CD_TABLE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="SP_MOTHERCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_SONCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_STEPCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_REPCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_TYPE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_DESCRIPTION.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_DETNO.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_PREFIX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_TRACEKIND.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_LENGTH.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_ONEUSEQTY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_UPDATEMAN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="SP_UPDATEDATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_CODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_NAME.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_STATUS.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_INDATE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_INMAN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_PRINTNOS.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_URL.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_ISDEFAULT.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_TEMPLATETYPE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_SOFTTYPE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="LA_PRODCODE.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="Search.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 3 - 0
UAS_MES_WEIP/Properties/Settings.settings

@@ -33,5 +33,8 @@
     <Setting Name="SMTBIND" Type="System.Boolean" Scope="User">
       <Value Profile="(Default)">True</Value>
     </Setting>
+    <Setting Name="DefaultBadGroup" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
   </Settings>
 </SettingsFile>

+ 157 - 0
UAS_MES_WEIP/Properties/Settings1.Designer.cs

@@ -0,0 +1,157 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
+//
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace UAS_MES_NEW.Properties {
+    
+    
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
+        
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+        
+        public static Settings Default {
+            get {
+                return defaultInstance;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("优软科技MES")]
+        public string ProjectName {
+            get {
+                return ((string)(this["ProjectName"]));
+            }
+            set {
+                this["ProjectName"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string LastLoginUser {
+            get {
+                return ((string)(this["LastLoginUser"]));
+            }
+            set {
+                this["LastLoginUser"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string LastLoginSob {
+            get {
+                return ((string)(this["LastLoginSob"]));
+            }
+            set {
+                this["LastLoginSob"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string LastLoginResource {
+            get {
+                return ((string)(this["LastLoginResource"]));
+            }
+            set {
+                this["LastLoginResource"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("DefaultValue")]
+        public string DefaultCollectionValue {
+            get {
+                return ((string)(this["DefaultCollectionValue"]));
+            }
+            set {
+                this["DefaultCollectionValue"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string PortName {
+            get {
+                return ((string)(this["PortName"]));
+            }
+            set {
+                this["PortName"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string BaudRate {
+            get {
+                return ((string)(this["BaudRate"]));
+            }
+            set {
+                this["BaudRate"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("\\\\172.16.66.51\\lable")]
+        public string FTPAddress {
+            get {
+                return ((string)(this["FTPAddress"]));
+            }
+            set {
+                this["FTPAddress"] = value;
+            }
+        }
+        
+        [global::System.Configuration.ApplicationScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=MES;Pooling=false" +
+            ";Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=\r\n192.168.1" +
+            ".105)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
+        public string MES {
+            get {
+                return ((string)(this["MES"]));
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
+        public bool SMTBIND {
+            get {
+                return ((bool)(this["SMTBIND"]));
+            }
+            set {
+                this["SMTBIND"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string DefaultBadGroup {
+            get {
+                return ((string)(this["DefaultBadGroup"]));
+            }
+            set {
+                this["DefaultBadGroup"] = value;
+            }
+        }
+    }
+}

+ 82 - 1
UAS_MES_WEIP/PublicMethod/LogicHandler.cs

@@ -783,7 +783,88 @@ namespace UAS_MES_NEW.PublicMethod
                 dh.ExecuteSql("delete from oqcbatchdetail where obd_sncode='" + iSnCode + "'", "delete");
             }
             //删除SMT版绑定关系
-            dh.ExecuteSql("delete from smtbind where sb_barcode = '"+iSnCode+"' and sb_makecode = '"+ iMakeCode + "'", "delete");
+           // dh.ExecuteSql("delete from smtbind where sb_barcode = '"+iSnCode+"' and sb_makecode = '"+ iMakeCode + "'", "delete");
+            //之前保存的不良就不再调用
+            DataTable dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_stepcode", "nvl(ms_ifrework,0)ms_ifrework", "ms_status" }, "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
+            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.ExecuteSql("delete from steppassed where sp_sncode='" + iSnCode + "' and sp_makecode='" + iMakeCode + "' and sp_stepcode='" + StepCode + "'", "delete");
+                    dh.UpdateByCondition("make", "ma_madeqty=nvl(ma_madeqty,0)-1", "ma_code='" + iMakeCode + "'");
+                }
+                if (ms_stepcode == StepCode)
+                {
+                    if (ifrework == "0")
+                        dh.UpdateByCondition("makeserial", "ms_status=3,ms_nextstepcode=''", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
+                    else
+                        dh.UpdateByCondition("makeserial", "ms_reworkstatus=3,ms_nextstepcode=''", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
+                }
+                else
+                {
+                    if (ifrework == "0")
+                        dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_status=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "' ");
+                    else
+                        dh.UpdateByCondition("makeserial", "ms_nextstepcode='',ms_paststep = ms_paststep ||'," + StepCode + "',ms_reworkstatus=3", "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
+                    SetTestResult(iMakeCode, iSourceCode, iSnCode, "不良采集", "NG", iUserCode, out oErrorMessage);
+                }
+            }
+            return true;
+        }
+
+        /// <summary>
+        /// 执行不良信息采集无不良现象
+        /// </summary>
+        /// <param name="iSnCode"></param>
+        /// <param name="iMakeCode"></param>
+        /// <param name="iUserCode"></param>
+        /// <param name="iSourceCode"></param>
+        /// <param name="iBadCode"></param>
+        /// <param name="iBadRemark"></param>
+        /// <param name="oErrorMessage"></param>
+        /// <returns></returns>
+        public static bool SetTestNGDetail(string iSnCode, string iMakeCode, string iUserCode, string iSourceCode, string iResult, out string oErrorMessage)
+        {
+            oErrorMessage = "";
+            string StepCode = "";
+            string StepName = "";
+            string ScanType = "";
+            string LineCode = "";
+            if (iResult == "" || iResult == null)
+                iResult = "检查未通过";
+            GetStepCodeAndNameAndTypAndLineCodeBySource(iSourceCode, ref StepCode, ref StepName, ref ScanType, ref LineCode);
+            if (ScanType == "REJUDGE")
+            {
+                AutoPassJudge(iSnCode, iMakeCode, iSourceCode, "", LineCode, "", "-1");
+            }
+            //sql.Clear();
+            //sql.Append("insert into makebad(mb_id,mb_makecode,mb_mscode,mb_sncode,mb_inman,mb_indate,mb_stepcode");
+            //sql.Append(",mb_sourcecode,mb_badcode,mb_bgcode,mb_badtable,mb_status,mb_badremark,mb_bgname,mb_badname)");
+            //sql.Append("select makebad_seq.nextval,ma_code,ms_code,ms_sncode,'" + iUserCode + "',sysdate,'" + StepCode + "','" + iSourceCode + "',:bc_code,:bg_code,'',");
+            //sql.Append("'0',:bc_remark,:bg_name,:bc_name from make left join makeSerial on ms_makecode=ma_code  ");
+            //sql.Append(" where ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
+            //if (iBadGroupCode.Length > 0)
+            //{
+            //    dh.BatchInsert(sql.ToString(), new string[] { "bc_code", "bg_code", "bc_remark", "bg_name", "bc_name" }, iBadCode, iBadGroupCode, iBadRemark, iBadGroupName, iBadName);
+            //}
+            //更新序列号已经采集的工序 ms_paststep 已采集数据,更新下一工序
+            //如果存在送检批号则进行删除
+            if (dh.CheckExist("oqcbatchdetail", "obd_sncode='" + iSnCode + "'"))
+            {
+                string checkno = dh.getFieldDataByCondition("oqcbatchdetail", "obd_checkno", "obd_sncode='" + iSnCode + "'").ToString();
+                string ifng = dh.getFieldDataByCondition("oqcbatchdetail", "obd_ifng", "obd_sncode='" + iSnCode + "'").ToString();
+                if (ifng == "-1")
+                {
+                    dh.ExecuteSql("delete OQCITEMSAMPLES where ois_sncode = '" + iSnCode + "'", "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='" + iSnCode + "'", "delete");
+            }
+            //删除SMT版绑定关系
+            // dh.ExecuteSql("delete from smtbind where sb_barcode = '"+iSnCode+"' and sb_makecode = '"+ iMakeCode + "'", "delete");
             //之前保存的不良就不再调用
             DataTable dt = dh.getFieldsDataByCondition("makeserial", new string[] { "ms_stepcode", "nvl(ms_ifrework,0)ms_ifrework", "ms_status" }, "ms_sncode='" + iSnCode + "' and ms_makecode='" + iMakeCode + "'");
             if (dt.Rows.Count > 0)

+ 1 - 1
UAS_MES_WEIP/UAS_MES_WEIP.csproj

@@ -1083,7 +1083,7 @@
       <DesignTime>True</DesignTime>
       <DependentUpon>Resources.resx</DependentUpon>
     </Compile>
-    <Compile Include="Properties\Settings.Designer.cs">
+    <Compile Include="Properties\Settings1.Designer.cs">
       <AutoGen>True</AutoGen>
       <DesignTimeSharedInput>True</DesignTimeSharedInput>
       <DependentUpon>Settings.settings</DependentUpon>

Some files were not shown because too many files changed in this diff