721d6b75 by lxs

数据产品上架更新

1 parent 25ff483a
......@@ -1196,6 +1196,17 @@ const setFormItems = (row: any = null, isDetail = false) => {
else if (item.field == 'qualityEvaluationFileInfo') {
item.default = row ? (row.evaluationFile ? row.evaluationFile : row[item.field] || []) : []
}
else if(item.field == 'pricingWay'){
item.default = row.fixPriceWay || row[item.field] || '';
}
else if (item.field == 'productPrice') {
item.default = row.pricingAmount || row[item.field] || '';
item.visible = (row.fixPriceWay || row.pricingWay) != '4';
}
else if (item.field == 'priceUnit') {
item.default = row[item.field] || '';
item.visible = (row.fixPriceWay || row.pricingWay) != '4';
}
else {
item.default = row[item.field] !== undefined ? row[item.field] : (item.default || '');
// if (item && item.hasOwnProperty('default')) {
......@@ -1214,32 +1225,28 @@ const selectChange = async (val, row, info) => {
return;
}
const data = row.options.filter(o => o.damName == val);
const dataInfo = data.length ? data[0] : {};
let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : [];
await setFormItems({ ...info, coverageArea: coverageArea });
formInfo.value.items.forEach((item: any) => {
if (item.field == 'costAssessmentFileInfo') {
item.default = data?.[0]?.assessmentFile || [];
} else if (item.field == 'qualityEvaluationFileInfo') {
item.default = data?.[0]?.evaluationFile || [];
} else if (item.field == 'qualityEvaluationFileInfo') {
item.default = data?.[0]?.evaluationFile || [];
} else if (item.field == 'commitmentLetterInfo') {
item.default = data?.[0]?.commitmentLetter || [];
} else if (item.field == 'qualityEvaluationInstitution') {
item.default = data?.[0]?.qualityEvaluationInstitution || '';
} else if (item.field == 'costAssessmentInstitution') {
item.default = data?.[0]?.costAssessmentInstitution || '';
}
// else if (item.field == 'pricingWay') {
// item.default = data?.[0]?.fixPriceWay || '';
// } else if (item.field == 'productPrice') {
// item.default = data?.[0]?.pricingAmount || '';
// } else if (item.field == 'priceUnit') {
// item.default = data?.[0]?.priceUnit || '';
await setFormItems({ ...info, ...dataInfo, coverageArea: coverageArea });
// formInfo.value.items.forEach((item: any) => {
// if (item.field == 'costAssessmentFileInfo') {
// item.default = data?.[0]?.assessmentFile || [];
// } else if (item.field == 'qualityEvaluationFileInfo') {
// item.default = data?.[0]?.evaluationFile || [];
// } else if (item.field == 'qualityEvaluationFileInfo') {
// item.default = data?.[0]?.evaluationFile || [];
// } else if (item.field == 'commitmentLetterInfo') {
// item.default = data?.[0]?.commitmentLetter || [];
// } else if (item.field == 'qualityEvaluationInstitution') {
// item.default = data?.[0]?.qualityEvaluationInstitution || '';
// } else if (item.field == 'costAssessmentInstitution') {
// item.default = data?.[0]?.costAssessmentInstitution || '';
// } else if (item.field == 'pricingWay') {
// item.default = data?.[0]?.pricingWay || '';
// }
});
// });
formInfo.value.items.at(0).default = val;
// formInfo.value.items.at(0).default = val;
formInfo.value.items.at(1).default = data.length ? data[0].damType : '';
// formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : '';
formInfo.value.items.at(2).default = data.length ? data[0].damCode : '';
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!