Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

章政 8 years ago
parent
commit
ed15d0b21f

+ 178 - 134
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.Designer.cs

@@ -45,7 +45,7 @@
             this.pa_status = new System.Windows.Forms.Label();
             this.Cancel = new System.Windows.Forms.CheckBox();
             this.pr_packrule = new System.Windows.Forms.Label();
-            this.pa_salecode = new System.Windows.Forms.Label();
+            this.pa_custcode = new System.Windows.Forms.Label();
             this.pd_makecode = new System.Windows.Forms.Label();
             this.pd_prodcode = new System.Windows.Forms.Label();
             this.pd_salecode = new System.Windows.Forms.Label();
@@ -62,7 +62,7 @@
             this.Printlab = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ReleasePallet = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.NewPallet = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.pa_custcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pa_salecode = 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();
@@ -70,6 +70,11 @@
             this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.pa_makecode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.PalletPreFix_label = new System.Windows.Forms.Label();
+            this.PalletPreFix = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.OutBoxLength_label = new System.Windows.Forms.Label();
+            this.OutBoxLength = new UAS_MES.CustomControl.TextBoxWithIcon.SnCollectionBox();
+            this.StepCount = new UAS_MES.CustomControl.TextBoxWithIcon.SourceStepCount();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -77,10 +82,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(4, 34);
-            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(3, 45);
             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 = "大箱号";
             // 
@@ -88,10 +92,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(389, 96);
-            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(292, 77);
             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 = "已装数量";
             // 
@@ -99,10 +102,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(389, 34);
-            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode_label.Location = new System.Drawing.Point(292, 45);
             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 = "制造单号";
             // 
@@ -112,10 +114,9 @@
             this.AutoPrint.Checked = true;
             this.AutoPrint.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoPrint.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoPrint.Location = new System.Drawing.Point(1004, 216);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoPrint.Location = new System.Drawing.Point(753, 159);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(154, 31);
+            this.AutoPrint.Size = new System.Drawing.Size(125, 25);
             this.AutoPrint.TabIndex = 153;
             this.AutoPrint.Text = "满箱自动打印";
             this.AutoPrint.UseVisualStyleBackColor = true;
@@ -124,10 +125,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(992, 161);
-            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_restqty_label.Location = new System.Drawing.Point(744, 115);
             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 = "打印张数";
             // 
@@ -135,21 +135,19 @@
             // 
             this.pa_custcode_label.AutoSize = true;
             this.pa_custcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode_label.Location = new System.Drawing.Point(1000, 34);
-            this.pa_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_custcode_label.Location = new System.Drawing.Point(750, 45);
             this.pa_custcode_label.Name = "pa_custcode_label";
-            this.pa_custcode_label.Size = new System.Drawing.Size(52, 27);
+            this.pa_custcode_label.Size = new System.Drawing.Size(42, 21);
             this.pa_custcode_label.TabIndex = 157;
-            this.pa_custcode_label.Text = "客户";
+            this.pa_custcode_label.Text = "合同";
             // 
             // outboxcode_label
             // 
             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(952, 348);
-            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.outboxcode_label.Location = new System.Drawing.Point(714, 264);
             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 = "箱号";
             // 
@@ -157,10 +155,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, 34);
-            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(482, 45);
             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 = "产品编号";
             // 
@@ -168,10 +165,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1120, 96);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(840, 77);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(183, 23);
+            this.PrintLabel.Size = new System.Drawing.Size(138, 20);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -179,10 +176,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(1000, 96);
-            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintLabel_label.Location = new System.Drawing.Point(750, 77);
             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 = "标签文件";
             // 
@@ -190,10 +186,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, 96);
-            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrinterList_label.Location = new System.Drawing.Point(482, 77);
             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 = "打印机列表";
             // 
@@ -201,10 +196,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(4, 96);
-            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(3, 77);
             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 = "大箱容量";
             // 
@@ -212,10 +206,9 @@
             // 
             this.AutoOutBoxCode.AutoSize = true;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(259, 34);
-            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(3, 14);
             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 = 179;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -224,10 +217,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(1231, 220);
-            this.pa_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_status.Location = new System.Drawing.Point(923, 162);
             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 = 180;
             this.pa_status.Visible = false;
             // 
@@ -235,10 +227,9 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 10F);
-            this.Cancel.Location = new System.Drawing.Point(1203, 346);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.Cancel.Location = new System.Drawing.Point(902, 263);
             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 = 182;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
@@ -246,50 +237,45 @@
             // pr_packrule
             // 
             this.pr_packrule.AutoSize = true;
-            this.pr_packrule.Location = new System.Drawing.Point(997, 640);
-            this.pr_packrule.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_packrule.Location = new System.Drawing.Point(748, 498);
             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 = 183;
             this.pr_packrule.Visible = false;
             // 
-            // pa_salecode
+            // pa_custcode
             // 
-            this.pa_salecode.AutoSize = true;
-            this.pa_salecode.Location = new System.Drawing.Point(1236, 640);
-            this.pa_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 15);
-            this.pa_salecode.TabIndex = 184;
-            this.pa_salecode.Visible = false;
+            this.pa_custcode.AutoSize = true;
+            this.pa_custcode.Location = new System.Drawing.Point(927, 498);
+            this.pa_custcode.Name = "pa_custcode";
+            this.pa_custcode.Size = new System.Drawing.Size(0, 12);
+            this.pa_custcode.TabIndex = 184;
+            this.pa_custcode.Visible = false;
             // 
             // pd_makecode
             // 
             this.pd_makecode.AutoSize = true;
-            this.pd_makecode.Location = new System.Drawing.Point(973, 400);
-            this.pd_makecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_makecode.Location = new System.Drawing.Point(730, 306);
             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 = 185;
             this.pd_makecode.Visible = false;
             // 
             // pd_prodcode
             // 
             this.pd_prodcode.AutoSize = true;
-            this.pd_prodcode.Location = new System.Drawing.Point(1105, 399);
-            this.pd_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_prodcode.Location = new System.Drawing.Point(829, 305);
             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 = 186;
             this.pd_prodcode.Visible = false;
             // 
             // pd_salecode
             // 
             this.pd_salecode.AutoSize = true;
-            this.pd_salecode.Location = new System.Drawing.Point(1236, 398);
-            this.pd_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pd_salecode.Location = new System.Drawing.Point(927, 304);
             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 = 187;
             this.pd_salecode.Visible = false;
             // 
@@ -298,11 +284,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(107, 96);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.pa_standardqty.Location = new System.Drawing.Point(80, 77);
+            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(141, 25);
+            this.pa_standardqty.Size = new System.Drawing.Size(107, 21);
             this.pa_standardqty.Str = null;
             this.pa_standardqty.Str1 = null;
             this.pa_standardqty.Str2 = null;
@@ -315,11 +301,10 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1117, 166);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintNum.Location = new System.Drawing.Point(838, 119);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(188, 25);
+            this.PrintNum.Size = new System.Drawing.Size(142, 21);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -332,13 +317,12 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = null;
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(1213, 280);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4);
+            this.Packing.Location = new System.Drawing.Point(910, 210);
             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;
@@ -349,20 +333,19 @@
             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(498, 96);
-            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, 77);
+            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 = 177;
             this.pa_totalqty.Tag = "1";
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(789, 96);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
+            this.PrinterList.Location = new System.Drawing.Point(592, 77);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(171, 25);
+            this.PrinterList.Size = new System.Drawing.Size(128, 20);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -370,11 +353,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(783, 34);
-            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(587, 45);
+            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);
@@ -386,13 +368,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = null;
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1105, 640);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(829, 498);
             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;
