|
|
@@ -27,10 +27,6 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
DataTable dt;
|
|
|
/// <summary>
|
|
|
- /// 已经打印过的外箱号
|
|
|
- /// </summary>
|
|
|
- List<string> PrintedOutboxCode = new List<string>();
|
|
|
- /// <summary>
|
|
|
/// 已经打印过的Vivo外箱号
|
|
|
/// </summary>
|
|
|
List<string> PrintedVivoOutboxCode = new List<string>();
|
|
|
@@ -1608,11 +1604,9 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
for (int h = 0; h < LabelInf.RowCount; h++)
|
|
|
{
|
|
|
- if (LabelInf.Rows[h].Cells["pib_outboxcode2"].Value.ToString() == Outboxcode.ToArray()[i] && (!PrintedOutboxCode.Contains(Outboxcode.ToArray()[i])))
|
|
|
+ if (LabelInf.Rows[h].Cells["pib_outboxcode2"].Value.ToString() == Outboxcode.ToArray()[i])
|
|
|
{
|
|
|
OutBoxCodePrint(la_id, h);
|
|
|
- //添加到已打印的列表中
|
|
|
- PrintedOutboxCode.Add(Outboxcode.ToArray()[i]);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -1620,6 +1614,10 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
catch { }
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("请勾选需要打印的外箱");
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -2024,8 +2022,6 @@ namespace UAS_LabelMachine
|
|
|
private void LoadGridData(object sender, EventArgs e)
|
|
|
{
|
|
|
AllCollect = false;
|
|
|
- //加载数据的时候清除已打印的序列
|
|
|
- PrintedOutboxCode.Clear();
|
|
|
PrintedVivoOutboxCode.Clear();
|
|
|
//如果是富为则使用特殊的查询语句
|
|
|
if (DataHelper.DBConnectionString.Contains("richwell") || DataHelper.DBConnectionString.Contains("192.168.0.88"))
|
|
|
@@ -2298,18 +2294,24 @@ namespace UAS_LabelMachine
|
|
|
try { OutboxCapacity.Value = (decimal)dt.Rows[0]["pr_qtyperplace"] / (decimal)dt.Rows[0]["pr_zxbzs"]; }
|
|
|
catch (Exception) { }
|
|
|
}
|
|
|
- for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
+ try
|
|
|
{
|
|
|
- int pd_qty = int.Parse(dt.Rows[i]["pd_qty"].ToString());
|
|
|
- int pr_zxbzs = int.Parse(dt.Rows[i]["pr_zxbzs"].ToString());
|
|
|
- int pd_cartons = int.Parse(dt.Rows[i]["pd_cartons"].ToString());
|
|
|
- for (int j = 0; j < pd_qty * pd_cartons / pr_zxbzs; j++)
|
|
|
+ for (int i = 0; i < dt.Rows.Count; i++)
|
|
|
{
|
|
|
- LabelInf.Rows[Current].Cells["pib_outboxcode2"].Value = dt.Rows[i]["pd_cartonno"].ToString();
|
|
|
- Current++;
|
|
|
+ int pd_qty = int.Parse(dt.Rows[i]["pd_qty"].ToString());
|
|
|
+ int pr_zxbzs = int.Parse(dt.Rows[i]["pr_zxbzs"].ToString());
|
|
|
+ int pd_cartons = int.Parse(dt.Rows[i]["pd_cartons"].ToString());
|
|
|
+ for (int j = 0; j < pd_qty * pd_cartons / pr_zxbzs; j++)
|
|
|
+ {
|
|
|
+ LabelInf.Rows[Current].Cells["pib_outboxcode2"].Value = dt.Rows[i]["pd_cartonno"].ToString();
|
|
|
+ Current++;
|
|
|
+ }
|
|
|
}
|
|
|
+ GetPackingCode = true;
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
}
|
|
|
- GetPackingCode = true;
|
|
|
SaveGrid_Click(sender, e);
|
|
|
}
|
|
|
|