Browse Source

BUG修改

章政 7 years ago
parent
commit
d065f57ead

+ 3 - 3
UAS_MES_NEW/FunctionCode/Make/Make_SeqProgramTransform.cs

@@ -439,7 +439,7 @@ namespace UAS_MES_NEW.Make
                 case "IMEI1":
                 case "IMEI2":
                 case "IMEI3":
-                    string tempSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "(ms_imei1='" + imeif + "' or ms_imei2 = '" + imeif + "' or ms_imei3 = '" + imeif + "') and  ms_status in (0,1,2,3)  and ms_id <> '" + oMsid + "'").ToString();
+                    string tempSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "(ms_imei1='" + imeif + "' or ms_imei2 = '" + imeif + "' or ms_imei3 = '" + imeif + "') and  ms_status in (0,1,2,3)  and ms_id <> '" + oMsid + "'  and nvl(ms_nextmacode,' ')=' '").ToString();
                     if (tempSn != "")
                     {
                         OperateResult.AppendText("<<" + type + ":" + imeif + "错误,已被序列号" + tempSn + "使用\n", Color.Red);
@@ -490,7 +490,7 @@ namespace UAS_MES_NEW.Make
                         }
                     }
                     //验证是否已被使用
-                    string temSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + macOrBt + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'").ToString();
+                    string temSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + macOrBt + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'  and nvl(ms_nextmacode,' ')=' '").ToString();
                     if (temSn != "")
                     {
                         OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + code.Text + "错误,已被序列号" + temSn + "使用\n", Color.Red);
@@ -525,7 +525,7 @@ namespace UAS_MES_NEW.Make
                         }
                     }
                     //校验网标是否存在
-                    string teSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'").ToString();
+                    string teSn = dh.getFieldDataByCondition("makeserial", "ms_sncode", "MS_" + type + "='" + imeif + "' and  ms_status in (0,1,2,3) and ms_id <> '" + oMsid + "'  and nvl(ms_nextmacode,' ')=' '").ToString();
                     if (teSn != "")
                     {
                         OperateResult.AppendText("<<" + ListA.Rows[step - 2]["psr_type"].ToString() + ":" + imeif + "错误,已被序列号" + teSn + "使用\n", Color.Red);

+ 138 - 112
UAS_MES_NEW/FunctionCode/Packing/Packing_CartonTransfer.Designer.cs

@@ -44,6 +44,9 @@
             this.newpack = new System.Windows.Forms.RadioButton();
             this.movepack = new System.Windows.Forms.RadioButton();
             this.groupBoxWithBorder1 = new UAS_MES_NEW.CustomControl.GroupBoxWithBorder.GroupBoxWithBorder();
+            this.pa_weight = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pa_sccode = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
+            this.pa_nextstep = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.ms_outboxcode = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.SnCollectionBox();
             this.pa_packtype = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.pa_type = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
@@ -61,6 +64,7 @@
             this.pr_code_label = new System.Windows.Forms.Label();
             this.pr_outboxinnerqty_label = new System.Windows.Forms.Label();
             this.pa_code_label = new System.Windows.Forms.Label();
+            this.pa_status = new UAS_MES_NEW.CustomControl.ValueLabel.ValueLabel();
             this.groupBoxWithBorder2.SuspendLayout();
             this.groupBoxWithBorder1.SuspendLayout();
             this.SuspendLayout();
@@ -69,19 +73,17 @@
             // 
             this.sn_code_label.AutoSize = true;
             this.sn_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.sn_code_label.Location = new System.Drawing.Point(19, 580);
-            this.sn_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.sn_code_label.Location = new System.Drawing.Point(14, 464);
             this.sn_code_label.Name = "sn_code_label";
-            this.sn_code_label.Size = new System.Drawing.Size(72, 27);
+            this.sn_code_label.Size = new System.Drawing.Size(58, 21);
             this.sn_code_label.TabIndex = 176;
             this.sn_code_label.Text = "序列号";
             // 
             // 清除
             // 
-            this.清除.Location = new System.Drawing.Point(1132, 578);
-            this.清除.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.清除.Location = new System.Drawing.Point(849, 462);
             this.清除.Name = "清除";
-            this.清除.Size = new System.Drawing.Size(64, 29);
+            this.清除.Size = new System.Drawing.Size(48, 23);
             this.清除.TabIndex = 178;
             this.清除.Text = "清除";
             this.清除.UseVisualStyleBackColor = true;
@@ -92,11 +94,10 @@
             this.sn_code.AllPower = null;
             this.sn_code.BackColor = System.Drawing.Color.White;
             this.sn_code.ID = null;
-            this.sn_code.Location = new System.Drawing.Point(108, 582);
-            this.sn_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.sn_code.Location = new System.Drawing.Point(81, 466);
             this.sn_code.Name = "sn_code";
             this.sn_code.Power = null;
-            this.sn_code.Size = new System.Drawing.Size(260, 25);
+            this.sn_code.Size = new System.Drawing.Size(196, 21);
             this.sn_code.Str = null;
             this.sn_code.Str1 = null;
             this.sn_code.Str2 = null;
@@ -106,10 +107,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(12, 231);
-            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OperateResult.Location = new System.Drawing.Point(9, 185);
             this.OperateResult.Name = "OperateResult";
-            this.OperateResult.Size = new System.Drawing.Size(1184, 339);
+            this.OperateResult.Size = new System.Drawing.Size(889, 272);
             this.OperateResult.TabIndex = 175;
             this.OperateResult.Text = "";
             // 
@@ -126,11 +126,11 @@
             this.groupBoxWithBorder2.Controls.Add(this.newpack);
             this.groupBoxWithBorder2.Controls.Add(this.movepack);
             this.groupBoxWithBorder2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder2.Location = new System.Drawing.Point(607, 12);
-            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.groupBoxWithBorder2.Location = new System.Drawing.Point(455, 10);
+            this.groupBoxWithBorder2.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder2.Name = "groupBoxWithBorder2";
-            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.groupBoxWithBorder2.Size = new System.Drawing.Size(595, 196);
+            this.groupBoxWithBorder2.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder2.Size = new System.Drawing.Size(446, 157);
             this.groupBoxWithBorder2.TabIndex = 174;
             this.groupBoxWithBorder2.TabStop = false;
             this.groupBoxWithBorder2.Text = "转移箱";
@@ -143,13 +143,12 @@
             this.ALLMOVE.DownImage = ((System.Drawing.Image)(resources.GetObject("ALLMOVE.DownImage")));
             this.ALLMOVE.Image = null;
             this.ALLMOVE.IsShowBorder = true;
-            this.ALLMOVE.Location = new System.Drawing.Point(376, 144);
-            this.ALLMOVE.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ALLMOVE.Location = new System.Drawing.Point(282, 115);
             this.ALLMOVE.MoveImage = ((System.Drawing.Image)(resources.GetObject("ALLMOVE.MoveImage")));
             this.ALLMOVE.Name = "ALLMOVE";
             this.ALLMOVE.NormalImage = ((System.Drawing.Image)(resources.GetObject("ALLMOVE.NormalImage")));
             this.ALLMOVE.Power = null;
-            this.ALLMOVE.Size = new System.Drawing.Size(93, 31);
+            this.ALLMOVE.Size = new System.Drawing.Size(70, 25);
             this.ALLMOVE.TabIndex = 179;
             this.ALLMOVE.Text = "全部移箱";
             this.ALLMOVE.UseVisualStyleBackColor = false;
@@ -161,12 +160,11 @@
             this.pa_standardqty.BackColor = System.Drawing.Color.White;
             this.pa_standardqty.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.pa_standardqty.ID = null;
-            this.pa_standardqty.Location = new System.Drawing.Point(148, 147);
-            this.pa_standardqty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pa_standardqty.Location = new System.Drawing.Point(111, 118);
             this.pa_standardqty.Name = "pa_standardqty";
             this.pa_standardqty.Negative = false;
             this.pa_standardqty.Power = null;
-            this.pa_standardqty.Size = new System.Drawing.Size(199, 27);
+            this.pa_standardqty.Size = new System.Drawing.Size(150, 23);
             this.pa_standardqty.Str = null;
             this.pa_standardqty.Str1 = null;
             this.pa_standardqty.Str2 = null;
@@ -176,40 +174,36 @@
             // 
             this.pa_currentqty.AutoSize = true;
             this.pa_currentqty.CutLength = null;
-            this.pa_currentqty.Location = new System.Drawing.Point(484, 77);
-            this.pa_currentqty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_currentqty.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pa_currentqty.Location = new System.Drawing.Point(363, 61);
+            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, 27);
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 21);
             this.pa_currentqty.TabIndex = 173;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(377, 77);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(283, 61);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(92, 27);
+            this.label4.Size = new System.Drawing.Size(74, 21);
             this.label4.TabIndex = 6;
             this.label4.Text = "箱内数量";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(30, 147);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(22, 117);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(92, 27);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 5;
             this.label3.Text = "标准容量";
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(30, 79);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(22, 62);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 4;
             this.label2.Text = "目标箱号";
             // 
@@ -219,11 +213,10 @@
             this.pa_outboxcode.BackColor = System.Drawing.Color.White;
             this.pa_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.pa_outboxcode.ID = null;
