2005dd19 by lxs

数据定价更新

1 parent 3fa48dc4
...@@ -583,7 +583,7 @@ const getResourceDetail = (sGuid, toPromise = true) => { ...@@ -583,7 +583,7 @@ const getResourceDetail = (sGuid, toPromise = true) => {
583 const dGuid = item.dataTableGuid; 583 const dGuid = item.dataTableGuid;
584 const rIndex = i; 584 const rIndex = i;
585 (() => { 585 (() => {
586 !toPromise && dGuid && setTableRowData(dGuid, rIndex) 586 !toPromise && dGuid && setTableRowData(dGuid, rIndex, false)
587 })() 587 })()
588 }) 588 })
589 resourceTableAllNum.value = tableData.value.filter(item => item.dataTableGuid != '' && item.dataTableGuid != null).length; 589 resourceTableAllNum.value = tableData.value.filter(item => item.dataTableGuid != '' && item.dataTableGuid != null).length;
...@@ -660,14 +660,10 @@ const matchTableFields = (rData, tData) => { ...@@ -660,14 +660,10 @@ const matchTableFields = (rData, tData) => {
660 }, 0); 660 }, 0);
661 } 661 }
662 662
663 663 const setRowData = (rowData, dGuid) => {
664 const setTableRowData = (dGuid, rIndex) => {
665 let rowData = tableData.value[rIndex], currDataTableGuid = "";
666 const detailDataTable = (flowDetail.value.dataPricingDemandmatchingRQVOS || []).find(f => f.dataTableGuid == dGuid); 664 const detailDataTable = (flowDetail.value.dataPricingDemandmatchingRQVOS || []).find(f => f.dataTableGuid == dGuid);
667 detailDataTable && (currDataTableGuid = detailDataTable.dataTableGuid);
668 if (guid && dGuid == rowData.dataTableGuid) { 665 if (guid && dGuid == rowData.dataTableGuid) {
669 const sourceTableField = flowDetail.value.dataPricingDemandmatchingRQVOS?.find(s => dGuid == s.dataTableGuid); 666 const pricingDemandField = detailDataTable?.pricingDemandFieldRQVOS || [];
670 const pricingDemandField = sourceTableField?.pricingDemandFieldRQVOS || [];
671 rowData.dataFields.map(f => { 667 rowData.dataFields.map(f => {
672 f.chName = pricingDemandField.find(s => f.guid == s.guid)?.chName || '' 668 f.chName = pricingDemandField.find(s => f.guid == s.guid)?.chName || ''
673 }) 669 })
...@@ -681,6 +677,12 @@ const setTableRowData = (dGuid, rIndex) => { ...@@ -681,6 +677,12 @@ const setTableRowData = (dGuid, rIndex) => {
681 return accumulator + Number(currentValue.dataFieldsNum); 677 return accumulator + Number(currentValue.dataFieldsNum);
682 }, 0); 678 }, 0);
683 resourceTableAllNum.value = tableData.value.filter(item => item.dataTableGuid != '' && item.dataTableGuid != null).length; 679 resourceTableAllNum.value = tableData.value.filter(item => item.dataTableGuid != '' && item.dataTableGuid != null).length;
680 return detailDataTable.dataTableGuid || '';
681 }
682
683 const setTableRowData = (dGuid, rIndex, setRow = true) => {
684 let rowData = tableData.value[rIndex], currDataTableGuid = "";
685 setRow && (currDataTableGuid = setRowData(rowData, dGuid));
684 if (dGuid) { 686 if (dGuid) {
685 tableLoading.value = true; 687 tableLoading.value = true;
686 getRegisterCatalogTableDetail(dGuid).then((res: any) => { 688 getRegisterCatalogTableDetail(dGuid).then((res: any) => {
...@@ -927,7 +929,6 @@ const checkForm = (type) => { ...@@ -927,7 +929,6 @@ const checkForm = (type) => {
927 const priceData = await getCalculatPrice(paramsInfo); 929 const priceData = await getCalculatPrice(paramsInfo);
928 // 显示结果 930 // 显示结果
929 dataTransactionPrice.value = priceData.transactionPrice.toFixed(2); 931 dataTransactionPrice.value = priceData.transactionPrice.toFixed(2);
930
931 if (type == 'export') { 932 if (type == 'export') {
932 loading.value = true; 933 loading.value = true;
933 const exportOut = { 934 const exportOut = {
...@@ -953,7 +954,7 @@ const checkForm = (type) => { ...@@ -953,7 +954,7 @@ const checkForm = (type) => {
953 message: '下载报告请求失败', 954 message: '下载报告请求失败',
954 }); 955 });
955 }) 956 })
956 } else { 957 } else if (type == 'submit') {
957 let params = { 958 let params = {
958 ...paramsInfo, 959 ...paramsInfo,
959 dataTransactionPrice: dataTransactionPrice.value, 960 dataTransactionPrice: dataTransactionPrice.value,
...@@ -991,6 +992,11 @@ const btnClick = async (btn, row: any = null) => { ...@@ -991,6 +992,11 @@ const btnClick = async (btn, row: any = null) => {
991 expendTableRef.value.toggleRowExpansion(row); 992 expendTableRef.value.toggleRowExpansion(row);
992 } else if (type == 'calculate' || type == 'submit') { 993 } else if (type == 'calculate' || type == 'submit') {
993 if (type == 'submit') { 994 if (type == 'submit') {
995 const errorMsgText = document.querySelectorAll('.el-form-item__error');
996 if (errorMsgText.length) {
997 ElMessage.info('请修改错误提示项内容后,再操作');
998 return
999 }
994 ElMessageBox.confirm(dataTransactionPrice.value === '' ? '是否直接计算价格并提交' : '请确认当前数据交易价格是否为最新计算结果', '提示', { 1000 ElMessageBox.confirm(dataTransactionPrice.value === '' ? '是否直接计算价格并提交' : '请确认当前数据交易价格是否为最新计算结果', '提示', {
995 confirmButtonText: '确定', 1001 confirmButtonText: '确定',
996 cancelButtonText: '取消', 1002 cancelButtonText: '取消',
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!