정산 - 합계 추가

This commit is contained in:
Yu Sung 2023-10-04 16:20:27 +09:00
parent cab4e00626
commit 15f1136499
1 changed files with 19 additions and 16 deletions

View File

@ -55,20 +55,19 @@
class="elevation-1" class="elevation-1"
hide-default-footer hide-default-footer
> >
<template v-slot:item.email="{ item }"> <template slot="body.prepend">
{{ item.email }} <tr>
</template> <td colspan="5">
합계
<template v-slot:item.nickname="{ item }"> </td>
{{ item.nickname }} <td>{{ sumField('numberOfPeople').toLocaleString() }} </td>
</template> <td>{{ sumField('totalAmount').toLocaleString() }} </td>
<td>{{ sumField('totalKrw').toLocaleString() }} </td>
<template v-slot:item.date="{ item }"> <td>{{ sumField('paymentFee').toLocaleString() }} </td>
{{ item.date }} <td>{{ sumField('settlementAmount').toLocaleString() }} </td>
</template> <td>{{ sumField('tax').toLocaleString() }} </td>
<td>{{ sumField('depositAmount').toLocaleString() }} </td>
<template v-slot:item.title="{ item }"> </tr>
{{ item.title }}
</template> </template>
<template v-slot:item.entranceFee="{ item }"> <template v-slot:item.entranceFee="{ item }">
@ -145,7 +144,7 @@ export default {
field: "entranceFee", field: "entranceFee",
}, },
{ {
label: "인원", label: "유료방참여인원",
field: "numberOfPeople", field: "numberOfPeople",
}, },
{ {
@ -204,7 +203,7 @@ export default {
value: 'entranceFee', value: 'entranceFee',
}, },
{ {
text: '인원', text: '유료방참여인원',
align: 'center', align: 'center',
sortable: false, sortable: false,
value: 'numberOfPeople', value: 'numberOfPeople',
@ -280,6 +279,10 @@ export default {
this.$dialog.notify.success(message) this.$dialog.notify.success(message)
}, },
sumField(key) {
return this.items.reduce((a, b) => a + (b[key] || 0), 0)
},
async getCalculateLive() { async getCalculateLive() {
this.is_loading = true this.is_loading = true