|
@@ -799,7 +799,7 @@ namespace UAS_LabelMachine
|
|
|
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)
|
|
|
+ if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode && SelectMidBoxCode == LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())
|
|
|
{
|
|
|
if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())))
|
|
|
{
|
|
@@ -814,7 +814,7 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
for (int i = SelectRowIndex; i < LabelInf.Rows.Count - 1; i++)
|
|
|
{
|
|
|
- if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode)
|
|
|
+ if (LabelInf.Rows[i].Cells["pib_prodcode"].Value.ToString() == SelectProdcode && SelectMidBoxCode == LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())
|
|
|
{
|
|
|
if (!MidOutBoxCode.Contains(int.Parse(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString())))
|
|
|
{
|
|
@@ -1087,7 +1087,8 @@ namespace UAS_LabelMachine
|
|
|
sql.Append("pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifprint,0)pib_ifprint from prodiobarcode left join ");
|
|
|
sql.Append("prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode ");
|
|
|
sql.Append("left join sale on sa_code=pib_ordercode left join PRODJOINVENDDETAIL on pjd_brand =pd_brand and pjd_prodcode=pd_prodcode where pib_piid='" + PI_ID + "' ");
|
|
|
- if (OutBoxNum.Text != "全部") {
|
|
|
+ if (OutBoxNum.Text != "全部")
|
|
|
+ {
|
|
|
sql.Append(" and pib_outboxcode2='" + OutBoxNum.Text + "' ");
|
|
|
}
|
|
|
sql.Append(" order by to_number(pib_outboxcode2),pib_id,pd_prodcode");
|
|
@@ -1096,6 +1097,7 @@ namespace UAS_LabelMachine
|
|
|
if (LabelInf.Rows.Count > 0)
|
|
|
{
|
|
|
LabelInf.FirstDisplayedScrollingRowIndex = LabelInf.Rows.Count - 1;
|
|
|
+ LabelInf.Rows[LabelInf.Rows.Count - 1].Selected = true;
|
|
|
}
|
|
|
double CollectNum = 0;
|
|
|
double OutNum = 0;
|
|
@@ -1766,5 +1768,14 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
LoadGridData(sender, e);
|
|
|
}
|
|
|
+
|
|
|
+ private void LabelInf_SelectionChanged(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ DataGridViewSelectedRowCollection dsc = LabelInf.SelectedRows;
|
|
|
+ if (dsc.Count > 0)
|
|
|
+ {
|
|
|
+ SelectRowIndex = dsc[0].Index;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|