merge master into develop - CscListRForm.jsp FAQ 아코디언 버그 수정
This commit is contained in:
141
build/resources/main/static/js/mngr/mpage/mngr.js
Normal file
141
build/resources/main/static/js/mngr/mpage/mngr.js
Normal file
@@ -0,0 +1,141 @@
|
||||
/* 업무 사용자 pc,mobile js
|
||||
*
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
//검색폼 데이트피커 제어
|
||||
fn_set_dateRange_function("#dateRange", "juscrbStrtDt", "juscrbEndDt", "juscrbStrtDt");
|
||||
|
||||
//번호 포매팅
|
||||
$("#mbtlnb").val(fn_format_mbtlnb($("#mbtlnb").val()));
|
||||
$("#telnb").val(fn_format_mbtlnb($("#telnb").val()));
|
||||
|
||||
//이메일 셀렉트박스 값 set
|
||||
$('[name=emailAderss]').change(function () {
|
||||
let selectedEmail = $("#emailAderss option:selected").val();
|
||||
if(selectedEmail !== '99'){
|
||||
selectedEmail = $("#emailAderss option:selected").text().trim();
|
||||
}else{//직접입력
|
||||
selectedEmail = '';
|
||||
}
|
||||
$('#email2').val(selectedEmail);
|
||||
});
|
||||
|
||||
$('input').keydown(function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('#pwChngAt').on("click",function (){
|
||||
if($(this).is(":checked")){
|
||||
$("#pwDiv").show();
|
||||
fn_ctrl_disable('',["#pwDiv"]);
|
||||
}else{
|
||||
$("#pwDiv").hide();
|
||||
fn_ctrl_disable(["#pwDiv"]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/* ********************************************************
|
||||
* 업무사용자 수정
|
||||
******************************************************** */
|
||||
const fn_update = function () {
|
||||
|
||||
if (!confirm('업무사용자를 수정하시겠습니까?')) return;
|
||||
|
||||
console.log('gdgdgdgdgd')
|
||||
|
||||
fn_make_eamil();
|
||||
|
||||
let data = $('#jobuserUpdateForm').serialize();
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/mngr/mpage/mngr/updateMngrInfoUpdt',
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
data: data,
|
||||
success: function (result) {
|
||||
result = JSON.parse(result.resBody.result);
|
||||
if(result.result === 1){
|
||||
alert('정상적으로 수정되었습니다.');
|
||||
/*비밀번호 변경 시*/
|
||||
let chngePwAt = result.resultInfo.chngePwAt;
|
||||
if (chngePwAt === 'Y') {
|
||||
location.href = "/mngr/logout";
|
||||
} else {
|
||||
location.reload();
|
||||
}
|
||||
}else{
|
||||
alert('수정이 실패하였습니다.');
|
||||
}
|
||||
}, error: function (result) {
|
||||
|
||||
if(result.responseText){
|
||||
const errorResponse = JSON.parse(result.responseText)
|
||||
|
||||
if(errorResponse.resBody.result){
|
||||
const errorResult = JSON.parse(errorResponse.resBody.result.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\n/g, "\\n"));
|
||||
alert(errorResult.errorMsg);
|
||||
}else{
|
||||
alert('수정이 실패하였습니다.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
alert('수정이 실패하였습니다.');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
/* ********************************************************
|
||||
* 접속이력 검색
|
||||
******************************************************** */
|
||||
const fn_select_history = function (_pageIndex) {
|
||||
const dv = $("#dv").val();
|
||||
let _pageUnit = 5;
|
||||
if(dv === 'M'){
|
||||
_pageUnit = 10;
|
||||
}
|
||||
$('#title').text('접속이력 조회');
|
||||
$('#subTitle').text('접속일자');
|
||||
let mngrInnb = $('#mngrInnb').val();
|
||||
let srchStartDate = $('#juscrbStrtDt').val();
|
||||
let srchEndDate = $('#juscrbEndDt').val();
|
||||
let params = {
|
||||
'mngrInnb': mngrInnb,
|
||||
'srchStartDate': srchStartDate,
|
||||
'srchEndDate': srchEndDate,
|
||||
'pageIndex': _pageIndex,
|
||||
'pageUnit': _pageUnit
|
||||
};
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: '/mngr/bsn/jobuser/selectJobUserConnHistListInqirePopup',
|
||||
data: params,
|
||||
success: function (result) {
|
||||
$('#jobUserList').html('');
|
||||
$('#jobUserList').html(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
/* ********************************************************
|
||||
* email 합치기
|
||||
******************************************************** */
|
||||
const fn_make_eamil = function () {
|
||||
|
||||
let domain = $('[name=email2]').val();
|
||||
let id = $('[name=email1]').val();
|
||||
$('[name=email]').val(id + '@' + domain);
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
* 검색조건 > 날짜 전체 클릭 시 날짜 설정 초기화
|
||||
******************************************************** */
|
||||
const fn_reset_date = function (strtDate, endDate) {
|
||||
$('#' + strtDate).datepicker().datepicker("setDate", '');
|
||||
$('#' + endDate).datepicker().datepicker("setDate", '');
|
||||
}
|
||||
Reference in New Issue
Block a user