@@ -401,10 +382,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, 398);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(715, 304);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(368, 234);
+            this.OperateResult.Size = new System.Drawing.Size(277, 188);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -413,11 +393,10 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1027, 348);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.outboxcode.Location = new System.Drawing.Point(770, 264);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(145, 25);
+            this.outboxcode.Size = new System.Drawing.Size(110, 21);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -430,11 +409,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(107, 36);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_outboxcode.Location = new System.Drawing.Point(80, 47);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(140, 25);
+            this.pa_outboxcode.Size = new System.Drawing.Size(106, 21);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -449,13 +427,12 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = null;
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(1114, 280);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
+            this.Printlab.Location = new System.Drawing.Point(836, 210);
             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;
@@ -468,13 +445,12 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = null;
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(1004, 280);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
+            this.ReleasePallet.Location = new System.Drawing.Point(753, 210);
             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;
@@ -487,31 +463,29 @@
             this.NewPallet.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.DownImage")));
             this.NewPallet.Image = null;
             this.NewPallet.IsShowBorder = true;
-            this.NewPallet.Location = new System.Drawing.Point(1236, 12);
-            this.NewPallet.Margin = new System.Windows.Forms.Padding(4);
+            this.NewPallet.Location = new System.Drawing.Point(918, 15);
             this.NewPallet.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.MoveImage")));
             this.NewPallet.Name = "NewPallet";
             this.NewPallet.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPallet.NormalImage")));
             this.NewPallet.Power = "ifread";
-            this.NewPallet.Size = new System.Drawing.Size(80, 30);
+            this.NewPallet.Size = new System.Drawing.Size(60, 24);
             this.NewPallet.TabIndex = 159;
             this.NewPallet.Text = "新增大箱";
             this.NewPallet.UseVisualStyleBackColor = true;
             this.NewPallet.Visible = false;
             this.NewPallet.Click += new System.EventHandler(this.NewPallet_Click);
             // 
-            // pa_custcode
+            // pa_salecode
             // 
-            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(1123, 34);
-            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.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
-            this.pa_custcode.TabIndex = 158;
-            this.pa_custcode.Tag = "1";
+            this.pa_salecode.AutoSize = true;
+            this.pa_salecode.CutLength = null;
+            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(842, 45);
+            this.pa_salecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_salecode.Name = "pa_salecode";
+            this.pa_salecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_salecode.TabIndex = 158;
+            this.pa_salecode.Tag = "1";
             // 
             // PackageInf
             // 
@@ -524,11 +498,10 @@
             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, 115);
             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
@@ -572,24 +545,91 @@
             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(498, 34);
-            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, 45);
+            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";
             // 
+            // PalletPreFix_label
+            // 
+            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(187, 15);
+            this.PalletPreFix_label.Name = "PalletPreFix_label";
+            this.PalletPreFix_label.Size = new System.Drawing.Size(37, 20);
+            this.PalletPreFix_label.TabIndex = 200;
+            this.PalletPreFix_label.Text = "前缀";
+            // 
+            // PalletPreFix
+            // 
+            this.PalletPreFix.AllPower = null;
+            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(225, 14);
+            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(38, 23);
+            this.PalletPreFix.Str = null;
+            this.PalletPreFix.Str1 = null;
+            this.PalletPreFix.Str2 = null;
+            this.PalletPreFix.TabIndex = 199;
+            // 
+            // 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(97, 15);
+            this.OutBoxLength_label.Name = "OutBoxLength_label";
+            this.OutBoxLength_label.Size = new System.Drawing.Size(37, 20);
+            this.OutBoxLength_label.TabIndex = 198;
+            this.OutBoxLength_label.Text = "长度";
+            // 
+            // OutBoxLength
+            // 
+            this.OutBoxLength.AllPower = null;
+            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(139, 14);
+            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(38, 23);
+            this.OutBoxLength.Str = null;
+            this.OutBoxLength.Str1 = null;
+            this.OutBoxLength.Str2 = null;
+            this.OutBoxLength.TabIndex = 197;
+            // 
+            // StepCount
+            // 
+            this.StepCount.LineCode = null;
+            this.StepCount.Location = new System.Drawing.Point(481, 13);
+            this.StepCount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.StepCount.Name = "StepCount";
+            this.StepCount.Size = new System.Drawing.Size(88, 22);
+            this.StepCount.Source = null;
+            this.StepCount.StepCode = null;
+            this.StepCount.TabIndex = 201;
+            // 
             // Make_BigBoxCollection
             // 
