mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 05:12:34 +09:00
유치채널관리 수정 / 정산관리 추가,수정 / 채널관리 수정 / 고객관리 수정 / 모니터링 추가 / 리스크관리 수정 / 발신번호관리
추가,수정 / 서비스관리 수정 / 발송통계 수정
This commit is contained in:
@@ -8,167 +8,63 @@
|
||||
<div class="pop-cont-detail input_box">
|
||||
<label>ID</label>
|
||||
<div class="input_search">
|
||||
<input class="search-box" type="text" value="" v-model="grid.params.searchText1">
|
||||
<button type="button" class="button btn-p2color" @click="search">조회</button>
|
||||
<input class="search-box" type="text" value="" v-model="searchText1">
|
||||
<button type="button" class="button btn-p2color" @click="adminList">조회</button>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table-c">
|
||||
<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>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>사업자등록번호</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, idx) in list">
|
||||
<td>{{ item.custNm }}</td>
|
||||
<td><a href="javascript:void(0)" @click="setAdminInfo(item)">{{ item.bregNo }}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-default" @click="adminNmPopClose();">닫기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import customGrid from "@/components/CustomGrid";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
class CustomATagRendererAdminList {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText= String(props.colValue)
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
console.log(callback)
|
||||
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
class CustomATagRenderer {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText= String(props.colValue)
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi";
|
||||
|
||||
export default {
|
||||
name: "adminNmPop",
|
||||
data(){
|
||||
return {
|
||||
row: {},
|
||||
resultData: false,
|
||||
|
||||
perPageCnt: 10,
|
||||
userId: '',
|
||||
grid: {
|
||||
url: '/api/v1/bo/sendNumMgt/adminList',
|
||||
pagePerRows: 10,
|
||||
pagination: true,
|
||||
isCheckbox: false, // true:첫번째 컬럼 앞에 체크박스 생성 / false:체크박스 제거
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
columns: [
|
||||
{ name: 'adminId', header: 'ID', align: 'center', cls:'memo'
|
||||
},
|
||||
{ name: 'bregNo', header: '사업자번호', align: 'center', renderer: {
|
||||
type: CustomATagRenderer
|
||||
, options: {
|
||||
callback: this.setAdminInfo,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'custNm', header: '고객사명', align: 'center', hidden: true}
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
params: {
|
||||
searchText1: '',
|
||||
}
|
||||
},
|
||||
searchText1: '',
|
||||
list:[],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
customGrid,
|
||||
commonModal,
|
||||
},
|
||||
props: ['sendData'],
|
||||
created(){
|
||||
},
|
||||
mounted() {
|
||||
let pageMemo = 1;
|
||||
// 페이지 정보 및 검색 조건
|
||||
const getCondition_adminList = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log('getCondition_adminList : '+getCondition_adminList);
|
||||
|
||||
// store에 저장된 페이지 정보 및 검색 조건을 불러오기
|
||||
let isKeepMemo = false;
|
||||
if (getCondition_adminList) {
|
||||
this.grid.pagePerRows = getCondition_adminList.perPage;
|
||||
this.grid.params = getCondition_adminList.params;
|
||||
pageMemo = getCondition_adminList.page;
|
||||
isKeepMemo = true;
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
search: function(isKeep) {
|
||||
console.log('this.perPageCnt:'+this.perPageCnt);
|
||||
console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP_memo = this.$refs.table.getPagination();
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP_memo._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
userId : this.userId,
|
||||
}
|
||||
});
|
||||
|
||||
const getCondition_memo = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
console.log("getCondition_memo : "+ getCondition_memo.perPage);
|
||||
|
||||
},
|
||||
setAdminInfo: function(props){
|
||||
console.log(props);
|
||||
// var param = {};
|
||||
// param.seqNo = props.seqNo;
|
||||
// param.userId = this.userId;
|
||||
// this.deleteMemoConfirm(param);
|
||||
// console.log('childData', this.$parent.childData)
|
||||
// this.getParent('numberRegPop').setAdminInfo(props);
|
||||
// this.$emit('event-data', changeData)
|
||||
this.$emit('event-data', props)
|
||||
this.adminNmPopClose();
|
||||
},
|
||||
// 모달 띄우기
|
||||
adminNmPopOpen(){
|
||||
@@ -177,7 +73,6 @@ export default {
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
this.$refs.table.cleanData();
|
||||
},
|
||||
// 모달 끄기
|
||||
adminNmPopClose(){
|
||||
@@ -187,6 +82,23 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
|
||||
async adminList(){
|
||||
try {
|
||||
this.row.searchText1 = this.searchText1
|
||||
const response = await sendNumMgtApi.adminList(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.list = result.data.list
|
||||
}
|
||||
} catch (error) {
|
||||
// this.row.title = '청약고객관리';
|
||||
// this.row.msg1 = '실패 하였습니다.';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
alert(error);
|
||||
}
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
|
||||
266
frontend/src/modules/sendNumMgt/components/ApprDetailPop.vue
Normal file
266
frontend/src/modules/sendNumMgt/components/ApprDetailPop.vue
Normal file
@@ -0,0 +1,266 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed" @click="apprDetailPopClose"></div>
|
||||
<div class="popup-wrap">
|
||||
<!-- 발신번호 상세 (타사업자)-->
|
||||
<div class="popup modal55 popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">발신번호 승인 요청 내역</h3>
|
||||
</div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>요청일</th>
|
||||
<td>{{ regDt }}</td>
|
||||
</tr>
|
||||
<tr v-show="cmpltDt !== '' && cmpltDt !== null">
|
||||
<th>완료일</th>
|
||||
<td>{{ cmpltDt }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>관리자 ID</th>
|
||||
<td>{{ adminId }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>고객사명</th>
|
||||
<td>{{ custNm }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자번호</th>
|
||||
<td>{{ bizrno }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>명의자 구분</th>
|
||||
<td>{{ nmineeDivCd }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>본인인증 휴대폰번호</th>
|
||||
<td>{{ slfAuthHp }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>발신번호</th>
|
||||
<td class="sender">
|
||||
<div class="sender-head">
|
||||
<div class="count">
|
||||
총<span>{{ numList.length }}</span>건
|
||||
</div>
|
||||
<div class="radio_group">
|
||||
<input type="radio" name="state" ref="apprRadio" value="01" id="popup_radio13" @change="allApprSttus($event)">
|
||||
<label for="popup_radio13">전체승인</label>
|
||||
<input type="radio" name="state" ref="rejRadio" value="03" id="popup_radio14" @change="allApprSttus($event)">
|
||||
<label for="popup_radio14">전체반려</label>
|
||||
</div>
|
||||
</div>
|
||||
<ul>
|
||||
<li v-for="(item, idx) in numList">{{idx+1}}. {{ item.sndrno }}
|
||||
<div class="select-btn">
|
||||
<button :class="{'btn-pcolor' : item.sttusCd === '01' || item.sttusCd === '02', 'btn-default' : item.sttusCd === '03'}" @click="change(idx, '01')">승인</button>
|
||||
<button :class="{'btn-pcolor' : item.sttusCd === '03', 'btn-default' : item.sttusCd === '01' || item.sttusCd === '02'}" @click="change(idx, '03')">반려</button>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제출서류</th>
|
||||
<td class="sender">
|
||||
<p v-for="(item, idx) in docList" v-if="item.docTpCd !== '06'">{{ item.docTitle }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자등록증</th>
|
||||
<td class="sender">
|
||||
<p v-for="(item, idx) in docList" v-if="item.docTpCd === '06'">{{ item.docTitle }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메모</th>
|
||||
<td class="sender"><textarea class="memo_text" v-model="memo">{{memo}}</textarea></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="updateSttus">저장</button>
|
||||
<button class="btn-default" @click="apprDetailPopClose">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi";
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
export default {
|
||||
name: "numberRegPop",
|
||||
// mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
nmineeDivCd(){
|
||||
console.log('watch : ', this.nmineeDivCd)
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
row: {},
|
||||
regReqNo:'',
|
||||
reqNo:'',
|
||||
seqNo:'',
|
||||
cmpltDt:'',
|
||||
adminId:'',
|
||||
custNm:'',
|
||||
bizrno:'',
|
||||
nmineeDivCd:'',
|
||||
slfAuthHp:'',
|
||||
regDt:'',
|
||||
memo:'',
|
||||
docList: [],
|
||||
numList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
model: {
|
||||
prop: 'sendData',
|
||||
event: 'event-data'
|
||||
},
|
||||
props: ['sendData'],
|
||||
created(){
|
||||
this.formReset();
|
||||
},
|
||||
methods :{
|
||||
// 모달 띄우기
|
||||
apprDetailPopOpen(props){
|
||||
|
||||
// this.formReset();
|
||||
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('modal55');
|
||||
obj[0].style.display = 'block';
|
||||
|
||||
this.apprDetail(props);
|
||||
|
||||
},
|
||||
async apprDetail(props){
|
||||
try {
|
||||
console.log(props)
|
||||
this.row.regReqNo = props.regReqNo
|
||||
const response = await sendNumMgtApi.apprDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
this.regRegNo = result.data.regReqNo
|
||||
this.reqNo = result.data.regReqNo
|
||||
this.regDt = result.data.regDt
|
||||
this.custNm = result.data.custNm
|
||||
this.adminId = result.data.adminId
|
||||
this.chgDt = result.data.chgDt
|
||||
this.bizrno = result.data.bizrno.substring(0,3)+'-'+result.data.bizrno.substring(3,5)+'-'+result.data.bizrno.substring(5,10)
|
||||
this.nmineeDivCd = result.data.nmineeDivCd
|
||||
this.regRegNo = result.data.regRegNo
|
||||
this.slfAuthHp = result.data.slfAuthHp
|
||||
this.docList = result.data.docList
|
||||
this.numList = result.data.numList
|
||||
this.memo = result.data.memo
|
||||
this.cmpltDt = result.data.cmpltDt
|
||||
|
||||
console.log(this.reqNo)
|
||||
var apprCnt=0;
|
||||
var rejtCnt=0;
|
||||
this.numList.forEach(function(value, index) {
|
||||
// value.sttusCd = data
|
||||
if(value.sttusCd == '01' || value.sttusCd == '02' ){
|
||||
apprCnt = apprCnt + 1;
|
||||
}else if(value.sttusCd == '03'){
|
||||
rejtCnt = rejtCnt + 1;
|
||||
}
|
||||
});
|
||||
if(apprCnt == this.numList.length){
|
||||
this.$refs.apprRadio.checked = true;
|
||||
}else if(rejtCnt == this.numList.length){
|
||||
this.$refs.rejRadio.checked = true;
|
||||
}
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
this.row.title = '발신번호승인';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
// 모달 끄기
|
||||
apprDetailPopClose(){
|
||||
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('modal55');
|
||||
popup[0].style.display = 'none';
|
||||
},
|
||||
allApprSttus(event) {
|
||||
var data = event.target.value;
|
||||
console.log(data);
|
||||
this.numList.forEach(function(value, index) {
|
||||
value.sttusCd = data
|
||||
});
|
||||
},
|
||||
change(idx, val){
|
||||
this.numList[idx].sttusCd = val
|
||||
this.$refs.apprRadio.checked = false;
|
||||
this.$refs.rejRadio.checked = false;
|
||||
// radio_group 클래스 하위 라디오 박스 체크 유무 변경 필요.
|
||||
var apprCnt=0;
|
||||
var rejtCnt=0;
|
||||
this.numList.forEach(function(value, index) {
|
||||
// value.sttusCd = data
|
||||
if(value.sttusCd == '01' || value.sttusCd == '02' ){
|
||||
apprCnt = apprCnt + 1;
|
||||
}else if(value.sttusCd == '03'){
|
||||
rejtCnt = rejtCnt + 1;
|
||||
}
|
||||
});
|
||||
if(apprCnt == this.numList.length){
|
||||
this.$refs.apprRadio.checked = true;
|
||||
}else if(rejtCnt == this.numList.length){
|
||||
this.$refs.rejRadio.checked = true;
|
||||
}
|
||||
},
|
||||
updateSttus(){
|
||||
// 컨펌??
|
||||
this.doSave()
|
||||
},
|
||||
async doSave(){
|
||||
this.row.memo = this.memo
|
||||
this.row.regReqNo = this.reqNo
|
||||
this.row.adminId = this.adminId
|
||||
this.row.list = this.numList
|
||||
|
||||
console.log(this.row)
|
||||
try{
|
||||
const response = await sendNumMgtApi.updateAppr(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.apprDetailPopClose()
|
||||
this.$parent.search()
|
||||
}
|
||||
} catch (error) {
|
||||
this.row.title = '발신번호 승인';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
formReset(){
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed" @click="numberDetailPopClose();"></div>
|
||||
<div class="dimmed" @click="numberDetailPopClose"></div>
|
||||
<!-- 발신번호 상세 (타사업자)-->
|
||||
<div class="popup modal53 popup_form register">
|
||||
<div class="pop-head">
|
||||
@@ -12,57 +12,52 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>관리자 ID</th>
|
||||
<td><input type="text" disabled value="uplus01"></td>
|
||||
<td><input type="text" disabled v-model="adminId"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>고객사명</th>
|
||||
<td><input type="text" disabled value="유플러스"></td>
|
||||
<td><input type="text" disabled v-model="custNm"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등록자 ID</th>
|
||||
<td><input type="text" disabled value="uplus01"></td>
|
||||
<td><input type="text" disabled v-model="register"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자번호</th>
|
||||
<td><input type="text" disabled value="229-81-39938"></td>
|
||||
<td><input type="text" disabled v-model="bRegNo"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>명의자 구분</th>
|
||||
<td><input type="text" disabled value="타사업자"></td>
|
||||
<td><input type="text" disabled v-model="nmineeDivCd"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>인입채널</th>
|
||||
<td><input type="text" disabled value="홈페이지"></td>
|
||||
<td><input type="text" disabled v-model="inchDivCd"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>발신번호</th>
|
||||
<td>
|
||||
<div class="input_add">
|
||||
<div>
|
||||
<input type="text" disabled value="테스트">
|
||||
<input type="text" disabled value="02-555-5555">
|
||||
<input type="text" disabled v-model="sndrnoNm">
|
||||
<input type="text" disabled v-model="sndrno">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>승인상태</th>
|
||||
<td class="red">승인 완료</td>
|
||||
<td class="red">{{ sttusCd }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>등록일자</th>
|
||||
<td><input type="text" disabled value="2022-03-10"></td>
|
||||
<td><input type="text" disabled v-model="regDt"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>제출서류</th>
|
||||
<td>
|
||||
<div class="sender">
|
||||
<p>위임장.jpg (00KB)</p>
|
||||
<p>위임-수임관계 확인서류.jpg (00KB)</p>
|
||||
<p>대리인 신분증 사본.jpg (00KB)</p>
|
||||
<p>재직증명서.jpg (00KB)</p>
|
||||
<p>통신서비스 이용증명원.jpg (00KB)</p>
|
||||
<p>사업자등록증.jpg (00KB)</p>
|
||||
<p v-for="(item, idx) in list" v-if="item.docTpcd !== '06'">{{ item.docTitle }} ({{ item.fileSize }}KB)</p>
|
||||
</div>
|
||||
<p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p>
|
||||
</td>
|
||||
@@ -71,7 +66,8 @@
|
||||
<th>사업자등록증</th>
|
||||
<td>
|
||||
<div class="sender">
|
||||
<p>사업자등록증.jpg (00KB)</p>
|
||||
<!-- <p>사업자등록증.jpg (00KB)</p>-->
|
||||
<p v-for="(item, idx) in list" v-if="item.docTpCd === '06'">{{ item.docTitle }} ({{ item.fileSize }}KB)</p>
|
||||
</div>
|
||||
<p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p>
|
||||
</td>
|
||||
@@ -88,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AdminListPop from "@/modules/sendNumMgt/components/AdminListPop";
|
||||
import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi";
|
||||
|
||||
export default {
|
||||
name: "numberRegPop",
|
||||
@@ -103,14 +99,19 @@ export default {
|
||||
row: {},
|
||||
adminId:'',
|
||||
custNm:'',
|
||||
register:'',
|
||||
bRegNo:'',
|
||||
nmineeDivCd:'01',
|
||||
numberInputs: [],
|
||||
fileType:1,
|
||||
nmineeDivCd:'',
|
||||
inchDivCd:'',
|
||||
sndrnoNm:'',
|
||||
sndrno:'',
|
||||
sttusCd:'',
|
||||
regDt:'',
|
||||
list: [],
|
||||
regRegNo:'',
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AdminListPop,
|
||||
},
|
||||
model: {
|
||||
prop: 'sendData',
|
||||
@@ -121,31 +122,10 @@ export default {
|
||||
this.formReset();
|
||||
},
|
||||
methods :{
|
||||
searchIdPop(){
|
||||
this.$refs.admnListPop.adminNmPopOpen();
|
||||
},
|
||||
addNumberInput(){
|
||||
this.numberInputs.push({
|
||||
sendNm: '',
|
||||
sendNum: ''
|
||||
})
|
||||
},
|
||||
delNumberInput(index){
|
||||
this.numberInputs.splice(index,1)
|
||||
},
|
||||
changeNmineDiv(event){
|
||||
var data = event.target.value;
|
||||
console.log(data)
|
||||
if(data === '01'){
|
||||
this.fileType = 1
|
||||
}
|
||||
if(data === '02'){
|
||||
this.fileType = 2
|
||||
}
|
||||
},
|
||||
// 모달 띄우기
|
||||
numberDetailPopOpen(insertType){
|
||||
this.formReset();
|
||||
numberDetailPopOpen(props){
|
||||
|
||||
// this.formReset();
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'block';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
@@ -153,10 +133,40 @@ export default {
|
||||
var obj = document.getElementsByClassName('modal53');
|
||||
obj[0].style.display = 'block';
|
||||
|
||||
|
||||
|
||||
this.numberDetail(props);
|
||||
|
||||
},
|
||||
async numberDetail(props){
|
||||
try {
|
||||
console.log(props)
|
||||
this.row.regReqNo = props.regReqNo
|
||||
this.row.sndrno = props.sndrno
|
||||
const response = await sendNumMgtApi.numberDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
|
||||
this.adminId = result.data.adminId
|
||||
this.custNm = result.data.custNm
|
||||
this.register = result.data.register
|
||||
this.bRegNo = result.data.bregNo
|
||||
this.nmineeDivCd = result.data.nmineeDivCd
|
||||
this.inchDivCd = result.data.inchDivCd
|
||||
this.sndrnoNm = result.data.sndrnoNm
|
||||
this.sndrno = result.data.sndrno
|
||||
this.sttusCd = result.data.sttusCd
|
||||
this.regDt = result.data.regDt
|
||||
// result.data.list.forEach()
|
||||
this.list = result.data.list
|
||||
this.regRegNo = result.data.regRegNo
|
||||
}
|
||||
} catch (error) {
|
||||
// this.row.title = '청약고객관리';
|
||||
// this.row.msg1 = '실패 하였습니다.';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
alert(error);
|
||||
}
|
||||
},
|
||||
// 모달 끄기
|
||||
numberDetailPopClose(){
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
<th>사업자번호</th>
|
||||
<td><input type="text" disabled v-model="bRegNo"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-show="bizrAuthYn !== 'Y'">
|
||||
<th>명의자 구분</th>
|
||||
<td>
|
||||
<input type="radio" name="nmineeDiv" value="01" id="popup_radio5" v-model="nmineeDivCd" @change="changeNmineDiv($event)">
|
||||
<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="nmineeDiv" value="02" id="popup_radio6" v-model="nmineeDivCd" @change="changeNmineDiv($event)">
|
||||
<input type="radio" name="nmineeDivCd" value="02" id="popup_radio6" v-model="nmineeDivCd" @change="changeNmineDiv($event)">
|
||||
<label for="popup_radio6">타사업자</label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -40,18 +40,18 @@
|
||||
<td>
|
||||
<div class="input_add">
|
||||
<div>
|
||||
<input type="text" placeholder="발신번호명">
|
||||
<input type="text" placeholder="발신번호(숫자만입력)">
|
||||
<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">
|
||||
<input type="text" placeholder="발신번호(숫자만입력)" v-model="numberInput.sendNum">
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-show="bizrAuthYn !== 'Y'">
|
||||
<th>제출서류</th>
|
||||
<td>
|
||||
<div class="attach" v-show="fileType === 2">
|
||||
@@ -72,24 +72,30 @@
|
||||
<button class="button btn-p2color" @click="$refs.deputyFile.click()">파일업로드</button>
|
||||
<p class="file" id="deputyNm"></p>
|
||||
</div>
|
||||
<div class="attach">
|
||||
<p class="essential list"><span>*</span>통신서비스 이용증명원</p>
|
||||
<input type="file" ref="communicationFile" style="display: none" @change="readCommunicationFile" accept=".jpg,.png,.pdf,.tiff"/>
|
||||
<button class="button btn-p2color" @click="$refs.communicationFile.click()">파일업로드</button>
|
||||
<p class="file" id="communicationNm"></p>
|
||||
</div>
|
||||
<div class="attach">
|
||||
<p class="essential list"><span>*</span>재직증명서</p>
|
||||
<input type="file" ref="tenureFile" style="display: none" @change="readTenureFile" accept=".jpg,.png,.pdf,.tiff"/>
|
||||
<button class="button btn-p2color" @click="$refs.tenureFile.click()">파일업로드</button>
|
||||
<p class="file" id="tenureNm"></p>
|
||||
</div>
|
||||
<div class="attach" v-show="fileType === 1">
|
||||
<p class="essential list"><span>*</span>통신서비스 이용증명원</p>
|
||||
<input type="file" ref="communicationFile" style="display: none" @change="readCommunicationFile" accept=".jpg,.png,.pdf,.tiff"/>
|
||||
<button class="button btn-p2color" @click="$refs.communicationFile.click()">파일업로드</button>
|
||||
<p class="file" id="communicationNm"></p>
|
||||
<div class="attach" v-show="fileType === 2">
|
||||
<p class="essential list"><span>*</span>사업자등록증</p>
|
||||
<input type="file" ref="otherBusinessFile" style="display: none" @change="readOtherBusinessFile" accept=".jpg,.png,.pdf,.tiff"/>
|
||||
<button class="button btn-p2color" @click="$refs.otherBusinessFile.click()">파일업로드</button>
|
||||
<p class="file" id="otherBusinessNm"></p>
|
||||
</div>
|
||||
<p class="file">파일형식 : jpg, png, pdf, tiff (최대 5MB)</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>사업자 등록증</th>
|
||||
<td>
|
||||
<td v-show="bizrAuthYn !== 'Y'">
|
||||
<div class="attach">
|
||||
<p class="essential list"><span>*</span>사업자등록증</p>
|
||||
<input type="file" ref="businessFile" style="display: none" @change="readBusinessFile" accept=".jpg,.png,.pdf,.tiff"/>
|
||||
@@ -98,26 +104,30 @@
|
||||
</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">
|
||||
<button class="btn-pcolor">저장</button>
|
||||
<button class="btn-pcolor" @click="saveSendNum">저장</button>
|
||||
<button class="btn-default" @click="numberRegPopClose();">취소</button>
|
||||
</div>
|
||||
|
||||
<admin-list-pop ref="admnListPop" />
|
||||
|
||||
<admin-list-pop ref="admnListPop" :send-data="childData" @event-data="setChildData"/>
|
||||
<common-modal ref="commmonModal2"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AdminListPop from "@/modules/sendNumMgt/components/AdminListPop";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import sendNumMgtApi from "@/modules/sendNumMgt/service/sendNumMgtApi";
|
||||
|
||||
export default {
|
||||
name: "numberRegPop",
|
||||
// mixins: [utils_mixin, chkPattern2],
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
nmineeDivCd(){
|
||||
console.log('watch : ', this.nmineeDivCd)
|
||||
@@ -129,8 +139,13 @@ export default {
|
||||
adminId:'',
|
||||
custNm:'',
|
||||
bRegNo:'',
|
||||
bizrAuthYn: '',
|
||||
custSeq: '',
|
||||
nmineeDivCd:'01',
|
||||
sendNm: '',
|
||||
sendNum: '',
|
||||
numberInputs: [],
|
||||
saveSendNums: [],
|
||||
fileType:1,
|
||||
trustFile: null,
|
||||
warrantFile: null,
|
||||
@@ -138,10 +153,14 @@ export default {
|
||||
tenureFile: null,
|
||||
businessFile: null,
|
||||
communicationFile: null,
|
||||
otherBusinessFile:null,
|
||||
childData: 20,
|
||||
reqCnt:0,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AdminListPop,
|
||||
commonModal,
|
||||
},
|
||||
model: {
|
||||
prop: 'sendData',
|
||||
@@ -155,6 +174,14 @@ export default {
|
||||
searchIdPop(){
|
||||
this.$refs.admnListPop.adminNmPopOpen();
|
||||
},
|
||||
setChildData (data) {
|
||||
console.log(data)
|
||||
this.adminId = data.adminId
|
||||
this.custNm = data.custNm
|
||||
this.bRegNo = data.bregNo
|
||||
this.bizrAuthYn = data.bizrAuthYn
|
||||
this.custSeq = data.custSeq
|
||||
},
|
||||
addNumberInput(){
|
||||
this.numberInputs.push({
|
||||
sendNm: '',
|
||||
@@ -175,7 +202,7 @@ export default {
|
||||
}
|
||||
},
|
||||
// 모달 띄우기
|
||||
numberRegPopopen(insertType){
|
||||
numberRegPopopen(){
|
||||
this.formReset();
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'block';
|
||||
@@ -304,6 +331,7 @@ export default {
|
||||
}
|
||||
this.tenureFile = null;
|
||||
},
|
||||
//사업자 등록증.
|
||||
readBusinessFile(event){
|
||||
const file = event.target.files[0];
|
||||
|
||||
@@ -329,6 +357,7 @@ export default {
|
||||
}
|
||||
this.businessFile = null;
|
||||
},
|
||||
//통신서비스 증명원
|
||||
readCommunicationFile(event){
|
||||
const file = event.target.files[0];
|
||||
|
||||
@@ -354,6 +383,107 @@ export default {
|
||||
}
|
||||
this.communicationFile = null;
|
||||
},
|
||||
}
|
||||
// 타사업자 등록증
|
||||
readOtherBusinessFile(event){
|
||||
const file = event.target.files[0];
|
||||
|
||||
// inner Html.
|
||||
const button = document.createElement('button');
|
||||
const text = document.createElement('p');
|
||||
text.innerText = file.name;
|
||||
button.addEventListener('click', () => {
|
||||
this.delOtherBusinessFile(event);
|
||||
})
|
||||
button.innerText = 'X'
|
||||
const root = document.getElementById('otherBusinessNm');
|
||||
root.appendChild(text);
|
||||
root.appendChild(button);
|
||||
this.otherBusinessFile = file;
|
||||
},
|
||||
delOtherBusinessFile(event){
|
||||
const file = event.target.files[0];
|
||||
this.$refs.otherBusinessFile.value=null;
|
||||
let element = document.getElementById("otherBusinessNm");
|
||||
while (element.firstChild) {
|
||||
element.removeChild(element.firstChild);
|
||||
}
|
||||
this.otherBusinessFile = null;
|
||||
},
|
||||
async saveSendNum(){
|
||||
|
||||
|
||||
this.saveSendNums = []
|
||||
this.saveSendNums.push({
|
||||
sendNm: this.sendNm,
|
||||
sendNum: this.sendNum
|
||||
})
|
||||
|
||||
if(this.numberInputs.length > 0){
|
||||
this.numberInputs.forEach(element =>
|
||||
this.saveSendNums.push({
|
||||
sendNm: element.sendNm,
|
||||
sendNum: element.sendNum
|
||||
})
|
||||
)
|
||||
}
|
||||
this.doValidate();
|
||||
// console.log(this.custSeq)
|
||||
console.log(this.$data)
|
||||
if(this.bizrAuthYn !== 'Y'){
|
||||
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 result = response.data;
|
||||
console.log(result)
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.toComplete()
|
||||
}
|
||||
|
||||
}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 result = response.data;
|
||||
console.log(result)
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.toComplete()
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
const response = await sendNumMgtApi.insertNumber(this.adminId, this.custNm, this.bRegNo, this.nmineeDivCd, this.saveSendNums, this.bizrAuthYn, this.custSeq)
|
||||
const result = response.data;
|
||||
console.log(result)
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.toComplete()
|
||||
}
|
||||
}
|
||||
},
|
||||
doValidate(){
|
||||
|
||||
|
||||
if(this.isNull(this.adminId) || this.isNull(this.custNm) || this.isNull(this.bRegNo)){
|
||||
this.row.title = '발신번호 등록';
|
||||
this.row.msg1 = '관리자ID를 조회 해주세요.';
|
||||
this.getParent('NumberList').commonModalOpen(this.row)
|
||||
// this.$refs.commmonModal2.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.sendNm) || this.isNull(this.sendNum)){
|
||||
this.row.title = '발신번호 등록';
|
||||
this.row.msg1 = '발신번호명/발신번호를 입력해 주세요.';
|
||||
this.$refs.commmonModal2.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
// if(this.isNull(this.adminId)){
|
||||
// this.row.title = '발신번호 등록';
|
||||
// this.row.msg1 = '관리자ID를 조회 해주세요..';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// return false;
|
||||
// }
|
||||
},
|
||||
toComplete(){
|
||||
this.getParent('numberList').$refs.table.reloadData();
|
||||
this.numberRegPopClose();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
353
frontend/src/modules/sendNumMgt/service/mixins.js
Normal file
353
frontend/src/modules/sendNumMgt/service/mixins.js
Normal file
@@ -0,0 +1,353 @@
|
||||
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 };
|
||||
@@ -5,17 +5,59 @@ const getCommCode = (params) => {
|
||||
return httpClient.post('/api/v1/bo/comm/getCode', params, { withCredentials: false });
|
||||
}
|
||||
|
||||
const adminList = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sendNumMgt/adminList', params, {withCredentials: false});
|
||||
}
|
||||
|
||||
const numberDetail = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sendNumMgt/numberDetail', params, {withCredentials: false});
|
||||
}
|
||||
|
||||
const apprDetail = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sendNumMgt/apprDetail', params, {withCredentials: false});
|
||||
}
|
||||
|
||||
// 사업자가 등록 요청.
|
||||
const insertNumber1 = (tenureFile, businessFile, communicationFile, adminId, custNm, bRegNo, nmineeDivCd, numberInputs) => {
|
||||
const insertNumber = (adminId, custNm, bRegNo, nmineeDivCd, numberInputs, bizrAuthYn, custSeq) => {
|
||||
let formData = new FormData();
|
||||
const row = {}
|
||||
row.adminId = adminId
|
||||
row.custNm = custNm
|
||||
row.bRegNo = bRegNo
|
||||
row.list = numberInputs
|
||||
row.bizrAuthYn = bizrAuthYn
|
||||
row.custSeq = custSeq
|
||||
|
||||
console.log(row)
|
||||
formData.append('key', new Blob([ JSON.stringify(row) ], {type : "application/json"}));
|
||||
|
||||
let url = "/api/v1/bo/sendNumMgt/insertNumber";
|
||||
return httpClient.post(url, formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
"Show-Layer": "Yes"
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 사업자가 등록 요청.
|
||||
const insertNumber1 = (tenureFile, businessFile, communicationFile, adminId, custNm, bRegNo, nmineeDivCd, numberInputs, bizrAuthYn, custSeq) => {
|
||||
let formData = new FormData();
|
||||
formData.append("tenureFile", tenureFile);
|
||||
formData.append("businessFile", businessFile);
|
||||
formData.append("communicationFile", communicationFile);
|
||||
formData.append("adminId", adminId);
|
||||
formData.append("custNm", custNm);
|
||||
formData.append("bRegNo", bRegNo);
|
||||
formData.append("nmineeDivCd", nmineeDivCd);
|
||||
formData.append("numberInputs", numberInputs);
|
||||
formData.append("communicationFile", communicationFile);
|
||||
|
||||
const row = {}
|
||||
row.adminId = adminId
|
||||
row.custNm = custNm
|
||||
row.bRegNo = bRegNo
|
||||
row.nmineeDivCd = nmineeDivCd
|
||||
row.list = numberInputs
|
||||
row.bizrAuthYn = bizrAuthYn
|
||||
row.custSeq = custSeq
|
||||
|
||||
console.log(row)
|
||||
formData.append('key', new Blob([ JSON.stringify(row) ], {type : "application/json"}));
|
||||
|
||||
let url = "/api/v1/bo/sendNumMgt/insertNumber";
|
||||
return httpClient.post(url, formData, {
|
||||
@@ -27,18 +69,27 @@ const insertNumber1 = (tenureFile, businessFile, communicationFile, adminId, cus
|
||||
};
|
||||
|
||||
// 타사업자가 등록 요청.
|
||||
const insertNumber2 = (trustFile, warrantFile, deputyFile, tenureFile, businessFile, adminId, custNm, bRegNo, nmineeDivCd, numberInputs) => {
|
||||
const insertNumber2 = (trustFile, warrantFile, deputyFile, tenureFile, otherBusinessFile, businessFile, adminId, custNm, bRegNo, nmineeDivCd, numberInputs, bizrAuthYn, custSeq) => {
|
||||
let formData = new FormData();
|
||||
formData.append("trustFile", trustFile);
|
||||
formData.append("warrantFile", warrantFile);
|
||||
formData.append("deputyFile", deputyFile);
|
||||
formData.append("tenureFile", tenureFile);
|
||||
formData.append("businessFile", businessFile);
|
||||
formData.append("adminId", adminId);
|
||||
formData.append("custNm", custNm);
|
||||
formData.append("bRegNo", bRegNo);
|
||||
formData.append("nmineeDivCd", nmineeDivCd);
|
||||
formData.append("numberInputs", numberInputs);
|
||||
formData.append("otherBusinessFile", otherBusinessFile);
|
||||
|
||||
const row = {}
|
||||
row.adminId = adminId
|
||||
row.custNm = custNm
|
||||
row.bRegNo = bRegNo
|
||||
row.nmineeDivCd = nmineeDivCd
|
||||
row.numberInputs = numberInputs
|
||||
row.bizrAuthYn = bizrAuthYn
|
||||
row.custSeq = custSeq
|
||||
|
||||
console.log(row)
|
||||
|
||||
formData.append('key', new Blob([ JSON.stringify(row) ], {type : "application/json"}));
|
||||
|
||||
let url = "/api/v1/bo/sendNumMgt/insertNumber";
|
||||
return httpClient.post(url, formData, {
|
||||
@@ -49,8 +100,17 @@ const insertNumber2 = (trustFile, warrantFile, deputyFile, tenureFile, businessF
|
||||
});
|
||||
};
|
||||
|
||||
const updateAppr = (params) => {
|
||||
return httpClient.post('/api/v1/bo/sendNumMgt/updateAppr', params, {withCredentials: false});
|
||||
}
|
||||
|
||||
export default {
|
||||
getCommCode,
|
||||
numberDetail,
|
||||
adminList,
|
||||
insertNumber,
|
||||
insertNumber1,
|
||||
insertNumber2,
|
||||
apprDetail,
|
||||
updateAppr,
|
||||
}
|
||||
|
||||
373
frontend/src/modules/sendNumMgt/service/utils_mixin.js
Normal file
373
frontend/src/modules/sendNumMgt/service/utils_mixin.js
Normal file
@@ -0,0 +1,373 @@
|
||||
import lodash from "lodash";
|
||||
import moment from "moment";
|
||||
import '@/modules/mgt/components/eventlisteners.js';
|
||||
|
||||
const filter_mixin = {
|
||||
filters: {
|
||||
_yyyy_mm_dd(val){
|
||||
if(lodash.isNil(val) || lodash.trim(val) == '') return '';
|
||||
const orgin = val;
|
||||
if(orgin.length < 8) {
|
||||
return orgin;
|
||||
}
|
||||
if(!Number(orgin)) return orgin;
|
||||
const date = orgin.substring(0,8);
|
||||
if(moment(date).isValid()){
|
||||
return moment(date).format('YYYY[-]MM[-]DD');
|
||||
}
|
||||
return orgin;
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
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, filter_mixin };
|
||||
@@ -11,37 +11,37 @@
|
||||
<div class="group">
|
||||
<div class="select_box">
|
||||
<label for="right" class="label">상태</label>
|
||||
<select name="" id="">
|
||||
<option value="전체">전체</option>
|
||||
<option value="승인대기">승인대기</option>
|
||||
<option value="처리완료">처리완료</option>
|
||||
<select name="" id="" v-model="grid.params.searchType1" @keyup.enter="search">
|
||||
<option value="" selected>전체</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="검색어 입력"/>
|
||||
<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="">
|
||||
<option value="전체">전체</option>
|
||||
<option value="사업자">사업자</option>
|
||||
<option value="타사업자">타사업자</option>
|
||||
<select name="" id="" v-model="grid.params.searchType2" @keyup.enter="search">
|
||||
<option value="" selected>전체</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="검색어 입력"/>
|
||||
<input class="search-box" type="text" id="search" placeholder="검색어 입력" v-model="grid.params.searchText2" @keyup.enter="search"/>
|
||||
</div>
|
||||
<button type="button" class="button grey">조회</button>
|
||||
<button type="button" class="button grey" @click="search">조회</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="info">
|
||||
<div class="count">총 <span>100</span>건
|
||||
<div class="count">총 <span>{{ totalItems }}</span>건
|
||||
<div class="select_box NumberSe">
|
||||
<select name="" id="">
|
||||
<select name="" id="" v-model="grid.pagePerRows" @keyup.enter="search">
|
||||
<option value="20">20</option>
|
||||
<option value="50" selected>50</option>
|
||||
<option value="100">100</option>
|
||||
@@ -50,254 +50,193 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="5%"/>
|
||||
<col width="12%"/>
|
||||
<col width="10%"/>
|
||||
<col width="13%"/>
|
||||
<col width="10%"/>
|
||||
<col width="10%"/>
|
||||
<col width="6%"/>
|
||||
<col width="6%"/>
|
||||
<col width="6%"/>
|
||||
<col width="10%"/>
|
||||
<col width="12%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>NO</th>
|
||||
<th>요청일</th>
|
||||
<th>관리자ID</th>
|
||||
<th>사업자번호</th>
|
||||
<th>명의자 구분</th>
|
||||
<th>고객사명</th>
|
||||
<th>요청건수</th>
|
||||
<th>승인건수</th>
|
||||
<th>반려건수</th>
|
||||
<th>상태</th>
|
||||
<th>완료일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>승인대기</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>9</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>2</td>
|
||||
<td>1</td>
|
||||
<td>처리완료</td>
|
||||
<td>2022-03-10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>2</td>
|
||||
<td>1</td>
|
||||
<td>처리완료</td>
|
||||
<td>2022-03-10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>7</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>2</td>
|
||||
<td>1</td>
|
||||
<td>처리완료</td>
|
||||
<td>2022-03-10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>타사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>2</td>
|
||||
<td>1</td>
|
||||
<td>처리완료</td>
|
||||
<td>2022-03-10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>2</td>
|
||||
<td>1</td>
|
||||
<td>처리완료</td>
|
||||
<td>2022-03-10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>타사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>승인대기</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>타사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>승인대기</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>타사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>승인대기</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>2022-03-10</td>
|
||||
<td>uplus01</td>
|
||||
<td>229-81-39938</td>
|
||||
<td>타사업자</td>
|
||||
<td>유플러스</td>
|
||||
<td><a href="javascript:void(0)">3</a></td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
<td>승인대기</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<div class="arrow-btn">
|
||||
<button class="btn-first" onClick=""></button>
|
||||
<button class="btn-prev" onClick=""></button>
|
||||
</div>
|
||||
<ul>
|
||||
<li class="active"><a href="javascript:void(0)">1</a></li>
|
||||
<li><a href="javascript:void(0)">2</a></li>
|
||||
<li><a href="javascript:void(0)">3</a></li>
|
||||
<li><a href="javascript:void(0)">4</a></li>
|
||||
<li><a href="javascript:void(0)">5</a></li>
|
||||
<li><a href="javascript:void(0)">999</a></li>
|
||||
</ul>
|
||||
<div class="arrow-btn">
|
||||
<button class="btn-next" onClick=""></button>
|
||||
<button class="btn-last" onClick=""></button>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
<appr-detail-pop ref="apprDetailPop" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import customGrid from '@/components/CustomGrid';
|
||||
//import api from '../service/api';
|
||||
import ApprDetailPop from "@/modules/sendNumMgt/components/ApprDetailPop";
|
||||
|
||||
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 {
|
||||
constructor(props) {
|
||||
this.props = props;
|
||||
const el = document.createElement('a');
|
||||
el.href = 'javascript:void(0);';
|
||||
el.className = 'btn_text';
|
||||
el.innerText= String(props.colValue)
|
||||
this.el = el;
|
||||
}
|
||||
|
||||
getElement() {
|
||||
return this.el;
|
||||
}
|
||||
|
||||
addEvent(selEl) {
|
||||
selEl.addEventListener("click", () => {
|
||||
const { callback } = this.props["cgrido" + this.props.colName].options;
|
||||
callback(this.props);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'profileList',
|
||||
name: 'apprList',
|
||||
data() {
|
||||
return {
|
||||
testList: {
|
||||
url: '/api/v1/bo/sysMgt/adminList',
|
||||
perPage: 20,
|
||||
row: {},
|
||||
authType: [],
|
||||
statType: [],
|
||||
cate2Code: "",
|
||||
totalItems: 0,
|
||||
// 테이블 리스트 데이터
|
||||
perPageCnt: 50,
|
||||
grid: {
|
||||
url: '/api/v1/bo/sendNumMgt/apprList',
|
||||
perPage: 50,
|
||||
pagination: true,
|
||||
isCheckbox: true,
|
||||
isCheckbox: false,
|
||||
initialRequest: false,
|
||||
addCls: 'box_OFvis',
|
||||
|
||||
|
||||
header: [
|
||||
[
|
||||
{ header: 'NO', childNames: [] },
|
||||
{ header: '권한', childNames: [] },
|
||||
{ header: '이름(대리점명)', childNames: [] },
|
||||
{ header: 'ID', childNames: [] },
|
||||
{ header: '상태', childNames: [] },
|
||||
{ header: '등록일', childNames: [] }
|
||||
]
|
||||
],
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'NO', align: 'center', width: 60 },
|
||||
{ name: 'auth', header: '권한', align: 'left', width: 160 },
|
||||
{ name: 'name', header: '이름(대리점명)', align: 'center', width: 130},
|
||||
{ name: 'adminId', header: 'ID', align: 'center', width: 130},
|
||||
{ name: 'adminStat', header: '상태', align: 'center', width: 130},
|
||||
{ name: 'regDt', header: '등록일', width: 90, cls: 'td_line' }
|
||||
columns: [
|
||||
{ name: 'no', header: 'NO', align: 'center', width: '5%' },
|
||||
{ name: 'regReqNo', hidden: true },
|
||||
{ name: 'regDt', header: '요청일', align: 'center', width: '12%' },
|
||||
{ name: 'adminId', header: '관리자ID', align: 'center', width: '10%'},
|
||||
{ name: 'bizrno', header: '사업자번호', align: 'center', width: '13%', renderer: {type: customBRegNo}},
|
||||
{ name: 'nmineeDivCd', header: '명의자 구분', align: 'center', width: '10%'},
|
||||
{ name: 'custNm', header: '고객사명', align: 'center', width: '10%'},
|
||||
{ name: 'reqCnt', header: '요청건수', align: 'center', width: '6%', renderer: {
|
||||
type: CustomATagRenderer
|
||||
,options: {
|
||||
callback: this.apprDetail,
|
||||
}
|
||||
}
|
||||
},
|
||||
{ name: 'apvCnt', header: '승인건수', align: 'center', width: '6%'},
|
||||
{ name: 'rejtCnt', header: '반려건수', align: 'center', width: '6%'},
|
||||
{ name: 'reqSttusCd', header: '상태', align: 'center', width: '10%'},
|
||||
{ name: 'cmpltDt', header: '완료일', width: '12%' }
|
||||
],
|
||||
noDataStr: '검색 결과가 없습니다.',
|
||||
// params: {
|
||||
// apprResult: '',
|
||||
// searchType: '',
|
||||
// searchText: '',
|
||||
// startDate: '',
|
||||
// endDate: ''
|
||||
// },
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: '',
|
||||
searchText2: '',
|
||||
},
|
||||
excelHeader: []
|
||||
}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
customGrid: customGrid
|
||||
customGrid: customGrid,
|
||||
ApprDetailPop
|
||||
},
|
||||
created(){
|
||||
this.$store.commit("login/isLogin", true);
|
||||
this.$store.commit("login/isAuthChk", true);
|
||||
},
|
||||
destroyed() {
|
||||
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: '',
|
||||
searchText2: ''
|
||||
}
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
let page = 1;
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
|
||||
let isKeep = false;
|
||||
isKeep = true;
|
||||
if(getCondition) {
|
||||
this.grid.pagePerRows = getCondition.perPage;
|
||||
this.grid.params = getCondition.params;
|
||||
page = getCondition.page;
|
||||
isKeep = true;
|
||||
}
|
||||
this.search(isKeep);
|
||||
},
|
||||
methods: {
|
||||
search: function(isKeep) {
|
||||
console.log(this.testList.params);
|
||||
this.$refs.table.search(this.testList.params, isKeep);
|
||||
console.log(this.grid.params);
|
||||
this.$refs.table.search(this.grid.params, isKeep);
|
||||
this.sendStoreData();
|
||||
},
|
||||
sendStoreData: function() {
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: {
|
||||
searchType1: '',
|
||||
searchType2: '',
|
||||
searchText1: ''
|
||||
}
|
||||
});
|
||||
|
||||
const getCondition = this.$store.getters['searchcondition/getSearchCondition'];
|
||||
//console.log("getCondition : "+ getCondition.perPage);
|
||||
},
|
||||
apprDetail(props){
|
||||
console.log(props)
|
||||
this.$refs.apprDetailPop.apprDetailPopOpen(props)
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
|
||||
const getP = this.$refs.table.getPagination();
|
||||
console.log("==========getP : " + getP._currentPage);
|
||||
this.$store.commit('searchcondition/updateSearchCondition', {
|
||||
page: getP._currentPage,
|
||||
perPage: this.perPageCnt,
|
||||
params: this.grid.params
|
||||
});
|
||||
// 라우트 하기전 실행
|
||||
next();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
<div class="button_group">
|
||||
<button type="button" class="button blue add" @click="numberRegPopOpen();">등록</button>
|
||||
<button type="button" class="button white del">삭제</button>
|
||||
<button type="button" class="button white del" @click="numberDelete">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table">
|
||||
@@ -159,6 +159,8 @@ export default {
|
||||
|
||||
columns: [
|
||||
{ name: 'no', header: 'NO', align: 'center', width: '5%' },
|
||||
{ name: 'regReqNo', hidden: true},
|
||||
{ name: 'bizrAuthYn', hidden: true},
|
||||
{ name: 'custNm', header: '고객사명', align: 'center', width: '5%' },
|
||||
{ name: 'adminId', header: '관리자ID', align: 'center', width: '10%' },
|
||||
{ name: 'register', header: '등록자ID', align: 'center', width: '10%' },
|
||||
@@ -262,6 +264,12 @@ export default {
|
||||
console.log(props)
|
||||
this.$refs.numberDetailPop.numberDetailPopOpen(props);
|
||||
},
|
||||
commonModalOpen(row){
|
||||
this.$refs.commmonModal.alertModalOpen(row);
|
||||
},
|
||||
numberDelete(){
|
||||
|
||||
}
|
||||
},
|
||||
// beforeRouteLeave(to, from, next) {
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user