@ -474,9 +474,8 @@
</tr>
<tr>
<td colspan="2">
<select name="isSchDisableDriveSe" class="isSchDisableDrive" style="width: 150px;">
<select id="isSchDisableDriveSe" name="isSchDisableDriveSe" class="isSchDisableDrive" style="width: 150px;">
<option value="disableDriveTarget">운행정지 대상자료</option>
<%--<option value="includeDisableDriveSeY">기운행정지 자료 포함</option>--%>
<option value="disableDriveY">기운행정지 자료만</option>
</select>
@ -614,7 +613,7 @@
<button type="button" id="uptAdresFromCarLink_btn" class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="주소업데이트(자망)"/>주소업데이트(자망)</button>
<button type="button" id="uptAdresFromJuminLink_btn" class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="주소업데이트(주민망)"/>주소업데이트(주민망)</button>
<button type="button" id="bundle_btn" class="btn sm gray" style="margin: 5px 0;" onclick="dialog()"><img src="/resource/images/common/search.png" alt="묶음자료생성"/>묶음자료생성</button>
<button type="button" id="filterData " class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="운행정지데이터 관리"/>운행정지관리</button>
<button type="button" id="disableDrive " class="btn sm gray" style="margin: 5px 0;"><img src="/resource/images/common/search.png" alt="운행정지데이터 관리"/>운행정지관리</button>
</th>
</tr>
</tbody>
@ -1098,6 +1097,7 @@ function fn_search(procFlag, obj){
,manage_no : manage_no
},
success:function(data){
console.log('is this reason?')
//요청별 결과 출력
switch (procFlag) {
case 'insert': //신규등록
@ -1371,11 +1371,12 @@ $("#report_btn").click(function(){
});
$('#filterData').click(function(){
$('#disableDrive').click(function(){
//운행정지여부 체크
if($('#isSchDisableDrive').is(':checked') == false){
alert('운행정지 대상자료 체크가 되어있지 않습니다.\n운행정지 조건을 선택하여 조회해주세요.');
} else if ($('#div_tbody input[name="checkbox"]:checked').length == 0) {
alert('선택된 자료가 없습니다.');
} else {
//다이얼로그 오픈
$("#disableDriveDialog").dialog({
@ -1388,53 +1389,61 @@ $('#filterData').click(function(){
if($('#isSchDisableDriveSe').val() == 'disableDriveY'){
console.log('disableDriveY')
$('#disableDriveDelete').css('display','')
$('#disableDriveSave').css('display','none')
}else{
$('#disableDriveSave').css('display','')
$('#disableDriveDelete').css('display','none')
}
$('#disableDriveDialog button').click(function(e){
console.log(e.target.id);
var arrParam = [];
$('input[name="checkbox"]:checked:not(#checkAll)').each(function(){
var $row = $(this).parents('tr');
var param = new Object();
param.atdrc_cd = $row.attr("atdrc_cd");
param.violt_iem_cd = $row.attr("violt_iem_cd");
param.manage_year = $row.attr("manage_year");
param.manage_no = $row.attr("manage_no");
param.vhcle_no = $row.attr("vhcle_no");
arrParam.push(param);
});
//form 생성
var form = document.createElement("form");
var mode = document.createElement('input');
mode.setAttribute('type', 'hidden');
mode.setAttribute('name', 'mode');
if(e.target.id == 'disableDriveSave'){
mode.setAttribute('value', 'disableDriveSave');
} else {
mode.setAttribute('value', 'disableDriveDelete');
}
form.appendChild(mode);
var param = document.createElement('input');
param.setAttribute('type', 'hidden');
param.setAttribute('name', 'jsonArr');
param.setAttribute('value', JSON.stringify(arrParam));
form.appendChild(param);
$.ajax({
type:"POST",
url:'<c:url value="/category/rev/rev0101/rev010101_proc.do"/>',
dataType:"json",
data: $(form).serialize(),
success:function(data){
alert('정상처리 되었습니다.');
$('#diaRegexRemove').dialog('close');
fn_search();
}
});
})
}
});
$('#disableDriveDialog button').click(function(e){
console.log("!!!!!!!btnClick!!!!!!!!!!",e.target.id);
var arrParam = [];
$('#div_tbody tbody input[name="checkbox"]:checked').each(function(){
var $row = $(this).parents('tr');
var param = new Object();
param.atdrc_cd = $row.attr("atdrc_cd");
param.violt_iem_cd = $row.attr("violt_iem_cd");
param.manage_year = $row.attr("manage_year");
param.manage_no = $row.attr("manage_no");
param.vhcle_no = $row.attr("vhcle_no");
arrParam.push(param);
console.log('arrParam', arrParam);
});
//form 생성
var form = document.createElement("form");
var mode = document.createElement("input");
mode.setAttribute('type', 'hidden');
mode.setAttribute('name', 'mode');
mode.setAttribute('disableDriveAttact', 'Y')
if(e.target.id == 'disableDriveSave'){
mode.setAttribute('value', 'disableDriveSave');
} else {
mode.setAttribute('value', 'disableDriveDelete');
}
form.appendChild(mode);
var param = document.createElement('input');
param.setAttribute('type', 'hidden');
param.setAttribute('name', 'jsonArr');
param.setAttribute('value', JSON.stringify(arrParam));
form.appendChild(param);
console.log("ajax call");
$.ajax({
type:"POST",
url:'<c:url value="/category/rev/rev0101/rev010101_proc.do"/>',
dataType:"json",
data: $(form).serialize(),
success:function(data){
alert('success');
$('#disableDriveDialog').dialog('close');
fn_search();
}
});
})
</script>