시스템관리 - 권한관리, 고객관리 - 청약고객관리/회원관리 추가

This commit is contained in:
kimre
2022-06-09 21:36:05 +09:00
parent b832e1a0be
commit 940707deaa
113 changed files with 9134 additions and 2100 deletions

View File

@@ -0,0 +1,79 @@
import httpClient from '@/common/http-client';
import subsExcelHeader from './mock/subsExcelHeader';
import carryOverExcelHeader from './mock/carryOverExcelHeader';
import sampleExcelHeader from './mock/sampleExcelHeader';
// 공통 코드.
const getCommCode = (params) => {
return httpClient.post('/api/v1/bo/comm/getCode', params, { withCredentials: false });
}
// 청약정보 상세조회
const subsDetail = (params) => {
return httpClient.post('/api/v1/bo/custMgt/subsDetail', params, { withCredentials: false});
}
// 이월금액 목록 조회
const carryOverList = (params) => {
return httpClient.post('/api/v1/bo/custMgt/carryOverList', params, { withCredentials: false});
}
// 청약정보 엑셀다운로드 목록 조회
const subsListExcel = (params) => {
return httpClient.post('/api/v1/bo/custMgt/subsListExcel', params);
}
// 사용자 상세 정보 조회.
const memberDetail = (params) => {
return httpClient.post('/api/v1/bo/custMgt/memberDetail', params);
}
// 관리자 상세 정보 조회.
const memberAdminDetail = (params) => {
return httpClient.post('/api/v1/bo/custMgt/memberAdminDetail', params);
}
// 관리자명(마당ID) 조회
const selectSearchMadangId = (params) => {
return httpClient.post('/api/v1/bo/custMgt/adminInfo', params);
}
// 청약정보 관리자명/관리자ID 수정
const updateAdminInfo = (params) => {
return httpClient.post('/api/v1/bo/custMgt/updateAdminInfo', params);
}
const getExcelHeader = category => {
// 엑셀에 출력할 Header 정보를 Mockup 데이터로 관리한다.
return new Promise(function(resolve, reject) {
let header = [];
switch (category) {
case 'SUBS':
header = subsExcelHeader.header;
break;
case 'CARRY':
header = carryOverExcelHeader.header;
break;
case 'SAMPLE':
header = sampleExcelHeader.header;
break;
default:
header = '';
break;
}
resolve(header);
});
};
export default {
getCommCode,
subsDetail,
carryOverList,
getExcelHeader,
subsListExcel,
memberDetail,
memberAdminDetail,
selectSearchMadangId,
updateAdminInfo,
}

View File

@@ -0,0 +1,353 @@
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;
}
},
/** * 전화번호 포맷으로 변환 * * @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;
}
}
} 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;
}
} 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)){
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;
}
},
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)});
}
}
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;
},
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;
},
}
};
export { utils_mixin, chkPattern2 };

View File

@@ -0,0 +1,26 @@
{
"header": [
[
{
"key": "date",
"name": "날짜"
},
{
"key": "startAmount",
"name": "시작금액"
},
{
"key": "useAmount",
"name": "사용금액"
},
{
"key": "krrrAmount",
"name": "이월금액"
},
{
"key": "extshAmount",
"name": "소멸금액"
}
]
]
}

View File

@@ -0,0 +1,50 @@
{
"header": [
[
{
"key": "id",
"name": "ID"
},
{
"key": "userNm",
"name": "이름"
},
{
"key": "mdn",
"name": "휴대폰번호"
},
{
"key": "email",
"name": "이메일"
},
{
"key": "stat",
"name": "ID잠금"
}
]
],
"body": [
[
{
"key": "id",
"name": ""
},
{
"key": "userNm",
"name": ""
},
{
"key": "mdn",
"name": ""
},
{
"key": "email",
"name": ""
},
{
"key": "stat",
"name": ""
}
]
]
}

View File

@@ -0,0 +1,42 @@
{
"header": [
[
{
"key": "no",
"name": "NO"
},
{
"key": "serviceId",
"name": "서비스 ID (관리자 ID)"
},
{
"key": "custNm",
"name": "고객사명"
},
{
"key": "regNo",
"name": "가입번호"
},
{
"key": "regDt",
"name": "가입일"
},
{
"key": "stat",
"name": "상태"
},
{
"key": "",
"name": "유치채널"
},
{
"key": "plan",
"name": "요금제"
},
{
"key": "carryOver",
"name": "이월누적금액"
}
]
]
}