|
|
@@ -2495,16 +2495,19 @@ namespace UAS_LabelMachine
|
|
|
string custbarcode = LabelInf.Rows[i].Cells["pib_cusbarcode"].Value.ToString();
|
|
|
//通过接口维护料盘和外箱关系,需要根据箱内容量计算
|
|
|
//判断下一行箱号不一样重新取一个客户外箱号
|
|
|
- if (i - 1 > 0)
|
|
|
+ if (i +1 < LabelInf.Rows.Count)
|
|
|
{
|
|
|
string CurrentOutBoxCode = LabelInf.Rows[i].Cells["pib_outboxcode2"].Value.ToString();
|
|
|
- string NextOutBoxCode = LabelInf.Rows[i - 1].Cells["pib_outboxcode2"].Value.ToString();
|
|
|
+ string NextOutBoxCode = LabelInf.Rows[i + 1].Cells["pib_outboxcode2"].Value.ToString();
|
|
|
if (CurrentOutBoxCode != NextOutBoxCode)
|
|
|
{
|
|
|
NextBoxDiff = true;
|
|
|
InBoxCount = OutboxCapacity.Value - 1;
|
|
|
}
|
|
|
}
|
|
|
+ InBoxCount = InBoxCount + 1;
|
|
|
+ amount += double.Parse(LabelInf.Rows[i].Cells["pib_qty"].Value.ToString());
|
|
|
+ Rowindex.Add(i);
|
|
|
if (NextBoxDiff)
|
|
|
{
|
|
|
//换箱号时
|
|
|
@@ -2526,9 +2529,6 @@ namespace UAS_LabelMachine
|
|
|
MessageLog.AppendText(BaseUtil.ToDictionary(Message, "")["return_message"].ToString() + "\n");
|
|
|
}
|
|
|
}
|
|
|
- InBoxCount = InBoxCount + 1;
|
|
|
- amount += double.Parse(LabelInf.Rows[i].Cells["pib_qty"].Value.ToString());
|
|
|
- Rowindex.Add(i);
|
|
|
//达到容量时
|
|
|
if (InBoxCount == OutboxCapacity.Value)
|
|
|
{
|