Browse Source

修改栈板容量为台数

章政 8 years ago
parent
commit
2a14bf0c82

+ 143 - 114
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.Designer.cs

@@ -51,11 +51,6 @@
             this.NewPallet = 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_standardqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.pa_currentqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
@@ -64,6 +59,11 @@
             this.AutoOutBoxCode = new System.Windows.Forms.CheckBox();
             this.pa_status = new System.Windows.Forms.Label();
             this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            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();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -71,9 +71,10 @@
             // 
             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(3, 27);
+            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.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(58, 21);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(72, 27);
             this.pa_outboxcode_label.TabIndex = 102;
             this.pa_outboxcode_label.Text = "大箱号";
             // 
@@ -81,9 +82,10 @@
             // 
             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(280, 77);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(373, 96);
+            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_totalqty_label.Name = "pa_totalqty_label";
-            this.pa_totalqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_totalqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_totalqty_label.TabIndex = 104;
             this.pa_totalqty_label.Text = "已装数量";
             // 
@@ -91,9 +93,10 @@
             // 
             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(280, 27);
+            this.pa_makecode_label.Location = new System.Drawing.Point(373, 34);
+            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_makecode_label.Size = new System.Drawing.Size(92, 27);
             this.pa_makecode_label.TabIndex = 108;
             this.pa_makecode_label.Text = "制造单号";
             // 
@@ -103,9 +106,10 @@
             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(753, 173);
+            this.AutoPrint.Location = new System.Drawing.Point(1004, 216);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(125, 25);
+            this.AutoPrint.Size = new System.Drawing.Size(154, 31);
             this.AutoPrint.TabIndex = 153;
             this.AutoPrint.Text = "满箱自动打印";
             this.AutoPrint.UseVisualStyleBackColor = true;
@@ -114,9 +118,10 @@
             // 
             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(744, 129);
+            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.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_restqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_restqty_label.TabIndex = 154;
             this.pa_restqty_label.Text = "打印张数";
             // 
@@ -124,9 +129,10 @@
             // 
             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(744, 27);
+            this.pa_custcode_label.Location = new System.Drawing.Point(992, 34);
+            this.pa_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_custcode_label.Name = "pa_custcode_label";
-            this.pa_custcode_label.Size = new System.Drawing.Size(42, 21);
+            this.pa_custcode_label.Size = new System.Drawing.Size(52, 27);
             this.pa_custcode_label.TabIndex = 157;
             this.pa_custcode_label.Text = "客户";
             // 
@@ -134,9 +140,10 @@
             // 
             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(749, 279);
+            this.outboxcode_label.Location = new System.Drawing.Point(999, 349);
+            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(74, 21);
+            this.outboxcode_label.Size = new System.Drawing.Size(92, 27);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "卡通箱号";
             // 
@@ -144,9 +151,10 @@
             // 
             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(468, 27);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(624, 34);
+            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_prodcode_label.Name = "pa_prodcode_label";
-            this.pa_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_prodcode_label.Size = new System.Drawing.Size(92, 27);
             this.pa_prodcode_label.TabIndex = 169;
             this.pa_prodcode_label.Text = "产品编号";
             // 
@@ -154,10 +162,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(838, 81);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(1117, 101);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(147, 20);
+            this.PrintLabel.Size = new System.Drawing.Size(195, 23);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -165,9 +173,10 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(744, 79);
+            this.PrintLabel_label.Location = new System.Drawing.Point(992, 99);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(74, 21);
+            this.PrintLabel_label.Size = new System.Drawing.Size(92, 27);
             this.PrintLabel_label.TabIndex = 174;
             this.PrintLabel_label.Text = "标签文件";
             // 
@@ -175,18 +184,19 @@
             // 
             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(468, 79);
+            this.PrinterList_label.Location = new System.Drawing.Point(624, 99);
+            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrinterList_label.Name = "PrinterList_label";
-            this.PrinterList_label.Size = new System.Drawing.Size(90, 21);
+            this.PrinterList_label.Size = new System.Drawing.Size(112, 27);
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(578, 79);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.PrinterList.Location = new System.Drawing.Point(771, 99);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(146, 20);
+            this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -194,10 +204,11 @@
             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(574, 27);
-            this.pa_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_prodcode.Location = new System.Drawing.Point(765, 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.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 27);
             this.pa_prodcode.TabIndex = 170;
             this.pa_prodcode.Tag = "1";
             this.pa_prodcode.TextChanged += new System.EventHandler(this.pa_prodcode_TextChanged);
@@ -209,12 +220,13 @@
             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(829, 512);
+            this.Clean.Location = new System.Drawing.Point(1105, 640);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             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(60, 24);
+            this.Clean.Size = new System.Drawing.Size(80, 30);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -223,9 +235,10 @@
             // 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(715, 347);
