|
|
|
|
@ -429,7 +429,7 @@ async function saveStepOne(showMessage = true) {
|
|
|
|
|
try {
|
|
|
|
|
const result = (await validateSupplierEvaluationStepOne(buildStepOnePayload()))?.data || {};
|
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "权重校验未通过");
|
|
|
|
|
await saveStudentTrainingAnswer({ taskKey: TASK_KEY, currentStep: 1, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step1Answer: JSON.stringify({ items: result.items }) });
|
|
|
|
|
await saveStudentTrainingAnswer(TASK_KEY, { currentStep: 1, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step1Answer: JSON.stringify({ items: result.items }) });
|
|
|
|
|
stepOneSaved.value = true;
|
|
|
|
|
if (showMessage) ElMessage.success("当前步骤已保存");
|
|
|
|
|
return true;
|
|
|
|
|
@ -446,7 +446,7 @@ async function saveStepTwo(showMessage = true) {
|
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "渠道评分校验未通过");
|
|
|
|
|
smallBatchRows.value = createScoreRows(result.smallBatchChannels);
|
|
|
|
|
largeBatchRows.value = createScoreRows(result.largeBatchChannels);
|
|
|
|
|
await saveStudentTrainingAnswer({ taskKey: TASK_KEY, currentStep: 2, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step2Answer: JSON.stringify({ weights: result.weights, smallBatchChannels: result.smallBatchChannels, largeBatchChannels: result.largeBatchChannels }) });
|
|
|
|
|
await saveStudentTrainingAnswer(TASK_KEY, { currentStep: 2, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step2Answer: JSON.stringify({ weights: result.weights, smallBatchChannels: result.smallBatchChannels, largeBatchChannels: result.largeBatchChannels }) });
|
|
|
|
|
stepTwoSaved.value = true;
|
|
|
|
|
syncChannelNames();
|
|
|
|
|
if (showMessage) ElMessage.success("当前步骤已保存");
|
|
|
|
|
@ -462,7 +462,7 @@ async function saveStepThree(showMessage = true) {
|
|
|
|
|
const result = (await validateSupplierEvaluationStepThree(buildStepThreePayload()))?.data || {};
|
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "第 3 步校验未通过");
|
|
|
|
|
const step3Answer = { scenarioAnalyses: result.scenarioAnalyses, procurementRecommendation: result.procurementRecommendation, risks: result.risks };
|
|
|
|
|
await saveStudentTrainingAnswer({ taskKey: TASK_KEY, currentStep: 3, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step3Answer: JSON.stringify(step3Answer) });
|
|
|
|
|
await saveStudentTrainingAnswer(TASK_KEY, { currentStep: 3, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step3Answer: JSON.stringify(step3Answer) });
|
|
|
|
|
applyStepThree({ step3Answer });
|
|
|
|
|
if (showMessage) ElMessage.success("当前步骤已保存");
|
|
|
|
|
return true;
|
|
|
|
|
|