fix(wms): 修复三处业务显示与逻辑不一致问题

1. 修复异常报表接口数据字段使用错误,将rows改为data
2. 调整标签渲染PDF的图片缩放和位置,避免内容超出页面
3. 修改考勤审核页面的请假天数列标题为请假小时,匹配实际展示数据
This commit is contained in:
2026-06-05 10:44:56 +08:00
parent 5e0dc848bb
commit 66f0b3fdd7
3 changed files with 10 additions and 8 deletions

View File

@@ -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();