From 07e2efc368f4a06ea28802968b16a7760b80b21a Mon Sep 17 00:00:00 2001 From: "ruoxing.wang" <88384874@qq.com> Date: Fri, 25 Oct 2024 11:32:58 +0800 Subject: [PATCH] =?UTF-8?q?wms=E8=BF=94=E5=96=B7,=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E9=99=90=E5=88=B6.=20=E6=89=8B=E6=89=93=E6=9D=A1=E7=A0=81?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=9C=BA=E5=8F=B0=E5=8F=B7=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- InjectionSearch/FrmBarCodeSearch2408.cs | 27 +++++++++++++++++-------- PaintingPC/Function.cs | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/InjectionSearch/FrmBarCodeSearch2408.cs b/InjectionSearch/FrmBarCodeSearch2408.cs index bbab4f2..3a0cdbe 100644 --- a/InjectionSearch/FrmBarCodeSearch2408.cs +++ b/InjectionSearch/FrmBarCodeSearch2408.cs @@ -396,6 +396,12 @@ namespace InjectionSearch string size = comBoxSizeL.SelectedValue.ToString(); int.TryParse(size, out packageSize); + if(packageSize == 0) + { + MessageBox.Show("该产品规格标包为0,无法打印箱码,请取消后重试."); + return; + } + int allCount = Convert.ToInt32(textBox4.Text.Trim()); int i = allCount % packageSize; @@ -531,12 +537,14 @@ namespace InjectionSearch headTable.Columns.Add("PartName"); headTable.Columns.Add("OneBarCode"); headTable.Columns.Add("BarCode"); + headTable.Columns.Add("Station"); DataRow row = headTable.NewRow(); row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); row["PartNo"] = partNo; row["PartName"] = PartName; row["OneBarCode"] = NewOneCode; row["BarCode"] = newcode; + row["Station"] = comboBox2.Text?.Trim(); string reportName = ConfigurationManager.AppSettings["Printer1"].ToString(); headTable.Rows.Add(row); @@ -823,12 +831,14 @@ namespace InjectionSearch headTable.Columns.Add("PartName"); headTable.Columns.Add("OneBarCode"); headTable.Columns.Add("BarCode"); + headTable.Columns.Add("Station"); DataRow row = headTable.NewRow(); row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); row["PartNo"] = partNo; row["PartName"] = PartName; row["OneBarCode"] = NewOneCode; row["BarCode"] = newcode; + row["Station"] = comboBox2.Text?.Trim(); string reportName = ConfigurationManager.AppSettings["Printer1"].ToString(); headTable.Rows.Add(row); @@ -1003,6 +1013,7 @@ namespace InjectionSearch } catch (Exception ex) { + MessageBox.Show(ex.Message); LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); } } @@ -1126,14 +1137,14 @@ namespace InjectionSearch rp.Report.Print(false); - if (pnBoxReprint.Visible == true) - { - pnBoxReprint.Visible = false; - } - else - { - pnBoxReprint.Visible = true; - } + //if (pnBoxReprint.Visible == true) + //{ + // pnBoxReprint.Visible = false; + //} + //else + //{ + // pnBoxReprint.Visible = true; + //} } private void UpdateBoxRecordPrintState(string UpdatePrinted) { diff --git a/PaintingPC/Function.cs b/PaintingPC/Function.cs index 5e60388..efeb1d6 100644 --- a/PaintingPC/Function.cs +++ b/PaintingPC/Function.cs @@ -1177,7 +1177,7 @@ namespace PaintingPC select count(0) from tb_InspectResult where barcode = '" + barcode + @"' - and inspectResult = '[打磨]' + and inspectResult like '%打磨%' "; object aa = SqlHelper.ExecuteScalar(SqlHelper.SqlConnString, CommandType.Text, sql, null);