|
|
@@ -348,23 +348,26 @@ namespace UAS_MES.Make
|
|
|
}
|
|
|
if (int.Parse(pa_currentqty.Text == "" ? "0" : pa_currentqty.Text) == int.Parse(pr_outboxinnerqty.Text))
|
|
|
{
|
|
|
+ float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
|
|
|
if (checkweight.Checked)
|
|
|
{
|
|
|
//检查重量合格
|
|
|
- float weigh = float.Parse(weight.Text.Replace("kg", "").Trim());
|
|
|
- if (weigh > MinWeight && weigh < MaxWeight)
|
|
|
+
|
|
|
+ if (!(weigh >= MinWeight && weigh <= MaxWeight))
|
|
|
{
|
|
|
- dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty,pa_weight='" + weigh + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
- pa_standardqty.Text = "";
|
|
|
- pa_status.Text = "1";
|
|
|
- OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "称量合格\n", Color.Green);
|
|
|
- LastSncode = sn_code.Text;
|
|
|
- if (AutoPrint.Checked)
|
|
|
- Print_Click(new object(), new EventArgs());
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
|
|
|
+ return;
|
|
|
}
|
|
|
- else OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "重量不符合标准重量\n", Color.Red);
|
|
|
}
|
|
|
+ dh.UpdateByCondition("package", "pa_status=1,pa_totalqty=pa_currentqty,pa_packageqty=pa_currentqty,pa_weight='" + weigh + "'", "pa_outboxcode='" + pa_outboxcode.Text + "'");
|
|
|
+ pa_standardqty.Text = "";
|
|
|
+ pa_status.Text = "1";
|
|
|
+ OperateResult.AppendText(">>箱号" + pa_outboxcode.Text + "称量合格\n", Color.Green);
|
|
|
+ LastSncode = sn_code.Text;
|
|
|
+ if (AutoPrint.Checked)
|
|
|
+ Print_Click(new object(), new EventArgs());
|
|
|
}
|
|
|
+
|
|
|
LoadGridData();
|
|
|
sn_code.Clear();
|
|
|
}
|