-            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, 543);
+            this.Controls.Add(this.StepCount);
+            this.Controls.Add(this.PalletPreFix_label);
+            this.Controls.Add(this.PalletPreFix);
+            this.Controls.Add(this.OutBoxLength_label);
+            this.Controls.Add(this.OutBoxLength);
             this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.pd_salecode);
             this.Controls.Add(this.pd_prodcode);
             this.Controls.Add(this.pd_makecode);
-            this.Controls.Add(this.pa_salecode);
+            this.Controls.Add(this.pa_custcode);
             this.Controls.Add(this.pr_packrule);
             this.Controls.Add(this.Cancel);
             this.Controls.Add(this.PrintNum);
@@ -612,7 +652,7 @@
             this.Controls.Add(this.Printlab);
             this.Controls.Add(this.ReleasePallet);
             this.Controls.Add(this.NewPallet);
-            this.Controls.Add(this.pa_custcode);
+            this.Controls.Add(this.pa_salecode);
             this.Controls.Add(this.pa_custcode_label);
             this.Controls.Add(this.PackageInf);
             this.Controls.Add(this.pa_restqty_label);
@@ -622,7 +662,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_BigBoxCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "栈板采集";
@@ -643,7 +682,7 @@
         private System.Windows.Forms.CheckBox AutoPrint;
         private System.Windows.Forms.Label pa_restqty_label;
         private CustomControl.DataGrid_View.DataGridViewWithSerialNum PackageInf;
-        private CustomControl.ValueLabel.ValueLabel pa_custcode;
+        private CustomControl.ValueLabel.ValueLabel pa_salecode;
         private System.Windows.Forms.Label pa_custcode_label;
         private CustomControl.ButtonUtil.NormalButton NewPallet;
         private CustomControl.ButtonUtil.NormalButton ReleasePallet;
@@ -672,10 +711,15 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
         private System.Windows.Forms.CheckBox Cancel;
         private System.Windows.Forms.Label pr_packrule;
-        private System.Windows.Forms.Label pa_salecode;
+        private System.Windows.Forms.Label pa_custcode;
         private System.Windows.Forms.Label pd_makecode;
         private System.Windows.Forms.Label pd_prodcode;
         private System.Windows.Forms.Label pd_salecode;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_standardqty;
+        private System.Windows.Forms.Label PalletPreFix_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox PalletPreFix;
+        private System.Windows.Forms.Label OutBoxLength_label;
+        private CustomControl.TextBoxWithIcon.SnCollectionBox OutBoxLength;
+        private CustomControl.TextBoxWithIcon.SourceStepCount StepCount;
     }
 }

+ 86 - 16
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -73,6 +73,11 @@ namespace UAS_MES.Make
             BaseUtil.SetFormCenter(stw);
             stw.ShowDialog();
             dh = SystemInf.dh;
+            StepCount.StepCode = User.CurrentStepCode;
+            StepCount.Source = User.UserSourceCode;
+            StepCount.LineCode = User.UserLineCode;
+            StepCount.Dh = dh;
+            StepCount.Start();
         }
 
         private void Clean_Click(object sender, EventArgs e)
@@ -85,6 +90,7 @@ namespace UAS_MES.Make
         {
             if (e.KeyCode == Keys.Enter)
             {
+                LoadGridData();
                 sql.Clear();
                 sql.Append("select pa_id,nvl(pa_standardqty,'0')pa_standardqty,pa_makecode,pa_prodcode,pa_id,pa_packageqty,pa_outboxcode,pa_totalqty,pa_currentqty, ");
                 sql.Append("pa_salecode,pa_custcode from package where pa_outboxcode='" + pa_outboxcode.Text + "'  and pa_type =2");
@@ -92,12 +98,15 @@ namespace UAS_MES.Make
                 if (dt.Rows.Count > 0)
                 {
                     BaseUtil.SetFormValue(Controls, dt);
-                    LoadGridData();
-                    pa_stanqty = int.Parse(dt.Rows[0]["pa_standardqty"].ToString());
                     pa_id = dt.Rows[0]["pa_id"].ToString();
-                    outboxcode.Focus();
                 }
-                else outboxcode.Focus();
+                if (CheckOutBoxLength())
+                {
+                    if (pa_standardqty.Text == "")
+                        pa_standardqty.Focus();
+                    else
+                        outboxcode.Focus();
+                }
             }
         }
 
@@ -224,6 +233,10 @@ namespace UAS_MES.Make
                             OperateResult.AppendText(">>大箱号不能为空\n", Color.Red);
                             return;
                         }
+                        if (!CheckOutBoxLength())
+                        {
+                            return;
+                        }
                         //箱号不存在进行插入
                         DataTable dt = (DataTable)dh.ExecuteSql("select pa_id from  package where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
                         if (dt.Rows.Count == 0)
@@ -233,17 +246,20 @@ namespace UAS_MES.Make
                             sql.Append("insert into package (pa_id,pa_outboxcode,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_standardqty,pa_sccode,pa_currentstep,pa_salecode)values");
                             sql.Append("(" + pa_id + ",'" + pa_outboxcode.Text + "','" + pd_makecode.Text + "',sysdate,'0',2,'" + pd_prodcode.Text + "',0,'','" + pa_standardqty.Text + "','" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + pd_salecode.Text + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");
-                            palletcode_KeyDown(sender, e);
                         }
                         else
                         {
                             pa_id = dt.Rows[0]["pa_id"].ToString();
                         }
+                        palletcode_KeyDown(sender, e);
                         string error;
-                        if (!LogicHandler.CheckPackRule(pr_packrule.Text, pa_outboxcode.Text, outboxcode.Text, pa_makecode.Text, pa_salecode.Text, pa_prodcode.Text, "大箱",out error))
+                        if (int.Parse(pa_totalqty.Text == "" ? "0" : pa_totalqty.Text) > 0)
                         {
-                            OperateResult.AppendText(">>" + error + "\n", Color.Red, outboxcode);
-                            return;
+                            if (!LogicHandler.CheckPackRule(pr_packrule.Text, pa_outboxcode.Text, outboxcode.Text, pa_makecode.Text, pa_custcode.Text, pa_prodcode.Text, "大箱", out error))
+                            {
+                                OperateResult.AppendText(">>" + error + "\n", Color.Red, outboxcode);
+                                return;
+                            }
                         }
                         dt = (DataTable)dh.ExecuteSql("select pa_totalqty,nvl(pa_status,0) pa_status,pa_mothercode from package where pa_outboxcode='" + outboxcode.Text + "' and pa_type=1", "select");
                         //采集的卡通箱号存在
@@ -261,6 +277,10 @@ namespace UAS_MES.Make
                                         OperateResult.AppendText(">>采集箱号" + outboxcode.Text + "后超出容量\n", Color.Red, outboxcode);
                                         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");
+                                    }
                                     //插入大箱明细
                                     List<string> SQLS = new List<string>();
                                     sql.Clear();
