no message

main
이범준 9 months ago
parent 39c51fb4a8
commit e2b4f81fa9

@ -592,11 +592,11 @@ $(document).ready(function() {
, data : { crdnIds : crdnIds.join(",") } , data : { crdnIds : crdnIds.join(",") }
, success : (resp) => { , success : (resp) => {
dialog.open({ dialog.open({
id : dialogId id : dialogId,
, title : "종합조회-사전통지서" title : "종합조회-사전통지서",
, size : "xl" size : "xl",
, content : resp content : resp,
, init : () => { init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId); $("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("template")[0].innerHTML; var found = $("#"+dialogId).find("template")[0].innerHTML;
@ -616,8 +616,8 @@ $(document).ready(function() {
} }
pageObject.parentRes.push(parentRes); pageObject.parentRes.push(parentRes);
} },
, onClose : () => { } onClose : () => { }
}); });
} }
}); });
@ -647,11 +647,11 @@ $(document).ready(function() {
, data : { crdnIds : crdnIds.join(",") } , data : { crdnIds : crdnIds.join(",") }
, success : (resp) => { , success : (resp) => {
dialog.open({ dialog.open({
id : dialogId id : dialogId,
, title : "종합조회-고지서" title : "종합조회-고지서",
, size : "xl" size : "xl",
, content : resp content : resp,
, init : () => { init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId); $("#"+dialogId).find("input[name='dialogId']").val(dialogId);
var found = $("#"+dialogId).find("template")[0].innerHTML; var found = $("#"+dialogId).find("template")[0].innerHTML;
@ -671,8 +671,8 @@ $(document).ready(function() {
} }
pageObject.parentRes.push(parentRes); pageObject.parentRes.push(parentRes);
} },
, onClose : () => { } onClose : () => { }
}); });
} }
}); });

