详情界面 含税总金额

master
Harry Yang 2023-01-05 21:16:03 +08:00
parent a84c4c31c3
commit f23bf9e175
1 changed files with 6 additions and 2 deletions

View File

@ -467,6 +467,7 @@
payAmount: numberFixed(detail.payAmount), payAmount: numberFixed(detail.payAmount),
totalTaxExclude: numberFixed(detail.totalTaxExclude), totalTaxExclude: numberFixed(detail.totalTaxExclude),
totalTaxInclude_: numberFixed(detail.totalTaxInclude),// 存在相同字段转换一下 totalTaxInclude_: numberFixed(detail.totalTaxInclude),// 存在相同字段转换一下
totalTaxInclude: numberFixed(detail.totalTaxInclude)
} }
} }
let rowKey = 0 let rowKey = 0
@ -485,10 +486,13 @@
const first = purchaseDetails.shift(); const first = purchaseDetails.shift();
// 再处理剩余的子元素 // 再处理剩余的子元素
purchaseDetails = purchaseDetails.map(purchase => ({ purchaseDetails = purchaseDetails.map(purchase => ({
...purchase, rowKey: rowKey++, parent, newRow: true ...purchase, rowKey: rowKey++, parent, newRow: true,
totalTaxInclude: numberFixed(purchase.totalTaxInclude)
})) }))
// 合并第一行到父级 // 合并第一行到父级
Object.assign(parent, first) Object.assign(parent, {
...first, totalTaxInclude: numberFixed(first.totalTaxInclude)
})
delete parent['parent'] delete parent['parent']
delete parent['purchaseDetails'] delete parent['purchaseDetails']