|
@@ -225,7 +225,7 @@ namespace UAS_LabelMachine
|
|
|
if (Input.Text == "")
|
|
|
{
|
|
|
richTextAutoBottom1.AppendText("采集的数据不能为空\n");
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N")));
|
|
|
return;
|
|
|
}
|
|
|
CollectInputData();
|
|
@@ -251,7 +251,7 @@ namespace UAS_LabelMachine
|
|
|
richTextAutoBottom1.AppendText("数据格式错误,无法解析\n");
|
|
|
if (ConnectToMachine)
|
|
|
{
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|Y"));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N")));
|
|
|
}
|
|
|
//Input.SelectAll();
|
|
|
return;
|
|
@@ -292,7 +292,7 @@ namespace UAS_LabelMachine
|
|
|
richTextAutoBottom1.AppendText("当前采集【物料编号" + Data["PRCODE"] + "】不对应,请重新采集\n");
|
|
|
//Input.SelectAll();
|
|
|
if (ConnectToMachine)
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
@@ -315,7 +315,7 @@ namespace UAS_LabelMachine
|
|
|
richTextAutoBottom1.AppendText("当前采集【物料编号" + Data["PRCODE"] + "】没有需要采集的内容\n");
|
|
|
//Input.SelectAll();
|
|
|
if (ConnectToMachine)
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -326,7 +326,7 @@ namespace UAS_LabelMachine
|
|
|
if (ConnectToMachine)
|
|
|
{
|
|
|
richTextAutoBottom1.AppendText("物料" + Data["PRCODE"] + "【DateCode】超出校验日期\n");
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
@@ -341,7 +341,7 @@ namespace UAS_LabelMachine
|
|
|
if (ConnectToMachine)
|
|
|
{
|
|
|
richTextAutoBottom1.AppendText("当前采集【品牌" + Data["BRAND"] + "】不对应\n");
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
return;
|
|
|
}
|
|
|
else
|
|
@@ -370,7 +370,7 @@ namespace UAS_LabelMachine
|
|
|
richTextAutoBottom1.AppendText("物料" + Data["PRCODE"] + "采集数量无法按照最小包装数拆分\n");
|
|
|
//Input.SelectAll();
|
|
|
if (ConnectToMachine)
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
return;
|
|
|
}
|
|
|
CodeCount = int.Parse((double.Parse(Data["QTY"]) / 1000 / double.Parse(CurrentZXBZ)).ToString());
|
|
@@ -382,7 +382,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
richTextAutoBottom1.AppendText("采集【数量】无法按照最小包装数拆分\n");
|
|
|
if (ConnectToMachine)
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
//Input.SelectAll();
|
|
|
return;
|
|
|
}
|
|
@@ -516,7 +516,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
richTextAutoBottom1.AppendText("物料" + Data["PRCODE"] + "采集后数量为" + (CollectQty + CollectNum) + ",【超出】本行出货数量" + CurrentPrCount + "\n");
|
|
|
if (ConnectToMachine)
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|NG|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
//Input.SelectAll();
|
|
|
return;
|
|
|
}
|
|
@@ -547,9 +547,9 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
sql.Clear();
|
|
|
sql.Append("insert into prodiobarcode(PIB_ID,PIB_PRODCODE,PIB_INDATE,PIB_INOUTNO,PIB_PIID,PIB_PDNO, PIB_PDID,PIB_PICLASS,");
|
|
|
- sql.Append("PIB_BARCODE,PIB_CUSTBARCODE,PIB_QTY,pib_brand,pib_datecode,pib_lotno,PIB_OUTBOXCODE2,pib_inman,PIB_IFPRINT,PIB_ORDERCODE,PIB_CUSTPO,pib_remark,pib_midcapatity,pib_custcode) ");
|
|
|
+ sql.Append("PIB_BARCODE,PIB_CUSTBARCODE,PIB_QTY,pib_brand,pib_datecode,pib_lotno,PIB_OUTBOXCODE2,pib_inman,PIB_IFPRINT,PIB_ORDERCODE,PIB_CUSTPO,pib_remark,pib_midcapatity,pib_custcode,pib_ismachine) ");
|
|
|
sql.Append("select :PIB_ID,pd_prodcode,sysdate,pi_inoutno,pi_id,pd_pdno,pd_id,pi_class,");
|
|
|
- sql.Append("'" + pib_barcode + "',:PIB_CUSTBARCODE,'" + CurrentZXBZ + "','" + Data["BRAND"] + "','" + Data["DATECODE"] + "','" + Data["LOTNO"] + "','" + pib_outboxcode2 + "','" + User.UserCode + "','" + (EnablePrint && SingleLabelAutoPrint.Checked ? 1 : 0).ToString() + "',pd_ordercode,pd_pocode,pd_remark,'" + MidboxCapacity.Value + "','" + pi_cardcode.Text + "' ");
|
|
|
+ sql.Append("'" + pib_barcode + "',:PIB_CUSTBARCODE,'" + CurrentZXBZ + "','" + Data["BRAND"] + "','" + Data["DATECODE"] + "','" + Data["LOTNO"] + "','" + pib_outboxcode2 + "','" + User.UserCode + "','" + (EnablePrint && SingleLabelAutoPrint.Checked ? 1 : 0).ToString() + "',pd_ordercode,pd_pocode,pd_remark,'" + MidboxCapacity.Value + "','" + pi_cardcode.Text + "','" + (ConnectToMachine ? "Y" : "N") + "' ");
|
|
|
sql.Append("from prodinout left join prodiodetail on pi_id=pd_piid left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode where pi_id='" + PI_ID + "' and pd_prodcode='" + CurrentPrCode + "' and pd_pdno='" + CurrentPDNO + "'");
|
|
|
int rowsnum = 0;
|
|
|
try
|
|
@@ -606,7 +606,7 @@ namespace UAS_LabelMachine
|
|
|
BaseUtil.SetFormCenter(stw);
|
|
|
stw.ShowDialog();
|
|
|
if (ConnectToMachine)
|
|
|
- receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|OK|,|Y")));
|
|
|
+ receiveClient.Client.Send(Encoding.ASCII.GetBytes(GetSendCode("ReadId1|,|OK|,|" + (SingleLabelAutoPrint.Checked ? "Y" : "N"))));
|
|
|
}
|
|
|
else
|
|
|
{
|