Compare commits

...

8 Commits

Author SHA1 Message Date
Yu Sung
97b832fd2e feat(calculate): 라이브 환불 기능 API 연동 및 UI 수정
- refundLive API 요청 파라미터를 canUsage에서 canUsageStr로 변경
- CalculateLive 화면의 환불 함수에서 canUsageStr을 전달하도록 수정
- API URL(/admin/calculate/live/refund) 및 필드 요구사항 반영
2026-03-16 15:49:28 +09:00
Yu Sung
b21d0f455f feat(chat): 시스템 프롬프트 글자수 표시 및 2000자 제한 추가 2026-03-16 11:12:38 +09:00
Yu Sung
0e4b38ce3e feat(charge-refund): 캔 환불 프로세스 추가 2026-03-05 18:13:41 +09:00
Yu Sung
60ee25564b feat(member-block): 계정 및 본인인증 정보 차단 기능 추가 완료 2026-03-05 15:53:14 +09:00
Yu Sung
3dff71046d feat(calculate): 정산 관련 API 및 화면 페이징 처리 추가 2026-03-05 14:23:51 +09:00
Yu Sung
c9f49a208a feat(calculate): 정산 페이지 엑셀 다운로드 방식 수정
- vue-excel-xlsx 사용방식에서 API 호출 방식으로 변경
2026-03-05 13:50:35 +09:00
Yu Sung
dfcc746738 feat(calculate): 크리에이터별 채널 후원 정산 페이지 개발 및 관련 API 수정
1. 크리에이터별 채널 후원 정산 페이지 신규 개발 (/calculate/channel-donation-by-creator) 2. 날짜별 채널 후원 정산 API 경로 변경 (/admin/calculate/channel-donation-by-date) 및 연동 수정 3. 채널 후원 정산 페이지 엑셀 다운로드 방식 유지 (클라이언트 사이드) 4. 크리에이터별 채널 후원 정산 페이지 엑셀 다운로드 인증 추가 (서버 사이드) 5. 크리에이터별 채널 후원 정산 페이지 표에서 날짜 컬럼 제거
2026-03-03 14:54:46 +09:00
Yu Sung
5077ef7532 채널 후원 정산 페이지 추가 2026-02-26 20:02:34 +09:00
17 changed files with 1110 additions and 456 deletions

View File

