|
|
@@ -1477,9 +1477,30 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
private void MidBoxLabelPrint()
|
|
|
{
|
|
|
+ //未输入内容打印全部中盒
|
|
|
if (MidLabelNum.Text == "")
|
|
|
{
|
|
|
- MessageBox.Show("手动打印必须填写盒号");
|
|
|
+ MidBoxArgument.Clear();
|
|
|
+ MidBoxCacheData.Clear();
|
|
|
+ BaseUtil.CleanDataTable(MidBoxCacheData);
|
|
|
+ List<int> MidOutBoxCode = new List<int>();
|
|
|
+ string la_id = MidLabelCombox.SelectedValue.ToString().Split('#')[0];
|
|
|
+ for (int i = 0; i < LabelInf.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ if (!MidIDAndOutboxcode.ContainsValue(LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString()))
|
|
|
+ MidIDAndOutboxcode.Add(LabelInf.Rows[i].Cells["pib_id1"].Value.ToString(), LabelInf.Rows[i].Cells["pib_outboxcode1"].Value.ToString());
|
|
|
+ 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()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ GetMidBoxData();
|
|
|
+ for (int i = 0; i < MidOutBoxCode.Count; i++)
|
|
|
+ {
|
|
|
+ MidBoxCodePrint(la_id, MidOutBoxCode[i],"HanlePrint");
|
|
|
+ }
|
|
|
+ MidBoxArgument.Clear();
|
|
|
+ MidBoxCacheData.Clear();
|
|
|
+ BaseUtil.CleanDataTable(MidBoxCacheData);
|
|
|
return;
|
|
|
}
|
|
|
bool FindMidLabel = false;
|
|
|
@@ -2361,7 +2382,7 @@ namespace UAS_LabelMachine
|
|
|
|
|
|
private void LabelInf_CellEndEdit(object sender, DataGridViewCellEventArgs e)
|
|
|
{
|
|
|
- if (LabelInf.Columns[e.ColumnIndex].Name == "pib_madein")
|
|
|
+ if (LabelInf.Columns[e.ColumnIndex].Name == "pib_madein" && CollectionUnit.Text == "盒")
|
|
|
{
|
|
|
string madein = LabelInf.Rows[e.RowIndex].Cells["pib_madein"].Value.ToString();
|
|
|
string midbox = LabelInf.Rows[e.RowIndex].Cells["pib_outboxcode1"].Value.ToString();
|