@@ -279,24 +299,29 @@ namespace UAS_MES.Make
                                         pa_makecode.Text = carton_macode;
                                         dh.ExecuteSql("update package set pa_makecode='" + carton_macode + "' where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                     }
-                                    LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱采集", "大箱" + pa_outboxcode.Text + "采集卡通箱" + outboxcode.Text + "采集成功", outboxcode.Text, "");
-                                    //记录卡通箱所有序列号操作日志
-                                    if (pa_nextstep != "")
+                                  
+                                    //如果是线内并且下一工序等于当前岗位资源工序
+                                    if (pa_nextstep != "" && pa_nextstep == User.CurrentStepCode)
                                     {
-                                        LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "大箱采集成功,大箱号:" + pa_outboxcode.Text, "大箱采集");
-                                    }
-                                    LoadGridData();
-                                    LoadCollectNum();
+                                        LogicHandler.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "栈板采集成功,栈板号:" + pa_outboxcode.Text, "栈板采集");
+                                    }                
                                     //更新箱号的NextStepCode
                                     if (pa_totalqty.Text == "1")
                                     {
                                         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, pa_makecode.Text, User.UserLineCode, User.UserSourceCode, "大箱采集", "大箱" + pa_outboxcode.Text + "采集卡通箱" + outboxcode.Text + "采集成功", outboxcode.Text, "");
                                     OperateResult.AppendText(">>卡通箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
+                                    LoadCollectNum();
+                                    palletcode_KeyDown(sender, e);
                                     if (pa_standardqty.Text == pa_totalqty.Text)
                                     {
                                         dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+                                        OperateResult.AppendText("大箱" + pa_outboxcode.Text + "已装满,封箱成功");
+                                        pa_outboxcode.Focus();
+                                        pa_outboxcode.SelectAll();
                                         if (AutoPrint.Checked)
                                         {
                                             OperateResult.AppendText(">>箱已装满,自动打印!\n", Color.Green);
@@ -335,7 +360,7 @@ namespace UAS_MES.Make
                                 dh.ExecuteSQLTran(SQLS.ToArray());
                                 OperateResult.AppendText(">>箱号" + outboxcode.Text + "取消采集成功\n", Color.Green);
                                 LoadCollectNum();
-                                LoadGridData();
+                                palletcode_KeyDown(sender, e);
                                 outboxcode.Clear();
                             }
                             else OperateResult.AppendText(">>大箱" + pa_outboxcode.Text + "已入库,不允许取消采集\n", Color.Red);
@@ -355,6 +380,10 @@ namespace UAS_MES.Make
             sql.Append(",pd_makecode,pa_custcode,pa_packageqty from packagedetail left join package on pd_paid=pa_id left ");
             sql.Append("join product on pr_code=pa_prodcode where pa_outboxcode ='" + pa_outboxcode.Text + "' and pa_type=2");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            if (dt.Rows.Count == 0 && dh.CheckExist("package", "pa_outboxcode ='" + pa_outboxcode.Text + "' and pa_type=2"))
+            {
+                dh.ExecuteSql("update package set pa_checkno='',pa_prodcode='',pa_packtype='',pa_salecode='',pa_makecode='',pa_packageqty=0,pa_totalqty=0,pa_currentqty=0,pa_status=0 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
+            }
             BaseUtil.FillDgvWithDataTable(PackageInf, dt);
         }
 
@@ -540,5 +569,46 @@ namespace UAS_MES.Make
                 ResetPackageQTY();
             }
         }
+
+
+        private bool CheckOutBoxLength()
+        {
+            //勾选了检验长度进行校验
+            if (OutBoxLength.Text != "")
+            {
+                try
+                {
+                    int.Parse(OutBoxLength.Text);
+                }
+                catch (Exception)
+                {
+                    MessageBox.Show("请填写正确的箱号长度");
+                    return false;
+                }
+                if (pa_outboxcode.Text.Length != int.Parse(OutBoxLength.Text))
+                {
+                    OperateResult.AppendText(">>箱号长度错误,请重新输入箱号\n", Color.Red);
+                    return false;
+                }
+                else return true;
+            }
+            if (PalletPreFix.Text != "")
+            {
+                try
+                {
+                    if (pa_outboxcode.Text.Substring(0, PalletPreFix.Text.Length) != PalletPreFix.Text)
+                    {
+                        OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                        return false;
+                    }
+                }
+                catch (Exception)
+                {
+                    OperateResult.AppendText(">>箱号前缀不匹配,请重新输入箱号\n", Color.Red);
+                    return false;
+                }
+            }
+            return true;
+        }
     }
 }