From e5821a3f68ddc8f318395c5b138fd409c165f093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Mon, 16 Mar 2026 15:34:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(wms):=20=E6=8F=90=E9=AB=98html2canvas?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E6=AF=94=E4=BE=8B=E5=B9=B6=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=E5=8D=95=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整wayBill和wayBill2组件的html2canvas缩放比例从3提高到6,以获得更清晰的打印效果 重构发货单页面布局,将表格和分页组件放入滚动容器,表单区域设为固定位置 --- .../views/wms/delivery/components/wayBill.vue | 2 +- .../wms/delivery/components/wayBill2.vue | 2 +- .../src/views/wms/delivery/waybill/index.vue | 122 +++++++++--------- 3 files changed, 64 insertions(+), 62 deletions(-) diff --git a/klp-ui/src/views/wms/delivery/components/wayBill.vue b/klp-ui/src/views/wms/delivery/components/wayBill.vue index a401b675..38791f42 100644 --- a/klp-ui/src/views/wms/delivery/components/wayBill.vue +++ b/klp-ui/src/views/wms/delivery/components/wayBill.vue @@ -440,7 +440,7 @@ export default { // 固定按纸张尺寸截图:右侧留白来自于 contentEl 的缩放(241 -> 211mm),而不是扩大截图宽度 const canvas = await html2canvas(node, { backgroundColor: '#ffffff', - scale: 3, + scale: 6, useCORS: true, willReadFrequently: true, width: pageWidthPx, diff --git a/klp-ui/src/views/wms/delivery/components/wayBill2.vue b/klp-ui/src/views/wms/delivery/components/wayBill2.vue index 003cbf81..cb29572e 100644 --- a/klp-ui/src/views/wms/delivery/components/wayBill2.vue +++ b/klp-ui/src/views/wms/delivery/components/wayBill2.vue @@ -440,7 +440,7 @@ export default { // 固定按纸张尺寸截图:右侧留白来自于 contentEl 的缩放(241 -> 211mm),而不是扩大截图宽度 const canvas = await html2canvas(node, { backgroundColor: '#ffffff', - scale: 3, + scale: 6, useCORS: true, willReadFrequently: true, width: pageWidthPx, diff --git a/klp-ui/src/views/wms/delivery/waybill/index.vue b/klp-ui/src/views/wms/delivery/waybill/index.vue index 30360a28..1a6afc5f 100644 --- a/klp-ui/src/views/wms/delivery/waybill/index.vue +++ b/klp-ui/src/views/wms/delivery/waybill/index.vue @@ -2,16 +2,16 @@
- + - + - + @@ -35,62 +35,64 @@ +
+ + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - + - + - + + +
- -
@@ -119,10 +121,10 @@ - + - - + + @@ -405,7 +407,7 @@ export default { }); }, handleCopy(row) { - this.form = { + this.form = { waybillNo: new Date().getTime(), waybillName: row.waybillName, planId: row.planId, @@ -485,7 +487,7 @@ export default { this.loading = false; }); }, - /** 打印发货单 */ + /** 打印发货单 */ handlePrintSimple(row) { this.loading = true; this.printType = 1;