TC 기능 수정 / 디자인 수정 변경

This commit is contained in:
kimre
2022-07-15 14:21:03 +09:00
parent a4e5cde9f6
commit 34e7957081
91 changed files with 9087 additions and 8673 deletions

View File

@@ -130,7 +130,7 @@ max-height: 90vh; overflow: auto;}/*스크린 height 100%를 벗어나는 긴
.popup .pop-cont {} .popup .pop-cont {}
.popup .pop-cont p {font-size: 16px; color: #666666; font-weight: 400; letter-spacing: -0.8px; line-height: 100%;} .popup .pop-cont p {font-size: 16px; color: #666666; font-weight: 400; letter-spacing: -0.8px; line-height: 100%;}
.popup .pop-cont p + p {margin-top: 10px;} .popup .pop-cont p + p {margin-top: 10px;}
.popup .popup-btn1 {display: flex; justify-content: flex-start; align-items: center; margin: 35px 0 25px;} .popup .popup-btn1 {display: flex; justify-content: center; align-items: center; margin: 35px 0 25px;}
.popup .popup-btn2 {display: flex; justify-content: space-between; align-items: center; margin: 35px 0 25px;} .popup .popup-btn2 {display: flex; justify-content: space-between; align-items: center; margin: 35px 0 25px;}
.popup .popup-btn1 button {width: 49%; height: 40px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;} .popup .popup-btn1 button {width: 49%; height: 40px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;}
.popup .popup-btn2 button {width: 49%; height: 40px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;} .popup .popup-btn2 button {width: 49%; height: 40px; font-size: 16px; font-weight: 400; letter-spacing: -1.1px;}

View File

@@ -1708,7 +1708,6 @@ header .user_wrap .user_info .logout {
} }
.essential span{ .essential span{
color:#eb008b;
padding-right: 3px; padding-right: 3px;
} }

View File

@@ -8,7 +8,7 @@
<a href="javascript:void(0)" class="btn_user">{{ this.$store.getters['login/userId'] }}</a> <a href="javascript:void(0)" class="btn_user">{{ this.$store.getters['login/userId'] }}</a>
</div> </div>
<div class="user_info"> <div class="user_info">
<a href="javascript:void(0)" class="modify">정보수정</a> <!-- <a href="javascript:void(0)" class="modify">정보수정</a>-->
<a href="javascript:void(0)" class="logout" @click="logout();">로그아웃</a> <a href="javascript:void(0)" class="logout" @click="logout();">로그아웃</a>
</div> </div>
</div> </div>

View File

@@ -1,141 +0,0 @@
<template>
<!-- <div class="dimmed" @click="calendarCancel();"></div>-->
<div class="datepicker">
<div class="datepicker-head">
<div class="datepicker-btn">
<a href="#" class="datepicker-prev" @click="calendarData(-1)"><span></span></a>
<a href="#" class="datepicker-next" @click="calendarData(1)"><span></span></a></div>
<div class="datepicker-title">
<span>{{ year }}.</span>
<span>{{ month }}</span>
</div>
</div>
<table class="datepicker-calender">
<tbody>
<tr v-for="(date, idx) in dates" :key="idx">
<td v-for="(day, secondIdx) in date"
:key="secondIdx"
:class="{
'disabled': idx === 0 && day >= lastMonthStart || dates.length - 1 === idx && nextMonthStart > day,
'today': day === today && month === currentMonth && year === currentYear
}"
>
<a href="#" @click="selectDay(day)">{{ day }}</a>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
export default {
data() {
return {
dates: [],
currentYear: 0,
currentMonth: 0,
year: 0,
month: 0,
lastMonthStart: 0,
nextMonthStart: 0,
today: 0,
};
},
created() { // 데이터에 접근이 가능한 첫 번째 라이프 사이클
const date = new Date();
this.currentYear = date.getFullYear(); // 이하 현재 년, 월 가지고 있기
this.currentMonth = date.getMonth() + 1;
this.year = this.currentYear;
this.month = this.currentMonth;
this.today = date.getDate(); // 오늘 날짜
this.calendarData();
},
methods: {
calendarData(arg) { // 인자를 추가
if (arg < 0) { // -1이 들어오면 지난 달 달력으로 이동
this.month -= 1;
} else if (arg === 1) { // 1이 들어오면 다음 달 달력으로 이동
this.month += 1;
}
if (this.month === 0) { // 작년 12월
this.year -= 1;
this.month = 12;
} else if (this.month > 12) { // 내년 1월
this.year += 1;
this.month = 1;
}
const [
monthFirstDay,
monthLastDate,
lastMonthLastDate,
] = this.getFirstDayLastDate(this.year, this.month);
this.dates = this.getMonthOfDays(
monthFirstDay,
monthLastDate,
lastMonthLastDate,
);
console.log(this.lastMonthStart)
},
getFirstDayLastDate(year, month) {
const firstDay = new Date(year, month - 1, 1).getDay(); // 이번 달 시작 요일
const lastDate = new Date(year, month, 0).getDate(); // 이번 달 마지막 날짜
let lastYear = year;
let lastMonth = month - 1;
if (month === 1) {
lastMonth = 12;
lastYear -= 1;
}
const prevLastDate = new Date(lastYear, lastMonth, 0).getDate(); // 지난 달 마지막 날짜
return [firstDay, lastDate, prevLastDate];
},
getMonthOfDays(
monthFirstDay,
monthLastDate,
prevMonthLastDate,
) {
let day = 1;
let prevDay = (prevMonthLastDate - monthFirstDay) + 1;
const dates = [];
let weekOfDays = [];
while (day <= monthLastDate) {
if (day === 1) {
// 1일이 어느 요일인지에 따라 테이블에 그리기 위한 지난 셀의 날짜들을 구할 필요가 있다.
for (let j = 0; j < monthFirstDay; j += 1) {
if (j === 0) this.lastMonthStart = prevDay; // 지난 달에서 제일 작은 날짜
weekOfDays.push(prevDay);
prevDay += 1;
}
}
weekOfDays.push(day);
if (weekOfDays.length === 7) {
// 일주일 채우면
dates.push(weekOfDays);
weekOfDays = []; // 초기화
}
day += 1;
}
const len = weekOfDays.length;
if (len > 0 && len < 7) {
for (let k = 1; k <= 7 - len; k += 1) {
weekOfDays.push(k);
}
}
if (weekOfDays.length > 0) dates.push(weekOfDays); // 남은 날짜 추가
this.nextMonthStart = weekOfDays[0]; // 이번 달 마지막 주에서 제일 작은 날짜
return dates;
},
selectDay(day){
const year = this.year
const month = this.month.toString().length < 2 ? '0'+ this.month : this.month
const dd = day.toString().length < 2 ? '0' + day : day;
const getDate = year + '-' + month + '-' + dd
this.$parent.calendarCalbackFnc(getDate);
},
calendarCancel(){
this.$parent.openEndPicker= false
this.$parent.openStartPicker= false
}
},
};
</script>

View File

@@ -2,10 +2,10 @@
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed modal01" @click="alertModalCancel();"></div> <div class="dimmed alertCommon" @click="alertModalCancel();"></div>
<div class="popup-wrap modal01"> <div class="popup-wrap alertCommon">
<!-- 로그인실패: 확인 --> <!-- 로그인실패: 확인 -->
<div class="popup modal01"> <div class="popup alertCommon">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">{{title}}</h3> <h3 class="pop-tit">{{title}}</h3>
</div> </div>
@@ -79,7 +79,9 @@ export default {
}, },
methods :{ methods :{
alertModalOpen(props){ alertModalOpen(props){
var dimmed = document.getElementsByClassName('modal01'); console.log("@@@@@@@@@@")
console.log(props)
var dimmed = document.getElementsByClassName('alertCommon');
for(var i = 0; i < dimmed.length; i++){ for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
@@ -90,13 +92,13 @@ export default {
this.msg4 = props.msg4; this.msg4 = props.msg4;
}, },
alertModalClose(){ alertModalClose(){
var dimmed = document.getElementsByClassName('modal01'); var dimmed = document.getElementsByClassName('alertCommon');
for(var i = 0; i < dimmed.length; i++){ for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
}, },
alertModalCancel(){ alertModalCancel(){
var dimmed = document.getElementsByClassName('modal01'); var dimmed = document.getElementsByClassName('alertCommon');
for(var i = 0; i < dimmed.length; i++){ for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }

View File

@@ -9,82 +9,80 @@
<div class="title">상세 정보</div> <div class="title">상세 정보</div>
</div> </div>
<div class="table table_form m50"> <div class="table table_form m50">
<form autocomplete="off"> <table>
<table> <colgroup>
<colgroup> <col style="width:140px">
<col style="width:140px"> <col style="width:auto">
<col style="width:auto"> <col style="width:auto">
<col style="width:auto"> <col style="width:140px">
<col style="width:140px"> <col style="width:auto">
<col style="width:auto"> <col style="width:auto">
<col style="width:auto"> </colgroup>
</colgroup> <tbody>
<tbody> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>가입일</th>
<th>가입일</th> <td colspan="2"><input type="text" disabled v-model="subsDt"></td>
<td colspan="2"><input type="text" disabled v-model="subsDt"></td> <th>상태</th>
<th>상태</th> <td colspan="2"><input type="text" disabled v-model="subsSttusNm"></td>
<td colspan="2"><input type="text" disabled v-model="subsSttusCd"></td> </tr>
</tr> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>고객사</th>
<th>고객사</th> <td colspan="2"><input type="text" disabled v-model="custNm"></td>
<td colspan="2"><input type="text" disabled v-model="custNm"></td> <th>요금제</th>
<th>요금제</th> <td colspan="2"><input type="text" disabled v-model="plan"></td>
<td colspan="2"><input type="text" disabled v-model="plan"></td> </tr>
</tr> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>대표자</th>
<th>대표자</th> <td colspan="2"><input type="text" disabled v-model="reprNm"></td>
<td colspan="2"><input type="text" disabled v-model="reprNm"></td> <th>사용자 구분</th>
<th>사용자 구분</th> <td colspan="2"><input type="text" disabled v-model="custTyNm"></td>
<td colspan="2"><input type="text" disabled v-model="custTyCd"></td> </tr>
</tr> <tr class="tr_input">
<tr class="tr_input"> <th>사업자등록번호</th>
<th>사업자등록번호</th> <td colspan="2">
<td colspan="2"> <div class="input-bnumber">
<div class="input-bnumber"> <input type="text" disabled v-model="bizrno1">
<input type="text" disabled v-model="bizrno1"> <input type="text" disabled v-model="bizrno2">
<input type="text" disabled v-model="bizrno2"> <input type="text" disabled v-model="bizrno3">
<input type="text" disabled v-model="bizrno3"> </div>
</div> </td>
</td> <th>법인등록번호</th>
<th>법인등록번호</th> <td colspan="2">
<td colspan="2"> <div class="input-double">
<div class="input-double"> <input type="text" disabled v-model="cprRegNo1">
<input type="text" disabled v-model="cprRegNo1"> <input type="text" disabled v-model="cprRegNo2">
<input type="text" disabled v-model="cprRegNo2"> </div>
</div> </td>
</td> </tr>
</tr> <tr class="tr_input">
<tr class="tr_input"> <th>사업장 주소</th>
<th>사업장 주소</th> <td colspan="5">
<td colspan="5"> <div class="input-address">
<div class="input-address"> <input type="text" disabled v-model="adr1">
<input type="text" disabled v-model="adr1"> <input type="text" disabled v-model="adr2">
<input type="text" disabled v-model="adr2"> <input type="text" disabled v-model="adr3">
<input type="text" disabled v-model="adr3"> </div>
</div> </td>
</td> </tr>
</tr> <tr class="tr_input">
<tr class="tr_input"> <th>유치자명</th>
<th>유치자명</th> <td colspan="2">
<td colspan="2"> <div class="input-double">
<div class="input-double"> <input type="text" disabled v-model="channelId">
<input type="text" disabled v-model="channelId"> <input type="text" disabled v-model="channelNm">
<input type="text" disabled v-model="channelNm"> </div>
</div> </td>
</td> <th>관리자명</th>
<th>관리자명</th> <td colspan="2">
<td colspan="2"> <div class="input-double">
<div class="input-double"> <input type="text" disabled v-model="adminId">
<input type="text" disabled v-model="adminId"> <input type="text" disabled v-model="adminNm">
<input type="text" disabled v-model="adminNm"> <button type="button" class="button grey btn-a" @click="searchIDPopOpen">변경</button>
<button type="button" class="button grey btn-a" @click="searchIDPopOpen">변경</button> </div>
</div> </td>
</td> </tr>
</tr> </tbody>
</tbody> </table>
</table>
</form>
</div> </div>
<div class="info"> <div class="info">
<div class="count">발송건수 <div class="count">발송건수
@@ -96,49 +94,49 @@
</div> </div>
<div class="table calculate"> <div class="table calculate">
<form autocomplete="off"> <form autocomplete="off">
<table class="table-r"> <table class="table-r">
<colgroup> <colgroup>
<col width="16%"> <col width="16%">
<col width="16%"> <col width="16%">
<col width="16%"> <col width="16%">
<col width="16%"> <col width="16%">
<col width="16%"> <col width="16%">
<col width="20%"> <col width="20%">
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th rowspan="2">날짜</th> <th rowspan="2">날짜</th>
<th colspan="5">채널별 발송 건수</th> <th colspan="5">채널별 발송 건수</th>
</tr> </tr>
<tr class="total"> <tr class="total">
<th>전체</th> <th>전체</th>
<th>SMS</th> <th>SMS</th>
<th>LMS</th> <th>LMS</th>
<th>MMS</th> <th>MMS</th>
<th>알림톡</th> <th>알림톡</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>합계</td> <td>합계</td>
<td>{{sndCntTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ sndCntTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{sndCntSTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ sndCntSTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{sndCntLTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ sndCntLTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{sndCntMTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ sndCntMTotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{sndCntATotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ sndCntATotal.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
</tr> </tr>
<tr v-for="(option, i) in list" v-bind:key="i"> <tr v-for="(option, i) in list" v-bind:key="i">
<td>{{option.sumYm}}</td> <td>{{ option.sumYm }}</td>
<td>{{option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{option.sndCntA.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}}</td> <td>{{ option.sndCntA.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</form> </form>
</div> </div>
<div class="pop-btn2"> <div class="pop-btn2">
@@ -156,92 +154,95 @@ import channelMgtApi from '../service/channelMgtApi';
import moment from 'moment'; import moment from 'moment';
import xlsx from '@/common/excel'; import xlsx from '@/common/excel';
import AdminNmPop from '../../custMgt/components/AdminNmPop'; import AdminNmPop from '../../custMgt/components/AdminNmPop';
export default { export default {
name: "channelDetail", name: "channelDetail",
data(){ data() {
return{ return {
row: {}, row: {},
subsDt: '', subsDt: '',
norgNm: '', norgNm: '',
userSeq: '', userSeq: '',
loginId: '', loginId: '',
custNm: '', custNm: '',
bizrno: '', bizrno: '',
bizrno1: '', bizrno1: '',
bizrno2: '', bizrno2: '',
bizrno3: '', bizrno3: '',
userNm: '', userNm: '',
subsSttusCd: '', subsSttusCd: '',
custTyCd: '', custTyCd: '',
sndCnt: '', sndCnt: '',
adr1: '', adr1: '',
adr2: '', adr2: '',
adr3: '', adr3: '',
cprRegNo: '', cprRegNo: '',
cprRegNo1: '', cprRegNo1: '',
cprRegNo2: '', cprRegNo2: '',
adminId: '', adminId: '',
adminNm: '', adminNm: '',
channelId: '', channelId: '',
channelNm: '', channelNm: '',
reprNm: '', reprNm: '',
plan: '', plan: '',
sumYm: '', sumYm: '',
sndCntS: '', sndCntS: '',
sndCntL: '', sndCntL: '',
sndCntM: '', sndCntM: '',
sndCntA: '', sndCntA: '',
succCnt: '', succCnt: '',
succCntS: '', succCntS: '',
succCntL: '', succCntL: '',
succCntM: '', succCntM: '',
succCntA: '', succCntA: '',
sndCntTotal: 0, sndCntTotal: 0,
sndCntSTotal: 0, sndCntSTotal: 0,
sndCntLTotal: 0, sndCntLTotal: 0,
sndCntMTotal: 0, sndCntMTotal: 0,
sndCntATotal: 0, sndCntATotal: 0,
list:[], list: [],
totalCnt: '', totalCnt: '',
props: {}, props: {},
excelHeader: [], excelHeader: [],
pageType:'CHANNELDETAIL', pageType: 'CHANNELDETAIL',
serviceId:'', serviceId: '',
} subsSttusNm: '',
custTyNm: '',
}
},
props: {
userSeq: {
type: String,
default: "",
}, },
props: { },
userSeq: { components: {
type: String,
default: "",
},
},
components: {
channelMgtApi, channelMgtApi,
AdminNmPop, AdminNmPop,
}, },
created(){ created() {
console.log(this.$route.params.userSeq); console.log(this.$route.params.userSeq);
this.loginId = this.$route.params.loginId; this.loginId = this.$route.params.loginId;
this.getExcelHeader(); this.getExcelHeader();
this.channelDetail(this.$route.params.userSeq); this.channelDetail(this.$route.params.userSeq);
}, },
methods :{ methods: {
async channelDetail(userSeq){ async channelDetail(userSeq) {
this.row.userSeq = userSeq; this.row.userSeq = userSeq;
try { try {
const response = await channelMgtApi.channelDetail(this.row); const response = await channelMgtApi.channelDetail(this.row);
const result = response.data; const result = response.data;
console.log(result); console.log(result);
var sndCntTotal=0; var sndCntTotal = 0;
var sndCntSTotal=0; var sndCntSTotal = 0;
var sndCntLTotal=0; var sndCntLTotal = 0;
var sndCntMTotal=0; var sndCntMTotal = 0;
var sndCntATotal=0; var sndCntATotal = 0;
if(result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
//데이터값이 널이면 오류처리 //데이터값이 널이면 오류처리
for(var i = 0; i < result.data.list.length; i++ ){ for (var i = 0; i < result.data.list.length; i++) {
console.log('[succCnt]:'+result.data.list[i].succCnt); console.log('[succCnt]:' + result.data.list[i].succCnt);
sndCntTotal = sndCntTotal + Number(result.data.list[i].sndCnt); sndCntTotal = sndCntTotal + Number(result.data.list[i].sndCnt);
sndCntSTotal = sndCntSTotal + Number(result.data.list[i].sndCntS) sndCntSTotal = sndCntSTotal + Number(result.data.list[i].sndCntS)
sndCntLTotal = sndCntLTotal + Number(result.data.list[i].sndCntL) sndCntLTotal = sndCntLTotal + Number(result.data.list[i].sndCntL)
@@ -265,30 +266,32 @@ export default {
this.reprNm = result.data.reprNm; this.reprNm = result.data.reprNm;
this.bizrno = result.data.bizrno; this.bizrno = result.data.bizrno;
this.channelId = result.data.channelId; this.channelId = result.data.channelId;
this.channelNm = result.data.channelNm; this.channelNm = result.data.channelNm;
this.adminId = result.data.adminId; this.adminId = result.data.adminId;
this.adminNm = result.data.adminNm; this.adminNm = result.data.adminNm;
this.cprRegNo = result.data.cprRegNo; this.cprRegNo = result.data.cprRegNo;
this.adr1 = result.data.adr1; this.adr1 = result.data.adr1;
this.adr2 = result.data.adr2; this.adr2 = result.data.adr2;
this.adr3 = result.data.adr3; this.adr3 = result.data.adr3;
this.custTyCd = result.data.custTyCd; this.custTyCd = result.data.custTyCd;
this.plan = result.data.plan; this.plan = result.data.plan;
if(this.bizrno != '' && this.bizrno != null){ this.subsSttusNm = result.data.subsSttusNm;
this.bizrno1 = this.bizrno.substr(0, 3); this.custTyNm = result.data.custTyNm;
this.bizrno2 = this.bizrno.substr(3, 2); if (this.bizrno != '' && this.bizrno != null) {
this.bizrno3 = this.bizrno.substr(5); this.bizrno1 = this.bizrno.substr(0, 3);
} this.bizrno2 = this.bizrno.substr(3, 2);
if(this.cprRegNo != '' && this.cprRegNo != null){ this.bizrno3 = this.bizrno.substr(5);
this.cprRegNo1 = this.cprRegNo.substr(0, 6); }
this.cprRegNo2 = this.cprRegNo.substr(6); if (this.cprRegNo != '' && this.cprRegNo != null) {
} this.cprRegNo1 = this.cprRegNo.substr(0, 6);
this.cprRegNo2 = this.cprRegNo.substr(6);
}
this.serviceId = result.data.userId; this.serviceId = result.data.userId;
} }
} catch (error) { } catch (error) {
} }
}, },
@@ -297,7 +300,7 @@ export default {
channelMgtApi.getExcelHeader(this.pageType).then(res => { channelMgtApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res; this.excelHeader = res;
}); });
}, },
async excelDown() { async excelDown() {
if (this.list.length <= 0) { if (this.list.length <= 0) {
@@ -315,9 +318,10 @@ export default {
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {}); xlsx.export(data.list, saveFileName, options).then(() => {
});
}, },
async getExcelDataDown() { async getExcelDataDown() {
try { try {
let response; let response;
@@ -327,7 +331,7 @@ export default {
// sndCntM: this.sndCntM, // sndCntM: this.sndCntM,
// sndCntA: this.sndCntA, // sndCntA: this.sndCntA,
userSeq: this.userSeq userSeq: this.userSeq
}; };
response = await channelMgtApi.sendNumberListExcel(params); response = await channelMgtApi.sendNumberListExcel(params);
@@ -335,7 +339,7 @@ export default {
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
return result.data; return result.data;
}else{ } else {
return false; return false;
} }
} catch (err) { } catch (err) {
@@ -343,21 +347,20 @@ export default {
} }
}, // end of getExcelDataDown }, // end of getExcelDataDown
goChannelList() { goChannelList() {
this.$router.push({ name: 'channelList'}); this.$router.push({name: 'channelList'});
}, },
searchIDPopOpen: function(){ searchIDPopOpen: function () {
console.log('>>> serviceId:'+this.serviceId); console.log('>>> serviceId:' + this.serviceId);
var params = { var params = {
"serviceId": this.serviceId, "serviceId": this.serviceId,
"serviceSeq": this.row.userSeq, "serviceSeq": this.row.userSeq,
"parentDiv": 'channelDetail' "parentDiv": 'channelDetail'
} }
this.$refs.adminNmPop.ModalOpen(params); this.$refs.adminNmPop.ModalOpen(params);
}, },
} }
} }
</script> </script>

View File

@@ -5,12 +5,11 @@
<h3 class="title">유치채널현황</h3> <h3 class="title">유치채널현황</h3>
<p class="breadcrumb">유치현황관리 &gt; 유치채널현황</p> <p class="breadcrumb">유치현황관리 &gt; 유치채널현황</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="group">
<div class="group"> <div class="input_box cal">
<div class="input_box cal"> <label for="right" class="label">조회기간</label>
<label for="right" class="label">조회기간</label> <div class="term">
<div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
@@ -21,7 +20,7 @@
@closed="closeDate('start')" @closed="closeDate('start')"
></vuejs-datepicker> ></vuejs-datepicker>
</span>~ </span>~
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
@@ -31,56 +30,59 @@
@closed="closeDate('end')" @closed="closeDate('end')"
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div>
</div>
<div class="select_box id">
<label for="subsSttusCd" class="label">상태</label>
<select name="subsSttusCd" id="subsSttusCd" v-model="grid.params.subsSttusCd" @keyup.enter="search">
<option value="" selected>전체</option>
<option v-for="(option, i) in subsSttusCdList" v-bind:value="option.code" v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
<div class="select_box">
<label for="custTyCd" class="label">구분</label>
<select name="custTyCd" id="custTyCd" v-model="grid.params.custTyCd" @keyup.enter="search">
<option value="" selected>전체</option>
<option v-for="(option, i) in custTyCdList" v-bind:value="option.code" v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
<div class="input_box">
<label for="right" class="label">유치자 마당ID</label>
<input class="" type="text" id="" placeholder="검색어 입력" v-model="grid.params.loginId"/>
</div>
<div class="input_box">
<label for="right" class="label">유치업체</label>
<input class="" type="text" id="" placeholder="검색어 입력" v-model="grid.params.norgNm"/>
</div> </div>
</div> </div>
<div class="group"> <div class="select_box id">
<div class="select_box"> <label for="subsSttusCd" class="label">상태</label>
<label for="right" class="label">상세검색</label> <select name="subsSttusCd" id="subsSttusCd" v-model="grid.params.subsSttusCd" @keyup.enter="search">
<select name="searchType" id="searchType" v-model="searchType" @keyup.enter="search"> <option value="" selected>전체</option>
<option value="01">고객사명</option> <option v-for="(option, i) in subsSttusCdList" v-bind:value="option.code" v-bind:key="i">
<option value="02">이름</option> {{ option.codeNm }}
<option value="03">사업자등록번호(생년월일)</option> </option>
</select> </select>
</div> </div>
<div class="input_box"> <div class="select_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText"/> <label for="custTyCd" class="label">구분</label>
</div> <select name="custTyCd" id="custTyCd" v-model="grid.params.custTyCd" @keyup.enter="search">
<button type="button" class="button grey" @click="search">조회</button> <option value="" selected>전체</option>
<option v-for="(option, i) in custTyCdList" v-bind:value="option.code" v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
<div class="input_box">
<label for="right" class="label">유치자 마당ID</label>
<input class="" type="text" id="" placeholder="검색어 입력" v-model.trim="grid.params.loginId" maxlength="50"/>
</div>
<div class="input_box">
<label for="right" class="label">유치업체</label>
<input class="" type="text" id="" placeholder="검색어 입력" v-model.trim="grid.params.norgNm" maxlength="50"/>
</div> </div>
</div> </div>
</form> <div class="group">
<div class="select_box">
<label for="right" class="label">상세검색</label>
<select name="searchType" id="searchType" v-model="searchType" @keyup.enter="search">
<option value="01">고객사명</option>
<option value="02">이름</option>
<option value="03">사업자등록번호</option>
</select>
</div>
<div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력"
v-model.trim="grid.params.searchText" maxlength="100"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info"> <div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe"> <div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> <select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option> <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
option.text
}}
</option>
</select> </select>
</div> </div>
</div> </div>
@@ -111,8 +113,6 @@
</div> </div>
</div> </div>
</template> </template>
@@ -130,7 +130,7 @@ class CustomATagRenderer {
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
@@ -140,7 +140,7 @@ class CustomATagRenderer {
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
@@ -157,19 +157,19 @@ export default {
startDate: new Date(), startDate: new Date(),
endDate: new Date(), endDate: new Date(),
row:{}, row: {},
pageType:'CHANNEL', pageType: 'CHANNEL',
subsSttusCdList:[], subsSttusCdList: [],
custTyCdList:[], custTyCdList: [],
openPicker: false, openPicker: false,
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
searchType:'01', searchType: '01',
totalItems: 0, totalItems: 0,
grid: { grid: {
url: '/api/v1/bo/attractMgt/channelList', url: '/api/v1/bo/attractMgt/channelList',
@@ -180,29 +180,28 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
columns: [ columns: [
{ name: 'no', header: 'No', align: 'center', width: '6%'}, {name: 'no', header: 'No', align: 'center', width: '6%'},
{ name: 'subsDt', header: '가입일', align: 'center', width: '11%'}, {name: 'subsDt', header: '가입일', align: 'center', width: '11%'},
{ name: 'norgNm', header: '유치업체', align: 'center', width: '10%'}, {name: 'norgNm', header: '유치업체', align: 'center', width: '10%'},
{ name: 'userSeq', header: '사용자일련번호', align: 'center', width: '10%', hidden:true}, {name: 'userSeq', header: '사용자일련번호', align: 'center', width: '10%', hidden: true},
{ name: 'loginId', header: '마당ID(이름)', align: 'center', width: '10%', renderer: { {
name: 'loginId', header: '마당ID(이름)', align: 'center', width: '10%', renderer: {
type: CustomATagRenderer type: CustomATagRenderer
, options: { , options: {
callback: this.channelDetail, callback: this.channelDetail,
} }
} }
}, },
{ name: 'custNm', header: '고객사명', align: 'center', width: '10%'}, {name: 'custNm', header: '고객사명', align: 'center', width: '10%'},
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '12%' {name: 'bizrno', header: '사업자번호', align: 'center', width: '12%'},
,formatter: props => { {name: 'userNm', header: '이름', align: 'center', width: '10%'},
let result = props.bizrno.substring(0,3)+'-'+ props.bizrno.substring(3,5)+'-'+ props.bizrno.substring(5,10) {name: 'subsSttusCd', header: '상태', align: 'center', width: '10%', hidden: true},
return result; {name: 'subsSttusNm', header: '상태', align: 'center', width: '10%'},
} {name: 'custTyCd', header: '구분', align: 'center', width: '10%', hidden: true},
}, {name: 'custTyNm', header: '구분', align: 'center', width: '10%'},
{ name: 'userNm', header: '이름', align: 'center', width: '10%'}, {
{ name: 'subsSttusCd', header: '상태', align: 'center', width: '10%'}, name: 'sndCnt', header: '전체발송건수', align: 'center', width: '11%',
{ name: 'custTyCd', header: '구분', align: 'center', width: '10%'}, formatter: props => {
{ name: 'sndCnt', header: '전체발송건수', align: 'center', width: '11%',
formatter: props =>{
let result = props.sndCnt; let result = props.sndCnt;
//.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); //.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
@@ -213,14 +212,16 @@ export default {
params: { params: {
searchType: '01', searchType: '01',
searchType1: '', searchType1: '',
searchText: '', searchText: '',
subsStDt: '', subsStDt: '',
subsEdDt: '', subsEdDt: '',
subsSttusCd: '', subsSttusCd: '',
subsSttusNm: '',
loginId: '', loginId: '',
norgNm: '', norgNm: '',
sndCnt: '', sndCnt: '',
custTyCd: '', custTyCd: '',
custTyNm: '',
}, },
excelHeader: [] excelHeader: []
} }
@@ -231,11 +232,11 @@ export default {
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
this.setCodeData(); this.setCodeData();
this.getExcelHeader(); this.getExcelHeader();
this.setPeriodDay(0); this.setPeriodDay(0);
// this.grid.params.subsSttusCd = ''; // this.grid.params.subsSttusCd = '';
// this.grid.params.searchType = '01'; // this.grid.params.searchType = '01';
// this.$refs.searchType_. // this.$refs.searchType_.
@@ -248,7 +249,7 @@ export default {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
@@ -261,19 +262,19 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log('this.perPageCnt'+this.perPageCnt); console.log('this.perPageCnt' + this.perPageCnt);
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType this.grid.params.searchType1 = this.searchType
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -283,7 +284,7 @@ export default {
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage); console.log("getCondition : " + getCondition.perPage);
}, },
async getExcelDataDown() { async getExcelDataDown() {
try { try {
@@ -303,7 +304,7 @@ export default {
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
return result.data; return result.data;
}else{ } else {
return false; return false;
} }
} catch (err) { } catch (err) {
@@ -323,14 +324,15 @@ export default {
const saveFileName = `유치채널현황_${today}.xlsx`; const saveFileName = `유치채널현황_${today}.xlsx`;
const data = await this.getExcelDataDown(); const data = await this.getExcelDataDown();
console.log('-------------------------'); console.log('-------------------------');
console.log(data); console.log(data);
let options = { let options = {
header: this.excelHeader, header: this.excelHeader,
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {}); xlsx.export(data.list, saveFileName, options).then(() => {
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
@@ -338,21 +340,21 @@ export default {
this.excelHeader = res; this.excelHeader = res;
}); });
}, },
channelDetail(props){ channelDetail(props) {
console.log(props); console.log(props);
this.row.userId = props.loginId; this.row.userId = props.loginId;
this.row.userSeq = props.userSeq; this.row.userSeq = props.userSeq;
this.$router.push({ name: 'channelDetail', params: this.row }); this.$router.push({name: 'channelDetail', params: this.row});
}, },
setCodeData() { setCodeData() {
// 상태 옵션 셋팅. // 상태 옵션 셋팅.
api.commCode({'grpCd' : 'SUBS_STTUS_CD'}).then(response => { api.commCode({'grpCd': 'SUBS_STTUS_CD'}).then(response => {
// grid.params.subsSttusCd // grid.params.subsSttusCd
this.subsSttusCdList = response.data.data.list; this.subsSttusCdList = response.data.data.list;
this.grid.params.subsSttusCd = ''; this.grid.params.subsSttusCd = '';
}); });
api.commCode({'grpCd' : 'CUST_TY_CD'}).then(response => { api.commCode({'grpCd': 'CUST_TY_CD'}).then(response => {
this.custTyCdList = response.data.data.list; this.custTyCdList = response.data.data.list;
this.grid.params.custTyCd = ''; this.grid.params.custTyCd = '';
}); });
@@ -386,15 +388,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {

View File

@@ -6,13 +6,12 @@
<h3 class="title">정산이력</h3> <h3 class="title">정산이력</h3>
<p class="breadcrumb">정산 &gt; 정산이력</p> <p class="breadcrumb">정산 &gt; 정산이력</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="group">
<div class="group"> <div class="input_box cal">
<div class="input_box cal"> <label for="right" class="label txt">조회기간</label>
<label for="right" class="label txt">조회기간</label> <p>전월 최대 3개월까지 조회 가능합니다.</p>
<p>전월 최대 3개월까지 조회 가능합니다.</p> <div class="term">
<div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
@@ -23,10 +22,11 @@
v-model="startDate" v-model="startDate"
@selected="selectedStartDate(0)" @selected="selectedStartDate(0)"
@closed="closeDate('start')" @closed="closeDate('start')"
:picker-options="startDateOptions"
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
<span class="hypen">~</span> <span class="hypen">~</span>
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
@@ -36,32 +36,37 @@
v-model="endDate" v-model="endDate"
@selected="selectedEndDate(0)" @selected="selectedEndDate(0)"
@closed="closeDate('end')" @closed="closeDate('end')"
:picker-options="endDateOptions"
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div>
</div> </div>
</div> </div>
<div class="group">
<div class="input_box">
<label for="right" class="label">고객사명</label>
<input class="search-box" type="text" id="" placeholder="검색어 입력" v-model="grid.params.custNm"/>
</div>
<div class="input_box">
<label for="right" class="label">사업자번호</label>
<input class="search-box" type="text" id="" placeholder="검색어 입력" v-model="grid.params.bizrno"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div> </div>
</form> <div class="group">
<div class="input_box">
<label for="right" class="label">고객사명</label>
<input class="search-box" type="text" id="" placeholder="검색어 입력" v-model="grid.params.custNm"
maxlength="100" @keyup.enter="search"/>
</div>
<div class="input_box">
<label for="right" class="label">사업자번호</label>
<input class="search-box" type="text" id="" placeholder="검색어 입력" v-model="grid.params.bizrno"
@keypress="onlyNum" @input="onlyNum" maxlength="10" @keyup.enter="search"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info"> <div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe"> <div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> <select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option> <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
</select> option.text
</div> }}
</div> </option>
</select>
</div>
</div>
<div class="button_group"> <div class="button_group">
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button> <button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div> </div>
@@ -70,23 +75,23 @@
<div class="table calculate scroll"> <div class="table calculate scroll">
<table> <table>
<custom-grid <custom-grid
ref="table" ref="table"
:totalItems="'totalItems'" :totalItems="'totalItems'"
:url="grid.url" :url="grid.url"
:pagePerRows="grid.pagePerRows" :pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest" :initialRequest="grid.initialRequest"
:pagination="grid.pagination" :pagination="grid.pagination"
:isCheckbox="grid.isCheckbox" :isCheckbox="grid.isCheckbox"
:columns="grid.columns" :columns="grid.columns"
:noDataStr="grid.noDataStr" :noDataStr="grid.noDataStr"
:addCls="grid.addCls" :addCls="grid.addCls"
:header="grid.header" :header="grid.header"
></custom-grid> ></custom-grid>
</table> </table>
</div> </div>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
@@ -98,9 +103,11 @@ import xlsx from '@/common/excel';
import lodash from 'lodash'; import lodash from 'lodash';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import calcMgtApi from "@/modules/calculate/service/calcMgtApi"; import calcMgtApi from "@/modules/calculate/service/calcMgtApi";
import {utils_mixin, chkPattern2} from '../service/mixins';
export default { export default {
name: 'calcList', name: 'calcList',
mixins: [utils_mixin, chkPattern2],
data() { data() {
return { return {
// 달력 데이터 // 달력 데이터
@@ -109,136 +116,150 @@ export default {
sDateDiv: 'month', sDateDiv: 'month',
startDate: new Date(), startDate: new Date(),
endDate: new Date(), endDate: new Date(),
startDateOptions: {disabledDate: this.disabledStDate},
startDt:'', endDateOptions: {disabledDate: this.disabledEdDate},
endDt:'', startDt: '',
startYear:'', endDt: '',
startMonth:'', startYear: '',
endYear:'', startMonth: '',
endMonth:'', endYear: '',
row: {}, endMonth: '',
list:[], row: {},
totalCnt: '', list: [],
totalCnt: '',
pageType: 'CALC', pageType: 'CALC',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
totalItems: 0, totalItems: 0,
grid: { grid: {
url: '/api/v1/bo/calculate/calcList', url: '/api/v1/bo/calculate/calcList',
pagePerRows: 20, pagePerRows: 20,
pagination: true, pagination: true,
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거 isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
header:[ header: [
[ [
{ header: '날짜', childNames: [] }, {header: '날짜', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '요금제', childNames: [] }, {header: '요금제', childNames: []},
{ header: '시작금액', childNames: [] }, {header: '시작금액', childNames: []},
{ header: '사용금액', childNames: [] }, {header: '사용금액', childNames: []},
{ header: '이월금액', childNames: [] }, {header: '이월금액', childNames: []},
{ header: '종량금액', childNames: [] }, {header: '종량금액', childNames: []},
{ header: '소멸금액', childNames: [] }, {header: '소멸금액', childNames: []},
{ header: '청구금액', childNames: [] }, {header: '청구금액', childNames: []},
{ header: '채널별 발송 건수', childNames: ['totalSndCnt','smsSndCnt','lmsSndCnt','mmsSndCnt','atlkSndCnt'] }, {header: '채널별 발송 건수', childNames: ['totalSndCnt', 'smsSndCnt', 'lmsSndCnt', 'mmsSndCnt', 'atlkSndCnt']},
] ]
], ],
columns: [ columns: [
{ name: 'useYm', header: '날짜', align: 'center'}, {name: 'useYm', header: '날짜', align: 'center'},
{ name: 'custNm', header: '고객사명', align: 'center', width: '130px'}, {name: 'custNm', header: '고객사명', align: 'center', width: '130px'},
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '120px' {
,formatter: props => { name: 'bizrno', header: '사업자번호', align: 'center', width: '120px'
let result = props.bizrno.substring(0,3)+'-'+ props.bizrno.substring(3,5)+'-'+ props.bizrno.substring(5,10) // ,formatter: props => {
// let result = props.bizrno.substring(0,3)+'-'+ props.bizrno.substring(3,5)+'-'+ props.bizrno.substring(5,10)
// return result;
// }
},
{
name: 'prodNm', header: '요금제', align: 'center', width: '160px'
, formatter: props => {
let result = "<p>" + props.prodNm + "</p>\n<p>(" + props.prodAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + ")</p>";
return result; return result;
} }
}, },
{ name: 'prodNm', header: '요금제', align: 'center', width: '160px' {
,formatter: props => { name: 'startAmt', header: '시작금액', align: 'center'
let result = "<p>"+ props.prodNm+"</p>\n<p>("+props.prodAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+")</p>"; , formatter: props => {
return result;
}
},
{ name: 'startAmt', header: '시작금액', align: 'center'
,formatter: props =>{
let result = props.startAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.startAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'useAmt', header: '사용금액', align: 'center' {
,formatter: props =>{ name: 'useAmt', header: '사용금액', align: 'center'
, formatter: props => {
let result = props.useAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.useAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'cfwdAmt', header: '이월금액', align: 'center' {
,formatter: props =>{ name: 'cfwdAmt', header: '이월금액', align: 'center'
, formatter: props => {
let result = props.cfwdAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.cfwdAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'mrtUseAmt', header: '종량금액', align: 'center' {
,formatter: props =>{ name: 'mrtUseAmt', header: '종량금액', align: 'center'
, formatter: props => {
let result = props.mrtUseAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.mrtUseAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'extncAmt', header: '소멸금액', align: 'center' {
,formatter: props =>{ name: 'extncAmt', header: '소멸금액', align: 'center'
, formatter: props => {
let result = props.extncAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.extncAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'billingAmt', header: '청구금액', align: 'center' {
,formatter: props =>{ name: 'billingAmt', header: '청구금액', align: 'center'
, formatter: props => {
let result = props.billingAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.billingAmt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'totalSndCnt', header: '전체', align: 'center', cls: 'td_line' {
,formatter: props =>{ name: 'totalSndCnt', header: '전체', align: 'center', cls: 'td_line'
, formatter: props => {
let result = props.totalSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.totalSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'smsSndCnt', header: 'SMS', align: 'center', cls: 'td_line' {
,formatter: props =>{ name: 'smsSndCnt', header: 'SMS', align: 'center', cls: 'td_line'
, formatter: props => {
let result = props.smsSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.smsSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'lmsSndCnt', header: 'LMS', align: 'center', cls: 'td_line' {
,formatter: props =>{ name: 'lmsSndCnt', header: 'LMS', align: 'center', cls: 'td_line'
, formatter: props => {
let result = props.lmsSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.lmsSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'mmsSndCnt', header: 'MMS', align: 'center', cls: 'td_line' {
,formatter: props =>{ name: 'mmsSndCnt', header: 'MMS', align: 'center', cls: 'td_line'
, formatter: props => {
let result = props.mmsSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.mmsSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'atlkSndCnt', header: '알림톡', align: 'center', cls: 'td_line' {
,formatter: props =>{ name: 'atlkSndCnt', header: '알림톡', align: 'center', cls: 'td_line'
, formatter: props => {
let result = props.atlkSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.atlkSndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
startMonth: '', startMonth: '',
endMonth: '', endMonth: '',
}, },
@@ -246,31 +267,31 @@ export default {
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
this.setPeriodDay(0); this.setPeriodDay(0);
this.gridParamSet(); this.gridParamSet();
this.getExcelHeader(); this.getExcelHeader();
}, },
destroyed() { destroyed() {
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
@@ -289,7 +310,7 @@ export default {
next(); next();
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log('>>>>>>> search Start >>>>>>'); console.log('>>>>>>> search Start >>>>>>');
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.grid.params = { this.grid.params = {
@@ -298,28 +319,28 @@ export default {
custNm: this.grid.params.custNm, custNm: this.grid.params.custNm,
bizrno: this.grid.params.bizrno bizrno: this.grid.params.bizrno
}; };
console.log('this.perPageCnt'+this.perPageCnt); console.log('this.perPageCnt' + this.perPageCnt);
console.log(this.grid.params); console.log(this.grid.params);
/* /*
var currentDate = new Date(); var currentDate = new Date();
var currentMonth = moment(currentDate).format('YYYYMM'); var currentMonth = moment(currentDate).format('YYYYMM');
console.log('[currentMonth]:'+currentMonth); console.log('[currentMonth]:'+currentMonth);
if(moment(this.grid.params.startMonth).isBefore(moment(currentMonth).subtract(0, 'months').format('YYYYMM')) || if(moment(this.grid.params.startMonth).isBefore(moment(currentMonth).subtract(0, 'months').format('YYYYMM')) ||
moment(this.grid.params.endMonth).isBefore(moment(currentMonth).subtract(0, 'months').format('YYYYMM'))){ moment(this.grid.params.endMonth).isBefore(moment(currentMonth).subtract(0, 'months').format('YYYYMM'))){
this.row.title = '발송통계'; this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 전월만 선택 가능 합니다.'; this.row.msg1 = '검색 기간은 전월만 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false return false
} }
*/ */
if (moment(this.grid.params.startMonth).isBefore(moment(this.grid.params.endMonth).subtract(2, 'months').format('YYYYMM'))) { // if (moment(this.grid.params.startMonth).isBefore(moment(this.grid.params.endMonth).subtract(2, 'months').format('YYYYMM'))) {
//alert('검색 기간은 전월 최대 3개월까지 선택 가능 합니다.'); // //alert('검색 기간은 전월 최대 3개월까지 선택 가능 합니다.');
this.row.title = '발송통계'; // this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 전월 최대 3개월까지 선택 가능 합니다.'; // this.row.msg1 = '검색 기간은 전월 최대 3개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); // this.$refs.commmonModal.alertModalOpen(this.row);
return false // return false
} // }
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
@@ -327,12 +348,16 @@ export default {
}, },
setPeriodDay(day) { setPeriodDay(day) {
this.periodDay = day; this.periodDay = day;
// this.endDate = new Date(); this.endDate = new Date();
// this.startDate = moment(this.endDate) // this.startDate = moment(this.endDate)
// .subtract(day, 'day') // .subtract(day, 'month')
// .toDate(); // .toDate();
console.log(this.startDt)
this.initSetStartDate(); this.initSetStartDate();
this.initSetEndDate(); this.initSetEndDate();
// this.disabledStDate(this.startDate)
// this.disabledEndDate(this.endDate)
this.closeDate('start'); this.closeDate('start');
this.closeDate('end'); this.closeDate('end');
@@ -355,17 +380,25 @@ export default {
}, },
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 4)
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {to: initStartDate, from: new Date()};
this.disabledEDate = { to: this.startDate, from: this.endDate }; if (this.startDate !== initStartDate) {
this.disabledEDate = {to: this.startDate, from: new Date()};
}
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledEDate = {to: initStartDate, from: new Date()};
this.disabledEDate = { to: this.startDate, from: new Date() }; if (this.endDate !== new Date()) {
this.disabledSDate = {from: this.endDate};
this.disabledSDate = {to: initStartDate, from: new Date()};
}
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
console.log(this.sDateDiv) // console.log(this.sDateDiv)
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -374,13 +407,13 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); // console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
@@ -388,7 +421,7 @@ export default {
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage); // console.log("getCondition : " + getCondition.perPage);
}, },
gridParamSet() { gridParamSet() {
this.grid.params = { this.grid.params = {
@@ -398,7 +431,7 @@ export default {
bizrno: this.grid.params.bizrno bizrno: this.grid.params.bizrno
} }
console.log("gridParamSet()-startMonth : "+ this.grid.params.startMonth); // console.log("gridParamSet()-startMonth : " + this.grid.params.startMonth);
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
@@ -423,7 +456,8 @@ export default {
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {}); xlsx.export(data.list, saveFileName, options).then(() => {
});
}, },
async getExcelDataDown() { async getExcelDataDown() {
try { try {
@@ -434,25 +468,26 @@ export default {
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
return result.data; return result.data;
}else{ } else {
return false; return false;
} }
} catch (err) { } catch (err) {
return false; return false;
} }
}, },
initSetStartDate(){ initSetStartDate() {
let initStartDate = new Date(); let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -4); initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 4);
this.startDate = initStartDate; this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD')); // console.log(moment(this.startDate).format('YYYY-MM-DD'));
}, },
initSetEndDate(){ initSetEndDate() {
let initEndDate = new Date(); let initEndDate = new Date();
initEndDate.setMonth(Number(moment(initEndDate).format('MM')) -2); initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 1);
this.endDate = initEndDate; this.endDate = initEndDate;
console.log(moment(this.endDate).format('YYYY-MM-DD')); // console.log(moment(this.endDate).format('YYYY-MM-DD'));
}, },
} }
}; }
;
</script> </script>

View File

@@ -1,70 +1,66 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">알림톡 템플릿 목록 조회</h3> <h3 class="title">알림톡 템플릿 목록 조회</h3>
<p class="breadcrumb">채널관리 &gt; 알림톡 템플릿 관리</p> <p class="breadcrumb">채널관리 &gt; 알림톡 템플릿 관리</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="select_box">
<div class="select_box"> <label for="stat" class="label">상태</label>
<label for="stat" class="label">상태</label> <select name="" id="stat" v-model="searchType1" @keyup.enter="search">
<select name="" id="stat" v-model="searchType1" @keyup.enter="search"> <option value="">전체</option>
<option value="">전체</option> <option value="Y">사용</option>
<option value="Y">사용</option> <option value="N">폐기</option>
<option value="N">폐기</option> </select>
</select> </div>
</div> <div class="select_box">
<div class="select_box"> <label for="searchType" class="label">상세검색</label>
<label for="searchType" class="label">상세검색</label> <select name="" id="searchType" v-model="searchType2" @keyup.enter="search">
<select name="" id="searchType" v-model="searchType2" @keyup.enter="search"> <option value="custNm" selected="selected">고객사명</option>
<option value="custNm" selected="selected">고객사명</option> <option value="bizNo">사업자번호</option>
<option value="bizNo">사업자번호</option> <option value="tmpltNm">템플릿명</option>
<option value="tmpltNm">템플릿명</option> </select>
</select> </div>
</div> <div class="input_box id">
<div class="input_box id"> <label for="search" class="label">검색어</label>
<label for="search" class="label">검색어</label> <input type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" v-on:keydown.enter.prevent="search"/> @keyup.enter="search" maxlength="100"/>
</div> </div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</form> <div class="info">
<div class="info"> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> <div class="select_box NumberSe">
<div class="select_box NumberSe"> <select name="" id="perPage" v-model="grid.pagePerRows" @keyup.enter="search">
<select name="" id="perPage" v-model="grid.pagePerRows" @keyup.enter="search"> <option value="20">20</option>
<option value="20">20</option> <option value="50" selected>50</option>
<option value="50" selected>50</option> <option value="100">100</option>
<option value="100">100</option> </select>
</select>
</div>
</div> </div>
<!-- <div class="button_group">--> </div>
<!-- <button type="button" class="button blue admin" @click="excelDown();">엑셀다운로드</button>--> </div>
<!-- </div>--> <div class="table">
</div> <custom-grid
<div class="table"> ref="table"
<custom-grid :totalItems="'totalItems'"
ref="table" :url="grid.url"
:totalItems="'totalItems'" :pagePerRows="grid.pagePerRows"
:url="grid.url" :initialRequest="grid.initialRequest"
:pagePerRows="grid.pagePerRows" :pagination="grid.pagination"
:initialRequest="grid.initialRequest" :isCheckbox="grid.isCheckbox"
:pagination="grid.pagination" :columns="grid.columns"
:isCheckbox="grid.isCheckbox" :noDataStr="grid.noDataStr"
:columns="grid.columns" :addCls="grid.addCls"
:noDataStr="grid.noDataStr" :header="grid.headder"
:addCls="grid.addCls" ></custom-grid>
:header="grid.headder"
></custom-grid>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@@ -74,106 +70,18 @@ import xlsx from '@/common/excel';
import moment from 'moment'; import moment from 'moment';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
class customBRegNo {
constructor(props) {
this.props = props;
const el = document.createElement('td');
var bregNo = String(props.colValue);
el.innerText= bregNo;
if(bregNo.length == 10){
el.innerText= bregNo.substring(0,3)+'-'+bregNo.substring(3,5)+'-'+bregNo.substring(5,10)
}
this.el = el;
}
getElement() {
return this.el;
}
addEvent(selEl) {
}
}
class customTmpltType {
constructor(props) {
this.props = props;
const el = document.createElement('td');
var tmpltType = String(props.colValue);
el.innerText= "";
switch(tmpltType){
case '01' :
el.innerText= "기본형";
break;
case '02' :
el.innerText= "부가정보형";
break;
case '03' :
el.innerText= "광고추가형";
break;
case '04' :
el.innerText= "복잡형";
break;
default :
break;
}
this.el = el;
}
getElement() {
return this.el;
}
addEvent(selEl) {
}
}
class customStat {
constructor(props) {
this.props = props;
const el = document.createElement('td');
var stat = String(props.colValue);
el.innerText= "";
switch(stat){
case 'T' :
el.innerText= "신청완료";
break;
case 'R' :
el.innerText= "검수요청완료";
break;
case 'Q' :
el.innerText= "카카오 검수중";
break;
case 'A' :
el.innerText= "템플릿승인";
break;
case 'S' :
el.innerText= "반려(" + props.returnReason + ")";
break;
default :
break;
}
this.el = el;
}
getElement() {
return this.el;
}
addEvent(selEl) {
}
}
export default { export default {
name: 'temltList', name: 'temltList',
data() { data() {
return { return {
row: {}, row: {},
authType: [], authType: [],
statType: [], statType: [],
cate2Code: "", cate2Code: "",
totalItems: 0, totalItems: 0,
pageType: 'CHANN', pageType: 'CHANN',
searchType1:'', searchType1: '',
searchType2:'custNm', searchType2: 'custNm',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
@@ -188,77 +96,78 @@ export default {
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '템플릿코드', childNames: [] }, {header: '템플릿코드', childNames: []},
{ header: '템플릿명', childNames: [] }, {header: '템플릿명', childNames: []},
{ header: '템플릿 유형', childNames: [] }, {header: '템플릿 유형', childNames: []},
{ header: '상태(반려사유)', childNames: [] }, {header: '상태', childNames: []},
{ header: '발신프로필', childNames: [] }, {header: '발신프로필', childNames: []},
{ header: '최종수정일', childNames: [] } {header: '최종수정일', childNames: []}
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '4%' }, {name: 'no', header: 'NO', align: 'center', width: '4%'},
{ name: 'custNm', header: '고객사명', align: 'center', width: '12%' }, {name: 'custNm', header: '고객사명', align: 'center', width: '12%'},
{ name: 'bregNo', header: '사업자번호', align: 'center', width: '12%',renderer: {type: customBRegNo}}, {name: 'bregNo', header: '사업자번호', align: 'center', width: '12%'},
{ name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%'}, {name: 'tmpltCd', header: '템플릿코드', align: 'center', width: '12%'},
{ name: 'tmpltNm', header: '템플릿명', align: 'center', width: '12%'}, {name: 'tmpltNm', header: '템플릿명', align: 'center', width: '12%'},
{ name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '12%',renderer: {type: customTmpltType}}, {name: 'tmpltType', header: '템플릿 유형', align: 'center', width: '12%'},
{ name: 'stat', header: '상태(반려사유)', align: 'center', width: '12%',renderer: {type: customStat}}, {name: 'stat', header: '상태', align: 'center', width: '12%'},
{ name: 'sendProfile', header: '발신프로필', align: 'center', width: '125'}, {name: 'sendProfile', header: '발신프로필', align: 'center', width: '125'},
{ name: 'lastChgDt', header: '최종수정일', width: '12%', cls: 'td_line' } {name: 'lastChgDt', header: '최종수정일', width: '12%', cls: 'td_line'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: 'custNm', searchType2: 'custNm',
searchText1: '' searchText1: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
channelMgtApi, channelMgtApi,
commonModal, commonModal,
}, },
created(){ created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
this.getExcelHeader(); this.getExcelHeader();
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: 1, page: 1,
perPage: 50, perPage: 50,
params: { params: {
searchType1: '', searchType1: '',
searchType2: 'custNm', searchType2: 'custNm',
searchText1: ''} searchText1: ''
}); }
});
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2
@@ -266,17 +175,17 @@ export default {
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: { params: {
searchType1: '', searchType1: '',
searchType2: 'custNm', searchType2: 'custNm',
searchText1: '' searchText1: ''
} }
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
@@ -296,7 +205,7 @@ export default {
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
return result.data; return result.data;
}else{ } else {
return false; return false;
} }
} catch (err) { } catch (err) {
@@ -320,7 +229,8 @@ export default {
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {}); xlsx.export(data.list, saveFileName, options).then(() => {
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
@@ -329,18 +239,18 @@ export default {
}); });
}, },
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -21,7 +21,7 @@
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
</div>
</template> </template>
<script> <script>
@@ -167,6 +167,14 @@ export default {
this.$parent.channelDetail(this.serviceSeq); this.$parent.channelDetail(this.serviceSeq);
} }
}else if(result != null && result.retCode == "1009"){
this.row.title = '관리자명 조회';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs.madangId.focus();
this.formReset();
this.$refs.madangId.focus();
return false;
}else { }else {
//alert('관리자정보 수정에 실패하였습니다.'); //alert('관리자정보 수정에 실패하였습니다.');
this.formReset(); this.formReset();

View File

@@ -9,27 +9,27 @@
</div> </div>
<table> <table>
<tbody> <tbody>
<tr> <tr>
<th>관리자 ID</th> <th>관리자 ID</th>
<td>{{ adminId }}</td> <td>{{ adminId }}</td>
</tr> </tr>
<tr> <tr>
<th>사용자 ID 업로드</th> <th>사용자 ID 업로드</th>
<td> <td>
<div class="popup-btn2 bulk"> <div class="popup-btn2 bulk">
<input <input
type="file" type="file"
ref="file" ref="file"
style="display: none" style="display: none"
@change="readFile" @change="readFile"
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
/> />
<button class="btn-default" @click="sampleDown">샘플 다운로드</button> <button class="btn-default" @click="sampleDown">샘플 다운로드</button>
<button class="button btn-p2color" @click="$refs.file.click()">파일 업로드</button> <button class="button btn-p2color" @click="$refs.file.click()">파일 업로드</button>
</div> </div>
<p class="file" id="uploadFile"></p> <p class="file" id="uploadFile"></p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="popup-btn2"> <div class="popup-btn2">
@@ -37,7 +37,7 @@
<button class="btn-default" @click="excelPopClose">취소</button> <button class="btn-default" @click="excelPopClose">취소</button>
</div> </div>
</div> </div>
<common-modal ref="commmonModal"></common-modal> <validationConfirm-modal ref="validationConfirmPop"></validationConfirm-modal>
</div> </div>
</div> </div>
</template> </template>
@@ -45,11 +45,11 @@
<script> <script>
import api from '@/service/api'; import api from '@/service/api';
import custMgtApi from '../service/custMgtApi.js'; import custMgtApi from '../service/custMgtApi.js';
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import xlsx from '@/common/excel'; import xlsx from '@/common/excel';
import moment from 'moment'; import moment from 'moment';
import XLSX from 'xlsx'; import XLSX from 'xlsx';
import commonModal from './commonModal'; import ValidationConfirmPop from "@/modules/custMgt/components/ValidationConfirmPop";
export default { export default {
name: 'memberBulkRegPop', name: 'memberBulkRegPop',
@@ -68,7 +68,7 @@ export default {
}; };
}, },
components: { components: {
commonModal, ValidationConfirmPop,
}, },
created() { created() {
this.getExcelHeader(); this.getExcelHeader();
@@ -98,13 +98,13 @@ export default {
} }
}, },
// 저장 후 부모창 호출. // 저장 후 부모창 호출.
toComplete() { toComplete() {
this.row.serviceId = this.adminId; this.row.serviceId = this.adminId;
// 팝업으로 교체 예정 // 팝업으로 교체 예정
if (confirm('정상 업로드 되었습니다.')){ if (confirm('정상 업로드 되었습니다.')) {
this.excelPopClose(); this.excelPopClose();
this.$parent.memberDetail(this.adminId); this.$parent.memberDetail(this.adminId);
} }
}, },
async doInsert() { async doInsert() {
if (this.doValidate() && window.confirm('등록 하시겠습니까?')) { if (this.doValidate() && window.confirm('등록 하시겠습니까?')) {
@@ -132,7 +132,8 @@ export default {
header: this.excelHeader, header: this.excelHeader,
dataOrder: 'header', dataOrder: 'header',
}; };
xlsx.export([], saveFileName, options).then(() => {}); xlsx.export([], saveFileName, options).then(() => {
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
@@ -167,13 +168,14 @@ export default {
this.row.msg1 = '파일을 읽는 동안 에러가 발생 했습니다.'; this.row.msg1 = '파일을 읽는 동안 에러가 발생 했습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
}; };
reader.onloadend = (e) => {}; reader.onloadend = (e) => {
};
reader.onload = (e) => { reader.onload = (e) => {
let data = reader.result; let data = reader.result;
let workbook = XLSX.read(data, { type: 'binary' }); let workbook = XLSX.read(data, {type: 'binary'});
workbook.SheetNames.forEach((sheetName) => { workbook.SheetNames.forEach((sheetName) => {
const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], { raw: true }); const rowObj = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], {raw: true});
tmpResult = rowObj; tmpResult = rowObj;
const limitCnt = 100; const limitCnt = 100;
@@ -190,7 +192,7 @@ export default {
if (idx > limitCnt - 1) { if (idx > limitCnt - 1) {
break; break;
} }
let { ID, 이름, 휴대폰번호, 이메일, ID잠금 } = r; let {ID, 이름, 휴대폰번호, 이메일, ID잠금} = r;
ID = '' + (vm.isNull(ID) ? '' : ID); ID = '' + (vm.isNull(ID) ? '' : ID);
이름 = '' + (vm.isNull(이름) ? '' : 이름); 이름 = '' + (vm.isNull(이름) ? '' : 이름);
휴대폰번호 = '' + (vm.isNull(휴대폰번호) ? '' : 휴대폰번호); 휴대폰번호 = '' + (vm.isNull(휴대폰번호) ? '' : 휴대폰번호);
@@ -204,22 +206,22 @@ export default {
} }
} }
let { retVal, msg } = vm.validXlxs({ ID, 이름, 휴대폰번호, 이메일, ID잠금 }); let {retVal, msg} = vm.validXlxs({ID, 이름, 휴대폰번호, 이메일, ID잠금});
if (retVal) { if (retVal) {
const pVal = [ const pVal = [
{ name: '이름', val: 이름, len: 20 }, {name: '이름', val: 이름, len: 20},
{ name: 'ID잠금', val: ID잠금, len: 4 }, {name: 'ID잠금', val: ID잠금, len: 4},
]; ];
const rVal = vm.isTitle(pVal); const rVal = vm.isTitle(pVal);
if (rVal.retVal) { if (rVal.retVal) {
vm.nData.push({ userId: ID, userNm: 이름, mdn: 휴대폰번호, email: 이메일, stat: ID잠금, msg }); vm.nData.push({userId: ID, userNm: 이름, mdn: 휴대폰번호, email: 이메일, stat: ID잠금, msg});
} else { } else {
vm.oData.push({ ID, 이름, 휴대폰번호, 이메일, ID잠금, 오류내용: rVal.msg }); vm.oData.push({ID, 이름, 휴대폰번호, 이메일, ID잠금, 오류내용: rVal.msg});
} }
} else { } else {
vm.oData.push({ ID, 이름, 휴대폰번호, 이메일, ID잠금, 오류내용: msg }); vm.oData.push({ID, 이름, 휴대폰번호, 이메일, ID잠금, 오류내용: msg});
} }
} }
}); });
@@ -230,35 +232,35 @@ export default {
}; };
reader.readAsBinaryString(file); reader.readAsBinaryString(file);
}, },
validXlxs({ 이름, 휴대폰번호, 이메일 }) { validXlxs({이름, 휴대폰번호, 이메일}) {
if (this.isNull(이름)) { if (this.isNull(이름)) {
return { retVal: false, msg: '이름 누락' }; return {retVal: false, msg: '이름 누락'};
} }
if (this.isNull(휴대폰번호)) { if (this.isNull(휴대폰번호)) {
return { retVal: false, msg: '휴대폰번호 누락' }; return {retVal: false, msg: '휴대폰번호 누락'};
} }
if (!this.isMobile(휴대폰번호)) { if (!this.isMobile(휴대폰번호)) {
if (!this.isMobile2(휴대폰번호)) { if (!this.isMobile2(휴대폰번호)) {
return { retVal: false, msg: '휴대폰번호 형식 오류' }; return {retVal: false, msg: '휴대폰번호 형식 오류'};
} }
} }
if (!this.emailCheck(이메일)) { if (!this.emailCheck(이메일)) {
return { retVal: false, msg: '이메일 형식 오류' }; return {retVal: false, msg: '이메일 형식 오류'};
} }
return { retVal: true, msg: '정상' }; return {retVal: true, msg: '정상'};
}, },
isTitle(pVal) { isTitle(pVal) {
for (const o of pVal) { for (const o of pVal) {
if (this.bytes(o.val) > o.len) { if (this.bytes(o.val) > o.len) {
return { retVal: false, msg: `${o.name} 컬럼: 문자열 길이 오류(${o.len}자)` }; return {retVal: false, msg: `${o.name} 컬럼: 문자열 길이 오류(${o.len}자)`};
} }
const strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$'; const strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
const regExp_g = new RegExp(strRegExp, 'g'); const regExp_g = new RegExp(strRegExp, 'g');
if (!regExp_g.test(o.val)) { if (!regExp_g.test(o.val)) {
return { retVal: false, msg: `${o.name} 컬럼: 특수 문자 오류` }; return {retVal: false, msg: `${o.name} 컬럼: 특수 문자 오류`};
} }
} }
return { retVal: true, msg: '정상' }; return {retVal: true, msg: '정상'};
}, },
delFile(event) { delFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
@@ -272,6 +274,7 @@ export default {
// uploadFile // uploadFile
}, },
async saveExcel() { async saveExcel() {
this.row = {}
// //
this.row.adminId = this.adminId; this.row.adminId = this.adminId;
this.row.list = this.nData; this.row.list = this.nData;
@@ -281,36 +284,46 @@ export default {
//console.log(response); //console.log(response);
const result = response.data; const result = response.data;
console.log(result); console.log(result);
if (result != null && result.retCode == '0000') { if (result != null && result.retCode == '0000') {
this.totalCnt = result.data.totalCnt; this.totalCnt = result.data.totalCnt;
this.successCnt = result.data.successCnt; this.successCnt = result.data.successCnt;
this.failCnt = result.data.failCnt; this.failCnt = result.data.failCnt;
if(result.data.failCnt > 0){ if (result.data.failCnt > 0) {
// 팝업으로 교체 예정 this.row.totalCnt = this.totalCnt
var resultMsg = '파일 업로드 중 오류가 발생하여 정상건만 업로드 완료하였습니다.\n\n 총 '+result.data.totalCnt+'건, 정상 '+ result.data.successCnt+'건, 오류 '+result.data.failCnt+'건\n\n오류건은 확인 후 재등록 부탁 드립니다.'; this.row.successCnt = this.successCnt
alert(resultMsg); this.row.failCnt = this.failCnt
this.excelPopClose(); this.$refs.validationConfirmPop.failFileuploadOpen(this.row);
this.$parent.memberDetail(this.adminId); // 팝업으로 교체 예정
}else{ // var resultMsg = '파일 업로드 중 오류가 발생하여 정상건만 업로드 완료하였습니다.\n\n 총 '+result.data.totalCnt+'건, 정상 '+ result.data.successCnt+'건, 오류 '+result.data.failCnt+'건\n\n오류건은 확인 후 재등록 부탁 드립니다.';
this.toComplete(); // alert(resultMsg);
} // this.excelPopClose();
// this.$parent.memberDetail(this.adminId);
} else {
this.toComplete();
}
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
// 팝업으로 교체 예정 // 팝업으로 교체 예정
var title ='청약고객 관리\n'; var title = '청약고객 관리\n';
var msg1 = '실패 하였습니다.'; var msg1 = '실패 하였습니다.';
alert(title + msg1); alert(title + msg1);
// this.row.title = '청약고객관리'; // this.row.title = '청약고객관리';
// this.row.msg1 = '실패 하였습니다.'; // this.row.msg1 = '실패 하였습니다.';
// this.$refs.commmonModal.alertModalOpen(this.row); // this.$refs.validationConfirmPop.failFileuploadOpen(this.row);
} }
// 오류건수. // 오류건수.
console.log(this.oData.length); console.log(this.oData.length);
}, },
failFileuploadOk(result) {
console.log(result)
if (result) {
this.excelPopClose();
this.$parent.memberDetail(this.adminId);
}
},
}, },
}; };
</script> </script>

View File

@@ -27,15 +27,18 @@
</tr> </tr>
<tr> <tr>
<th>이름</th> <th>이름</th>
<td><input type="text" v-model.trim="userNm" ref="_userNm"></td> <td><input type="text" v-model.trim="userNm" ref="_userNm" @keypress="onlyRoleNm_Space"
@input="onlyRoleNm_Space" maxlength="100"></td>
</tr> </tr>
<tr> <tr>
<th>휴대폰번호</th> <th>휴대폰번호</th>
<td><input type="text" v-model.trim="mdn" ref="_phone"></td> <td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" ref="_phone" @keypress="onlyNum"
@input="onlyNum" minlength="10" maxlength="11"></td>
</tr> </tr>
<tr> <tr>
<th>이메일</th> <th>이메일</th>
<td><input type="email" v-model.trim="email" ref="_email"></td> <td><input type="email" v-model.trim="email" ref="_email" @keypress="onlyEmail" @input="onlyEmail"
maxlength="100"></td>
</tr> </tr>
<tr> <tr>
<th class="center">상태</th> <th class="center">상태</th>
@@ -181,8 +184,13 @@ export default {
var dimmed = document.getElementsByClassName('memberUpdate'); var dimmed = document.getElementsByClassName('memberUpdate');
for(var i = 0; i < dimmed.length; i++){ for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.formReset();
}, },
formReset() {
this.userPwd1 = '';
this.userPwd2 = '';
},
toComplete(){ toComplete(){
this.row.serviceId = this.adminId; this.row.serviceId = this.adminId;
this.memberUpdateModalClose(); this.memberUpdateModalClose();

View File

@@ -1,255 +1,279 @@
<template> <template>
<div> <div>
<div class="dimmed memberInsert" @click="memberInsertModalClose();"></div> <div class="dimmed memberInsert" @click="memberInsertModalClose();"></div>
<div class="popup-wrap memberInsert"> <div class="popup-wrap memberInsert">
<div class="popup modal31 popup_form memberInsert"> <div class="popup modal31 popup_form memberInsert">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">사용자 ID 생성</h3> <h3 class="pop-tit">사용자 ID 생성</h3>
</div> </div>
<table> <table>
<tbody> <tbody>
<tr> <tr>
<th>관리자 ID</th> <th>관리자 ID</th>
<td>{{adminId}}</td> <td>{{ adminId }}</td>
</tr> </tr>
<tr> <tr>
<th>ID</th> <th>ID</th>
<td><input type="text" v-model.trim="userId" ref="_userId"></td> <td><input type="text" v-model.trim="userId" ref="_userId" @keypress="onlyId" @input="onlyId" minlength="6"
</tr> maxlength="16"></td>
<tr> </tr>
<th>이름</th> <tr>
<td><input type="text" v-model.trim="userNm" ref="_userNm"></td> <th>이름</th>
</tr> <td><input type="text" v-model.trim="userNm" ref="_userNm" @keypress="onlyRoleNm_Space"
<tr> @input="onlyRoleNm_Space" maxlength="100"></td>
<th>휴대폰번호</th> </tr>
<td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" ref="_phone"></td> <tr>
</tr> <th>휴대폰번호</th>
<tr> <td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" ref="_phone" @keypress="onlyNum"
<th>이메일</th> @input="onlyNum" minlength="10" maxlength="11"></td>
<td><input type="email" v-model.trim="email" ref="_email"></td> </tr>
</tr> <tr>
<tr> <th>이메일</th>
<th class="center">ID 잠금</th> <td><input type="email" v-model.trim="email" ref="_email" @keypress="onlyEmail" @input="onlyEmail"
<td> maxlength="100"></td>
<input type="radio" name="userStateInsert" value="01" id="user_popup_insert_radio1" v-model="stat"> </tr>
<label for="user_popup_insert_radio1">사용</label> <tr>
<input type="radio" name="userStateInsert" value="02" id="user_popup_insert_radio2" v-model="stat"> <th class="center">ID 잠금</th>
<label for="user_popup_insert_radio2">정지</label> <td>
</td> <input type="radio" name="userStateInsert" value="01" id="user_popup_insert_radio1" v-model="stat">
</tr> <label for="user_popup_insert_radio1">사용</label>
</tbody> <input type="radio" name="userStateInsert" value="02" id="user_popup_insert_radio2" v-model="stat">
</table> <label for="user_popup_insert_radio2">정지</label>
</td>
</tr>
</tbody>
</table>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="memberInsertConfirm();">저장</button> <button class="btn-pcolor" @click="memberInsertConfirm();">저장</button>
<button class="btn-default" @click="memberInsertModalClose();">취소</button> <button class="btn-default" @click="memberInsertModalClose();">취소</button>
</div> </div>
</div> </div>
</div>
<validation-confirm-pop ref="validationConfirmPopModal"> </validation-confirm-pop>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
<validation-confirm-pop ref="validationConfirmPopModal"></validation-confirm-pop>
<common-modal ref="commmonModal"></common-modal>
</div>
</template> </template>
<script> <script>
import api from '@/service/api'; import api from '@/service/api';
import custMgtApi from "../service/custMgtApi.js"; import custMgtApi from "../service/custMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import ValidationConfirmPop from '../components/ValidationConfirmPop.vue'; import ValidationConfirmPop from '../components/ValidationConfirmPop.vue';
import lodash from "lodash"; import lodash from "lodash";
import commonModal from "../components/commonModal"; import commonModal from "../components/commonModal";
export default { export default {
name: "memberRegPop", name: "memberRegPop",
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
watch:{ watch: {
stat(){ stat() {
console.log('watch : ', this.stat) console.log('watch : ', this.stat)
}
},
components: {
ValidationConfirmPop,
commonModal,
},
model: {
//prop: 'sendData',
//event: 'event-data'
},
//props: ['sendData'],
created(){
// this.setAuthData();
this.formReset();
},
data(){
return{
row:{},
madangId:'',
adminId:'',
name:'',
mdn:'',
email:'',
auth:'',
stat: "01",
userId:"",
userNm:"",
code:"",
userTotalCnt:0,
} }
}, },
methods :{ components: {
//사용자ID 생성 모달 Open ValidationConfirmPop,
async memberInsertModalOpen(props){ commonModal,
this.adminId = props.adminId; },
this.userTotalCnt = props.userTotalCnt; model: {
//prop: 'sendData',
//event: 'event-data'
},
//props: ['sendData'],
created() {
// this.setAuthData();
this.formReset();
},
data() {
return {
row: {},
madangId: '',
adminId: '',
name: '',
mdn: '',
email: '',
auth: '',
stat: "01",
userId: "",
userNm: "",
code: "",
userTotalCnt: 0,
}
},
methods: {
//사용자ID 생성 모달 Open
async memberInsertModalOpen(props) {
this.adminId = props.adminId;
this.userTotalCnt = props.userTotalCnt;
// 모달 오픈 // 모달 오픈
var dimmed = document.getElementsByClassName('memberInsert'); var dimmed = document.getElementsByClassName('memberInsert');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
}, },
//사용자ID 생성 Confirm //사용자ID 생성 Confirm
memberInsertConfirm(){ memberInsertConfirm() {
// confirm 팝업 노출 // confirm 팝업 노출
if(this.doValidate()){ if (this.doValidate()) {
this.$refs.validationConfirmPopModal.confirmInsertOpen(); this.$refs.validationConfirmPopModal.confirmInsertOpen();
} }
}, },
//사용자ID 수정 처리 //사용자ID 수정 처리
async memberInsert(){ async memberInsert() {
this.row.adminId = this.adminId; this.row.adminId = this.adminId;
this.row.userId = this.userId; this.row.userId = this.userId;
this.row.userNm = this.userNm; this.row.userNm = this.userNm;
this.row.userEmail = this.email; this.row.userEmail = this.email;
this.row.mdn = this.mdn; this.row.mdn = this.mdn;
this.row.userStat = this.stat; this.row.userStat = this.stat;
try { try {
const response = await custMgtApi.insertUser(this.row); const response = await custMgtApi.insertUser(this.row);
const result = response.data; const result = response.data;
console.log(result); console.log(result);
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '사용자 생성 완료하였습니다.'; this.row.msg1 = '사용자 생성 완료하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.toComplete(); this.toComplete();
} else if(result != null && result.retCode == "4018"){ } else if (result != null && result.retCode == "4018") {
// 이미 사용중인 ID // 이미 사용중인 ID
this.$refs.validationConfirmPopModal.validationIdDuplicateOpen(); this.$refs.validationConfirmPopModal.validationIdDuplicateOpen();
} else { } else {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
} catch(err) { } catch (err) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
}, },
//사용자ID 생성 모달 Close //사용자ID 생성 모달 Close
memberInsertModalClose(){ memberInsertModalClose() {
var dimmed = document.getElementsByClassName('memberInsert'); var dimmed = document.getElementsByClassName('memberInsert');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.formReset(); this.formReset();
}, },
toComplete(){ toComplete() {
this.row.serviceId = this.adminId; this.row.serviceId = this.adminId;
this.memberInsertModalClose(); this.memberInsertModalClose();
this.$parent.memberDetail(this.adminId); this.$parent.memberDetail(this.adminId);
}, },
setAuthData() { setAuthData() {
// 권한 옵션. // 권한 옵션.
api.commAuth().then(response => { api.commAuth().then(response => {
this.authType = response.data.data.list; this.authType = response.data.data.list;
}); });
}, },
formReset(){ formReset() {
var targetAdminId = this.adminId; var targetAdminId = this.adminId;
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
this.adminId = targetAdminId; this.adminId = targetAdminId;
}, },
doValidate(){ doValidate() {
console.log(this.userTotalCnt) console.log(this.userTotalCnt)
if(this.userTotalCnt >= 100){ if (this.userTotalCnt >= 100) {
// 사용자등록제한_최대100개까지 // 사용자등록제한_최대100개까지
this.$refs.validationConfirmPopModal.validationMaxlimitOpen(); this.$refs.validationConfirmPopModal.validationMaxlimitOpen();
return false; return false;
} }
if(this.isNull(this.userId)){ if (this.isNull(this.userId)) {
this.$refs._userId.focus(); this.$refs._userId.focus();
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = 'ID를 입력해 주세요.'; this.row.msg1 = 'ID를 입력해 주세요.';
this.row.focusTaget = '1'; this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
// 청약 ID 길이 체크 6~16
var userIdlength = this.userId.length;
if (userIdlength < 6 || userIdlength > 16) {
this.row.title = '청약고객관리';
this.row.msg1 = 'ID 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.userNm)){ if (this.isNull(this.userNm)) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '이름을 입력해 주세요.'; this.row.msg1 = '이름을 입력해 주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if(this.isNull(this.mdn)){ if (this.isNull(this.mdn)) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰번호를 입력해주세요.'; this.row.msg1 = '휴대폰번호를 입력해주세요.';
this.row.focusTaget = '3'; this.row.focusTaget = '3';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
const hp = this.mdn; const hp = this.mdn;
if(!this.isNull(hp) && !this.isMobile(hp)){ if (!this.isNull(hp) && !this.isMobile(hp)) {
this.row.focusTaget = '3'; this.row.focusTaget = '3';
this.$refs.validationConfirmPopModal.validationPhonenumberOpen(); //this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
return false; this.row.title = '청약고객관리';
} this.row.msg1 = '휴대폰번호 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '3';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.email)){ if (this.isNull(this.email)) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.'; this.row.msg1 = '이메일을 입력해주세요.';
this.row.focusTaget = '4'; this.row.focusTaget = '4';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
const email = this.email; const email = this.email;
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){ if (!this.isNull(email) && !lodash.isEqual(email, '@') && !this.emailCheck(email)) {
this.$refs.validationConfirmPopModal.validationEmailOpen(); // this.$refs.validationConfirmPopModal.validationEmailOpen();
return false; this.row.title = '청약고객관리';
} this.row.msg1 = 'E-mail 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '4';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.stat)){ if (this.isNull(this.stat)) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '상태를 선택 해주세요.'; this.row.msg1 = '상태를 선택 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
return true; return true;
}, },
checkFocus(){ checkFocus() {
if(this.row.focusTaget === '1'){ if (this.row.focusTaget === '1') {
this.$refs._userId.focus(); this.$refs._userId.focus();
} else if(this.row.focusTaget === '2'){ } else if (this.row.focusTaget === '2') {
this.$refs._userNm.focus(); this.$refs._userNm.focus();
} else if(this.row.focusTaget === '3'){ } else if (this.row.focusTaget === '3') {
this.$refs._phone.focus(); this.$refs._phone.focus();
} else if(this.row.focusTaget === '4'){ } else if (this.row.focusTaget === '4') {
this.$refs._email.focus(); this.$refs._email.focus();
} }
}, },
checkPhoneFocus(){ checkPhoneFocus() {
this.$refs._phone.focus(); this.$refs._phone.focus();
}, },
checkEmailFocus(){ checkEmailFocus() {
this.$refs._email.focus(); this.$refs._email.focus();
}, },
checkIdDupFocus(){ checkIdDupFocus() {
this.$refs._userId.focus(); this.$refs._userId.focus();
}, },
} }
} }
</script> </script>

View File

@@ -7,8 +7,9 @@
<div class="popup memoTotal popup_form b-popup"> <div class="popup memoTotal popup_form b-popup">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">전체 메모보기</h3> <h3 class="pop-tit">전체 메모보기</h3>
<span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> <!-- <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> -->
</div> </div>
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span></div>
<table class="table-c"> <table class="table-c">
<custom-grid <custom-grid
ref="table" ref="table"

View File

@@ -41,7 +41,6 @@
<!-- 시스템관리 팝업 --> <!-- 시스템관리 팝업 -->
<!-- e: 팝업 --> <!-- e: 팝업 -->
</div>
</template> </template>

View File

@@ -1,8 +1,8 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed" @click="ModalClose();"></div> <div class="dimmed modal29" @click="ModalClose();"></div>
<div class="popup-wrap"> <div class="popup-wrap modal29">
<!-- 테스트 ID 생성 --> <!-- 테스트 ID 생성 -->
<div class="popup modal29 popup_form"> <div class="popup modal29 popup_form">
<div class="pop-head"> <div class="pop-head">
@@ -13,7 +13,7 @@
<tbody> <tbody>
<tr> <tr>
<th>ID</th> <th>ID</th>
<td><input type="text" placeholder="아이디 입력" v-model.trim="userId" ref="_userId" /></td> <td><input type="text" placeholder="아이디 입력" v-model.trim="userId" ref="_userId" @keypress="onlyId" @input="onlyId" minlength="6" maxlength="16"/></td>
</tr> </tr>
<tr> <tr>
<th>비밀번호</th> <th>비밀번호</th>
@@ -25,15 +25,15 @@
</tr> </tr>
<tr> <tr>
<th>이름</th> <th>이름</th>
<td><input type="text" @keypress="onlyName" @input="onlyName" v-model.trim="userNm" ref="_userNm" required maxlength="40"></td> <td><input type="text" @keypress="onlyText" @input="onlyText" v-model.trim="userNm" ref="_userNm" required maxlength="40"></td>
</tr> </tr>
<tr> <tr>
<th>휴대폰번호</th> <th>휴대폰번호</th>
<td><input type="number" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_phone"></td> <td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" @keypress="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_phone"></td>
</tr> </tr>
<tr> <tr>
<th>이메일</th> <th>이메일</th>
<td><input type="email" v-model.trim="email" @keypress="onlyEmail" @input="onlyEmail" maxlength="20" ref="_email"></td> <td><input type="email" v-model.trim="email" @keypress="onlyEmail" @input="onlyEmail" maxlength="100" ref="_email"></td>
</tr> </tr>
<tr> <tr>
<th class="center">상태</th> <th class="center">상태</th>
@@ -144,56 +144,67 @@ export default {
}, },
doValidate(){ doValidate(){
if(this.isNull(this.userId)){ if(this.isNull(this.userId)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '아이디를 입력해 주세요.'; this.row.msg1 = '아이디를 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._userId.focus(); this.$refs._userId.focus();
return false; return false;
} }
// 청약 ID 길이 체크 6~16
var userIdlength = this.userId.length;
if (userIdlength < 6 || userIdlength > 16) {
this.row.title = '청약고객관리';
this.row.msg1 = 'ID 형식에 맞지 않습니다.';
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(!this.doPwdValidate()){ if(!this.doPwdValidate()){
return false; return false;
} }
if(this.isNull(this.userNm)){ if(this.isNull(this.userNm)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '이름을 입력해 주세요.'; this.row.msg1 = '이름을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._userNm.focus(); this.$refs._userNm.focus();
return false; return false;
} }
if(this.isNull(this.mdn)){ if(this.isNull(this.mdn)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰번호를 입력해주세요.'; this.row.msg1 = '휴대폰번호를 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._phone.focus(); this.$refs._phone.focus();
return false; return false;
} }
const hp = this.mdn; const hp = this.mdn;
if(!this.isNull(hp) && !this.isMobile(hp)){ if(!this.isNull(hp) && !this.isMobile(hp)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.'; this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._phone.focus(); this.$refs._phone.focus();
return false; return false;
} }
if(this.isNull(this.email)){ if(this.isNull(this.email)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.'; this.row.msg1 = '이메일을 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._email.focus(); this.$refs._email.focus();
return false; return false;
} }
const email = this.email; const email = this.email;
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){ if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '이메일 형식이 잘못되었습니다. 확인해 주세요.'; this.row.msg1 = '이메일 형식이 잘못되었습니다. 확인해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._email.focus(); this.$refs._email.focus();
return false; return false;
} }
if(this.isNull(this.userStat)){ if(this.isNull(this.userStat)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '상태를 선택 해주세요.'; this.row.msg1 = '상태를 선택 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
// this.$refs._auth.focus(); // this.$refs._auth.focus();
return false; return false;
} }
@@ -205,50 +216,46 @@ export default {
return true; return true;
}, },
// 모달 띄우기 // 모달 띄우기
ModalOpen(){ ModalOpen(){
var dimmed = document.getElementsByClassName('dimmed'); // 모달 오픈
dimmed[0].style.display = 'block'; var dimmed = document.getElementsByClassName('modal29');
var wrap = document.getElementsByClassName('popup-wrap'); for (var i = 0; i < dimmed.length; i++) {
wrap[0].style.display = 'block'; dimmed[i].style.display = 'block';
var obj = document.getElementsByClassName('modal29'); }
obj[0].style.display = 'block'; this.formReset();
this.formReset();
}, },
// 모달 끄기 // 모달 끄기
ModalClose(){ ModalClose(){
//this.formReset(); var dimmed = document.getElementsByClassName('modal29');
var dimmed = document.getElementsByClassName('dimmed'); for (var i = 0; i < dimmed.length; i++) {
dimmed[0].style.display = 'none'; dimmed[i].style.display = 'none';
var wrap = document.getElementsByClassName('popup-wrap'); }
wrap[0].style.display = 'none';
var popup = document.getElementsByClassName('modal29');
popup[0].style.display = 'none';
}, },
// 저장 후 부모창 호출. // 저장 후 부모창 호출.
toComplete(){ toComplete(){
this.getParent('memberList').$refs.table.reloadData(); this.getParent('memberList').$refs.table.reloadData();
this.ModalClose(); this.ModalClose();
}, },
async doInsert(){ async doInsert(){
if(this.doValidate()){ if(this.doValidate()){
console.log(this.row) console.log(this.row)
try { try {
const response = await custMgtApi.insertTestId(this.row); const response = await custMgtApi.insertTestId(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
// this.row.title = '청약고객관리'; this.toComplete();
// this.row.msg1 = '저장 하였습니다.'; }else if(result != null && result.retCode == "1009"){
// this.$refs.commmonModal.alertModalOpen(this.row); this.row.title = '청약고객관리';
this.toComplete(); this.row.msg1 = '실패 하였습니다.';
} this.$refs.commmonModal.alertModalOpen(this.row);
} catch(err) { }
this.row.title = '청약고객관리'; } catch(err) {
this.row.msg1 = '실패 하였습니다.'; this.row.title = '청약고객관리';
this.$refs.commmonModal.alertModalOpen(this.row); this.row.msg1 = '실패 하였습니다.';
} this.$refs.commmonModal.alertModalOpen(this.row);
} }
}
}, },
formReset(){ formReset(){
// this.$refs.adminRegForm.reset(); // this.$refs.adminRegForm.reset();

View File

@@ -1,144 +1,144 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed confirm" @click="confirmModalCancel();"></div> <div class="dimmed confirm" @click="confirmModalCancel();"></div>
<div class="popup-wrap confirm"> <div class="popup-wrap confirm">
<!-- 수정 확인 --> <!-- 수정 확인 -->
<div class="popup confirm"> <div class="popup confirm">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">{{title}}</h3> <h3 class="pop-tit">{{ title }}</h3>
</div>
<div class="pop-cont">
<p>{{msg}}</p>
</div>
<div class="pop-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</div>
</div>
</div> </div>
<div class="pop-cont">
<!-- 사용자 등록 - 최초 등록 --> <p>{{ msg }}</p>
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
<div class="popup-wrap confirm-insert">
<div class="popup confirm-insert">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>해당 사용자를 등록하고 인증 메일을</p>
<p>발송하시겠습니까?</p>
<p>사용을 위해서는 등록된 이메일 인증 </p>
<p>서비스 이용이 가능합니다.</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
<button class="btn-default" @click="confirmInsertClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 이메일 형식 체크 -->
<div class="dimmed validation-email" @click="validationEmailClose();"></div>
<div class="popup-wrap validation-email">
<div class="popup validation-email">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>E-mail 형식에 맞지 않습니다.</p>
<p>확인하여 다시 등록 부탁 드립니다.</p>
</div>
<div class="pop-btn1">
<button class="btn-pcolor" @click="validationEmailClose();">확인</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 아이디 중복 체크 -->
<div class="dimmed validation-id-duplicate" @click="validationIdDuplicateClose();"></div>
<div class="popup-wrap validation-id-duplicate">
<div class="popup validation-id-duplicate">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>중복된 아이디가 있습니다.</p>
<p>아이디를 다시 확인하여 등록 부탁드립니다.</p>
</div>
<div class="pop-btn1">
<button class="btn-pcolor" @click="validationIdDuplicateClose();">확인</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 최대 등록 제한 -->
<div class="dimmed validation-maxlimit" @click="validationMaxlimitClose();"></div>
<div class="popup-wrap validation-maxlimit">
<div class="popup validation-maxlimit">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>사용자는 최대 100개까지 등록 가능합니다.</p>
</div>
<div class="popup-btn1">
<button class="btn-pcolor" @click="validationMaxlimitClose();">확인</button>
</div>
</div> </div>
</div> <div class="pop-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 휴대폰번호 형식 체크 --> <!-- 사용자 등록 - 최초 등록 -->
<div class="dimmed valication-phonenumber" @click="validationPhonenumberClose();"></div> <div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
<div class="popup-wrap valication-phonenumber"> <div class="popup-wrap confirm-insert">
<div class="popup valication-phonenumber"> <div class="popup confirm-insert">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3> <h3 class="pop-tit">사용자 등록</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>휴대폰번호를 확인해 주세요.</p> <p>해당 사용자를 등록하고 인증 메일을</p>
</div> <p>발송하시겠습니까?</p>
<div class="pop-btn1"> <p>사용을 위해서는 등록된 이메일 인증 </p>
<button class="btn-pcolor" @click="validationPhonenumberClose();">확인</button> <p>서비스 이용이 가능합니다.</p>
</div> </div>
</div> <div class="popup-btn2">
</div> <button class="btn-pcolor" @click="confirmInsert();">확인</button>
<button class="btn-default" @click="confirmInsertClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 삭제 --> <!-- 사용자 등록 - 이메일 형식 체크 -->
<div class="dimmed confirm-delete" @click="confirmDeleteClose();"></div> <div class="dimmed validation-email" @click="validationEmailClose();"></div>
<div class="popup-wrap confirm-delete"> <div class="popup-wrap validation-email">
<div class="popup confirm-delete"> <div class="popup validation-email">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">사용자 삭제</h3> <h3 class="pop-tit">사용자 등록</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>선택한 사용자를 삭제하시겠습니까?</p> <p>E-mail 형식에 맞지 않습니다.</p>
</div> <p>확인하여 다시 등록 부탁 드립니다.</p>
<div class="pop-btn2"> </div>
<button class="btn-pcolor" @click="confirmDelete();">확인</button> <div class="pop-btn1">
<button class="btn-default" @click="confirmDeleteClose();">취소</button> <button class="btn-pcolor" @click="validationEmailClose();">확인</button>
</div> </div>
</div> </div>
</div> </div>
<!-- 사용자 수정 확인 --> <!-- 사용자 등록 - 아이디 중복 체크 -->
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div> <div class="dimmed validation-id-duplicate" @click="validationIdDuplicateClose();"></div>
<div class="popup-wrap confirm-update"> <div class="popup-wrap validation-id-duplicate">
<div class="popup confirm-update"> <div class="popup validation-id-duplicate">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">사용자 수정 확인</h3> <h3 class="pop-tit">사용자 등록</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>변경 내용을 저장하시겠습니까?</p> <p>중복 아이디가 있습니다.</p>
</div> <p>아이디를 다시 확인하여 등록 부탁드립니다.</p>
<div class="popup-btn2"> </div>
<button class="btn-pcolor" @click="confirmUpdate();">확인</button> <div class="pop-btn1">
<button class="btn-default" @click="confirmUpdateClose();">취소</button> <button class="btn-pcolor" @click="validationIdDuplicateClose();">확인</button>
</div> </div>
</div> </div>
</div> </div>
<!-- 사용자 수정(청약고객:sub) 확인 --> <!-- 사용자 등록 - 최대 등록 제한 -->
<div class="dimmed validation-maxlimit" @click="validationMaxlimitClose();"></div>
<div class="popup-wrap validation-maxlimit">
<div class="popup validation-maxlimit">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>사용자는 최대 100개까지 등록 가능합니다.</p>
</div>
<div class="popup-btn1">
<button class="btn-pcolor" @click="validationMaxlimitClose();">확인</button>
</div>
</div>
</div>
<!-- 사용자 등록 - 휴대폰번호 형식 체크 -->
<div class="dimmed valication-phonenumber" @click="validationPhonenumberClose();"></div>
<div class="popup-wrap valication-phonenumber">
<div class="popup valication-phonenumber">
<div class="pop-head">
<h3 class="pop-tit">사용자 등록</h3>
</div>
<div class="pop-cont">
<p>휴대폰번호를 확인해 주세요.</p>
</div>
<div class="pop-btn1">
<button class="btn-pcolor" @click="validationPhonenumberClose();">확인</button>
</div>
</div>
</div>
<!-- 사용자 삭제 -->
<div class="dimmed confirm-delete" @click="confirmDeleteClose();"></div>
<div class="popup-wrap confirm-delete">
<div class="popup confirm-delete">
<div class="pop-head">
<h3 class="pop-tit">사용자 삭제</h3>
</div>
<div class="pop-cont">
<p>선택한 사용자를 삭제하시겠습니까?</p>
</div>
<div class="pop-btn2">
<button class="btn-pcolor" @click="confirmDelete();">확인</button>
<button class="btn-default" @click="confirmDeleteClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 수정 확인 -->
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
<div class="popup-wrap confirm-update">
<div class="popup confirm-update">
<div class="pop-head">
<h3 class="pop-tit">사용자 수정 확인</h3>
</div>
<div class="pop-cont">
<p>변경된 내용을 저장하시겠습니까?</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
</div>
</div>
</div>
<!-- 사용자 수정(청약고객:sub) 확인 -->
<div class="dimmed confirm-update-sub" @click="confirmUpdateSubClose();"></div> <div class="dimmed confirm-update-sub" @click="confirmUpdateSubClose();"></div>
<div class="popup-wrap confirm-update-sub"> <div class="popup-wrap confirm-update-sub">
<div class="popup confirm-update-sub"> <div class="popup confirm-update-sub">
@@ -155,287 +155,294 @@
</div> </div>
</div> </div>
<!-- 사용자 ID 생성 파일 업로드 - 성공 --> <!-- 사용자 ID 생성 파일 업로드 - 성공 -->
<div class="dimmed success-fileupload" @click="successFileuploadClose();"></div> <div class="dimmed success-fileupload" @click="successFileuploadClose();"></div>
<div class="popup-wrap success-fileupload"> <div class="popup-wrap success-fileupload">
<div class="popup success-fileupload"> <div class="popup success-fileupload">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">사용자 ID 생성 파일 업로드</h3> <h3 class="pop-tit">사용자 ID 생성 파일 업로드</h3>
</div>
<div class="pop-cont">
<p>정상 업로드 되었습니다.</p>
</div>
<div class="pop-btn1">
<button class="btn-pcolor" @click="successFileuploadClose();">확인</button>
</div>
</div>
</div> </div>
<div class="pop-cont">
<p>정상 업로드 되었습니다.</p>
</div>
<div class="popup-btn1">
<button class="btn-pcolor" @click="successFileuploadClose();">확인</button>
</div>
</div>
</div> </div>
<div class="dimmed fail-fileupload" @click="failFileuploadClose();"></div>
<div class="popup-wrap fail-fileupload">
<!-- 사용자 ID 생성 파일 업로드 -->
<div class="popup fail-fileupload">
<div class="pop-head">
<h3 class="pop-tit">사용자 ID 생성 파일 업로드</h3>
</div>
<div class="pop-cont">
<p>파일 업로드 오류가 발생하여 정상건만</p>
<p>업로드 완료하였습니다.</p>
</div>
<ul class="pop-cont-detail">
<li> <span class="number">{{ totalCnt }}</span> ( 정상 <span class="number blue">{{ successCnt }}</span> 오류
<span class="number red">{{ failCnt }}</span> )
</li>
</ul>
<div class="pop-cont bottom">
<p>오류 건은 확인 재등록 부탁 드립니다.</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="failFileuploadOk();">확인</button>
<!-- <button class="btn-default" @click="failFileuploadClose();">취소</button>-->
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
name: "validationConfirmPop", name: "validationConfirmPop",
data(){ data() {
return{ return {
row:{}, row: {},
title:'', title: '',
msg: '', msg: '',
} failCnt: 0,
successCnt: 0,
totalCnt: 0,
}
},
methods: {
//사용자등록 - 최초등록 Open
confirmInsertOpen() {
var dimmed = document.getElementsByClassName('confirm-insert');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
}, },
methods :{ //사용자등록 - 최초등록
//사용자등록 - 최초등록 Open confirmInsert() {
confirmInsertOpen(){ var dimmed = document.getElementsByClassName('confirm-insert');
var dimmed = document.getElementsByClassName('confirm-insert'); for (var i = 0; i < dimmed.length; i++) {
for(var i = 0; i < dimmed.length; i++){ dimmed[i].style.display = 'none';
dimmed[i].style.display = 'block'; }
} this.$parent.memberInsert();
},
}, //사용자등록 - 최초등록 Close
//사용자등록 - 최초등록 confirmInsertClose() {
confirmInsert(){ var dimmed = document.getElementsByClassName('confirm-insert');
var dimmed = document.getElementsByClassName('confirm-insert'); for (var i = 0; i < dimmed.length; i++) {
for(var i = 0; i < dimmed.length; i++){ dimmed[i].style.display = 'none';
dimmed[i].style.display = 'none'; }
} },
// 사용자 삭제 Open
this.$parent.memberInsert(); confirmDeleteOpen() {
var dimmed = document.getElementsByClassName('confirm-delete');
}, for (var i = 0; i < dimmed.length; i++) {
//사용자등록 - 최초등록 Close dimmed[i].style.display = 'block';
confirmInsertClose(){ }
var dimmed = document.getElementsByClassName('confirm-insert'); },
for(var i = 0; i < dimmed.length; i++){ //사용자 삭제
dimmed[i].style.display = 'none'; confirmDelete() {
} var dimmed = document.getElementsByClassName('confirm-delete');
for (var i = 0; i < dimmed.length; i++) {
}, dimmed[i].style.display = 'none';
// 사용자 삭제 Open }
confirmDeleteOpen(){ },
var dimmed = document.getElementsByClassName('confirm-delete'); //사용자 삭제 Close
for(var i = 0; i < dimmed.length; i++){ confirmDeleteClose() {
dimmed[i].style.display = 'block'; var dimmed = document.getElementsByClassName('confirm-delete');
} for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}, }
//사용자 삭제 },
confirmDelete(){ //사용자 수정 확인 Open
var dimmed = document.getElementsByClassName('confirm-delete'); confirmUpdateOpen() {
for(var i = 0; i < dimmed.length; i++){ var dimmed = document.getElementsByClassName('confirm-update');
dimmed[i].style.display = 'none'; for (var i = 0; i < dimmed.length; i++) {
} dimmed[i].style.display = 'block';
}
}, },
//사용자 삭제 Close //사용자 수정 확인
confirmDeleteClose(){ confirmUpdate() {
var dimmed = document.getElementsByClassName('confirm-delete'); var dimmed = document.getElementsByClassName('confirm-update');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.$parent.memberUpdate();
}, },
//사용자 수정 확인 Open // 사용자 수정 Close
confirmUpdateOpen(){ confirmUpdateClose() {
var dimmed = document.getElementsByClassName('confirm-update'); var dimmed = document.getElementsByClassName('confirm-update');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'none';
} }
},
}, //사용자 수정(청약고객-sub) 확인 Open
//사용자 수정 확인 confirmUpdateSubOpen() {
confirmUpdate(){ var dimmed = document.getElementsByClassName('confirm-update-sub');
var dimmed = document.getElementsByClassName('confirm-update'); for (var i = 0; i < dimmed.length; i++) {
for(var i = 0; i < dimmed.length; i++){ dimmed[i].style.display = 'block';
dimmed[i].style.display = 'none'; }
} },
//사용자 수정(청약고객-sub) 확인
this.$parent.memberUpdate(); confirmUpdateSub() {
var dimmed = document.getElementsByClassName('confirm-update-sub');
}, for (var i = 0; i < dimmed.length; i++) {
// 사용자 수정 Close dimmed[i].style.display = 'none';
confirmUpdateClose(){ }
var dimmed = document.getElementsByClassName('confirm-update'); this.$parent.updateAdminInfo();
for(var i = 0; i < dimmed.length; i++){ },
dimmed[i].style.display = 'none'; // 사용자 수정(청약고객-sub) Close
} confirmUpdateSubClose() {
var dimmed = document.getElementsByClassName('confirm-update-sub');
}, for (var i = 0; i < dimmed.length; i++) {
//사용자 수정(청약고객-sub) 확인 Open dimmed[i].style.display = 'none';
confirmUpdateSubOpen(){ }
var dimmed = document.getElementsByClassName('confirm-update-sub'); },
for(var i = 0; i < dimmed.length; i++){ // 이메일 형식 체크 Open
dimmed[i].style.display = 'block'; validationEmailOpen() {
} var dimmed = document.getElementsByClassName('validation-email');
for (var i = 0; i < dimmed.length; i++) {
}, dimmed[i].style.display = 'block';
//사용자 수정(청약고객-sub) 확인 }
confirmUpdateSub(){ },
var dimmed = document.getElementsByClassName('confirm-update-sub'); // 이메일 형식 체크 Close
for(var i = 0; i < dimmed.length; i++){ validationEmailClose() {
dimmed[i].style.display = 'none'; var dimmed = document.getElementsByClassName('validation-email');
} for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
this.$parent.updateAdminInfo(); }
this.$parent.checkEmailFocus();
}, },
// 사용자 수정(청약고객-sub) Close // 아이디 중복 체크 Open
confirmUpdateSubClose(){ validationIdDuplicateOpen() {
var dimmed = document.getElementsByClassName('confirm-update-sub'); var dimmed = document.getElementsByClassName('validation-id-duplicate');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'block';
} }
},
}, // 아이디 중복 체크 Close
// 이메일 형식 체크 Open validationIdDuplicateClose() {
validationEmailOpen(){ var dimmed = document.getElementsByClassName('validation-id-duplicate');
var dimmed = document.getElementsByClassName('validation-email'); for (var i = 0; i < dimmed.length; i++) {
for(var i = 0; i < dimmed.length; i++){ dimmed[i].style.display = 'none';
dimmed[i].style.display = 'block'; }
} this.$parent.checkIdDupFocus();
},
}, // 최대 등록 제한 Open
// 이메일 형식 체크 Close validationMaxlimitOpen() {
validationEmailClose(){ var dimmed = document.getElementsByClassName('validation-maxlimit');
var dimmed = document.getElementsByClassName('validation-email'); for (var i = 0; i < dimmed.length; i++) {
for(var i = 0; i < dimmed.length; i++){ dimmed[i].style.display = 'block';
dimmed[i].style.display = 'none'; }
} },
// 최대 등록 제한 Close
this.$parent.checkEmailFocus(); validationMaxlimitClose() {
var dimmed = document.getElementsByClassName('validation-maxlimit');
}, for (var i = 0; i < dimmed.length; i++) {
// 아이디 중복 체크 Open dimmed[i].style.display = 'none';
validationIdDuplicateOpen(){ }
var dimmed = document.getElementsByClassName('validation-id-duplicate'); },
for(var i = 0; i < dimmed.length; i++){ // 휴대폰번호 형식 체크 Open
dimmed[i].style.display = 'block'; validationPhonenumberOpen() {
} var dimmed = document.getElementsByClassName('valication-phonenumber');
for (var i = 0; i < dimmed.length; i++) {
}, dimmed[i].style.display = 'block';
// 아이디 중복 체크 Close }
validationIdDuplicateClose(){ },
var dimmed = document.getElementsByClassName('validation-id-duplicate'); // 휴대폰번호 형식 체크 Close
for(var i = 0; i < dimmed.length; i++){ validationPhonenumberClose() {
dimmed[i].style.display = 'none'; var dimmed = document.getElementsByClassName('valication-phonenumber');
} for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
this.$parent.checkIdDupFocus(); }
this.$parent.checkPhoneFocus();
}, },
// 최대 등록 제한 Open // 사용자 ID 생성 파일 업로드 - 성공 Open
validationMaxlimitOpen(){ successFileuploadOpen() {
console.log("1231232323") var dimmed = document.getElementsByClassName('success-fileupload');
var dimmed = document.getElementsByClassName('validation-maxlimit'); for (var i = 0; i < dimmed.length; i++) {
for(var i = 0; i < dimmed.length; i++){ dimmed[i].style.display = 'block';
dimmed[i].style.display = 'block'; }
} },
}, // 사용자 ID 생성 파일 업로드 - 성공 Close
// 최대 등록 제한 Close successFileuploadClose() {
validationMaxlimitClose(){ var dimmed = document.getElementsByClassName('success-fileupload');
var dimmed = document.getElementsByClassName('validation-maxlimit'); for (var i = 0; i < dimmed.length; i++) {
for(var i = 0; i < dimmed.length; i++){ dimmed[i].style.display = 'none';
dimmed[i].style.display = 'none'; }
} // 목록페이지 이동
this.toComplete();
// this.$parent.toComplete(); },
// 정상완료 후 목록페이지 이동
}, toComplete() {
// 휴대폰번호 형식 체크 Open this.row.searchType1 = '';
validationPhonenumberOpen(){ this.row.searchType2 = '';
var dimmed = document.getElementsByClassName('valication-phonenumber'); this.row.searchType3 = '';
for(var i = 0; i < dimmed.length; i++){ this.row.searchText1 = '';
dimmed[i].style.display = 'block'; this.row.startDt = '';
} this.row.endDt = '';
this.row.page = 1;
}, this.$router.push({name: 'subsList', params: this.row});
// 휴대폰번호 형식 체크 Close },
validationPhonenumberClose(){ // 사용자 ID 생성 파일 업로드 - 성공 Open
var dimmed = document.getElementsByClassName('valication-phonenumber'); failFileuploadOpen(props) {
for(var i = 0; i < dimmed.length; i++){ var dimmed = document.getElementsByClassName('fail-fileupload');
dimmed[i].style.display = 'none'; for (var i = 0; i < dimmed.length; i++) {
} dimmed[i].style.display = 'block';
this.$parent.checkPhoneFocus(); }
this.totalCnt = props.totalCnt
}, this.successCnt = props.successCnt
// 사용자 ID 생성 파일 업로드 - 성공 Open this.failCnt = props.failCnt
successFileuploadOpen(){ },
var dimmed = document.getElementsByClassName('success-fileupload'); failFileuploadOk() {
for(var i = 0; i < dimmed.length; i++){ var dimmed = document.getElementsByClassName('fail-fileupload');
dimmed[i].style.display = 'block'; for (var i = 0; i < dimmed.length; i++) {
} dimmed[i].style.display = 'none';
}
}, this.row.result = true;
// 사용자 ID 생성 파일 업로드 - 성공 Close // 부모 함수 호출.
successFileuploadClose(){ this.$parent.failFileuploadOk(this.row);
var dimmed = document.getElementsByClassName('success-fileupload'); },
for(var i = 0; i < dimmed.length; i++){ // 사용자 ID 생성 파일 업로드 - 성공 Close
dimmed[i].style.display = 'none'; failFileuploadClose() {
} var dimmed = document.getElementsByClassName('fail-fileupload');
for (var i = 0; i < dimmed.length; i++) {
// 목록페이지 이동 dimmed[i].style.display = 'none';
this.toComplete(); }
},
}, // 모달 오픈
// 정상완료 후 목록페이지 이동 confirmModalOpen(props) {
toComplete(){ var dimmed = document.getElementsByClassName('confirm');
this.row.searchType1 = ''; for (var i = 0; i < dimmed.length; i++) {
this.row.searchType2= ''; dimmed[i].style.display = 'block';
this.row.searchType3= ''; }
this.row.searchText1= ''; this.title = props.title;
this.row.startDt= ''; this.msg = props.msg;
this.row.endDt= ''; },
this.row.page = 1; // 모달 끄기(ok)
confirmModalClose() {
this.$router.push({ name: 'subsList', params: this.row }); var dimmed = document.getElementsByClassName('confirm');
}, for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
// 모달 오픈 this.$parent.confirmCalbackFnc(this.row);
confirmModalOpen(props){ },
var dimmed = document.getElementsByClassName('confirm'); // 모달 끄기(취소)
for(var i = 0; i < dimmed.length; i++){ confirmModalCancel() {
dimmed[i].style.display = 'block'; var dimmed = document.getElementsByClassName('confirm');
} for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
// var modal41 = document.getElementsByClassName('modal41'); }
// modal41[0].style.display = 'block'; this.row.result = false;
// 부모 함수 호출.
this.title = props.title; this.$parent.confirmCalbackFnc(this.row);
this.msg = props.msg; },
}, }
// 모달 끄기(ok)
confirmModalClose(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
}
} }
</script> </script>
<!-- <style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style> -->

View File

@@ -1,13 +1,13 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed alertModal" @click="alertModalCancel();"></div> <div class="dimmed alertModal" @click="alertModalCancel();"></div>
<div class="popup-wrap alertModal"> <div class="popup-wrap alertModal">
<!-- 로그인실패: 확인 --> <!-- 로그인실패: 확인 -->
<div class="popup alertModal"> <div class="popup alertModal">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">{{title}}</h3> <h3 class="pop-tit">{{ title }}</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>{{ msg1 }}</p> <p>{{ msg1 }}</p>
@@ -21,86 +21,86 @@
</div> </div>
</div> </div>
<div class="dimmed confirm" @click="confirmModalCancel();"></div> <div class="dimmed confirm" @click="confirmModalCancel();"></div>
<div class="popup-wrap confirm"> <div class="popup-wrap confirm">
<!-- 수정 확인 --> <!-- 수정 확인 -->
<div class="popup confirm"> <div class="popup confirm">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">{{title}}</h3> <h3 class="pop-tit">{{ title }}</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>{{ msg1 }}</p> <p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p> <p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p> <p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p> <p v-if="msg4 !== ''">{{ msg4 }}</p>
</div> </div>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button> <button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button> <button class="btn-default" @click="confirmModalCancel();">취소</button>
</div> </div>
</div> </div>
</div> </div>
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div> <div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
<div class="popup-wrap confirm2"> <div class="popup-wrap confirm2">
<!-- 수정 확인 --> <!-- 수정 확인 -->
<div class="popup confirm2"> <div class="popup confirm2">
<div class="pop-head"> <div class="pop-head">
<h3 class="popup-tit">{{title}}</h3> <h3 class="popup-tit">{{ title }}</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>{{ msg1 }}</p> <p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p> <p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p> <p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p> <p v-if="msg4 !== ''">{{ msg4 }}</p>
</div> </div>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button> <button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
<button class="btn-default" @click="confirmModalCancel2();">취소</button> <button class="btn-default" @click="confirmModalCancel2();">취소</button>
</div> </div>
</div> </div>
</div> </div>
<div class="dimmed confirmMemo" @click="confirmModalCancelMemo();"></div> <div class="dimmed confirmMemo" @click="confirmModalCancelMemo();"></div>
<div class="popup-wrap confirmMemo"> <div class="popup-wrap confirmMemo">
<!-- 수정 확인 --> <!-- 수정 확인 -->
<div class="popup confirmMemo"> <div class="popup confirmMemo">
<div class="pop-head"> <div class="pop-head">
<h3 class="popup-tit">{{title}}</h3> <h3 class="popup-tit">{{ title }}</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>{{ msg1 }}</p> <p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p> <p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p> <p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p> <p v-if="msg4 !== ''">{{ msg4 }}</p>
</div> </div>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalCloseMemo();">확인</button> <button class="btn-pcolor" @click="confirmModalCloseMemo();">확인</button>
<button class="btn-default" @click="confirmModalCancelMemo();">취소</button> <button class="btn-default" @click="confirmModalCancelMemo();">취소</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "confirm", name: "confirm",
data(){ data() {
return{ return {
row:{}, row: {},
title:'', title: '',
msg1: '', msg1: '',
msg2: '', msg2: '',
msg3: '', msg3: '',
msg4: '', msg4: '',
targetFocus: '', targetFocus: '',
} }
}, },
methods :{ methods: {
alertModalOpen(props){ alertModalOpen(props) {
console.log(props.msg1); console.log(props.msg1);
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
@@ -109,136 +109,130 @@ export default {
this.msg4 = props.msg4; this.msg4 = props.msg4;
console.log(props) console.log(props)
var dimmed = document.getElementsByClassName('alertModal'); var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
}, },
alertModalClose(){ alertModalClose() {
var dimmed = document.getElementsByClassName('alertModal'); var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.$parent.checkFocus(); this.$parent.checkFocus();
}, },
alertModalCancel(){ alertModalCancel() {
var dimmed = document.getElementsByClassName('alertModal'); var dimmed = document.getElementsByClassName('alertModal');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.$parent.checkFocus(); this.$parent.checkFocus();
}, },
// 모달 오픈 // 모달 오픈
confirmModalOpen(props){ confirmModalOpen(props) {
console.log(props) console.log(props)
var dimmed = document.getElementsByClassName('confirm'); var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
this.msg2 = props.msg2; this.msg2 = props.msg2;
this.msg3 = props.msg3; this.msg3 = props.msg3;
this.msg4 = props.msg4; this.msg4 = props.msg4;
}, },
confirmModalOpen2(props){ confirmModalOpen2(props) {
var dimmed = document.getElementsByClassName('confirm2'); var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
this.msg2 = props.msg2; this.msg2 = props.msg2;
this.msg3 = props.msg3; this.msg3 = props.msg3;
this.msg4 = props.msg4; this.msg4 = props.msg4;
}, },
confirmModalOpenMemo(props){ confirmModalOpenMemo(props) {
var dimmed = document.getElementsByClassName('confirmMemo'); var dimmed = document.getElementsByClassName('confirmMemo');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
this.msg2 = props.msg2; this.msg2 = props.msg2;
this.msg3 = props.msg3; this.msg3 = props.msg3;
this.msg4 = props.msg4; this.msg4 = props.msg4;
}, },
// 모달 끄기(ok) // 모달 끄기(ok)
confirmModalClose(){ confirmModalClose() {
var dimmed = document.getElementsByClassName('confirm'); var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(ok)
confirmModalClose2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true; this.row.result = true;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
// 모달 끄기(ok) // 모달 끄기(ok)
confirmModalCloseMemo(){ confirmModalClose2() {
var dimmed = document.getElementsByClassName('confirmMemo'); var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = true; this.row.result = true;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
// 모달 끄기(취소) // 모달 끄기(ok)
confirmModalCancel(){ confirmModalCloseMemo() {
var dimmed = document.getElementsByClassName('confirm'); var dimmed = document.getElementsByClassName('confirmMemo');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel() {
var dimmed = document.getElementsByClassName('confirm');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.row.result = false; this.row.result = false;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
// 모달 끄기(취소) // 모달 끄기(취소)
confirmModalCancel2(){ confirmModalCancel2() {
var dimmed = document.getElementsByClassName('confirm2'); var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = false; this.row.result = false;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
// 모달 끄기(취소) // 모달 끄기(취소)
confirmModalCancelMemo(){ confirmModalCancelMemo() {
var dimmed = document.getElementsByClassName('confirmMemo'); var dimmed = document.getElementsByClassName('confirmMemo');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = false; this.row.result = false;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.memberDeleteConfirmCalbackFnc(this.row); this.$parent.memberDeleteConfirmCalbackFnc(this.row);
}, },
} }
} }
</script> </script>
<!--
<style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style> -->

View File

@@ -45,8 +45,11 @@
</tr> </tr>
<tr class="tr_input w30"> <tr class="tr_input w30">
<th>발송한도 설정</th> <th>발송한도 설정</th>
<td colspan="2"> <td colspan="2" v-if="sendingLimit=='0'">
<input type="text" v-model="sendingLimit" ref="_sendingLimit"> <input type="text" v-model="sendingLimit" ref="_sendingLimit" disabled>
</td>
<td colspan="2" v-if="sendingLimit!='0'">
<input type="text" v-model.trim="sendingLimit" ref="_sendingLimit" @keypress="onlyNum" @input="onlyNum" maxlength="20">
</td> </td>
<th class="center">라인타입</th> <th class="center">라인타입</th>
<td colspan="2"> <td colspan="2">
@@ -132,7 +135,8 @@
<td>{{ option.userNm }}</td> <td>{{ option.userNm }}</td>
<td>{{ option.mdn }}</td> <td>{{ option.mdn }}</td>
<td> <td>
<input type="checkbox" id="user_id_status01" name="user_id_status" v-model="option.userStat" true-value='정상' false-value='사용중지' disabled/> <!-- <input type="checkbox" id="user_id_status01" name="user_id_status" v-model="option.userStat" true-value='정상' false-value='사용중지' :style="{cursor: 'default'}" disabled/> -->
<input type="checkbox" id="user_id_status01" name="user_id_status" v-model="option.userStat" true-value='정상' false-value='사용중지' disabled/>
<label class="toggle_switch" for="user_id_status01"></label> <label class="toggle_switch" for="user_id_status01"></label>
</td> </td>
<td v-if="isActive"><button type="button" class="button white btn-a" @click="memberUpdatePopOpen(option.userId);">수정</button></td> <td v-if="isActive"><button type="button" class="button white btn-a" @click="memberUpdatePopOpen(option.userId);">수정</button></td>
@@ -160,9 +164,14 @@
</div> </div>
</div> </div>
</template> </template>
<style>
.defaultCursor{
cursor : default;
}
</style>
<script> <script>
import custMgtApi from "../service/custMgtApi.js"; import custMgtApi from "../service/custMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins';
import MemberBulkRegPop from '../components/MemberBulkRegPop'; import MemberBulkRegPop from '../components/MemberBulkRegPop';
import MemberRegPop from '../components/MemberRegPop'; import MemberRegPop from '../components/MemberRegPop';
import MemberModifyPop from '../components/MemberModifyPop'; import MemberModifyPop from '../components/MemberModifyPop';
@@ -171,7 +180,8 @@ import commonModal from "@/components/modal/commonModal";
import ValidationConfirmPop from "@/modules/custMgt/components/ValidationConfirmPop"; import ValidationConfirmPop from "@/modules/custMgt/components/ValidationConfirmPop";
export default { export default {
name: 'memberAdminDetail', name: 'memberAdminDetail',
mixins: [utils_mixin, chkPattern2],
watch:{ watch:{
stat(){ stat(){
console.log('watch : ', this.stat) console.log('watch : ', this.stat)
@@ -201,6 +211,7 @@ export default {
svcUserId:'', svcUserId:'',
ezSvcUserAuthKey:'', ezSvcUserAuthKey:'',
isActive:true, isActive:true,
//applyTbStyle: 'cursor: default;',
} }
}, },
props: { props: {
@@ -274,7 +285,8 @@ export default {
this.userType = result.data.userType; this.userType = result.data.userType;
this.adminId = result.data.adminId; this.adminId = result.data.adminId;
this.adminNm = result.data.adminNm; this.adminNm = result.data.adminNm;
this.sendingLimit = result.data.sendingLimit.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); //this.sendingLimit = result.data.sendingLimit.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
this.sendingLimit = result.data.sendingLimit;
this.lineType = result.data.lineType; this.lineType = result.data.lineType;
this.userStat = result.data.userStat; this.userStat = result.data.userStat;
if(this.userStat === '02'){ if(this.userStat === '02'){

View File

@@ -210,14 +210,14 @@ export default {
}, },
doValidate(){ doValidate(){
if(this.isNull(this.userNm)){ if(this.isNull(this.userNm)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '이름을 입력해 주세요.'; this.row.msg1 = '이름을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._userNm.focus(); this.$refs._userNm.focus();
return false; return false;
} }
if(this.isNull(this.email)){ if(this.isNull(this.email)){
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '이메일을 입력해주세요.'; this.row.msg1 = '이메일을 입력해주세요.';

View File

@@ -1,22 +1,22 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">청약고객관리</h3> <h3 class="title">청약고객관리</h3>
<p class="breadcrumb">고객관리 &gt; 청약고객관리 &gt; 회원관리</p> <p class="breadcrumb">고객관리 &gt; 청약고객관리 &gt; 회원관리</p>
</div> </div>
<div class="top_tab"> <div class="top_tab">
<a href="javascript:void(0);" @click="toMove('subsList')">청약고객관리</a> <a href="javascript:void(0);" @click="toMove('subsList')">청약고객관리</a>
<a href="javascript:void(0);" class="on">회원관리</a> <a href="javascript:void(0);" class="on">회원관리</a>
</div> </div>
<div class="search_form"> <div class="search_form">
<div class="search_wrap"> <div class="search_wrap">
<div class="group"> <div class="group">
<div class="input_box cal"> <div class="input_box cal">
<label for="right" class="label">조회기간</label> <label for="right" class="label">조회기간</label>
<div class="term"> <div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
@@ -39,79 +39,82 @@
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div> </div>
</div> </div>
<div class="select_box id"> <div class="select_box id">
<label for="right" class="label">상태</label> <label for="right" class="label">상태</label>
<select name="" id="" v-model="searchType1"> <select name="" id="" v-model="searchType1" @keyup.enter="search">
<option value="" selected>전체</option>
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">구분</label>
<select name="" id="" v-model="searchType2">
<option value="" selected>전체</option> <option value="" selected>전체</option>
<option value="01" >관리자</option> <option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
<option value="02" >사용자</option> {{ option.codeNm }}
<option value="03" >테스트</option> </option>
</select> </select>
</div> </div>
</div> <div class="select_box">
<div class="group"> <label for="right" class="label">구분</label>
<div class="select_box"> <select name="" id="" v-model="searchType2" @keyup.enter="search">
<label for="right" class="label">상세검색</label>
<select name="" id="" v-model="searchType3">
<option value="" selected>전체</option> <option value="" selected>전체</option>
<option value="01" selected>ID</option> <option value="01" selected>관리자</option>
<option value="02">이름</option> <option value="02">사용자</option>
<option value="03">관리자ID</option> <option value="03">테스트</option>
</select> </select>
</div> </div>
<div class="input_box"> </div>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1"/> <div class="group">
</div> <div class="select_box">
<button type="button" class="button grey" @click="search">조회</button> <label for="right" class="label">상세검색</label>
</div> <select name="" id="" v-model="searchType3" @keyup.enter="search">
</div> <option value="01" selected>ID</option>
</div> <option value="02">이름</option>
<option value="03">관리자ID</option>
<div class="info"> </select>
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> </div>
<div class="select_box NumberSe"> <div class="input_box">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> <input class="search-box" type="text" id="search" placeholder="검색어 입력" maxlength="100"
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option> v-model.trim="grid.params.searchText1" @keyup.enter="search"/>
</select> </div>
</div> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
<div class="button_group"> </div>
<button type="button" class="button blue" @click="ModalOpen();">테스트 ID 생성</button> </div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<testId-reg-pop ref="testIdRegPop"> </testId-reg-pop> <div class="info">
<common-modal ref="commmonModal"></common-modal> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
option.text
}}
</option>
</select>
</div>
</div>
<div class="button_group">
<button type="button" class="button blue" @click="ModalOpen();">테스트 ID 생성</button>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<testId-reg-pop ref="testIdRegPop"></testId-reg-pop>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</div>
</div>
</template> </template>
<script> <script>
@@ -122,25 +125,25 @@ import api from '@/service/api.js';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
} }
export default { export default {
@@ -156,78 +159,79 @@ export default {
statType: [], statType: [],
userType: [], userType: [],
searchType1:'', searchType1: '',
searchType2:'', searchType2: '',
searchType3:'', searchType3: '01',
row:{}, row: {},
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
totalItems: 0, totalItems: 0,
grid: { grid: {
url: '/api/v1/bo/custMgt/memberList', url: '/api/v1/bo/custMgt/memberList',
pagePerRows: 20, pagePerRows: 20,
pagination: true, pagination: true,
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거 isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
columns: [ columns: [
{ name: 'no', header: 'No', align: 'center', width: 60}, {name: 'no', header: 'No', align: 'center', width: 60},
{ name: 'userNm', header: '이름', align: 'center', width: 130}, {name: 'userNm', header: '이름', align: 'center', width: 130},
{ name: 'userType', header: '구분', align: 'center', width: 130}, {name: 'userType', header: '구분', align: 'center', width: 130},
{ name: 'adminId', header: '관리자ID', align: 'center', width: 130, cls: 'td_line'}, {name: 'adminId', header: '관리자ID', align: 'center', width: 130, cls: 'td_line'},
{ name: 'userId', header: 'ID', align: 'center', width: 130, renderer: { {
name: 'userId', header: 'ID', align: 'center', width: 130, renderer: {
type: CustomATagRenderer type: CustomATagRenderer
, options: { , options: {
callback: this.memberDetail, callback: this.memberDetail,
} }
} }
}, },
{ name: 'regDt', header: '등록일', align: 'center', width: 130}, {name: 'regDt', header: '등록일', align: 'center', width: 130},
{ name: 'userStat', header: '상태', align: 'center', width: 130} {name: 'userStat', header: '상태', align: 'center', width: 130}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchType3: '', searchType3: '',
searchText1: '', searchText1: '',
startDt: '', startDt: '',
endDt: '' endDt: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
TestIdRegPop, TestIdRegPop,
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
this.setCodeData(); this.setCodeData();
this.setPeriodDay(0); this.setPeriodDay(0);
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: 1, page: 1,
perPage: 50, perPage: 50,
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchType3: '', searchType3: '',
searchText1: '', searchText1: '',
startDt: '', startDt: '',
endDt: '' endDt: ''
} }
}); });
}, },
mounted() { mounted() {
// 달력 세팅 // 달력 세팅
@@ -237,35 +241,35 @@ export default {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD'); this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD');
this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD'); this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD');
console.log('this.perPageCnt'+this.perPageCnt); console.log('this.perPageCnt' + this.perPageCnt);
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1; this.grid.params.searchType1 = this.searchType1;
this.grid.params.searchType2 = this.searchType2; this.grid.params.searchType2 = this.searchType2;
@@ -274,45 +278,45 @@ export default {
this.sendStoreData(); this.sendStoreData();
}, },
toMove(routeName) { toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } }); this.$router.push({name: routeName, params: {page: 1, searchText: ''}});
}, },
ModalOpen: function(){ ModalOpen: function () {
this.$refs.testIdRegPop.ModalOpen(); this.$refs.testIdRegPop.ModalOpen();
}, },
memberDetail: function(props) { memberDetail: function (props) {
this.row.serviceId = props.userId; this.row.serviceId = props.userId;
if(props.userType == '관리자 ID'){ if (props.userType == '관리자 ID') {
// 관리자 ID용 상세페이지 이동 // 관리자 ID용 상세페이지 이동
this.$router.push({ name: 'memberAdminDetail', params: {serviceId : this.row.serviceId} }); this.$router.push({name: 'memberAdminDetail', params: {serviceId: this.row.serviceId}});
} else { } else {
// 사용자 ID용 상세페이지 이동 // 사용자 ID용 상세페이지 이동
this.$router.push({ name: 'memberDetail', params: {serviceId : this.row.serviceId} }); this.$router.push({name: 'memberDetail', params: {serviceId: this.row.serviceId}});
} }
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
// console.log("==========getP : " + getP._currentPage); // console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
// console.log("getCondition : "+ getCondition.perPage); // console.log("getCondition : "+ getCondition.perPage);
}, },
setCodeData() { setCodeData() {
// 상태 옵션 셋팅. // 상태 옵션 셋팅.
api.commCode({'grpCd' : 'SVCUSER_STTUS_CD'}).then(response => { api.commCode({'grpCd': 'SVCUSER_STTUS_CD'}).then(response => {
this.statType = response.data.data.list; this.statType = response.data.data.list;
}); });
// //
api.commCode({'grpCd' : 'SVCUSER_TP_CD'}).then(response => { api.commCode({'grpCd': 'SVCUSER_TP_CD'}).then(response => {
this.userType = response.data.data.list; this.userType = response.data.data.list;
}); });
}, },
@@ -346,15 +350,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -363,14 +367,14 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
initSetStartDate(){ initSetStartDate() {
let setYear = Number(moment(new Date()).format('YYYY')); let setYear = Number(moment(new Date()).format('YYYY'));
let initStartDate = new Date(setYear, 0, 1); let initStartDate = new Date(setYear, 0, 1);
this.startDate = initStartDate; this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD')); console.log(moment(this.startDate).format('YYYY-MM-DD'));
}, },
}, },
}; };
</script> </script>

View File

@@ -1,179 +1,176 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">청약고객관리</h3> <h3 class="title">청약고객관리</h3>
<p class="breadcrumb">고객관리 &gt; 청약고객관리</p> <p class="breadcrumb">고객관리 &gt; 청약고객관리</p>
</div> </div>
<div class="info"> <div class="info">
<div class="title">기본정보</div> <div class="title">기본정보</div>
</div> </div>
<div class="table table_form"> <div class="table table_form">
<!-- <form autocomplete="off">--> <!-- <form autocomplete="off">-->
<table> <table>
<colgroup> <colgroup>
<col style="width:140px"> <col style="width:140px">
<col style="width:auto"> <col style="width:auto">
<col style="width:auto"> <col style="width:auto">
<col style="width:140px"> <col style="width:140px">
<col style="width:auto"> <col style="width:auto">
<col style="width:auto"> <col style="width:auto">
</colgroup> </colgroup>
<tbody> <tbody>
<tr class="tr_input w75"> <tr class="tr_input w75">
<th>고객사명</th> <th>고객사명</th>
<td colspan="2"><input type="text" disabled v-model="custNm"></td> <td colspan="2"><input type="text" disabled v-model="custNm"></td>
</tr> </tr>
<tr class="tr_input w75"> <tr class="tr_input w75">
<th>대표자명</th> <th>대표자명</th>
<td colspan="2"><input type="text" disabled v-model="reprNm"></td> <td colspan="2"><input type="text" disabled v-model="reprNm"></td>
<th class="center">사용자 구분</th> <th class="center">사용자 구분</th>
<td colspan="2"><input type="text" disabled v-model="custType"></td> <td colspan="2"><input type="text" disabled v-model="custType"></td>
</tr> </tr>
<tr class="tr_input"> <tr class="tr_input">
<th>사업장 주소</th> <th>사업장 주소</th>
<td colspan="5"> <td colspan="5">
<div class="input-address"> <div class="input-address">
<input type="text" disabled v-model="adr1"> <input type="text" disabled v-model="adr1">
<input type="text" disabled v-model="adr2"> <input type="text" disabled v-model="adr2">
<input type="text" disabled v-model="adr3"> <input type="text" disabled v-model="adr3">
</div> </div>
</td> </td>
</tr> </tr>
<tr class="tr_input"> <tr class="tr_input">
<th>사업자등록번호</th> <th>사업자등록번호</th>
<td colspan="2"> <td colspan="2">
<div class="input-bnumber"> <div class="input-bnumber">
<input type="text" disabled v-model="bregNo1"> <input type="text" disabled v-model="bregNo1">
<input type="text" disabled v-model="bregNo2"> <input type="text" disabled v-model="bregNo2">
<input type="text" disabled v-model="bregNo3"> <input type="text" disabled v-model="bregNo3">
</div> </div>
</td> </td>
<th class="center">법인등록번호</th> <th class="center">법인등록번호</th>
<td colspan="2"> <td colspan="2">
<div class="input-double"> <div class="input-double">
<input type="text" disabled v-model="cprRegNo1"> <input type="text" disabled v-model="cprRegNo1">
<input type="text" disabled v-model="cprRegNo2"> <input type="text" disabled v-model="cprRegNo2">
</div> </div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- </form>--> <!-- </form>-->
</div> </div>
<div class="info"> <div class="info">
<div class="title">사용정보</div> <div class="title">사용정보</div>
</div> </div>
<div class="table table_form"> <div class="table table_form">
<!-- <form autocomplete="off">--> <table>
<table> <colgroup>
<colgroup> <col style="width:140px">
<col style="width:140px"> <col style="width:auto">
<col style="width:auto"> <col style="width:auto">
<col style="width:auto"> <col style="width:140px">
<col style="width:140px"> <col style="width:auto">
<col style="width:auto"> <col style="width:auto">
<col style="width:auto"> </colgroup>
</colgroup> <tbody>
<tbody> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>가입일</th>
<th>가입일</th> <td colspan="2"><input type="text" disabled v-model="subsDt"></td>
<td colspan="2"><input type="text" disabled v-model="subsDt"></td> <th class="center">상태</th>
<th class="center">상태</th> <td class="center" colspan="2">
<td class="center" colspan="2"> <input type="text" disabled v-model="stat">
<input type="text" disabled v-model="stat"> </td>
</td> </tr>
</tr> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>요금제</th>
<th>요금제</th> <td colspan="2"><input type="text" disabled v-model="plan"></td>
<td colspan="2"><input type="text" disabled v-model="plan"></td> <th class="center">가입번호</th>
<th class="center">가입번호</th> <td colspan="2"><input type="text" disabled v-model="subsNo"></td>
<td colspan="2"><input type="text" disabled v-model="subsNo"></td> </tr>
</tr> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>관리자명</th>
<th>관리자명</th> <td colspan="2">
<td colspan="2"> <div class="input-double">
<div class="input-double"> <input type="text" disabled v-model="adminId">
<input type="text" disabled v-model="adminId"> <input type="text" disabled v-model="adminNm">
<input type="text" disabled v-model="adminNm"> <button type="button" class="button grey btn-a" @click="searchIDPopOpen">변경</button>
<button type="button" class="button grey btn-a" @click="searchIDPopOpen">변경</button> </div>
</div> </td>
</td> <th class="center">유치자명</th>
<th class="center">유치자명</th> <td colspan="2">
<td colspan="2"> <div class="input-double">
<div class="input-double"> <input type="text" disabled v-model="channelId">
<input type="text" disabled v-model="channelId"> <input type="text" disabled v-model="channelNm">
<input type="text" disabled v-model="channelNm"> </div>
</div> </td>
</td> </tr>
</tr> </tbody>
</table>
</tbody> </div>
</table> <div class="info">
<!-- </form>--> <div class="title">사용자 데이터</div>
</div> </div>
<div class="info"> <div class="table table_form">
<div class="title">사용자 데이터</div> <form autocomplete="off">
</div> <table>
<div class="table table_form"> <colgroup>
<form autocomplete="off"> <col style="width:140px">
<table> <col style="width:auto">
<colgroup> <col style="width:auto">
<col style="width:140px"> <col style="width:140px">
<col style="width:auto"> <col style="width:auto">
<col style="width:auto"> <col style="width:auto">
<col style="width:140px"> </colgroup>
<col style="width:auto"> <tbody>
<col style="width:auto"> <tr class="tr_input w75">
</colgroup> <th>서비스 ID</th>
<tbody> <td colspan="2"><input type="text" disabled v-model="serviceId"></td>
<tr class="tr_input w75"> <th class="center">이용권한</th>
<th>서비스 ID</th> <td colspan="2"><input type="text" disabled v-model="useAuth"></td>
<td colspan="2"><input type="text" disabled v-model="serviceId"></td> </tr>
<th class="center">이용권한</th> <tr class="tr_input w75">
<td colspan="2"><input type="text" disabled v-model="useAuth"></td> <th>사용자명</th>
</tr> <td colspan="2"><input type="text" disabled v-model="userNm"></td>
<tr class="tr_input w75"> <th class="center">휴대폰 번호</th>
<th>사용자명</th> <td colspan="2"><input type="text" disabled v-model="mdn"></td>
<td colspan="2"><input type="text" disabled v-model="userNm"></td> </tr>
<th class="center">휴대폰 번호</th> <tr class="tr_input w75">
<td colspan="2"><input type="text" disabled v-model="mdn"></td> <th>이월누적금액</th>
</tr> <td colspan="2">
<tr class="tr_input w75"> <div class="input-double button-double">
<th>이월누적금액</th> <input type="text" disabled v-model="carryOver">
<td colspan="2"> <button type="button" class="button grey" @click="carryOverListPopOpen();">이월금액보기</button>
<div class="input-double button-double"> </div>
<input type="text" disabled v-model="carryOver"> </td>
<button type="button" class="button grey" @click="carryOverListPopOpen();">이월금액보기</button> <th class="center">사용자ID 개수</th>
</div> <td colspan="2">
</td> <div class="input-double button-double">
<th class="center">사용자ID 개수</th> <input type="text" disabled v-model="userCnt">
<td colspan="2"> <button type="button" class="button grey" @click="goMemberDetail">사용자ID 확인</button>
<div class="input-double button-double"> </div>
<input type="text" disabled v-model="userCnt"> </td>
<button type="button" class="button grey" @click="goMemberDetail">사용자ID 확인</button> </tr>
</div> </tbody>
</td> </table>
</tr> </form>
</tbody> </div>
</table> <div class="pop-btn2">
</form> <button class="btn-default" type="button" @click="toComplete();">취소</button>
</div> <button class="btn-pcolor" type="button" @click="confirmPopOpen();">저장</button>
<div class="pop-btn2"> </div>
<button class="btn-default" type="button" @click="toComplete();">취소</button>
<button class="btn-pcolor" type="button" @click="confirmPopOpen();">저장</button>
</div>
<!--이월금액 모달.--> <!--이월금액 모달.-->
<carry-Over-List-Pop ref="carryOverListPop"></carry-Over-List-Pop> <carry-Over-List-Pop ref="carryOverListPop"></carry-Over-List-Pop>
<!--수정 확인 모달--> <!--수정 확인 모달-->
<validation-confirm-pop ref="validationConfirmPop"></validation-confirm-pop> <validation-confirm-pop ref="validationConfirmPop"></validation-confirm-pop>
<!--관리자명 조회 모달--> <!--관리자명 조회 모달-->
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
<admin-nm-pop ref="adminNmPop"></admin-nm-pop> <admin-nm-pop ref="adminNmPop"></admin-nm-pop>
</div> </div>
</template> </template>
@@ -188,213 +185,213 @@ import AdminNmPop from '../components/AdminNmPop';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
export default { export default {
name: "subsDetail", name: "subsDetail",
data(){ data() {
return{ return {
row: {}, row: {},
custNm: '', custNm: '',
reprNm: '', reprNm: '',
custType: '', custType: '',
adr1: '', adr1: '',
adr2: '', adr2: '',
adr3: '', adr3: '',
bregNo: '', bregNo: '',
bregNo1: '', bregNo1: '',
bregNo3: '', bregNo3: '',
bregNo2: '', bregNo2: '',
cprRegNo: '', cprRegNo: '',
cprRegNo1: '', cprRegNo1: '',
cprRegNo2: '', cprRegNo2: '',
birth: '', birth: '',
subsDt: '', subsDt: '',
stat: '', stat: '',
plan: '', plan: '',
subsNo: '', subsNo: '',
adminId: '', adminId: '',
adminNm: '', adminNm: '',
bindDis: '', bindDis: '',
channelId: '', channelId: '',
channelNm: '', channelNm: '',
useAuth: '', useAuth: '',
userNm: '', userNm: '',
mdn: '', mdn: '',
carryOver: '', carryOver: '',
userCnt: '', userCnt: '',
saveConfirm:false, saveConfirm: false,
props: {}, props: {},
} }
},
props: {
serviceId: {
type: String,
default: "",
},
},
components: {
CarryOverListPop,
//ConfirmPop,
//SearchIDPop,
ValidationConfirmPop,
AdminNmPop,
commonModal,
},
created(){
console.log(this.$route.params.serviceId);
this.subsDetail(this.$route.params.serviceId);
// checkVaildBizNum
}, },
methods :{ props: {
callAlert(props){ serviceId: {
//alert("호출됨!"); type: String,
this.$refs.commmonModal.alertModalOpen(props); default: "",
}, },
doValidate(){ },
// if(this.isNull(this.userId)){ components: {
// alert("아이디를 입력해 주세요."); CarryOverListPop,
// this.$refs._userId.focus(); //ConfirmPop,
// return false; //SearchIDPop,
// } ValidationConfirmPop,
return true; AdminNmPop,
}, commonModal,
// 저장 후 부모창 호출. },
toComplete(){ created() {
this.row.searchType1 = ''; console.log(this.$route.params.serviceId);
this.row.searchType2= ''; this.subsDetail(this.$route.params.serviceId);
this.row.searchType3= ''; // checkVaildBizNum
this.row.searchText1= ''; },
this.row.startDt= ''; methods: {
this.row.endDt= ''; callAlert(props) {
this.row.page = 1; //alert("호출됨!");
this.$refs.commmonModal.alertModalOpen(props);
},
doValidate() {
// if(this.isNull(this.userId)){
// alert("아이디를 입력해 주세요.");
// this.$refs._userId.focus();
// return false;
// }
return true;
},
// 저장 후 부모창 호출.
toComplete() {
this.row.searchType1 = '';
this.row.searchType2 = '';
this.row.searchType3 = '';
this.row.searchText1 = '';
this.row.startDt = '';
this.row.endDt = '';
this.row.page = 1;
this.$router.push({ name: 'subsList', params: this.row }); this.$router.push({name: 'subsList', params: this.row});
}, },
async doInsert(props){ async doInsert(props) {
console.log(props);
// try {
// const response = await custMgtApi.insertTestId(this.row);
// const result = response.data;
// if (result != null && result.retCode == "0000") {
// alert('저장 하였습니다.');
// this.toComplete();
// }
// } catch(err) {
// alert("실패 하였습니다.");
// }
// }
},
async subsDetail(serviceId){
this.row.serviceId = serviceId;
try {
const response = await custMgtApi.subsDetail(this.row);
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
//데이터값이 널이면 오류처리
this.custNm = result.data.custNm;
this.reprNm = result.data.reprNm;
this.custType = result.data.custType;
this.adr1 = result.data.adr1;
this.adr2 = result.data.adr2;
this.adr3 = result.data.adr3;
this.bregNo = result.data.bregNo;
this.cprRegNo = result.data.cprRegNo;
this.birth = result.data.birth;
this.subsDt = result.data.subsDt;
this.stat = result.data.stat;
this.plan = result.data.plan;
this.subsNo = result.data.subsNo;
this.adminId = result.data.adminId;
this.adminNm = result.data.adminNm;
this.bindDis = result.data.bindDis;
this.channelId = result.data.channelId;
this.channelNm = result.data.channelNm;
this.serviceId = result.data.serviceId;
this.useAuth = result.data.useAuth;
this.userNm = result.data.userNm;
this.mdn = result.data.mdn;
this.carryOver = result.data.carryOver;
this.userCnt = result.data.userCnt;
if(this.bregNo != '' && this.bregNo != null){
this.bregNo1 = this.bregNo.substr(0, 3);
this.bregNo2 = this.bregNo.substr(3, 2);
this.bregNo3 = this.bregNo.substr(5);
}
if(this.cprRegNo != '' && this.cprRegNo != null){
this.cprRegNo1 = this.cprRegNo.substr(0, 6);
this.cprRegNo2 = this.cprRegNo.substr(6);
}
}
} catch (error) {
this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
}, console.log(props);
// try {
// updateAdminInfo 청약고객-사용정보-관리자ID,관리자명 수정 // const response = await custMgtApi.insertTestId(this.row);
async updateAdminInfo() { // const result = response.data;
this.row.serviceId = this.$route.params.serviceId; // if (result != null && result.retCode == "0000") {
this.row.adminId = this.adminId; // alert('저장 하였습니다.');
this.row.adminNm = this.adminNm; // this.toComplete();
// }
try { // } catch(err) {
const response = await custMgtApi.updateAdminInfo(this.row); // alert("실패 하였습니다.");
const result = response.data; // }
console.log(result); // }
if (result != null && result.retCode == "0000") { },
this.row.title = '청약고객관리'; async subsDetail(serviceId) {
this.row.msg1 = '저장 하였습니다.'; this.row.serviceId = serviceId;
this.$refs.commmonModal.alertModalOpen(this.row); try {
this.toComplete(); const response = await custMgtApi.subsDetail(this.row);
} else { const result = response.data;
this.row.title = '청약고객관리'; console.log(result);
this.row.msg1 = '실패 하였습니다.'; if (result != null && result.retCode == "0000") {
this.$refs.commmonModal.alertModalOpen(this.row); //데이터값이 널이면 오류처리
} this.custNm = result.data.custNm;
} catch (error) { this.reprNm = result.data.reprNm;
this.custType = result.data.custType;
this.adr1 = result.data.adr1;
this.adr2 = result.data.adr2;
this.adr3 = result.data.adr3;
this.bregNo = result.data.bregNo;
this.cprRegNo = result.data.cprRegNo;
this.birth = result.data.birth;
this.subsDt = result.data.subsDt;
this.stat = result.data.stat;
this.plan = result.data.plan;
this.subsNo = result.data.subsNo;
this.adminId = result.data.adminId;
this.adminNm = result.data.adminNm;
this.bindDis = result.data.bindDis;
this.channelId = result.data.channelId;
this.channelNm = result.data.channelNm;
this.serviceId = result.data.serviceId;
this.useAuth = result.data.useAuth;
this.userNm = result.data.userNm;
this.mdn = result.data.mdn;
this.carryOver = result.data.carryOver;
this.userCnt = result.data.userCnt;
if (this.bregNo != '' && this.bregNo != null) {
this.bregNo1 = this.bregNo.substr(0, 3);
this.bregNo2 = this.bregNo.substr(3, 2);
this.bregNo3 = this.bregNo.substr(5);
}
if (this.cprRegNo != '' && this.cprRegNo != null) {
this.cprRegNo1 = this.cprRegNo.substr(0, 6);
this.cprRegNo2 = this.cprRegNo.substr(6);
}
}
} catch (error) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
}, },
carryOverListPopOpen: function(){
this.$refs.carryOverListPop.carryOverListPopOpen(this.serviceId); // updateAdminInfo 청약고객-사용정보-관리자ID,관리자명 수정
}, async updateAdminInfo() {
confirmPopOpen: function(){ this.row.serviceId = this.$route.params.serviceId;
if(this.doValidate()){ this.row.adminId = this.adminId;
// this.row.title = '사용자 수정 확인'; this.row.adminNm = this.adminNm;
// this.row.msg = '변경된 내용을 저장하시겠습니까?';
// console.log(this.row); try {
// this.$refs.confirmPop.confirmModalOpen(this.row); const response = await custMgtApi.updateAdminInfo(this.row);
this.$refs.validationConfirmPop.confirmUpdateSubOpen(); const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
this.row.title = '청약고객관리';
this.row.msg1 = '저장 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
this.toComplete();
} else {
this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
} catch (error) {
this.row.title = '청약고객관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
},
carryOverListPopOpen: function () {
this.$refs.carryOverListPop.carryOverListPopOpen(this.serviceId);
},
confirmPopOpen: function () {
if (this.doValidate()) {
// this.row.title = '사용자 수정 확인';
// this.row.msg = '변경된 내용을 저장하시겠습니까?';
// console.log(this.row);
// this.$refs.confirmPop.confirmModalOpen(this.row);
this.$refs.validationConfirmPop.confirmUpdateSubOpen();
// this.$refs.commmonModal.confirmModalOpen(this.row); // this.$refs.commmonModal.confirmModalOpen(this.row);
} }
}, },
confirmCalbackFnc: function(props){ confirmCalbackFnc: function (props) {
console.log(props); console.log(props);
if(props.result){ if (props.result) {
// this.doInsert(props.result); // this.doInsert(props.result);
} }
}, },
searchIDPopOpen: function(){ searchIDPopOpen: function () {
var params = { var params = {
"serviceId": this.row.serviceId, // "serviceId": this.row.serviceId,
"serviceSeq": '', "serviceId": this.serviceId,
"parentDiv": 'subsDetail' "serviceSeq": '',
} "parentDiv": 'subsDetail'
this.$refs.adminNmPop.ModalOpen(params); }
}, this.$refs.adminNmPop.ModalOpen(params);
goMemberDetail: function(props){ },
console.log(this.row); goMemberDetail: function (props) {
this.$router.push({ name: 'memberAdminDetail', params: {serviceId : this.row.serviceId} }); console.log(this.row);
}, this.$router.push({name: 'memberAdminDetail', params: {serviceId: this.row.serviceId}});
} },
}
} }
</script> </script>

View File

@@ -1,22 +1,22 @@
<template> <template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">청약고객관리</h3>
<p class="breadcrumb">고객관리 &gt; 청약고객관리 &gt; 청약고객관리</p>
</div>
<div class="top_tab">
<a href="javascript:void(0);" class="on">청약고객관리</a>
<a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a>
</div>
<div class="search_form"> <div class="contents">
<div class="search_wrap"> <div class="contents_wrap">
<div class="group"> <div class="top_wrap">
<div class="input_box cal"> <h3 class="title">청약고객관리</h3>
<label for="right" class="label">조회기간</label> <p class="breadcrumb">고객관리 &gt; 청약고객관리 &gt; 청약고객관리</p>
</div>
<div class="top_tab">
<a href="javascript:void(0);" class="on">청약고객관리</a>
<a href="javascript:void(0);" @click="toMove('memberList')">회원관리</a>
</div>
<div class="search_form">
<div class="search_wrap">
<div class="group">
<div class="input_box cal">
<label for="right" class="label">조회기간</label>
<div class="term"> <div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
@@ -39,81 +39,84 @@
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div> </div>
</div> </div>
<div class="select_box id"> <div class="select_box id">
<label for="right" class="label">상태</label> <label for="right" class="label">상태</label>
<select name="" id="" v-model="searchType1" @keyup.enter="search"> <select name="" id="" v-model="searchType1" @keyup.enter="search">
<option value="" selected>전체</option>
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">유치채널</label>
<select name="" id="" v-model="searchType2" @keyup.enter="search">
<option value="" selected>전체</option> <option value="" selected>전체</option>
<option value="01" >고객셀프가입</option> <option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
<option value="02" >대리점</option> {{ option.codeNm }}
<option value="03" >고객센터</option> </option>
<option value="04" >직접영업</option> </select>
</div>
<div class="select_box">
<label for="right" class="label">유치채널</label>
<select name="" id="" v-model="searchType2" @keyup.enter="search">
<option value="" selected>전체</option>
<option value="01">고객셀프가입</option>
<option value="02">대리점</option>
<option value="03">고객센터</option>
<option value="04">직접영업</option>
<!-- <option v-for="(option, i) in userType" v-bind:value="option.code" v-bind:key="i"> <!-- <option v-for="(option, i) in userType" v-bind:value="option.code" v-bind:key="i">
{{ option.codeNm }} {{ option.codeNm }}
</option> --> </option> -->
</select> </select>
</div> </div>
</div> </div>
<div class="group"> <div class="group">
<div class="select_box"> <div class="select_box">
<label for="right" class="label">상세검색</label> <label for="right" class="label">상세검색</label>
<select name="" id="" v-model="searchType3" @keyup.enter="search"> <select name="" id="" v-model="searchType3" @keyup.enter="search">
<option value="">전체</option> <option value="01">고객사명</option>
<option value="01">고객사명</option> <option value="02">가입번호</option>
<option value="02">가입번호</option> <option value="03">서비스ID</option>
<option value="03">서비스ID</option> </select>
</select> </div>
</div> <div class="input_box">
<div class="input_box"> <input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1"
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1"/> maxlength="100" @keyup.enter="search"/>
</div> </div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</div> </div>
</div> </div>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option>
</select>
</div>
</div>
<div class="button_group">
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal> <div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
option.text
}}
</option>
</select>
</div>
</div>
<div class="button_group">
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div>
</div> </div>
</div> <div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template> </template>
<script> <script>
@@ -125,25 +128,25 @@ import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
} }
export default { export default {
@@ -159,84 +162,85 @@ export default {
statType: [], statType: [],
userType: [], userType: [],
row:{}, row: {},
pageType: 'SUBS', pageType: 'SUBS',
searchType1:'', searchType1: '',
searchType2:'', searchType2: '',
searchType3:'', searchType3: '01',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
totalItems: 0, totalItems: 0,
grid: { grid: {
url: '/api/v1/bo/custMgt/subsList', url: '/api/v1/bo/custMgt/subsList',
pagePerRows: 20, pagePerRows: 20,
pagination: true, pagination: true,
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거 isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
columns: [ columns: [
{ name: 'no', header: 'No', align: 'center', width: 60}, {name: 'no', header: 'No', align: 'center', width: 60},
{ name: 'serviceId', header: '서비스 ID\n(관리자 ID)', align: 'center', width: 160 , renderer: { {
name: 'serviceId', header: '서비스 ID\n(관리자 ID)', align: 'center', width: 160, renderer: {
type: CustomATagRenderer type: CustomATagRenderer
, options: { , options: {
callback: this.custDetail, callback: this.custDetail,
} }
} }
}, },
{ name: 'custNm', header: '고객사명', align: 'center', width: 130}, {name: 'custNm', header: '고객사명', align: 'center', width: 130},
{ name: 'regNo', header: '가입번호', align: 'center', width: 130}, {name: 'regNo', header: '가입번호', align: 'center', width: 130},
{ name: 'regDt', header: '가입일', align: 'center', width: 130, cls: 'td_line'}, {name: 'regDt', header: '가입일', align: 'center', width: 130, cls: 'td_line'},
{ name: 'stat', header: '상태', align: 'center', width: 130}, {name: 'stat', header: '상태', align: 'center', width: 130},
{ name: 'channel', header: '유치채널', align: 'center', width: 130}, {name: 'channel', header: '유치채널', align: 'center', width: 130},
{ name: 'plan', header: '요금제', align: 'center', width: 130}, {name: 'plan', header: '요금제', align: 'center', width: 130},
{ name: 'carryOver', header: '이월누적금액', align: 'center', width: 130} {name: 'carryOver', header: '이월누적금액', align: 'center', width: 130}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchType3: '', searchType3: '',
searchText1: '', searchText1: '',
startDt: '', startDt: '',
endDt: '' endDt: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
this.setCodeData(); this.setCodeData();
this.getExcelHeader(); this.getExcelHeader();
this.setPeriodDay(0); this.setPeriodDay(0);
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: 1, page: 1,
perPage: 50, perPage: 50,
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchType3: '', searchType3: '',
searchText1: '', searchText1: '',
startDt: '', startDt: '',
endDt: '' endDt: ''
} }
}); });
}, },
mounted() { mounted() {
// 달력 세팅 // 달력 세팅
@@ -244,18 +248,18 @@ export default {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
@@ -269,10 +273,10 @@ export default {
next(); next();
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD'); this.grid.params.startDt = moment(this.startDate).format('YYYYMMDD');
this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD'); this.grid.params.endDt = moment(this.endDate).format('YYYYMMDD');
console.log('this.perPageCnt'+this.perPageCnt); console.log('this.perPageCnt' + this.perPageCnt);
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1
@@ -283,18 +287,18 @@ export default {
this.sendStoreData(); this.sendStoreData();
}, },
toMove(routeName) { toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } }); this.$router.push({name: routeName, params: {page: 1, searchText: ''}});
}, },
custDetail(props){ custDetail(props) {
console.log(props); console.log(props);
this.row.serviceId = props.serviceId; this.row.serviceId = props.serviceId;
this.$router.push({ name: 'subsDetail', params: this.row }); this.$router.push({name: 'subsDetail', params: this.row});
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -304,15 +308,15 @@ export default {
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage); console.log("getCondition : " + getCondition.perPage);
}, },
setCodeData() { setCodeData() {
// 상태 옵션 셋팅. // 상태 옵션 셋팅.
api.commCode({'grpCd' : 'SUBS_STTUS_CD'}).then(response => { api.commCode({'grpCd': 'SUBS_STTUS_CD'}).then(response => {
this.statType = response.data.data.list; this.statType = response.data.data.list;
}); });
// //
api.commCode({'grpCd' : 'SVCUSER_TP_CD'}).then(response => { api.commCode({'grpCd': 'SVCUSER_TP_CD'}).then(response => {
this.userType = response.data.data.list; this.userType = response.data.data.list;
}); });
}, },
@@ -333,7 +337,7 @@ export default {
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
return result.data; return result.data;
}else{ } else {
return false; return false;
} }
} catch (err) { } catch (err) {
@@ -357,7 +361,8 @@ export default {
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {}); xlsx.export(data.list, saveFileName, options).then(() => {
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
@@ -395,15 +400,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -412,7 +417,7 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
initSetStartDate(){ initSetStartDate() {
let setYear = Number(moment(new Date()).format('YYYY')); let setYear = Number(moment(new Date()).format('YYYY'));
let initStartDate = new Date(setYear, 0, 1); let initStartDate = new Date(setYear, 0, 1);
this.startDate = initStartDate; this.startDate = initStartDate;

View File

@@ -6,115 +6,118 @@
<h3 class="title">발송내역</h3> <h3 class="title">발송내역</h3>
<p class="breadcrumb">모니터링 &gt; 발송내역</p> <p class="breadcrumb">모니터링 &gt; 발송내역</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="group">
<div class="group"> <div class="input_box cal one essential">
<div class="input_box cal one essential"> <label for="right" class="label"><span>*</span>발송일</label>
<label for="right" class="label"><span>*</span>발송일</label> <div class="term">
<!-- <input class="" type="text" id="" placeholder="2022-10-12"> -->
<div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
:disabled-dates="disabledSDate" :disabled-dates="disabledSDate"
v-model="startDate" v-model="startDate"
@selected="selectedStartDate(0)" @selected="selectedStartDate(0)"
@closed="closeDate('start')" @closed="closeDate('start')"
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div>
</div>
<div class="select_box id">
<label for="right" class="label">요청채널</label>
<select name="" id="" v-model="grid.params.searchType1" @keyup.enter="search">
<option value="" selected>전체</option>
<option value="SMS">SMS</option>
<option value="LMS">LMS</option>
<option value="MMS">MMS</option>
<option value="ALIMTALK">알림톡</option>
</select>
</div> </div>
</div> </div>
<div class="group"> <div class="select_box id">
<div class="input_box essential"> <label for="right" class="label">요청채널</label>
<label for="right" class="label"><span>*</span>수신번호</label> <select name="" id="" v-model="grid.params.searchType1" @keyup.enter="search">
<input class="search-box" type="number" id="search" placeholder="- 자 제외 숫자만 입력" v-model="grid.params.searchText1" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_searchText2"> <option value="" selected>전체</option>
</div> <option value="SMS">SMS</option>
<div class="input_box essential"> <option value="LMS">LMS</option>
<label for="right" class="label"><span>*</span>발신번호</label> <option value="MMS">MMS</option>
<input class="search-box" type="number" id="search" placeholder="- 자 제외 숫자만 입력" v-model="grid.params.searchText2" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_searchText2"> <option value="ALIMTALK">알림톡</option>
</div> </select>
<div class="input_box">
<label for="right" class="label">고객사명</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText3" ref="_searchText3">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</div> </div>
</form> <div class="group">
<div class="input_box essential">
<label for="right" class="label"><span>*</span>수신번호</label>
<input class="search-box" type="text" id="search" placeholder="- 자 제외 숫자만 입력" @keyup.enter="search"
v-model.trim="grid.params.searchText1" @keypress="onlyNum" @input="onlyNum" maxlength="11"
ref="_searchText2">
</div>
<div class="input_box essential">
<label for="right" class="label"><span>*</span>발신번호</label>
<input class="search-box" type="text" id="search" placeholder="- 자 제외 숫자만 입력" @keyup.enter="search"
v-model.trim="grid.params.searchText2" @keypress="onlyNum" @input="onlyNum" maxlength="11"
ref="_searchText2">
</div>
<div class="input_box">
<label for="right" class="label">고객사명</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.searchText3"
@keypress="onlyName" @input="onlyName" @keyup.enter="search" ref="_searchText3" maxlength="100">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info"> <div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe"> <div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> <select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option> <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
</select> option.text
</div> }}
</div> </option>
</select>
</div>
</div>
</div> </div>
<div class="table"> <div class="table">
<table> <table>
<custom-grid <custom-grid
ref="table" ref="table"
:totalItems="'totalItems'" :totalItems="'totalItems'"
:url="grid.url" :url="grid.url"
:pagePerRows="grid.pagePerRows" :pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest" :initialRequest="grid.initialRequest"
:pagination="grid.pagination" :pagination="grid.pagination"
:isCheckbox="grid.isCheckbox" :isCheckbox="grid.isCheckbox"
:columns="grid.columns" :columns="grid.columns"
:noDataStr="grid.noDataStr" :noDataStr="grid.noDataStr"
:addCls="grid.addCls" :addCls="grid.addCls"
:header="grid.headder" :header="grid.headder"
></custom-grid> ></custom-grid>
</table> </table>
</div> </div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
</template> </template>
<script> <script>
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import moment from 'moment'; import moment from 'moment';
import xlsx from '@/common/excel';
//import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal"; import commonModal from "../components/commonModal";
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
} }
export default { export default {
@@ -131,16 +134,16 @@ export default {
statType: [], statType: [],
userType: [], userType: [],
row:{}, row: {},
initMode: false,
pageType: 'SUBS', pageType: 'SUBS',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
totalItems: 0, totalItems: 0,
grid: { grid: {
@@ -153,65 +156,68 @@ export default {
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '발송일자', childNames: [] }, {header: '발송일자', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '발송아이디(사용자ID)', childNames: [] }, {header: '발송아이디(사용자ID)', childNames: []},
{ header: '수신번호', childNames: [] }, {header: '수신번호', childNames: []},
{ header: '발신번호', childNames: [] }, {header: '발신번호', childNames: []},
{ header: '요청채널', childNames: [] }, {header: '요청채널', childNames: []},
{ header: '최종채널', childNames: [] }, {header: '최종채널', childNames: []},
{ header: '이통사', childNames: [] }, {header: '이통사', childNames: []},
{ header: '결과(코드)', childNames: [] }, {header: '결과(코드)', childNames: []},
{ header: '요청일시', childNames: [] }, {header: '요청일시', childNames: []},
{ header: '완료일시', childNames: [] }, {header: '완료일시', childNames: []},
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: '', header: '발송일자', align: 'left', width: '11%' }, {name: '', header: '발송일자', align: 'left', width: '11%'},
{ name: '', header: '고객사명', align: 'left', width: '9%' }, {name: '', header: '고객사명', align: 'left', width: '9%'},
{ name: '', header: '발송아이디(사용자ID)', align: 'center', width: '9%'}, {name: '', header: '발송아이디(사용자ID)', align: 'center', width: '9%'},
{ name: '', header: '수신번호', align: 'center', width: '11%'}, {name: '', header: '수신번호', align: 'center', width: '11%'},
{ name: '', header: '발신번호', align: 'center', width: '11%'}, {name: '', header: '발신번호', align: 'center', width: '11%'},
{ name: '', header: '요청채널', align: 'center', width: '5%'}, {name: '', header: '요청채널', align: 'center', width: '5%'},
{ name: '', header: '최종채널', align: 'center', width: '5%'}, {name: '', header: '최종채널', align: 'center', width: '5%'},
{ name: '', header: '이통사', align: 'center', width: '5%'}, {name: '', header: '이통사', align: 'center', width: '5%'},
{ name: '', header: '결과(코드)', align: 'center', width: '9%'}, {name: '', header: '결과(코드)', align: 'center', width: '9%'},
{ name: '', header: '요청일시', align: 'center', width: '10%'}, {name: '', header: '요청일시', align: 'center', width: '10%'},
{ name: '', header: '완료일시', align: 'center', width: '10%'}, {name: '', header: '완료일시', align: 'center', width: '10%'},
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchText1: '', searchText1: '',
searchText2: '', searchText2: '',
searchText3: '', searchText3: '',
sentDate: '', sentDate: '',
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
// this.setCodeData(); // this.setCodeData();
// this.getExcelHeader(); // this.getExcelHeader();
this.setPeriodDay(0); this.setPeriodDay(0);
this.grid.params.searchType1 = ''; this.grid.params.searchType1 = '';
// this.$refs.table.cleanData();
this.initMode = true;
}, },
destroyed() { destroyed() {
this.grid.params.searchType1 = ''; this.grid.params.searchType1 = '';
this.grid.params.searchText1 = ''; this.grid.params.searchText1 = '';
this.grid.params.searchText2 = ''; this.grid.params.searchText2 = '';
this.grid.params.searchText3 = ''; this.grid.params.searchText3 = '';
}, },
mounted() { mounted() {
this.grid.params.searchType1 = ''; this.grid.params.searchType1 = '';
@@ -219,17 +225,17 @@ export default {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
//this.search(isKeep); this.search(isKeep);
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
@@ -244,17 +250,23 @@ export default {
next(); next();
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
if(this.doValidate()){ if (this.initMode) {
this.grid.params.sentDate = moment(this.startDate).format('YYYYMMDD'); this.grid.params.phone = 99999999999;
this.grid.params.reqChennel = this.grid.params.searchType1; this.grid.params.callbackNumber = 99999999999;
this.grid.params.phone = this.grid.params.searchText1; } else {
this.grid.params.callbackNumber = this.grid.params.searchText2; if (this.doValidate()) {
this.grid.params.custNm = this.grid.params.searchText3; this.grid.params.sentDate = moment(this.startDate).format('YYYYMMDD');
console.log(this.grid.params); this.grid.params.reqChennel = this.grid.params.searchType1;
this.$refs.table.search(this.grid.params, isKeep); this.grid.params.phone = this.grid.params.searchText1;
this.sendStoreData(); this.grid.params.callbackNumber = this.grid.params.searchText2;
} this.grid.params.custNm = this.grid.params.searchText3;
console.log(this.grid.params);
}
}
this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData();
this.initMode = false;
}, },
setPeriodDay(day) { setPeriodDay(day) {
this.periodDay = day; this.periodDay = day;
@@ -266,7 +278,7 @@ export default {
this.closeDate('start'); this.closeDate('start');
this.closeDate('end'); this.closeDate('end');
}, },
selectedStartDate(day) { selectedStartDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
this.periodDay = day; this.periodDay = day;
} }
@@ -284,15 +296,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -301,11 +313,11 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -315,45 +327,45 @@ export default {
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage); console.log("getCondition : " + getCondition.perPage);
}, },
doValidate(){ doValidate() {
// 발송일자 필수입력체크 // 발송일자 필수입력체크
if(this.isNull(this.startDate)) { if (this.isNull(this.startDate)) {
this.row.title = '발송내역'; this.row.title = '발송내역';
this.row.msg1 = '발송일을 선택해 주세요.'; this.row.msg1 = '발송일을 선택해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
// 수신번호 필수입력체크 // 수신번호 필수입력체크
if(this.isNull(this.grid.params.searchText1)) { if (this.isNull(this.grid.params.searchText1)) {
this.row.title = '발송내역'; this.row.title = '발송내역';
this.row.msg1 = '수신번호를 입력해 주세요.'; this.row.msg1 = '수신번호를 입력해 주세요.';
this.row.focusTaget = '1'; this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
// 발신번호 필수입력체크 // 발신번호 필수입력체크
if(this.isNull(this.grid.params.searchText2)) { if (this.isNull(this.grid.params.searchText2)) {
this.row.title = '발송내역'; this.row.title = '발송내역';
this.row.msg1 = '발신번호를 입력해 주세요.'; this.row.msg1 = '발신번호를 입력해 주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
return true; return true;
}, },
checkFocus(){ checkFocus() {
if(this.row.focusTaget === '1'){ if (this.row.focusTaget === '1') {
this.$refs._searchText1.focus(); this.$refs._searchText1.focus();
} else if(this.row.focusTaget === '2'){ } else if (this.row.focusTaget === '2') {
this.$refs._searchText2.focus(); this.$refs._searchText2.focus();
} }
}, },
} }
}; };
</script> </script>

View File

@@ -1,255 +1,263 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed" @click="ModalClose();"></div> <div class="dimmed modal52" @click="ModalClose();"></div>
<div class="popup-wrap"> <div class="popup-wrap modal52">
<!-- 발신번호 차단 신규 등록 --> <!-- 발신번호 차단 신규 등록 -->
<div class="popup modal52 popup_form"> <div class="popup modal52 popup_form">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">발신번호 차단 신규 등록</h3> <h3 class="pop-tit">발신번호 차단 신규 등록</h3>
</div> </div>
<form autocomplete="off"> <form autocomplete="off">
<table> <table>
<tbody> <tbody>
<tr> <tr>
<th>발신번호</th> <th>발신번호</th>
<td><input type="number" placeholder="- 자 제외 숫자만 입력" maxlength="11" v-model.trim="blckSndrno" v-on:keyup="onlyNum" @input="onlyNum" ref="_blckSndrno"></td> <td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="blckSndrno"
</tr> @keypress="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_blckSndrno"></td>
<tr> </tr>
<th>발송타입</th> <tr>
<td v-if="code === null || code === ''"> <th>발송타입</th>
<div v:class="select_box"> <td v-if="code === null || code === ''">
<select name="" id="right" v-model.trim="sndblckTpCd" ref="sndblckTpCd" @keyup.enter="search"> <div v:class="select_box">
<option v-for="(option, i) in tpType" :value="option.code" v-bind:key="i"> <select name="" id="right" v-model.trim="sndblckTpCd" ref="sndblckTpCd" @keyup.enter="search">
{{ option.codeNm }} <option v-for="(option, i) in tpType" :value="option.code" v-bind:key="i">
</option> {{ option.codeNm }}
<!-- </option>
<option v-for="(option, i) in tpType"
:v-bind:value="option.grpCd" </select>
v-bind:key="i" </div>
:selected="code === option.grpCd" </td>
> </tr>
{{ option.codeNm }} <tr>
</option> --> <th>차단사유</th>
<!-- <option value="">문자</option> <td>
<option value="">RCS</option> --> <div>
</select> <select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
</div> <option v-for="(option, i) in rsnType" :value="option.code" v-bind:key="i">
</td> {{ option.codeNm }}
</tr> </option>
<tr> </select>
<th>차단사유</th> </div>
<td> </td>
<div> </tr>
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd"> <tr>
<option v-for="(option, i) in rsnType" :value="option.code" v-bind:key="i"> <th>메모</th>
{{ option.codeNm }} <td class="sender"><textarea class="memo_text" v-model.trim="meno" ref="meno" maxlength="1000"
</option> @input="memoLimitByte()"></textarea></td>
</select> </tr>
</div> </tbody>
</td> </table>
</tr> </form>
<tr> <div class="popup-btn2">
<th>메모</th> <button class="btn-pcolor" @click="regisConfirm()">등록</button>
<td class="sender"><textarea class="memo_text" v-model.trim="meno" ref="meno" @input="memoLimitByte()"></textarea></td> <button class="btn-default" @click="ModalClose();">취소</button>
</tr> </div>
</tbody> </div>
</table> <common-modal ref="commonModal"></common-modal>
</form> <validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
<div class="popup-btn2">
<button class="btn-pcolor" @click="regisConfirm()">등록</button>
<button class="btn-default" @click="ModalClose();">취소</button>
</div>
</div>
<common-modal ref="commonModal"></common-modal>
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import api from '@/service/api'; import api from '@/service/api';
import riskMgtApi from '../service/riskMgtApi' import riskMgtApi from '../service/riskMgtApi'
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import lodash from "lodash"; import lodash from "lodash";
import commonModal from "@/components/modal/commonModal"; // import commonModal from "@/components/modal/commonModal";
import ValidationConfirmPopup from './ValidationConfirmPopup.vue'; import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
export default { export default {
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
data(){ data() {
return{ return {
props : {}, props: {},
row: {}, row: {},
rsnType: [], rsnType: [],
tpType: [], tpType: [],
blckSndrno: '', blckSndrno: '',
sndblckTpCd: '01', sndblckTpCd: '01',
blckRsnCd: '01', blckRsnCd: '01',
meno: '', meno: '',
code:"", code: "",
LINE_FEED : 10, // '\n', LINE_FEED: 10, // '\n',
maxByte: 2000, maxByte: 2000,
// params: { // params: {
// 'blckSndrno' : '' // 'blckSndrno' : ''
// ,'sndblckTpCd' : '01' // ,'sndblckTpCd' : '01'
// ,'blckRsnCd' : '02' // ,'blckRsnCd' : '02'
// ,'meno' : '' // ,'meno' : ''
// } // }
}
},
create() {
this.setCodeDate();
this.formReset();
},
mounted() {
//this.sndblckTpCd = '01'
},
components: {
// commonModal,
ValidationConfirmPopup
},
methods: {
//모달 띄우기
ModalOpen() {
var dimmed = document.getElementsByClassName('modal52');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
this.setCodeDate();
},
// 모달 끄기
ModalClose() {
this.formReset();
var dimmed = document.getElementsByClassName('modal52');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
// 저장 후 부모창 호출
toComplete() {
this.$parent.$refs.table.reloadData();
this.ModalClose();
},
async doInsert() {
// if(this.doValidate() && this.regisConfirm()){
this.row.blckSndrno = this.blckSndrno;
this.row.sndblckTpCd = this.sndblckTpCd;
this.row.blckRsnCd = this.blckRsnCd;
this.row.meno = this.meno;
this.regId = 'admin';
console.log(this.row);
try {
const response = await riskMgtApi.insertIntrcp(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
this.row.title = '발신번호 차단';
this.row.msg1 = '성공 하였습니다.';
this.$parent.alertInsert(this.row);
} }
this.toComplete();
} catch (err) {
console.log(err);
this.row.title = '발신번호 차단';
this.row.msg1 = '실패 하였습니다.';
this.$parent.alertInsert(this.row);
}
// }
}, },
create(){ setCodeDate() {
this.setCodeDate(); // 발송타입
this.formReset(); api.commCode({'grpCd': 'SNDBLCK_TP_CD'}).then(response => {
this.tpType = response.data.data.list;
});
api.commCode({'grpCd': 'SNDBLCK_RSN_CD'}).then(response => {
this.rsnType = response.data.data.list;
});
}, },
mounted(){
//this.sndblckTpCd = '01'
},
components: {
commonModal,
ValidationConfirmPopup
},
methods :{
//모달 띄우기
ModalOpen(){
var dimmed = document.getElementsByClassName('dimmed');
dimmed[0].style.display = 'block';
var wrap = document.getElementsByClassName('popup-wrap');
wrap[0].style.display = 'block';
var obj = document.getElementsByClassName('modal52');
obj[0].style.display = 'block';
this.setCodeDate();
},
// 모달 끄기
ModalClose(){
//this.formReset();
var dimmed = document.getElementsByClassName('dimmed');
dimmed[0].style.display = 'none';
var wrap = document.getElementsByClassName('popup-wrap');
wrap[0].style.display = 'none';
var popup = document.getElementsByClassName('modal52');
popup[0].style.display = 'none';
},
// 저장 후 부모창 호출
toComplete(){
this.$parent.$refs.table.reloadData();
this.ModalClose();
},
async doInsert(){
// if(this.doValidate() && this.regisConfirm()){
this.row.blckSndrno = this.blckSndrno;
this.row.sndblckTpCd = this.sndblckTpCd;
this.row.blckRsnCd = this.blckRsnCd;
this.row.meno = this.meno;
this.regId = 'admin';
console.log(this.row);
try {
const response = await riskMgtApi.insertIntrcp(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
this.row.title = '발신번호 차단';
this.row.msg1 = '성공 하였습니다.';
this.$parent.alertInsert(this.row);
}
this.toComplete();
} catch(err) {
console.log(err);
this.row.title = '발신번호 차단';
this.row.msg1 = '실패 하였습니다.';
this.$parent.alertInsert(this.row);
}
// }
},
setCodeDate(){
// 발송타입
api.commCode({'grpCd' : 'SNDBLCK_TP_CD'}).then(response => {
this.tpType = response.data.data.list;
});
api.commCode({'grpCd' : 'SNDBLCK_RSN_CD'}).then(response => {
this.rsnType = response.data.data.list;
});
},
doValidate(){
if(this.isNull(this.blckSndrno)){
this.row.title = '발신번호 차단';
this.row.msg1 = '발신번호를 입력해주세요.';
this.$parent.alertInsert(this.row);
this.$refs._blckSndrno.focus();
return false;
}
const hp = this.blckSndrno;
if(!this.isNull(hp) && !this.isMobile(hp)){
this.row.title = '발신번호 차단';
this.row.msg1 = '발신번호 형식이 잘못되었습니다. 확인 해주세요.';
this.$parent.alertInsert(this.row)
this.$refs._blckSndrno.focus();
return false;
}
this.row.blckSndrno=this.blckSndrno;
this.row.sndblckTpCd = this.sndblckTpCd;
this.row.blckRsnCd = this.blckRsnCd;
this.row.meno=this.meno;
return true;
},
formReset(){
var type= this.insertType;
Object.assign(this.$data, this.$options.data());
this.insertType = type;
},
regisConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.confirmInsertOpen();
}
},
// 바이트길이 구하기
getByteLength: function (decimal) {
return (decimal >> 7) || (this.LINE_FEED === decimal) ? 2 : 1
},
getByte: function (str) {
return str
.split('')
.map((s) => s.charCodeAt(0))
.reduce((prev, unicodeDecimalValue) => prev + this.getByteLength(unicodeDecimalValue), 0)
},
getLimitedByteText: function (inputText, maxByte) {
const characters = inputText.split('')
let validText = ''
let totalByte = 0
for (let i = 0; i < characters.length; i += 1) {
const character = characters[i]
const decimal = character.charCodeAt(0)
const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기
// 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면
if (totalByte + byte <= maxByte) {
totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함
validText += character // 글자를 더해 현재까지의 총 문자열 값을 구함
} else { // 최대 바이트 길이를 넘으면
break // for 루프 종료
}
}
return validText
},
memoLimitByte() {
this.meno = this.getLimitedByteText(this.meno, this.maxByte);
}, //END 바이트길이 구하기
doValidate() {
if (this.isNull(this.blckSndrno)) {
this.row.title = '발신번호 차단';
this.row.msg1 = '발신번호를 입력해주세요.';
this.$parent.alertInsert(this.row);
this.$refs._blckSndrno.focus();
return false;
}
const hp = this.blckSndrno;
if (!this.isNull(hp) && !this.isMobile(hp)) {
this.row.title = '발신번호 차단';
this.row.msg1 = '발신번호 형식이 잘못되었습니다. 확인 해주세요.';
this.$parent.alertInsert(this.row)
this.$refs._blckSndrno.focus();
return false;
}
this.row.blckSndrno = this.blckSndrno;
this.row.sndblckTpCd = this.sndblckTpCd;
this.row.blckRsnCd = this.blckRsnCd;
this.row.meno = this.meno;
return true;
}, },
formReset() {
var type = this.insertType;
Object.assign(this.$data, this.$options.data());
this.insertType = type;
},
regisConfirm() {
if (this.doValidate()) {
this.$refs.ValidationConfirmPopup.confirmInsertOpen();
}
},
// 바이트길이 구하기
getByteLength: function (decimal) {
return (decimal >> 7) || (this.LINE_FEED === decimal) ? 2 : 1
},
getByte: function (str) {
return str
.split('')
.map((s) => s.charCodeAt(0))
.reduce((prev, unicodeDecimalValue) => prev + this.getByteLength(unicodeDecimalValue), 0)
},
getLimitedByteText: function (inputText, maxByte) {
const characters = inputText.split('')
let validText = ''
let totalByte = 0
for (let i = 0; i < characters.length; i += 1) {
const character = characters[i]
const decimal = character.charCodeAt(0)
const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기
// 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면
if (totalByte + byte <= maxByte) {
totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함
validText += character // 글자를 더해 현재까지의 총 문자열 값을 구함
} else { // 최대 바이트 길이를 넘으면
break // for 루프 종료
}
}
return validText
},
memoLimitByte() {
this.meno = this.getLimitedByteText(this.meno, this.maxByte);
}, //END 바이트길이 구하기
},
} }
</script> </script>
<style> <style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;} .popup-btn-wrap {
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; } width: 500px;
.popup-btn-wrap button:hover {background: #000; color: #fff;} margin: auto;
padding: 100px 0;
}
.popup-btn-wrap button {
width: 100%;
margin-bottom: 10px;
height: 50px;
border-radius: 5px;
box-shadow: none;
border: 1px solid #000;
}
.popup-btn-wrap button:hover {
background: #000;
color: #fff;
}
</style> </style>

View File

@@ -1,223 +1,218 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed" @click="ModalClose();"></div> <div class="dimmed modal57" @click="ModalClose();"></div>
<div class="popup-wrap"> <div class="popup-wrap modal57">
<!-- 메시지 차단 신규 등록 --> <!-- 메시지 차단 신규 등록 -->
<div class="popup popup_form modal57"> <div class="popup popup_form modal57">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">메시지 차단 신규 등록</h3> <h3 class="pop-tit">메시지 차단 신규 등록</h3>
</div>
<form autocomplete="off">
<table>
<tbody>
<tr>
<th>차단문구</th>
<td class="input_add">
<input v-model="word" ref="_word" maxlength="50">
<button type="button" class="button white add" @click="doAdd"></button>
</td>
</tr>
<tr>
<td colspan="2" class="registration" value="">
<ul>
<li v-for="(item, i) in msgBlckwordList" v-bind:key="item.word">
<span> {{ item.word }}<a href="#" @click="doDel(item, i)"><img src="@/assets/images/icon-del.png"/></a> </span>
<!-- <button type="button" @click="doDel(item, i)">x</button> -->
</li>
</ul>
</td>
</tr>
<tr>
<th>조건</th>
<td>
<input type="radio" name="state" value="01" id="popup_radio3" v-model="blckContCd" >
<label for="popup_radio3">AND</label>
<input type="radio" name="state" value="02" id="popup_radio4" v-model="blckContCd">
<label for="popup_radio4">OR</label>
</td>
</tr>
<tr>
<th>차단사유</th>
<td>
<div>
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
<option v-for="(option, i) in rsnType"
:value="option.code"
v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
</td>
</tr>
<tr>
<th>메모</th>
<td class="sender"><textarea class="memo_text" v-model.trim="memo" ref="memo" ></textarea></td>
</tr>
</tbody>
</table>
</form>
<div class="popup-btn2">
<button class="btn-pcolor" @click="regisConfirm()">저장</button>
<button class="btn-default" @click="ModalClose();">취소</button>
</div>
</div>
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
</div> </div>
<form autocomplete="off">
<table>
<tbody>
<tr>
<th>차단문구</th>
<td class="input_add">
<input v-model="word" ref="_word" maxlength="50">
<button type="button" class="button white add" @click="doAdd"></button>
</td>
</tr>
<tr>
<td colspan="2" class="registration" value="">
<ul>
<li v-for="(item, i) in msgBlckwordList" v-bind:key="item.word">
<span> {{ item.word }}<a href="#" @click="doDel(item, i)"><img src="@/assets/images/icon-del.png"/></a> </span>
<!-- <button type="button" @click="doDel(item, i)">x</button> -->
</li>
</ul>
</td>
</tr>
<tr>
<th>조건</th>
<td>
<input type="radio" name="state" value="01" id="popup_radio3" v-model="blckContCd">
<label for="popup_radio3">AND</label>
<input type="radio" name="state" value="02" id="popup_radio4" v-model="blckContCd">
<label for="popup_radio4">OR</label>
</td>
</tr>
<tr>
<th>차단사유</th>
<td>
<div>
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
<option v-for="(option, i) in rsnType"
:value="option.code"
v-bind:key="i">
{{ option.codeNm }}
</option>
</select>
</div>
</td>
</tr>
<tr>
<th>메모</th>
<td class="sender"><textarea class="memo_text" v-model.trim="memo" ref="memo"></textarea></td>
</tr>
</tbody>
</table>
</form>
<div class="popup-btn2">
<button class="btn-pcolor" @click="regisConfirm()">저장</button>
<button class="btn-default" @click="ModalClose();">취소</button>
</div> </div>
</div>
<validation-confirm-popup ref="ValidationConfirmPopup"></validation-confirm-popup>
</div>
</div>
</template> </template>
<script> <script>
import api from '@/service/api'; import api from '@/service/api';
import riskMgtApi from '../service/riskMgtApi'; import riskMgtApi from '../service/riskMgtApi';
import lodash from "lodash"; import lodash from "lodash";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import ValidationConfirmPopup from './ValidationConfirmPopup.vue'; import ValidationConfirmPopup from './ValidationConfirmPopup.vue';
export default { export default {
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
data(){ data() {
return{ return {
row: {}, row: {},
// msgBlckword: { // msgBlckword: {
// word:'', // word:'',
// }, // },
msgBlckwordList: [ msgBlckwordList: [
// { word : '스팸'}, // { word : '스팸'},
], ],
rsnType: [], rsnType: [],
tpType: [], tpType: [],
// seqNo: '', // 일련번호 // seqNo: '', // 일련번호
word: '', // 차단문구 word: '', // 차단문구
blckSndrno:'', blckSndrno: '',
sndblckTpCd:'', sndblckTpCd: '',
blckRsnCd: '01', // 차단사유 blckRsnCd: '01', // 차단사유
blckYn:'', blckYn: '',
blckContCd:'01', //차단 조건 blckContCd: '01', //차단 조건
chgDt:'', chgDt: '',
regId: '', regId: '',
regDt: '', regDt: '',
memo: '', // 메모 memo: '', // 메모
}
},
created() {
this.formReset();
},
components: {
ValidationConfirmPopup
},
methods: {
ModalOpen() {
var dimmed = document.getElementsByClassName('modal57');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block';
}
this.setCodeDate();
},
// 모달 끄기
ModalClose() {
this.formReset();
var dimmed = document.getElementsByClassName('modal57');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
},
setCodeDate() {
// 발송타입
api.commCode({'grpCd': 'SNDBLCK_TP_CD'}).then(response => {
this.tpType = response.data.data.list;
});
api.commCode({'grpCd': 'SNDBLCK_RSN_CD'}).then(response => {
this.rsnType = response.data.data.list;
});
},
async doInsert() {
// if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
try {
const response = await riskMgtApi.msgIntrcpList(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
this.row.title = '메세지 차단';
this.row.msg1 = '저장하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
} }
this.toComplete();
} catch (err) {
this.row.title = '메세지 차단';
this.row.msg1 = '실패하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
}
// }
}, },
created(){
this.formReset(); doValidate() {
if (this.isNull(this.msgBlckwordList)) {
this.row.title = '메세지 차단';
this.row.msg1 = '문구를 입력해주세요.';
this.$parent.msgAlertModalOpen(this.row);
this.$refs._word.focus();
return false;
}
this.row.blckRsnCd = this.blckRsnCd;
this.row.blckContCd = this.blckContCd;
this.row.memo = this.memo;
this.row.blckYn = this.blckYn;
this.row.list = this.msgBlckwordList
return true;
}, },
components: {
ValidationConfirmPopup
},
methods :{ toComplete() {
ModalOpen(){ this.$parent.$refs.table.reloadData();
this.formReset(); this.ModalClose();
var dimmed = document.getElementsByClassName('dimmed'); },
dimmed[0].style.display = 'block'; //신규등록 팝업에서 문구 추가 버튼
var wrap = document.getElementsByClassName('popup-wrap'); doAdd: function () {
wrap[0].style.display = 'block'; if (this.isNull(this.word)) {
var obj = document.getElementsByClassName('modal57'); this.row.title = '메세지 차단';
obj[0].style.display = 'block'; this.row.msg1 = '문구를 입력해주세요.';
this.setCodeDate(); this.$parent.msgAlertModalOpen(this.row);
}, this.$refs._word.focus();
// 모달 끄기 return false;
ModalClose(){ }
//this.formReset(); if (this.msgBlckwordList.length < 10) {
var dimmed = document.getElementsByClassName('dimmed'); this.msgBlckwordList.push({
dimmed[0].style.display = 'none'; //seqNo: '',
var wrap = document.getElementsByClassName('popup-wrap'); word: this.word
wrap[0].style.display = 'none';
var popup = document.getElementsByClassName('modal57');
popup[0].style.display = 'none';
},
setCodeDate(){
// 발송타입
api.commCode({'grpCd' : 'SNDBLCK_TP_CD'}).then(response => {
this.tpType = response.data.data.list;
}); });
api.commCode({'grpCd' : 'SNDBLCK_RSN_CD'}).then(response => { this.word = '';
this.rsnType = response.data.data.list; }
}); },
}, //신규등록 팝업에서 문구 삭제 버튼
doDel(item, i) {
localStorage.removeItem(item);
this.msgBlckwordList.splice(i, 1);
},
formReset() {
var type = this.insertType;
Object.assign(this.$data, this.$options.data());
this.insertType = type;
},
regisConfirm() {
if (this.doValidate()) {
this.$refs.ValidationConfirmPopup.msgConfirmInsertOpen();
}
}
async doInsert(){ }
// if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
try {
const response = await riskMgtApi.msgIntrcpList(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
this.row.title = '메세지 차단';
this.row.msg1 = '저장하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
}
this.toComplete();
} catch(err) {
this.row.title = '메세지 차단';
this.row.msg1 = '실패하였습니다.';
this.$parent.msgAlertModalOpen(this.row);
}
// }
},
doValidate(){
if(this.isNull(this.msgBlckwordList)){
this.row.title = '메세지 차단';
this.row.msg1 = '문구를 입력해주세요.';
this.$parent.msgAlertModalOpen(this.row);
this.$refs._word.focus();
return false;
}
this.row.blckRsnCd = this.blckRsnCd;
this.row.blckContCd = this.blckContCd;
this.row.memo = this.memo;
this.row.blckYn = this.blckYn;
this.row.list = this.msgBlckwordList
return true;
},
toComplete(){
this.$parent.$refs.table.reloadData();
this.ModalClose();
},
//신규등록 팝업에서 문구 추가 버튼
doAdd: function() {
if(this.isNull(this.word)){
this.row.title = '메세지 차단';
this.row.msg1 = '문구를 입력해주세요.';
this.$parent.msgAlertModalOpen(this.row);
this.$refs._word.focus();
return false;
}
if(this.msgBlckwordList.length < 10){
this.msgBlckwordList.push({
//seqNo: '',
word: this.word
});
this.word = '';
}
},
//신규등록 팝업에서 문구 삭제 버튼
doDel(item, i){
localStorage.removeItem(item);
this.msgBlckwordList.splice(i, 1);
},
formReset(){
var type= this.insertType;
Object.assign(this.$data, this.$options.data());
this.insertType = type;
},
regisConfirm(){
if(this.doValidate()){
this.$refs.ValidationConfirmPopup.msgConfirmInsertOpen();
}
}
}
} }

View File

@@ -1,353 +1,358 @@
import lodash from "lodash"; import lodash from "lodash";
const utils_mixin = { const utils_mixin = {
methods:{ methods: {
/** * 이메일 형식 체크 * * @param 데이터 */ /** * 이메일 형식 체크 * * @param 데이터 */
emailCheck(email,rtnArrYn) { emailCheck(email, rtnArrYn) {
if(this.isNull(rtnArrYn)){ if (this.isNull(rtnArrYn)) {
rtnArrYn='N'; rtnArrYn = 'N';
} }
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/; // var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식 var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
if(regExp.test(email) == false) { if (regExp.test(email) == false) {
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우 // 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return email; return email;
} }
return false; return false;
}else{ } else {
var myArray = regExp.exec(email); var myArray = regExp.exec(email);
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return true; return true;
} }
}, },
/** * 전화번호 포맷으로 변환 * * @param 데이터 */ /** * 전화번호 포맷으로 변환 * * @param 데이터 */
formatPhone(phoneNum,fmt,rtnArrYn) { formatPhone(phoneNum, fmt, rtnArrYn) {
if(this.isNull(fmt)){ if (this.isNull(fmt)) {
fmt=''; fmt = '';
} }
if(this.isNull(rtnArrYn)){ if (this.isNull(rtnArrYn)) {
fmt='N'; fmt = 'N';
} }
if(this.isPhone(phoneNum)) { if (this.isPhone(phoneNum)) {
var rtnNum; var rtnNum;
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/; var regExp = /(02)([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt + myArray[2]+fmt+myArray[3]; rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return rtnNum; return rtnNum;
} else { } else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/; regExp = /(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3]; rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return rtnNum; return rtnNum;
} else { } else {
return phoneNum; return phoneNum;
} }
}
} else {
return phoneNum;
} }
} else {
return phoneNum;
}
}, },
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */ /** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
formatMobile(phoneNum,fmt,rtnArrYn) { formatMobile(phoneNum, fmt, rtnArrYn) {
if(this.isNull(fmt)){ if (this.isNull(fmt)) {
fmt=''; fmt = '';
} }
if(this.isNull(rtnArrYn)){ if (this.isNull(rtnArrYn)) {
fmt='N'; fmt = 'N';
} }
if(this.isMobile(phoneNum)) { if (this.isMobile(phoneNum)) {
var rtnNum; var rtnNum;
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/; var regExp = /(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3]; rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return rtnNum; return rtnNum;
} else { } else {
return phoneNum; return phoneNum;
}
} else {
return phoneNum;
} }
} else {
return phoneNum;
}
}, },
/** * 전화번호 형식 체크 * * @param 데이터 */ /** * 전화번호 형식 체크 * * @param 데이터 */
isPhone(phoneNum) { isPhone(phoneNum) {
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/; var regExp = /(02)([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
return true;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true; return true;
} else { } else {
return false; regExp = /(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
} if (regExp.test(phoneNum)) {
} return true;
} else {
return false;
}
}
}, },
/** * 핸드폰번호 형식 체크 * * @param 데이터 */ /** * 핸드폰번호 형식 체크 * * @param 데이터 */
isMobile(phoneNum) { isMobile(phoneNum) {
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/; var regExp = /(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
return true; return true;
} else { } else {
return false; return false;
} }
}, },
isMobile2(phoneNum) { isMobile2(phoneNum) {
var regExp =/(1[016789])([0-9]{3,4})([0-9]{4})$/; var regExp = /(1[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
return true; return true;
} else { } else {
return false; return false;
} }
}, },
isNull(obj){ isNull(obj) {
if(lodash.isNil(obj) || lodash.trim(obj) == ''){ if (lodash.isNil(obj) || lodash.trim(obj) == '') {
return true; return true;
}
return false;
},
getParent(name){
let p = this.$parent;
while(typeof p !== 'undefined'){
if(p.$options.name == name) {
return p;
}else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str){
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {
}
},
methods: {
selSesStorage(keyLike){
if(this.isNull(keyLike)){
return null;
}
if(sessionStorage.length > 0){
let keyList = [];
for(let i=0;i<sessionStorage.length;i++){
const keyNm = sessionStorage.key(i);
if(keyNm.indexOf(keyLike) > -1){
keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)});
} }
}
if(keyList.length > 0){
return keyList;
}
return null;
}
return null;
},
delSesStorage(keyList){
if(this.isNull(keyList)){
return null;
}
if(keyList.length > 0){
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
},
setGridMouseDownActive(){
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if(window.getEventListeners(ele).mousedown){
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars : function($event,regExp,hanYn){
if(this.isNull(hanYn)){
hanYn='N';
}
if(hanYn === 'N' && $event.type === 'keydown'){
if($event.keyCode === 229){
$event.preventDefault();
return false; return false;
} },
} getParent(name) {
let p = this.$parent;
if($event.type === 'keypress'){ while (typeof p !== 'undefined') {
//한글 처리 불가 if (p.$options.name == name) {
if(regExp.test(String.fromCharCode($event.charCode))) { return p;
} else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str) {
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {}
},
methods: {
selSesStorage(keyLike) {
if (this.isNull(keyLike)) {
return null;
}
if (sessionStorage.length > 0) {
let keyList = [];
for (let i = 0; i < sessionStorage.length; i++) {
const keyNm = sessionStorage.key(i);
if (keyNm.indexOf(keyLike) > -1) {
keyList.push({name: keyNm, value: sessionStorage.getItem(keyNm)});
}
}
if (keyList.length > 0) {
return keyList;
}
return null;
}
return null;
},
delSesStorage(keyList) {
if (this.isNull(keyList)) {
return null;
}
if (keyList.length > 0) {
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
},
setGridMouseDownActive() {
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if (window.getEventListeners(ele).mousedown) {
ele.removeEventListener('mousedown', window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars: function ($event, regExp, hanYn) {
if (this.isNull(hanYn)) {
hanYn = 'N';
}
if (hanYn === 'N' && $event.type === 'keydown') {
if ($event.keyCode === 229) {
$event.preventDefault();
return false;
}
}
if ($event.type === 'keypress') {
//한글 처리 불가
if (regExp.test(String.fromCharCode($event.charCode))) {
return true;
} else {
$event.preventDefault();
return false;
}
}
if (hanYn === 'N' && ($event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')) {
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g, '');
$event.preventDefault();
return false;
}
return true; return true;
}else{ },
$event.preventDefault(); setLenth: function (e, len) {
return false; this.cut(e, len);
} },
} onlyCustom: function (e, strRegExp, hanYn) {
var regExp_g = new RegExp(strRegExp, 'g');
if(hanYn === 'N' && ( $event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')){ this.cut(e);
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g,''); return this.restrictChars(e, regExp_g, hanYn);
$event.preventDefault(); },
return false; onlyCommon: function (strRegExp, e, len, isEventCall, hanYn) {
} var regExp_g = new RegExp(strRegExp, 'g');
return true; if (isEventCall === 'N') {
}, if (!this.cut(e, len, isEventCall)) {
setLenth: function (e, len) { return false;
this.cut(e, len); }
}, if (!regExp_g.test(e.value)) {
onlyCustom: function (e,strRegExp,hanYn) { return false;
var regExp_g = new RegExp(strRegExp,'g'); }
this.cut(e); return true;
return this.restrictChars(e,regExp_g,hanYn); }
}, this.cut(e, len);
onlyCommon: function(strRegExp, e, len, isEventCall, hanYn) { return this.restrictChars(e, regExp_g, hanYn);
var regExp_g = new RegExp(strRegExp,'g'); },
if(isEventCall === 'N'){ onlyNum: function (e, len, isEventCall) {
if(!this.cut(e, len, isEventCall)){ var strRegExp = '^[0-9]*$';
return false; return this.onlyCommon(strRegExp, e, len, isEventCall);
} },
if(!regExp_g.test(e.value)){ onlyEng: function (e, len, isEventCall) {
return false; var strRegExp = '^[A-Za-z]*$';
} return this.onlyCommon(strRegExp, e, len, isEventCall);
return true; },
} onlyLowerEng: function (e, len, isEventCall) {
this.cut(e, len); var strRegExp = '^[a-z]*$';
return this.restrictChars(e,regExp_g,hanYn); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyNum: function (e, len, isEventCall) { onlyUpperEng: function (e, len, isEventCall) {
var strRegExp = '^[0-9]*$'; var strRegExp = '^[A-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyEng: function (e, len, isEventCall) { onlyEmail: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z]*$'; var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyLowerEng: function (e, len, isEventCall) { onlyName: function (e, len, isEventCall) {
var strRegExp = '^[a-z]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyUpperEng: function (e, len, isEventCall) { onlyTitle: function (e, len, isEventCall) {
var strRegExp = '^[A-Z]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyEmail: function (e, len, isEventCall) { onlyText: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyName: function (e, len, isEventCall) { onlyPassword: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$'; var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyTitle: function (e, len, isEventCall) { onlyId: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$'; var strRegExp = '^[A-Za-z0-9_\.\-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyText: function (e, len, isEventCall) { onlyIp: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$'; var strRegExp = '^[0-9,.*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyPassword: function (e, len, isEventCall) { onlyRoleNm_Space: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyId: function (e, len, isEventCall) { onlyRoleId_UnderBar: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9_\.\-]*$'; var strRegExp = '^[a-zA-Z0-9_]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyIp: function (e, len, isEventCall) { cut: function (ele, len, isValidChk) {
var strRegExp = '^[0-9,.*]*$'; let e = ele;
return this.onlyCommon(strRegExp, e, len, isEventCall); if (typeof ele.target != "undefined") {
}, e = ele.target;
onlyRoleNm_Space: function (e, len, isEventCall) { }
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$'; let max = this.isNull(len) ? e.attributes.maxlength.value : len;
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); let str = e.value;
},
onlyRoleId_UnderBar: function (e, len, isEventCall) { if (this.bytes(str) > max) {
var strRegExp = '^[a-zA-Z0-9_]*$'; if (this.isNull(isValidChk)) {
return this.onlyCommon(strRegExp, e, len, isEventCall); e.value = this.cutBytes(str, max);
}, }
cut: function (ele, len, isValidChk) { return false;
let e=ele; }
if (typeof ele.target != "undefined") { return true;
e=ele.target; },
} cutBytes: function (str, len) {
let max = this.isNull(len) ? e.attributes.maxlength.value : len; while (1 === 1) {
let str = e.value; if (this.bytes(str) <= len) {
return str;
if (this.bytes(str) > max) { }
if(this.isNull(isValidChk)){ str = str.slice(0, -1);
e.value = this.cutBytes(str, max); }
} },
return false; bytes: function (str) {
} var length = ((s, b, i, c) => {
return true; // for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
}, // for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
cutBytes: function (str, len) { b = 0, i = 0;
while(1 === 1){ while (1 === 1) {
if(this.bytes(str) <= len){ c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function (str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0) != "0") {
str = "0" + str;
}
if (str.length < 10 || str.length > 12) {
return "";
}
if (isNaN(str)) {
return "";
}
if (str.substr(0, 2) != "01" && str.substr(0, 3) != "070" && str.substr(0, 4) != "0505" && str.substr(0, 4) != "0503") {
return "";
}
return str; return str;
}
str = str.slice(0,-1); },
} }
}, };
bytes: function (str) { export {utils_mixin, chkPattern2};
var length = ((s,b,i,c) => {
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
b=0,i=0;
while(1 === 1){
c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function(str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0)!="0"){
str = "0"+str;
}
if (str.length<10||str.length>12){return "";}
if (isNaN(str)){return ""; }
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){return ""; }
return str;
},
}
};
export { utils_mixin, chkPattern2 };

View File

@@ -1,135 +1,133 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">웹발송 차단내역</h3> <h3 class="title">웹발송 차단내역</h3>
<p class="breadcrumb">리스크관리 &gt; 차단 내역</p> <p class="breadcrumb">리스크관리 &gt; 차단 내역</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <label for="right" class="label">발송일</label>
<label for="right" class="label">발송일</label> <div class="group">
<div class="group"> <div class="input_box cal one">
<div class="input_box cal one"> <vuejs-datepicker
<vuejs-datepicker :language="ko"
:language="ko" :format="customFormatter"
:format="customFormatter" v-model="startDate"
v-model="startDate" @selected="selectedStartDate(0)"
@selected="selectedStartDate(0)" ></vuejs-datepicker>
></vuejs-datepicker> </div>
<!-- <input class="" type="text" id="" <button type="button" class="button grey btn-a" @click="todayDate">오늘</button>
placeholder="2022-10-12" <div class="select_box id">
v-model="grid.params.startDt" <label for="right" class="label">차단사유</label>
@click="openStartPicker = true" /> <select name="" id="" v-model="blckRsnCd">
<div v-show="openStartPicker === true"> <option value="" selected>전체</option>
<calendar ref="calendar"/> --> <option value="01">일반</option>
<!-- </div> --> <option value="02">대출</option>
</div> <option value="03">의약품</option>
<button type="button" class="button grey btn-a" @click="todayDate">오늘</button> <option value="04">도박</option>
<div class="select_box id"> <option value="05">스미싱</option>
<label for="right" class="label">차단사유</label> <option value="06">기타</option>
<select name="" id="" v-model="blckRsnCd"> </select>
<option value="" selected>전체</option> </div>
<option value="01">일반</option> <div class="select_box">
<option value="02">대출</option> <label for="right" class="label">차단구분</label>
<option value="03">의약품</option> <select name="" id="" v-model="blckTpCd">
<option value="04">도박</option> <option value="" selected>전체</option>
<option value="05">스미싱</option> <option value="01">발신번호차단</option>
<option value="06">기타</option> <option value="02">메시지차단</option>
</select> <option value="03">080수신번호차단</option>
</div> </select>
<div class="select_box"> </div>
<label for="right" class="label">차단구분</label> </div>
<select name="" id="" v-model="blckTpCd"> <div class="group">
<option value="" selected>전체</option> <div class="input_box">
<option value="01">발신번호차단</option> <label for="right" class="label">발신번호</label>
<option value="02">메시지차단</option> <input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.sndrno"
<option value="03">080수신번호차단</option> @keypress="onlyNum" @input="onlyNum" maxlength="11">
</select> </div>
</div> <div class="input_box">
</div> <label for="right" class="label">수신번호</label>
<div class="group"> <input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.rcvno"
<div class="input_box"> @keypress="onlyNum" @input="onlyNum" maxlength="11">
<label for="right" class="label">발신번호</label> </div>
<input class="search-box" type="number" id="search" placeholder="검색어 입력" v-model="grid.params.sndrno" v-on:keyup="onlyNum" @input="onlyNum" maxlength="12"> <div class="select_box">
</div> <label for="right" class="label">상세검색</label>
<div class="input_box"> <select name="" id="" v-model="searchType1">
<label for="right" class="label">수신번호</label> <option value="01" selected>고객사명</option>
<input class="search-box" type="number" id="search" placeholder="검색어 입력" v-model="grid.params.rcvno" v-on:keyup="onlyNum" @input="onlyNum" maxlength="12"> <option value="02">사업자번호</option>
</div> <option value="03">발송ID</option>
<div class="select_box"> </select>
<label for="right" class="label">상세검색</label> </div>
<select name="" id="" v-model="searchType1"> <div class="input_box">
<option value="01" selected>고객사명</option> <input class="search-box" type="text" id="search" placeholder="검색어 입력"
<option value="02">사업자번호</option> v-model.trim="grid.params.searchText1" maxlength="100">
<option value="03">발송ID</option> </div>
</select> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
<div class="input_box"> </div>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1"> <div class="info">
</div> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<button type="button" class="button grey" @click="search">조회</button> <div class="select_box NumberSe">
</div> <select name="" id="" v-model="perPageCnt" @change="changePerPage()">
</div> <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
</form> option.text
<div class="info"> }}
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> </option>
<div class="select_box NumberSe"> </select>
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> </div>
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option> </div>
</select> </div>
</div> <div class="table">
</div> <custom-grid
</div> ref="table"
<div class="table"> :totalItems="'totalItems'"
<custom-grid :url="grid.url"
ref="table" :pagePerRows="grid.pagePerRows"
:totalItems="'totalItems'" :initialRequest="grid.pagination"
:url="grid.url" :pagination="grid.pagination"
:pagePerRows="grid.pagePerRows" :isCheckbox="grid.isCheckbox"
:initialRequest="grid.pagination" :columns="grid.columns"
:pagination="grid.pagination" :noDataStr="grid.noDataStr"
:isCheckbox="grid.isCheckbox" :addCls="grid.addCls"
:columns="grid.columns" :header="grid.headder">
:noDataStr="grid.noDataStr" </custom-grid>
:addCls="grid.addCls"
:header="grid.headder">
</custom-grid>
</div>
</div> </div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template> </template>
<script> <script>
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import moment from 'moment'; import moment from 'moment';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
//import api from '../service/api'; //import api from '../service/api';
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
} }
export default { export default {
name: 'intrcpList', name: 'intrcpList',
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
@@ -142,18 +140,18 @@ export default {
periodDay: 7, periodDay: 7,
sDateDiv: 'day', sDateDiv: 'day',
startDate: new Date(), startDate: new Date(),
endDate: new Date(), endDate: new Date(),
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
statType: [], statType: [],
userType: [], userType: [],
blckRsnCd:'', blckRsnCd: '',
blckTpCd:'', blckTpCd: '',
searchType1:'01', searchType1: '01',
row:{}, row: {},
grid: { grid: {
url: '/api/v1/bo/riskMgt/web/intrcpList', url: '/api/v1/bo/riskMgt/web/intrcpList',
perPage: 20, perPage: 20,
@@ -164,36 +162,38 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '차단구분', childNames: [] }, {header: '차단구분', childNames: []},
{ header: '발송ID', childNames: [] }, {header: '발송ID', childNames: []},
{ header: '발신번호', childNames: [] }, {header: '발신번호', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '수신번호', childNames: [] }, {header: '수신번호', childNames: []},
{ header: '차단사유', childNames: [] }, {header: '차단사유', childNames: []},
{ header: '발송일자', childNames: [] } {header: '발송일자', childNames: []}
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: 'blckTpCd', header: '차단구분', align: 'center', width: '11%' }, {name: 'blckTpCd', header: '차단구분', align: 'center', width: '11%'},
{ name: 'userId', header: '발송ID', align: 'center', width: '11%'}, {name: 'userId', header: '발송ID', align: 'center', width: '11%'},
{ name: 'sndrno', header: '발신번호', align: 'center', width: '11%'}, {name: 'sndrno', header: '발신번호', align: 'center', width: '11%'},
{ name: 'custNm', header: '고객사명', align: 'center', width: '11%', renderer: { {
type: CustomATagRenderer name: 'custNm', header: '고객사명', align: 'center', width: '11%', renderer: {
, options: { type: CustomATagRenderer
callback: this.custDetail, , options: {
callback: this.custDetail,
}
} }
}}, },
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '11%'}, {name: 'bizrno', header: '사업자번호', align: 'center', width: '11%'},
{ name: 'rcvno', header: '수신번호', align: 'center', width: '11%' }, {name: 'rcvno', header: '수신번호', align: 'center', width: '11%'},
{ name: 'blckRsnCd', header: '차단사유', align: 'center', width: '7%' }, {name: 'blckRsnCd', header: '차단사유', align: 'center', width: '7%'},
{ name: 'blckDt', header: '발송일자', align: 'center', width: '11%' }, {name: 'blckDt', header: '발송일자', align: 'center', width: '11%'},
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
blckDt: '', blckDt: '',
blckRsnCd: '', blckRsnCd: '',
@@ -205,31 +205,31 @@ export default {
startDt: new Date(+new Date() + 3240 * 10000).toISOString().split("T")[0], startDt: new Date(+new Date() + 3240 * 10000).toISOString().split("T")[0],
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: 1, page: 1,
perPage: 20, perPage: 20,
params: { params: {
blckDt: '', blckDt: '',
blckRsnCd: '', blckRsnCd: '',
blckTpCd: '', blckTpCd: '',
sndrno: '', sndrno: '',
rcvno: '', rcvno: '',
searchType1: '', searchType1: '',
searchText1: '' searchText1: ''
} }
}); });
this.startDate = ''; this.startDate = '';
}, },
created(){ created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
this.setPeriodDay(0); this.setPeriodDay(0);
}, },
@@ -238,7 +238,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false; let isKeep = false;
if(getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
@@ -247,7 +247,7 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.blckDt = moment(this.startDate).format('YYYYMMDD'); this.grid.params.blckDt = moment(this.startDate).format('YYYYMMDD');
this.grid.params.blckTpCd = this.blckTpCd this.grid.params.blckTpCd = this.blckTpCd
@@ -256,12 +256,12 @@ export default {
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
@@ -277,10 +277,10 @@ export default {
this.closeDate('start'); this.closeDate('start');
}, },
selectedStartDate(day) { selectedStartDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
this.periodDay = day; this.periodDay = day;
} }
console.log(this.startDate); console.log(this.startDate);
}, },
selectedEndDate(day) { selectedEndDate(day) {
@@ -290,11 +290,11 @@ export default {
}, },
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
} }
console.log(this.startDate); console.log(this.startDate);
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -307,13 +307,13 @@ export default {
custDetail(props) { custDetail(props) {
//this.row.custNm = props.serviceId; //this.row.custNm = props.serviceId;
this.row.serviceId = props.serviceId; this.row.serviceId = props.serviceId;
this.$router.push({ name: 'subsDetail', params: this.row }); this.$router.push({name: 'subsDetail', params: this.row});
}, },
calendarCalbackFnc(year, month, day){ calendarCalbackFnc(year, month, day) {
if(this.openStartPicker){ if (this.openStartPicker) {
this.startDate= year +''+ month +''+ day this.startDate = year + '' + month + '' + day
if(Number(this.endDate) < Number(this.startDate) && this.endDate !== 0){ if (Number(this.endDate) < Number(this.startDate) && this.endDate !== 0) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '조회 시작일이 종료일보다 큽니다.'; this.row.msg1 = '조회 시작일이 종료일보다 큽니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
@@ -323,9 +323,9 @@ export default {
this.grid.params.startDt = year + '-' + month + '-' + day this.grid.params.startDt = year + '-' + month + '-' + day
this.openStartPicker = false this.openStartPicker = false
} }
if(this.openEndPicker){ if (this.openEndPicker) {
this.endDate=year +''+ month +''+ day this.endDate = year + '' + month + '' + day
if(Number(this.endDate) < Number(this.startDate) && this.startDate !== 0){ if (Number(this.endDate) < Number(this.startDate) && this.startDate !== 0) {
this.row.title = '청약고객관리'; this.row.title = '청약고객관리';
this.row.msg1 = '조회 종료일이 시작일보다 작습니다.'; this.row.msg1 = '조회 종료일이 시작일보다 작습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
@@ -341,16 +341,16 @@ export default {
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -1,90 +1,93 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">발신번호 차단</h3> <h3 class="title">발신번호 차단</h3>
<p class="breadcrumb">리스크관리 &gt; 발신번호 차단</p> <p class="breadcrumb">리스크관리 &gt; 발신번호 차단</p>
</div>
<form autocomplete="off" class="search_form">
<div class="search_wrap">
<div class="group">
<div class="input_box">
<label for="regId" class="label">등록자</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.regId" v-on:keydown.enter.prevent="search" v-on:keyup="onlyEng" @input="onlyEng" maxlength="20" />
</div>
<div class="select_box">
<label for="blckRsnCd" class="label">차단사유</label>
<select name="" id="blckRsnCd" v-model="blckRsnCd" @keyup="search">
<option value="" selected>전체</option>
<option value="01">일반</option>
<option value="02">대출</option>
<option value="03">의약품</option>
<option value="04">도박</option>
<option value="05">스미싱</option>
<option value="06">기타</option>
</select>
</div>
</div>
<div class="group">
<div class="select_box">
<label for="right" class="label">차단여부</label>
<select name="" id="" v-model="blckYn">
<option value="" selected>전체</option>
<option value="Y">차단</option>
<option value="N">해제</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">발송타입</label>
<select name="" id="" v-model="sndblckTpCd">
<option value="" selected>전체</option>
<option value="01">공용</option>
<option value="02">문자</option>
<option value="03">RCS</option>
</select>
</div>
<div class="input_box">
<label for="right" class="label">발신번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.blckSndrno">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
</form>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option>
</select>
</div>
</div>
<div class="button_group">
<button type="button" class="button blue add" @click="ModalOpen()">신규등록</button>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<insert-intrcp-pop ref="insertIntrcpPop"> </insert-intrcp-pop>
<intrcp-detail-popup ref="intrcpDetailPopup"></intrcp-detail-popup>
<common-modal ref="commonModal"></common-modal>
</div> </div>
</div> <div class="search_wrap">
<div class="group">
<div class="input_box">
<label for="regId" class="label">등록자</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.regId"
v-on:keydown.enter.prevent="search" v-on:keyup="onlyEng" @input="onlyEng" maxlength="20"/>
</div>
<div class="select_box">
<label for="blckRsnCd" class="label">차단사유</label>
<select name="" id="blckRsnCd" v-model="blckRsnCd" @keyup="search">
<option value="" selected>전체</option>
<option value="01">일반</option>
<option value="02">대출</option>
<option value="03">의약품</option>
<option value="04">도박</option>
<option value="05">스미싱</option>
<option value="06">기타</option>
</select>
</div>
</div>
<div class="group">
<div class="select_box">
<label for="right" class="label">차단여부</label>
<select name="" id="" v-model="blckYn">
<option value="" selected>전체</option>
<option value="Y">차단</option>
<option value="N">해제</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">발송타입</label>
<select name="" id="" v-model="sndblckTpCd">
<option value="" selected>전체</option>
<option value="01">공용</option>
<option value="02">문자</option>
<option value="03">RCS</option>
</select>
</div>
<div class="input_box">
<label for="right" class="label">발신번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력"
v-model.trim="grid.params.blckSndrno">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
option.text
}}
</option>
</select>
</div>
</div>
<div class="button_group">
<button type="button" class="button blue add" @click="ModalOpen()">신규등록</button>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
</div>
<insert-intrcp-pop ref="insertIntrcpPop"></insert-intrcp-pop>
<intrcp-detail-popup ref="intrcpDetailPopup"></intrcp-detail-popup>
<common-modal ref="commonModal"></common-modal>
</div>
</template> </template>
<script> <script>
@@ -93,30 +96,29 @@ import api from '@/service/api.js';
import intrcpDetailPopup from '../components/IntrcpDetailPopup'; import intrcpDetailPopup from '../components/IntrcpDetailPopup';
import insertIntrcpPop from '../components/InsertIntrcpPop'; import insertIntrcpPop from '../components/InsertIntrcpPop';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
//import api from '../service/api';
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
console.log(this.props); console.log(this.props);
callback(this.props); callback(this.props);
}); });
} }
} }
export default { export default {
@@ -126,13 +128,13 @@ export default {
return { return {
totalItems: 0, totalItems: 0,
perPageCnt: 50, perPageCnt: 50,
blckRsnCd:'', blckRsnCd: '',
blckYn:'', blckYn: '',
sndblckTpCd:'', sndblckTpCd: '',
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
grid: { grid: {
url: '/api/v1/bo/riskMgt/sendNum/intrcpList', url: '/api/v1/bo/riskMgt/sendNum/intrcpList',
@@ -144,29 +146,31 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '발신번호', childNames: [] }, {header: '발신번호', childNames: []},
{ header: '차단여부', childNames: [] }, {header: '차단여부', childNames: []},
{ header: '발송타입', childNames: [] }, {header: '발송타입', childNames: []},
{ header: '최근수정일', childNames: [] }, {header: '최근수정일', childNames: []},
{ header: '차단사유', childNames: [] }, {header: '차단사유', childNames: []},
{ header: '등록자', childNames: [] } {header: '등록자', childNames: []}
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: 'blcksndrno', header: '발신번호', align: 'center', width: '25%', {
renderer: { type: CustomATagRenderer, options: { callback: this.inDetailPop} } }, name: 'blcksndrno', header: '발신번호', align: 'center', width: '25%',
{ name: 'blckYn', header: '차단여부', align: 'center', width: '15%'}, renderer: {type: CustomATagRenderer, options: {callback: this.inDetailPop}}
{ name: 'sndblckTpCd', header: '발송타입', align: 'center', width: '15%', hidden: true}, },
{ name: 'sndblckTpNm', header: '발송타입', align: 'center', width: '15%'}, {name: 'blckYn', header: '차단여부', align: 'center', width: '15%'},
{ name: 'lastChgDt', header: '최근수정일', align: 'center', width: '15%'}, {name: 'sndblckTpCd', header: '발송타입', align: 'center', width: '15%', hidden: true},
{ name: 'blckRsnCd', header: '차단사유', width: '15%', cls: 'td_line', hidden: true }, {name: 'sndblckTpNm', header: '발송타입', align: 'center', width: '15%'},
{ name: 'blckRsnNm', header: '차단사유', width: '15%', cls: 'td_line' }, {name: 'lastChgDt', header: '최근수정일', align: 'center', width: '15%'},
{ name: 'regId', header: '등록자', width: '15%' } {name: 'blckRsnCd', header: '차단사유', width: '15%', cls: 'td_line', hidden: true},
{name: 'blckRsnNm', header: '차단사유', width: '15%', cls: 'td_line'},
{name: 'regId', header: '등록자', width: '15%'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
regId: '', regId: '',
blckRsnCd: '', blckRsnCd: '',
@@ -177,9 +181,9 @@ export default {
blckSndrno: '' blckSndrno: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
intrcpDetailPopup, intrcpDetailPopup,
@@ -189,9 +193,9 @@ export default {
destroyed() { destroyed() {
this.grid.params.blckSndrno = ''; this.grid.params.blckSndrno = '';
this.grid.params.regId = ''; this.grid.params.regId = '';
}, },
created(){ created() {
this.setCodeData(); this.setCodeData();
// this.formReset(); // this.formReset();
}, },
@@ -200,7 +204,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false; let isKeep = false;
if(getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
@@ -209,7 +213,7 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.blckRsnCd = this.blckRsnCd this.grid.params.blckRsnCd = this.blckRsnCd
this.grid.params.blckYn = this.blckYn this.grid.params.blckYn = this.blckYn
@@ -219,37 +223,37 @@ export default {
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage); console.log("getCondition : " + getCondition.perPage);
}, },
setCodeData() { setCodeData() {
// 상태 옵션 셋팅. // 상태 옵션 셋팅.
api.commCode({'grpCd' : 'SVCUSER_STTUS_CD'}).then(response => { api.commCode({'grpCd': 'SVCUSER_STTUS_CD'}).then(response => {
this.statType = response.data.data.list; this.statType = response.data.data.list;
}); });
// //
api.commCode({'grpCd' : 'SVCUSER_TP_CD'}).then(response => { api.commCode({'grpCd': 'SVCUSER_TP_CD'}).then(response => {
this.userType = response.data.data.list; this.userType = response.data.data.list;
}); });
//발송타입 //발송타입
api.commCode({'grpCd' : 'SNDBLCK_TP_CD'}).then(response => { api.commCode({'grpCd': 'SNDBLCK_TP_CD'}).then(response => {
this.tpType = response.data.data.list; this.tpType = response.data.data.list;
}); });
}, },
ModalOpen: function(){ ModalOpen: function () {
this.$refs.insertIntrcpPop.ModalOpen(); this.$refs.insertIntrcpPop.ModalOpen();
}, },
inDetailPop(props) { inDetailPop(props) {
@@ -258,36 +262,36 @@ export default {
this.$refs.intrcpDetailPopup.IntrcpDetailModalOpen(props); this.$refs.intrcpDetailPopup.IntrcpDetailModalOpen(props);
}, },
// formReset(){ // formReset(){
// var type= this.insertType; // var type= this.insertType;
// Object.assign(this.$data, this.$options.data()); // Object.assign(this.$data, this.$options.data());
// this.insertType = type; // this.insertType = type;
// }, // },
alertInsert(props){ alertInsert(props) {
console.log(props); console.log(props);
this.$refs.commonModal.alertModalOpen(props); this.$refs.commonModal.alertModalOpen(props);
}, },
confirmInsert(props){ confirmInsert(props) {
this.$refs.commonModal.confirmModalOpen(props); this.$refs.commonModal.confirmModalOpen(props);
}, },
confirmCalbackFnc: function(props){ confirmCalbackFnc: function (props) {
// if(props.result){ // if(props.result){
// // this.doInsert(props.result); // // this.doInsert(props.result);
// } // }
}, },
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -1,68 +1,73 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">메시지 차단</h3> <h3 class="title">메시지 차단</h3>
<p class="breadcrumb">리스크관리 &gt; 메시지 차단</p> <p class="breadcrumb">리스크관리 &gt; 메시지 차단</p>
</div> </div>
<form autocomplete="off" class="search_form"> <form autocomplete="off" class="search_form">
<div class="search_wrap"> <div class="search_wrap">
<div class="input_box"> <div class="input_box">
<label for="regId" class="label">등록자</label> <label for="regId" class="label">등록자</label>
<input class="search-box" type="text" id="regId" placeholder="검색어 입력" v-model="grid.params.regId" v-on:keydown.enter.prevent="search" v-on:keyup="onlyEng" @input="onlyEng" maxlength="20"/> <input class="search-box" type="text" id="regId" placeholder="검색어 입력" v-model.trim="grid.params.regId"
</div> v-on:keydown.enter.prevent="search" v-on:keyup="onlyEng" @input="onlyEng" maxlength="20"/>
<div class="select_box"> </div>
<label for="blckRsnCd" class="label">차단사유</label> <div class="select_box">
<select name="" id="blckRsnCd" v-model="blckRsnCd" @keyup="search"> <label for="blckRsnCd" class="label">차단사유</label>
<option value="" selected>전체</option> <select name="" id="blckRsnCd" v-model="blckRsnCd" @keyup="search">
<option value="01">일반</option> <option value="" selected>전체</option>
<option value="02">대출</option> <option value="01">일반</option>
<option value="03">의약품</option> <option value="02">대출</option>
<option value="04">도박</option> <option value="03">의약품</option>
<option value="05">스미싱</option> <option value="04">도박</option>
<option value="06">기타</option> <option value="05">스미싱</option>
</select> <option value="06">기타</option>
</div> </select>
<div class="input_box"> </div>
<label for="word" class="label">차단메시지</label> <div class="input_box">
<input class="search-box" type="text" id="word" placeholder="검색어 입력" v-model="grid.params.word" v-on:keydown.enter.prevent="search" /> <label for="word" class="label">차단메시지</label>
</div> <input class="search-box" type="text" id="word" placeholder="검색어 입력" v-model.trim="grid.params.word"
<button type="button" class="button grey" @click="search">조회</button> v-on:keydown.enter.prevent="search" maxlength="50"/>
</div> </div>
</form> <button type="button" class="button grey" @click="search">조회</button>
<div class="info"> </div>
<div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}} </span> </form>
<div class="select_box NumberSe"> <div class="info">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> <div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option> <div class="select_box NumberSe">
</select> <select name="" id="" v-model="perPageCnt" @change="changePerPage()">
</div> <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
</div> option.text
<div class="button_group"> }}
<button type="button" class="button blue add" @click="ModalOpen()">신규등록</button> </option>
</div> </select>
</div> </div>
<div class="table"> </div>
<custom-grid <div class="button_group">
ref="table" <button type="button" class="button blue add" @click="ModalOpen()">신규등록</button>
:totalItems="'totalItems'" </div>
:url="grid.url" </div>
:pagePerRows="grid.pagePerRows" <div class="table">
:initialRequest="grid.initialRequest" <custom-grid
:pagination="grid.pagination" ref="table"
:isCheckbox="grid.isCheckbox" :totalItems="'totalItems'"
:columns="grid.columns" :url="grid.url"
:noDataStr="grid.noDataStr" :pagePerRows="grid.pagePerRows"
:addCls="grid.addCls" :initialRequest="grid.initialRequest"
:header="grid.headder" :pagination="grid.pagination"
></custom-grid> :isCheckbox="grid.isCheckbox"
</div> :columns="grid.columns"
</div> :noDataStr="grid.noDataStr"
<insert-msg-pop ref="InsertMsgPop"></insert-msg-pop> :addCls="grid.addCls"
<intrcp-msg-detail ref="IntrcpMsgDetail"></intrcp-msg-detail> :header="grid.headder"
<common-modal ref="commonModal"></common-modal> ></custom-grid>
</div> </div>
</div>
<insert-msg-pop ref="InsertMsgPop"></insert-msg-pop>
<intrcp-msg-detail ref="IntrcpMsgDetail"></intrcp-msg-detail>
<common-modal ref="commonModal"></common-modal>
</div>
</template> </template>
<script> <script>
@@ -70,29 +75,30 @@ import customGrid from '@/components/CustomGrid';
import InsertMsgPop from '../components/InsertMsgPop'; import InsertMsgPop from '../components/InsertMsgPop';
import IntrcpMsgDetail from '../components/IntrcpMsgDetail'; import IntrcpMsgDetail from '../components/IntrcpMsgDetail';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
//import api from '../service/api';
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
} }
export default { export default {
name: 'intrcpList', name: 'intrcpList',
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
@@ -102,11 +108,11 @@ export default {
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
blckRsnCd:'', blckRsnCd: '',
grid: { grid: {
url: '/api/v1/bo/riskMgt/msg/intrcpList', url: '/api/v1/bo/riskMgt/msg/intrcpList',
perPageRows: 20, perPageRows: 20,
@@ -118,27 +124,29 @@ export default {
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '일련번호', align: 'center', childNames: [] }, {header: '일련번호', align: 'center', childNames: []},
{ header: '차단메시지', childNames: [] }, {header: '차단메시지', childNames: []},
{ header: '차단여부', childNames: [] }, {header: '차단여부', childNames: []},
{ header: '마지막 수정일', childNames: [] }, {header: '마지막 수정일', childNames: []},
{ header: '차단사유', childNames: [] }, {header: '차단사유', childNames: []},
{ header: '등록자', childNames: [] } {header: '등록자', childNames: []}
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: 'seqNo', header: '일련번호', align: 'center', width: '19%', hidden: true}, {name: 'seqNo', header: '일련번호', align: 'center', width: '19%', hidden: true},
{ name: 'word', header: '차단메시지', align: 'center', width: '19%', {
renderer: {type: CustomATagRenderer, options: { callback: this.msgDetailPop}} }, name: 'word', header: '차단메시지', align: 'center', width: '19%',
{ name: 'blckYn', header: '차단여부', align: 'center', width: '19%'}, renderer: {type: CustomATagRenderer, options: {callback: this.msgDetailPop}}
{ name: 'lastChgDt', header: '마지막 수정일', align: 'center', width: '19%'}, },
{ name: 'blckRsnCd', header: '차단사유', align: 'center', width: '19%'}, {name: 'blckYn', header: '차단여부', align: 'center', width: '19%'},
{ name: 'regId', header: '등록자', width: '19%', cls: 'td_line' } {name: 'lastChgDt', header: '마지막 수정일', align: 'center', width: '19%'},
{name: 'blckRsnCd', header: '차단사유', align: 'center', width: '19%'},
{name: 'regId', header: '등록자', width: '19%', cls: 'td_line'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
regId: '', regId: '',
blckRsnCd: '', blckRsnCd: '',
@@ -147,19 +155,19 @@ export default {
blckYn: '', blckYn: '',
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
InsertMsgPop, InsertMsgPop,
IntrcpMsgDetail, IntrcpMsgDetail,
commonModal, commonModal,
}, },
destroyed() { destroyed() {
}, },
created(){ created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
mounted() { mounted() {
@@ -167,7 +175,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false; let isKeep = false;
if(getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
@@ -176,7 +184,7 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.blckRsnCd = this.blckRsnCd; this.grid.params.blckRsnCd = this.blckRsnCd;
@@ -184,45 +192,45 @@ export default {
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
//console.log("getCondition : "+ getCondition.perPage); //console.log("getCondition : "+ getCondition.perPage);
}, },
ModalOpen: function(target){ ModalOpen: function (target) {
this.$refs.InsertMsgPop.ModalOpen(target); this.$refs.InsertMsgPop.ModalOpen(target);
}, },
msgDetailPop(props) { msgDetailPop(props) {
// console.log(props); // console.log(props);
this.$refs.IntrcpMsgDetail.IntrcpMsgDetailModalOpen(props); this.$refs.IntrcpMsgDetail.IntrcpMsgDetailModalOpen(props);
}, },
msgAlertModalOpen(props){ msgAlertModalOpen(props) {
this.$refs.commonModal.alertModalOpen(props); this.$refs.commonModal.alertModalOpen(props);
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -2,103 +2,113 @@
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">080 수신번호 차단</h3> <h3 class="title">080 수신번호 차단</h3>
<p class="breadcrumb">리스크관리 &gt; 080 수신번호 차단</p> <p class="breadcrumb">리스크관리 &gt; 080 수신번호 차단</p>
</div>
<div class="search_form">
<div class="search_wrap">
<div class="input_box">
<label for="search" class="label">고객사</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.custNm" v-on:keyup="onlyName" @input="onlyName" maxlength="20"/>
</div>
<div class="input_box">
<label for="search" class="label">인증코드</label>
<input class="search-box" type="number" id="search" placeholder="검색어 입력" v-model="grid.params.authcd080" v-on:keyup="onlyNum" @input="onlyNum" maxlength="6"/>
</div>
<div class="input_box">
<label for="search" class="label">수신번호</label>
<input class="search-box" type="number" id="search" placeholder="검색어 입력" v-model="grid.params.rcvblckno" v-on:keyup="onlyNum" @input="onlyNum" maxlength="11"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info">
<div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option>
</select>
</div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.pagination"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder">
</custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
<div class="search_form">
<div class="search_wrap">
<div class="input_box">
<label for="search" class="label">고객사</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.custNm"
@keypress="onlyName" @input="onlyName" maxlength="20"/>
</div>
<div class="input_box">
<label for="search" class="label">인증코드</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.authcd080"
@keypress="onlyNum" @input="onlyNum" maxlength="6"/>
</div>
<div class="input_box">
<label for="search" class="label">수신번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.rcvblckno"
@keypress="onlyNum"
@input="onlyNum" maxlength="11"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info">
<div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>
<div class="select_box NumberSe">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
option.text
}}
</option>
</select>
</div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.pagination"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder">
</custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal>
</div> </div>
</div>
</template> </template>
<script> <script>
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
//import api from '../service/api'; //import api from '../service/api';
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
} }
class customBRegNo { class customBRegNo {
constructor(props) { constructor(props) {
//this.props = props; //this.props = props;
const el = document.createElement('td'); const el = document.createElement('td');
var bregNo = String(props.colValue); var bregNo = String(props.colValue);
el.innerText= bregNo; el.innerText = bregNo;
if(bregNo.length == 10){ if (bregNo.length == 10) {
el.innerText= bregNo.substring(0,3)+'-'+bregNo.substring(3,5)+'-'+bregNo.substring(5,10) el.innerText = bregNo.substring(0, 3) + '-' + bregNo.substring(3, 5) + '-' + bregNo.substring(5, 10)
}
this.el = el;
} }
this.el = el;
}
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
} }
} }
export default { export default {
name: 'intrcpList', name: 'intrcpList',
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
@@ -106,13 +116,13 @@ export default {
return { return {
totalItems: 0, totalItems: 0,
userType: [], userType: [],
row:{}, row: {},
perPageCnt: 50, perPageCnt: 50,
pagePerRows: 20, pagePerRows: 20,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
grid: { grid: {
url: '/api/v1/bo/riskMgt/zezNum/intrcpList', url: '/api/v1/bo/riskMgt/zezNum/intrcpList',
@@ -122,34 +132,31 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '고객사', childNames: [] }, {header: '고객사', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '인증코드', childNames: [] }, {header: '인증코드', childNames: []},
{ header: '수신번호', childNames: [] }, {header: '수신번호', childNames: []},
{ header: '등록일', childNames: [] }, {header: '등록일', childNames: []},
{ header: '등록구분', childNames: [] } {header: '등록구분', childNames: []}
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: 'custNm', header: '고객사', align: 'center', width: '15%', renderer: { {
type: CustomATagRenderer name: 'custNm', header: '고객사', align: 'center', width: '15%', renderer: {
, options: { type: CustomATagRenderer
callback: this.memberDetail, , options: {
} callback: this.memberDetail,
} }, }
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '15%',
formatter: props => {
let result = props.bizrno.substring(0,3)+'-'+ props.bizrno.substring(3,5)+'-'+ props.bizrno.substring(5,10)
return result;
} }
}, },
{ name: 'authcd080', header: '인증코드', align: 'center', width: '15%'}, {name: 'bizrno', header: '사업자번호', align: 'center', width: '15%'},
{ name: 'rcvblckno', header: '수신번호', align: 'center', width: '15%'}, {name: 'authcd080', header: '인증코드', align: 'center', width: '15%'},
{ name: 'regDt', header: '등록일', align: 'center', width: '20%'}, {name: 'rcvblckno', header: '수신번호', align: 'center', width: '15%'},
{ name: 'regTpCd', header: '등록구분', width: '15%', cls: 'td_line' } {name: 'regDt', header: '등록', align: 'center', width: '20%'},
{name: 'regTpCd', header: '등록구분', width: '15%', cls: 'td_line'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
@@ -168,7 +175,7 @@ export default {
destroyed() { destroyed() {
}, },
created(){ created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
mounted() { mounted() {
@@ -176,7 +183,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false; let isKeep = false;
if(getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
@@ -185,17 +192,17 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log('this.perPageCnt'+this.perPageCnt); console.log('this.perPageCnt' + this.perPageCnt);
//console.log(this.grid.params); //console.log(this.grid.params);
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -211,20 +218,20 @@ export default {
memberDetail(props) { memberDetail(props) {
console.log(props); console.log(props);
this.row.serviceId = props.userId; this.row.serviceId = props.userId;
this.$router.push({ name: 'subsDetail', params: this.row}); this.$router.push({name: 'subsDetail', params: this.row});
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -8,7 +8,7 @@
<div class="pop-cont-detail input_box"> <div class="pop-cont-detail input_box">
<label>ID</label> <label>ID</label>
<div class="input_search"> <div class="input_search">
<input class="search-box" type="text" value="" v-model="searchText1"> <input class="search-box" type="text" value="" v-model="searchText1" maxlength="100">
<button type="button" class="button btn-p2color" @click="adminList">조회</button> <button type="button" class="button btn-p2color" @click="adminList">조회</button>
</div> </div>
</div> </div>

View File

@@ -1,8 +1,8 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed" @click="apprDetailPopClose"></div> <div class="dimmed modal55" @click="apprDetailPopClose"></div>
<div class="popup-wrap"> <div class="popup-wrap modal55">
<!-- 발신번호 상세 (타사업자)--> <!-- 발신번호 상세 (타사업자)-->
<div class="popup modal55 popup_form"> <div class="popup modal55 popup_form">
<div class="pop-head"> <div class="pop-head">
@@ -137,14 +137,10 @@ export default {
// 모달 띄우기 // 모달 띄우기
apprDetailPopOpen(props){ apprDetailPopOpen(props){
// this.formReset(); var dimmed = document.getElementsByClassName('modal55');
var dimmed = document.getElementsByClassName('dimmed'); for (var i = 0; i < dimmed.length; i++) {
dimmed[0].style.display = 'block'; dimmed[i].style.display = 'block';
var wrap = document.getElementsByClassName('popup-wrap'); }
wrap[0].style.display = 'block';
var obj = document.getElementsByClassName('modal55');
obj[0].style.display = 'block';
this.apprDetail(props); this.apprDetail(props);
}, },
@@ -198,12 +194,10 @@ export default {
}, },
// 모달 끄기 // 모달 끄기
apprDetailPopClose(){ apprDetailPopClose(){
var dimmed = document.getElementsByClassName('dimmed'); var dimmed = document.getElementsByClassName('modal55');
dimmed[0].style.display = 'none'; for (var i = 0; i < dimmed.length; i++) {
var wrap = document.getElementsByClassName('popup-wrap'); dimmed[i].style.display = 'none';
wrap[0].style.display = 'none'; }
var popup = document.getElementsByClassName('modal55');
popup[0].style.display = 'none';
}, },
allApprSttus(event) { allApprSttus(event) {
var data = event.target.value; var data = event.target.value;

View File

@@ -1,113 +1,124 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed" @click="numberRegPopClose();"></div> <div class="dimmed" @click="numberRegPopClose();"></div>
<!-- 발신번호 등록 (타사업자)--> <!-- 발신번호 등록 (타사업자)-->
<div class="popup modal52 popup_form register w700"> <div class="popup modal52 popup_form register w700">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">발신번호 등록</h3> <h3 class="pop-tit">발신번호 등록</h3>
</div> </div>
<table> <table>
<tbody> <tbody>
<tr> <tr>
<th>관리자 ID</th> <th>관리자 ID</th>
<td> <td>
<div class="input_search"> <div class="input_search">
<input class="search-box" type="text" placeholder="아이디 입력" disabled v-model="adminId"> <input class="search-box" type="text" placeholder="아이디 입력" disabled v-model="adminId">
<button type="button" class="button btn-p2color" @click="searchIdPop">조회</button> <button type="button" class="button btn-p2color" @click="searchIdPop">조회</button>
</div>
</td>
</tr>
<tr>
<th>고객사명</th>
<td><input type="text" disabled v-model="custNm"></td>
</tr>
<tr>
<th>사업자번호</th>
<td><input type="text" disabled v-model="bRegNo"></td>
</tr>
<tr v-show="bizrAuthYn !== 'Y'">
<th>명의자 구분</th>
<td>
<input type="radio" name="nmineeDivCd" value="01" id="popup_radio5" v-model="nmineeDivCd"
@change="changeNmineDiv($event)">
<label for="popup_radio5">사업자</label>
<input type="radio" name="nmineeDivCd" value="02" id="popup_radio6" v-model="nmineeDivCd"
@change="changeNmineDiv($event)">
<label for="popup_radio6">타사업자</label>
</td>
</tr>
<tr>
<th>발신번호</th>
<td>
<div class="input_add">
<div>
<input type="text" placeholder="발신번호명" v-model="sendNm" maxlength="20">
<input type="text" placeholder="발신번호(숫자만입력)" v-model="sendNum" @keypress="onlyNum" @input="onlyNum"
maxlength="11">
<button class="button white add" @click="addNumberInput"></button>
</div> </div>
</td> <div v-for="(numberInput, index) in numberInputs">
</tr> <input type="text" placeholder="발신번호명" v-model="numberInput.sendNm" maxlength="20">
<tr> <input type="text" placeholder="발신번호(숫자만입력)" v-model="numberInput.sendNum" @keypress="onlyNum"
<th>고객사명</th> @input="onlyNum" maxlength="11">
<td><input type="text" disabled v-model="custNm"></td>
</tr>
<tr>
<th>사업자번호</th>
<td><input type="text" disabled v-model="bRegNo"></td>
</tr>
<tr v-show="bizrAuthYn !== 'Y'">
<th>명의자 구분</th>
<td>
<input type="radio" name="nmineeDivCd" value="01" id="popup_radio5" v-model="nmineeDivCd" @change="changeNmineDiv($event)">
<label for="popup_radio5">사업자</label>
<input type="radio" name="nmineeDivCd" value="02" id="popup_radio6" v-model="nmineeDivCd" @change="changeNmineDiv($event)">
<label for="popup_radio6">타사업자</label>
</td>
</tr>
<tr>
<th>발신번호</th>
<td>
<div class="input_add">
<div>
<input type="text" placeholder="발신번호명" v-model="sendNm" maxlength="20">
<input type="text" placeholder="발신번호(숫자만입력)" v-model="sendNum" v-on:keyup="onlyNum" @input="onlyNum" maxlength="16">
<button class="button white add" @click="addNumberInput"></button>
</div>
<div v-for="(numberInput, index) in numberInputs">
<input type="text" placeholder="발신번호명" v-model="numberInput.sendNm" maxlength="20">
<input type="text" placeholder="발신번호(숫자만입력)" v-model="numberInput.sendNum" v-on:keyup="onlyNum" @input="onlyNum" maxlength="16">
</div>
</div> </div>
</td> </div>
</tr> </td>
<tr v-show="bizrAuthYn !== 'Y'"> </tr>
<th>제출서류</th> <tr v-show="bizrAuthYn !== 'Y'">
<td> <th>제출서류</th>
<div class="attach" v-show="fileType === 2"> <td>
<p class="essential list"><span>*</span>위임-수임관계 확인 서류</p> <div class="attach" v-show="fileType === 2">
<input type="file" ref="trustFile" style="display: none" @change="readTrustFile" accept=".jpg,.png,.pdf,.tiff"/> <p class="essential list"><span>*</span>위임-수임관계 확인 서류</p>
<button class="button btn-p2color" @click="$refs.trustFile.click()">파일업로드</button> <input type="file" ref="trustFile" style="display: none" @change="readTrustFile"
<p class="file" id="trustNm"></p> accept=".jpg,.png,.pdf,.tiff"/>
</div> <button class="button btn-p2color" @click="$refs.trustFile.click()">파일업로드</button>
<div class="attach" v-show="fileType === 2"> <p class="file" id="trustNm"></p>
<p class="essential list"><span>*</span>위임장</p> </div>
<input type="file" ref="warrantFile" style="display: none" @change="readWarrantFile" accept=".jpg,.png,.pdf,.tiff"/> <div class="attach" v-show="fileType === 2">
<button class="button btn-p2color" @click="$refs.warrantFile.click()">파일업로드</button> <p class="essential list"><span>*</span>위임장</p>
<p class="file" id="warrantNm"></p> <input type="file" ref="warrantFile" style="display: none" @change="readWarrantFile"
</div> accept=".jpg,.png,.pdf,.tiff"/>
<div class="attach" v-show="fileType === 2"> <button class="button btn-p2color" @click="$refs.warrantFile.click()">파일업로드</button>
<p class="essential list"><span>*</span>대리인 신분증 사본 인증</p> <p class="file" id="warrantNm"></p>
<input type="file" ref="deputyFile" style="display: none" @change="readDeputyFile" accept=".jpg,.png,.pdf,.tiff"/> </div>
<button class="button btn-p2color" @click="$refs.deputyFile.click()">파일업로드</button> <div class="attach" v-show="fileType === 2">
<p class="file" id="deputyNm"></p> <p class="essential list"><span>*</span>대리인 신분증 사본 인증</p>
</div> <input type="file" ref="deputyFile" style="display: none" @change="readDeputyFile"
<div class="attach"> accept=".jpg,.png,.pdf,.tiff"/>
<p class="essential list"><span>*</span>통신서비스 이용증명원</p> <button class="button btn-p2color" @click="$refs.deputyFile.click()">파일업로드</button>
<input type="file" ref="communicationFile" style="display: none" @change="readCommunicationFile" accept=".jpg,.png,.pdf,.tiff"/> <p class="file" id="deputyNm"></p>
<button class="button btn-p2color" @click="$refs.communicationFile.click()">파일업로드</button> </div>
<p class="file" id="communicationNm"></p> <div class="attach">
</div> <p class="essential list"><span>*</span>통신서비스 이용증명원</p>
<div class="attach"> <input type="file" ref="communicationFile" style="display: none" @change="readCommunicationFile"
<p class="essential list"><span>*</span>재직증명서</p> accept=".jpg,.png,.pdf,.tiff"/>
<input type="file" ref="tenureFile" style="display: none" @change="readTenureFile" accept=".jpg,.png,.pdf,.tiff"/> <button class="button btn-p2color" @click="$refs.communicationFile.click()">파일업로드</button>
<button class="button btn-p2color" @click="$refs.tenureFile.click()">파일업로드</button> <p class="file" id="communicationNm"></p>
<p class="file" id="tenureNm"></p> </div>
</div> <div class="attach">
<div class="attach" v-show="fileType === 2"> <p class="essential list"><span>*</span>재직증명서</p>
<p class="essential list"><span>*</span>사업자등록증</p> <input type="file" ref="tenureFile" style="display: none" @change="readTenureFile"
<input type="file" ref="otherBusinessFile" style="display: none" @change="readOtherBusinessFile" accept=".jpg,.png,.pdf,.tiff"/> accept=".jpg,.png,.pdf,.tiff"/>
<button class="button btn-p2color" @click="$refs.otherBusinessFile.click()">파일업로드</button> <button class="button btn-p2color" @click="$refs.tenureFile.click()">파일업로드</button>
<p class="file" id="otherBusinessNm"></p> <p class="file" id="tenureNm"></p>
</div> </div>
<p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p> <div class="attach" v-show="fileType === 2">
</td> <p class="essential list"><span>*</span>사업자등록증</p>
</tr> <input type="file" ref="otherBusinessFile" style="display: none" @change="readOtherBusinessFile"
<tr> accept=".jpg,.png,.pdf,.tiff"/>
<th>사업자 등록증</th> <button class="button btn-p2color" @click="$refs.otherBusinessFile.click()">파일업로드</button>
<td v-show="bizrAuthYn !== 'Y'"> <p class="file" id="otherBusinessNm"></p>
<div class="attach"> </div>
<p class="essential list"><span>*</span>사업자등록증</p> <p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p>
<input type="file" ref="businessFile" style="display: none" @change="readBusinessFile" accept=".jpg,.png,.pdf,.tiff"/> </td>
<button class="button btn-p2color" @click="$refs.businessFile.click()">파일업로드</button> </tr>
<p class="file" id="businessNm"></p> <tr>
</div> <th>사업자 등록증</th>
<p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p> <td v-show="bizrAuthYn !== 'Y'">
</td> <div class="attach">
<td class="red" v-show="bizrAuthYn === 'Y'">인증 완료</td> <p class="essential list"><span>*</span>사업자등록증</p>
</tr> <input type="file" ref="businessFile" style="display: none" @change="readBusinessFile"
</tbody> accept=".jpg,.png,.pdf,.tiff"/>
</table> <button class="button btn-p2color" @click="$refs.businessFile.click()">파일업로드</button>
<p class="file" id="businessNm"></p>
</div>
<p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p>
</td>
<td class="red" v-show="bizrAuthYn === 'Y'">인증 완료</td>
</tr>
</tbody>
</table>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="saveSendNum">저장</button> <button class="btn-pcolor" @click="saveSendNum">저장</button>
<button class="btn-default" @click="numberRegPopClose();">취소</button> <button class="btn-default" @click="numberRegPopClose();">취소</button>
@@ -116,65 +127,65 @@
<admin-list-pop ref="admnListPop" :send-data="childData" @event-data="setChildData"/> <admin-list-pop ref="admnListPop" :send-data="childData" @event-data="setChildData"/>
<common-modal ref="commmonModal2"></common-modal> <common-modal ref="commmonModal2"></common-modal>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import AdminListPop from "@/modules/sendNumMgt/components/AdminListPop"; import AdminListPop from "@/modules/sendNumMgt/components/AdminListPop";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi"; import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi";
export default { export default {
name: "numberRegPop", name: "numberRegPop",
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
watch:{ watch: {
nmineeDivCd(){ nmineeDivCd() {
console.log('watch : ', this.nmineeDivCd) console.log('watch : ', this.nmineeDivCd)
} }
}, },
data(){ data() {
return{ return {
row: {}, row: {},
adminId:'', adminId: '',
custNm:'', custNm: '',
bRegNo:'', bRegNo: '',
bizrAuthYn: '', bizrAuthYn: '',
custSeq: '', custSeq: '',
nmineeDivCd:'01', nmineeDivCd: '01',
sendNm: '', sendNm: '',
sendNum: '', sendNum: '',
numberInputs: [], numberInputs: [],
saveSendNums: [], saveSendNums: [],
fileType:1, fileType: 1,
trustFile: null, trustFile: null,
warrantFile: null, warrantFile: null,
deputyFile: null, deputyFile: null,
tenureFile: null, tenureFile: null,
businessFile: null, businessFile: null,
communicationFile: null, communicationFile: null,
otherBusinessFile:null, otherBusinessFile: null,
childData: 20, childData: 20,
reqCnt:0, reqCnt: 0,
} }
}, },
components: { components: {
AdminListPop, AdminListPop,
commonModal, commonModal,
}, },
model: { model: {
prop: 'sendData', prop: 'sendData',
event: 'event-data' event: 'event-data'
},
props: ['sendData'],
created(){
this.formReset();
}, },
methods :{ props: ['sendData'],
searchIdPop(){ created() {
this.formReset();
},
methods: {
searchIdPop() {
this.$refs.admnListPop.adminNmPopOpen(); this.$refs.admnListPop.adminNmPopOpen();
}, },
setChildData (data) { setChildData(data) {
console.log(data) console.log(data)
this.adminId = data.adminId this.adminId = data.adminId
this.custNm = data.custNm this.custNm = data.custNm
@@ -182,50 +193,50 @@ export default {
this.bizrAuthYn = data.bizrAuthYn this.bizrAuthYn = data.bizrAuthYn
this.custSeq = data.custSeq this.custSeq = data.custSeq
}, },
addNumberInput(){ addNumberInput() {
this.numberInputs.push({ this.numberInputs.push({
sendNm: '', sendNm: '',
sendNum: '' sendNum: ''
}) })
}, },
delNumberInput(index){ delNumberInput(index) {
this.numberInputs.splice(index,1) this.numberInputs.splice(index, 1)
}, },
changeNmineDiv(event){ changeNmineDiv(event) {
var data = event.target.value; var data = event.target.value;
console.log(data) console.log(data)
if(data === '01'){ if (data === '01') {
this.fileType = 1 this.fileType = 1
} }
if(data === '02'){ if (data === '02') {
this.fileType = 2 this.fileType = 2
} }
}, },
// 모달 띄우기 // 모달 띄우기
numberRegPopopen(){ numberRegPopopen() {
this.formReset(); this.formReset();
var dimmed = document.getElementsByClassName('dimmed'); var dimmed = document.getElementsByClassName('dimmed');
dimmed[0].style.display = 'block'; dimmed[0].style.display = 'block';
var wrap = document.getElementsByClassName('popup-wrap'); var wrap = document.getElementsByClassName('popup-wrap');
wrap[0].style.display = 'block'; wrap[0].style.display = 'block';
var obj = document.getElementsByClassName('modal52'); var obj = document.getElementsByClassName('modal52');
obj[0].style.display = 'block'; obj[0].style.display = 'block';
}, },
// 모달 끄기 // 모달 끄기
numberRegPopClose(){ numberRegPopClose() {
var dimmed = document.getElementsByClassName('dimmed'); var dimmed = document.getElementsByClassName('dimmed');
dimmed[0].style.display = 'none'; dimmed[0].style.display = 'none';
var wrap = document.getElementsByClassName('popup-wrap'); var wrap = document.getElementsByClassName('popup-wrap');
wrap[0].style.display = 'none'; wrap[0].style.display = 'none';
var popup = document.getElementsByClassName('modal52'); var popup = document.getElementsByClassName('modal52');
popup[0].style.display = 'none'; popup[0].style.display = 'none';
}, },
formReset(){ formReset() {
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
}, },
// 위임-수임 // 위임-수임
readTrustFile(event){ readTrustFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
console.log(file.name); console.log(file.name);
@@ -242,9 +253,9 @@ export default {
root.appendChild(button); root.appendChild(button);
this.trustFile = file; this.trustFile = file;
}, },
delTrustFile(event){ delTrustFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
this.$refs.trustFile.value=null; this.$refs.trustFile.value = null;
let element = document.getElementById("trustNm"); let element = document.getElementById("trustNm");
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
@@ -252,7 +263,7 @@ export default {
this.trustFile = null; this.trustFile = null;
}, },
// 위임장 // 위임장
readWarrantFile(event){ readWarrantFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
// inner Html. // inner Html.
@@ -268,9 +279,9 @@ export default {
root.appendChild(button); root.appendChild(button);
this.warrantFile = file; this.warrantFile = file;
}, },
delWarrantFile(event){ delWarrantFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
this.$refs.warrantFile.value=null; this.$refs.warrantFile.value = null;
let element = document.getElementById("warrantNm"); let element = document.getElementById("warrantNm");
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
@@ -278,7 +289,7 @@ export default {
this.warrantFile = null; this.warrantFile = null;
}, },
// 대리인 // 대리인
readDeputyFile(event){ readDeputyFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
// inner Html. // inner Html.
@@ -296,9 +307,9 @@ export default {
this.deputyFile = file this.deputyFile = file
}, },
delDeputyFile(event){ delDeputyFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
this.$refs.deputyFile.value=null; this.$refs.deputyFile.value = null;
let element = document.getElementById("deputyNm"); let element = document.getElementById("deputyNm");
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
@@ -306,7 +317,7 @@ export default {
this.deputyFile = null; this.deputyFile = null;
}, },
// 재직 // 재직
readTenureFile(event){ readTenureFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
// inner Html. // inner Html.
@@ -322,9 +333,9 @@ export default {
root.appendChild(button); root.appendChild(button);
this.tenureFile = file; this.tenureFile = file;
}, },
delTenureFile(event){ delTenureFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
this.$refs.tenureFile.value=null; this.$refs.tenureFile.value = null;
let element = document.getElementById("tenureNm"); let element = document.getElementById("tenureNm");
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
@@ -332,7 +343,7 @@ export default {
this.tenureFile = null; this.tenureFile = null;
}, },
//사업자 등록증. //사업자 등록증.
readBusinessFile(event){ readBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
// inner Html. // inner Html.
@@ -348,9 +359,9 @@ export default {
root.appendChild(button); root.appendChild(button);
this.businessFile = file; this.businessFile = file;
}, },
delBusinessFile(event){ delBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
this.$refs.businessFile.value=null; this.$refs.businessFile.value = null;
let element = document.getElementById("businessNm"); let element = document.getElementById("businessNm");
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
@@ -358,7 +369,7 @@ export default {
this.businessFile = null; this.businessFile = null;
}, },
//통신서비스 증명원 //통신서비스 증명원
readCommunicationFile(event){ readCommunicationFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
// inner Html. // inner Html.
@@ -374,9 +385,9 @@ export default {
root.appendChild(button); root.appendChild(button);
this.communicationFile = file; this.communicationFile = file;
}, },
delCommunicationFile(event){ delCommunicationFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
this.$refs.communicationFile.value=null; this.$refs.communicationFile.value = null;
let element = document.getElementById("communicationNm"); let element = document.getElementById("communicationNm");
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
@@ -384,7 +395,7 @@ export default {
this.communicationFile = null; this.communicationFile = null;
}, },
// 타사업자 등록증 // 타사업자 등록증
readOtherBusinessFile(event){ readOtherBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
// inner Html. // inner Html.
@@ -400,16 +411,16 @@ export default {
root.appendChild(button); root.appendChild(button);
this.otherBusinessFile = file; this.otherBusinessFile = file;
}, },
delOtherBusinessFile(event){ delOtherBusinessFile(event) {
const file = event.target.files[0]; const file = event.target.files[0];
this.$refs.otherBusinessFile.value=null; this.$refs.otherBusinessFile.value = null;
let element = document.getElementById("otherBusinessNm"); let element = document.getElementById("otherBusinessNm");
while (element.firstChild) { while (element.firstChild) {
element.removeChild(element.firstChild); element.removeChild(element.firstChild);
} }
this.otherBusinessFile = null; this.otherBusinessFile = null;
}, },
async saveSendNum(){ async saveSendNum() {
this.saveSendNums = [] this.saveSendNums = []
@@ -418,7 +429,7 @@ export default {
sendNum: this.sendNum sendNum: this.sendNum
}) })
if(this.numberInputs.length > 0){ if (this.numberInputs.length > 0) {
this.numberInputs.forEach(element => this.numberInputs.forEach(element =>
this.saveSendNums.push({ this.saveSendNums.push({
sendNm: element.sendNm, sendNm: element.sendNm,
@@ -429,9 +440,9 @@ export default {
this.doValidate(); this.doValidate();
// console.log(this.custSeq) // console.log(this.custSeq)
console.log(this.$data) console.log(this.$data)
if(this.bizrAuthYn !== 'Y'){ if (this.bizrAuthYn !== 'Y') {
if(this.nmineeDivCd === '01'){ if (this.nmineeDivCd === '01') {
// 사업자 // 사업자
const response = await sendNumMgtApi.insertNumber1(this.tenureFile, this.businessFile, this.communicationFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq) const response = await sendNumMgtApi.insertNumber1(this.tenureFile, this.businessFile, this.communicationFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq)
const result = response.data; const result = response.data;
console.log(result) console.log(result)
@@ -439,7 +450,7 @@ export default {
this.toComplete() this.toComplete()
} }
}else if(this.nmineeDivCd === '02'){ } else if (this.nmineeDivCd === '02') {
const response = await sendNumMgtApi.insertNumber2(this.trustFile, this.warrantFile, this.deputyFile, this.tenureFile, this.otherBusinessFile, this.businessFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq) const response = await sendNumMgtApi.insertNumber2(this.trustFile, this.warrantFile, this.deputyFile, this.tenureFile, this.otherBusinessFile, this.businessFile, this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq)
const result = response.data; const result = response.data;
console.log(result) console.log(result)
@@ -448,7 +459,7 @@ export default {
} }
} }
}else{ } else {
const response = await sendNumMgtApi.insertNumber(this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq) const response = await sendNumMgtApi.insertNumber(this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq)
const result = response.data; const result = response.data;
console.log(result) console.log(result)
@@ -457,17 +468,17 @@ export default {
} }
} }
}, },
doValidate(){ doValidate() {
if(this.isNull(this.adminId) || this.isNull(this.custNm) || this.isNull(this.bRegNo)){ if (this.isNull(this.adminId) || this.isNull(this.custNm) || this.isNull(this.bRegNo)) {
this.row.title = '발신번호 등록'; this.row.title = '발신번호 등록';
this.row.msg1 = '관리자ID를 조회 해주세요.'; this.row.msg1 = '관리자ID를 조회 해주세요.';
this.getParent('NumberList').commonModalOpen(this.row) this.getParent('NumberList').commonModalOpen(this.row)
// this.$refs.commmonModal2.alertModalOpen(this.row); // this.$refs.commmonModal2.alertModalOpen(this.row);
return false; return false;
} }
if(this.isNull(this.sendNm) || this.isNull(this.sendNum)){ if (this.isNull(this.sendNm) || this.isNull(this.sendNum)) {
this.row.title = '발신번호 등록'; this.row.title = '발신번호 등록';
this.row.msg1 = '발신번호명/발신번호를 입력해 주세요.'; this.row.msg1 = '발신번호명/발신번호를 입력해 주세요.';
this.$refs.commmonModal2.alertModalOpen(this.row); this.$refs.commmonModal2.alertModalOpen(this.row);
@@ -480,7 +491,7 @@ export default {
// return false; // return false;
// } // }
}, },
toComplete(){ toComplete() {
this.getParent('numberList').$refs.table.reloadData(); this.getParent('numberList').$refs.table.reloadData();
this.numberRegPopClose(); this.numberRegPopClose();
}, },

View File

@@ -0,0 +1,183 @@
<template>
<!-- <div class="wrap bg-wrap"> -->
<div>
<div class="dimmed alertCommon" @click="alertModalCancel();"></div>
<div class="popup-wrap alertCommon">
<!-- 로그인실패: 확인 -->
<div class="popup alertCommon">
<div class="pop-head">
<h3 class="pop-tit">{{title}}</h3>
</div>
<div class="pop-cont">
<p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="popup-btn1">
<button class="btn-pcolor" @click="alertModalClose();">확인</button>
</div>
</div>
</div>
<div class="dimmed confirm" @click="confirmModalCancel();"></div>
<div class="popup-wrap confirm">
<!-- 수정 확인 -->
<div class="popup confirm">
<div class="pop-head">
<h3 class="pop-tit">{{title}}</h3>
</div>
<div class="pop-cont">
<p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button>
</div>
</div>
</div>
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
<div class="popup-wrap confirm2">
<!-- 수정 확인 -->
<div class="popup confirm2">
<div class="pop-head">
<h3 class="popup-tit">{{title}}</h3>
</div>
<div class="pop-cont">
<p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p>
</div>
<div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
<button class="btn-default" @click="confirmModalCancel2();">취소</button>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "confirm",
data(){
return{
row:{},
title:'',
msg1: '',
msg2: '',
msg3: '',
msg4: '',
}
},
methods :{
alertModalOpen(props){
console.log("@@@@@@@@@@")
console.log(props)
var dimmed = document.getElementsByClassName('alertCommon');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
alertModalClose(){
var dimmed = document.getElementsByClassName('alertCommon');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
alertModalCancel(){
var dimmed = document.getElementsByClassName('alertCommon');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
},
// 모달 오픈
confirmModalOpen(props){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
confirmModalOpen2(props){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'block';
}
this.title = props.title;
this.msg1 = props.msg1;
this.msg2 = props.msg2;
this.msg3 = props.msg3;
this.msg4 = props.msg4;
},
// 모달 끄기(ok)
confirmModalClose(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(ok)
confirmModalClose2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel(){
var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = false;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
}
}
</script>
<style>
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
.popup-btn-wrap button:hover {background: #000; color: #fff;}
</style>

View File

@@ -6,38 +6,38 @@
<h3 class="title">발신번호 승인</h3> <h3 class="title">발신번호 승인</h3>
<p class="breadcrumb">발신번호관리 &gt; 발신번호 승인</p> <p class="breadcrumb">발신번호관리 &gt; 발신번호 승인</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="group">
<div class="group"> <div class="select_box">
<div class="select_box"> <label for="right" class="label">상태</label>
<label for="right" class="label">상태</label> <select name="" id="" v-model="searchType1" @keyup.enter="search">
<select name="" id="" v-model="searchType1" @keyup.enter="search"> <option value="">전체</option>
<option value="">전체</option> <option value="01">승인대기</option>
<option value="01">승인대기</option> <option value="02">처리완료</option>
<option value="02">처리완료</option> </select>
</select>
</div>
<div class="input_box">
<label for="right" class="label">사업자번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1" @keyup.enter="search"/>
</div>
<div class="select_box id">
<label for="right" class="label">명의자 구분</label>
<select name="" id="" v-model="searchType2" @keyup.enter="search">
<option value="">전체</option>
<option value="01">사업자</option>
<option value="02">타사업자</option>
</select>
</div>
<div class="input_box">
<label for="right" class="label">고객사명</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText2" @keyup.enter="search"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div> </div>
<div class="input_box">
<label for="right" class="label">사업자번호</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1"
@keypress="onlyNum" @input="onlyNum" maxlength="10" @keyup.enter="search"/>
</div>
<div class="select_box id">
<label for="right" class="label">명의자 구분</label>
<select name="" id="" v-model="searchType2" @keyup.enter="search">
<option value="">전체</option>
<option value="01">사업자</option>
<option value="02">타사업자</option>
</select>
</div>
<div class="input_box">
<label for="right" class="label">고객사명</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력"
v-model.trim="grid.params.searchText2"
@keyup.enter="search" maxlength="100"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</form> </div>
<div class="info"> <div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe"> <div class="select_box NumberSe">
@@ -65,7 +65,7 @@
></custom-grid> ></custom-grid>
</div> </div>
<appr-detail-pop ref="apprDetailPop" /> <appr-detail-pop ref="apprDetailPop"/>
</div> </div>
</div> </div>
@@ -74,26 +74,7 @@
<script> <script>
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import ApprDetailPop from "@/modules/sendNumMgt/components/ApprDetailPop"; import ApprDetailPop from "@/modules/sendNumMgt/components/ApprDetailPop";
import {utils_mixin, chkPattern2} from '../service/mixins';
class customBRegNo {
constructor(props) {
this.props = props;
const el = document.createElement('td');
var bizrno = String(props.colValue);
el.innerText= bizrno;
if(bizrno.length == 10){
el.innerText= bizrno.substring(0,3)+'-'+bizrno.substring(3,5)+'-'+bizrno.substring(5,10)
}
this.el = el;
}
getElement() {
return this.el;
}
addEvent(selEl) {
}
}
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
@@ -101,7 +82,7 @@ class CustomATagRenderer {
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
@@ -111,7 +92,7 @@ class CustomATagRenderer {
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
@@ -119,6 +100,7 @@ class CustomATagRenderer {
export default { export default {
name: 'apprList', name: 'apprList',
mixins: [utils_mixin, chkPattern2],
data() { data() {
return { return {
row: {}, row: {},
@@ -128,8 +110,8 @@ export default {
totalItems: 0, totalItems: 0,
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
searchType1:'', searchType1: '',
searchType2:'', searchType2: '',
grid: { grid: {
url: '/api/v1/bo/sendNumMgt/apprList', url: '/api/v1/bo/sendNumMgt/apprList',
perPage: 50, perPage: 50,
@@ -138,26 +120,27 @@ export default {
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: 'regReqNo', hidden: true }, {name: 'regReqNo', hidden: true},
{ name: 'regDt', header: '요청일', align: 'center', width: '12%' }, {name: 'regDt', header: '요청일', align: 'center', width: '12%'},
{ name: 'adminId', header: '관리자ID', align: 'center', width: '10%'}, {name: 'adminId', header: '관리자ID', align: 'center', width: '10%'},
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '13%', renderer: {type: customBRegNo}}, {name: 'bizrno', header: '사업자번호', align: 'center', width: '13%'},
{ name: 'nmineeDivCd', header: '명의자 구분', align: 'center', width: '10%'}, {name: 'nmineeDivCd', header: '명의자 구분', align: 'center', width: '10%'},
{ name: 'custNm', header: '고객사명', align: 'center', width: '10%'}, {name: 'custNm', header: '고객사명', align: 'center', width: '10%'},
{ name: 'reqCnt', header: '요청건수', align: 'center', width: '6%', renderer: { {
name: 'reqCnt', header: '요청건수', align: 'center', width: '6%', renderer: {
type: CustomATagRenderer type: CustomATagRenderer
,options: { , options: {
callback: this.apprDetail, callback: this.apprDetail,
} }
} }
}, },
{ name: 'apvCnt', header: '승인건수', align: 'center', width: '6%'}, {name: 'apvCnt', header: '승인건수', align: 'center', width: '6%'},
{ name: 'rejtCnt', header: '반려건수', align: 'center', width: '6%'}, {name: 'rejtCnt', header: '반려건수', align: 'center', width: '6%'},
{ name: 'reqSttusCd', header: '상태', align: 'center', width: '10%'}, {name: 'reqSttusCd', header: '상태', align: 'center', width: '10%'},
{ name: 'cmpltDt', header: '완료일', width: '12%' } {name: 'cmpltDt', header: '완료일', width: '12%'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
@@ -165,14 +148,14 @@ export default {
searchText2: '', searchText2: '',
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
ApprDetailPop ApprDetailPop
}, },
created(){ created() {
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -191,7 +174,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false; let isKeep = false;
if(getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
@@ -200,7 +183,7 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2
@@ -208,7 +191,7 @@ export default {
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -224,7 +207,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
//console.log("getCondition : "+ getCondition.perPage); //console.log("getCondition : "+ getCondition.perPage);
}, },
apprDetail(props){ apprDetail(props) {
console.log(props) console.log(props)
this.$refs.apprDetailPop.apprDetailPopOpen(props) this.$refs.apprDetailPop.apprDetailPopOpen(props)
} }

View File

@@ -1,99 +1,99 @@
<template> <template>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">문자 발신 번호 목록 조회</h3>
<p class="breadcrumb">발신번호관리 &gt; 문자 발신 번호 목록 조회</p>
</div>
<form autocomplete="off" class="search_form">
<div class="search_wrap">
<div class="group">
<div class="select_box">
<label for="right" class="label">등록방법</label>
<select name="" id="sttusCd" v-model="searchType5" @keyup.enter="search">
<option value="">전체</option>
<option value="01">서류심사</option>
<option value="02">본인인증</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">승인상태</label>
<select name="" id="sttusCd" v-model="searchType1" @keyup.enter="search">
<option value="">전체</option>
<option value="01">승인대기</option>
<option value="02">승인완료</option>
<option value="03">반려</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">명의자 구분</label>
<select name="" id="nmineeDivCd" v-model="searchType2" @keyup.enter="search">
<option value="">전체</option>
<option value="01">사업자</option>
<option value="02">타사업자</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">인입채널</label>
<select name="" id="inchDivCd" v-model="searchType3" @keyup.enter="search">
<option value="">전체</option>
<option value="01">홈페이지</option>
<option value="02">어드민</option>
</select>
</div>
<div class="select_box id">
<label for="right" class="label">상세검색</label>
<select name="" id="category" v-model="searchType4" @keyup.enter="search">
<option value="regNo">발신번호</option>
<option value="bregNo">사업자번호</option>
<option value="custNm">고객사명</option>
</select>
</div>
<div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1" v-on:keydown.enter.prevent="search"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
</form>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="perPage" v-model="perPageCnt" @keyup.enter="search">
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
</div>
</div>
<div class="button_group">
<button type="button" class="button blue add" @click="numberRegPopOpen();">등록</button>
<button type="button" class="button white del" @click="deleteNumber()">삭제</button>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<number-reg-pop ref="numberRegPop"> </number-reg-pop>
<number-detail-pop ref="numberDetailPop"/>
<common-modal ref="commmonModal"></common-modal>
<div class="contents">
<div class="contents_wrap">
<div class="top_wrap">
<h3 class="title">문자 발신 번호 목록 조회</h3>
<p class="breadcrumb">발신번호관리 &gt; 문자 발신 번호 목록 조회</p>
</div> </div>
</div> <div class="search_wrap">
<div class="group">
<div class="select_box">
<label for="right" class="label">등록방법</label>
<select name="" id="sttusCd" v-model="searchType5" @keyup.enter="search">
<option value="">전체</option>
<option value="01">서류심사</option>
<option value="02">본인인증</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">승인상태</label>
<select name="" id="sttusCd" v-model="searchType1" @keyup.enter="search">
<option value="">전체</option>
<option value="01">승인대기</option>
<option value="02">승인완료</option>
<option value="03">반려</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">명의자 구분</label>
<select name="" id="nmineeDivCd" v-model="searchType2" @keyup.enter="search">
<option value="">전체</option>
<option value="01">사업자</option>
<option value="02">타사업자</option>
</select>
</div>
<div class="select_box">
<label for="right" class="label">인입채널</label>
<select name="" id="inchDivCd" v-model="searchType3" @keyup.enter="search">
<option value="">전체</option>
<option value="01">홈페이지</option>
<option value="02">어드민</option>
</select>
</div>
<div class="select_box id">
<label for="right" class="label">상세검색</label>
<select name="" id="category" v-model="searchType4" @keyup.enter="search">
<option value="regNo">발신번호</option>
<option value="bregNo">사업자번호</option>
<option value="custNm">고객사명</option>
</select>
</div>
<div class="input_box">
<input class="search-box" type="text" id="search" placeholder="검색어 입력"
v-model.trim="grid.params.searchText1"
maxlength="100" @keyup.enter="search"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</div>
<div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="select_box NumberSe">
<select name="" id="perPage" v-model="perPageCnt" @keyup.enter="search">
<option value="20">20</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
</div>
</div>
<div class="button_group">
<button type="button" class="button blue add" @click="numberRegPopOpen();">등록</button>
<button type="button" class="button white del" @click="deleteNumber()">삭제</button>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<number-reg-pop ref="numberRegPop"></number-reg-pop>
<number-detail-pop ref="numberDetailPop"/>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template> </template>
<script> <script>
@@ -111,7 +111,7 @@ class CustomATagRenderer {
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
@@ -121,7 +121,7 @@ class CustomATagRenderer {
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
@@ -131,16 +131,16 @@ export default {
name: 'numberList', name: 'numberList',
data() { data() {
return { return {
row: {}, row: {},
authType: [], authType: [],
statType: [], statType: [],
cate2Code: "", cate2Code: "",
totalItems: 0, totalItems: 0,
searchType5:'', searchType5: '',
searchType4:'regNo', searchType4: 'regNo',
searchType3:'', searchType3: '',
searchType2:'', searchType2: '',
searchType1:'', searchType1: '',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
@@ -153,94 +153,96 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '관리자ID', childNames: [] }, {header: '관리자ID', childNames: []},
{ header: '등록자ID', childNames: [] }, {header: '등록자ID', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '명의자 구분', childNames: [] }, {header: '명의자 구분', childNames: []},
{ header: '인입채널', childNames: [] }, {header: '인입채널', childNames: []},
{ header: '발신번호', childNames: [] }, {header: '발신번호', childNames: []},
{ header: '승인상태', childNames: [] }, {header: '승인상태', childNames: []},
{ header: '등록일자', childNames: [] } {header: '등록일자', childNames: []}
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: 'regReqNo', hidden: true}, {name: 'regReqNo', hidden: true},
{ name: 'bizrAuthYn', hidden: true}, {name: 'bizrAuthYn', hidden: true},
{ name: 'custNm', header: '고객사명', align: 'center', width: '5%' }, {name: 'custNm', header: '고객사명', align: 'center', width: '5%'},
{ name: 'adminId', header: '관리자ID', align: 'center', width: '10%' }, {name: 'adminId', header: '관리자ID', align: 'center', width: '10%'},
{ name: 'register', header: '등록자ID', align: 'center', width: '10%' }, {name: 'register', header: '등록자ID', align: 'center', width: '10%'},
{ name: 'bregNo', header: '사업자번호', align: 'center', width: '10%'}, {name: 'bregNo', header: '사업자번호', align: 'center', width: '10%'},
{ name: 'nmineeDivCd', header: '명의자 구분', align: 'center', width: '10%'}, {name: 'nmineeDivCd', header: '명의자 구분', align: 'center', width: '10%'},
{ name: 'inchDivCd', header: '인입채널', align: 'center', width: '10%'}, {name: 'inchDivCd', header: '인입채널', align: 'center', width: '10%'},
{ name: 'sndrno', header: '발신번호', align: 'center', width: '10%', renderer: { {
name: 'sndrno', header: '발신번호', align: 'center', width: '10%', renderer: {
type: CustomATagRenderer type: CustomATagRenderer
,options: { , options: {
callback: this.numberDetail, callback: this.numberDetail,
} }
} }
}, },
{ name: 'sttusCd', header: '승인상태', align: 'center', width: '10%'}, {name: 'sttusCd', header: '승인상태', align: 'center', width: '10%'},
{ name: 'regDt', header: '등록일자', width: '10%', cls: 'td_line' } {name: 'regDt', header: '등록일자', width: '10%', cls: 'td_line'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchType3: '', searchType3: '',
searchType4: '', searchType4: '',
searchType5: '', searchType5: '',
searchText1: '', searchText1: '',
pagePerRows: '', pagePerRows: '',
page: '' page: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
NumberRegPop, NumberRegPop,
NumberDetailPop, NumberDetailPop,
commonModal, commonModal,
}, },
created(){ created() {
// const getCondition = this.$store.getters['searchcondition/getSearchCondition']; // const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: 1, page: 1,
perPage: 50, perPage: 50,
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchType3: '', searchType3: '',
searchType4: '', searchType4: '',
searchText1: '', searchText1: '',
pagePerRows: '', pagePerRows: '',
page: ''} page: ''
}); }
});
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2
@@ -251,94 +253,94 @@ export default {
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
numberRegPopOpen: function(){ numberRegPopOpen: function () {
this.$refs.numberRegPop.numberRegPopopen(); this.$refs.numberRegPop.numberRegPopopen();
}, },
numberDetail(props){ numberDetail(props) {
console.log(props) console.log(props)
this.$refs.numberDetailPop.numberDetailPopOpen(props); this.$refs.numberDetailPop.numberDetailPopOpen(props);
}, },
commonModalOpen(row){ commonModalOpen(row) {
this.$refs.commmonModal.alertModalOpen(row); this.$refs.commmonModal.alertModalOpen(row);
}, },
deleteNumber(){ deleteNumber() {
if(this.doValidate()){ if (this.doValidate()) {
this.row.title ='문자발신번호 관리'; this.row.title = '문자발신번호 관리';
this.row.msg1 ='삭제 하시겠습니까?' this.row.msg1 = '삭제 하시겠습니까?'
this.$refs.commmonModal.confirmModalOpen2(this.row); this.$refs.commmonModal.confirmModalOpen2(this.row);
} }
}, },
async numberDelete(){ async numberDelete() {
try { try {
let response = await sendNumMgtApi.deleteNumber(this.row); let response = await sendNumMgtApi.deleteNumber(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.$refs.table.reloadData(); this.$refs.table.reloadData();
return; return;
} else { } else {
this.row.title = '문자발신번호 관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
} catch(err) {
this.row.title = '문자발신번호 관리'; this.row.title = '문자발신번호 관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
} catch (err) {
this.row.title = '문자발신번호 관리';
this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row);
}
}, },
doValidate(){ //로우데이터 삭제하도록 수정 doValidate() { //로우데이터 삭제하도록 수정
console.log("totalItems >> " + this.totalItems); console.log("totalItems >> " + this.totalItems);
if(this.totalItems == 0){ if (this.totalItems == 0) {
this.row.title = '문자발신번호 관리'; this.row.title = '문자발신번호 관리';
this.row.msg1 = '검색 결과가 없습니다.'; this.row.msg1 = '검색 결과가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
var chkList = this.$refs.table.checkedElementDatas(); var chkList = this.$refs.table.checkedElementDatas();
if(chkList.length == 0){ if (chkList.length == 0) {
this.row.title = '문자발신번호 관리'; this.row.title = '문자발신번호 관리';
this.row.msg1 = '삭제대상을 체크를 해주세요.'; this.row.msg1 = '삭제대상을 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
//const param = chkList.map((row)=>({regReqNo:row.regReqNo} )); //const param = chkList.map((row)=>({regReqNo:row.regReqNo} ));
const param = chkList.map((row)=>({seqNo:row.seqNo} )); const param = chkList.map((row) => ({seqNo: row.seqNo}));
console.log(param) console.log(param)
this.row.list = param; this.row.list = param;
console.log(this.row); console.log(this.row);
return true; return true;
}, },
confirmCalbackFnc(props){ confirmCalbackFnc(props) {
console.log(props) console.log(props)
if(props.result){ if (props.result) {
this.numberDelete(); this.numberDelete();
} }
}, },
}, },
// beforeRouteLeave(to, from, next) { // beforeRouteLeave(to, from, next) {
// //
// const getP = this.$refs.table.getPagination(); // const getP = this.$refs.table.getPagination();
// console.log("==========getP : " + getP._currentPage); // console.log("==========getP : " + getP._currentPage);
// this.$store.commit('searchcondition/updateSearchCondition', { // this.$store.commit('searchcondition/updateSearchCondition', {
// page: getP._currentPage, // page: getP._currentPage,
// perPage: this.perPageCnt, // perPage: this.perPageCnt,
// params: this.grid.params // params: this.grid.params
// }); // });
// // 라우트 하기전 실행 // // 라우트 하기전 실행
// next(); // next();
// } // }
}; };
</script> </script>

View File

@@ -1,101 +1,83 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">발신프로필관리</h3> <h3 class="title">발신프로필관리</h3>
<p class="breadcrumb">발신번호관리 &gt; 발신프로필관리</p> <p class="breadcrumb">발신번호관리 &gt; 발신프로필관리</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="select_box">
<div class="select_box"> <label for="stat" class="label">상태</label>
<label for="stat" class="label">상태</label> <select name="" id="stat" v-model="searchType1" @keyup="search">
<select name="" id="stat" v-model="searchType1" @keyup="search"> <option value="">전체</option>
<option value="">전체</option> <option value="A">사용</option>
<option value="A">사용</option> <option value="N">사용</option>
<option value="N">미사용</option> <option value="H">휴면</option>
<option value="H">휴면</option> <option value="D">삭제</option>
<option value="D">삭제</option> </select>
</select>
</div>
<div class="select_box id">
<label for="searchType" class="label">상세검색</label>
<select name="" id="searchType" v-model="searchType2" @keyup="search">
<option value="custNm">고객사명</option>
<option value="bregNo">사업자번호</option>
<option value="sendProfile">발신프로필</option>
</select>
</div>
<div class="input_box id">
<label for="search" class="label">검색어</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText1" v-on:keydown.enter.prevent="search" />
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
</form>
<div class="info">
<div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}} </span>
<div class="select_box NumberSe">
<select name="" id="perpage" v-model="grid.pagePerRows" @keyup.enter="search">
<option value="20">20</option>
<option value="50" selected>50</option>
<option value="100">100</option>
</select>
</div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.pagination"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder">
</custom-grid>
</div>
</div> </div>
</div> <div class="select_box id">
<label for="searchType" class="label">상세검색</label>
<select name="" id="searchType" v-model="searchType2" @keyup="search">
<option value="custNm">고객사명</option>
<option value="bregNo">사업자번호</option>
<option value="sendProfile">발신프로필</option>
</select>
</div>
<div class="input_box id">
<label for="search" class="label">검색어</label>
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
maxlength="100" @keyup="search"/>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
<div class="info">
<div class="count"> <span> {{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }} </span>
<div class="select_box NumberSe">
<select name="" id="perpage" v-model="grid.pagePerRows" @keyup.enter="search">
<option value="20">20</option>
<option value="50" selected>50</option>
<option value="100">100</option>
</select>
</div>
</div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.pagination"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder">
</custom-grid>
</div>
</div>
</div>
</template> </template>
<script> <script>
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
//import api from '../service/api'; //import api from '../service/api';
class customBRegNo {
constructor(props) {
this.props = props;
const el = document.createElement('td');
var bregNo = String(props.colValue);
el.innerText= bregNo;
if(bregNo.length == 10){
el.innerText= bregNo.substring(0,3)+'-'+bregNo.substring(3,5)+'-'+bregNo.substring(5,10)
}
this.el = el;
}
getElement() {
return this.el;
}
addEvent(selEl) {
}
}
export default { export default {
name: 'profileList', name: 'profileList',
data() { data() {
return { return {
row: {}, row: {},
authType: [], authType: [],
statType: [], statType: [],
cate2Code: "", cate2Code: "",
totalItems: 0, totalItems: 0,
searchType1:'', searchType1: '',
searchType2:'custNm', searchType2: 'custNm',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 20, perPageCnt: 20,
grid: { grid: {
@@ -107,50 +89,50 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '발신프로필', childNames: [] }, {header: '발신프로필', childNames: []},
{ header: '발신프로필key', childNames: [] }, {header: '발신프로필key', childNames: []},
{ header: '상태', childNames: [] }, {header: '상태', childNames: []},
{ header: '등록일', childNames: [] }, {header: '등록일', childNames: []},
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: 50 }, {name: 'no', header: 'NO', align: 'center', width: 50},
{ name: 'custNm', header: '고객사명', align: 'center', width: 200 }, {name: 'custNm', header: '고객사명', align: 'center', width: 200},
{ name: 'bregNo', header: '사업자번호', align: 'center', width: 100, renderer: {type: customBRegNo}}, {name: 'bregNo', header: '사업자번호', align: 'center', width: 100},
{ name: 'sendProfile', header: '발신프로필', align: 'center', width: 100}, {name: 'sendProfile', header: '발신프로필', align: 'center', width: 100},
{ name: 'sendProfileKey', header: '발신프로필key', align: 'center', width: 100}, {name: 'sendProfileKey', header: '발신프로필key', align: 'center', width: 100},
{ name: 'stat', header: '상태', width: 100, cls: 'td_line' }, {name: 'stat', header: '상태', width: 100, cls: 'td_line'},
{ name: 'regDt', header: '등록일', align: 'center', width: 150}, {name: 'regDt', header: '등록일', align: 'center', width: 150},
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: 'custNm', searchType2: 'custNm',
searchText1: '' searchText1: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
},
destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
page: 1,
perPage: 50,
params: {
searchType1: '',
searchType2: '',
searchText1: ''
}
});
}, },
created(){ destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', {
page: 1,
perPage: 50,
params: {
searchType1: '',
searchType2: '',
searchText1: ''
}
});
},
created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
@@ -159,7 +141,7 @@ export default {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
let isKeep = false; let isKeep = false;
if(getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
@@ -168,42 +150,42 @@ export default {
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchText1: '' searchText1: ''
} }
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
//console.log("getCondition : "+ getCondition.perPage); //console.log("getCondition : "+ getCondition.perPage);
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -1,66 +1,68 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">080수신거부 인증코드 조회</h3> <h3 class="title">080수신거부 인증코드 조회</h3>
<p class="breadcrumb">서비스관리 &gt; 080수신거부 인증코드 조회</p> <p class="breadcrumb">서비스관리 &gt; 080수신거부 인증코드 조회</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="select_box">
<div class="select_box"> <label for="stat" class="label">사용상태</label>
<label for="stat" class="label">사용상태</label> <select name="" id="stat" v-model="searchType1" @keyup.enter="search">
<select name="" id="stat" v-model="searchType1" @keyup.enter="search"> <option value="">전체</option>
<option value="">전체</option> <option value="Y">사용</option>
<option value="Y">사용</option> <option value="N">폐기</option>
<option value="N">폐기</option> </select>
</select> </div>
</div> <div class="select_box">
<div class="select_box"> <label for="searchType" class="label">고객사명</label>
<label for="searchType" class="label">고객사명</label> <select name="" id="searchType" v-model="searchType2" @keyup.enter="search">
<select name="" id="searchType" v-model="searchType2" @keyup.enter="search"> <option value="custNm">고객사명</option>
<option value="custNm">고객사명</option> <option value="bizNo">사업자번호</option>
<option value="bizNo">사업자번호</option> <option value="authCd">인증코드</option>
<option value="authCd">인증코드</option> </select>
</select> </div>
</div> <div class="input_box id">
<div class="input_box id"> <label for="search" class="label">검색어</label>
<label for="search" class="label">검색어</label> <input type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" v-on:keydown.enter.prevent="search"/> @keyup.enter="search" maxlength="100"/>
</div> </div>
<button type="button" class="button grey" @click="search">조회</button> <button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</form> <div class="info">
<div class="info"> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span>
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span> <div class="select_box NumberSe">
<div class="select_box NumberSe"> <select name="" id="" v-model="perPageCnt" @change="changePerPage()">
<select name="" id="" v-model="perPageCnt" @change="changePerPage()"> <option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{
<option v-for="option in options" v-bind:value="option.value" v-bind:key="option.value">{{ option.text }}</option> option.text
</select> }}
</div> </option>
</select>
</div> </div>
</div>
<div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal> </div>
</div> </div>
</div> <div class="table">
<custom-grid
ref="table"
:totalItems="'totalItems'"
:url="grid.url"
:pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest"
:pagination="grid.pagination"
:isCheckbox="grid.isCheckbox"
:columns="grid.columns"
:noDataStr="grid.noDataStr"
:addCls="grid.addCls"
:header="grid.headder"
></custom-grid>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template> </template>
<script> <script>
@@ -68,44 +70,23 @@ import customGrid from '@/components/CustomGrid';
//import api from '../service/api'; //import api from '../service/api';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
class customBRegNo {
constructor(props) {
this.props = props;
const el = document.createElement('td');
var bregNo = String(props.colValue);
el.innerText= bregNo;
if(bregNo.length == 10){
el.innerText= bregNo.substring(0,3)+'-'+bregNo.substring(3,5)+'-'+bregNo.substring(5,10)
}
this.el = el;
}
getElement() {
return this.el;
}
addEvent(selEl) {
}
}
export default { export default {
name: 'rejectRecvList', name: 'rejectRecvList',
data() { data() {
return { return {
row: {}, row: {},
authType: [], authType: [],
statType: [], statType: [],
cate2Code: "", cate2Code: "",
totalItems: 0, totalItems: 0,
searchType1:'', searchType1: '',
searchType2:'custNm', searchType2: 'custNm',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
grid: { grid: {
url: '/api/v1/bo/servMgt/rejectRecvList', url: '/api/v1/bo/servMgt/rejectRecvList',
@@ -116,111 +97,112 @@ export default {
addCls: 'box_OFvis', addCls: 'box_OFvis',
header: [ header: [
[ [
{ header: 'NO', childNames: [] }, {header: 'NO', childNames: []},
{ header: '고객사명(이름)', childNames: [] }, {header: '고객사명(이름)', childNames: []},
{ header: '사업자번호(생년월일)', childNames: [] }, {header: '사업자번호(생년월일)', childNames: []},
{ header: '관리자ID', childNames: [] }, {header: '관리자ID', childNames: []},
{ header: '인증코드', childNames: [] }, {header: '인증코드', childNames: []},
{ header: '사용여부', childNames: [] }, {header: '사용여부', childNames: []},
{ header: '등록일', childNames: [] }, {header: '등록일', childNames: []},
{ header: '최종수정일', childNames: [] } {header: '최종수정일', childNames: []}
] ]
], ],
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '5%' }, {name: 'no', header: 'NO', align: 'center', width: '5%'},
{ name: 'custNm', header: '고객사명', align: 'center', width: '15%' }, {name: 'custNm', header: '고객사명', align: 'center', width: '15%'},
{ name: 'bregNo', header: '사업자번호', align: 'center', width: '10%', renderer: {type: customBRegNo}}, {name: 'bregNo', header: '사업자번호', align: 'center', width: '10%'},
{ name: 'userId', header: '관리자ID', align: 'center', width: '15%'}, {name: 'userId', header: '관리자ID', align: 'center', width: '15%'},
{ name: 'authcd080', header: '인증코드', align: 'center', width: '10%'}, {name: 'authcd080', header: '인증코드', align: 'center', width: '10%'},
{ name: 'useYN', header: '사용여부', align: 'center', width: '10%', cls: 'td_line' }, {name: 'useYN', header: '사용여부', align: 'center', width: '10%', cls: 'td_line'},
{ name: 'regDt', header: '등록일', align: 'center', width: '15%'}, {name: 'regDt', header: '등록일', align: 'center', width: '15%'},
{ name: 'chgDt', header: '마지막 수정일', align: 'center', width: '15%', cls: 'td_line' } {name: 'chgDt', header: '마지막 수정일', align: 'center', width: '15%', cls: 'td_line'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: 'custNm', searchType2: 'custNm',
searchText1: '' searchText1: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
commonModal commonModal
}, },
created(){ created() {
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
}, },
destroyed() { destroyed() {
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: 1, page: 1,
perPage: 50, perPage: 50,
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchText1: ''} searchText1: ''
}); }
});
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log(this.grid.params); console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchText1: '' searchText1: ''
} }
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
//console.log("getCondition : "+ getCondition.perPage); //console.log("getCondition : "+ getCondition.perPage);
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -0,0 +1,358 @@
import lodash from "lodash";
const utils_mixin = {
methods: {
/** * 이메일 형식 체크 * * @param 데이터 */
emailCheck(email, rtnArrYn) {
if (this.isNull(rtnArrYn)) {
rtnArrYn = 'N';
}
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
if (regExp.test(email) == false) {
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
if (rtnArrYn == 'Y') {
return email;
}
return false;
} else {
var myArray = regExp.exec(email);
if (rtnArrYn == 'Y') {
return myArray;
}
return true;
}
},
/** * 전화번호 포맷으로 변환 * * @param 데이터 */
formatPhone(phoneNum, fmt, rtnArrYn) {
if (this.isNull(fmt)) {
fmt = '';
}
if (this.isNull(rtnArrYn)) {
fmt = 'N';
}
if (this.isPhone(phoneNum)) {
var rtnNum;
var regExp = /(02)([0-9]{3,4})([0-9]{4})$/;
var myArray;
if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if (rtnArrYn == 'Y') {
return myArray;
}
return rtnNum;
} else {
regExp = /(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if (rtnArrYn == 'Y') {
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
}
} else {
return phoneNum;
}
},
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
formatMobile(phoneNum, fmt, rtnArrYn) {
if (this.isNull(fmt)) {
fmt = '';
}
if (this.isNull(rtnArrYn)) {
fmt = 'N';
}
if (this.isMobile(phoneNum)) {
var rtnNum;
var regExp = /(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum);
rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if (rtnArrYn == 'Y') {
return myArray;
}
return rtnNum;
} else {
return phoneNum;
}
} else {
return phoneNum;
}
},
/** * 전화번호 형식 체크 * * @param 데이터 */
isPhone(phoneNum) {
var regExp = /(02)([0-9]{3,4})([0-9]{4})$/;
if (regExp.test(phoneNum)) {
return true;
} else {
regExp = /(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if (regExp.test(phoneNum)) {
return true;
} else {
return false;
}
}
},
/** * 핸드폰번호 형식 체크 * * @param 데이터 */
isMobile(phoneNum) {
var regExp = /(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isMobile2(phoneNum) {
var regExp = /(1[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray;
if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum);
return true;
} else {
return false;
}
},
isNull(obj) {
if (lodash.isNil(obj) || lodash.trim(obj) == '') {
return true;
}
return false;
},
getParent(name) {
let p = this.$parent;
while (typeof p !== 'undefined') {
if (p.$options.name == name) {
return p;
} else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str) {
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {}
},
methods: {
selSesStorage(keyLike) {
if (this.isNull(keyLike)) {
return null;
}
if (sessionStorage.length > 0) {
let keyList = [];
for (let i = 0; i < sessionStorage.length; i++) {
const keyNm = sessionStorage.key(i);
if (keyNm.indexOf(keyLike) > -1) {
keyList.push({name: keyNm, value: sessionStorage.getItem(keyNm)});
}
}
if (keyList.length > 0) {
return keyList;
}
return null;
}
return null;
},
delSesStorage(keyList) {
if (this.isNull(keyList)) {
return null;
}
if (keyList.length > 0) {
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
},
setGridMouseDownActive() {
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if (window.getEventListeners(ele).mousedown) {
ele.removeEventListener('mousedown', window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars: function ($event, regExp, hanYn) {
if (this.isNull(hanYn)) {
hanYn = 'N';
}
if (hanYn === 'N' && $event.type === 'keydown') {
if ($event.keyCode === 229) {
$event.preventDefault();
return false;
}
}
if ($event.type === 'keypress') {
//한글 처리 불가
if (regExp.test(String.fromCharCode($event.charCode))) {
return true;
} else {
$event.preventDefault();
return false;
}
}
if (hanYn === 'N' && ($event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')) {
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g, '');
$event.preventDefault();
return false;
}
return true;
},
setLenth: function (e, len) {
this.cut(e, len);
},
onlyCustom: function (e, strRegExp, hanYn) {
var regExp_g = new RegExp(strRegExp, 'g');
this.cut(e);
return this.restrictChars(e, regExp_g, hanYn);
},
onlyCommon: function (strRegExp, e, len, isEventCall, hanYn) {
var regExp_g = new RegExp(strRegExp, 'g');
if (isEventCall === 'N') {
if (!this.cut(e, len, isEventCall)) {
return false;
}
if (!regExp_g.test(e.value)) {
return false;
}
return true;
}
this.cut(e, len);
return this.restrictChars(e, regExp_g, hanYn);
},
onlyNum: function (e, len, isEventCall) {
var strRegExp = '^[0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyLowerEng: function (e, len, isEventCall) {
var strRegExp = '^[a-z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyUpperEng: function (e, len, isEventCall) {
var strRegExp = '^[A-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyEmail: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyName: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
},
onlyTitle: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
},
onlyText: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
},
onlyPassword: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyId: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9_\.\-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyIp: function (e, len, isEventCall) {
var strRegExp = '^[0-9,.*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
onlyRoleNm_Space: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
},
onlyRoleId_UnderBar: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall);
},
cut: function (ele, len, isValidChk) {
let e = ele;
if (typeof ele.target != "undefined") {
e = ele.target;
}
let max = this.isNull(len) ? e.attributes.maxlength.value : len;
let str = e.value;
if (this.bytes(str) > max) {
if (this.isNull(isValidChk)) {
e.value = this.cutBytes(str, max);
}
return false;
}
return true;
},
cutBytes: function (str, len) {
while (1 === 1) {
if (this.bytes(str) <= len) {
return str;
}
str = str.slice(0, -1);
}
},
bytes: function (str) {
var length = ((s, b, i, c) => {
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
b = 0, i = 0;
while (1 === 1) {
c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function (str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0) != "0") {
str = "0" + str;
}
if (str.length < 10 || str.length > 12) {
return "";
}
if (isNaN(str)) {
return "";
}
if (str.substr(0, 2) != "01" && str.substr(0, 3) != "070" && str.substr(0, 4) != "0505" && str.substr(0, 4) != "0503") {
return "";
}
return str;
},
}
};
export {utils_mixin, chkPattern2};

View File

@@ -6,60 +6,56 @@
<h3 class="title">사업자별 통계</h3> <h3 class="title">사업자별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 사업자별 통계</p> <p class="breadcrumb">발송통계 &gt; 사업자별 통계</p>
</div> </div>
<div class="top_tab"> <div class="top_tab">
<a href="javascript:void(0);" @click="toMove('bsnmMonthList')">월별통계</a> <a href="javascript:void(0);" @click="toMove('bsnmMonthList')">월별통계</a>
<a href="javascript:void(0);" class="on">일별통계</a> <a href="javascript:void(0);" class="on">일별통계</a>
</div> </div>
<div class="search_wrap">
<div class="input_box cal">
<form autocomplete="off" class="search_form"> <label for="right" class="label txt">날짜</label>
<div class="search_wrap"> <p> 최대 1개월까지 조회 가능합니다.</p>
<div class="input_box cal"> <div class="term">
<label for="right" class="label txt">날짜</label> <!--
<p> 최대 1개월까지 조회 가능합니다.</p>
<div class="term">
<!--
<input class="date" type="text" id="" placeholder="2022-10-12"/> <input class="date" type="text" id="" placeholder="2022-10-12"/>
~ ~
<input class="" type="text" id="" placeholder="2022-10-12"/> <input class="" type="text" id="" placeholder="2022-10-12"/>
--> -->
<div class="group" style="width:500px;"> <div class="group" style="width:500px;">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
:disabled-dates="disabledSDate" :disabled-dates="disabledSDate"
v-model="startDate" v-model="startDate"
@selected="selectedStartDate(0)" @selected="selectedStartDate(0)"
@closed="closeDate('start')" @closed="closeDate('start')"
></vuejs-datepicker> ></vuejs-datepicker>
</span>~ </span>~
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
:disabled-dates="disabledEDate" :disabled-dates="disabledEDate"
v-model="endDate" v-model="endDate"
@selected="selectedEndDate(0)" @selected="selectedEndDate(0)"
@closed="closeDate('end')" @closed="closeDate('end')"
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div>
</div> </div>
</div> </div>
<div class="input_box id">
<label for="name" class="label">고객사명</label>
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.custNm">
</div>
<div class="input_box">
<label for="name" class="label">사업자등록번호</label>
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.bizrno">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</form> <div class="input_box id">
<label for="name" class="label">고객사명</label>
<input type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.custNm">
</div>
<div class="input_box">
<label for="name" class="label">사업자등록번호</label>
<input type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.bizrno" @keypress="onlyNum"
@input="onlyNum" maxlength="10">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
<div class="info"> <div class="info">
<div class="count">집계결과</div> <div class="count">집계결과</div>
<div class="button_group"> <div class="button_group">
@@ -67,21 +63,21 @@
</div> </div>
</div> </div>
<div class="table calculate scroll"> <div class="table calculate scroll">
<custom-grid <custom-grid
ref="table" ref="table"
:totalItems="'totalItems'" :totalItems="'totalItems'"
:url="grid.url" :url="grid.url"
:pagePerRows="grid.pagePerRows" :pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest" :initialRequest="grid.initialRequest"
:pagination="grid.pagination" :pagination="grid.pagination"
:isCheckbox="grid.isCheckbox" :isCheckbox="grid.isCheckbox"
:columns="grid.columns" :columns="grid.columns"
:noDataStr="grid.noDataStr" :noDataStr="grid.noDataStr"
:addCls="grid.addCls" :addCls="grid.addCls"
:header="grid.header" :header="grid.header"
></custom-grid> ></custom-grid>
</div> </div>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
@@ -94,9 +90,11 @@ import statsApi from "../service/statsApi.js";
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import xlsx from '@/common/excel'; import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import {utils_mixin, chkPattern2} from '../service/mixins';
export default { export default {
name: 'bsnmDayList', name: 'bsnmDayList',
mixins: [utils_mixin, chkPattern2],
data() { data() {
return { return {
// 달력 데이터 // 달력 데이터
@@ -106,124 +104,134 @@ export default {
startDate: new Date(), startDate: new Date(),
endDate: new Date(), endDate: new Date(),
startDt:'', startDt: '',
endDt:'', endDt: '',
startYear:'', startYear: '',
startMonth:'', startMonth: '',
endYear:'', endYear: '',
endMonth:'', endMonth: '',
row: {}, row: {},
list:[], list: [],
totalCnt: '', totalCnt: '',
pageType: 'BSNM_DAY', pageType: 'BSNM_DAY',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
totalItems: 0, totalItems: 0,
grid: { grid: {
url: '/api/v1/bo/stats/bsnmDayList', url: '/api/v1/bo/stats/bsnmDayList',
pagePerRows: 20, pagePerRows: 20,
pagination: true, pagination: true,
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거 isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
header:[ header: [
[ [
{ header: '날짜', childNames: [] }, {header: '날짜', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '전체', childNames: ['sndCnt','succCntRt'] }, {header: '전체', childNames: ['sndCnt', 'succCntRt']},
{ header: 'SMS', childNames: ['sndCntS','succCntRtS'] }, {header: 'SMS', childNames: ['sndCntS', 'succCntRtS']},
{ header: 'LMS', childNames: ['sndCntL','succCntRtL'] }, {header: 'LMS', childNames: ['sndCntL', 'succCntRtL']},
{ header: 'MMS', childNames: ['sndCntM','succCntRtM'] }, {header: 'MMS', childNames: ['sndCntM', 'succCntRtM']},
{ header: '알림톡', childNames: ['sndCntR','succCntRtR'] }, {header: '알림톡', childNames: ['sndCntR', 'succCntRtR']},
] ]
], ],
columns: [ columns: [
{ name: 'sumYmd', header: '날짜', align: 'center'}, {name: 'sumYmd', header: '날짜', align: 'center'},
{ name: 'custNm', header: '고객사명', align: 'center'}, {name: 'custNm', header: '고객사명', align: 'center'},
{ name: 'bizrno', header: '사업자번호', align: 'center'}, {name: 'bizrno', header: '사업자번호', align: 'center'},
{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRt', {
header: '성공건수/(%)', name: 'succCntRt',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRt+"%)</p>"; return "<p>" + props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRt + "%)</p>";
} }
}, },
{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtS', {
header: '성공건수/(%)', name: 'succCntRtS',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtS+"%)</p>"; return "<p>" + props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtS + "%)</p>";
} }
}, },
{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtL', {
header: '성공건수/(%)', name: 'succCntRtL',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtL+"%)</p>"; return "<p>" + props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtL + "%)</p>";
} }
}, },
{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtM', {
header: '성공건수/(%)', name: 'succCntRtM',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtM+"%)</p>"; return "<p>" + props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtM + "%)</p>";
} }
}, },
{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtR', {
header: '성공건수/(%)', name: 'succCntRtR',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtR+")</p>"; return "<p>" + props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtR + ")</p>";
} }
}, },
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
startDay: '', startDay: '',
endDay: '' endDay: ''
}, },
@@ -232,32 +240,32 @@ export default {
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
this.setPeriodDay(0); this.setPeriodDay(0);
this.getExcelHeader(); this.getExcelHeader();
}, },
destroyed() { destroyed() {
this.grid.params.custNm=''; this.grid.params.custNm = '';
this.grid.params.bizrno=''; this.grid.params.bizrno = '';
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
@@ -276,7 +284,7 @@ export default {
next(); next();
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log('>>>>>>> search Start >>>>>>'); console.log('>>>>>>> search Start >>>>>>');
this.grid.params = { this.grid.params = {
startDay: moment(this.startDate).format('YYYYMMDD'), startDay: moment(this.startDate).format('YYYYMMDD'),
@@ -284,24 +292,24 @@ export default {
custNm: this.grid.params.custNm, custNm: this.grid.params.custNm,
bizrno: this.grid.params.bizrno bizrno: this.grid.params.bizrno
}; };
console.log('this.perPageCnt'+this.perPageCnt); console.log('this.perPageCnt' + this.perPageCnt);
console.log(this.grid.params); console.log(this.grid.params);
if (moment(this.grid.params.startDay).isBefore(moment(this.grid.params.endDay).subtract(1, 'months').format('YYYYMMDD'))) { if (moment(this.grid.params.startDay).isBefore(moment(this.grid.params.endDay).subtract(1, 'months').format('YYYYMMDD'))) {
//alert('검색 기간은 최대 1개월까지 선택 가능 합니다.'); //alert('검색 기간은 최대 1개월까지 선택 가능 합니다.');
this.row.title = '발송통계'; this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.'; this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false return false
} }
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
toMove(routeName) { toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } }); this.$router.push({name: routeName, params: {page: 1, searchText: ''}});
}, },
setPeriodDay(day) { setPeriodDay(day) {
this.periodDay = day; this.periodDay = day;
this.endDate = new Date(); this.endDate = new Date();
// this.startDate = moment(this.endDate) // this.startDate = moment(this.endDate)
@@ -312,7 +320,7 @@ export default {
this.closeDate('start'); this.closeDate('start');
this.closeDate('end'); this.closeDate('end');
}, },
selectedStartDate(day) { selectedStartDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
this.periodDay = day; this.periodDay = day;
} }
@@ -330,15 +338,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -347,11 +355,11 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -361,11 +369,11 @@ export default {
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage); console.log("getCondition : " + getCondition.perPage);
}, },
initSetStartDate(){ initSetStartDate() {
let initStartDate = new Date(); let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -2); initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 2);
this.startDate = initStartDate; this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD')); console.log(moment(this.startDate).format('YYYY-MM-DD'));
}, },
@@ -378,7 +386,7 @@ export default {
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
return result.data; return result.data;
}else{ } else {
return false; return false;
} }
} catch (err) { } catch (err) {
@@ -402,12 +410,13 @@ export default {
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {}); xlsx.export(data.list, saveFileName, options).then(() => {
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
statsApi.getExcelHeader(this.pageType).then(res => { statsApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res; this.excelHeader = res;
}); });
}, },
} }

View File

@@ -6,64 +6,55 @@
<h3 class="title">사업자별 통계</h3> <h3 class="title">사업자별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 사업자별 통계</p> <p class="breadcrumb">발송통계 &gt; 사업자별 통계</p>
</div> </div>
<div class="top_tab"> <div class="top_tab">
<a href="javascript:void(0);" class="on">월별통계</a> <a href="javascript:void(0);" class="on">월별통계</a>
<a href="javascript:void(0);" @click="toMove('bsnmDayList')">일별통계</a> <a href="javascript:void(0);" @click="toMove('bsnmDayList')">일별통계</a>
</div> </div>
<div class="search_wrap">
<div class="input_box cal">
<form autocomplete="off" class="search_form"> <label for="right" class="label txt">날짜</label>
<div class="search_wrap"> <p> 최대 3개월까지 조회 가능합니다.</p>
<div class="input_box cal"> <div class="term">
<label for="right" class="label txt">날짜</label> <div class="group" style="width:500px;">
<p> 최대 3개월까지 조회 가능합니다.</p>
<div class="term">
<!--
<input class="date" type="text" id="" placeholder="2022-10-12"/>
~
<input class="" type="text" id="" placeholder="2022-10-12"/>
-->
<div class="group" style="width:500px;">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
:disabled-dates="disabledSDate" :disabled-dates="disabledSDate"
:minimumView="sDateDiv" :minimumView="sDateDiv"
:maximumView="sDateDiv" :maximumView="sDateDiv"
v-model="startDate" v-model="startDate"
@selected="selectedStartDate(0)" @selected="selectedStartDate(0)"
@closed="closeDate('start')" @closed="closeDate('start')"
></vuejs-datepicker> ></vuejs-datepicker>
</span>~ </span>~
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
:disabled-dates="disabledEDate" :disabled-dates="disabledEDate"
:minimumView="sDateDiv" :minimumView="sDateDiv"
:maximumView="sDateDiv" :maximumView="sDateDiv"
v-model="endDate" v-model="endDate"
@selected="selectedEndDate(0)" @selected="selectedEndDate(0)"
@closed="closeDate('end')" @closed="closeDate('end')"
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div>
</div> </div>
</div> </div>
<div class="input_box id">
<label for="name" class="label">고객사명</label>
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.custNm">
</div>
<div class="input_box">
<label for="name" class="label">사업자등록번호</label>
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.bizrno">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div> </div>
</form> <div class="input_box id">
<label for="name" class="label">고객사명</label>
<input type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.custNm" maxlength="100">
</div>
<div class="input_box">
<label for="name" class="label">사업자등록번호</label>
<input type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.bizrno" @keypress="onlyNum"
@input="onlyNum" minlength="10" maxlength="10">
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
<div class="info"> <div class="info">
<div class="count">집계결과</div> <div class="count">집계결과</div>
<div class="button_group"> <div class="button_group">
@@ -73,18 +64,18 @@
</div> </div>
<div class="table calculate scroll"> <div class="table calculate scroll">
<custom-grid <custom-grid
ref="table" ref="table"
:totalItems="'totalItems'" :totalItems="'totalItems'"
:url="grid.url" :url="grid.url"
:pagePerRows="grid.pagePerRows" :pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest" :initialRequest="grid.initialRequest"
:pagination="grid.pagination" :pagination="grid.pagination"
:isCheckbox="grid.isCheckbox" :isCheckbox="grid.isCheckbox"
:columns="grid.columns" :columns="grid.columns"
:noDataStr="grid.noDataStr" :noDataStr="grid.noDataStr"
:addCls="grid.addCls" :addCls="grid.addCls"
:header="grid.header" :header="grid.header"
></custom-grid> ></custom-grid>
</div> </div>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
@@ -97,9 +88,11 @@ import statsApi from "../service/statsApi.js";
import customGrid from '@/components/CustomGrid'; import customGrid from '@/components/CustomGrid';
import xlsx from '@/common/excel'; import xlsx from '@/common/excel';
import commonModal from "@/components/modal/commonModal"; import commonModal from "@/components/modal/commonModal";
import {utils_mixin, chkPattern2} from '../service/mixins';
export default { export default {
name: 'bsnmMonthList', name: 'bsnmMonthList',
mixins: [utils_mixin, chkPattern2],
data() { data() {
return { return {
// 달력 데이터 // 달력 데이터
@@ -109,129 +102,140 @@ export default {
startDate: new Date(), startDate: new Date(),
endDate: new Date(), endDate: new Date(),
startDt:'', startDt: '',
endDt:'', endDt: '',
startYear:'', startYear: '',
startMonth:'', startMonth: '',
endYear:'', endYear: '',
endMonth:'', endMonth: '',
row: {}, row: {},
list:[], list: [],
totalCnt: '', totalCnt: '',
pageType: 'BSNM_MONTH', pageType: 'BSNM_MONTH',
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 50, perPageCnt: 50,
options: [ options: [
{ text: '20', value: 20}, {text: '20', value: 20},
{ text: '50', value: 50}, {text: '50', value: 50},
{ text: '100', value: 100} {text: '100', value: 100}
], ],
totalItems: 0, totalItems: 0,
grid: { grid: {
url: '/api/v1/bo/stats/bsnmMonthList', url: '/api/v1/bo/stats/bsnmMonthList',
pagePerRows: 20, pagePerRows: 20,
pagination: true, pagination: true,
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거 isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
header:[ header: [
[ [
{ header: '날짜', childNames: [] }, {header: '날짜', childNames: []},
{ header: '고객사명', childNames: [] }, {header: '고객사명', childNames: []},
{ header: '사업자번호', childNames: [] }, {header: '사업자번호', childNames: []},
{ header: '전체', childNames: ['sndCnt','succCntRt'] }, {header: '전체', childNames: ['sndCnt', 'succCntRt']},
{ header: 'SMS', childNames: ['sndCntS','succCntRtS'] }, {header: 'SMS', childNames: ['sndCntS', 'succCntRtS']},
{ header: 'LMS', childNames: ['sndCntL','succCntRtL'] }, {header: 'LMS', childNames: ['sndCntL', 'succCntRtL']},
{ header: 'MMS', childNames: ['sndCntM','succCntRtM'] }, {header: 'MMS', childNames: ['sndCntM', 'succCntRtM']},
{ header: '알림톡', childNames: ['sndCntR','succCntRtR'] }, {header: '알림톡', childNames: ['sndCntR', 'succCntRtR']},
] ]
], ],
columns: [ columns: [
{ name: 'sumYm', header: '날짜', align: 'center'}, {name: 'sumYm', header: '날짜', align: 'center'},
{ name: 'custNm', header: '고객사명', align: 'center'}, {name: 'custNm', header: '고객사명', align: 'center'},
{ name: 'bizrno', header: '사업자번호', align: 'center' {
,formatter: props => { name: 'bizrno', header: '사업자번호', align: 'center'
let result = props.bizrno.substring(0,3)+'-'+ props.bizrno.substring(3,5)+'-'+ props.bizrno.substring(5,10) // , formatter: props => {
return result; // let result = props.bizrno.substring(0, 3) + '-' + props.bizrno.substring(3, 5) + '-' + props.bizrno.substring(5, 10)
} // return result;
// }
}, },
{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCnt', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRt', {
header: '성공건수/(%)', name: 'succCntRt',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRt+"%)</p>"; return "<p>" + props.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRt + "%)</p>";
} }
}, },
{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntS', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtS', {
header: '성공건수/(%)', name: 'succCntRtS',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtS+"%)</p>"; return "<p>" + props.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtS + "%)</p>";
} }
}, },
{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntL', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtL', {
header: '성공건수/(%)', name: 'succCntRtL',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtL+"%)</p>"; return "<p>" + props.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtL + "%)</p>";
} }
}, },
{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntM', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtM', {
header: '성공건수/(%)', name: 'succCntRtM',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtM+"%)</p>"; return "<p>" + props.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtM + "%)</p>";
} }
}, },
{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line', {
formatter: props =>{ name: 'sndCntR', header: '발송건수', align: 'center', cls: 'td_line',
formatter: props => {
let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); let result = props.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
return result; return result;
} }
}, },
{ name: 'succCntRtR', {
header: '성공건수/(%)', name: 'succCntRtR',
align: 'center', header: '성공건수/(%)',
align: 'center',
cls: 'td_line', cls: 'td_line',
formatter: props => { formatter: props => {
return "<p>"+ props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')+"</p>\n<p>("+props.succRtR+")</p>"; return "<p>" + props.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + "</p>\n<p>(" + props.succRtR + ")</p>";
} }
}, },
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
startMon: '', startMon: '',
endMon: '' endMon: ''
}, },
@@ -240,33 +244,33 @@ export default {
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
this.setPeriodDay(0); this.setPeriodDay(0);
this.getExcelHeader(); this.getExcelHeader();
}, },
destroyed() { destroyed() {
this.grid.params.custNm=''; this.grid.params.custNm = '';
this.grid.params.bizrno=''; this.grid.params.bizrno = '';
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
@@ -285,7 +289,7 @@ export default {
next(); next();
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log('>>>>>>> search Start >>>>>>'); console.log('>>>>>>> search Start >>>>>>');
this.grid.params = { this.grid.params = {
startMon: moment(this.startDate).format('YYYYMM'), startMon: moment(this.startDate).format('YYYYMM'),
@@ -293,24 +297,24 @@ export default {
custNm: this.grid.params.custNm, custNm: this.grid.params.custNm,
bizrno: this.grid.params.bizrno bizrno: this.grid.params.bizrno
}; };
console.log('this.perPageCnt'+this.perPageCnt); console.log('this.perPageCnt' + this.perPageCnt);
console.log(this.grid.params); console.log(this.grid.params);
if (moment(this.grid.params.startMon).isBefore(moment(this.grid.params.endMon).subtract(2, 'months').format('YYYYMM'))) { if (moment(this.grid.params.startMon).isBefore(moment(this.grid.params.endMon).subtract(2, 'months').format('YYYYMM'))) {
//alert('검색 기간은 최대 3개월까지 선택 가능 합니다.'); //alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
this.row.title = '발송통계'; this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.'; this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false return false
} }
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
toMove(routeName) { toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } }); this.$router.push({name: routeName, params: {page: 1, searchText: ''}});
}, },
setPeriodDay(day) { setPeriodDay(day) {
this.periodDay = day; this.periodDay = day;
this.endDate = new Date(); this.endDate = new Date();
// this.startDate = moment(this.endDate) // this.startDate = moment(this.endDate)
@@ -321,7 +325,7 @@ export default {
this.closeDate('start'); this.closeDate('start');
this.closeDate('end'); this.closeDate('end');
}, },
selectedStartDate(day) { selectedStartDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
this.periodDay = day; this.periodDay = day;
} }
@@ -339,15 +343,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -356,11 +360,11 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
changePerPage: function(){ // 페이지당 조회할 개수 changePerPage: function () { // 페이지당 조회할 개수
this.grid.pagePerRows = this.perPageCnt; this.grid.pagePerRows = this.perPageCnt;
this.search(true); this.search(true);
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
@@ -370,18 +374,18 @@ export default {
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log("getCondition : "+ getCondition.perPage); console.log("getCondition : " + getCondition.perPage);
}, },
initSetStartDate(){ initSetStartDate() {
let initStartDate = new Date(); let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -3); initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 3);
this.startDate = initStartDate; this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD')); console.log(moment(this.startDate).format('YYYY-MM-DD'));
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.
statsApi.getExcelHeader(this.pageType).then(res => { statsApi.getExcelHeader(this.pageType).then(res => {
this.excelHeader = res; this.excelHeader = res;
}); });
}, },
async getExcelDataDown() { async getExcelDataDown() {
@@ -394,7 +398,7 @@ export default {
console.log(result) console.log(result)
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
return result.data; return result.data;
}else{ } else {
return false; return false;
} }
} catch (err) { } catch (err) {
@@ -417,8 +421,9 @@ export default {
header: this.excelHeader, header: this.excelHeader,
dataOrder: 'header' dataOrder: 'header'
}; };
console.log(data); console.log(data);
xlsx.export(data.list, saveFileName, options).then(() => {}); xlsx.export(data.list, saveFileName, options).then(() => {
});
}, },
} }
}; };

View File

@@ -1,115 +1,110 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">날짜별 통계</h3> <h3 class="title">날짜별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 날짜별 통계</p> <p class="breadcrumb">발송통계 &gt; 날짜별 통계</p>
</div> </div>
<div class="top_tab">
<div class="top_tab"> <a href="javascript:void(0);" @click="toMove('monthList')">월별통계</a>
<a href="javascript:void(0);" @click="toMove('monthList')">별통계</a> <a href="javascript:void(0);" class="on">별통계</a>
<a href="javascript:void(0);" class="on">일별통계</a> </div>
</div> <div class="search_wrap">
<div class="input_box cal">
<label for="right" class="label txt">날짜</label>
<form autocomplete="off" class="search_form"> <p> 최대 1개월까지 조회 가능합니다.</p>
<div class="search_wrap"> <div class="term">
<div class="input_box cal"> <span class="custom_input icon_date">
<label for="right" class="label txt">날짜</label> <vuejs-datepicker
<p> 최대 1개월까지 조회 가능합니다.</p> :language="ko"
<div class="term"> :format="customFormatter"
<span class="custom_input icon_date"> :disabled-dates="disabledSDate"
<vuejs-datepicker v-model="startDate"
:language="ko" @selected="selectedStartDate(0)"
:format="customFormatter" @closed="closeDate('start')"
:disabled-dates="disabledSDate" ></vuejs-datepicker>
v-model="startDate" </span>~
@selected="selectedStartDate(0)" <span class="custom_input icon_date">
@closed="closeDate('start')" <vuejs-datepicker
></vuejs-datepicker> :language="ko"
</span>~ :format="customFormatter"
<span class="custom_input icon_date"> :disabled-dates="disabledEDate"
<vuejs-datepicker v-model="endDate"
:language="ko" @selected="selectedEndDate(0)"
:format="customFormatter" @closed="closeDate('end')"
:disabled-dates="disabledEDate" ></vuejs-datepicker>
v-model="endDate" </span>
@selected="selectedEndDate(0)" </div>
@closed="closeDate('end')" </div>
></vuejs-datepicker> <button type="button" class="button grey" @click="search">조회</button>
</span> </div>
</div> <div class="info">
</div> <div class="count">집계결과</div>
<button type="button" class="button grey" @click="search">조회</button> <div class="button_group">
</div> <button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</form> </div>
<div class="info">
<div class="count">집계결과</div> </div>
<div class="button_group"> <div class="table calculate">
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button> <table>
</div> <colgroup>
<col width="7%">
</div> <col width="9.3%">
<div class="table calculate"> <col width="9.3%">
<table> <col width="9.3%">
<colgroup> <col width="9.3%">
<col width="7%"> <col width="9.3%">
<col width="9.3%"> <col width="9.3%">
<col width="9.3%"> <col width="9.3%">
<col width="9.3%"> <col width="9.3%">
<col width="9.3%"> <col width="9.3%">
<col width="9.3%"> <col width="9.3%">
<col width="9.3%"> </colgroup>
<col width="9.3%"> <thead>
<col width="9.3%"> <tr>
<col width="9.3%"> <th rowspan="2">날짜</th>
<col width="9.3%"> <th colspan="2">전체</th>
</colgroup> <th colspan="2">SMS</th>
<thead> <th colspan="2">LMS</th>
<tr> <th colspan="2">MMS</th>
<th rowspan="2">날짜</th> <th colspan="2">알림톡</th>
<th colspan="2">전체</th> </tr>
<th colspan="2">SMS</th> <tr class="total">
<th colspan="2">LMS</th> <th>발송건수</th>
<th colspan="2">MMS</th> <th>성공건수/(%)</th>
<th colspan="2">알림톡</th> <th>발송건수</th>
</tr> <th>성공건수/(%)</th>
<tr class="total"> <th>발송건수</th>
<th>발송건수</th> <th>성공건수/(%)</th>
<th>성공건수/(%)</th> <th>발송건수</th>
<th>발송건수</th> <th>성공건수/(%)</th>
<th>성공건수/(%)</th> <th>발송건수</th>
<th>발송건수</th> <th>성공건수/(%)</th>
<th>성공건수/(%)</th> </tr>
<th>발송건수</th> </thead>
<th>성공건수/(%)</th> <tbody>
<th>발송건수</th> <tr v-for="(option, i) in list" v-bind:key="i">
<th>성공건수/(%)</th> <td>{{ option.sumYmd }}</td>
</tr> <td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
</thead> <td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td>
<tbody> <td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<tr v-for="(option, i) in list" v-bind:key="i"> <td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
<td>{{ option.sumYmd }}</td> <td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td> <td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
<td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td> <td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td> <td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
<td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td> <td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td> <td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
<td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td> </tr>
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td> </tbody>
<td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td> </table>
<td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td> </div>
</tr>
</tbody>
</table>
</div>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@@ -122,78 +117,78 @@ export default {
name: 'dayList', name: 'dayList',
data() { data() {
return { return {
// 달력 데이터 // 달력 데이터
ko: vdp_translation_ko.js, ko: vdp_translation_ko.js,
periodDay: 7, periodDay: 7,
sDateDiv: 'day', sDateDiv: 'day',
startDate: new Date(), startDate: new Date(),
endDate: new Date(), endDate: new Date(),
startDt:'', startDt: '',
endDt:'', endDt: '',
pageType:'DAY', pageType: 'DAY',
row: {}, row: {},
list:[], list: [],
totalCnt: '', totalCnt: '',
}; };
},
components: {
commonModal,
vuejsDatepicker,
}, },
created(){ components: {
// this.startDt = moment().format('YYYY-MM-DD'); commonModal,
// this.endDt = moment().format('YYYY-MM-DD'); vuejsDatepicker,
this.setPeriodDay(0); },
this.getDayList(); created() {
// this.startDt = moment().format('YYYY-MM-DD');
// this.endDt = moment().format('YYYY-MM-DD');
this.setPeriodDay(0);
this.getDayList();
this.getExcelHeader(); this.getExcelHeader();
}, },
destroyed() { destroyed() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
async getDayList(){ async getDayList() {
console.log('getDayList Start'); console.log('getDayList Start');
this.row.startDay = moment(this.startDate).format('YYYYMMDD'); this.row.startDay = moment(this.startDate).format('YYYYMMDD');
this.row.endDay = moment(this.endDate).format('YYYYMMDD'); this.row.endDay = moment(this.endDate).format('YYYYMMDD');
console.log('검색_시작일시(변환후):'+this.row.startDay); console.log('검색_시작일시(변환후):' + this.row.startDay);
console.log('검색_종료일시(변환후):'+this.row.endDay); console.log('검색_종료일시(변환후):' + this.row.endDay);
if (moment(this.row.startDay).isBefore(moment(this.row.endDay).subtract(1, 'months').format('YYYYMMDD'))) { if (moment(this.row.startDay).isBefore(moment(this.row.endDay).subtract(1, 'months').format('YYYYMMDD'))) {
//alert('검색 기간은 최대 1개월까지 선택 가능 합니다.'); //alert('검색 기간은 최대 1개월까지 선택 가능 합니다.');
this.row.title = '발송통계'; this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.'; this.row.msg1 = '검색 기간은 최대 1개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false return false
} }
try { try {
const response = await statsApi.dayList(this.row); const response = await statsApi.dayList(this.row);
const result = response.data; const result = response.data;
console.log(result); console.log(result);
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
if(result.data.list.length > 0){ if (result.data.list.length > 0) {
this.list = result.data.list; this.list = result.data.list;
} }
this.totalCnt = result.data.list.length; this.totalCnt = result.data.list.length;
} else { } else {
alert("조회정보가 없습니다."); alert("조회정보가 없습니다.");
} }
} catch(err) { } catch (err) {
alert("실패 하였습니다."); alert("실패 하였습니다.");
} }
},
toMove(routeName) {
this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
}, },
search: function() { toMove(routeName) {
console.log('검색_시작일시:'+this.startDt); this.$router.push({name: routeName, params: {page: 1, searchText: ''}});
console.log('검색_종료일시:'+this.endDt); },
this.getDayList(); search: function () {
console.log('검색_시작일시:' + this.startDt);
console.log('검색_종료일시:' + this.endDt);
this.getDayList();
}, },
// calendarCalbackFnc(year, month, day){ // calendarCalbackFnc(year, month, day){
@@ -223,18 +218,18 @@ export default {
// } // }
// }, // },
setPeriodDay(day) { setPeriodDay(day) {
this.periodDay = day; this.periodDay = day;
this.endDate = new Date(); this.endDate = new Date();
// this.startDate = moment(this.endDate) // this.startDate = moment(this.endDate)
// .subtract(day, 'day') // .subtract(day, 'day')
// .toDate(); // .toDate();
this.initSetStartDate(); this.initSetStartDate();
this.closeDate('start'); this.closeDate('start');
this.closeDate('end'); this.closeDate('end');
}, },
selectedStartDate(day) { selectedStartDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
this.periodDay = day; this.periodDay = day;
} }
@@ -252,15 +247,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -269,9 +264,9 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
initSetStartDate(){ initSetStartDate() {
let initStartDate = new Date(); let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -2); initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 2);
this.startDate = initStartDate; this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD')); console.log(moment(this.startDate).format('YYYY-MM-DD'));
}, },
@@ -293,7 +288,8 @@ export default {
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(this.list, saveFileName, options).then(() => {}); xlsx.export(this.list, saveFileName, options).then(() => {
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.

View File

@@ -1,120 +1,113 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">날짜별 통계</h3> <h3 class="title">날짜별 통계</h3>
<p class="breadcrumb">발송통계 &gt; 날짜별 통계</p> <p class="breadcrumb">발송통계 &gt; 날짜별 통계</p>
</div> </div>
<div class="top_tab">
<div class="top_tab"> <a href="javascript:void(0);" class="on">월별통계</a>
<a href="javascript:void(0);" class="on">별통계</a> <a href="javascript:void(0);" @click="toMove('dayList')">별통계</a>
<a href="javascript:void(0);" @click="toMove('dayList')" >일별통계</a> </div>
</div> <div class="search_wrap">
<div class="input_box cal">
<label for="right" class="label txt">날짜</label>
<form autocomplete="off" class="search_form"> <p> 최대 3개월까지 조회 가능합니다.</p>
<div class="search_wrap"> <div class="term">
<div class="input_box cal">
<label for="right" class="label txt">날짜</label>
<p> 최대 3개월까지 조회 가능합니다.</p>
<div class="term">
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
:disabled-dates="disabledSDate" :disabled-dates="disabledSDate"
:minimumView="sDateDiv" :minimumView="sDateDiv"
:maximumView="sDateDiv" :maximumView="sDateDiv"
v-model="startDate" v-model="startDate"
@selected="selectedStartDate(0)" @selected="selectedStartDate(0)"
@closed="closeDate('start')" @closed="closeDate('start')"
></vuejs-datepicker> ></vuejs-datepicker>
</span>~ </span>~
<span class="custom_input icon_date"> <span class="custom_input icon_date">
<vuejs-datepicker <vuejs-datepicker
:language="ko" :language="ko"
:format="customFormatter" :format="customFormatter"
:disabled-dates="disabledEDate" :disabled-dates="disabledEDate"
:minimumView="sDateDiv" :minimumView="sDateDiv"
:maximumView="sDateDiv" :maximumView="sDateDiv"
v-model="endDate" v-model="endDate"
@selected="selectedEndDate(0)" @selected="selectedEndDate(0)"
@closed="closeDate('end')" @closed="closeDate('end')"
></vuejs-datepicker> ></vuejs-datepicker>
</span> </span>
</div>
</div>
<button type="button" class="button grey" @click="search">조회</button>
</div>
<div class="info">
<div class="count">집계결과</div>
<div class="button_group">
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button>
</div>
</div> </div>
</div> <div class="table calculate">
<button type="button" class="button grey" @click="search">조회</button> <table>
<!--<button type="button" class="button grey">조회</button>--> <colgroup>
</div> <col width="7%">
</form> <col width="9.3%">
<div class="info"> <col width="9.3%">
<div class="count">집계결과</div> <col width="9.3%">
<div class="button_group"> <col width="9.3%">
<button type="button" class="button blue download" @click="excelDown();">엑셀 다운로드</button> <col width="9.3%">
</div> <col width="9.3%">
<col width="9.3%">
</div> <col width="9.3%">
<div class="table calculate"> <col width="9.3%">
<table> <col width="9.3%">
<colgroup> </colgroup>
<col width="7%"> <thead>
<col width="9.3%"> <tr>
<col width="9.3%"> <th rowspan="2">날짜</th>
<col width="9.3%"> <th colspan="2">전체</th>
<col width="9.3%"> <th colspan="2">SMS</th>
<col width="9.3%"> <th colspan="2">LMS</th>
<col width="9.3%"> <th colspan="2">MMS</th>
<col width="9.3%"> <th colspan="2">알림톡</th>
<col width="9.3%"> </tr>
<col width="9.3%"> <tr class="total">
<col width="9.3%"> <th>발송건수</th>
</colgroup> <th>성공건수/(%)</th>
<thead> <th>발송건수</th>
<tr> <th>성공건수/(%)</th>
<th rowspan="2">날짜</th> <th>발송건수</th>
<th colspan="2">전체</th> <th>성공건수/(%)</th>
<th colspan="2">SMS</th> <th>발송건수</th>
<th colspan="2">LMS</th> <th>성공건수/(%)</th>
<th colspan="2">MMS</th> <th>발송건수</th>
<th colspan="2">알림톡</th> <th>성공건수/(%)</th>
</tr> </tr>
<tr class="total"> </thead>
<th>발송건수</th> <tbody>
<th>성공건수/(%)</th> <tr v-for="(option, i) in list" v-bind:key="i">
<th>발송건수</th> <td>{{ option.sumYm }}</td>
<th>성공건수/(%)</th> <td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<th>발송건수</th> <td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td>
<th>성공건수/(%)</th> <td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<th>발송건수</th> <td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
<th>성공건수/(%)</th> <td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<th>발송건수</th> <td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
<th>성공건수/(%)</th> <td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
</tr> <td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
</thead> <td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<tbody> <td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
<tr v-for="(option, i) in list" v-bind:key="i"> </tr>
<td>{{ option.sumYm }}</td> </tbody>
<td>{{ option.sndCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td> </table>
<td>{{ option.succCnt.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRt }}%)</td> </div>
<td>{{ option.sndCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntS.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtS }}%)</td>
<td>{{ option.sndCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntL.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtL }}%)</td>
<td>{{ option.sndCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntM.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtM }}%)</td>
<td>{{ option.sndCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</td>
<td>{{ option.succCntR.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}<br>({{ option.succRtR }}%)</td>
</tr>
</tbody>
</table>
</div>
<common-modal ref="commmonModal"></common-modal> <common-modal ref="commmonModal"></common-modal>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
@@ -129,87 +122,87 @@ export default {
data() { data() {
return { return {
// 달력 데이터 // 달력 데이터
ko: vdp_translation_ko.js, ko: vdp_translation_ko.js,
periodDay: 7, periodDay: 7,
sDateDiv: 'month', sDateDiv: 'month',
startDate: new Date(), startDate: new Date(),
endDate: new Date(), endDate: new Date(),
startDt:'', startDt: '',
endDt:'', endDt: '',
startYear:'', startYear: '',
startMonth:'', startMonth: '',
endYear:'', endYear: '',
endMonth:'', endMonth: '',
row: {}, row: {},
list:[], list: [],
totalCnt: '', totalCnt: '',
pageType:'MONTH' pageType: 'MONTH'
}; };
}, },
components: { components: {
commonModal, commonModal,
vuejsDatepicker, vuejsDatepicker,
}, },
created(){ created() {
this.setPeriodDay(0); this.setPeriodDay(0);
this.getMonthList(); this.getMonthList();
this.getExcelHeader(); this.getExcelHeader();
}, },
destroyed() { destroyed() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
async getMonthList(){ async getMonthList() {
console.log('getMonthList Start'); console.log('getMonthList Start');
this.row.startMon = moment(this.startDate).format('YYYYMM'); this.row.startMon = moment(this.startDate).format('YYYYMM');
this.row.endMon = moment(this.endDate).format('YYYYMM'); this.row.endMon = moment(this.endDate).format('YYYYMM');
console.log('검색_시작년월:'+this.row.startMon); console.log('검색_시작년월:' + this.row.startMon);
console.log('검색_종료년월:'+this.row.endMon); console.log('검색_종료년월:' + this.row.endMon);
if (moment(this.row.startMon).isBefore(moment(this.row.endMon).subtract(2, 'months').format('YYYYMM'))) { if (moment(this.row.startMon).isBefore(moment(this.row.endMon).subtract(2, 'months').format('YYYYMM'))) {
//alert('검색 기간은 최대 3개월까지 선택 가능 합니다.'); //alert('검색 기간은 최대 3개월까지 선택 가능 합니다.');
this.row.title = '발송통계'; this.row.title = '발송통계';
this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.'; this.row.msg1 = '검색 기간은 최대 3개월까지 선택 가능 합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false return false
} }
try { try {
const response = await statsApi.monthList(this.row); const response = await statsApi.monthList(this.row);
const result = response.data; const result = response.data;
console.log(result); console.log(result);
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.list = result.data.list; this.list = result.data.list;
this.totalCnt = result.data.list.length; this.totalCnt = result.data.list.length;
} else { } else {
alert("조회정보가 없습니다."); alert("조회정보가 없습니다.");
} }
} catch(err) { } catch (err) {
alert("실패 하였습니다."); alert("실패 하였습니다.");
} }
}, },
search: function() { search: function () {
this.getMonthList(); this.getMonthList();
}, },
toMove(routeName) { toMove(routeName) {
//this.$router.push({ name: routeName, params: { page: 1, searchText: '' } }); //this.$router.push({ name: routeName, params: { page: 1, searchText: '' } });
this.$router.push({ name: routeName, params: {} }); this.$router.push({name: routeName, params: {}});
}, },
setPeriodDay(day) { setPeriodDay(day) {
this.periodDay = day; this.periodDay = day;
this.endDate = new Date(); this.endDate = new Date();
// this.startDate = moment(this.endDate) // this.startDate = moment(this.endDate)
// .subtract(day, 'day') // .subtract(day, 'day')
// .toDate(); // .toDate();
this.initSetStartDate(); this.initSetStartDate();
this.closeDate('start'); this.closeDate('start');
this.closeDate('end'); this.closeDate('end');
}, },
selectedStartDate(day) { selectedStartDate(day) {
if (day != undefined && day != null) { if (day != undefined && day != null) {
this.periodDay = day; this.periodDay = day;
} }
@@ -227,15 +220,15 @@ export default {
closeDate(type) { closeDate(type) {
if (type != undefined && type != null) { if (type != undefined && type != null) {
if (type == 'start') { if (type == 'start') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: this.endDate }; this.disabledEDate = {to: this.startDate, from: this.endDate};
} else if (type == 'end') { } else if (type == 'end') {
this.disabledSDate = { from: this.endDate }; this.disabledSDate = {from: this.endDate};
this.disabledEDate = { to: this.startDate, from: new Date() }; this.disabledEDate = {to: this.startDate, from: new Date()};
} }
} }
}, },
customFormatter: function(date) { customFormatter: function (date) {
if (this.sDateDiv == 'month') { if (this.sDateDiv == 'month') {
return moment(date).format('YYYY-MM'); return moment(date).format('YYYY-MM');
} else if (this.sDateDiv == 'year') { } else if (this.sDateDiv == 'year') {
@@ -244,9 +237,9 @@ export default {
return moment(date).format('YYYY-MM-DD'); return moment(date).format('YYYY-MM-DD');
} }
}, },
initSetStartDate(){ initSetStartDate() {
let initStartDate = new Date(); let initStartDate = new Date();
initStartDate.setMonth(Number(moment(initStartDate).format('MM')) -3); initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 3);
this.startDate = initStartDate; this.startDate = initStartDate;
console.log(moment(this.startDate).format('YYYY-MM-DD')); console.log(moment(this.startDate).format('YYYY-MM-DD'));
}, },
@@ -266,9 +259,10 @@ export default {
header: this.excelHeader, header: this.excelHeader,
dataOrder: 'header' dataOrder: 'header'
}; };
// console.log(data); // console.log(data);
xlsx.export(this.list, saveFileName, options).then(() => {}); xlsx.export(this.list, saveFileName, options).then(() => {
});
}, },
getExcelHeader() { getExcelHeader() {
// 헤더를 mockup으로 관리한다. // 헤더를 mockup으로 관리한다.

View File

@@ -72,7 +72,7 @@
</div> </div>
<!-- 관리자 상세정보 팝업 --> <!-- 관리자 상세정보 팝업 -->
</div> </div>
<common-modal ref="commmonModal"></common-modal> <!-- <common-modal ref="commmonModal"></common-modal>-->
</div> </div>
</template> </template>
@@ -82,7 +82,7 @@ import api from '@/service/api';
import sysMgtApi from "../service/sysMgtApi.js"; import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import { utils_mixin, chkPattern2 } from '../service/mixins';
import lodash from "lodash"; import lodash from "lodash";
import commonModal from "../components/commonModal"; // import commonModal from "../components/commonModal";
import SearchIdPopup from "@/modules/sysMgt/components/SearchIdPopup"; import SearchIdPopup from "@/modules/sysMgt/components/SearchIdPopup";
export default { export default {
@@ -121,7 +121,7 @@ export default {
this.formReset(); this.formReset();
}, },
components: { components: {
commonModal, // commonModal,
}, },
methods :{ methods :{
doPwdValidate(){ doPwdValidate(){
@@ -129,7 +129,7 @@ export default {
// alert("비밀번호 확인을 입력해 주세요."); // alert("비밀번호 확인을 입력해 주세요.");
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호를 입력해 주세요.'; this.row.msg1 = '비밀번호를 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$parent.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd2.focus(); this.$refs._pwd2.focus();
return false; return false;
} }
@@ -137,7 +137,7 @@ export default {
// alert("비밀번호가 일치하지 않습니다."); // alert("비밀번호가 일치하지 않습니다.");
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호가 일치하지 않습니다.'; this.row.msg1 = '비밀번호가 일치하지 않습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$parent.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd2.focus(); this.$refs._pwd2.focus();
return false; return false;
} }
@@ -146,7 +146,7 @@ export default {
// alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다."); // alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.'; this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$parent.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd1.focus(); this.$refs._pwd1.focus();
return false; return false;
} }
@@ -157,7 +157,7 @@ export default {
// alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다."); // alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.'; this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$parent.$refs.commmonModal.alertModalOpen(this.row);
this.$refs._pwd1.focus(); this.$refs._pwd1.focus();
return false; return false;
} }

View File

@@ -1,391 +1,377 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed modal20" @click="ModalClose();"></div> <div class="dimmed modal20" @click="ModalClose();"></div>
<div class="popup-wrap modal20"> <div class="popup-wrap modal20">
<!-- 관리자/유치채널 등록 --> <!-- 관리자/유치채널 등록 -->
<div class="popup modal20 popup_form"> <div class="popup modal20 popup_form">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit" v-if="insertType === 1">관리자 등록</h3> <h3 class="pop-tit" v-if="insertType === 1">관리자 등록</h3>
<h3 class="pop-tit" v-else>유치채널 사용자 등록</h3> <h3 class="pop-tit" v-else>유치채널 사용자 등록</h3>
</div> </div>
<!-- <form autocomplete="off" ref="adminRegForm">--> <table>
<table> <tbody>
<tbody> <tr>
<tr> <th>마당 ID</th>
<th>마당 ID</th> <td class="input_search">
<td class="input_search"> <input type="text" placeholder="아이디 입력" v-model.trim="madangId" ref="madangId">
<input type="text" placeholder="아이디 입력" v-model.trim="madangId" ref="madangId"> <button type="button" class="button grey" @click="searchMadangId()">조회</button>
<button type="button" class="button grey" @click="searchMadangId()">조회</button> </td>
</td> </tr>
</tr> <tr>
<tr> <th>비밀번호</th>
<th>비밀번호</th> <td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8"
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td> maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
</tr> </tr>
<tr> <tr>
<th>비밀번호 확인</th> <th>비밀번호 확인</th>
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td> <td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8"
</tr> maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
<tr> </tr>
<th>이름</th> <tr>
<td><input type="text" @keypress="onlyName" @input="onlyName" v-model.trim="userNm" ref="_userNm" required maxlength="40"></td> <th>이름</th>
</tr> <td><input type="text" @keypress="onlyName" @input="onlyName" v-model.trim="userNm" ref="_userNm" required
<tr> maxlength="40"></td>
<th>휴대폰번호</th> </tr>
<td><input type="number" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" v-on:keyup="onlyNum" @input="onlyNum" minlength="10" maxlength="11" ref="_phone"></td> <tr>
</tr> <th>휴대폰번호</th>
<tr> <td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" ref="_phone" @keypress="onlyNum"
<th>이메일</th> @input="onlyNum" minlength="10" maxlength="11"></td>
<td><input type="email" v-model.trim="email" @keypress="onlyEmail" @input="onlyEmail" maxlength="20" ref="_email"></td> </tr>
</tr> <tr>
<tr v-if="insertType === 2"> <th>이메일</th>
<th>코드</th> <td><input type="email" v-model.trim="email" @keypress="onlyEmail" @input="onlyEmail" maxlength="20"
<td><input type="text" disabled ref="_code" v-model.trim="code"></td> ref="_email"></td>
</tr> </tr>
<tr> <tr v-if="insertType === 2">
<th>권한</th> <th>코드</th>
<td v-if="insertType === 1"> <td><input type="text" disabled ref="_code" v-model.trim="code"></td>
<div v:class="select_box"> </tr>
<select name="" id="right" v-model="auth" ref="_auth"> <tr>
<option value="">선택</option> <th>권한</th>
<option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i"> <td v-if="insertType === 1">
{{ option.autNm }} <div v:class="select_box">
</option> <select name="" id="right" v-model="auth" ref="_auth">
</select> <option value="">선택</option>
</div> <option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i">
</td> {{ option.autNm }}
<td v-else><input type="text" disabled value="대리점"></td> </option>
</tr> </select>
<tr> </div>
<th class="center">상태</th> </td>
<td> <td v-else><input type="text" disabled value="대리점"></td>
<input type="radio" name="state" value="01" id="popup_radio1" v-model="stat"> </tr>
<label for="popup_radio1">사용</label> <tr>
<input type="radio" name="state" value="02" id="popup_radio2" v-model="stat"> <th class="center">상태</th>
<label for="popup_radio2">정지</label> <td>
</td> <input type="radio" name="state" value="01" id="popup_radio1" v-model="stat">
</tr> <label for="popup_radio1">사용</label>
</tbody> <input type="radio" name="state" value="02" id="popup_radio2" v-model="stat">
</table> <label for="popup_radio2">정지</label>
<!-- </form>--> </td>
<div class="popup-btn2"> </tr>
<button class="btn-pcolor" @click="doInsert">저장</button> </tbody>
<button class="btn-default" @click="ModalClose();">취소</button> </table>
</div> <div class="popup-btn2">
</div> <button class="btn-pcolor" @click="doInsert">저장</button>
<button class="btn-default" @click="ModalClose();">취소</button>
<search-id-popup ref="searchIdPopModal"> </search-id-popup> </div>
<common-modal ref="commmonModal"></common-modal> </div>
</div>
</div> <search-id-popup ref="searchIdPopModal"></search-id-popup>
</div> <common-modal ref="commmonSysModal"></common-modal>
</div>
</template> </template>
<script> <script>
import api from '@/service/api'; import api from '@/service/api';
import sysMgtApi from "../service/sysMgtApi.js"; import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import SearchIdPopup from '../components/SearchIdPopup.vue'; import SearchIdPopup from '../components/SearchIdPopup.vue';
import lodash from "lodash"; import lodash from "lodash";
import commonModal from "../components/commonModal"; import commonModal from "../components/commonModal";
export default { export default {
name: "adminRegPop", name: "adminRegPop",
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
watch:{ watch: {
stat(){ stat() {
console.log('watch : ', this.stat) console.log('watch : ', this.stat)
} }
}, },
data(){ data() {
return{ return {
row: {}, row: {},
authType: [], authType: [],
insertType:0, insertType: 0,
madangId:'', madangId: '',
name:'', name: '',
mdn:'', mdn: '',
email:'', email: '',
auth:'', auth: '',
stat: '', stat: '',
userNm:"", userNm: "",
userPwd1:"", userPwd1: "",
userPwd2:"", userPwd2: "",
code:"", code: "",
idCheck: false, idCheck: false,
props: {}, props: {},
} }
}, },
components: { components: {
SearchIdPopup, SearchIdPopup,
commonModal, commonModal,
}, },
model: { model: {
prop: 'sendData', prop: 'sendData',
event: 'event-data' event: 'event-data'
}, },
props: ['sendData'], props: ['sendData'],
created(){ created() {
//this.formReset(); //this.formReset();
this.setAuthData(); this.setAuthData();
this.formReset(); this.formReset();
}, },
methods :{ methods: {
doPwdValidate(){ doPwdValidate() {
if(this.isNull(this.userPwd1)){ if (this.isNull(this.userPwd1)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호를 입력해 주세요.'; this.row.msg1 = '비밀번호를 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._pwd1.focus(); this.$refs._pwd1.focus();
return false; return false;
} }
if(this.isNull(this.userPwd2)){ if (this.isNull(this.userPwd2)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호 확인을 입력해 주세요.'; this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._pwd2.focus(); this.$refs._pwd2.focus();
return false; return false;
} }
if(!lodash.isEqual(this.userPwd1, this.userPwd2)){ if (!lodash.isEqual(this.userPwd1, this.userPwd2)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호가 일치하지 않습니다.'; this.row.msg1 = '비밀번호가 일치하지 않습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._pwd2.focus(); this.$refs._pwd2.focus();
return false; return false;
} }
const pwdLen = this.bytes(this.userPwd1); const pwdLen = this.bytes(this.userPwd1);
if(!(pwdLen >= 8 && pwdLen <= 16)){ if (!(pwdLen >= 8 && pwdLen <= 16)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.'; this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._pwd1.focus(); this.$refs._pwd1.focus();
return false; return false;
} }
const pEng = /[A-Za-z]/g; // 영문자 const pEng = /[A-Za-z]/g; // 영문자
const pNum = /[0-9]/g; // 숫자 const pNum = /[0-9]/g; // 숫자
const pSpc = /[!@$%^&*]/g; // 특수문자 const pSpc = /[!@$%^&*]/g; // 특수문자
if(!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) { if (!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.'; this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._pwd1.focus(); this.$refs._pwd1.focus();
return; return;
} }
this.row.adminPw=this.userPwd1; this.row.adminPw = this.userPwd1;
return true; return true;
}, },
doValidate(){ doValidate() {
if(!this.idCheck){ if (!this.idCheck) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '유효한 마당ID가 아닙니다.'; this.row.msg1 = '유효한 마당ID가 아닙니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs.madangId.focus(); this.$refs.madangId.focus();
return false; return false;
} }
if(!this.doPwdValidate()){ if (!this.doPwdValidate()) {
return false; return false;
} }
if(this.isNull(this.userNm)){ if (this.isNull(this.userNm)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '이름을 입력해 주세요.'; this.row.msg1 = '이름을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._userNm.focus(); this.$refs._userNm.focus();
return false; return false;
} }
if(this.isNull(this.mdn)){ if (this.isNull(this.mdn)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '휴대폰번호를 입력해주세요.'; this.row.msg1 = '휴대폰번호를 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._phone.focus(); this.$refs._phone.focus();
return false; return false;
} }
const hp = this.mdn; const hp = this.mdn;
if(!this.isNull(hp) && !this.isMobile(hp)){ if (!this.isNull(hp) && !this.isMobile(hp)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.'; this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._phone.focus(); this.$refs._phone.focus();
return false; return false;
} }
if(this.isNull(this.email)){ if (this.isNull(this.email)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '이메일을 입력해주세요.'; this.row.msg1 = '이메일을 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._email.focus(); this.$refs._email.focus();
return false; return false;
} }
const email = this.email; const email = this.email;
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){ if (!this.isNull(email) && !lodash.isEqual(email, '@') && !this.emailCheck(email)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '이메일 형식이 잘못되었습니다.'; this.row.msg1 = '이메일 형식이 잘못되었습니다.';
this.row.msg2 = '확인해 주세요.'; this.row.msg2 = '확인해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._email.focus(); this.$refs._email.focus();
return false; return false;
} }
if(this.isNull(this.auth)){ if (this.isNull(this.auth)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '권한을 선택 해주세요.'; this.row.msg1 = '권한을 선택 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.$refs._auth.focus(); this.$refs._auth.focus();
return false; return false;
} }
if(this.isNull(this.stat)){ if (this.isNull(this.stat)) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '상태를 선택 해주세요.'; this.row.msg1 = '상태를 선택 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
// this.$refs._auth.focus(); // this.$refs._auth.focus();
return false; return false;
}
this.row.madangId=this.madangId;
this.row.name=this.userNm;
this.row.mdn=hp;
this.row.email=email;
if(this.insertType == 2){
this.row.auth='1003';
}else{
this.row.auth=this.auth;
}
this.row.stat=this.stat;
return true;
},
// 마당ID 조회
async searchMadangId(){
if(!this.madangId){
// this.row.title = '관리자/유치채널 관리';
// this.row.msg1 = '마당ID를 입력해주세요.';
// this.$refs.commmonModal.alertModalOpen(this.row);
// this.$refs.searchIdPopModal.searchIdModalOpen();
this.$refs.madangId.focus();
return false;
}
var params = {
"madangId": this.madangId
} }
console.log(this.madangId); this.row.madangId = this.madangId;
this.row.name = this.userNm;
this.row.mdn = hp;
this.row.email = email;
this.row.auth = this.auth;
this.row.stat = this.stat;
try { return true;
const response = await sysMgtApi.selectSearchMadangId(params); },
const result = response.data; // 마당ID 조회
console.log(result); async searchMadangId() {
if (result != null && result.retCode == "0000") {
this.madangId = result.data.madangId;
this.userNm = result.data.name;
this.email = result.data.email;
this.mdn = result.data.mdn;
// 마당ID조회 성공 팝업노출 if (!this.madangId) {
this.searchIdPop(); this.$refs.madangId.focus();
//console.log(this.userNm); return false;
}
var params = {
"madangId": this.madangId
}
console.log(this.madangId);
this.idCheck = true; try {
this.$refs._pwd1.focus(); const response = await sysMgtApi.selectSearchMadangId(params);
const result = response.data;
console.log(result);
if (result != null && result.retCode == "0000") {
this.madangId = result.data.madangId;
this.userNm = result.data.name;
this.email = result.data.email;
this.mdn = result.data.mdn;
this.code = result.data.code;
// 마당ID조회 성공 팝업노출
this.searchIdPop();
//console.log(this.userNm);
this.idCheck = true;
this.$refs._pwd1.focus();
return false; return false;
}else if(result.retCode == '1004'){ } else if (result.retCode == '1004') {
//alert('마당ID 정보가 없습니다.'); this.searchIdFailPop();
// this.row.title = '관리자/유치채널 관리'; this.idCheck = false;
// this.row.msg1 = '마당ID 정보가 없습니다.'; this.$refs.madangId.focus();
// this.$refs.commmonModal.alertModalOpen(this.row); return false;
this.searchIdFailPop(); } else {
this.idCheck = false; this.searchIdFailPop();
this.$refs.madangId.focus(); this.idCheck = false;
return false; this.$refs.madangId.focus();
}else { return false;
//alert('마당ID 조회에 실패하였습니다.'); }
// this.row.title = '관리자/유치채널 관리'; } catch (err) {
// this.row.msg1 = '마당ID 정보가 없습니다.'; this.searchIdFailPop();
// this.$refs.commmonModal.alertModalOpen(this.row); this.idCheck = false;
this.searchIdFailPop(); this.$refs.madangId.focus();
this.idCheck = false; return false;
this.$refs.madangId.focus(); }
return false;
} },
} catch(err) { searchIdPop() {
//alert("실패 하였습니다."); //alert('마당ID 조회 성공 팝업이동 ->');
// this.row.title = '관리자/유치채널 관리'; var params = {
// this.row.msg1 = '마당ID 정보가 없습니다.'; "madangId": this.madangId,
// this.$refs.commmonModal.alertModalOpen(this.row); "userNm": this.userNm,
this.searchIdFailPop(); "email": this.email,
this.idCheck = false; "mdn": this.mdn
this.$refs.madangId.focus(); }
return false; this.$refs.searchIdPopModal.searchIdPop(params);
} },
searchIdFailPop() {
}, //alert('마당ID 조회 실패 팝업이동 ->');
searchIdPop(){ this.$refs.searchIdPopModal.searchIdFailPop();
//alert('마당ID 조회 성공 팝업이동 ->'); },
var params = { resetRegPop() {
"madangId": this.madangId, this.formReset();
"userNm": this.userNm, this.$refs.madangId.focus();
"email": this.email, },
"mdn": this.mdn
}
this.$refs.searchIdPopModal.searchIdPop(params);
},
searchIdFailPop(){
//alert('마당ID 조회 실패 팝업이동 ->');
this.$refs.searchIdPopModal.searchIdFailPop();
},
resetRegPop(){
this.formReset();
this.$refs.madangId.focus();
},
// 모달 띄우기 // 모달 띄우기
ModalOpen(insertType){ ModalOpen(insertType) {
this.formReset(); this.formReset();
this.insertType=insertType; this.insertType = insertType;
console.log(insertType)
if(insertType === 2){
this.auth = '1002';
}
var dimmed = document.getElementsByClassName('modal20'); var dimmed = document.getElementsByClassName('modal20');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
this.setAuthData(); this.setAuthData();
}, },
// 모달 끄기 // 모달 끄기
ModalClose(){ ModalClose() {
var dimmed = document.getElementsByClassName('modal20'); var dimmed = document.getElementsByClassName('modal20');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
}, },
// 저장 후 부모창 호출. // 저장 후 부모창 호출.
toComplete(){ toComplete() {
this.getParent('adminList').$refs.table.reloadData(); this.getParent('adminList').$refs.table.reloadData();
this.ModalClose(); this.ModalClose();
}, },
async doInsert(){ async doInsert() {
if(this.doValidate()){ if (this.doValidate()) {
try { try {
const response = await sysMgtApi.insertAdmin(this.row); const response = await sysMgtApi.insertAdmin(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '저장 하였습니다.'; this.row.msg1 = '저장 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
this.toComplete(); this.toComplete();
} }
} catch(err) { } catch (err) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonSysModal.alertSysModalOpen(this.row);
} }
} }
}, },
setAuthData() { setAuthData() {
// 권한 옵션. // 권한 옵션.
api.commAuth().then(response => { api.commAuth().then(response => {
this.authType = response.data.data.list; this.authType = response.data.data.list;
}); });
}, },
formReset(){ formReset() {
var type= this.insertType; var type = this.insertType;
Object.assign(this.$data, this.$options.data()); Object.assign(this.$data, this.$options.data());
this.insertType = type; this.insertType = type;
}, },
} }
} }
</script> </script>

View File

@@ -1,12 +1,12 @@
<template> <template>
<div> <div>
<!-- s: 팝업 --> <!-- s: 팝업 -->
<div class="dimmed modal17" @click="searchIdFailModalClose();"></div> <div class="dimmed modal17" @click="searchIdFailModalClose();"></div>
<div class="popup-wrap modal17"> <div class="popup-wrap modal17">
<!-- 시스템관리 팝업 --> <!-- 시스템관리 팝업 -->
<!-- ID 조회 --> <!-- ID 조회 -->
<div class="popup modal17"> <div class="popup modal17">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">ID 조회</h3> <h3 class="pop-tit">ID 조회</h3>
@@ -18,10 +18,10 @@
<button class="btn-pcolor" @click="searchIdFailModalClose();">확인</button> <button class="btn-pcolor" @click="searchIdFailModalClose();">확인</button>
</div> </div>
</div> </div>
</div> </div>
<div class="dimmed modal18" @click="searchIdModalCancelClose();"></div> <div class="dimmed modal18" @click="searchIdModalCancelClose();"></div>
<div class="popup-wrap modal18"> <div class="popup-wrap modal18">
<div class="popup modal18"> <div class="popup modal18">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">관리자 ID 조회</h3> <h3 class="pop-tit">관리자 ID 조회</h3>
@@ -31,131 +31,159 @@
<p>관리자 정보를 입력하시겠습니까?</p> <p>관리자 정보를 입력하시겠습니까?</p>
</div> </div>
<ul class="pop-cont-detail"> <ul class="pop-cont-detail">
<li>마당ID : {{madangId}}</li> <li>마당ID : {{ madangId }}</li>
<li>이름 : {{name}}</li> <li>이름 : {{ name }}</li>
<li>휴대폰번호 : {{mdn}}</li> <li>휴대폰번호 : {{ mdn }}</li>
<li>이메일 : {{email}}</li> <li>이메일 : {{ email }}</li>
</ul> </ul>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button> <button class="btn-pcolor" @click="searchIdModalOkClose();">확인</button>
<button class="btn-default" @click="searchIdModalCancelClose();">취소</button> <button class="btn-default" @click="searchIdModalCancelClose();">취소</button>
</div> </div>
</div> </div>
<!-- 시스템관리 팝업 --> <!-- 시스템관리 팝업 -->
</div>
<!-- e: 팝업 --> <!-- <div class="dimmed alertSysModal1" @click="alertSysModalCancel();"></div>-->
</div> <!-- <div class="popup-wrap alertSysModal1">-->
<!-- &lt;!&ndash; 로그인실패: 확인 &ndash;&gt;-->
<!-- <div class="popup alertSysModal1">-->
<!-- <div class="pop-head">-->
<!-- <h3 class="pop-tit">{{ title }}</h3>-->
<!-- </div>-->
<!-- <div class="pop-cont">-->
<!-- <p>{{ msg1 }}</p>-->
<!-- <p v-if="msg2 !== ''">{{ msg2 }}</p>-->
<!-- <p v-if="msg3 !== ''">{{ msg3 }}</p>-->
<!-- <p v-if="msg4 !== ''">{{ msg4 }}</p>-->
<!-- </div>-->
<!-- <div class="popup-btn1">-->
<!-- <button class="btn-pcolor" @click="alertSysModalClose();">확인</button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
<!-- e: 팝업 -->
</div>
</template> </template>
<script> <script>
//import api from '@/service/api';
import sysMgtApi from '../service/sysMgtApi';
export default { export default {
data(){ data() {
return{ return {
authType: [], authType: [],
madangId:'', madangId: '',
adminPw:'', adminPw: '',
name:'', name: '',
mdn:'', mdn: '',
email:'', email: '',
auth:'', auth: '',
stat: '' code: '',
} stat: '',
row:{},
title:'',
msg1: '',
msg2: '',
msg3: '',
msg4: '',
targetFocus: '',
}
},
methods: {
// 모달 띄우기(성공모달)
searchIdModalOpen(target) {
console.log("SearchIdModalOpen");
var dimmed = document.getElementsByClassName('dimmed modal18');
var wrap = document.getElementsByClassName('popup-wrap modal18');
var obj = document.getElementsByClassName(target);
dimmed[0].style.display = 'block';
wrap[0].style.display = 'block';
obj[0].style.display = 'block';
}, },
methods :{ // 성공 모달 끄기(ok)
// 모달 띄우기(성공모달) searchIdModalOkClose() {
searchIdModalOpen(target){ var dimmed = document.getElementsByClassName('modal18');
console.log("SearchIdModalOpen"); for (var i = 0; i < dimmed.length; i++) {
var dimmed = document.getElementsByClassName('dimmed modal18'); dimmed[i].style.display = 'none';
var wrap = document.getElementsByClassName('popup-wrap modal18'); }
var obj = document.getElementsByClassName(target); },
dimmed[0].style.display = 'block'; // 성공 모달 끄기(cancel)
wrap[0].style.display = 'block'; searchIdModalCancelClose() {
obj[0].style.display = 'block'; var dimmed = document.getElementsByClassName('modal18');
}, for (var i = 0; i < dimmed.length; i++) {
// 성공 모달 끄기(ok) dimmed[i].style.display = 'none';
searchIdModalOkClose(){ }
var dimmed = document.getElementsByClassName('modal18'); this.$parent.resetRegPop();
for(var i = 0; i < dimmed.length; i++){ },
dimmed[i].style.display = 'none'; // 모달 띄우기(실패모달)
} searchIdFailModalOpen(target) {
}, console.log("SearchIdFailModalOpen");
// 성공 모달 끄기(cancel) var dimmed = document.getElementsByClassName('dimmed modal17');
searchIdModalCancelClose(){ var wrap = document.getElementsByClassName('popup-wrap modal17');
var dimmed = document.getElementsByClassName('modal18'); var obj = document.getElementsByClassName(target);
for(var i = 0; i < dimmed.length; i++){ dimmed[0].style.display = 'block';
dimmed[i].style.display = 'none'; wrap[0].style.display = 'block';
} obj[0].style.display = 'block';
this.$parent.resetRegPop(); },
}, // 실패 모달 끄기
// 모달 띄우기(실패모달) searchIdFailModalClose() {
searchIdFailModalOpen(target){ var dimmed = document.getElementsByClassName('modal17');
console.log("SearchIdFailModalOpen"); for (var i = 0; i < dimmed.length; i++) {
var dimmed = document.getElementsByClassName('dimmed modal17'); dimmed[i].style.display = 'none';
var wrap = document.getElementsByClassName('popup-wrap modal17'); }
var obj = document.getElementsByClassName(target); this.$parent.resetRegPop();
dimmed[0].style.display = 'block'; },
wrap[0].style.display = 'block'; searchIdPop(params) {
obj[0].style.display = 'block'; var userName = params.userNm;
}, this.madangId = params.madangId;
// 실패 모달 끄기 this.name = params.userNm;
searchIdFailModalClose(){ this.email = params.email;
var dimmed = document.getElementsByClassName('modal17'); this.mdn = params.mdn;
for(var i = 0; i < dimmed.length; i++){ this.code = params.code
dimmed[i].style.display = 'none'; //alert( userName + ': 조회 성공');
} var dimmed = document.getElementsByClassName('modal18');
this.$parent.resetRegPop(); for (var i = 0; i < dimmed.length; i++) {
}, dimmed[i].style.display = 'block';
searchIdPop(params){ }
var userName = params.userNm; //this.searchIdModalModalOpen('modal18');
this.madangId = params.madangId ; },
this.name = params.userNm; searchIdFailPop() {
this.email = params.email; //alert( '조회 실패');
this.mdn = params.mdn; var dimmed = document.getElementsByClassName('modal17');
for (var i = 0; i < dimmed.length; i++) {
//alert( userName + ': 조회 성공'); dimmed[i].style.display = 'block';
var dimmed = document.getElementsByClassName('modal18'); }
for(var i = 0; i < dimmed.length; i++){ },
dimmed[i].style.display = 'block'; // alertSysModalOpen(props) {
} // console.log(props);
//this.searchIdModalModalOpen('modal18'); // this.title = props.title;
}, // this.msg1 = props.msg1;
searchIdFailPop(){ // this.msg2 = props.msg2;
//alert( '조회 실패'); // this.msg3 = props.msg3;
var dimmed = document.getElementsByClassName('modal17'); // this.msg4 = props.msg4;
for(var i = 0; i < dimmed.length; i++){ //
dimmed[i].style.display = 'block'; // var dimmed = document.getElementsByClassName('alertSysModal1');
} // for (var i = 0; i < dimmed.length; i++) {
}, // dimmed[i].style.display = 'block';
//메뉴바 // }
testClick(){ // },
const menuList = document.querySelectorAll('.main_menu .is-sub'); // alertSysModalClose() {
for(const menu of menuList){ // var dimmed = document.getElementsByClassName('alertSysModal1');
menu.addEventListener('click', (e)=> { // for (var i = 0; i < dimmed.length; i++) {
if(e.target.classList.contains('menu_target') || e.target.classList.contains('menu_btn')){ // dimmed[i].style.display = 'none';
const menuListCheck = e.target.parentNode; // }
if(menuListCheck.classList.contains('is-current')){ // this.$parent.checkFocus();
menuListCheck.classList.remove('is-current'); // },
} else { // alertSysModalCancel() {
for(const other of menuList){ // var dimmed = document.getElementsByClassName('alertSysModal1');
other.classList.remove('is-current'); // for (var i = 0; i < dimmed.length; i++) {
} // dimmed[i].style.display = 'none';
menuListCheck.classList.add('is-current'); // }
} // this.$parent.checkFocus();
} // },
}) }
}
}
}
} }
</script> </script>
<!--<style>-->
<!-- .popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}-->
<!-- .popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }-->
<!-- .popup-btn-wrap button:hover {background: #000; color: #fff;}-->
<!-- </style>-->

View File

@@ -1,13 +1,13 @@
<template> <template>
<!-- <div class="wrap bg-wrap"> --> <!-- <div class="wrap bg-wrap"> -->
<div> <div>
<div class="dimmed alertModal" @click="alertModalCancel();"></div> <div class="dimmed alertSysModal" @click="alertSysModalCancel();"></div>
<div class="popup-wrap alertModal"> <div class="popup-wrap alertSysModal">
<!-- 로그인실패: 확인 --> <!-- 로그인실패: 확인 -->
<div class="popup alertModal"> <div class="popup alertSysModal">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">{{title}}</h3> <h3 class="pop-tit">{{ title }}</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>{{ msg1 }}</p> <p>{{ msg1 }}</p>
@@ -16,49 +16,49 @@
<p v-if="msg4 !== ''">{{ msg4 }}</p> <p v-if="msg4 !== ''">{{ msg4 }}</p>
</div> </div>
<div class="popup-btn1"> <div class="popup-btn1">
<button class="btn-pcolor" @click="alertModalClose();">확인</button> <button class="btn-pcolor" @click="alertSysModalClose();">확인</button>
</div> </div>
</div> </div>
</div> </div>
<div class="dimmed confirm" @click="confirmModalCancel();"></div> <div class="dimmed confirm" @click="confirmModalCancel();"></div>
<div class="popup-wrap confirm"> <div class="popup-wrap confirm">
<!-- 수정 확인 --> <!-- 수정 확인 -->
<div class="popup confirm"> <div class="popup confirm">
<div class="pop-head"> <div class="pop-head">
<h3 class="pop-tit">{{title}}</h3> <h3 class="pop-tit">{{ title }}</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>{{ msg1 }}</p> <p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p> <p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p> <p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p> <p v-if="msg4 !== ''">{{ msg4 }}</p>
</div> </div>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose();">확인</button> <button class="btn-pcolor" @click="confirmModalClose();">확인</button>
<button class="btn-default" @click="confirmModalCancel();">취소</button> <button class="btn-default" @click="confirmModalCancel();">취소</button>
</div> </div>
</div> </div>
</div> </div>
<div class="dimmed confirm2" @click="confirmModalCancel2();"></div> <div class="dimmed confirm2" @click="confirmModalCancel2();"></div>
<div class="popup-wrap confirm2"> <div class="popup-wrap confirm2">
<!-- 수정 확인 --> <!-- 수정 확인 -->
<div class="popup confirm2"> <div class="popup confirm2">
<div class="pop-head"> <div class="pop-head">
<h3 class="popup-tit">{{title}}</h3> <h3 class="popup-tit">{{ title }}</h3>
</div> </div>
<div class="pop-cont"> <div class="pop-cont">
<p>{{ msg1 }}</p> <p>{{ msg1 }}</p>
<p v-if="msg2 !== ''">{{ msg2 }}</p> <p v-if="msg2 !== ''">{{ msg2 }}</p>
<p v-if="msg3 !== ''">{{ msg3 }}</p> <p v-if="msg3 !== ''">{{ msg3 }}</p>
<p v-if="msg4 !== ''">{{ msg4 }}</p> <p v-if="msg4 !== ''">{{ msg4 }}</p>
</div> </div>
<div class="popup-btn2"> <div class="popup-btn2">
<button class="btn-pcolor" @click="confirmModalClose2();">확인</button> <button class="btn-pcolor" @click="confirmModalClose2();">확인</button>
<button class="btn-default" @click="confirmModalCancel2();">취소</button> <button class="btn-default" @click="confirmModalCancel2();">취소</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
@@ -66,21 +66,20 @@
<script> <script>
export default { export default {
name: "confirm", name: "confirm",
data(){ data() {
return{ return {
row:{}, row: {},
title:'', title: '',
msg1: '', msg1: '',
msg2: '', msg2: '',
msg3: '', msg3: '',
msg4: '', msg4: '',
targetFocus: '', targetFocus: '',
} }
}, },
methods :{ methods: {
alertModalOpen(props){ alertSysModalOpen(props) {
console.log('>>>>>>>>>> alertModalOpen');
console.log(props.msg1); console.log(props.msg1);
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
@@ -88,95 +87,95 @@ export default {
this.msg3 = props.msg3; this.msg3 = props.msg3;
this.msg4 = props.msg4; this.msg4 = props.msg4;
var dimmed = document.getElementsByClassName('alertModal'); var dimmed = document.getElementsByClassName('alertSysModal');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
}, },
alertModalClose(){ alertSysModalClose() {
var dimmed = document.getElementsByClassName('alertModal'); var dimmed = document.getElementsByClassName('alertSysModal');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.$parent.checkFocus(); this.$parent.checkFocus();
}, },
alertModalCancel(){ alertSysModalCancel() {
var dimmed = document.getElementsByClassName('alertModal'); var dimmed = document.getElementsByClassName('alertSysModal');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.$parent.checkFocus(); this.$parent.checkFocus();
}, },
// 모달 오픈 // 모달 오픈
confirmModalOpen(props){ confirmModalOpen(props) {
var dimmed = document.getElementsByClassName('confirm'); var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
this.msg2 = props.msg2; this.msg2 = props.msg2;
this.msg3 = props.msg3; this.msg3 = props.msg3;
this.msg4 = props.msg4; this.msg4 = props.msg4;
}, },
confirmModalOpen2(props){ confirmModalOpen2(props) {
var dimmed = document.getElementsByClassName('confirm2'); var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'block'; dimmed[i].style.display = 'block';
} }
this.title = props.title; this.title = props.title;
this.msg1 = props.msg1; this.msg1 = props.msg1;
this.msg2 = props.msg2; this.msg2 = props.msg2;
this.msg3 = props.msg3; this.msg3 = props.msg3;
this.msg4 = props.msg4; this.msg4 = props.msg4;
}, },
// 모달 끄기(ok) // 모달 끄기(ok)
confirmModalClose(){ confirmModalClose() {
var dimmed = document.getElementsByClassName('confirm'); var dimmed = document.getElementsByClassName('confirm');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(ok)
confirmModalClose2(){
var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){
dimmed[i].style.display = 'none';
}
this.row.result = true; this.row.result = true;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
// 모달 끄기(취소) // 모달 끄기(ok)
confirmModalCancel(){ confirmModalClose2() {
var dimmed = document.getElementsByClassName('confirm'); var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = true;
// 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row);
},
// 모달 끄기(취소)
confirmModalCancel() {
var dimmed = document.getElementsByClassName('confirm');
for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none';
}
this.row.result = false; this.row.result = false;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
// 모달 끄기(취소) // 모달 끄기(취소)
confirmModalCancel2(){ confirmModalCancel2() {
var dimmed = document.getElementsByClassName('confirm2'); var dimmed = document.getElementsByClassName('confirm2');
for(var i = 0; i < dimmed.length; i++){ for (var i = 0; i < dimmed.length; i++) {
dimmed[i].style.display = 'none'; dimmed[i].style.display = 'none';
} }
this.row.result = false; this.row.result = false;
// 부모 함수 호출. // 부모 함수 호출.
this.$parent.confirmCalbackFnc(this.row); this.$parent.confirmCalbackFnc(this.row);
}, },
} }
} }
</script> </script>

View File

@@ -1,353 +1,358 @@
import lodash from "lodash"; import lodash from "lodash";
const utils_mixin = { const utils_mixin = {
methods:{ methods: {
/** * 이메일 형식 체크 * * @param 데이터 */ /** * 이메일 형식 체크 * * @param 데이터 */
emailCheck(email,rtnArrYn) { emailCheck(email, rtnArrYn) {
if(this.isNull(rtnArrYn)){ if (this.isNull(rtnArrYn)) {
rtnArrYn='N'; rtnArrYn = 'N';
} }
// var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/; // var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/;
var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식 var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식
if(regExp.test(email) == false) { if (regExp.test(email) == false) {
// 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우 // 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return email; return email;
} }
return false; return false;
}else{ } else {
var myArray = regExp.exec(email); var myArray = regExp.exec(email);
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return true; return true;
} }
}, },
/** * 전화번호 포맷으로 변환 * * @param 데이터 */ /** * 전화번호 포맷으로 변환 * * @param 데이터 */
formatPhone(phoneNum,fmt,rtnArrYn) { formatPhone(phoneNum, fmt, rtnArrYn) {
if(this.isNull(fmt)){ if (this.isNull(fmt)) {
fmt=''; fmt = '';
} }
if(this.isNull(rtnArrYn)){ if (this.isNull(rtnArrYn)) {
fmt='N'; fmt = 'N';
} }
if(this.isPhone(phoneNum)) { if (this.isPhone(phoneNum)) {
var rtnNum; var rtnNum;
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/; var regExp = /(02)([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt + myArray[2]+fmt+myArray[3]; rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return rtnNum; return rtnNum;
} else { } else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/; regExp = /(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3]; rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return rtnNum; return rtnNum;
} else { } else {
return phoneNum; return phoneNum;
} }
}
} else {
return phoneNum;
} }
} else {
return phoneNum;
}
}, },
/** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */ /** * 핸드폰번호 포맷으로 변환 * * @param 데이터 */
formatMobile(phoneNum,fmt,rtnArrYn) { formatMobile(phoneNum, fmt, rtnArrYn) {
if(this.isNull(fmt)){ if (this.isNull(fmt)) {
fmt=''; fmt = '';
} }
if(this.isNull(rtnArrYn)){ if (this.isNull(rtnArrYn)) {
fmt='N'; fmt = 'N';
} }
if(this.isMobile(phoneNum)) { if (this.isMobile(phoneNum)) {
var rtnNum; var rtnNum;
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/; var regExp = /(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
rtnNum = myArray[1]+fmt+myArray[2]+fmt+myArray[3]; rtnNum = myArray[1] + fmt + myArray[2] + fmt + myArray[3];
if(rtnArrYn == 'Y'){ if (rtnArrYn == 'Y') {
return myArray; return myArray;
} }
return rtnNum; return rtnNum;
} else { } else {
return phoneNum; return phoneNum;
}
} else {
return phoneNum;
} }
} else {
return phoneNum;
}
}, },
/** * 전화번호 형식 체크 * * @param 데이터 */ /** * 전화번호 형식 체크 * * @param 데이터 */
isPhone(phoneNum) { isPhone(phoneNum) {
var regExp =/(02)([0-9]{3,4})([0-9]{4})$/; var regExp = /(02)([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
return true;
} else {
regExp =/(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
if(regExp.test(phoneNum)){
return true; return true;
} else { } else {
return false; regExp = /(0[3-9]{1}[0-9]{1})([0-9]{3,4})([0-9]{4})$/;
} if (regExp.test(phoneNum)) {
} return true;
} else {
return false;
}
}
}, },
/** * 핸드폰번호 형식 체크 * * @param 데이터 */ /** * 핸드폰번호 형식 체크 * * @param 데이터 */
isMobile(phoneNum) { isMobile(phoneNum) {
var regExp =/(01[016789])([0-9]{3,4})([0-9]{4})$/; var regExp = /(01[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
return true; return true;
} else { } else {
return false; return false;
} }
}, },
isMobile2(phoneNum) { isMobile2(phoneNum) {
var regExp =/(1[016789])([0-9]{3,4})([0-9]{4})$/; var regExp = /(1[016789])([0-9]{3,4})([0-9]{4})$/;
var myArray; var myArray;
if(regExp.test(phoneNum)){ if (regExp.test(phoneNum)) {
myArray = regExp.exec(phoneNum); myArray = regExp.exec(phoneNum);
return true; return true;
} else { } else {
return false; return false;
} }
}, },
isNull(obj){ isNull(obj) {
if(lodash.isNil(obj) || lodash.trim(obj) == ''){ if (lodash.isNil(obj) || lodash.trim(obj) == '') {
return true; return true;
}
return false;
},
getParent(name){
let p = this.$parent;
while(typeof p !== 'undefined'){
if(p.$options.name == name) {
return p;
}else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str){
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {
}
},
methods: {
selSesStorage(keyLike){
if(this.isNull(keyLike)){
return null;
}
if(sessionStorage.length > 0){
let keyList = [];
for(let i=0;i<sessionStorage.length;i++){
const keyNm = sessionStorage.key(i);
if(keyNm.indexOf(keyLike) > -1){
keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)});
} }
}
if(keyList.length > 0){
return keyList;
}
return null;
}
return null;
},
delSesStorage(keyList){
if(this.isNull(keyList)){
return null;
}
if(keyList.length > 0){
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
},
setGridMouseDownActive(){
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if(window.getEventListeners(ele).mousedown){
ele.removeEventListener('mousedown',window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars : function($event,regExp,hanYn){
if(this.isNull(hanYn)){
hanYn='N';
}
if(hanYn === 'N' && $event.type === 'keydown'){
if($event.keyCode === 229){
$event.preventDefault();
return false; return false;
} },
} getParent(name) {
let p = this.$parent;
if($event.type === 'keypress'){ while (typeof p !== 'undefined') {
//한글 처리 불가 if (p.$options.name == name) {
if(regExp.test(String.fromCharCode($event.charCode))) { return p;
} else {
p = p.$parent;
}
}
return false;
},
getJsonObj(str) {
return JSON.parse(JSON.stringify(str));
},
}
};
var chkPattern2 = {
data: function () {
return {}
},
methods: {
selSesStorage(keyLike) {
if (this.isNull(keyLike)) {
return null;
}
if (sessionStorage.length > 0) {
let keyList = [];
for (let i = 0; i < sessionStorage.length; i++) {
const keyNm = sessionStorage.key(i);
if (keyNm.indexOf(keyLike) > -1) {
keyList.push({name: keyNm, value: sessionStorage.getItem(keyNm)});
}
}
if (keyList.length > 0) {
return keyList;
}
return null;
}
return null;
},
delSesStorage(keyList) {
if (this.isNull(keyList)) {
return null;
}
if (keyList.length > 0) {
keyList.map((o) => (sessionStorage.removeItem(o.name)));
return true;
}
},
setGridMouseDownActive() {
const ele = document.querySelector(`div.tui-grid-container.tui-grid-show-lside-area`);
if (window.getEventListeners(ele).mousedown) {
ele.removeEventListener('mousedown', window.getEventListeners(ele).mousedown[0].listener);
}
},
restrictChars: function ($event, regExp, hanYn) {
if (this.isNull(hanYn)) {
hanYn = 'N';
}
if (hanYn === 'N' && $event.type === 'keydown') {
if ($event.keyCode === 229) {
$event.preventDefault();
return false;
}
}
if ($event.type === 'keypress') {
//한글 처리 불가
if (regExp.test(String.fromCharCode($event.charCode))) {
return true;
} else {
$event.preventDefault();
return false;
}
}
if (hanYn === 'N' && ($event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')) {
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g, '');
$event.preventDefault();
return false;
}
return true; return true;
}else{ },
$event.preventDefault(); setLenth: function (e, len) {
return false; this.cut(e, len);
} },
} onlyCustom: function (e, strRegExp, hanYn) {
var regExp_g = new RegExp(strRegExp, 'g');
if(hanYn === 'N' && ( $event.type === 'keyup' || $event.type === 'input' || $event.type === 'change' || $event.type === 'blur')){ this.cut(e);
$event.target.value = $event.target.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힣]/g,''); return this.restrictChars(e, regExp_g, hanYn);
$event.preventDefault(); },
return false; onlyCommon: function (strRegExp, e, len, isEventCall, hanYn) {
} var regExp_g = new RegExp(strRegExp, 'g');
return true; if (isEventCall === 'N') {
}, if (!this.cut(e, len, isEventCall)) {
setLenth: function (e, len) { return false;
this.cut(e, len); }
}, if (!regExp_g.test(e.value)) {
onlyCustom: function (e,strRegExp,hanYn) { return false;
var regExp_g = new RegExp(strRegExp,'g'); }
this.cut(e); return true;
return this.restrictChars(e,regExp_g,hanYn); }
}, this.cut(e, len);
onlyCommon: function(strRegExp, e, len, isEventCall, hanYn) { return this.restrictChars(e, regExp_g, hanYn);
var regExp_g = new RegExp(strRegExp,'g'); },
if(isEventCall === 'N'){ onlyNum: function (e, len, isEventCall) {
if(!this.cut(e, len, isEventCall)){ var strRegExp = '^[0-9]*$';
return false; return this.onlyCommon(strRegExp, e, len, isEventCall);
} },
if(!regExp_g.test(e.value)){ onlyEng: function (e, len, isEventCall) {
return false; var strRegExp = '^[A-Za-z]*$';
} return this.onlyCommon(strRegExp, e, len, isEventCall);
return true; },
} onlyLowerEng: function (e, len, isEventCall) {
this.cut(e, len); var strRegExp = '^[a-z]*$';
return this.restrictChars(e,regExp_g,hanYn); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyNum: function (e, len, isEventCall) { onlyUpperEng: function (e, len, isEventCall) {
var strRegExp = '^[0-9]*$'; var strRegExp = '^[A-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyEng: function (e, len, isEventCall) { onlyEmail: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z]*$'; var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyLowerEng: function (e, len, isEventCall) { onlyName: function (e, len, isEventCall) {
var strRegExp = '^[a-z]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyUpperEng: function (e, len, isEventCall) { onlyTitle: function (e, len, isEventCall) {
var strRegExp = '^[A-Z]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyEmail: function (e, len, isEventCall) { onlyText: function (e, len, isEventCall) {
var strRegExp = '^[a-zA-Z0-9_\.\-@._-]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyName: function (e, len, isEventCall) { onlyPassword: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z]*$'; var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyTitle: function (e, len, isEventCall) { onlyId: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$'; var strRegExp = '^[A-Za-z0-9_\.\-]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyText: function (e, len, isEventCall) { onlyIp: function (e, len, isEventCall) {
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9_-]*$'; var strRegExp = '^[0-9,.*]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyPassword: function (e, len, isEventCall) { onlyRoleNm_Space: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9!@#$%^&*]*$'; var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall, 'Y');
}, },
onlyId: function (e, len, isEventCall) { onlyRoleId_UnderBar: function (e, len, isEventCall) {
var strRegExp = '^[A-Za-z0-9_\.\-]*$'; var strRegExp = '^[a-zA-Z0-9_]*$';
return this.onlyCommon(strRegExp, e, len, isEventCall); return this.onlyCommon(strRegExp, e, len, isEventCall);
}, },
onlyIp: function (e, len, isEventCall) { cut: function (ele, len, isValidChk) {
var strRegExp = '^[0-9,.*]*$'; let e = ele;
return this.onlyCommon(strRegExp, e, len, isEventCall); if (typeof ele.target != "undefined") {
}, e = ele.target;
onlyRoleNm_Space: function (e, len, isEventCall) { }
var strRegExp = '^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z0-9]*$'; let max = this.isNull(len) ? e.attributes.maxlength.value : len;
return this.onlyCommon(strRegExp, e, len, isEventCall,'Y'); let str = e.value;
},
onlyRoleId_UnderBar: function (e, len, isEventCall) { if (this.bytes(str) > max) {
var strRegExp = '^[a-zA-Z0-9_]*$'; if (this.isNull(isValidChk)) {
return this.onlyCommon(strRegExp, e, len, isEventCall); e.value = this.cutBytes(str, max);
}, }
cut: function (ele, len, isValidChk) { return false;
let e=ele; }
if (typeof ele.target != "undefined") { return true;
e=ele.target; },
} cutBytes: function (str, len) {
let max = this.isNull(len) ? e.attributes.maxlength.value : len; while (1 === 1) {
let str = e.value; if (this.bytes(str) <= len) {
return str;
if (this.bytes(str) > max) { }
if(this.isNull(isValidChk)){ str = str.slice(0, -1);
e.value = this.cutBytes(str, max); }
} },
return false; bytes: function (str) {
} var length = ((s, b, i, c) => {
return true; // for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
}, // for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
cutBytes: function (str, len) { b = 0, i = 0;
while(1 === 1){ while (1 === 1) {
if(this.bytes(str) <= len){ c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function (str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0) != "0") {
str = "0" + str;
}
if (str.length < 10 || str.length > 12) {
return "";
}
if (isNaN(str)) {
return "";
}
if (str.substr(0, 2) != "01" && str.substr(0, 3) != "070" && str.substr(0, 4) != "0505" && str.substr(0, 4) != "0503") {
return "";
}
return str; return str;
}
str = str.slice(0,-1); },
} }
}, };
bytes: function (str) { export {utils_mixin, chkPattern2};
var length = ((s,b,i,c) => {
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?3:c>>7?2:1); // 한글 3바이트
// for(b=i=0;c=s.charCodeAt(i++);b+=c>>11?2:c>>7?1:1); //한글 2바이트
b=0,i=0;
while(1 === 1){
c = s.charCodeAt(i++);
if (isNaN(c)) {
break;
}
b += c >> 11 ? 2 : c >> 7 ? 1 : 1;
}
return b
})(str);
return length;
},
checkPhone: function(str) {
str = str.replace(/[-\s]+/g, '');
if (str.charAt(0)!="0"){
str = "0"+str;
}
if (str.length<10||str.length>12){return "";}
if (isNaN(str)){return ""; }
if (str.substr(0,2)!="01" && str.substr(0,3)!="070" && str.substr(0,4)!="0505" && str.substr(0,4)!="0503"){return ""; }
return str;
},
}
};
export { utils_mixin, chkPattern2 };

View File

@@ -1,70 +1,69 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">관리자/유치채널 관리</h3> <h3 class="title">관리자/유치채널 관리</h3>
<p class="breadcrumb">시스템관리 &gt; 관리자/유치채널 관리</p> <p class="breadcrumb">시스템관리 &gt; 관리자/유치채널 관리</p>
</div> </div>
<form autocomplete="off" class="search_form"> <div class="search_wrap">
<div class="search_wrap"> <div class="select_box">
<div class="select_box"> <label for="right" class="label">권한</label>
<label for="right" class="label">권한</label> <select name="" id="right" v-model="searchType1" @keyup.enter="search">
<select name="" id="right" v-model="searchType1" @keyup.enter="search"> <option value="">전체</option>
<option value="">전체</option> <option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i">
<option v-for="(option, i) in authType" v-bind:value="option.autCd" v-bind:key="i"> {{ option.autNm }}
{{ option.autNm }} </option>
</option> </select>
</select> </div>
</div> <div class="select_box">
<div class="select_box"> <label for="right" class="label">상태</label>
<label for="right" class="label">상태</label> <select name="" id="" v-model="searchType2" @keyup.enter="search">
<select name="" id="" v-model="searchType2" @keyup.enter="search"> <option value="" selected>전체</option>
<option value="" selected>전체</option> <option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i">
<option v-for="(option, i) in statType" v-bind:value="option.code" v-bind:key="i"> {{ option.codeNm }}
{{ option.codeNm }} </option>
</option> </select>
</select> </div>
</div> <div class="input_box id">
<div class="input_box id"> <label for="id1" class="label">ID</label>
<label for="id1" class="label">ID</label> <input type="text" id="id1" placeholder="검색어 입력" v-model.trim="grid.params.searchText1"
<input type="text" id="id1" placeholder="검색어 입력" v-model="grid.params.searchText1" @keyup.enter="search"/> @keyup.enter="search"/>
</div> </div>
<div class="input_box"> <div class="input_box">
<label for="name" class="label">이름(대리점명)</label> <label for="name" class="label">이름(대리점명)</label>
<input type="text" id="name" placeholder="검색어 입력" v-model="grid.params.searchText2" @keyup.enter="search"/> <input type="text" id="name" placeholder="검색어 입력" v-model.trim="grid.params.searchText2"
</div> @keyup.enter="search"/>
<button type="button" class="button grey" @click="search">조회</button> </div>
</div> <button type="button" class="button grey" @click="search">조회</button>
</form> </div>
<div class="info"> <div class="info">
<div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span></div> <div class="count"> <span>{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}</span></div>
<div class="button_group"> <div class="button_group">
<button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button> <button type="button" class="button blue admin add" @click="adminRegPopOpen();">관리자 등록</button>
<button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button> <button type="button" class="button blue channel add" @click="adminReg2PopOpen();">유치채널 등록</button>
<button type="button" class="button white delete del" @click="rowDelete();">삭제</button> <button type="button" class="button white delete del" @click="rowDelete();">삭제</button>
</div> </div>
</div> </div>
<div class="table"> <div class="table">
<custom-grid <custom-grid
ref="table" ref="table"
:totalItems="'totalItems'" :totalItems="'totalItems'"
:url="grid.url" :url="grid.url"
:pagePerRows="grid.pagePerRows" :pagePerRows="grid.pagePerRows"
:initialRequest="grid.initialRequest" :initialRequest="grid.initialRequest"
:pagination="grid.pagination" :pagination="grid.pagination"
:isCheckbox="grid.isCheckbox" :isCheckbox="grid.isCheckbox"
:columns="grid.columns" :columns="grid.columns"
:noDataStr="grid.noDataStr" :noDataStr="grid.noDataStr"
:addCls="grid.addCls" :addCls="grid.addCls"
:header="grid.headder" :header="grid.headder"
></custom-grid> ></custom-grid>
</div> </div>
<admin-reg-pop ref="adminRegModal"> </admin-reg-pop> <admin-reg-pop ref="adminRegModal"></admin-reg-pop>
<!-- <admin-reg2-pop ref="adminReg2Modal"> </admin-reg2-pop> --> <admin-detail-pop ref="adminDetailModal"></admin-detail-pop>
<admin-detail-pop ref="adminDetailModal"> </admin-detail-pop> <common-modal ref="commmonModal"></common-modal>
<common-modal ref="commmonModal"></common-modal> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
@@ -77,219 +76,220 @@ import sysMgtApi from "../service/sysMgtApi.js";
class CustomATagRenderer { class CustomATagRenderer {
constructor(props) { constructor(props) {
this.props = props; this.props = props;
const el = document.createElement('a'); const el = document.createElement('a');
el.href = 'javascript:void(0);'; el.href = 'javascript:void(0);';
el.className = 'btn_text'; el.className = 'btn_text';
el.innerText= String(props.colValue) el.innerText = String(props.colValue)
this.el = el; this.el = el;
} }
getElement() { getElement() {
return this.el; return this.el;
} }
addEvent(selEl) { addEvent(selEl) {
selEl.addEventListener("click", () => { selEl.addEventListener("click", () => {
const { callback } = this.props["cgrido" + this.props.colName].options; const {callback} = this.props["cgrido" + this.props.colName].options;
callback(this.props); callback(this.props);
}); });
} }
} }
export default { export default {
name: 'adminList', name: 'adminList',
data() { data() {
return { return {
row: {}, row: {},
authType: [], authType: [],
statType: [], statType: [],
cate2Code: "", cate2Code: "",
totalItems: 0, totalItems: 0,
// 테이블 리스트 데이터 // 테이블 리스트 데이터
perPageCnt: 20, perPageCnt: 20,
searchType1:'', searchType1: '',
searchType2:'', searchType2: '',
grid: { grid: {
url: '/api/v1/bo/sysMgt/adminList', url: '/api/v1/bo/sysMgt/adminList',
pagePerRows: 20, pagePerRows: 20,
pagination: true, pagination: true,
isCheckbox: true, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거 isCheckbox: true, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
initialRequest: false, initialRequest: false,
addCls: 'box_OFvis', addCls: 'box_OFvis',
columns: [ columns: [
{ name: 'no', header: 'NO', align: 'center', width: '15%'}, {name: 'no', header: 'NO', align: 'center', width: '15%'},
{ name: 'auth', header: '권한', align: 'center', width: '15%' }, {name: 'auth', header: '권한', align: 'center', width: '15%'},
{ name: 'name', header: '이름(대리점명)', align: 'center', width: '20%'}, {name: 'name', header: '이름(대리점명)', align: 'center', width: '20%'},
{ name: 'adminId', header: 'ID', align: 'center', width: '20%', renderer: { {
name: 'adminId', header: 'ID', align: 'center', width: '20%', renderer: {
type: CustomATagRenderer type: CustomATagRenderer
, options: { , options: {
callback: this.detailPop, callback: this.detailPop,
} }
} }
}, },
{ name: 'adminStat', header: '상태', align: 'center', width: '5%', cls: 'td_line'}, {name: 'adminStat', header: '상태', align: 'center', width: '5%', cls: 'td_line'},
{ name: 'regDt', header: '등록일', align: 'center', width: '20%'} {name: 'regDt', header: '등록일', align: 'center', width: '20%'}
], ],
noDataStr: '검색 결과가 없습니다.', noDataStr: '검색 결과가 없습니다.',
params: { params: {
searchType1: '', searchType1: '',
searchType2: '', searchType2: '',
searchText1: '', searchText1: '',
searchText2: '' searchText2: ''
}, },
excelHeader: [] excelHeader: []
} }
}; };
}, },
components: { components: {
customGrid: customGrid, customGrid: customGrid,
// SystemPopup, // SystemPopup,
AdminRegPop, AdminRegPop,
commonModal, commonModal,
AdminDetailPop, AdminDetailPop,
}, },
created(){ created() {
this.setCodeData(); this.setCodeData();
//let cont = document.querySelector(".wrap"); //let cont = document.querySelector(".wrap");
//cont.classList.add("main_wrap"); //cont.classList.add("main_wrap");
}, },
destroyed() { destroyed() {
}, },
mounted() { mounted() {
let page = 1; let page = 1;
// 페이지 정보 및 검색 조건 // 페이지 정보 및 검색 조건
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
console.log('getCondition : '+getCondition); console.log('getCondition : ' + getCondition);
console.log(getCondition)
// store에 저장된 페이지 정보 및 검색 조건을 불러오기 // store에 저장된 페이지 정보 및 검색 조건을 불러오기
let isKeep = false; let isKeep = false;
if (getCondition) { if (getCondition) {
this.grid.pagePerRows = getCondition.perPage; this.grid.pagePerRows = getCondition.perPage;
this.grid.params = getCondition.params; this.grid.params = getCondition.params;
page = getCondition.page; page = getCondition.page;
isKeep = true; isKeep = true;
} }
this.search(isKeep); this.search(isKeep);
}, },
methods: { methods: {
search: function(isKeep) { search: function (isKeep) {
console.log('this.perPageCnt'+this.perPageCnt); console.log(isKeep)
console.log('this.perPageCnt' + this.perPageCnt);
//console.log(this.grid.params); //console.log(this.grid.params);
this.grid.params.searchType1 = this.searchType1 this.grid.params.searchType1 = this.searchType1
this.grid.params.searchType2 = this.searchType2 this.grid.params.searchType2 = this.searchType2
this.grid.pagePerRows = this.perPageCnt
this.$refs.table.search(this.grid.params, isKeep); this.$refs.table.search(this.grid.params, isKeep);
this.sendStoreData(); this.sendStoreData();
}, },
detailPop(props) { detailPop(props) {
// this.getMainSlot().popupView(4); // this.getMainSlot().popupView(4);
// this.setDtlPpPrm(props); // this.setDtlPpPrm(props);
this.$refs.adminDetailModal.adminDetailModalOpen(props); this.$refs.adminDetailModal.adminDetailModalOpen(props);
}, },
ModalOpen: function(target){ ModalOpen: function (target) {
//this.$refs.systemModal.ModalOpen(target); //this.$refs.systemModal.ModalOpen(target);
}, },
adminRegPopOpen: function(){ adminRegPopOpen: function () {
this.$refs.adminRegModal.ModalOpen(1); this.$refs.adminRegModal.ModalOpen(1);
}, },
adminReg2PopOpen: function(){ adminReg2PopOpen: function () {
this.$refs.adminRegModal.ModalOpen(2); this.$refs.adminRegModal.ModalOpen(2);
//this.$refs.adminReg2Modal.adminReg2ModalOpen();// //this.$refs.adminReg2Modal.adminReg2ModalOpen();//
}, },
doValidate(){ //로우데이터 삭제하도록 수정 doValidate() { //로우데이터 삭제하도록 수정
console.log("totalItems >> " + this.totalItems); console.log("totalItems >> " + this.totalItems);
if(this.totalItems == 0){ if (this.totalItems == 0) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '검색 결과가 없습니다.'; this.row.msg1 = '검색 결과가 없습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
var chkList = this.$refs.table.checkedElementDatas(); var chkList = this.$refs.table.checkedElementDatas();
if(chkList.length == 0){ if (chkList.length == 0) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '삭제대상을 체크 해주세요.'; this.row.msg1 = '삭제대상을 체크 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
// for(var i = 0; i < chkList.length; i++){ // for(var i = 0; i < chkList.length; i++){
// alert(chkList[i].adminId); // alert(chkList[i].adminId);
// } // }
const param = chkList.map((row)=>({adminId:row.adminId})); const param = chkList.map((row) => ({adminId: row.adminId}));
console.log(param) console.log(param)
this.row.list = param; this.row.list = param;
console.log(this.row); console.log(this.row);
return true; return true;
}, },
sendStoreData: function() { sendStoreData: function () {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP); console.log("==========getP : " + getP);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
const getCondition = this.$store.getters['searchcondition/getSearchCondition']; const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
//console.log("getCondition : "+ getCondition.perPage); //console.log("getCondition : "+ getCondition.perPage);
}, },
setCodeData() { setCodeData() {
// 상태 옵션 셋팅. // 상태 옵션 셋팅.
api.commCode({'grpCd' : 'ADM_STTUS_CD'}).then(response => { api.commCode({'grpCd': 'ADM_STTUS_CD'}).then(response => {
this.statType = response.data.data.list; this.statType = response.data.data.list;
}); });
api.commAuth().then(response => { api.commAuth().then(response => {
this.authType = response.data.data.list; this.authType = response.data.data.list;
}); });
}, },
rowDelete(){ rowDelete() {
if(this.doValidate()){ if (this.doValidate()) {
this.row.title ='관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 ='삭제 하시겠습니까?' this.row.msg1 = '삭제 하시겠습니까?'
this.$refs.commmonModal.confirmModalOpen2(this.row); this.$refs.commmonModal.confirmModalOpen2(this.row);
} }
}, },
async deleteRow(){ async deleteRow() {
try { try {
let response = await sysMgtApi.deleteAdmin(this.row); let response = await sysMgtApi.deleteAdmin(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.$refs.table.reloadData(); this.$refs.table.reloadData();
return; return;
} }
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} catch(err) { } catch (err) {
this.row.title = '관리자/유치채널 관리'; this.row.title = '관리자/유치채널 관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
}, },
confirmCalbackFnc(props){ confirmCalbackFnc(props) {
console.log(props) console.log(props)
if(props.result){ if (props.result) {
this.deleteRow(); this.deleteRow();
} }
}, },
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {
const getP = this.$refs.table.getPagination(); const getP = this.$refs.table.getPagination();
console.log("==========getP : " + getP._currentPage); console.log("==========getP : " + getP._currentPage);
this.$store.commit('searchcondition/updateSearchCondition', { this.$store.commit('searchcondition/updateSearchCondition', {
page: getP._currentPage, page: getP._currentPage,
perPage: this.perPageCnt, perPage: this.perPageCnt,
params: this.grid.params params: this.grid.params
}); });
// 라우트 하기전 실행 // 라우트 하기전 실행
next(); next();
} }
}; };
</script> </script>

View File

@@ -1,201 +1,189 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">권한 관리</h3> <h3 class="title">권한 관리</h3>
<p class="breadcrumb">시스템관리 &gt; 권한 관리</p> <p class="breadcrumb">시스템관리 &gt; 권한 관리</p>
</div> </div>
<div class="info"> <div class="info">
<div class="title">권한 추가</div> <div class="title">권한 추가</div>
</div> </div>
<div class="table table_form"> <div class="table table_form">
<form autocomplete="off"> <table>
<table> <tbody>
<tbody> <tr class="tr_input w30">
<tr class="tr_input w30"> <th>권한명</th>
<th>권한명</th> <td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td>
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td> </tr>
</tr> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>권한 코드</th>
<th>권한 코드</th> <td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd"></td>
<td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd"></td> <th class="center">상태</th>
<th class="center">상태</th> <td class="td_radio" colspan="2">
<td class="td_radio" colspan="2"> <input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked>
<input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked> <label for="right_radio1">사용</label>
<label for="right_radio1">사용</label> <input type="radio" name="state" value="02" id="right_radio2" v-model="stat">
<input type="radio" name="state" value="02" id="right_radio2" v-model="stat"> <label for="right_radio2">정지</label>
<label for="right_radio2">정지</label> </td>
</td> </tr>
</tr> <tr class="tr_input w100">
<tr class="tr_input w100"> <th>권한 설명</th>
<th>권한 설명</th> <td colspan="5"><input type="text" v-model="authDesc"></td>
<td colspan="5"><input type="text" v-model="authDesc"></td> </tr>
</tr> <tr class="tr_checkbox">
<tr class="tr_checkbox"> <td class="check" rowspan="2">
<td class="check" rowspan="2"> <p>메뉴 권한 체크</p>
<p>메뉴 권한 체크</p> <input type="checkbox" id="right_check0" ref="checkedAuthMenuAll_" v-model="checkedAuthMenuAll">
<input type="checkbox" id="right_check0" v-model="checkedAuthMenuAll"> <div class="label_group">
<div class="label_group"> <label for="right_check0"></label>
<label for="right_check0"></label> <label for="right_check0">전체 체크</label>
<label for="right_check0">전체 체크</label> </div>
</div> </td>
</td> <td class="check">
<td class="check"> <p>고객관리</p>
<p>고객관리</p> <input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check1"></label>
<label for="right_check1"></label> <label for="right_check1">청약고객관리</label>
<label for="right_check1">청약고객관리</label> </div>
</div> </td>
</td> <td class="check">
<td class="check"> <p>유치현황관리</p>
<p>유치현황관리</p> <div class="label_group">
<!-- <input type="checkbox" id="right_check2" value="" v-model="checkedAuthMenu"> <tr>
<div class="label_group"> <td class="td_radio">
<label for="right_check2"></label> <input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth">
<label for="right_check2">유치현황관리</label> <label for="channel_radio1">유치채널현황</label>
</div> <br/><br/>
<input type="checkbox" id="right_check3" value="2003" v-model="checkedAuthMenu"> <input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth">
<div class="label_group"> <label for="channel_radio2">유치현황관리</label>
<label for="right_check3"></label> </td>
<label for="right_check3">유치관리자 현황</label> </tr>
</div> --> </div>
<div class="label_group"> </td>
<tr> <td class="check">
<td class="td_radio" > <p>서비스관리</p>
<input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth"> <input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu">
<label for="channel_radio1">유치채널현황</label> <div class="label_group">
<br/><br/> <label for="right_check4"></label>
<input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth"> <label for="right_check4">080수신거부 인증코드 조회</label>
<label for="channel_radio2">유치현황관리</label> </div>
</td> </td>
</tr> <td class="check">
</div> <p>정산</p>
</td> <input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu">
<td class="check"> <div class="label_group">
<p>서비스관리</p> <label for="right_check5"></label>
<input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu"> <label for="right_check5">정산이력</label>
<div class="label_group"> </div>
<label for="right_check4"></label> </td>
<label for="right_check4">080수신거부 인증코드 조회</label> <td class="check">
</div> <p>채널관리</p>
</td> <input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu">
<td class="check"> <div class="label_group">
<p>정산</p> <label for="right_check6"></label>
<input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu"> <label for="right_check6">알림톡 템플릿 관리</label>
<div class="label_group"> </div>
<label for="right_check5"></label> </td>
<label for="right_check5">정산이력</label> </tr>
</div> <tr>
</td> <td class="check">
<td class="check"> <p>발신번호관리</p>
<p>채널관리</p> <input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check7"></label>
<label for="right_check6"></label> <label for="right_check7">발신프로필 관리</label>
<label for="right_check6">알림톡 템플릿 관리</label> </div>
</div> <input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu">
</td> <div class="label_group">
</tr> <label for="right_check8"></label>
<tr> <label for="right_check8">문자 발신번호 관리</label>
<td class="check"> </div>
<p>발신번호관리</p> <input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check9"></label>
<label for="right_check7"></label> <label for="right_check9">발신번호 승인</label>
<label for="right_check7">발신프로필 관리</label> </div>
</div> </td>
<input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>모니터링</p>
<label for="right_check8"></label> <input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu">
<label for="right_check8">문자 발신번호 관리</label> <div class="label_group">
</div> <label for="right_check10"></label>
<input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu"> <label for="right_check10">발송내역</label>
<div class="label_group"> </div>
<label for="right_check9"></label> <input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu">
<label for="right_check9">발신번호 승인</label> <div class="label_group">
</div> <label for="right_check11"></label>
</td> <label for="right_check11">실시간발송현황</label>
<td class="check"> </div>
<p>모니터링</p> </td>
<input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>리스크관리</p>
<label for="right_check10"></label> <input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu">
<label for="right_check10">발송내역</label> <div class="label_group">
</div> <label for="right_check12"></label>
<input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu"> <label for="right_check12">발신번호 차단</label>
<div class="label_group"> </div>
<label for="right_check11"></label> <input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu">
<label for="right_check11">실시간발송현황</label> <div class="label_group">
</div> <label for="right_check13"></label>
</td> <label for="right_check13">080수신번호 차단</label>
<td class="check"> </div>
<p>리스크관리</p> <input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check14"></label>
<label for="right_check12"></label> <label for="right_check14">메시지 차단</label>
<label for="right_check12">발신번호 차단</label> </div>
</div> <input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check15"></label>
<label for="right_check13"></label> <label for="right_check15">차단 내역</label>
<label for="right_check13">080수신번호 차단</label> </div>
</div> </td>
<input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>발송통계</p>
<label for="right_check14"></label> <input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu">
<label for="right_check14">메시지 차단</label> <div class="label_group">
</div> <label for="right_check16"></label>
<input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu"> <label for="right_check16">날짜별 통계</label>
<div class="label_group"> </div>
<label for="right_check15"></label> <input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu">
<label for="right_check15">차단 내역</label> <div class="label_group">
</div> <label for="right_check17"></label>
</td> <label for="right_check17">사업자별 통계</label>
<td class="check"> </div>
<p>발송통계</p> </td>
<input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>시스템 관리</p>
<label for="right_check16"></label> <input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu">
<label for="right_check16">날짜별 통계</label> <div class="label_group">
</div> <label for="right_check18"></label>
<input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu"> <label for="right_check18">관리자/유치채널 관리</label>
<div class="label_group"> </div>
<label for="right_check17"></label> <input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu">
<label for="right_check17">사업자별 통계</label> <div class="label_group">
</div> <label for="right_check19"></label>
</td> <label for="right_check19">권한 관리</label>
<td class="check"> </div>
<p>시스템 관리</p> </td>
<input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu"> </tr>
<div class="label_group"> </tbody>
<label for="right_check18"></label> </table>
<label for="right_check18">관리자/유치채널 관리</label> </div>
</div> <div class="pop-btn2">
<input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu"> <button class="btn-default" type="button" @click="authAddCancel()">취소</button>
<div class="label_group"> <button class="btn-pcolor" type="button" @click="authAddSave()">저장</button>
<label for="right_check19"></label> </div>
<label for="right_check19">권한 관리</label> </div>
</div> <common-modal ref="commmonModal"></common-modal>
</td> </div>
</tr>
</tbody>
</table>
</form>
</div>
<div class="pop-btn2">
<button class="btn-default" type="button" @click="authAddCancel()">취소</button>
<button class="btn-pcolor" type="button" @click="authAddSave()">저장</button>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template> </template>
<script> <script>
import sysMgtApi from "../service/sysMgtApi.js"; import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
//import commonModal from "@/components/modal/commonModal"; //import commonModal from "@/components/modal/commonModal";
import commonModal from "../components/commonModal"; import commonModal from "../components/commonModal";
@@ -204,181 +192,186 @@ export default {
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
data() { data() {
return { return {
row: {}, row: {},
authType: [], authType: [],
authNm: "", authNm: "",
authCd: "", authCd: "",
authDesc: "", authDesc: "",
stat: "01", // 등록화면 상태 Default 값 지정(사용:01) stat: "01", // 등록화면 상태 Default 값 지정(사용:01)
defaultAuthMenu:["2001","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019"], defaultAuthMenu: ["2001", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019"],
checkedAuthMenu:[], checkedAuthMenu: [],
channelAuth: "", channelAuth: "",
}; };
}, },
components: { components: {
commonModal, commonModal,
},
created() {
//this.setCodeData();
}, },
created(){
//this.setCodeData();
},
destroyed() { destroyed() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doValidate(){ doValidate() {
// 필수 등록정보 체크 // 필수 등록정보 체크
if(this.isNull(this.authNm)){ if (this.isNull(this.authNm)) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.'; this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1'; this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if(this.isNull(this.authCd)){ if (this.isNull(this.authCd)) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한 코드를 입력해 주세요.'; this.row.msg1 = '권한 코드를 입력해 주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if(this.authCd.length > 5){ if (this.authCd.length > 5) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.'; this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if(this.isNull(this.stat)){ if (this.isNull(this.stat)) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.'; this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if(this.checkedAuthMenu.length == 0){ if (this.checkedAuthMenu.length == 0) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.'; this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
return true; return true;
},
authAddCancel() {
// 권한리스트 페이지로 이동
this.$router.push({ name: 'authList'});
}, },
authAddSave(){ authAddCancel() {
if(this.doValidate()){ // 권한리스트 페이지로 이동
this.row.title = '시스템관리'; this.$router.push({name: 'authList'});
this.row.msg1 = '권한 등록 저장하시겠습니까?';
this.row.focusTaget = '0'; },
this.$refs.commmonModal.confirmModalOpen(this.row); authAddSave() {
return false; if (this.doValidate()) {
} this.row.title = '시스템관리';
}, this.row.msg1 = '권한 등록 저장하시겠습니까?';
async authInsert(){ this.row.focusTaget = '0';
this.$refs.commmonModal.confirmModalOpen(this.row);
var reqAuthMenuArr = this.checkedAuthMenu; return false;
var listArr = []; }
var dataMap = {}; },
if(this.channelAuth !== ''){ async authInsert() {
dataMap.menuNo = this.channelAuth;
listArr.push(dataMap); var reqAuthMenuArr = this.checkedAuthMenu;
} var listArr = [];
for(var i = 0; i< reqAuthMenuArr.length; i++){ var dataMap = {};
dataMap = {}; if (this.channelAuth !== '') {
dataMap.menuNo = reqAuthMenuArr[i]; dataMap.menuNo = this.channelAuth;
listArr.push(dataMap); listArr.push(dataMap);
}
for (var i = 0; i < reqAuthMenuArr.length; i++) {
dataMap = {};
dataMap.menuNo = reqAuthMenuArr[i];
listArr.push(dataMap);
}
this.row.authCd = this.authCd;
this.row.authNm = this.authNm;
this.row.authDesc = this.authDesc;
this.row.stat = this.stat;
this.row.list = listArr;
console.log(this.row);
try {
let response = await sysMgtApi.insertAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({name: 'authList'});
} else if (result.retCode == "4017") {
//alert("권한코드가 이미 존재합니다.");
//this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한코드가 이미 존재합니다.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
} else {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
} }
} catch (err) {
this.row.authCd = this.authCd; //alert("실패 하였습니다.");
this.row.authNm = this.authNm; this.row.title = '시스템관리';
this.row.authDesc = this.authDesc; this.row.msg1 = '실패 하였습니다.';
this.row.stat = this.stat; this.row.focusTaget = '0';
this.row.list = listArr; this.$refs.commmonModal.alertModalOpen(this.row);
return false;
console.log(this.row); }
try {
let response = await sysMgtApi.insertAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({ name: 'authList'});
} else if(result.retCode == "4017"){
//alert("권한코드가 이미 존재합니다.");
//this.$refs._authCd.focus();
this.row.title = '시스템관리';
this.row.msg1 = '권한코드가 이미 존재합니다.';
this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
} else {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}, },
checkFocus(){ checkFocus() {
if(this.row.focusTaget === '1'){ if (this.row.focusTaget === '1') {
this.$refs._authNm.focus(); this.$refs._authNm.focus();
} else if(this.row.focusTaget === '2'){ } else if (this.row.focusTaget === '2') {
this.$refs._authCd.focus(); this.$refs._authCd.focus();
} }
}, },
confirmCalbackFnc(props){ confirmCalbackFnc(props) {
if(props.result){ if (props.result) {
this.authInsert(); this.authInsert();
} }
} }
}, },
computed: { computed: {
// 체크박스 전체선택 기능 // 체크박스 전체선택 기능
checkedAuthMenuAll : { checkedAuthMenuAll: {
get: function () { get: function () {
return this.defaultAuthMenu.length === this.checkedAuthMenu.length; if (this.defaultAuthMenu.length === this.checkedAuthMenu.length) {
}, if (this.channelAuth === '') {
set: function (e) { return false;
//this.checkedAuthMenu = e ? this.defaultAuthMenu : [];
if(e){
this.checkedAuthMenu = this.defaultAuthMenu;
if(this.channelAuth === ''){
this.channelAuth = '2002';
}
} else {
this.checkedAuthMenu = [];
this.channelAuth = '';
}
} }
return true;
} else {
return false;
}
},
set: function (e) {
if (e) {
this.checkedAuthMenu = this.defaultAuthMenu;
if (this.channelAuth === '') {
this.channelAuth = '2002';
}
} else {
this.checkedAuthMenu = [];
this.channelAuth = '';
}
} }
}
} }
}; };
</script> </script>

View File

@@ -1,73 +1,56 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">권한 관리</h3> <h3 class="title">권한 관리</h3>
<p class="breadcrumb">시스템관리 &gt; 권한 관리</p> <p class="breadcrumb">시스템관리 &gt; 권한 관리</p>
</div> </div>
<div class="info"> <div class="info">
<div class="count"> <span>{{totalCnt}}</span></div> <div class="count"> <span>{{ totalCnt }}</span></div>
<div class="button_group"> <div class="button_group">
<button type="button" class="button blue add" @click="insertAuth()">권한 추가</button> <button type="button" class="button blue add" @click="insertAuth()">권한 추가</button>
</div> </div>
</div> </div>
<div class="table"> <div class="table">
<table> <table>
<colgroup> <colgroup>
<col width="10%"/> <col width="10%"/>
<col width="20%"/> <col width="20%"/>
<col width="20%"/> <col width="20%"/>
<col width="15%"/> <col width="15%"/>
<col width="20%"/> <col width="20%"/>
<col width="15%"/> <col width="15%"/>
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr>
<th>NO</th> <th>NO</th>
<th>코드</th> <th>코드</th>
<th>권한명</th> <th>권한명</th>
<th>상태</th> <th>상태</th>
<th>등록일</th> <th>등록일</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(option, i) in list" v-bind:key="i"> <tr v-for="(option, i) in list" v-bind:key="i">
<td>{{ option.no }}</td> <td>{{ option.no }}</td>
<td>{{ option.authCd }}</td> <td>{{ option.authCd }}</td>
<td>{{ option.authNm }}</td> <td>{{ option.authNm }}</td>
<td>{{ option.authStat }}</td> <td>{{ option.authStat }}</td>
<td>{{ option.regDt }}</td> <td>{{ option.regDt }}</td>
<!-- <td v-if="option.authCd !== '1001' && option.authCd !== '1002'" class="two_btn_group"> <td v-if="option.authCd === '1001' || option.authCd === '1002'" class="two_btn_group">
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button> </td>
<button type="button" class="button white delete" @click="deleteAuth(option.authCd)">삭제</button> <td v-else class="two_btn_group">
</td> --> <button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button>
<td v-if="option.authCd === '1001' || option.authCd === '1002'" class="two_btn_group"> <button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button>
</td> </td>
<td v-else class="two_btn_group"> </tr>
<button type="button" class="button grey" @click="updateAuth(option.authCd)">수정</button> </tbody>
<button type="button" class="button white delete" @click="authDelete(option.authCd)">삭제</button> </table>
</td> </div>
</tr> <common-modal ref="commmonModal"></common-modal>
<!-- </div>
<tr> </div>
<td>4</td>
<td>Admin_01</td>
<td>슈퍼관리자</td>
<td>사용</td>
<td>2022-03-10</td>
<td class="two_btn_group">
<button type="button" class="button grey" onclick="location.href='system_right_modify.html';">수정</button>
<button type="button" class="button white delete">삭제</button>
</td>
</tr>
-->
</tbody>
</table>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</div>
</template> </template>
<script> <script>
@@ -78,87 +61,87 @@ export default {
name: 'authList', name: 'authList',
data() { data() {
return { return {
row: {}, row: {},
list:[], list: [],
totalCnt: '', totalCnt: '',
}; };
},
components: {
commonModal,
}, },
created(){ components: {
this.getAuthList(); commonModal,
},
created() {
this.getAuthList();
}, },
destroyed() { destroyed() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
async getAuthList(){ async getAuthList() {
console.log('getAuthList Start'); console.log('getAuthList Start');
//this.row.serviceId = serviceId; //this.row.serviceId = serviceId;
try { try {
const response = await sysMgtApi.authList(this.row); const response = await sysMgtApi.authList(this.row);
const result = response.data; const result = response.data;
console.log(result); console.log(result);
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.list = result.data.list; this.list = result.data.list;
this.totalCnt = result.data.list.length; this.totalCnt = result.data.list.length;
} else { } else {
this.row.title ='권한 관리'; this.row.title = '권한 관리';
this.row.msg1 ='조회정보가 없습니다.' this.row.msg1 = '조회정보가 없습니다.'
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
} catch(err) { } catch (err) {
this.row.title ='권한 관리'; this.row.title = '권한 관리';
this.row.msg1 ='실패 하였습니다.' this.row.msg1 = '실패 하였습니다.'
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
}, },
insertAuth(){ insertAuth() {
//console.log("권한추가 페이지 이동"); //console.log("권한추가 페이지 이동");
this.$router.push({ name: 'authAdd'}); this.$router.push({name: 'authAdd'});
}, },
updateAuth(target){ updateAuth(target) {
//console.log("수정페이지로 이동:"+target); //console.log("수정페이지로 이동:"+target);
this.$router.push({ name: 'authModify', params: { targetAuthCd: target }}); this.$router.push({name: 'authModify', params: {targetAuthCd: target}});
}, },
authDelete(target){ authDelete(target) {
this.row.authCd = target; this.row.authCd = target;
this.row.title ='권한 관리'; this.row.title = '권한 관리';
this.row.msg1 ='삭제 하시겠습니까?' this.row.msg1 = '삭제 하시겠습니까?'
this.$refs.commmonModal.confirmModalOpen2(this.row); this.$refs.commmonModal.confirmModalOpen2(this.row);
}, },
async deleteAuth(){ async deleteAuth() {
//console.log("삭제처리:"+target); //console.log("삭제처리:"+target);
//this.row.authCd = target; //this.row.authCd = target;
try { try {
let response = await sysMgtApi.deleteAuth(this.row); let response = await sysMgtApi.deleteAuth(this.row);
const result = response.data; const result = response.data;
if (result != null && result.retCode == "0000") { if (result != null && result.retCode == "0000") {
this.getAuthList(); this.getAuthList();
return; return;
} else { } else {
this.row={} this.row = {}
this.row.title = '권한 관리'; this.row.title = '권한 관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
} catch(err) { } catch (err) {
this.row={} this.row = {}
this.row.title = '권한 관리'; this.row.title = '권한 관리';
this.row.msg1 = '실패 하였습니다.'; this.row.msg1 = '실패 하였습니다.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
} }
}, },
confirmCalbackFnc(props){ confirmCalbackFnc(props) {
console.log(props) console.log(props)
if(props.result){ if (props.result) {
this.deleteAuth(); this.deleteAuth();
} }
}, },
} }
}; };
</script> </script>

View File

@@ -1,201 +1,189 @@
<template> <template>
<div class="contents"> <div class="contents">
<div class="contents_wrap"> <div class="contents_wrap">
<div class="top_wrap"> <div class="top_wrap">
<h3 class="title">권한 관리</h3> <h3 class="title">권한 관리</h3>
<p class="breadcrumb">시스템관리 &gt; 권한 관리</p> <p class="breadcrumb">시스템관리 &gt; 권한 관리</p>
</div> </div>
<div class="info"> <div class="info">
<div class="title">권한 수정</div> <div class="title">권한 수정</div>
</div> </div>
<div class="table table_form"> <div class="table table_form">
<form autocomplete="off"> <table>
<table> <tbody>
<tbody> <tr class="tr_input w30">
<tr class="tr_input w30"> <th>권한명</th>
<th>권한명</th> <td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td>
<td colspan="5"><input type="text" v-model.trim="authNm" ref="_authNm"></td> </tr>
</tr> <tr class="tr_input w75">
<tr class="tr_input w75"> <th>권한 코드</th>
<th>권한 코드</th> <td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd" disabled></td>
<td colspan="2"><input type="text" v-model.trim="authCd" ref="_authCd" disabled></td> <th class="center">상태</th>
<th class="center">상태</th> <td class="td_radio" colspan="2">
<td class="td_radio" colspan="2"> <input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked>
<input type="radio" name="state" value="01" id="right_radio1" v-model="stat" checked> <label for="right_radio1">사용</label>
<label for="right_radio1">사용</label> <input type="radio" name="state" value="02" id="right_radio2" v-model="stat">
<input type="radio" name="state" value="02" id="right_radio2" v-model="stat"> <label for="right_radio2">정지</label>
<label for="right_radio2">정지</label> </td>
</td> </tr>
</tr> <tr class="tr_input w100">
<tr class="tr_input w100"> <th>권한 설명</th>
<th>권한 설명</th> <td colspan="5"><input type="text" v-model="authDesc"></td>
<td colspan="5"><input type="text" v-model="authDesc"></td> </tr>
</tr> <tr class="tr_checkbox">
<tr class="tr_checkbox"> <td class="check" rowspan="2">
<td class="check" rowspan="2"> <p>메뉴 권한 체크</p>
<p>메뉴 권한 체크</p> <input type="checkbox" id="right_check0" v-model="checkedAuthMenuAll">
<input type="checkbox" id="right_check0" v-model="checkedAuthMenuAll"> <div class="label_group">
<div class="label_group"> <label for="right_check0"></label>
<label for="right_check0"></label> <label for="right_check0">전체 체크</label>
<label for="right_check0">전체 체크</label> </div>
</div> </td>
</td> <td class="check">
<td class="check"> <p>고객관리</p>
<p>고객관리</p> <input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check1" value="2001" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check1"></label>
<label for="right_check1"></label> <label for="right_check1">청약고객관리</label>
<label for="right_check1">청약고객관리</label> </div>
</div> </td>
</td> <td class="check">
<td class="check"> <p>유치현황관리</p>
<p>유치현황관리</p> <div class="label_group">
<!-- <input type="checkbox" id="right_check2" value="2002" v-model="checkedAuthMenu"> <tr>
<div class="label_group"> <td class="td_radio">
<label for="right_check2"></label> <input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth">
<label for="right_check2">유치채널 현황</label> <label for="channel_radio1">유치채널현황</label>
</div> <br/><br/>
<input type="checkbox" id="right_check3" value="2003" v-model="checkedAuthMenu"> <input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth">
<div class="label_group"> <label for="channel_radio2">유치현황관리</label>
<label for="right_check3"></label> </td>
<label for="right_check3">유치관리자 현황</label> </tr>
</div> --> </div>
<div class="label_group"> </td>
<tr> <td class="check">
<td class="td_radio" > <p>서비스관리</p>
<input type="radio" name="userStat" value="2002" id="channel_radio1" v-model="channelAuth"> <input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu">
<label for="channel_radio1">유치채널현황</label> <div class="label_group">
<br/><br/> <label for="right_check4"></label>
<input type="radio" name="userStat" value="2003" id="channel_radio2" v-model="channelAuth"> <label for="right_check4">080수신거부 인증코드 조회</label>
<label for="channel_radio2">유치현황관리</label> </div>
</td> </td>
</tr> <td class="check">
</div> <p>정산</p>
</td> <input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu">
<td class="check"> <div class="label_group">
<p>서비스관리</p> <label for="right_check5"></label>
<input type="checkbox" id="right_check4" value="2004" v-model="checkedAuthMenu"> <label for="right_check5">정산이력</label>
<div class="label_group"> </div>
<label for="right_check4"></label> </td>
<label for="right_check4">080수신거부 인증코드 조회</label> <td class="check">
</div> <p>채널관리</p>
</td> <input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu">
<td class="check"> <div class="label_group">
<p>정산</p> <label for="right_check6"></label>
<input type="checkbox" id="right_check5" value="2005" v-model="checkedAuthMenu"> <label for="right_check6">알림톡 템플릿 관리</label>
<div class="label_group"> </div>
<label for="right_check5"></label> </td>
<label for="right_check5">정산이력</label> </tr>
</div> <tr>
</td> <td class="check">
<td class="check"> <p>발신번호관리</p>
<p>채널관리</p> <input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check6" value="2006" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check7"></label>
<label for="right_check6"></label> <label for="right_check7">발신프로필 관리</label>
<label for="right_check6">알림톡 템플릿 관리</label> </div>
</div> <input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu">
</td> <div class="label_group">
</tr> <label for="right_check8"></label>
<tr> <label for="right_check8">문자 발신번호 관리</label>
<td class="check"> </div>
<p>발신번호관리</p> <input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check7" value="2007" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check9"></label>
<label for="right_check7"></label> <label for="right_check9">발신번호 승인</label>
<label for="right_check7">발신프로필 관리</label> </div>
</div> </td>
<input type="checkbox" id="right_check8" value="2008" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>모니터링</p>
<label for="right_check8"></label> <input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu">
<label for="right_check8">문자 발신번호 관리</label> <div class="label_group">
</div> <label for="right_check10"></label>
<input type="checkbox" id="right_check9" value="2009" v-model="checkedAuthMenu"> <label for="right_check10">발송내역</label>
<div class="label_group"> </div>
<label for="right_check9"></label> <input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu">
<label for="right_check9">발신번호 승인</label> <div class="label_group">
</div> <label for="right_check11"></label>
</td> <label for="right_check11">실시간발송현황</label>
<td class="check"> </div>
<p>모니터링</p> </td>
<input type="checkbox" id="right_check10" value="2010" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>리스크관리</p>
<label for="right_check10"></label> <input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu">
<label for="right_check10">발송내역</label> <div class="label_group">
</div> <label for="right_check12"></label>
<input type="checkbox" id="right_check11" value="2011" v-model="checkedAuthMenu"> <label for="right_check12">발신번호 차단</label>
<div class="label_group"> </div>
<label for="right_check11"></label> <input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu">
<label for="right_check11">실시간발송현황</label> <div class="label_group">
</div> <label for="right_check13"></label>
</td> <label for="right_check13">080수신번호 차단</label>
<td class="check"> </div>
<p>리스크관리</p> <input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check12" value="2012" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check14"></label>
<label for="right_check12"></label> <label for="right_check14">메시지 차단</label>
<label for="right_check12">발신번호 차단</label> </div>
</div> <input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu">
<input type="checkbox" id="right_check13" value="2013" v-model="checkedAuthMenu"> <div class="label_group">
<div class="label_group"> <label for="right_check15"></label>
<label for="right_check13"></label> <label for="right_check15">차단 내역</label>
<label for="right_check13">080수신번호 차단</label> </div>
</div> </td>
<input type="checkbox" id="right_check14" value="2014" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>발송통계</p>
<label for="right_check14"></label> <input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu">
<label for="right_check14">메시지 차단</label> <div class="label_group">
</div> <label for="right_check16"></label>
<input type="checkbox" id="right_check15" value="2015" v-model="checkedAuthMenu"> <label for="right_check16">날짜별 통계</label>
<div class="label_group"> </div>
<label for="right_check15"></label> <input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu">
<label for="right_check15">차단 내역</label> <div class="label_group">
</div> <label for="right_check17"></label>
</td> <label for="right_check17">사업자별 통계</label>
<td class="check"> </div>
<p>발송통계</p> </td>
<input type="checkbox" id="right_check16" value="2016" v-model="checkedAuthMenu"> <td class="check">
<div class="label_group"> <p>시스템 관리</p>
<label for="right_check16"></label> <input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu">
<label for="right_check16">날짜별 통계</label> <div class="label_group">
</div> <label for="right_check18"></label>
<input type="checkbox" id="right_check17" value="2017" v-model="checkedAuthMenu"> <label for="right_check18">관리자/유치채널 관리</label>
<div class="label_group"> </div>
<label for="right_check17"></label> <input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu">
<label for="right_check17">사업자별 통계</label> <div class="label_group">
</div> <label for="right_check19"></label>
</td> <label for="right_check19">권한 관리</label>
<td class="check"> </div>
<p>시스템 관리</p> </td>
<input type="checkbox" id="right_check18" value="2018" v-model="checkedAuthMenu"> </tr>
<div class="label_group"> </tbody>
<label for="right_check18"></label> </table>
<label for="right_check18">관리자/유치채널 관리</label> </div>
</div> <div class="pop-btn2">
<input type="checkbox" id="right_check19" value="2019" v-model="checkedAuthMenu"> <button class="btn-default" type="button" @click="authModifyCancel()">취소</button>
<div class="label_group"> <button class="btn-pcolor" type="button" @click="authModifySave()">저장</button>
<label for="right_check19"></label> </div>
<label for="right_check19">권한 관리</label> </div>
</div> <common-modal ref="commmonModal"></common-modal>
</td> </div>
</tr>
</tbody>
</table>
</form>
</div>
<div class="pop-btn2">
<button class="btn-default" type="button" @click="authModifyCancel()">취소</button>
<button class="btn-pcolor" type="button" @click="authModifySave()">저장</button>
</div>
</div>
<common-modal ref="commmonModal"></common-modal>
</div>
</template> </template>
<script> <script>
import sysMgtApi from "../service/sysMgtApi.js"; import sysMgtApi from "../service/sysMgtApi.js";
import { utils_mixin, chkPattern2 } from '../service/mixins'; import {utils_mixin, chkPattern2} from '../service/mixins';
import commonModal from "../components/commonModal"; import commonModal from "../components/commonModal";
export default { export default {
@@ -203,224 +191,224 @@ export default {
mixins: [utils_mixin, chkPattern2], mixins: [utils_mixin, chkPattern2],
data() { data() {
return { return {
row: {}, row: {},
authType: [], authType: [],
authNm: "", authNm: "",
authCd: "", authCd: "",
authDesc: "", authDesc: "",
stat: "", stat: "",
defaultAuthMenu:["2001","2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014","2015","2016","2017","2018","2019"], defaultAuthMenu: ["2001", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019"],
checkedAuthMenu:[], checkedAuthMenu: [],
channelAuth: "", channelAuth: "",
}; };
}, },
props: { props: {
targetAuthCd : { targetAuthCd: {
type: String, type: String,
default: "", default: "",
} }
}, },
components: { components: {
commonModal, commonModal,
},
created() {
//this.setCodeData();
this.authDetail();
}, },
created(){
//this.setCodeData();
this.authDetail();
},
destroyed() { destroyed() {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
doValidate(){ doValidate() {
// 필수 등록정보 체크
if(this.isNull(this.authNm)){
this.row.title = '시스템관리';
this.row.msg1 = '권한명을 입력해 주세요.';
this.row.focusTaget = '1';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
if(this.isNull(this.authCd)){ // 필수 등록정보 체크
this.row.title = '시스템관리'; if (this.isNull(this.authNm)) {
this.row.msg1 = '권한 코드를 입력해 주세요.'; this.row.title = '시스템관리';
this.row.focusTaget = '2'; this.row.msg1 = '권한명을 입력해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.row.focusTaget = '1';
return false; this.$refs.commmonModal.alertModalOpen(this.row);
} return false;
}
if(this.authCd.length > 5){ if (this.isNull(this.authCd)) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.'; this.row.msg1 = '권한 코드 입력해 주세요.';
this.row.focusTaget = '2'; this.row.focusTaget = '2';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if(this.isNull(this.stat)){ if (this.authCd.length > 5) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '상태를 체크해 주세요.'; this.row.msg1 = '권한코드는 영문과 숫자포함 최대4자리까지 입력해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.row.focusTaget = '2';
return false; this.$refs.commmonModal.alertModalOpen(this.row);
} return false;
}
if(this.checkedAuthMenu.length == 0){ if (this.isNull(this.stat)) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.'; this.row.msg1 = '상태를 체크해 주세요.';
this.$refs.commmonModal.alertModalOpen(this.row); this.$refs.commmonModal.alertModalOpen(this.row);
return false; return false;
} }
if (this.checkedAuthMenu.length == 0) {
this.row.title = '시스템관리';
this.row.msg1 = '메뉴 권한 체크를 해주세요.';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
return true;
return true;
},
authModifyCancel() {
// 권한리스트 페이지로 이동
this.$router.push({ name: 'authList'});
}, },
async authDetail(){ authModifyCancel() {
//console.log(this.$route.params.targetAuthCd); // 권한리스트 페이지로 이동
this.row.authCd = this.$route.params.targetAuthCd; this.$router.push({name: 'authList'});
try {
const response = await sysMgtApi.authDetail(this.row); },
const result = response.data; async authDetail() {
//console.log(this.$route.params.targetAuthCd);
console.log(result); this.row.authCd = this.$route.params.targetAuthCd;
if (result != null && result.retCode == "0000") { try {
this.authCd = result.data.authCd; const response = await sysMgtApi.authDetail(this.row);
this.authNm = result.data.authNm; const result = response.data;
this.authDesc = result.data.authDesc;
this.stat = result.data.authStat; console.log(result);
if (result != null && result.retCode == "0000") {
// 메뉴리스트 처리 this.authCd = result.data.authCd;
var dataList = result.data.list; this.authNm = result.data.authNm;
var rsArr = []; this.authDesc = result.data.authDesc;
for(var i=0; i< dataList.length; i++){ this.stat = result.data.authStat;
if(dataList[i].upperMenuNo != null || dataList[i].upperMenuNo != ""){
if(dataList[i].menuNo === '2002' || dataList[i].menuNo === '2003'){ // 메뉴리스트 처리
this.channelAuth = dataList[i].menuNo; var dataList = result.data.list;
} else { var rsArr = [];
this.checkedAuthMenu.push(dataList[i].menuNo); for (var i = 0; i < dataList.length; i++) {
} if (dataList[i].upperMenuNo != null || dataList[i].upperMenuNo != "") {
if (dataList[i].menuNo === '2002' || dataList[i].menuNo === '2003') {
} this.channelAuth = dataList[i].menuNo;
} } else {
this.checkedAuthMenu.push(dataList[i].menuNo);
}
} else {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
} }
} catch(err) { }
//alert("처리 실패 하였습니다.");
this.row.title = '시스템관리'; } else {
this.row.msg1 = '실패 하였습니다.'; //alert("실패 하였습니다.");
this.row.focusTaget = '0'; this.row.title = '시스템관리';
this.$refs.commmonModal.alertModalOpen(this.row); this.row.msg1 = '실패 하였습니다.';
return false; this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
} }
} catch (err) {
//alert("처리 실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}, },
authModifySave(){ authModifySave() {
if(this.doValidate()){ if (this.doValidate()) {
this.row.title = '시스템관리'; this.row.title = '시스템관리';
this.row.msg1 = '권한 수정 저장하시겠습니까?'; this.row.msg1 = '권한 수정 저장하시겠습니까?';
this.row.focusTaget = '0'; this.row.focusTaget = '0';
this.$refs.commmonModal.confirmModalOpen(this.row); this.$refs.commmonModal.confirmModalOpen(this.row);
return false; return false;
} }
},
async authUpdate(){
var reqAuthMenuArr = this.checkedAuthMenu;
var listArr = [];
var dataMap = {};
if(this.channelAuth !== ''){
dataMap.menuNo = this.channelAuth;
listArr.push(dataMap);
}
for(var i = 0; i< reqAuthMenuArr.length; i++){
dataMap = {};
dataMap.menuNo = reqAuthMenuArr[i];
listArr.push(dataMap);
}
this.row.authCd = this.authCd;
this.row.authNm = this.authNm;
this.row.authDesc = this.authDesc;
this.row.stat = this.stat;
this.row.list = listArr;
console.log(this.row);
try {
let response = await sysMgtApi.updateAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({ name: 'authList'});
} else {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch(err) {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
}, },
checkFocus(){ async authUpdate() {
if(this.row.focusTaget === '1'){
this.$refs._authNm.focus(); var reqAuthMenuArr = this.checkedAuthMenu;
} else if(this.row.focusTaget === '2'){ var listArr = [];
this.$refs._authCd.focus(); var dataMap = {};
} if (this.channelAuth !== '') {
}, dataMap.menuNo = this.channelAuth;
confirmCalbackFnc(props){ listArr.push(dataMap);
if(props.result){ }
this.authUpdate(); for (var i = 0; i < reqAuthMenuArr.length; i++) {
} dataMap = {};
} dataMap.menuNo = reqAuthMenuArr[i];
listArr.push(dataMap);
}
this.row.authCd = this.authCd;
this.row.authNm = this.authNm;
this.row.authDesc = this.authDesc;
this.row.stat = this.stat;
this.row.list = listArr;
console.log(this.row);
try {
let response = await sysMgtApi.updateAuth(this.row);
const result = response.data;
if (result != null && result.retCode == "0000") {
//alert('저장 하였습니다.');
// 권한리스트 페이지 이동
this.$router.push({name: 'authList'});
} else {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
} catch (err) {
//alert("실패 하였습니다.");
this.row.title = '시스템관리';
this.row.msg1 = '실패 하였습니다.';
this.row.focusTaget = '0';
this.$refs.commmonModal.alertModalOpen(this.row);
return false;
}
},
checkFocus() {
if (this.row.focusTaget === '1') {
this.$refs._authNm.focus();
} else if (this.row.focusTaget === '2') {
this.$refs._authCd.focus();
}
},
confirmCalbackFnc(props) {
if (props.result) {
this.authUpdate();
}
}
}, },
computed: { computed: {
// 체크박스 전체선택 기능 // 체크박스 전체선택 기능
checkedAuthMenuAll : { checkedAuthMenuAll: {
get: function () { get: function () {
return this.defaultAuthMenu.length === this.checkedAuthMenu.length; return this.defaultAuthMenu.length === this.checkedAuthMenu.length;
}, },
set: function (e) { set: function (e) {
//this.checkedAuthMenu = e ? this.defaultAuthMenu : []; //this.checkedAuthMenu = e ? this.defaultAuthMenu : [];
if(e){ if (e) {
this.checkedAuthMenu = this.defaultAuthMenu; this.checkedAuthMenu = this.defaultAuthMenu;
if(this.channelAuth === ''){ if (this.channelAuth === '') {
this.channelAuth = '2002'; this.channelAuth = '2002';
}
} else {
this.checkedAuthMenu = [];
this.channelAuth = '';
}
} }
} else {
this.checkedAuthMenu = [];
this.channelAuth = '';
}
} }
}
} }
}; };
</script> </script>

View File

@@ -27,7 +27,6 @@ export default {
name: "hubwebLayout", name: "hubwebLayout",
components: { components: {
NavBar, NavBar,
// vuejsDatepicker,
HubWebHeader, HubWebHeader,
HubWebFooter, HubWebFooter,
}, },

View File

@@ -2,17 +2,18 @@ package kr.co.uplus.ez.api.attractMgt;
import kr.co.uplus.ez.api.attractMgt.dto.*; import kr.co.uplus.ez.api.attractMgt.dto.*;
import kr.co.uplus.ez.common.data.ApiResponseCode; import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage; import kr.co.uplus.ez.common.data.Const;
import kr.co.uplus.ez.common.data.Paging; import kr.co.uplus.ez.common.data.Paging;
import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.thymeleaf.util.StringUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
@Service @Service
public class AttractMgtService { public class AttractMgtService {
@@ -30,12 +31,22 @@ public class AttractMgtService {
* auth : ckr * auth : ckr
* desc : 유치채널 목록조회 * desc : 유치채널 목록조회
* @param channelListReqDto * @param channelListReqDto
* @return * @return
*/ */
@SuppressWarnings("rawtypes")
public ChannelListResDto channelList(ChannelListReqDto channelListReqDto) { public ChannelListResDto channelList(ChannelListReqDto channelListReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class); AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
String nowPage = String.valueOf(channelListReqDto.getPage()); String nowPage = String.valueOf(channelListReqDto.getPage());
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal;
String attrctorId = userDetails.getUsername();
ArrayList auth = (ArrayList) userDetails.getAuthorities();
if(StringUtils.equals(Const.AUTH_CD_AGENCY, auth.get(0).toString())){
channelListReqDto.setAttrctorId(attrctorId);
}
int totalCnt = attractMgtMapper.selectAttractListTotalCnt(channelListReqDto); int totalCnt = attractMgtMapper.selectAttractListTotalCnt(channelListReqDto);
if (totalCnt == 0) { if (totalCnt == 0) {
@@ -74,7 +85,7 @@ public class AttractMgtService {
* auth : ckr * auth : ckr
* desc : 유치채널 목록 엑셀 다운로드 * desc : 유치채널 목록 엑셀 다운로드
* @param channelListExcelReqDto * @param channelListExcelReqDto
* @return * @return
*/ */
public ChannelListExcelResDto channelListExcel(ChannelListExcelReqDto channelListExcelReqDto) { public ChannelListExcelResDto channelListExcel(ChannelListExcelReqDto channelListExcelReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class); AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -90,7 +101,7 @@ public class AttractMgtService {
* auth : ckr * auth : ckr
* desc : 유치 채널 상세 조회 * desc : 유치 채널 상세 조회
* @param channelDetailReqDto * @param channelDetailReqDto
* @return * @return
*/ */
public ChannelDetailResDto channelDetail(ChannelDetailReqDto channelDetailReqDto) { public ChannelDetailResDto channelDetail(ChannelDetailReqDto channelDetailReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class); AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -107,7 +118,7 @@ public class AttractMgtService {
* auth : ckr * auth : ckr
* desc : 발송건수 엑셀 다운로드 * desc : 발송건수 엑셀 다운로드
* @param channelListExcelReqDto * @param channelListExcelReqDto
* @return * @return
*/ */
public ChannelDetailResDto sendNumberListExcel(ChannelDetailReqDto channelDetailReqDto) { public ChannelDetailResDto sendNumberListExcel(ChannelDetailReqDto channelDetailReqDto) {
AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class); AttractMgtMapper attractMgtMapper = sqlSessionSlave.getMapper(AttractMgtMapper.class);
@@ -115,8 +126,8 @@ public class AttractMgtService {
ChannelDetailRes channelDetailRes = new ChannelDetailRes(); ChannelDetailRes channelDetailRes = new ChannelDetailRes();
List<ChannelDetail> channelDetails = attractMgtMapper.sendNumberListExcel(channelDetailReqDto); List<ChannelDetail> channelDetails = attractMgtMapper.sendNumberListExcel(channelDetailReqDto);
channelDetailRes.setList(channelDetails); channelDetailRes.setList(channelDetails);
return new ChannelDetailResDto(ApiResponseCode.SUCCESS, channelDetailRes); return new ChannelDetailResDto(ApiResponseCode.SUCCESS, channelDetailRes);
} }

View File

@@ -9,27 +9,27 @@ import java.io.Serializable;
@Data @Data
public class ChannelDetail implements Serializable { public class ChannelDetail implements Serializable {
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String") @ApiModelProperty(example = "20220101", name = "날짜", dataType = "String")
private String sumYm; private String sumYm;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String") @ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt; private String sndCnt;
@ApiModelProperty(example = "전체 성공건수", name = "전체 성공건수", dataType = "String") @ApiModelProperty(example = "99", name = "전체 성공건수", dataType = "String")
private String succCnt; private String succCnt;
@ApiModelProperty(example = "SMS발송건수", name = "SMS발송건수", dataType = "String") @ApiModelProperty(example = "10", name = "SMS발송건수", dataType = "String")
private String sndCntS; private String sndCntS;
@ApiModelProperty(example = "SMS 성공건수", name = "SMS 성공건수", dataType = "String") @ApiModelProperty(example = "10", name = "SMS 성공건수", dataType = "String")
private String succCntS; private String succCntS;
@ApiModelProperty(example = "LMS발송건수", name = "LMS발송건수", dataType = "String") @ApiModelProperty(example = "10", name = "LMS발송건수", dataType = "String")
private String sndCntL; private String sndCntL;
@ApiModelProperty(example = "LMS 성공건수", name = "LMS 성공건수", dataType = "String") @ApiModelProperty(example = "10", name = "LMS 성공건수", dataType = "String")
private String succCntL; private String succCntL;
@ApiModelProperty(example = "MMS발송건수", name = "MMS발송건수", dataType = "String") @ApiModelProperty(example = "10", name = "MMS발송건수", dataType = "String")
private String sndCntM; private String sndCntM;
@ApiModelProperty(example = "MMS 성공건수", name = "MMS 성공건수", dataType = "String") @ApiModelProperty(example = "10", name = "MMS 성공건수", dataType = "String")
private String succCntM; private String succCntM;
@ApiModelProperty(example = "알림톡발송건수", name = "알림톡발송건수", dataType = "String") @ApiModelProperty(example = "10", name = "알림톡발송건수", dataType = "String")
private String sndCntA; private String sndCntA;
@ApiModelProperty(example = "알림톡 성공건수", name = "알림톡 성공건수", dataType = "String") @ApiModelProperty(example = "10", name = "알림톡 성공건수", dataType = "String")
private String succCntA; private String succCntA;
} }

View File

@@ -9,7 +9,7 @@ import java.io.Serializable;
@Data @Data
public class ChannelDetailReqDto implements Serializable { public class ChannelDetailReqDto implements Serializable {
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String") @ApiModelProperty(example = "1012001", name = "사용자일련번호", dataType = "String")
private String userSeq; private String userSeq;
} }

View File

@@ -14,48 +14,52 @@ public class ChannelDetailRes implements Serializable {
private Paging paging; private Paging paging;
private List<ChannelDetail> list; private List<ChannelDetail> list;
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "String") @ApiModelProperty(example = "1", name = "리스트번호", dataType = "String")
private String no; private String no;
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String") @ApiModelProperty(example = "20220101", name = "가입일", dataType = "String")
private String subsDt; private String subsDt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String") @ApiModelProperty(example = "대리점", name = "유치업체", dataType = "String")
private String norgNm; private String norgNm;
@ApiModelProperty(example = "사업장주소1", name = "사업장주소1", dataType = "String") @ApiModelProperty(example = "서울시", name = "사업장주소1", dataType = "String")
private String adr1; private String adr1;
@ApiModelProperty(example = "사업장주소2", name = "사업장주소2", dataType = "String") @ApiModelProperty(example = "서초구", name = "사업장주소2", dataType = "String")
private String adr2; private String adr2;
@ApiModelProperty(example = "사업장주소3", name = "사업장주소3", dataType = "String") @ApiModelProperty(example = "1동", name = "사업장주소3", dataType = "String")
private String adr3; private String adr3;
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String") @ApiModelProperty(example = "10110201", name = "사용자일련번호", dataType = "String")
private String userSeq; private String userSeq;
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String") @ApiModelProperty(example = "test", name = "마당ID(이름)", dataType = "String")
private String loginId; private String loginId;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String") @ApiModelProperty(example = "TEST", name = "고객사명", dataType = "String")
private String custNm; private String custNm;
@ApiModelProperty(example = "대표자명", name = "대표자명", dataType = "String") @ApiModelProperty(example = "홍길동", name = "대표자명", dataType = "String")
private String reprNm; private String reprNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String") @ApiModelProperty(example = "1010120202", name = "사업자등록번호", dataType = "String")
private String bizrno; private String bizrno;
@ApiModelProperty(example = "법인등록번호", name = "법인등록번호", dataType = "String") @ApiModelProperty(example = "1234561234567", name = "법인등록번호", dataType = "String")
private String cprRegNo; private String cprRegNo;
@ApiModelProperty(example = "이름", name = "이름" , dataType = "String") @ApiModelProperty(example = "홍길동", name = "이름" , dataType = "String")
private String userNm; private String userNm;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String") @ApiModelProperty(example = "청약", name = "상태", dataType = "String")
private String subsSttusCd; private String subsSttusCd;
@ApiModelProperty(example = "법인사업자", name = "구분", dataType = "String")
private String subsSttusNm;
@ApiModelProperty(example = "구분", name = "구분", dataType = "String") @ApiModelProperty(example = "구분", name = "구분", dataType = "String")
private String custTyCd; private String custTyCd;
@ApiModelProperty(example = "LTE5만원", name = "청약요금제명", dataType = "String")
private String custTyNm;
@ApiModelProperty(example = "청약요금제명", name = "청약요금제명", dataType = "String") @ApiModelProperty(example = "청약요금제명", name = "청약요금제명", dataType = "String")
private String plan; private String plan;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String") @ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt; private String sndCnt;
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String") @ApiModelProperty(example = "adminTest", name = "관리자ID", dataType = "String")
private String adminId; private String adminId;
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String") @ApiModelProperty(example = "어드민", name = "관리자명", dataType = "String")
private String adminNm; private String adminNm;
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String") @ApiModelProperty(example = "admin", name = "유치자ID", dataType = "String")
private String channelId; private String channelId;
@ApiModelProperty(example = "유치자명", name = "유치자명", dataType = "String") @ApiModelProperty(example = "관리자", name = "유치자명", dataType = "String")
private String channelNm; private String channelNm;
@ApiModelProperty(example = "USER ID", name = "USER ID", dataType = "String", hidden = true) @ApiModelProperty(example = "test", name = "USER ID", dataType = "String", hidden = true)
private String userId; private String userId;
} }

View File

@@ -9,26 +9,30 @@ import java.io.Serializable;
@Data @Data
public class ChannelInfo implements Serializable { public class ChannelInfo implements Serializable {
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer") @ApiModelProperty(example = "1", name = "리스트번호", dataType = "Integer")
private Integer no; private Integer no;
@ApiModelProperty(example = "가입일", name = "가입일", dataType = "String") @ApiModelProperty(example = "20220101", name = "가입일", dataType = "String")
private String subsDt; private String subsDt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String") @ApiModelProperty(example = "대리점", name = "유치업체", dataType = "String")
private String norgNm; private String norgNm;
@ApiModelProperty(example = "사용자일련번호", name = "사용자일련번호", dataType = "String") @ApiModelProperty(example = "10122112", name = "사용자일련번호", dataType = "String")
private String userSeq; private String userSeq;
@ApiModelProperty(example = "마당ID(이름)", name = "마당ID(이름)", dataType = "String") @ApiModelProperty(example = "madang01", name = "마당ID", dataType = "String")
private String loginId; private String loginId;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String") @ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm; private String custNm;
@ApiModelProperty(example = "사업자등록번호", name = "사업자등록번호", dataType = "String") @ApiModelProperty(example = "1234512345", name = "사업자등록번호", dataType = "String")
private String bizrno; private String bizrno;
@ApiModelProperty(example = "이름", name = "이름" , dataType = "String") @ApiModelProperty(example = "홍길동", name = "이름" , dataType = "String")
private String userNm; private String userNm;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String") @ApiModelProperty(example = "01", name = "상태", dataType = "String")
private String subsSttusCd; private String subsSttusCd;
@ApiModelProperty(example = "구분", name = "구분", dataType = "String") @ApiModelProperty(example = "청약", name = "상태명", dataType = "String")
private String subsSttusNm;
@ApiModelProperty(example = "01", name = "고객구분", dataType = "String")
private String custTyCd; private String custTyCd;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String") @ApiModelProperty(example = "법인", name = "고객구분명", dataType = "String")
private String custTyNm;
@ApiModelProperty(example = "100", name = "전체발송건수", dataType = "String")
private String sndCnt; private String sndCnt;
} }

View File

@@ -9,22 +9,22 @@ import java.io.Serializable;
@Data @Data
public class ChannelListExcelReqDto implements Serializable { public class ChannelListExcelReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String") @ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType; private String searchType;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String") @ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType1; private String searchType1;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String") @ApiModelProperty(example = "임시회사", name = "검색어(입력)", dataType = "String")
private String searchText; private String searchText;
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String") @ApiModelProperty(example = "20220101", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String")
private String subsStDt; private String subsStDt;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String") @ApiModelProperty(example = "20220131", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String")
private String subsEdDt; private String subsEdDt;
@ApiModelProperty(example = "조회 시작 날짜", name = "조회 시작 날짜", notes = "YYYYMMDD", dataType = "String") @ApiModelProperty(example = "01", name = "청약상태", dataType = "String")
private String subsSttusCd; private String subsSttusCd;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String") @ApiModelProperty(example = "test", name = "로그인아이디", dataType = "String")
private String loginId; private String loginId;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String") @ApiModelProperty(example = "유치", name = "유치채널", dataType = "String")
private String norgNm; private String norgNm;
@ApiModelProperty(example = "조회 종료 날짜", name = "조회 종료 날짜", notes = "YYYYMMDD", dataType = "String") @ApiModelProperty(example = "01", name = "고객유형", dataType = "String")
private String custTyCd; private String custTyCd;
} }

View File

@@ -9,26 +9,29 @@ import java.io.Serializable;
@Data @Data
public class ChannelListReqDto implements Serializable { public class ChannelListReqDto implements Serializable {
@ApiModelProperty(example = "검색시작일", name = "검색시작일", dataType = "String") @ApiModelProperty(example = "20220101", name = "검색시작일", dataType = "String")
private String subsStDt; private String subsStDt;
@ApiModelProperty(example = "검색종료일", name = "검색종료일", dataType = "String") @ApiModelProperty(example = "20220131", name = "검색종료일", dataType = "String")
private String subsEdDt; private String subsEdDt;
@ApiModelProperty(example = "상태", name = "상태", dataType = "String") @ApiModelProperty(example = "01", name = "상태", dataType = "String")
private String subsSttusCd; private String subsSttusCd;
@ApiModelProperty(example = "회원구분", name = "회원구분", dataType = "String") @ApiModelProperty(example = "01", name = "회원구분", dataType = "String")
private String custTyCd; private String custTyCd;
@ApiModelProperty(example = "유치자ID", name = "유치자ID", dataType = "String") @ApiModelProperty(example = "test", name = "유치자ID", dataType = "String")
private String loginId; private String loginId;
@ApiModelProperty(example = "전체발송건수", name = "전체발송건수", dataType = "String") @ApiModelProperty(example = "10", name = "전체발송건수", dataType = "String")
private String sndCnt; private String sndCnt;
@ApiModelProperty(example = "유치업체", name = "유치업체", dataType = "String") @ApiModelProperty(example = "유치", name = "유치업체", dataType = "String")
private String norgNm; private String norgNm;
@ApiModelProperty(example = "상세검색조건", name = "상세검색조건", dataType = "String") @ApiModelProperty(example = "01", name = "상세검색조건", dataType = "String")
private String searchType; private String searchType;
@ApiModelProperty(example = "검색어", name = "검색어", dataType = "String") @ApiModelProperty(example = "홍길동", name = "검색어", dataType = "String")
private String searchText; private String searchText;
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String") @ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
private int pagePerRows; private int pagePerRows;
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "String") @ApiModelProperty(example = "1", name = "현재 페이지", dataType = "String")
private int page; private int page;
@ApiModelProperty(name = "유치자ID", dataType = "String", hidden = true)
private String attrctorId;
} }

View File

@@ -1,45 +1,45 @@
package kr.co.uplus.ez.api.calculate.dto; package kr.co.uplus.ez.api.calculate.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class CalcList implements Serializable { public class CalcList implements Serializable {
@ApiModelProperty(example = "날짜", name = "날짜", dataType = "String") @ApiModelProperty(example = "202201", name = "날짜", dataType = "String")
private String useYm; private String useYm;
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명", dataType = "String") @ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm; private String custNm;
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호", dataType = "String") @ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno; private String bizrno;
@ApiModelProperty(example = "요금제", name = "요금제", dataType = "String") @ApiModelProperty(example = "LTE5만원", name = "요금제", dataType = "String")
private String prodNm; private String prodNm;
@ApiModelProperty(example = "요금액", name = "요금액", dataType = "String") @ApiModelProperty(example = "10000", name = "요금액", dataType = "String")
private String prodAmt; private String prodAmt;
@ApiModelProperty(example = "시작금액", name = "시작금액", dataType = "String") @ApiModelProperty(example = "10000", name = "시작금액", dataType = "String")
private String startAmt; private String startAmt;
@ApiModelProperty(example = "사용금액", name = "사용금액", dataType = "String") @ApiModelProperty(example = "10000", name = "사용금액", dataType = "String")
private String useAmt; private String useAmt;
@ApiModelProperty(example = "이월금액", name = "이월금액", dataType = "String") @ApiModelProperty(example = "10000", name = "이월금액", dataType = "String")
private String cfwdAmt; private String cfwdAmt;
@ApiModelProperty(example = "종량금액", name = "종량금액", dataType = "String") @ApiModelProperty(example = "10000", name = "종량금액", dataType = "String")
private String mrtUseAmt; private String mrtUseAmt;
@ApiModelProperty(example = "소멸금액", name = "소멸금액", dataType = "String") @ApiModelProperty(example = "1000", name = "소멸금액", dataType = "String")
private String extncAmt; private String extncAmt;
@ApiModelProperty(example = "청구금액", name = "청구금액", dataType = "String") @ApiModelProperty(example = "10000", name = "청구금액", dataType = "String")
private String billingAmt; private String billingAmt;
@ApiModelProperty(example = "전체 발송건수", name = "전체 발송건수", dataType = "String") @ApiModelProperty(example = "100", name = "전체 발송건수", dataType = "String")
private String totalSndCnt; private String totalSndCnt;
@ApiModelProperty(example = "SMS 발송건수", name = "SMS 발송건수", dataType = "String") @ApiModelProperty(example = "100", name = "SMS 발송건수", dataType = "String")
private String smsSndCnt; private String smsSndCnt;
@ApiModelProperty(example = "LMS 발송건수", name = "LMS 발송건수", dataType = "String") @ApiModelProperty(example = "100", name = "LMS 발송건수", dataType = "String")
private String lmsSndCnt; private String lmsSndCnt;
@ApiModelProperty(example = "MMS 발송건수", name = "MMS 발송건수", dataType = "String") @ApiModelProperty(example = "100", name = "MMS 발송건수", dataType = "String")
private String mmsSndCnt; private String mmsSndCnt;
@ApiModelProperty(example = "알림톡 발송건수", name = "알림톡 발송건수", dataType = "String") @ApiModelProperty(example = "100", name = "알림톡 발송건수", dataType = "String")
private String atlkSndCnt; private String atlkSndCnt;
} }

View File

@@ -11,17 +11,17 @@ import java.io.Serializable;
public class CalcListExcelReqDto implements Serializable { public class CalcListExcelReqDto implements Serializable {
@NotNull @NotNull
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String") @ApiModelProperty(example = "202201", name = "검색시작월",dataType = "String")
private String startMonth; private String startMonth;
@NotNull @NotNull
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String") @ApiModelProperty(example = "202203", name = "검색종료월",dataType = "String")
private String endMonth; private String endMonth;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String") @ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm; private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String") @ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno; private String bizrno;
} }

View File

@@ -1,36 +1,35 @@
package kr.co.uplus.ez.api.calculate.dto; package kr.co.uplus.ez.api.calculate.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class CalcListReqDto implements Serializable { public class CalcListReqDto implements Serializable {
@NotNull @NotNull
@ApiModelProperty(example = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "String") @ApiModelProperty(example = "50", name = "페이지당 조회할 목록 수", dataType = "String")
private int pagePerRows; private int pagePerRows;
@NotNull @NotNull
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int") @ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
private int page; private int page;
@NotNull @NotNull
@ApiModelProperty(example = "검색시작월", name = "검색시작월",dataType = "String") @ApiModelProperty(example = "202201", name = "검색시작월",dataType = "String")
private String startMonth; private String startMonth;
@NotNull @NotNull
@ApiModelProperty(example = "검색종료월", name = "검색종료월",dataType = "String") @ApiModelProperty(example = "202203", name = "검색종료월",dataType = "String")
private String endMonth; private String endMonth;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String") @ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm; private String custNm;
@ApiModelProperty(example = "사업자번호", name = "사업자번호", dataType = "String") @ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bizrno; private String bizrno;
} }

View File

@@ -1,12 +1,11 @@
package kr.co.uplus.ez.api.channelMgt; package kr.co.uplus.ez.api.channelMgt;
import java.util.List; import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelReqDto; import kr.co.uplus.ez.api.channelMgt.dto.TmpltListExcelReqDto;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltInfo; import java.util.List;
import kr.co.uplus.ez.api.channelMgt.dto.TmpltListReqDto;
@Mapper @Mapper
public interface ChannelMgtMapper { public interface ChannelMgtMapper {
@@ -17,5 +16,7 @@ public interface ChannelMgtMapper {
List<TmpltInfo> selectTmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto); List<TmpltInfo> selectTmpltListExcel(TmpltListExcelReqDto tmpltListExcelReqDto);
String selectChannelAuthMenuNo(String targetUserId); default String selectChannelAuthMenuNo(String targetUserId) {
return null;
}
} }

View File

@@ -9,24 +9,24 @@ import java.io.Serializable;
@Data @Data
public class TmpltInfo implements Serializable { public class TmpltInfo implements Serializable {
@ApiModelProperty(example = "리스트번호", name = "리스트번호", dataType = "Integer") @ApiModelProperty(example = "1", name = "리스트번호", dataType = "Integer")
private Integer no; private Integer no;
@ApiModelProperty(example = "고객사명(이름)", name = "고객사명(이름)", dataType = "String") @ApiModelProperty(example = "홍길동", name = "고객사명", dataType = "String")
private String custNm; private String custNm;
@ApiModelProperty(example = "사업자번호(생년월일)", name = "사업자번호(생년월일)", dataType = "String") @ApiModelProperty(example = "1234512345", name = "사업자번호", dataType = "String")
private String bRegNo; private String bRegNo;
@ApiModelProperty(example = "템플릿 코드", name = "템플릿 코드", dataType = "String") @ApiModelProperty(example = "01", name = "템플릿 코드", dataType = "String")
private String tmpltCd; private String tmpltCd;
@ApiModelProperty(example = "템플릿명", name = "템플릿명", dataType = "String") @ApiModelProperty(example = "테스트", name = "템플릿명", dataType = "String")
private String tmpltNm; private String tmpltNm;
@ApiModelProperty(example = "템플릿 유형", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String") @ApiModelProperty(example = "01", name = "템플릿 유형", notes = "항목 : (01: 기본형(Default), 02:부가정보형, 03:광고추가형, 04:복합형)", dataType = "String")
private String tmpltType; private String tmpltType;
@ApiModelProperty(example = "상태", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String") @ApiModelProperty(example = "T", name = "상태" , notes = "항목 : (T:신청완료, R:검수요청완료, Q:카카오 검수중, A:템플릿승인, S:반려)" , dataType = "String")
private String stat; private String stat;
@ApiModelProperty(example = "반려사유", name = "반려사유", dataType = "String") @ApiModelProperty(example = "01", name = "반려사유", dataType = "String")
private String returnReason; private String returnReason;
@ApiModelProperty(example = "발신프로필", name = "발신프로필", dataType = "String") @ApiModelProperty(example = "1230123023", name = "발신프로필", dataType = "String")
private String sendProfile; private String sendProfile;
@ApiModelProperty(example = "최종수정일자", name = "최종수정일자", dataType = "String") @ApiModelProperty(example = "20220320", name = "최종수정일자", dataType = "String")
private String lastChgDt; private String lastChgDt;
} }

View File

@@ -3,21 +3,21 @@ package kr.co.uplus.ez.api.channelMgt.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class TmpltListExcelReqDto implements Serializable { public class TmpltListExcelReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String") @ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType1; private String searchType1;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String") @ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType2; private String searchType2;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String") @ApiModelProperty(example = "홍길동", name = "검색어(입력)", dataType = "String")
private String searchText1; private String searchText1;
@ApiModelProperty(example = "1122", name = "채널메뉴번호", dataType = "String")
private String channelAuthMenuNo; private String channelAuthMenuNo;
@ApiModelProperty(example = "test", name = "사용자아이디", dataType = "String")
private String userId; private String userId;
} }

View File

@@ -1,31 +1,31 @@
package kr.co.uplus.ez.api.channelMgt.dto; package kr.co.uplus.ez.api.channelMgt.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class TmpltListReqDto implements Serializable { public class TmpltListReqDto implements Serializable {
@ApiModelProperty(example = "사용상태", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String") @ApiModelProperty(example = "Y", name = "사용상태", notes = "항목 : 전체(Default)/사용 : Y/중지 : N", dataType = "String")
private String searchType1; private String searchType1;
@ApiModelProperty(example = "검색조건", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String") @ApiModelProperty(example = "custNm", name = "검색조건", notes = "항목 : 고객사명 : custNm / 사업자번호 : bizNo / 인증코드 : authCd", dataType = "String")
private String searchType2; private String searchType2;
@ApiModelProperty(example = "검색어(입력)", name = "검색어(입력)", dataType = "String") @ApiModelProperty(example = "홍길동", name = "검색어(입력)", dataType = "String")
private String searchText1; private String searchText1;
@NotNull @NotNull
@ApiModelProperty(example = "페이지당 조회할 목록 수",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int") @ApiModelProperty(example = "50",notes = "페이지당 조회할 목록 수", name = "페이지당 조회할 목록 수", dataType = "int")
private int pagePerRows; private int pagePerRows;
@NotNull @NotNull
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int") @ApiModelProperty(example = "1", name = "현재 페이지", dataType = "int")
private int page; private int page;
@ApiModelProperty(example = "1", name = "채널메뉴번호", dataType = "int")
private String channelAuthMenuNo; private String channelAuthMenuNo;
@ApiModelProperty(example = "test", name = "사용자아이디", dataType = "int")
private String userId; private String userId;
} }

View File

@@ -1,14 +1,18 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class Auth implements Serializable{ public class Auth implements Serializable{
@ApiModelProperty(example = "1001", name = "권한코드", dataType = "int")
private String autCd; private String autCd;
@ApiModelProperty(example = "어드민", name = "권한명", dataType = "int")
private String autNm; private String autNm;
@ApiModelProperty(example = "N", name = "사용여부", dataType = "int")
private String useYn; private String useYn;
} }

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class AuthRes implements Serializable { public class AuthRes implements Serializable {
@ApiModelProperty(name = "권한리스트", example = "권한리스트", dataType = "List<Auth>") @ApiModelProperty(name = "권한리스트", dataType = "List<Auth>")
private List<Auth> list; private List<Auth> list;
} }

View File

@@ -1,23 +1,23 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class Code implements Serializable { public class Code implements Serializable {
@ApiModelProperty(name = "그룹코드", example = "그룹코드", dataType = "String") @ApiModelProperty(name = "그룹코드", example = "1001", dataType = "String")
private String grpCd; private String grpCd;
@ApiModelProperty(name = "상세코드", example = "상세코드", dataType = "String") @ApiModelProperty(name = "상세코드", example = "01", dataType = "String")
private String code; private String code;
@ApiModelProperty(name = "상세코드명", example = "상세코드명", dataType = "String") @ApiModelProperty(name = "상세코드명", example = "TEST", dataType = "String")
private String codeNm; private String codeNm;
@ApiModelProperty(name = "정렬순서", example = "정렬순서", dataType = "Integer") @ApiModelProperty(name = "정렬순서", example = "1", dataType = "Integer")
private Integer sortOrder; private Integer sortOrder;
@ApiModelProperty(name = "사용여부", example = "사용여부", dataType = "String") @ApiModelProperty(name = "사용여부", example = "Y", dataType = "String")
private String useYn; private String useYn;
} }

View File

@@ -1,15 +1,15 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class CodeReqDto implements Serializable{ public class CodeReqDto implements Serializable{
@ApiModelProperty(example = "그룹코드", name = "그룹코드", dataType = "String") @ApiModelProperty(example = "1001", name = "그룹코드", dataType = "String")
private String grpCd; private String grpCd;
} }

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import java.util.List;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.util.List;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class CodeRes implements Serializable { public class CodeRes implements Serializable {
@ApiModelProperty(name = "코드리스트", example = "코드리스트", dataType = "List<Code>") @ApiModelProperty(name = "코드리스트", dataType = "List<Code>")
private List<Code> list; private List<Code> list;
} }

View File

@@ -1,41 +1,41 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class Menu implements Serializable{ public class Menu implements Serializable{
@ApiModelProperty(name = "메뉴 번호", example = "메뉴 번호", dataType = "Integer") @ApiModelProperty(name = "메뉴 번호", example = "1001", dataType = "Integer")
private Integer menuNo; private Integer menuNo;
@ApiModelProperty(name = "부모 메뉴 번호", example = "부모 메뉴 번호", dataType = "Integer") @ApiModelProperty(name = "부모 메뉴 번호", example = "1001", dataType = "Integer")
private Integer prntsMenuNo; private Integer prntsMenuNo;
@ApiModelProperty(name = "메뉴 명", example = "메뉴 명") @ApiModelProperty(name = "메뉴 명", example = "고객관리")
private String menuNm; private String menuNm;
@ApiModelProperty(name = "메뉴 순서", example = "메뉴 순서", dataType = "Integer") @ApiModelProperty(name = "메뉴 순서", example = "1", dataType = "Integer")
private Integer menuOdrg; private Integer menuOdrg;
@ApiModelProperty(name = "사용 여부", example = "사용 여부") @ApiModelProperty(name = "사용 여부", example = "Y")
private String useYn; private String useYn;
@ApiModelProperty(name = "권한체크 그룹번호", example = "권한체크 그룹번호", dataType = "Integer") @ApiModelProperty(name = "권한체크 그룹번호", example = "1001", dataType = "Integer")
private Integer autchkGrpno; private Integer autchkGrpno;
@ApiModelProperty(name = "메뉴 레벨", example = "메뉴 레벨", dataType = "Integer") @ApiModelProperty(name = "메뉴 레벨", example = "1", dataType = "Integer")
private Integer menuLvl; private Integer menuLvl;
@ApiModelProperty(name = "메뉴 URL", example = "메뉴 URL") @ApiModelProperty(name = "메뉴 URL", example = "/login")
private String menuUrl; private String menuUrl;
@ApiModelProperty(name = "등록 ID", example = "등록 ID") @ApiModelProperty(name = "등록 ID", example = "test")
private String regId; private String regId;
@ApiModelProperty(name = "등록 일시", example = "등록 일시") @ApiModelProperty(name = "등록 일시", example = "20110101")
private String regDt; private String regDt;
@ApiModelProperty(name = "변경 ID", example = "변경 ID") @ApiModelProperty(name = "변경 ID", example = "test")
private String chgId; private String chgId;
@ApiModelProperty(name = "변경 일시", example = "변경 일시") @ApiModelProperty(name = "변경 일시", example = "20110101")
private String chgDt; private String chgDt;
@ApiModelProperty(name = "하위 메뉴 정보", example = "하위 메뉴 정보", dataType = "List<Menu>") @ApiModelProperty(name = "하위 메뉴 정보", dataType = "List<Menu>")
private List<Menu> children = new ArrayList<>(); private List<Menu> children = new ArrayList<>();
public void addChild(Menu menu) { public void addChild(Menu menu) {

View File

@@ -1,17 +1,17 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class RefreshToken implements Serializable{ public class RefreshToken implements Serializable{
@ApiModelProperty(name = "인증토큰", example = "인증토큰", dataType = "String") @ApiModelProperty(name = "인증토큰", example = "adwd121dd", dataType = "String")
private String accessToken; private String accessToken;
@ApiModelProperty(name = "토큰 만료시간", example = "토큰 만료시간", dataType = "String") @ApiModelProperty(name = "토큰 만료시간", example = "1800", dataType = "String")
private String expireTime; private String expireTime;
} }

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.comm.dto; package kr.co.uplus.ez.api.comm.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class RefreshTokenReqDto implements Serializable{ public class RefreshTokenReqDto implements Serializable{
@ApiModelProperty(example = "사용자 ID", name = "사용자 ID", dataType = "String") @ApiModelProperty(example = "test", name = "사용자 ID", dataType = "String")
private String userId; private String userId;
@ApiModelProperty(example = "Refresh 토큰", name = "Refresh 토큰", dataType = "String") @ApiModelProperty(example = "dadw242rdwad2", name = "Refresh 토큰", dataType = "String")
private String refreshToken; private String refreshToken;
} }

View File

@@ -285,11 +285,17 @@ public class CustMgtController {
}) })
@RequestMapping(value = "/insertTestId" , method = {RequestMethod.POST}) @RequestMapping(value = "/insertTestId" , method = {RequestMethod.POST})
@ResponseBody @ResponseBody
public InsertTestIdResDto insertTestId(@RequestBody @Valid InsertTestIdReqDto insertTestIdReqDto, BindingResult bindingResult) { public InsertTestIdResDto insertTestId(@RequestBody @Valid InsertTestIdReqDto insertTestIdReqDto, BindingResult bindingResult){
if(validComponents.validParameter(bindingResult)) { if(validComponents.validParameter(bindingResult)) {
return new InsertTestIdResDto(ApiResponseCode.CM_PARAMETER_ERROR); return new InsertTestIdResDto(ApiResponseCode.CM_PARAMETER_ERROR);
} }
return custService.insertTestId(insertTestIdReqDto); try {
return custService.insertTestId(insertTestIdReqDto);
}catch(Exception e) {
logger.info(e.toString());
return new InsertTestIdResDto(ApiResponseCode.CM_DB_QUERY_ERR);
}
} }
/** /**

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,21 @@
package kr.co.uplus.ez.api.custMgt.dto; package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class AdminInfo implements Serializable { public class AdminInfo implements Serializable {
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String") @ApiModelProperty(example = "admin", name = "관리자ID", dataType = "String")
private String adminId; private String adminId;
@ApiModelProperty(example = "관리자코드", name = "관리자코드", dataType = "String") @ApiModelProperty(example = "1001", name = "관리자코드", dataType = "String")
private String adminCd; private String adminCd;
@ApiModelProperty(example = "관리자명", name = "관리자명", dataType = "String") @ApiModelProperty(example = "ADMIN", name = "관리자명", dataType = "String")
private String adminNm; private String adminNm;
@ApiModelProperty(example = "대리점명", name = "대리점명", dataType = "String") @ApiModelProperty(example = "본사", name = "대리점명", dataType = "String")
private String agencyNm; private String agencyNm;
} }

View File

@@ -1,15 +1,15 @@
package kr.co.uplus.ez.api.custMgt.dto; package kr.co.uplus.ez.api.custMgt.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class AdminInfoReqDto implements Serializable { public class AdminInfoReqDto implements Serializable {
@ApiModelProperty(example = "관리자ID", name = "관리자ID", dataType = "String") @ApiModelProperty(example = "admin", name = "관리자ID", dataType = "String")
private String adminId; private String adminId;
} }

View File

@@ -1,23 +1,16 @@
package kr.co.uplus.ez.api.mntrng; package kr.co.uplus.ez.api.mntrng;
import java.util.ArrayList; import kr.co.uplus.ez.api.mntrng.dto.*;
import java.util.List; import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.Paging;
import org.apache.commons.lang3.StringUtils;
import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import kr.co.uplus.ez.common.data.ApiResponseCode; import java.util.ArrayList;
import kr.co.uplus.ez.common.data.ApiResponseMessage; import java.util.List;
import kr.co.uplus.ez.common.data.Paging;
import kr.co.uplus.ez.api.mntrng.dto.SendListResDto;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusRes;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttusResDto;
import kr.co.uplus.ez.api.mntrng.dto.SendList;
import kr.co.uplus.ez.api.mntrng.dto.SendListReqDto;
import kr.co.uplus.ez.api.mntrng.dto.SendListRes;
import kr.co.uplus.ez.api.mntrng.dto.LiveSendSttus;
@Service @Service
public class MntrngService { public class MntrngService {
@@ -44,16 +37,13 @@ public class MntrngService {
String nowPage = String.valueOf(sendListReqDto.getPage()); String nowPage = String.valueOf(sendListReqDto.getPage());
int totalCnt = mntrngMapper.selectSendListTotalCnt(sendListReqDto); int totalCnt = mntrngMapper.selectSendListTotalCnt(sendListReqDto);
if (totalCnt == 0) { if (totalCnt == 0 || StringUtils.isBlank(sendListReqDto.getSentDate())) {
SendListRes sendListRes = new SendListRes(); SendListRes sendListRes = new SendListRes();
sendListRes.setList(new ArrayList<>()); sendListRes.setList(new ArrayList<>());
Paging paging = new Paging(); Paging paging = new Paging();
paging.setPage(nowPage); paging.setPage(nowPage);
paging.setTotalCnt(String.valueOf(totalCnt)); paging.setTotalCnt(String.valueOf(totalCnt));
sendListRes.setPaging(paging); sendListRes.setPaging(paging);
return new SendListResDto(ApiResponseCode.CM_NOT_FOUND, sendListRes); return new SendListResDto(ApiResponseCode.CM_NOT_FOUND, sendListRes);
} }

View File

@@ -1,16 +1,16 @@
package kr.co.uplus.ez.api.mntrng.dto; package kr.co.uplus.ez.api.mntrng.dto;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class SendList implements Serializable { public class SendList implements Serializable {
@ApiModelProperty(example = "no", name = "no", dataType = "String") @ApiModelProperty(example = "no", name = "no", dataType = "String")
private String no; private int no;
@ApiModelProperty(example = "발송일자", name = "발송일자", dataType = "String") @ApiModelProperty(example = "발송일자", name = "발송일자", dataType = "String")
private String sentDate; private String sentDate;
@ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String") @ApiModelProperty(example = "고객사명", name = "고객사명", dataType = "String")

View File

@@ -1,11 +1,11 @@
package kr.co.uplus.ez.api.mntrng.dto; package kr.co.uplus.ez.api.mntrng.dto;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@SuppressWarnings("serial") @SuppressWarnings("serial")
@Data @Data
public class SendListReqDto implements Serializable { public class SendListReqDto implements Serializable {
@@ -18,7 +18,6 @@ public class SendListReqDto implements Serializable {
@ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int") @ApiModelProperty(example = "현재 페이지", name = "현재 페이지", dataType = "int")
private int page; private int page;
@NotNull
@ApiModelProperty(example = "발송일", name = "발송일",dataType = "String") @ApiModelProperty(example = "발송일", name = "발송일",dataType = "String")
private String sentDate; private String sentDate;

View File

@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -285,6 +286,7 @@ public class RiskMgtService {
* @param paramMap * @param paramMap
* @return * @return
*/ */
@Transactional(value="db1TransactionManager")
public MsgInsertIntrcpResDto msgInsertIntrcp(MsgInsertIntrcpReqDto msgInsertIntrcpReqDto) { public MsgInsertIntrcpResDto msgInsertIntrcp(MsgInsertIntrcpReqDto msgInsertIntrcpReqDto) {
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class); RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);
@@ -292,7 +294,7 @@ public class RiskMgtService {
Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal(); Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
UserDetails userDetails = (UserDetails) principal; UserDetails userDetails = (UserDetails) principal;
String regId = userDetails.getUsername(); String regId = userDetails.getUsername();
try {
String seqNoStr = riskMgtMapper.selectMsgBlckWordSeq(); String seqNoStr = riskMgtMapper.selectMsgBlckWordSeq();
long seqNo = Long.parseLong(seqNoStr); long seqNo = Long.parseLong(seqNoStr);
// seq select // seq select
@@ -300,21 +302,14 @@ public class RiskMgtService {
msgInsertIntrcpReqDto.setRegId(regId); msgInsertIntrcpReqDto.setRegId(regId);
msgInsertIntrcpReqDto.setBlckYn(Const.COMM_YES); msgInsertIntrcpReqDto.setBlckYn(Const.COMM_YES);
riskMgtMapper.insertMsgBlckword(msgInsertIntrcpReqDto); riskMgtMapper.insertMsgBlckword(msgInsertIntrcpReqDto);
// TODO 차단문구 등록
// 리스트에 regId 넣기 // 리스트에 regId 넣기
List<MsgBlckwordList> list = msgInsertIntrcpReqDto.getList(); List<MsgBlckwordList> list = msgInsertIntrcpReqDto.getList();
for (MsgBlckwordList msgBlckword : list) { for (MsgBlckwordList msgBlckword : list) {
msgBlckword.setSeqNo(seqNo); msgBlckword.setSeqNo(seqNo);
msgBlckword.setRegId(regId); msgBlckword.setRegId(regId);
} }
riskMgtMapper.insertBlckwordDtl(list); riskMgtMapper.insertBlckwordDtl(list);
} catch (Exception e) {
return new MsgInsertIntrcpResDto(ApiResponseCode.CM_DB_QUERY_ERR);
}
return new MsgInsertIntrcpResDto(ApiResponseCode.SUCCESS); return new MsgInsertIntrcpResDto(ApiResponseCode.SUCCESS);
} }
@@ -324,6 +319,7 @@ public class RiskMgtService {
* @param msgUpdateIntrcplReqDto * @param msgUpdateIntrcplReqDto
* @return * @return
*/ */
@Transactional(value="db1TransactionManager")
public MsgUpdateIntrcpResDto msgUpdateIntrcp(MsgUpdateIntrcplReqDto msgUpdateIntrcplReqDto) { public MsgUpdateIntrcpResDto msgUpdateIntrcp(MsgUpdateIntrcplReqDto msgUpdateIntrcplReqDto) {
RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class); RiskMgtMapper riskMgtMapper = sqlSessionMaster.getMapper(RiskMgtMapper.class);

View File

@@ -15,6 +15,9 @@ public class Const {
public static final String AUTH_STTUS_CD_01 = "01"; // 인증대기 public static final String AUTH_STTUS_CD_01 = "01"; // 인증대기
public static final String AUTH_STTUS_CD_02 = "02"; // 인증완료 public static final String AUTH_STTUS_CD_02 = "02"; // 인증완료
public static final String AUTH_CD_ADMIN = "1001";
public static final String AUTH_CD_AGENCY = "1002";
// paging // paging
public static final String TOTAL_CNT = "totalCnt"; public static final String TOTAL_CNT = "totalCnt";
public static final String CURRENT_PAGE = "currentPage"; public static final String CURRENT_PAGE = "currentPage";

View File

@@ -1,155 +0,0 @@
//package kr.co.uplus.ez.common.utils;
//
//import java.io.UnsupportedEncodingException;
//import java.lang.reflect.Method;
//import java.lang.reflect.Parameter;
//import java.util.Arrays;
//import java.util.Enumeration;
//
//import javax.servlet.http.HttpServletRequest;
//
//import org.joda.time.DateTime;
//import org.joda.time.format.DateTimeFormat;
//import org.joda.time.format.DateTimeFormatter;
//import org.springframework.util.LinkedMultiValueMap;
//import org.springframework.util.MultiValueMap;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.util.ContentCachingRequestWrapper;
//
//import kr.co.uplus.ez.common.auth.AuthUser;
//import kr.co.uplus.ez.common.consts.Const;
//
//
//public class LogUtils {
// public static final String HANG_LOG_KEY = "hangfile";
//
// private static final String HANG_LOG_ROOT = "/logs/uplus/hang/ui";
// private static final DateTimeFormatter FMT_TO_DAY = DateTimeFormat.forPattern("yyyyMMdd");
// private static final DateTimeFormatter FMT_TO_HOUR = DateTimeFormat.forPattern("yyyyMMddHH");
// private static final DateTimeFormatter FMT_TO_SECOND = DateTimeFormat.forPattern("yyyyMMddHHmmss");
// private static final DateTimeFormatter FMT_TO_MILSEC = DateTimeFormat.forPattern("yyyyMMddHHmmssSSS");
//
// public static String getTloLogfileName(String tloRoot) {
// DateTime now = DateTime.now();
// String dir = now.toString(FMT_TO_DAY);
// String suffix = now.toString(FMT_TO_HOUR);
// int min = 5 * (now.getMinuteOfHour() / 5);
// int NODE_NO = 1;
// return String.format("%s/%s/RCS.ADMIN.%03d.%s%02d.log", tloRoot, dir, NODE_NO, suffix, min);
// }
//
// public static String getLoginId() {
// AuthUser user = SpringUtils.getCurrentUser();
// if (user == null)
// return "anonymousUser";
//
// return user.getUsername();
// }
//
// public static String getCurrentTime() {
// return DateTime.now().toString(FMT_TO_MILSEC);
// }
//
//// public static void addTloOrdinaryInfo(TloLog tlo, HttpServletRequest request, HttpServletResponse response) {
//// DateTime now = DateTime.now();
//// tlo.setRspTime(now.toString(FMT_TO_MILSEC));
//// tlo.setClientIp(LogUtils.clientIp(request));
////
//// int status = response.getStatus();
//// if (status == 404) {
//// tlo.setResultCode(ResultCode.SS_NOT_FOUND.getValue());
//// }
//// }
////
//// public static void addTloCustomInfo(TloLog tlo, HttpServletRequest request) {
//// tlo.setReqUri(request.getRequestURI());
//// tlo.setReqParam(getReqMultiMap(request).toString());
//// }
////
//// public static void addTloFailInfo(Object rspObj, HttpServletRequest request) {
//// if (rspObj instanceof Result) {
//// Result<?> result = (Result<?>) rspObj;
//// if (!result.isSuccess()) {
//// TloLog tlo = (TloLog) request.getAttribute(Const.KEY_LOG_OBJ);
//// String code = result.getCode();
//// tlo.setResultCode(code != null ? code : ResultCode.SE_UNKNOWN.getValue());
//// }
//// }
//// else if (rspObj instanceof RestResult) {
//// RestResult<?> result = (RestResult<?>) rspObj;
//// if (!result.isSuccess()) {
//// TloLog tlo = (TloLog) request.getAttribute(Const.KEY_LOG_OBJ);
//// ResultCode code = result.getCode();
//// tlo.setResultCode(code != null ? code.getValue() : ResultCode.SE_UNKNOWN.getValue());
//// }
//// }
//// }
////
//// public static void addTloExceptionInfo(TloLog tlo, Exception ex) {
//// if (ex == null)
//// return;
////
//// if (ex instanceof ServletException) {
//// Throwable e = ((ServletException) ex).getRootCause();
//// if (e instanceof SQLException || e instanceof DataAccessException) {
//// tlo.setResultCode(ResultCode.SE_DB.getValue());
//// }
//// else {
//// tlo.setResultCode(ResultCode.SE_INTERNAL.getValue());
//// }
//// }
//// else {
//// tlo.setResultCode(ResultCode.SE_INTERNAL.getValue());
//// }
//// }
// public static String clientIp(HttpServletRequest request) {
// String ip = request.getHeader("X-Forwarded-For");
// if (ip == null)
// ip = request.getRemoteAddr();
// return ip;
// }
//
//
// public static MultiValueMap<String,String> getReqMultiMap(HttpServletRequest request) {
// MultiValueMap<String,String> params = new LinkedMultiValueMap<>();
// Enumeration<String> names = request.getParameterNames();
// while (names.hasMoreElements()) {
// String name = names.nextElement();
// if (Const.NOT_LOG_PARAMS.contains(name))
// continue;
// String[] value = request.getParameterValues(name);
// params.put(name, Arrays.asList(value));
// }
// return params;
// }
//
// public static boolean isResourceUri(String uri) {
// return uri.startsWith("/static/");
// }
//
// public static String getRequestBody(HttpServletRequest request, Method method) {
// Parameter[] parameters = method.getParameters();
//
// for (Parameter param : parameters) {
// if (param.getAnnotation(RequestBody.class) != null) {
// // CommonsRequestLoggingFilter.getMessagePayload()
// ContentCachingRequestWrapper wrapper =
// org.springframework.web.util.WebUtils.getNativeRequest(request, ContentCachingRequestWrapper.class);
// if (wrapper != null) {
// byte[] buf = wrapper.getContentAsByteArray();
// if (buf.length > 0) {
// int length = Math.min(buf.length, 10000);
// try {
// return new String(buf, 0, length, wrapper.getCharacterEncoding());
// }
// catch (UnsupportedEncodingException ex) {
// return "[unknown]";
// }
// }
// }
// }
// }
// return "";
// }
//
//}

View File

@@ -24,40 +24,49 @@
<select id="selectAttractList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo"> <select id="selectAttractList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
/* attractMgt-mapper.xml(selectAttractList) */ /* attractMgt-mapper.xml(selectAttractList) */
SELECT SELECT
@ROWNUM := @ROWNUM + 1 AS NO @ROWNUM := @ROWNUM + 1 AS NO
, A.* , A.SUBS_DT
, A.NORG_NM
, A.USER_SEQ
, A.LOGIN_ID
, A.CUST_NM
, A.BIZRNO
, A.USER_NM
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as CUST_TY_CD
, (
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = A.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
) AS SND_CNT
FROM
(
SELECT
ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT
, eig.NORG_NM
, esi.USER_SEQ
, eiu.LOGIN_ID
, eci.CUST_NM
, eci.BIZRNO
, esu.USER_NM
, esi.SUBS_STTUS_CD
, eci.CUST_TY_CD
FROM FROM
( hubez_common.EZ_SUBS_INFO esi
SELECT INNER JOIN hubez_common.EZ_CUST_INFO eci
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT ON eci.CUST_SEQ = esi.CUST_SEQ
, eig.NORG_NM INNER JOIN hubez_common.EZ_SVC_USER esu
, esi.USER_SEQ ON esu.USER_SEQ = esi.USER_SEQ
, eiu.LOGIN_ID INNER JOIN hubez_imdb.EZ_IM_USER eiu
, eci.CUST_NM ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
, eci.BIZRNO INNER JOIN hubez_imdb.EZ_IM_GROUP eig
, esu.USER_NM ON eiu.EX_DEPT_CD = eig.NORG_CD
, esi.SUBS_STTUS_CD WHERE 1 = 1
, eci.CUST_TY_CD <include refid="attractListCondition"/>
,(
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = esu.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)) AS SND_CNT
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON eci.CUST_SEQ = esi.CUST_SEQ
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_imdb.EZ_IM_USER eiu
ON eiu.LOGIN_ID = esi.ATTRCTOR_ID
INNER JOIN hubez_imdb.EZ_IM_GROUP eig
ON eiu.EX_DEPT_CD = eig.NORG_CD
WHERE 1 = 1
<include refid="attractListCondition"/>
ORDER BY esi.SUBS_DT DESC ORDER BY esi.SUBS_DT DESC
LIMIT #{page}, #{pagePerRows} LIMIT #{page}, #{pagePerRows}
) A , ( SELECT @ROWNUM := #{page} ) AS R ) A , ( SELECT @ROWNUM := #{page} ) AS R
@@ -66,27 +75,37 @@
<select id="selectAttractExcelList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo"> <select id="selectAttractExcelList" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelListExcelReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelInfo">
/* attractMgt-mapper.xml(selectAttractExcelList) */ /* attractMgt-mapper.xml(selectAttractExcelList) */
SELECT SELECT
@ROWNUM := @ROWNUM + 1 AS NO @ROWNUM := @ROWNUM + 1 AS NO
, A.* , A.SUBS_DT
FROM , A.NORG_NM
( , A.USER_SEQ
, A.LOGIN_ID
, A.CUST_NM
, A.BIZRNO
, A.USER_NM
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'SUBS_STTUS_CD' AND DTL_CD = A.SUBS_STTUS_CD) as SUBS_STTUS_CD
, (SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD = 'CUST_KD_CD' AND DTL_CD = A.CUST_TY_CD) as CUST_TY_CD
, (
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = A.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)
) AS SND_CNT
FROM
(
SELECT SELECT
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT
, eig.NORG_NM , eig.NORG_NM
, esi.USER_SEQ
, eiu.LOGIN_ID , eiu.LOGIN_ID
, eci.CUST_NM , eci.CUST_NM
, eci.BIZRNO , eci.BIZRNO
, esu.USER_NM , esu.USER_NM
, esi.SUBS_STTUS_CD , esi.SUBS_STTUS_CD
, eci.CUST_TY_CD , eci.CUST_TY_CD
,(
SELECT
sum(IFNULL(ecm.SND_CNT,0) + IFNULL(ecm.FBACK_CNT,0))
FROM
hubez_common.EZ_CUST_MSTAT ecm
WHERE
ecm.USER_SEQ = esu.USER_SEQ
AND ecm.SUM_YM BETWEEN DATE_ADD(NOW(), INTERVAL -37 MONTH) AND DATE_ADD(NOW(), INTERVAL -1 MONTH)) AS SND_CNT
FROM FROM
hubez_common.EZ_SUBS_INFO esi hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_CUST_INFO eci INNER JOIN hubez_common.EZ_CUST_INFO eci
@@ -99,9 +118,7 @@
ON eiu.EX_DEPT_CD = eig.NORG_CD ON eiu.EX_DEPT_CD = eig.NORG_CD
WHERE 1 = 1 WHERE 1 = 1
<include refid="attractListCondition"/> <include refid="attractListCondition"/>
ORDER BY ORDER BY esi.SUBS_DT DESC) A ,
esi.SUBS_DT DESC
LIMIT 100) A ,
( SELECT @ROWNUM := 0 ) AS R ( SELECT @ROWNUM := 0 ) AS R
</select> </select>
@@ -133,6 +150,9 @@
AND eci.BIZRNO = #{searchText} AND eci.BIZRNO = #{searchText}
</if> </if>
</if> </if>
<if test="attrctorId != null and attrctorId != ''">
and esi.ATTRCTOR_ID = #{attrctorId}
</if>
</sql> </sql>
<select id="selectAttractDetail" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailRes"> <select id="selectAttractDetail" parameterType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailReqDto" resultType="kr.co.uplus.ez.api.attractMgt.dto.ChannelDetailRes">
@@ -140,10 +160,24 @@
SELECT SELECT
DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT DATE_FORMAT(esi.SUBS_DT, '%Y-%m-%d') AS SUBS_DT
, esi.SUBS_STTUS_CD , esi.SUBS_STTUS_CD
,(SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SUBS_STTUS_CD'
AND T2.DTL_CD = esi.SUBS_STTUS_CD) AS SUBS_STTUS_NM
, eci.CUST_NM , eci.CUST_NM
, esi.PROD_CD , esi.PROD_CD
, eci.REPR_NM , eci.REPR_NM
, eci.CUST_TY_CD , eci.CUST_TY_CD
,(SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'CUST_KD_CD'
AND T2.DTL_CD = eci.CUST_TY_CD) AS CUST_TY_NM
, eci.BIZRNO , eci.BIZRNO
, eci.CORPNO AS CPR_REG_NO , eci.CORPNO AS CPR_REG_NO
, eci.ZIPCD AS ADR1 , eci.ZIPCD AS ADR1

View File

@@ -27,8 +27,22 @@
(eci.BIZRNO)AS bRegNo, (eci.BIZRNO)AS bRegNo,
eat.TMPLT_CD AS tmpltCd, eat.TMPLT_CD AS tmpltCd,
eat.TMPLT_NM AS tmpltNm, eat.TMPLT_NM AS tmpltNm,
(eat.TMPLT_TP_CD) AS tmpltType, <!-- (eat.TMPLT_TP_CD) AS tmpltType, -->
eat.TMPLT_STTUS_CD AS stat, (SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'TMPLT_TP_CD'
AND T2.DTL_CD=eat.TMPLT_TP_CD) AS tmpltType,
<!-- eat.TMPLT_STTUS_CD AS stat, -->
(SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'TMPLT_STTUS_CD'
AND T2.DTL_CD=eat.TMPLT_STTUS_CD) AS stat,
eat.REJCT_RSN AS returnReason, eat.REJCT_RSN AS returnReason,
eat.SNDRPROF_KEY AS sendProfile, eat.SNDRPROF_KEY AS sendProfile,
<!-- (select CHNL_ID from hubez_common.EZ_KKO_CHNL ekc WHERE eat.SNDRPROF_KEY = ekc.SNDRPROF_KEY) AS sendProfile, --> <!-- (select CHNL_ID from hubez_common.EZ_KKO_CHNL ekc WHERE eat.SNDRPROF_KEY = ekc.SNDRPROF_KEY) AS sendProfile, -->

View File

@@ -12,6 +12,7 @@
INNER JOIN hubez_common.EZ_SVC_USER esu INNER JOIN hubez_common.EZ_SVC_USER esu
ON ON
esu.USER_SEQ = esi.USER_SEQ esu.USER_SEQ = esi.USER_SEQ
AND esu.USER_TP_CD IN ('01','03')
INNER JOIN hubez_common.EZ_CUST_INFO eci INNER JOIN hubez_common.EZ_CUST_INFO eci
ON ON
eci.CUST_SEQ = esi.CUST_SEQ eci.CUST_SEQ = esi.CUST_SEQ
@@ -21,96 +22,146 @@
</select> </select>
<select id="selectSubsLists" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsList"> <select id="selectSubsLists" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsList">
/* custMgt-mapper.xml(selectSubsLists) */ /* custMgt-mapper.xml(selectSubsLists) */
SELECT SELECT
@ROWNUM := @ROWNUM + 1 AS NO, @ROWNUM := @ROWNUM + 1 AS NO
A.* , A.SERVICE_ID
FROM , A.CUST_NM
( , A.REG_NO
SELECT , A.REG_DT
esu.USER_ID as SERVICE_ID, , (
eci.CUST_NM as CUST_NM , SELECT
esi.ENTR_NO as REG_NO, DTL_CD_NM
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT, FROM
( hubez_common.EZ_CD_DTL
SELECT WHERE
DTL_CD_NM GRP_CD = 'SUBS_STTUS_CD'
FROM AND DTL_CD = A.SUBS_STTUS_CD
hubez_common.EZ_CD_DTL ) AS STAT
WHERE , ifnull((
GRP_CD = 'SUBS_STTUS_CD' select case when EX_PROVUSERTYPE in ( 'CCS-CS1'
AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT , 'CCS-CB1'
, , 'CCS-CB2'
( , 'CCS-CJ'
SELECT , 'CCS-LS2'
PROD_NM , 'CCS-LS3'
FROM , 'CCS-M'
hubez_common.EZ_PROD_INFO , 'CCS-MJ'
WHERE , 'CCS-P'
PROD_CD = esi.PROD_CD) AS PLAN , 'CCS-P2'
, , 'CCS-D'
IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m%d')), 0) AS CARRY_OVER , 'CCS-G'
FROM , 'CCS-S') then '고객센터'
hubez_common.EZ_SUBS_INFO esi when EX_PROVUSERTYPE = 'DEALER' then '대리점'
INNER JOIN hubez_common.EZ_SVC_USER esu else '직접영업'
ON end as ATTRACT_CHANNEL
esu.USER_SEQ = esi.USER_SEQ from hubez_imdb.EZ_IM_USER
INNER JOIN hubez_common.EZ_CUST_INFO eci where LOGIN_ID = A.attrctorId
ON ) , '고객셀프가입') as CHANNEL
eci.CUST_SEQ = esi.CUST_SEQ , (
AND esi.CUST_SEQ = esu.CUST_SEQ SELECT
WHERE 1 = 1 PROD_NM
<include refid="subsListCondition"/> FROM
ORDER BY hubez_common.EZ_PROD_INFO
esi.OPN_DT DESC WHERE
LIMIT #{page}, #{pagePerRows}) A, PROD_CD = A.PROD_CD
( SELECT @ROWNUM := #{page} ) AS R ) AS PLAN
, IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = A.adminSeq AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m')), 0) AS CARRY_OVER -- 년월까지만 비교 해야 함.
FROM
(
SELECT
esu.USER_ID as SERVICE_ID,
eci.CUST_NM as CUST_NM ,
esi.ENTR_NO as REG_NO,
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
esi.SUBS_STTUS_CD ,
esi.PROD_CD,
esi.USER_SEQ as adminSeq,
esi.ATTRCTOR_ID as attrctorId
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
and esu.USER_TP_CD in ('01','03')
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
<include refid="subsListCondition"/>
ORDER BY esi.OPN_DT DESC
LIMIT #{page}, #{pagePerRows}) A, ( SELECT @ROWNUM := #{page} ) AS R
</select> </select>
<select id="selectSubsListsExcel" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsList"> <select id="selectSubsListsExcel" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsList">
/* custMgt-mapper.xml(selectSubsListsExcel) */ /* custMgt-mapper.xml(selectSubsListsExcel) */
SELECT SELECT
@ROWNUM := @ROWNUM + 1 AS NO, @ROWNUM := @ROWNUM + 1 AS NO
A.* , A.SERVICE_ID
FROM , A.CUST_NM
( , A.REG_NO
SELECT , A.REG_DT
esu.USER_ID as SERVICE_ID, , (
eci.CUST_NM as CUST_NM , SELECT
esi.ENTR_NO as REG_NO, DTL_CD_NM
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT, FROM
( hubez_common.EZ_CD_DTL
SELECT WHERE
DTL_CD_NM GRP_CD = 'SUBS_STTUS_CD'
FROM AND DTL_CD = A.SUBS_STTUS_CD
hubez_common.EZ_CD_DTL ) AS STAT
WHERE , ifnull((
GRP_CD = 'SUBS_STTUS_CD' select case when EX_PROVUSERTYPE in ( 'CCS-CS1'
AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT , 'CCS-CB1'
, , 'CCS-CB2'
( , 'CCS-CJ'
SELECT , 'CCS-LS2'
PROD_NM , 'CCS-LS3'
FROM , 'CCS-M'
hubez_common.EZ_PROD_INFO , 'CCS-MJ'
WHERE , 'CCS-P'
PROD_CD = esi.PROD_CD) AS PLAN , 'CCS-P2'
, , 'CCS-D'
IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m%d')), 0) AS CARRY_OVER , 'CCS-G'
FROM , 'CCS-S') then '고객센터'
hubez_common.EZ_SUBS_INFO esi when EX_PROVUSERTYPE = 'DEALER' then '대리점'
INNER JOIN hubez_common.EZ_SVC_USER esu else '직접영업'
ON end as ATTRACT_CHANNEL
esu.USER_SEQ = esi.USER_SEQ from hubez_imdb.EZ_IM_USER
INNER JOIN hubez_common.EZ_CUST_INFO eci where LOGIN_ID = A.attrctorId
ON ) , '고객셀프가입') as CHANNEL
eci.CUST_SEQ = esi.CUST_SEQ , (
AND esi.CUST_SEQ = esu.CUST_SEQ SELECT
WHERE 1 = 1 PROD_NM
<include refid="subsListCondition"></include> FROM
ORDER BY hubez_common.EZ_PROD_INFO
esi.OPN_DT DESC) A, WHERE
( SELECT @ROWNUM := 0 ) AS R PROD_CD = A.PROD_CD
) AS PLAN
, IFNULL((SELECT CFWD_AMT FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = A.adminSeq AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m')), 0) AS CARRY_OVER -- 년월까지만 비교 해야 함.
FROM
(
SELECT
esu.USER_ID as SERVICE_ID,
eci.CUST_NM as CUST_NM ,
esi.ENTR_NO as REG_NO,
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS REG_DT,
esi.SUBS_STTUS_CD ,
esi.PROD_CD,
esi.USER_SEQ as adminSeq,
esi.ATTRCTOR_ID as attrctorId
FROM
hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ
and esu.USER_TP_CD in ('01','03')
INNER JOIN hubez_common.EZ_CUST_INFO eci
ON
eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1
<include refid="subsListCondition"/>
ORDER BY esi.OPN_DT DESC ) A, ( SELECT @ROWNUM := 0 ) AS R
</select> </select>
<sql id="subsListCondition"> <sql id="subsListCondition">
<if test="startDt != null and startDt != ''"> <if test="startDt != null and startDt != ''">
@@ -238,77 +289,77 @@
</select> </select>
<select id="selectSubsDetailInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail"> <select id="selectSubsDetailInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail">
/* custMgt-mapper.xml(selectSubsDetailInfo) */ /* custMgt-mapper.xml(selectSubsDetailInfo) */
SELECT SELECT
esi.SUBS_ID , esi.SUBS_ID ,
-- 기본정보 -- 기본정보
eci.CUST_NM as CUST_NM , eci.CUST_NM as CUST_NM ,
eci.REPR_NM, eci.REPR_NM,
( (
SELECT SELECT
DTL_CD_NM ifnull(DTL_CD_NM, '-')
FROM FROM
hubez_common.EZ_CD_DTL hubez_common.EZ_CD_DTL
WHERE WHERE
GRP_CD = 'CUST_KD_CD' GRP_CD = 'CUST_KD_CD'
AND DTL_CD = eci.CUST_TY_CD) AS CUST_TYPE, AND DTL_CD = eci.CUST_TY_CD) AS CUST_TYPE,
eci.ZIPCD AS ADR1, eci.ZIPCD AS ADR1,
eci.ADDR1 AS ADR2, eci.ADDR1 AS ADR2,
eci.ADDR2 AS ADR3, eci.ADDR2 AS ADR3,
eci.BIZRNO AS B_REG_NO, eci.BIZRNO AS B_REG_NO,
eci.CORPNO AS CPR_REG_NO, eci.CORPNO AS CPR_REG_NO,
-- 사용정보 -- 사용정보
DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d') AS SUBS_DT, ifnull(DATE_FORMAT(esi.OPN_DT, '%Y-%m-%d'), DATE_FORMAT(esi.SUBS_DT , '%Y-%m-%d')) AS SUBS_DT,
esi.PROD_CD, esi.PROD_CD,
( (
SELECT SELECT
DTL_CD_NM DTL_CD_NM
FROM FROM
hubez_common.EZ_CD_DTL hubez_common.EZ_CD_DTL
WHERE WHERE
GRP_CD = 'SUBS_STTUS_CD' GRP_CD = 'SUBS_STTUS_CD'
AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT, AND DTL_CD = esi.SUBS_STTUS_CD) AS STAT,
( (
SELECT SELECT
PROD_NM PROD_NM
FROM FROM
hubez_common.EZ_PROD_INFO hubez_common.EZ_PROD_INFO
WHERE WHERE
PROD_CD = esi.PROD_CD) AS PLAN, PROD_CD = esi.PROD_CD) AS PLAN,
esi.ENTR_NO as SUBS_NO, esi.ENTR_NO as SUBS_NO,
esi.ATTRCTOR_ID AS CHANNEL_ID, esi.ATTRCTOR_ID AS CHANNEL_ID,
esi.ATTRCTOR_NM AS CHANNEL_NM, esi.ATTRCTOR_NM AS CHANNEL_NM,
esi.SUBSMNGR_ID AS ADMIN_ID, esi.SUBSMNGR_ID AS ADMIN_ID,
esi.SUBSMNGR_NM AS ADMIN_NM, esi.SUBSMNGR_NM AS ADMIN_NM,
-- 사용자 데이터 -- 사용자 데이터
esu.USER_ID as SERVICE_ID, esu.USER_ID as SERVICE_ID,
esu.USER_SEQ, esu.USER_SEQ,
esu.HP_NO as mdn, esu.HP_NO as mdn,
( (
SELECT SELECT
DTL_CD_NM DTL_CD_NM
FROM FROM
hubez_common.EZ_CD_DTL hubez_common.EZ_CD_DTL
WHERE WHERE
GRP_CD = 'SVCUSER_TP_CD' GRP_CD = 'SVCUSER_TP_CD'
AND DTL_CD = esu.USER_TP_CD) AS USE_AUTH, AND DTL_CD = esu.USER_TP_CD) AS USE_AUTH,
esu.USER_NM, esu.USER_NM,
esu.HP_NO, esu.HP_NO,
IFNULL((SELECT CFWD_AMT + CFWD_RSTRT_BLNC FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m%d')), 0) AS CARRY_OVER, IFNULL((SELECT CFWD_AMT + CFWD_RSTRT_BLNC FROM hubez_admin.EZ_USER_LMT WHERE USER_SEQ = esi.USER_SEQ AND LMT_YM = DATE_FORMAT(NOW(), '%Y%m')), 0) AS CARRY_OVER,
(SELECT COUNT(*) FROM hubez_common.EZ_SVC_USER WHERE PRNTS_USER_SEQ =esu.USER_SEQ) AS USER_CNT (SELECT COUNT(*) FROM hubez_common.EZ_SVC_USER WHERE PRNTS_USER_SEQ = esu.USER_SEQ and USER_TP_CD = '02' ) AS USER_CNT
FROM FROM
hubez_common.EZ_SUBS_INFO esi hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu INNER JOIN hubez_common.EZ_SVC_USER esu
ON ON
esu.USER_SEQ = esi.USER_SEQ esu.USER_SEQ = esi.USER_SEQ
INNER JOIN hubez_common.EZ_CUST_INFO eci INNER JOIN hubez_common.EZ_CUST_INFO eci
ON ON
eci.CUST_SEQ = esi.CUST_SEQ eci.CUST_SEQ = esi.CUST_SEQ
AND esi.CUST_SEQ = esu.CUST_SEQ AND esi.CUST_SEQ = esu.CUST_SEQ
WHERE 1 = 1 WHERE 1 = 1
AND esu.USER_TP_CD = '01' AND esu.USER_TP_CD in( '01','03')
AND esu.USER_ID = #{serviceId} AND esu.USER_ID = #{serviceId}
</select> </select>
<update id="updateAdminInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail"> <update id="updateAdminInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.SubsDetail">
/* custMgt-mapper.xml(updateAdminInfo) */ /* custMgt-mapper.xml(updateAdminInfo) */
@@ -322,12 +373,12 @@
<if test="adminNm != null and adminNm != ''"> <if test="adminNm != null and adminNm != ''">
,SUBSMNGR_NM= #{adminNm} ,SUBSMNGR_NM= #{adminNm}
</if> </if>
WHERE USER_SEQ = (SELECT esi.USER_SEQ WHERE USER_SEQ = (SELECT USER_SEQ FROM (SELECT esi.USER_SEQ
FROM hubez_common.EZ_SUBS_INFO esi FROM hubez_common.EZ_SUBS_INFO esi
INNER JOIN hubez_common.EZ_SVC_USER esu INNER JOIN hubez_common.EZ_SVC_USER esu
ON esu.USER_SEQ = esi.USER_SEQ ON esu.USER_SEQ = esi.USER_SEQ
WHERE esu.USER_TP_CD = '01' WHERE esu.USER_TP_CD = '01'
AND esu.USER_ID = #{serviceId}) AND esu.USER_ID = #{serviceId}) as sub1)
</update> </update>
<update id="updateUserInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto"> <update id="updateUserInfo" parameterType="kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto">
@@ -356,27 +407,35 @@
<select id="selectCarryOverList" parameterType="kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.CarryOver"> <select id="selectCarryOverList" parameterType="kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto" resultType="kr.co.uplus.ez.api.custMgt.dto.CarryOver">
/* custMgt-mapper.xml(selectCarryOverList) */ /* custMgt-mapper.xml(selectCarryOverList) */
SELECT SELECT null AS COLEC_TMS
MAX(eud.COLEC_TMS) AS COLEC_TMS , DATE_FORMAT(STR_TO_DATE(eul.LMT_YM ,'%Y%m'),'%Y-%m') AS LMT_YM
,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS LMT_YM , esu1.USER_ID AS USER_ID
,esu.USER_ID , SUM(FX_LMT_AMT + CFWD_AMT) AS START_AMOUNT
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMOUNT , ROUND(0) AS USE_AMOUNT
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMOUNT , ROUND(0) AS KRRR_AMOUNT
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS KRRR_AMOUNT , ROUND(0) AS EXTSH_AMOUNT
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTSH_AMOUNT FROM hubez_admin.EZ_USER_LMT eul
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud JOIN hubez_common.EZ_SVC_USER esu1 ON eul.USER_SEQ = esu1.USER_SEQ
JOIN hubez_common.EZ_SUBS_INFO esi WHERE esu1.USER_ID =#{serviceId} and eul.LMT_YM = DATE_FORMAT(now(), '%Y%m')
ON eud.SUBS_ID = esi.SUBS_ID UNION ALL
JOIN hubez_common.EZ_SVC_USER esu (SELECT MAX(eud.COLEC_TMS) AS COLEC_TMS
ON esi.USER_SEQ = esu.USER_SEQ ,DATE_FORMAT(eud.USE_YM, '%Y-%m') AS LMT_YM
WHERE 1=1 ,esu.USER_ID
,ROUND(SUM(IFNULL(eud.FX_LMT_AMT,0) + IFNULL(eud.CFWD_AMT,0))) AS START_AMOUNT
,ROUND(SUM(IFNULL(eud.FX_USE_AMT,0) + IFNULL(eud.CFWD_USE_AMT,0) + IFNULL(eud.MRT_USE_AMT,0))) AS USE_AMOUNT
,ROUND(IFNULL(eud.CFWD_AMT,0)) AS KRRR_AMOUNT
,ROUND(IFNULL(eud.EXTNC_AMT,0)) AS EXTSH_AMOUNT
FROM hubez_admin.EZ_UTXNCOLEC_DTL eud
JOIN hubez_common.EZ_SUBS_INFO esi ON eud.SUBS_ID = esi.SUBS_ID
JOIN hubez_common.EZ_SVC_USER esu ON esi.USER_SEQ = esu.USER_SEQ
WHERE 1=1
<![CDATA[ <![CDATA[
AND eud.USE_YM >= DATE_ADD(NOW(), INTERVAL -4 MONTH) AND eud.USE_YM >= DATE_ADD(NOW(), INTERVAL -4 MONTH)
AND eud.USE_YM < NOW() AND eud.USE_YM < NOW()
]]> ]]>
AND esu.USER_ID = #{serviceId} AND esu.USER_ID = #{serviceId}
GROUP BY eud.USE_YM, eud.SUBS_ID GROUP BY eud.USE_YM, eud.SUBS_ID
ORDER BY eud.USE_YM DESC ORDER BY eud.USE_YM DESC)
</select> </select>
<select id="selectImUser" parameterType="kr.co.uplus.ez.common.data.ImUser" resultType="kr.co.uplus.ez.common.data.ImUser"> <select id="selectImUser" parameterType="kr.co.uplus.ez.common.data.ImUser" resultType="kr.co.uplus.ez.common.data.ImUser">
@@ -461,7 +520,7 @@
SELECT SELECT
USER_NM USER_NM
,DATE_FORMAT(esu.REG_DT, '%Y-%m-%d') AS REG_DT ,DATE_FORMAT(esu.REG_DT, '%Y-%m-%d') AS REG_DT
,esu.USER_TP_CD AS USER_TYPE ,(SELECT DTL_CD_NM FROM hubez_common.EZ_CD_DTL WHERE GRP_CD='SVCUSER_TP_CD' AND esu.USER_TP_CD = DTL_CD) AS USER_TYPE
,USER_ID ,USER_ID
,(SELECT USER_ID FROM hubez_common.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ LIMIT 1) AS ADMIN_ID ,(SELECT USER_ID FROM hubez_common.EZ_SVC_USER where USER_SEQ = esu.PRNTS_USER_SEQ LIMIT 1) AS ADMIN_ID
,esu.USER_STTUS_CD AS USER_STAT ,esu.USER_STTUS_CD AS USER_STAT
@@ -798,7 +857,7 @@
FROM hubez_admin.EZ_USER_LMT eul FROM hubez_admin.EZ_USER_LMT eul
INNER JOIN hubez_common.EZ_SVC_USER esu INNER JOIN hubez_common.EZ_SVC_USER esu
ON eul.USER_SEQ = esu.USER_SEQ ON eul.USER_SEQ = esu.USER_SEQ
WHERE esu.USER_SEQ = #{userId} WHERE esu.USER_ID = #{userId}
AND eul.LMT_YM = DATE_FORMAT(NOW(),'%Y%m') AND eul.LMT_YM = DATE_FORMAT(NOW(),'%Y%m')
</select> </select>

View File

@@ -126,7 +126,6 @@
INTO hubez_send.${tableName} ( INTO hubez_send.${tableName} (
CLIENT_KEY CLIENT_KEY
, REQ_PRODUCT , REQ_PRODUCT
, TRAFFIC_TYPE
, MSG_STATUS , MSG_STATUS
, REQ_DATE , REQ_DATE
, CALLBACK_NUMBER , CALLBACK_NUMBER
@@ -137,7 +136,6 @@
)value( )value(
#{clientKey} #{clientKey}
, 'SMS' , 'SMS'
, 'real'
, 'ready' , 'ready'
, NOW() , NOW()
, '15445992' , '15445992'

View File

@@ -37,7 +37,13 @@
ON T1.GRP_CD = T2.GRP_CD ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_RSN_CD' WHERE T1.GRP_CD = 'SNDBLCK_RSN_CD'
and T2.DTL_CD=esb.BLCK_RSN_CD) AS BLCK_RSN_NM and T2.DTL_CD=esb.BLCK_RSN_CD) AS BLCK_RSN_NM
, IF(esb.BLCK_YN = 'Y', '차단', '미차단') AS BLCK_YN , (SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_YN_CD'
AND T2.DTL_CD=esb.BLCK_YN) AS BLCK_YN
, esb.REG_ID , esb.REG_ID
, esb.CHG_ID , esb.CHG_ID
, DATE_FORMAT(esb.CHG_DT, '%Y-%m-%d') As LAST_CHG_DT , DATE_FORMAT(esb.CHG_DT, '%Y-%m-%d') As LAST_CHG_DT
@@ -231,7 +237,13 @@
SELECT SELECT
emb.SEQ_NO emb.SEQ_NO
, ebd.WORD , ebd.WORD
, IF(emb.BLCK_YN = 'Y', '차단', '미차단') AS BLCK_YN , (SELECT
T2.DTL_CD_NM AS codeNm
FROM hubez_common.EZ_CD_GRP T1
LEFT JOIN hubez_common.EZ_CD_DTL T2
ON T1.GRP_CD = T2.GRP_CD
WHERE T1.GRP_CD = 'SNDBLCK_YN_CD'
AND T2.DTL_CD=emb.BLCK_YN) AS BLCK_YN
, DATE_FORMAT(emb.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT , DATE_FORMAT(emb.CHG_DT , '%Y-%m-%d') AS LAST_CHG_DT
,( ,(
SELECT SELECT
@@ -329,7 +341,7 @@
) VALUES ) VALUES
<foreach collection="list" item="item" index="i" <foreach collection="list" item="item" index="i"
separator=","> separator=",">
(#{item.seqNo}, #{item.word}, #{item.regId}, NOW() ) (#{item.seqNo},#{item.seqNm}, #{item.word}, #{item.regId}, NOW() )
</foreach> </foreach>
</insert> </insert>