|
|
@@ -420,7 +420,8 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- SingleReport.Load(SingleLabelCombox.Text);
|
|
|
+ if(!SingleLabelCombox.SelectedValue.ToString().Contains("System.Data.DataRowView"))
|
|
|
+ SingleReport.Load(SingleLabelCombox.SelectedValue.ToString());
|
|
|
DataTable dt = (DataTable)dh.ExecuteSql("select * from prodiosingleinfo_view where 主键ID in (" + pibid + ")", "select");
|
|
|
SingleReport.RegisterData(dt, "prodiosingleinfo_view");
|
|
|
SingleReport.GetDataSource("prodiosingleinfo_view").Enabled = true;
|
|
|
@@ -1579,15 +1580,18 @@ namespace UAS_LabelMachine
|
|
|
List<string> MidBoxCode = new List<string>();
|
|
|
List<string> PIBID = new List<string>();
|
|
|
List<string> PIBOUTBOXCODE1 = new List<string>();
|
|
|
- DataTable dt1 = (DataTable)dh.ExecuteSql("select pib_id from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + dt.Rows[i]["pib_outboxcode2"].ToString() + "' and pib_outboxcode1 is null order by to_number(pib_id)", "select");
|
|
|
+ DataTable dt1 = (DataTable)dh.ExecuteSql("select pib_id,pib_prodcode from prodiobarcode where pib_inoutno='" + pi_inoutno.Text + "' and pib_outboxcode2='" + dt.Rows[i]["pib_outboxcode2"].ToString() + "' and pib_outboxcode1 is null order by to_number(pib_id)", "select");
|
|
|
//如果不是10的整数倍则为尾盒
|
|
|
+ int tencount = 0;
|
|
|
for (int j = 0; j < dt1.Rows.Count; j++)
|
|
|
{
|
|
|
- if (j % 10 == 0)
|
|
|
+ if (tencount % 10 == 0||(dt1.Rows[j]["pib_prodcode"].ToString()!=dt1.Rows[j-1]["pib_prodcode"].ToString()))
|
|
|
{
|
|
|
pib_outboxcode1 = pib_outboxcode1 + 1;
|
|
|
MaxNum = MaxNum + 1;
|
|
|
+ tencount = 0;
|
|
|
}
|
|
|
+ tencount = tencount + 1;
|
|
|
string serialcode = BaseUtil.DToAny(MaxNum, Radix);
|
|
|
for (int k = serialcode.ToString().Length; k < NumLength; k++)
|
|
|
{
|