-            this.pa_outboxcode.Location = new System.Drawing.Point(148, 79);
-            this.pa_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pa_outboxcode.Location = new System.Drawing.Point(111, 63);
             this.pa_outboxcode.Name = "pa_outboxcode";
             this.pa_outboxcode.Power = null;
-            this.pa_outboxcode.Size = new System.Drawing.Size(199, 27);
+            this.pa_outboxcode.Size = new System.Drawing.Size(150, 23);
             this.pa_outboxcode.Str = null;
             this.pa_outboxcode.Str1 = null;
             this.pa_outboxcode.Str2 = null;
@@ -233,10 +226,9 @@
             // newpack
             // 
             this.newpack.AutoSize = true;
-            this.newpack.Location = new System.Drawing.Point(168, 30);
-            this.newpack.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.newpack.Location = new System.Drawing.Point(126, 23);
             this.newpack.Name = "newpack";
-            this.newpack.Size = new System.Drawing.Size(73, 31);
+            this.newpack.Size = new System.Drawing.Size(60, 25);
             this.newpack.TabIndex = 1;
             this.newpack.TabStop = true;
             this.newpack.Text = "新箱";
@@ -246,10 +238,9 @@
             // movepack
             // 
             this.movepack.AutoSize = true;
-            this.movepack.Location = new System.Drawing.Point(35, 30);
-            this.movepack.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.movepack.Location = new System.Drawing.Point(26, 23);
             this.movepack.Name = "movepack";
-            this.movepack.Size = new System.Drawing.Size(73, 31);
+            this.movepack.Size = new System.Drawing.Size(60, 25);
             this.movepack.TabIndex = 0;
             this.movepack.TabStop = true;
             this.movepack.Text = "移箱";
@@ -259,6 +250,9 @@
             // groupBoxWithBorder1
             // 
             this.groupBoxWithBorder1.BorderColor = System.Drawing.Color.Black;
+            this.groupBoxWithBorder1.Controls.Add(this.pa_weight);
+            this.groupBoxWithBorder1.Controls.Add(this.pa_sccode);
+            this.groupBoxWithBorder1.Controls.Add(this.pa_nextstep);
             this.groupBoxWithBorder1.Controls.Add(this.ms_outboxcode);
             this.groupBoxWithBorder1.Controls.Add(this.pa_packtype);
             this.groupBoxWithBorder1.Controls.Add(this.pa_type);
@@ -277,27 +271,59 @@
             this.groupBoxWithBorder1.Controls.Add(this.pr_outboxinnerqty_label);
             this.groupBoxWithBorder1.Controls.Add(this.pa_code_label);
             this.groupBoxWithBorder1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.groupBoxWithBorder1.Location = new System.Drawing.Point(12, 12);
-            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.groupBoxWithBorder1.Location = new System.Drawing.Point(9, 10);
+            this.groupBoxWithBorder1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBoxWithBorder1.Name = "groupBoxWithBorder1";
-            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.groupBoxWithBorder1.Size = new System.Drawing.Size(589, 196);
+            this.groupBoxWithBorder1.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBoxWithBorder1.Size = new System.Drawing.Size(442, 157);
             this.groupBoxWithBorder1.TabIndex = 173;
             this.groupBoxWithBorder1.TabStop = false;
             this.groupBoxWithBorder1.Text = "原箱信息";
             this.groupBoxWithBorder1.TextColor = System.Drawing.Color.Black;
             // 
+            // pa_weight
+            // 
+            this.pa_weight.AutoSize = true;
+            this.pa_weight.CutLength = null;
+            this.pa_weight.Location = new System.Drawing.Point(237, 84);
+            this.pa_weight.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_weight.Name = "pa_weight";
+            this.pa_weight.Size = new System.Drawing.Size(0, 21);
+            this.pa_weight.TabIndex = 184;
+            this.pa_weight.Visible = false;
+            // 
+            // pa_sccode
+            // 
+            this.pa_sccode.AutoSize = true;
+            this.pa_sccode.CutLength = null;
+            this.pa_sccode.Location = new System.Drawing.Point(229, 76);
+            this.pa_sccode.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_sccode.Name = "pa_sccode";
+            this.pa_sccode.Size = new System.Drawing.Size(0, 21);
+            this.pa_sccode.TabIndex = 183;
+            this.pa_sccode.Visible = false;
+            // 
+            // pa_nextstep
+            // 
+            this.pa_nextstep.AutoSize = true;
+            this.pa_nextstep.CutLength = null;
+            this.pa_nextstep.Location = new System.Drawing.Point(221, 68);
+            this.pa_nextstep.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_nextstep.Name = "pa_nextstep";
+            this.pa_nextstep.Size = new System.Drawing.Size(0, 21);
+            this.pa_nextstep.TabIndex = 182;
+            this.pa_nextstep.Visible = false;
+            // 
             // ms_outboxcode
             // 
             this.ms_outboxcode.AllPower = null;
             this.ms_outboxcode.BackColor = System.Drawing.Color.White;
             this.ms_outboxcode.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.ms_outboxcode.ID = null;
