From cf8b201d2972174ecf763a7fec0e9e308a916fc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Fri, 9 Jan 2026 10:31:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=BB=84=E4=BB=B6):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E8=BE=93=E5=85=A5=E7=BB=84=E4=BB=B6=E5=92=8C?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=B8=B2=E6=9F=93=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将ProductSelect和RawMaterialSelect中的规格输入替换为MemoInput组件 - 调整ProductionTagPreview中的料卷号显示方式和二维码大小 - 优化LabelRender中的打印渲染参数,降低缩放比例并移除冗余样式 --- .../KLPService/ProductSelect/index.vue | 2 +- .../KLPService/RawMaterialSelect/index.vue | 3 +-- .../LabelRender/ProductionTagPreview.vue | 4 ++-- .../wms/coil/panels/LabelRender/index.vue | 18 +++--------------- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/klp-ui/src/components/KLPService/ProductSelect/index.vue b/klp-ui/src/components/KLPService/ProductSelect/index.vue index e0a88820..0c7fd27a 100644 --- a/klp-ui/src/components/KLPService/ProductSelect/index.vue +++ b/klp-ui/src/components/KLPService/ProductSelect/index.vue @@ -23,7 +23,7 @@ @keyup.enter.native="handleQuery" /> - diff --git a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue index 355e1216..e1dea4c8 100644 --- a/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue +++ b/klp-ui/src/components/KLPService/RawMaterialSelect/index.vue @@ -23,8 +23,7 @@ @keyup.enter.native="handleQuery" /> - + diff --git a/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue b/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue index fbc92440..9a5d0393 100644 --- a/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue +++ b/klp-ui/src/views/wms/coil/panels/LabelRender/ProductionTagPreview.vue @@ -5,10 +5,10 @@ 料卷号 - +
{{ content.enterCoilNo || '' }}
- + diff --git a/klp-ui/src/views/wms/coil/panels/LabelRender/index.vue b/klp-ui/src/views/wms/coil/panels/LabelRender/index.vue index 7d80f490..b3030bcc 100644 --- a/klp-ui/src/views/wms/coil/panels/LabelRender/index.vue +++ b/klp-ui/src/views/wms/coil/panels/LabelRender/index.vue @@ -90,13 +90,13 @@ export default { // 3. 用html2canvas生成高清Canvas(解决文字模糊+二维码丢失) const canvas = await html2canvas(labelContainer, { - scale: 3, // 3倍高清渲染(核心) + scale: 1.5, // 3倍高清渲染(核心) backgroundColor: '#ffffff', // 强制白色背景,避免打印时背景透明 useCORS: true, // 支持跨域图片 allowTaint: true, // 允许渲染canvas(二维码) taintTest: false, // 关闭canvas污染检测 - windowWidth: labelContainer.offsetWidth * 3, // 适配缩放后的宽度 - windowHeight: labelContainer.offsetHeight * 3, // 适配缩放后的高度 + windowWidth: labelContainer.offsetWidth * 1.5, // 适配缩放后的宽度 + windowHeight: labelContainer.offsetHeight * 1.5, // 适配缩放后的高度 logging: false, }); @@ -104,17 +104,6 @@ export default { const printContainerId = 'temp-print-container-' + new Date().getTime(); const tempPrintContainer = document.createElement('div'); tempPrintContainer.id = printContainerId; - // 样式:让打印容器居中、适配纸张 - tempPrintContainer.style.cssText = ` - width: 100%; - height: 100%; - display: flex; - justify-content: center; - align-items: center; - padding: 20px; - box-sizing: border-box; - background: #fff; - `; // 将高清Canvas插入临时容器 tempPrintContainer.appendChild(canvas); // document.body.appendChild(tempPrintContainer); @@ -143,7 +132,6 @@ export default { body * { visibility: hidden; } #${printContainerId}, #${printContainerId} * { visibility: visible; } #${printContainerId} { position: absolute; top: 0; left: 0; } - @page { margin: 10mm; } /* 打印纸张边距 */ } `, printContainer: true,