Browse Source

大箱,栈板采集增加包装规则限制

Hcsy 8 years ago
parent
commit
c913ef0764

+ 96 - 102
UAS-MES/FunctionCode/Make/Make_BigBoxCollection.Designer.cs

@@ -65,6 +65,8 @@
             this.pa_status = new System.Windows.Forms.Label();
             this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Cancel = new System.Windows.Forms.CheckBox();
+            this.pr_packrule = new System.Windows.Forms.Label();
+            this.pa_salecode = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -72,10 +74,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, 27);
             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 = "大箱号";
             // 
@@ -83,10 +84,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(373, 96);
-            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(280, 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 = "已装数量";
             // 
@@ -94,10 +94,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(373, 34);
-            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode_label.Location = new System.Drawing.Point(280, 27);
             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 = "制造单号";
             // 
@@ -107,10 +106,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, 173);
             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;
@@ -119,10 +117,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, 129);
             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 = "打印张数";
             // 
@@ -130,10 +127,9 @@
             // 
             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(992, 34);
-            this.pa_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_custcode_label.Location = new System.Drawing.Point(744, 27);
             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 = "客户";
             // 
@@ -141,10 +137,9 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(952, 347);
-            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.outboxcode_label.Location = new System.Drawing.Point(714, 278);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(92, 27);
+            this.outboxcode_label.Size = new System.Drawing.Size(74, 21);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "卡通箱号";
             // 
@@ -152,10 +147,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(624, 34);
-            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(468, 27);
             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 = "产品编号";
             // 
@@ -163,10 +157,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1117, 101);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(838, 81);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(195, 23);
+            this.PrintLabel.Size = new System.Drawing.Size(147, 20);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -174,10 +168,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(992, 99);
-            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintLabel_label.Location = new System.Drawing.Point(744, 79);
             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 = "标签文件";
             // 
@@ -185,19 +178,18 @@
             // 
             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(624, 99);
-            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrinterList_label.Location = new System.Drawing.Point(468, 79);
             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 = "打印机列表";
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(771, 99);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
+            this.PrinterList.Location = new System.Drawing.Point(578, 79);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(195, 25);
+            this.PrinterList.Size = new System.Drawing.Size(146, 20);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -205,11 +197,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(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.Location = new System.Drawing.Point(574, 27);
+            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);
@@ -221,13 +212,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, 512);
             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;
@@ -236,10 +226,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, 434);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(715, 347);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(368, 198);
+            this.OperateResult.Size = new System.Drawing.Size(277, 159);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -248,11 +237,10 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1049, 347);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.outboxcode.Location = new System.Drawing.Point(787, 278);
             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;
@@ -265,11 +253,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(111, 36);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_outboxcode.Location = new System.Drawing.Point(83, 29);
             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;
@@ -284,13 +271,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(1107, 280);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
+            this.Printlab.Location = new System.Drawing.Point(830, 224);
             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(80, 30);
+            this.Printlab.Size = new System.Drawing.Size(60, 24);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -303,13 +289,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, 224);
             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(80, 30);
+            this.ReleasePallet.Size = new System.Drawing.Size(60, 24);
             this.ReleasePallet.TabIndex = 160;
             this.ReleasePallet.Text = "解除大箱";
             this.ReleasePallet.UseVisualStyleBackColor = true;
@@ -322,13 +307,12 @@
             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(927, 10);
             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;
@@ -340,11 +324,10 @@
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
             this.pa_custcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode.Location = new System.Drawing.Point(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.Location = new System.Drawing.Point(838, 27);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 21);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -359,11 +342,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, 129);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(941, 519);
