数据产品上架更新
Showing
1 changed file
with
30 additions
and
23 deletions
| ... | @@ -1196,6 +1196,17 @@ const setFormItems = (row: any = null, isDetail = false) => { | ... | @@ -1196,6 +1196,17 @@ const setFormItems = (row: any = null, isDetail = false) => { |
| 1196 | else if (item.field == 'qualityEvaluationFileInfo') { | 1196 | else if (item.field == 'qualityEvaluationFileInfo') { |
| 1197 | item.default = row ? (row.evaluationFile ? row.evaluationFile : row[item.field] || []) : [] | 1197 | item.default = row ? (row.evaluationFile ? row.evaluationFile : row[item.field] || []) : [] |
| 1198 | } | 1198 | } |
| 1199 | else if(item.field == 'pricingWay'){ | ||
| 1200 | item.default = row.fixPriceWay || row[item.field] || ''; | ||
| 1201 | } | ||
| 1202 | else if (item.field == 'productPrice') { | ||
| 1203 | item.default = row.pricingAmount || row[item.field] || ''; | ||
| 1204 | item.visible = (row.fixPriceWay || row.pricingWay) != '4'; | ||
| 1205 | } | ||
| 1206 | else if (item.field == 'priceUnit') { | ||
| 1207 | item.default = row[item.field] || ''; | ||
| 1208 | item.visible = (row.fixPriceWay || row.pricingWay) != '4'; | ||
| 1209 | } | ||
| 1199 | else { | 1210 | else { |
| 1200 | item.default = row[item.field] !== undefined ? row[item.field] : (item.default || ''); | 1211 | item.default = row[item.field] !== undefined ? row[item.field] : (item.default || ''); |
| 1201 | // if (item && item.hasOwnProperty('default')) { | 1212 | // if (item && item.hasOwnProperty('default')) { |
| ... | @@ -1214,32 +1225,28 @@ const selectChange = async (val, row, info) => { | ... | @@ -1214,32 +1225,28 @@ const selectChange = async (val, row, info) => { |
| 1214 | return; | 1225 | return; |
| 1215 | } | 1226 | } |
| 1216 | const data = row.options.filter(o => o.damName == val); | 1227 | const data = row.options.filter(o => o.damName == val); |
| 1228 | const dataInfo = data.length ? data[0] : {}; | ||
| 1217 | let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : []; | 1229 | let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : []; |
| 1218 | await setFormItems({ ...info, coverageArea: coverageArea }); | 1230 | await setFormItems({ ...info, ...dataInfo, coverageArea: coverageArea }); |
| 1219 | formInfo.value.items.forEach((item: any) => { | 1231 | // formInfo.value.items.forEach((item: any) => { |
| 1220 | if (item.field == 'costAssessmentFileInfo') { | 1232 | // if (item.field == 'costAssessmentFileInfo') { |
| 1221 | item.default = data?.[0]?.assessmentFile || []; | 1233 | // item.default = data?.[0]?.assessmentFile || []; |
| 1222 | } else if (item.field == 'qualityEvaluationFileInfo') { | 1234 | // } else if (item.field == 'qualityEvaluationFileInfo') { |
| 1223 | item.default = data?.[0]?.evaluationFile || []; | 1235 | // item.default = data?.[0]?.evaluationFile || []; |
| 1224 | } else if (item.field == 'qualityEvaluationFileInfo') { | 1236 | // } else if (item.field == 'qualityEvaluationFileInfo') { |
| 1225 | item.default = data?.[0]?.evaluationFile || []; | 1237 | // item.default = data?.[0]?.evaluationFile || []; |
| 1226 | } else if (item.field == 'commitmentLetterInfo') { | 1238 | // } else if (item.field == 'commitmentLetterInfo') { |
| 1227 | item.default = data?.[0]?.commitmentLetter || []; | 1239 | // item.default = data?.[0]?.commitmentLetter || []; |
| 1228 | } else if (item.field == 'qualityEvaluationInstitution') { | 1240 | // } else if (item.field == 'qualityEvaluationInstitution') { |
| 1229 | item.default = data?.[0]?.qualityEvaluationInstitution || ''; | 1241 | // item.default = data?.[0]?.qualityEvaluationInstitution || ''; |
| 1230 | } else if (item.field == 'costAssessmentInstitution') { | 1242 | // } else if (item.field == 'costAssessmentInstitution') { |
| 1231 | item.default = data?.[0]?.costAssessmentInstitution || ''; | 1243 | // item.default = data?.[0]?.costAssessmentInstitution || ''; |
| 1232 | } | 1244 | // } else if (item.field == 'pricingWay') { |
| 1233 | // else if (item.field == 'pricingWay') { | 1245 | // item.default = data?.[0]?.pricingWay || ''; |
| 1234 | // item.default = data?.[0]?.fixPriceWay || ''; | ||
| 1235 | // } else if (item.field == 'productPrice') { | ||
| 1236 | // item.default = data?.[0]?.pricingAmount || ''; | ||
| 1237 | // } else if (item.field == 'priceUnit') { | ||
| 1238 | // item.default = data?.[0]?.priceUnit || ''; | ||
| 1239 | // } | 1246 | // } |
| 1240 | }); | 1247 | // }); |
| 1241 | 1248 | ||
| 1242 | formInfo.value.items.at(0).default = val; | 1249 | // formInfo.value.items.at(0).default = val; |
| 1243 | formInfo.value.items.at(1).default = data.length ? data[0].damType : ''; | 1250 | formInfo.value.items.at(1).default = data.length ? data[0].damType : ''; |
| 1244 | // formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : ''; | 1251 | // formInfo.value.items.at(2).default = data.length ? data[0].subjectDomain : ''; |
| 1245 | formInfo.value.items.at(2).default = data.length ? data[0].damCode : ''; | 1252 | formInfo.value.items.at(2).default = data.length ? data[0].damCode : ''; | ... | ... |
-
Please register or sign in to post a comment