-            this.ms_outboxcode.Location = new System.Drawing.Point(96, 48);
-            this.ms_outboxcode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ms_outboxcode.Location = new System.Drawing.Point(72, 38);
             this.ms_outboxcode.Name = "ms_outboxcode";
             this.ms_outboxcode.Power = null;
-            this.ms_outboxcode.Size = new System.Drawing.Size(145, 27);
+            this.ms_outboxcode.Size = new System.Drawing.Size(110, 23);
             this.ms_outboxcode.Str = null;
             this.ms_outboxcode.Str1 = null;
             this.ms_outboxcode.Str2 = null;
@@ -308,11 +334,10 @@
             // 
             this.pa_packtype.AutoSize = true;
             this.pa_packtype.CutLength = null;
-            this.pa_packtype.Location = new System.Drawing.Point(149, 10);
-            this.pa_packtype.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_packtype.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pa_packtype.Location = new System.Drawing.Point(112, 7);
+            this.pa_packtype.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_packtype.Name = "pa_packtype";
-            this.pa_packtype.Size = new System.Drawing.Size(0, 27);
+            this.pa_packtype.Size = new System.Drawing.Size(0, 21);
             this.pa_packtype.TabIndex = 181;
             this.pa_packtype.Visible = false;
             // 
@@ -320,11 +345,10 @@
             // 
             this.pa_type.AutoSize = true;
             this.pa_type.CutLength = null;
-            this.pa_type.Location = new System.Drawing.Point(533, 18);
-            this.pa_type.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_type.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pa_type.Location = new System.Drawing.Point(400, 14);
+            this.pa_type.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_type.Name = "pa_type";
-            this.pa_type.Size = new System.Drawing.Size(0, 27);
+            this.pa_type.Size = new System.Drawing.Size(0, 21);
             this.pa_type.TabIndex = 180;
             this.pa_type.Visible = false;
             // 
@@ -332,11 +356,10 @@
             // 
             this.pa_custcode.AutoSize = true;
             this.pa_custcode.CutLength = null;
-            this.pa_custcode.Location = new System.Drawing.Point(492, 20);
-            this.pa_custcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_custcode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pa_custcode.Location = new System.Drawing.Point(369, 15);
+            this.pa_custcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_custcode.Name = "pa_custcode";
-            this.pa_custcode.Size = new System.Drawing.Size(0, 27);
+            this.pa_custcode.Size = new System.Drawing.Size(0, 21);
             this.pa_custcode.TabIndex = 179;
             this.pa_custcode.Visible = false;
             // 
@@ -344,11 +367,10 @@
             // 
             this.pa_salecode.AutoSize = true;
             this.pa_salecode.CutLength = null;
-            this.pa_salecode.Location = new System.Drawing.Point(375, 10);
-            this.pa_salecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_salecode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pa_salecode.Location = new System.Drawing.Point(281, 7);
+            this.pa_salecode.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_salecode.Name = "pa_salecode";
-            this.pa_salecode.Size = new System.Drawing.Size(0, 27);
+            this.pa_salecode.Size = new System.Drawing.Size(0, 21);
             this.pa_salecode.TabIndex = 178;
             this.pa_salecode.Visible = false;
             // 
@@ -356,11 +378,10 @@
             // 
             this.pa_level.AutoSize = true;
             this.pa_level.CutLength = null;
-            this.pa_level.Location = new System.Drawing.Point(139, 10);
-            this.pa_level.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_level.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pa_level.Location = new System.Drawing.Point(104, 7);
+            this.pa_level.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_level.Name = "pa_level";
-            this.pa_level.Size = new System.Drawing.Size(0, 27);
+            this.pa_level.Size = new System.Drawing.Size(0, 21);
             this.pa_level.TabIndex = 177;
             this.pa_level.Visible = false;
             // 
@@ -368,65 +389,59 @@
             // 
             this.lastsccode.AutoSize = true;
             this.lastsccode.CutLength = null;
-            this.lastsccode.Location = new System.Drawing.Point(446, 140);
-            this.lastsccode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.lastsccode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.lastsccode.Location = new System.Drawing.Point(334, 111);
+            this.lastsccode.MaximumSize = new System.Drawing.Size(200, 0);
             this.lastsccode.Name = "lastsccode";
-            this.lastsccode.Size = new System.Drawing.Size(0, 27);
+            this.lastsccode.Size = new System.Drawing.Size(0, 21);
             this.lastsccode.TabIndex = 176;
             // 
             // ms_msmakecode
             // 
             this.ms_msmakecode.AutoSize = true;
             this.ms_msmakecode.CutLength = null;
