|
@@ -483,9 +483,13 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
+ else if (j == 1)
|
|
|
{
|
|
|
- row1.Cells[NumIndex - 4].SetCellValue(sumCount);
|
|
|
+ row1.Cells[1].SetCellValue((i % PageSize == 0 ? PageSize : i) + "片");
|
|
|
+ }
|
|
|
+ else if (j == 2)
|
|
|
+ {
|
|
|
+ row1.Cells[2].SetCellValue(sumCount);
|
|
|
}
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
@@ -614,47 +618,51 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
- {
|
|
|
- row1.Cells[j - 4].SetCellValue(sumCount);
|
|
|
- }
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- row1 = sheet.CreateRow(PaintIndex);
|
|
|
- for (int j = 0; j < columnNum - 3; j++)
|
|
|
- {
|
|
|
- if (j == 0)
|
|
|
+ else if (j == 1)
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("备注");
|
|
|
+ row1.Cells[1].SetCellValue((i % PageSize == 0 ? PageSize : (i % PageSize + 1)) + "片");
|
|
|
}
|
|
|
else if (j == 2)
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(totalCount);
|
|
|
- }
|
|
|
-
|
|
|
- else if (j == columnNum - 6)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(rowNum);
|
|
|
- }
|
|
|
- else if (j > 5 && j == columnNum - 5)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("片");
|
|
|
- }
|
|
|
- else if (columnNum > 5 && j == columnNum - 5)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("片");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
+ row1.Cells[2].SetCellValue(sumCount);
|
|
|
}
|
|
|
- row1.Cells[j].CellStyle = style;
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
+ row1 = sheet.CreateRow(PaintIndex);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
sheet.SetRowBreak(PaintIndex);
|
|
|
sheet.Footer.Center = "第&P页,共&N页";
|
|
|
PaintIndex = PaintIndex + 1;
|
|
@@ -673,12 +681,14 @@ namespace UAS_LabelMachine
|
|
|
break;
|
|
|
case "BatchCode":
|
|
|
string LastBatchCode = "";
|
|
|
+ int PageNum = 0;
|
|
|
for (int i = 0; i < rowNum; i++)
|
|
|
{
|
|
|
IRow row1 = sheet.CreateRow(PaintIndex);
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
row1.HeightInPoints = RowHeight;
|
|
|
|
|
|
+ PageNum = PageNum + 1;
|
|
|
if (LastBatchCode != "" && LastBatchCode != DataTable.Rows[i]["ch_splitbatch"].ToString())
|
|
|
{
|
|
|
BoxCode = BoxCode + 1;
|
|
@@ -688,18 +698,28 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
+ else if (j == 1)
|
|
|
{
|
|
|
- row1.Cells[j - 4].SetCellValue(sumCount);
|
|
|
+ row1.Cells[1].SetCellValue(PageNum - 1 + "片");
|
|
|
+ }
|
|
|
+ else if (j == 2)
|
|
|
+ {
|
|
|
+ row1.Cells[2].SetCellValue(sumCount);
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
sumCount = 0;
|
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
|
sheet.SetRowBreak(PaintIndex - 1);
|
|
|
sheet.Footer.Center = "第&P页,共&N页";
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
+ PageNum = 1;
|
|
|
}
|
|
|
|
|
|
if (LastBatchCode == "" || (LastBatchCode != "" && LastBatchCode != DataTable.Rows[i]["ch_splitbatch"].ToString()) || i == rowNum - 1)
|
|
@@ -800,51 +820,61 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
- {
|
|
|
- row1.Cells[j - 4].SetCellValue(sumCount);
|
|
|
- }
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
-
|
|
|
- row1 = sheet.CreateRow(PaintIndex);
|
|
|
- for (int j = 0; j < columnNum - 3; j++)
|
|
|
- {
|
|
|
- if (j == 0)
|
|
|
+ else if (j == 1)
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("备注");
|
|
|
+ row1.Cells[1].SetCellValue(PageNum + "片");
|
|
|
}
|
|
|
else if (j == 2)
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(totalCount);
|
|
|
- }
|
|
|
- else if (j == columnNum - 6)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(rowNum);
|
|
|
- }
|
|
|
- else if (j > 5 && j == columnNum - 5)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("片");
|
|
|
- }
|
|
|
- else if (columnNum > 5 && j == columnNum - 5)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("片");
|
|
|
+ row1.Cells[2].SetCellValue(sumCount);
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- row1.Cells[j].CellStyle = style;
|
|
|
}
|
|
|
+
|
|
|
+ row1 = sheet.CreateRow(PaintIndex);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
sheet.SetRowBreak(PaintIndex);
|
|
|
sheet.Footer.Center = "第&P页,共&N页";
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
+ PageNum = 1;
|
|
|
}
|
|
|
pib_id.Add(DataTable.Rows[i]["pib_id"].ToString());
|
|
|
pib_outboxcode1.Add(BoxCode.ToString());
|
|
@@ -860,11 +890,14 @@ namespace UAS_LabelMachine
|
|
|
break;
|
|
|
case "BoxCode":
|
|
|
string LastBoxCode = "";
|
|
|
+ int PageNum1 = 0;
|
|
|
+
|
|
|
for (int i = 0; i < rowNum; i++)
|
|
|
{
|
|
|
IRow row1 = sheet.CreateRow(PaintIndex);
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
row1.HeightInPoints = RowHeight;
|
|
|
+ PageNum1 = PageNum1 + 1;
|
|
|
|
|
|
if (LastBoxCode != "" && LastBoxCode != DataTable.Rows[i]["CH_PBCODE"].ToString())
|
|
|
{
|
|
@@ -875,12 +908,21 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
+ else if (j == 1)
|
|
|
{
|
|
|
- row1.Cells[j - 4].SetCellValue(sumCount);
|
|
|
+ row1.Cells[1].SetCellValue(PageNum1 + "片");
|
|
|
+ }
|
|
|
+ else if (j == 2)
|
|
|
+ {
|
|
|
+ row1.Cells[2].SetCellValue(sumCount);
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
sumCount = 0;
|
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
@@ -988,51 +1030,61 @@ namespace UAS_LabelMachine
|
|
|
if (j == 0)
|
|
|
{
|
|
|
row1.Cells[j].SetCellValue("小计");
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- else if (DataTable.Columns[j].ColumnName == "io_qty")
|
|
|
- {
|
|
|
- row1.Cells[j - 4].SetCellValue(sumCount);
|
|
|
- }
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- row1 = sheet.CreateRow(PaintIndex);
|
|
|
-
|
|
|
- for (int j = 0; j < columnNum - 3; j++)
|
|
|
- {
|
|
|
- if (j == 0)
|
|
|
+ else if (j == 1)
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("备注");
|
|
|
+ row1.Cells[1].SetCellValue(PageNum1 + "片");
|
|
|
}
|
|
|
else if (j == 2)
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(totalCount);
|
|
|
- }
|
|
|
- else if (j == columnNum - 6)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue(rowNum);
|
|
|
- }
|
|
|
- else if (j > 5 && j == columnNum - 5)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("片");
|
|
|
- }
|
|
|
- else if (columnNum > 5 && j == columnNum - 5)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- row1.Cells[j].SetCellValue("片");
|
|
|
+ row1.Cells[2].SetCellValue(sumCount);
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- row1.Cells[j].CellStyle = style;
|
|
|
}
|
|
|
+ row1 = sheet.CreateRow(PaintIndex);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
sheet.SetRowBreak(PaintIndex);
|
|
|
sheet.Footer.Center = "第&P页,共&N页";
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
+ PageNum1 = 1;
|
|
|
}
|
|
|
pib_id.Add(DataTable.Rows[i]["pib_id"].ToString());
|
|
|
pib_outboxcode1.Add(BoxCode.ToString());
|