diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index 9e25e79..72e5cc5 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -1052,12 +1052,28 @@ async function saveCurrentRecipe() { if (result === false) { // Skipped — but if in multi-recipe queue, load next if (parsedCurrentIndex.value >= 0) { - parsedRecipes.value.splice(parsedCurrentIndex.value, 1) + const skipIdx = parsedCurrentIndex.value + // Prevent syncFormToParsed from overwriting next recipe + parsedCurrentIndex.value = -1 + parsedRecipes.value.splice(skipIdx, 1) if (parsedRecipes.value.length > 0) { - loadParsedIntoForm(Math.min(parsedCurrentIndex.value, parsedRecipes.value.length - 1)) + const next = Math.min(skipIdx, parsedRecipes.value.length - 1) + parsedCurrentIndex.value = next + formName.value = parsedRecipes.value[next].name + const cocoIng = parsedRecipes.value[next].ingredients.find(i => i.oil === '椰子油') + const eoIngs = parsedRecipes.value[next].ingredients.filter(i => i.oil !== '椰子油') + formIngredients.value = eoIngs.length > 0 + ? eoIngs.map(i => ({ ...i, _search: i.oil, _open: false })) + : [{ oil: '', drops: 1, _search: '', _open: false }] + if (cocoIng) { + formCocoRow.value = { oil: '椰子油', drops: cocoIng.drops, _search: '椰子油', _open: false } + formVolume.value = 'single' + } else { + formCocoRow.value = null + formVolume.value = '' + } ui.showToast('已跳过,请处理下一条') } else { - parsedCurrentIndex.value = -1 closeOverlay() } }