+            this.OperateResult.Location = new System.Drawing.Point(953, 434);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(277, 159);
+            this.OperateResult.Size = new System.Drawing.Size(368, 198);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -234,10 +247,11 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(822, 279);
+            this.outboxcode.Location = new System.Drawing.Point(1096, 349);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(158, 21);
+            this.outboxcode.Size = new System.Drawing.Size(209, 25);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -250,10 +264,11 @@
             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(83, 29);
+            this.pa_outboxcode.Location = new System.Drawing.Point(111, 36);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(106, 21);
+            this.pa_outboxcode.Size = new System.Drawing.Size(140, 25);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -268,12 +283,13 @@
             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(830, 224);
+            this.Printlab.Location = new System.Drawing.Point(1107, 280);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             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, 24);
+            this.Printlab.Size = new System.Drawing.Size(80, 30);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -286,12 +302,13 @@
             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(753, 224);
+            this.ReleasePallet.Location = new System.Drawing.Point(1004, 280);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             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(60, 24);
+            this.ReleasePallet.Size = new System.Drawing.Size(80, 30);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除大箱";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -304,12 +321,13 @@
             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(927, 10);
+            this.NewPallet.Location = new System.Drawing.Point(1236, 12);
+            this.NewPallet.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             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(60, 24);
+            this.NewPallet.Size = new System.Drawing.Size(80, 30);
             this.NewPallet.TabIndex = 159;
             this.NewPallet.Text = "新增大箱";
             this.NewPallet.UseVisualStyleBackColor = true;
@@ -321,10 +339,11 @@
             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(838, 27);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_custcode.Location = new System.Drawing.Point(1117, 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, 21);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -339,57 +358,23 @@
             this.Column4,
             this.Column5});
             this.PackageInf.EnableContentClick = true;
-            this.PackageInf.Location = new System.Drawing.Point(3, 129);
+            this.PackageInf.Location = new System.Drawing.Point(4, 161);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(706, 415);
+            this.PackageInf.Size = new System.Drawing.Size(941, 519);
             this.PackageInf.TabIndex = 156;
             // 
-            // pd_outboxcode
-            // 
-            this.pd_outboxcode.DataPropertyName = "code";
-            this.pd_outboxcode.HeaderText = "卡通箱号";
-            this.pd_outboxcode.Name = "pd_outboxcode";
-            this.pd_outboxcode.ReadOnly = true;
-            // 
-            // pd_innerqty
-            // 
-            this.pd_innerqty.DataPropertyName = "pd_innerqty";
-            this.pd_innerqty.HeaderText = "数量";
-            this.pd_innerqty.Name = "pd_innerqty";
-            this.pd_innerqty.ReadOnly = true;
-            // 
-            // Column3
-            // 
-            this.Column3.DataPropertyName = "pa_prodcode";
-            this.Column3.HeaderText = "产品编号";
-            this.Column3.Name = "Column3";
-            this.Column3.ReadOnly = true;
-            // 
-            // Column4
-            // 
-            this.Column4.DataPropertyName = "pa_makecode";
-            this.Column4.HeaderText = "工单号";
-            this.Column4.Name = "Column4";
-            this.Column4.ReadOnly = true;
-            // 
-            // Column5
-            // 
-            this.Column5.DataPropertyName = "pa_custcode";
-            this.Column5.HeaderText = "客户";
-            this.Column5.MinimumWidth = 100;
-            this.Column5.Name = "Column5";
-            this.Column5.ReadOnly = true;
-            // 
             // 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(375, 27);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(500, 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.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
@@ -398,10 +383,11 @@
             this.pa_standardqty.AutoSize = true;
             this.pa_standardqty.CutLength = null;
             this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_standardqty.Location = new System.Drawing.Point(83, 77);
-            this.pa_standardqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_standardqty.Location = new System.Drawing.Point(111, 96);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_standardqty.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_standardqty.Name = "pa_standardqty";
-            this.pa_standardqty.Size = new System.Drawing.Size(0, 21);
+            this.pa_standardqty.Size = new System.Drawing.Size(0, 27);
             this.pa_standardqty.TabIndex = 105;
             this.pa_standardqty.Tag = "1";
             // 
@@ -410,10 +396,11 @@
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.CutLength = null;
             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(375, 79);
-            this.pa_currentqty.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_currentqty.Location = new System.Drawing.Point(500, 99);
+            this.pa_currentqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_currentqty.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_currentqty.Name = "pa_currentqty";
-            this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 27);
             this.pa_currentqty.TabIndex = 177;
             this.pa_currentqty.Tag = "1";
             // 
@@ -421,9 +408,10 @@
             // 
             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(3, 77);
+            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.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "大箱容量";
             // 
@@ -434,12 +422,13 @@
             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(910, 224);
+            this.Packing.Location = new System.Drawing.Point(1213, 280);
+            this.Packing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             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(60, 24);
+            this.Packing.Size = new System.Drawing.Size(80, 30);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封大箱";
             this.Packing.UseVisualStyleBackColor = true;
@@ -449,9 +438,10 @@
             // 
             this.AutoOutBoxCode.AutoSize = true;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(194, 26);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(259, 32);
