Merge pull request '커뮤니티 정산 - 합계 추가' (#23) from test into main

Reviewed-on: #23
This commit is contained in:
klaus 2024-06-20 06:03:29 +00:00
commit b7c8bed727
1 changed files with 18 additions and 2 deletions

View File

@ -43,8 +43,6 @@
조회
</v-btn>
</v-col>
<v-spacer />
</v-row>
<v-row>
@ -57,6 +55,20 @@
class="elevation-1"
hide-default-footer
>
<template slot="body.prepend">
<tr>
<td colspan="4">
합계
</td>
<td>{{ sumField('totalCan').toLocaleString() }} </td>
<td>{{ sumField('totalKrw').toLocaleString() }} </td>
<td>{{ sumField('paymentFee').toLocaleString() }} </td>
<td>{{ sumField('settlementAmount').toLocaleString() }} </td>
<td>{{ sumField('tax').toLocaleString() }} </td>
<td>{{ sumField('depositAmount').toLocaleString() }} </td>
</tr>
</template>
<template v-slot:item.title="{ item }">
{{ item.title }}...
</template>
@ -211,6 +223,10 @@ export default {
this.$dialog.notify.error(message)
},
sumField(key) {
return this.items.reduce((a, b) => a + (b[key] || 0), 0)
},
async next() {
await this.getCalculateCommunityPost()
},