|
|
@@ -158,7 +158,8 @@
|
|
|
<tr>
|
|
|
<th class="dashR">휴대전화번호<em class="required" title="필수"></em></th>
|
|
|
<td class="dashR">
|
|
|
- <input type="text" name="cellPhnno" class="w130" readonly="readonly"/>
|
|
|
+ <input type="hidden" name="cellPhnno"/>
|
|
|
+ <input type="text" name="maskingCellPhnno" class="w130" readonly="readonly"/>
|
|
|
<button type="button" id="btnCustSendLms" class="btn btn-info btn-lg">LMS전송</button>
|
|
|
<button type="button" id="btnCustCrtfd" class="btn btn-info btn-lg">번호변경</button>
|
|
|
</td>
|
|
|
@@ -171,6 +172,9 @@
|
|
|
<tr>
|
|
|
<th class="dashR">이메일<em class="required" title="필수"></em></th>
|
|
|
<td class="dashR">
|
|
|
+ <input type="hidden" name="emailModifyYn"/>
|
|
|
+ <input type="hidden" name="maskingEmail"/>
|
|
|
+ <input type="hidden" name="orgEmail"/>
|
|
|
<input type="hidden" name="email" data-valid-name="이메일"/>
|
|
|
<input type="text" id="emailId" name="emailId" class="w200" maxlength="30"/>
|
|
|
@
|
|
|
@@ -605,7 +609,6 @@
|
|
|
return gagaAgGrid.toDateTimeFormat(params.value);
|
|
|
}
|
|
|
},
|
|
|
-// {headerName: "확인NO", field: "ansNo", width: 100, cellClass: 'text-center'},
|
|
|
{headerName: "확인자", field: "ansNm", width: 100, cellClass: 'text-center'}
|
|
|
];
|
|
|
|
|
|
@@ -630,7 +633,6 @@
|
|
|
return gagaAgGrid.toDateTimeFormat(params.value);
|
|
|
}
|
|
|
},
|
|
|
- {headerName: "확인NO", field: "ansNo", width: 100, cellClass: 'text-center'},
|
|
|
{headerName: "확인자", field: "ansNm", width: 100, cellClass: 'text-center'}
|
|
|
];
|
|
|
|
|
|
@@ -898,11 +900,6 @@
|
|
|
|
|
|
// 기본정보 - 비밀번호 초기화 버튼
|
|
|
$('#btnResetPassword').on('click', function () {
|
|
|
-
|
|
|
- if (!fnCheckValidationEmail('#custInfoForm')) {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
mcxDialog.confirm("초기화 하시겠습니까?", {
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
@@ -924,6 +921,7 @@
|
|
|
let param = {};
|
|
|
param.elementCellPhnno = '#custInfoForm input[name=cellPhnno]';
|
|
|
param.elementCustNo = '#custInfoForm input[name=custNo]';
|
|
|
+ param.elementMaskingCellPhnno = '#custInfoForm input[name=maskingCellPhnno]';
|
|
|
|
|
|
cfnOpenLmsPopup(param);
|
|
|
});
|
|
|
@@ -937,20 +935,18 @@
|
|
|
let elementCustNo = '#custInfoForm input[name=custNo]';
|
|
|
|
|
|
const actionUrl = '/customer/cellphone/change/popup/form?elementCellPhnno=' + encodeURIComponent(elementCellPhnno)
|
|
|
- + '&elementCustNo=' + encodeURIComponent(elementCustNo)
|
|
|
+ + '&elementCustNo=' + encodeURIComponent(elementCustNo);
|
|
|
+
|
|
|
cfnOpenModalPopup(actionUrl, 'popupCellphoneForm');
|
|
|
});
|
|
|
|
|
|
// 기본정보 - 이메일발송 버튼
|
|
|
$('#btnCustSendEmail').on('click', function () {
|
|
|
|
|
|
- if (!fnCheckValidationEmail('#custInfoForm')) {
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
let param = {};
|
|
|
- param.elementEmail = '#custInfoForm input[name=email]';
|
|
|
+ param.elementEmail = '#custInfoForm input[name=orgEmail]';
|
|
|
param.elementCustNo ='#custInfoForm input[name=custNo]';
|
|
|
+ param.elementMaskingEmail = '#custInfoForm input[name=maskingEmail]';
|
|
|
|
|
|
cfnOpenEmailPopup(param);
|
|
|
});
|
|
|
@@ -1020,15 +1016,16 @@
|
|
|
// customer.homeBaseAddr = orgData.homeBaseAddr;
|
|
|
// customer.homeDtlAddr = orgData.homeDtlAddr;
|
|
|
|
|
|
+ let jsonData = JSON.stringify(customer);
|
|
|
+ console.log(jsonData);
|
|
|
mcxDialog.confirm("기본정보를 수정 하시겠습니까?", {
|
|
|
cancelBtnText: "취소",
|
|
|
sureBtnText: "확인",
|
|
|
sureBtnClick: function () {
|
|
|
- let jsonData = JSON.stringify(customer);
|
|
|
- //console.log(jsonData);
|
|
|
- gagajf.ajaxJsonSubmit('/customer/info/save', jsonData);
|
|
|
- uifnPopupClose('customerDetailForm');
|
|
|
- $('#btnSearch').trigger('click');
|
|
|
+ gagajf.ajaxJsonSubmit('/customer/info/save', jsonData , function () {
|
|
|
+ uifnPopupClose('customerDetailForm');
|
|
|
+ $('#btnSearch').trigger('click');
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -1221,7 +1218,7 @@
|
|
|
|
|
|
fnGetSecedeRsnYn(data.custStat, data.secedeRsn); // 탈퇴여부
|
|
|
|
|
|
- let snsType = fnGetSnsType(data.nvJoinId, data.kkJoinId, data.ysJoinId);
|
|
|
+ let snsType = fnGetSnsType(data.snsType);
|
|
|
$('#snsType').text(snsType);
|
|
|
|
|
|
$('#homeZipcode').val(data.homeZipcode);
|
|
|
@@ -1229,11 +1226,11 @@
|
|
|
$('#homeDtlAddr').val(data.homeDtlAddr);
|
|
|
$('#sexGb').text(gagaAgGrid.lookupValue(genderGbList, data.sexGb));
|
|
|
$('#birthYmd').val(gagaAgGrid.toDateFormat(data.birthYmd));
|
|
|
- fnDisplayEmailAgree(data.emailAgreeYn); // 이메일 수신여부
|
|
|
- fnDisplaySmsAgree(data.smsAgreeYn); // SMS 수신여부
|
|
|
- fnDisplayEmail(data.maskingEmail); // EMAIL
|
|
|
- fnDisplayCellPhnno(data.maskingCellPhnno); // 핸드폰
|
|
|
- fnDisplayManaged(data.managedRsn); // 관리대상
|
|
|
+ fnDisplayEmailAgree(data.emailAgreeYn);
|
|
|
+ fnDisplaySmsAgree(data.smsAgreeYn);
|
|
|
+ fnDisplayEmail(data.email, data.maskingEmail);
|
|
|
+ fnDisplayCellPhnno(data.cellPhnno, data.maskingCellPhnno);
|
|
|
+ fnDisplayManaged(data.managedRsn);
|
|
|
|
|
|
orgData = data; // 기존 데이터
|
|
|
|
|
|
@@ -1359,10 +1356,18 @@
|
|
|
let emailDomain = $(formId + ' input[name=emailDomain]').val();
|
|
|
$(formId + ' input[name=email]').val(emailId + '@' + emailDomain);
|
|
|
|
|
|
- if (!gagajf.testRegexp($(formId + ' input[name=email]'), /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/)) {
|
|
|
- result = false;
|
|
|
+ if (orgData.maskingEmail === $(formId + ' input[name=email]').val()) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ if (!gagajf.testRegexp($(formId + ' input[name=email]'), /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/)) {
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ // 수정되었으면 Y로 변경
|
|
|
+ if (result) {
|
|
|
+ console.log('result', result);
|
|
|
+ $(formId + ' input[name=emailModifyYn]').val('Y');
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
return result;
|
|
|
};
|
|
|
|
|
|
@@ -1396,17 +1401,20 @@
|
|
|
}
|
|
|
|
|
|
// 휴대전화번호
|
|
|
- var fnDisplayCellPhnno = function (cellPhnno) {
|
|
|
+ var fnDisplayCellPhnno = function (cellPhnno, maskingCellPhnno) {
|
|
|
$('#custInfoForm input[name=cellPhnno]').val(cellPhnno);
|
|
|
+ $('#custInfoForm input[name=maskingCellPhnno]').val(maskingCellPhnno);
|
|
|
};
|
|
|
|
|
|
// 이메일
|
|
|
- var fnDisplayEmail = function (email) {
|
|
|
- if (!gagajf.isNull(email)) {
|
|
|
- let emailSplit = email.split("@");
|
|
|
+ var fnDisplayEmail = function (email, maskingEmail) {
|
|
|
+ if (!gagajf.isNull(maskingEmail)) {
|
|
|
+ let emailSplit = maskingEmail.split("@");
|
|
|
$('#emailId').val(emailSplit[0]);
|
|
|
$('#emailDomain').val(emailSplit[1]);
|
|
|
+ $('#custInfoForm input[name=maskingEmail]').val(maskingEmail);
|
|
|
}
|
|
|
+ $('#custInfoForm input[name=orgEmail]').val(email);
|
|
|
};
|
|
|
|
|
|
// 이메일 수신동의
|
|
|
@@ -1435,24 +1443,18 @@
|
|
|
};
|
|
|
|
|
|
// SNS가입유형
|
|
|
- var fnGetSnsType = function (nvJoinId, kkJoinId, ysJoinId) {
|
|
|
- let snsType = '';
|
|
|
- if (!gagajf.isNull(nvJoinId)) {
|
|
|
- snsType = 'NAVER'
|
|
|
+ var fnGetSnsType = function (snsType) {
|
|
|
+ let snsText = '';
|
|
|
+ if (snsType === 'NV') {
|
|
|
+ snsText = '네이버'
|
|
|
}
|
|
|
- if (!gagajf.isNull(kkJoinId)) {
|
|
|
- if (!gagajf.isNull(snsType)) {
|
|
|
- snsType += ','
|
|
|
- }
|
|
|
- snsType += 'KAKAO';
|
|
|
+ if (snsType === 'KK') {
|
|
|
+ snsType = '카카오';
|
|
|
}
|
|
|
- if (!gagajf.isNull(ysJoinId)) {
|
|
|
- if (!gagajf.isNull(snsType)) {
|
|
|
- snsType += ','
|
|
|
- }
|
|
|
- snsType += 'YES24';
|
|
|
+ if (snsType === 'YS') {
|
|
|
+ snsText = 'YES24';
|
|
|
}
|
|
|
- return snsType;
|
|
|
+ return snsText;
|
|
|
};
|
|
|
|
|
|
// 생년월일 달력 설정
|