diff --git a/src/views/product/hardware-cost.vue b/src/views/product/hardware-cost.vue index 6121acb..5449cbb 100644 --- a/src/views/product/hardware-cost.vue +++ b/src/views/product/hardware-cost.vue @@ -22,7 +22,7 @@
- +
@@ -743,7 +743,9 @@ async function handleCostChartUpload(event, type) { uploadingChart.value = "" } } -async function saveStepFour() { +function submitTask() { return saveStepFour(true) } + +async function saveStepFour(submit = false) { savingStepFour.value = true try { const payload = stepFourPayload() @@ -753,15 +755,15 @@ async function saveStepFour() { if (!validated.valid) { notifyError(validated.message || "请完善成本结构图和优化方案"); return } await saveStudentTrainingAnswer(TASK_KEY, { currentStep: 4, - saveAction: "SUBMIT", - submitted: true, + saveAction: submit ? "SUBMIT" : "SAVE", + submitted: submit, step4Answer: JSON.stringify({ smallBatchChart: { ...stepFour.smallBatchChart }, largeBatchChart: { ...stepFour.largeBatchChart }, optimizationPlan: payload.optimizationPlan, }), }) - notifySuccess("成本优化决策已保存") + notifySuccess(submit ? "任务提交成功" : "成本优化决策已保存") } catch (error) { notifyError(error?.message || "成本优化决策保存失败,请检查填写内容") } finally {