callm 6 年 前
コミット
aee206c4c1

+ 5 - 2
UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

@@ -291,7 +291,9 @@ namespace UAS_LabelMachine
                 for (int j = 0; j < arr.Length; j++)
                 {
                     string orispeccode = LabelInf.Rows[i].Cells["pr_orispeccode"].Value.ToString();
-                    if ((MatchStr(arr[j].ToString(), "MPN").Contains(orispeccode) || MatchStr(arr[j].ToString(), "MPN").Trim().Contains(orispeccode) || orispeccode == MatchStr(arr[j].ToString(), "MPN") || LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString() == MatchStr(arr[j].ToString(), "CPN")) && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
+                    Console.WriteLine((MatchStr(arr[j].ToString(), "MPN")));
+                    Console.WriteLine(MatchStr(arr[j].ToString(), "MPN").Trim().Replace(" ",""));
+                    if ((MatchStr(arr[j].ToString(), "MPN").Contains(orispeccode) || MatchStr(arr[j].ToString(), "MPN").Trim().Replace(" ","").Contains(orispeccode) || orispeccode == MatchStr(arr[j].ToString(), "MPN") || LabelInf.Rows[i].Cells["pd_custprodcode"].Value.ToString() == MatchStr(arr[j].ToString(), "CPN")) && LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
                     {
                         CurrentRowIndex = i;
                         if (CurrentRowIndex - 5 > 0)
@@ -515,7 +517,8 @@ namespace UAS_LabelMachine
                             cell = LabelInf.Rows[CurrentRowIndex].Cells["pr_orispeccode"];
                             Matchstr = MatchStr(data[j], "MPN");
                             //采集的供应商号不匹配的话
-                            if (cell.Value.ToString() == Matchstr || Matchstr.Trim().Contains(cell.Value.ToString()) || Matchstr.Contains(cell.Value.ToString()))
+                            Console.WriteLine(Matchstr.Trim().Replace(" ", ""));
+                            if (cell.Value.ToString() == Matchstr || Matchstr.Trim().Replace(" ","").Contains(cell.Value.ToString()) || Matchstr.Contains(cell.Value.ToString()))
                             {
                                 ErrorType.Add("OK_MPN");
                                 LabelInf.Refresh();