From f55bb42557c4f390a8c7eeea2c277b5dea4394e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Mon, 6 Jul 2026 17:47:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(wms/coil/materialWarning):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=A0=87=E7=AD=BE=E6=89=93=E5=8D=B0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=9B=B4=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重构打印标签的处理流程,直接调用子组件打印方法替代手动操作DOM,同时将更新时间格式化为年月日格式 --- .../src/views/wms/coil/materialWarning/time.vue | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/klp-ui/src/views/wms/coil/materialWarning/time.vue b/klp-ui/src/views/wms/coil/materialWarning/time.vue index e7f7823ef..b1817c9d1 100644 --- a/klp-ui/src/views/wms/coil/materialWarning/time.vue +++ b/klp-ui/src/views/wms/coil/materialWarning/time.vue @@ -334,16 +334,13 @@ export default { /** 打印标签 */ handlePrintLabel(row) { - this.labelRender.data = row; - this.labelRender.type = getCoilTagPrintType(row); + this.labelRender.data = { + ...row, + updateTime: row.updateTime?.split(' ')[0] || '', + }; this.$nextTick(() => { - const el = this.$refs.labelRender && this.$refs.labelRender.$el; - if (el) { - el.style.display = 'block'; - window.print(); - el.style.display = 'none'; - } - }); + this.$refs.labelRender.printLabel(); + }) }, handleExport() {