fix: 精油价目 Excel 导出补全所有卡片字段
Some checks failed
Test / unit-test (push) Successful in 7s
PR Preview / teardown-preview (pull_request) Has been skipped
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 14s
Test / e2e-test (push) Failing after 45s

列:功效、使用方法、使用方式(香薰/涂抹/内用)、注意事项

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 11:18:12 +00:00
parent e8af6e2565
commit 5bc3600384

View File

@@ -913,12 +913,15 @@ async function exportExcel() {
'容量': vol,
'单价': ppdNum ? `¥${ppdNum.toFixed(2)}/${unit}` : '',
'功效': card?.effects || '',
'使用方法': card?.usage || '',
'使用方式': card?.method || '',
'注意事项': card?.caution || '',
'状态': meta.isActive === false ? '下架' : '在售',
})
}
const ws = XLSX.utils.json_to_sheet(rows)
ws['!cols'] = [{ wch: 16 }, { wch: 28 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 16 }, { wch: 40 }, { wch: 8 }]
ws['!cols'] = [{ wch: 16 }, { wch: 28 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 16 }, { wch: 40 }, { wch: 40 }, { wch: 20 }, { wch: 24 }, { wch: 8 }]
const wb = XLSX.utils.book_new()
XLSX.utils.book_append_sheet(wb, ws, '精油价目表')
XLSX.writeFile(wb, `精油价目表${dateStr}.xlsx`)