From 4ad694e64fab995d56e436b4f178b3a44059daef Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Sun, 4 Jan 2026 14:55:56 +0800 Subject: [PATCH] =?UTF-8?q?2026-01-04=20=E5=9B=BA=E5=AE=9A=E8=BD=BD?= =?UTF-8?q?=E5=85=B7=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/LodopFuncs.js | 2 +- .../modules/yieldReport/com_separate_roll.vue | 128 ++++++------------ 2 files changed, 40 insertions(+), 90 deletions(-) diff --git a/src/utils/LodopFuncs.js b/src/utils/LodopFuncs.js index c58d646..85277c0 100644 --- a/src/utils/LodopFuncs.js +++ b/src/utils/LodopFuncs.js @@ -114,7 +114,7 @@ function getLodop(oOBJECT, oEMBED) { } catch (err) {} if (!LODOP) { - logger.info("LodopFuncs.js getLodop no CLodop"); + console.log("LodopFuncs.js getLodop no CLodop"); MessageBox({ title: '打印组件', type: 'warning', diff --git a/src/views/modules/yieldReport/com_separate_roll.vue b/src/views/modules/yieldReport/com_separate_roll.vue index 412fdab..fc15526 100644 --- a/src/views/modules/yieldReport/com_separate_roll.vue +++ b/src/views/modules/yieldReport/com_separate_roll.vue @@ -1043,100 +1043,50 @@ export default { // 打印固定载具 printCarrier(row) { - // 构造打印数据 - const printData = { - carrierNo: row.carrierNo, - carrierTypeName: row.carrierTypeName, - specification: row.specification, - dimensions: row.dimensions, - availableQty: row.availableQty || 0, - site: this.scheduleData.site + const LODOP = getLodop() + if (!LODOP) { + this.$message.error('未检测到打印控件,请安装CLodop打印控件!') + return } - // 调用打印功能 - this.printCarrierLabel(printData) - }, - - // 打印载具标签 - printCarrierLabel(data) { try { - // 生成二维码(使用 QRCode.js 或者使用在线二维码API) - const qrCodeUrl = `https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${encodeURIComponent(data.carrierNo)}` - - // 打印HTML模板 - const printContent = ` -
| 标签条码: | -${data.carrierNo || ''} | -
| 载具类型: | -${data.carrierTypeName || ''} | -
| 规格描述: | -${data.specification || ''} | -
| 尺寸: | -${data.dimensions || ''} | -
| 可用数量: | -${data.availableQty} | -