20250227 硬度检测委托打印
This commit is contained in:
parent
70a6901519
commit
c6f78f45e7
|
@ -186,18 +186,18 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||||
XSSFSheet ws = (XSSFSheet)hssfworkbook.CreateSheet("硬度检测委托单");
|
XSSFSheet ws = (XSSFSheet)hssfworkbook.CreateSheet("硬度检测委托单");
|
||||||
|
|
||||||
#region 列宽
|
#region 列宽
|
||||||
ws.SetColumnWidth(0, (9 * 256) - 95);//(8.08)8.08
|
ws.SetColumnWidth(0, (7 * 256) - 95);//(8.08)8.08
|
||||||
ws.SetColumnWidth(1, (9 * 256) - 95);//(8.08)8.08
|
ws.SetColumnWidth(1, (8 * 256) - 95);//(8.08)8.08
|
||||||
ws.SetColumnWidth(2, (2 * 256) - 95);//(6.08)6.08
|
ws.SetColumnWidth(2, (2 * 256) - 95);//(6.08)6.08
|
||||||
ws.SetColumnWidth(3, (11 * 256) - 95);//(10.08)10.08
|
ws.SetColumnWidth(3, (11 * 256) - 95);//(10.08)10.08
|
||||||
ws.SetColumnWidth(4, (8 * 256) - 15);//(14.33)14.25
|
ws.SetColumnWidth(4, (8 * 256) - 15);//(14.33)14.25
|
||||||
ws.SetColumnWidth(5, (9 * 256) + 15);//(20.55)20.5
|
ws.SetColumnWidth(5, (8 * 256) + 15);//(20.55)20.5
|
||||||
ws.SetColumnWidth(6, (9 * 256) - 95);//(8.08)8.08
|
ws.SetColumnWidth(6, (8 * 256) - 95);//(8.08)8.08
|
||||||
ws.SetColumnWidth(7, (9 * 256) - 95);//(8.08)8.08
|
ws.SetColumnWidth(7, (8 * 256) - 95);//(8.08)8.08
|
||||||
ws.SetColumnWidth(8, (1 * 256) - 95);//(8.08)8.08
|
ws.SetColumnWidth(8, (1 * 256) - 95);//(8.08)8.08
|
||||||
ws.SetColumnWidth(9, (9 * 256) - 95);//(8.08)8.08
|
ws.SetColumnWidth(9, (9 * 256) - 95);//(8.08)8.08
|
||||||
ws.SetColumnWidth(10, (7 * 256) - 95);//(8.08)8.08
|
ws.SetColumnWidth(10, (7 * 256) - 95);//(8.08)8.08
|
||||||
ws.SetColumnWidth(11, (5 * 256) + 100);//(4.83)4.83
|
ws.SetColumnWidth(11, (4 * 256) + 100);//(4.83)4.83
|
||||||
ws.SetColumnWidth(12, (13 * 256) + 200);//(12.17)12.17
|
ws.SetColumnWidth(12, (13 * 256) + 200);//(12.17)12.17
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -248,8 +248,8 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||||
//: (tb.Rows.Count > 11 && tb.Rows.Count <= 27) ? 2
|
//: (tb.Rows.Count > 11 && tb.Rows.Count <= 27) ? 2
|
||||||
//: Math.Ceiling((float)(tb.Rows.Count - 27) / 16) + 2;
|
//: Math.Ceiling((float)(tb.Rows.Count - 27) / 16) + 2;
|
||||||
//CellRangeAddress region;
|
//CellRangeAddress region;
|
||||||
pageNum = tb.Rows.Count < 27 ? 1
|
pageNum = tb.Rows.Count < 19 ? 1
|
||||||
: Math.Ceiling((float)(tb.Rows.Count - 27) / 38) + 1;
|
: Math.Ceiling((float)(tb.Rows.Count - 19) / 30) + 1;
|
||||||
//循环页
|
//循环页
|
||||||
for (int i = 1; i <= pageNum; i++)
|
for (int i = 1; i <= pageNum; i++)
|
||||||
{
|
{
|
||||||
|
@ -270,10 +270,10 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||||
ws = ExcelCreateRowTitle(ws, hssfworkbook, rowIndex, rowIndex + 7, style, 0, 12);
|
ws = ExcelCreateRowTitle(ws, hssfworkbook, rowIndex, rowIndex + 7, style, 0, 12);
|
||||||
//取数据开始和结束条数
|
//取数据开始和结束条数
|
||||||
dStart = 0;
|
dStart = 0;
|
||||||
dEnd = 27;
|
dEnd = 19;
|
||||||
//excel数据开始行和结束行
|
//excel数据开始行和结束行
|
||||||
tStart = rowIndex + 8;
|
tStart = rowIndex + 8;
|
||||||
tEnd = rowIndex + 35;
|
tEnd = rowIndex + 27;
|
||||||
|
|
||||||
#region 头部
|
#region 头部
|
||||||
//行1
|
//行1
|
||||||
|
@ -400,13 +400,13 @@ namespace FineUIPro.Web.ContinuousPrint
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var pNum = (i - 1) * 38;
|
var pNum = (i - 1) * 30;
|
||||||
//取数据开始和结束条数
|
//取数据开始和结束条数
|
||||||
dStart = 27 + ((i - 2) * 38);
|
dStart = 19 + ((i - 2) * 30);
|
||||||
dEnd = 27 + pNum;
|
dEnd = 19 + pNum;
|
||||||
//数据开始行和结束行
|
//数据开始行和结束行
|
||||||
tStart = rowIndex;
|
tStart = rowIndex;
|
||||||
tEnd = rowIndex + 38;
|
tEnd = rowIndex + 30;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue