fix(wms): 修复三处业务显示与逻辑不一致问题
1. 修复异常报表接口数据字段使用错误,将rows改为data 2. 调整标签渲染PDF的图片缩放和位置,避免内容超出页面 3. 修改考勤审核页面的请假天数列标题为请假小时,匹配实际展示数据
This commit is contained in:
@@ -318,13 +318,15 @@ export default {
|
||||
// 确保页面尺寸正确:宽100mm,高80mm(横向)
|
||||
const page = pdfDoc.addPage([pageWidthPt, pageHeightPt]);
|
||||
|
||||
// 直接拉伸填充整个PDF页面,不留边距,确保占满整张纸
|
||||
// 从(0,0)开始,直接填充整个页面尺寸
|
||||
// 缩放到原尺寸的95%,原点为左上
|
||||
const scaleFactor = 0.95;
|
||||
const imgWidth = pageWidthPt * scaleFactor;
|
||||
const imgHeight = pageHeightPt * scaleFactor;
|
||||
page.drawImage(imgPng, {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: pageWidthPt,
|
||||
height: pageHeightPt
|
||||
y: pageHeightPt - imgHeight,
|
||||
width: imgWidth,
|
||||
height: imgHeight
|
||||
});
|
||||
|
||||
const pdfBytes = await pdfDoc.save();
|
||||
|
||||
Reference in New Issue
Block a user