Commit 2b55eb76 authored by linxin's avatar linxin

修复支付部分计算金额总和问题

parent 79b89d85
...@@ -88,10 +88,14 @@ export default { ...@@ -88,10 +88,14 @@ export default {
}) })
if (notNaN.length !== 0) { if (notNaN.length !== 0) {
notNaN.forEach(i => { notNaN.forEach(i => {
a = a + parseFloat(i) if (!isNaN(parseFloat(i))) {
a = a + parseFloat(i)
vm.money = a
}
vm.money = a vm.money = a
}) })
} else { } else if (notNaN.length === 0) {
debugger
vm.money = 0 vm.money = 0
} }
} }
......
...@@ -144,12 +144,15 @@ export default { ...@@ -144,12 +144,15 @@ export default {
}) })
if (notNaN.length !== 0) { if (notNaN.length !== 0) {
notNaN.forEach(i => { notNaN.forEach(i => {
a = a + parseFloat(i) if (!isNaN(parseFloat(i))) {
if (vm.money !== '') { a = a + parseFloat(i)
vm.sumMoney = parseFloat(a + parseFloat(vm.money)) if (vm.money !== '') {
} else { vm.sumMoney = parseFloat(a + parseFloat(vm.money))
vm.sumMoney = a } else {
vm.sumMoney = a
}
} }
vm.money = a
}) })
} else { } else {
if (vm.money !== '') { if (vm.money !== '') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment