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

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