瀏覽代碼

修改打印中盒的BUG

章政 8 年之前
父節點
當前提交
9113262f79
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      UAS-出货标签管理/UAS_出货标签管理.cs

+ 6 - 3
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1484,19 +1484,22 @@ namespace UAS_LabelMachine
                 MidBoxCacheData.Clear();
                 BaseUtil.CleanDataTable(MidBoxCacheData);
                 List<int> MidOutBoxCode = new List<int>();
+                List<int> MidOutBoxCodeIndex = new List<int>();
                 string la_id = MidLabelCombox.SelectedValue.ToString().Split('#')[0];
                 for (int i = 0; i < LabelInf.Rows.Count; i++)
                 {
                     if (!MidIDAndOutboxcode.ContainsValue(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()))
                         MidIDAndOutboxcode.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString(), LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
-                    if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()))) {
+                    if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())))
+                    {
                         MidOutBoxCode.Add(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()));
+                        MidOutBoxCodeIndex.Add(i);
                     }
                 }
                 GetMidBoxData();
-                for (int i = 0; i < MidOutBoxCode.Count; i++)
+                for (int i = 0; i < MidOutBoxCodeIndex.Count; i++)
                 {
-                    MidBoxCodePrint(la_id, MidOutBoxCode[i],"HanlePrint");
+                    MidBoxCodePrint(la_id, MidOutBoxCodeIndex[i], "HanlePrint");
                 }
                 MidBoxArgument.Clear();
                 MidBoxCacheData.Clear();