-            this.ms_msmakecode.Location = new System.Drawing.Point(446, 95);
-            this.ms_msmakecode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_msmakecode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.ms_msmakecode.Location = new System.Drawing.Point(334, 75);
+            this.ms_msmakecode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ms_msmakecode.Name = "ms_msmakecode";
-            this.ms_msmakecode.Size = new System.Drawing.Size(0, 27);
+            this.ms_msmakecode.Size = new System.Drawing.Size(0, 21);
             this.ms_msmakecode.TabIndex = 175;
             // 
             // laststepcode
             // 
             this.laststepcode.AutoSize = true;
             this.laststepcode.CutLength = null;
-            this.laststepcode.Location = new System.Drawing.Point(161, 140);
-            this.laststepcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.laststepcode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.laststepcode.Location = new System.Drawing.Point(121, 111);
+            this.laststepcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.laststepcode.Name = "laststepcode";
-            this.laststepcode.Size = new System.Drawing.Size(0, 27);
+            this.laststepcode.Size = new System.Drawing.Size(0, 21);
             this.laststepcode.TabIndex = 174;
             // 
             // ms_prodcode
             // 
             this.ms_prodcode.AutoSize = true;
             this.ms_prodcode.CutLength = null;
-            this.ms_prodcode.Location = new System.Drawing.Point(161, 95);
-            this.ms_prodcode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.ms_prodcode.MaximumSize = new System.Drawing.Size(267, 0);
+            this.ms_prodcode.Location = new System.Drawing.Point(121, 75);
+            this.ms_prodcode.MaximumSize = new System.Drawing.Size(200, 0);
             this.ms_prodcode.Name = "ms_prodcode";
-            this.ms_prodcode.Size = new System.Drawing.Size(0, 27);
+            this.ms_prodcode.Size = new System.Drawing.Size(0, 21);
             this.ms_prodcode.TabIndex = 173;
             // 
             // pa_qty
             // 
             this.pa_qty.AutoSize = true;
             this.pa_qty.CutLength = null;
-            this.pa_qty.Location = new System.Drawing.Point(446, 46);
-            this.pa_qty.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.pa_qty.MaximumSize = new System.Drawing.Size(267, 0);
+            this.pa_qty.Location = new System.Drawing.Point(334, 36);
+            this.pa_qty.MaximumSize = new System.Drawing.Size(200, 0);
             this.pa_qty.Name = "pa_qty";
-            this.pa_qty.Size = new System.Drawing.Size(0, 27);
+            this.pa_qty.Size = new System.Drawing.Size(0, 21);
             this.pa_qty.TabIndex = 172;
             // 
             // label1
             // 
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label1.Location = new System.Drawing.Point(297, 45);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(223, 35);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(92, 27);
+            this.label1.Size = new System.Drawing.Size(74, 21);
             this.label1.TabIndex = 171;
             this.label1.Text = "箱内数量";
             // 
@@ -434,10 +449,9 @@
             // 
             this.pa_currentqty_label.AutoSize = true;
             this.pa_currentqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_currentqty_label.Location = new System.Drawing.Point(297, 140);
-            this.pa_currentqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_currentqty_label.Location = new System.Drawing.Point(223, 111);
             this.pa_currentqty_label.Name = "pa_currentqty_label";
-            this.pa_currentqty_label.Size = new System.Drawing.Size(132, 27);
+            this.pa_currentqty_label.Size = new System.Drawing.Size(106, 21);
             this.pa_currentqty_label.TabIndex = 95;
             this.pa_currentqty_label.Text = "最后所在资源";
             // 
