|
@@ -1925,7 +1925,6 @@ namespace UAS_LabelMachine
|
|
|
sheet.AutoSizeColumn(j - 4);
|
|
|
sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
}
|
|
|
- row1.Cells[j - 4].CellStyle = styleborder;
|
|
|
}
|
|
|
|
|
|
if (i == rowNum - 1)
|
|
@@ -2190,7 +2189,6 @@ namespace UAS_LabelMachine
|
|
|
sheet.AutoSizeColumn(j - 4);
|
|
|
sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
}
|
|
|
- row1.Cells[j - 4].CellStyle = styleborder;
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
@@ -2447,7 +2445,6 @@ namespace UAS_LabelMachine
|
|
|
sheet.AutoSizeColumn(j - 4);
|
|
|
sheet.SetColumnWidth(j - 4, sheet.GetColumnWidth(j - 4) + 1000);
|
|
|
}
|
|
|
- row1.Cells[j - 4].CellStyle = styleborder;
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|
|
@@ -2957,31 +2954,6 @@ namespace UAS_LabelMachine
|
|
|
First_WID.Clear();
|
|
|
BoxCode = BoxCode + 1;
|
|
|
for (int j = 0; j < ShowColumnCount; j++)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- if (j == 0)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(批小计);
|
|
|
- }
|
|
|
- else if (j == ShowPieceIndex)
|
|
|
- {
|
|
|
- row1.Cells[ShowPieceIndex].SetCellValue((i % PageSize == 0 ? PageSize : i) + 片);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else if (j == ShowCountIndex)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(sumCount);
|
|
|
- }
|
|
|
- else if (j == ShowBoxIndex - 4)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(LastBox);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- row1 = sheet.CreateRow(PaintIndex);
|
|
|
- PaintIndex = PaintIndex + 1;
|
|
|
- for (int j = 0; j < ShowColumnCount; j++)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
if (j == 0)
|
|
@@ -3278,37 +3250,6 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
BoxCode = BoxCode + 1;
|
|
|
for (int j = 0; j < ShowColumnCount; j++)
|
|
|
- {
|
|
|
-
|
|
|
- row1.CreateCell(j);
|
|
|
- if (j == 0)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(批小计);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else if (j == ShowPieceIndex)
|
|
|
- {
|
|
|
- row1.Cells[ShowPieceIndex].SetCellValue(PageNum - 1 + 片);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else if (j == ShowCountIndex)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(sumCount);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else if (j == ShowBoxIndex - 4)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(LastBox);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- }
|
|
|
- row1 = sheet.CreateRow(PaintIndex);
|
|
|
- PaintIndex = PaintIndex + 1;
|
|
|
- for (int j = 0; j < ShowColumnCount; j++)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
if (j == 0)
|
|
@@ -3596,36 +3537,6 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
BoxCode = BoxCode + 1;
|
|
|
for (int j = 0; j < ShowColumnCount; j++)
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- if (j == 0)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(批小计);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else if (j == ShowPieceIndex)
|
|
|
- {
|
|
|
- row1.Cells[ShowPieceIndex].SetCellValue(PageNum1 + 片);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else if (j == ShowCountIndex)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(sumCount);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else if (j == ShowBoxIndex - 4)
|
|
|
- {
|
|
|
- row1.Cells[j].SetCellValue(LastBox);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- }
|
|
|
- row1 = sheet.CreateRow(PaintIndex);
|
|
|
- PaintIndex = PaintIndex + 1;
|
|
|
- for (int j = 0; j < ShowColumnCount; j++)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
if (j == 0)
|
|
@@ -3922,50 +3833,52 @@ namespace UAS_LabelMachine
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
row1.HeightInPoints = RowHeight;
|
|
|
|
|
|
- if (LastBoxCode1 != "" && LastBoxCode1 != DataTable.Rows[i]["CH_PBCODE"].ToString())
|
|
|
+ if (LastBatch == "" || (LastBatch != "" && LastBatch != DataTable.Rows[i]["ch_splitbatch"].ToString()))
|
|
|
{
|
|
|
- BoxCode = BoxCode + 1;
|
|
|
+ LastBatch = DataTable.Rows[i]["ch_splitbatch"].ToString();
|
|
|
for (int j = 0; j < ShowColumnCount; j++)
|
|
|
{
|
|
|
- row1.CreateCell(j);
|
|
|
if (j == 0)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(批小计);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
+ row1.CreateCell(j).SetCellValue(SerialNum - 1);
|
|
|
}
|
|
|
- else if (j == ShowPieceIndex)
|
|
|
+ else if (j == 1)
|
|
|
{
|
|
|
- row1.Cells[ShowPieceIndex].SetCellValue(PageNum2 + 片);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
+ row1.CreateCell(j).SetCellValue("批小计");
|
|
|
}
|
|
|
- else if (j == ShowCountIndex)
|
|
|
+ else if (j == 2)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(sumCount);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
+ row1.CreateCell(j).SetCellValue(MidCount);
|
|
|
}
|
|
|
else if (j == ShowBoxIndex - 4)
|
|
|
{
|
|
|
- row1.Cells[j].SetCellValue(LastBox);
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
+ row1.CreateCell(j).SetCellValue(LastBox);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
+ row1.CreateCell(j);
|
|
|
}
|
|
|
+ row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
+ SerialNum = 1;
|
|
|
+ MidCount = 0;
|
|
|
row1 = sheet.CreateRow(PaintIndex);
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
+ }
|
|
|
+ if (LastBoxCode1 != "" && LastBoxCode1 != DataTable.Rows[i]["CH_PBCODE"].ToString())
|
|
|
+ {
|
|
|
+ BoxCode = BoxCode + 1;
|
|
|
for (int j = 0; j < ShowColumnCount; j++)
|
|
|
{
|
|
|
row1.CreateCell(j);
|
|
|
- if (j == 0)
|
|
|
+ if (j == 1)
|
|
|
{
|
|
|
row1.Cells[j].SetCellValue(小计);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
- else if (j == ShowPieceIndex)
|
|
|
+ else if (j == 0)
|
|
|
{
|
|
|
- row1.Cells[ShowPieceIndex].SetCellValue(PageNum2 + 片);
|
|
|
+ row1.Cells[0].SetCellValue(PageNum2);
|
|
|
row1.Cells[j].CellStyle = styleborder;
|
|
|
}
|
|
|
else if (j == ShowCountIndex)
|
|
@@ -3990,38 +3903,6 @@ namespace UAS_LabelMachine
|
|
|
PaintIndex = PaintIndex + 1;
|
|
|
PageNum2 = 0;
|
|
|
}
|
|
|
- if (LastBatch == "" || (LastBatch != "" && LastBatch != DataTable.Rows[i]["ch_splitbatch"].ToString()))
|
|
|
- {
|
|
|
- LastBatch = DataTable.Rows[i]["ch_splitbatch"].ToString();
|
|
|
- for (int j = 0; j < ShowColumnCount; j++)
|
|
|
- {
|
|
|
- if (j == 0)
|
|
|
- {
|
|
|
- row1.CreateCell(j).SetCellValue(SerialNum - 1);
|
|
|
- }
|
|
|
- else if (j == 1)
|
|
|
- {
|
|
|
- row1.CreateCell(j).SetCellValue("批小计");
|
|
|
- }
|
|
|
- else if (j == 2)
|
|
|
- {
|
|
|
- row1.CreateCell(j).SetCellValue(MidCount);
|
|
|
- }
|
|
|
- else if (j == ShowBoxIndex - 4)
|
|
|
- {
|
|
|
- row1.CreateCell(j).SetCellValue(LastBox);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- row1.CreateCell(j);
|
|
|
- }
|
|
|
- row1.Cells[j].CellStyle = styleborder;
|
|
|
- }
|
|
|
- SerialNum = 1;
|
|
|
- MidCount = 0;
|
|
|
- row1 = sheet.CreateRow(PaintIndex);
|
|
|
- PaintIndex = PaintIndex + 1;
|
|
|
- }
|
|
|
|
|
|
if (LastBoxCode1 == "" || (LastBoxCode1 != "" && LastBoxCode1 != DataTable.Rows[i]["ch_pbcode"].ToString()) || ((i == rowNum - 1) && (LastBoxCode1 != "" && LastBoxCode1 != DataTable.Rows[i]["ch_pbcode"].ToString())))
|
|
|
{
|
|
@@ -4164,7 +4045,6 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
LastBox = Data;
|
|
|
}
|
|
|
- row1.Cells[j - 4].CellStyle = styleborder;
|
|
|
}
|
|
|
if (i == rowNum - 1)
|
|
|
{
|