2b803332 by lxs Committed by lihua

数据定价更新

1 parent 633503c2
...@@ -658,14 +658,10 @@ const matchTableFields = (rData, tData) => { ...@@ -658,14 +658,10 @@ const matchTableFields = (rData, tData) => {
658 }, 0); 658 }, 0);
659 } 659 }
660 660
661 661 const setRowData = (rowData, dGuid) => {
662 const setTableRowData = (dGuid, rIndex) => {
663 let rowData = tableData.value[rIndex], currDataTableGuid = "";
664 const detailDataTable = (flowDetail.value.dataPricingDemandmatchingRQVOS || []).find(f => f.dataTableGuid == dGuid); 662 const detailDataTable = (flowDetail.value.dataPricingDemandmatchingRQVOS || []).find(f => f.dataTableGuid == dGuid);
665 detailDataTable && (currDataTableGuid = detailDataTable.dataTableGuid);
666 if (guid && dGuid == rowData.dataTableGuid) { 663 if (guid && dGuid == rowData.dataTableGuid) {
667 const sourceTableField = flowDetail.value.dataPricingDemandmatchingRQVOS?.find(s => dGuid == s.dataTableGuid); 664 const pricingDemandField = detailDataTable?.pricingDemandFieldRQVOS || [];
668 const pricingDemandField = sourceTableField?.pricingDemandFieldRQVOS || [];
669 rowData.dataFields.map(f => { 665 rowData.dataFields.map(f => {
670 f.chName = pricingDemandField.find(s => f.guid == s.guid)?.chName || '' 666 f.chName = pricingDemandField.find(s => f.guid == s.guid)?.chName || ''
671 }) 667 })
...@@ -679,13 +675,12 @@ const setTableRowData = (dGuid, rIndex) => { ...@@ -679,13 +675,12 @@ const setTableRowData = (dGuid, rIndex) => {
679 return accumulator + Number(currentValue.dataFieldsNum); 675 return accumulator + Number(currentValue.dataFieldsNum);
680 }, 0); 676 }, 0);
681 resourceTableAllNum.value = tableData.value.filter(item => item.dataTableGuid != '' && item.dataTableGuid != null).length; 677 resourceTableAllNum.value = tableData.value.filter(item => item.dataTableGuid != '' && item.dataTableGuid != null).length;
678 return detailDataTable.dataTableGuid || '';
682 } 679 }
683 680
684 const setTableRowData = (dGuid, rIndex, setRow = true) => { 681 const setTableRowData = (dGuid, rIndex, setRow = true) => {
685 let rowData = tableData.value[rIndex]; 682 let rowData = tableData.value[rIndex], currDataTableGuid = "";
686 const detailDataTable = (flowDetail.value.dataPricingDemandmatchingRQVOS || []).find(f => f.dataTableGuid == dGuid && f.demandTableGuid == rowData.demandTableGuid); 683 setRow && (currDataTableGuid = setRowData(rowData, dGuid));
687 setRow && setRowData(rowData, dGuid, detailDataTable);
688 const currDataTableGuid = detailDataTable?.dataTableGuid || '';
689 if (dGuid) { 684 if (dGuid) {
690 tableLoading.value = true; 685 tableLoading.value = true;
691 getRegisterCatalogTableDetail(dGuid).then((res: any) => { 686 getRegisterCatalogTableDetail(dGuid).then((res: any) => {
...@@ -932,7 +927,6 @@ const checkForm = (type) => { ...@@ -932,7 +927,6 @@ const checkForm = (type) => {
932 const priceData = await getCalculatPrice(paramsInfo); 927 const priceData = await getCalculatPrice(paramsInfo);
933 // 显示结果 928 // 显示结果
934 dataTransactionPrice.value = priceData.transactionPrice.toFixed(2); 929 dataTransactionPrice.value = priceData.transactionPrice.toFixed(2);
935
936 if (type == 'export') { 930 if (type == 'export') {
937 loading.value = true; 931 loading.value = true;
938 const exportOut = { 932 const exportOut = {
...@@ -958,7 +952,7 @@ const checkForm = (type) => { ...@@ -958,7 +952,7 @@ const checkForm = (type) => {
958 message: '下载报告请求失败', 952 message: '下载报告请求失败',
959 }); 953 });
960 }) 954 })
961 } else { 955 } else if (type == 'submit') {
962 let params = { 956 let params = {
963 ...paramsInfo, 957 ...paramsInfo,
964 dataTransactionPrice: dataTransactionPrice.value, 958 dataTransactionPrice: dataTransactionPrice.value,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!