mirror of
http://git.mhez-qa.uplus.co.kr/hubez/hubez-admin.git
synced 2025-12-07 05:39:35 +09:00
리스크관리 / 유치채널현황 관리 / 채널관리 추가
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<h3 class="pop-tit" v-if="insertType === 1">관리자 등록</h3>
|
||||
<h3 class="pop-tit" v-else>유치채널 사용자 등록</h3>
|
||||
</div>
|
||||
<form autocomplete="off" ref="adminRegForm">
|
||||
<!-- <form autocomplete="off" ref="adminRegForm">-->
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -68,14 +68,15 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div class="pop-btn2">
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
<!-- </form>-->
|
||||
<div class="popup-btn2">
|
||||
<button class="btn-pcolor" @click="doInsert">저장</button>
|
||||
<button class="btn-default" @click="ModalClose();">취소</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<search-id-popup ref="searchIdPopModal"> </search-id-popup>
|
||||
<common-modal ref="commmonModal"></common-modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,7 +88,7 @@ import sysMgtApi from "../service/sysMgtApi.js";
|
||||
import { utils_mixin, chkPattern2 } from '../service/mixins';
|
||||
import SearchIdPopup from '../components/SearchIdPopup.vue';
|
||||
import lodash from "lodash";
|
||||
// searchIdPopModal
|
||||
import commonModal from "@/components/modal/commonModal";
|
||||
|
||||
export default {
|
||||
name: "adminRegPop",
|
||||
@@ -109,8 +110,8 @@ export default {
|
||||
auth:'',
|
||||
stat: '',
|
||||
userNm:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
userPwd1:"",
|
||||
userPwd2:"",
|
||||
code:"",
|
||||
idCheck: false,
|
||||
props: {},
|
||||
@@ -118,6 +119,7 @@ export default {
|
||||
},
|
||||
components: {
|
||||
SearchIdPopup,
|
||||
commonModal,
|
||||
},
|
||||
model: {
|
||||
prop: 'sendData',
|
||||
@@ -132,23 +134,31 @@ export default {
|
||||
methods :{
|
||||
doPwdValidate(){
|
||||
if(this.isNull(this.userPwd1)){
|
||||
alert("비밀번호를 입력해 주세요.");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '비밀번호를 입력해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd1.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.userPwd2)){
|
||||
alert("비밀번호 확인을 입력해 주세요.");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '비밀번호 확인을 입력해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd2.focus();
|
||||
return false;
|
||||
}
|
||||
if(!lodash.isEqual(this.userPwd1, this.userPwd2)){
|
||||
alert("비밀번호가 일치하지 않습니다.");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '비밀번호가 일치하지 않습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd2.focus();
|
||||
return false;
|
||||
}
|
||||
const pwdLen = this.bytes(this.userPwd1);
|
||||
if(!(pwdLen >= 8 && pwdLen <= 16)){
|
||||
alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd1.focus();
|
||||
return false;
|
||||
}
|
||||
@@ -156,7 +166,9 @@ export default {
|
||||
const pNum = /[0-9]/g; // 숫자
|
||||
const pSpc = /[!@$%^&*]/g; // 특수문자
|
||||
if(!(pEng.test(this.userPwd1) && pNum.test(this.userPwd1) && pSpc.test(this.userPwd1))) {
|
||||
alert("비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '비밀번호는 8~16자의 영문, 숫자, 특수문자(!,@, $, %, ^, &, *) 조합이 필요합니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._pwd1.focus();
|
||||
return;
|
||||
}
|
||||
@@ -165,7 +177,9 @@ export default {
|
||||
},
|
||||
doValidate(){
|
||||
if(!this.idCheck){
|
||||
alert("유효한 마당ID가 아닙니다.");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '유효한 마당ID가 아닙니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs.madangId.focus();
|
||||
return false;
|
||||
}
|
||||
@@ -173,39 +187,54 @@ export default {
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.userNm)){
|
||||
alert("이름을 입력해 주세요");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '이름을 입력해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._userNm.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.mdn)){
|
||||
alert('휴대폰번호를 입력해주세요.');
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '휴대폰번호를 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._phone.focus();
|
||||
return false;
|
||||
}
|
||||
const hp = this.mdn;
|
||||
if(!this.isNull(hp) && !this.isMobile(hp)){
|
||||
alert("휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '휴대폰 번호 형식이 잘못되었습니다. 확인해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._phone.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.email)){
|
||||
alert('이메일을 입력해주세요.');
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '이메일을 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._email.focus();
|
||||
return false;
|
||||
}
|
||||
const email = this.email;
|
||||
if(!this.isNull(email) && !lodash.isEqual(email,'@') && !this.emailCheck(email)){
|
||||
alert("이메일 형식이 잘못되었습니다. 확인해 주세요");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '이메일 형식이 잘못되었습니다.';
|
||||
this.row.msg2 = '확인해 주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._email.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.auth)){
|
||||
alert('권한을 선택 해주세요.');
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '권한을 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs._auth.focus();
|
||||
return false;
|
||||
}
|
||||
if(this.isNull(this.stat)){
|
||||
alert('상태를 선택 해주세요.');
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '상태를 선택 해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.$refs._auth.focus();
|
||||
return false;
|
||||
}
|
||||
@@ -225,13 +254,15 @@ export default {
|
||||
async searchMadangId(){
|
||||
|
||||
if(!this.madangId){
|
||||
alert('마당ID를 입력해주세요');
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '마당ID를 입력해주세요.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.$refs.madangId.focus();
|
||||
return false;
|
||||
}
|
||||
var params = {
|
||||
"madangId": this.madangId
|
||||
}
|
||||
}
|
||||
console.log(this.madangId);
|
||||
|
||||
try {
|
||||
@@ -253,20 +284,29 @@ export default {
|
||||
|
||||
}else if(result.retCode == '1004'){
|
||||
//alert('마당ID 정보가 없습니다.');
|
||||
this.searchIdFailPop();
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '마당ID 정보가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.searchIdFailPop();
|
||||
this.idCheck = false;
|
||||
this.$refs.madangId.focus();
|
||||
return false;
|
||||
}else {
|
||||
//alert('마당ID 조회에 실패하였습니다.');
|
||||
this.searchIdFailPop();
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '마당ID 정보가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.searchIdFailPop();
|
||||
this.idCheck = false;
|
||||
this.$refs.madangId.focus();
|
||||
return false;
|
||||
}
|
||||
} catch(err) {
|
||||
//alert("실패 하였습니다.");
|
||||
this.searchIdFailPop();
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '마당ID 정보가 없습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
// this.searchIdFailPop();
|
||||
this.idCheck = false;
|
||||
this.$refs.madangId.focus();
|
||||
return false;
|
||||
@@ -325,11 +365,15 @@ export default {
|
||||
const response = await sysMgtApi.insertAdmin(this.row);
|
||||
const result = response.data;
|
||||
if (result != null && result.retCode == "0000") {
|
||||
alert('저장 하였습니다.');
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '저장 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
this.toComplete();
|
||||
}
|
||||
} catch(err) {
|
||||
alert("실패 하였습니다.");
|
||||
this.row.title = '관리자/유치채널 관리';
|
||||
this.row.msg1 = '실패 하였습니다.';
|
||||
this.$refs.commmonModal.alertModalOpen(this.row);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -347,9 +391,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.popup-btn-wrap {width: 500px; margin: auto; padding: 100px 0;}
|
||||
.popup-btn-wrap button {width: 100%; margin-bottom: 10px; height: 50px; border-radius: 5px; box-shadow: none; border: 1px solid #000; }
|
||||
.popup-btn-wrap button:hover {background: #000; color: #fff;}
|
||||
</style>
|
||||
Reference in New Issue
Block a user