|
|
@@ -115,9 +115,9 @@ namespace UAS_MES.Make
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- weight.Text = Regex.Replace(serialPort1.ReadLine(), "\\D+", "");
|
|
|
- if (pr_cartonunit.Text == "kg")
|
|
|
- weight.Text = (double.Parse(weight.Text) / 1000).ToString();
|
|
|
+ weight.Text = serialPort1.ReadLine();
|
|
|
+ //if (pr_cartonunit.Text == "kg")
|
|
|
+ // weight.Text = (double.Parse(weight.Text) / 1000).ToString();
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|
|
|
@@ -347,7 +347,8 @@ namespace UAS_MES.Make
|
|
|
if (PR_CHECKCARTONW != "0")
|
|
|
{
|
|
|
//检查重量合格
|
|
|
- if (float.Parse(weight.Text) > MinWeight && float.Parse(weight.Text) < MaxWeight)
|
|
|
+ float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
|
|
|
+ if (weigh > MinWeight && weigh < MaxWeight)
|
|
|
{
|
|
|
dh.UpdateByCondition("package", "pa_status=1,pa_packageqty=pa_currentqty,pa_weight='" + weight.Text + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
pa_standardqty.Text = "";
|