完善销售单
This commit is contained in:
@@ -263,9 +263,20 @@ export default {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
return Math.round((parseFloat(prev) + parseFloat(curr)) * 10000) / 10000
|
||||
} else {
|
||||
return prev
|
||||
return Math.round((parseFloat(prev)) * 10000) / 10000
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
this.totalReceivables = sums[index] += ''
|
||||
} else if (column.property === 'count') {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Math.round((parseFloat(prev) + parseFloat(curr)) * 10000) / 10000
|
||||
} else {
|
||||
return Math.round((parseFloat(prev)) * 10000) / 10000
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
@@ -273,9 +284,9 @@ export default {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
return Math.round((parseFloat(prev) + parseFloat(curr)) * 10000) / 10000
|
||||
} else {
|
||||
return prev
|
||||
return Math.round((parseFloat(prev)) * 10000) / 10000
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
@@ -283,9 +294,9 @@ export default {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
return Math.round((parseFloat(prev) + parseFloat(curr)) * 10000) / 10000
|
||||
} else {
|
||||
return prev
|
||||
return Math.round((parseFloat(prev)) * 10000) / 10000
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
@@ -293,9 +304,9 @@ export default {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
return Math.round((parseFloat(prev) + parseFloat(curr)) * 10000) / 10000
|
||||
} else {
|
||||
return prev
|
||||
return Math.round((parseFloat(prev)) * 10000) / 10000
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
|
||||
Reference in New Issue
Block a user