mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-08 21:28:35 +09:00
TC 수정 반영
This commit is contained in:
@@ -1,315 +1,326 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed memberUpdate" @click="memberUpdateModalClose();"></div>
|
||||
<div class="popup-wrap memberUpdate">
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
<div class="dimmed memberUpdate" @click="memberUpdateModalClose();"></div>
|
||||
<div class="popup-wrap memberUpdate">
|
||||
<div class="popup modal32 popup_form memberUpdate">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 ID 수정</h3>
|
||||
</div>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>관리자 ID</th>
|
||||
<td>{{adminId}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{userId}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호 확인</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8" maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td><input type="text" v-model.trim="userNm" ref="_userNm" @keypress="onlyRoleNm_Space"
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>관리자 ID</th>
|
||||
<td>{{ adminId }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{ userId }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8"
|
||||
maxlength="16" ref="_pwd1" v-model.trim="userPwd1"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비밀번호 확인</th>
|
||||
<td><input type="password" @keypress="onlyPassword" @input="onlyPassword" required minlength="8"
|
||||
maxlength="16" ref="_pwd2" v-model.trim="userPwd2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이름</th>
|
||||
<td><input type="text" v-model.trim="userNm" ref="_userNm" @keypress="onlyRoleNm_Space"
|
||||
@input="onlyRoleNm_Space" maxlength="100"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" ref="_phone" @keypress="onlyNum"
|
||||
</tr>
|
||||
<tr>
|
||||
<th>휴대폰번호</th>
|
||||
<td><input type="text" placeholder="- 자 제외 숫자만 입력" v-model.trim="mdn" ref="_phone" @keypress="onlyNum"
|
||||
@input="onlyNum" minlength="10" maxlength="11"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" v-model.trim="email" ref="_email" @keypress="onlyEmail" @input="onlyEmail"
|
||||
</tr>
|
||||
<tr>
|
||||
<th>이메일</th>
|
||||
<td><input type="email" v-model.trim="email" ref="_email" @keypress="onlyEmail" @input="onlyEmail"
|
||||
maxlength="100"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="userStateUpdate" value="01" id="user_popup_update_radio1" v-model="userStat">
|
||||
<label for="user_popup_update_radio1">사용</label>
|
||||
<input type="radio" name="userStateUpdate" value="02" id="user_popup_update_radio2" v-model="userStat">
|
||||
<label for="user_popup_update_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="center">상태</th>
|
||||
<td>
|
||||
<input type="radio" name="userStateUpdate" value="01" id="user_popup_update_radio1" v-model="userStat">
|
||||
<label for="user_popup_update_radio1">사용</label>
|
||||
<input type="radio" name="userStateUpdate" value="02" id="user_popup_update_radio2" v-model="userStat">
|
||||
<label for="user_popup_update_radio2">정지</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="memberUpdateConfirm();">저장</button>
|
||||
<button class="btn-default" @click="memberUpdateModalClose();">취소</button>
|
||||
<button class="btn-pcolor" @click="memberUpdateConfirm();">저장</button>
|
||||
<button class="btn-default" @click="memberUpdateModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
<validation-confirm-pop ref="validationConfirmPopModal"> </validation-confirm-pop>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
<validation-confirm-pop ref="validationConfirmPopModal"></validation-confirm-pop>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
<validation-confirm-modalPop ref="validationConfirmModalPop"></validation-confirm-modalPop>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from '@/service/api';
|
||||
import custMgtApi from "../service/custMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
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";
|
||||
|
||||
export default {
|
||||
name: "memberModifyPop",
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch:{
|
||||
stat(){
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ValidationConfirmPop,
|
||||
commonModal,
|
||||
},
|
||||
model: {
|
||||
//prop: 'sendData',
|
||||
//event: 'event-data'
|
||||
},
|
||||
//props: ['sendData'],
|
||||
created(){
|
||||
// this.setAuthData();
|
||||
// this.formReset();
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
row:{},
|
||||
madangId:'',
|
||||
name:'',
|
||||
mdn:'',
|
||||
email:'',
|
||||
auth:'',
|
||||
stat: "",
|
||||
userId: "",
|
||||
adminId: "",
|
||||
userNm:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
code:"",
|
||||
userStat:"",
|
||||
name: "memberModifyPop",
|
||||
mixins: [utils_mixin, chkPattern2],
|
||||
watch: {
|
||||
stat() {
|
||||
console.log('watch : ', this.stat)
|
||||
}
|
||||
},
|
||||
methods :{
|
||||
//사용자ID 수정 모달 Open
|
||||
async memberUpdateModalOpen(props){
|
||||
this.row.userId = props.userId;
|
||||
this.adminId = props.adminId;
|
||||
try {
|
||||
const response = await custMgtApi.memberDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.userId = result.data.userId;
|
||||
this.userNm = result.data.userNm;
|
||||
this.email = result.data.email;
|
||||
this.mdn = result.data.mdn;
|
||||
this.userStat = result.data.userStat;
|
||||
} else {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
// 모달 오픈
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 Confirm
|
||||
memberUpdateConfirm(){
|
||||
// confirm 팝업 노출
|
||||
if(this.doValidate()){
|
||||
this.$refs.validationConfirmPopModal.confirmUpdateOpen();
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 처리
|
||||
async memberUpdate(){
|
||||
this.row.userId = this.userId;
|
||||
this.row.userPw = this.userPwd1;
|
||||
this.row.userNm = this.userNm;
|
||||
this.row.userEmail = this.email;
|
||||
this.row.mdn = this.mdn;
|
||||
this.row.userStat = this.userStat;
|
||||
try {
|
||||
const response = await custMgtApi.updateUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
components: {
|
||||
ValidationConfirmPop,
|
||||
validationConfirmModalPop,
|
||||
commonModal,
|
||||
},
|
||||
model: {
|
||||
//prop: 'sendData',
|
||||
//event: 'event-data'
|
||||
},
|
||||
//props: ['sendData'],
|
||||
created() {
|
||||
// this.setAuthData();
|
||||
// this.formReset();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
madangId: '',
|
||||
name: '',
|
||||
mdn: '',
|
||||
email: '',
|
||||
auth: '',
|
||||
stat: "",
|
||||
userId: "",
|
||||
adminId: "",
|
||||
userNm: "",
|
||||
userPwd1: "",
|
||||
userPwd2: "",
|
||||
code: "",
|
||||
userStat: "",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//사용자ID 수정 모달 Open
|
||||
async memberUpdateModalOpen(props) {
|
||||
this.row.userId = props.userId;
|
||||
this.adminId = props.adminId;
|
||||
try {
|
||||
const response = await custMgtApi.memberDetail(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
if (result != null && result.retCode == "0000") {
|
||||
this.userId = result.data.userId;
|
||||
this.userNm = result.data.userNm;
|
||||
this.email = result.data.email;
|
||||
this.mdn = result.data.mdn;
|
||||
this.userStat = result.data.userStat;
|
||||
} else {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch (err) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
// 모달 오픈
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 Confirm
|
||||
memberUpdateConfirm() {
|
||||
// confirm 팝업 노출
|
||||
if (this.doValidate()) {
|
||||
this.$refs.validationConfirmModalPop.confirmUpdateOpen();
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 처리
|
||||
async memberUpdate() {
|
||||
this.row.userId = this.userId;
|
||||
this.row.userPw = this.userPwd1;
|
||||
this.row.userNm = this.userNm;
|
||||
this.row.userEmail = this.email;
|
||||
this.row.mdn = this.mdn;
|
||||
this.row.userStat = this.userStat;
|
||||
try {
|
||||
const response = await custMgtApi.updateUser(this.row);
|
||||
const result = response.data;
|
||||
console.log(result);
|
||||
this.row = {}
|
||||
if (result != null && result.retCode == "0000") {
|
||||
if (result != null && result.retCode == "0000") {
|
||||
// this.row.title = '청약고객관리';
|
||||
// this.row.msg1 = '수정 완료하였습니다.';
|
||||
// this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.memberUpdateModalClose();
|
||||
this.toComplete();
|
||||
|
||||
} else {
|
||||
} else {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
} catch(err) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 모달 Close
|
||||
memberUpdateModalClose(){
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
for(var i = 0; i < dimmed.length; i++){
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.formReset();
|
||||
},
|
||||
formReset() {
|
||||
this.userPwd1 = '';
|
||||
this.userPwd2 = '';
|
||||
},
|
||||
toComplete(){
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memberUpdateModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
doPwdValidate(){
|
||||
if(this.isNull(this.userPwd2)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if(!lodash.isEqual(this.userPwd1, this.userPwd2)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.userPwd1);
|
||||
if(!(pwdLen >= 8 && pwdLen <= 16)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const pEng = /[A-Za-z]/g; // 영문자
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if(!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
doValidate(){
|
||||
if(!this.isNull(this.userPwd1)){
|
||||
if(!this.doPwdValidate()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.isNull(this.userPwd1) && !this.isNull(this.userPwd2)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호를 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
},
|
||||
//사용자ID 수정 모달 Close
|
||||
memberUpdateModalClose() {
|
||||
var dimmed = document.getElementsByClassName('memberUpdate');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.formReset();
|
||||
},
|
||||
formReset() {
|
||||
this.userPwd1 = '';
|
||||
this.userPwd2 = '';
|
||||
},
|
||||
toComplete() {
|
||||
this.row.serviceId = this.adminId;
|
||||
this.memberUpdateModalClose();
|
||||
this.$parent.memberDetail(this.adminId);
|
||||
},
|
||||
doPwdValidate() {
|
||||
if (this.isNull(this.userPwd2)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if (!lodash.isEqual(this.userPwd1, this.userPwd2)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
|
||||
this.row.focusTaget = '2';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.userPwd1);
|
||||
if (!(pwdLen >= 8 && pwdLen <= 16)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const pEng = /[A-Za-z]/g; // 영문자
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if (!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userNm)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이름을 입력해 주세요.';
|
||||
this.row.focusTaget = '3';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
doValidate() {
|
||||
if (!this.isNull(this.userPwd1)) {
|
||||
if (!this.doPwdValidate()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(this.isNull(this.mdn)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '휴대폰번호를 입력해주세요.';
|
||||
this.row.focusTaget = '4';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const hp = this.mdn;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
this.$refs.validationConfirmPopModal.validationPhonenumberOpen();
|
||||
return false;
|
||||
}
|
||||
if (this.isNull(this.userPwd1) && !this.isNull(this.userPwd2)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '비밀번호를 입력해 주세요.';
|
||||
this.row.focusTaget = '1';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.email)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이메일을 입력해주세요.';
|
||||
this.row.focusTaget = '5';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
this.$refs.validationConfirmPopModal.validationEmailOpen();
|
||||
return false;
|
||||
}
|
||||
if (this.isNull(this.userNm)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이름을 입력해 주세요.';
|
||||
this.row.focusTaget = '3';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(this.isNull(this.userStat)){
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '상태를 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
if (this.isNull(this.mdn)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '휴대폰번호를 입력해주세요.';
|
||||
this.row.focusTaget = '4';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const hp = this.mdn;
|
||||
if (!this.isNull(hp) && !this.isMobile(hp)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '휴대폰번호를 확인해 주세요.';
|
||||
this.row.focusTaget = '4';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkPhoneFocus(){
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus(){
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
checkFocus(){
|
||||
if(this.row.focusTaget === '1'){
|
||||
this.$refs._pwd1.focus();
|
||||
} else if(this.row.focusTaget === '2'){
|
||||
this.$refs._pwd2.focus();
|
||||
} else if(this.row.focusTaget === '3'){
|
||||
this.$refs._userNm.focus();
|
||||
} else if(this.row.focusTaget === '4'){
|
||||
this.$refs._phone.focus();
|
||||
} else if(this.row.focusTaget === '5'){
|
||||
this.$refs._email.focus();
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
if (this.isNull(this.email)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '이메일을 입력해주세요.';
|
||||
this.row.focusTaget = '5';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if (!this.isNull(email) && !lodash.isEqual(email, '@') && !this.emailCheck(email)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = 'E-mail 형식에 맞지 않습니다.';
|
||||
this.row.msg2 = '확인하여 다시 등록 부탁 드립니다.';
|
||||
this.row.focusTaget = '5';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.isNull(this.userStat)) {
|
||||
this.row.title = '청약고객관리';
|
||||
this.row.msg1 = '상태를 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
checkPhoneFocus() {
|
||||
this.$refs._phone.focus();
|
||||
},
|
||||
checkEmailFocus() {
|
||||
this.$refs._email.focus();
|
||||
},
|
||||
checkFocus() {
|
||||
if (this.row.focusTaget === '1') {
|
||||
this.$refs._pwd1.focus();
|
||||
} else if (this.row.focusTaget === '2') {
|
||||
this.$refs._pwd2.focus();
|
||||
} else if (this.row.focusTaget === '3') {
|
||||
this.$refs._userNm.focus();
|
||||
} else if (this.row.focusTaget === '4') {
|
||||
this.$refs._phone.focus();
|
||||
} else if (this.row.focusTaget === '5') {
|
||||
this.$refs._email.focus();
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -49,8 +49,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<validation-confirm-pop ref="validationConfirmPopModal"></validation-confirm-pop>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
<validation-confirm-modalPop ref="validationConfirmModalPop"></validation-confirm-modalPop>
|
||||
<!-- <common-modal ref="commmonModal"></common-modal>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,366 @@
|
||||
<template>
|
||||
<!-- <div class="wrap bg-wrap"> -->
|
||||
<div>
|
||||
|
||||
|
||||
<!-- 사용자 등록 - 최초 등록 -->
|
||||
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
|
||||
<div class="popup-wrap confirm-insert">
|
||||
<div class="popup confirm-insert">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 등록111111</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>해당 사용자를 등록하고 인증 메일을</p>
|
||||
<p>발송하시겠습니까?</p>
|
||||
<p>사용을 위해서는 등록된 이메일 인증 후</p>
|
||||
<p>서비스 이용이 가능합니다.</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
|
||||
<button class="btn-default" @click="confirmInsertClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 사용자 수정 확인 -->
|
||||
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
|
||||
<div class="popup-wrap confirm-update">
|
||||
<div class="popup confirm-update">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 수정 확인</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>변경된 내용을 저장하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 사용자 등록 - 이메일 형식 체크 -->
|
||||
<div class="dimmed validation-email" @click="validationEmailClose();"></div>
|
||||
<div class="popup-wrap validation-email">
|
||||
<div class="popup validation-email ">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 등록</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>E-mail 형식에 맞지 않습니다.</p>
|
||||
<p>확인하여 다시 등록 부탁 드립니다.</p>
|
||||
</div>
|
||||
<div class="popup-btn1">
|
||||
<button class="btn-pcolor" @click="validationEmailClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 등록 - 아이디 중복 체크 -->
|
||||
<div class="dimmed validation-id-duplicate" @click="validationIdDuplicateClose();"></div>
|
||||
<div class="popup-wrap validation-id-duplicate">
|
||||
<div class="popup validation-id-duplicate">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 등록</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>중복된 아이디가 있습니다.</p>
|
||||
<p>아이디를 다시 확인하여 등록 부탁드립니다.</p>
|
||||
</div>
|
||||
<div class="pop-btn1">
|
||||
<button class="btn-pcolor" @click="validationIdDuplicateClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 ID 생성 파일 업로드 - 성공 -->
|
||||
<div class="dimmed success-fileupload" @click="successFileuploadClose();"></div>
|
||||
<div class="popup-wrap success-fileupload">
|
||||
<div class="popup success-fileupload">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 ID 생성 파일 업로드</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>정상 업로드 되었습니다.</p>
|
||||
</div>
|
||||
<div class="popup-btn1">
|
||||
<button class="btn-pcolor" @click="successFileuploadClose();">확인</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dimmed fail-fileupload" @click="failFileuploadClose();"></div>
|
||||
<div class="popup-wrap fail-fileupload">
|
||||
<!-- 사용자 ID 생성 파일 업로드 -->
|
||||
<div class="popup fail-fileupload">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 ID 생성 파일 업로드</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>파일 업로드 중 오류가 발생하여 정상건만</p>
|
||||
<p>업로드 완료하였습니다.</p>
|
||||
</div>
|
||||
<ul class="pop-cont-detail">
|
||||
<li>총 <span class="number">{{ totalCnt }}</span>건 ( 정상 <span class="number blue">{{ successCnt }}</span>건 오류
|
||||
<span class="number red">{{ failCnt }}</span>건 )
|
||||
</li>
|
||||
</ul>
|
||||
<div class="pop-cont bottom">
|
||||
<p>오류 건은 확인 후 재등록 부탁 드립니다.</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="failFileuploadOk();">확인</button>
|
||||
<!-- <button class="btn-default" @click="failFileuploadClose();">취소</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "validationConfirmPop",
|
||||
data() {
|
||||
return {
|
||||
row: {},
|
||||
title: '',
|
||||
msg: '',
|
||||
failCnt: 0,
|
||||
successCnt: 0,
|
||||
totalCnt: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//사용자등록 - 최초등록 Open
|
||||
confirmInsertOpen() {
|
||||
var dimmed = document.getElementsByClassName('confirm-insert');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자등록 - 최초등록
|
||||
confirmInsert() {
|
||||
var dimmed = document.getElementsByClassName('confirm-insert');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
console.log("this.$parent.memberInsert() ~~~~~~")
|
||||
this.$parent.memberInsert();
|
||||
},
|
||||
//사용자등록 - 최초등록 Close
|
||||
confirmInsertClose() {
|
||||
var dimmed = document.getElementsByClassName('confirm-insert');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
// 사용자 삭제 Open
|
||||
confirmDeleteOpen() {
|
||||
var dimmed = document.getElementsByClassName('confirm-delete');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자 삭제
|
||||
confirmDelete() {
|
||||
var dimmed = document.getElementsByClassName('confirm-delete');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
//사용자 삭제 Close
|
||||
confirmDeleteClose() {
|
||||
var dimmed = document.getElementsByClassName('confirm-delete');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
//사용자 수정 확인 Open
|
||||
confirmUpdateOpen() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자 수정 확인
|
||||
confirmUpdate() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.memberUpdate();
|
||||
},
|
||||
// 사용자 수정 Close
|
||||
confirmUpdateClose() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
//사용자 수정(청약고객-sub) 확인 Open
|
||||
confirmUpdateSubOpen() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update-sub');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
//사용자 수정(청약고객-sub) 확인
|
||||
confirmUpdateSub() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update-sub');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.updateAdminInfo();
|
||||
},
|
||||
// 사용자 수정(청약고객-sub) Close
|
||||
confirmUpdateSubClose() {
|
||||
var dimmed = document.getElementsByClassName('confirm-update-sub');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
// 이메일 형식 체크 Open
|
||||
validationEmailOpen() {
|
||||
var dimmed = document.getElementsByClassName('validation-email');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 이메일 형식 체크 Close
|
||||
validationEmailClose() {
|
||||
var dimmed = document.getElementsByClassName('validation-email');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkEmailFocus();
|
||||
},
|
||||
// 아이디 중복 체크 Open
|
||||
validationIdDuplicateOpen() {
|
||||
var dimmed = document.getElementsByClassName('validation-id-duplicate');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 아이디 중복 체크 Close
|
||||
validationIdDuplicateClose() {
|
||||
var dimmed = document.getElementsByClassName('validation-id-duplicate');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkIdDupFocus();
|
||||
},
|
||||
// 최대 등록 제한 Open
|
||||
validationMaxlimitOpen() {
|
||||
var dimmed = document.getElementsByClassName('validation-maxlimit');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 최대 등록 제한 Close
|
||||
validationMaxlimitClose() {
|
||||
var dimmed = document.getElementsByClassName('validation-maxlimit');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
// 휴대폰번호 형식 체크 Open
|
||||
validationPhonenumberOpen() {
|
||||
var dimmed = document.getElementsByClassName('valication-phonenumber');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 휴대폰번호 형식 체크 Close
|
||||
validationPhonenumberClose() {
|
||||
var dimmed = document.getElementsByClassName('valication-phonenumber');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.$parent.checkPhoneFocus();
|
||||
},
|
||||
// 사용자 ID 생성 파일 업로드 - 성공 Open
|
||||
successFileuploadOpen() {
|
||||
var dimmed = document.getElementsByClassName('success-fileupload');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
},
|
||||
// 사용자 ID 생성 파일 업로드 - 성공 Close
|
||||
successFileuploadClose() {
|
||||
var dimmed = document.getElementsByClassName('success-fileupload');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
// 목록페이지 이동
|
||||
this.$parent.toComplete();
|
||||
},
|
||||
// 정상완료 후 목록페이지 이동
|
||||
toComplete() {
|
||||
this.row.searchType1 = '';
|
||||
this.row.searchType2 = '';
|
||||
this.row.searchType3 = '';
|
||||
this.row.searchText1 = '';
|
||||
this.row.startDt = '';
|
||||
this.row.endDt = '';
|
||||
this.row.page = 1;
|
||||
this.$router.push({name: 'subsList', params: this.row});
|
||||
},
|
||||
// 사용자 ID 생성 파일 업로드 - 성공 Open
|
||||
failFileuploadOpen(props) {
|
||||
var dimmed = document.getElementsByClassName('fail-fileupload');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
this.totalCnt = props.totalCnt
|
||||
this.successCnt = props.successCnt
|
||||
this.failCnt = props.failCnt
|
||||
},
|
||||
failFileuploadOk() {
|
||||
var dimmed = document.getElementsByClassName('fail-fileupload');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.failFileuploadOk(this.row);
|
||||
},
|
||||
// 사용자 ID 생성 파일 업로드 - 성공 Close
|
||||
failFileuploadClose() {
|
||||
var dimmed = document.getElementsByClassName('fail-fileupload');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
},
|
||||
// 모달 오픈
|
||||
confirmModalOpen(props) {
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'block';
|
||||
}
|
||||
this.title = props.title;
|
||||
this.msg = props.msg;
|
||||
},
|
||||
// 모달 끄기(ok)
|
||||
confirmModalClose() {
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.row.result = true;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
// 모달 끄기(취소)
|
||||
confirmModalCancel() {
|
||||
var dimmed = document.getElementsByClassName('confirm');
|
||||
for (var i = 0; i < dimmed.length; i++) {
|
||||
dimmed[i].style.display = 'none';
|
||||
}
|
||||
this.row.result = false;
|
||||
// 부모 함수 호출.
|
||||
this.$parent.confirmCalbackFnc(this.row);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -18,26 +18,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 등록 - 최초 등록 -->
|
||||
<div class="dimmed confirm-insert" @click="confirmInsertClose();"></div>
|
||||
<div class="popup-wrap confirm-insert">
|
||||
<div class="popup confirm-insert">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 등록</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>해당 사용자를 등록하고 인증 메일을</p>
|
||||
<p>발송하시겠습니까?</p>
|
||||
<p>사용을 위해서는 등록된 이메일 인증 후</p>
|
||||
<p>서비스 이용이 가능합니다.</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmInsert();">확인</button>
|
||||
<button class="btn-default" @click="confirmInsertClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 등록 - 이메일 형식 체크 -->
|
||||
<div class="dimmed validation-email" @click="validationEmailClose();"></div>
|
||||
<div class="popup-wrap validation-email">
|
||||
@@ -121,22 +101,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 수정 확인 -->
|
||||
<div class="dimmed confirm-update" @click="confirmUpdateClose();"></div>
|
||||
<div class="popup-wrap confirm-update">
|
||||
<div class="popup confirm-update">
|
||||
<div class="pop-head">
|
||||
<h3 class="pop-tit">사용자 수정 확인</h3>
|
||||
</div>
|
||||
<div class="pop-cont">
|
||||
<p>변경된 내용을 저장하시겠습니까?</p>
|
||||
</div>
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="confirmUpdate();">확인</button>
|
||||
<button class="btn-default" @click="confirmUpdateClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용자 수정(청약고객:sub) 확인 -->
|
||||
<div class="dimmed confirm-update-sub" @click="confirmUpdateSubClose();"></div>
|
||||
|
||||
@@ -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<sessionStorage.length;i++){
|
||||
const keyNm = sessionStorage.key(i);
|
||||
if(keyNm.indexOf(keyLike) > -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 };
|
||||
|
||||
},
|
||||
}
|
||||
};
|
||||
export {utils_mixin, chkPattern2};
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user