+            this.PackageInf.Size = new System.Drawing.Size(706, 415);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
@@ -407,11 +389,10 @@
             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(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.Location = new System.Drawing.Point(375, 27);
+            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";
             // 
@@ -420,11 +401,10 @@
             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(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.Location = new System.Drawing.Point(83, 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, 27);
+            this.pa_standardqty.Size = new System.Drawing.Size(0, 21);
             this.pa_standardqty.TabIndex = 105;
             this.pa_standardqty.Tag = "1";
             // 
@@ -433,11 +413,10 @@
             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(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.Location = new System.Drawing.Point(375, 79);
+            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, 27);
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
             this.pa_currentqty.TabIndex = 177;
             this.pa_currentqty.Tag = "1";
             // 
@@ -445,10 +424,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 = "大箱容量";
             // 
@@ -459,13 +437,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, 224);
             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(80, 30);
+            this.Packing.Size = new System.Drawing.Size(60, 24);
             this.Packing.TabIndex = 178;
             this.Packing.Text = "封大箱";
             this.Packing.UseVisualStyleBackColor = true;
@@ -475,10 +452,9 @@
             // 
             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(259, 32);
-            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(194, 26);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(114, 31);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(93, 25);
             this.AutoOutBoxCode.TabIndex = 179;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -487,10 +463,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, 176);
             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;
             // 
@@ -500,11 +475,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, 133);
             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;
@@ -514,19 +488,38 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Cancel.Location = new System.Drawing.Point(1202, 343);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.Cancel.Location = new System.Drawing.Point(902, 274);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(114, 31);
+            this.Cancel.Size = new System.Drawing.Size(93, 25);
             this.Cancel.TabIndex = 182;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
             // 
+            // pr_packrule
+            // 
+            this.pr_packrule.AutoSize = true;
+            this.pr_packrule.Location = new System.Drawing.Point(748, 512);
+            this.pr_packrule.Name = "pr_packrule";
+            this.pr_packrule.Size = new System.Drawing.Size(0, 12);
+            this.pr_packrule.TabIndex = 183;
+            this.pr_packrule.Visible = false;
+            // 
+            // pa_salecode
+            // 
+            this.pa_salecode.AutoSize = true;
+            this.pa_salecode.Location = new System.Drawing.Point(927, 512);
+            this.pa_salecode.Name = "pa_salecode";
+            this.pa_salecode.Size = new System.Drawing.Size(0, 12);
+            this.pa_salecode.TabIndex = 184;
+            this.pa_salecode.Visible = false;
+            // 
             // 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, 552);
+            this.Controls.Add(this.pa_salecode);
+            this.Controls.Add(this.pr_packrule);
             this.Controls.Add(this.Cancel);
             this.Controls.Add(this.PrintNum);
             this.Controls.Add(this.pa_status);
@@ -559,7 +552,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 = "栈板采集";
@@ -567,7 +559,7 @@
             this.Load += new System.EventHandler(this.栈板称重_Load);
             this.SizeChanged += new System.EventHandler(this.栈板称重_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -609,5 +601,7 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
         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;
     }
 }

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

@@ -86,7 +86,7 @@ namespace UAS_MES.Make
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pa_makecode,pa_id,pa_standardqty,pa_id,pa_packageqty,pa_prodcode,pa_outboxcode,pa_totalqty,pa_currentqty,pa_custcode,pa_salecode ");
+                sql.Append("select pa_id,pa_standardqty,pa_id,pa_packageqty,pa_outboxcode,pa_totalqty,pa_currentqty,pa_custcode ");
                 sql.Append("from package where pa_outboxcode='" + pa_outboxcode.Text + "'  and pa_type =2");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dt.Rows.Count > 0)
