feat(calculate): 정산 관련 API 및 화면 페이징 처리 추가

This commit is contained in:
Yu Sung
2026-03-05 14:23:51 +09:00
parent c9f49a208a
commit 3dff71046d
4 changed files with 66 additions and 12 deletions

View File

@@ -119,6 +119,16 @@
</v-data-table>
</v-col>
</v-row>
<v-row class="text-center">
<v-col>
<v-pagination
v-model="page"
:length="total_page"
circle
@input="next"
/>
</v-col>
</v-row>
</v-container>
</div>
</template>
@@ -136,6 +146,9 @@ export default {
is_loading: false,
start_date: null,
end_date: null,
page: 1,
page_size: 20,
total_page: 0,
items: [],
headers: [
{
@@ -260,9 +273,10 @@ export default {
this.is_loading = true
try {
const res = await api.getCalculateContent(this.start_date, this.end_date)
const res = await api.getCalculateContent(this.start_date, this.end_date, this.page, this.page_size)
if (res.status === 200 && res.data.success === true) {
this.items = res.data.data
this.items = res.data.data.items
this.total_page = Math.ceil(res.data.data.totalCount / this.page_size)
} else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
}
@@ -274,6 +288,10 @@ export default {
}
},
next() {
this.getCalculateContent()
},
async downloadExcel() {
try {
const res = await api.downloadCalculateContentExcel(this.start_date, this.end_date)