|
|
|
@ -235,11 +235,11 @@ const progressItems = computed(() => [
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
const rows = ref([
|
|
|
|
const rows = ref([
|
|
|
|
{ key: "procurementCost", name: "采购成本", description: "元器件/模组的单台采购总成本,含运费、税费", smallBatchWeight: 20, largeBatchWeight: 35 },
|
|
|
|
{ key: "procurementCost", name: "采购成本", description: "元器件/模组的单台采购总成本,含运费、税费", smallBatchWeight: null, largeBatchWeight: null },
|
|
|
|
{ key: "deliveryCycle", name: "交货周期", description: "从下单到收货的时间,影响试产/生产进度", smallBatchWeight: 30, largeBatchWeight: 15 },
|
|
|
|
{ key: "deliveryCycle", name: "交货周期", description: "从下单到收货的时间,影响试产/生产进度", smallBatchWeight: null, largeBatchWeight: null },
|
|
|
|
{ key: "qualityReliability", name: "品质可靠性", description: "元器件是否为正品,有无翻新/故障,规格匹配度", smallBatchWeight: 20, largeBatchWeight: 30 },
|
|
|
|
{ key: "qualityReliability", name: "品质可靠性", description: "元器件是否为正品,有无翻新/故障,规格匹配度", smallBatchWeight: null, largeBatchWeight: null },
|
|
|
|
{ key: "procurementFlexibility", name: "采购灵活性", description: "是否支持小批量拆卖、零散采购、退换货", smallBatchWeight: 20, largeBatchWeight: 10 },
|
|
|
|
{ key: "procurementFlexibility", name: "采购灵活性", description: "是否支持小批量拆卖、零散采购、退换货", smallBatchWeight: null, largeBatchWeight: null },
|
|
|
|
{ key: "serviceSupport", name: "服务支持", description: "是否提供技术文档、售后支持,退换货是否方便", smallBatchWeight: 10, largeBatchWeight: 10 },
|
|
|
|
{ key: "serviceSupport", name: "服务支持", description: "是否提供技术文档、售后支持,退换货是否方便", smallBatchWeight: null, largeBatchWeight: null },
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_RISKS = [
|
|
|
|
const DEFAULT_RISKS = [
|
|
|
|
@ -429,7 +429,7 @@ function applyStepThree(answer) {
|
|
|
|
|
|
|
|
|
|
|
|
async function saveStepOne() {
|
|
|
|
async function saveStepOne() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const result = await validateSupplierEvaluationStepOne(buildStepOnePayload());
|
|
|
|
const result = (await validateSupplierEvaluationStepOne(buildStepOnePayload()))?.data || {};
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "权重校验未通过");
|
|
|
|
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({ taskKey: TASK_KEY, currentStep: 1, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step1Answer: JSON.stringify({ items: result.items }) });
|
|
|
|
stepOneSaved.value = true;
|
|
|
|
stepOneSaved.value = true;
|
|
|
|
@ -443,7 +443,7 @@ async function saveStepOne() {
|
|
|
|
async function saveStepTwo() {
|
|
|
|
async function saveStepTwo() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
syncChannelNames();
|
|
|
|
syncChannelNames();
|
|
|
|
const result = await validateSupplierEvaluationStepTwo(buildStepTwoPayload());
|
|
|
|
const result = (await validateSupplierEvaluationStepTwo(buildStepTwoPayload()))?.data || {};
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "渠道评分校验未通过");
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "渠道评分校验未通过");
|
|
|
|
smallBatchRows.value = createScoreRows(result.smallBatchChannels);
|
|
|
|
smallBatchRows.value = createScoreRows(result.smallBatchChannels);
|
|
|
|
largeBatchRows.value = createScoreRows(result.largeBatchChannels);
|
|
|
|
largeBatchRows.value = createScoreRows(result.largeBatchChannels);
|
|
|
|
@ -458,7 +458,7 @@ async function saveStepTwo() {
|
|
|
|
|
|
|
|
|
|
|
|
async function saveStepThree() {
|
|
|
|
async function saveStepThree() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const result = await validateSupplierEvaluationStepThree(buildStepThreePayload());
|
|
|
|
const result = (await validateSupplierEvaluationStepThree(buildStepThreePayload()))?.data || {};
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "第 3 步校验未通过");
|
|
|
|
if (!result?.valid) throw new Error(result?.message || "第 3 步校验未通过");
|
|
|
|
const step3Answer = { scenarioAnalyses: result.scenarioAnalyses, procurementRecommendation: result.procurementRecommendation, risks: result.risks };
|
|
|
|
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({ taskKey: TASK_KEY, currentStep: 3, saveAction: "SAVE", progressStatus: "IN_PROGRESS", step3Answer: JSON.stringify(step3Answer) });
|
|
|
|
@ -510,7 +510,7 @@ onMounted(async () => {
|
|
|
|
taskConfig.value = {};
|
|
|
|
taskConfig.value = {};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const answer = await getStudentTrainingAnswer(TASK_KEY);
|
|
|
|
const answer = (await getStudentTrainingAnswer(TASK_KEY))?.data || {};
|
|
|
|
stepOneSaved.value = applyStepOne(answer);
|
|
|
|
stepOneSaved.value = applyStepOne(answer);
|
|
|
|
stepTwoSaved.value = applyStepTwo(answer);
|
|
|
|
stepTwoSaved.value = applyStepTwo(answer);
|
|
|
|
applyStepThree(answer);
|
|
|
|
applyStepThree(answer);
|
|
|
|
|