Forráskód Böngészése

需要检测重量且未维护重量范围的情况增加提示

Hcsy 7 éve
szülő
commit
2f868ee8d9

+ 5 - 0
UAS-MES/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -140,6 +140,11 @@ namespace UAS_MES.Make
                             double ActualWeight = double.Parse(weight.Text == "" ? "0" : weight.Text.Replace("kg", "").Trim());
                             if (PR_CHECKCOLORBOXW != "0")
                             {
+                                if (MinWeight == 0 || MaxWeight == 0)
+                                {
+                                    OperateResult.AppendText(">>产品" + pr_code.Text + "未维护彩盒重量范围\n", Color.Red);
+                                    return;
+                                }
                                 if ((ActualWeight >= MinWeight) && (ActualWeight <= MaxWeight))
                                 {
                                     OperateResult.AppendText(">>彩盒" + sncode.Text + "重量检测检测合格\n", Color.Green);

+ 5 - 0
UAS-MES/FunctionCode/Make/Make_PackageCollectionWeigh.cs

@@ -456,6 +456,11 @@ namespace UAS_MES.Make
                                         float weigh = float.Parse(ActWeigh);
                                         if (PR_CHECKCARTONW != "0")
                                         {
+                                            if (MinWeight == 0 || MaxWeight == 0)
+                                            {
+                                                OperateResult.AppendText(">>产品" + pr_code.Text + "未维护卡通箱重量范围\n", Color.Red);
+                                                return;
+                                            }
                                             if (!(weigh >= MinWeight && weigh <= MaxWeight) || weigh == 0)
                                             {
                                                 OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);