@ -24,6 +24,10 @@
id="table--${pageName}" aria-describedby="DataTables_Table_0_info"> id="table--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead" > <thead class="sticky-thead" >
<tr id="theadTr--${pageName}"> <tr id="theadTr--${pageName}">
<th style="width:50px">
<input type="checkbox" class="form-check-input" checked name="gridAllCheckbox"
onchange="GRID.checkbox.sync(this, this.checked);" />
</th>
<th style="width:120px">시군구명</th> <th style="width:120px">시군구명</th>
<th style="width:180px">과태료명</th> <th style="width:180px">과태료명</th>
<th style="width:120px">차량번호</th> <th style="width:120px">차량번호</th>
@ -44,6 +48,10 @@
</tbody> </tbody>
<template id="found--${pageName}"> <template id="found--${pageName}">
<tr data-key="{CRDN_ID}" onclick="pageObject['${pageName}'].clickGrid(this);"> <tr data-key="{CRDN_ID}" onclick="pageObject['${pageName}'].clickGrid(this);">
<td>
<input type="checkbox" class="form-check-input" value="{CRDN_ID}" checked name="gridCheckbox"
onchange="GRID.checkbox.sync(this, this.checked);" />
</td>
<td>{SGG_NM}</td> <td>{SGG_NM}</td>
<td>{TASK_SE_NM}</td> <td>{TASK_SE_NM}</td>
<td>{VHRNO}</td> <td>{VHRNO}</td>
@ -109,14 +117,26 @@ $(document).ready(function(){
} }
$P.fnMakeFile = (fileType, paper) => { $P.fnMakeFile = (fileType, paper) => {
var checkboxes = $("#tbody--${pageName}").find("input[type='checkbox']:checked");
if(checkboxes.length < 1){
alert("체크된 자료가 없습니다.");
return;
}
if(!customValidate($("#frmEdit--${pageName} input"))) return; if(!customValidate($("#frmEdit--${pageName} input"))) return;
if(!$P.provided.isAllSameTask($P.crdnIds)){ var checkedCrdnIds = [];
alert("여러 건 출력시 과태료업무가 동일한 자료만 처리 가능합니다.") checkboxes.each(function(){
checkedCrdnIds.push(this.value);
});
if(!$P.provided.isAllSameTask(checkedCrdnIds)){
alert("여러 건 출력시 과태료업무가 동일한 자료만 처리 가능합니다.");
return; return;
} }
var sample = $P.crdnIds[0]; //체크된것중첫번째 var sample = checkedCrdnIds[0]; //체크된것중첫번째
var taskSeCd = $P.provided.getInfo(sample).TASK_SE_CD; var taskSeCd = $P.provided.getInfo(sample).TASK_SE_CD;
@ -131,7 +151,7 @@ $(document).ready(function(){
var globalVariable = formFields.get(); var globalVariable = formFields.get();
var submitParam = { var submitParam = {
crdnIds : $P.crdnIds.join(","), crdnIds : checkedCrdnIds.join(","),
taskSeCd : taskSeCd taskSeCd : taskSeCd
}; };
@ -165,10 +185,20 @@ $(document).ready(function(){
} }
$P.fnOpenOtptStng = () => { $P.fnOpenOtptStng = () => {
var checkboxes = $("#tbody--${pageName}").find("input[type='checkbox']:checked");
if(checkboxes.length < 1){
alert("체크된 자료가 없습니다.");
return;
}
var checkedCrdnIds = [];
checkboxes.each(function(){
checkedCrdnIds.push(this.value);
});
var fix = ""; var fix = "";
if($P.provided.isAllSameTask($P.crdnIds)){ if($P.provided.isAllSameTask(checkedCrdnIds)){
var sample = $P.crdnIds[0]; //체크된것중첫번째 var sample = checkedCrdnIds[0]; //체크된것중첫번째
fix = $P.provided.getInfo(sample).TASK_SE_CD; fix = $P.provided.getInfo(sample).TASK_SE_CD;
} }
@ -181,11 +211,11 @@ $(document).ready(function(){
success : (resp) => { success : (resp) => {
dialog.open({ dialog.open({
id : dialogId id : dialogId,
, title : "출력설정" title : "출력설정",
, size : "xxl" size : "xxl",
, content : resp content : resp,
, init : () => { init : () => {
$("#"+dialogId).find("input[name='dialogId']").val(dialogId); $("#"+dialogId).find("input[name='dialogId']").val(dialogId);
@ -198,8 +228,8 @@ $(document).ready(function(){
} }
$("#"+dialogId).find("form[name='frmSearch']").find("[name='sndngSeCd']").val("02"); $("#"+dialogId).find("form[name='frmSearch']").find("[name='sndngSeCd']").val("02");
} },
, onClose : () => { } onClose : () => { }
}); });
} }
}); });

@ -24,6 +24,10 @@
id="table--${pageName}" aria-describedby="DataTables_Table_0_info"> id="table--${pageName}" aria-describedby="DataTables_Table_0_info">
<thead class="sticky-thead" > <thead class="sticky-thead" >
<tr id="theadTr--${pageName}"> <tr id="theadTr--${pageName}">
<th style="width:50px">
<input type="checkbox" class="form-check-input" checked name="gridAllCheckbox"
onchange="GRID.checkbox.sync(this, this.checked);" />
</th>
<th style="width:120px">시군구명</th> <th style="width:120px">시군구명</th>
<th style="width:180px">과태료명</th> <th style="width:180px">과태료명</th>
<th style="width:120px">차량번호</th> <th style="width:120px">차량번호</th>
@ -43,6 +47,10 @@
</tbody> </tbody>
<template id="found--${pageName}"> <template id="found--${pageName}">
<tr data-key="{CRDN_ID}" onclick="pageObject['${pageName}'].clickGrid(this);"> <tr data-key="{CRDN_ID}" onclick="pageObject['${pageName}'].clickGrid(this);">
<td>
<input type="checkbox" class="form-check-input" value="{CRDN_ID}" checked name="gridCheckbox"
onchange="GRID.checkbox.sync(this, this.checked);" />
</td>
<td>{SGG_NM}</td> <td>{SGG_NM}</td>
<td>{TASK_SE_NM}</td> <td>{TASK_SE_NM}</td>
<td>{VHRNO}</td> <td>{VHRNO}</td>
@ -107,14 +115,25 @@ $(document).ready(function(){
} }
$P.fnMakeFile = (fileType, paper) => { $P.fnMakeFile = (fileType, paper) => {
var checkboxes = $("#tbody--${pageName}").find("input[type='checkbox']:checked");
if(checkboxes.length < 1){
alert("체크된 자료가 없습니다.");
return;
}
if(!customValidate($("#frmEdit--${pageName} input"))) return; if(!customValidate($("#frmEdit--${pageName} input"))) return;
if(!$P.provided.isAllSameTask($P.crdnIds)){ var checkedCrdnIds = [];
checkboxes.each(function(){
checkedCrdnIds.push(this.value);
});
if(!$P.provided.isAllSameTask(checkedCrdnIds)){
alert("여러 건 출력시 과태료업무가 동일한 자료만 처리 가능합니다.") alert("여러 건 출력시 과태료업무가 동일한 자료만 처리 가능합니다.")
return; return;
} }
var sample = $P.crdnIds[0]; //체크된것중첫번째 var sample = checkedCrdnIds[0]; //체크된것중첫번째
var taskSeCd = $P.provided.getInfo(sample).TASK_SE_CD; var taskSeCd = $P.provided.getInfo(sample).TASK_SE_CD;
@ -129,7 +148,7 @@ $(document).ready(function(){
var globalVariable = formFields.get(); var globalVariable = formFields.get();
var submitParam = { var submitParam = {
crdnIds : $P.crdnIds.join(","), crdnIds : checkedCrdnIds.join(","),
taskSeCd : taskSeCd taskSeCd : taskSeCd
}; };
@ -162,10 +181,20 @@ $(document).ready(function(){
} }
$P.fnOpenOtptStng = () => { $P.fnOpenOtptStng = () => {
var checkboxes = $("#tbody--${pageName}").find("input[type='checkbox']:checked");
if(checkboxes.length < 1){
alert("체크된 자료가 없습니다.");
return;
}
var checkedCrdnIds = [];
checkboxes.each(function(){
checkedCrdnIds.push(this.value);
});
var fix = ""; var fix = "";
if($P.provided.isAllSameTask($P.crdnIds)){ if($P.provided.isAllSameTask(checkedCrdnIds)){
var sample = $P.crdnIds[0]; //체크된것중첫번째 var sample = checkedCrdnIds[0]; //체크된것중첫번째
fix = $P.provided.getInfo(sample).TASK_SE_CD; fix = $P.provided.getInfo(sample).TASK_SE_CD;
} }

@ -189,18 +189,28 @@ const GRID = {
}); });
} else { } else {
var countCheck = 0; var allChecked = false;
var countUncheck = 0; var cbLength = 0;
var checkedLength = 0;
trs.each(function(){ trs.each(function(){
var cb = $(this).find("td").eq(checkboxColIndex).find(":checkbox"); var cb = $(this).find("td").eq(checkboxColIndex).find(":checkbox");
if(cb.length > 0){ if(cb.length > 0){
cb.is(":checked") ? countCheck++ : countUncheck++; cbLength++;
if(cb.is(":checked")){
checkedLength++;
};
} }
}); });
if((countCheck == 0 && countUncheck != 0) || (countCheck != 0 && countUncheck == 0)){ if(cbLength == checkedLength){
thead.find(":checkbox").prop("checked", bool); allChecked = true;
}
if(allChecked){
thead.find(":checkbox").prop("checked", true);
} else {
thead.find(":checkbox").prop("checked", false);
} }
} }

Loading…
Cancel
Save