Browse Source

2026-06-24

修复订单产出标签统计【导出】时Packing List显示日期格式问题
master
fengyuan_yang 1 day ago
parent
commit
b26ea53db2
  1. 27
      src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue

27
src/views/modules/shopOrder/productionReport/searchSfdcRollsReport.vue

@ -1710,19 +1710,26 @@ import labelPrintTemplates from '@/mixins/labelPrintTemplates.js';
this._exportLoading = null this._exportLoading = null
} }
}, },
formatExportText(value) {
if (value === '' || value === null || value === undefined) {
return ''
}
const safeValue = String(value).replace(/"/g, '""')
return `="${safeValue}"`
},
fields() { 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 // end
// //

Loading…
Cancel
Save