fix: 导出PDF修复 — volumeLabel缺name参数,单价列适配单位
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 7s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 6s
PR Preview / deploy-preview (pull_request) Successful in 15s
Test / e2e-test (push) Successful in 3m2s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-14 13:43:35 +00:00
parent 553850a369
commit 00f6815652

View File

@@ -843,8 +843,9 @@ function exportPDF() {
const en = getEnglishName(name) const en = getEnglishName(name)
const bp = meta.bottlePrice != null ? '¥' + meta.bottlePrice.toFixed(0) : '--' const bp = meta.bottlePrice != null ? '¥' + meta.bottlePrice.toFixed(0) : '--'
const rp = meta.retailPrice != null ? '¥' + meta.retailPrice.toFixed(0) : '--' const rp = meta.retailPrice != null ? '¥' + meta.retailPrice.toFixed(0) : '--'
const vol = volumeLabel(meta.dropCount) const vol = volumeLabel(meta.dropCount, name)
const ppd = oils.pricePerDrop(name) ? '¥' + oils.pricePerDrop(name).toFixed(2) : '--' const unit = oilPriceUnit(name)
const ppd = oils.pricePerDrop(name) ? '¥' + oils.pricePerDrop(name).toFixed(2) + '/' + unit : '--'
rows += `<tr> rows += `<tr>
<td>${name}</td> <td>${name}</td>
<td>${en}</td> <td>${en}</td>
@@ -876,7 +877,7 @@ function exportPDF() {
<h1>doTERRA 精油价目表 ${dateStr}</h1> <h1>doTERRA 精油价目表 ${dateStr}</h1>
<table> <table>
<thead> <thead>
<tr><th>精油</th><th>英文名</th><th>会员价</th><th>零售价</th><th>容量</th><th>单价/滴</th></tr> <tr><th>精油</th><th>英文名</th><th>会员价</th><th>零售价</th><th>容量</th><th>单价</th></tr>
</thead> </thead>
<tbody>${rows}</tbody> <tbody>${rows}</tbody>
</table> </table>