fix: 配方成分显示和导出使用动态单位,重复提示改为"修改用量"
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 52s
All checks were successful
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
PR Preview / deploy-preview (pull_request) Successful in 13s
Test / e2e-test (push) Successful in 52s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -872,7 +872,7 @@ function selectOil(ing, name) {
|
|||||||
// Check for duplicate oil in current recipe
|
// Check for duplicate oil in current recipe
|
||||||
const existing = formIngredients.value.find(i => i !== ing && i.oil === name)
|
const existing = formIngredients.value.find(i => i !== ing && i.oil === name)
|
||||||
if (existing) {
|
if (existing) {
|
||||||
ui.showToast(`已有「${name}」,请直接修改滴数`)
|
ui.showToast(`已有「${name}」,请直接修改用量`)
|
||||||
ing._open = false
|
ing._open = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1568,7 +1568,7 @@ function recipesIdentical(a, b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function formatIngsCompare(ings) {
|
function formatIngsCompare(ings) {
|
||||||
return (ings || []).map(i => `${i.oil} ${i.drops}滴`).join('、')
|
return (ings || []).map(i => `${i.oil} ${i.drops}${oils.unitLabel(i.oil)}`).join('、')
|
||||||
}
|
}
|
||||||
|
|
||||||
async function approveRecipe(recipe) {
|
async function approveRecipe(recipe) {
|
||||||
@@ -1650,7 +1650,7 @@ async function exportExcel() {
|
|||||||
return list.map(r => ({
|
return list.map(r => ({
|
||||||
'配方名称': r.name,
|
'配方名称': r.name,
|
||||||
'标签': (r.tags || []).join('/'),
|
'标签': (r.tags || []).join('/'),
|
||||||
'精油成分': r.ingredients.map(i => `${i.oil}${i.drops}滴`).join('、'),
|
'精油成分': r.ingredients.map(i => `${i.oil}${i.drops}${oils.unitLabel(i.oil)}`).join('、'),
|
||||||
'成本': oils.fmtPrice(oils.calcCost(r.ingredients)),
|
'成本': oils.fmtPrice(oils.calcCost(r.ingredients)),
|
||||||
'备注': r.note || '',
|
'备注': r.note || '',
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user