feat(calculate): 오리지널 시리즈 정산 기능 추가

Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
Yu Sung
2026-04-22 10:20:19 +09:00
parent 2e499483dd
commit de18086699
4 changed files with 394 additions and 2 deletions

View File

@@ -0,0 +1,37 @@
import Vue from 'vue';
// 소지 유저 조회
async function getOwners() {
return Vue.axios.get('/admin/calculate/original-series/owners');
}
// 정산 내역 조회 (page는 1부터 시작하는 UI 기준, 서버에는 0부터 전달)
async function getSettlementDetails({ startDate, endDate, creatorId, page = 1, size = 10 }) {
const params = new URLSearchParams();
// 서버 파라미터 스펙 변경: start_date, end_date, creator_id
if (startDate) params.append('start_date', startDate);
if (endDate) params.append('end_date', endDate);
if (creatorId != null) params.append("creator_id", creatorId);
params.append('page', Math.max(0, (page || 1) - 1));
params.append('size', size || 10);
return Vue.axios.get(`/admin/calculate/original-series/settlement-details?${params.toString()}`);
}
// 엑셀 다운로드 (xlsx 바이너리)
async function downloadSettlementExcel({ startDate, endDate }) {
const params = new URLSearchParams();
// 서버 파라미터 스펙 변경: start_date, end_date
if (startDate) params.append('start_date', startDate);
if (endDate) params.append('end_date', endDate);
return Vue.axios.get(`/admin/calculate/original-series/settlement-details/excel?${params.toString()}` , {
responseType: 'blob'
});
}
export {
getOwners,
getSettlementDetails,
downloadSettlementExcel,
};