feat: 非精油产品显示份、新增护肤品价目 #30

Merged
hera merged 28 commits from fix/next-batch-4 into main 2026-04-13 19:26:58 +00:00
Showing only changes of commit 42993d47ee - Show all commits

View File

@@ -872,7 +872,7 @@ function selectOil(ing, name) {
// Check for duplicate oil in current recipe
const existing = formIngredients.value.find(i => i !== ing && i.oil === name)
if (existing) {
ui.showToast(`已有「${name}」,请直接修改滴数`)
ui.showToast(`已有「${name}」,请直接修改用量`)
ing._open = false
return
}
@@ -1568,7 +1568,7 @@ function recipesIdentical(a, b) {
}
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) {
@@ -1650,7 +1650,7 @@ async function exportExcel() {
return list.map(r => ({
'配方名称': r.name,
'标签': (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)),
'备注': r.note || '',
}))