Ver Fonte

打印模板修改

callm há 2 meses atrás
pai
commit
02288d13e5

+ 20 - 19
UAS-出货标签管理(贸易版)/PublicMethod/ExcelHandler.cs

@@ -4854,7 +4854,7 @@ namespace UAS_LabelMachine
             int BoxCode = 1;
             ICellStyle style = book.CreateCellStyle();
             style.VerticalAlignment = VerticalAlignment.Center;
-            style.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Left;
+            style.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
             style.SetFont(ffont);
             ICellStyle styleborder = book.CreateCellStyle();
             styleborder.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
@@ -4983,6 +4983,7 @@ namespace UAS_LabelMachine
             int PaintIndex = 1;
             int sumCount = 0;
             int totalCount = 0;
+            ShowPieceIndex = 5;
             switch (Type)
             {
                 case "FixRow":
@@ -5060,11 +5061,11 @@ namespace UAS_LabelMachine
                                 {
                                     row1.Cells[j].SetCellValue(sumCount);
                                 }
-                                else if (j == ShowBoxIndex - 4)
-                                {
-                                    row1.Cells[j].SetCellValue(LastBox);
-                                    row1.Cells[j].CellStyle = styleborder;
-                                }
+                                //else if (j == ShowBoxIndex - 4)
+                                //{
+                                //    row1.Cells[j].SetCellValue(LastBox);
+                                //    row1.Cells[j].CellStyle = styleborder;
+                                //}
                                 row1.Cells[j].CellStyle = styleborder;
                             }
                             sumCount = 0;
@@ -5090,7 +5091,7 @@ namespace UAS_LabelMachine
                                     else if (j == 4)
                                     {
                                         row1.CreateCell(j);
-                                        row1.Cells[j].SetCellValue("货日期"+ ":" + DataTable.Rows[i]["pi_date"].ToString());
+                                        row1.Cells[j].SetCellValue("货日期"+ ":" + DataTable.Rows[i]["pi_date"].ToString());
                                     }
                                     else if (j == ShowDataIndex)
                                     {
@@ -5387,7 +5388,7 @@ namespace UAS_LabelMachine
                                     else if (j == 4)
                                     {
                                         row1.CreateCell(j);
-                                        row1.Cells[j].SetCellValue("货日期" + ":" + DataTable.Rows[i]["pi_date"].ToString());
+                                        row1.Cells[j].SetCellValue("货日期" + ":" + DataTable.Rows[i]["pi_date"].ToString());
                                     }
                                     else if (j == ShowDataIndex)
                                     {
@@ -5632,11 +5633,11 @@ namespace UAS_LabelMachine
                                     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 if (j == ShowBoxIndex - 4)
+                                //{
+                                //    row1.Cells[j].SetCellValue(LastBox);
+                                //    row1.Cells[j].CellStyle = styleborder;
+                                //}
                                 else
                                 {
                                     row1.Cells[j].CellStyle = styleborder;
@@ -5667,7 +5668,7 @@ namespace UAS_LabelMachine
                                     else if (j == 4)
                                     {
                                         row1.CreateCell(j);
-                                        row1.Cells[j].SetCellValue("货日期" + ":" + DataTable.Rows[i]["pi_date"].ToString());
+                                        row1.Cells[j].SetCellValue("货日期" + ":" + DataTable.Rows[i]["pi_date"].ToString());
                                     }
                                     else if (j == ShowDataIndex)
                                     {
@@ -5843,11 +5844,11 @@ namespace UAS_LabelMachine
                                     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 if (j == ShowBoxIndex - 4)
+                                //{
+                                //    row1.Cells[j].SetCellValue(LastBox);
+                                //    row1.Cells[j].CellStyle = styleborder;
+                                //}
                                 else
                                 {
                                     row1.Cells[j].CellStyle = styleborder;