Pārlūkot izejas kodu

卡通箱拆箱加扫SN号带出箱号

shim 8 gadi atpakaļ
vecāks
revīzija
1c79f4368a
1 mainītis faili ar 13 papildinājumiem un 6 dzēšanām
  1. 13 6
      UAS-MES/FunctionCode/Packing/Packing_CartonSplit.cs

+ 13 - 6
UAS-MES/FunctionCode/Packing/Packing_CartonSplit.cs

@@ -63,12 +63,12 @@ namespace UAS_MES.Packing
                     OperateResult.AppendText("<<输入不能为空\n", Color.Red);
                     return;
                 }
-                //判断箱号是否为空
-                if (pa_outboxcode.Text == "")
-                {
-                    OperateResult.AppendText("<<请先选择箱号\n", Color.Red, sncode);
-                    return;
-                }
+                //根据序列号带出箱号
+                //if (pa_outboxcode.Text == "")
+                //{
+                //    OperateResult.AppendText("<<请先选择箱号\n", Color.Red, sncode);
+                //    return;
+                //}
                 OperateResult.AppendText(">>" + sncode.Text + "\n", Color.Black);
                 if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out error))
                 {
@@ -86,6 +86,13 @@ namespace UAS_MES.Packing
                         OperateResult.AppendText("<<序列号" + sncode.Text + "未装箱\n", Color.Red, sncode);
                         return;
                     }
+                    //没填箱号,就赋值箱号
+                    if (pa_outboxcode.Text == "")
+                    {
+                        pa_outboxcode.Text = outboxcode;
+                        //勾上
+                        lock_outbox.Checked = true;
+                    }
                     if (pa_outboxcode.Text != outboxcode)
                     {
                         OperateResult.AppendText("<<序列号" + sncode.Text + "箱号为:" + outboxcode + ",不在箱号:" + pa_outboxcode.Text + "中,无法拆箱\n", Color.Red, sncode);