+            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(93, 25);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(114, 31);
             this.AutoOutBoxCode.TabIndex = 179;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -460,9 +450,10 @@
             // 
             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(923, 176);
+            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.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 21);
+            this.pa_status.Size = new System.Drawing.Size(0, 27);
             this.pa_status.TabIndex = 180;
             this.pa_status.Visible = false;
             // 
@@ -472,20 +463,57 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(838, 133);
+            this.PrintNum.Location = new System.Drawing.Point(1117, 166);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(142, 21);
+            this.PrintNum.Size = new System.Drawing.Size(188, 25);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
             this.PrintNum.TabIndex = 181;
             // 
+            // pd_outboxcode
+            // 
+            this.pd_outboxcode.DataPropertyName = "code";
+            this.pd_outboxcode.HeaderText = "卡通箱号";
+            this.pd_outboxcode.Name = "pd_outboxcode";
+            this.pd_outboxcode.ReadOnly = true;
+            // 
+            // pd_innerqty
+            // 
+            this.pd_innerqty.DataPropertyName = "pd_innerqty";
+            this.pd_innerqty.HeaderText = "数量";
+            this.pd_innerqty.Name = "pd_innerqty";
+            this.pd_innerqty.ReadOnly = true;
+            // 
+            // Column3
+            // 
+            this.Column3.DataPropertyName = "pd_prodcode";
+            this.Column3.HeaderText = "产品编号";
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            // 
+            // Column4
+            // 
+            this.Column4.DataPropertyName = "pd_makecode";
+            this.Column4.HeaderText = "工单号";
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            // 
+            // Column5
+            // 
+            this.Column5.DataPropertyName = "pa_custcode";
+            this.Column5.HeaderText = "客户";
+            this.Column5.MinimumWidth = 100;
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            // 
             // Make_BigBoxCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(997, 552);
+            this.ClientSize = new System.Drawing.Size(1329, 690);
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.pa_status);
             this.Controls.Add(this.AutoOutBoxCode);
@@ -517,6 +545,7 @@
             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, 4, 4, 4);
             this.Name = "Make_BigBoxCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "栈板采集";
@@ -524,7 +553,7 @@
             this.Load += new System.EventHandler(this.栈板称重_Load);
             this.SizeChanged += new System.EventHandler(this.栈板称重_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).EndInit();
-            this.ResumeLayout(true);
+            this.ResumeLayout(false);
             this.PerformLayout();
 
         }
@@ -557,13 +586,13 @@
         private CustomControl.ValueLabel.ValueLabel pa_currentqty;
         private System.Windows.Forms.Label pa_packageqty_label;
         private CustomControl.ButtonUtil.NormalButton Packing;
+        private System.Windows.Forms.CheckBox AutoOutBoxCode;
+        private System.Windows.Forms.Label pa_status;
+        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_outboxcode;
         private System.Windows.Forms.DataGridViewTextBoxColumn pd_innerqty;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
-        private System.Windows.Forms.CheckBox AutoOutBoxCode;
-        private System.Windows.Forms.Label pa_status;
-        private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
     }
 }

+ 5 - 4
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.cs

@@ -151,7 +151,7 @@ namespace UAS_MES.Make
                         if (pa_nextstep == "")
                         {
                             //判断线外,必须已完工并且未入库
-                            dt = (DataTable)dh.ExecuteSql("select wm_concat(ms_sncode) from mes_package_view  left join makeserial on v_barcode=ms_sncode where  v_outboxcode='" + outboxcode.Text + "' and ms_status<>2", "select");
+                            dt = (DataTable)dh.ExecuteSql("select wm_concat(ms_sncode) from mes_package_view  left join makeserial on v_barcode=ms_sncode and ms_sncode=v_barcode where  v_outboxcode='" + outboxcode.Text + "' and ms_status<>2", "select");
                             if (dt.Rows[0][0].ToString() == "")
                             {
                                 //判断箱未入库
@@ -220,11 +220,12 @@ namespace UAS_MES.Make
             }
         }
 
