|
|
@@ -780,11 +780,11 @@ namespace UAS_LabelMachine
|
|
|
MidOutBoxCode.Clear();
|
|
|
MidOutBoxCodeIndex.Clear();
|
|
|
SelectProdcode = LabelInf.Rows[SelectRowIndex].Cells["pib_prodcode"].Value.ToString();
|
|
|
- SelectMidBoxCode = LabelInf.Rows[SelectRowIndex].Cells["pib_outboxcode1"].Value.ToString();
|
|
|
for (int i = SelectRowIndex; i >= 0; i--)
|
|
|
{
|
|
|
- if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode && SelectMidBoxCode == LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())
|
|
|
+ if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode && LabelInf.Rows[i].Cells["pib_ifprint"].FormattedValue.ToString() != "true")
|
|
|
{
|
|
|
+ LabelInf.Rows[i].Cells["pib_ifprint"].Value = true;
|
|
|
if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())))
|
|
|
{
|
|
|
MidOutBoxCode.Add(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()));
|
|
|
@@ -798,8 +798,9 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
for (int i = SelectRowIndex; i < LabelInf.Rows.Count - 1; i++)
|
|
|
{
|
|
|
- if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode && SelectMidBoxCode == LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())
|
|
|
+ if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode && LabelInf.Rows[i].Cells["pib_ifprint"].Value.ToString()!="true")
|
|
|
{
|
|
|
+ LabelInf.Rows[i].Cells["pib_ifprint"].Value = true;
|
|
|
if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())))
|
|
|
{
|
|
|
MidOutBoxCode.Add(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()));
|
|
|
@@ -939,7 +940,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
//名称相等的时候,取SQL进行值的查询
|
|
|
DataTable dt;
|
|
|
- if (MidLabelAutoPrint.Checked || SelectRowIndex > 0)
|
|
|
+ if (MidLabelAutoPrint.Checked)
|
|
|
{
|
|
|
dt = (DataTable)dh.ExecuteSql("select * from prodiomidinfo_view where 出货单号='" + pi_inoutno.Text + "' and 中盒号 in(" + pib_outboxcode1 + ")", "select");
|
|
|
}
|
|
|
@@ -967,6 +968,7 @@ namespace UAS_LabelMachine
|
|
|
MidReport.PrintSettings.ShowDialog = false;
|
|
|
MidReport.PrintSettings.Printer = MidLabelPrinter.Text;
|
|
|
MidReport.Print();
|
|
|
+ dh.UpdateByCondition("prodiobarcode", "pib_ifprint=1", "pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode1 in (" + pib_outboxcode1 + ")");
|
|
|
SelectRowIndex = -1;
|
|
|
}
|
|
|
Properties.Settings.Default.MPrinter = MidLabelPrinter.Text;
|
|
|
@@ -1733,7 +1735,6 @@ namespace UAS_LabelMachine
|
|
|
LoadPrcodeData();
|
|
|
}
|
|
|
string SelectProdcode = "";
|
|
|
- string SelectMidBoxCode = "";
|
|
|
int SelectRowIndex = -1;
|
|
|
private void LabelInf_CellClick(object sender, DataGridViewCellEventArgs e)
|
|
|
{
|