guoyuji
2025-03-07 99d0bb96043ba5d6db66bbfb00f67ca4e09f3ffb
1
2
3
4
5
6
7
8
9
10
11
12
export default function footSum(list, field) {
    let count = 0
    list.forEach(item => {
        if(field.indexOf('.')>-1){
            let  array = field.split('.')
            count += Number(item[array[0]][array[1]])
        }else {
            count += Number(item[field])
        }
    })
    return count.toFixed(2)
}