+
         private void LoadGridData()
         {
             sql.Clear();
-            sql.Append("select pa_prodcode,nvl(pd_barcode,PD_INNERBOXCODE) code ,pd_innerqty,pa_salecode");
-            sql.Append(",pa_makecode,pa_custcode,pa_packageqty from packagedetail left join package on pd_paid=pa_id left ");
+            sql.Append("select pd_prodcode,nvl(pd_barcode,PD_INNERBOXCODE) code ,pd_innerqty,pa_salecode");
+            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");
             BaseUtil.FillDgvWithDataTable(PackageInf, dt);
@@ -249,7 +250,7 @@ namespace UAS_MES.Make
                         sql.Clear();
                         sql.Append("insert into packagedetail(pd_id, pd_paid, pd_outboxcode,pd_innerboxcode, pd_innerqty,pd_makecode,pd_prodcode,pd_builddate)");
                         sql.Append("select packagedetail_seq.nextval,'" + pa_id + "','" + pa_outboxcode.Text + "','" + outboxcode.Text + "'");
-                        sql.Append(",pa_packageqty,'" + pa_makecode.Text + "','" + pa_prodcode.Text + "',sysdate from package where pa_outboxcode='" + outboxcode.Text + "'");
+                        sql.Append(",pa_packageqty,pa_makecode,'" + pa_prodcode.Text + "',sysdate from package where pa_outboxcode='" + outboxcode.Text + "'");
                         dh.ExecuteSql(sql.GetString(), "insert");
                         //箱内计数+1
                         dh.UpdateByCondition("package", "PA_CURRENTQTY=PA_CURRENTQTY+1,PA_PACKAGEQTY=PA_PACKAGEQTY+1,PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + pa_outboxcode.Text + "')", "pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=2");

+ 124 - 94
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -44,7 +44,6 @@
             this.pa_status = new System.Windows.Forms.Label();
             this.AutoPrint = new System.Windows.Forms.CheckBox();
             this.Packing = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.pa_standardqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PrinterList = new UAS_MES.CustomControl.ComBoxWithFocus.PrinterCombox();
             this.pa_prodcode = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.Clean = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -62,8 +61,9 @@
             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_currentqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
+            this.pa_totalqty = new UAS_MES.CustomControl.ValueLabel.ValueLabel();
             this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pa_standardqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -71,9 +71,10 @@
             // 
             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(8, 27);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(11, 34);
+            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_outboxcode_label.Name = "pa_outboxcode_label";
-            this.pa_outboxcode_label.Size = new System.Drawing.Size(58, 21);
+            this.pa_outboxcode_label.Size = new System.Drawing.Size(72, 27);
             this.pa_outboxcode_label.TabIndex = 102;
             this.pa_outboxcode_label.Text = "栈板号";
             // 
@@ -81,9 +82,10 @@
             // 
             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(288, 77);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(384, 96);
+            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_totalqty_label.Name = "pa_totalqty_label";
-            this.pa_totalqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_totalqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_totalqty_label.TabIndex = 104;
             this.pa_totalqty_label.Text = "已装数量";
             // 
@@ -91,9 +93,10 @@
             // 
             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(288, 27);
+            this.pa_makecode_label.Location = new System.Drawing.Point(384, 34);
+            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_makecode_label.Name = "pa_makecode_label";
-            this.pa_makecode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_makecode_label.Size = new System.Drawing.Size(92, 27);
             this.pa_makecode_label.TabIndex = 108;
             this.pa_makecode_label.Text = "制造单号";
             // 
@@ -101,9 +104,10 @@
             // 
             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(746, 129);
+            this.pa_restqty_label.Location = new System.Drawing.Point(995, 161);
+            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_restqty_label.Name = "pa_restqty_label";
-            this.pa_restqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_restqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_restqty_label.TabIndex = 154;
             this.pa_restqty_label.Text = "打印张数";
             // 
@@ -111,9 +115,10 @@
             // 
             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(746, 27);
+            this.pa_custcode_label.Location = new System.Drawing.Point(995, 34);
+            this.pa_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_custcode_label.Name = "pa_custcode_label";
-            this.pa_custcode_label.Size = new System.Drawing.Size(42, 21);
+            this.pa_custcode_label.Size = new System.Drawing.Size(52, 27);
             this.pa_custcode_label.TabIndex = 157;
             this.pa_custcode_label.Text = "客户";
             // 
@@ -121,9 +126,10 @@
             // 
             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(736, 259);
+            this.outboxcode_label.Location = new System.Drawing.Point(981, 324);
+            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(42, 21);
+            this.outboxcode_label.Size = new System.Drawing.Size(52, 27);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "箱号";
             // 
@@ -131,9 +137,10 @@
             // 
             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(474, 27);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(632, 34);
+            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_prodcode_label.Name = "pa_prodcode_label";
-            this.pa_prodcode_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_prodcode_label.Size = new System.Drawing.Size(92, 27);
             this.pa_prodcode_label.TabIndex = 169;
             this.pa_prodcode_label.Text = "产品编号";
             // 
@@ -141,10 +148,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(839, 81);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(1119, 101);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(147, 20);
+            this.PrintLabel.Size = new System.Drawing.Size(195, 23);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -152,9 +159,10 @@
             // 
             this.PrintLabel_label.AutoSize = true;
             this.PrintLabel_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrintLabel_label.Location = new System.Drawing.Point(746, 79);
+            this.PrintLabel_label.Location = new System.Drawing.Point(995, 99);
+            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrintLabel_label.Name = "PrintLabel_label";
-            this.PrintLabel_label.Size = new System.Drawing.Size(74, 21);
+            this.PrintLabel_label.Size = new System.Drawing.Size(92, 27);
             this.PrintLabel_label.TabIndex = 174;
             this.PrintLabel_label.Text = "标签文件";
             // 
@@ -162,9 +170,10 @@
             // 
             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(474, 79);
+            this.PrinterList_label.Location = new System.Drawing.Point(632, 99);
+            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.PrinterList_label.Name = "PrinterList_label";
-            this.PrinterList_label.Size = new System.Drawing.Size(90, 21);
+            this.PrinterList_label.Size = new System.Drawing.Size(112, 27);
             this.PrinterList_label.TabIndex = 173;
             this.PrinterList_label.Text = "打印机列表";
             // 
@@ -172,21 +181,21 @@
             // 
             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(8, 77);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(11, 96);
+            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.pa_packageqty_label.Name = "pa_packageqty_label";
-            this.pa_packageqty_label.Size = new System.Drawing.Size(74, 21);
+            this.pa_packageqty_label.Size = new System.Drawing.Size(92, 27);
             this.pa_packageqty_label.TabIndex = 176;
             this.pa_packageqty_label.Text = "栈板容量";
             // 
             // AutoOutBoxCode
             // 
             this.AutoOutBoxCode.AutoSize = true;
-            this.AutoOutBoxCode.Checked = true;
-            this.AutoOutBoxCode.CheckState = System.Windows.Forms.CheckState.Checked;
             this.AutoOutBoxCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.AutoOutBoxCode.Location = new System.Drawing.Point(196, 27);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(261, 34);
+            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(93, 25);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(114, 31);
             this.AutoOutBoxCode.TabIndex = 180;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -195,9 +204,10 @@
             // 
             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(868, 174);
+            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.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 21);
+            this.pa_status.Size = new System.Drawing.Size(0, 27);
             this.pa_status.TabIndex = 181;
             this.pa_status.Visible = false;
             // 
@@ -207,9 +217,10 @@
             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(749, 168);
+            this.AutoPrint.Location = new System.Drawing.Point(999, 210);
+            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(93, 25);
+            this.AutoPrint.Size = new System.Drawing.Size(114, 31);
             this.AutoPrint.TabIndex = 182;
             this.AutoPrint.Text = "自动打印";
             this.AutoPrint.UseVisualStyleBackColor = true;
@@ -221,35 +232,24 @@
             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(902, 202);
+            this.Packing.Location = new System.Drawing.Point(1203, 252);
+            this.Packing.Margin = new System.Windows.Forms.Padding(4);
             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(56, 24);
+            this.Packing.Size = new System.Drawing.Size(75, 30);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封栈板";
             this.Packing.UseVisualStyleBackColor = true;
             this.Packing.Click += new System.EventHandler(this.Packing_Click);
             // 
-            // pa_standardqty
-            // 
-            this.pa_standardqty.AutoSize = true;
-            this.pa_standardqty.CutLength = null;
-            this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_standardqty.Location = new System.Drawing.Point(85, 77);
-            this.pa_standardqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pa_standardqty.Name = "pa_standardqty";
-            this.pa_standardqty.Size = new System.Drawing.Size(0, 21);
-            this.pa_standardqty.TabIndex = 177;
-            this.pa_standardqty.Tag = "1";
-            // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(577, 79);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
+            this.PrinterList.Location = new System.Drawing.Point(769, 99);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(146, 20);
+            this.PrinterList.Size = new System.Drawing.Size(195, 25);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -257,10 +257,11 @@
             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(572, 27);
-            this.pa_prodcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_prodcode.Location = new System.Drawing.Point(763, 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.Name = "pa_prodcode";
-            this.pa_prodcode.Size = new System.Drawing.Size(0, 21);
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 27);
             this.pa_prodcode.TabIndex = 170;
             this.pa_prodcode.Tag = "1";
             this.pa_prodcode.TextChanged += new System.EventHandler(this.pa_prodcode_TextChanged);
@@ -272,12 +273,13 @@
             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(829, 510);
+            this.Clean.Location = new System.Drawing.Point(1105, 638);
+            this.Clean.Margin = new System.Windows.Forms.Padding(4);
             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(60, 24);
+            this.Clean.Size = new System.Drawing.Size(80, 30);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -286,9 +288,10 @@
             // 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(715, 327);
+            this.OperateResult.Location = new System.Drawing.Point(953, 409);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(277, 177);
+            this.OperateResult.Size = new System.Drawing.Size(368, 220);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -297,10 +300,11 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(796, 259);
+            this.outboxcode.Location = new System.Drawing.Point(1061, 324);
+            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(156, 21);
+            this.outboxcode.Size = new System.Drawing.Size(207, 25);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -313,10 +317,11 @@
             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(85, 29);
+            this.pa_outboxcode.Location = new System.Drawing.Point(113, 36);
+            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(107, 21);
+            this.pa_outboxcode.Size = new System.Drawing.Size(141, 25);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -331,12 +336,13 @@
             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(820, 202);
+            this.Printlab.Location = new System.Drawing.Point(1093, 252);
+            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
             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(56, 24);
+            this.Printlab.Size = new System.Drawing.Size(75, 30);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -349,12 +355,13 @@
             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(740, 202);
+            this.ReleasePallet.Location = new System.Drawing.Point(987, 252);
+            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
             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(56, 24);
+            this.ReleasePallet.Size = new System.Drawing.Size(75, 30);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除栈板";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -367,12 +374,13 @@
             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(916, 10);
+            this.NewPalletCode.Location = new System.Drawing.Point(1221, 12);
+            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4);
             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(60, 24);
+            this.NewPalletCode.Size = new System.Drawing.Size(80, 30);
             this.NewPalletCode.TabIndex = 159;
             this.NewPalletCode.Text = "新增栈板";
             this.NewPalletCode.UseVisualStyleBackColor = true;
@@ -384,10 +392,11 @@
             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(839, 27);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_custcode.Location = new System.Drawing.Point(1119, 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, 21);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -402,10 +411,11 @@
             this.Column4,
             this.Column5});
             this.PackageInf.EnableContentClick = true;
-            this.PackageInf.Location = new System.Drawing.Point(3, 129);
+            this.PackageInf.Location = new System.Drawing.Point(4, 161);
+            this.PackageInf.Margin = new System.Windows.Forms.Padding(4);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(706, 415);
+            this.PackageInf.Size = new System.Drawing.Size(941, 519);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
@@ -449,24 +459,26 @@
             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(372, 27);
-            this.pa_makecode.MaximumSize = new System.Drawing.Size(150, 0);
+            this.pa_makecode.Location = new System.Drawing.Point(496, 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.Name = "pa_makecode";
-            this.pa_makecode.Size = new System.Drawing.Size(0, 21);
+            this.pa_makecode.Size = new System.Drawing.Size(0, 27);
             this.pa_makecode.TabIndex = 109;
             this.pa_makecode.Tag = "1";
             // 
-            // pa_currentqty
+            // pa_totalqty
             // 
-            this.pa_currentqty.AutoSize = true;
-            this.pa_currentqty.CutLength = null;
-            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(372, 77);
-            this.pa_currentqty.MaximumSize = new System.Drawing.Size(150, 0);
-            this.pa_currentqty.Name = "pa_currentqty";
-            this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
-            this.pa_currentqty.TabIndex = 105;
-            this.pa_currentqty.Tag = "1";
+            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(496, 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.Name = "pa_totalqty";
+            this.pa_totalqty.Size = new System.Drawing.Size(0, 27);
+            this.pa_totalqty.TabIndex = 105;
+            this.pa_totalqty.Tag = "1";
             // 
             // PrintNum
             // 
@@ -474,26 +486,43 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(839, 129);
+            this.PrintNum.Location = new System.Drawing.Point(1119, 161);
+            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(119, 21);
+            this.PrintNum.Size = new System.Drawing.Size(157, 25);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
             this.PrintNum.TabIndex = 183;
             // 
+            // pa_standardqty
+            // 
+            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, 98);
+            this.pa_standardqty.Name = "pa_standardqty";
+            this.pa_standardqty.Power = null;
+            this.pa_standardqty.Size = new System.Drawing.Size(141, 25);
+            this.pa_standardqty.Str = null;
+            this.pa_standardqty.Str1 = null;
+            this.pa_standardqty.Str2 = null;
+            this.pa_standardqty.TabIndex = 184;
+            this.pa_standardqty.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_standardqty_KeyDown);
+            this.pa_standardqty.Leave += new System.EventHandler(this.pa_standardqty_Leave);
+            // 
             // Make_PalletCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(997, 552);
+            this.ClientSize = new System.Drawing.Size(1329, 690);
+            this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.AutoPrint);
             this.Controls.Add(this.pa_status);
             this.Controls.Add(this.AutoOutBoxCode);
             this.Controls.Add(this.Packing);
-            this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.pa_packageqty_label);
             this.Controls.Add(this.PrintLabel_label);
             this.Controls.Add(this.PrinterList_label);
@@ -515,10 +544,11 @@
             this.Controls.Add(this.pa_restqty_label);
             this.Controls.Add(this.pa_makecode);
             this.Controls.Add(this.pa_makecode_label);
-            this.Controls.Add(this.pa_currentqty);
+            this.Controls.Add(this.pa_totalqty);
             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 = "7";
@@ -526,14 +556,14 @@
             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();
 
         }
 
         #endregion
         private System.Windows.Forms.Label pa_outboxcode_label;
-        private CustomControl.ValueLabel.ValueLabel pa_currentqty;
+        private CustomControl.ValueLabel.ValueLabel pa_totalqty;
         private System.Windows.Forms.Label pa_totalqty_label;
         private CustomControl.ValueLabel.ValueLabel pa_makecode;
         private System.Windows.Forms.Label pa_makecode_label;
@@ -560,12 +590,12 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
-        private CustomControl.ValueLabel.ValueLabel pa_standardqty;
         private System.Windows.Forms.Label pa_packageqty_label;
         private CustomControl.ButtonUtil.NormalButton Packing;
         private System.Windows.Forms.CheckBox AutoOutBoxCode;
         private System.Windows.Forms.Label pa_status;
         private System.Windows.Forms.CheckBox AutoPrint;
         private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pa_standardqty;
     }
 }