@@ -445,10 +459,9 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(297, 95);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(223, 75);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(101, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(81, 21);
             this.pr_detail_label.TabIndex = 80;
             this.pr_detail_label.Text = "工单/合同";
             // 
@@ -456,10 +469,9 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(13, 95);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(10, 75);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 81;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -467,10 +479,9 @@
             // 
             this.pr_outboxinnerqty_label.AutoSize = true;
             this.pr_outboxinnerqty_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(13, 140);
-            this.pr_outboxinnerqty_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_outboxinnerqty_label.Location = new System.Drawing.Point(10, 111);
             this.pr_outboxinnerqty_label.Name = "pr_outboxinnerqty_label";
-            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(132, 27);
+            this.pr_outboxinnerqty_label.Size = new System.Drawing.Size(106, 21);
             this.pr_outboxinnerqty_label.TabIndex = 97;
             this.pr_outboxinnerqty_label.Text = "最后所在工序";
             // 
@@ -478,18 +489,29 @@
             // 
             this.pa_code_label.AutoSize = true;
             this.pa_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pa_code_label.Location = new System.Drawing.Point(13, 46);
-            this.pa_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pa_code_label.Location = new System.Drawing.Point(10, 36);
             this.pa_code_label.Name = "pa_code_label";
-            this.pa_code_label.Size = new System.Drawing.Size(72, 27);
+            this.pa_code_label.Size = new System.Drawing.Size(58, 21);
             this.pa_code_label.TabIndex = 113;
             this.pa_code_label.Text = "原箱号";
             // 
+            // pa_status
+            // 
+            this.pa_status.AutoSize = true;
+            this.pa_status.CutLength = null;
+            this.pa_status.Location = new System.Drawing.Point(551, 472);
+            this.pa_status.MaximumSize = new System.Drawing.Size(200, 0);
+            this.pa_status.Name = "pa_status";
+            this.pa_status.Size = new System.Drawing.Size(0, 12);
+            this.pa_status.TabIndex = 185;
+            this.pa_status.Visible = false;
+            // 
             // Packing_CartonTransfer
             // 
-            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(1213, 628);
+            this.ClientSize = new System.Drawing.Size(910, 502);
+            this.Controls.Add(this.pa_status);
             this.Controls.Add(this.清除);
             this.Controls.Add(this.sn_code);
             this.Controls.Add(this.sn_code_label);
@@ -497,7 +519,7 @@
             this.Controls.Add(this.groupBoxWithBorder2);
             this.Controls.Add(this.groupBoxWithBorder1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.Name = "Packing_CartonTransfer";
             this.Tag = "Packing!CartonTransfer";
             this.Text = "卡通箱转移";
@@ -546,5 +568,9 @@
         private System.Windows.Forms.Button 清除;
         private CustomControl.ButtonUtil.NormalButton ALLMOVE;
         private CustomControl.TextBoxWithIcon.SnCollectionBox ms_outboxcode;
+        private CustomControl.ValueLabel.ValueLabel pa_nextstep;
+        private CustomControl.ValueLabel.ValueLabel pa_sccode;
+        private CustomControl.ValueLabel.ValueLabel pa_weight;
+        private CustomControl.ValueLabel.ValueLabel pa_status;
     }
 }

+ 13 - 10
UAS_MES_NEW/FunctionCode/Packing/Packing_CartonTransfer.cs

@@ -122,7 +122,7 @@ namespace UAS_MES_NEW.Packing
                     if (ms_outboxcode != "")
                     {
                         sql.Clear();
-                        sql.Append("select pa_id,pa_checkno,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode from package where pa_outboxcode='" + ms_outboxcode + "'");
+                        sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode  from package where pa_outboxcode='" + ms_outboxcode + "'");
                         dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                         if (dtbar.Rows.Count > 0)
                         {
@@ -134,7 +134,7 @@ namespace UAS_MES_NEW.Packing
                             string ob_result = dh.getFieldDataByCondition("oqcbatch", "ob_result", "ob_checkno = '" + pa_checkno + "'").ToString();
                             if (pa_mothercode != "")
                             {
-                                OperateResult.AppendText(">>原箱" + ms_outboxcode + "已装入大箱或栈板"+ pa_mothercode + ",不允许转移\n", Color.Red, sn_code);
+                                OperateResult.AppendText(">>原箱" + ms_outboxcode + "已装入大箱或栈板" + pa_mothercode + ",不允许转移\n", Color.Red, sn_code);
                                 return;
                             }
                             if (PA_DOWNSTATUS == "0")
@@ -171,9 +171,9 @@ namespace UAS_MES_NEW.Packing
                                                     sql.Clear();
                                                     sql.Append("insert into package (PA_ID, PA_OUTBOXCODE,PA_PRODCODE, PA_PACKDATE,");
                                                     sql.Append("PA_LEVEL,PA_PACKAGEQTY,PA_TOTALQTY,PA_MAKECODE,PA_STATUS,PA_INDATE,");
-                                                    sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY)");
+                                                    sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY,pa_nextstep,pa_sccode)");
                                                     sql.Append("values ('" + pa_id + "','" + pa_outboxcode.Text + "','" + msprodcode + "',sysdate,'" + pa_level.Text + "','0','0'");
