From 97b832fd2e9adc3d4f6c4dd18c0a57479e9cbb7c Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Mon, 16 Mar 2026 15:49:28 +0900 Subject: [PATCH] =?UTF-8?q?feat(calculate):=20=EB=9D=BC=EC=9D=B4=EB=B8=8C?= =?UTF-8?q?=20=ED=99=98=EB=B6=88=20=EA=B8=B0=EB=8A=A5=20API=20=EC=97=B0?= =?UTF-8?q?=EB=8F=99=20=EB=B0=8F=20UI=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - refundLive API 요청 파라미터를 canUsage에서 canUsageStr로 변경 - CalculateLive 화면의 환불 함수에서 canUsageStr을 전달하도록 수정 - API URL(/admin/calculate/live/refund) 및 필드 요구사항 반영 --- src/api/calculate.js | 10 +++++++ src/views/Calculate/CalculateLive.vue | 42 ++++++++++++++++++++------- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/api/calculate.js b/src/api/calculate.js index 9493d23..273a618 100644 --- a/src/api/calculate.js +++ b/src/api/calculate.js @@ -138,6 +138,15 @@ async function deleteCreatorSettlementRatio(memberId) { return Vue.axios.post('/admin/calculate/ratio/delete/' + memberId); } +async function refundLive(roomId, canUsageStr) { + const request = { + roomId: roomId, + canUsageStr: canUsageStr + }; + + return Vue.axios.post('/admin/calculate/live/refund', request); +} + export { getCalculateLive, getCalculateContent, @@ -148,6 +157,7 @@ export { createCreatorSettlementRatio, updateCreatorSettlementRatio, deleteCreatorSettlementRatio, + refundLive, getCalculateLiveByCreator, getCalculateContentByCreator, getCalculateCommunityByCreator, diff --git a/src/views/Calculate/CalculateLive.vue b/src/views/Calculate/CalculateLive.vue index cffb922..b7330d2 100644 --- a/src/views/Calculate/CalculateLive.vue +++ b/src/views/Calculate/CalculateLive.vue @@ -69,10 +69,6 @@ class="elevation-1" hide-default-footer > - - @@ -116,6 +112,16 @@ + + @@ -151,12 +157,6 @@ export default { total_page: 0, items: [], headers: [ - { - text: '이메일', - align: 'center', - sortable: false, - value: 'email', - }, { text: '크리에이터', align: 'center', @@ -227,6 +227,12 @@ export default { align: 'center', sortable: false, value: 'depositAmount', + }, + { + text: '관리', + align: 'center', + sortable: false, + value: 'actions', } ], } @@ -286,6 +292,22 @@ export default { this.getCalculateLive() }, + async refund(item) { + if (confirm('정말로 환불하시겠습니까?')) { + try { + const res = await api.refundLive(item.roomId, item.canUsageStr) + if (res.status === 200 && res.data.success === true) { + this.notifySuccess('환불 처리가 완료되었습니다.') + await this.getCalculateLive() + } else { + this.notifyError(res.data.message || '환불 처리 중 오류가 발생했습니다.') + } + } catch (e) { + this.notifyError('환불 처리 중 오류가 발생했습니다.') + } + } + }, + async downloadExcel() { try { const res = await api.downloadCalculateLiveExcel(this.start_date, this.end_date)