+ 53 - 27
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -27,8 +27,6 @@ namespace UAS_MES.Make
 
         Make_NewPallet NewPallet;
 
-        int pa_stanqty;
-
         string pa_nextstep = "";
         //箱类型
         string pa_type;
@@ -39,6 +37,8 @@ namespace UAS_MES.Make
 
         ApplicationClass lbl;
 
+        string stantdqty = "";
+
         Document doc;
 
         Thread thread;
@@ -84,14 +84,14 @@ namespace UAS_MES.Make
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pa_makecode,pa_id,pa_standardqty,pa_status,pa_packageqty,pa_currentqty,pa_prodcode,pa_outboxcode,pa_totalqty,pa_custcode,pa_salecode ");
-                sql.Append("from package where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type =3");
+                sql.Append("select pa_makecode,pa_id,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_status,pa_packageqty,pa_totalqty,pa_currentqty,pa_prodcode,pa_outboxcode,pa_totalqty,pa_custcode,pa_salecode ");
+                sql.Append("from package left join packagedetail on pa_id =pd_paid left join product on pr_code=pd_prodcode where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type =3");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
                 {
                     BaseUtil.SetFormValue(Controls, dt);
+                    stantdqty = dt.Rows[0]["pa_standardqty"].ToString();
                     LoadGridData();
-                    pa_stanqty = int.Parse(dt.Rows[0]["pa_standardqty"].ToString());
                     pa_id = dt.Rows[0]["pa_id"].ToString();
                     outboxcode.Focus();
                 }
@@ -112,7 +112,7 @@ namespace UAS_MES.Make
                         return;
                     }
                     sql.Clear();
-                    sql.Append("select pd_makecode pa_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_id,pd_prodcode pa_prodcode,pa_mothercode,pa_status,pa_nextstep,nvl(pr_palletqty,0) pa_standardqty  from packagedetail ");
+                    sql.Append("select pd_makecode pa_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_id,pd_prodcode pa_prodcode,pa_mothercode,pa_status,pa_nextstep from packagedetail ");
                     sql.Append("left join package on pd_paid=pa_id left join product on pr_code=pd_prodcode where pd_outboxcode='" + outboxcode.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count > 0)
@@ -132,12 +132,6 @@ namespace UAS_MES.Make
                             }
                         }
                         pa_nextstep = dt.Rows[0]["pa_nextstep"].ToString();
