duy 7 сар өмнө
parent
commit
dbe7215a8d

+ 8 - 1
src/views/project/modules/project-list.vue

@@ -245,6 +245,7 @@
 import { onMounted, ref, watch } from 'vue'
 import mainApi from '~api/project/project'
 import { deepClone, getArrValue, getObjValue, isNullES, newDownBlob } from 'js-fast-way'
+import BigNumber from 'bignumber.js'
 const props = defineProps({
     isAdmin: {
         type: Boolean,
@@ -520,7 +521,13 @@ const changeInvestMoney = (val, row, index)=>{
         if (index === 0) {
             table[index].investMoneyAll = Number(table[index].investMoney )
         } else if (0 < index < 12) {
-            table[index].investMoneyAll = Number(table[index].investMoney ) + Number(table[index - 1].investMoneyAll)
+            // table[index].investMoneyAll = Number(table[index].investMoney ) + Number(table[index - 1].investMoneyAll)
+            let a = Number( table[index].investMoney )
+            let b = Number(table[index - 1].investMoneyAll)
+            a = BigNumber(a)
+            b = BigNumber(b)
+            let c = a.plus(b).toNumber()
+            table[index].investMoneyAll = c
         }
     })
 }