mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 02:59:22 +09:00
유치채널관리 수정 / 정산관리 추가,수정 / 채널관리 수정 / 고객관리 수정 / 모니터링 추가 / 리스크관리 수정 / 발신번호관리
추가,수정 / 서비스관리 수정 / 발송통계 수정
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user