-                        pa_stanqty = int.Parse(dt.Rows[0]["pa_standardqty"].ToString());
-                        if (pa_stanqty == 0)
-                        {
-                            OperateResult.AppendText(">>产品" + pa_prodcode.Text + "未维护栈板容量\n", Color.Red, outboxcode);
-                            return;
-                        }
                         if (pa_nextstep != User.CurrentStepCode && pa_nextstep != "")
                         {
                             OperateResult.AppendText(">>箱号" + outboxcode.Text + "的下一工序不是当前岗位资源对应工序\n", Color.Red, outboxcode);
@@ -174,7 +168,7 @@ namespace UAS_MES.Make
                     if (pa_outboxcode.Text == "" && AutoOutBoxCode.Checked || pa_status.Text == "1")
                     {
                         //箱已采集满并且未勾选自动生成
-                        if (pa_standardqty.Text == pa_currentqty.Text && !AutoOutBoxCode.Checked)
+                        if (pa_standardqty.Text == pa_totalqty.Text && !AutoOutBoxCode.Checked)
                         {
                             OperateResult.AppendText(">>栈板" + pa_outboxcode.Text + "已采集满\n", Color.Red, outboxcode);
                             return;
@@ -202,14 +196,21 @@ namespace UAS_MES.Make
                     {
                         pa_id = dt.Rows[0]["pa_id"].ToString();
                     }
-                    dt = (DataTable)dh.ExecuteSql("select pa_mothercode,nvl(pa_status,0) pa_status from package where pa_outboxcode='" + outboxcode.Text + "'", "select");
+                    dt = (DataTable)dh.ExecuteSql("select pa_totalqty,pa_mothercode,nvl(pa_status,0) pa_status from package where pa_outboxcode='" + outboxcode.Text + "'", "select");
                     if (dt.Rows.Count > 0)
                     {
                         //判断是否已经装箱
+                        int sonboxtotalqty = int.Parse(dt.Rows[0]["pa_totalqty"].ToString());
                         if (dt.Rows[0]["pa_mothercode"].ToString() == "")
                         {
                             if (dt.Rows[0]["pa_status"].ToString() == "1")
                             {
+                                pa_totalqty.Text = dh.getFieldDataByCondition("package", "pa_totalqty", "pa_outboxcode='" + pa_outboxcode.Text + "'").ToString();
+                                if (int.Parse(pa_totalqty.Text == "" ? "0" : pa_totalqty.Text) + sonboxtotalqty > int.Parse(pa_standardqty.Text))
+                                {
+                                    OperateResult.AppendText(">>采集箱号" + outboxcode.Text + "后超出容量\n", Color.Red, outboxcode);
+                                    return;
+                                }
                                 List<string> SQLS = new List<string>();
                                 sql.Clear();
                                 sql.Append("insert into packagedetail(pd_id, pd_paid, pd_outboxcode,pd_makecode,pd_prodcode,pd_innerboxcode, pd_innerqty,pd_builddate)");
@@ -217,6 +218,7 @@ namespace UAS_MES.Make
                                 sql.Append(",(select nvl(sum(pd_innerqty),0) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode=");
                                 sql.Append("'" + outboxcode.Text + "'),sysdate from package where pa_outboxcode='" + outboxcode.Text + "'");
                                 SQLS.Add(sql.GetString());
+                                //如果采集完这个超出了容量提示
                                 SQLS.Add("update package set PA_CURRENTQTY=nvl(PA_CURRENTQTY,0)+1,PA_PACKAGEQTY=nvl(PA_PACKAGEQTY,0)+1,PA_TOTALQTY=(select sum(pd_innerqty) from packagedetail left join package on pa_id=pd_paid where pa_outboxcode='" + pa_outboxcode.Text + "') where pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=3");
                                 SQLS.Add("update package set pa_mothercode='" + pa_outboxcode.Text + "' where pa_outboxcode='" + outboxcode.Text + "'");
                                 dh.ExecuteSQLTran(SQLS.ToArray());
@@ -227,22 +229,17 @@ 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.OutBoxStepPass(outboxcode.Text, pa_makecode.Text, User.UserSourceCode, User.UserCode, "栈板采集成功,栈板号:" + pa_outboxcode.Text, "栈板采集");
-                                LoadCollectNum();
-                                LoadGridData();
-                                if (pa_currentqty.Text == "1")
+                                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, "", 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 + "成功", pa_outboxcode.Text, "");
                                 OperateResult.AppendText(">>箱号" + outboxcode.Text + "采集成功!\n", Color.Green, outboxcode);
-                                sql.Clear();
-                                sql.Append("select count(0) cn from packagedetail left join package on pa_id=pd_paid where ");
-                                sql.Append("pa_outboxcode='" + pa_outboxcode.Text + "'");
-                                int packageqty = int.Parse((dh.ExecuteSql(sql.GetString(), "select") as DataTable).Rows[0][0].ToString());
-                                if (packageqty == pa_stanqty)
+                                LoadCollectNum();
+                                LoadGridData();
+                                if (pa_standardqty.Text == pa_totalqty.Text)
                                 {
                                     dh.ExecuteSql("update package set pa_status=1 where pa_outboxcode='" + pa_outboxcode.Text + "'", "update");
                                     if (AutoPrint.Checked)
@@ -251,8 +248,6 @@ namespace UAS_MES.Make
                                         Printlab.PerformClick();
                                     }
                                 }
-
-                                LoadGridData();
                             }
                             else OperateResult.AppendText(">>箱号" + outboxcode.Text + "尚未封箱\n", Color.Red, outboxcode);
                         }
@@ -294,7 +289,7 @@ namespace UAS_MES.Make
 
         private void LoadCollectNum()
         {
-            pa_currentqty.Text = dh.getFieldDataByCondition("package", "pa_currentqty", "pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=3").ToString();
+            pa_totalqty.Text = dh.getFieldDataByCondition("package", "pa_totalqty", "pa_outboxcode='" + pa_outboxcode.Text + "' and pa_type=3").ToString();
         }
 
         private void Make_PalletCollection_SizeChanged(object sender, EventArgs e)
@@ -409,5 +404,36 @@ namespace UAS_MES.Make
         {
             FillPrintLabel();
         }
+
+        private void pa_standardqty_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
+            {
+                ResetPackageQTY();
+            }
+        }
+
+        private void pa_standardqty_Leave(object sender, EventArgs e)
+        {
+            ResetPackageQTY();
+        }
+
+        private void ResetPackageQTY()
+        {
+            DataTable dt = (DataTable)dh.ExecuteSql("select pa_totalqty from package where pa_outboxcode='" + pa_outboxcode.Text + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                string total = dt.Rows[0]["pa_totalqty"].ToString();
+                if (int.Parse(pa_standardqty.Text) >= int.Parse(total))
+                {
+                    dh.UpdateByCondition("package", "pa_standardqty='" + pa_standardqty.Text + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
+                    OperateResult.AppendText(">>修改容量成功,已修改为" + pa_standardqty.Text + "\n", Color.Green);
+                    return;
+                }
+                else OperateResult.AppendText(">>容量不能小于已装数量\n", Color.Red);
+            }
+            else OperateResult.AppendText(">>栈板号不存在\n", Color.Red);
+            pa_standardqty.Text = stantdqty;
+        }
     }
 }