瀏覽代碼

添加进度提醒,添加扫描切换型号提醒

callm 6 年之前
父節點
當前提交
af96ce9df7
共有 1 個文件被更改,包括 22 次插入0 次删除
  1. 22 0
      UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

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

@@ -65,6 +65,8 @@ namespace UAS_LabelMachine
         //使用二维数组进行排序
         ArrayList<ArrayList<string>> ScanData;
         ArrayList<string> GetData;
+        //用于记录上一个扫描的型号,和当前的不一致则进行弹窗提示
+        string LastSpec = "";
 
         public UAS_出货标签打印(string Master)
         {
@@ -303,6 +305,18 @@ namespace UAS_LabelMachine
                         if (Brand != "")
                             sg_brand.Text = Brand;
                         FindAutoMatch = true;
+                        if ((MatchStr(arr[j].ToString(), "MPN").Contains(orispeccode) || MatchStr(arr[j].ToString(), "MPN").Trim().Replace(" ", "").Contains(orispeccode) || orispeccode == MatchStr(arr[j].ToString(), "MPN")))
+                        {
+                            if (LastSpec == "")
+                            {
+                                LastSpec = orispeccode;
+                            }
+                            if (LastSpec != orispeccode)
+                            {
+                                LastSpec = orispeccode;
+                                MessageBox.Show("切换扫描型号" + orispeccode);
+                            }
+                        }
                         break;
                     }
                 }
@@ -418,6 +432,7 @@ namespace UAS_LabelMachine
                     CheckRecheckStatus();
                     LabelInf.Invalidate();
                     Checking = false;
+                    ProcessRemind();
                 }
                 //采集未通过的时候
                 else
@@ -480,6 +495,12 @@ namespace UAS_LabelMachine
             }
         }
 
+        private void ProcessRemind()
+        {
+            int Count = dh.getRowCount("prodiobarcode", "pib_piid=" + PI_ID + " and pib_ifpick<>0");
+            CollectedCount.Text = Count.ToString();
+        }
+
         List<string> ErrorType = new List<string>();
         /// <summary>
         /// 自定义函数 将匹配之后的值设置到Cell中,传递引用,每次赋值之后从List中移除已使用过的
@@ -779,6 +800,7 @@ namespace UAS_LabelMachine
             BaseUtil.FillDgvWithDataTable(LabelInf, (DataTable)MidSource.DataSource);
             //有数据的话默认取第一条的品牌去取采集策略
             TotalCount.Text = LabelInf.RowCount.ToString();
+            ProcessRemind();
             if (LabelInf.RowCount > 0)
             {
                 Brand = LabelInf.Rows[0].Cells["pib_brand"].FormattedValue.ToString();