@@ -114,7 +114,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_status,pa_mothercode,pa_nextstep,nvl(pr_bigboxinnerqty,0) pa_standardqty  ");
+                    sql.Append("select pd_makecode pa_makecode,nvl(pa_downstatus,0)pa_downstatus,pa_salecode,pr_packrule,pa_id,pd_prodcode pa_prodcode,pa_status,pa_mothercode,pa_nextstep,nvl(pr_bigboxinnerqty,0) pa_standardqty  ");
                     sql.Append("from packagedetail left join package on pd_paid=pa_id left join product on pd_prodcode=pr_code where pd_outboxcode='" + outboxcode.Text + "'");
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     //判断采集的卡通箱是否有明细
@@ -207,14 +207,20 @@ namespace UAS_MES.Make
                         {
                             pa_id = dh.GetSEQ("package_seq");
                             sql.Clear();
-                            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)values");
-                            sql.Append("(" + pa_id + ",'" + pa_outboxcode.Text + "','" + pa_makecode.Text + "',sysdate,'0',2,'" + pa_prodcode.Text + "',0,'','" + pa_standardqty.Text + "','" + User.UserSourceCode + "','" + User.CurrentStepCode + "')");
+                            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 + "','" + pa_makecode.Text + "',sysdate,'0',2,'" + pa_prodcode.Text + "',0,'','" + pa_standardqty.Text + "','" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + pa_salecode.Text + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");
                         }
                         else
                         {
                             pa_id = dt.Rows[0]["pa_id"].ToString();
                         }
+                        string error;
+                        if (!LogicHandler.CheckPackRule(pr_packrule.Text, pa_outboxcode.Text, outboxcode.Text, pa_makecode.Text, pa_salecode.Text, pa_prodcode.Text, out error))
+                        {
+                            OperateResult.AppendText(">>" + error + "\n", Color.Red, outboxcode);
+                            return;
+                        }
                         //如果未装满的话
                         CollectBox();
                     }

+ 96 - 100
UAS-MES/FunctionCode/Make/Make_PalletCollection.Designer.cs

@@ -65,6 +65,8 @@
             this.PrintNum = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pa_standardqty = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Cancel = new System.Windows.Forms.CheckBox();
+            this.pr_packrule = new System.Windows.Forms.Label();
+            this.pa_salecode = new System.Windows.Forms.Label();
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).BeginInit();
             this.SuspendLayout();
             // 
@@ -72,10 +74,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(11, 34);
-            this.pa_outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_outboxcode_label.Location = new System.Drawing.Point(8, 27);
             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 = "栈板号";
             // 
