mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 06:52:01 +09:00
리스크관리 / 유치채널현황 관리 / 채널관리 추가
This commit is contained in:
@@ -14,14 +14,17 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>발신번호</th>
|
||||
<td><input type="number" v-model.trim="blckSndrno" ref="blckSndrno"></td>
|
||||
<td><input type="number" placeholder="- 자 제외 숫자만 입력" maxlength="11" v-model.trim="blckSndrno" v-on:keyup="onlyNum" @input="onlyNum" ref="_blckSndrno"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>발송타입</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<select name="" id="" v-model.trim="sndblckTpCd" ref="sndblckTpCd">
|
||||
<option v-for="(option, i) in tpType" v-bind:value="option.code" v-bind:key="i">
|
||||
<td v-if="code === null || code === ''">
|
||||
<div v:class="select_box">
|
||||
<select name="" id="right" v-model.trim="sndblckTpCd" ref="sndblckTpCd">
|
||||
<option v-for="(option, i) in tpType"
|
||||
:value="sndblckTpCd"
|
||||
v-bind:key="i"
|
||||
>
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
<!-- <option value="">문자</option>
|
||||
@@ -33,9 +36,9 @@
|
||||
<tr>
|
||||
<th>차단사유</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<div>
|
||||
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
|
||||
<option v-for="(option, i) in rsnType" v-bind:value="option.code" v-bind:key="i">
|
||||
<option v-for="(option, i) in rsnType" :value="blckRsnCd" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
@@ -49,33 +52,24 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="doInsert">등록</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 신규등록 - 등록 선택 -->
|
||||
<div class="popup modal54">
|
||||
<div class="pop-head">
|
||||
<div class="pop-tit">신규등록</div>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<div>작성된 내용으로 등록 하시겠습니까?</div>
|
||||
</div>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-pcolor">확인</button>
|
||||
<button class="btn-default" onclick="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import riskMgtApi from '../service/riskMgtApi'
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
import lodash from "lodash";
|
||||
export default {
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data(){
|
||||
return{
|
||||
row: {},
|
||||
@@ -85,6 +79,7 @@ export default {
|
||||
sndblckTpCd: '',
|
||||
blckRsnCd: '',
|
||||
meno: '',
|
||||
code:"",
|
||||
|
||||
// params: {
|
||||
// 'blckSndrno' : ''
|
||||
@@ -98,6 +93,9 @@ export default {
|
||||
// this.setCodeDate();
|
||||
this.formReset();
|
||||
},
|
||||
components: {
|
||||
commonModal,
|
||||
},
|
||||
methods :{
|
||||
//모달 띄우기
|
||||
ModalOpen(){
|
||||
@@ -131,7 +129,10 @@ export default {
|
||||
const response = await riskMgtApi.insertIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
console.log(this.row);
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
@@ -150,23 +151,23 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
isNull(obj){
|
||||
if(lodash.isNil(obj) || lodash.trim(obj) == ''){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
doValidate(){
|
||||
if(this.isNull(this.blckSndrno)){
|
||||
alert("번호입력.");
|
||||
if(this.isNull(this.blckSndrno)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._blckSndrno.focus();
|
||||
return false;
|
||||
}
|
||||
const hp = this.blckSndrno;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
alert("발신번호 형식이 잘못되었습니다. 확인 해주세요.");
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._blckSndrno.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.meno)){
|
||||
alert('메모입력');
|
||||
return false;
|
||||
}
|
||||
this.row.blckSndrno=this.blckSndrno;
|
||||
this.row.sndblckTpCd = this.sndblckTpCd;
|
||||
this.row.blckRsnCd = this.blckRsnCd;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed" @click="ModalClose();"></div>
|
||||
<div class="popup-wrap">
|
||||
<!-- 메시지 차단 신규 등록 -->
|
||||
<div class="popup popup_form modal57">
|
||||
<div class="pop-head">
|
||||
@@ -11,31 +14,26 @@
|
||||
<tr>
|
||||
<th>차단문구</th>
|
||||
<td class="input_add">
|
||||
<input type="text" value="">
|
||||
<button class="button white add" onclick=""></button>
|
||||
<input v-model="word" ref="_word">
|
||||
<button type="button" class="button white add" @click="doAdd"></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="registration">
|
||||
<td colspan="2" class="registration" value="">
|
||||
<ul>
|
||||
<li>
|
||||
<span>도박<a href="#"><img src="./images/icon-del.png"/></a></span>
|
||||
</li>
|
||||
<li>
|
||||
<span>광고<a href="#"><img src="./images/icon-del.png"/></a></span>
|
||||
</li>
|
||||
<li>
|
||||
<span>술<a href="#"><img src="./images/icon-del.png"/></a></span>
|
||||
</li>
|
||||
<li v-for="(item, i) in msgBlckwordList" v-bind:key="item.word">
|
||||
<span> {{ item.word }}<a href="#" @click="doDel(item, i)"><img src="@/assets/images/icon-del.png"/></a> </span>
|
||||
<!-- <button type="button" @click="doDel(item, i)">x</button> -->
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>조건</th>
|
||||
<td>
|
||||
<input type="radio" name="state" value="AND" id="popup_radio3" checked="">
|
||||
<input type="radio" name="state" value="01" id="popup_radio3" v-model="blckContCd" >
|
||||
<label for="popup_radio3">AND</label>
|
||||
<input type="radio" name="state" value="OR" id="popup_radio4">
|
||||
<input type="radio" name="state" value="02" id="popup_radio4" v-model="blckContCd">
|
||||
<label for="popup_radio4">OR</label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -43,35 +41,166 @@
|
||||
<th>차단사유</th>
|
||||
<td>
|
||||
<div>
|
||||
<select name="" id="">
|
||||
<option value="일반">일반</option>
|
||||
<option selected value="대출">대출</option>
|
||||
<option value="의약품">의약품</option>
|
||||
<option value="도박출">도박</option>
|
||||
<option value="스미싱">스미싱</option>
|
||||
<option value="기타">기타</option>
|
||||
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
|
||||
<option v-for="(option, i) in rsnType"
|
||||
:value="blckRsnCd"
|
||||
v-bind:key="i"
|
||||
:selected="blckRsnCd === option.code">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메모</th>
|
||||
<td class="sender"><textarea class="memo_text"></textarea></td>
|
||||
<td class="sender"><textarea class="memo_text" v-model.trim="memo" ref="memo"></textarea></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor">저장</button>
|
||||
<button class="btn-default" onClick="ModalClose();">취소</button>
|
||||
<button class="btn-pcolor" @click="doInsert">저장</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import riskMgtApi from '../service/riskMgtApi';
|
||||
import lodash from "lodash";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
export default {
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
data(){
|
||||
return{
|
||||
|
||||
row: {},
|
||||
// msgBlckword: {
|
||||
// word:'',
|
||||
// },
|
||||
msgBlckwordList: [
|
||||
{ seqNo: '' , word : '도박'},
|
||||
// { word : '스팸'},
|
||||
],
|
||||
rsnType: [],
|
||||
tpType: [],
|
||||
// seqNo: '', // 일련번호
|
||||
word: '', // 차단문구
|
||||
blckSndrno:'',
|
||||
sndblckTpCd:'',
|
||||
blckRsnCd: '', // 차단사유
|
||||
blckYn:'',
|
||||
blckContCd:'', //차단 조건
|
||||
chgDt:'',
|
||||
regId: '',
|
||||
regDt: '',
|
||||
memo: '', // 메모
|
||||
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.formReset();
|
||||
},
|
||||
|
||||
methods :{
|
||||
ModalOpen(){
|
||||
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('modal57');
|
||||
obj[0].style.display = 'block';
|
||||
this.setCodeDate();
|
||||
},
|
||||
// 모달 끄기
|
||||
ModalClose(){
|
||||
//this.formReset();
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'none';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
wrap[0].style.display = 'none';
|
||||
var popup = document.getElementsByClassName('modal57');
|
||||
popup[0].style.display = 'none';
|
||||
|
||||
},
|
||||
|
||||
setCodeDate(){
|
||||
// 발송타입
|
||||
api.commCode({'grpCd' : 'SNDBLCK_TP_CD'}).then(response => {
|
||||
this.tpType = response.data.data.list;
|
||||
});
|
||||
api.commCode({'grpCd' : 'SNDBLCK_RSN_CD'}).then(response => {
|
||||
this.rsnType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
|
||||
async doInsert(){
|
||||
if(this.doValidate() && window.confirm('등록 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.msgIntrcpList(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
}
|
||||
this.toComplete();
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
doValidate(){
|
||||
if(this.isNull(this.word)){
|
||||
this.$refs._word.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
this.row.blckRsnCd = this.blckRsnCd;
|
||||
this.row.blckContCd = this.blckContCd;
|
||||
this.row.memo = this.memo;
|
||||
this.row.blckYn = this.blckYn;
|
||||
this.row.list = this.msgBlckwordList
|
||||
return true;
|
||||
|
||||
},
|
||||
|
||||
toComplete(){
|
||||
this.$parent.$refs.table.reloadData();
|
||||
this.ModalClose();
|
||||
},
|
||||
//신규등록 팝업에서 문구 추가 버튼
|
||||
doAdd: function() {
|
||||
if(this.msgBlckwordList.length < 10){
|
||||
this.msgBlckwordList.push({
|
||||
//seqNo: '',
|
||||
word: this.word
|
||||
});
|
||||
this.word = '';
|
||||
}
|
||||
},
|
||||
//신규등록 팝업에서 문구 삭제 버튼
|
||||
doDel(item, i){
|
||||
localStorage.removeItem(item);
|
||||
this.msgBlckwordList.splice(i, 1);
|
||||
},
|
||||
formReset(){
|
||||
var type= this.insertType;
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
this.insertType = type;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
@@ -20,7 +20,7 @@
|
||||
<tr>
|
||||
<th>발송타입</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<div>
|
||||
<select name="" id="" v-model.trim="sndblckTpCd" ref="sndblckTpCd">
|
||||
<option v-for="(option, i) in tpType" v-bind:value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
@@ -32,7 +32,7 @@
|
||||
<tr>
|
||||
<th>차단사유</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<div>
|
||||
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
|
||||
<option v-for="(option, i) in rsnType" v-bind:value="option.code" v-bind:key="i">
|
||||
{{ option.codeNm }}
|
||||
@@ -57,7 +57,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2 pop-btn3">
|
||||
<div class="popup-btn2 pop-btn3">
|
||||
<button class="btn-pcolor" @click="IntrcpUpdateModal();">수정</button>
|
||||
<button class="btn-default" @click="IntrcpDetailModalClose();">취소</button>
|
||||
<button class="btn-p2color" @click="IntrcpDeleteModal()">삭제</button>
|
||||
@@ -131,10 +131,12 @@ export default {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
//삭제버튼
|
||||
async IntrcpDeleteModal(){
|
||||
this.setCodeDate();
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
let response = await riskMgtApi.deleteIntrcp(this.row);
|
||||
const response = await riskMgtApi.deleteIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('삭제 하였습니다.');
|
||||
@@ -147,10 +149,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
//수정버튼
|
||||
async IntrcpUpdateModal(){
|
||||
if(window.confirm('수정 하시겠습니까?')){
|
||||
if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
|
||||
try {
|
||||
let response = await riskMgtApi.updateIntrcp(this.row);
|
||||
const response = await riskMgtApi.updateIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('수정 하였습니다.');
|
||||
@@ -172,13 +175,23 @@ export default {
|
||||
popup[0].style.display = 'none';
|
||||
|
||||
},
|
||||
|
||||
|
||||
toComplete(){
|
||||
this.$parent.$refs.table.reloadData();
|
||||
alert('1');
|
||||
this.ModalClose();
|
||||
this.IntrcpDetailModalClose();
|
||||
},
|
||||
|
||||
doValidate(){
|
||||
this.row.blckSndrno=this.blckSndrno;
|
||||
this.row.sndblckTpCd = this.sndblckTpCd;
|
||||
this.row.blckYn = this.blckYn;
|
||||
this.row.chgDt = this.chgDt;
|
||||
this.row.blckRsnCd = this.blckRsnCd;
|
||||
this.row.chgId = this.chgId;
|
||||
this.row.meno=this.meno;
|
||||
return true;
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
268
frontend/src/modules/riskMgt/components/IntrcpMsgDetail.vue
Normal file
268
frontend/src/modules/riskMgt/components/IntrcpMsgDetail.vue
Normal file
@@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed modal58" @click="ModalClose();"></div>
|
||||
<div class="popup-wrap modal58">
|
||||
<!-- 메시지 차단 신규 등록 -->
|
||||
<div class="popup modal58 popup_form">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">메시지 차단 상세</h3>
|
||||
</div>
|
||||
<form autocomplete="off">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>차단문구</th>
|
||||
<td class="input_add">
|
||||
<input v-model="word">
|
||||
<button type="button" class="button white add" @click="doAdd"></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="registration" value="">
|
||||
<ul>
|
||||
<li v-for="(item, i) in msgBlckwordList" v-bind:key="item.word">
|
||||
<span> {{ item.word }}<a href="#" @click="doDel(item, i)"><img src="@/assets/images/icon-del.png"/></a> </span>
|
||||
<!--<button type="button" @click="doDel(item, i)"></button> -->
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>조건</th>
|
||||
<td>
|
||||
<input type="radio" name="state" value="01" id="popup_radio3" v-model="blckContCd" >
|
||||
<label for="popup_radio3">AND</label>
|
||||
<input type="radio" name="state" value="02" id="popup_radio4" v-model="blckContCd">
|
||||
<label for="popup_radio4">OR</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>차단사유</th>
|
||||
<td>
|
||||
<div class="select_box">
|
||||
<select name="" id="" v-model.trim="blckRsnCd" ref="blckRsnCd">
|
||||
<option v-for="(option, i) in rsnType"
|
||||
v-bind:value="option.code"
|
||||
v-bind:key="i"
|
||||
:selected="blckRsnCd === option.code">
|
||||
{{ option.codeNm }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>메모</th>
|
||||
<td class="sender"><textarea class="memo_text" v-model.trim="memo" ref="memo"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>차단여부</th>
|
||||
<td>
|
||||
<input type="radio" name="state01" value="AND" id="popup_radio7">
|
||||
<label for="popup_radio7">해제</label>
|
||||
<input type="radio" name="state01" value="OR" id="popup_radio8">
|
||||
<label for="popup_radio8">차단</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="popup-btn2 pop-btn3">
|
||||
<button class="btn-pcolor" @click="MsgIntrcpUpdateModal()">수정</button>
|
||||
<button class="btn-default" @click="IntrcpDetailModalClose();">취소</button>
|
||||
<button class="btn-p2color" @click="MsgIntrcpDeleteModal()">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import riskMgtApi from '../service/riskMgtApi';
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
|
||||
row: {},
|
||||
msgBlckwordList: [],
|
||||
rsnType: [],
|
||||
tpType: [],
|
||||
word: '', // 차단문구
|
||||
blckSndrno:'',
|
||||
sndblckTpCd:'',
|
||||
blckRsnCd: '', // 차단사유
|
||||
blckYn:'',
|
||||
blckContCd:'', //차단 조건
|
||||
chgDt:'',
|
||||
regId: '',
|
||||
regDt: '',
|
||||
memo: '', // 메모
|
||||
seqNo: '',
|
||||
props: {},
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.formReset();
|
||||
},
|
||||
|
||||
methods :{
|
||||
ModalOpen(){
|
||||
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('modal58');
|
||||
obj[0].style.display = 'block';
|
||||
this.setCodeDate();
|
||||
},
|
||||
// 모달 끄기
|
||||
ModalClose(){
|
||||
//this.formReset();
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'none';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
wrap[0].style.display = 'none';
|
||||
var popup = document.getElementsByClassName('modal58');
|
||||
popup[0].style.display = 'none';
|
||||
|
||||
},
|
||||
async IntrcpMsgDetailModalOpen(props){
|
||||
this.setCodeDate();
|
||||
// console.log(props);
|
||||
this.row.seqNo = props.seqNo;
|
||||
try {
|
||||
const response = await riskMgtApi.msgIntrcpDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.blckContCd = result.data.blckContCd;
|
||||
this.blckRsnCd = result.data.blckRsnCd;
|
||||
this.memo = result.data.memo;
|
||||
this.blckYn = result.data.blckYn;
|
||||
this.msgBlckwordList = result.data.list;
|
||||
// this.row.chgDt = result.data.chgDt;
|
||||
// this.row.regId = result.data.regId;
|
||||
// this.row.list = result.data.msgBlckwordList
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
console.log('-----------')
|
||||
console.log(this.row)
|
||||
var dimmed = document.getElementsByClassName('modal58');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
setCodeDate(){
|
||||
// 발송타입
|
||||
api.commCode({'grpCd' : 'SNDBLCK_TP_CD'}).then(response => {
|
||||
this.tpType = response.data.data.list;
|
||||
});
|
||||
api.commCode({'grpCd' : 'SNDBLCK_RSN_CD'}).then(response => {
|
||||
this.rsnType = response.data.data.list;
|
||||
});
|
||||
},
|
||||
|
||||
doValidate(){
|
||||
this.row.blckRsnCd = this.blckRsnCd;
|
||||
this.row.blckContCd = this.blckContCd;
|
||||
this.row.memo = this.memo;
|
||||
this.row.blckYn = this.blckYn;
|
||||
this.row.chgId = this.regId;
|
||||
this.row.chgDt = this.chgDt
|
||||
this.row.list = this.msgBlckwordList
|
||||
return true;
|
||||
|
||||
},
|
||||
|
||||
toComplete(){
|
||||
this.$parent.$refs.table.reloadData();
|
||||
this.IntrcpDetailModalClose();
|
||||
},
|
||||
//신규등록 팝업에서 문구 추가 버튼
|
||||
doAdd: function() {
|
||||
if(this.msgBlckwordList.length < 10){
|
||||
this.msgBlckwordList.push({
|
||||
//seqNo: '',
|
||||
word: this.word
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
//신규등록 팝업에서 문구 삭제 버튼
|
||||
doDel(item, i){
|
||||
localStorage.removeItem(item);
|
||||
this.msgBlckwordList.splice(i, 1);
|
||||
},
|
||||
formReset(){
|
||||
var type= this.insertType;
|
||||
Object.assign(this.$data, this.$options.data());
|
||||
this.insertType = type;
|
||||
},
|
||||
|
||||
//삭제버튼
|
||||
async MsgIntrcpDeleteModal(){
|
||||
this.setCodeDate();
|
||||
if(window.confirm('삭제 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.deleteMsgIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('삭제 하였습니다.');
|
||||
// grid.reloadData();
|
||||
// this.$refs.table.reloadData();
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//수정버튼
|
||||
async MsgIntrcpUpdateModal(){
|
||||
if(this.doValidate() && window.confirm('수정 하시겠습니까?')){
|
||||
try {
|
||||
const response = await riskMgtApi.updateMsgIntrcp(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('수정 하였습니다.');
|
||||
}
|
||||
this.toComplete();
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
IntrcpDetailModalClose(){
|
||||
//this.formReset();
|
||||
var dimmed = document.getElementsByClassName('modal58');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
|
||||
ModalClose(){
|
||||
//this.formReset();
|
||||
var dimmed = document.getElementsByClassName('dimmed');
|
||||
dimmed[0].style.display = 'none';
|
||||
var wrap = document.getElementsByClassName('popup-wrap');
|
||||
wrap[0].style.display = 'none';
|
||||
var popup = document.getElementsByClassName('modal58');
|
||||
popup[0].style.display = 'none';
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user