| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="50%" |
| | | width="100%" |
| | | submitText="返回修改" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | open(title,targer){ |
| | | |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param; |
| | | const sums = []; |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = '合计'; |
| | | return; |
| | | sums[index] = '合计' |
| | | } else { |
| | | if (index == 9||index==10||index==11||index==12) { |
| | | const values = data.map(item => Number(item[column.property])); |
| | | const values = data.map(item => Number(item[column.property])) |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | const value = Number(curr); |
| | | const value = Number(curr) |
| | | if (!isNaN(value)) { |
| | | return prev + curr; |
| | | return prev + curr |
| | | } else { |
| | | return prev; |
| | | return prev |
| | | } |
| | | }, 0); |
| | | }, 0) |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | return sums; |
| | | }) |
| | | return sums |
| | | } |
| | | } |
| | | } |
| | |
| | | justify-content: space-between; |
| | | margin-bottom: 20px; |
| | | span { |
| | | font-size: 18px; |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | color: #000000; |
| | | } |