@@ -83,10 +84,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(384, 96);
-            this.pa_totalqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_totalqty_label.Location = new System.Drawing.Point(288, 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 = "已装数量";
             // 
@@ -94,10 +94,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(384, 34);
-            this.pa_makecode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_makecode_label.Location = new System.Drawing.Point(288, 27);
             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 = "制造单号";
             // 
@@ -105,10 +104,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(995, 161);
-            this.pa_restqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_restqty_label.Location = new System.Drawing.Point(746, 129);
             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 = "打印张数";
             // 
@@ -116,10 +114,9 @@
             // 
             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(995, 34);
-            this.pa_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_custcode_label.Location = new System.Drawing.Point(746, 27);
             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 = "客户";
             // 
@@ -127,10 +124,9 @@
             // 
             this.outboxcode_label.AutoSize = true;
             this.outboxcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.outboxcode_label.Location = new System.Drawing.Point(954, 326);
-            this.outboxcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.outboxcode_label.Location = new System.Drawing.Point(716, 261);
             this.outboxcode_label.Name = "outboxcode_label";
-            this.outboxcode_label.Size = new System.Drawing.Size(52, 27);
+            this.outboxcode_label.Size = new System.Drawing.Size(42, 21);
             this.outboxcode_label.TabIndex = 166;
             this.outboxcode_label.Text = "箱号";
             // 
@@ -138,10 +134,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(632, 34);
-            this.pa_prodcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_prodcode_label.Location = new System.Drawing.Point(474, 27);
             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 = "产品编号";
             // 
@@ -149,10 +144,10 @@
             // 
             this.PrintLabel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.PrintLabel.FormattingEnabled = true;
-            this.PrintLabel.Location = new System.Drawing.Point(1119, 101);
-            this.PrintLabel.Margin = new System.Windows.Forms.Padding(3, 1, 3, 1);
+            this.PrintLabel.Location = new System.Drawing.Point(839, 81);
+            this.PrintLabel.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.PrintLabel.Name = "PrintLabel";
-            this.PrintLabel.Size = new System.Drawing.Size(195, 23);
+            this.PrintLabel.Size = new System.Drawing.Size(147, 20);
             this.PrintLabel.TabIndex = 172;
             this.PrintLabel.SelectedValueChanged += new System.EventHandler(this.PrintLabel_SelectedValueChanged);
             // 
@@ -160,10 +155,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(995, 99);
-            this.PrintLabel_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrintLabel_label.Location = new System.Drawing.Point(746, 79);
             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 = "标签文件";
             // 
@@ -171,10 +165,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(632, 99);
-            this.PrinterList_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrinterList_label.Location = new System.Drawing.Point(474, 79);
             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 = "打印机列表";
             // 
@@ -182,10 +175,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(11, 96);
-            this.pa_packageqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_packageqty_label.Location = new System.Drawing.Point(8, 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 = "栈板容量";
             // 
@@ -193,10 +185,9 @@
             // 
             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(261, 34);
-            this.AutoOutBoxCode.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoOutBoxCode.Location = new System.Drawing.Point(196, 27);
             this.AutoOutBoxCode.Name = "AutoOutBoxCode";
-            this.AutoOutBoxCode.Size = new System.Drawing.Size(114, 31);
+            this.AutoOutBoxCode.Size = new System.Drawing.Size(93, 25);
             this.AutoOutBoxCode.TabIndex = 180;
             this.AutoOutBoxCode.Text = "自动生成";
             this.AutoOutBoxCode.UseVisualStyleBackColor = true;
@@ -205,10 +196,9 @@
             // 
             this.pa_status.AutoSize = true;
             this.pa_status.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_status.Location = new System.Drawing.Point(1157, 218);
-            this.pa_status.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_status.Location = new System.Drawing.Point(868, 174);
             this.pa_status.Name = "pa_status";
-            this.pa_status.Size = new System.Drawing.Size(0, 27);
+            this.pa_status.Size = new System.Drawing.Size(0, 21);
             this.pa_status.TabIndex = 181;
             this.pa_status.Visible = false;
             // 
@@ -218,10 +208,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(999, 210);
-            this.AutoPrint.Margin = new System.Windows.Forms.Padding(4);
+            this.AutoPrint.Location = new System.Drawing.Point(749, 168);
             this.AutoPrint.Name = "AutoPrint";
-            this.AutoPrint.Size = new System.Drawing.Size(114, 31);
+            this.AutoPrint.Size = new System.Drawing.Size(93, 25);
             this.AutoPrint.TabIndex = 182;
             this.AutoPrint.Text = "自动打印";
             this.AutoPrint.UseVisualStyleBackColor = true;
@@ -233,13 +222,12 @@
             this.Packing.DownImage = ((System.Drawing.Image)(resources.GetObject("Packing.DownImage")));
             this.Packing.Image = ((System.Drawing.Image)(resources.GetObject("Packing.Image")));
             this.Packing.IsShowBorder = true;
-            this.Packing.Location = new System.Drawing.Point(1203, 252);
-            this.Packing.Margin = new System.Windows.Forms.Padding(4);
+            this.Packing.Location = new System.Drawing.Point(902, 202);
             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;
@@ -247,10 +235,10 @@
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(769, 99);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
+            this.PrinterList.Location = new System.Drawing.Point(577, 79);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(195, 25);
+            this.PrinterList.Size = new System.Drawing.Size(146, 20);
             this.PrinterList.TabIndex = 171;
             // 
             // pa_prodcode
@@ -258,11 +246,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(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.Location = new System.Drawing.Point(572, 27);
+            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);
@@ -274,13 +261,12 @@
             this.Clean.DownImage = ((System.Drawing.Image)(resources.GetObject("Clean.DownImage")));
             this.Clean.Image = ((System.Drawing.Image)(resources.GetObject("Clean.Image")));
             this.Clean.IsShowBorder = true;
-            this.Clean.Location = new System.Drawing.Point(1105, 638);
-            this.Clean.Margin = new System.Windows.Forms.Padding(4);
+            this.Clean.Location = new System.Drawing.Point(829, 510);
             this.Clean.MoveImage = ((System.Drawing.Image)(resources.GetObject("Clean.MoveImage")));
             this.Clean.Name = "Clean";
             this.Clean.NormalImage = ((System.Drawing.Image)(resources.GetObject("Clean.NormalImage")));
             this.Clean.Power = null;
-            this.Clean.Size = new System.Drawing.Size(80, 30);
+            this.Clean.Size = new System.Drawing.Size(60, 24);
             this.Clean.TabIndex = 168;
             this.Clean.Text = "清除";
             this.Clean.UseVisualStyleBackColor = true;
@@ -289,10 +275,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, 409);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4);
+            this.OperateResult.Location = new System.Drawing.Point(715, 327);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(368, 220);
+            this.OperateResult.Size = new System.Drawing.Size(277, 177);
             this.OperateResult.TabIndex = 167;
             this.OperateResult.Text = "";
             // 
@@ -301,11 +286,10 @@
             this.outboxcode.AllPower = "ifall";
             this.outboxcode.BackColor = System.Drawing.Color.White;
             this.outboxcode.ID = null;
-            this.outboxcode.Location = new System.Drawing.Point(1014, 326);
-            this.outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.outboxcode.Location = new System.Drawing.Point(760, 261);
             this.outboxcode.Name = "outboxcode";
             this.outboxcode.Power = "ifread";
-            this.outboxcode.Size = new System.Drawing.Size(175, 25);
+            this.outboxcode.Size = new System.Drawing.Size(132, 21);
             this.outboxcode.Str = null;
             this.outboxcode.Str1 = null;
             this.outboxcode.Str2 = null;
@@ -318,11 +302,10 @@
             this.pa_outboxcode.AllPower = "ifall";
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(113, 36);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4);
+            this.pa_outboxcode.Location = new System.Drawing.Point(85, 29);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = "ifread";
-            this.pa_outboxcode.Size = new System.Drawing.Size(141, 25);
+            this.pa_outboxcode.Size = new System.Drawing.Size(107, 21);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -337,13 +320,12 @@
             this.Printlab.DownImage = ((System.Drawing.Image)(resources.GetObject("Printlab.DownImage")));
             this.Printlab.Image = ((System.Drawing.Image)(resources.GetObject("Printlab.Image")));
             this.Printlab.IsShowBorder = true;
-            this.Printlab.Location = new System.Drawing.Point(1093, 252);
-            this.Printlab.Margin = new System.Windows.Forms.Padding(4);
+            this.Printlab.Location = new System.Drawing.Point(820, 202);
             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(75, 30);
+            this.Printlab.Size = new System.Drawing.Size(56, 24);
             this.Printlab.TabIndex = 161;
             this.Printlab.Text = "打印";
             this.Printlab.UseVisualStyleBackColor = true;
@@ -356,13 +338,12 @@
             this.ReleasePallet.DownImage = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.DownImage")));
             this.ReleasePallet.Image = ((System.Drawing.Image)(resources.GetObject("ReleasePallet.Image")));
             this.ReleasePallet.IsShowBorder = true;
-            this.ReleasePallet.Location = new System.Drawing.Point(987, 252);
-            this.ReleasePallet.Margin = new System.Windows.Forms.Padding(4);
+            this.ReleasePallet.Location = new System.Drawing.Point(740, 202);
             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;
