diff --git a/frontend/src/common/http-client.js b/frontend/src/common/http-client.js index fd9f45f..2313b39 100644 --- a/frontend/src/common/http-client.js +++ b/frontend/src/common/http-client.js @@ -96,7 +96,8 @@ httpClient.interceptors.response.use( tokenSvc.removeToken(); window.top.location.href = '/login'; } else if (error.response.status == 418) { - + tokenSvc.removeToken(); + window.top.location.href = '/login'; }else if (error.response.status == 500) { if (error.response.data != null && error.response.data.message == '511 NETWORK_AUTHENTICATION_REQUIRED') { alert('웹템플릿 IP가 브랜드포털에 등록이 필요합니다. 기술지원에 문의해주세요.'); diff --git a/frontend/src/modules/custMgt/components/MemberModifyPop.vue b/frontend/src/modules/custMgt/components/MemberModifyPop.vue index 4a120dd..f8f81a7 100644 --- a/frontend/src/modules/custMgt/components/MemberModifyPop.vue +++ b/frontend/src/modules/custMgt/components/MemberModifyPop.vue @@ -1,315 +1,326 @@ \ No newline at end of file diff --git a/frontend/src/modules/custMgt/components/MemberRegPop.vue b/frontend/src/modules/custMgt/components/MemberRegPop.vue index a2751c7..14d9d8e 100644 --- a/frontend/src/modules/custMgt/components/MemberRegPop.vue +++ b/frontend/src/modules/custMgt/components/MemberRegPop.vue @@ -49,8 +49,8 @@ - - + + @@ -58,9 +58,9 @@ import api from '@/service/api'; import custMgtApi from "../service/custMgtApi.js"; import {utils_mixin, chkPattern2} from '../service/mixins'; -import ValidationConfirmPop from '../components/ValidationConfirmPop.vue'; import lodash from "lodash"; -import commonModal from "../components/commonModal"; +import validationConfirmModalPop from "@/modules/custMgt/components/ValidationConfirmModalPop"; +// import commonModal from "../components/commonModal"; export default { name: "memberRegPop", @@ -71,8 +71,8 @@ export default { } }, components: { - ValidationConfirmPop, - commonModal, + validationConfirmModalPop, + // commonModal, }, model: { //prop: 'sendData', @@ -101,7 +101,7 @@ export default { }, methods: { //사용자ID 생성 모달 Open - async memberInsertModalOpen(props) { + memberInsertModalOpen(props) { this.adminId = props.adminId; this.userTotalCnt = props.userTotalCnt; @@ -115,15 +115,11 @@ export default { memberInsertConfirm() { // confirm 팝업 노출 if (this.doValidate()) { - this.$refs.validationConfirmPopModal.confirmInsertOpen(); + this.$refs.validationConfirmModalPop.confirmInsertOpen() } }, - doMemberInsert(){ - console.log("aaaaaaaa") - }, //사용자ID 수정 처리 async memberInsert() { - console.log(123123) this.row.adminId = this.adminId; this.row.userId = this.userId; this.row.userNm = this.userNm; @@ -137,7 +133,7 @@ export default { if (result != null && result.retCode == "0000") { this.row.title = '청약고객관리'; this.row.msg1 = '사용자 생성 완료하였습니다.'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); this.toComplete(); } else if (result != null && result.retCode == "4018") { // 이미 사용중인 ID @@ -145,12 +141,12 @@ export default { } else { this.row.title = '청약고객관리'; this.row.msg1 = '실패 하였습니다.'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); } } catch (err) { this.row.title = '청약고객관리'; this.row.msg1 = '실패 하였습니다.'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); } }, //사용자ID 생성 모달 Close @@ -181,7 +177,7 @@ export default { console.log(this.userTotalCnt) if (this.userTotalCnt >= 100) { // 사용자등록제한_최대100개까지 - this.$refs.validationConfirmPopModal.validationMaxlimitOpen(); + this.$parent.$refs.validationConfirmPopModal.validationMaxlimitOpen(); return false; } @@ -190,7 +186,7 @@ export default { this.row.title = '청약고객관리'; this.row.msg1 = 'ID를 입력해 주세요.'; this.row.focusTaget = '1'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } // 청약 ID 길이 체크 6~16 @@ -200,7 +196,7 @@ export default { this.row.msg1 = 'ID 형식에 맞지 않습니다.'; this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.'; this.row.focusTaget = '1'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } @@ -208,7 +204,7 @@ export default { this.row.title = '청약고객관리'; this.row.msg1 = '이름을 입력해 주세요.'; this.row.focusTaget = '2'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } @@ -216,7 +212,7 @@ export default { this.row.title = '청약고객관리'; this.row.msg1 = '휴대폰번호를 입력해주세요.'; this.row.focusTaget = '3'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } const hp = this.mdn; @@ -227,7 +223,7 @@ export default { this.row.msg1 = '휴대폰번호 형식에 맞지 않습니다.'; this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.'; this.row.focusTaget = '3'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } @@ -235,7 +231,7 @@ export default { this.row.title = '청약고객관리'; this.row.msg1 = '이메일을 입력해주세요.'; this.row.focusTaget = '4'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } const email = this.email; @@ -245,14 +241,14 @@ export default { this.row.msg1 = 'E-mail 형식에 맞지 않습니다.'; this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.'; this.row.focusTaget = '4'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } if (this.isNull(this.stat)) { this.row.title = '청약고객관리'; this.row.msg1 = '상태를 선택 해주세요.'; - this.$refs.commmonModal.alertModalOpen(this.row); + this.$parent.$refs.commmonModal.alertModalOpen(this.row); return false; } diff --git a/frontend/src/modules/custMgt/components/ValidationConfirmModalPop.vue b/frontend/src/modules/custMgt/components/ValidationConfirmModalPop.vue new file mode 100644 index 0000000..dc45e34 --- /dev/null +++ b/frontend/src/modules/custMgt/components/ValidationConfirmModalPop.vue @@ -0,0 +1,366 @@ + + + \ No newline at end of file diff --git a/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue b/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue index f215dc1..f6075d6 100644 --- a/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue +++ b/frontend/src/modules/custMgt/components/ValidationConfirmPop.vue @@ -18,26 +18,6 @@ - -
- -
- -
-
diff --git a/frontend/src/modules/custMgt/service/mixins.js b/frontend/src/modules/custMgt/service/mixins.js index bb02c86..e365e2f 100644 --- a/frontend/src/modules/custMgt/service/mixins.js +++ b/frontend/src/modules/custMgt/service/mixins.js @@ -1,353 +1,358 @@ import lodash from "lodash"; const utils_mixin = { - methods:{ - /** * 이메일 형식 체크 * * @param 데이터 */ - emailCheck(email,rtnArrYn) { - if(this.isNull(rtnArrYn)){ - rtnArrYn='N'; - } - // var regExp = /(^[A-Za-z0-9_\.\-]+)@([A-Za-z0-9\-]+\.[A-Za-z0-9\-]+)/; - var regExp = /^([0-9a-zA-Z_\.\-]([-_.]?[0-9a-zA-Z_\.\-])*)@([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*.[a-zA-Z]{2,3}$)/i;//이메일 정규식 - - if(regExp.test(email) == false) { - // 이메일 형식이 알파벳+숫자@알파벳+숫자.알파벳+숫자 형식이 아닐경우 - if(rtnArrYn == 'Y'){ - return email; - } - return false; - }else{ - var myArray = regExp.exec(email); - if(rtnArrYn == 'Y'){ - return myArray; - } - return true; - } - + 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; - } + 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; } - } 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; + 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; } - } 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)){ + var regExp = /(02)([0-9]{3,4})([0-9]{4})$/; + if (regExp.test(phoneNum)) { return true; - } else { - return false; - } - } + } 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; - } + 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 -1){ - keyList.push({name : keyNm, value : sessionStorage.getItem(keyNm)}); + 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; } - } - 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))) { + }, + 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; - }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){ + }, + 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; - } - 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 }; \ No newline at end of file + + }, + } +}; +export {utils_mixin, chkPattern2}; \ No newline at end of file diff --git a/frontend/src/modules/custMgt/views/SubsList.vue b/frontend/src/modules/custMgt/views/SubsList.vue index 4fda483..1948f17 100644 --- a/frontend/src/modules/custMgt/views/SubsList.vue +++ b/frontend/src/modules/custMgt/views/SubsList.vue @@ -194,13 +194,13 @@ export default { } } }, - {name: 'custNm', header: '고객사명', align: 'center', width: 130}, - {name: 'regNo', header: '가입번호', align: 'center', width: 130}, - {name: 'regDt', header: '가입일', align: 'center', width: 130, cls: 'td_line'}, - {name: 'stat', header: '상태', align: 'center', width: 130}, - {name: 'channel', header: '유치채널', align: 'center', width: 130}, - {name: 'plan', header: '요금제', align: 'center', width: 130}, - {name: 'carryOver', header: '이월누적금액', align: 'center', width: 130} + {name: 'custNm', header: '고객사명', align: 'center', width: '4%'}, + {name: 'regNo', header: '가입번호', align: 'center', width: '12%'}, + {name: 'regDt', header: '가입일', align: 'center', width: '12%', cls: 'td_line'}, + {name: 'stat', header: '상태', align: 'center', width: '12%'}, + {name: 'channel', header: '유치채널', align: 'center', width: '12%'}, + {name: 'plan', header: '요금제', align: 'center', width: '12%'}, + {name: 'carryOver', header: '이월누적금액', align: 'center', width: '12%'} ], noDataStr: '검색 결과가 없습니다.', params: { diff --git a/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue b/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue index b2c4427..75fe038 100644 --- a/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue +++ b/frontend/src/modules/riskMgt/components/InsertIntrcpPop.vue @@ -21,7 +21,7 @@ 발송타입
- @@ -145,6 +145,11 @@ export default { this.row.title = '발신번호 차단'; this.row.msg1 = '성공 하였습니다.'; this.$parent.alertInsert(this.row); + }else if (result != null && result.retCode == "4018") { + this.row.title = '발신번호 차단'; + this.row.msg1 = '이미등록된 발신번호입니다.'; + this.$parent.alertInsert(this.row); + return false; } this.toComplete(); } catch (err) { @@ -217,7 +222,7 @@ export default { const character = characters[i] const decimal = character.charCodeAt(0) const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기 - + // console.log(byte) // 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면 if (totalByte + byte <= maxByte) { totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함 @@ -226,7 +231,6 @@ export default { break // for 루프 종료 } } - return validText }, diff --git a/frontend/src/modules/riskMgt/components/InsertMsgPop.vue b/frontend/src/modules/riskMgt/components/InsertMsgPop.vue index 6c90472..2bd2f0e 100644 --- a/frontend/src/modules/riskMgt/components/InsertMsgPop.vue +++ b/frontend/src/modules/riskMgt/components/InsertMsgPop.vue @@ -14,8 +14,8 @@ 차단문구 - - + + @@ -53,7 +53,8 @@ 메모 - + @@ -82,15 +83,9 @@ export default { return { row: {}, - // msgBlckword: { - // word:'', - // }, - msgBlckwordList: [ - // { word : '스팸'}, - ], + msgBlckwordList: [], rsnType: [], tpType: [], - // seqNo: '', // 일련번호 word: '', // 차단문구 blckSndrno: '', sndblckTpCd: '', @@ -101,6 +96,7 @@ export default { regId: '', regDt: '', memo: '', // 메모 + maxByte: 2000, } }, @@ -139,9 +135,15 @@ export default { }, async doInsert() { - // if(this.doValidate() && window.confirm('등록 하시겠습니까?')){ + 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 + console.log(this.row) + // return false; try { - const response = await riskMgtApi.msgIntrcpList(this.row); + const response = await riskMgtApi.msgInsertIntrcp(this.row); const result = response.data; if (result != null && result.retCode == "0000") { this.row.title = '메세지 차단'; @@ -165,14 +167,7 @@ export default { 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() { @@ -210,8 +205,46 @@ export default { if (this.doValidate()) { this.$refs.ValidationConfirmPopup.msgConfirmInsertOpen(); } - } + }, + // 바이트길이 구하기 + getByteLength: function (decimal) { + return (decimal >> 7) || (this.LINE_FEED === decimal) ? 2 : 1 + }, + getByte: function (str) { + return str + .split('') + .map((s) => s.charCodeAt(0)) + .reduce((prev, unicodeDecimalValue) => prev + this.getByteLength(unicodeDecimalValue), 0) + }, + getLimitedByteText: function (inputText, maxByte) { + const characters = inputText.split('') + let validText = '' + let totalByte = 0 + + for (let i = 0; i < characters.length; i += 1) { + const character = characters[i] + const decimal = character.charCodeAt(0) + const byte = this.getByteLength(decimal) // 글자 한 개가 몇 바이트 길이인지 구해주기 + // console.log(byte) + // 현재까지의 바이트 길이와 더해 최대 바이트 길이를 넘지 않으면 + if (totalByte + byte <= maxByte) { + totalByte += byte // 바이트 길이 값을 더해 현재까지의 총 바이트 길이 값을 구함 + validText += character // 글자를 더해 현재까지의 총 문자열 값을 구함 + } else { // 최대 바이트 길이를 넘으면 + break // for 루프 종료 + } + } + return validText + }, + + memoLimitByte() { + this.memo = this.getLimitedByteText(this.memo, this.maxByte); + + }, //END 바이트길이 구하기 + msgLimitByte(){ + this.word = this.getLimitedByteText(this.word, 10); + } } diff --git a/frontend/src/modules/riskMgt/components/ValidationConfirmPopup.vue b/frontend/src/modules/riskMgt/components/ValidationConfirmPopup.vue index 53e73d3..e1fee76 100644 --- a/frontend/src/modules/riskMgt/components/ValidationConfirmPopup.vue +++ b/frontend/src/modules/riskMgt/components/ValidationConfirmPopup.vue @@ -1,288 +1,288 @@ diff --git a/frontend/src/modules/riskMgt/service/riskMgtApi.js b/frontend/src/modules/riskMgt/service/riskMgtApi.js index 31ffd43..3dfd99d 100644 --- a/frontend/src/modules/riskMgt/service/riskMgtApi.js +++ b/frontend/src/modules/riskMgt/service/riskMgtApi.js @@ -18,7 +18,7 @@ const deleteIntrcp = (params) => { return httpClient.post('/api/v1/bo/riskMgt/sendNum/deleteIntrcp', params, { withCredentials: false }); } -const msgIntrcpList = (params) => { +const msgInsertIntrcp = (params) => { return httpClient.post('/api/v1/bo/riskMgt/msg/insertIntrcp', params, { withCredentials: false }); } @@ -39,7 +39,7 @@ export default { intrcpDetail, insertIntrcp, deleteIntrcp, - msgIntrcpList, + msgInsertIntrcp, msgIntrcpDetail, deleteMsgIntrcp, updateMsgIntrcp diff --git a/frontend/src/modules/sendNumMgt/components/AdminListPop.vue b/frontend/src/modules/sendNumMgt/components/AdminListPop.vue index 51234bf..88e582e 100644 --- a/frontend/src/modules/sendNumMgt/components/AdminListPop.vue +++ b/frontend/src/modules/sendNumMgt/components/AdminListPop.vue @@ -21,7 +21,7 @@ - {{ item.custNm }} + {{ item.adminId }} {{ item.bregNo }} diff --git a/frontend/src/modules/sendNumMgt/components/NumberRegPop.vue b/frontend/src/modules/sendNumMgt/components/NumberRegPop.vue index fc75e08..e78c0a9 100644 --- a/frontend/src/modules/sendNumMgt/components/NumberRegPop.vue +++ b/frontend/src/modules/sendNumMgt/components/NumberRegPop.vue @@ -125,7 +125,7 @@
- + @@ -133,7 +133,7 @@ \ No newline at end of file diff --git a/frontend/src/modules/sendNumMgt/views/ProfileList.vue b/frontend/src/modules/sendNumMgt/views/ProfileList.vue index 22d2b3d..b71ebf9 100644 --- a/frontend/src/modules/sendNumMgt/views/ProfileList.vue +++ b/frontend/src/modules/sendNumMgt/views/ProfileList.vue @@ -35,7 +35,7 @@
{{ totalItems.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') }}
-