-                                                    sql.Append(",'" + ms_makecode + "','0',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "')");
+                                                    sql.Append(",'" + ms_makecode + "','0',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "','" + pa_nextstep.Text + "','" + pa_sccode.Text + "')");
                                                     dh.ExecuteSql(sql.GetString(), "insert");
                                                     //删除原明细
                                                     dh.ExecuteSql("delete from packagedetail where pd_paid='" + old_pa_id + "' and pd_barcode = '" + sn_code.Text + "'", "delete");
@@ -186,6 +186,7 @@ namespace UAS_MES_NEW.Packing
                                                     //更新目标箱数量
                                                     dh.UpdateByCondition("package", "pa_currentqty=1, pa_totalqty=1,pa_packageqty=1", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                                                     dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_id = '" + ms_id + "'");
+                                                    dh.UpdateByCondition("oqcbatchdetail", "obd_outboxcode = '" + pa_outboxcode.Text + "'", "obd_sncode = '" + sn_code.Text + "'");
                                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "卡通箱转移", "卡通箱转移,生成目标箱号" + pa_outboxcode.Text + "", sn_code.Text, "");
                                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "卡通箱转移", "序列号:" + sn_code.Text + ",从原箱号:" + ms_outboxcode + "转移至目标箱号:" + pa_outboxcode.Text + "", sn_code.Text, "");
                                                     OperateResult.AppendText(">>序列号:" + sn_code.Text + ",从原箱号:" + ms_outboxcode + "转移至目标箱号:" + pa_outboxcode.Text + "\n", Color.Green);
@@ -267,7 +268,7 @@ namespace UAS_MES_NEW.Packing
                                             }
                                         }
                                         string new_laststepcode = dh.getFieldDataByCondition("packagedetail inner join makeserial on ms_outboxcode=pd_outboxcode and ms_sncode=pd_barcode and ms_prodcode = pd_prodcode", "max(nvl(ms_currentstepcode,ms_stepcode))", "pd_outboxcode='" + pa_outboxcode.Text + "'").ToString();
