|
@@ -176,6 +176,7 @@ import { isNullES } from 'js-fast-way'
|
|
import { arrIndex, formValidate, getArrValue, getObjValue } from 'js-fast-way'
|
|
import { arrIndex, formValidate, getArrValue, getObjValue } from 'js-fast-way'
|
|
import mainApi from '~api/project/project'
|
|
import mainApi from '~api/project/project'
|
|
import { getDictionaryData } from '~src/utils/tools'
|
|
import { getDictionaryData } from '~src/utils/tools'
|
|
|
|
+import BigNumber from 'bignumber.js'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
form: {
|
|
form: {
|
|
@@ -375,9 +376,11 @@ yearOptions.value[selectIndex.value].yearForm.fourInvest,
|
|
} else {
|
|
} else {
|
|
isChangeyearlyInvest.value = false
|
|
isChangeyearlyInvest.value = false
|
|
}
|
|
}
|
|
- yearOptions.value[selectIndex.value].yearForm.yearlyInvest = Number(key2) + Number(key3) + Number(key4) + Number(key5)
|
|
|
|
|
|
+ // yearOptions.value[selectIndex.value].yearForm.yearlyInvest = Number(key2) + Number(key3) + Number(key4) + Number(key5)
|
|
|
|
+ yearOptions.value[selectIndex.value].yearForm.yearlyInvest = ( BigNumber( Number(key2)) .plus (BigNumber(Number(key3))) .plus (BigNumber( Number(key4))) .plus (BigNumber(Number(key5)))).toNumber()
|
|
const totalYearlyInvest = yearOptions.value.reduce((accumulator, currentValue) => {
|
|
const totalYearlyInvest = yearOptions.value.reduce((accumulator, currentValue) => {
|
|
- return accumulator + currentValue.yearForm.yearlyInvest
|
|
|
|
|
|
+ // return accumulator + currentValue.yearForm.yearlyInvest
|
|
|
|
+ return BigNumber(Number(accumulator)).plus(BigNumber(Number(currentValue.yearForm.yearlyInvest))).toNumber()
|
|
}, 0)
|
|
}, 0)
|
|
baseForm.value.allInvestMoney = totalYearlyInvest
|
|
baseForm.value.allInvestMoney = totalYearlyInvest
|
|
},
|
|
},
|