Compare commits
76 Commits
test
...
1a435b6074
Author | SHA1 | Date | |
---|---|---|---|
1a435b6074 | |||
492859dae3 | |||
18b59b5598 | |||
5fcdd7f06d | |||
1e149f7e41 | |||
aca3767a24 | |||
d51655f15e | |||
47dd32939f | |||
2e1891ab08 | |||
99d70cc8f7 | |||
9f1675e82d | |||
c2838be2ed | |||
b5c2941c0d | |||
d5c01d8d23 | |||
7118b0649a | |||
8f5346581e | |||
e43f2e30be | |||
397fd267e0 | |||
fe4b88350b | |||
537474e162 | |||
b5abdf3cf5 | |||
a2e457b5e8 | |||
05ddd417cd | |||
e70426af68 | |||
81b33e1322 | |||
588fcfbe90 | |||
ff2c126382 | |||
702daca29f | |||
8e9008a3c1 | |||
5c0c00aad4 | |||
e0949c6d73 | |||
0449bac8d5 | |||
d412c15c9d | |||
ed16a6ddad | |||
f06e2d41e0 | |||
7505269db3 | |||
15eeb6943d | |||
7e7ed46cea | |||
fd01786649 | |||
c48c1c2f09 | |||
9bcf3a3cdb | |||
4c5b987d98 | |||
f168403048 | |||
82ee1584e7 | |||
65cb918389 | |||
784baf9a2f | |||
7a85ac41cc | |||
9d4c9437cf | |||
68845aeae1 | |||
bbdca29337 | |||
c14c041daa | |||
a515a144eb | |||
54a6773905 | |||
d97087b4e9 | |||
ddb2449053 | |||
8aca07cdf7 | |||
0ba845d95a | |||
64b1fd5395 | |||
639bea70fa | |||
6a89ba059b | |||
ff83041585 | |||
e660be0bf4 | |||
62cdd57069 | |||
f8346ed5ef | |||
9656b9a9d1 | |||
97a58266bb | |||
8fc0cfa345 | |||
22f9c2287d | |||
9284f7d5c3 | |||
e6f27a4529 | |||
6a33d1c024 | |||
3b83789c15 | |||
55f0ab9af3 | |||
9b168a6112 | |||
c47937933e | |||
4744fe7d9a |
@@ -24,7 +24,7 @@ async function getCalculateCommunityPost(startDate, endDate, page, size) {
|
||||
}
|
||||
|
||||
async function getSettlementRatio(page) {
|
||||
return Vue.axios.get('/admin/calculate/ratio?page=' + (page - 1) + "&size=20");
|
||||
return Vue.axios.get('/admin/calculate/ratio?page=' + (page - 1) + "&size=20'");
|
||||
}
|
||||
|
||||
async function createCreatorSettlementRatio(creatorSettlementRatio) {
|
||||
@@ -57,21 +57,6 @@ async function getCalculateCommunityByCreator(startDate, endDate, page, size) {
|
||||
)
|
||||
}
|
||||
|
||||
async function updateCreatorSettlementRatio(creatorSettlementRatio) {
|
||||
const request = {
|
||||
memberId: creatorSettlementRatio.creator_id,
|
||||
subsidy: creatorSettlementRatio.subsidy,
|
||||
liveSettlementRatio: creatorSettlementRatio.liveSettlementRatio,
|
||||
contentSettlementRatio: creatorSettlementRatio.contentSettlementRatio,
|
||||
communitySettlementRatio: creatorSettlementRatio.communitySettlementRatio
|
||||
};
|
||||
return Vue.axios.post('/admin/calculate/ratio/update', request);
|
||||
}
|
||||
|
||||
async function deleteCreatorSettlementRatio(memberId) {
|
||||
return Vue.axios.post('/admin/calculate/ratio/delete/' + memberId);
|
||||
}
|
||||
|
||||
export {
|
||||
getCalculateLive,
|
||||
getCalculateContent,
|
||||
@@ -80,8 +65,6 @@ export {
|
||||
getCalculateCommunityPost,
|
||||
getSettlementRatio,
|
||||
createCreatorSettlementRatio,
|
||||
updateCreatorSettlementRatio,
|
||||
deleteCreatorSettlementRatio,
|
||||
getCalculateLiveByCreator,
|
||||
getCalculateContentByCreator,
|
||||
getCalculateCommunityByCreator
|
||||
|
@@ -53,24 +53,6 @@
|
||||
<template v-slot:item.communitySettlementRatio="{ item }">
|
||||
{{ item.communitySettlementRatio }}%
|
||||
</template>
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<v-btn
|
||||
small
|
||||
color="primary"
|
||||
text
|
||||
@click="openEdit(item)"
|
||||
>
|
||||
수정
|
||||
</v-btn>
|
||||
<v-btn
|
||||
small
|
||||
color="red"
|
||||
text
|
||||
@click="confirmDelete(item)"
|
||||
>
|
||||
삭제
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -91,20 +73,13 @@
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title>{{ is_edit ? '크리에이터 정산비율 수정' : '크리에이터 정산비율' }}</v-card-title>
|
||||
<v-card-text v-show="!is_edit">
|
||||
<v-card-title>크리에이터 정산비율</v-card-title>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="creator_settlement_ratio.creator_id"
|
||||
label="크리에이터 번호"
|
||||
/>
|
||||
</v-card-text>
|
||||
<v-card-text v-show="is_edit">
|
||||
<v-text-field
|
||||
v-model="creator_settlement_ratio.nickname"
|
||||
disabled
|
||||
label="크리에이터 닉네임"
|
||||
/>
|
||||
</v-card-text>
|
||||
<v-card-text>
|
||||
<v-text-field
|
||||
v-model="creator_settlement_ratio.subsidy"
|
||||
@@ -143,7 +118,7 @@
|
||||
text
|
||||
@click="validate"
|
||||
>
|
||||
{{ is_edit ? '수정하기' : '등록하기' }}
|
||||
등록하기
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
@@ -167,8 +142,6 @@ export default {
|
||||
items: [],
|
||||
creator_settlement_ratio: {},
|
||||
show_write_dialog: false,
|
||||
is_edit: false,
|
||||
editing_item_id: null,
|
||||
headers: [
|
||||
{
|
||||
text: '닉네임',
|
||||
@@ -200,12 +173,6 @@ export default {
|
||||
sortable: false,
|
||||
value: 'communitySettlementRatio',
|
||||
},
|
||||
{
|
||||
text: '관리',
|
||||
align: 'center',
|
||||
sortable: false,
|
||||
value: 'actions',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
@@ -224,16 +191,11 @@ export default {
|
||||
},
|
||||
|
||||
showWriteDialog() {
|
||||
this.is_edit = false
|
||||
this.editing_item_id = null
|
||||
this.creator_settlement_ratio = {}
|
||||
this.show_write_dialog = true
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.creator_settlement_ratio = {}
|
||||
this.is_edit = false
|
||||
this.editing_item_id = null
|
||||
this.show_write_dialog = false
|
||||
},
|
||||
|
||||
@@ -263,11 +225,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
if (this.is_edit) {
|
||||
this.updateCreatorSettlementRatio();
|
||||
} else {
|
||||
this.createCreatorSettlementRatio();
|
||||
}
|
||||
this.createCreatorSettlementRatio();
|
||||
},
|
||||
|
||||
async createCreatorSettlementRatio() {
|
||||
@@ -295,71 +253,6 @@ export default {
|
||||
this.is_loading = false
|
||||
},
|
||||
|
||||
async updateCreatorSettlementRatio() {
|
||||
if (this.is_loading) return;
|
||||
this.is_loading = true
|
||||
try {
|
||||
// 수정은 생성과 동일한 파라미터를 전송 (memberId 기준)
|
||||
const payload = { ...this.creator_settlement_ratio }
|
||||
const res = await api.updateCreatorSettlementRatio(payload)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.cancel()
|
||||
this.notifySuccess(res.data.message || '수정되었습니다.')
|
||||
this.items = []
|
||||
await this.getSettlementRatio()
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
openEdit(item) {
|
||||
this.is_edit = true
|
||||
this.editing_item_id = null
|
||||
this.creator_settlement_ratio = {
|
||||
creator_id: item.memberId,
|
||||
nickname: item.nickname,
|
||||
subsidy: item.subsidy,
|
||||
liveSettlementRatio: item.liveSettlementRatio,
|
||||
contentSettlementRatio: item.contentSettlementRatio,
|
||||
communitySettlementRatio: item.communitySettlementRatio,
|
||||
}
|
||||
this.show_write_dialog = true
|
||||
},
|
||||
|
||||
async confirmDelete(item) {
|
||||
try {
|
||||
const ok = await this.$dialog.confirm({ text: '삭제하시겠습니까?', title: '확인', actions: { false: '취소', true: '삭제' } })
|
||||
if (!ok) return
|
||||
} catch (e) {
|
||||
// 일부 구현체는 confirm이 boolean이 아닌 경우가 있음
|
||||
}
|
||||
this.deleteCreatorSettlementRatio(item)
|
||||
},
|
||||
|
||||
async deleteCreatorSettlementRatio(item) {
|
||||
if (this.is_loading) return;
|
||||
this.is_loading = true
|
||||
try {
|
||||
const memberId = item.memberId
|
||||
const res = await api.deleteCreatorSettlementRatio(memberId)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.notifySuccess(res.data.message || '삭제되었습니다.')
|
||||
this.items = this.items.filter(x => (x.memberId) !== memberId)
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
} catch (e) {
|
||||
this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
} finally {
|
||||
this.is_loading = false
|
||||
}
|
||||
},
|
||||
|
||||
async getSettlementRatio() {
|
||||
this.is_loading = true
|
||||
|
||||
@@ -386,6 +279,10 @@ export default {
|
||||
},
|
||||
|
||||
async next() {
|
||||
if (this.search_word.length < 2) {
|
||||
this.search_word = ''
|
||||
}
|
||||
|
||||
await this.getSettlementRatio()
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user