Browse Source

调整外箱号BUG

章政 7 years ago
parent
commit
bde01536db
1 changed files with 5 additions and 2 deletions
  1. 5 2
      UAS-出货标签管理/UAS_出货标签管理.cs

+ 5 - 2
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -2421,9 +2421,12 @@ namespace UAS_LabelMachine
                 for (int i = 0; i < LabelInf.Rows.Count; i++)
                 {
                     LabelInf.Rows[i].Cells["pib_outboxcode2"].Value = BoxCode;
-                    if (int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()) % OutboxCapacity.Value == 0)
+                    if (i + 1 < LabelInf.Rows.Count + 1)
                     {
-                        BoxCode = BoxCode + 1;
+                        if (int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()) % OutboxCapacity.Value == 0 && (LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString() != LabelInf.Rows[i + 1].Cells["pib_outboxcode1"].Value.ToString()))
+                        {
+                            BoxCode = BoxCode + 1;
+                        }
                     }
                 }
             }