콘텐츠별 누적 현황 페이지 추가 #9
|
@ -8,4 +8,8 @@ async function getCalculateContent(startDate, endDate) {
|
||||||
return Vue.axios.get('/admin/calculate/content-list?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
return Vue.axios.get('/admin/calculate/content-list?startDateStr=' + startDate + '&endDateStr=' + endDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
export { getCalculateLive, getCalculateContent }
|
async function getCumulativeSalesByContent(page, size) {
|
||||||
|
return Vue.axios.get('/admin/calculate/cumulative-sales-by-content?page=' + (page - 1) + "&size=" + size);
|
||||||
|
}
|
||||||
|
|
||||||
|
export { getCalculateLive, getCalculateContent, getCumulativeSalesByContent }
|
||||||
|
|
|
@ -121,9 +121,9 @@ const routes = [
|
||||||
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateContent.vue')
|
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateContent.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/calculate/copyright',
|
path: '/calculate/content-accumulation',
|
||||||
name: 'CalculateCopyright',
|
name: 'CalculateAccumulation',
|
||||||
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateCopyright.vue')
|
component: () => import(/* webpackChunkName: "calculate" */ '../views/Calculate/CalculateAccumulation.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/notice',
|
path: '/notice',
|
||||||
|
|
|
@ -0,0 +1,203 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<v-toolbar dark>
|
||||||
|
<v-spacer />
|
||||||
|
<v-toolbar-title>콘텐츠별 누적 현황</v-toolbar-title>
|
||||||
|
<v-spacer />
|
||||||
|
</v-toolbar>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<v-container>
|
||||||
|
<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 v-slot:item.orderPrice="{ item }">
|
||||||
|
{{ item.orderPrice.toLocaleString() }} 캔
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.totalCan="{ item }">
|
||||||
|
{{ item.totalCan.toLocaleString() }} 캔
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.totalKrw="{ item }">
|
||||||
|
{{ item.totalKrw.toLocaleString() }} 원
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.paymentFee="{ item }">
|
||||||
|
{{ item.paymentFee.toLocaleString() }} 원
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.settlementAmount="{ item }">
|
||||||
|
{{ item.settlementAmount.toLocaleString() }} 원
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.tax="{ item }">
|
||||||
|
{{ item.tax.toLocaleString() }} 원
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:item.depositAmount="{ item }">
|
||||||
|
{{ item.depositAmount.toLocaleString() }} 원
|
||||||
|
</template>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as api from "@/api/calculate";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "CalculateAccumulation",
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
is_loading: false,
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
total_page: 0,
|
||||||
|
items: [],
|
||||||
|
headers: [
|
||||||
|
{
|
||||||
|
text: '크리에이터',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'nickname',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '등록일',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'registrationDate',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '제목',
|
||||||
|
sortable: false,
|
||||||
|
value: 'title',
|
||||||
|
align: 'center',
|
||||||
|
width: "300px"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '판매금액(캔)',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'orderPrice',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '판매수',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'numberOfPeople',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '합계(캔)',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'totalCan',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '원화',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'totalKrw',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '수수료\n(6.6%)',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'paymentFee',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '정산금액',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'settlementAmount',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '원천세\n(3.3%)',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'tax',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '입금액',
|
||||||
|
align: 'center',
|
||||||
|
sortable: false,
|
||||||
|
value: 'depositAmount',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async created() {
|
||||||
|
await this.getCumulativeSalesByContent();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
notifyError(message) {
|
||||||
|
this.$dialog.notify.error(message)
|
||||||
|
},
|
||||||
|
|
||||||
|
notifySuccess(message) {
|
||||||
|
this.$dialog.notify.success(message)
|
||||||
|
},
|
||||||
|
|
||||||
|
sumField(key) {
|
||||||
|
return this.items.reduce((a, b) => a + (b[key] || 0), 0)
|
||||||
|
},
|
||||||
|
|
||||||
|
async next() {
|
||||||
|
await this.getCumulativeSalesByContent()
|
||||||
|
},
|
||||||
|
|
||||||
|
async getCumulativeSalesByContent() {
|
||||||
|
this.is_loading = true
|
||||||
|
|
||||||
|
try {
|
||||||
|
const res = await api.getCumulativeSalesByContent(this.page, this.page_size)
|
||||||
|
if (res.status === 200 && res.data.success === true) {
|
||||||
|
const data = res.data.data
|
||||||
|
|
||||||
|
const totalPage = Math.ceil(data.totalCount / this.page_size)
|
||||||
|
this.items = data.items
|
||||||
|
|
||||||
|
if (totalPage <= 0)
|
||||||
|
this.total_page = 1
|
||||||
|
else
|
||||||
|
this.total_page = totalPage
|
||||||
|
} else {
|
||||||
|
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||||
|
}
|
||||||
|
|
||||||
|
this.is_loading = false
|
||||||
|
} catch (e) {
|
||||||
|
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||||
|
this.is_loading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -135,7 +135,7 @@ import * as api from "@/api/calculate";
|
||||||
import datetime from 'vuejs-datetimepicker';
|
import datetime from 'vuejs-datetimepicker';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CalculateLive",
|
name: "CalculateContent",
|
||||||
components: {datetime},
|
components: {datetime},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>저작권 정산</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: "CalculateCopyright"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue