|
|
@@ -292,8 +292,8 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
string orispeccode = LabelInf.Rows[i].Cells["pr_orispeccode"].Value.ToString();
|
|
|
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")
|
|
|
+ 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)
|
|
|
@@ -518,9 +518,10 @@ namespace UAS_LabelMachine
|
|
|
Matchstr = MatchStr(data[j], "MPN");
|
|
|
//采集的供应商号不匹配的话
|
|
|
Console.WriteLine(Matchstr.Trim().Replace(" ", ""));
|
|
|
- if (cell.Value.ToString() == Matchstr || Matchstr.Trim().Replace(" ","").Contains(cell.Value.ToString()) || Matchstr.Contains(cell.Value.ToString()))
|
|
|
+ if (cell.Value.ToString() == Matchstr || Matchstr.Trim().Replace(" ", "").Contains(cell.Value.ToString()) || Matchstr.Contains(cell.Value.ToString()))
|
|
|
{
|
|
|
ErrorType.Add("OK_MPN");
|
|
|
+ BaseUtil.PlaySound("OK.wav");
|
|
|
LabelInf.Refresh();
|
|
|
CollectVeProdCodePass = true;
|
|
|
}
|
|
|
@@ -528,6 +529,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
ErrorType.Add("NG_MPN");
|
|
|
CollectVeProdCodePass = false;
|
|
|
+ BaseUtil.PlaySound("NG.wav");
|
|
|
//添加需要重绘的Cell
|
|
|
LabelInf.Refresh();
|
|
|
MessageLog.AppendText(">>供应商物料编号不匹配\n", Color.Red);
|
|
|
@@ -560,6 +562,7 @@ namespace UAS_LabelMachine
|
|
|
if (cell.Value.ToString() != Matchstr)
|
|
|
{
|
|
|
ErrorType.Add("NG_CPN");
|
|
|
+ BaseUtil.PlaySound("NG.wav");
|
|
|
CollectQTYPass = false;
|
|
|
LabelInf.Refresh();
|
|
|
MessageLog.AppendText(">>CPN不匹配\n", Color.Red);
|
|
|
@@ -567,6 +570,7 @@ namespace UAS_LabelMachine
|
|
|
else
|
|
|
{
|
|
|
ErrorType.Add("OK_CPN");
|
|
|
+ BaseUtil.PlaySound("OK.wav");
|
|
|
LabelInf.Refresh();
|
|
|
CollectQTYPass = true;
|
|
|
}
|
|
|
@@ -1032,5 +1036,28 @@ namespace UAS_LabelMachine
|
|
|
LoadGridData(sender, e);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void CollectAll_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ int PickedCount = 0;
|
|
|
+ for (int i = 0; i < LabelInf.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ if (LabelInf.Rows[i].Cells["pib_ifpick"].FormattedValue.ToString() != "True")
|
|
|
+ {
|
|
|
+ LabelInf.Rows[i].Cells["pib_ifpick"].Value = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ PickedCount = PickedCount + 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (PickedCount == LabelInf.Rows.Count)
|
|
|
+ {
|
|
|
+ for (int i = 0; i < LabelInf.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ LabelInf.Rows[i].Cells["pib_ifpick"].Value = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|