initial commit

This commit is contained in:
devwill1004-dotcom
2026-03-06 19:44:43 +08:00
commit 36dcd7d555
223 changed files with 69452 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<template>
<div>
Page Not Found
</div>
</template>
<script>
export default {
name: 'PageNotFound',
created () {
}
}
</script>
<style scoped>
</style>

22
src/views/index.vue Normal file
View File

@@ -0,0 +1,22 @@
<template>
<router-view />
</template>
<script>
import { getAuthToken, tokenCheck } from '@/libs/auth-helper'
export default {
name: 'Main',
async beforeRouteEnter (to, from, next) {
await tokenCheck()
const token = getAuthToken()
if (token) {
next()
} else {
next(to.params.prefix + '/login')
}
}
}
</script>

289
src/views/member/index.vue Normal file
View File

@@ -0,0 +1,289 @@
<template>
<div class="loginpage">
<div class="loginBg">
<!-- <video muted autoplay loop>
<source src="../../assets/img/loginBg.mp4" type="video/mp4">
</video> -->
<!-- <div class="loginObj"></div> -->
</div>
<div id="loginWrap">
<h1>PARTNER PAGE</h1>
<h2>Sign in to your account to continue</h2>
<div class="loginbox">
<div class="inputWrap">
<p>{{ $t('front.common.memId') }}</p>
<ui-input class="loginasset" :type="'text'" @input="getMemId"/>
</div>
<div class="inputWrap">
<p>{{ $t('front.common.password') }}</p>
<ui-input class="loginasset" :type="'password'" @input="getMemPass" @keyup.enter="onSubmit"/>
<i class="fa fa-eye"></i>
<!-- :placeholder="$t('front.common.password')" -->
</div>
<div class="inputWrap">
<p>자동입력방지코드</p>
<section class="captcha-box">
<VueClientRecaptcha
:value="inputValue"
:count="4"
chars="12345"
:hideLines="true"
custom-text-color="#121212"
:height="50"
@getCode="getCaptchaCode"
@isValid="checkValidCaptcha"
>
<template #icon>
<span style="color:black"><img src="../../assets/img/refresh.svg"></span>
</template>
</VueClientRecaptcha>
<input
v-model="inputValue"
class="input"
type="text"
@keyup.enter="onSubmit"
/>
</section>
</div>
<ui-button :className="'loginbtn loginasset'" :text="$t('front.login.loginButton')" @click="onSubmit"/>
</div>
</div>
</div>
</template>
<script>
import UiButton from '@/components/ui/UiButton'
import UiInput from '@/components/ui/UiInput'
import VueClientRecaptcha from 'vue-client-recaptcha'
import { setAuthData } from '@/libs/auth-helper'
import { mapState } from 'vuex'
import { signIn } from '@/api/member'
import store from '@/store'
export default {
name: 'Main',
components: {
UiButton,
UiInput,
VueClientRecaptcha
},
async created () {
},
data () {
return {
model: {
memId: null,
memPass: null
},
data: {
captchaCode: null,
isValid: false
},
inputValue: null
}
},
computed: {
...mapState([
'siteIdInfo'
]),
canSubmit () {
console.log('아이디: ', this.model.memId)
return this.model.memId && this.model.memPass
}
},
methods: {
getCaptchaCode (value) {
this.data.captchaCode = value
},
checkValidCaptcha (value) {
this.data.isValid = value
},
getMemId (value) {
this.model.memId = value
},
getMemPass (value) {
this.model.memPass = value
},
setReloadCaptcha () {
setTimeout(() => {
if (document.querySelector('.vue_client_recaptcha_icon')) {
document.querySelector('.vue_client_recaptcha_icon').click()
}
}, 500)
},
async onSubmit () {
let reloadCaptcha = false
if (!this.data.isValid) {
reloadCaptcha = true
await this.onAlert('warningart', '자동 입력 방지 코드를 확인해주세요.')
}
if (this.model.memId === '') {
reloadCaptcha = true
this.onAlert('warningart', 'front.signin.emptyMemId')
}
if (this.model.memPass === '') {
reloadCaptcha = true
this.onAlert('warningart', 'front.signin.emptyMemPass')
}
if (!this.canSubmit) {
reloadCaptcha = true
}
console.log(this.model, this.data, this.canSubmit)
if (reloadCaptcha) {
this.setReloadCaptcha()
return false
}
console.log('11111')
/*
* api/member.js 참고
*/
signIn(this.model).then(async response => {
const result = response.data
const data = result.data
if (result.resultCode === '0') {
const loginType = data.member.loginType
if (loginType === 'PARTNER' || loginType === 'P_NORMAL' || !loginType) {
setAuthData(data)
store.commit('setUserData', data.member)
store.dispatch('storeCommonCode').then(commonCode => {
if (data.msgInfo) {
store.dispatch('storeUserUnReadMessageCount', Number(data.msgInfo.newMsg))
}
this.$emit('close', 'signin')
})
this.replacePageByName('partner')
} else {
await this.onCheck('이용할수없는 페이지 입니다')
}
// setTimeout(function () {
// this.$emit('close', 'signin')
// }.bind(this), 100)
} else {
// const confirm = await this.onConfirm('api.' + result.resultCode)
// if (confirm) {
// this.$emit('signup')
// }
await this.onCheck('로그인정보가 올바르지 않습니다. 확인해주세요.')
this.setReloadCaptcha()
}
}).catch(err => {
if (err.message === 'no member') {
// alert('로그인정보가 올바르지 않습니다. 확인해주세요.')
this.onCheck('로그인정보가 올바르지 않습니다. 확인해주세요.')
} else {
alert(err.message)
}
})
}
}
}
</script>
<style scoped src="@/styles/GillSansNova.css"></style>
<style scoped lang="scss">
.captcha-box {
display: flex; gap: 10px;
& .vue_client_recaptcha {
background-color: #fff;
width: 200px;
display: inline-block;
border-radius: 3px;
border: 1px solid #00000029;
box-sizing: border-box;
box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.16);
}
}
:deep .captcha-box .vue_client_recaptcha .vue_client_recaptcha_icon {
float: right;
display: inline-block;
position: relative;
top: 50%;
right: 10px;
color: #121212;
transform: translate(0, -50%);
}
.captcha-box .vue_client_recaptcha {
background-color: #fff;
height: 50px;
}
.captcha-box .input {
position: relative;
width: 50%;
height: 50px;
box-sizing: border-box;
text-align: center;
font-size: 16px;
letter-spacing: -0.025em;
background: none;
border: 1px solid #dadde2;
border-radius: 5px;
color: #121212;
vertical-align: top;
}
</style>
<style scoped>
.loginpage {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow-y: scroll;
/* background: linear-gradient(to bottom, #ffffff, #e0ebf5); */
}
.loginpage::-webkit-scrollbar {display: none;}
.loginBg{width: 100%; height: 100vh; position: absolute; z-index: -1; top: 0; left: 0;background: #f3f4f9;}
.loginBg video { min-width: 100vw; min-height: 100vh; }
.loginbox {
width: 100%;
padding: 45px 36px;
box-sizing: border-box;
background: #fff;
box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
gap: 20px;
}
.loginObj { position: absolute; width: 100%; height: 100%; background: url(../../assets/img/loginObj.svg) no-repeat; top: 0; left: 0; background-size: cover;}
#loginWrap {display: flex; flex-direction: column; gap:20px; }
#loginWrap h1 {
color: #0f0f0f;
font-size: 47px;
letter-spacing: -1px;
/* font-family: 'GillSansNova'; */
font-family: 'NanumGothic';
font-weight: 800;
text-align: center;
}
#loginWrap h2 {color: #121212; font-size: 18px; text-align: center; font-weight: 100; margin-bottom: 40px; }
.inputWrap p {color: #121212; font-size: 16px; margin: 7px 0 15px;}
.loginasset {width: 100%; height: 37px; box-sizing: border-box; background: none; border-radius: 5px;
border: solid 1px #dadde2; color: #121212; font-size: 16px; }
.loginasset::placeholder {color: #121212;}
input.loginasset {padding: 0 10px;}
.loginbtn { background: #5068d4; color: #fff; border: 0; cursor: pointer; display: flex;justify-content: center; align-items: center; border-radius: 5px; font-size: 14px; font-weight: bold; box-shadow: 0 3px 6px 0 rgba(0, 0, 0, 0.3);}
@media screen and (max-width: 500px) {
.loginbox {
width: 100%;
}
#loginWrap {
max-width: 365px;
}
}
</style>

View File

@@ -0,0 +1,292 @@
<template>
<div class="tab-content" id="PTtab-6" :key="'PTtab-6'">
<div>
<div class="pagenamPT">
<h3 class="pagename2">베팅내역</h3>
</div>
<div class="PTsch">
<div class="datesearchPT">
<date-filter :retail="true" @search="loadData(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn" />
</div>
<div class="datesearchM">
<date-filter-mobile :retail="true" @search="loadData(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn"
/>
</div>
<div class="searchPT">
<select v-model="reqData.resultType" class="selec_w_auto">
<option value="" selected>전체</option>
<option value="win" selected></option>
<option value="lose"></option>
<option value="draw"></option>
<option value="wait">대기</option>
<option value="cancel">취소</option>
</select>
<select v-model="reqData.searchType" class="selec_w_auto">
<option value="memId" selected>아이디</option>
<option value="memNick">닉네임</option>
<option value="recommenderId">상위유저</option>
</select>
<input type="text" :placeholder="$t('front.member.emptyMemId')" v-model="reqData.searchMemId"/>
<a @click="loadData(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</div>
<div class="searchPT">
<select v-model="reqData.gameCategory" class="selec_w_auto">
<option value="casino" selected>카지노</option>
<option value="slot">슬롯</option>
<option value="sport">스포츠</option>
<option value="minigame">미니게임</option>
</select>
<h5>게임 종류</h5>
<select v-model="reqData.vendorCode" class="selec_w_auto">
<option value="" selected>전체보기</option>
<template v-for="(item, code) in commonCodeByOrder[reqData.gameCategory]" :key="code">
<option :value="item.code">{{item.codeName}}</option>
</template>
</select>
<h5>정렬</h5>
<select>
<option></option>
<option>베팅시각 오름차순</option>
<option>베팅시각 내림차순</option>
<option>베팅금 오름차순</option>
<option>베팅금 내림차순</option>
<option>당첨금 오름차순</option>
<option>당첨금 내림차순</option>
</select>
</div>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="7%">
<col width="9%">
<col width="9%">
<col width="9%">
<col width="9%">
<col width="11%">
<col width="9%">
<col width="9%">
<col width="9%">
<col width="11%">
<col width="7%">
</colgroup>
<thead>
<tr>
<th>번호</th>
<th>아이디</th>
<th>게임 종류</th>
<th>게임구분</th>
<th>베팅날짜</th>
<th>처리 게임머니</th>
<th>베팅금</th>
<th>당첨금</th>
<th>윈루즈</th>
<th>처리 게임머니</th>
<th>상태</th>
</tr>
</thead>
<tbody>
<template v-if="bettingList.length > 0">
<template v-for="item in bettingList" :key="item.betIdx">
<tr>
<td>{{item.betIdx}}</td>
<td>{{item.memId}}</td>
<td>{{item.vendorName}}</td>
<td>{{item.gameName}}</td>
<td>{{dateFormatAll(item.createdAt)}}</td>
<td>{{thousand(item.beforeCash)}}</td>
<td>{{thousand(item.cash)}}</td>
<td>{{thousand(item.winCash)}}</td>
<td>{{ thousand(Number(item.winCash) - Number(item.cash)) }}</td>
<td>{{thousand(item.afterCash)}}</td>
<td>{{typeName(item.type)}}</td>
</tr>
</template>
</template>
<template v-else>
<tr>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="bettingList.length > 0">
<template v-for="item in bettingList" :key="item.betIdx">
<ul>
<li><em>번호</em>{{item.betIdx}}</li>
<li><em>아이디</em>{{item.memId}}</li>
<li><em>게임 종류</em>{{item.vendorName}}</li>
<li><em>게임구분</em>{{item.gameName}}</li>
<li><em>베팅날짜</em>{{dateFormatAll(item.createdAt)}}</li>
<li><em>처리 <br />게임머니</em>{{thousand(item.beforeCash)}}</li>
<li><em>베팅금</em>{{thousand(item.cash)}}</li>
<li><em>당첨금</em>{{thousand(item.winCash)}}</li>
<li><em>윈루즈</em>{{ thousand(Number(item.winCash) - Number(item.cash)) }}</li>
<li><em>처리 <br />게임머니</em>{{thousand(item.afterCash)}}</li>
<li><em>상태</em>{{typeName(item.type)}}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">내역 없음</li>
</ul>
</template>
</div>
</div>
</div>
<pagination v-if="pageInfo"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="loadData"
/>
</div>
</div>
</template>
<script>
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import Pagination from '@/components/ui/Pagination.vue'
import { getDateStr, thousand } from '@/libs/utils'
import { addDays } from 'date-fns'
import { mapState } from 'vuex'
import { getBottomBettingList, partnerLevels } from '@/api/retail'
export default {
name: 'PartnerBetting',
components: { DateFilter, DateFilterMobile, Pagination },
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
])
},
data () {
return {
mainTableDate: {
startDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 23:59:59')
},
reqData: {
gameCategory: 'casino',
vendorCode: '',
resultType: '',
searchMemId: '',
chkTodayYn: 'N',
startDate: '',
endDate: '',
offset: -1,
oldYn: 'N'
},
bettingList: []
}
},
async created () {
this.emitter.emit('Loading', true)
this.getPartnerLevels()
this.reqData.startDate = getDateStr(new Date(this.mainTableDate.startDate))
this.reqData.endDate = getDateStr(new Date(this.mainTableDate.endDate))
await this.loadData()
this.emitter.emit('Loading', false)
},
methods: {
typeName (type) {
const TYPE_TEXT = {
win: '승',
lose: '패',
draw: '무',
cancel: '취소',
wait: '대기'
}
return TYPE_TEXT[type]
},
thousand,
setOldYn (data) {
console.log(data)
this.reqData.oldYn = data
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
onChangeDateTable (value) {
this.reqData.startDate = getDateStr(new Date(value.startDate))
this.reqData.endDate = getDateStr(new Date(value.endDate))
},
async loadData (page) {
if (!page) {
page = this.pageInfo.page
}
this.emitter.emit('Loading', true)
const params = { ...this.reqData, page: page, count_per_list: 40 }
await getBottomBettingList(params).then(res => {
const data = res.data.data
if (data) {
this.bettingList = data.list
if (data.pageInfo) {
this.pageInfo = data.pageInfo
}
}
this.emitter.emit('Loading', false)
})
}
}
}
</script>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/subcommon.css"></style>
<style scoped src="@/styles/striNew.css"></style>
<style scoped>
.PTsch .searchPT h5{line-height: 30px; font-size: 14px;}
#PTpage .tab-content select.selec_w_auto {
min-width: auto;
}
@media (max-width: 1000px) {
.strTablePTM li:nth-child(5), .strTablePTM li:nth-child(4) {width: 100%;}
}
</style>

View File

