1236b879 by lxs

数据产品上架更新

1 parent 5cc5ea6e
...@@ -1198,13 +1198,16 @@ const setFormItems = (row: any = null, isDetail = false) => { ...@@ -1198,13 +1198,16 @@ const setFormItems = (row: any = null, isDetail = false) => {
1198 else if (item.field == 'qualityEvaluationFileInfo') { 1198 else if (item.field == 'qualityEvaluationFileInfo') {
1199 item.default = row ? (row.evaluationFile ? row.evaluationFile : row[item.field] || []) : [] 1199 item.default = row ? (row.evaluationFile ? row.evaluationFile : row[item.field] || []) : []
1200 } 1200 }
1201 else if(item.field == 'pricingWay'){
1202 item.default = row.fixPriceWay || row[item.field] || '';
1203 }
1201 else if (item.field == 'productPrice') { 1204 else if (item.field == 'productPrice') {
1202 item.default = row[item.field] || ''; 1205 item.default = row.pricingAmount || row[item.field] || '';
1203 item.visible = row?.pricingWay != '4'; 1206 item.visible = (row.fixPriceWay || row.pricingWay) != '4';
1204 } 1207 }
1205 else if (item.field == 'priceUnit') { 1208 else if (item.field == 'priceUnit') {
1206 item.default = row[item.field] || ''; 1209 item.default = row[item.field] || '';
1207 item.visible = row?.pricingWay != '4'; 1210 item.visible = (row.fixPriceWay || row.pricingWay) != '4';
1208 } 1211 }
1209 else { 1212 else {
1210 item.default = row[item.field] !== undefined ? row[item.field] : (item.default || ''); 1213 item.default = row[item.field] !== undefined ? row[item.field] : (item.default || '');
...@@ -1224,8 +1227,9 @@ const selectChange = async (val, row, info) => { ...@@ -1224,8 +1227,9 @@ const selectChange = async (val, row, info) => {
1224 return; 1227 return;
1225 } 1228 }
1226 const data = row.options.filter(o => o.damName == val); 1229 const data = row.options.filter(o => o.damName == val);
1230 const dataInfo = data.length ? data[0] : {};
1227 let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : []; 1231 let coverageArea = (data.length && data[0].coverageArea) ? data[0].coverageArea : [];
1228 await setFormItems({ ...info, coverageArea: coverageArea }); 1232 await setFormItems({ ...info, ...dataInfo, coverageArea: coverageArea });
1229 // formInfo.value.items.forEach((item: any) => { 1233 // formInfo.value.items.forEach((item: any) => {
1230 // if (item.field == 'costAssessmentFileInfo') { 1234 // if (item.field == 'costAssessmentFileInfo') {
1231 // item.default = data?.[0]?.assessmentFile || []; 1235 // item.default = data?.[0]?.assessmentFile || [];
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!