@@ -375,13 +356,12 @@
             this.NewPalletCode.DownImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.DownImage")));
             this.NewPalletCode.Image = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.Image")));
             this.NewPalletCode.IsShowBorder = true;
-            this.NewPalletCode.Location = new System.Drawing.Point(1221, 12);
-            this.NewPalletCode.Margin = new System.Windows.Forms.Padding(4);
+            this.NewPalletCode.Location = new System.Drawing.Point(916, 10);
             this.NewPalletCode.MoveImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.MoveImage")));
             this.NewPalletCode.Name = "NewPalletCode";
             this.NewPalletCode.NormalImage = ((System.Drawing.Image)(resources.GetObject("NewPalletCode.NormalImage")));
             this.NewPalletCode.Power = "ifread";
-            this.NewPalletCode.Size = new System.Drawing.Size(80, 30);
+            this.NewPalletCode.Size = new System.Drawing.Size(60, 24);
             this.NewPalletCode.TabIndex = 159;
             this.NewPalletCode.Text = "新增栈板";
             this.NewPalletCode.UseVisualStyleBackColor = true;
@@ -393,11 +373,10 @@
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
             this.pa_custcode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_custcode.Location = new System.Drawing.Point(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.Location = new System.Drawing.Point(839, 27);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(150, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 21);
             this.pa_custcode.TabIndex = 158;
             this.pa_custcode.Tag = "1";
             // 
@@ -412,11 +391,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, 129);
             this.PackageInf.Name = "PackageInf";
             this.PackageInf.RowTemplate.Height = 23;
-            this.PackageInf.Size = new System.Drawing.Size(941, 519);
+            this.PackageInf.Size = new System.Drawing.Size(706, 415);
             this.PackageInf.TabIndex = 156;
             // 
             // pd_outboxcode