@@ -0,0 +1,593 @@
<template>
<div class="tab-content" id="PTtab-13" :key="'PTtab-13'">
<div>
<div class="pagenamPT">
<h3 class="pagename2">베팅내역</h3>
</div>
<div class="PTsch">
<div class="datesearchPT">
<date-filter :retail="true" @search="loadData(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn" />
</div>
<div class="datesearchM">
<date-filter-mobile :retail="true" @search="loadData(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn"
/>
</div>
<div class="searchPT">
<select v-model="reqData.resultType" class="M_w50w">
<option value="" selected>전체</option>
<option value="win" selected></option>
<option value="lose"></option>
<option value="draw"></option>
<option value="wait">대기</option>
<option value="cancel">취소</option>
</select>
<select v-model="reqData.searchType" class="M_w50w">
<option value="memId" selected>아이디</option>
<option value="memNick">닉네임</option>
<option value="recommenderId">상위유저</option>
</select>
<input type="text" :placeholder="$t('front.member.emptyMemId')" v-model="reqData.searchMemId" class="M_search"/>
<a @click="loadData(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</div>
<div class="searchPT end">
<ul>
<li>
<button type="button" class="btn-layout btn-red" @click="sortBetAmt('DESC')">
<img src="@/assets/img/icon_up.svg" />베팅금 많은 순서
</button>
<button type="button" class="btn-layout btn-red" @click="sortBetAmt('ASC')">
<img src="@/assets/img/icon_down.svg" />베팅금 적은 순서
</button>
</li>
<li>
<button type="button" class="btn-layout btn-mint" @click="sortWinAmt('DESC')">
<img src="@/assets/img/icon_up.svg" />당첨금 많은 순서
</button>
<button type="button" class="btn-layout btn-mint" @click="sortWinAmt('ASC')">
<img src="@/assets/img/icon_down.svg" />당첨금 적은 순서
</button>
</li>
<li>
<button type="button" class="btn-layout btn-skybl" @click="sortBetTime('DESC')">
<img src="@/assets/img/icon_up.svg" />베팅시간 최신순
</button>
<button type="button" class="btn-layout btn-skybl" @click="sortBetTime('ASC')">
<img src="@/assets/img/icon_down.svg" />베팅시간 과거순
</button>
</li>
<li>
<button type="button" class="btn-layout btn-coB" @click="sortEventTime('DESC')">
<img src="@/assets/img/icon_up.svg" />경기시간 최신순
</button>
<button type="button" class="btn-layout btn-coB" @click="sortEventTime('ASC')">
<img src="@/assets/img/icon_down.svg" />경기시간 과거순
</button>
</li>
</ul>
</div>
</div>
<div class="strTablescr">
<div class="strTablePC">
<template v-if="Object.keys(betList).length > 0">
<table class="strTablePT" v-for="(item) in betList" :key="item[0].betIdx + item[0].betId + item[0].newLineID" >
<colgroup>
<col width="5%">
<col width="10%">
<col width="5%">
<col width="10%">
<col width="10%">
<col width="5%">
<col width="10%">
<col width="10%">
<col width="5%">
<col width="5%">
</colgroup>
<thead>
<tr>
<th>아이디</th>
<th>경기시간</th>
<th>종목</th>
<th>리그명</th>
<th>홈팀</th>
<th>스코어</th>
<th>원정팀</th>
<th>베팅위치</th>
<th>배당율</th>
<th>상태</th>
</tr>
</thead>
<tbody>
<tr>
<td class="fc-id btn-link">{{ item[0].memId }}</td>
<td class="comWrap">
<span class="combi" v-for="data in item" :key="data.newLineID">
{{ displayDateTime(data.eventDate, true) }}
</span>
</td>
<td class="comWrap">
<span class="combi" v-for="data in item" :key="data.newLineID">
<em class="orange-bg" :class="data.branchName">{{ SPORT_BRANCH_LIST[data.branchID] }}</em>
</span>
</td>
<td class="comWrap">
<span class="combi lg-w id" v-for="data in item" :key="data.newLineID">
{{ data.leagueNameKO || data.leagueName }}
</span>
</td>
<td class="comWrap">
<span class="combi" v-for="data in item" :key="data.betIdx + data.betId + data.newLineID">
{{ data.homeTeamKO || data.homeTeam }}
</span>
</td>
<td class="comWrap">
<span class="combi" v-for="data in item" :key="data.newLineID">
{{ data.score }}
</span>
</td>
<td class="comWrap">
<span class="combi" v-for="data in item" :key="data.newLineID">
{{ data.awayTeamKO || data.awayTeam }}
</span>
</td>
<td class="comWrap">
<span class="combi betloc" v-for="data in item" :key="data.newLineID">
{{ data.yourBet }}
</span>
</td>
<td class="comWrap">
<span class="combi" v-for="data in item" :key="data.newLineID" :class="{ 'ft-01' : data.lineOdds > 0 && data.lineOdds < 1.99, 'ft-02' : data.lineOdds > 2 && data.lineOdds < 4.99, 'ft-03' : data.lineOdds > 5}">
{{ data.lineOdds }}
</span>
</td>
<td class="comWrap">
<span class="combi c-sts" v-for="data in item" :key="data.newLineID">
{{ STATUS_LIST[data.status] }}
</span>
</td>
</tr>
<tr>
<td colspan="10" class="no-padd">
<div class="commonWrap">
<ul class="commonInfo">
<li class="c-01 w210px">
<em>베팅시간</em><span>{{ replaceDateT(item[0].betDate) }}</span>
</li>
<li class="c-02 w270px">
<em>베팅ID</em><span>{{ item[0].betId }}</span>
</li>
<li class="c-03">
<template v-if="item[0].betTypeName === '단폴'">
<span class="blue-bg" style="color: white;">{{ item[0].betTypeName }}</span>
</template>
<template v-else>
<span class="purple-bg" style="color: white;">{{ item[0].betTypeName }}</span>
</template>
</li>
</ul>
<ul class="commonInfo">
<li class="c-04">
<em>베팅금</em><span>{{ thousand(item[0].betAmt) }}</span>
</li>
<li class="c-05">
<em>통합 배당률</em><span>{{ calOdds(item) }}</span>
</li>
<li class="c-06">
<em>예상 당첨금</em><span>{{ thousand(exCalOdds(item)) }}</span>
</li>
<li class="c-07">
<em>당첨금</em>
<span>{{ thousand(item[0].betWinAmt) }}</span>
</li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</template>
<template v-else>
<table class="strTablePT">
<colgroup>
<col width="5%">
<col width="10%">
<col width="5%">
<col width="10%">
<col width="10%">
<col width="5%">
<col width="10%">
<col width="10%">
<col width="5%">
<col width="5%">
</colgroup>
<thead>
<tr>
<th>아이디</th>
<th>경기시간</th>
<th>종목</th>
<th>리그명</th>
<th>홈팀</th>
<th>스코어</th>
<th>원정팀</th>
<th>베팅위치</th>
<th>배당율</th>
<th>상태</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="10">내역이 없습니다.</td>
</tr>
</tbody>
</table>
</template>
</div>
<div class="strTableM">
<div class="strTablePTM">
</div>
</div>
</div>
<pagination v-if="pageInfo"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="loadData"
/>
</div>
</div>
</template>
<script>
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import Pagination from '@/components/ui/Pagination.vue'
import { displayDateTime, getDateStr, replaceDateT, thousand } from '@/libs/utils'
import { addDays } from 'date-fns'
import { mapState } from 'vuex'
import { getBottomSportBettingList, partnerLevels } from '@/api/retail'
import { SPORT_BRANCH_LIST, STATUS_LIST } from '@/libs/constants'
export default {
name: 'PartnerBettingSport',
components: { DateFilter, DateFilterMobile, Pagination },
computed: {
SPORT_BRANCH_LIST () {
return SPORT_BRANCH_LIST
},
STATUS_LIST () {
return STATUS_LIST
},
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
])
},
data () {
return {
mainTableDate: {
startDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 23:59:59')
},
reqData: {
page: 1,
count_per_list: 100,
memId: '',
branchID: null,
orderColumn: null,
orderType: null,
startDate: '',
endDate: '',
offset: -1,
oldYn: 'N'
},
betList: {},
branchIDList: [],
order: ''
}
},
async created () {
this.emitter.emit('Loading', true)
this.branchIDList.push({
value: null,
text: '전체'
})
for (const key in SPORT_BRANCH_LIST) {
this.branchIDList.push({
value: key,
text: SPORT_BRANCH_LIST[key]
})
}
this.getPartnerLevels()
this.reqData.startDate = getDateStr(new Date(this.mainTableDate.startDate))
this.reqData.endDate = getDateStr(new Date(this.mainTableDate.endDate))
await this.loadData()
this.emitter.emit('Loading', false)
},
methods: {
replaceDateT,
displayDateTime,
typeName (type) {
const TYPE_TEXT = {
win: '승',
lose: '패',
draw: '무',
cancel: '취소',
wait: '대기'
}
return TYPE_TEXT[type]
},
thousand,
setOldYn (data) {
console.log(data)
this.reqData.oldYn = data
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
onChangeDateTable (value) {
this.reqData.startDate = getDateStr(new Date(value.startDate))
this.reqData.endDate = getDateStr(new Date(value.endDate))
},
async loadData (pageNum) {
this.emitter.emit('Loading', true)
if (pageNum) {
this.reqData.page = pageNum
} else {
this.reqData.page = 1
}
const data = this.reqData
if (this.order !== '') {
const tempOrder = this.order.split(' ')
const orderColumn = tempOrder[0]
const orderType = tempOrder[1]
data.orderColumn = orderColumn
data.orderType = orderType
} else {
data.orderColumn = ''
data.orderType = ''
}
console.log('list params : ', data)
getBottomSportBettingList(data).then(res => {
console.log(res.data)
this.betList = {}
if (res.data.resultCode === '0') {
const list = res.data.data.list
console.log(list)
const temp = {}
list.forEach(item => {
const betIdx = item.betIdx
const betId = item.betId
const key = betIdx + betId
if (!temp[key]) {
temp[key] = []
}
temp[key].push(item)
})
console.log(temp)
this.betList = temp
}
this.emitter.emit('Loading', false)
})
},
sortBetAmt (order) {
this.order = `betAmt ${order}`
this.loadData(1)
},
sortWinAmt (order) {
this.order = `betWinAmt ${order}`
this.loadData(1)
},
sortBetTime (order) {
this.order = `betTime ${order}`
this.loadData(1)
},
sortEventTime (order) {
this.order = `eventTime ${order}`
this.loadData(1)
},
shouldApplyClass (item) {
return item.length > 1
},
calOdds (item) {
const totalodd = item.reduce((accumulator, data) => {
return accumulator * data.lineOdds
}, 1)
const roundedTotalOdd = Math.floor(totalodd * 100) / 100
return roundedTotalOdd.toFixed(2)
},
exCalOdds (item) {
const odds = this.calOdds(item)
const extotalodd = item.reduce((accumulator, data) => {
return odds * data.betAmt
}, 1)
return extotalodd.toFixed(0)
}
}
}
</script>
<style scoped>
.PTsch .searchPT h5{line-height: 30px; font-size: 14px;}
.searchPT.end {margin-left: auto;margin-top: 21px;}
.searchPT.end ul {
display: flex; gap: 10px;
}
.searchPT.end li {
display: flex; gap: 5px; flex-direction: column;
}
.strTablePC .strTablePT {border: 1px solid #d5d5d5;margin-bottom: 30px;}
.strTablePC .strTablePT th {background: #f9f9f9;border-bottom: 1px solid #d5d5d5;}
.strTablePC .strTablePT td {background: none !important;}
.btn-coB {
background: #edb838;
}
.btn-skybl {
background: #c63d40;
}
.btn-mint {
background: #42b182;
}
.btn-red {
background: #5068d4;
}
.btn-layout {
display: flex;
align-items: center;
gap: 5px;
padding: 4px 8px;
color: #fff !important;
font-size: 14px;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
white-space: nowrap;
border-radius: 5px;
border: 0;
}
.btn-layout img {height: 11px;}
tr.point-tr {border-bottom: 3px solid #bacfce; border-top: 3px solid #bacfce;}
tr.point-tr td {background: #f7f7f7;}
.w210px{
width: 210px;
}
.w270px{
width: 270px;
}
.combi {display: flex;align-items: center;justify-content: center;height: 35px;border-top: 1px solid #e1e0e0;}
.combi:first-child {border-top: 0;}
.combi.on {background: #cdd1f1;}
.id {overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.orange-bg{
padding: 5px 5px 5px 25px;
text-align: center;
box-sizing: border-box;
color:#eb7a3f;
}
.blue-bg{
padding: 5px 8px;
text-align: center;
box-sizing: border-box;
color:#fff !important;
background: #5737e7;
border-radius: 3px;;
}
.purple-bg{
padding: 5px 8px;
text-align: center;
box-sizing: border-box;
color:#fff !important;
background: #ad0e6c;
border-radius: 3px;;
}
.orange-bg.combi {
max-width: 90%;
width: auto;
margin: 0 auto;
}
.betloc{
color: #0043bd;
}
.fc-id {
color: #eb7a3f !important;
}
.ft-01 {
color: #31ada7;
}
.ft-02 {
color: #7c46a5;
}
.ft-03 {
color: #7c46a5;
}
.c-sts {
color: rgb(255, 145, 0);
}
.c-07 span {color:#c50101; font-size:1.1em; font-weight:600;}
.lg-w {
padding: 0 8px;
justify-content: flex-start;
overflow-x: scroll;
box-sizing: border-box;
}
.lg-w::-webkit-scrollbar{
height: 0px;
width: 5px;
}
.lg-w::-webkit-scrollbar-thumb{
background: #82a6a4;
}
.lg-w::-webkit-scrollbar-track{
background: none;
}
.comWrap{position: relative;}
.commonWrap{display: flex; justify-content: space-between;height: 100%;}
.commonInfo {display: flex; gap: 10px; width: 50%; background-image: linear-gradient(to right, #def3be, #f4f9ee); padding-left: 15px;}
.commonInfo:last-child {justify-content: end; background-image: linear-gradient(to right, #f4f9ee, #def3be); padding-right: 15px;}
.commonInfo li {position: relative; display: flex; gap: 15px; padding: 3px 5px; align-items: center;}
.commonInfo li em {font-weight: 900;}
.commonInfo li span {font-weight: 400;color: #000;}
.commonInfo li::after {content: ''; position: absolute; right: -10px; top: 4px; width: 1px; height: 15px; display: none; background: #7e7e7e;}
.commonInfo li:last-child::after {display: none;}
.Soccer {background: url(~@/assets/img/icon_soccer.png) center left no-repeat;}
.Volleyball {background: url(~@/assets/img/icon_volleyball.png) center left no-repeat;}
.Basketball {background: url(~@/assets/img/icon_basketball.png) center left no-repeat;}
.Baseball {background: url(~@/assets/img/icon_baseball.png) center left no-repeat;}
.ussoccer {background: url(~@/assets/img/icon_ussoccer.png) center left no-repeat;}
.haki {background: url(~@/assets/img/icon_haki.png) center left no-repeat;}
</style>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/subcommon.css"></style>
<style scoped src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,246 @@
<template>
<div class="">
<div class="pagenamPT">
<h3 class="pagename2">
{{$t('front.message.allMsg')}}<span class="blc">{{pageInfo.tatal_list_count}}</span>{{$t('front.message.num')}}
</h3>
</div>
<board-filter @onSearch="onSearch"/>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="10%">
<col width="10%">
<col width="50%">
<col width="20%">
<col width="10%">
</colgroup>
<thead>
<tr>
<th>{{$t('front.board.checks')}}</th>
<th>{{$t('front.board.check')}}</th>
<th>{{$t('front.board.title')}}</th>
<th>{{$t('front.board.sendTime')}}</th>
<th>{{$t('front.board.delete')}}</th>
</tr>
</thead>
<tbody>
<template v-if="list && list.length > 0">
<template v-for="item in list" :key="item.msgIdx">
<tr>
<td><input type="checkbox" v-model="item.checked"></td>
<td><span class="ocmsg" :class="{'closemsg': item.msgStatus === 'N', 'openmsg': item.msgStatus !== 'N'}"></span></td>
<td>
<a @click="onMessageClick(item)">
<span class="nicon iblbg mr10">{{$t('front.boardCategory.notice')}}</span>
{{item.msgTitle}}
<span class="newicon ml10">N</span>
</a>
</td>
<td>{{dateFormat(item.sendDate)}}</td>
<td><span class="nbicon bgrbg" @click="onRemoveOne(item)">{{$t('front.board.delete')}}</span></td>
</tr>
</template>
</template>
<template v-else>
<tr>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="list && list.length > 0">
<template v-for="item in list" :key="item.msgIdx">
<ul>
<li>
<em>{{$t('front.board.checks')}}</em>
<input type="checkbox" v-model="item.checked">
</li>
<li>
<em>{{$t('front.board.check')}}</em>
<span class="ocmsg" :class="{'closemsg': item.msgStatus === 'N', 'openmsg': item.msgStatus !== 'N'}"></span>
</li>
<li>
<em>{{$t('front.board.title')}}</em>
<a @click="onMessageClick(item)">
<span class="nicon iblbg mr10">{{$t('front.boardCategory.notice')}}</span>
{{item.msgTitle}}
<span class="newicon rdbg ml10">N</span>
</a>
</li>
<li>
<em>{{$t('front.board.sendTime')}}</em>
{{dateFormat(item.sendDate)}}
</li>
<li>
<em>{{$t('front.board.delete')}}</em>
<span class="nbicon rdbg" @click="onRemoveOne(item)">{{$t('front.board.delete')}}</span>
</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li>{{$t('front.common.notFoundList')}}</li>
</ul>
</template>
</div>
</div>
</div>
<div class="applibtns">
<a @click="onAllCheck">{{ $t('front.board.AllSelect') }}</a>
<a @click="onRemoveMsg">{{ $t('front.board.AllDelete') }}</a>
<a @click="onAllRead">{{ $t('front.board.AllRead') }}</a>
</div>
<pagination
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
@goToPage="loadList"
/>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination'
import BoardFilter from '@/components/common/BoardFilter'
import { getMsgList, setMsgRead, setMsgUpdate } from '@/api/board'
export default {
name: 'msg',
components: { BoardFilter, Pagination },
data () {
return {
list: [],
searchParam: {
searchOption: '',
searchValue: ''
},
idxList: []
}
},
created () {
this.loadList()
},
methods: {
onSearch (value) {
this.searchParam.searchOption = value.type
this.searchParam.searchValue = value.text
this.loadList()
},
loadList (page) {
const params = {
page: page || this.pageInfo.page
}
const searchValue = this.searchParam.searchValue
if (searchValue) {
params.searchOption = this.searchParam.searchOption
params.searchValue = this.searchParam.searchValue
}
getMsgList(params).then(response => {
const result = response.data
if (result.resultCode === '0') {
const list = result.data.list
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
for (let i = 0, iLen = list.length; i < iLen; i++) {
const item = list[i]
item.checked = false
}
this.list = list
}
})
},
onMessageClick (item, isMobile) {
item.searchParam = JSON.stringify(this.searchParam)
this.goPageByName('msgread', item)
},
onAllCheck (list) {
this.allChecked = !this.allChecked
this.list.forEach(item => {
item.checked = this.allChecked
})
},
async onRemoveOne (item) {
const confirm = await this.onConfirm('front.message.confirmDeleteMessageMultiple')
if (confirm) {
const params = {
msgIdx: item.msgIdx,
recieveId: item.recieveId,
status: 'N'
}
await setMsgUpdate(params).then(response => {
this.onCheck('front.message.completeDeleteMessage')
this.loadList()
})
}
},
async onRemoveMsg () {
let checkedCount = 0
let unreadCount = 0
this.list.forEach(item => {
if (item.checked) {
checkedCount++
if (item.msgStatus === 'N') {
unreadCount++
}
}
})
if (unreadCount > 0) {
this.onCheck('front.message.cannotDeleteMessage')
return false
}
if (checkedCount <= 0) {
this.onCheck('front.message.noSelectMessage')
return false
}
const confirm = await this.onConfirm('front.message.confirmDeleteMessage')
if (confirm) {
for (let i = 0, iLen = this.list.length; i < iLen; i++) {
const item = this.list[i]
if (item.checked) {
const params = {
msgIdx: item.msgIdx,
recieveId: item.recieveId
}
setMsgUpdate(params).then(response => {
})
}
}
await this.onCheck('front.message.completeDeleteMessage')
this.loadList()
}
},
async onAllRead () {
const confirm = await this.onConfirm('front.message.confirmAllRead')
if (confirm) {
const params = {
}
setMsgRead(params).then(response => {
const result = response.data
if (result.resultCode === '0') {
this.loadList()
}
})
}
}
}
}
</script>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,107 @@
<template>
<div class="" v-if="item">
<div class="board">
<div class="boardrd first">
<!-- <span class="blc">스포츠북</span>-->
<span class="ml10">{{item.msgTitle}}</span>
<span class="newicon ml5">N</span>
</div>
<div class="boardrd">
<!--img src="@/assets/img/peanutlogo.svg"--><span>{{dateFormat(item.sendDate)}}</span>
</div>
<div class="boardrd">
<p class="rdcon">{{item.msgDesc}}</p>
</div>
</div>
<div class="applibtns">
<a v-if="prevItem" @click="onMessageClick(prevItem)">{{$t('front.board.prev')}}</a>
<a @click="onMessageList(false)">{{$t('front.board.list')}}</a>
<a v-if="nextItem" @click="onMessageClick(nextItem)">{{$t('front.board.next')}}</a>
</div>
</div>
</template>
<script>
import { getMsgList, setMsgRead } from '@/api/board'
import { mapState } from 'vuex'
export default {
name: 'messageread',
data () {
return {
prevItem: null,
nextItem: null,
item: null,
list: null
}
},
async created () {
this.msgIdx = this.$route.params.msgIdx
await this.loadList(1)
if (this.list.length > 0) {
for (let i = 0, iLen = this.list.length; i < iLen; i++) {
const data = this.list[i]
if (data.msgIdx.toString() === this.msgIdx) {
this.item = data
if (this.list[i + 1]) {
this.prevItem = this.list[i + 1]
}
if (this.list[i - 1]) {
this.nextItem = this.list[i - 1]
}
}
}
}
this.setRead()
},
computed: {
...mapState([
'userData'
])
},
methods: {
async loadList (page) {
const params = {
page: page || this.pageInfo.page
}
await getMsgList(params).then(response => {
const result = response.data
if (result.resultCode === '0') {
const list = result.data.list
console.log(result)
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
this.list = list
}
})
},
setRead () {
this.item.status = 'R'
const param = {
msgIdx: this.item.msgIdx,
recieveId: this.item.recieveId
}
setMsgRead(param).then(response => {
})
},
onMessageList (isMobile) {
if (isMobile) {
this.goPageByName('msg')
} else {
this.goPageByName('msg')
}
},
onMessageClick (item, isMobile) {
item.list = JSON.stringify(this.list)
this.goPageByName('msgread', item)
}
}
}
</script>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,223 @@
<template>
<div class="" v-if="list">
<board-filter @onSearch="onSearch"/>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="10%">
<col width="10%">
<col width="10%">
<col width="40%">
<col width="20%">
<col width="10%">
</colgroup>
<thead>
<tr>
<th>{{$t('front.board.check')}}</th>
<th>{{$t('front.board.status')}}</th>
<th>{{$t('front.board.type')}}</th>
<th>{{$t('front.board.title')}}</th>
<th>{{$t('front.board.regDate')}}</th>
<th>{{$t('front.board.delete')}}</th>
</tr>
</thead>
<tbody>
<template v-if="list.length > 0">
<template v-for="item in list" :key="item.boardIdx">
<tr>
<td><span class="ocmsg" :class="item.isReadAdmin === 'Y' ? 'openmsg': 'closemsg'"></span></td>
<td>
<span v-if="item.status === 'ANSWER'" class="nbicon bkblbg">{{$t('front.qnaStatus.answer')}}</span>
<span v-if="item.status === 'WAIT'" class="nbicon bkblbg">{{$t('front.qnaStatus.wait')}}</span>
</td>
<td>{{$t('front.qnaTypeCategory.' + item.faqType)}}</td>
<td @click.prevent="onClickRead(item.boardIdx)">
<a href="#" >
{{item.title}}
<span class="newicon rdbg ml5">N</span>
</a>
</td>
<td>{{dateFormatForBoard(item.regDate)}}</td>
<td><span class="nbicon bgrbg" @click.prevent="onClickRemove(item.boardIdx)">{{$t('front.board.delete')}}</span></td>
</tr>
</template>
</template>
<template v-else>
<tr>
{{$t('front.board.noAsk')}}
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="list.length > 0">
<template v-for="item in list" :key="item.boardIdx">
<ul>
<li>
<em>{{$t('front.board.check')}}</em>
<span class="ocmsg" :class="item.isReadAdmin === 'Y' ? 'openmsg': 'closemsg'"></span>
</li>
<li>
<em>{{$t('front.board.status')}}</em>
<span v-if="item.status === 'ANSWER'" class="blc nbicon wtblbg">{{$t('front.qnaStatus.answer')}}</span>
<span v-if="item.status === 'WAIT'" class="nbicon bkblbg">{{$t('front.qnaStatus.wait')}}</span>
</li>
<li>
<em>{{$t('front.board.type')}}</em>
{{$t('front.qnaTypeCategory.' + item.faqType)}}
</li>
<li @click.prevent="onClickRead(item.boardIdx)">
<em>{{$t('front.board.title')}}</em>
<a href="#" >
{{item.title}}
<span class="newicon rdbg ml5">N</span>
</a>
</li>
<li>
<em>{{$t('front.board.regDate')}}</em>
{{dateFormatForBoard(item.regDate)}}
</li>
<li>
<em>{{$t('front.board.delete')}}</em>
<span class="nbicon bgrbg" @click.prevent="onClickRemove(item.boardIdx)">{{$t('front.board.delete')}}</span>
</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li>{{$t('front.common.notFoundList')}}</li>
</ul>
</template>
</div>
</div>
</div>
<div class="applibtns">
<a @click="getAcc">{{$t('front.board.bankAccountQna')}}</a>
<a @click="onClickWrite">{{$t('front.board.qnaWrite')}}</a>
</div>
<pagination :pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
@goToPage="loadList()"/>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination'
import BoardFilter from '@/components/common/BoardFilter'
import { mapState } from 'vuex'
export default {
name: 'qna',
components: {
BoardFilter,
Pagination
},
data () {
return {
list: null,
boardType: 'faq',
searchParam: {
searchOption: '',
searchValue: ''
},
idxList: [],
category: ''
}
},
async created () {
await this.loadList()
},
computed: {
...mapState([
'userData'
])
},
methods: {
async getAcc () {
const title = '계좌문의입니다.'
const content = '계좌문의입니다.'
const params = {
title: title,
content: content,
boardType: 'faq',
category: '',
faqType: 'bankaccount'
}
await this.setSaveAccountBoard(params, async function () {
await this.loadList()
}.bind(this))
},
onCategoryChange (category) {
this.category = category
this.loadList()
},
onSearch (value) {
this.searchParam.searchOption = value.type
this.searchParam.searchValue = value.text
this.loadList()
},
async loadList () {
const params = {
boardType: this.boardType,
category: this.category,
memId: this.userData.memId
}
const searchValue = this.searchParam.searchValue
if (searchValue) {
params.searchOption = this.searchParam.searchOption
params.searchValue = this.searchParam.searchValue
}
const result = await this.getBoardList(params, this.pageInfo.page)
console.log(result)
result.list.forEach(item => {
item.isContentOpen = false
})
this.list = result.list
this.idxList = result.idxList
},
onClickRead (id) {
if (!id) id = 1
this.$router.push({ name: 'qnaread', params: { boardIdx: id } })
},
onClickWrite () {
this.$router.push({ name: 'qnaWrite' })
},
onClickRemove (boardIdx) {
if (boardIdx) {
const params = {
boardIdx: boardIdx,
boardType: this.boardType,
delYn: 'Y'
}
this.setSaveBoard(params, 'delete', () => {
this.loadList()
})
}
}
}
}
</script>
<style scoped>
a{color:#121212;}
</style>
<style src="@/styles/striNew.css"></style>
<style scoped>
.applibtns{gap:20px;}
@media (max-width: 1000px) {
.strTablePTM li {width: 100%;}
}
</style>

View File

@@ -0,0 +1,90 @@
<template>
<div class="" v-if="model">
<div class="board">
<div class="boardrd first">
<span v-if="model.status === 'ANSWER'" class="nbicon bkblbg">{{$t('front.qnaStatus.answer')}}</span>
<span v-if="model.status === 'WAIT'" class="nbicon bgrbg">{{$t('front.qnaStatus.wait')}}</span>
<span class="nbicon bgrbg">{{$t('front.qnaTypeCategory.' + model.faqType)}}</span>
<span class="ml10">{{model.title}}</span>
</div>
<div class="boardrd">
<!--span class="medal medal1"><em class="level">1</em></span-->
<span>{{model.memName}}</span><span>{{dateFormatForBoard(model.regDate)}}</span>
</div>
<div class="boardbox">
<p>{{model.content}}</p>
<p class="rdcon rdconbg mt20" v-if="replyContent">
{{replyContent}}
</p>
</div>
</div>
<div class="applibtns">
<a v-if="prevId" @click="onClickPrevNext('prev')">{{$t('front.board.prev')}}</a>
<a @click="onClickList">{{$t('front.board.list')}}</a>
<a v-if="nextId" @click="onClickPrevNext('next')">{{$t('front.board.next')}}</a>
</div>
</div>
</template>
<script>
import { getBoardCookie } from '@/libs/auth-helper'
export default {
name: 'qnaread',
components: {
},
data () {
return {
boardType: 'faq',
boardIdx: null,
model: null,
replyContent: '',
prevId: null,
nextId: null
}
},
created () {
this.boardIdx = this.$route.params.boardIdx
this.loadBoardDetail(this.boardIdx)
this.idxList = getBoardCookie().split(',')
console.log(this.idxList)
if (this.idxList.length > 0) {
for (let i = 0, iLen = this.idxList.length; i < iLen; i++) {
if (this.idxList[i] === this.boardIdx.toString()) {
if (this.idxList[i - 1]) {
this.prevId = this.idxList[i - 1]
}
if (this.idxList[i + 1]) {
this.nextId = this.idxList[i + 1]
}
}
}
}
},
methods: {
async loadBoardDetail (boardIdx) {
const params = {
boardIdx: boardIdx,
boardType: this.boardType
}
this.model = await this.getBoardDetail(params)
this.replyContent = this.model.comment.length > 0 ? this.model.comment[0].content : ''
},
onClickPrevNext (type) {
let id = this.prevId
if (type === 'next') {
id = this.nextId
}
this.$router.push({ name: 'qnaread', params: { boardIdx: id } })
},
onClickList () {
this.$router.push({ name: 'qna' })
}
}
}
</script>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,113 @@
<template>
<div class="pt60">
<div class="board">
<!-- <ul class="boardwrt">-->
<!-- <li class="w160">유형</li>-->
<!-- <li class="w100w">-->
<!-- <select v-model="model.category">-->
<!-- <template v-for="category in categoryList" v-bind:key="category">-->
<!-- <option :value="category">{{$t('front.gameCategory.' + category)}}</option>-->
<!-- </template>-->
<!-- </select>-->
<!-- </li>-->
<!-- </ul>-->
<ul class="boardwrt">
<li class="w160">{{$t('front.board.type')}}</li>
<li class="w100w">
<select v-model="model.type">
<template v-for="type in typeList" v-bind:key="type">
<option :value="type">{{$t('front.qnaTypeCategory.' + type)}}</option>
</template>
</select>
</li>
</ul>
<ul class="boardwrt">
<li class="w160">{{$t('front.board.title')}}</li>
<li class="w100w"><input type="" :placeholder="$t('front.board.emptyTitle')" v-model="model.title"/></li>
</ul>
<ul class="boardwrt">
<li class="w160">{{$t('front.search.content')}}</li>
<li class="w100w"><textarea
:placeholder="$t('front.board.commentPlaceholder')" v-model="model.content"></textarea></li>
</ul>
</div>
<div class="boardbtn">
<ui-button :className="'grsbtn mr5'" :text="$t('front.board.apply')" @click="onClickSubmit"/>
<ui-button :className="'grsbtn'" :text="$t('front.board.cancel')" @click="onClickCancel"/>
</div>
</div>
</template>
<script>
import UiButton from '@/components/ui/UiButton'
export default {
name: 'qnaWrite',
components: {
UiButton
},
data () {
return {
categoryList: [
'livecasino',
'slot',
'sports',
'esports',
'minigame',
'virtualgame',
'cash',
'betting',
'etc'
],
typeList: [
'bankaccount',
'etc'
],
model: {
category: '',
type: 'etc',
title: '',
content: ''
}
}
},
created () {
},
methods: {
onClickCancel () {
this.$router.go(-1)
},
onClickSubmit () {
if (!this.model.title) {
this.onAlert('warningart', 'front.board.emptyTitle')
return false
}
if (!this.model.content) {
this.onAlert('warningart', 'front.board.emptyContent')
return false
}
const params = {
title: this.model.title,
content: this.model.content,
boardType: 'faq',
category: this.model.category,
faqType: this.model.type
}
if (this.boardIdx) {
params.boardIdx = this.boardIdx
}
this.setSaveBoard(params)
}
}
}
</script>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/subcommon.css"></style>
<style scoped>
.board {border: 1px solid #333;}
</style>

View File

@@ -0,0 +1,548 @@
<template>
<div class="tab-content" id="PTtab-1" :key="'PTtab-1'" >
<div class="pagenamew">
<h3 class="pagename2">파트너{{$t('front.stributor.totalList')}}</h3>
</div>
<div class="searchPTwrap">
<div class="datesearchPT">
<date-filter :retail="true" @search="loadMainTable(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn" />
</div>
<div class="datesearchM">
<date-filter-mobile :retail="true" @search="loadMainTable(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn"
/>
</div>
</div>
<ul class="strbtnPT mb20">
<li>{{$t('front.common.deposit')}}<span>{{thousand(total.userCashIn || 0)}}</span></li>
<li>{{$t('front.common.withdrawal')}}<span>{{thousand(total.userCashOut || 0)}}</span></li>
<li>{{$t('front.common.depositWithdrawal')}}<span>{{thousand(total.userCashResultAmt || 0)}}</span></li>
<li>{{$t('front.stributor.m22')}}<span>{{thousand(total.betAmt || 0)}}</span></li>
<li>{{$t('front.stributor.m23')}}<span>{{thousand(total.betAmtWin || 0)}}</span></li>
<li>{{$t('front.stributor.winlose')}}<span>{{thousand(total.betResultAmt || 0)}}</span></li>
<!--li class="saveBtnPT" @click="move = true">{{$t('front.stributor.move')}}</li-->
</ul>
<div class="line"><retail-main-table v-model:partnerObj=partnerLevelObject :list="list" :date="mainTableDate" :table="'main'" :mainPageInfo=pageInfo @goToMainPage="loadMainTable" /></div>
<div v-if="move" class="moveWrap makeWrap">
<div class="makeWraphead">
<h4>요율조정</h4>
<a @click="move=!move" class="close"><img src="@/assets/img/icon_cancelW.svg" /></a>
</div>
<div class="makeWrapbody">
<div>
<p class="name">내요율</p>
<table class="rolllose">
<!--tr>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.lose')}}(%)</th>
<th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.roll')}}(%) </th>
<th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.lose')}}(%)</th>
</tr-->
<tr>
<th></th>
<th v-if="gameCount['casino']">{{$t('front.gnb.casino')}}</th>
<th v-if="gameCount['hc-casino']">{{$t('front.gnb.hotelcasino')}}</th>
<th v-if="gameCount['slot']">{{$t('front.gnb.slot')}}</th>
<th v-if="gameCount['sports']">{{$t('front.gnb.sport')}}</th>
<th v-if="gameCount['mini-game'] || gameCount['mini game']">{{$t('front.gnb.minigame')}}</th>
<!--th v-if="gameCount['casino']">{{$t('front.gnb.casino')}}</th>
<th v-if="gameCount['hc-casino']">{{$t('front.gnb.hotelcasino')}}</th>
<th v-if="gameCount['slot']">{{$t('front.gnb.slot')}}</th>
<th v-if="gameCount['sports']">{{$t('front.gnb.sport')}}</th>
<th v-if="gameCount['mini-game'] || gameCount['mini game']">{{$t('front.gnb.minigame')}}</th-->
</tr>
<tr>
<th>{{$t('front.stributor.roll')}}(%)</th>
<td v-if="gameCount['casino']">{{myRate.casinoPR}}</td>
<td v-if="gameCount['hc-casino']">{{myRate.hcasinoPR}}</td>
<td v-if="gameCount['slot']">{{myRate.slotPR}}</td>
<td v-if="gameCount['sports']">{{myRate.sportPR}}</td>
<td v-if="gameCount['mini-game'] || gameCount['mini game']">{{myRate.miniPR}}</td>
</tr>
<tr>
<th>{{$t('front.stributor.lose')}}(%)</th>
<td v-if="gameCount['casino']">{{myRate.casinoLR}}</td>
<td v-if="gameCount['hc-casino']">{{myRate.hcasinoLR}}</td>
<td v-if="gameCount['slot']">{{myRate.slotLR}}</td>
<td v-if="gameCount['sports']">{{myRate.sportLR}}</td>
<td v-if="gameCount['mini-game'] || gameCount['mini game']">{{myRate.miniLR}}</td>
</tr>
</table>
</div>
<div>
<p class="name">하부회원 요율조정</p>
<div class="scroll">
<table class="rolllose2">
<tr>
<th>{{$t('front.common.memId')}}<em>({{$t('front.common.nickName')}})</em></th>
<th>분류</th>
<th v-if="gameCount['casino']">{{$t('front.gnb.casino')}}</th>
<th v-if="gameCount['hc-casino']">{{$t('front.gnb.hotelcasino')}}</th>
<th v-if="gameCount['slot']">{{$t('front.gnb.slot')}}</th>
<th v-if="gameCount['sports']">{{$t('front.gnb.sport')}}</th>
<th v-if="gameCount['mini-game'] || gameCount['mini game']">{{$t('front.gnb.minigame')}}</th>
<!--th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.lose')}}(%)</th>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.lose')}}(%)</th> -->
</tr>
<!--tr>
<th v-if="gameCount['casino']">{{$t('front.gnb.casino')}}</th>
<th v-if="gameCount['hc-casino']">{{$t('front.gnb.hotelcasino')}}</th>
<th v-if="gameCount['slot']">{{$t('front.gnb.slot')}}</th>
<th v-if="gameCount['sports']">{{$t('front.gnb.sport')}}</th>
<th v-if="gameCount['mini-game'] || gameCount['mini game']">{{$t('front.gnb.minigame')}}</th>
<th v-if="gameCount['casino']">{{$t('front.gnb.casino')}}</th>
<th v-if="gameCount['hc-casino']">{{$t('front.gnb.hotelcasino')}}</th>
<th v-if="gameCount['slot']">{{$t('front.gnb.slot')}}</th>
<th v-if="gameCount['sports']">{{$t('front.gnb.sport')}}</th>
<th v-if="gameCount['mini-game'] || gameCount['mini game']">{{$t('front.gnb.minigame')}}</th>
</tr-->
<template v-if="myChildrenRate.length">
<template v-for="item in myChildrenRate" :key="item.memId">
<tr>
<td rowspan="2">{{item.memId}}<em>({{item.memNick}})</em></td>
<th>{{$t('front.stributor.roll')}}(%)</th>
<td v-if="gameCount['casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.casinoPRError}" type="text" v-model="item.casinoPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['hc-casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.hcasinoPRError}" type="text" v-model="item.hcasinoPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['slot']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.slotPRError}" type="text" v-model="item.slotPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['sports']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.sportPRError}" type="text" v-model="item.sportPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['mini-game']">
<!-- <input @change="onChangeChildrenRate(item)" :class="{'error': item.miniPRError}" type="text" v-model="item.miniPR"> -->
<button class="detailSet" @click="toggleDetailSet(item)">세부설정</button>
</td>
<div class="detailSetWrap" v-if="isSelectedRow(item)">
<table>
<tbody>
<tr>
<td rowspan="2" class="tableheadside">일반</td>
<td>롤링</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
<tr>
<td>롤링</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
<tr>
<td rowspan="2" class="tableheadside">조합</td>
<td>루징</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
<tr>
<td>루징</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
</tbody>
</table>
<button class="detailSetSave">저장</button>
<span @click="toggleDetailSet" class="detailClose">×</span>
</div>
</tr>
<tr>
<th>{{$t('front.stributor.lose')}}(%)</th>
<td v-if="gameCount['casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.casinoLRError}" type="text" v-model="item.casinoLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['hc-casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.hcasinoPRError}" type="text" v-model="item.hcasinoLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['slot']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.slotLRError}" type="text" v-model="item.slotLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['sports']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.sportLRError}" type="text" v-model="item.sportLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['mini-game']">
<!-- <input @change="onChangeChildrenRate(item)" :class="{'error': item.miniLRError}" type="text" v-model="item.miniLR"> -->
<button class="detailSet" @click="toggleDetailSetlosing(item)">세부설정</button>
</td>
<div class="detailSetWrap detailLosing" v-if="isSelectedRowlosing(item)">
<table>
<tbody>
<tr>
<td rowspan="2" class="tableheadside">일반</td>
<td>롤링</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
<tr>
<td>롤링</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
<tr>
<td rowspan="2" class="tableheadside">조합</td>
<td>루징</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
<tr>
<td>루징</td>
<td>
<button>최소</button>
<input>
<button>최대</button>
</td>
</tr>
</tbody>
</table>
<button class="detailSetSave">저장</button>
<span @click="toggleDetailSetlosing" class="detailClose">×</span>
</div>
</tr>
</template>
</template>
</table>
</div>
</div>
<p>하부회원의 최대 요율은 상위요율을 넘을 없습니다. 최소요율은 해당회원의 하부 최대 요율보다 낮을 없습니다.</p>
<div class="btnWrap">
<a class="btn" @click="onUpdateChildrenRate">{{$t('front.stributor.save')}}</a>
</div>
</div>
</div>
</div>
</template>
<script>
import {
partnerLevels, retailMemRate, retailMyCalculate, retailUpdate
} from '@/api/retail'
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import RetailMainTable from '@/components/member/stributor/RetailMainTable.vue'
import { getDateStr, thousand } from '@/libs/utils'
import { addDays } from 'date-fns'
import { mapState } from 'vuex'
export default {
name: 'PartnerCash',
components: {
DateFilter,
RetailMainTable,
DateFilterMobile
},
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
])
},
data () {
return {
mainTableDate: {
startDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 23:59:59')
},
reqData: {
searchType: 'OUTER',
chkTodayYn: 'N',
startDate: '',
endDate: '',
offset: -1,
oldYn: 'N'
},
list: [],
pageInfo: {
},
move: false,
make: false,
total: {},
searchType: 'P',
partnerLevelList: [],
partnerLevelObject: null,
myRate: {},
myChildrenRate: [],
selectedRow: null,
selectedRowlosing: null,
detailSet: false
}
},
async created () {
this.emitter.emit('Loading', true)
this.onLoadRate()
this.getPartnerLevels()
this.reqData.startDate = this.mainTableDate.startDate.split(' ')[0]
this.reqData.endDate = this.mainTableDate.endDate.split(' ')[0]
await this.loadMainTable()
this.emitter.emit('Loading', false)
},
methods: {
detailSetOpen () {
this.detailSet = !this.detailSet
},
toggleDetailSet (item) {
if (this.isSelectedRow(item)) {
this.selectedRow = null
} else {
this.selectedRow = item
}
},
isSelectedRow (item) {
return this.selectedRow === item
},
toggleDetailSetlosing (item) {
if (this.isSelectedRow(item)) {
this.selectedRowlosing = null
} else {
this.selectedRowlosing = item
}
},
isSelectedRowlosing (item) {
return this.selectedRowlosing === item
},
onChangeChildrenRate (item) {
const casinoPR = Number(item.casinoPR)
if (casinoPR || casinoPR === 0) {
const maxCasinoPR = Number(item.maxCasinoPR)
const minCasinoPR = Number(item.minCasinoPR)
if (maxCasinoPR < casinoPR || minCasinoPR > casinoPR) {
item.casinoPRError = true
} else {
item.casinoPRError = false
}
}
const hcasinoPR = Number(item.hcasinoPR)
if (hcasinoPR || hcasinoPR === 0) {
const maxHcasinoPR = Number(item.maxHcasinoPR)
const minHcasinoPR = Number(item.minHcasinoPR)
console.log(hcasinoPR, maxHcasinoPR, minHcasinoPR)
if (maxHcasinoPR < hcasinoPR || minHcasinoPR > hcasinoPR) {
item.hcasinoPRError = true
} else {
item.hcasinoPRError = false
}
console.log(item.hcasinoPRError)
}
const slotPR = Number(item.slotPR)
if (slotPR || slotPR === 0) {
const maxSlotPR = Number(item.maxSlotPR)
const minSlotPR = Number(item.minSlotPR)
if (maxSlotPR < slotPR || minSlotPR > slotPR) {
item.slotPRError = true
} else {
item.slotPRError = false
}
}
const miniPR = Number(item.miniPR)
if (miniPR || miniPR === 0) {
const maxMiniPR = Number(item.maxMiniPR)
const minMiniPR = Number(item.minMiniPR)
if (maxMiniPR < miniPR || minMiniPR > miniPR) {
item.miniPRError = true
} else {
item.miniPRError = false
}
}
const casinoLR = Number(item.casinoLR)
if (casinoLR || casinoLR === 0) {
const maxCasinoLR = Number(item.maxCasinoLR)
const minCasinoLR = Number(item.minCasinoLR)
if (maxCasinoLR < casinoLR || minCasinoLR > casinoLR) {
item.casinoLRError = true
} else {
item.casinoLRError = false
}
}
const hcasinoLR = Number(item.hcasinoLR)
if (hcasinoLR || hcasinoLR === 0) {
const maxHcasinoLR = Number(item.maxHcasinoLR)
const minHcasinoLR = Number(item.minHcasinoLR)
if (maxHcasinoLR < hcasinoLR || minHcasinoLR > hcasinoLR) {
item.hcasinoLRError = true
} else {
item.hcasinoLRError = false
}
}
const slotLR = Number(item.slotLR)
if (slotLR || slotLR === 0) {
const maxSlotLR = Number(item.maxSlotLR)
const minSlotLR = Number(item.minSlotLR)
if (maxSlotLR < slotLR || minSlotLR > slotLR) {
item.slotLRError = true
} else {
item.slotLRError = false
}
}
const miniLR = Number(item.miniLR)
if (miniLR || miniLR === 0) {
const maxMiniLR = Number(item.maxMiniLR)
const minMiniLR = Number(item.minMiniLR)
if (maxMiniLR < miniLR || minMiniLR > miniLR) {
item.miniLRError = true
} else {
item.miniLRError = false
}
}
},
async onUpdateChildrenRate () {
const rateList = this.myChildrenRate
console.log(rateList)
for (let i = 0, iLen = rateList.length; i < iLen; i++) {
const item = rateList[i]
if (item.casinoLRError ||
item.casinoPRError ||
item.hcasinoPRError ||
item.hcasinoLRError ||
item.slotLRError ||
item.slotPRError ||
item.miniLRError ||
item.miniPRError
) {
return
}
}
const confirm = await this.onConfirm('front.common.confirmSave')
if (confirm) {
const param = {
siteId: '',
memId: '',
rateList: rateList
}
this.emitter.emit('Loading', true)
retailUpdate(param).then(res => {
this.emitter.emit('Loading', false)
const data = res.data
if (data.resultCode === '0') {
this.onCheck('front.recommender.complete')
this.onLoadRate()
}
})
}
},
onLoadRate () {
retailMemRate({}).then(res => {
const data = res.data
console.log('retailMemRate : ', data)
if (data.resultCode === '0') {
this.myRate = data.data.myCategoryRate
this.myChildrenRate = data.data.botCategoryRateList
}
})
},
thousand,
setOldYn (data) {
this.reqData.oldYn = data
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
onChangeDateTable (value) {
this.reqData.startDate = getDateStr(new Date(value.startDate))
this.reqData.endDate = getDateStr(new Date(value.endDate))
},
async loadMainTable (page) {
if (!page) {
page = 1
}
this.emitter.emit('Loading', true)
const params = {
...this.reqData,
count_per_list: 20,
page: page
}
console.log(params)
this.mainTableDate.startDate = this.reqData.startDate
this.mainTableDate.endDate = this.reqData.endDate
const today = new Date()
if (params.endDate === getDateStr(today)) {
params.chkTodayYn = 'Y'
} else {
params.chkTodayYn = 'N'
}
console.log('[req][retailMyCalculate] : ', params)
await retailMyCalculate(params).then(res => {
console.log('[res][retailMyCalculate] : ', res)
window.scrollTo(0, 0)
const data = res.data
if (data.resultCode === '0') {
this.list = data.data.outSearchList
this.pageInfo = data.data.search
this.total = data.data.outSearchTotal
}
this.emitter.emit('Loading', false)
})
}
}
}
</script>
<style scoped>
.datesearch {margin: 0;}
.searchPTwrap { margin-bottom: 20px; display: flex; gap:20px; align-items: center;}
.searchPTwrap label { font-size: 13px; margin-right: 5px;}
.searchPTwrap input {border-radius: 5px; border: 1px solid #969696; height: 28px; box-sizing: border-box; text-indent: 5px; margin-right: 5px; }
.searchPTwrap input.error {border: 1px solid #cc2121;}
.searchPTwrap .idschbtn {background: #5068d4; border: 0; padding: 6px 8px; border-radius: 8px; vertical-align: middle; height: 28px;}
</style>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,445 @@
<template>
<div class="tab-content" id="PTtab-4" :key="'PTtab-4'" >
<div class="pagenamew">
<h3 class="pagename2">유저{{$t('front.stributor.totalList')}}</h3>
</div>
<div class="searchPTwrap">
<div class="datesearchPT">
<date-filter :retail="true" @search="loadMainTable(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn" />
</div>
<div class="datesearchM">
<date-filter-mobile :retail="true" @search="loadMainTable(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn"
/>
</div>
</div>
<div class="searchPTwrap">
<div class="idsearchwrap">
<select v-model="searchType">
<option value="memId">아이디</option>
<option value="recommenderId">추천인아이디</option>
<!-- <option value="memNick">닉네임</option>-->
</select>
<input v-model="searchId" @keydown.enter="loadMainTable(1)" class="ml5">
<button class="idschbtn" @click="loadMainTable(1)"><img src="../../../assets/img/search.png"></button>
<div class="box-ui-select">
<div class="title">
<span>정렬</span> :
</div>
<select v-model="order">
<option :value="''">번호</option>
<option :value="'betAmt DESC'">베팅금 많은 </option>
<option :value="'betAmt ASC'">베팅금 적은 </option>
<option :value="'betWinAmt desc'">당첨금 많은 </option>
<option :value="'betWinAmt asc'">당첨금 적은 </option>
</select>
</div>
</div>
</div>
<ul class="strbtnPT mb20">
<li>{{$t('front.common.deposit')}}<span>{{thousand(total.userCashIn || 0)}}</span></li>
<li>{{$t('front.common.withdrawal')}}<span>{{thousand(total.userCashOut || 0)}}</span></li>
<li>{{$t('front.common.depositWithdrawal')}}<span>{{thousand(total.userCashResultAmt || 0)}}</span></li>
<li>{{$t('front.stributor.m22')}}<span>{{thousand(total.betAmt || 0)}}</span></li>
<li>{{$t('front.stributor.m23')}}<span>{{thousand(total.betAmtWin || 0)}}</span></li>
<li>{{$t('front.stributor.winlose')}}<span>{{thousand(total.betResultAmt || 0)}}</span></li>
<!--li class="saveBtnPT" @click="move=!move">{{$t('front.stributor.move')}}</li-->
</ul>
<div><retail-main-table v-model:partnerObj=partnerLevelObject :list="list" :mainPageInfo=pageInfo :date="mainTableDate" :table="'main'" @goToMainPage="loadMainTable"/></div>
<div v-if="move" class="moveWrap makeWrap">
<div class="makeWraphead">
<h4>요율조정</h4>
<a @click="move=!move" class="close"><img src="@/assets/img/icon_cancelW.svg" /></a>
</div>
<div class="makeWrapbody">
<div>
<p class="name">내요율</p>
<table class="rolllose">
<!--tr>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.lose')}}(%)</th>
<th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.lose')}}(%)</th>
</tr-->
<tr>
<th></th>
<th v-if="gameCount['casino']">{{$t('front.gnb.casino')}}</th>
<th v-if="gameCount['hc-casino']">{{$t('front.gnb.hotelcasino')}}</th>
<th v-if="gameCount['slot']">{{$t('front.gnb.slot')}}</th>
<th v-if="gameCount['sports']">{{$t('front.gnb.sport')}}</th>
<th v-if="gameCount['minigame'] || gameCount['mini game']">{{$t('front.gnb.minigame')}}</th>
</tr>
<tr>
<th>{{$t('front.stributor.roll')}}(%)</th>
<td v-if="gameCount['casino']">{{myRate.casinoPR}}</td>
<td v-if="gameCount['hc-casino']">{{myRate.hcasinoPR}}</td>
<td v-if="gameCount['slot']">{{myRate.slotPR}}</td>
<td v-if="gameCount['sports']">{{myRate.sportPR}}</td>
<td v-if="gameCount['minigame'] || gameCount['mini game']">{{myRate.miniPR}}</td>
</tr>
<tr>
<th>{{$t('front.stributor.lose')}}(%)</th>
<td v-if="gameCount['casino']">{{myRate.casinoLR}}</td>
<td v-if="gameCount['hc-casino']">{{myRate.hcasinoLR}}</td>
<td v-if="gameCount['slot']">{{myRate.slotLR}}</td>
<td v-if="gameCount['sports']">{{myRate.sportLR}}</td>
<td v-if="gameCount['minigame'] || gameCount['mini game']">{{myRate.miniLR}}</td>
</tr>
</table>
</div>
<div>
<p class="name">하부회원 요율조정</p>
<div class="scroll">
<table class="rolllose2">
<!--tr>
<th rowspan="2">{{$t('front.common.memId')}}</th>
<th rowspan="2">{{$t('front.common.nickName')}}</th>
<th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(gameCount).length">{{$t('front.stributor.lose')}}(%)</th>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(commonCodeByOrder).length">{{$t('front.stributor.lose')}}(%)</th>
</tr -->
<tr>
<th>{{$t('front.common.memId')}}<em>({{$t('front.common.nickName')}})</em></th>
<th>분류</th>
<th v-if="gameCount['casino']">{{$t('front.gnb.casino')}}</th>
<th v-if="gameCount['hc-casino']">{{$t('front.gnb.hotelcasino')}}</th>
<th v-if="gameCount['slot']">{{$t('front.gnb.slot')}}</th>
<th v-if="gameCount['sports']">{{$t('front.gnb.sport')}}</th>
<th v-if="gameCount['minigame'] || gameCount['mini game']">{{$t('front.gnb.minigame')}}</th>
</tr>
<template v-if="myChildrenRate.length">
<template v-for="item in myChildrenRate" :key="item.memId">
<tr>
<td rowspan="2">{{item.memId}}<em>({{item.memNick}})</em></td>
<th>{{$t('front.stributor.roll')}}(%)</th>
<td v-if="gameCount['casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.casinoPRError}" type="text" v-model="item.casinoPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['hc-casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.hcasinoPRErrorcasinoPRError}" type="text" v-model="item.hcasinoPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['slot']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.slotPRError}" type="text" v-model="item.slotPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['sports']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.sportPRError}" type="text" v-model="item.sportPR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['minigame']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.miniPRError}" type="text" v-model="item.miniPR" :disabled="userData.updId == 'royal77'"></td>
</tr>
<tr>
<th>{{$t('front.stributor.lose')}}(%)</th>
<td v-if="gameCount['casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.casinoLRError}" type="text" v-model="item.casinoLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['hc-casino']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.hcasinoPRErrorcasinoPRError}" type="text" v-model="item.hcasinoLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['slot']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.slotLRError}" type="text" v-model="item.slotLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['sports']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.sportLRError}" type="text" v-model="item.sportLR" :disabled="userData.updId == 'royal77'"></td>
<td v-if="gameCount['minigame']"><input @change="onChangeChildrenRate(item)" :class="{'error': item.miniLRError}" type="text" v-model="item.miniLR" :disabled="userData.updId == 'royal77'"></td>
</tr>
</template>
</template>
</table>
</div>
</div>
<p>하부회원의 최대 요율은 상위요율을 넘을 없습니다. 최소요율은 해당회원의 하부 최대 요율보다 낮을 없습니다.</p>
<div class="btnWrap">
<a class="btn" @click="onUpdateChildrenRate">{{$t('front.stributor.save')}}</a>
</div>
</div>
</div>
</div>
</template>
<script>
import {
partnerLevels, retailMemRate, retailMyMemberListByUser, retailUpdate
} from '@/api/retail'
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import RetailMainTable from '@/components/member/stributor/RetailMainTable.vue'
import { getDateStr, thousand } from '@/libs/utils'
import { addDays } from 'date-fns'
import { mapState } from 'vuex'
export default {
name: 'PartnerCash',
components: {
DateFilter,
DateFilterMobile,
RetailMainTable
},
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
])
},
data () {
return {
mainTableDate: {
startDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 23:59:59')
},
reqData: {
searchType: 'OUTER',
chkTodayYn: 'N',
startDate: '',
endDate: '',
offset: -1,
oldYn: 'N',
searchMemId: ''
},
searchType: 'memId',
searchId: '',
list: [],
pageInfo: {
page: 1,
count_per_list: 20,
tatal_list_count: 10
},
move: false,
make: false,
total: {},
partnerLevelList: [],
partnerLevelObject: null,
myRate: {}
}
},
async created () {
this.emitter.emit('Loading', true)
this.onLoadRate()
this.getPartnerLevels()
this.reqData.startDate = this.mainTableDate.startDate.split(' ')[0]
this.reqData.endDate = this.mainTableDate.endDate.split(' ')[0]
await this.loadMainTable()
this.emitter.emit('Loading', false)
},
methods: {
onChangeChildrenRate (item) {
const casinoPR = Number(item.casinoPR)
if (casinoPR || casinoPR === 0) {
const maxCasinoPR = Number(item.maxCasinoPR)
const minCasinoPR = Number(item.minCasinoPR)
if (maxCasinoPR < casinoPR || minCasinoPR > casinoPR) {
item.casinoPRError = true
} else {
item.casinoPRError = false
}
}
const hcasinoPR = Number(item.hcasinoPR)
if (hcasinoPR || hcasinoPR === 0) {
const maxHcasinoPR = Number(item.maxHcasinoPR)
const minHcasinoPR = Number(item.minHcasinoPR)
if (maxHcasinoPR < hcasinoPR || minHcasinoPR > hcasinoPR) {
item.hcasinoPRError = true
} else {
item.hcasinoPRError = false
}
}
const slotPR = Number(item.slotPR)
if (slotPR || slotPR === 0) {
const maxSlotPR = Number(item.maxSlotPR)
const minSlotPR = Number(item.minSlotPR)
if (maxSlotPR < slotPR || minSlotPR > slotPR) {
item.slotPRError = true
} else {
item.slotPRError = false
}
}
const miniPR = Number(item.miniPR)
if (miniPR || miniPR === 0) {
const maxMiniPR = Number(item.maxMiniPR)
const minMiniPR = Number(item.minMiniPR)
if (maxMiniPR < miniPR || minMiniPR > miniPR) {
item.miniPRError = true
} else {
item.miniPRError = false
}
}
const casinoLR = Number(item.casinoLR)
if (casinoLR || casinoLR === 0) {
const maxCasinoLR = Number(item.maxCasinoLR)
const minCasinoLR = Number(item.minCasinoLR)
if (maxCasinoLR < casinoLR || minCasinoLR > casinoLR) {
item.casinoLRError = true
} else {
item.casinoLRError = false
}
}
const hcasinoLR = Number(item.hcasinoLR)
if (hcasinoLR || hcasinoLR === 0) {
const maxHcasinoLR = Number(item.maxHcasinoLR)
const minHcasinoLR = Number(item.minHcasinoLR)
if (maxHcasinoLR < hcasinoLR || minHcasinoLR > hcasinoLR) {
item.hcasinoLRError = true
} else {
item.hcasinoLRError = false
}
}
const slotLR = Number(item.slotLR)
if (slotLR || slotLR === 0) {
const maxSlotLR = Number(item.maxSlotLR)
const minSlotLR = Number(item.minSlotLR)
if (maxSlotLR < slotLR || minSlotLR > slotLR) {
item.slotLRError = true
} else {
item.slotLRError = false
}
}
const miniLR = Number(item.miniLR)
if (miniLR || miniLR === 0) {
const maxMiniLR = Number(item.maxMiniLR)
const minMiniLR = Number(item.minMiniLR)
if (maxMiniLR < miniLR || minMiniLR > miniLR) {
item.miniLRError = true
} else {
item.miniLRError = false
}
}
},
async onUpdateChildrenRate () {
const rateList = this.myChildrenRate
for (let i = 0, iLen = rateList.length; i < iLen; i++) {
const item = rateList[i]
if (item.casinoLRError ||
item.casinoPRError ||
item.hcasinoPRError ||
item.hcasinoLRError ||
item.slotLRError ||
item.slotPRError ||
item.miniLRError ||
item.miniPRError
) {
return
}
}
const confirm = await this.onConfirm('front.common.confirmSave')
if (confirm) {
const param = {
siteId: '',
memId: '',
rateList: rateList
}
retailUpdate(param).then(res => {
const data = res.data
if (data.resultCode === '0') {
this.onCheck('front.recommender.complete')
this.onLoadRate()
}
})
}
},
onLoadRate () {
retailMemRate({}).then(res => {
const data = res.data
if (data.resultCode === '0') {
this.myRate = data.data.myCategoryRate
this.myChildrenRate = data.data.botCategoryRateList
}
})
},
thousand,
setOldYn (data) {
this.reqData.oldYn = data
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
onChangeDateTable (value) {
this.reqData.startDate = getDateStr(new Date(value.startDate))
this.reqData.endDate = getDateStr(new Date(value.endDate))
},
async loadMainTable (page) {
if (!page) {
page = 1
}
this.emitter.emit('Loading', true)
const params = {
...this.reqData,
count_per_list: 20,
page: page
}
if (this.searchId) {
if (this.searchType === 'memId') {
params.searchMemId = this.searchId
} else {
params.searchRecommandId = this.searchId
}
}
this.mainTableDate.startDate = this.reqData.startDate
this.mainTableDate.endDate = this.reqData.endDate
const today = new Date()
if (params.endDate === getDateStr(today)) {
params.chkTodayYn = 'Y'
} else {
params.chkTodayYn = 'N'
}
console.log('[req][retailMyCalculateByUser] : ', params)
await retailMyMemberListByUser(params).then(res => {
console.log('[res][retailMyCalculateByUser] : ', res)
window.scrollTo(0, 0)
const data = res.data
if (data.resultCode === '0') {
this.list = data.data.searchList
this.pageInfo = data.data.pageInfo
this.total = data.data.searchTotal
}
this.emitter.emit('Loading', false)
})
}
}
}
</script>
<style scoped>
.datesearch {margin: 0;}
.searchPTwrap { margin-bottom: 20px; display: flex; gap:20px; align-items: center;}
.searchPTwrap label { font-size: 13px; margin-right: 5px;}
.searchPTwrap input {border-radius: 5px; border: 1px solid #969696; height: 28px; box-sizing: border-box; text-indent: 5px; margin-right: 5px; }
.searchPTwrap .idschbtn {background: #5068d4; border: 0; padding: 6px 8px; border-radius: 8px; vertical-align: middle; height: 28px;}
</style>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,289 @@
<template>
<div class="gap5">
<div class="leftWrap">
<div class="pagenamPT">
<h3 class="pagename2">입금</h3>
</div>
<div class="moneyread">
<h3>{{$t('front.cash.moneyCheckList')}}</h3>
<ul>
<li>{{$t('front.cash.moneyCheckListA')}}</li>
<li>{{$t('front.cash.moneyCheckListB')}}</li>
<li>{{$t('front.cash.moneyCheckListC')}}</li>
<li>{{$t('front.cash.moneyCheckListD')}}</li>
</ul>
</div>
<div class="moneyinfoappli">
<div class="moneyinfo">
<h3 class="applih">{{$t('front.cash.moneyCheckListE')}}</h3>
<p class="applip">{{$t('front.cash.moneyCheckListF')}}</p>
<a class="applibtn" @click="getAcc">{{$t('front.cash.moneyCheckListG')}}</a>
</div>
<div class="moneyinfo">
<ul class="applistep">
<li><em>1</em>{{$t('front.cash.we')}} <strong>{{$t('front.cash.moneyCheckListG')}}</strong>{{$t('front.cash.moneyCheckListH')}}</li>
<li><em>2</em>{{$t('front.cash.moneyCheckListI')}}</li>
<li><em>3</em><strong>{{$t('front.cash.moneyCheckListJ')}}</strong>{{$t('front.cash.moneyCheckListK')}}<strong>{{$t('front.cash.moneyCheckListL')}}</strong>{{$t('front.cash.moneyCheckListM')}}</li>
</ul>
</div>
<div class="appliinputwrap">
<ul class="appliinput">
<li>{{$t('front.cash.moneyHave')}}</li>
<li><span class="numb">{{thousand(userData.cashAmt)}}</span> {{$t('front.common.money')}}</li>
</ul>
<ul class="appliinput">
<li>{{$t('front.cash.moneyInput')}}</li>
<li><input type="text" pattern="[0-9.,]+" class="numb" :placeholder="$t('front.cash.inputNumber')" v-model="setCurrentChargeMoney" :readonly="true" @focus="onFocus">{{$t('front.common.money')}}</li>
</ul>
<ul class="moneybtnwrap ml120">
<li class="one"><a @click="setMoney(10000)">1{{$t('front.cash.manwon')}}</a></li>
<li class="one"><a @click="setMoney(30000)">3{{$t('front.cash.manwon')}}</a></li>
<li class="one"><a @click="setMoney(50000)">5{{$t('front.cash.manwon')}}</a></li>
<li class="two"><a @click="setMoney(100000)">10{{$t('front.cash.manwon')}}</a></li>
<li class="two"><a @click="setMoney(300000)">30{{$t('front.cash.manwon')}}</a></li>
<li class="two"><a @click="setMoney(500000)">50{{$t('front.cash.manwon')}}</a></li>
<li class="thr"><a @click="setMoney(1000000)">100{{$t('front.cash.manwon')}}</a></li>
<li class="four"><a @click="setMoney(0)">{{$t('front.cash.correct')}}</a></li>
</ul>
<div class="applibtns">
<a @click="onSubmit('pc')">{{$t('front.cash.moneyCheckListL')}}</a>
</div>
</div>
</div>
</div>
<div class="rightWrap">
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th>{{$t('front.board.applyDay')}}</th>
<th>{{$t('front.board.processMoney')}}</th>
<th>{{$t('front.board.processBonus')}}</th>
<th>{{$t('front.board.processDay')}}</th>
<th>{{$t('front.board.processState')}}</th>
</tr>
</thead>
<tbody>
<template v-if="cashList.length > 0">
<template v-for="item in cashList" :key="item.cashIdx">
<tr>
<td>{{dateFormat(item.regDate)}}</td>
<td>{{thousand(item.cashAmt)}}</td>
<td>0</td>
<td>{{dateFormat(item.updDate)}}</td>
<td>{{computedCashStatus(item.cashStatus).text}}</td>
</tr>
</template>
</template>
<template v-else>
<tr>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="cashList.length > 0">
<template v-for="item in cashList" :key="item.cashIdx">
<ul>
<li><em>{{$t('front.board.applyDay')}}</em>{{dateFormat(item.regDate)}}</li>
<li><em>{{$t('front.board.processMoney')}}</em>{{thousand(item.cashAmt)}}</li>
<li><em>{{$t('front.board.processBonus')}}</em>0</li>
<li><em>{{$t('front.board.processDay')}}</em>{{dateFormat(item.updDate)}}</li>
<li><em>{{$t('front.board.processState')}}</em>{{computedCashStatus(item.cashStatus).text}}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">{{$t('front.common.notFoundList')}}</li>
</ul>
</template>
</div>
</div>
</div>
<pagination :pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
@goToPage="onCashListSearch" />
</div>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination'
import { getDateStr, getSubDaysDate, thousand } from '@/libs/utils'
import { cashDelete, cashIn } from '@/api/cash'
import store from '@/store'
export default {
name: 'Charge',
components: {
Pagination
},
watch: {
type: function () {
// if (this.type === 'list') {
this.onCashListSearch()
// }
},
setCurrentChargeMoneyStr () {
// this.setCurrentChargeMoneyStr = thousand(this.setCurrentChargeMoneyStr)
},
setCurrentChargeMoney () {
// this.setCurrentChargeMoney = thousand(this.setCurrentChargeMoney)
const parts = this.setCurrentChargeMoney.split('.')
const v = parts[0].replace(/\D/g, '')
const dec = parts[1]
const calcNum = Number((dec !== undefined ? v + '.' + dec : v))
// use this for numeric calculations
console.log('number for calculations: ', calcNum)
let n = new Intl.NumberFormat('en-EN').format(v)
n = dec !== undefined ? n + '.' + dec : n
this.setCurrentChargeMoney = n
}
},
created () {
this.onCashListSearch()
},
data () {
return {
type: 'apply',
setCurrentChargeMoney: '',
isApplyBonus: false,
bonus: 0,
cashList: [],
allChecked: false,
cashType: 'in',
searchDate: {
startDate: getDateStr(getSubDaysDate(new Date(), 2), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(new Date(), 'yyyy-MM-dd 23:59:59')
},
isProcessing: false
}
},
methods: {
async getAcc () {
const title = '계좌문의입니다.'
const content = '계좌문의입니다.'
const params = {
title: title,
content: content,
boardType: 'faq',
category: '',
faqType: 'bankaccount'
}
await this.setSaveAccountBoard(params, async function () {
await this.loadList()
}.bind(this))
},
async onRemoveMsg () {
let checkedCount = 0
this.cashList.forEach(item => {
if (item.checked) {
checkedCount++
}
})
if (checkedCount <= 0) {
this.onCheck('front.cash.noSelectMessage')
return false
}
const confirm = await this.onConfirm('front.cash.confirmDeleteMessage')
if (confirm) {
for (let i = 0, iLen = this.cashList.length; i < iLen; i++) {
const item = this.cashList[i]
if (item.checked) {
cashDelete(item).then(response => {
})
}
}
this.onCheck('front.cash.completeDeleteMessage')
this.onCashListSearch()
}
},
setMoney (value) {
let money = Number(this.setCurrentChargeMoney.replace(/,/g, ''))
if (value) {
money += value
} else {
money = value
}
this.setCurrentChargeMoney = thousand(money)
// this.setCurrentChargeMoney = thousand(this.setCurrentChargeMoney)
},
async onSubmit (device = 'mobile') {
if (this.setCurrentChargeMoney && this.setCurrentChargeMoney !== '0') {
const confirm = await this.onConfirm('front.cash.confirmCharge')
if (confirm) {
if (!this.isProcessing) {
this.isProcessing = true
this.emitter.emit('Loading', true)
const params = {
memId: this.userData.memId,
cashType: 1, // in,
cashStatus: 'in',
cashAmt: this.setCurrentChargeMoney.replace(/,/g, '')
}
cashIn(params).then(response => {
store.dispatch('storeUserData').then(userData => {
}).then(async () => {
console.log(response)
const result = response.data
if (result.resultCode === '0') {
this.emitter.emit('Loading', false)
const confirm = await this.onCheck('front.cash.completeCharge')
if (confirm) {
if (device === 'mobile') {
this.replacePageByName('my')
} else {
location.reload()
}
}
} else {
this.emitter.emit('Loading', false)
const confirm = await this.onCheck('api.' + result.resultCode)
if (confirm) {
if (device === 'mobile') {
this.replacePageByName('my')
} else {
location.reload()
}
}
}
})
}).catch(err => {
this.emitter.emit('Loading', false)
console.error(err)
})
}
}
} else {
this.onAlert('warningart', 'front.cash.emptyPrice')
}
}
}
}
</script>
<style scoped>
</style>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,285 @@
<template>
<div class="gap5">
<div class="leftWrap">
<div class="pagenamPT">
<h3 class="pagename2">출금</h3>
</div>
<div class="moneyread">
<h3>{{$t('front.cash.moneyCheckList')}}</h3>
<ul>
<li>{{$t('front.cash.moneyCheckListN')}}</li>
<li>{{$t('front.cash.moneyCheckListB')}}</li>
<li>{{$t('front.cash.moneyCheckListD')}}</li>
</ul>
</div>
<div class="moneyinfoappli">
<div class="moneyinfo">
<h3 class="applih">{{$t('front.cash.moneyOutInput')}}</h3>
<p class="applip b0 mb0 pb0">{{$t('front.cash.moneyCheckListO')}}</p>
</div>
<div class="appliinputwrap">
<ul class="appliinput">
<li>{{$t('front.cash.haveCash')}}</li>
<li><span class="numb">{{thousand(userData.cashAmt)}}</span>{{$t('front.common.money')}}</li>
</ul>
<ul class="appliinput">
<li>{{$t('front.cash.moneyOutInput')}}</li>
<li><input type="text" class="numb" pattern="[0-9.,]+" :placeholder="$t('front.cash.inputNumber')" v-model="getCurrentChargeMoney" />{{$t('front.common.money')}}</li>
</ul>
<ul class="moneybtnwrap ml120">
<li class="one"><a @click="setMoney(10000)">1{{$t('front.cash.manwon')}}</a></li>
<li class="one"><a @click="setMoney(30000)">3{{$t('front.cash.manwon')}}</a></li>
<li class="one"><a @click="setMoney(50000)">5{{$t('front.cash.manwon')}}</a></li>
<li class="two"><a @click="setMoney(100000)">10{{$t('front.cash.manwon')}}</a></li>
<li class="two"><a @click="setMoney(300000)">30{{$t('front.cash.manwon')}}</a></li>
<li class="two"><a @click="setMoney(500000)">50{{$t('front.cash.manwon')}}</a></li>
<li class="thr"><a @click="setMoney(1000000)">100{{$t('front.cash.manwon')}}</a></li>
<li class="four"><a @click="setMoney(0)">{{$t('front.cash.correct')}}</a></li>
</ul>
<ul class="appliinput">
<li>{{$t('front.cash.withdrawPassword')}}</li>
<li class="bbl"><input type="password" class="numb" :placeholder="$t('front.cash.inputPassword')" v-model="cashOutPass"></li>
</ul>
<div class="applibtns">
<a @click="onSubmit">{{$t('front.cash.moneyCheckListL')}}</a>
</div>
</div>
</div>
</div>
<div class="rightWrap">
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th>{{$t('front.board.applyDay')}}</th>
<th>{{$t('front.board.withdrawMoney')}}</th>
<th>{{$t('front.board.processDay')}}</th>
<th>{{$t('front.board.processState')}}</th>
</tr>
</thead>
<tbody>
<template v-if="cashList.length > 0">
<template v-for="item in cashList" :key="item.cashIdx">
<tr>
<td>{{dateFormat(item.regDate)}}</td>
<td>{{thousand(item.cashAmt)}}</td>
<td>{{dateFormat(item.updDate)}}</td>
<td>{{computedCashStatus(item.cashStatus).text}}</td>
</tr>
</template>
</template>
<template v-else>
<tr>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="cashList.length > 0">
<template v-for="item in cashList" :key="item.cashIdx">
<ul>
<li><em>{{$t('front.board.applyDay')}}</em>{{dateFormat(item.regDate)}}</li>
<li><em>{{$t('front.board.withdrawMoney')}}</em>{{thousand(item.cashAmt)}}</li>
<li><em>{{$t('front.board.processDay')}}</em>{{dateFormat(item.updDate)}}</li>
<li><em>{{$t('front.board.processState')}}</em>{{computedCashStatus(item.cashStatus).text}}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">{{$t('front.common.notFoundList')}}</li>
</ul>
</template>
</div>
</div>
</div>
<div class="boardpage mt20 mb20">
<pagination :pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
@goToPage="onCashListSearch" />
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination'
import { cashDelete, cashOut, gameMoneyToCash } from '@/api/cash'
import store from '@/store'
import { getDateStr, getSubDaysDate, thousand } from '@/libs/utils'
export default {
name: 'Exchange',
components: {
Pagination
},
watch: {
type: function () {
// if (this.type === 'list') {
this.onCashListSearch()
// }
},
getCurrentChargeMoney () {
// this.setCurrentChargeMoney = thousand(this.setCurrentChargeMoney)
const parts = this.getCurrentChargeMoney.split('.')
const v = parts[0].replace(/\D/g, '')
const dec = parts[1]
const calcNum = Number((dec !== undefined ? v + '.' + dec : v))
// use this for numeric calculations
console.log('number for calculations: ', calcNum)
let n = new Intl.NumberFormat('en-EN').format(v)
n = dec !== undefined ? n + '.' + dec : n
console.log(n)
this.getCurrentChargeMoney = n
}
},
created () {
this.onCashListSearch()
},
data () {
return {
type: 'apply',
getCurrentChargeMoney: '',
cashOutPass: '',
allChecked: false,
cashList: [],
cashType: 'out',
searchDate: {
startDate: getDateStr(getSubDaysDate(new Date(), 2), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(new Date(), 'yyyy-MM-dd 23:59:59')
}
}
},
methods: {
async moneyChange () {
if (this.coinAmt && this.coinAmt !== '0') {
const confirm = await this.onConfirm('front.cash.confirmGameMoneyToCash')
if (confirm) {
const params = {
cashAmt: this.coinAmt
}
gameMoneyToCash(params).then(response => {
const result = response.data
if (result.resultCode === '0') {
store.dispatch('storeUserCoinAmt')
store.dispatch('storeUserData')
// this.userData.coinAmt = data.balance
this.onCheck('front.cash.pointToCashComplete')
}
})
}
} else {
this.onCheck('front.cash.emptyGamePoint')
}
},
async onRemoveMsg () {
let checkedCount = 0
this.cashList.forEach(item => {
if (item.checked) {
checkedCount++
}
})
if (checkedCount <= 0) {
this.onCheck('front.cash.noSelectMessage')
return false
}
const confirm = await this.onConfirm('front.cash.confirmDeleteMessage')
if (confirm) {
for (let i = 0, iLen = this.cashList.length; i < iLen; i++) {
const item = this.cashList[i]
if (item.checked) {
cashDelete(item).then(response => {
})
}
}
this.onCheck('front.cash.completeDeleteMessage')
this.onCashListSearch()
}
},
setMoney (value) {
let money = Number(this.getCurrentChargeMoney.replace(/,/g, ''))
if (value) {
if (money + value <= this.userData.cashAmt) {
money += value
} else {
this.onCheck('환전 금액이 현재 보유캐시보다 큽니다.')
}
} else {
money = value
}
this.getCurrentChargeMoney = thousand(money)
},
async onSubmit (device = 'mobile') {
if (!this.userData.outAmtYn || this.userData.outAmtYn === 'N') {
this.onCheck('출금 정지된 상태입니다.')
return false
}
if (!this.cashOutPass) {
this.onCheck('출금 비밀번호를 입력해주세요.')
return false
}
if (this.getCurrentChargeMoney && this.getCurrentChargeMoney !== '0') {
const confirm = await this.onConfirm('front.cash.confirmExchange')
if (confirm) {
const params = {
memId: this.userData.memId,
cashType: -1, // in,
cashStatus: 'out',
cashAmt: this.getCurrentChargeMoney.replace(/,/g, ''),
cashOutPass: this.cashOutPass
}
cashOut(params).then(response => {
store.dispatch('storeUserData').then(userData => {
}).then(async responseInfo => {
const result = response.data
if (result.resultCode === '0') {
const confirm = await this.onCheck('front.cash.completeExchange')
if (confirm) {
if (device === 'mobile') {
this.replacePageByName('my')
} else {
location.reload()
}
}
} else if (result.resultCode === 'C099') {
await this.onAlert('warningart', result.resultMessage)
} else {
await this.onCheck('api.' + result.resultCode)
}
})
}).catch(err => {
console.error(err)
this.onCheck('출금 비밀번호를 확인해주세요.')
})
}
} else {
this.onCheck('front.cash.emptyPrice')
}
}
}
}
</script>
<style scoped>
</style>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,426 @@
<template>
<div class="tab-content" id="PTtab-5" :key="'PTtab-5'">
<div class="pagenamPT">
<h3 class="pagename2">/출금내역</h3>
</div>
<div class="PTsch flex-c">
<div class="datesearchPT flex-c gap-2">
<h4>날짜</h4>
<date-filter :retail="true" @search="loadData(null, 1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn" />
</div>
<div class="datesearchM">
<date-filter-mobile :retail="true" @search="loadData(null, 1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn"
/>
</div>
<div class="searchPT">
<select v-model="reqData.cashType" class="M_w35w">
<option value="" selected>전체</option>
<option value="1">입금</option>
<option value="-1">출금</option>
<option value="2">관리자 지급</option>
<option value="-2">관리자 회수</option>
<option value="33">상위 파트너 지급</option>
<option value="-33">상위 파트너 회수</option>
<option value="4">포인트전환</option>
</select>
<select v-model="reqData.searchType" class="M_w65w">
<option value="memId" selected>아이디</option>
<option value="memNick">닉네임</option>
<option value="recommenderId">상위유저</option>
</select>
<input type="text" :placeholder="$t('front.search.emptySearch')" v-model="reqData.searchWord" class="M_search"/>
<a @click="loadData(null,1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</div>
</div>
<div class="strTableWrap">
<div class="subMemWrap">
<p class="p10"></p>
<ul class="subPT_1">
<h3>하부 파트너 목록
<!-- <a @click="idlist=!idlist">i</a> -->
<span v-if="idlist" @click="idlist=!idlist">아이디 클릭시 목록 출력</span>
</h3>
<!-- <li>
<a>
<span class="box" :class="userData.partnerLevel">{{partnerLevelName(userData.partnerLevel)}}</span>
{{userData.memId}}
</a>
</li> -->
<li v-for="(item1) in partnerList" :key="item1.memId" :class="{'morebar':item1.open}">
<span class="arr" v-if="item1.cnt" :class="[item1.partnerLevel, {'moreOn':item1.open}]" @click="listOpen(item1.memId, 'sub', item1)"></span>
<span class="arr normal" v-if="!item1.cnt"></span>
<a :class="[item1.partnerLevel, { 'active': selectedLi === item1.memId }]" @click="getMyPartnerList(item1.memId, 'sub', item1)">
<span class="box" :class="item1.partnerLevel">본사</span>
{{item1.memId}}
</a>
<ul class="subPT_2" v-show="item1.open && item1.children">
<li v-for="item2 in item1.children" :key="item2.memId" :class="{'morebar':item2.open}">
<span class="arr" v-if="item2.cnt" :class="[item2.partnerLevel,{'moreOn':item2.open}]" @click="listOpen(item2.memId, 'sub', item2)"></span>
<span class="arr normal" v-if="!item2.cnt"></span>
<a :class="[item2.partnerLevel, { 'active': selectedLi === item2.memId }]" @click="getMyPartnerList(item2.memId, 'sub', item2)">
<span class="box" :class="item2.partnerLevel">부본</span>
{{item2.memId}}
</a>
<ul class="subPT_3" v-show="item2.open && item2.children">
<li v-for="item3 in item2.children" :key="item3.memId" :class="{'morebar':item3.open}">
<span class="arr" v-if="item3.cnt" :class="[item3.partnerLevel,{'moreOn':item3.open}]" @click="listOpen(item3.memId, 'sub', item3)"></span>
<span class="arr normal" v-if="!item3.cnt"></span>
<a :class="[item3.partnerLevel, { 'active': selectedLi === item3.memId }]" @click="getMyPartnerList(item3.memId, 'sub', item3)">
<span class="box" :class="item3.partnerLevel">{{partnerLevelName(item3.partnerLevel)}}</span>
{{item3.memId}}
</a>
<ul class="subPT_4" v-show="item3.open && item3.children">
<li v-for="item4 in item3.children" :key="item4.memId" :class="{'morebar':item4.open}">
<span class="arr" v-if="item4.cnt" :class="[item4.partnerLevel,{'moreOn':item4.open}]" @click="listOpen(item4.memId, 'sub', item4)"></span>
<span class="arr normal" v-if="!item4.cnt"></span>
<a :class="[item4.partnerLevel, { 'active': selectedLi === item4.memId }]" @click="getMyPartnerList(item4.memId, 'sub', item4)">
<span class="box" :class="item4.partnerLevel">{{partnerLevelName(item4.partnerLevel)}}</span>
{{item4.memId}}
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- <ul class="subPT_1">
<template v-for="(item1) in partnerList" :key="item1.memId">
<li>
<span v-if="item1.cnt" :class="{'moreOn':item1.children && item1.children.length > 0}" class="arr"></span>
<a :class="[item1.partnerLevel, { 'active': selectedLi === item1.memId }]" @click="getMyPartnerList(item1.memId, 'sub', item1)">
<span class="box" :class="item1.partnerLevel">{{partnerLevelName(item1.partnerLevel)}}</span>
{{item1.memId}}
</a>
<ul class="subPT_2" v-show="item1.open && item1.children">
<template v-for="(item2) in item1.children" :key="item2.memId">
<li>
<span v-if="item2.cnt" :class="{'moreOn':item2.children && item2.children.length > 0}" class="arr"></span>
<a :class="[item2.partnerLevel, { 'active': selectedLi === item2.memId }]" @click="getMyPartnerList(item2.memId, 'sub', item2)">
<span class="box" :class="item2.partnerLevel">{{partnerLevelName(item2.partnerLevel)}}</span>
{{item2.memId}}
</a>
<ul class="subPT_3" v-show="item2.open && item2.children">
<template v-for="(item3) in item2.children" :key="item3.memId">
<li>
<span v-if="item3.cnt" :class="{'moreOn':item3.children && item3.children.length > 0}" class="arr"></span>
<a :class="[item3.partnerLevel, { 'active': selectedLi === item3.memId }]" @click="getMyPartnerList(item3.memId, 'sub', item3)">
<span class="box" :class="item3.partnerLevel">{{partnerLevelName(item3.partnerLevel)}}</span>
{{item3.memId}}
</a>
<ul class="subPT_4" v-show="item3.open && item3.children">
<template v-for="(item4) in item3.children" :key="item4.memId">
<li>
<span v-if="item4.cnt" :class="{'moreOn':item4.children && item4.children.length > 0}" class="arr"></span>
<a :class="[item4.partnerLevel, { 'active': selectedLi === item4.memId }]" @click="getMyPartnerList(item4.memId, 'sub', item4)">
<span class="box" :class="item4.partnerLevel">{{partnerLevelName(item4.partnerLevel)}}</span>
{{item4.memId}}
</a>
</li>
</template>
</ul>
</li>
</template>
</ul>
</li>
</template>
</ul>
</li>
</template>
</ul> -->
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<thead>
<tr>
<th>아이디</th>
<th>닉네임</th>
<th>등급</th>
<th>소속</th>
<th>종류</th>
<!-- <th>상위아이디</th> -->
<th>처리 </th>
<th>처리금액</th>
<th>처리 </th>
<th>신청시각(개발중)</th>
<th>처리시각</th>
</tr>
</thead>
<tbody>
<template v-if="cashList.length > 0">
<template v-for="(item, idx) in cashList" :key="item.updDate + idx">
<tr>
<td>{{item.memId}}</td>
<td><span class="nick">{{item.memNick}}</span></td>
<td>
<span class="box" :class="item.myLevel">{{partnerLevelName(item.myLevel)}}</span>
</td>
<td>
<div class="topwrap">
<select class="h20 upperUser">
<option>(개발중)</option>
<option>(개발중)</option>
<option>(개발중)</option>
</select>
<i class="icon">+</i>
</div>
</td>
<td>{{item.cashDesc}}</td>
<td>{{thousand(item.preCashAmt)}}</td>
<td>{{thousand(item.cashAmt.replace('-', ''))}}</td>
<td>{{thousand(item.cashAmt-(-item.preCashAmt))}}</td>
<td>2024-05-16 16:00:00</td>
<!-- <td>{{item.recommenderId}}</td> 상위아이디 -->
<!-- <td>{{thousand(item.preCashAmt)}}</td> 처리전 보유금 -->
<!-- <td>{{thousand(item.cashAmt.replace('-', ''))}}</td> 처리금액 -->
<!-- <td>{{item.cashDesc}}</td> 종류 -->
<td>{{dateFormatAll(item.updDate)}}</td> <!--처리시각-->
</tr>
</template>
</template>
<template v-else>
<tr>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="cashList.length > 0">
<template v-for="item in cashList" :key="item.updDate">
<ul>
<li><em>아이디</em>{{item.memId}}</li>
<li><em>닉네임</em>{{item.memNick}}</li>
<li><em>상위 아이디</em>{{item.recommenderId}} / {{item.recommenderNick}}</li>
<li><em>처리 보유금</em>{{thousand(item.preCashAmt)}}</li>
<li><em>처리금액</em>{{thousand(item.cashAmt.replace('-', ''))}}</li>
<li><em>종류</em>{{item.cashDesc}}</li>
<li><em>처리시각</em>{{dateFormatAll(item.updDate)}}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">내역 없음</li>
</ul>
</template>
</div>
</div>
</div>
</div>
<pagination v-if="pageInfo"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="goToPage"
/>
</div>
</template>
<script>
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import Pagination from '@/components/ui/Pagination.vue'
import { getDateStr, thousand } from '@/libs/utils'
import { addDays } from 'date-fns'
import { mapState } from 'vuex'
import { partnerLevels, retailMyPartnerCashList, retailMyPartnerDirectList } from '@/api/retail'
import { PARTNER_LEVEL_NAME } from '@/libs/constants'
export default {
name: 'PartnerCash',
components: { DateFilter, DateFilterMobile, Pagination },
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
])
},
data () {
return {
mainTableDate: {
startDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 23:59:59')
},
reqData: {
memId: '',
cashType: '',
searchType: '',
searchWord: '',
startDate: '',
endDate: '',
oldYn: 'N'
},
partnerList: [],
cashList: [],
selectedLi: null,
idlist: false
}
},
async created () {
this.emitter.emit('Loading', true)
this.getPartnerLevels()
this.getMyPartnerList(this.userData.memId)
this.reqData.startDate = getDateStr(new Date(this.mainTableDate.startDate))
this.reqData.endDate = getDateStr(new Date(this.mainTableDate.endDate))
await this.loadData(this.userData.memId)
this.emitter.emit('Loading', false)
},
methods: {
thousand,
goToPage (page) {
this.loadData(this.selectedLi, page)
},
setOldYn (data) {
this.reqData.oldYn = data
},
partnerLevelName (partnerLevel) {
return PARTNER_LEVEL_NAME[partnerLevel]
},
listOpen (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
retailMyPartnerDirectList(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
item.open = !item.open
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getMyPartnerList (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
retailMyPartnerDirectList(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
if (this.selectedLi === memId) {
this.selectedLi = memId
} else {
this.selectedLi = memId
}
this.loadData(memId, 1)
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
onChangeDateTable (value) {
this.reqData.startDate = getDateStr(new Date(value.startDate))
this.reqData.endDate = getDateStr(new Date(value.endDate))
},
async loadData (memId, page) {
if (!page) {
page = this.pageInfo.page
} else {
this.pageInfo.page = page
}
this.emitter.emit('Loading', true)
if (memId) {
this.reqData.memId = memId
}
const params = { ...this.reqData, page: page, count_per_list: 40 }
await retailMyPartnerCashList(params).then(res => {
this.emitter.emit('Loading', false)
console.log('cashlist : ', res)
const data = res.data.data
this.cashList = []
if (data) {
this.cashList = data.list
if (data.pageInfo) {
this.pageInfo = data.pageInfo
} else {
this.pageInfo.page = 1
this.pageInfo.tatal_list_count = 0
}
}
})
}
}
}
</script>
<style src="@/styles/striNew.css"></style>
<style scoped>
.flex-c {
flex-direction: column;
}
.gap-2 {
gap: 2px;
}
@media (max-width: 1000px) {
.strTablescr {width: 100%;}
.strTablePTM ul {padding: 0;}
}
.subPT_1 li {
position: relative;
}
</style>

View File

@@ -0,0 +1,11 @@
<template>
<div class="tab-content">
<h2>대시보드</h2>
</div>
</template>
<script>
export default {
name: 'dashboard'
}
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,163 @@
<template>
<div class="infoedit">
<h1>회원정보 수정</h1>
<p class="myfix"><span class="">{{userData.memNick}}</span>{{$t('front.mypage.infoEdit')}}{{$t('front.mypage.security')}}</p>
<div class="myfixwrap">
<ul class="joinu">
<li>{{$t('front.common.memId')}}</li>
<li class="border">{{userData.memId}}</li>
</ul>
<ul class="joinu">
<li>{{$t('front.common.password')}}</li>
<li><input type="password" placeholder="" v-model="model.memPass"></li>
</ul>
<span class="joinutext">{{$t('front.signup.passwordPlaceholder')}}</span>
<ul class="joinu">
<li>{{$t('front.mypage.passwordOk')}}</li>
<li><input type="password" placeholder="" v-model="model.memPassCheck"></li>
</ul>
<ul class="joinu">
<li>{{$t('front.common.cashOutPass')}}</li>
<li><input type="text" id="cashOutPass" maxlength="4" pattern="[0-9]*" v-model="model.cashOutPass" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" inputmode="numeric" placeholder="" /></li>
</ul>
<span class="joinutext">{{$t('front.signup.cashOutPassPlaceholder')}}</span>
<ul class="joinu">
<li>{{$t('front.mypage.ExchangepasswordOk')}}</li>
<li><input type="text" id="cashOutPassCheck" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" maxlength="4" pattern="[0-9]*" inputmode="numeric" placeholder="" v-model="model.cashOutPassCheck"></li>
</ul>
<div class="editBtn"><a class="" @click="onUpdate">{{$t('front.board.edit')}}</a></div>
</div>
</div>
</template>
<script>
import { isValidOnlyNumber, isValidPassword } from '@/libs/utils'
import { memberUpdate } from '@/api/member'
export default {
name: 'MyPageInfo',
data () {
return {
model: {
memPass: '',
cashOutPass: '',
cashOutPassCheck: '',
memPassCheck: ''
}
}
},
methods: {
isValidate () {
const data = this.model
for (const key of Object.keys(data)) {
const value = data[key]
if (key === 'memPassCheck') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.compareMemPass')
return false
}
}
if (key === 'memPass') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyMemPass')
return false
}
if (!isValidPassword(value) || value.length > 20) {
this.onAlert('warningart', 'api.U102')
return false
}
}
if (key === 'cashOutPassCheck') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyCashOutPass')
return false
}
}
if (key === 'cashOutPass') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyCashOutPass')
return false
}
if (!isValidOnlyNumber(value) || value.toString().length !== 4) {
this.onAlert('warningart', 'api.U103')
return false
}
}
if (data.memPass !== data.memPassCheck) {
this.onAlert('warningart', 'front.member.compareMemPass')
return false
}
if (data.cashOutPass !== data.cashOutPassCheck) {
this.onAlert('warningart', 'front.member.compareCashPassCheck')
return false
}
}
return true
},
onUpdate () {
if (this.isValidate()) {
const param = {
memId: this.userData.memId,
memPass: this.model.memPass,
cashOutPass: this.model.cashOutPass
}
memberUpdate(param).then(response => {
const result = response.data
if (result.resultCode === '0') {
this.onCheck('front.member.completeUpdate')
} else {
this.onCheck('api.' + result.resultCode)
}
this.model = {
memPass: '',
cashOutPass: '',
cashOutPassCheck: ''
}
})
}
}
}
}
</script>
<style scoped>
.infoedit {max-width: 700px;width: 100%;}
#cashOutPass, #cashOutPassCheck {
-webkit-text-security: disc;
}
.infoedit h1 {color:#0f0f0f; font-size: 21px; font-weight: 600; margin-bottom:10px; margin-top: 28px;}
.myfix {font-size: 14px;line-height: 1.5em;color: #000000; font-weight: 600;}
.myfix span {color: #5068d4;}
.myfixwrap {margin-top: 12px;padding: 25px 20px;border-radius: 5px;display: flex;flex-direction: column;gap: 16px; background: #fff;}
.joinu {display: flex;gap: 10px;flex-wrap: wrap;flex-direction: column;}
.joinu li {width: 100%;position: relative;display: flex;align-items: center;font-size: 14px;color: #121212;height: 37px; box-sizing: border-box;}
.joinu li:first-child {width: 150px;justify-content: flex-start; height: 21px; border: 0; font-weight: 600;}
.joinu li.border {border: solid 1px #dadde2;border-radius: 5px; padding-left: 12px;}
.joinutext {font-weight: 600;font-size: 12px;color: #939ba2;padding: 0 0 0 12px;text-align: left;display: block;}
.joinu input {padding: 0 0 0 12px;height: 40px;width: 100%;font-size: 14px;color: #121212;border: solid 1px #dadde2;border-radius: 5px;}
.joinubottom {border: solid 1px #ef6621;border-radius: 3px;padding: 18px 0;display: flex;align-items: center;justify-content: center;gap: 110px;color: #121212;font-size: 14px;color :#ef6621;}
.joinubottom > ul {display: flex;gap: 10px;}
.joinubottom > ul li:first-child {color: #bfbfbf;}
.editBtn {display: flex;justify-content: flex-end;align-items: center;}
.editBtn a {color: #fff;font-size: 14px;display: flex;align-items: center;justify-content: center;width: 92px;height: 32px;border-radius: 3px;background: #5068d4;}
@media (max-width: 1000px) {
.myfixwrap {padding: 15px;gap: 10px;}
.joinu {gap: 10px;}
.joinu li {width: calc(100% - 132px);}
.joinu li:first-child {width: 120px;font-size: 12px;}
.joinutext {font-size: 12px;padding: 0 0 0 130px;}
}
</style>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/subcommon.css"></style>

View File

@@ -0,0 +1,405 @@
<template>
<div class="tab-content" id="PTtab-3" :key="'PTtab-3'" >
<div>
<div class="pagenamPT">
<h3 class="pagename2 w100w">소속회원목록</h3>
</div>
<div class="PTsch">
<select>
<option value="memId" selected>아이디</option>
<option value="memNick">닉네임</option>
<option value="recommenderId">상위유저</option>
</select>
<input type="text" :placeholder="$t('front.search.emptySearch')" v-model="searchMemId"/>
<a @click="getPartnerList(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="9%">
<col width="9%">
<col width="9%">
<col width="10%">
<col width="10%">
<col width="12%">
<col width="12%">
<col width="13%">
<col width="16%">
</colgroup>
<thead>
<tr>
<th>아이디</th>
<th>닉네임</th>
<th>상위 아이디</th>
<th>카지노요율</th>
<th>슬롯요율</th>
<th>보유금</th>
<th>보유포인트</th>
<th>가입 일시</th>
<th>머니 관리</th>
</tr>
</thead>
<tbody>
<tr v-for="(item) in partnerList" :key="item.memId">
<td :class="item.myLevel">{{item.memId}}</td>
<td>{{item.memNick}}</td>
<td>{{item.recommenderId}}</td>
<td>{{item.casinoRate}}</td>
<td>{{item.slotRate}}</td>
<td>{{thousand(item.cashAmt)}}</td>
<td>{{thousand(item.pointAmt)}}</td>
<td>{{dateFormatAll(item.joinDate)}}</td>
<td class="poin">
<a class="btnBlue btn2 btn3" @click="onOpenMoneyPopup(item)">지급/회수</a>
<a class="btnGrn2 btn3" @click="setMoneyMerge(item)">통합머니처리</a>
<div class="loginmodal" v-if="state !== 'ready'"></div>
<div v-if="item.openPopup" class="moneyg">
<h2>금액 입력</h2>
<a class="close" @click="onCloseMoneyPopup(item)"><img src="@/assets/img/icon_cancelB.svg" /></a>
<input type="text" pattern="[0-9.,]+" :placeholder="$t('front.give.moneyInput')" v-model="item.inputCashAmt" @keyup="updateCashAmt(item, $event.target.value)" />
<h3>보유머니: <em>{{thousand(item.cashAmt)}}</em></h3>
<div class="mbtn">
<a @click="setMoney(item, 10000)">1{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 30000)">3{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 50000)">5{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 100000)">10{{$t('front.cash.manwon')}}</a>
</div>
<div class="mbtn">
<a @click="setMoney(item, 300000)">30{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 500000)">50{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 1000000)">100{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 0)" style="background: #dadde2; color: #636971;">{{$t('front.cash.correct')}}</a>
</div>
<div class="submit">
<a class="bgb btn2" @click="memCash('-3', item)">{{$t('front.give.give')}}</a>
<a class="bgr btn2" @click="memCash('3', item)">{{$t('front.give.back')}}</a>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<ul v-for="(item) in partnerList" :key="item.memId">
<li :class="item.myLevel"><em>아이디</em>{{item.memId}}</li>
<li><em>닉네임</em>{{item.memNick}}</li>
<li><em>카지노요율</em>{{item.casinoRate}}</li>
<li><em>슬롯요율</em>{{item.slotRate}}</li>
<li><em>보유금</em>{{thousand(item.cashAmt)}}</li>
<li><em>보유포인트</em>{{thousand(item.pointAmt)}}</li>
<li><em>가입 일시</em>{{dateFormatAll(item.joinDate)}}</li>
<li><em>머니 관리</em>
<a class="bgr btn2 btn3" @click="onOpenMoneyPopup(item)">지급/회수</a>
<a class="bgg btn3" @click="setMoneyMerge(item)">통합머니처리</a>
<div v-if="item.openPopup" class="moneyg">
<a class="close" @click="onCloseMoneyPopup(item)"><img src="@/assets/img/icon_cancelB.svg" /></a>
<h2>보유머니: <span>{{thousand(item.cashAmt)}}</span></h2>
<input type="text" pattern="[0-9.,]+" :placeholder="$t('front.give.moneyInput')" v-model="item.inputCashAmt" @keyup="updateCashAmt(item, $event.target.value)" />
<div class="mbtn">
<a @click="setMoney(item, 10000)">1{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 30000)">3{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 50000)">5{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 100000)">10{{$t('front.cash.manwon')}}</a>
</div>
<div class="mbtn">
<a @click="setMoney(item, 300000)">30{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 500000)">50{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 1000000)">100{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 0)" style="background: #dadde2; color: #636971;">{{$t('front.cash.correct')}}</a>
</div>
<div class="submit">
<a class="bgb btn2" @click="memCash('-3', item)">{{$t('front.give.give')}}</a>
<a class="bgr btn2" @click="memCash('3', item)">{{$t('front.give.back')}}</a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<pagination v-if="pageInfo"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="getPartnerList"
/>
</div>
<transition name="fade">
<TMmodal v-show="TMOpen" :isOpen="TMOpen" :type="'partner'" @close="onCloseTM" :userData="selectMem"/>
</transition>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination.vue'
import {
getRetailMyMemList, partnerLevels, partnerMyMemIds
} from '@/api/retail'
import { thousand } from '@/libs/utils'
import { memCashInOut } from '@/api/give'
import { mapState } from 'vuex'
import { PARTNER_LEVEL_NAME } from '@/libs/constants'
import TMmodal from '@/components/common/TotalMoney.vue'
export default {
name: 'PartnerList',
components: { TMmodal, Pagination },
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
]),
partnerLevelName () {
console.log(this.item.partnerLevel)
return PARTNER_LEVEL_NAME[this.item.partnerLevel]
},
formattedCashAmt () {
if (!this.cashAmt) return ''
return this.cashAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}
},
data () {
return {
searchType: 'N',
searchPartnerLevel: '',
partnerLevelList: [],
partnerList: [],
partnerLevelObject: null,
summaryNew: null,
searchMemId: '',
cashAmt: '',
selectMem: {
cashAmt: ''
},
list: [],
isProcessing: false,
moveTarget: null,
TMOpen: false,
state: 'ready'
}
},
async created () {
this.emitter.emit('Loading', true)
this.getPartnerLevels()
this.getPartnerList(1)
this.emitter.emit('Loading', false)
},
watch: {
selectPartnerCode () {
if (this.selectPartnerCode) {
this.selectMem.cashAmt = ''
this.getMyMemIds()
}
},
selectMem () {
if (this.selectMem) {
this.selectMem.cashAmt = thousand(this.selectMem.cashAmt)
}
}
},
methods: {
thousand,
onOpenMoneyPopup (value) {
this.moveTarget = value
console.log(value)
value.openPopup = true
this.state = 'open'
},
onCloseMoneyPopup (value) {
this.moveTarget = null
value.inputCashAmt = ''
value.openPopup = false
this.state = 'ready'
},
async setMoneyMerge (item) {
console.log(item)
this.selectMem = {
...item
}
const confirmMessage = `<span style="color: #5068d4;">${this.selectMem.memNick}</span>의 통합머니를 전환 처리하시겠습니까?<br><br><span style="font-size: 15px;color: #636971;">통합머니 처리 이후 환전이나 회수를 진행하지 않고 베팅을 하게되면 해당계정이 잠금 처리될 수 있습니다</span>`
const confirmResult = await this.onConfirm(confirmMessage)
if (confirmResult) {
this.TMOpen = true
}
},
onCloseTM () {
this.selectMem = null
this.TMOpen = false
},
parseFormattedValue (value) {
return value.replace(/,/g, '')
},
onChangePartnerLevel (partnerLevel) {
this.searchPartnerLevel = partnerLevel
this.getPartnerList(1)
},
getMyMemIds () {
const params = {
code: this.selectPartnerCode,
masterCode: 'partner'
}
partnerMyMemIds(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.myMemIdsList = result.data.memIds
}
})
},
getPartnerList (page) {
this.emitter.emit('Loading', true)
if (!page) {
page = this.pageInfo.page
}
const params = {
searchMemId: this.searchMemId,
page: page,
partnerLevel: this.searchPartnerLevel,
searchType: this.searchType,
count_per_list: 40
}
console.log('[REQ]getRetailMyMemList : ', params)
getRetailMyMemList(params).then(res => {
console.log('[RES]getRetailMyMemList : ', res.data)
this.emitter.emit('Loading', false)
const result = res.data
if (result.resultCode === '0') {
this.partnerList = result.data.list
this.partnerList.forEach(item => {
item.inputCashAmt = ''
})
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
}
})
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
console.log('partnerLevel : ', result.data)
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
async memCash (type, item) {
const memId = item.memId
const cashStr = item.inputCashAmt
console.log(item)
if (!cashStr) {
await this.onAlert('warningart', 'front.give.moneyInput')
return false
}
if (!memId) {
await this.onAlert('warningart', '회원 아이디를 선택해주세요.')
return false
}
if (!this.isProcessing) {
const cash = Number(cashStr.replace(/,/g, ''))
this.isProcessing = true
const params = {
memId: memId
}
if (type === '-3') {
params.inAmt = cash
} else {
params.outAmt = cash
}
const message = this.$t('front.cash.moneyMoveConfirm', { memNick: memId, cashAmt: cashStr, type: type === '-3' ? '지급' : '회수' })
const confirm = await this.onConfirm(message)
if (confirm) {
this.emitter.emit('Loading', true)
memCashInOut(params, type).then(async response => {
const result = response.data
console.log(result)
this.emitter.emit('Loading', false)
if (result.resultCode === '0') {
if (type === '-3') {
await this.onCheck('지급 완료')
} else {
await this.onCheck('회수 완료')
}
item.inputCashAmt = ''
this.getPartnerList(this.pageInfo.page)
} else {
await this.onAlert('warningart', result.resultMessage)
}
this.state = 'ready'
this.isProcessing = false
})
} else {
this.state = 'ready'
this.isProcessing = false
}
}
},
updateCashAmt (item, value) {
const parts = item.inputCashAmt.split('.')
const v = parts[0].replace(/\D/g, '')
const dec = parts[1]
// const calcNum = Number((dec !== undefined ? v + '.' + dec : v))
let n = new Intl.NumberFormat('en-EN').format(v)
n = dec !== undefined ? n + '.' + dec : n
if (v === '0' || v === '') {
item.inputCashAmt = ''
} else {
item.inputCashAmt = n
}
},
setMoney (item, value) {
const currentMoney = Number(item.inputCashAmt.replace(/,/g, ''))
console.log(currentMoney)
if (value === 0) {
item.inputCashAmt = (value).toString()
} else {
item.inputCashAmt = (currentMoney + value).toString()
}
this.updateCashAmt(item)
}
}
}
</script>
<style scoped src="@/styles/striNew.css"></style>
<style scoped>
.submit {width: 100% !important; margin-top: 5px;}
.submit a {
width: 50% !important;
}
#PTtab-3 .strTablePT a.btn2{
margin-left: 0;
}
@media (max-width: 1000px) {
.strTablePTM li:nth-child(7), .strTablePTM li:nth-child(8){width: 100%;}
}
</style>

View File

@@ -0,0 +1,614 @@
<template>
<div class="tab-content" id="PTtab-7" :key="'PTtab-7'">
<ul class="tablist">
<li class="tabmenu" data-tab="moneytab_2" @click="currentTab = 'moneytab_2'" :class="{'current': currentTab == 'moneytab_2'}">하부머니 지급/회수 내역</li>
<li class="tabmenu" data-tab="moneytab_1" @click="currentTab = 'moneytab_1'" :class="{'current': currentTab == 'moneytab_1'}">하부머니 지급/회수</li>
</ul>
<div id="moneytab_1" :key="'moneytab_1'" class="tab-content" v-if="currentTab == 'moneytab_1'">
<!--div class="pagenamPT">
<h3 class="pagename2">{{$t('front.give.title1')}}</h3>
</div-->
<div id="userMoney">
<ul>
<li>
<h4>하부등급목록</h4>
<select v-model="selectPartnerCode">
<option value="" disabled selected>{{$t('front.give.bottomPatner')}}</option>
<template v-for="item in partnerLevelList" v-bind:key="item.code">
<option :value="item.code">{{item.codeName}}</option>
</template>
</select>
</li>
<li>
<h4>하부등급목록</h4>
<select v-model="selectMem" style="width: 200px">
<option value="" disabled selected>{{$t('front.give.resultIDs')}}</option>
<template v-for="member in myMemIdsList" v-bind:key="member.memId">
<option :value="member">{{member.memId}}({{member.memNick}})</option>
</template>
</select>
</li>
<li class="w100w">
<h4>대상 아이디 보유금</h4>
<input type="text" :placeholder="$t('front.give.targetMoney')" v-model="selectMem.cashAmt" readonly class="w100w"/>
</li>
<li class="w100w">
<h4>금액</h4>
<input type="text" :placeholder="$t('front.give.moneyInput')" :value="formattedCashAmt" @input="cashAmt = parseFormattedValue($event.target.value)" class="w100w"/>
</li>
<li>
<div class="btnWrap2">
<a class="bgb" @click="memCash('-3')">{{$t('front.give.give')}}</a>
<a class="bgr" @click="memCash('3')">{{$t('front.give.back')}}</a>
</div>
</li>
</ul>
</div>
<div class="pagenamPT">
<h3 class="pagename2">현재 접속중인 회원</h3>
</div>
<div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
</colgroup>
<thead>
<tr>
<!-- <th>IDX</th>-->
<th>아이디</th>
<th>닉네임</th>
<th>보유금</th>
<th>로그인 시간</th>
<th>로그인 횟수</th>
</tr>
</thead>
<tbody>
<template v-if="loginMemList.length > 0">
<template v-for="(item) in loginMemList" :key="item.memId">
<tr>
<!-- <td>23</td>-->
<td>{{item.memId}}</td>
<td>{{item.memNick}}</td>
<td>{{thousand(item.cashAmt)}}</td>
<td>{{dateFormatAll(item.loginDt)}}</td>
<td>{{thousand(item.totalLoginCount)}}</td>
<!-- <td>-->
<!-- <a class="bgb btn">{{$t('front.give.give')}}</a>-->
<!-- <a class="bgr btn">{{$t('front.give.back')}}</a>-->
<!-- </td>-->
</tr>
</template>
</template>
<template v-else>
<tr>
<td colspan="6">현재 접속 중인 회원이 없습니다.</td>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="loginMemList.length > 0">
<template v-for="(item) in loginMemList" :key="item.memId">
<ul>
<li><em>아이디</em>{{item.memId}}</li>
<li><em>닉네임</em>{{item.memNick}}</li>
<li><em>보유금</em>{{thousand(item.cashAmt)}}</li>
<li><em>로그인 시간</em>{{dateFormatAll(item.loginDt)}}</li>
<li><em>로그인 횟수</em>{{thousand(item.totalLoginCount)}}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">내역 없음</li>
</ul>
</template>
</div>
</div>
</div>
<pagination v-if="pageInfo"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="loadData"
/>
</div>
</div>
<div id="moneytab_2" :key="'moneytab_2'" class="tab-content" v-if="currentTab == 'moneytab_2'">
<!--div class="pagenamew">
<h3 class="pagename2">{{$t('front.give.title2')}}</h3>
</div-->
<div class="datesearchPT">
<p>{{$t('front.give.date')}}:
<input type="date" :value="searchForm.startDate" @change="onChangeStartDate"/>
<span>~</span>
<input type="date" :value="searchForm.endDate" @change="onChangeEndDate" class="mobile_margin"/>
</p>
<ul>
<li>
받은 아이디: <input type="text" v-model="searchForm.botMemId"/>
</li>
<li>
성공처리여부:
<select v-model="searchForm.cashStatus" class="w183">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'1'">{{$t('front.give.ok')}}</option>
<option :value="'-1'">{{$t('front.give.fail')}}</option>
</select>
</li>
<li>
종류:
<select v-model="searchForm.cashType" class="w183">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'-3'">{{$t('front.give.give')}}</option>
<option :value="'3'">{{$t('front.give.back')}}</option>
</select>
</li>
<li>
<a @click="loadData(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</li>
</ul>
</div>
<div class="datesearchM moveM">
<ul>
<li>
<em>{{$t('front.give.date')}}</em>:
<input type="date" :value="searchForm.startDate" @change="onChangeStartDate" class="mobiledate"/>
<span>~</span>
<input type="date" :value="searchForm.endDate" @change="onChangeEndDate" class="mobile_margin mobiledate"/>
</li>
<li>
<em>받은 아이디</em>: <input type="text" v-model="searchForm.botMemId" class="w183"/>
</li>
<li>
<em>성공처리여부</em>:
<select v-model="searchForm.cashStatus" class="w183">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'1'">{{$t('front.give.ok')}}</option>
<option :value="'-1'">{{$t('front.give.fail')}}</option>
</select>
</li>
<li>
<em>종류</em>:
<select v-model="searchForm.cashType" class="w183">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'-3'">{{$t('front.give.give')}}</option>
<option :value="'3'">{{$t('front.give.back')}}</option>
</select>
</li>
<li class="PTsch">
<a @click="loadData(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</li>
</ul>
</div>
<div class="strTableWrap">
<div class="subMemWrap">
<!-- <p class="p10"></p> -->
<ul class="subPT_1">
<!-- <li>
<a>
<span class="box" :class="userData.partnerLevel">{{partnerLevelName(userData.partnerLevel)}}</span>
{{userData.memId}}
</a>
</li> -->
<h3>하부 파트너 목록<a @click="idlist=!idlist">i</a><span v-if="idlist" @click="idlist=!idlist">아이디 클릭시 목록 출력</span></h3>
<li v-for="(item1) in partnerList" :key="item1.memId" :class="{'morebar':item1.open}">
<span class="arr" v-if="item1.cnt" :class="[item1.partnerLevel, {'moreOn':item1.open}]" @click="listOpen(item1.memId, 'sub', item1)"></span>
<span class="arr normal" v-if="!item1.cnt"></span>
<a :class="[item1.partnerLevel, { 'active': selectedLi === item1.memId }]" @click="getMyPartnerList(item1.memId, 'sub', item1)">
<span class="box" :class="item1.partnerLevel">본사</span>
{{item1.memId}}
</a>
<ul class="subPT_2" v-show="item1.open && item1.children">
<li v-for="item2 in item1.children" :key="item2.memId" :class="{'morebar':item2.open}">
<span class="arr" v-if="item2.cnt" :class="[item2.partnerLevel, {'moreOn':item2.open}]" @click="listOpen(item2.memId, 'sub', item2)"></span>
<span class="arr normal" v-if="!item2.cnt"></span>
<a :class="[item2.partnerLevel, { 'active': selectedLi === item2.memId }]" @click="getMyPartnerList(item2.memId, 'sub', item2)">
<span class="box" :class="item2.partnerLevel">부본</span>
{{item2.memId}}
</a>
<ul class="subPT_3" v-show="item2.open && item2.children">
<li v-for="item3 in item2.children" :key="item3.memId" :class="{'morebar':item3.open}">
<span class="arr" v-if="item3.cnt" :class="[item3.partnerLevel, {'moreOn':item3.open}]" @click="listOpen(item3.memId, 'sub', item3)"></span>
<span class="arr normal" v-if="!item3.cnt"></span>
<a :class="[item3.partnerLevel, { 'active': selectedLi === item3.memId }]" @click="getMyPartnerList(item3.memId, 'sub', item3)">
<span class="box" :class="item3.partnerLevel">{{partnerLevelName(item3.partnerLevel)}}</span>
{{item3.memId}}
</a>
<ul class="subPT_4" v-show="item3.open && item3.children">
<li v-for="item4 in item3.children" :key="item4.memId" :class="{'morebar':item4.open}">
<span class="arr" v-if="item4.cnt" :class="[item4.partnerLevel, {'moreOn':item4.open}]" @click="listOpen(item4.memId, 'sub', item4)"></span>
<span class="arr normal" v-if="!item4.cnt"></span>
<a :class="[item4.partnerLevel, { 'active': selectedLi === item4.memId }]" @click="getMyPartnerList(item4.memId, 'sub', item4)">
<span class="box" :class="item4.partnerLevel">{{partnerLevelName(item4.partnerLevel)}}</span>
{{item4.memId}}
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
</colgroup>
<thead>
<tr>
<th>IDX</th>
<th>받은아이디</th>
<th>닉네임</th>
<th>내용</th>
<th>전송금액</th>
<th>처리 캐시</th>
<th> 보유 캐시</th>
<th>전송일시</th>
<th>처리 여부</th>
<th>비고</th>
</tr>
</thead>
<tbody>
<template v-if="list.length > 0">
<template v-for="(item, index) in list" v-bind:key="item.cashIdx">
<tr>
<td>{{((pageInfo.page-1) * 10) + (index + 1)}}</td>
<td>{{item.botMemId}}</td>
<td>{{item.botMemNick}}</td>
<td class="blc" v-if="item.cashType === '-3'">{{$t('front.give.give')}}</td>
<td class="rdc" v-else>회수</td>
<td :class="{'rdc': item.cashType ==='3', 'blc':item.cashType ==='-3'}">{{thousand(item.cashAmt)}}</td>
<td>{{thousand(item.aftCashAmt)}}</td>
<td>{{thousand(item.preCashAmt)}}</td>
<td>{{dateFormatAll(item.regDate)}}</td>
<td class="blc" v-if="item.cashStatus === '1'">O</td>
<td class="rdc" v-else>X</td>
<td>{{item.memo}}</td>
</tr>
</template>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="list.length > 0">
<template v-for="(item, index) in list" v-bind:key="item.cashIdx">
<ul>
<li><em>IDX</em>{{((pageInfo.page-1) * 10) + (index + 1)}}</li>
<li><em>받은아이디</em>{{item.botMemId}}</li>
<li><em>닉네임</em>{{item.botMemNick}}</li>
<li class="blc" v-if="item.cashType === '-3'"><em>내용</em>{{$t('front.give.give')}}</li>
<li class="rdc" v-else><em>내용</em>회수</li>
<li :class="{'rdc': item.cashType ==='3', 'blc':item.cashType ==='-3'}"><em>전송금액</em>{{thousand(item.cashAmt)}}</li>
<li><em>처리 캐시</em>{{thousand(item.aftCashAmt)}}</li>
<li><em> 보유 캐시</em>{{thousand(item.preCashAmt)}}</li>
<li><em>전송일시</em>{{dateFormatAll(item.regDate)}}</li>
<li class="blc" v-if="item.cashStatus === '1'"><em>처리 여부</em>O</li>
<li class="rdc" v-else><em>처리 여부</em>X</li>
<li><em>비고</em>{{item.memo}}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">내역 없음</li>
</ul>
</template>
</div>
</div>
</div>
</div>
<pagination v-if="pageInfo && currentTab === 'moneytab_2'"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="loadData"
/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination.vue'
import { getCashSendList, memCashInOut } from '@/api/give'
import { getDateStr, getSubDaysDate, thousand } from '@/libs/utils'
import { getRetailMyLoginMem, partnerLevels, partnerMyMemIds, retailMyPartnerDirectList } from '@/api/retail'
import { PARTNER_LEVEL_NAME } from '@/libs/constants'
import { mapState } from 'vuex'
export default {
name: 'PartnerMoneyMove',
components: { Pagination },
data () {
return {
currentTab: 'moneytab_2',
model: {},
selectMemId: '',
selectMem: {
cashAmt: ''
},
cashAmt: '',
list: [],
searchForm: {
topMemId: '',
cashType: '',
cashStatus: '',
botMemId: '',
startDate: getDateStr(getSubDaysDate(new Date(), 7)),
endDate: getDateStr(new Date(), 'yyyy-MM-dd')
},
partnerLevelList: [],
partnerList: [],
selectPartnerCode: '',
myMemIdsList: [],
isProcessing: false,
loginMemList: [],
selectedLi: null,
idlist: false
}
},
watch: {
selectPartnerCode () {
if (this.selectPartnerCode) {
this.selectMem.cashAmt = ''
this.getMyMemIds()
} else {
this.selectMem = {}
this.selectMem.cashAmt = ''
}
},
selectMem () {
if (this.selectMem) {
this.selectMem.cashAmt = thousand(this.selectMem.cashAmt)
}
}
},
computed: {
...mapState([
'userData'
]),
formattedCashAmt () {
if (!this.cashAmt) return ''
return this.cashAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}
},
async created () {
this.getPartnerLevels()
await this.getLoginMember()
this.getMyPartnerList(this.userData.memId)
this.loadData()
},
methods: {
thousand,
partnerLevelName (partnerLevel) {
return PARTNER_LEVEL_NAME[partnerLevel]
},
async getLoginMember () {
const res = await getRetailMyLoginMem()
console.log(res)
const result = res.data
if (result.resultCode === '0') {
this.loginMemList = result.data.loginMemList
}
},
parseFormattedValue (value) {
return value.replace(/,/g, '')
},
getMyMemIds () {
const params = {
code: this.selectPartnerCode,
masterCode: 'partner'
}
partnerMyMemIds(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.myMemIdsList = result.data.memIds
}
})
},
listOpen (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
retailMyPartnerDirectList(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
item.open = !item.open
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getMyPartnerList (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
console.log('[REQ]retailMyPartnerDirectList : ', params)
retailMyPartnerDirectList(params).then(res => {
console.log('[RES]retailMyPartnerDirectList : ', res.data)
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
if (this.selectedLi === memId) {
this.selectedLi = memId
} else {
this.selectedLi = memId
}
this.loadData(1)
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
}
})
},
onChangeStartDate (event) {
const startDate = event.target.value
this.searchForm.startDate = startDate
},
onChangeEndDate (event) {
const endDate = event.target.value
this.searchForm.endDate = endDate
},
loadData (page) {
if (!page) {
page = this.pageInfo.page
}
if (this.selectedLi) {
this.searchForm.topMemId = this.selectedLi
}
const form = JSON.parse(JSON.stringify(this.searchForm))
form.startDate += ' 00:00:00'
form.endDate += ' 23:59:59'
// form.page = page
const params = {
...form,
page: page,
count_per_list: 40
}
this.emitter.emit('Loading', true)
console.log('getCashSendList : ', params)
getCashSendList(params).then(response => {
this.emitter.emit('Loading', false)
console.log('getCashSendList : ', response)
const result = response.data
if (result.resultCode === '0') {
this.list = result.data.list
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
}
})
},
async memCash (type) {
if (!this.cashAmt) {
await this.onAlert('warningart', 'front.give.moneyInput')
return false
}
if (!this.selectMem.memId) {
await this.onAlert('warningart', '회원 아이디를 선택해주세요.')
return false
}
if (!this.isProcessing) {
this.isProcessing = true
const params = {
memId: this.selectMem.memId
}
if (type === '-3') {
params.inAmt = this.cashAmt
if (Number(this.cashAmt) > Number(this.userData.cashAmt)) {
await this.onAlert('warningart', '보유금보다 지급 금액이 큽니다.')
this.isProcessing = false
return false
}
} else {
params.outAmt = this.cashAmt
if (Number(this.cashAmt) > Number(this.selectMem.cashAmt)) {
await this.onAlert('warningart', '보유금보다 회수 금액이 큽니다.')
this.isProcessing = false
return false
}
}
const message = this.$t('front.cash.moneyMoveConfirm', { memNick: this.selectMem.memNick, cashAmt: thousand(this.cashAmt), type: type === '-3' ? '지급' : '회수' })
const confirm = await this.onConfirm(message)
if (confirm) {
this.emitter.emit('Loading', true)
memCashInOut(params, type).then(async response => {
const result = response.data
this.emitter.emit('Loading', false)
if (result.resultCode === '0') {
if (type === '-3') {
this.onCheck('지급 완료')
} else {
this.onCheck('회수 완료')
}
this.selectPartnerCode = ''
this.cashAmt = ''
this.loadData()
} else {
await this.onAlert('warningart', result.resultMessage)
}
this.isProcessing = false
})
} else {
this.isProcessing = false
}
}
}
}
}
</script>
<style scoped src="@/styles/striNew.css"></style>
<style scoped>
.datesearchPT input[type="date"]::-webkit-calendar-picker-indicator{/*background: url(../../../assets/img/PTcalender.svg);display: block;background-repeat: no-repeat;background-size: contain;*/}
.strTablescr {width: 100%;}
@media (max-width: 1000px) {
.strTablescr {width: 100%;}
.strTablePTM ul {padding: 0;}
.strTablePTM ul li:nth-child(4) {
width: 100%;
}
}
</style>

View File

@@ -0,0 +1,339 @@
<template>
<div class="tab-content" id="PTtab-10" :key="'PTtab-10'" >
<div>
<div class="pagenamPT">
<h3 class="pagename2 w100w">접속중인회원</h3>
</div>
<div class="PTsch">
<select>
<option value="memId" selected>아이디</option>
<option value="memNick">닉네임</option>
<option value="recommenderId">상위유저</option>
</select>
<input type="text" :placeholder="$t('front.search.emptySearch')" v-model="searchMemId"/>
<a @click="getPartnerList(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="9%">
<col width="9%">
<col width="12%">
<col width="12%">
<col width="13%">
<col width="16%">
</colgroup>
<thead>
<tr>
<th>아이디</th>
<th>닉네임</th>
<th>보유금</th>
<th>보유포인트</th>
<th>로그인 일시</th>
<th>머니 관리</th>
</tr>
</thead>
<tbody>
<template v-if="loginMemList.length > 0">
<template v-for="(item) in loginMemList" :key="item.memId">
<tr>
<td>{{item.memId}}</td>
<td>{{item.memNick}}</td>
<td>{{thousand(item.cashAmt)}}</td>
<td>{{thousand(item.pointAmt)}}</td>
<td>{{item.loginDt}}</td>
<td class="poin">
<a class="btnRed btn2 btn3" @click="onOpenMoneyPopup(item)">지급/회수</a>
</td>
</tr>
</template>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<ul>
<template v-if="loginMemList.length > 0">
<template v-for="(item) in loginMemList" :key="item.memId">
<li><em>아이디</em>{{item.memId}}</li>
<li><em>닉네임</em>{{item.memNick}}</li>
<li><em>보유금</em>{{thousand(item.cashAmt)}}</li>
<li><em>보유포인트</em>{{thousand(item.pointAmt)}}</li>
<li><em>로그인 일시</em>{{item.loginDt}}</li>
<li><em>머니관리</em>
<a class="bgr btn2 btn3" @click="onOpenMoneyPopup(item)">지급/회수</a>
</li>
</template>
</template>
</ul>
</div>
</div>
</div>
</div>
<div v-if="openMoneyMovePopup" class="moneyg">
<a class="close" @click="onCloseMoneyPopup(moveTarget)"><img src="@/assets/img/icon_cancelB.svg" /></a>
<h2>보유머니: <span>{{thousand(moveTarget.cashAmt)}}</span></h2>
<input type="text" pattern="[0-9.,]+" :placeholder="$t('front.give.moneyInput')" v-model="moveTarget.inputCashAmt" @keyup="updateCashAmt(item, $event.target.value)" />
<div class="mbtn">
<a @click="setMoney(moveTarget, 10000)">1{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(moveTarget, 30000)">3{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(moveTarget, 50000)">5{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(moveTarget, 100000)">10{{$t('front.cash.manwon')}}</a>
</div>
<div class="mbtn">
<a @click="setMoney(moveTarget, 30000)">3{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(moveTarget, 50000)">5{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(moveTarget, 100000)">10{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(moveTarget, 0)" style="background: #730000;">{{$t('front.cash.correct')}}</a>
</div>
<div class="submit">
<a class="bgb btn2" @click="memCash('-3', moveTarget)">{{$t('front.give.give')}}</a>
<a class="bgr btn2" @click="memCash('3', moveTarget)">{{$t('front.give.back')}}</a>
</div>
</div>
</div>
</template>
<script>
import {
getRetailMyMemList, partnerLevels, partnerMyMemIds, getRetailMyLoginMem
} from '@/api/retail'
import { thousand } from '@/libs/utils'
import { memCashInOut } from '@/api/give'
import { mapState } from 'vuex'
import { PARTNER_LEVEL_NAME } from '@/libs/constants'
export default {
name: 'onlineMemberList',
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
]),
partnerLevelName () {
console.log(this.item.partnerLevel)
return PARTNER_LEVEL_NAME[this.item.partnerLevel]
},
formattedCashAmt () {
if (!this.cashAmt) return ''
return this.cashAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}
},
data () {
return {
searchType: 'N',
searchPartnerLevel: '',
partnerLevelList: [],
partnerList: [],
partnerLevelObject: null,
summaryNew: null,
searchMemId: '',
cashAmt: '',
selectMem: {
cashAmt: ''
},
list: [],
isProcessing: false,
moveTarget: null,
loginMemList: [],
openMoneyMovePopup: false
}
},
async created () {
this.emitter.emit('Loading', true)
this.getPartnerLevels()
this.getPartnerList(1)
await this.getLoginMember()
this.emitter.emit('Loading', false)
},
watch: {
selectPartnerCode () {
if (this.selectPartnerCode) {
this.selectMem.cashAmt = ''
this.getMyMemIds()
}
},
selectMem () {
if (this.selectMem) {
this.selectMem.cashAmt = thousand(this.selectMem.cashAmt)
}
}
},
methods: {
thousand,
async getLoginMember () {
const res = await getRetailMyLoginMem()
console.log('getRetailMyLoginMem : ', res)
const result = res.data
if (result.resultCode === '0') {
this.loginMemList = result.data.loginMemList
}
},
onOpenMoneyPopup (value) {
this.moveTarget = value
this.moveTarget.inputCashAmt = ''
this.openMoneyMovePopup = true
},
onCloseMoneyPopup (value) {
this.moveTarget = null
this.openMoneyMovePopup = false
},
parseFormattedValue (value) {
return value.replace(/,/g, '')
},
getMyMemIds () {
const params = {
code: this.selectPartnerCode,
masterCode: 'partner'
}
partnerMyMemIds(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.myMemIdsList = result.data.memIds
}
})
},
getPartnerList (page) {
this.emitter.emit('Loading', true)
if (!page) {
page = this.pageInfo.page
}
const params = {
searchMemId: this.searchMemId,
page: page,
partnerLevel: this.searchPartnerLevel,
searchType: this.searchType,
count_per_list: 40
}
console.log('[REQ]getRetailMyMemList : ', params)
getRetailMyMemList(params).then(res => {
console.log('[RES]getRetailMyMemList : ', res.data)
this.emitter.emit('Loading', false)
const result = res.data
if (result.resultCode === '0') {
console.log(result.list)
this.partnerList = result.data.list
this.partnerList.forEach(item => {
item.inputCashAmt = ''
})
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
}
})
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
console.log('partnerLevel : ', result.data)
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
async memCash (type, item) {
const memId = item.memId
const cashStr = item.inputCashAmt
console.log(item)
if (!cashStr) {
await this.onAlert('warningart', 'front.give.moneyInput')
return false
}
if (!memId) {
await this.onAlert('warningart', '회원 아이디를 선택해주세요.')
return false
}
if (!this.isProcessing) {
const cash = Number(cashStr.replace(/,/g, ''))
this.isProcessing = true
const params = {
memId: memId
}
if (type === '-3') {
params.inAmt = cash
} else {
params.outAmt = cash
}
const message = this.$t('front.cash.moneyMoveConfirm', { memNick: memId, cashAmt: cashStr, type: type === '-3' ? '지급' : '회수' })
const confirm = await this.onConfirm(message)
if (confirm) {
this.emitter.emit('Loading', true)
memCashInOut(params, type).then(async response => {
const result = response.data
console.log(result)
this.emitter.emit('Loading', false)
if (result.resultCode === '0') {
if (type === '-3') {
await this.onCheck('지급 완료')
} else {
await this.onCheck('회수 완료')
}
item.inputCashAmt = ''
this.onCloseMoneyPopup(this.moveTarget)
await this.getLoginMember()
} else {
await this.onAlert('warningart', result.resultMessage)
}
this.isProcessing = false
})
} else {
this.isProcessing = false
}
}
},
updateCashAmt (item, value) {
const parts = item.inputCashAmt.split('.')
const v = parts[0].replace(/\D/g, '')
const dec = parts[1]
let n = new Intl.NumberFormat('en-EN').format(v)
n = dec !== undefined ? n + '.' + dec : n
if (v === '0' || v === '') {
item.inputCashAmt = ''
} else {
item.inputCashAmt = n
}
},
setMoney (item, value) {
const currentMoney = Number(item.inputCashAmt.replace(/,/g, ''))
console.log(currentMoney)
if (value === 0) {
item.inputCashAmt = (value).toString()
} else {
item.inputCashAmt = (currentMoney + value).toString()
}
this.updateCashAmt(item)
}
}
}
</script>
<style scoped src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,781 @@
<template>
<div class="tab-content" id="PTtab-2" :key="'PTtab-2'" >
<div>
<div class="pagenamPT">
<h3 class="pagename2 w100w">하부파트너목록</h3>
</div>
<div class="PTsch">
<input type="text" :placeholder="$t('front.search.emptySearch')" v-model="searchMemId"/>
<a @click="getPartnerList(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
<ul class="btBtnlist">
<li @click="onChangePartnerLevel('')">전체</li>
<template v-for="item in partnerLevelList" :key="item.code">
<template v-if="item.code !== 'NORMAL'">
<li @click="onChangePartnerLevel(item.code)">{{item.codeName}}</li>
</template>
</template>
</ul>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="8%">
<col width="9%">
<col width="7%">
<col width="12%">
<col width="7%">
<col width="7%">
<col width="7%">
<col width="11%">
<col width="11%">
<col width="8%">
<col width="13%">
</colgroup>
<thead>
<tr>
<th>아이디</th>
<th>닉네임</th>
<th>파트너등급</th>
<th>상위아이디/닉네임</th>
<th>카지노요율</th>
<th>호텔카지노요율</th>
<th>슬롯요율</th>
<th>보유금</th>
<th>보유포인트</th>
<th>하부 생성</th>
<th>가입 일시</th>
</tr>
</thead>
<tbody>
<template v-if="partnerList.length > 0">
<tr v-for="item in partnerList" :key="item.memId">
<td :class="item.myLevel">{{item.memId}}</td>
<td>{{item.memNick}}</td>
<td>
<template v-if="item.myLevelName === '총본사'">
<span class="box" :class="item.myLevel">대본</span>
</template>
<template v-else-if="item.myLevelName === '대본사'">
<span class="box" :class="item.myLevel">본사</span>
</template>
<template v-else-if="item.myLevelName === '부본사'">
<span class="box" :class="item.myLevel">부본</span>
</template>
<template v-else>
<span class="box" :class="item.myLevel">{{item.myLevelName}}</span>
</template>
</td>
<td>{{item.recommenderId}}/{{item.recommenderNick}}</td>
<td>{{item.casinoRate}}</td>
<td>{{item.hcasinoRate}}</td>
<td>{{item.slotRate}}</td>
<td>{{thousand(item.cashAmt)}}</td>
<td>{{thousand(item.pointAmt)}}</td>
<td><button class="saveBtnPT" v-if="item.myLevel !== ''" @click="onChangePartnerAddPopupSub(item)">생성</button></td>
<td>{{dateFormatAll(item.joinDate)}}</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="9">내역 없음</td>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="partnerList.length > 0">
<ul v-for="item in partnerList" :key="item.memId">
<li><em>아이디</em><span :class="item.myLevel">{{item.memId}}</span></li>
<li><em>닉네임</em>{{item.memNick}}</li>
<li>
<em>파트너등급</em>
<template v-if="item.myLevelName === '총본사'">
<span class="box" :class="item.myLevel">대본</span>
</template>
<template v-else-if="item.myLevelName === '대본사'">
<span class="box" :class="item.myLevel">본사</span>
</template>
<template v-else-if="item.myLevelName === '부본사'">
<span class="box" :class="item.myLevel">부본</span>
</template>
<template v-else>
<span class="box" :class="item.myLevel">{{item.myLevelName}}</span>
</template>
</li>
<li><em>상위아이디<br />/닉네임</em>{{item.recommenderId}}/{{item.recommenderNick}}</li>
<li><em>카지노요율</em>{{item.casinoRate}}</li>
<li><em>호텔카지노</em>{{item.hcasinoRate}}</li>
<li><em>슬롯요율</em>{{item.slotRate}}</li>
<li><em>보유금</em>{{thousand(item.cashAmt)}}</li>
<li><em>보유포인트</em>{{thousand(item.pointAmt)}}</li>
<li><em>가입 일시</em>{{dateFormatAll(item.joinDate)}}</li>
</ul>
</template>
<template v-else>
<ul>
<li class="nodata">내역 없음</li>
</ul>
</template>
</div>
</div>
</div>
<pagination v-if="pageInfo"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="getPartnerList"
/>
<!------------------------------------------------------------------------------->
</div>
<div v-if="makesub" class="moveWrap2">
<div class="tabmenu_make moveWraphead">
<ul>
<li @click="currentTab = 'makeTab1'" :class="{'current': currentTab == 'makeTab1'}" v-if="newPartner.partnerLevel !== 'PTN_5'">파트너</li>
<li @click="currentTab = 'makeTab2'" v-if="isMemberMake(newPartner.partnerLevel)" :class="{'current': currentTab == 'makeTab2'}">회원</li>
</ul>
<a class="close" @click="onChangePartnerAddPopupSub"><img src="@/assets/img/icon_cancel.png" /></a>
</div>
<div class="tabcont_make moveWrapbody" v-if="currentTab == 'makeTab1' && newPartner.partnerLevel !== 'PTN_5'">
<h4>파트너 생성</h4>
<table class="part">
<colgroup>
<col width="20%"/>
<col width="30%"/>
<col width="20%"/>
<col width="30%"/>
</colgroup>
<tr>
<th>아이디</th>
<td><input class="in" name="newMemId" type="text" v-model="newPartner.memId" autocomplete="off" role="presentation"/></td>
<th>비밀번호</th>
<td><input class="in" name="newMemPass" type="password" v-model="newPartner.memPass" autocomplete="off"/></td>
</tr>
<tr>
<th>닉네임</th>
<td><input class="in" type="text" v-model="newPartner.memNick" /></td>
<th>출금 비밀번호</th>
<td><input class="in password" pattern="[0-9]*" type="text" v-model="newPartner.cashOutPass" /></td>
</tr>
<tr>
<th>추천인 아이디</th>
<td>{{newPartner.recommenderId}}({{newPartner.partnerLevelName}})</td>
<th>계좌정보</th>
<td class="accountInfo">
<bank-list :className="'in'" @onChange="onChangeBank"></bank-list>
<input class="in w45w" type="text" v-model="newPartner.bankAcc"/>
</td>
</tr>
<tr>
<th>이름</th>
<td><input class="in" type="text" v-model="newPartner.memName" /></td>
<th>전화번호</th>
<td><input class="in" type="text" v-model="newPartner.memPhone" /></td>
</tr>
</table>
<h4>게임별 요율설정</h4>
<table>
<tr>
<th :colspan="Object.keys(newPartner.rateGroup).length">{{$t('front.stributor.roll')}}(%)</th>
<th :colspan="Object.keys(newPartner.rateGroup).length">{{$t('front.stributor.lose')}}(%)</th>
</tr>
<tr>
<th v-for="(item, key) in newPartner.rateGroup" v-bind:key="item">
{{$t(`front.gnb.${key}`)}}
</th>
<th v-for="(item, key) in newPartner.rateGroup" v-bind:key="item">
{{$t(`front.gnb.${key}`)}}
</th>
</tr>
<tr>
<td v-for="(item) in newPartner.rateGroup" v-bind:key="item">
<a class="rbnt">최대값 : {{item.maxPointRate}}</a><br>
<a class="rbnt">최소값 : {{item.minPointRate}}</a>
</td>
<td v-for="(item) in newPartner.rateGroup" v-bind:key="item">
<a class="rbnt">최대값 : {{item.maxLoseRate}}</a><br>
<a class="rbnt">최소값 : {{item.minLoseRate}}</a>
</td>
</tr>
<tr>
<td v-for="(item, key) in newPartner.rateGroup" v-bind:key="item">
<input type="text" v-model="item[`${key}PR`]">
</td>
<td v-for="(item, key) in newPartner.rateGroup" v-bind:key="item">
<input type="text" v-model="item[`${key}LR`]">
</td>
</tr>
</table>
<a class="btn" @click="onAddPartnerSubmit">등록</a>
</div>
<div class="tabcont_make moveWrapbody" v-if="currentTab == 'makeTab2'">
<h4>회원 생성</h4>
<table class="part">
<colgroup>
<col width="20%"/>
<col width="30%"/>
<col width="20%"/>
<col width="30%"/>
</colgroup>
<tr>
<th>아이디</th>
<td><input class="in" type="text" autocomplete="off" v-model="newMember.memId"/></td>
<th>출금 비밀번호</th>
<td><input class="in password" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" type="text" maxlength="4" pattern="[0-9]*" v-model="newMember.cashOutPass" inputmode="numeric" /></td>
</tr>
<tr>
<th>비밀번호</th>
<td><input class="in" type="password" autocomplete="off" v-model="newMember.memPass"/></td>
<th>전화번호</th>
<td><input class="in" type="text" v-model="newMember.memPhone"/></td>
</tr>
<tr>
<th>닉네임</th>
<td><input class="in" type="text" v-model="newMember.memNick"/></td>
<th>추천인 아이디</th>
<td>{{newPartner.recommenderId}}({{newPartner.partnerLevelName}})
<input class="in" type="hidden" v-model="newMember.recommenderId"/>
</td>
</tr>
<tr>
<th>이름</th>
<td><input class="in" type="text" v-model="newMember.memName"/></td>
<th>계좌정보</th>
<td class="accountInfo">
<bank-list :className="'in'" @onChange="onChangeBankMember"></bank-list>
<input class="in w45w" type="text" v-model="newMember.bankacc" oninput="this.value = this.value.replace(/[^0-9.]/g, '')" />
</td>
</tr>
</table>
<a class="btn" @click="newMemberSignup()">등록</a>
</div>
</div>
</div>
</template>
<script>
import {
partnerLevels, retailMyPartnerList, partnerJoin, partnerRates, getRetailSummary
} from '@/api/retail'
import Pagination from '@/components/ui/Pagination.vue'
import {
isValidOnlyNumber,
isValidOnlyPhoneNumber,
isValidPassword,
isValidPasswordPartner,
isValidUserId,
thousand
} from '@/libs/utils'
import { mapState } from 'vuex'
import BankList from '@/components/ui/BankList.vue'
import { PARTNER_LEVEL_NAME } from '@/libs/constants'
import { signUp } from '@/api/member'
export default {
name: 'PartnerList',
components: {
Pagination,
BankList
},
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
]),
partnerLevelName () {
console.log(this.item.partnerLevel)
return PARTNER_LEVEL_NAME[this.item.partnerLevel]
}
},
data () {
return {
makesub: false,
summary: {},
rate: {},
currentTab: 'makeTab1',
searchType: 'P',
searchPartnerLevel: '',
partnerLevelList: [],
partnerList: [],
partnerLevelObject: null,
summaryNew: null,
searchMemId: '',
myRate: {},
myChildrenRate: [],
newPartner: {
memId: '',
memPass: '',
memNick: '',
memPhone: '',
bank: '',
bankAcc: '',
cashOutPass: '',
rateGroup: {}
},
newMember: {
memId: '',
memPass: '',
memNick: '',
memPhone: '',
bank: '',
bankAcc: '',
cashOutPass: '',
memLevel: '1',
partSendYn: 'N',
firstBetConfYn: 'N',
memStatus: 0
},
defaultNewPartner: {
memId: '',
memPass: '',
memNick: '',
memPhone: '',
bank: '',
bankAcc: '',
cashOutPass: '',
rateGroup: {}
},
defaultMember: {
memId: '',
memPass: '',
memNick: '',
memPhone: '',
bank: '',
bankAcc: '',
cashOutPass: '',
memLevel: '1',
partSendYn: 'N',
firstBetConfYn: 'N',
memStatus: 0
},
rateMaxMinList: [],
newPartnerLevel: {}
}
},
async created () {
this.emitter.emit('Loading', true)
this.getPartnerLevels()
this.getSummary()
this.rateMaxMinList = await this.getPartnerRateForNewPartner()
await this.getPartnerList(1)
this.newPartnerLevel = this.partnerLevelList[0]
this.emitter.emit('Loading', false)
},
watch: {
'newPartner.partnerLevel': function (newLevel) {
if (newLevel === 'PTN_5') {
this.currentTab = 'makeTab2'
}
}
},
methods: {
thousand,
isMemberSignupValidate () {
const data = this.newMember
for (const key of Object.keys(data)) {
const value = data[key]
if (key === 'memId') {
if (value === '') {
this.onAlert('warningart', 'front.member.emptyMemId')
return false
}
if (!isValidUserId(value)) {
this.onAlert('warningart', 'api.U101')
return false
}
}
if (key === 'memPass') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyMemPass')
return false
}
if (!isValidPassword(value) || value.length > 20) {
this.onAlert('warningart', 'api.U102')
return false
}
}
if (key === 'cashOutPass') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyCashOutPass')
return false
}
if (!isValidOnlyNumber(value) || value.length !== 4) {
this.onAlert('warningart', 'api.U103')
return false
}
}
if (key === 'memNick') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyMemName')
return false
}
if (value.length > 20 || value.length < 3) {
this.onAlert('warningart', 'api.U105')
return false
}
}
if (key === 'memPhone') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyMemTel')
return false
}
if (!isValidOnlyPhoneNumber(value)) {
this.onAlert('warningart', 'front.member.noValidMemTel')
return false
}
}
if (key === 'recommenderId') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyRecommenderId')
return false
}
}
if (key === 'bank') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyBankName')
return false
}
}
if (key === 'memName') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyBankAccountName')
return false
}
}
if (key === 'bankacc') {
if (data[key] === '') {
this.onAlert('warningart', 'front.member.emptyBankNumber')
return false
}
if (!isValidOnlyNumber(value)) {
this.onAlert('warningart', 'front.member.noValidBankNumber')
return false
}
}
}
return true
},
newMemberSignup () {
this.newMember.recommenderId = this.newPartner.recommenderId
if (this.isMemberSignupValidate()) {
this.newMember.memPhone = this.newMember.memPhone.toString()
signUp(this.newMember).then(async response => {
const result = response.data
if (result.resultCode === '0') {
await this.onCheck('front.member.completeSignup')
this.makesub = false
this.newMember = {
...this.defaultMember
}
} else {
this.onAlert('warningart', 'api.' + result.resultCode)
}
}).catch(err => {
console.error('singup err : ', err)
})
}
},
async onChangePartnerAddPopupSub (currentPartner) {
console.log(currentPartner)
if (!this.isMemberMake(currentPartner.myLevel)) {
this.currentTab = 'makeTab1'
}
this.makesub = !this.makesub
if (this.makesub) {
console.log(this.rateMaxMinList)
const list = await this.getPartnerRateForNewPartner(currentPartner.memId)
console.log(list)
this.newPartner.recommenderId = currentPartner.memId
this.newPartner.partnerLevel = currentPartner.myLevel
this.newPartner.partnerLevelName = currentPartner.myLevelName
for (let i = 0; i < list.length; i++) {
const item = list[i]
const vendorCode = item.vendorCode
let groupCode = this.commonCodeByCode[vendorCode].groupCode
const groupCodeName = this.commonCodeByCode[vendorCode].groupCodeName
if (groupCode === 'minigame') {
groupCode = 'mini'
}
if (groupCode === 'casino' && groupCodeName.indexOf('HC-') > -1) {
groupCode = 'hcasino'
}
if (groupCode) {
this.newPartner.rateGroup[groupCode] = {
...item
}
this.newPartner.rateGroup[groupCode][`${groupCode}PR`] = '0.0'
this.newPartner.rateGroup[groupCode][`${groupCode}LR`] = '0.0'
}
console.log(groupCode)
}
}
},
getPartnerRateForNewPartner (memId) {
const params = {}
if (memId) {
params.memId = memId
} else {
params.memId = this.userData.memId
}
console.log('[REQ]/api/retail/partnerRates : ', params)
return partnerRates(params).then(res => {
console.log('[RES]/api/retail/partnerRates : ', res)
const result = res.data
if (result.resultCode === '0') {
const list = result.data.rateMaxMinList
// this.rateMaxMinList = list
return list
}
})
},
onChangePartnerLevel (partnerLevel) {
this.searchPartnerLevel = partnerLevel
this.getPartnerList(1)
},
getPartnerList (page) {
if (!page) {
page = this.pageInfo.page
}
const params = {
page: page,
searchMemId: this.searchMemId,
partnerLevel: this.searchPartnerLevel,
searchType: this.searchType,
count_per_list: 40
}
console.log('[REQ]getRetailMyMemList : ', params)
return retailMyPartnerList(params).then(res => {
console.log('[RES]getRetailMyMemList : ', res.data)
const result = res.data
if (result.resultCode === '0') {
console.log(result.list)
this.partnerList = result.data.list
this.pageInfo = result.data.pageInfo
}
})
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
console.log('partnerLevel : ', result.data)
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
console.log(partnerObj)
this.partnerLevelObject = partnerObj
}
})
},
onAddPartnerSubmit () {
this.emitter.emit('Loading', true)
const reqData = { ...this.newPartner, rateGroup: {} }
for (const groupCode in this.newPartner.rateGroup) {
const item = this.newPartner.rateGroup[groupCode]
const pr = item[`${groupCode}PR`]
if (pr) {
if (Number(item.maxPointRate) < Number(pr) || Number(item.minPointRate) > Number(pr)) {
this.onAlert('warningart', `front.stributor.${groupCode}RollingError`)
this.emitter.emit('Loading', false)
return false
}
} else {
this.onAlert('warningart', `front.stributor.${groupCode}RollingError`)
this.emitter.emit('Loading', false)
return false
}
const lr = item[`${groupCode}LR`]
if (lr) {
if (Number(item.maxLoseRate) < Number(lr) || Number(item.minLoseRate) > Number(lr)) {
this.onAlert('warningart', `front.stributor.${groupCode}LoseError`)
this.emitter.emit('Loading', false)
return false
}
} else {
this.onAlert('warningart', `front.stributor.${groupCode}LoseError`)
this.emitter.emit('Loading', false)
return false
}
reqData.rateGroup[`${groupCode}PR`] = pr
reqData.rateGroup[`${groupCode}LR`] = lr
}
if (!reqData.memId) {
this.onAlert('warningart', 'front.member.emptyMemId')
this.emitter.emit('Loading', false)
return false
}
if (!isValidUserId(reqData.memId)) {
this.onAlert('warningart', 'api.U101')
this.emitter.emit('Loading', false)
return false
}
if (!reqData.memPass) {
this.onAlert('warningart', 'front.member.emptyMemPass')
this.emitter.emit('Loading', false)
return false
}
if (!isValidPasswordPartner(reqData.memPass) || reqData.memPass.length > 20) {
this.onAlert('warningart', 'api.U102')
this.emitter.emit('Loading', false)
return false
}
if (!reqData.memNick) {
this.onAlert('warningart', 'front.member.emptyMemNick')
this.emitter.emit('Loading', false)
return false
}
if (!reqData.cashOutPass) {
this.onAlert('warningart', 'front.member.emptyCashOutPass')
this.emitter.emit('Loading', false)
return false
}
if (!reqData.bank) {
this.onAlert('warningart', 'front.member.emptyBankName')
this.emitter.emit('Loading', false)
return false
}
if (!reqData.bankAcc) {
this.onAlert('warningart', 'front.member.emptyBankNumber')
this.emitter.emit('Loading', false)
return false
}
if (!reqData.memName) {
this.onAlert('warningart', 'front.member.emptyMemName')
this.emitter.emit('Loading', false)
return false
}
if (!reqData.memPhone) {
this.onAlert('warningart', 'front.member.emptyMemTel')
this.emitter.emit('Loading', false)
return false
}
return partnerJoin(reqData).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.onCheck('하위파트너 생성신청이 완료되었습니다. 관리자에서 승인되면 가입처리가 완료됩니다.')
this.onChangePartnerAddPopupSub()
this.newPartner = { ...this.defaultNewPartner }
this.getPartnerList(1)
this.emitter.emit('Loading', false)
} else {
console.log(res)
this.emitter.emit('Loading', false)
this.onAlert('warningart', result.resultMessage)
}
})
},
onChangeBank (value) {
this.newPartner.bank = value
},
onChangeBankMember (value) {
this.newMember.bank = value
},
getSummary () {
getRetailSummary({}).then(response => {
const data = response.data
if (data.resultCode === '0') {
this.summary = data.data.summary
this.summaryNew = data.data.summaryNew
}
})
}
}
}
</script>
<style scoped>
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
} /* 위아래버튼 삭제 */
.PTN_1 { color: #b10000; }
.PTN_2 { color: #d86800; }
.PTN_3 { color: #c4a600; }
.PTN_4 { color: #00a53f; }
.PTN_5 { color: #4668ff; }
.NORMAL { color: #8f5fff; }
.box {display: inline-block; }
.PTN_1.box {background: #5068d4;color: #fff; padding: 5px 4px;border-radius: 3px;}
.PTN_2.box {background: #42b182;color: #fff; padding: 5px 4px;border-radius: 3px;}
.PTN_3.box {background: #c63d40;color: #fff; padding: 5px 4px;border-radius: 3px;}
.PTN_4.box {background: #edb838;color: #fff; padding: 5px 4px;border-radius: 3px;}
.PTN_5.box {background: #4293ad;color: #fff; padding: 5px 4px;border-radius: 3px;}
.NORMAL.box {background: #636971;color: #fff; padding: 5px 4px;border-radius: 3px;}
.datesearchPT input[type="date"]::-webkit-calendar-picker-indicator{background: url(../../../assets/img/PTcalender.svg);display: block;background-repeat: no-repeat;background-size: contain;}
.moveWrap2 {position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);background: #fff;z-index: 5;font-family: 'NanumGothic';box-shadow: 0 0 10px 1px #ddd;}
.moveWrap2 .close {position: absolute;right: 50px;top: 18px; cursor: pointer;}
.moveWrap2 .close img {height: 35px;}
.moveWraphead { padding: 20px 50px; background:#575C68; color: #fff; font-size: 18px; }
.moveWrapbody { padding: 0 50px 20px; }
.moveWrap2 h4 {font-size: 16px;font-weight: bold;margin: 40px 0 18px;position: relative;color: #575C68;}
.moveWrap2 table {width: 800px;text-align: center;}
.moveWrap2 th {height: 40px;background: #828793; border: solid 1px #DDDEE2;color: #fff;vertical-align: middle;}
.moveWrap2 table tr:nth-child(2) th { background:#EEF0F5; color: #575C68; }
.moveWrap2 .scroll table tr:nth-child(2) th { background:#828793; color: #fff;}
.moveWrap2 td {height: 40px;background: #FBFCFD;vertical-align: middle;border: solid 1px #EEF0F5;white-space: nowrap;color: #575C68;overflow: hidden;text-overflow: ellipsis;position: relative;}
.moveWrap2 input {width: 50px;border: 1px solid #0000F0;background: #fff;border-radius: 3px;color: #575C68;text-align: center;}
.moveWrap2 input.in {width: 90%;height: 28px;}
.moveWrap2 input.in.password {-webkit-text-security: disc;-moz-webkit-text-security: disc;-moz-text-security: disc;}
.moveWrap2 .accountInfo input.in { width: 54%; }
.moveWrap2 .accountInfo input.in.w45w {width: 45%;}
.moveWrap2 select.in {width: 80px;height: 28px;border: 1px solid #60452a;background: #fff;color: #575C68;margin-right: 5px;}
.moveWrap2 p {margin-top: 25px;color: #2A40B9;font-size: 12px;text-align: right;}
.moveWrap2 a.btn {margin-top: 25px;background: #2F4DF2;font-size: 16px;padding: 0 55px;height: 35px;color: #fff;line-height: 35px;text-align: center;border-radius: 5px;display: inline-block;margin-bottom: 18px;float: right;}
/* .tabmenu_make { width: } */
.tabmenu_make > ul {display: flex; gap: 10px; }
.tabmenu_make > ul li {border: 1px solid; border-radius: 10px; padding: 8px 15px; cursor: pointer; }
.tabmenu_make > ul li.current {background: #fff;color: #575C68;}
@media (max-width: 1000px) {
.strTablePTM li:nth-child(10), .strTablePTM li:nth-child(4) {width: 100%;}
}
</style>
<style scoped src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,552 @@
<template>
<div class="tab-content" id="PTtab-11" :key="'PTtab-11'" >
<div>
<div class="pagenamPT">
<h3 class="pagename2 w100w">요율설정</h3>
</div>
<p class="rateTxt">하부회원의 최대 요율은 상위요율을 넘을 없습니다. 최소요율은 해당회원의 하부 최대 요율보다 낮을 없습니다.</p>
<div class="pagenamPT2">
<h3> 요율</h3>
</div>
<div class="strTablescr top">
<div class="strTablePC">
<table class="strTablePT" v-if="myRateInfo">
<colgroup>
<col width="">
</colgroup>
<thead>
<tr>
<th></th>
<template v-for="cate in myRateInfo" :key="cate.cateCode">
<template v-if="cate.cateCodeName === 'HC-카지노'">
<th>호텔카지노</th>
</template>
<template v-else>
<th>{{ cate.cateCodeName }}</th>
</template>
</template>
</tr>
</thead>
<tbody>
<tr>
<th>롤링(%)</th>
<template v-for="cate in myRateInfo" :key="cate.cateCode">
<td>{{ cate.pointRate }}</td>
</template>
</tr>
<tr>
<th>루징(%)</th>
<template v-for="cate in myRateInfo" :key="cate.cateCode">
<td>{{ cate.loseRate }}</td>
</template>
</tr>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<ul>
<template v-for="cate in myRateInfo" :key="cate.cateCode">
<template v-if="cate.cateCodeName === 'HC-카지노'">
<li>
<em>호텔카지노 롤링</em>
<span>{{ cate.pointRate }}</span>
</li>
<li>
<em>호텔카지노 루징</em>
<span>{{ cate.loseRate }}</span>
</li>
</template>
<template v-else>
<li>
<em>{{ cate.cateCodeName }} 롤링</em>
<span>{{ cate.pointRate }}</span>
</li>
<li>
<em>{{ cate.cateCodeName }} 루징</em>
<span>{{ cate.loseRate }}</span>
</li>
</template>
</template>
</ul>
</div>
</div>
</div>
<div class="pagenamPT2">
<h3>하부 요율</h3>
</div>
<div class="strTablescr bottom">
<div class="strTablePC">
<div class="strTablePTIn">
<table class="strTablePT tableA" v-if="bottomRateList">
<thead>
<tr>
<th rowspan="2">아이디</th>
<th rowspan="2">닉네임</th>
<th rowspan="2">파트너등급</th>
</tr>
</thead>
<tbody>
<template v-for="item in bottomRateList" :key="item.memId">
<tr>
<td><div>{{ item.memId }}</div></td>
<td><div>{{ item.memNick }}</div></td>
<td>
<div>
<template v-if="item.partnerLevelName === '대본사'">
<span class="box">본사</span>
</template>
<template v-else-if="item.partnerLevelName === '부본사'">
<span class="box">부본</span>
</template>
<template v-else-if="item.partnerLevelName === '일반회원'">
<span class="box">회원</span>
</template>
<template v-else>
<span class="box">{{item.partnerLevelName}}</span>
</template>
</div>
</td>
</tr>
</template>
</tbody>
</table>
<div class="strTablePTWrap">
<table class="strTablePT" v-if="bottomRateList">
<thead>
<tr>
<template v-for="cate in myRateInfo" :key="cate.cateCode">
<template v-if="cate.cateCodeName === '하이로우88'">
<th rowspan="2" colspan="2">{{ cate.cateCodeName }}</th>
</template>
<template v-else-if="cate.cateCodeName === 'HC-카지노'">
<th colspan="2">호텔카지노</th>
</template>
<template v-else>
<th colspan="2" >{{ cate.cateCodeName }}</th>
</template>
</template>
</tr>
<tr>
<template v-for="cate in myRateInfo" :key="cate.cateCode">
<template v-if="cate.detailSetYn === 'N'">
<th>롤링</th>
<th>루징</th>
</template>
<!--template v-else>
</template-->
</template>
</tr>
</thead>
<tbody>
<template v-for="item in bottomRateList" :key="item.memId">
<tr>
<template v-for="cate in item.botRateInfo" :key="cate.cateCode">
<template v-if="cate.detailSetYn === 'N'">
<td>
<div class="rate">
<input type="text" v-model="cate.pointRate" @change="onRateChange(cate, 'P', item)">
<em>
<i>최소({{cate.minPointRate}})</i>
<i>최대({{cate.maxPointRate}})</i>
</em>
</div>
</td>
<td>
<div class="rate">
<input type="text" v-model="cate.loseRate" @change="onRateChange(cate, 'R', item)">
<em>
<i>최소({{cate.minLoseRate}})</i>
<i>최대({{cate.maxLoseRate}})</i>
</em>
</div>
</td>
</template>
<template v-else>
<td colspan="2">
<button class="detailSet" @click="onToggleDetail(item, cate)">세부설정</button>
</td>
</template>
</template>
</tr>
</template>
</tbody>
</table>
</div>
<table class="strTablePT tableC" v-if="bottomRateList">
<thead>
<tr>
<th rowspan="2">저장</th>
</tr>
</thead>
<tbody>
<template v-for="item in bottomRateList" :key="item.memId">
<tr>
<td>
<div>
<a class="btnx sbtn" @click="onSave(item)">{{$t('front.stributor.save')}}</a>
</div>
</td>
</tr>
</template>
</tbody>
</table>
</div>
<div class="detailSetWrap detailLosing" v-if="isDetailOpen">
<table>
<tbody>
<template v-for="rate in selectedMember.rateList" :key="rate.rateType">
<tr>
<td rowspan="2" class="tableheadside">{{rate.rateTypeName}}</td>
<td>롤링</td>
<td>
<button class="btnm">최소<i>({{rate.minPointRate}})</i></button>
<input type="text" :class="{'error': rate.errorP}" v-model="rate.pointRate" @change="onRateChange(rate, 'P')">
<button class="btnx">최대<i>({{rate.maxPointRate}})</i></button>
</td>
</tr>
<tr>
<td>루징</td>
<td>
<button class="btnm">최소<i>({{rate.minLoseRate}})</i></button>
<input type="text" :class="{'error': rate.errorR}" v-model="rate.loseRate" @change="onRateChange(rate, 'R')">
<button class="btnx">최대<i>({{rate.maxLoseRate}})</i></button>
</td>
</tr>
</template>
</tbody>
</table>
<button class="detailSetSave" @click="onSaveDetail">저장</button>
<span class="detailClose" @click="onToggleDetail()">×</span>
</div>
</div>
<div class="strTableM">
<div class="strTablePTM" v-if="bottomRateList">
<template v-for="item in bottomRateList" :key="item.memId">
<ul>
<li><em>아이디</em><span>{{ item.memId }}</span></li>
<li><em>닉네임</em>{{ item.memNick }}</li>
<li><em>파트너등급</em><span class="box">{{item.partnerLevelName}}</span></li>
<template v-for="cate in item.botRateInfo" :key="cate.cateCode">
<template v-if="cate.detailSetYn === 'N'">
<template v-if="cate.cateCodeName === 'HC-카지노'">
<li>
<em>호텔카지노 롤링</em>
<div>
<input type="text" v-model="cate.pointRate" @change="onRateChange(cate, 'P', item)">
<span class="rate">
<i>최소({{cate.minPointRate}})</i>
<i>최대({{cate.maxPointRate}})</i>
</span>
</div>
</li>
<li>
<em>호텔카지노 루징</em>
<div>
<input type="text" v-model="cate.loseRate" @change="onRateChange(cate, 'R', item)">
<span class="rate">
<i>최소({{cate.minLoseRate}})</i>
<i>최대({{cate.maxLoseRate}})</i>
</span>
</div>
</li>
</template>
<template v-else>
<li>
<em>{{ cate.cateCodeName }} 롤링</em>
<div>
<input type="text" v-model="cate.pointRate" @change="onRateChange(cate, 'P', item)">
<span class="rate">
<i>최소({{cate.minPointRate}})</i>
<i>최대({{cate.maxPointRate}})</i>
</span>
</div>
</li>
<li>
<em>{{ cate.cateCodeName }} 루징</em>
<div>
<input type="text" v-model="cate.loseRate" @change="onRateChange(cate, 'R', item)">
<span class="rate">
<i>최소({{cate.minLoseRate}})</i>
<i>최대({{cate.maxLoseRate}})</i>
</span>
</div>
</li>
</template>
</template>
<template v-else>
<li>
<em>하이로우88</em>
<div><button class="detailSet" @click="onToggleDetail(item, cate)">세부설정</button></div>
</li>
</template>
</template>
<li><a class="btnx sbtn" @click="onSave(item)">{{$t('front.stributor.save')}}</a></li>
</ul>
</template>
<!--template v-else>
<ul>
<li>내역 없음</li>
</ul>
</template-->
<div class="detailSetWrap detailLosing" v-if="isDetailOpen">
<table>
<tbody>
<template v-for="rate in selectedMember.rateList" :key="rate.rateType">
<tr>
<td rowspan="2" class="tableheadside">{{rate.rateTypeName}}</td>
<td>롤링</td>
<td>
<button class="btnm">최소<i>({{rate.minPointRate}})</i></button>
<input type="text" :class="{'error': rate.errorP}" v-model="rate.pointRate" @change="onRateChange(rate, 'P')">
<button class="btnx">최대<i>({{rate.maxPointRate}})</i></button>
</td>
</tr>
<tr>
<td>루징</td>
<td>
<button class="btnm">최소<i>({{rate.minLoseRate}})</i></button>
<input type="text" :class="{'error': rate.errorR}" v-model="rate.loseRate" @change="onRateChange(rate, 'R')">
<button class="btnx">최대<i>({{rate.maxLoseRate}})</i></button>
</td>
</tr>
</template>
</tbody>
</table>
<button class="detailSetSave" @click="onSaveDetail">저장</button>
<span class="detailClose" @click="onToggleDetail()">×</span>
</div>
</div>
</div>
</div>
<!------------------------------------------------------------------------------->
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import { getRateInfo, memberNewRateUpdate, setMultipleRateInfo } from '@/api/retail'
export default {
name: 'PartnerRate',
components: {
},
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode',
'siteIdInfo'
])
},
watch: {
},
data () {
return {
myRateInfo: null,
bottomRateList: null,
isDetailOpen: false,
selectedMember: null
}
},
async created () {
await this.loadRate()
},
methods: {
onSaveDetail () {
this.emitter.emit('Loading', true)
const cate = this.selectedMember
console.log(cate)
if (!cate.errorP && !cate.errorR) {
const miniParam = {
memId: cate.memId,
vendorCode: cate.vendorCode,
rateList: cate.rateList
}
console.log(miniParam)
setMultipleRateInfo(miniParam).then(res => {
if (res.resultCode !== '0') {
alert(res.resultMessage)
} else {
alert('저장이 완료되었습니다.')
this.onToggleDetail()
}
this.emitter.emit('Loading', false)
})
}
},
onToggleDetail (item, cate) {
this.emitter.emit('Loading', true)
console.log(item, cate)
if (!this.isDetailOpen) {
this.selectedMember = {
...cate.multipleRateInfo,
errorP: item.errorP,
errorR: item.errorR
}
} else {
this.selectedMember = null
}
this.isDetailOpen = !this.isDetailOpen
this.emitter.emit('Loading', false)
},
onSave (item) {
console.log(item)
this.emitter.emit('Loading', true)
const isError = false
let rateList = []
if (item.botRateInfo) {
item.botRateInfo.forEach(cate => {
if (!cate.errorP && !cate.errorR) {
// if (cate.detailSetYn === 'Y') {
// if (!cate.errorP && !cate.errorR) {
// const miniParam = {
// memId: item.memId,
// vendorCode: cate.cateCode,
// rateList: cate.multipleRateInfo.rateList
// }
//
// setMultipleRateInfo(miniParam).then(res => {
// if (res.resultCode !== '0') {
// alert(res.resultMessage)
// }
// })
// }
// }
rateList.push({
category: cate.category,
cateCode: cate.cateCode,
pointRate: cate.pointRate,
loseRate: cate.loseRate
})
} else {
rateList = []
return false
}
})
}
console.log(rateList, isError)
if (rateList.length > 0 && !isError && item.botRateInfo.length === rateList.length) {
const params = {
siteId: this.siteIdInfo.siteId,
memId: item.memId,
rateList
}
memberNewRateUpdate(params).then(res => {
if (res.resultCode === '0') {
alert('저장 완료되었습니다.')
} else {
alert(res.resultMessage)
}
this.emitter.emit('Loading', false)
})
} else {
this.emitter.emit('Loading', false)
}
},
onRateChange (item, type, category) {
if (category) {
category['error' + type] = false
} else {
item['error' + type] = false
}
const max = type === 'P' ? item.maxPointRate : item.maxLoseRate
const min = type === 'P' ? item.minPointRate : item.minLoseRate
const value = type === 'P' ? item.pointRate : item.loseRate
if (Number(value) > Number(max)) {
if (category) {
category['error' + type] = true
} else {
item['error' + type] = true
}
} else if (Number(min) > Number(value)) {
if (category) {
category['error' + type] = true
} else {
item['error' + type] = true
}
}
},
loadRate () {
this.emitter.emit('Loading', true)
getRateInfo({}).then(res => {
console.log(res)
const result = res.data
if (result.resultCode === '0') {
this.myRateInfo = result.data.myRateInfo
this.bottomRateList = result.data.botttomRateList
this.bottomRateList.forEach(item => {
item.errorP = false
item.errorR = false
})
}
this.emitter.emit('Loading', false)
})
}
}
}
</script>
<style scoped>
.pagenamPT2 {font-size: 16px;font-weight: bold;margin: 20px 0;position: relative;color: #121212;display: flex;align-items: center;}
.strTablePTWrap {display: flex;width: calc(100% - 440px); overflow: auto;}
.strTablePTWrap table {white-space: nowrap;border-collapse: collapse;}
.strTablePTWrap th {padding: 0 5px;}
.strTablePTIn {display: flex;align-items: flex-start;min-width: 1430px;max-width: 1800px;}
.tableA th, .tableC th {height: 92px !important;}
.tableA div, .tableC div {
min-height: 35.8px;
display: flex;
align-items: center;
justify-content: center;
}
.tableA {width: 300px !important;}
.tableC {width: 140px !important;}
.strTablePT {border-top: 5px solid #82a6a4;}
.top .strTablePT {display: table;table-layout: fixed;}
.strTablePT th {background: #EEF0F5 !important;border: 1px solid #e1e0e0;}
.strTablePT tr td {background: #fff !important;}
.strTablePT tr td i {font-size: 12px;color: #1200ff;}
.strTablePT tr td i:first-child {color: #f00;}
.strTablePT tr td .rate {display: flex;align-items: center;justify-content: center;gap: 5px;padding-left: 5px;box-sizing: border-box; min-height: 35.8px;}
.strTablePT tr td .rate em {display: flex;flex-direction: column;gap: 2px;width: 62px;align-items: flex-start;}
table input[type=text], .bottom input[type=text] {width: 50px;height: 28px;padding: 0 0 0 5px;margin: 0;border-radius: 0;border: 1px solid #bdbdbd;box-sizing: border-box;}
table .btnm, table .btnx, .bottom .btnm, .bottom .btnx {height: 28px;border-radius: 5px;font-size: 12px;margin: 0 auto;cursor: pointer;}
.sbtn {display: flex; align-items: center;justify-content: center;}
.rateTxt {font-size: 12px;line-height: 1.5em;margin-bottom: 10px;}
.detailSetWrap {position: fixed !important;}
.detailSetWrap.detailLosing {background: #fff;border: 1px solid #C2C2C2;}
table .detailSet, ul .detailSet {background-image: linear-gradient(to bottom, #72a2c1, #5f8bb1);border: 0;color: #fff;height: 28px;border-radius: 5px;}
.detailSetWrap tr > td:last-child input {padding-left: 5px;box-sizing: border-box;}
.detailClose {color: #000 !important;}
@media (max-width: 1000px) {
.strTablePTM li:nth-child(4) {width: 50% !important;}
.bottom .strTablePTM li {width: 100% !important;}
.strTablePTM em {width: 100px !important;}
.strTablePTM li .rate i:first-child {color: #f00;}
.strTablePTM li .rate i {font-size: 12px;color: #1200ff;margin-left: 5px;}
}
</style>
<style scoped src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,323 @@
<template>
<div class="tab-content" id="PTtab-9" :key="'PTtab-9'" >
<div class="pagenamew">
<h3 class="pagename2">포인트 적립내역</h3>
</div>
<div class="searchPTwrap">
<div class="datesearchPT">
<date-filter @search="loadList(1)"
@update="onChangeDate"
:startDate="searchDate.startDate"
:endDate="searchDate.endDate" :isOldYn="true"
@setOldYn="setOldYn" :oldYn="oldYn" />
</div>
<div class="datesearchM">
<date-filter-mobile :retail="true" @search="loadList(1)"
@update="onChangeDateTable"
:defaultDay="0"
:startDate="mainTableDate.startDate"
:endDate="mainTableDate.endDate"
:isOldYn="true"
:id="'main-date-checkbox1'"
@setOldYn="setOldYn" :oldYn="reqData.oldYn"
/>
</div>
</div>
<!-- <div class="searchPTwrap">
<div class="idsearchwrap">
<select v-model="searchType">
<option value="memId">아이디</option>
<option value="recommenderId">추천인아이디</option>
<option value="memNick">닉네임</option>
</select>
<input v-model="searchId" @keydown.enter="loadMainTable(1)" class="ml5">
<button class="idschbtn" @click="loadMainTable(1)"><img src="../../../assets/img/search.png"></button>
</div>
</div> -->
<!-- <ul class="strbtnPT mb20">
<li>{{$t('front.point.leftPoint')}}<span>{{thousand(sum ? sum.pointAmt: 0)}} P</span></li>
<li>{{$t('front.point.monthPoint')}}<span>{{thousand(sum ? sum.thisMonthPoint : 0)}} P</span></li>
<li>{{$t('front.point.prevMonthPoint')}}<span>{{thousand(sum ? sum.preMonthPoint: 0)}} P</span></li>
<li>{{$t('front.point.allPoint')}}<span>{{thousand(sum ? sum.totalInPoint : 0)}} P</span></li>
<li>{{$t('front.point.allUsePoint')}}<span>{{thousand(sum ? sum.totalOutPoint : 0)}} P</span></li>
</ul> -->
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="13%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="15%">
<col width="10%">
<col width="10%">
<col width="12%">
</colgroup>
<thead>
<tr>
<th>적립일</th>
<th>아이디</th>
<th>사이트이름</th>
<th>멤버아이디</th>
<th>종류</th>
<th>베팅금액</th>
<th>퍼센트</th>
<th>보너스퍼센트</th>
<th>적립포인트</th>
</tr>
</thead>
<tbody>
<!-- <template v-if="list.length > 0">
<tr v-for="item in list" v-bind:key="item.gameIdx">
<td>{{dateFormatAll(item.regDt)}}</td>
<td>{{item.memId}}</td>
<td></td>
<td></td>
<td>{{item.codeName}}</td>
<td>{{thousand(item.betAmt)}}</td>
<td>{{item.pointRate}}%</td>
<td>{{item.pointBonusRate}}%</td>
<td>{{thousand(item.point_inAmt)}}P</td>
</tr>
</template> -->
<tr>
<td>2023-10-10</td>
<td>ID</td>
<td>ex) ROYAL</td>
<td>member ID</td>
<td>codeName</td>
<td>123,456</td>
<td>0 %</td>
<td>0 %</td>
<td>0 P</td>
</tr>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
</div>
</div>
</div>
</div>
</template>
<script>
import {
partnerLevels, retailMemRate, retailMyMemberListByUser, retailUpdate
} from '@/api/retail'
// import { getPointList } from '@/api/point'
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import { getDateStr, thousand } from '@/libs/utils'
import { addDays } from 'date-fns'
import { mapState } from 'vuex'
import { getPointList } from '@/api/point'
export default {
name: 'PointList',
components: {
DateFilter,
DateFilterMobile
},
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
])
},
data () {
return {
mainTableDate: {
startDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 00:00:00'),
endDate: getDateStr(addDays(new Date(), 0), 'yyyy-MM-dd 23:59:59')
},
reqData: {
searchType: 'OUTER',
chkTodayYn: 'N',
startDate: '',
endDate: '',
offset: -1,
oldYn: 'N',
searchMemId: ''
},
searchType: 'memId',
searchId: '',
list: [],
pageInfo: {
page: 1,
count_per_list: 40,
tatal_list_count: 10
}
}
},
async created () {
this.emitter.emit('Loading', true)
this.onLoadRate()
this.getPartnerLevels()
this.loadList()
this.reqData.startDate = this.mainTableDate.startDate.split(' ')[0]
this.reqData.endDate = this.mainTableDate.endDate.split(' ')[0]
await this.loadMainTable()
this.emitter.emit('Loading', false)
},
methods: {
loadList (page) {
const params = {
pointType: 'in',
page: page || this.pageInfo.page,
startDate: this.searchDate.startDate,
endDate: this.searchDate.endDate
}
getPointList(params).then(response => {
console.log('getPointList : ', response)
const result = response.data
if (result.resultCode === '0') {
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
const data = result.data
this.list = data.list
this.sum = data.sum
}
})
},
async onUpdateChildrenRate () {
const rateList = this.myChildrenRate
for (let i = 0, iLen = rateList.length; i < iLen; i++) {
const item = rateList[i]
if (item.casinoLRError ||
item.casinoPRError ||
item.hcasinoPRError ||
item.hcasinoLRError ||
item.slotLRError ||
item.slotPRError ||
item.miniLRError ||
item.miniPRError
) {
return
}
}
const confirm = await this.onConfirm('front.common.confirmSave')
if (confirm) {
const param = {
siteId: '',
memId: '',
rateList: rateList
}
retailUpdate(param).then(res => {
const data = res.data
if (data.resultCode === '0') {
this.onCheck('front.recommender.complete')
this.onLoadRate()
}
})
}
},
onLoadRate () {
retailMemRate({}).then(res => {
const data = res.data
if (data.resultCode === '0') {
this.myRate = data.data.myCategoryRate
this.myChildrenRate = data.data.botCategoryRateList
}
})
},
thousand,
setOldYn (data) {
this.reqData.oldYn = data
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
onChangeDateTable (value) {
this.reqData.startDate = getDateStr(new Date(value.startDate))
this.reqData.endDate = getDateStr(new Date(value.endDate))
},
async loadMainTable (page) {
if (!page) {
page = 1
}
this.emitter.emit('Loading', true)
const params = {
...this.reqData,
count_per_list: 20,
page: page
}
if (this.searchId) {
if (this.searchType === 'memId') {
params.searchMemId = this.searchId
} else {
params.searchRecommandId = this.searchId
}
}
this.mainTableDate.startDate = this.reqData.startDate
this.mainTableDate.endDate = this.reqData.endDate
const today = new Date()
if (params.endDate === getDateStr(today)) {
params.chkTodayYn = 'Y'
} else {
params.chkTodayYn = 'N'
}
console.log('[req][retailMyCalculateByUser] : ', params)
await retailMyMemberListByUser(params).then(res => {
console.log('[res][retailMyCalculateByUser] : ', res)
window.scrollTo(0, 0)
const data = res.data
if (data.resultCode === '0') {
this.list = data.data.searchList
this.pageInfo = data.data.pageInfo
this.total = data.data.searchTotal
}
this.emitter.emit('Loading', false)
})
}
}
}
</script>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/striNew.css"></style>
<style scoped>
.datesearch {margin: 0;}
.searchPTwrap { margin-bottom: 20px; display: flex; gap:20px; align-items: center;}
.searchPTwrap label { font-size: 13px; margin-right: 5px;}
.searchPTwrap input {border-radius: 5px; border: 1px solid #969696; height: 28px; box-sizing: border-box; text-indent: 5px; margin-right: 5px; }
.searchPTwrap .idschbtn {background: #5068d4; border: 0; padding: 6px 8px; border-radius: 8px; vertical-align: middle; height: 28px;}
.strbtnPT li:last-child {height: auto;width: 100%; display: block; cursor: auto; background-image: none; color: #000;}
</style>

View File

@@ -0,0 +1,150 @@
<template>
<div class="">
<ul class="tablist">
<li class="tabmenu current" @click="goPageByName('point')">포인트 적립내역</li>
<li class="tabmenu" @click="goPageByName('pointuse')">포인트 전환신청</li>
<li class="tabmenu" @click="goPageByName('pointUselist')">포인트 전환내역</li>
</ul>
<!--ul class="strbtnPT lastnone mb20">
<li>{{$t('front.point.leftPoint')}}<span>{{thousand(sum ? sum.pointAmt: 0)}} P</span></li>
<li>{{$t('front.point.monthPoint')}}<span>{{thousand(sum ? sum.thisMonthPoint : 0)}} P</span></li>
<li>{{$t('front.point.prevMonthPoint')}}<span>{{thousand(sum ? sum.preMonthPoint: 0)}} P</span></li>
<li>{{$t('front.point.allPoint')}}<span>{{thousand(sum ? sum.totalInPoint : 0)}} P</span></li>
<li>{{$t('front.point.allUsePoint')}}<span>{{thousand(sum ? sum.totalOutPoint : 0)}} P</span></li>
<li></li>
</ul-->
<div class="PTsch">
<div class="datesearchPT">
<date-filter @search="loadList(1)"
@update="onChangeDate"
:startDate="searchDate.startDate"
:endDate="searchDate.endDate" />
</div>
<div class="datesearchM">
<date-filter-mobile @search="loadList"
@update="onChangeDate" />
</div>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="10%">
<col width="10%">
<col width="10%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="25%">
</colgroup>
<thead>
<tr>
<th>{{$t('front.board.accrualDay')}}</th>
<th>{{$t('front.common.memId')}}</th>
<th>{{$t('front.board.kind')}}</th>
<th>{{$t('front.board.betMoney')}}</th>
<th>{{$t('front.board.percent')}}</th>
<th>{{$t('front.board.bonusPercent')}}</th>
<th>{{$t('front.board.accrualPoint')}}</th>
</tr>
</thead>
<tbody>
<template v-if="list.length > 0">
<template v-for="item in list" :key="item.gameIdx">
<tr>
<td>{{dateFormatAll(item.regDt)}}</td>
<td>{{item.memId}}</td>
<td>{{item.codeName}}</td>
<td>{{thousand(item.betAmt)}}</td>
<td>{{item.pointRate}}%</td>
<td>{{item.pointBonusRate}}%</td>
<td>{{thousand(item.point_inAmt)}}P</td>
</tr>
</template>
</template>
<template v-else>
<tr>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="list.length > 0">
<template v-for="item in list" :key="item.gameIdx">
<ul>
<li><em>{{$t('front.board.accrualDay')}}</em>{{dateFormatAll(item.regDt)}}</li>
<li><em>{{$t('front.common.memId')}}</em>{{item.memId}}</li>
<li><em>{{$t('front.board.kind')}}</em>{{item.codeName}}</li>
<li><em>{{$t('front.board.betMoney')}}</em>{{thousand(item.betAmt)}}</li>
<li><em>{{$t('front.board.percent')}}</em>{{item.pointRate}}%</li>
<li><em>{{$t('front.board.bonusPercent')}}</em>{{item.pointBonusRate}}%</li>
<li><em>{{$t('front.board.accrualPoint')}}</em>{{thousand(item.point_inAmt)}}P</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">{{$t('front.common.notFoundList')}}</li>
</ul>
</template>
</div>
</div>
</div>
<pagination
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
@goToPage="loadList" />
</div>
</template>
<script>
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import Pagination from '@/components/ui/Pagination'
import { getPointList } from '@/api/point'
export default {
name: 'pointList',
components: { DateFilter, DateFilterMobile, Pagination },
data () {
return {
list: [],
sum: {}
}
},
created () {
this.loadList()
},
methods: {
loadList (page) {
const params = {
pointType: 'in',
page: page || this.pageInfo.page,
startDate: this.searchDate.startDate,
endDate: this.searchDate.endDate
}
getPointList(params).then(response => {
const result = response.data
if (result.resultCode === '0') {
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
const data = result.data
this.list = data.list
this.sum = data.sum
}
})
}
}
}
</script>
<style scoped>
.boardw li:nth-child(2){word-break: break-all;}
</style>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,159 @@
<template>
<div class="">
<ul class="tablist">
<li class="tabmenu" @click="goPageByName('point')">포인트 적립내역</li>
<li class="tabmenu current" @click="goPageByName('pointuse')">포인트 전환신청</li>
<li class="tabmenu" @click="goPageByName('pointuselist')">포인트 전환내역</li>
</ul>
<div class="leftWrap">
<div class="moneyread">
<h3>{{$t('front.cash.moneyCheckList')}}</h3>
<ul>
<li>{{$t('front.point.moneyPoint')}}</li>
<li>{{$t('front.point.limitPoint')}}</li>
<li>{{$t('front.cash.moneyCheckListD')}}</li>
</ul>
</div>
<div class="moneyinfoappli">
<div class="moneyinfo">
<h3 class="applih">{{$t('front.point.changePoint')}}</h3>
<p class="applip">{{$t('front.point.changePointA')}} <span class="blc">1,000</span>P {{$t('front.point.changePointB')}}</p>
</div>
<div class="appliinputwrap">
<ul class="appliinput">
<li>{{$t('front.point.leftPoint')}}</li>
<li><span class="blc numb">{{thousand(currentPoint.toString())}}</span>P</li>
</ul>
<ul class="appliinput">
<li>{{$t('front.point.expectPoint')}}</li>
<li><span class="numb">{{thousand(changePoint.toString())}}</span>P</li>
</ul>
<ul class="appliinput">
<li>{{$t('front.point.expectToPoint')}}</li>
<li><span class="numb">{{thousand(remainPoint.toString())}}</span>P</li>
</ul>
<ul class="appliinput">
<li>{{$t('front.point.pointInput')}}</li>
<li><input type="text" pattern="[0-9.,]+" class="numb" :placeholder="$t('front.cash.inputNumber')" v-model="changePoint"></li>
</ul>
<ul class="moneybtnwrap ml150">
<li class="one" @click="setPoint(10000)"><a>1{{$t('front.cash.manwon')}}</a></li>
<li class="one" @click="setPoint(30000)"><a>3{{$t('front.cash.manwon')}}</a></li>
<li class="one" @click="setPoint(50000)"><a>5{{$t('front.cash.manwon')}}</a></li>
<li class="two" @click="setPoint(100000)"><a>10{{$t('front.cash.manwon')}}</a></li>
<li class="two" @click="setPoint(300000)"><a>30{{$t('front.cash.manwon')}}</a></li>
<li class="two" @click="setPoint(500000)"><a>50{{$t('front.cash.manwon')}}</a></li>
<li class="four" @click="setPoint(0)"><a>{{$t('front.cash.correct')}}</a></li>
<li class="thr" @click="setPoint('all')"><a>{{$t('front.cash.all')}}</a></li>
</ul>
<div class="applibtns">
<a @click="onSubmit">{{$t('front.cash.moneyCheckListL')}}</a>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import { setChangePoint } from '@/api/point'
import { thousand } from '@/libs/utils'
export default {
name: 'pointUse',
watch: {
changePoint () {
const tempcgPoint1 = Number(this.currentPoint)
const tempcgPoint2 = Number(this.changePoint.replace(/,/g, ''))
if (tempcgPoint1 < tempcgPoint2) {
this.onCheck('front.point.enoughChangePoint')
this.changePoint = ''
return false
} else {
this.remainPoint = this.currentPoint - Number(this.changePoint.replace(/,/g, ''))
const parts = this.changePoint.split('.')
const v = parts[0].replace(/\D/g, '')
const dec = parts[1]
const calcNum = Number((dec !== undefined ? v + '.' + dec : v))
// use this for numeric calculations
console.log('number for calculations: ', calcNum)
let n = new Intl.NumberFormat('en-EN').format(v)
n = dec !== undefined ? n + '.' + dec : n
this.changePoint = n
}
}
},
computed: {
...mapState([
'userData'
])
},
created () {
this.currentPoint = this.userData.pointAmt || 0
},
data () {
return {
isPopupOpen: false,
currentPoint: '',
changePoint: '',
remainPoint: 0,
limitMinPoint: 10000
}
},
methods: {
setPoint (value) {
let point = Number(this.changePoint.replace(/,/g, ''))
if (value === 'all') {
point = this.currentPoint
} else {
if (value) {
point += value
} else {
point = ''
}
}
console.log(this.currentPoint)
this.changePoint = thousand(point)
},
async onSubmit () {
if (this.changePoint) {
if (this.limitMinPoint > this.changePoint) {
this.onCheck('front.point.limitPoint')
return false
}
const confirm = await this.onConfirm('front.point.confirm')
if (confirm) {
const param = {
pointAmt: Number(this.changePoint.replace(/,/g, ''))
}
setChangePoint(param).then(async response => {
const result = response.data
if (result.resultCode === '0') {
const success = await this.onCheck('front.point.success')
if (success) {
location.reload()
}
}
})
}
} else {
await this.onCheck('front.point.check')
}
}
}
}
</script>
<style scoped>
</style>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,150 @@
<template>
<div class="">
<ul class="tablist">
<li class="tabmenu" @click="goPageByName('point')">포인트 적립내역</li>
<li class="tabmenu" @click="goPageByName('pointuse')">포인트 전환신청</li>
<li class="tabmenu current" @click="goPageByName('pointUselist')">포인트 전환내역</li>
</ul>
<!--ul class="strbtnPT lastnone mb20">
<li>{{$t('front.point.leftPoint')}}<span>{{thousand(sum ? sum.pointAmt: 0)}} P</span></li>
<li>{{$t('front.point.monthPoint')}}<span>{{thousand(sum ? sum.thisMonthPoint : 0)}} P</span></li>
<li>{{$t('front.point.prevMonthPoint')}}<span>{{thousand(sum ? sum.preMonthPoint: 0)}} P</span></li>
<li>{{$t('front.point.allPoint')}}<span>{{thousand(sum ? sum.totalInPoint : 0)}} P</span></li>
<li>{{$t('front.point.allUsePoint')}}<span>{{thousand(sum ? sum.totalOutPoint : 0)}} P</span></li>
<li></li>
</ul-->
<div class="PTsch">
<div class="datesearchPT">
<date-filter @search="loadList(1)"
@update="onChangeDate"
:startDate="searchDate.startDate"
:endDate="searchDate.endDate"/>
</div>
<div class="datesearchM">
<date-filter-mobile @search="loadList"
@update="onChangeDate" />
</div>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th>{{$t('front.board.applyDay')}}</th>
<th>{{$t('front.board.divUse')}}</th>
<th>{{$t('front.board.applyPoint')}}</th>
<th>{{$t('front.board.processDay')}}</th>
<th>{{$t('front.board.processState')}}</th>
</tr>
</thead>
<tbody>
<template v-if="list.length > 0">
<template v-for="item in list" :key="item.updDt">
<tr>
<td>{{dateFormatAll(item.regDt)}}</td>
<td>{{$t('front.board.moneychange')}}</td>
<td>{{thousand(item.point_inAmt.replace('-', ''))}}</td>
<td>{{dateFormatAll(item.updDt)}}</td>
<td>{{$t('front.board.complet')}}</td>
</tr>
</template>
</template>
<template v-else>
<tr>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="list.length > 0">
<template v-for="item in list" :key="item.updDt">
<ul>
<li><em>{{$t('front.board.applyDay')}}</em>{{dateFormatAll(item.regDt)}}</li>
<li><em>{{$t('front.board.divUse')}}</em>{{$t('front.board.moneychange')}}</li>
<li><em>{{$t('front.board.applyPoint')}}</em>{{thousand(item.point_inAmt.replace('-', ''))}}</li>
<li><em>{{$t('front.board.processDay')}}</em>{{dateFormatAll(item.updDt)}}</li>
<li><em>{{$t('front.board.processState')}}</em>{{$t('front.board.complet')}}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">{{$t('front.common.notFoundList')}}</li>
</ul>
</template>
</div>
</div>
</div>
<pagination
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
@goToPage="loadList" />
</div>
</template>
<script>
import DateFilter from '@/components/ui/DateFilter'
import DateFilterMobile from '@/components/ui/DateFilterMobile'
import Pagination from '@/components/ui/Pagination'
import { getPointList } from '@/api/point'
export default {
name: 'pointUselist',
components: { DateFilter, DateFilterMobile, Pagination },
data () {
return {
list: [],
sum: {},
pageInfo: {
page: 1,
count_per_list: 10,
tatal_list_count: 0
}
}
},
created () {
this.loadList()
},
methods: {
loadList (page) {
const params = {
pointType: 'out',
page: page || this.pageInfo.page,
startDate: this.searchDate.startDate,
endDate: this.searchDate.endDate
}
console.log(params)
getPointList(params).then(response => {
const result = response.data
if (result.resultCode === '0') {
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
const data = result.data
this.list = data.list
this.sum = data.sum
}
})
}
}
}
</script>
<style scoped>
.boardw li:nth-child(2){word-break: break-all;}
</style>
<style src="@/styles/striNew.css"></style>

View File

@@ -0,0 +1,469 @@
<template>
<div class="tab-content" id="PTtab-8" :key="'PTtab-8'" >
<div>
<div class="pagenamPT">
<h3 class="pagename2 w100w">하부파트너 소속회원목록</h3>
</div>
<div class="PTsch">
<select class="">
<option value="memId" selected>아이디</option>
<option value="memNick">닉네임</option>
<option value="recommenderId">상위유저</option>
</select>
<input class="w100-100w" type="text" :placeholder="$t('front.search.emptySearch')" v-model="searchMemId"/>
<a @click="getPartnerMemberList(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</div>
<div class="strTableWrap">
<div class="subMemWrap">
<!-- <p class="p10"></p> -->
<h3>하부 파트너 목록<a @click="idlist=!idlist">i</a><span v-if="idlist" @click="idlist=!idlist">아이디 클릭시 목록 출력</span></h3>
<ul class="subPT_1">
<!-- <li>
<a>
<span class="box" :class="userData.partnerLevel">{{partnerLevelName(userData.partnerLevel)}}</span>
{{userData.memId}}
</a>
</li> -->
<li v-for="(item1) in partnerList" :key="item1.memId" :class="{'morebar':item1.open}">
<span class="arr" v-if="item1.cnt" :class="[item1.partnerLevel, {'moreOn':item1.open}]" @click="listOpen(item1.memId, 'sub', item1)"></span>
<a :class="[item1.partnerLevel, { 'active': selectedLi === item1.memId }]" @click="getMyPartnerList(item1.memId, 'sub', item1)">
<span class="box" :class="item1.partnerLevel">본사</span>
{{item1.memId}}
</a>
<ul class="subPT_2" v-show="item1.open && item1.children">
<li v-for="item2 in item1.children" :key="item2.memId" :class="{'morebar':item2.open}">
<span class="arr" v-if="item2.cnt" :class="[item2.partnerLevel, {'moreOn':item2.open}]" @click="listOpen(item2.memId, 'sub', item2)"></span>
<a :class="[item2.partnerLevel, { 'active': selectedLi === item2.memId }]" @click="getMyPartnerList(item2.memId, 'sub', item2)">
<span class="box" :class="item2.partnerLevel">부본</span>
{{item2.memId}}
</a>
<ul class="subPT_3" v-show="item2.open && item2.children">
<li v-for="item3 in item2.children" :key="item3.memId" :class="{'morebar':item3.open}">
<span class="arr" v-if="item3.cnt" :class="[item3.partnerLevel, {'moreOn':item3.open}]" @click="listOpen(item3.memId, 'sub', item3)"></span>
<a :class="[item3.partnerLevel, { 'active': selectedLi === item3.memId }]" @click="getMyPartnerList(item3.memId, 'sub', item3)">
<span class="box" :class="item3.partnerLevel">{{partnerLevelName(item3.partnerLevel)}}</span>
{{item3.memId}}
</a>
<ul class="subPT_4" v-show="item3.open && item3.children">
<li v-for="item4 in item3.children" :key="item4.memId" :class="{'morebar':item4.open}">
<span class="arr" v-if="item4.cnt" :class="[item4.partnerLevel, {'moreOn':item4.open}]" @click="listOpen(item4.memId, 'sub', item4)"></span>
<a :class="[item4.partnerLevel, { 'active': selectedLi === item4.memId }]" @click="getMyPartnerList(item4.memId, 'sub', item4)">
<span class="box" :class="item4.partnerLevel">{{partnerLevelName(item4.partnerLevel)}}</span>
{{item4.memId}}
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="strTablescr">
<div class="strTablePC">
<h3>소속 회원 목록</h3>
<table class="strTablePT">
<colgroup>
<col width="10%">
<col width="10%">
<col width="10%">
<col width="10%">
<col width="12.5%">
<col width="12.5%">
<col width="15%">
</colgroup>
<thead>
<tr>
<th>아이디</th>
<th>닉네임</th>
<th>카지노요율</th>
<th>슬롯요율</th>
<th>보유금</th>
<th>보유포인트</th>
<th>가입 일시</th>
</tr>
</thead>
<tbody>
<template v-if="memberList.length > 0">
<tr v-for="(item) in memberList" :key="item.memId">
<td :class="item.myLevel">{{item.memId}}</td>
<td>{{item.memNick}}</td>
<td>{{item.casinoRate}}</td>
<td>{{item.slotRate}}</td>
<td>{{thousand(item.cashAmt)}}</td>
<td>{{thousand(item.pointAmt)}}</td>
<td>{{dateFormatAll(item.joinDate)}}</td>
</tr>
</template>
<template v-else>
<tr>
<td colspan="7">소속 회원이 없습니다.</td>
</tr>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<ul v-for="(item) in memberList" :key="item.memId">
<li :class="item.myLevel"><em>아이디</em>{{item.memId}}</li>
<li><em>닉네임</em>{{item.memNick}}</li>
<li><em>카지노요율</em>{{item.casinoRate}}</li>
<li><em>슬롯요율</em>{{item.slotRate}}</li>
<li><em>보유금</em>{{thousand(item.cashAmt)}}</li>
<li><em>보유포인트</em>{{thousand(item.pointAmt)}}</li>
<li><em>가입 일시</em>{{dateFormatAll(item.joinDate)}}</li>
<!-- <li><em>머니 관리</em>
<a class="bgr btn2 btn3" @click="onOpenMoneyPopup(item)">머니 지급</a>
<a class="bgg btn3" @click="setMoneyMerge(item)">통합머니전환</a>
<div v-if="item.openPopup" class="moneyg">
<a class="close" @click="onCloseMoneyPopup(item)"><img src="@/assets/img/icon_cancelB.svg" /></a>
<h2>보유머니: <span>{{thousand(item.cashAmt)}}</span></h2>
<input type="text" pattern="[0-9.,]+" :placeholder="$t('front.give.moneyInput')" v-model="item.inputCashAmt" @keyup="updateCashAmt(item, $event.target.value)" />
<div class="mbtn">
<a @click="setMoney(item, 10000)">1{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 30000)">3{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 50000)">5{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 100000)">10{{$t('front.cash.manwon')}}</a>
</div>
<div class="mbtn">
<a @click="setMoney(item, 30000)">3{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 50000)">5{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 100000)">10{{$t('front.cash.manwon')}}</a>
<a @click="setMoney(item, 0)" style="background: #730000;">{{$t('front.cash.correct')}}</a>
</div>
<div class="submit">
<a class="bgb btn2" @click="memCash('-3', item)">{{$t('front.give.give')}}</a>
<a class="bgr btn2" @click="memCash('3', item)">{{$t('front.give.back')}}</a>
</div>
</div>
</li> -->
</ul>
</div>
</div>
</div>
</div>
<pagination v-if="pageInfo"
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="getPartnerMemberList"
/>
</div>
<transition name="fade">
<TMmodal v-show="TMOpen" :isOpen="TMOpen" :type="'partner'" @close="onCloseTM" :userData="selectMem"/>
</transition>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination.vue'
import {
getRetailMyMemDirectList,
partnerLevels, partnerMyMemIds, retailMyPartnerDirectList
} from '@/api/retail'
import { thousand } from '@/libs/utils'
import { memCashInOut } from '@/api/give'
import { mapState } from 'vuex'
import { PARTNER_LEVEL_NAME } from '@/libs/constants'
import TMmodal from '@/components/common/TotalMoney.vue'
export default {
name: 'subMemberList',
components: { TMmodal, Pagination },
computed: {
...mapState([
'userData',
'gameCount',
'commonCodeByOrder',
'commonCodeByCode'
]),
formattedCashAmt () {
if (!this.cashAmt) return ''
return this.cashAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}
},
data () {
return {
searchType: 'N',
searchPartnerLevel: '',
partnerLevelList: [],
memberList: [],
partnerList: [],
partnerLevelObject: null,
summaryNew: null,
searchMemId: '',
cashAmt: '',
selectMem: {
cashAmt: ''
},
list: [],
isProcessing: false,
moveTarget: null,
TMOpen: false,
subMenus: {
1: true,
2: false,
3: false,
4: false
},
selectedLi: null,
idlist: false
}
},
async created () {
this.emitter.emit('Loading', true)
this.getPartnerLevels()
this.searchMemId = this.userData.memId
// this.getPartnerMemberList(1)
this.getMyPartnerList(this.userData.memId)
this.emitter.emit('Loading', false)
},
watch: {
selectPartnerCode () {
if (this.selectPartnerCode) {
this.selectMem.cashAmt = ''
this.getMyMemIds()
}
},
selectMem () {
if (this.selectMem) {
this.selectMem.cashAmt = thousand(this.selectMem.cashAmt)
}
}
},
methods: {
thousand,
partnerLevelName (partnerLevel) {
return PARTNER_LEVEL_NAME[partnerLevel]
},
toggleSubMenu (subMenuId) {
this.subMenus[subMenuId] = !this.subMenus[subMenuId]
},
parseFormattedValue (value) {
return value.replace(/,/g, '')
},
onCloseTM () {
this.selectMem = null
this.TMOpen = false
},
onChangePartnerLevel (partnerLevel) {
this.searchPartnerLevel = partnerLevel
this.getPartnerMemberList(1)
},
getMyMemIds () {
const params = {
code: this.selectPartnerCode,
masterCode: 'partner'
}
partnerMyMemIds(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.myMemIdsList = result.data.memIds
}
})
},
listOpen (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
retailMyPartnerDirectList(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
item.open = !item.open
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getMyPartnerList (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
console.log('[REQ]retailMyPartnerDirectList : ', params)
retailMyPartnerDirectList(params).then(res => {
console.log('[RES]retailMyPartnerDirectList : ', res.data)
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
if (this.selectedLi === memId) {
this.selectedLi = memId
} else {
this.selectedLi = memId
}
this.getPartnerMemberList(1)
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getPartnerMemberList (page) {
this.emitter.emit('Loading', true)
if (!page) {
page = this.pageInfo.page
}
const params = {
memId: this.searchMemId,
page: page,
partnerLevel: this.searchPartnerLevel,
searchType: this.searchType,
count_per_list: 40
}
console.log('[REQ]getRetailMyMemList : ', params)
getRetailMyMemDirectList(params).then(res => {
console.log('[RES]getRetailMyMemList : ', res.data)
this.emitter.emit('Loading', false)
const result = res.data
if (result.resultCode === '0') {
console.log(result.list)
this.memberList = result.data.list
this.memberList.forEach(item => {
item.inputCashAmt = ''
})
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
}
})
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
console.log('partnerLevel : ', result.data)
this.partnerLevelList = result.data.list
this.newPartnerLevel = result.data.list[0]
const partnerObj = {}
for (let i = 0; i < this.partnerLevelList.length; i++) {
const item = this.partnerLevelList[i]
const code = item.code
const codeName = item.codeName
if (!partnerObj[code]) {
partnerObj[code] = codeName
}
}
this.partnerLevelObject = partnerObj
}
})
},
async memCash (type, item) {
const memId = item.memId
const cashStr = item.inputCashAmt
console.log(item)
if (!cashStr) {
await this.onAlert('warningart', 'front.give.moneyInput')
return false
}
if (!memId) {
await this.onAlert('warningart', '회원 아이디를 선택해주세요.')
return false
}
if (!this.isProcessing) {
const cash = Number(cashStr.replace(/,/g, ''))
this.isProcessing = true
const params = {
memId: memId
}
if (type === '-3') {
params.inAmt = cash
} else {
params.outAmt = cash
}
const message = this.$t('front.cash.moneyMoveConfirm', { memNick: memId, cashAmt: cashStr, type: type === '-3' ? '지급' : '회수' })
const confirm = await this.onConfirm(message)
if (confirm) {
this.emitter.emit('Loading', true)
memCashInOut(params, type).then(async response => {
const result = response.data
console.log(result)
this.emitter.emit('Loading', false)
if (result.resultCode === '0') {
if (type === '-3') {
await this.onCheck('지급 완료')
} else {
await this.onCheck('회수 완료')
}
item.inputCashAmt = ''
this.getPartnerMemberList(this.pageInfo.page)
} else {
await this.onAlert('warningart', result.resultMessage)
}
this.isProcessing = false
})
} else {
this.isProcessing = false
}
}
},
updateCashAmt (item, value) {
const parts = item.inputCashAmt.split('.')
const v = parts[0].replace(/\D/g, '')
const dec = parts[1]
// const calcNum = Number((dec !== undefined ? v + '.' + dec : v))
let n = new Intl.NumberFormat('en-EN').format(v)
n = dec !== undefined ? n + '.' + dec : n
if (v === '0' || v === '') {
item.inputCashAmt = ''
} else {
item.inputCashAmt = n
}
},
setMoney (item, value) {
const currentMoney = Number(item.inputCashAmt.replace(/,/g, ''))
console.log(currentMoney)
if (value === 0) {
item.inputCashAmt = (value).toString()
} else {
item.inputCashAmt = (currentMoney + value).toString()
}
this.updateCashAmt(item)
}
}
}
</script>
<style scoped src="@/styles/striNew.css"></style>
<style scoped src="@/styles/common.css"></style>
<style scoped>
.strTablescr {width: 100%;}
@media (max-width: 1000px) {
.strTablescr {width: 100%;}
.strTablePTM ul {padding: 0;}
.strTablePTM li:nth-child(7) {width: 100%;}
}
</style>

View File

@@ -0,0 +1,441 @@
<template>
<div class="tab-content" id="PTtab-12">
<div class="pagenamPT">
<h3 class="pagename2">하부파트너 포인트적립내역</h3>
</div>
<div class="tab-content">
<div class="datesearchPT">
<p>{{$t('front.give.date')}}:
<input type="date" :value="searchForm.startDate" @change="onChangeStartDate"/>
<span>~</span>
<input type="date" :value="searchForm.endDate" @change="onChangeEndDate"/>
</p>
<ul>
<li>
받은 아이디: <input type="text" v-model="searchForm.botMemId"/>
</li>
<li>
성공처리여부:
<select v-model="searchForm.cashStatus">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'1'">{{$t('front.give.ok')}}</option>
<option :value="'-1'">{{$t('front.give.fail')}}</option>
</select>
</li>
<li>
종류:
<select v-model="searchForm.pointType">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'2'">관리자지급</option>
<option :value="'-2'">관리자회수</option>
<option :value="'3'">롤링</option>
<option :value="'-4'">포인트전환</option>
<option :value="'5'">가입첫충이벤트</option>
<option :value="'6'">매일첫충이벤트</option>
<option :value="'7'">매충전이벤트</option>
</select>
</li>
<li>
<a @click="loadData(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</li>
</ul>
</div>
<div class="datesearchM moveM">
<ul>
<li>
<em>{{$t('front.give.date')}}</em>:
<input type="date" :value="searchForm.startDate" @change="onChangeStartDate" class="mobiledate"/>
<span>~</span>
<input type="date" :value="searchForm.endDate" @change="onChangeEndDate" class="mobile_margin mobiledate"/>
</li>
<li>
<em>받은 아이디</em>: <input type="text" v-model="searchForm.botMemId" class="w183"/>
</li>
<li>
<em>성공처리여부</em>:
<select v-model="searchForm.cashStatus" class="w183">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'1'">{{$t('front.give.ok')}}</option>
<option :value="'-1'">{{$t('front.give.fail')}}</option>
</select>
</li>
<li>
<em>종류</em>:
<select v-model="searchForm.pointType" class="w183">
<option :value="''">{{$t('front.gameCategory.all')}}</option>
<option :value="'2'">관리자지급</option>
<option :value="'-2'">관리자회수</option>
<option :value="'3'">롤링</option>
<option :value="'-4'">포인트전환</option>
<option :value="'5'">가입첫충이벤트</option>
<option :value="'6'">매일첫충이벤트</option>
<option :value="'7'">매충전이벤트</option>
</select>
</li>
<li class="PTsch">
<a @click="loadData(1)">
<img src="@/assets/img/search.png" alt=""/>
</a>
</li>
</ul>
</div>
<div class="strTableWrap">
<div class="subMemWrap">
<!-- <p class="p10"></p> -->
<ul class="subPT_1">
<!-- <li>
<a>
<span class="box" :class="userData.partnerLevel">{{partnerLevelName(userData.partnerLevel)}}</span>
{{userData.memId}}
</a>
</li> -->
<h3>하부 파트너 목록<a @click="idlist=!idlist">i</a><span v-if="idlist" @click="idlist=!idlist">아이디 클릭시 목록 출력</span></h3>
<li v-for="(item1) in partnerList" :key="item1.memId" :class="{'morebar':item1.open}">
<span class="arr" v-if="item1.cnt" :class="[item1.partnerLevel, {'moreOn':item1.open}]" @click="listOpen(item1.memId, 'sub', item1)"></span>
<a :class="[item1.partnerLevel, { 'active': selectedLi === item1.memId }]" @click="getMyPartnerList(item1.memId, 'sub', item1)">
<span class="box" :class="item1.partnerLevel">본사</span>
{{item1.memId}}
</a>
<ul class="subPT_2" v-show="item1.open && item1.children">
<li v-for="item2 in item1.children" :key="item2.memId" :class="{'morebar':item2.open}">
<span class="arr" v-if="item2.cnt" :class="[item2.partnerLevel, {'moreOn':item2.open}]" @click="listOpen(item2.memId, 'sub', item2)"></span>
<a :class="[item2.partnerLevel, { 'active': selectedLi === item2.memId }]" @click="getMyPartnerList(item2.memId, 'sub', item2)">
<span class="box" :class="item2.partnerLevel">부본</span>
{{item2.memId}}
</a>
<ul class="subPT_3" v-show="item2.open && item2.children">
<li v-for="item3 in item2.children" :key="item3.memId" :class="{'morebar':item3.open}">
<span class="arr" v-if="item3.cnt" :class="[item3.partnerLevel, {'moreOn':item3.open}]" @click="listOpen(item3.memId, 'sub', item3)"></span>
<a :class="[item3.partnerLevel, { 'active': selectedLi === item3.memId }]" @click="getMyPartnerList(item3.memId, 'sub', item3)">
<span class="box" :class="item3.partnerLevel">{{partnerLevelName(item3.partnerLevel)}}</span>
{{item3.memId}}
</a>
<ul class="subPT_4" v-show="item3.open && item3.children">
<li v-for="item4 in item3.children" :key="item4.memId" :class="{'morebar':item4.open}">
<span class="arr" v-if="item4.cnt" :class="[item4.partnerLevel, {'moreOn':item4.open}]" @click="listOpen(item4.memId, 'sub', item4)"></span>
<a :class="[item4.partnerLevel, { 'active': selectedLi === item4.memId }]" @click="getMyPartnerList(item4.memId, 'sub', item4)">
<span class="box" :class="item4.partnerLevel">{{partnerLevelName(item4.partnerLevel)}}</span>
{{item4.memId}}
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="strTablescr">
<div class="strTablePC">
<table class="strTablePT">
<colgroup>
<col width="10%">
<col width="10%">
<col width="10%">
<col width="17%">
<col width="17%">
<col width="17%">
<col width="17%">
</colgroup>
<thead>
<tr>
<th>IDX</th>
<th>아이디</th>
<th>닉네임</th>
<th>처리내용</th>
<th>포인트 처리 금액</th>
<th>처리 보유 포인트</th>
<th>포인트 처리 일시</th>
</tr>
</thead>
<tbody>
<template v-if="list.length > 0">
<template v-for="(item, index) in list" v-bind:key="item.pointIdx">
<tr>
<td>{{((pageInfo.page-1) * 10) + (index + 1)}}</td>
<td>{{ item.memId }}</td>
<td>{{ item.memNick }}</td>
<td>
<span v-if="item.pointType === '2'">관리자지급 </span>
<span v-if="item.pointType === '-2'">관리자회수 </span>
<span v-if="item.pointType === '3'">롤링 </span>
<span v-if="item.pointType === '-4'">포인트전환 </span>
<span v-if="item.pointType === '5'">가입첫충이벤트 </span>
<span v-if="item.pointType === '6'">매일첫충이벤트 </span>
<span v-if="item.pointType === '7'">매충전이벤트</span>
</td>
<td>{{ thousand(item.pointAmt) }}</td>
<td>{{ thousand(item.prePointAmt) }}</td>
<td>{{ item.pointRegDate.replace('T', ' ') }}</td>
</tr>
</template>
</template>
</tbody>
</table>
</div>
<div class="strTableM">
<div class="strTablePTM">
<template v-if="list.length > 0">
<template v-for="(item, index) in list" v-bind:key="item.pointIdx">
<ul>
<li><em>IDX</em>{{((pageInfo.page-1) * 10) + (index + 1)}}</li>
<li><em>아이디</em>{{ item.memId }}</li>
<li><em>닉네임</em>{{ item.memNick }}</li>
<li>
<em>처리내용</em>
<template v-if="item.pointType === '2'">관리자지급 </template>
<template v-if="item.pointType === '-2'">관리자회수 </template>
<template v-if="item.pointType === '3'">롤링 </template>
<template v-if="item.pointType === '-4'">포인트전환 </template>
<template v-if="item.pointType === '5'">가입첫충이벤트 </template>
<template v-if="item.pointType === '6'">매일첫충이벤트 </template>
<template v-if="item.pointType === '7'">매충전이벤트</template>
</li>
<li><em>포인트 처리 금액</em>{{ thousand(item.pointAmt) }}</li>
<li><em>처리 보유 포인트</em>{{ thousand(item.prePointAmt) }}</li>
<li><em>포인트 처리 일시</em>{{ item.pointRegDate.replace('T', ' ') }}</li>
</ul>
</template>
</template>
<template v-else>
<ul>
<li class="nodata">내역 없음</li>
</ul>
</template>
</div>
</div>
</div>
</div>
<pagination
:pageNum="pageInfo.page"
:pageSize="pageInfo.count_per_list"
:totalCount="pageInfo.tatal_list_count"
:className="'partnerPaging'"
@goToPage="loadData"
/>
</div>
</div>
</template>
<script>
import Pagination from '@/components/ui/Pagination.vue'
import { getDateStr, getSubDaysDate, thousand } from '@/libs/utils'
import {
getRetailMyLoginMem,
partnerLevels,
partnerMyMemIds,
retailMyPartnerDirectList,
subPartnerPointList
} from '@/api/retail'
import { PARTNER_LEVEL_NAME } from '@/libs/constants'
import { mapState } from 'vuex'
export default {
name: 'subpartnerPointList',
components: { Pagination },
data () {
return {
model: {},
selectMemId: '',
selectMem: {
cashAmt: ''
},
cashAmt: '',
list: [],
searchForm: {
topMemId: '',
pointType: '',
cashStatus: '',
botMemId: '',
startDate: getDateStr(getSubDaysDate(new Date(), 7)),
endDate: getDateStr(new Date(), 'yyyy-MM-dd')
},
partnerLevelList: [],
partnerList: [],
selectPartnerCode: '',
myMemIdsList: [],
isProcessing: false,
loginMemList: [],
selectedLi: null,
idlist: false
}
},
watch: {
selectPartnerCode () {
if (this.selectPartnerCode) {
this.selectMem.cashAmt = ''
this.getMyMemIds()
}
},
selectMem () {
if (this.selectMem) {
this.selectMem.cashAmt = thousand(this.selectMem.cashAmt)
}
}
},
computed: {
...mapState([
'userData'
]),
formattedCashAmt () {
if (!this.cashAmt) return ''
return this.cashAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}
},
async created () {
this.getPartnerLevels()
await this.getLoginMember()
this.getMyPartnerList(this.userData.memId)
this.loadData()
},
methods: {
thousand,
partnerLevelName (partnerLevel) {
return PARTNER_LEVEL_NAME[partnerLevel]
},
async getLoginMember () {
const res = await getRetailMyLoginMem()
console.log(res)
const result = res.data
if (result.resultCode === '0') {
this.loginMemList = result.data.loginMemList
}
},
parseFormattedValue (value) {
return value.replace(/,/g, '')
},
getMyMemIds () {
const params = {
code: this.selectPartnerCode,
masterCode: 'partner'
}
partnerMyMemIds(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.myMemIdsList = result.data.memIds
}
})
},
listOpen (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
retailMyPartnerDirectList(params).then(res => {
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
item.open = !item.open
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getMyPartnerList (memId, type, item) {
this.emitter.emit('Loading', true)
const params = {
memId: memId
}
this.searchMemId = memId
console.log('[REQ]retailMyPartnerDirectList : ', params)
retailMyPartnerDirectList(params).then(res => {
console.log('[RES]retailMyPartnerDirectList : ', res.data)
const result = res.data
if (result.resultCode === '0') {
const list = result.data.list
if (type === 'sub') {
item.children = list
item.open = true
if (this.selectedLi === memId) {
this.selectedLi = memId
} else {
this.selectedLi = memId
}
this.loadData(1)
} else {
this.partnerList = list
}
}
this.emitter.emit('Loading', false)
})
},
getPartnerLevels () {
partnerLevels({}).then(res => {
const result = res.data
if (result.resultCode === '0') {
this.partnerLevelList = result.data.list
}
})
},
onChangeStartDate (event) {
const startDate = event.target.value
this.searchForm.startDate = startDate
},
onChangeEndDate (event) {
const endDate = event.target.value
this.searchForm.endDate = endDate
},
loadData (page) {
if (!page) {
page = this.pageInfo.page
}
if (this.selectedLi) {
this.searchForm.topMemId = this.selectedLi
}
const form = JSON.parse(JSON.stringify(this.searchForm))
form.startDate += ' 00:00:00'
form.endDate += ' 23:59:59'
form.pointTypeList = []
// form.page = page
if (form.pointType) {
form.pointTypeList.push(form.pointType)
}
const params = {
...form,
page: page,
count_per_list: 40
}
this.emitter.emit('Loading', true)
console.log('subPartnerPointList : ', params)
subPartnerPointList(params).then(response => {
this.emitter.emit('Loading', false)
console.log('subPartnerPointList : ', response)
const result = response.data
if (result.resultCode === '0') {
this.list = result.data.list
if (result.data.pageInfo) {
this.pageInfo = result.data.pageInfo
}
}
})
}
}
}
</script>
<style scoped src="@/styles/striNew.css"></style>
<style scoped>
.datesearchPT input[type="date"]::-webkit-calendar-picker-indicator{/*background: url(../../../assets/img/PTcalender.svg);display: block;background-repeat: no-repeat;background-size: contain;*/}
.strTablescr {width: 100%;}
@media (max-width: 1000px) {
.strTablescr {width: 100%;}
.strTablePTM ul {padding: 0;}
.strTablePTM li:nth-child(5), .strTablePTM li:nth-child(6), .strTablePTM li:nth-child(7) {width: 100%;}
}
</style>

59
src/views/warning.vue Normal file
View File

@@ -0,0 +1,59 @@
<template>
<div class="checkWrapBg">
<div class="checkWrap">
<img src="@/assets/img/checkImg.svg" />
<h1>지금은 사이트 점검 중입니다.</h1>
<p>사이트 점검시간 : {{dateStrKorean(siteCheck ? siteCheck.startDate:null)}} ~ {{dateStrKorean(siteCheck ? siteCheck.endDate:null)}}</p>
<span>{{title}} 에서는 보다 나은 서비스를 제공하기 위해 시스템 점검이 진행될 예정입니다.<br />시스템 점검으로 인해 서비스 이용에 불편을 드리는 양해 부탁드립니다.</span>
<em>{{title}}</em>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import store from '@/store'
export default {
name: 'check',
components: {
},
data () {
return {
title: process.env.VUE_APP_TITLE || 'Moka'
}
},
created () {
this.loadCheckOption()
},
computed: {
...mapState([
'siteCheck'
])
},
methods: {
loadCheckOption () {
store.dispatch('storeSiteCheck')
}
}
}
</script>
<style scoped>
.checkWrapBg {background: #000;height: 100vh;display: flex;align-items: center;justify-content: center;}
.checkWrap {text-align: center;color: #fff;}
.checkWrap h1 {font-size: 40px;}
.checkWrap p {font-size: 22px;margin-top: 10px;}
.checkWrap span {margin-top: 30px;display: block;font-size: 16px;line-height: 1.5em;}
.checkWrap em {padding: 110px 0 80px;display: block;font-size: 29px;font-weight: bold;}
@media (max-width: 700px) {
.checkWrap {padding: 0 20px 80px;}
.checkWrap img {width: 330px;}
.checkWrap h1 {font-size: 26px;}
.checkWrap p {font-size: 14px;}
.checkWrap span {margin-top: 30px;font-size: 14px;}
.checkWrap span br {display: none;}
.checkWrap em {padding: 70px 0 40px;}
}
</style>
<style scoped src="@/styles/common.css"></style>
<style scoped src="@/styles/subcommon.css"></style>