Browse Source

未称重不允许打印

callm 8 months ago
parent
commit
41b0badf76

+ 6 - 1
UAS_MES_LGDZ/FunctionCode/Packing/Packing_CartonBoxWeigh_ReadLine.cs

@@ -162,7 +162,7 @@ namespace UAS_MES_NEW.Packing
                         LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "卡通箱" + outboxcode.Text + "称重", "称量完成:" + weight.Text.Trim(), outboxcode.Text, "");
                         LogicHandler.RecordProdWeight(outboxcode.Text, "CARTON", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                     }
-                   
+
                     ListViewItem lsi = new ListViewItem();
                     lsi.SubItems.Add(outboxcode.Text);
                     lsi.SubItems.Add(ActualWeight.ToString() + pr_cartonunit.Text);
@@ -244,6 +244,11 @@ namespace UAS_MES_NEW.Packing
         private void Confirm_Click(object sender, EventArgs e)
         {
             //doc = lbl.Documents.Open(PrintLabel.Text);
+            if (dh.CheckExist("package", "pa_outboxcode='" + outboxcode.Text + "' and pa_weight is null"))
+            {
+                OperateResult.AppendText(">>箱号" + outboxcode.Text + "未称重,不允许打印\n", Color.Red);
+                return;
+            }
             string ErrorMessage = "";
             if (!Print.BarTender(Tag.ToString(), ref engine, PrintLabel.Text, PrintLabel.SelectedValue.ToString(), PrinterList.Text, outboxcode.Text, int.Parse(PrintNum.Text), ma_code.Text, pr_code.Text, "卡通箱标", "0", out ErrorMessage))
             {