@@ -1,19 +1,19 @@
import Vue from 'vue'; import Vue from 'vue';
async function getCalculateLive(startDate, endDate) { async function getCalculateLive(startDate, endDate, page, size) {
return Vue.axios.get('/admin/calculate/live?startDateStr=' + startDate + '&endDateStr=' + endDate); return Vue.axios.get('/admin/calculate/live?startDateStr=' + startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size);
} }
async function getCalculateContent(startDate, endDate) { async function getCalculateContent(startDate, endDate, page, size) {
return Vue.axios.get('/admin/calculate/content-list?startDateStr=' + startDate + '&endDateStr=' + endDate); return Vue.axios.get('/admin/calculate/content-list?startDateStr=' + startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size);
} }
async function getCumulativeSalesByContent(page, size) { async function getCumulativeSalesByContent(page, size) {
return Vue.axios.get('/admin/calculate/cumulative-sales-by-content?page=' + (page - 1) + "&size=" + size); return Vue.axios.get('/admin/calculate/cumulative-sales-by-content?page=' + (page - 1) + "&size=" + size);
} }
async function getCalculateContentDonation(startDate, endDate) { async function getCalculateContentDonation(startDate, endDate, page, size) {
return Vue.axios.get('/admin/calculate/content-donation-list?startDateStr=' + startDate + '&endDateStr=' + endDate); return Vue.axios.get('/admin/calculate/content-donation-list?startDateStr=' + startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size);
} }
async function getCalculateCommunityPost(startDate, endDate, page, size) { async function getCalculateCommunityPost(startDate, endDate, page, size) {
@@ -57,6 +57,72 @@ async function getCalculateCommunityByCreator(startDate, endDate, page, size) {
) )
} }
async function getCalculateChannelDonationByCreator(startDate, endDate, page, size) {
return Vue.axios.get('/admin/calculate/channel-donation-by-creator?startDateStr=' +
startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size
)
}
async function getCalculateChannelDonationByDate(startDate, endDate, page, size) {
return Vue.axios.get('/admin/calculate/channel-donation-by-date?startDateStr=' +
startDate + '&endDateStr=' + endDate + '&page=' + (page - 1) + '&size=' + size
)
}
async function downloadCalculateChannelDonationByCreatorExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/channel-donation-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateLiveExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/live/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateContentExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/content-list/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateContentDonationExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/content-donation-list/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateCommunityPostExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/community-post/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateLiveByCreatorExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/live-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateContentByCreatorExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/content-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateCommunityByCreatorExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/community-by-creator/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function downloadCalculateChannelDonationByDateExcel(startDate, endDate) {
return Vue.axios.get('/admin/calculate/channel-donation-by-date/excel?startDateStr=' + startDate + '&endDateStr=' + endDate, {
responseType: 'blob'
});
}
async function updateCreatorSettlementRatio(creatorSettlementRatio) { async function updateCreatorSettlementRatio(creatorSettlementRatio) {
const request = { const request = {
memberId: creatorSettlementRatio.creator_id, memberId: creatorSettlementRatio.creator_id,
@@ -72,6 +138,15 @@ async function deleteCreatorSettlementRatio(memberId) {
return Vue.axios.post('/admin/calculate/ratio/delete/' + 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 { export {
getCalculateLive, getCalculateLive,
getCalculateContent, getCalculateContent,
@@ -82,7 +157,19 @@ export {
createCreatorSettlementRatio, createCreatorSettlementRatio,
updateCreatorSettlementRatio, updateCreatorSettlementRatio,
deleteCreatorSettlementRatio, deleteCreatorSettlementRatio,
refundLive,
getCalculateLiveByCreator, getCalculateLiveByCreator,
getCalculateContentByCreator, getCalculateContentByCreator,
getCalculateCommunityByCreator getCalculateCommunityByCreator,
getCalculateChannelDonationByCreator,
getCalculateChannelDonationByDate,
downloadCalculateChannelDonationByCreatorExcel,
downloadCalculateLiveExcel,
downloadCalculateContentExcel,
downloadCalculateContentDonationExcel,
downloadCalculateCommunityPostExcel,
downloadCalculateLiveByCreatorExcel,
downloadCalculateContentByCreatorExcel,
downloadCalculateCommunityByCreatorExcel,
downloadCalculateChannelDonationByDateExcel
} }

View File

@@ -11,4 +11,8 @@ async function getChargeStatusDetail(startDate, paymentGateway, currency) {
); );
} }
export { getChargeStatus, getChargeStatusDetail } async function refundCharge(chargeId) {
return Vue.axios.post('/admin/charge/refund', { chargeId });
}
export { getChargeStatus, getChargeStatusDetail, refundCharge }

View File

@@ -52,6 +52,11 @@ async function resetPassword(id) {
return Vue.axios.post("/admin/member/password/reset", request) return Vue.axios.post("/admin/member/password/reset", request)
} }
async function blockMember(memberId, reason) {
const request = {memberId, reason}
return Vue.axios.post("/admin/member/block", request)
}
/** /**
* 닉네임으로 회원 검색 API * 닉네임으로 회원 검색 API
* - 서버 구현 차이를 흡수하기 위해 nickname, search_word 두 파라미터 모두 전송 * - 서버 구현 차이를 흡수하기 위해 nickname, search_word 두 파라미터 모두 전송
@@ -84,8 +89,9 @@ export {
searchMember, searchMember,
getCreatorList, getCreatorList,
searchCreator, searchCreator,
updateMember, updateMember,
getCreatorAllList, getCreatorAllList,
resetPassword, resetPassword,
searchMembersByNickname blockMember,
searchMembersByNickname
} }

View File

@@ -149,6 +149,26 @@ export default {
}, },
] ]
}) })
// 정산 관리 메뉴에 '채널 후원 정산' 추가
try {
const calculateMenu = this.items.find(m => m && m.title === '정산 관리')
if (calculateMenu) {
if (!Array.isArray(calculateMenu.items)) {
calculateMenu.items = calculateMenu.items ? [].concat(calculateMenu.items) : []
}
const exists = calculateMenu.items.some(ci => ci && ci.route === '/calculate/channel-donation')
if (!exists) {
calculateMenu.items.push({
title: '채널 후원 정산',
route: '/calculate/channel-donation',
items: null
})
}
}
} catch (e) {
// ignore
}
} else { } else {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 로그인 해주세요!") this.notifyError("알 수 없는 오류가 발생했습니다. 다시 로그인 해주세요!")
this.logout(); this.logout();

View File

@@ -210,6 +210,16 @@ const routes = [
name: 'CalculateCommunityByCreator', name: 'CalculateCommunityByCreator',
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateCommunityByCreator.vue') component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateCommunityByCreator.vue')
}, },
{
path: '/calculate/channel-donation',
name: 'CalculateChannelDonation',
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateChannelDonation.vue')
},
{
path: '/calculate/channel-donation-by-creator',
name: 'CalculateChannelDonationByCreator',
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateChannelDonationByCreator.vue')
},
{ {
path: '/notice', path: '/notice',
name: 'NoticeView', name: 'NoticeView',

View File

@@ -0,0 +1,267 @@
<template>
<div>
<v-toolbar dark>
<v-spacer />
<v-toolbar-title>채널 후원 정산</v-toolbar-title>
<v-spacer />
</v-toolbar>
<br>
<v-container>
<v-row>
<v-col cols="2">
<datetime
v-model="start_date"
class="datepicker"
format="YYYY-MM-DD"
/>
</v-col>
<v-col cols="1">
~
</v-col>
<v-col cols="2">
<datetime
v-model="end_date"
class="datepicker"
format="YYYY-MM-DD"
/>
</v-col>
<v-col cols="1" />
<v-col cols="2">
<v-btn
block
color="#3bb9f1"
dark
depressed
@click="getCalculateChannelDonationByDate"
>
조회
</v-btn>
</v-col>
<v-spacer />
<v-col cols="2">
<v-btn
block
color="#3bb9f1"
dark
depressed
@click="downloadExcel"
>
엑셀 다운로드
</v-btn>
</v-col>
</v-row>
<v-row>
<v-col>
<v-data-table
:headers="headers"
:items="items"
:loading="is_loading"
:items-per-page="-1"
class="elevation-1"
hide-default-footer
>
<template slot="body.prepend">
<tr v-if="total">
<td colspan="2">
합계
</td>
<td class="text-center">
{{ total.count.toLocaleString() }}
</td>
<td class="text-center">
{{ total.totalCan.toLocaleString() }}
</td>
<td class="text-center">
{{ total.krw.toLocaleString() }}
</td>
<td class="text-center">
{{ total.fee.toLocaleString() }}
</td>
<td class="text-center">
{{ total.settlementAmount.toLocaleString() }}
</td>
<td class="text-center">
{{ total.withholdingTax.toLocaleString() }}
</td>
<td class="text-center">
{{ total.depositAmount.toLocaleString() }}
</td>
</tr>
</template>
<template v-slot:item.date="{ item }">
{{ item.date }}
</template>
<template v-slot:item.creator="{ item }">
{{ item.creator }}
</template>
<template v-slot:item.count="{ item }">
{{ item.count.toLocaleString() }}
</template>
<template v-slot:item.totalCan="{ item }">
{{ item.totalCan.toLocaleString() }}
</template>
<template v-slot:item.krw="{ item }">
{{ item.krw.toLocaleString() }}
</template>
<template v-slot:item.fee="{ item }">
{{ item.fee.toLocaleString() }}
</template>
<template v-slot:item.settlementAmount="{ item }">
{{ item.settlementAmount.toLocaleString() }}
</template>
<template v-slot:item.withholdingTax="{ item }">
{{ item.withholdingTax.toLocaleString() }}
</template>
<template v-slot:item.depositAmount="{ item }">
{{ item.depositAmount.toLocaleString() }}
</template>
</v-data-table>
</v-col>
</v-row>
<v-row>
<v-col>
<v-pagination
v-model="page"
:length="total_page"
:total-visible="7"
@input="next"
/>
</v-col>
</v-row>
</v-container>
</div>
</template>
<script>
import * as api from '@/api/calculate'
import datetime from 'vuejs-datetimepicker'
export default {
name: 'CalculateChannelDonation',
components: {
datetime
},
data() {
return {
start_date: '',
end_date: '',
is_loading: false,
items: [],
total: null,
page: 1,
page_size: 20,
total_page: 1,
headers: [
{ text: '날짜', align: 'center', sortable: false, value: 'date' },
{ text: '크리에이터', align: 'center', sortable: false, value: 'creator' },
{ text: '건수', align: 'center', sortable: false, value: 'count' },
{ text: '캔', align: 'center', sortable: false, value: 'totalCan' },
{ text: '원화', align: 'center', sortable: false, value: 'krw' },
{ text: '수수료(6.6%)', align: 'center', sortable: false, value: 'fee' },
{ text: '정산금액', align: 'center', sortable: false, value: 'settlementAmount' },
{ text: '원천세(3.3%)', align: 'center', sortable: false, value: 'withholdingTax' },
{ text: '입금액', align: 'center', sortable: false, value: 'depositAmount' }
]
}
},
async created() {
const date = new Date()
const firstDate = new Date(date.getFullYear(), date.getMonth(), 1)
const lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0)
this.start_date = this.formatDate(firstDate)
this.end_date = this.formatDate(lastDate)
await this.getCalculateChannelDonationByDate()
},
methods: {
formatDate(date) {
const year = date.getFullYear()
const month = ('0' + (date.getMonth() + 1)).slice(-2)
const day = ('0' + date.getDate()).slice(-2)
return `${year}-${month}-${day}`
},
notifyError(message) {
this.$dialog.notify.error(message)
},
async next() {
await this.getCalculateChannelDonationByDate()
},
async getCalculateChannelDonationByDate() {
this.is_loading = true
try {
const res = await api.getCalculateChannelDonationByDate(
this.start_date.substring(0, 10),
this.end_date.substring(0, 10),
this.page,
this.page_size
)
if (res.status === 200 && res.data.success === true) {
const data = res.data.data
this.items = data.items
this.total = data.total
this.total_page = Math.ceil(data.totalCount / this.page_size) || 1
} else {
this.notifyError(res.data.message || '데이터를 불러오는 중 오류가 발생했습니다.')
}
} catch (e) {
this.notifyError('서버와의 통신 중 오류가 발생했습니다.')
} finally {
this.is_loading = false
}
},
async downloadExcel() {
try {
const res = await api.downloadCalculateChannelDonationByDateExcel(
this.start_date.substring(0, 10),
this.end_date.substring(0, 10)
)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '채널후원정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
}
}
}
</script>
<style scoped>
.datepicker {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
</style>

View File

@@ -0,0 +1,262 @@
<template>
<div>
<v-toolbar dark>
<v-spacer />
<v-toolbar-title>크리에이터별 채널 후원 정산</v-toolbar-title>
<v-spacer />
</v-toolbar>
<br>
<v-container>
<v-row>
<v-col cols="2">
<datetime
v-model="start_date"
class="datepicker"
format="YYYY-MM-DD"
/>
</v-col>
<v-col cols="1">
~
</v-col>
<v-col cols="2">
<datetime
v-model="end_date"
class="datepicker"
format="YYYY-MM-DD"
/>
</v-col>
<v-col cols="1" />
<v-col cols="2">
<v-btn
block
color="#3bb9f1"
dark
depressed
@click="getCalculateChannelDonationByCreator"
>
조회
</v-btn>
</v-col>
<v-spacer />
<v-col cols="2">
<v-btn
block
color="#3bb9f1"
dark
depressed
@click="downloadExcel"
>
엑셀 다운로드
</v-btn>
</v-col>
</v-row>
<v-row>
<v-col>
<v-data-table
:headers="headers"
:items="items"
:loading="is_loading"
:items-per-page="-1"
class="elevation-1"
hide-default-footer
>
<template slot="body.prepend">
<tr v-if="total">
<td>
합계
</td>
<td class="text-center">
{{ total.count.toLocaleString() }}
</td>
<td class="text-center">
{{ total.totalCan.toLocaleString() }}
</td>
<td class="text-center">
{{ total.krw.toLocaleString() }}
</td>
<td class="text-center">
{{ total.fee.toLocaleString() }}
</td>
<td class="text-center">
{{ total.settlementAmount.toLocaleString() }}
</td>
<td class="text-center">
{{ total.withholdingTax.toLocaleString() }}
</td>
<td class="text-center">
{{ total.depositAmount.toLocaleString() }}
</td>
</tr>
</template>
<template v-slot:item.creator="{ item }">
{{ item.creator }}
</template>
<template v-slot:item.count="{ item }">
{{ item.count.toLocaleString() }}
</template>
<template v-slot:item.totalCan="{ item }">
{{ item.totalCan.toLocaleString() }}
</template>
<template v-slot:item.krw="{ item }">
{{ item.krw.toLocaleString() }}
</template>
<template v-slot:item.fee="{ item }">
{{ item.fee.toLocaleString() }}
</template>
<template v-slot:item.settlementAmount="{ item }">
{{ item.settlementAmount.toLocaleString() }}
</template>
<template v-slot:item.withholdingTax="{ item }">
{{ item.withholdingTax.toLocaleString() }}
</template>
<template v-slot:item.depositAmount="{ item }">
{{ item.depositAmount.toLocaleString() }}
</template>
</v-data-table>
</v-col>
</v-row>
<v-row>
<v-col>
<v-pagination
v-model="page"
:length="total_page"
:total-visible="7"
@input="next"
/>
</v-col>
</v-row>
</v-container>
</div>
</template>
<script>
import * as api from '@/api/calculate'
import datetime from 'vuejs-datetimepicker'
export default {
name: 'CalculateChannelDonationByCreator',
components: {
datetime
},
data() {
return {
start_date: '',
end_date: '',
is_loading: false,
items: [],
total: null,
page: 1,
page_size: 20,
total_page: 1,
headers: [
{ text: '크리에이터', align: 'center', sortable: false, value: 'creator' },
{ text: '건수', align: 'center', sortable: false, value: 'count' },
{ text: '캔', align: 'center', sortable: false, value: 'totalCan' },
{ text: '원화', align: 'center', sortable: false, value: 'krw' },
{ text: '수수료(6.6%)', align: 'center', sortable: false, value: 'fee' },
{ text: '정산금액', align: 'center', sortable: false, value: 'settlementAmount' },
{ text: '원천세(3.3%)', align: 'center', sortable: false, value: 'withholdingTax' },
{ text: '입금액', align: 'center', sortable: false, value: 'depositAmount' }
]
}
},
async created() {
const date = new Date()
const firstDate = new Date(date.getFullYear(), date.getMonth(), 1)
const lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0)
this.start_date = this.formatDate(firstDate)
this.end_date = this.formatDate(lastDate)
await this.getCalculateChannelDonationByCreator()
},
methods: {
formatDate(date) {
const year = date.getFullYear()
const month = ('0' + (date.getMonth() + 1)).slice(-2)
const day = ('0' + date.getDate()).slice(-2)
return `${year}-${month}-${day}`
},
notifyError(message) {
this.$dialog.notify.error(message)
},
async next() {
await this.getCalculateChannelDonationByCreator()
},
async getCalculateChannelDonationByCreator() {
this.is_loading = true
try {
const res = await api.getCalculateChannelDonationByCreator(
this.start_date.substring(0, 10),
this.end_date.substring(0, 10),
this.page,
this.page_size
)
if (res.status === 200 && res.data.success === true) {
const data = res.data.data
this.items = data.items
this.total = data.total
this.total_page = Math.ceil(data.totalCount / this.page_size) || 1
} else {
this.notifyError(res.data.message || '데이터를 불러오는 중 오류가 발생했습니다.')
}
} catch (e) {
this.notifyError('서버와의 통신 중 오류가 발생했습니다.')
} finally {
this.is_loading = false
}
},
async downloadExcel() {
try {
const res = await api.downloadCalculateChannelDonationByCreatorExcel(
this.start_date.substring(0, 10),
this.end_date.substring(0, 10)
)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '크리에이터별_채널후원정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
}
}
}
</script>
<style scoped>
.datepicker {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
</style>

View File

@@ -47,22 +47,15 @@
<v-spacer /> <v-spacer />
<v-col cols="2"> <v-col cols="2">
<vue-excel-xlsx <v-btn
:data="items" block
:columns="columns" color="#3bb9f1"
:file-name="'정산'" dark
:file-type="'xlsx'" depressed
:sheet-name="'정산'" @click="downloadExcel"
> >
<v-btn 엑셀 다운로드
block </v-btn>
color="#3bb9f1"
dark
depressed
>
엑셀 다운로드
</v-btn>
</vue-excel-xlsx>
</v-col> </v-col>
</v-row> </v-row>
@@ -156,40 +149,6 @@ export default {
page_size: 20, page_size: 20,
total_page: 0, total_page: 0,
items: [], items: [],
columns: [
{
label: "이메일",
field: "email",
},
{
label: "크리에이터",
field: "nickname",
},
{
label: "합계(캔)",
field: "totalCan",
},
{
label: "원화",
field: "totalKrw",
},
{
label: "결제수수료(6.6%)",
field: "paymentFee",
},
{
label: "정산금액",
field: "settlementAmount",
},
{
label: "원천세(3.3%)",
field: "tax",
},
{
label: "입금액",
field: "depositAmount",
},
],
headers: [ headers: [
{ {
text: '이메일', text: '이메일',
@@ -309,6 +268,21 @@ export default {
} finally { } finally {
this.is_loading = false this.is_loading = false
} }
},
async downloadExcel() {
try {
const res = await api.downloadCalculateCommunityByCreatorExcel(this.start_date, this.end_date)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '크리에이터별_커뮤니티정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
} }
} }
} }

View File

@@ -35,7 +35,7 @@
<v-col cols="2"> <v-col cols="2">
<v-btn <v-btn
block block
color="#9970ff" color="#3bb9f1"
dark dark
depressed depressed
@click="getCalculateCommunityPost" @click="getCalculateCommunityPost"
@@ -47,22 +47,15 @@
<v-spacer /> <v-spacer />
<v-col cols="2"> <v-col cols="2">
<vue-excel-xlsx <v-btn
:data="items" block
:columns="columns" color="#3bb9f1"
:file-name="'커뮤니티-정산'" dark
:file-type="'xlsx'" depressed
:sheet-name="'커뮤니티-정산'" @click="downloadExcel"
> >
<v-btn 엑셀 다운로드
block </v-btn>
color="#9970ff"
dark
depressed
>
엑셀 다운로드
</v-btn>
</vue-excel-xlsx>
</v-col> </v-col>
</v-row> </v-row>
<v-row> <v-row>
@@ -136,52 +129,6 @@ export default {
page_size: 20, page_size: 20,
total_page: 0, total_page: 0,
items: [], items: [],
columns: [
{
label: '날짜',
field: 'date',
},
{
label: '크리에이터',
field: 'nickname',
},
{
label: '내용(앞 10글자)',
field: 'title'
},
{
label: '판매금액(캔)',
field: 'can',
},
{
label: '구매유저수',
field: 'numberOfPurchase',
},
{
label: '합계(캔)',
field: 'totalCan',
},
{
label: '원화',
field: 'totalKrw',
},
{
label: '수수료\n(6.6%)',
field: 'paymentFee',
},
{
label: '정산금액',
field: 'settlementAmount',
},
{
label: '원천세\n(3.3%)',
field: 'tax',
},
{
label: '입금액',
field: 'depositAmount',
}
],
headers: [ headers: [
{ {
text: '날짜', text: '날짜',
@@ -309,6 +256,21 @@ export default {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
} }
},
async downloadExcel() {
try {
const res = await api.downloadCalculateCommunityPostExcel(this.start_date, this.end_date)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '커뮤니티-정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
} }
} }
} }

View File

@@ -35,7 +35,7 @@
<v-col cols="2"> <v-col cols="2">
<v-btn <v-btn
block block
color="#9970ff" color="#3bb9f1"
dark dark
depressed depressed
@click="getCalculateContent" @click="getCalculateContent"
@@ -48,22 +48,15 @@
<v-spacer /> <v-spacer />
<v-col cols="2"> <v-col cols="2">
<vue-excel-xlsx <v-btn
:data="items" block
:columns="columns" color="#3bb9f1"
:file-name="'정산'" dark
:file-type="'xlsx'" depressed
:sheet-name="'정산'" @click="downloadExcel"
> >
<v-btn 엑셀 다운로드
block </v-btn>
color="#9970ff"
dark
depressed
>
엑셀 다운로드
</v-btn>
</vue-excel-xlsx>
</v-col> </v-col>
</v-row> </v-row>
<v-row> <v-row>
@@ -126,6 +119,16 @@
</v-data-table> </v-data-table>
</v-col> </v-col>
</v-row> </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> </v-container>
</div> </div>
</template> </template>
@@ -143,61 +146,10 @@ export default {
is_loading: false, is_loading: false,
start_date: null, start_date: null,
end_date: null, end_date: null,
page: 1,
page_size: 20,
total_page: 0,
items: [], items: [],
columns: [
{
label: '판매일',
field: 'saleDate',
},
{
label: '크리에이터',
field: 'nickname',
},
{
label: '제목',
field: 'title',
},
{
label: '구분',
field: 'orderType',
},
{
label: '판매금액(캔)',
field: 'orderPrice',
},
{
label: '판매수',
field: 'numberOfPeople',
},
{
label: '합계(캔)',
field: 'totalCan',
},
{
label: '원화',
field: 'totalKrw',
},
{
label: '수수료\n(6.6%)',
field: 'paymentFee',
},
{
label: '정산금액',
field: 'settlementAmount',
},
{
label: '원천세\n(3.3%)',
field: 'tax',
},
{
label: '입금액',
field: 'depositAmount',
},
{
label: '등록일',
field: 'registrationDate',
},
],
headers: [ headers: [
{ {
text: '판매일', text: '판매일',
@@ -321,9 +273,10 @@ export default {
this.is_loading = true this.is_loading = true
try { 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) { 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 { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }
@@ -333,6 +286,25 @@ export default {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
} }
},
next() {
this.getCalculateContent()
},
async downloadExcel() {
try {
const res = await api.downloadCalculateContentExcel(this.start_date, this.end_date)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '콘텐츠정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
} }
} }
} }

View File

@@ -47,22 +47,15 @@
<v-spacer /> <v-spacer />
<v-col cols="2"> <v-col cols="2">
<vue-excel-xlsx <v-btn
:data="items" block
:columns="columns" color="#3bb9f1"
:file-name="'정산'" dark
:file-type="'xlsx'" depressed
:sheet-name="'정산'" @click="downloadExcel"
> >
<v-btn 엑셀 다운로드
block </v-btn>
color="#3bb9f1"
dark
depressed
>
엑셀 다운로드
</v-btn>
</vue-excel-xlsx>
</v-col> </v-col>
</v-row> </v-row>
@@ -156,40 +149,6 @@ export default {
page_size: 20, page_size: 20,
total_page: 0, total_page: 0,
items: [], items: [],
columns: [
{
label: "이메일",
field: "email",
},
{
label: "크리에이터",
field: "nickname",
},
{
label: "합계(캔)",
field: "totalCan",
},
{
label: "원화",
field: "totalKrw",
},
{
label: "결제수수료(6.6%)",
field: "paymentFee",
},
{
label: "정산금액",
field: "settlementAmount",
},
{
label: "원천세(3.3%)",
field: "tax",
},
{
label: "입금액",
field: "depositAmount",
},
],
headers: [ headers: [
{ {
text: '이메일', text: '이메일',
@@ -309,6 +268,21 @@ export default {
} finally { } finally {
this.is_loading = false this.is_loading = false
} }
},
async downloadExcel() {
try {
const res = await api.downloadCalculateContentByCreatorExcel(this.start_date, this.end_date)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '크리에이터별_콘텐츠정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
} }
} }
} }

View File

@@ -35,7 +35,7 @@
<v-col cols="2"> <v-col cols="2">
<v-btn <v-btn
block block
color="#9970ff" color="#3bb9f1"
dark dark
depressed depressed
@click="getCalculateContentDonation" @click="getCalculateContentDonation"
@@ -48,22 +48,15 @@
<v-spacer /> <v-spacer />
<v-col cols="2"> <v-col cols="2">
<vue-excel-xlsx <v-btn
:data="items" block
:columns="columns" color="#3bb9f1"
:file-name="'정산'" dark
:file-type="'xlsx'" depressed
:sheet-name="'정산'" @click="downloadExcel"
> >
<v-btn 엑셀 다운로드
block </v-btn>
color="#9970ff"
dark
depressed
>
엑셀 다운로드
</v-btn>
</vue-excel-xlsx>
</v-col> </v-col>
</v-row> </v-row>
<v-row> <v-row>
@@ -118,6 +111,16 @@
</v-data-table> </v-data-table>
</v-col> </v-col>
</v-row> </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> </v-container>
</div> </div>
</template> </template>
@@ -135,57 +138,10 @@ export default {
is_loading: false, is_loading: false,
start_date: null, start_date: null,
end_date: null, end_date: null,
page: 1,
page_size: 20,
total_page: 0,
items: [], items: [],
columns: [
{
label: '후원날짜',
field: 'donationDate',
},
{
label: '크리에이터',
field: 'nickname',
},
{
label: '콘텐츠 제목',
field: 'title',
},
{
label: '구분',
field: 'paidOrFree',
},
{
label: '후원수',
field: 'numberOfDonation',
},
{
label: '합계(캔)',
field: 'totalCan',
},
{
label: '원화',
field: 'totalKrw',
},
{
label: '수수료\n(6.6%)',
field: 'paymentFee',
},
{
label: '정산금액',
field: 'settlementAmount',
},
{
label: '원천세\n(3.3%)',
field: 'tax',
},
{
label: '입금액',
field: 'depositAmount',
},
{
label: '콘텐츠 등록일',
field: 'registrationDate',
},
],
headers: [ headers: [
{ {
text: '후원날짜', text: '후원날짜',
@@ -303,9 +259,10 @@ export default {
this.is_loading = true this.is_loading = true
try { try {
const res = await api.getCalculateContentDonation(this.start_date, this.end_date) const res = await api.getCalculateContentDonation(this.start_date, this.end_date, this.page, this.page_size)
if (res.status === 200 && res.data.success === true) { 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 { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }
@@ -315,6 +272,25 @@ export default {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
} }
},
next() {
this.getCalculateContentDonation()
},
async downloadExcel() {
try {
const res = await api.downloadCalculateContentDonationExcel(this.start_date, this.end_date)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '콘텐츠후원정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
} }
} }
} }

View File

@@ -35,7 +35,7 @@
<v-col cols="2"> <v-col cols="2">
<v-btn <v-btn
block block
color="#9970ff" color="#3bb9f1"
dark dark
depressed depressed
@click="getCalculateLive" @click="getCalculateLive"
@@ -47,22 +47,15 @@
<v-spacer /> <v-spacer />
<v-col cols="2"> <v-col cols="2">
<vue-excel-xlsx <v-btn
:data="items" block
:columns="columns" color="#3bb9f1"
:file-name="'정산'" dark
:file-type="'xlsx'" depressed
:sheet-name="'정산'" @click="downloadExcel"
> >
<v-btn 엑셀 다운로드
block </v-btn>
color="#9970ff"
dark
depressed
>
엑셀 다운로드
</v-btn>
</vue-excel-xlsx>
</v-col> </v-col>
</v-row> </v-row>
@@ -76,10 +69,6 @@
class="elevation-1" class="elevation-1"
hide-default-footer hide-default-footer
> >
<template v-slot:item.email="{ item }">
{{ item.email }}
</template>
<template v-slot:item.nickname="{ item }"> <template v-slot:item.nickname="{ item }">
{{ item.nickname }} {{ item.nickname }}
</template> </template>
@@ -123,9 +112,29 @@
<template v-slot:item.depositAmount="{ item }"> <template v-slot:item.depositAmount="{ item }">
{{ item.depositAmount.toLocaleString() }} {{ item.depositAmount.toLocaleString() }}
</template> </template>
<template v-slot:item.actions="{ item }">
<v-btn
small
color="error"
@click="refund(item)"
>
환불
</v-btn>
</template>
</v-data-table> </v-data-table>
</v-col> </v-col>
</v-row> </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> </v-container>
</div> </div>
</template> </template>
@@ -143,68 +152,11 @@ export default {
is_loading: false, is_loading: false,
start_date: null, start_date: null,
end_date: null, end_date: null,
page: 1,
page_size: 20,
total_page: 0,
items: [], items: [],
columns: [
{
label: "이메일",
field: "email",
},
{
label: "크리에이터",
field: "nickname",
},
{
label: "날짜",
field: "date",
},
{
label: "제목",
field: "title",
},
{
label: "구분",
field: "canUsageStr",
},
{
label: "입장캔",
field: "entranceFee",
},
{
label: "인원",
field: "numberOfPeople",
},
{
label: "합계(캔)",
field: "totalAmount",
},
{
label: "원화",
field: "totalKrw",
},
{
label: "결제수수료(6.6%)",
field: "paymentFee",
},
{
label: "정산금액",
field: "settlementAmount",
},
{
label: "원천세(3.3%)",
field: "tax",
},
{
label: "입금액",
field: "depositAmount",
},
],
headers: [ headers: [
{
text: '이메일',
align: 'center',
sortable: false,
value: 'email',
},
{ {
text: '크리에이터', text: '크리에이터',
align: 'center', align: 'center',
@@ -275,6 +227,12 @@ export default {
align: 'center', align: 'center',
sortable: false, sortable: false,
value: 'depositAmount', value: 'depositAmount',
},
{
text: '관리',
align: 'center',
sortable: false,
value: 'actions',
} }
], ],
} }
@@ -315,9 +273,10 @@ export default {
this.is_loading = true this.is_loading = true
try { try {
const res = await api.getCalculateLive(this.start_date, this.end_date) const res = await api.getCalculateLive(this.start_date, this.end_date, this.page, this.page_size)
if (res.status === 200 && res.data.success === true) { 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 { } else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
} }
@@ -327,6 +286,41 @@ export default {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false this.is_loading = false
} }
},
next() {
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)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '라이브정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
} }
} }
} }

View File

@@ -47,22 +47,15 @@
<v-spacer /> <v-spacer />
<v-col cols="2"> <v-col cols="2">
<vue-excel-xlsx <v-btn
:data="items" block
:columns="columns" color="#3bb9f1"
:file-name="'정산'" dark
:file-type="'xlsx'" depressed
:sheet-name="'정산'" @click="downloadExcel"
> >
<v-btn 엑셀 다운로드
block </v-btn>
color="#3bb9f1"
dark
depressed
>
엑셀 다운로드
</v-btn>
</vue-excel-xlsx>
</v-col> </v-col>
</v-row> </v-row>
@@ -156,40 +149,6 @@ export default {
page_size: 20, page_size: 20,
total_page: 0, total_page: 0,
items: [], items: [],
columns: [
{
label: "이메일",
field: "email",
},
{
label: "크리에이터",
field: "nickname",
},
{
label: "합계(캔)",
field: "totalCan",
},
{
label: "원화",
field: "totalKrw",
},
{
label: "결제수수료(6.6%)",
field: "paymentFee",
},
{
label: "정산금액",
field: "settlementAmount",
},
{
label: "원천세(3.3%)",
field: "tax",
},
{
label: "입금액",
field: "depositAmount",
},
],
headers: [ headers: [
{ {
text: '이메일', text: '이메일',
@@ -309,6 +268,21 @@ export default {
} finally { } finally {
this.is_loading = false this.is_loading = false
} }
},
async downloadExcel() {
try {
const res = await api.downloadCalculateLiveByCreatorExcel(this.start_date, this.end_date)
const url = window.URL.createObjectURL(new Blob([res.data]))
const link = document.createElement('a')
link.href = url
link.setAttribute('download', '크리에이터별_라이브정산.xlsx')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
} catch (e) {
this.notifyError('엑셀 다운로드 중 오류가 발생했습니다.')
}
} }
} }
} }

View File

@@ -94,10 +94,6 @@
class="elevation-1" class="elevation-1"
hide-default-footer hide-default-footer
> >
<template v-slot:item.accountId="{ item }">
{{ item.accountId }}
</template>
<template v-slot:item.nickname="{ item }"> <template v-slot:item.nickname="{ item }">
{{ item.nickname }} {{ item.nickname }}
</template> </template>
@@ -113,6 +109,16 @@
<template v-slot:item.datetime="{ item }"> <template v-slot:item.datetime="{ item }">
{{ item.datetime }} {{ item.datetime }}
</template> </template>
<template v-slot:item.refund="{ item }">
<v-btn
color="error"
small
@click="confirmRefund(item)"
>
환불
</v-btn>
</template>
</v-data-table> </v-data-table>
<v-card-actions v-show="!is_loading"> <v-card-actions v-show="!is_loading">
<v-spacer /> <v-spacer />
@@ -146,14 +152,9 @@ export default {
end_date: null, end_date: null,
items: [], items: [],
detail_items: null, detail_items: null,
selected_date_item: null,
show_popup_dialog: false, show_popup_dialog: false,
detail_headers: [ detail_headers: [
{
text: 'no',
align: 'center',
sortable: false,
value: 'accountId',
},
{ {
text: '닉네임', text: '닉네임',
align: 'center', align: 'center',
@@ -184,6 +185,12 @@ export default {
sortable: false, sortable: false,
value: 'datetime', value: 'datetime',
}, },
{
text: '환불',
align: 'center',
sortable: false,
value: 'refund',
},
], ],
headers: [ headers: [
{ {
@@ -284,6 +291,7 @@ export default {
async getChargeStatusDetail(value) { async getChargeStatusDetail(value) {
if (value.date !== '합계') { if (value.date !== '합계') {
this.is_loading = true this.is_loading = true
this.selected_date_item = value
try { try {
const res = await api.getChargeStatusDetail(value.date, value.pg, value.currency) const res = await api.getChargeStatusDetail(value.date, value.pg, value.currency)
@@ -300,6 +308,45 @@ export default {
this.is_loading = false this.is_loading = false
} }
} }
},
async confirmRefund(item) {
let canText = `${item.chargeCan}`
if (item.rewardCan > 0) {
canText += ` + ${item.rewardCan}`
}
const confirm = await this.$dialog.confirm({
title: '환불 확인',
text: `${item.nickname}님의 ${canText}을 환불하시겠습니까?`,
actions: {
false: '취소',
true: '환불'
}
})
if (confirm) {
await this.refundCharge(item.chargeId)
}
},
async refundCharge(chargeId) {
this.is_loading = true
try {
const res = await api.refundCharge(chargeId)
if (res.status === 200 && res.data.success === true) {
this.notifySuccess('환불이 완료되었습니다.')
await this.getChargeStatusDetail(this.selected_date_item)
await this.getChargeStatus()
} else {
this.notifyError(res.data.message || '환불 처리 중 오류가 발생했습니다.')
}
} catch (e) {
this.notifyError('환불 처리 중 오류가 발생했습니다.')
} finally {
this.is_loading = false
}
} }
} }
} }

View File

@@ -353,10 +353,11 @@
<v-col cols="12"> <v-col cols="12">
<v-textarea <v-textarea
v-model="character.systemPrompt" v-model="character.systemPrompt"
label="시스템 프롬프트" label="시스템 프롬프트 (최대 2000자)"
outlined outlined
auto-grow auto-grow
rows="4" rows="4"
counter="2000"
:class="{ 'required-asterisk': !isEdit }" :class="{ 'required-asterisk': !isEdit }"
:rules="systemPromptRules" :rules="systemPromptRules"
/> />
@@ -1182,7 +1183,8 @@ export default {
], ],
typeOptions: ['Clone', 'Character'], typeOptions: ['Clone', 'Character'],
systemPromptRules: [ systemPromptRules: [
v => (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요') v => (this.isEdit ? true : (!!v && v.trim().length > 0) || '시스템 프롬프트를 입력하세요'),
v => (!!v && v.length <= 2000) || '최대 2000자까지 입력 가능합니다'
], ],
// 인물 관계 옵션 및 검증 규칙 // 인물 관계 옵션 및 검증 규칙
relationshipTypeOptions: ['가족', '친구', '동료', '연인', '기타'], relationshipTypeOptions: ['가족', '친구', '동료', '연인', '기타'],

View File

@@ -193,6 +193,14 @@
</v-row> </v-row>
</v-card-text> </v-card-text>
<v-card-actions v-show="!is_loading"> <v-card-actions v-show="!is_loading">
<v-btn
color="error"
text
@click="showBlockReasonDialog"
>
차단
</v-btn>
<v-spacer />
<v-btn <v-btn
color="blue darken-1" color="blue darken-1"
text text
@@ -200,7 +208,6 @@
> >
비밀번호 재설정 비밀번호 재설정
</v-btn> </v-btn>
<v-spacer />
<v-btn <v-btn
color="blue darken-1" color="blue darken-1"
text text
@@ -252,6 +259,74 @@
</v-card> </v-card>
</v-dialog> </v-dialog>
</v-row> </v-row>
<v-row>
<v-dialog
v-model="show_block_reason_dialog"
max-width="500px"
persistent
>
<v-card>
<v-card-title>차단(탈퇴) 사유 입력</v-card-title>
<v-card-text>
<v-textarea
v-model="block_reason"
label="사유를 입력해주세요"
outlined
hide-details
/>
</v-card-text>
<v-card-actions v-show="!is_loading">
<v-spacer />
<v-btn
color="error"
text
@click="confirmBlock"
>
차단
</v-btn>
<v-btn
color="blue darken-1"
text
@click="cancelBlock"
>
취소
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-row>
<v-row>
<v-dialog
v-model="show_confirm_block_dialog"
max-width="500px"
persistent
>
<v-card>
<v-card-title class="text-h6">
'{{ nickname }}' 계정과 본인인증 정보, 같은 본인인증 정보를 사용하는 모든 계정을 차단합니다.
</v-card-title>
<v-card-actions v-show="!is_loading">
<v-spacer />
<v-btn
color="error"
text
@click="blockMember"
>
차단
</v-btn>
<v-btn
color="blue darken-1"
text
@click="cancelBlock"
>
취소
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-row>
</div> </div>
</template> </template>
@@ -274,6 +349,9 @@ export default {
user_type: null, user_type: null,
show_popup_dialog: false, show_popup_dialog: false,
show_confirm_reset_password_dialog: false, show_confirm_reset_password_dialog: false,
show_block_reason_dialog: false,
show_confirm_block_dialog: false,
block_reason: '',
} }
}, },
@@ -382,6 +460,51 @@ export default {
this.user_type = null this.user_type = null
this.show_popup_dialog = false this.show_popup_dialog = false
this.show_confirm_reset_password_dialog = false this.show_confirm_reset_password_dialog = false
this.show_block_reason_dialog = false
this.show_confirm_block_dialog = false
this.block_reason = ''
},
showBlockReasonDialog() {
this.show_popup_dialog = false
this.show_block_reason_dialog = true
},
cancelBlock() {
this.show_block_reason_dialog = false
this.show_confirm_block_dialog = false
this.block_reason = ''
this.show_popup_dialog = true
},
confirmBlock() {
if (this.block_reason.length === 0) {
this.notifyError('차단 사유를 입력해주세요.')
return
}
this.show_block_reason_dialog = false
this.show_confirm_block_dialog = true
},
async blockMember() {
this.is_loading = true
try {
const res = await api.blockMember(this.member.id, this.block_reason)
if (res.status === 200 && res.data.success === true) {
this.notifySuccess('차단되었습니다.')
this.cancel()
this.page = 1
await this.getMemberList()
} else {
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
}
this.is_loading = false
} catch (e) {
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
this.is_loading = false
}
}, },
async modify() { async modify() {