Commit f87b356b authored by dragondean@qq.com's avatar dragondean@qq.com

自编号报表合计行增加单位

parent e1430e4b
...@@ -257,10 +257,10 @@ export default { ...@@ -257,10 +257,10 @@ export default {
}, },
// 获取列的货币名称 columnName 取值为Other, Freight, Clearance // 获取列的货币名称 columnName 取值为Other, Freight, Clearance
ColumnCurrencyName(){ ColumnCurrencyName(){
return (columnName) => { return (columnName, wrapper = true) => {
if(!this.list.length) return '' if(!this.list.length) return ''
let field = `total${columnName}FeeCurrency` let field = `total${columnName}FeeCurrency`
return `(${this.list[0]['summaryInfo'][field]})` return wrapper ? `(${this.list[0]['summaryInfo'][field]})` : this.list[0]['summaryInfo'][field]
} }
} }
}, },
...@@ -296,35 +296,38 @@ export default { ...@@ -296,35 +296,38 @@ export default {
}, },
// 返回汇总行数据 // 返回汇总行数据
getSummary(){ getSummary(){
const FreightCurrencyName = this.ColumnCurrencyName('Freight', false)
const ClearanceCurrencyName = this.ColumnCurrencyName('Clearance', false)
const OtherCurrencyName = this.ColumnCurrencyName('Other', false)
const data = [ const data = [
this.$t('合计'), this.$t('合计'),
'', '',
// 应收款 // 应收款
this.getTotal('receivableTotalFee'), this.getTotal('receivableTotalFee') + 'USD',
// 应收运费 // 应收运费
this.getTotal('totalReceivableFreightFee'), this.getTotal('totalReceivableFreightFee') + FreightCurrencyName,
// 应收清关费 // 应收清关费
this.getTotal('totalReceivableClearanceFee'), this.getTotal('totalReceivableClearanceFee') + ClearanceCurrencyName,
// 应收其他费用 // 应收其他费用
this.getTotal('totalReceivableOtherFee'), this.getTotal('totalReceivableOtherFee') + OtherCurrencyName,
// 目的地实收运费 // 目的地实收运费
this.getTotal('totalNetReceiptsCollectFreightFee'), this.getTotal('totalNetReceiptsCollectFreightFee') + FreightCurrencyName,
// 目的地实收清关费 // 目的地实收清关费
this.getTotal('totalNetReceiptsCollectClearanceFee'), this.getTotal('totalNetReceiptsCollectClearanceFee') + ClearanceCurrencyName,
// 目的地实收其他费用 // 目的地实收其他费用
this.getTotal('totalNetReceiptsCollectOtherFee'), this.getTotal('totalNetReceiptsCollectOtherFee') + OtherCurrencyName,
// 中国实收运费 // 中国实收运费
this.getTotal('netReceiptsAdvanceFreightFee'), this.getTotal('netReceiptsAdvanceFreightFee') + FreightCurrencyName,
// 中国实收清关费 // 中国实收清关费
this.getTotal('netReceiptsAdvanceClearanceFee'), this.getTotal('netReceiptsAdvanceClearanceFee') + ClearanceCurrencyName,
// 中国实收其他费用 // 中国实收其他费用
this.getTotal('netReceiptsAdvanceOtherFee'), this.getTotal('netReceiptsAdvanceOtherFee') + OtherCurrencyName,
// 运费折扣 // 运费折扣
this.getTotal('discountFreightFee'), this.getTotal('discountFreightFee') + FreightCurrencyName,
// 清关费折扣 // 清关费折扣
this.getTotal('discountClearanceFee'), this.getTotal('discountClearanceFee') + ClearanceCurrencyName,
// 其他费用折扣 // 其他费用折扣
this.getTotal('discountOtherFee') this.getTotal('discountOtherFee') + OtherCurrencyName,
] ]
console.log('sum', {data}) console.log('sum', {data})
return data return data
......
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