@@ -460,11 +438,10 @@
             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(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.Location = new System.Drawing.Point(372, 27);
+            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";
             // 
@@ -473,11 +450,10 @@
             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.Location = new System.Drawing.Point(372, 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 = 105;
             this.pa_totalqty.Tag = "1";
             // 
@@ -487,11 +463,10 @@
             this.PrintNum.BackColor = System.Drawing.Color.White;
             this.PrintNum.Enabled = false;
             this.PrintNum.ID = null;
-            this.PrintNum.Location = new System.Drawing.Point(1119, 161);
-            this.PrintNum.Margin = new System.Windows.Forms.Padding(4);
+            this.PrintNum.Location = new System.Drawing.Point(839, 129);
             this.PrintNum.Name = "PrintNum";
             this.PrintNum.Power = null;
-            this.PrintNum.Size = new System.Drawing.Size(157, 25);
+            this.PrintNum.Size = new System.Drawing.Size(119, 21);
             this.PrintNum.Str = null;
             this.PrintNum.Str1 = null;
             this.PrintNum.Str2 = null;
@@ -502,10 +477,11 @@
             this.pa_standardqty.AllPower = null;
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.ID = null;
-            this.pa_standardqty.Location = new System.Drawing.Point(113, 98);
+            this.pa_standardqty.Location = new System.Drawing.Point(85, 78);
+            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(2, 2, 2, 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;
@@ -517,19 +493,38 @@
             // 
             this.Cancel.AutoSize = true;
             this.Cancel.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Cancel.Location = new System.Drawing.Point(1200, 323);
-            this.Cancel.Margin = new System.Windows.Forms.Padding(4);
+            this.Cancel.Location = new System.Drawing.Point(900, 258);
             this.Cancel.Name = "Cancel";
-            this.Cancel.Size = new System.Drawing.Size(114, 31);
+            this.Cancel.Size = new System.Drawing.Size(93, 25);
             this.Cancel.TabIndex = 185;
             this.Cancel.Text = "取消采集";
             this.Cancel.UseVisualStyleBackColor = true;
             // 
+            // pr_packrule
+            // 
+            this.pr_packrule.AutoSize = true;
+            this.pr_packrule.Location = new System.Drawing.Point(749, 521);
+            this.pr_packrule.Name = "pr_packrule";
+            this.pr_packrule.Size = new System.Drawing.Size(0, 12);
+            this.pr_packrule.TabIndex = 186;
+            this.pr_packrule.Visible = false;
+            // 
+            // pa_salecode
+            // 
+            this.pa_salecode.AutoSize = true;
+            this.pa_salecode.Location = new System.Drawing.Point(917, 521);
+            this.pa_salecode.Name = "pa_salecode";
+            this.pa_salecode.Size = new System.Drawing.Size(0, 12);
+            this.pa_salecode.TabIndex = 187;
+            this.pa_salecode.Visible = false;
+            // 
             // Make_PalletCollection
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1329, 690);
+            this.ClientSize = new System.Drawing.Size(997, 552);
+            this.Controls.Add(this.pa_salecode);
+            this.Controls.Add(this.pr_packrule);
             this.Controls.Add(this.Cancel);
             this.Controls.Add(this.pa_standardqty);
             this.Controls.Add(this.PrintNum);
@@ -562,7 +557,6 @@
             this.Controls.Add(this.pa_totalqty_label);
             this.Controls.Add(this.pa_outboxcode_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Make_PalletCollection";
             this.Tag = "Make!BigBoxCollection";
             this.Text = "7";
@@ -570,7 +564,7 @@
             this.Load += new System.EventHandler(this.Make_PalletCollection_Load);
             this.SizeChanged += new System.EventHandler(this.Make_PalletCollection_SizeChanged);
             ((System.ComponentModel.ISupportInitialize)(this.PackageInf)).EndInit();
-            this.ResumeLayout(false);
+            this.ResumeLayout(true);
             this.PerformLayout();
 
         }
@@ -612,5 +606,7 @@
         private CustomControl.TextBoxWithIcon.EnterTextBox PrintNum;
         private CustomControl.TextBoxWithIcon.EnterTextBox pa_standardqty;
         private System.Windows.Forms.CheckBox Cancel;
+        private System.Windows.Forms.Label pr_packrule;
+        private System.Windows.Forms.Label pa_salecode;
     }
 }

+ 11 - 4
UAS-MES/FunctionCode/Make/Make_PalletCollection.cs

@@ -84,7 +84,7 @@ namespace UAS_MES.Make
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                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("select pa_makecode,pa_id,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_status,pa_packageqty,pa_totalqty,pa_currentqty,pa_outboxcode,pa_totalqty,pa_custcode ");
                 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)
@@ -112,7 +112,7 @@ namespace UAS_MES.Make
                         return;
                     }
                     sql.Clear();
