From 4cd365a8434c2478441fffddc36c2b3f36fbf530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Fri, 9 Jan 2026 17:16:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms):=20=E6=B7=BB=E5=8A=A0canExportAll?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E6=8E=A7=E5=88=B6=E5=AF=BC=E5=87=BA=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加canExportAll属性以控制批量导出按钮的显示,并调整标签打印的布局和边距 --- klp-ui/src/views/wms/coil/panels/base.vue | 14 ++++++++++---- klp-ui/src/views/wms/coil/product.vue | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue index f69a26e3..2ba68c64 100644 --- a/klp-ui/src/views/wms/coil/panels/base.vue +++ b/klp-ui/src/views/wms/coil/panels/base.vue @@ -63,7 +63,7 @@ 导出 - + 批量打印标签 @@ -345,6 +345,10 @@ export default { type: Boolean, default: false, }, + canExportAll: { + type: Boolean, + default: false, + } }, data() { return { @@ -822,8 +826,8 @@ export default { const paperHeightMm = 100; // 留白:左右约 4mm;上下更小一些,避免底部空得太多 const marginXmm = 4; - const marginTopMm = 2; - const marginBottomMm = 1; + const marginTopMm = 0; + const marginBottomMm = 0; const pageWidthPt = paperWidthMm * mmToPt; const pageHeightPt = paperHeightMm * mmToPt; @@ -873,7 +877,9 @@ export default { const x = marginXPt + (contentWidthPt - drawW) / 2; const y = marginBottomPt + (contentHeightPt - drawH) / 2; - page.drawImage(pngImage, { x, y, width: drawW, height: drawH }); + console.log(pngImage) + + page.drawImage(pngImage, { x, y: y - 20, width: drawW, height: drawH + 20 }); } const pdfBytes = await pdfDoc.save(); diff --git a/klp-ui/src/views/wms/coil/product.vue b/klp-ui/src/views/wms/coil/product.vue index 319bacc8..1a52b42a 100644 --- a/klp-ui/src/views/wms/coil/product.vue +++ b/klp-ui/src/views/wms/coil/product.vue @@ -4,7 +4,9 @@ :labelType="labelType" :showStatus="showStatus" :hideType="hideType" - :showLength="showLength" /> + :showLength="showLength" + :canExportAll="canExportAll" + />