fix: 导出 Excel 合并「单价」为一列,值形如 ¥X.XX/ml|g|颗|滴
Some checks failed
PR Preview / test (pull_request) Has been skipped
Deploy Production / test (push) Successful in 7s
PR Preview / teardown-preview (pull_request) Successful in 14s
PR Preview / deploy-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 4s
Deploy Production / deploy (push) Successful in 6s
Test / e2e-test (push) Failing after 6m55s
Some checks failed
PR Preview / test (pull_request) Has been skipped
Deploy Production / test (push) Successful in 7s
PR Preview / teardown-preview (pull_request) Successful in 14s
PR Preview / deploy-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 6s
Test / build-check (push) Successful in 4s
Deploy Production / deploy (push) Successful in 6s
Test / e2e-test (push) Failing after 6m55s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #36.
This commit is contained in:
@@ -912,13 +912,13 @@ async function exportExcel() {
|
|||||||
'会员价': meta.bottlePrice != null ? Number(meta.bottlePrice.toFixed(2)) : '',
|
'会员价': meta.bottlePrice != null ? Number(meta.bottlePrice.toFixed(2)) : '',
|
||||||
'零售价': meta.retailPrice != null ? Number(meta.retailPrice.toFixed(2)) : '',
|
'零售价': meta.retailPrice != null ? Number(meta.retailPrice.toFixed(2)) : '',
|
||||||
'容量': vol,
|
'容量': vol,
|
||||||
[`单价(¥/${unit})`]: ppdNum ? Number(ppdNum.toFixed(2)) : '',
|
'单价': ppdNum ? `¥${ppdNum.toFixed(2)}/${unit}` : '',
|
||||||
'状态': meta.isActive === false ? '下架' : '在售',
|
'状态': meta.isActive === false ? '下架' : '在售',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const ws = XLSX.utils.json_to_sheet(rows)
|
const ws = XLSX.utils.json_to_sheet(rows)
|
||||||
ws['!cols'] = [{ wch: 16 }, { wch: 28 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 14 }, { wch: 8 }]
|
ws['!cols'] = [{ wch: 16 }, { wch: 28 }, { wch: 10 }, { wch: 10 }, { wch: 12 }, { wch: 16 }, { wch: 8 }]
|
||||||
const wb = XLSX.utils.book_new()
|
const wb = XLSX.utils.book_new()
|
||||||
XLSX.utils.book_append_sheet(wb, ws, '精油价目表')
|
XLSX.utils.book_append_sheet(wb, ws, '精油价目表')
|
||||||
XLSX.writeFile(wb, `精油价目表${dateStr}.xlsx`)
|
XLSX.writeFile(wb, `精油价目表${dateStr}.xlsx`)
|
||||||
|
|||||||
Reference in New Issue
Block a user