-                                        if (new_laststepcode!=""&&(new_laststepcode != laststepcode.Text))
+                                        if (new_laststepcode != "" && (new_laststepcode != laststepcode.Text))
                                         {
                                             OperateResult.AppendText(">>目标箱号中的序列号最后所在工序与所录入序列号最后所在工序不一致\n", Color.Red, sn_code);
                                             return;
@@ -285,6 +286,7 @@ namespace UAS_MES_NEW.Packing
                                         //更新目标箱数量
                                         dh.UpdateByCondition("package", "pa_currentqty=nvl(pa_currentqty,0)+ 1,pa_totalqty=nvl(pa_totalqty,0)+1,pa_packageqty=nvl(pa_packageqty ,0)+1", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                                         dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_id = '" + ms_id + "'");
+                                        dh.UpdateByCondition("oqcbatchdetail", "obd_outboxcode = '" + pa_outboxcode.Text + "'", "obd_sncode = '" + sn_code.Text + "'");
                                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ms_makecode, User.UserLineCode, User.UserSourceCode, "卡通箱转移", "序列号:" + sn_code.Text + ",从原箱号:" + ms_outboxcode + "转移至目标箱号:" + pa_outboxcode.Text + "", sn_code.Text, "");
                                         OperateResult.AppendText(">>序列号:" + sn_code.Text + ",从原箱号:" + ms_outboxcode + "转移至目标箱号:" + pa_outboxcode.Text + "\n", Color.Green);
                                         pa_outboxcode_KeyDown(sender, e);
@@ -369,7 +371,7 @@ namespace UAS_MES_NEW.Packing
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode from package where pa_outboxcode='" + ms_outboxcode.Text + "'");
+                sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode from package where pa_outboxcode='" + ms_outboxcode.Text + "'");
                 DataTable dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                 if (dtbar.Rows.Count > 0)
                 {
@@ -383,7 +385,7 @@ namespace UAS_MES_NEW.Packing
         private void ALLMOVE_Click(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode from package where pa_outboxcode='" + ms_outboxcode.Text + "'");
+            sql.Append("select pa_id,pa_checkno,PA_MAKECODE,PA_CURRENTQTY pa_qty,PA_PACKTYPE,nvl(PA_DOWNSTATUS,0) PA_DOWNSTATUS,pa_prodcode  pa_macode,pa_salecode,pa_level,pa_custcode,pa_type,pa_packtype,pa_mothercode,pa_weight,pa_nextstep,pa_status,pa_sccode  from package where pa_outboxcode='" + ms_outboxcode.Text + "'");
             dtbar = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             if (dtbar.Rows.Count > 0)
             {
@@ -431,9 +433,9 @@ namespace UAS_MES_NEW.Packing
                             sql.Clear();
                             sql.Append("insert into package (PA_ID, PA_OUTBOXCODE,PA_PRODCODE, PA_PACKDATE,");
                             sql.Append("PA_LEVEL,PA_PACKAGEQTY,PA_TOTALQTY,PA_MAKECODE,PA_STATUS,PA_INDATE,");
-                            sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY)");
+                            sql.Append("PA_SALECODE,PA_CUSTCODE,PA_TYPE,PA_CURRENTQTY,PA_PACKTYPE,PA_STANDARDQTY,pa_weight,pa_nextstep,pa_sccode,pa_checkno)");
                             sql.Append("values ('" + pa_id + "','" + pa_outboxcode.Text + "','" + pa_macode + "',sysdate,'" + pa_level.Text + "','0','0'");
-                            sql.Append(",'" + pa_makecode + "','0',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "')");
+                            sql.Append(",'" + pa_makecode + "','" + pa_status.Text + "',sysdate,'" + pa_salecode.Text + "','" + pa_custcode.Text + "','" + pa_type.Text + "','0','" + pa_packtype.Text + "','" + pa_standardqty.Text + "','" + pa_weight.Text + "','" + pa_nextstep.Text + "','" + pa_sccode.Text + "','" + pa_checkno + "')");
                             dh.ExecuteSql(sql.GetString(), "insert");
                             ////删除原明细
                             //dh.ExecuteSql("delete from packagedetail where pd_paid='" + old_pa_id + "'", "delete");
@@ -444,10 +446,11 @@ namespace UAS_MES_NEW.Packing
 
                             dh.UpdateByCondition("packagedetail", "PD_OUTBOXCODE = '" + pa_outboxcode.Text + "',PD_PAID = '" + pa_id + "'", "pd_paid='" + old_pa_id + "'");
                             //更新原箱数量
-                            dh.UpdateByCondition("package", "pa_currentqty=0,pa_status=0", "pa_outboxcode = '" + ms_outboxcode.Text + "'");
+                            dh.UpdateByCondition("package", "pa_currentqty=0,pa_status=0,pa_weight = '',pa_checkno = ''", "pa_outboxcode = '" + ms_outboxcode.Text + "'");
                             //更新目标箱数量
                             dh.UpdateByCondition("package", "pa_currentqty=" + int.Parse(pa_qty.Text) + ", pa_totalqty=" + int.Parse(pa_qty.Text) + ",pa_packageqty=" + int.Parse(pa_qty.Text) + "", "pa_outboxcode = '" + pa_outboxcode.Text + "'");
                             dh.UpdateByCondition("makeserial", "ms_outboxcode = '" + pa_outboxcode.Text + "'", "ms_outboxcode = '" + ms_outboxcode.Text + "'");
+                            dh.UpdateByCondition("oqcbatchdetail", "obd_outboxcode = '" + pa_outboxcode.Text + "'", "obd_outboxcode = '" + ms_outboxcode.Text + "'");
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode, User.UserLineCode, User.UserSourceCode, "卡通箱转移", "卡通箱转移,生成目标箱号" + pa_outboxcode.Text + "", "", "");
                             LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, pa_makecode, User.UserLineCode, User.UserSourceCode, "卡通箱转移", "原箱号:" + ms_outboxcode.Text + "全部转移至目标箱号:" + pa_outboxcode.Text + "", "", "");
                             OperateResult.AppendText("原箱号:" + ms_outboxcode.Text + "全部转移至目标箱号:" + pa_outboxcode.Text + "\n", Color.Green);

+ 13 - 4
UAS_MES_NEW/PublicMethod/LogicHandler.cs

@@ -282,16 +282,25 @@ namespace UAS_MES_NEW.PublicMethod
                 return true;
             else
             {
-                dt = (DataTable)dh.ExecuteSql("select msd_makecode from MAKESNRULEDETAIL where  msd_sncode='" + iSnCode + "'", "select");
+                dt = (DataTable)dh.ExecuteSql("select msl_makecode from makesnlist left join make on msl_makecode=ma_code where msl_sncode='" + iSnCode + "' and msl_type='before' and ma_wccode='" + User.WorkCenter + "'", "select");
                 if (dt.Rows.Count > 0)
                 {
-                    oMakeCode = dt.Rows[0]["msd_makecode"].ToString();
+                    oMakeCode = dt.Rows[0]["msl_makecode"].ToString();
                     return true;
                 }
                 else
                 {
-                    oErrorMessage = "序列号:" + iSnCode + " 未归属工单";
-                    return false;
+                    dt = (DataTable)dh.ExecuteSql("select msd_makecode from MAKESNRULEDETAIL left join make on msd_makecode=ma_code  where  msd_sncode='" + iSnCode + "' and msd_type='before' and ma_wccode='" + User.WorkCenter + "'", "select");
+                    if (dt.Rows.Count > 0)
+                    {
+                        oMakeCode = dt.Rows[0]["msd_makecode"].ToString();
+                        return true;
+                    }
+                    else
+                    {
+                        oErrorMessage = "序列号:" + iSnCode + " 未归属工单";
+                        return false;
+                    }
                 }
             }
         }