사전통지 발송 대상 수정.
parent
2b1e7baf6f
commit
38d3d6e09b
@ -0,0 +1,367 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||
|
||||
<!-- inner page html -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content -->
|
||||
<div class="container flex-grow-1 px-0">
|
||||
<!-- Page Body -->
|
||||
<div class="card">
|
||||
<div class="wrapper-pop">
|
||||
<!-- 입력 영역 -->
|
||||
<form id="frmEdit--${pageName}" name="frmEdit">
|
||||
<input type="hidden" id="sggCd--${pageName}" name="sggCd" />
|
||||
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" />
|
||||
<input type="hidden" id="sndngSeCd--${pageName}" name="sndngSeCd" />
|
||||
|
||||
<div class="row g-1">
|
||||
<!-- 총 건수 -->
|
||||
<div class="col-md-12 text-end px-2">
|
||||
<label for="tnocs--${pageName}" class="w-px-140 bg-lighter pe-2 col-form-label text-sm-end">총건수 / 총금액</label>
|
||||
<input type="text" class="form-control w-px-80 text-end" id="tnocs--${pageName}" name="tnocs" data-map="TNOCS" readonly />
|
||||
<input type="text" class="form-control w-px-120 text-end" id="gramt--${pageName}" name="gramt" data-map="GRAMT" readonly />
|
||||
</div>
|
||||
<!-- 문서 번호 -->
|
||||
<div class="col-md-4">
|
||||
<label for="docNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">문서번호</label>
|
||||
<input type="text" class="form-control w-55" id="docNo--${pageName}" name="docNo" />
|
||||
</div>
|
||||
<!-- 발송 일자 -->
|
||||
<div class="col-md-4">
|
||||
<label for="sndngYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">발송일자</label>
|
||||
<input type="text" class="form-control form-date" id="sndngYmd--${pageName}" name="sndngYmd"
|
||||
data-fmt-type="day" title="날짜 선택" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 납기 일자 -->
|
||||
<div class="col-md-4" id="divDudtYmd--${pageName}">
|
||||
<label for="dudtYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">납기일자</label>
|
||||
<input type="text" class="form-control form-date" id="dudtYmd--${pageName}" name="dudtYmd"
|
||||
data-fmt-type="day" title="날짜 선택" maxlength="10" />
|
||||
<button type="button" id="btnDudtYmd--${pageName}" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 제목 명 -->
|
||||
<div class="col-md-12">
|
||||
<label for="ttlNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">제목</label>
|
||||
<input type="text" class="form-control w-87" id="ttlNm--${pageName}" name="ttlNm" />
|
||||
</div>
|
||||
<!-- 기타 내용 -->
|
||||
<div class="col-md-12">
|
||||
<label for="etcCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">기타내용</label>
|
||||
<textarea type="text" class="form-control w-87" id="etcCn--${pageName}" name="etcCn" rows="2" data-maxlengthb="1000"></textarea>
|
||||
</div>
|
||||
</div> <!-- <div class="row g-1"> -->
|
||||
</form> <!-- /입력 영역 -->
|
||||
|
||||
<!-- 업무 버튼 및 건수 표시 -->
|
||||
<div>
|
||||
<span class="container-page-btn">
|
||||
<span class="container-window-btn-right">
|
||||
<!-- 업무 버튼 -->
|
||||
<button type="button" class="btn btn-primary w-px-80" id="btnExcel--${pageName}" title="엑셀" onclick="fnExcel${pageName}();">
|
||||
엑셀
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="발송 등록" onclick="fnSave${pageName}();">
|
||||
발송 등록
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- / 업무 버튼 및 건수 표시 -->
|
||||
|
||||
<!-- DataTables(그리드) -->
|
||||
<div class="card-datatable text-nowrap">
|
||||
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
|
||||
<div class="table-responsive" id="table-responsive--${pageName}" style="overflow-x:scroll; height:280px; overflow-y:scroll;" >
|
||||
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
|
||||
<thead class="sticky-thead">
|
||||
<tr id="theadTr--${pageName}"
|
||||
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
|
||||
<th class="cmn hidden" style="width: 56px;">
|
||||
<input type="checkbox" class="form-check-input" onchange="${pageName}Control.select(this.checked);">
|
||||
</th>
|
||||
<th class="cmn" style="width: 160px;">민원신청번호</th>
|
||||
<th class="cmn" style="width: 160px;">민원접수번호</th>
|
||||
<th class="cmn" style="width: 120px;">민원접수일자</th>
|
||||
<th class="cmn" style="width: 160px;">민원처리결과</th>
|
||||
<th class="cmn" style="width: 180px;">단속일시</th>
|
||||
<th class="cmn" style="width: 140px;">차량번호</th>
|
||||
<th class="cmn" style="width: 160px;">법정동</th>
|
||||
<th class="cmn" style="width: 280px;">단속장소</th>
|
||||
<th class="cmn" style="width: 120px;">과태료금액</th>
|
||||
<th class="cmn" style="width: 120px;">처리상태</th>
|
||||
<th class="cmn" style="width: 200px;">납부자명</th>
|
||||
<th class="cmn" style="width: 120px;">납부자생일</th>
|
||||
<th class="cmn" style="width: 100px;">우편번호</th>
|
||||
<th class="cmn" style="width: 280px;">주소</th>
|
||||
<th class="cmn" style="width: 320px;">상세주소</th>
|
||||
<th class="cmn" style="width: 180px;">등록일시</th>
|
||||
<th class="cmn" style="width: 140px;">등록사용자</th>
|
||||
<th class="cmn" style="width: 180px;">수정일시</th>
|
||||
<th class="cmn" style="width: 140px;">수정사용자</th>
|
||||
<th class="cmn dummy-th"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody--${pageName}">
|
||||
</tbody>
|
||||
<template id="${infoPrefix}Row--${pageName}">
|
||||
<tr data-key="{CRDN_ID}">
|
||||
<td class="cmn text-center hidden">
|
||||
<input type="checkbox" class="form-check-input" value="{CRDN_ID}" onchange="${pageName}Control.select('{CRDN_ID}', this.checked);">
|
||||
</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_APLY_NO}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_NO}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_RCPT_YMD}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CVLCPT_PRCS_NM}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_YMD_TM}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{VHRNO}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STDG_NM}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_PLC}</td>
|
||||
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{FFNLG_AMT}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{CRDN_STTS_NM}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_NM}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RTPYR_BRDT}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ZIP}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{ADDR}</td>
|
||||
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{DTL_ADDR}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{RGTR_NM}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFCN_DT}</td>
|
||||
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MDFR_NM}</td>
|
||||
<td class="cmn dummy-td"></td>
|
||||
</tr>
|
||||
</template>
|
||||
<template id="${infoPrefix}NotFound--${pageName}">
|
||||
<tr class="odd">
|
||||
<td valign="top" colspan="21" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
||||
</tr>
|
||||
</template>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- / DataTables(그리드) -->
|
||||
</div> <!-- <div class="wrapper-list"> -->
|
||||
</div> <!-- <div class="card"> -->
|
||||
</div> <!-- / Content <div class="container flex-grow-1 px-0"> -->
|
||||
</div>
|
||||
<!-- / inner page html <div class="content-wrapper"> -->
|
||||
|
||||
<script>
|
||||
/**************************************************************************
|
||||
* Global Variable
|
||||
**************************************************************************/
|
||||
// URL
|
||||
var ${pageName}PrefixUrl = "/sndb/sndb01";
|
||||
// FormFields
|
||||
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl
|
||||
**************************************************************************/
|
||||
var ${pageName}Control = new DatasetControl({
|
||||
prefix : "advntceSndngTrgt"
|
||||
, prefixName : "발송 대상"
|
||||
, keymapper : info => info ? info.CRDN_ID : ""
|
||||
, dataGetter : obj => obj.sndngTrgtsList
|
||||
, appendData : true
|
||||
, tableRenderComplete : false // dataTables 에 자료 추가 완료 여부
|
||||
, urls : {
|
||||
getInfo : wctx.url("/sprt/sprt02/010/main.do") // 개별총정보
|
||||
}
|
||||
, formats : {
|
||||
TNOCS : numberFormat
|
||||
, GRAMT : numberFormat
|
||||
, CVLCPT_RCPT_YMD : dateFormat
|
||||
, CRDN_YMD_TM : datetimeFormat
|
||||
, FFNLG_AMT : numberFormat
|
||||
, REG_DT : datetimeFormat
|
||||
, MDFCN_DT : datetimeFormat
|
||||
}
|
||||
});
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl 이벤트
|
||||
**************************************************************************/
|
||||
// Dataset 변경 이벤트
|
||||
${pageName}Control.onDatasetChange = obj => {
|
||||
renderList${pageName}();
|
||||
|
||||
${pageName}Control.select(true); // 전체 선택 되도록..
|
||||
|
||||
${pageName}Control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
|
||||
};
|
||||
|
||||
// 현재 선택 자료 변경 이벤트
|
||||
${pageName}Control.onCurrentChange = item => {
|
||||
if (!item) return;
|
||||
|
||||
let key = item.data.CRDN_ID;
|
||||
|
||||
$("#tbody--${pageName}").setCurrentRow(key);
|
||||
};
|
||||
|
||||
// 선택(체크) 변경 이벤트
|
||||
${pageName}Control.onSelectionChange = selected => {
|
||||
let ${infoPrefix}List = ${pageName}Control.dataset;
|
||||
let keys = selected.map(e => ${infoPrefix}List.getKey(e));
|
||||
|
||||
$("#tbody--${pageName} input[type='checkbox']").each(function() {
|
||||
let checkbox = $(this);
|
||||
|
||||
checkbox.prop("checked", keys.includes(checkbox.val()));
|
||||
});
|
||||
};
|
||||
|
||||
// 개별총정보 dialog
|
||||
${pageName}Control.getInfo = (crdnId) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// 저장 callback
|
||||
${pageName}Control.onSave = (resp) => {
|
||||
let dialogTitle = $("#btnSave--${pageName}").attr("title");
|
||||
let showMessage = resp.retMessage.replace(/[S]|[F]/g, dialogTitle);
|
||||
|
||||
dialog.alert(showMessage);
|
||||
|
||||
if (resp.saved) {
|
||||
dialog.close(${pageName}Control.prefix + "Dialog");
|
||||
}
|
||||
}
|
||||
|
||||
// 저장
|
||||
${pageName}Control.save = (info) => {
|
||||
if (!info) return;
|
||||
|
||||
// 선택된 자료의 단속ID 추가
|
||||
let selected = ${pageName}Control.dataset.getKeys("selected");
|
||||
|
||||
if (selected.length < 1) return;
|
||||
|
||||
info.crdnIDs = selected.join(","); // 단속 IDs
|
||||
info.resndYn = "N"; // 재발송 여부
|
||||
info.delYn = "N"; // 삭제 여부
|
||||
|
||||
let createUrl = wctx.url(info.taskSeCd + ${pageName}PrefixUrl + "/020/create.do");
|
||||
|
||||
ajax.post({
|
||||
url : createUrl
|
||||
, data : info
|
||||
, success : resp => ${pageName}Control.onSave(resp)
|
||||
});
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
**************************************************************************/
|
||||
// DataTables에 click, dbclick 이벤트
|
||||
renderList${pageName} = () => {
|
||||
let ${infoPrefix}List = ${pageName}Control.dataset;
|
||||
let empty = ${infoPrefix}List.empty;
|
||||
|
||||
let trs = empty ?
|
||||
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
|
||||
${infoPrefix}List.inStrings(
|
||||
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
|
||||
(str, dataItem) => str
|
||||
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
||||
.replace(/{ondblclick}/gi, "${pageName}Control.getInfo('" + dataItem.getValue("CRDN_ID") + "');")
|
||||
);
|
||||
|
||||
$("#tbody--${pageName}").html(trs.join());
|
||||
$("th input[type='checkbox']").prop("checked", false);
|
||||
|
||||
//보안모드
|
||||
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* 초기 셋팅
|
||||
**************************************************************************/
|
||||
// 화면 초기값 셋팅
|
||||
initForm${pageName} = () => {
|
||||
// 달력 초기화
|
||||
initDatepicker("frmEdit--${pageName}");
|
||||
$("#sndngYmd--${pageName}").datepicker("setDate", new Date());
|
||||
$("#dudtYmd--${pageName}").datepicker("setDate", new Date());
|
||||
|
||||
let sndngSeCd = "${sndngSeCd}";
|
||||
|
||||
if (sndngSeCd == "10") {
|
||||
$("#dudtYmd--${pageName}").val("");
|
||||
$("#dudtYmd--${pageName}").prop("disabled", true);
|
||||
$("#divDudtYmd--${pageName}").hide();
|
||||
} else {
|
||||
$("#dudtYmd--${pageName}").datepicker("setDate", new Date());
|
||||
$("#dudtYmd--${pageName}").prop("disabled", false);
|
||||
$("#divDudtYmd--${pageName}").show();
|
||||
}
|
||||
|
||||
${pageName}Control.urls.getInfo = wctx.url("/" + ${pageName}Control.dataset.getValue("TASK_SE_CD") + "/sprt/sprt02/010/main.do"); // 개별총정보
|
||||
}
|
||||
|
||||
// 이벤트
|
||||
setEvent${pageName} = () => {
|
||||
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
||||
$("#frmEdit--${pageName}").find(".form-date").each(function() {
|
||||
$(this).on("input", function() {
|
||||
let value = this.value.replaceAll("-", "");
|
||||
|
||||
if (value.length > 7) {
|
||||
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
|
||||
} else if(value.length > 5) {
|
||||
this.value = value.substring(0, 4) + "-" + value.substring(4);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// DataTables width 변경 조정
|
||||
$("#DataTables_Table_0--${pageName}").find("th").resizable( {handles : "e"} );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* 버튼 clickEvent
|
||||
**************************************************************************/
|
||||
// 엑셀
|
||||
fnExcel${pageName} = () => {
|
||||
|
||||
}
|
||||
|
||||
// 발송 등록
|
||||
fnSave${pageName} = () => {
|
||||
// validate 확인
|
||||
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
||||
|
||||
dialog.alert({
|
||||
content : ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?"
|
||||
, onOK : () => {
|
||||
${pageName}Control.save(${pageName}Fields.get());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* script 진입
|
||||
**************************************************************************/
|
||||
$(document).ready(function() {
|
||||
// 이벤트 설정
|
||||
setEvent${pageName}();
|
||||
|
||||
// 화면 초기 설정
|
||||
initForm${pageName}();
|
||||
|
||||
// 보안모드
|
||||
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
||||
|
||||
// Dataset 셋팅 - 화면이 열리면서 조회하는 경우 addData 하여 자료를 추가
|
||||
${pageName}Control.addData(${advntceSndngTrgs});
|
||||
|
||||
$("#sndngSeCd--${pageName}").val("${sndngSeCd}"); // 발송 구분 코드
|
||||
$("#sggCd--${pageName}").val(${pageName}Control.dataset.getValue("SGG_CD")); // 시군구 코드
|
||||
$("#taskSeCd--${pageName}").val(${pageName}Control.dataset.getValue("TASK_SE_CD")); // 업무 구분 코드
|
||||
$("#tnocs--${pageName}").val(${pageName}Control.dataset.getValue("TNOCS")); // 총건수
|
||||
$("#gramt--${pageName}").val(${pageName}Control.dataset.getValue("GRAMT")); // 총금액
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue