60 lines
1.5 KiB
JavaScript
60 lines
1.5 KiB
JavaScript
|
|
|
|||
|
|
$(document).on('click', '.userInfoTr', function (){
|
|||
|
|
if($('#userStatus').val() == 'USC003'){
|
|||
|
|
$.ajax({
|
|||
|
|
url: '/userMgt/userEditModal',
|
|||
|
|
data: {userSeq: Number($(this).find(".userSeq").val())},
|
|||
|
|
type: 'GET',
|
|||
|
|
dataType:"html",
|
|||
|
|
success: function(html){
|
|||
|
|
$("#configInfo").empty().append(html)
|
|||
|
|
$("#userEditModal").modal('show');
|
|||
|
|
},
|
|||
|
|
error:function(){
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
$(document).on('click', '#logTab', function (){
|
|||
|
|
location.href='/userMgt/userMgtPage?userStatus=USC002';
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
$(document).on('click', '#contentTab', function (){
|
|||
|
|
location.href='/userMgt/userMgtPage?userStatus=USC003';
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
$(document).ready( function() {
|
|||
|
|
$('#chk-all').click( function() {
|
|||
|
|
$('.userInfoCheckBox').prop('checked',this.checked);
|
|||
|
|
});
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
$(document).on('click', '#approvalBtn', function (){
|
|||
|
|
alert("승인")
|
|||
|
|
var checkArr = [];
|
|||
|
|
$('input:checkbox[name=userChk]:checked').each(function (idx, el){
|
|||
|
|
checkArr.push({});
|
|||
|
|
const target = $(el);
|
|||
|
|
checkArr[idx].userSeq = Number(target.parents('tr').find('.userSeq').val());
|
|||
|
|
checkArr[idx].userStatus = "USC003"
|
|||
|
|
})
|
|||
|
|
console.log('@@->'+checkArr);
|
|||
|
|
$.ajax({
|
|||
|
|
type : 'POST',
|
|||
|
|
url : "/userMgt/userApproval",
|
|||
|
|
data : JSON.stringify(checkArr),
|
|||
|
|
contentType: 'application/json',
|
|||
|
|
beforeSend: function (xhr){
|
|||
|
|
xhr.setRequestHeader($("[name='_csrf_header']").val(), $("[name='_csrf']").val());
|
|||
|
|
},
|
|||
|
|
success : function(data) {
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
error : function(xhr, status) {
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
})
|
|||
|
|
})
|