-                    sql.Append("select pd_makecode pa_makecode,nvl(pa_downstatus,0)pa_downstatus,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_id,pd_prodcode pa_prodcode,pa_mothercode,pa_status,pa_nextstep from packagedetail ");
+                    sql.Append("select pd_makecode pa_makecode,nvl(pa_downstatus,0)pa_downstatus,pr_packrule,nvl(pa_standardqty,PR_PALLETQTY)pa_standardqty,pa_id,pd_prodcode pa_prodcode,pa_mothercode,pa_salecode,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)
@@ -194,14 +194,21 @@ namespace UAS_MES.Make
                         {
                             pa_id = dh.GetSEQ("package_seq");
                             sql.Clear();
-                            sql.Append("insert into package (pa_id,pa_outboxcode,PA_STANDARDQTY,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_sccode,pa_currentstep)values");
-                            sql.Append("(" + pa_id + ",'" + pa_outboxcode.Text + "','" + pa_standardqty.Text + "','" + pa_makecode.Text + "',sysdate,'0',3,'" + pa_prodcode.Text + "',0,0,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "')");
+                            sql.Append("insert into package (pa_id,pa_outboxcode,PA_STANDARDQTY,pa_makecode,pa_indate,pa_packageqty,pa_type,pa_prodcode,pa_level,PA_STATUS,pa_sccode,pa_currentstep,pa_salecode)values");
+                            sql.Append("(" + pa_id + ",'" + pa_outboxcode.Text + "','" + pa_standardqty.Text + "','" + pa_makecode.Text + "',sysdate,'0',3,'" + pa_prodcode.Text + "',0,0,'" + User.UserSourceCode + "','" + User.CurrentStepCode + "','" + pa_salecode.Text + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");
                         }
                         else
                         {
                             pa_id = dt.Rows[0]["pa_id"].ToString();
                         }
+
+                        string error;
+                        if (!LogicHandler.CheckPackRule(pr_packrule.Text, pa_outboxcode.Text, outboxcode.Text, pa_makecode.Text, pa_salecode.Text, pa_prodcode.Text, out error))
+                        {
+                            OperateResult.AppendText(">>" + error + "\n", Color.Red, outboxcode);
+                            return;
+                        }
                         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)
                         {

+ 0 - 15
UAS-MES/FunctionCode/Make/Make_PalletCollection.resx

@@ -788,19 +788,4 @@
   <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
-  <metadata name="pd_outboxcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="pd_innerqty.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
-  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>True</value>
-  </metadata>
 </root>

+ 54 - 0
UAS-MES/PublicMethod/LogicHandler.cs

@@ -1310,5 +1310,59 @@ namespace UAS_MES.PublicMethod
             else
                 return false;
         }
+
+
+        /// <summary>
+        /// 小箱装大箱的包装规则判断
+        /// </summary>
+        /// <param name="packrule"></param>
+        /// <param name="pa_outboxcode"></param>
+        /// <param name="outboxcode"></param>
+        /// <param name="pa_makecode"></param>
+        /// <param name="pa_salecode"></param>
+        /// <param name="pa_prodcode"></param>
+        /// <param name="error"></param>
+        /// <returns></returns>
+        public static Boolean CheckPackRule(string packrule, string pa_outboxcode, string outboxcode, string pa_makecode, string pa_salecode, string pa_prodcode, out string error)
+        {
+            //按工单核对装箱
+            switch (packrule.ToUpper())
+            {
+                case "MAKE":
+                    string makecode = dh.getFieldDataByCondition("package", "pa_makecode", "pa_outboxcode='" + pa_outboxcode + "'").ToString();
+                    if (makecode != pa_makecode && pa_makecode != "")
+                    {
+                        error = ">>当前箱" + outboxcode + "所属工单号" + pa_makecode + "和待装箱号" + pa_outboxcode + "工单" + makecode + "不相等";
+                        return false;
+                    }
+                    break;
+                case "SALE":
+                    if (dh.CheckExist("package", "pa_outboxcode='" + pa_outboxcode + "'"))
+                    {
+                        string salecode = dh.getFieldDataByCondition("package", "pa_salecode", "pa_outboxcode = '" + pa_outboxcode + "'").ToString();
+                        if (salecode != pa_salecode)
+                        {
+                            error = ">>当前箱" + outboxcode + "所属订单号" + pa_salecode + "和待装箱号" + pa_outboxcode + "订单" + salecode + "不相等";
+                            return false;
+                        }
+                    }
+                    break;
+                case "PROD":
+                    string prodcode = dh.getFieldDataByCondition("mes_package_view", "v_prodcode", "v_outboxcode='" + pa_outboxcode + "'").ToString();
+                    if (prodcode != pa_prodcode)
+                    {
+                        error = ">>当前箱" + outboxcode + "对应物料" + pa_prodcode + "和待装箱号" + pa_outboxcode + "物料" + prodcode + "不相等";
+                        return false;
+                    }
+                    break;
+                case "MIX":
+                    break;
+                default:
+                    break;
+            }
+            error = "";
+            return true;
+        }
+
     }
 }