From b26ea53db2cd12d4d324e0ea23c96ec4beb63ed5 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 24 Jun 2026 13:26:18 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-24=20=E4=BF=AE=E5=A4=8D=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=BA=A7=E5=87=BA=E6=A0=87=E7=AD=BE=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E3=80=90=E5=AF=BC=E5=87=BA=E3=80=91=E6=97=B6Packing=20List?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../searchSfdcRollsReport.vue | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue index daaaed2..7f740fe 100644 --- a/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue +++ b/src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue @@ -1710,19 +1710,26 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js'; this._exportLoading = null } }, + formatExportText(value) { + if (value === '' || value === null || value === undefined) { + return '' + } + const safeValue = String(value).replace(/"/g, '""') + return `="${safeValue}"` + }, fields() { - let json = "{" - this.columnList.forEach((item, index) => { - if (index == this.columnList.length - 1) { - json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" - } else { - json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + "," + const fieldMap = {} + this.columnList.forEach(item => { + if (item.columnProp === 'packingList') { + fieldMap[item.columnLabel] = { + field: item.columnProp, + callback: value => this.formatExportText(value) + } + return } + fieldMap[item.columnLabel] = item.columnProp }) - json += "}" - let s = eval("(" + json + ")") - - return s + return fieldMap }, // 导出 end //多语言