Browse Source

只是记录重量,没有电子秤也能过

章政 8 years ago
parent
commit
178cc18c59
1 changed files with 1 additions and 1 deletions
  1. 1 1
      UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_SpecialCartonPack.cs

@@ -112,7 +112,7 @@ namespace UAS_MES.Make
                             {
                                 weight.Text = Regex.Replace(serialPort1.ReadLine(), "\\D+", "");
                                 if (pr_cartonunit.Text == "kg")
-                                    weight.Text = (double.Parse(weight.Text) / 1000).ToString();
+                                    weight.Text = (double.Parse(weight.Text == "" ? "0" : weight.Text) / 1000).ToString();
                             }
                             catch (Exception)
                             {