Browse Source

wms返喷,次数限制. 手打条码显示机台号等

master
ruoxing.wang 3 weeks ago
parent
commit
07e2efc368
  1. 27
      InjectionSearch/FrmBarCodeSearch2408.cs
  2. 2
      PaintingPC/Function.cs

27
InjectionSearch/FrmBarCodeSearch2408.cs

@ -396,6 +396,12 @@ namespace InjectionSearch
string size = comBoxSizeL.SelectedValue.ToString(); string size = comBoxSizeL.SelectedValue.ToString();
int.TryParse(size, out packageSize); int.TryParse(size, out packageSize);
if(packageSize == 0)
{
MessageBox.Show("该产品规格标包为0,无法打印箱码,请取消后重试.");
return;
}
int allCount = Convert.ToInt32(textBox4.Text.Trim()); int allCount = Convert.ToInt32(textBox4.Text.Trim());
int i = allCount % packageSize; int i = allCount % packageSize;
@ -531,12 +537,14 @@ namespace InjectionSearch
headTable.Columns.Add("PartName"); headTable.Columns.Add("PartName");
headTable.Columns.Add("OneBarCode"); headTable.Columns.Add("OneBarCode");
headTable.Columns.Add("BarCode"); headTable.Columns.Add("BarCode");
headTable.Columns.Add("Station");
DataRow row = headTable.NewRow(); DataRow row = headTable.NewRow();
row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss");
row["PartNo"] = partNo; row["PartNo"] = partNo;
row["PartName"] = PartName; row["PartName"] = PartName;
row["OneBarCode"] = NewOneCode; row["OneBarCode"] = NewOneCode;
row["BarCode"] = newcode; row["BarCode"] = newcode;
row["Station"] = comboBox2.Text?.Trim();
string reportName = ConfigurationManager.AppSettings["Printer1"].ToString(); string reportName = ConfigurationManager.AppSettings["Printer1"].ToString();
headTable.Rows.Add(row); headTable.Rows.Add(row);
@ -823,12 +831,14 @@ namespace InjectionSearch
headTable.Columns.Add("PartName"); headTable.Columns.Add("PartName");
headTable.Columns.Add("OneBarCode"); headTable.Columns.Add("OneBarCode");
headTable.Columns.Add("BarCode"); headTable.Columns.Add("BarCode");
headTable.Columns.Add("Station");
DataRow row = headTable.NewRow(); DataRow row = headTable.NewRow();
row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss"); row["PrintTime"] = GetDateTime().ToString("yyyy/MM/dd HH:mm:ss");
row["PartNo"] = partNo; row["PartNo"] = partNo;
row["PartName"] = PartName; row["PartName"] = PartName;
row["OneBarCode"] = NewOneCode; row["OneBarCode"] = NewOneCode;
row["BarCode"] = newcode; row["BarCode"] = newcode;
row["Station"] = comboBox2.Text?.Trim();
string reportName = ConfigurationManager.AppSettings["Printer1"].ToString(); string reportName = ConfigurationManager.AppSettings["Printer1"].ToString();
headTable.Rows.Add(row); headTable.Rows.Add(row);
@ -1003,6 +1013,7 @@ namespace InjectionSearch
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message);
LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod()); LogErrBLL.AddInfo(ex.ToString(), MethodBase.GetCurrentMethod());
} }
} }
@ -1126,14 +1137,14 @@ namespace InjectionSearch
rp.Report.Print(false); rp.Report.Print(false);
if (pnBoxReprint.Visible == true) //if (pnBoxReprint.Visible == true)
{ //{
pnBoxReprint.Visible = false; // pnBoxReprint.Visible = false;
} //}
else //else
{ //{
pnBoxReprint.Visible = true; // pnBoxReprint.Visible = true;
} //}
} }
private void UpdateBoxRecordPrintState(string UpdatePrinted) private void UpdateBoxRecordPrintState(string UpdatePrinted)
{ {

2
PaintingPC/Function.cs

@ -1177,7 +1177,7 @@ namespace PaintingPC
select count(0) select count(0)
from tb_InspectResult from tb_InspectResult
where barcode = '" + barcode + @"' where barcode = '" + barcode + @"'
and inspectResult = '[]' and inspectResult like '%%'
"; ";
object aa = SqlHelper.ExecuteScalar(SqlHelper.SqlConnString, CommandType.Text, sql, null); object aa = SqlHelper.ExecuteScalar(SqlHelper.SqlConnString, CommandType.Text, sql, null);

Loading…
Cancel
Save