민원 검색조건 jsp 수정.

main
jjh 5 months ago
parent a2da85fb48
commit 080e3b75e5

@ -36,6 +36,8 @@ public class CrdnQuery extends CmmnQuery {
private String aplcnYmd; private String aplcnYmd;
private String schCvlcptRcptYmdFrom; private String schCvlcptRcptYmdFrom;
private String schCvlcptRcptYmdTo; private String schCvlcptRcptYmdTo;
private String schCvlcptPrcsPrnmntDtFrom;
private String schCvlcptPrcsPrnmntDtTo;
private String schRductYmdFrom; private String schRductYmdFrom;
private String schRductYmdTo; private String schRductYmdTo;
private String crdnYmd; private String crdnYmd;
@ -198,6 +200,24 @@ public class CrdnQuery extends CmmnQuery {
return self(); return self();
} }
public String getSchCvlcptPrcsPrnmntDtFrom() {
return ifEmpty(schCvlcptPrcsPrnmntDtFrom, () -> null);
}
public <T extends CrdnQuery> T setSchCvlcptPrcsPrnmntDtFrom(String schCvlcptPrcsPrnmntDtFrom) {
this.schCvlcptPrcsPrnmntDtFrom = schCvlcptPrcsPrnmntDtFrom;
return self();
}
public String getSchCvlcptPrcsPrnmntDtTo() {
return ifEmpty(schCvlcptPrcsPrnmntDtTo, () -> null);
}
public <T extends CrdnQuery> T setSchCvlcptPrcsPrnmntDtTo(String schCvlcptPrcsPrnmntDtTo) {
this.schCvlcptPrcsPrnmntDtTo = schCvlcptPrcsPrnmntDtTo;
return self();
}
public String getSchRductYmdFrom() { public String getSchRductYmdFrom() {
return ifEmpty(schRductYmdFrom, () -> null); return ifEmpty(schRductYmdFrom, () -> null);
} }

@ -26,6 +26,7 @@ import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService; import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
import cokr.xit.fims.task.Task; import cokr.xit.fims.task.Task;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
/** .<br /> /** .<br />
@ -70,6 +71,8 @@ public class Cvlc03Controller extends ApplicationController {
mav.addObject("FIM054List", commonCodes.get("FIM054")); mav.addObject("FIM054List", commonCodes.get("FIM054"));
mav.addObject("TaskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054"))); mav.addObject("TaskListForSgg", stngBean.filterTaskSectionCodeForSgg(commonCodes.get("FIM054")));
addCodes(commonCodes, mav, "FIM022", "FIM026"); addCodes(commonCodes, mav, "FIM022", "FIM026");
mav.addObject("currentUserName", UserInfo.current().getName());
return mav; return mav;
} }

@ -174,14 +174,18 @@ WHERE C.DEL_YN = 'N'
<if test="cvlcptPrcsPicNm != null"> <if test="cvlcptPrcsPicNm != null">
AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm} AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm}
</if> </if>
<if test="schDateFrom != null or schDateTo != null"> <if test="schCvlcptPrcsPrnmntDtFrom != null or schCvlcptPrcsPrnmntDtTo != null">
<if test="schDateOpt == 'regDt'"> <if test="schCvlcptPrcsPrnmntDtFrom != null">AND CC.CVLCPT_PRCS_PRNMNT_DT <![CDATA[ >= ]]> #{schCvlcptPrcsPrnmntDtFrom} </if>
<if test="schDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if> <if test="schCvlcptPrcsPrnmntDtTo != null">AND CC.CVLCPT_PRCS_PRNMNT_DT <![CDATA[ <= ]]> #{schCvlcptPrcsPrnmntDtTo} </if>
<if test="schDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if> </if>
<if test="schRegDateFrom != null or schRegDateTo != null">
<if test="schRegDateOpt == 'regDt'">
<if test="schRegDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schRegDateFrom} </if>
<if test="schRegDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schRegDateTo} </if>
</if> </if>
<if test="schDateOpt == 'mdfcnDt'"> <if test="schRegDateOpt == 'mdfcnDt'">
<if test="schDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if> <if test="schRegDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schRegDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if> <if test="schRegDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schRegDateTo} </if>
</if> </if>
</if> </if>
<if test="by != null and by != '' and term != null"> <if test="by != null and by != '' and term != null">
@ -255,14 +259,18 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<if test="cvlcptPrcsPicNm != null"> <if test="cvlcptPrcsPicNm != null">
AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm} AND CC.CVLCPT_PRCS_PIC_NM = #{cvlcptPrcsPicNm}
</if> </if>
<if test="schDateFrom != null or schDateTo != null"> <if test="schCvlcptPrcsPrnmntDtFrom != null or schCvlcptPrcsPrnmntDtTo != null">
<if test="schDateOpt == 'regDt'"> <if test="schCvlcptPrcsPrnmntDtFrom != null">AND CC.CVLCPT_PRCS_PRNMNT_DT <![CDATA[ >= ]]> #{schCvlcptPrcsPrnmntDtFrom} </if>
<if test="schDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if> <if test="schCvlcptPrcsPrnmntDtTo != null">AND CC.CVLCPT_PRCS_PRNMNT_DT <![CDATA[ <= ]]> #{schCvlcptPrcsPrnmntDtTo} </if>
<if test="schDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if> </if>
<if test="schRegDateFrom != null or schRegDateTo != null">
<if test="schRegDateOpt == 'regDt'">
<if test="schRegDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schRegDateFrom} </if>
<if test="schRegDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schRegDateTo} </if>
</if> </if>
<if test="schDateOpt == 'mdfcnDt'"> <if test="schRegDateOpt == 'mdfcnDt'">
<if test="schDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if> <if test="schRegDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schRegDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if> <if test="schRegDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schRegDateTo} </if>
</if> </if>
</if> </if>
<if test="by != null and by != '' and term != null"> <if test="by != null and by != '' and term != null">
@ -450,14 +458,18 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
<if test="schCvlcptRcptYmdTo != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ <= ]]> #{schCvlcptRcptYmdTo} </if> <if test="schCvlcptRcptYmdTo != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ <= ]]> #{schCvlcptRcptYmdTo} </if>
</if> </if>
<if test="cvlcptPrcsCd != null">AND CC.CVLCPT_PRCS_CD = #{cvlcptPrcsCd}</if> <if test="cvlcptPrcsCd != null">AND CC.CVLCPT_PRCS_CD = #{cvlcptPrcsCd}</if>
<if test="schDateFrom != null or schDateTo != null"> <if test="schCvlcptPrcsPrnmntDtFrom != null or schCvlcptPrcsPrnmntDtTo != null">
<if test="schDateOpt == 'regDt'"> <if test="schCvlcptPrcsPrnmntDtFrom != null">AND CC.CVLCPT_PRCS_PRNMNT_DT <![CDATA[ >= ]]> #{schCvlcptPrcsPrnmntDtFrom} </if>
<if test="schDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if> <if test="schCvlcptPrcsPrnmntDtTo != null">AND CC.CVLCPT_PRCS_PRNMNT_DT <![CDATA[ <= ]]> #{schCvlcptPrcsPrnmntDtTo} </if>
<if test="schDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if> </if>
<if test="schRegDateFrom != null or schRegDateTo != null">
<if test="schRegDateOpt == 'regDt'">
<if test="schRegDateFrom != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ >= ]]> #{schRegDateFrom} </if>
<if test="schRegDateTo != null">AND SUBSTR(C.REG_DT,1,8) <![CDATA[ <= ]]> #{schRegDateTo} </if>
</if> </if>
<if test="schDateOpt == 'mdfcnDt'"> <if test="schRegDateOpt == 'mdfcnDt'">
<if test="schDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schDateFrom} </if> <if test="schRegDateFrom != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ >= ]]> #{schRegDateFrom} </if>
<if test="schDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schDateTo} </if> <if test="schRegDateTo != null">AND SUBSTR(C.MDFCN_DT,1,8) <![CDATA[ <= ]]> #{schRegDateTo} </if>
</if> </if>
</if> </if>
<if test="by != null and by != '' and term != null"> <if test="by != null and by != '' and term != null">

@ -22,8 +22,8 @@
<form id="frmSearch--${pageName}" name="frmSearch"> <form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<div class="col-6"> <div class="col-12">
<span class="form-label fw-bold form-search-title">업무구분</span> <span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item"> <c:forEach items="${TaskListForSgg}" var="item">
<label> <label>
@ -36,62 +36,73 @@
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-6">
<span class="form-label fw-bold form-search-title">접수일자</span> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCvlcptRcptYmdFrom--${pageName}">접수일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" id="schCvlcptRcptYmdFrom--${pageName}" name="schCvlcptRcptYmdFrom" <input type="text" id="schCvlcptRcptYmdFrom--${pageName}" name="schCvlcptRcptYmdFrom"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" /> data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~ ~
<input type="text" id="schCvlcptRcptYmdTo--${pageName}" name="schCvlcptRcptYmdTo" <input type="text" id="schCvlcptRcptYmdTo--${pageName}" name="schCvlcptRcptYmdTo"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-6">
<button type="button" <button type="button" class="w-px-120" onclick="$('#cvlcptPrcsPicNm--${pageName}').val('${currentUserName}');">
onclick="$('#cvlcptPrcsPicNm--${pageName}').val('${currentUserName}');"> 담당자명 지정
담당자명 지정
</button> </button>
<input type="text" id="cvlcptPrcsPicNm--${pageName}" name="cvlcptPrcsPicNm" <input type="text" id="cvlcptPrcsPicNm--${pageName}" name="cvlcptPrcsPicNm"
class="form-control" /> class="form-control" />
</div> </div>
<div class="col-6"> <div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" /> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCvlcptPrcsPrnmntDtFrom--${pageName}">처리기한</label>
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" /> <span class="form-search-linebox">
<input type="text" id="schCvlcptPrcsPrnmntDtFrom--${pageName}" name="schCvlcptPrcsPrnmntDtFrom"
class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schCvlcptPrcsPrnmntDtTo--${pageName}" name="schCvlcptPrcsPrnmntDtTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" /> <input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" /> <input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" /> <input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" />
<!-- 상세 검색조건 버튼 -->
<span class="flr"> <span class="flr">
<button type="button" class="btn btn-open-detail" <button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}"> <i class="bx bx-chevron-down"></i>
<i class="bx bx-chevron-down"></i> 상세검색
상세검색 </button>
</button> </span>
</span> </div>
</div>
</div> </div>
</div> </div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse"> <div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select"> <select class="form-select w-px-120 text-center" id="schRegDateOpt--${pageName}" name="schRegDateOpt">
<option value="regDt">등록일자</option> <option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option> <option value="mdfcnDt">수정일자</option>
</select> </select>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom" <input type="text" class="form-control form-date" id="schRegDateFrom--${pageName}" name="schRegDateFrom"
class="form-control form-date" data-fmt-type="day" title="시작 날짜 선택" />
data-fmt-type="day" title="시작 날짜 선택" /> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~ ~
<input type="text" id="schDateTo--${pageName}" name="schDateTo" <input type="text" class="form-control form-date" id="schRegDateTo--${pageName}" name="schRegDateTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
@ -99,13 +110,13 @@
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn">
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" <span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span> role="status" aria-live="polite"></span>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary"> <ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
</ul> </ul>
</div> </div>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" id="btnOpenCvlcptOrgnl--${pageName}" class="btn btn-primary" <button type="button" id="btnOpenCvlcptOrgnl--${pageName}" class="btn btn-primary"
title="민원원본보기"> title="민원원본보기">
민원원본보기 민원원본보기
</button> </button>
@ -118,7 +129,7 @@
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-550"> <div id="table-responsive--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-500">
<table id="DataTables_Table_0--${pageName}" <table id="DataTables_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer"> class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead id="crdnThead--${pageName}" class="sticky-thead"> <thead id="crdnThead--${pageName}" class="sticky-thead">
@ -202,7 +213,7 @@
</div> </div>
</div> </div>
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
@ -221,23 +232,23 @@ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.holdList = []; $P.holdList = [];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000
}); });
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "", keymapper : info => info ? info.CRDN_ID : "",
urls : { urls : {
load : "", load : "",
getInfo : "", getInfo : "",
remove : "" remove : ""
}, },
formats : { formats : {
CRDN_REG_SE_CD : FIM026, CRDN_REG_SE_CD : FIM026,
@ -249,12 +260,12 @@ $(document).ready(function(){
$P.crdnControl.defaultFetchSize = FETCH_XS; $P.crdnControl.defaultFetchSize = FETCH_XS;
$P.crdnControl.untilPageNum = 0; $P.crdnControl.untilPageNum = 0;
$P.crdnControl.beforeCurrent = null; $P.crdnControl.beforeCurrent = null;
/************************************************************************** /**************************************************************************
* Dataset.on * Dataset.on
**************************************************************************/ **************************************************************************/
$P.crdnControl.dataset.onDatasetChange = (obj) => { $P.crdnControl.dataset.onDatasetChange = (obj) => {
var t = $P.getGridTemplate(); var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs); $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs);
@ -266,14 +277,14 @@ $(document).ready(function(){
Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]); Apply.fromDataset.currentRow($P.crdnControl.dataset, dataItem, $("#crdnTbody--${pageName}")[0]);
if(!dataItem){ if(!dataItem){
$("#bottomCrdnPlc--${pageName}").val(""); $("#bottomCrdnPlc--${pageName}").val("");
$("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnOpenCvlcptOrgnl--${pageName}").hide();
$("#btnDelete--${pageName}").hide(); $("#btnDelete--${pageName}").hide();
$("#btnDeleteSameRcptYmd--${pageName}").hide(); $("#btnDeleteSameRcptYmd--${pageName}").hide();
} else { } else {
$("#bottomCrdnPlc--${pageName}").val(dataItem.data["CRDN_PLC"]); $("#bottomCrdnPlc--${pageName}").val(dataItem.data["CRDN_PLC"]);
if($P.holdList.includes(dataItem.data["CRDN_ID"])){ if($P.holdList.includes(dataItem.data["CRDN_ID"])){
$("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnOpenCvlcptOrgnl--${pageName}").hide();
$("#btnDelete--${pageName}").hide(); $("#btnDelete--${pageName}").hide();
@ -294,18 +305,19 @@ $(document).ready(function(){
$("#btnOpenCvlcptOrgnl--${pageName}").show(); $("#btnOpenCvlcptOrgnl--${pageName}").show();
$("#btnDelete--${pageName}").show(); $("#btnDelete--${pageName}").show();
$("#btnDeleteSameRcptYmd--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show();
var searchForm = $("#frmSearch--${pageName}"); var searchForm = $("#frmSearch--${pageName}");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false); searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false); searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='text']").val(""); searchForm.find("input[type='text']").val("");
searchForm.find("input[type='hidden']").val(""); searchForm.find("input[type='hidden']").val("");
searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); }); searchForm.find("select").each(function(){ $(this).find("option:eq(0)").prop("selected", true); });
$("#byOutput--${pageName}").val("동적 검색"); $("#byOutput--${pageName}").val("동적 검색");
$("#schRgtrNm--${pageName}").prop("readonly", true); // 사용자 이름
$('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schCvlcptRcptYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY()); $('#schCvlcptRcptYmdTo--${pageName}').datepicker('setDate', TODAY());
$P.crdnControl.dataset.setData([]); $P.crdnControl.dataset.setData([]);
} }
@ -315,7 +327,7 @@ $(document).ready(function(){
$P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/020/info.do"); $P.crdnControl.urls.getInfo = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/020/info.do");
$P.crdnControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do"); $P.crdnControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc01/010/remove.do");
} }
$P.getParams = () => { $P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}"); var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get(); var data = formFields.get();
@ -323,13 +335,13 @@ $(document).ready(function(){
return data; return data;
} }
$P.searchCrdnList = () => { $P.searchCrdnList = () => {
$P.holdList = []; $P.holdList = [];
$("#btnDelete--${pageName}").show(); $("#btnDelete--${pageName}").show();
$("#btnDeleteSameRcptYmd--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show();
$P.crdnControl.query = $P.getParams(); $P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1); $P.crdnControl.load(1);
} }
@ -345,98 +357,98 @@ $(document).ready(function(){
key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"],
index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1
}; };
Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{ Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{
Apply.toDataset.set($P.crdnControl.dataset, resp); Apply.toDataset.set($P.crdnControl.dataset, resp);
$P.crdnControl.dataset.onDatasetChange(resp); $P.crdnControl.dataset.onDatasetChange(resp);
if($P.crdnControl.untilPageNum != 0){ if($P.crdnControl.untilPageNum != 0){
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize; $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize;
$P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum; $P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum;
$P.crdnControl.untilPageNum = 0; $P.crdnControl.untilPageNum = 0;
} }
if($P.crdnControl.beforeCurrent != null){ if($P.crdnControl.beforeCurrent != null){
var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; var beforeCurrentKey = $P.crdnControl.beforeCurrent.key;
var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index;
$P.crdnControl.beforeCurrent = null; $P.crdnControl.beforeCurrent = null;
if(!$P.crdnControl.dataset.empty){ if(!$P.crdnControl.dataset.empty){
var info = $P.crdnControl.dataset.getData(beforeCurrentKey); var info = $P.crdnControl.dataset.getData(beforeCurrentKey);
if(info != null){ if(info != null){
$P.crdnControl.dataset.setCurrent(beforeCurrentKey,true); $P.crdnControl.dataset.setCurrent(beforeCurrentKey,true);
} else { } else {
if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){ if(beforeCurrentIndex > ($P.crdnControl.dataset.length - 1)){
info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1]; info = $P.crdnControl.dataset.getDataset()[$P.crdnControl.dataset.length - 1];
} else { } else {
info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex]; info = $P.crdnControl.dataset.getDataset()[beforeCurrentIndex];
} }
$P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true); $P.crdnControl.dataset.setCurrent(info["CRDN_ID"],true);
} }
} }
} }
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd"); $("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
}); });
} }
$P.fnExcelDown = () => { $P.fnExcelDown = () => {
if($P.crdnControl.dataset.empty){ if($P.crdnControl.dataset.empty){
alert("조회된 자료가 없습니다."); alert("조회된 자료가 없습니다.");
return; return;
} }
var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"),
$($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.crdnControl.query.cellDefs = cellDefs; $P.crdnControl.query.cellDefs = cellDefs;
$P.crdnControl.download(); $P.crdnControl.download();
} }
$P.getGridTemplate = () => { $P.getGridTemplate = () => {
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML]; var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML; var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
return { return {
found : found, found : found,
notFound : notFound, notFound : notFound,
replacer : replacer replacer : replacer
}; };
} }
$P.renderCrdnList = (total, listLength, trs) => { $P.renderCrdnList = (total, listLength, trs) => {
var noMore = (total == listLength); var noMore = (total == listLength);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0); var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$P.holdList.forEach(function(item){ $P.holdList.forEach(function(item){
$("#crdnTbody--${pageName}").find("tr[data-key='"+item+"']").addClass("bg-dark"); $("#crdnTbody--${pageName}").find("tr[data-key='"+item+"']").addClass("bg-dark");
}); });
} }
$P.clickCrdnList = (dataKey) => { $P.clickCrdnList = (dataKey) => {
if(dataKey == ""){ if(dataKey == ""){
$("#bottomCrdnPlc--${pageName}").val(""); $("#bottomCrdnPlc--${pageName}").val("");
return; return;
} }
$("#crdnTbody--${pageName}").setCurrentRow(dataKey); $("#crdnTbody--${pageName}").setCurrentRow(dataKey);
$("#bottomCrdnPlc--${pageName}").val($P.crdnControl.dataset.getData(dataKey)["CRDN_PLC"]); $("#bottomCrdnPlc--${pageName}").val($P.crdnControl.dataset.getData(dataKey)["CRDN_PLC"]);
if($P.holdList.includes(dataKey)){ if($P.holdList.includes(dataKey)){
$("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnOpenCvlcptOrgnl--${pageName}").hide();
$("#btnDelete--${pageName}").hide(); $("#btnDelete--${pageName}").hide();
@ -446,25 +458,25 @@ $(document).ready(function(){
$("#btnDelete--${pageName}").show(); $("#btnDelete--${pageName}").show();
$("#btnDeleteSameRcptYmd--${pageName}").show(); $("#btnDeleteSameRcptYmd--${pageName}").show();
} }
Apply.toDataset.current($P.crdnControl.dataset, dataKey); Apply.toDataset.current($P.crdnControl.dataset, dataKey);
} }
$P.dblclickCrdnList = (dataKey) => { $P.dblclickCrdnList = (dataKey) => {
if($P.holdList.includes(dataKey)){ if($P.holdList.includes(dataKey)){
return; return;
} }
var dialogId = "cvlcptInitialDataEditDialog--${pageName}"; var dialogId = "cvlcptInitialDataEditDialog--${pageName}";
ajax.get({ ajax.get({
url : $P.crdnControl.urls.getInfo, url : $P.crdnControl.urls.getInfo,
data : { data : {
"crdnId" : dataKey, "crdnId" : dataKey,
"openerPageName" : "${pageName}" "openerPageName" : "${pageName}"
}, },
success : (resp) => { success : (resp) => {
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "민원접수 초기자료 편집", title : "민원접수 초기자료 편집",
@ -473,7 +485,7 @@ $(document).ready(function(){
init : () => { init : () => {
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();
for(var reqKey in childReq) { for(var reqKey in childReq) {
if($P.provide[reqKey]){ if($P.provide[reqKey]){
parentRes[reqKey] = $P.provide[reqKey]; parentRes[reqKey] = $P.provide[reqKey];
@ -481,9 +493,9 @@ $(document).ready(function(){
parentRes[reqKey] = function(){}; parentRes[reqKey] = function(){};
} }
} }
pageObject.parentRes.push(parentRes); pageObject.parentRes.push(parentRes);
$("#"+dialogId).find("label[class='parentGrid']").attr("for","table-responsive--${pageName}"); $("#"+dialogId).find("label[class='parentGrid']").attr("for","table-responsive--${pageName}");
} }
}); });
@ -491,7 +503,7 @@ $(document).ready(function(){
}); });
} }
$P.fnHold = () => { $P.fnHold = () => {
var curKey = $P.crdnControl.dataset.getCurrent()["CRDN_ID"]; var curKey = $P.crdnControl.dataset.getCurrent()["CRDN_ID"];
if($P.holdList.includes(curKey)){ if($P.holdList.includes(curKey)){
@ -499,19 +511,19 @@ $(document).ready(function(){
} }
$P.holdList.push(curKey); $P.holdList.push(curKey);
$("#crdnTbody--${pageName}").find("tr[data-key='"+curKey+"']").addClass("bg-dark"); $("#crdnTbody--${pageName}").find("tr[data-key='"+curKey+"']").addClass("bg-dark");
$("#btnOpenCvlcptOrgnl--${pageName}").hide(); $("#btnOpenCvlcptOrgnl--${pageName}").hide();
$("#btnDelete--${pageName}").hide(); $("#btnDelete--${pageName}").hide();
$("#btnDeleteSameRcptYmd--${pageName}").hide(); $("#btnDeleteSameRcptYmd--${pageName}").hide();
} }
$P.fnRemove = (rcptYmd) => { $P.fnRemove = (rcptYmd) => {
if(rcptYmd != null){ if(rcptYmd != null){
var ds = $P.crdnControl.dataset.getDataset(); var ds = $P.crdnControl.dataset.getDataset();
var crdnIds = []; var crdnIds = [];
var filtered = ds.filter(function(item){ var filtered = ds.filter(function(item){
if(item['CVLCPT_RCPT_YMD'] == rcptYmd && !$P.holdList.includes(item['CRDN_ID'])){ if(item['CVLCPT_RCPT_YMD'] == rcptYmd && !$P.holdList.includes(item['CRDN_ID'])){
return true; return true;
@ -522,18 +534,18 @@ $(document).ready(function(){
for(var i=0; i < filtered.length; i++){ for(var i=0; i < filtered.length; i++){
crdnIds.push(filtered[i].CRDN_ID); crdnIds.push(filtered[i].CRDN_ID);
} }
$P.crdnControl.dataset.select(crdnIds,true); $P.crdnControl.dataset.select(crdnIds,true);
} else { } else {
var cur = $P.crdnControl.dataset.getCurrent(); var cur = $P.crdnControl.dataset.getCurrent();
if(cur == null){ if(cur == null){
return; return;
} }
var curKey = cur["CRDN_ID"]; var curKey = cur["CRDN_ID"];
$P.crdnControl.dataset.select(curKey,true); $P.crdnControl.dataset.select(curKey,true);
} }
var selected = $P.crdnControl.dataset.getKeys("selected"); var selected = $P.crdnControl.dataset.getKeys("selected");
if (selected.length < 1) { if (selected.length < 1) {
return; return;
@ -551,14 +563,14 @@ $(document).ready(function(){
} }
}); });
} }
$P.removeCallback = (resp) => { $P.removeCallback = (resp) => {
if (resp.saved){ if (resp.saved){
$P.toast.show(); $P.toast.show();
sleep(1000).then(() => $P.refreshCrdnList()); sleep(1000).then(() => $P.refreshCrdnList());
} }
}; };
$P.fnRemoveSameRcptYmd = () => { $P.fnRemoveSameRcptYmd = () => {
var cur = $P.crdnControl.dataset.getCurrent(); var cur = $P.crdnControl.dataset.getCurrent();
if(cur == null){ if(cur == null){
@ -568,28 +580,28 @@ $(document).ready(function(){
var curRcptYmd = cur["CVLCPT_RCPT_YMD"]; var curRcptYmd = cur["CVLCPT_RCPT_YMD"];
dialog.alert({ dialog.alert({
content : "접수일 : "+dateFormat.format(curRcptYmd)+"<br/>모든 자료를 제거하시겠습니까?", content : "접수일 : "+dateFormat.format(curRcptYmd)+"<br/>모든 자료를 제거하시겠습니까?",
init : function() { init : function() {
focusOK(); focusOK();
}, },
onOK : () => { onOK : () => {
$P.fnRemove(curRcptYmd); $P.fnRemove(curRcptYmd);
} }
}); });
} }
$P.fnOpenCvlcptOrgnl = () => { $P.fnOpenCvlcptOrgnl = () => {
var cur = $P.crdnControl.dataset.getCurrent(); var cur = $P.crdnControl.dataset.getCurrent();
if(cur == null){ if(cur == null){
return; return;
} }
var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
var dialogId = "cvlcptOrgnlDialog--${pageName}"; var dialogId = "cvlcptOrgnlDialog--${pageName}";
ajax.get({ ajax.get({
url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"), url : wctx.url("/"+taskSeCd+"/cvlc/cvlc01/050/info.do"),
data : { crdnId : cur["CRDN_ID"] }, data : { crdnId : cur["CRDN_ID"] },
success : (resp) => { success : (resp) => {
dialog.open({ dialog.open({
id : dialogId, id : dialogId,
title : "민원내역 원본", title : "민원내역 원본",
@ -598,7 +610,7 @@ $(document).ready(function(){
init : () => { init : () => {
var parentRes = new Object(); var parentRes = new Object();
var childReq = pageObject.childReq.pop(); var childReq = pageObject.childReq.pop();
for(var reqKey in childReq) { for(var reqKey in childReq) {
if($P.provide[reqKey]){ if($P.provide[reqKey]){
parentRes[reqKey] = $P.provide[reqKey]; parentRes[reqKey] = $P.provide[reqKey];
@ -606,21 +618,21 @@ $(document).ready(function(){
parentRes[reqKey] = function(){}; parentRes[reqKey] = function(){};
} }
} }
pageObject.parentRes.push(parentRes); pageObject.parentRes.push(parentRes);
} }
}); });
} }
}); });
} }
$P.provide = { $P.provide = {
"getCountStatus" : function(currentKey){ "getCountStatus" : function(currentKey){
var ds = $P.crdnControl.dataset.getDataset(); var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var index = ds.findIndex(item => item.CRDN_ID == currentKey);
return (index+1) + " of " + ds.length; return (index+1) + " of " + ds.length;
}, },
"getNextKey" : function(currentKey){ "getNextKey" : function(currentKey){
var ds = $P.crdnControl.dataset.getDataset(); var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var index = ds.findIndex(item => item.CRDN_ID == currentKey);
if(ds.length > index+1){ if(ds.length > index+1){
@ -633,7 +645,7 @@ $(document).ready(function(){
return ""; return "";
} }
}, },
"getPrevKey" : function(currentKey){ "getPrevKey" : function(currentKey){
var ds = $P.crdnControl.dataset.getDataset(); var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey); var index = ds.findIndex(item => item.CRDN_ID == currentKey);
if(index != 0 && ds.length > 1){ if(index != 0 && ds.length > 1){
@ -646,16 +658,16 @@ $(document).ready(function(){
return ""; return "";
} }
}, },
"selectRow" : function(currentKey){ "selectRow" : function(currentKey){
$P.clickCrdnList(currentKey); $P.clickCrdnList(currentKey);
}, },
"holdRow" : function(currentKey){ "holdRow" : function(currentKey){
$P.fnHold(currentKey); $P.fnHold(currentKey);
}, },
"refreshList" : function(){ "refreshList" : function(){
$P.refreshCrdnList(); $P.refreshCrdnList();
}, },
"hasData" : function(key){ "hasData" : function(key){
if($P.crdnControl.dataset.getData(key) == null){ if($P.crdnControl.dataset.getData(key) == null){
return false; return false;
} else { } else {
@ -663,8 +675,7 @@ $(document).ready(function(){
} }
}, },
}; };
/************************************************************************** /**************************************************************************
* element.on * element.on
**************************************************************************/ **************************************************************************/
@ -673,30 +684,30 @@ $(document).ready(function(){
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다. // 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$("#term--${pageName}").onEnterPress($P.searchCrdnList); $("#term--${pageName}").onEnterPress($P.searchCrdnList);
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown()); $('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
$("#btnHold--${pageName}").on("click", () => $P.fnHold()); $("#btnHold--${pageName}").on("click", () => $P.fnHold());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove()); $("#btnDelete--${pageName}").on("click", () => $P.fnRemove());
$("#btnDeleteSameRcptYmd--${pageName}").on("click", () => $P.fnRemoveSameRcptYmd()); $("#btnDeleteSameRcptYmd--${pageName}").on("click", () => $P.fnRemoveSameRcptYmd());
$("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl()); $("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl());
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList);
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
**************************************************************************/ **************************************************************************/
//달력 초기화 //달력 초기화
initDatepicker("frmSearch--${pageName}"); initDatepicker("frmSearch--${pageName}");
initDetailSearchButton("frmSearch--${pageName}"); initDetailSearchButton("frmSearch--${pageName}");
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue); $P.fnResetAndChangeBiz(defaultBizValue);
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true"); $(this).prop("disabled", "true");
}); });

@ -25,8 +25,8 @@
<form id="frmSearch--${pageName}" name="frmSearch"> <form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<div class="col-6"> <div class="col-12">
<span class="form-label fw-bold form-search-title">업무구분</span> <span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item"> <c:forEach items="${TaskListForSgg}" var="item">
<label> <label>
@ -39,22 +39,22 @@
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-6">
<span class="form-label fw-bold form-search-title">접수일자</span> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCvlcptRcptYmdFrom--${pageName}">접수일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" id="schCvlcptRcptYmdFrom--${pageName}" name="schCvlcptRcptYmdFrom" <input type="text" id="schCvlcptRcptYmdFrom--${pageName}" name="schCvlcptRcptYmdFrom"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" /> data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~ ~
<input type="text" id="schCvlcptRcptYmdTo--${pageName}" name="schCvlcptRcptYmdTo" <input type="text" id="schCvlcptRcptYmdTo--${pageName}" name="schCvlcptRcptYmdTo"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-6">
<label class="form-label fw-bold form-search-title" for="cvlcptPrcsCd--${pageName}">처리구분</label> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="cvlcptPrcsCd--${pageName}">처리구분</label>
<select id="cvlcptPrcsCd--${pageName}" name="cvlcptPrcsCd" class="form-select"> <select id="cvlcptPrcsCd--${pageName}" name="cvlcptPrcsCd" class="form-select w-px-160">
<option value="">전체</option> <option value="">전체</option>
<c:forEach items="${FIM017List}" var="item"> <c:forEach items="${FIM017List}" var="item">
<c:if test="${item.code == '02' or item.code == '03' or item.code == '04'}"> <c:if test="${item.code == '02' or item.code == '03' or item.code == '04'}">
@ -64,39 +64,51 @@
</select> </select>
</div> </div>
<div class="col-6"> <div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" /> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCvlcptPrcsPrnmntDtFrom--${pageName}">처리기한</label>
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" /> <span class="form-search-linebox">
<input type="text" id="schCvlcptPrcsPrnmntDtFrom--${pageName}" name="schCvlcptPrcsPrnmntDtFrom"
class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schCvlcptPrcsPrnmntDtTo--${pageName}" name="schCvlcptPrcsPrnmntDtTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" /> <input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" /> <input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" /> <input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" />
<!-- 상세 검색조건 버튼 -->
<span class="flr"> <span class="flr">
<button type="button" class="btn btn-open-detail" <button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}"> <i class="bx bx-chevron-down"></i>
<i class="bx bx-chevron-down"></i> 상세검색
상세검색 </button>
</button> </span>
</span> </div>
</div>
</div> </div>
</div> </div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse"> <div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select"> <select class="form-select w-px-120 text-center" id="schRegDateOpt--${pageName}" name="schRegDateOpt">
<option value="regDt">등록일자</option> <option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option> <option value="mdfcnDt">수정일자</option>
</select> </select>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom" <input type="text" class="form-control form-date" id="schRegDateFrom--${pageName}" name="schRegDateFrom"
class="form-control form-date" data-fmt-type="day" title="시작 날짜 선택" />
data-fmt-type="day" title="시작 날짜 선택" /> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~ ~
<input type="text" id="schDateTo--${pageName}" name="schDateTo" <input type="text" class="form-control form-date" id="schRegDateTo--${pageName}" name="schRegDateTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
@ -108,7 +120,7 @@
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn">
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" <span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span> role="status" aria-live="polite"></span>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary"> <ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
</ul> </ul>
@ -136,7 +148,7 @@
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-550"> <div id="table-responsive--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-500">
<table id="DataTables_Table_0--${pageName}" <table id="DataTables_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer"> class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead id="crdnThead--${pageName}" class="sticky-thead"> <thead id="crdnThead--${pageName}" class="sticky-thead">
@ -209,11 +221,11 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
@ -239,10 +251,10 @@ $(document).ready(function(){
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "", keymapper : info => info ? info.CRDN_ID : "",
urls : { urls : {
load : "", load : "",
getInfo : "", getInfo : "",
update : "" update : ""
}, },
formats : { formats : {
CRDN_REG_SE_CD : FIM026, CRDN_REG_SE_CD : FIM026,
@ -264,7 +276,7 @@ $(document).ready(function(){
var t = $P.getGridTemplate(); var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs); $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs);
Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}");
}; };
@ -318,7 +330,7 @@ $(document).ready(function(){
return data; return data;
} }
$P.searchCrdnList = () => { $P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams(); $P.crdnControl.query = $P.getParams();
$P.crdnControl.load(1); $P.crdnControl.load(1);
@ -337,26 +349,26 @@ $(document).ready(function(){
}; };
$P.crdnControl.load(1); $P.crdnControl.load(1);
} }
$P.fnExcelDown = (forApproval) => { $P.fnExcelDown = (forApproval) => {
if($P.crdnControl.dataset.empty){ if($P.crdnControl.dataset.empty){
alert("조회된 자료가 없습니다."); alert("조회된 자료가 없습니다.");
return; return;
} }
var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"), var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)").not(":eq(0)"),
$($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(":eq(0)")); $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)").not(":eq(0)"));
$P.crdnControl.query.cellDefs = cellDefs; $P.crdnControl.query.cellDefs = cellDefs;
if(forApproval){ if(forApproval){
$P.crdnControl.query.includePhoto = "Y"; $P.crdnControl.query.includePhoto = "Y";
} else { } else {
$P.crdnControl.query.includePhoto = "N"; $P.crdnControl.query.includePhoto = "N";
} }
$P.crdnControl.download(); $P.crdnControl.download();
$P.crdnControl.query.includePhoto = null; $P.crdnControl.query.includePhoto = null;
}; };
@ -367,19 +379,19 @@ $(document).ready(function(){
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
return { return {
found : found, found : found,
notFound : notFound, notFound : notFound,
replacer : replacer replacer : replacer
}; };
} }
$P.renderCrdnList = (total, listLength, trs) => { $P.renderCrdnList = (total, listLength, trs) => {
var noMore = (total == listLength); var noMore = (total == listLength);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0); var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
//보안모드 //보안모드
@ -405,7 +417,7 @@ $(document).ready(function(){
}); });
} }
$P.checkCrdnList = (element, bool) => { $P.checkCrdnList = (element, bool) => {
GRID.checkbox.sync(element, bool); GRID.checkbox.sync(element, bool);
@ -413,10 +425,10 @@ $(document).ready(function(){
$("#btnExecuteAnswer--${pageName}").prop("disabled", !atLeastOne); $("#btnExecuteAnswer--${pageName}").prop("disabled", !atLeastOne);
$("#btnAnswerComplete--${pageName}").prop("disabled", !atLeastOne); $("#btnAnswerComplete--${pageName}").prop("disabled", !atLeastOne);
$("#btnExecuteDisabledTagInfoInquire--${pageName}").prop("disabled", !atLeastOne); $("#btnExecuteDisabledTagInfoInquire--${pageName}").prop("disabled", !atLeastOne);
Apply.toDataset.selection($P.crdnControl.dataset, element, bool); Apply.toDataset.selection($P.crdnControl.dataset, element, bool);
} }
$P.clickCrdnList = (dataKey) => { $P.clickCrdnList = (dataKey) => {
if(dataKey == ""){ if(dataKey == ""){
return; return;
@ -527,10 +539,10 @@ $(document).ready(function(){
var count = $P.crdnControl.dataset.getKeys("selected").length; var count = $P.crdnControl.dataset.getKeys("selected").length;
dialog.alert({ dialog.alert({
content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?", content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?",
init : function() { init : function() {
focusOK(); focusOK();
}, },
onOK : () => { onOK : () => {
$P.save('answerExecute'); $P.save('answerExecute');
} }
@ -543,8 +555,8 @@ $(document).ready(function(){
dialog.alert({ dialog.alert({
content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?", content : "선택된 "+count+"건의 자료를 답변완료 상태로 변경하시겠습니까?",
init : function() { init : function() {
focusOK(); focusOK();
}, },
onOK : () => { onOK : () => {
$P.save('answerComplete'); $P.save('answerComplete');
@ -565,8 +577,8 @@ $(document).ready(function(){
if(resp.saved){ if(resp.saved){
dialog.alert({ dialog.alert({
content : "처리되었습니다.", content : "처리되었습니다.",
init : function() { init : function() {
focusClose(); focusClose();
} }
}); });
$P.refreshCrdnList(); $P.refreshCrdnList();
@ -574,7 +586,7 @@ $(document).ready(function(){
} }
}); });
} }
//표지정보 조회 //표지정보 조회
$P.fnExecuteDisabledTagInfoInquire = () => { $P.fnExecuteDisabledTagInfoInquire = () => {
@ -591,8 +603,8 @@ $(document).ready(function(){
if(keys.length == 0){ if(keys.length == 0){
dialog.alert({ dialog.alert({
content : "표지조회는 부과대상자료만 가능합니다.<br/>선택된 자료 중에 부과대상자료가 없습니다.", content : "표지조회는 부과대상자료만 가능합니다.<br/>선택된 자료 중에 부과대상자료가 없습니다.",
init : function() { init : function() {
focusClose(); focusClose();
} }
}); });
return; return;
@ -605,9 +617,9 @@ $(document).ready(function(){
dialog.alert({ dialog.alert({
content : message, content : message,
init : function() { init : function() {
setDialogZindex(); setDialogZindex();
focusOK(); focusOK();
}, },
onOK : () => { onOK : () => {
ajax.get({ ajax.get({
@ -620,10 +632,10 @@ $(document).ready(function(){
content : "표지정보조회가 실행되었습니다.", content : "표지정보조회가 실행되었습니다.",
init : function() { init : function() {
setDialogZindex(); setDialogZindex();
focusClose(); focusClose();
} }
}); });
$P.refreshCrdnList(); $P.refreshCrdnList();
} }
@ -673,29 +685,29 @@ $(document).ready(function(){
$("#term--${pageName}").onEnterPress($P.searchCrdnList); $("#term--${pageName}").onEnterPress($P.searchCrdnList);
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown(false)); $('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown(false));
$('#btnExcelForApproval--${pageName}').on('click', () => $P.fnExcelDown(true)); $('#btnExcelForApproval--${pageName}').on('click', () => $P.fnExcelDown(true));
$("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl()); $("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl());
$("#btnOpenAnswerPreview--${pageName}").on("click", () => $P.fnOpenAnswerPreview()); $("#btnOpenAnswerPreview--${pageName}").on("click", () => $P.fnOpenAnswerPreview());
$("#btnExecuteAnswer--${pageName}").on("click", () => $P.fnExecuteAnswer()); $("#btnExecuteAnswer--${pageName}").on("click", () => $P.fnExecuteAnswer());
$("#btnAnswerComplete--${pageName}").on("click", () => $P.fnAnswerComplete()); $("#btnAnswerComplete--${pageName}").on("click", () => $P.fnAnswerComplete());
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList);
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
**************************************************************************/ **************************************************************************/
//달력 초기화 //달력 초기화
initDatepicker("frmSearch--${pageName}"); initDatepicker("frmSearch--${pageName}");
initDetailSearchButton("frmSearch--${pageName}"); initDetailSearchButton("frmSearch--${pageName}");
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue); $P.fnResetAndChangeBiz(defaultBizValue);
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true"); $(this).prop("disabled", "true");
}); });

@ -4,7 +4,7 @@
<div class="content-wrapper"> <div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list"> <div class="card wrapper-list">
<div class="container-page-btn"> <div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화"> <button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화">
초기화 초기화
@ -22,8 +22,8 @@
<form id="frmSearch--${pageName}" name="frmSearch"> <form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<div class="col-6"> <div class="col-12">
<span class="form-label fw-bold form-search-title">업무구분</span> <span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item"> <c:forEach items="${TaskListForSgg}" var="item">
<label> <label>
@ -36,61 +36,72 @@
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-6">
<span class="form-label fw-bold form-search-title">접수일자</span> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCvlcptRcptYmdFrom--${pageName}">접수일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" id="schCvlcptRcptYmdFrom--${pageName}" name="schCvlcptRcptYmdFrom" <input type="text" id="schCvlcptRcptYmdFrom--${pageName}" name="schCvlcptRcptYmdFrom"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" /> data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~ ~
<input type="text" id="schCvlcptRcptYmdTo--${pageName}" name="schCvlcptRcptYmdTo" <input type="text" id="schCvlcptRcptYmdTo--${pageName}" name="schCvlcptRcptYmdTo"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-6">
<button type="button" <button type="button" class="w-px-120" onclick="$('#cvlcptPrcsPicNm--${pageName}').val('${currentUserName}');">
onclick="$('#cvlcptPrcsPicNm--${pageName}').val('${currentUserName}');"> 담당자명 지정
담당자명 지정
</button> </button>
<input type="text" id="cvlcptPrcsPicNm--${pageName}" name="cvlcptPrcsPicNm" <input type="text" id="cvlcptPrcsPicNm--${pageName}" name="cvlcptPrcsPicNm"
class="form-control"/> class="form-control" />
</div> </div>
<div class="col-6"> <div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" /> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="schCvlcptPrcsPrnmntDtFrom--${pageName}">처리기한</label>
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" /> <span class="form-search-linebox">
<input type="text" id="schCvlcptPrcsPrnmntDtFrom--${pageName}" name="schCvlcptPrcsPrnmntDtFrom"
class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~
<input type="text" id="schCvlcptPrcsPrnmntDtTo--${pageName}" name="schCvlcptPrcsPrnmntDtTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span>
</div>
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" class="form-control fw-bold w-px-120 text-end" id="byOutput--${pageName}" value="동적 검색" readonly />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" /> <input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" /> <input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" /> <input type="text" class="form-control w-px-400" id="term--${pageName}" name="term" autocomplete="off" />
<!-- 상세 검색조건 버튼 -->
<span class="flr"> <span class="flr">
<button type="button" class="btn btn-open-detail" <button type="button" class="btn btn-open-detail" data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}">
data-bs-toggle="collapse" data-bs-target="#searchDetail--${pageName}"> <i class="bx bx-chevron-down"></i>
<i class="bx bx-chevron-down"></i> 상세검색
상세검색 </button>
</button> </span>
</span> </div>
</div>
</div> </div>
</div> </div>
<div id="searchDetail--${pageName}" class="container-search container-search-detail collapse"> <div id="searchDetail--${pageName}" class="container-search container-search-detail collapse">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<select id="schDateOpt--${pageName}" name="schDateOpt" class="form-select"> <select class="form-select w-px-120 text-center" id="schRegDateOpt--${pageName}" name="schRegDateOpt">
<option value="regDt">등록일자</option> <option value="regDt">등록일자</option>
<option value="mdfcnDt">수정일자</option> <option value="mdfcnDt">수정일자</option>
</select> </select>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" id="schDateFrom--${pageName}" name="schDateFrom" <input type="text" class="form-control form-date" id="schRegDateFrom--${pageName}" name="schRegDateFrom"
class="form-control form-date" data-fmt-type="day" title="시작 날짜 선택" />
data-fmt-type="day" title="시작 날짜 선택" /> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~ ~
<input type="text" id="schDateTo--${pageName}" name="schDateTo" <input type="text" class="form-control form-date" id="schRegDateTo--${pageName}" name="schRegDateTo"
class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
@ -99,7 +110,7 @@
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn">
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info" <span id="crdnPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span> role="status" aria-live="polite"></span>
<ul id="crdnPaging--${pageName}" class="pagination pagination-primary"> <ul id="crdnPaging--${pageName}" class="pagination pagination-primary">
</ul> </ul>
@ -115,7 +126,7 @@
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-550"> <div id="table-responsive--${pageName}" class="table-responsive ox-scroll oy-scroll h-px-500">
<table id="DataTables_Table_0--${pageName}" <table id="DataTables_Table_0--${pageName}"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer"> class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead id="crdnThead--${pageName}" class="sticky-thead"> <thead id="crdnThead--${pageName}" class="sticky-thead">
@ -192,13 +203,13 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
@ -230,10 +241,10 @@ $(document).ready(function(){
$P.crdnControl = new DatasetControl({ $P.crdnControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.CRDN_ID : "", keymapper : info => info ? info.CRDN_ID : "",
urls : { urls : {
load : "", load : "",
getInfo : "", getInfo : "",
remove : "" remove : ""
}, },
formats : { formats : {
CRDN_REG_SE_CD : FIM026, CRDN_REG_SE_CD : FIM026,
@ -255,7 +266,7 @@ $(document).ready(function(){
var t = $P.getGridTemplate(); var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer); var trs = Apply.fromDataset.getTbody($P.crdnControl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs); $P.renderCrdnList(obj["Total"], $P.crdnControl.dataset.length, trs);
Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}"); Apply.fromDataset.paging($P.crdnControl.dataset, obj, "crdnPaging--${pageName}");
}; };
@ -297,7 +308,7 @@ $(document).ready(function(){
return data; return data;
} }
$P.searchCrdnList = () => { $P.searchCrdnList = () => {
$P.crdnControl.query = $P.getParams(); $P.crdnControl.query = $P.getParams();
@ -315,17 +326,17 @@ $(document).ready(function(){
key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"], key : $P.crdnControl.dataset.getCurrent()["CRDN_ID"],
index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1 index : $P.crdnControl.dataset.getCurrent()["ROW_NUM"] - 1
}; };
Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{ Apply.fromDatasetControl.load($P.crdnControl, 1).then((resp)=>{
Apply.toDataset.set($P.crdnControl.dataset, resp); Apply.toDataset.set($P.crdnControl.dataset, resp);
$P.crdnControl.dataset.onDatasetChange(resp); $P.crdnControl.dataset.onDatasetChange(resp);
if($P.crdnControl.untilPageNum != 0){ if($P.crdnControl.untilPageNum != 0){
$P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize; $P.crdnControl.query.fetchSize = $P.crdnControl.defaultFetchSize;
$P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum; $P.crdnControl.query.pageNum = $P.crdnControl.untilPageNum;
$P.crdnControl.untilPageNum = 0; $P.crdnControl.untilPageNum = 0;
} }
if($P.crdnControl.beforeCurrent != null){ if($P.crdnControl.beforeCurrent != null){
var beforeCurrentKey = $P.crdnControl.beforeCurrent.key; var beforeCurrentKey = $P.crdnControl.beforeCurrent.key;
var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index; var beforeCurrentIndex = $P.crdnControl.beforeCurrent.index;
@ -347,44 +358,44 @@ $(document).ready(function(){
} }
} }
} }
$("label[for='table-responsive--${pageName}']").trigger("refreshEnd"); $("label[for='table-responsive--${pageName}']").trigger("refreshEnd");
}); });
} }
$P.fnExcelDown = () => { $P.fnExcelDown = () => {
if($P.crdnControl.dataset.empty){ if($P.crdnControl.dataset.empty){
alert("조회된 자료가 없습니다."); alert("조회된 자료가 없습니다.");
return; return;
} }
var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"), var cellDefs = getCellDefs($("#crdnThead--${pageName} th").not(".dummy-th").not(":eq(0)"),
$($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)")); $($("#crdnRow--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
$P.crdnControl.query.cellDefs = cellDefs; $P.crdnControl.query.cellDefs = cellDefs;
$P.crdnControl.download(); $P.crdnControl.download();
} }
$P.getGridTemplate = () => { $P.getGridTemplate = () => {
var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML]; var notFound = [document.getElementById("crdnNotFound--${pageName}").innerHTML];
var found = document.getElementById("crdnRow--${pageName}").innerHTML; var found = document.getElementById("crdnRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickCrdnList('" + dataItem.getValue("CRDN_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickCrdnList('" + dataItem.getValue("CRDN_ID") + "');");
return { return {
found : found, found : found,
notFound : notFound, notFound : notFound,
replacer : replacer replacer : replacer
}; };
} }
$P.renderCrdnList = (total, listLength, trs) => { $P.renderCrdnList = (total, listLength, trs) => {
var noMore = (total == listLength); var noMore = (total == listLength);
var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0); var initScroll = ($P.crdnControl.query.pageNum < 2) && ($P.crdnControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
//보안모드 //보안모드
@ -398,7 +409,7 @@ $(document).ready(function(){
} }
$("#crdnTbody--${pageName}").setCurrentRow(dataKey); $("#crdnTbody--${pageName}").setCurrentRow(dataKey);
Apply.toDataset.current($P.crdnControl.dataset, dataKey); Apply.toDataset.current($P.crdnControl.dataset, dataKey);
} }
@ -422,7 +433,7 @@ $(document).ready(function(){
} }
}); });
} }
$P.fnRemove = () => { $P.fnRemove = () => {
var cur = $P.crdnControl.dataset.getCurrent(); var cur = $P.crdnControl.dataset.getCurrent();
@ -457,7 +468,7 @@ $(document).ready(function(){
sleep(1000).then(() => $P.refreshCrdnList()); sleep(1000).then(() => $P.refreshCrdnList());
} }
} }
$P.fnOpenCvlcptOrgnl = () => { $P.fnOpenCvlcptOrgnl = () => {
var cur = $P.crdnControl.dataset.getCurrent(); var cur = $P.crdnControl.dataset.getCurrent();
if(cur == null){ if(cur == null){
@ -545,24 +556,24 @@ $(document).ready(function(){
$('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown()); $('#btnExcel--${pageName}').on('click', () => $P.fnExcelDown());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove()); $("#btnDelete--${pageName}").on("click", () => $P.fnRemove());
$("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl()); $("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl());
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollCrdnList);
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
**************************************************************************/ **************************************************************************/
//달력 초기화 //달력 초기화
initDatepicker("frmSearch--${pageName}"); initDatepicker("frmSearch--${pageName}");
initDetailSearchButton("frmSearch--${pageName}"); initDetailSearchButton("frmSearch--${pageName}");
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue); $P.fnResetAndChangeBiz(defaultBizValue);
//보안모드 //보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked")); fn_securityModeToggle($("#securityMode--top").is(":checked"));
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true"); $(this).prop("disabled", "true");
}); });

@ -4,7 +4,7 @@
<div class="content-wrapper"> <div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list"> <div class="card wrapper-list">
<div class="container-page-btn"> <div class="container-page-btn">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화"> <button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화">
초기화 초기화
@ -19,8 +19,8 @@
<form id="frmSearch--${pageName}" name="frmSearch"> <form id="frmSearch--${pageName}" name="frmSearch">
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<div class="col-6"> <div class="col-12">
<span class="form-label fw-bold form-search-title">업무구분</span> <span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item"> <c:forEach items="${TaskListForSgg}" var="item">
<label> <label>
@ -33,14 +33,14 @@
</span> </span>
</div> </div>
<div class="col-6"> <div class="col-6">
<span class="form-label fw-bold form-search-title">요청일자</span> <label class="form-label fw-bold form-search-title w-px-120 text-end" for="schDmndYmdFrom--${pageName}">요청일자</label>
<span class="form-search-linebox"> <span class="form-search-linebox">
<input type="text" id="schDmndYmdFrom--${pageName}" name="schDmndYmdFrom" <input type="text" id="schDmndYmdFrom--${pageName}" name="schDmndYmdFrom"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="시작 날짜 선택" /> data-fmt-type="day" title="시작 날짜 선택" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
~ ~
<input type="text" id="schDmndYmdTo--${pageName}" name="schDmndYmdTo" <input type="text" id="schDmndYmdTo--${pageName}" name="schDmndYmdTo"
class="form-control form-date" class="form-control form-date"
data-fmt-type="day" title="종료 날짜 선택"> data-fmt-type="day" title="종료 날짜 선택">
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
@ -53,17 +53,17 @@
<div> <div>
<span class="container-page-btn"> <span class="container-page-btn">
<div class="d-flex flex-row justify-content-between"> <div class="d-flex flex-row justify-content-between">
<span id="dmndPaging--${pageName}PagingInfo" class="dataTables_info" <span id="dmndPaging--${pageName}PagingInfo" class="dataTables_info"
role="status" aria-live="polite"></span> role="status" aria-live="polite"></span>
<ul id="dmndPaging--${pageName}" class="pagination pagination-primary"> <ul id="dmndPaging--${pageName}" class="pagination pagination-primary">
</ul> </ul>
</div> </div>
<span class="container-window-btn-right"> <span class="container-window-btn-right">
<button type="button" id="btnOpenDmndPop--${pageName}" <button type="button" id="btnOpenDmndPop--${pageName}"
class="btn btn-primary" title="요청 등록">요청 등록</button> class="btn btn-primary" title="요청 등록">요청 등록</button>
<button type="button" id="btnDelete--${pageName}" <button type="button" id="btnDelete--${pageName}"
class="btn btn-primary" title="한 건 삭제">한 건 삭제</button> class="btn btn-primary" title="한 건 삭제">한 건 삭제</button>
<button type="button" id="btnDeleteAllCompleteData--${pageName}" <button type="button" id="btnDeleteAllCompleteData--${pageName}"
class="btn btn-primary" title="요청 완료자료 전체 삭제">요청 완료자료 전체 삭제</button> class="btn btn-primary" title="요청 완료자료 전체 삭제">요청 완료자료 전체 삭제</button>
</span> </span>
</span> </span>
@ -117,13 +117,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
@ -134,7 +130,7 @@
<div class="col-md-12"> <div class="col-md-12">
<label for="rcptYmd--${pageName}" <label for="rcptYmd--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수일자</label> class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">접수일자</label>
<input type="text" id="rcptYmd--${pageName}" name="rcptYmd" <input type="text" id="rcptYmd--${pageName}" name="rcptYmd"
class="form-control form-date" required data-fmt-type="day" /> class="form-control form-date" required data-fmt-type="day" />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div> </div>
@ -169,23 +165,23 @@ pageObject["${pageName}"] = {};
$(document).ready(function(){ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000
}); });
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.dmndControl = new DatasetControl({ $P.dmndControl = new DatasetControl({
dataGetter : obj => obj["List"], appendData:true, dataGetter : obj => obj["List"], appendData:true,
keymapper : info => info ? info.INDIV_ID : "", keymapper : info => info ? info.INDIV_ID : "",
urls : { urls : {
load : "", load : "",
create : "", create : "",
remove : "" remove : ""
}, },
formats : { formats : {
DMND_YMD : dateFormat, DMND_YMD : dateFormat,
@ -196,7 +192,7 @@ $(document).ready(function(){
$P.dmndControl.defaultFetchSize = FETCH_XS; $P.dmndControl.defaultFetchSize = FETCH_XS;
$P.dmndControl.untilPageNum = 0; $P.dmndControl.untilPageNum = 0;
$P.dmndControl.beforeCurrent = null; $P.dmndControl.beforeCurrent = null;
/************************************************************************** /**************************************************************************
* Dataset.on * Dataset.on
**************************************************************************/ **************************************************************************/
@ -211,12 +207,12 @@ $(document).ready(function(){
$P.dmndControl.dataset.onCurrentChange = (dataItem) => { $P.dmndControl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow($P.dmndControl.dataset, dataItem, $("#dmndTbody--${pageName}")[0]); Apply.fromDataset.currentRow($P.dmndControl.dataset, dataItem, $("#dmndTbody--${pageName}")[0]);
} }
/************************************************************************** /**************************************************************************
* pageObject.function * pageObject.function
**************************************************************************/ **************************************************************************/
$P.fnReset = () => { $P.fnReset = () => {
$('#schDmndYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date); $('#schDmndYmdFrom--${pageName}').datepicker('setDate', DateUtil.getDateDay(-5475).date);
$('#schDmndYmdTo--${pageName}').datepicker('setDate', TODAY()); $('#schDmndYmdTo--${pageName}').datepicker('setDate', TODAY());
$P.dmndControl.dataset.setData([]); $P.dmndControl.dataset.setData([]);
@ -228,7 +224,7 @@ $(document).ready(function(){
$P.dmndControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do"); $P.dmndControl.urls.create = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/create.do");
$P.dmndControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do"); $P.dmndControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc04/010/remove.do");
} }
$P.getParams = () => { $P.getParams = () => {
var formFields = new FimsFormFields("#frmSearch--${pageName}"); var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get(); var data = formFields.get();
@ -236,7 +232,7 @@ $(document).ready(function(){
return data; return data;
} }
$P.searchDmndList = () => { $P.searchDmndList = () => {
$P.dmndControl.query = $P.getParams(); $P.dmndControl.query = $P.getParams();
$P.dmndControl.load(1); $P.dmndControl.load(1);
@ -249,47 +245,47 @@ $(document).ready(function(){
$P.refreshDmndList = () => { $P.refreshDmndList = () => {
$P.dmndControl.untilPageNum = $P.dmndControl.query.pageNum; $P.dmndControl.untilPageNum = $P.dmndControl.query.pageNum;
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize * $P.dmndControl.query.pageNum; $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize * $P.dmndControl.query.pageNum;
if(!$P.dmndControl.dataset.empty){ if(!$P.dmndControl.dataset.empty){
$P.dmndControl.beforeCurrent = { $P.dmndControl.beforeCurrent = {
key : $P.dmndControl.dataset.getCurrent()["INDIV_ID"], key : $P.dmndControl.dataset.getCurrent()["INDIV_ID"],
index : $P.dmndControl.dataset.getCurrent()["ROW_NUM"] - 1 index : $P.dmndControl.dataset.getCurrent()["ROW_NUM"] - 1
}; };
} }
Apply.fromDatasetControl.load($P.dmndControl, 1).then((resp)=>{ Apply.fromDatasetControl.load($P.dmndControl, 1).then((resp)=>{
Apply.toDataset.set($P.dmndControl.dataset, resp); Apply.toDataset.set($P.dmndControl.dataset, resp);
$P.dmndControl.dataset.onDatasetChange(resp); $P.dmndControl.dataset.onDatasetChange(resp);
if($P.dmndControl.untilPageNum != 0){ if($P.dmndControl.untilPageNum != 0){
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize; $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize;
$P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum; $P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum;
$P.dmndControl.untilPageNum = 0; $P.dmndControl.untilPageNum = 0;
} }
if($P.dmndControl.beforeCurrent != null){ if($P.dmndControl.beforeCurrent != null){
var beforeCurrentKey = $P.dmndControl.beforeCurrent.key; var beforeCurrentKey = $P.dmndControl.beforeCurrent.key;
var beforeCurrentIndex = $P.dmndControl.beforeCurrent.index; var beforeCurrentIndex = $P.dmndControl.beforeCurrent.index;
$P.dmndControl.beforeCurrent = null; $P.dmndControl.beforeCurrent = null;
if(!$P.dmndControl.dataset.empty){ if(!$P.dmndControl.dataset.empty){
var info = $P.dmndControl.dataset.getData(beforeCurrentKey); var info = $P.dmndControl.dataset.getData(beforeCurrentKey);
if(info != null){ if(info != null){
$P.dmndControl.dataset.setCurrent(beforeCurrentKey,true); $P.dmndControl.dataset.setCurrent(beforeCurrentKey,true);
} else { } else {
if(beforeCurrentIndex > ($P.dmndControl.dataset.length - 1)){ if(beforeCurrentIndex > ($P.dmndControl.dataset.length - 1)){
info = $P.dmndControl.dataset.getDataset()[$P.dmndControl.dataset.length - 1]; info = $P.dmndControl.dataset.getDataset()[$P.dmndControl.dataset.length - 1];
} else { } else {
info = $P.dmndControl.dataset.getDataset()[beforeCurrentIndex]; info = $P.dmndControl.dataset.getDataset()[beforeCurrentIndex];
} }
$P.dmndControl.dataset.setCurrent(info["INDIV_ID"],true); $P.dmndControl.dataset.setCurrent(info["INDIV_ID"],true);
} }
} }
} }
}); });
} }
@ -298,60 +294,60 @@ $(document).ready(function(){
var found = document.getElementById("dmndRow--${pageName}").innerHTML; var found = document.getElementById("dmndRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('" + dataItem.getValue("INDIV_ID") + "');"); .replace(/{onclick}/gi, "pageObject['${pageName}'].clickDmndList('" + dataItem.getValue("INDIV_ID") + "');");
return { return {
found : found, found : found,
notFound : notFound, notFound : notFound,
replacer : replacer replacer : replacer
}; };
} }
$P.renderDmndList = (total, listLength, trs) => { $P.renderDmndList = (total, listLength, trs) => {
var noMore = (total == listLength); var noMore = (total == listLength);
var initScroll = ($P.dmndControl.query.pageNum < 2) && ($P.dmndControl.untilPageNum == 0); var initScroll = ($P.dmndControl.query.pageNum < 2) && ($P.dmndControl.untilPageNum == 0);
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore); $("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
if($P.dmndControl.untilPageNum != 0){ if($P.dmndControl.untilPageNum != 0){
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize; $P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize;
$P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum; $P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum;
$P.dmndControl.untilPageNum = 0; $P.dmndControl.untilPageNum = 0;
} }
} }
$P.clickDmndList = (dataKey) => { $P.clickDmndList = (dataKey) => {
if(dataKey == ""){ if(dataKey == ""){
return; return;
} }
$("#dmndTbody--${pageName}").setCurrentRow(dataKey); $("#dmndTbody--${pageName}").setCurrentRow(dataKey);
Apply.toDataset.current($P.dmndControl.dataset, dataKey); Apply.toDataset.current($P.dmndControl.dataset, dataKey);
} }
$P.fnRemove = (allCompleteDataIds) => { $P.fnRemove = (allCompleteDataIds) => {
if(allCompleteDataIds != null){ if(allCompleteDataIds != null){
$P.dmndControl.dataset.select(allCompleteDataIds,true); $P.dmndControl.dataset.select(allCompleteDataIds,true);
} else { } else {
var cur = $P.dmndControl.dataset.getCurrent(); var cur = $P.dmndControl.dataset.getCurrent();
if(cur == null){ if(cur == null){
return; return;
} }
var curKey = cur["INDIV_ID"]; var curKey = cur["INDIV_ID"];
$P.dmndControl.dataset.select(curKey,true); $P.dmndControl.dataset.select(curKey,true);
} }
var selected = $P.dmndControl.dataset.getKeys("selected"); var selected = $P.dmndControl.dataset.getKeys("selected");
if (selected.length < 1) { if (selected.length < 1) {
return; return;
} }
var params = { var params = {
"indivIds" : selected.join(",") "indivIds" : selected.join(",")
}; };
ajax.post({ ajax.post({
url : $P.dmndControl.urls.remove, url : $P.dmndControl.urls.remove,
data : params, data : params,
@ -359,9 +355,9 @@ $(document).ready(function(){
$P.removeCallback(selected, resp); $P.removeCallback(selected, resp);
} }
}); });
} }
$P.removeCallback = (selected, resp) => { $P.removeCallback = (selected, resp) => {
if (resp.saved){ if (resp.saved){
$("#toastText--${pageName}").html("삭제 되었습니다."); $("#toastText--${pageName}").html("삭제 되었습니다.");
@ -369,13 +365,13 @@ $(document).ready(function(){
sleep(1000).then(() => $P.refreshDmndList()); sleep(1000).then(() => $P.refreshDmndList());
} }
} }
$P.fnRemoveAllCompleteData = () => { $P.fnRemoveAllCompleteData = () => {
var cur = $P.dmndControl.dataset.getCurrent(); var cur = $P.dmndControl.dataset.getCurrent();
if(cur == null){ if(cur == null){
return; return;
} }
var ds = $P.dmndControl.dataset.getDataset(); var ds = $P.dmndControl.dataset.getDataset();
var indivIds = ds.filter(function(item){ var indivIds = ds.filter(function(item){
@ -387,25 +383,25 @@ $(document).ready(function(){
if(indivIds.length == 0){ if(indivIds.length == 0){
dialog.alert({ dialog.alert({
content : "요청 완료자료가 없습니다.", content : "요청 완료자료가 없습니다.",
init : function() { init : function() {
focusClose(); focusClose();
} }
}); });
return; return;
} }
dialog.alert({ dialog.alert({
content : "완료된 자료를 모두 삭제하시겠습니까?", content : "완료된 자료를 모두 삭제하시겠습니까?",
init : function() { init : function() {
focusOK(); focusOK();
}, },
onOK : () => { onOK : () => {
$P.fnRemove(indivIds); $P.fnRemove(indivIds);
} }
}); });
} }
//요청 등록 팝업 호출 //요청 등록 팝업 호출
$P.fnOpenDmndPop = () => { $P.fnOpenDmndPop = () => {
dialog.open({ dialog.open({
@ -421,25 +417,25 @@ $(document).ready(function(){
onClose : () => {} onClose : () => {}
}); });
} }
//요청 등록 //요청 등록
$P.fnCreateDmnd = () => { $P.fnCreateDmnd = () => {
if(!customValidate($("#frmEdit--${pageName} input"))) return; if(!customValidate($("#frmEdit--${pageName} input"))) return;
var info = (new FimsFormFields("#frmEdit--${pageName}")).get(); var info = (new FimsFormFields("#frmEdit--${pageName}")).get();
info.taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val(); info.taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
ajax.get({ ajax.get({
url : $P.dmndControl.urls.create, url : $P.dmndControl.urls.create,
data : info, data : info,
success : (resp) => { success : (resp) => {
if(resp.saved){ if(resp.saved){
dialog.close("seallDmndDialog--${pageName}"); dialog.close("seallDmndDialog--${pageName}");
$("#toastText--${pageName}").html("등록 되었습니다."); $("#toastText--${pageName}").html("등록 되었습니다.");
$P.toast.show(); $P.toast.show();
if(!$P.dmndControl.dataset.empty){ if(!$P.dmndControl.dataset.empty){
sleep(1000).then(() => $P.refreshDmndList()); sleep(1000).then(() => $P.refreshDmndList());
} }
@ -447,7 +443,7 @@ $(document).ready(function(){
} }
}); });
} }
/************************************************************************** /**************************************************************************
* element.on * element.on
**************************************************************************/ **************************************************************************/
@ -456,10 +452,10 @@ $(document).ready(function(){
$("#btnOpenDmndPop--${pageName}").on("click", () => $P.fnOpenDmndPop()); $("#btnOpenDmndPop--${pageName}").on("click", () => $P.fnOpenDmndPop());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove(null)); $("#btnDelete--${pageName}").on("click", () => $P.fnRemove(null));
$("#btnDeleteAllCompleteData--${pageName}").on("click", () => $P.fnRemoveAllCompleteData()); $("#btnDeleteAllCompleteData--${pageName}").on("click", () => $P.fnRemoveAllCompleteData());
fnMakeResizableTable($("#table-responsive--${pageName}")[0]); fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDmndList); fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDmndList);
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
**************************************************************************/ **************************************************************************/
@ -469,7 +465,7 @@ $(document).ready(function(){
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue); $P.fnResetAndChangeBiz(defaultBizValue);
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true"); $(this).prop("disabled", "true");
}); });

@ -9,7 +9,7 @@
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<div class="col-12"> <div class="col-12">
<span class="form-label fw-bold form-search-title">업무구분</span> <span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item"> <c:forEach items="${TaskListForSgg}" var="item">
<label> <label>
@ -24,37 +24,37 @@
</div> </div>
</div> </div>
</form> </form>
<div class="container-page-btn mt-3"> <div class="container-page-btn mt-3">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화"> <button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화">
초기화 초기화
</button> </button>
<span class="container-window-btn-right"></span> <span class="container-window-btn-right"></span>
</div> </div>
<span class="d-flex justify-content-center"> <span class="d-flex justify-content-center">
<div class="nav-align-top mb-1 w-px-1300"> <div class="nav-align-top mb-1 w-px-1300">
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item"> <li class="nav-item">
<button type="button" id="btnAnsBasicTab--${pageName}" class="nav-link active" <button type="button" id="btnAnsBasicTab--${pageName}" class="nav-link active"
role="tab" data-bs-toggle="tab"> role="tab" data-bs-toggle="tab">
머리말/꼬리말 머리말/꼬리말
</button> </button>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<button type="button" id="btnLevyAnsBodyTab--${pageName}" class="nav-link" <button type="button" id="btnLevyAnsBodyTab--${pageName}" class="nav-link"
role="tab" data-bs-toggle="tab"> role="tab" data-bs-toggle="tab">
부과건 답변내용 부과건 답변내용
</button> </button>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<button type="button" id="btnWarningAnsBodyTab--${pageName}" class="nav-link" <button type="button" id="btnWarningAnsBodyTab--${pageName}" class="nav-link"
role="tab" data-bs-toggle="tab"> role="tab" data-bs-toggle="tab">
계도건 답변내용 계도건 답변내용
</button> </button>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<button type="button" id="btnNonlevyAnsBodyTab--${pageName}" class="nav-link" <button type="button" id="btnNonlevyAnsBodyTab--${pageName}" class="nav-link"
role="tab" data-bs-toggle="tab"> role="tab" data-bs-toggle="tab">
미부과처리건 답변내용 미부과처리건 답변내용
</button> </button>
@ -62,9 +62,9 @@
</ul> </ul>
</div> </div>
</span> </span>
<div class="h-px-500 mt-1"> <div class="h-px-500 mt-1">
<!-- 머리말,꼬리말 영역 --> <!-- 머리말,꼬리말 영역 -->
<span class="area-answerbasic"> <span class="area-answerbasic">
<div class="d-flex flex-row justify-content-center h-100"> <div class="d-flex flex-row justify-content-center h-100">
@ -76,7 +76,7 @@
<label for="headerCn--${pageName}" <label for="headerCn--${pageName}"
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end align-top" class="w-px-130 bg-lighter pe-2 col-form-label text-sm-end align-top"
>머리말</label> >머리말</label>
<textarea id="headerCn--${pageName}" name="headerCn" <textarea id="headerCn--${pageName}" name="headerCn"
rows="5" cols="80%" class="form-control" required rows="5" cols="80%" class="form-control" required
placeholder="머리말이 없습니다." placeholder="머리말이 없습니다."
></textarea> ></textarea>
@ -95,7 +95,7 @@
</div> </div>
<div class="row justify-content-end"> <div class="row justify-content-end">
<div class="col-12"> <div class="col-12">
<button type="button" id="btnSaveAnsBasic--${pageName}" <button type="button" id="btnSaveAnsBasic--${pageName}"
class="btn btn-primary float-end" title="적용">적용</button> class="btn btn-primary float-end" title="적용">적용</button>
</div> </div>
</div> </div>
@ -104,7 +104,7 @@
</div> </div>
</div> </div>
</span> </span>
<!-- 본문처리 영역 --> <!-- 본문처리 영역 -->
<span class="area-answerbody area-answerbody-common"> <span class="area-answerbody area-answerbody-common">
<div class="d-flex flex-row justify-content-center h-100"> <div class="d-flex flex-row justify-content-center h-100">
@ -136,7 +136,7 @@
</template> </template>
<template id="vltnNotFound--${pageName}"> <template id="vltnNotFound--${pageName}">
<tr> <tr>
<td valign="top" colspan="2" <td valign="top" colspan="2"
class="dataTables_empty text-center">정보를 찾지 못했습니다.</td> class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
@ -167,7 +167,7 @@
</template> </template>
<template id="warningNotFound--${pageName}"> <template id="warningNotFound--${pageName}">
<tr> <tr>
<td valign="top" colspan="2" <td valign="top" colspan="2"
class="dataTables_empty text-center">정보를 찾지 못했습니다.</td> class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
@ -200,7 +200,7 @@
</template> </template>
<template id="nonlevyNotFound--${pageName}"> <template id="nonlevyNotFound--${pageName}">
<tr> <tr>
<td valign="top" colspan="3" <td valign="top" colspan="3"
class="dataTables_empty text-center">정보를 찾지 못했습니다.</td> class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
@ -224,7 +224,7 @@
답변내용 답변내용
</label> </label>
<br/> <br/>
<textarea id="prcsRsltCn--${pageName}" name="prcsRsltCn" <textarea id="prcsRsltCn--${pageName}" name="prcsRsltCn"
class="form-control w-100" required rows="15" class="form-control w-100" required rows="15"
></textarea> ></textarea>
</form> </form>
@ -233,14 +233,14 @@
<div class="row g-1 py-2"> <div class="row g-1 py-2">
<div class="col-12"> <div class="col-12">
<div class="btns float-start"> <div class="btns float-start">
<button type="button" id="btnRemove--${pageName}" <button type="button" id="btnRemove--${pageName}"
class="btn btn-primary area-answerbody area-nonlevy" class="btn btn-primary area-answerbody area-nonlevy"
title="답변대상 제외">답변대상 제외</button> title="답변대상 제외">답변대상 제외</button>
</div> </div>
<div class="btns float-end"> <div class="btns float-end">
<button type="button" id="btnOpenPreviewPop--${pageName}" <button type="button" id="btnOpenPreviewPop--${pageName}"
class="btn btn-primary" title="미리보기">미리보기</button> class="btn btn-primary" title="미리보기">미리보기</button>
<button type="button" id="btnSaveAnsBody--${pageName}" <button type="button" id="btnSaveAnsBody--${pageName}"
class="btn btn-primary" title="적용">적용</button> class="btn btn-primary" title="적용">적용</button>
</div> </div>
</div> </div>
@ -252,7 +252,6 @@
</span> </span>
</div> </div>
<!-- 매크로 삽입 버튼 영역 --> <!-- 매크로 삽입 버튼 영역 -->
<div class="mt-4 d-flex flex-row justify-content-center align-items-center"> <div class="mt-4 d-flex flex-row justify-content-center align-items-center">
<div class="card ps-3 py-3 w-px-1300"> <div class="card ps-3 py-3 w-px-1300">
@ -260,12 +259,12 @@
<div class="col-12 btns"> <div class="col-12 btns">
<strong>[매크로 문자 삽입]</strong> <strong>[매크로 문자 삽입]</strong>
<label id="macroTarget--${pageName}" for="" hidden></label> <label id="macroTarget--${pageName}" for="" hidden></label>
<button type="button" id="btnInsertMacro1--${pageName}" <button type="button" id="btnInsertMacro1--${pageName}"
class="btn btn-primary" title="일련번호 삽입">일련번호</button> class="btn btn-primary" title="일련번호 삽입">일련번호</button>
<button type="button" id="btnInsertMacro2--${pageName}" <button type="button" id="btnInsertMacro2--${pageName}"
class="btn btn-primary" title="사용자 전화번호 삽입">사용자 전화번호</button> class="btn btn-primary" title="사용자 전화번호 삽입">사용자 전화번호</button>
<button type="button" id="btnInsertMacro3--${pageName}" <button type="button" id="btnInsertMacro3--${pageName}"
class="btn btn-primary" title="사용자 성명 삽입">사용자 성명</button> class="btn btn-primary" title="사용자 성명 삽입">사용자 성명</button>
</div> </div>
</div> </div>
@ -278,12 +277,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
@ -313,13 +309,13 @@ pageObject["${pageName}"] = {};
$(document).ready(function(){ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000
}); });
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
@ -335,7 +331,7 @@ $(document).ready(function(){
dataGetter : obj => obj["nonlevyCaseList"], urls : {}, formats : {}, dataGetter : obj => obj["nonlevyCaseList"], urls : {}, formats : {},
keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "" keymapper : info => info ? info.LEVY_EXCL_RSN_CD : ""
}); });
/************************************************************************** /**************************************************************************
* pageObject.function * pageObject.function
**************************************************************************/ **************************************************************************/
@ -344,23 +340,23 @@ $(document).ready(function(){
$P.ansBodyControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/info.do"); $P.ansBodyControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/info.do");
$P.ansBodyControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/save.do"); $P.ansBodyControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/save.do");
$P.ansBodyControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/remove.do"); $P.ansBodyControl.urls.remove = wctx.url("/"+taskSeCd+"/cvlc/cvlc05/010/remove.do");
$P.fnReset(); $P.fnReset();
} }
$P.fnReset = () => { $P.fnReset = () => {
$('#btnAnsBasicTab--${pageName}').trigger("click"); $('#btnAnsBasicTab--${pageName}').trigger("click");
$P.ansBodyControl.levy.setData([]); $P.ansBodyControl.levy.setData([]);
$P.ansBodyControl.warning.setData([]); $P.ansBodyControl.warning.setData([]);
$P.ansBodyControl.nonlevy.setData([]); $P.ansBodyControl.nonlevy.setData([]);
$P.renderAnsBodyList(0,'levy'); $P.renderAnsBodyList(0,'levy');
$P.renderAnsBodyList(0,'warning'); $P.renderAnsBodyList(0,'warning');
$P.renderAnsBodyList(0,'nonlevy'); $P.renderAnsBodyList(0,'nonlevy');
$("#frmEditAnsBasic--${pageName}").find("input, textarea").val(""); $("#frmEditAnsBasic--${pageName}").find("input, textarea").val("");
$("#frmEditAnsBody--${pageName}").find("input, textarea").val(""); $("#frmEditAnsBody--${pageName}").find("input, textarea").val("");
$P.searchWordsStng(); $P.searchWordsStng();
} }
@ -369,7 +365,7 @@ $(document).ready(function(){
var data = formFields.get(); var data = formFields.get();
return data; return data;
} }
$P.searchWordsStng = () => { $P.searchWordsStng = () => {
var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val();
@ -380,15 +376,15 @@ $(document).ready(function(){
$("#headerCn--${pageName}").val(resp.headerCn); $("#headerCn--${pageName}").val(resp.headerCn);
$("#footerCn--${pageName}").val(resp.footerCn); $("#footerCn--${pageName}").val(resp.footerCn);
$P.ansBodyControl.levy.setData(resp.levyCaseList); $P.ansBodyControl.levy.setData(resp.levyCaseList);
$P.ansBodyControl.warning.setData(resp.warningCaseList); $P.ansBodyControl.warning.setData(resp.warningCaseList);
$P.ansBodyControl.nonlevy.setData(resp.nonlevyCaseList); $P.ansBodyControl.nonlevy.setData(resp.nonlevyCaseList);
$P.renderAnsBodyList(resp.levyCaseList.length,'levy'); $P.renderAnsBodyList(resp.levyCaseList.length,'levy');
$P.renderAnsBodyList(resp.warningCaseList.length,'warning'); $P.renderAnsBodyList(resp.warningCaseList.length,'warning');
$P.renderAnsBodyList(resp.nonlevyCaseList.length,'nonlevy'); $P.renderAnsBodyList(resp.nonlevyCaseList.length,'nonlevy');
if(resp.levyCaseList.length > 0){ if(resp.levyCaseList.length > 0){
var current = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"]; var current = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"];
$P.clickAnsBodyList(current,'levy'); $P.clickAnsBodyList(current,'levy');
@ -404,9 +400,9 @@ $(document).ready(function(){
} }
}); });
} }
$P.renderAnsBodyList = (total, renderDataType) => { $P.renderAnsBodyList = (total, renderDataType) => {
var notFoundId = ""; var notFoundId = "";
var foundId = ""; var foundId = "";
var tbodyId = ""; var tbodyId = "";
@ -425,17 +421,17 @@ $(document).ready(function(){
} else { } else {
return; return;
} }
var ansBodyDS = $P.ansBodyControl[renderDataType].dataset; var ansBodyDS = $P.ansBodyControl[renderDataType].dataset;
var empty = ansBodyDS.empty; var empty = ansBodyDS.empty;
var notFound = [document.getElementById(notFoundId).innerHTML]; var notFound = [document.getElementById(notFoundId).innerHTML];
var found = document.getElementById(foundId).innerHTML; var found = document.getElementById(foundId).innerHTML;
var replacer = () => {}; var replacer = () => {};
if(renderDataType == "levy"){ if(renderDataType == "levy"){
replacer = (str, dataItem) => str replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("VLTN_CASE_ID") + "','levy');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("VLTN_CASE_ID") + "','levy');")
.replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('" + dataItem.getValue("VLTN_CASE_ID") + "','levy');"); .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickAnsBodyList('" + dataItem.getValue("VLTN_CASE_ID") + "','levy');");
} else if(renderDataType == "warning"){ } else if(renderDataType == "warning"){
replacer = (str, dataItem) => str replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','warning');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickAnsBodyList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "','warning');")
@ -449,11 +445,11 @@ $(document).ready(function(){
var trs = empty ? notFound : ansBodyDS.inStrings(found, replacer); var trs = empty ? notFound : ansBodyDS.inStrings(found, replacer);
$("#"+tbodyId).html(trs.join()); $("#"+tbodyId).html(trs.join());
} }
$P.radioClickAnsBodyList = (dataKey, gridType) => { $P.radioClickAnsBodyList = (dataKey, gridType) => {
$P.ansBodyControl[gridType].setCurrent(dataKey); $P.ansBodyControl[gridType].setCurrent(dataKey);
var tbodyId = ""; var tbodyId = "";
if(gridType == "levy"){ if(gridType == "levy"){
tbodyId = "vltnTbody--${pageName}"; tbodyId = "vltnTbody--${pageName}";
@ -474,7 +470,7 @@ $(document).ready(function(){
$P.changeAnsBodyText(); $P.changeAnsBodyText();
} }
} }
$P.clickAnsBodyList = (dataKey, gridType) => { $P.clickAnsBodyList = (dataKey, gridType) => {
var radioName = ""; var radioName = "";
if(gridType == "levy"){ if(gridType == "levy"){
@ -486,9 +482,9 @@ $(document).ready(function(){
} else { } else {
return; return;
} }
$("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").prop("checked",true); $("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").prop("checked",true);
if(gridType == "levy" && $P.currentDisplay == "levyAnsBody"){ if(gridType == "levy" && $P.currentDisplay == "levyAnsBody"){
$("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus(); $("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus();
} else if(gridType == "warning" && $P.currentDisplay == "warningAnsBody"){ } else if(gridType == "warning" && $P.currentDisplay == "warningAnsBody"){
@ -496,15 +492,15 @@ $(document).ready(function(){
} else if(gridType == "nonlevy" && $P.currentDisplay == "nonlevyAnsBody"){ } else if(gridType == "nonlevy" && $P.currentDisplay == "nonlevyAnsBody"){
$("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus(); $("#wrapper--${pageName}").find(":radio[name='"+radioName+"'][value='"+dataKey+"']").focus();
} }
$P.radioClickAnsBodyList(dataKey, gridType); $P.radioClickAnsBodyList(dataKey, gridType);
} }
$P.changeAnsBodyText = () => { $P.changeAnsBodyText = () => {
var curData = null; var curData = null;
var rnsRsnCd = ""; var rnsRsnCd = "";
var dstrbncYn = ""; var dstrbncYn = "";
if($P.currentDisplay == "levyAnsBody"){ if($P.currentDisplay == "levyAnsBody"){
curData = $P.ansBodyControl.levy.getCurrent(); curData = $P.ansBodyControl.levy.getCurrent();
} else if($P.currentDisplay == "warningAnsBody"){ } else if($P.currentDisplay == "warningAnsBody"){
@ -512,7 +508,7 @@ $(document).ready(function(){
} else if($P.currentDisplay == "nonlevyAnsBody"){ } else if($P.currentDisplay == "nonlevyAnsBody"){
curData = $P.ansBodyControl.nonlevy.getCurrent(); curData = $P.ansBodyControl.nonlevy.getCurrent();
} }
if(curData == null){ if(curData == null){
$("#ansRsnCd--${pageName}").val(""); $("#ansRsnCd--${pageName}").val("");
$("#dstrbncYn--${pageName}").val(""); $("#dstrbncYn--${pageName}").val("");
@ -520,7 +516,7 @@ $(document).ready(function(){
$("#prcsRsltCn--${pageName}").val(""); $("#prcsRsltCn--${pageName}").val("");
return; return;
} }
if($P.currentDisplay == "levyAnsBody"){ if($P.currentDisplay == "levyAnsBody"){
if(curData["VLTN_CASE_ID"].endsWith("D")){ if(curData["VLTN_CASE_ID"].endsWith("D")){
rnsRsnCd = "3" + curData["VLTN_CASE_ID"].substring(0,2); rnsRsnCd = "3" + curData["VLTN_CASE_ID"].substring(0,2);
@ -533,7 +529,7 @@ $(document).ready(function(){
rnsRsnCd = curData["LEVY_EXCL_RSN_CD"] rnsRsnCd = curData["LEVY_EXCL_RSN_CD"]
} else if($P.currentDisplay == "nonlevyAnsBody"){ } else if($P.currentDisplay == "nonlevyAnsBody"){
rnsRsnCd = curData["LEVY_EXCL_RSN_CD"] rnsRsnCd = curData["LEVY_EXCL_RSN_CD"]
if(curData["ANS_WORDS_ID"] == null){ if(curData["ANS_WORDS_ID"] == null){
$("#btnRemove--${pageName}").prop("disabled",true); $("#btnRemove--${pageName}").prop("disabled",true);
} else { } else {
@ -546,30 +542,30 @@ $(document).ready(function(){
$("#ansWordsId--${pageName}").val(curData["ANS_WORDS_ID"]); $("#ansWordsId--${pageName}").val(curData["ANS_WORDS_ID"]);
$("#prcsRsltCn--${pageName}").val(curData["PRCS_RSLT_CN"]); $("#prcsRsltCn--${pageName}").val(curData["PRCS_RSLT_CN"]);
} }
$P.refreshAnsWordsInfo = () => { $P.refreshAnsWordsInfo = () => {
var cursor1 = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"]; var cursor1 = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"];
var cursor2 = $P.ansBodyControl.warning.getCurrent()["LEVY_EXCL_RSN_CD"]; var cursor2 = $P.ansBodyControl.warning.getCurrent()["LEVY_EXCL_RSN_CD"];
var cursor3 = $P.ansBodyControl.nonlevy.getCurrent()["LEVY_EXCL_RSN_CD"]; var cursor3 = $P.ansBodyControl.nonlevy.getCurrent()["LEVY_EXCL_RSN_CD"];
var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val();
ajax.get({ ajax.get({
url : $P.ansBodyControl.urls.load, url : $P.ansBodyControl.urls.load,
data : {"taskSeCd" : taskSeCd}, data : {"taskSeCd" : taskSeCd},
success : (resp) => { success : (resp) => {
$("#headerCn--${pageName}").val(resp.headerCn); $("#headerCn--${pageName}").val(resp.headerCn);
$("#footerCn--${pageName}").val(resp.footerCn); $("#footerCn--${pageName}").val(resp.footerCn);
$P.ansBodyControl.levy.setData(resp.levyCaseList); $P.ansBodyControl.levy.setData(resp.levyCaseList);
$P.ansBodyControl.warning.setData(resp.warningCaseList); $P.ansBodyControl.warning.setData(resp.warningCaseList);
$P.ansBodyControl.nonlevy.setData(resp.nonlevyCaseList); $P.ansBodyControl.nonlevy.setData(resp.nonlevyCaseList);
$P.renderAnsBodyList(resp.levyCaseList.length,'levy'); $P.renderAnsBodyList(resp.levyCaseList.length,'levy');
$P.renderAnsBodyList(resp.warningCaseList.length,'warning'); $P.renderAnsBodyList(resp.warningCaseList.length,'warning');
$P.renderAnsBodyList(resp.nonlevyCaseList.length,'nonlevy'); $P.renderAnsBodyList(resp.nonlevyCaseList.length,'nonlevy');
if(resp.levyCaseList.length > 0){ if(resp.levyCaseList.length > 0){
$P.ansBodyControl.levy.setCurrent(cursor1); $P.ansBodyControl.levy.setCurrent(cursor1);
var current = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"]; var current = $P.ansBodyControl.levy.getCurrent()["VLTN_CASE_ID"];
@ -591,19 +587,19 @@ $(document).ready(function(){
//적용 //적용
$P.fnSave = (isBasicWords) => { $P.fnSave = (isBasicWords) => {
var formId = ""; var formId = "";
var confirmMessage = ""; var confirmMessage = "";
if(isBasicWords){ if(isBasicWords){
confirmMessage = "머리말/꼬리말 내용을 저장하시겠습니까?"; confirmMessage = "머리말/꼬리말 내용을 저장하시겠습니까?";
formId = "frmEditAnsBasic--${pageName}"; formId = "frmEditAnsBasic--${pageName}";
} else { } else {
confirmMessage = "본문내용을 저장하시겠습니까?" confirmMessage = "본문내용을 저장하시겠습니까?"
formId = "frmEditAnsBody--${pageName}"; formId = "frmEditAnsBody--${pageName}";
} }
if(!customValidate($("#"+formId).find("input, select, textarea"))) return; if(!customValidate($("#"+formId).find("input, select, textarea"))) return;
var info = (new FimsFormFields("#"+formId)).get(); var info = (new FimsFormFields("#"+formId)).get();
if(isBasicWords){ if(isBasicWords){
@ -617,13 +613,13 @@ $(document).ready(function(){
content : confirmMessage, content : confirmMessage,
init : function() { focusOK(); }, init : function() { focusOK(); },
onOK: () => { onOK: () => {
ajax.get({ ajax.get({
url : $P.ansBodyControl.urls.update, url : $P.ansBodyControl.urls.update,
data : info, data : info,
success : (resp) => { success : (resp) => {
if(resp.saved){ if(resp.saved){
$P.toast.show(); $P.toast.show();
sleep(1000).then(() => $P.refreshAnsWordsInfo()); sleep(1000).then(() => $P.refreshAnsWordsInfo());
} }
} }
@ -631,13 +627,13 @@ $(document).ready(function(){
} }
}); });
} }
//답변대상 제외 //답변대상 제외
$P.fnRemove = () => { $P.fnRemove = () => {
if(!customValidate($("#frmEditAnsBody--${pageName}").find("input, select, textarea"))) return; if(!customValidate($("#frmEditAnsBody--${pageName}").find("input, select, textarea"))) return;
var info = (new FimsFormFields("#frmEditAnsBody--${pageName}")).get(); var info = (new FimsFormFields("#frmEditAnsBody--${pageName}")).get();
dialog.alert({ dialog.alert({
content : "해당 미부과사유를 답변대상에서 제외하시겠습니까?", content : "해당 미부과사유를 답변대상에서 제외하시겠습니까?",
init : function() { focusOK(); }, init : function() { focusOK(); },
@ -655,10 +651,10 @@ $(document).ready(function(){
} }
}); });
} }
//미리보기 팝업 호출 //미리보기 팝업 호출
$P.fnOpenPreviewPop = () => { $P.fnOpenPreviewPop = () => {
var result = fnMacroWordsReplace( var result = fnMacroWordsReplace(
$("#headerCn--${pageName}").val(), $("#headerCn--${pageName}").val(),
$("#footerCn--${pageName}").val(), $("#footerCn--${pageName}").val(),
@ -666,7 +662,7 @@ $(document).ready(function(){
"${currentUserTelno}", "${currentUserTelno}",
"${currentUserName}" "${currentUserName}"
); );
dialog.open({ dialog.open({
id : "previewDialog--${pageName}", id : "previewDialog--${pageName}",
title : "답변 내용 미리보기", title : "답변 내용 미리보기",
@ -682,23 +678,23 @@ $(document).ready(function(){
} }
/************************************************************************** /**************************************************************************
* element.on * element.on
**************************************************************************/ **************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
//탭 버튼 //탭 버튼
$('#btnAnsBasicTab--${pageName}').on('click', (event) => { $('#btnAnsBasicTab--${pageName}').on('click', (event) => {
$("#wrapper--${pageName}").find(".area-answerbasic").show(); $("#wrapper--${pageName}").find(".area-answerbasic").show();
$("#wrapper--${pageName}").find(".area-answerbody").hide(); $("#wrapper--${pageName}").find(".area-answerbody").hide();
$P.currentDisplay = "ansBasic"; $P.currentDisplay = "ansBasic";
$("#macroTarget--${pageName}").attr("for",""); $("#macroTarget--${pageName}").attr("for","");
}); });
$('#btnLevyAnsBodyTab--${pageName}').on('click', (event) => { $('#btnLevyAnsBodyTab--${pageName}').on('click', (event) => {
$("#wrapper--${pageName}").find(".area-answerbasic").hide(); $("#wrapper--${pageName}").find(".area-answerbasic").hide();
$("#wrapper--${pageName}").find(".area-answerbody").each(function(){ $("#wrapper--${pageName}").find(".area-answerbody").each(function(){
if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-levy")){ if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-levy")){
@ -707,17 +703,17 @@ $(document).ready(function(){
$(this).hide(); $(this).hide();
} }
}); });
$P.currentDisplay = "levyAnsBody"; $P.currentDisplay = "levyAnsBody";
$("#wrapper--${pageName}").find(":radio[name='levyRadio']:checked").focus(); $("#wrapper--${pageName}").find(":radio[name='levyRadio']:checked").focus();
$P.changeAnsBodyText(); $P.changeAnsBodyText();
$("#macroTarget--${pageName}").attr("for",""); $("#macroTarget--${pageName}").attr("for","");
}); });
$('#btnWarningAnsBodyTab--${pageName}').on('click', (event) => { $('#btnWarningAnsBodyTab--${pageName}').on('click', (event) => {
$("#wrapper--${pageName}").find(".area-answerbasic").hide(); $("#wrapper--${pageName}").find(".area-answerbasic").hide();
$("#wrapper--${pageName}").find(".area-answerbody").each(function(){ $("#wrapper--${pageName}").find(".area-answerbody").each(function(){
if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-warning")){ if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-warning")){
@ -726,17 +722,17 @@ $(document).ready(function(){
$(this).hide(); $(this).hide();
} }
}); });
$P.currentDisplay = "warningAnsBody"; $P.currentDisplay = "warningAnsBody";
$("#wrapper--${pageName}").find(":radio[name='warningRadio']:checked").focus(); $("#wrapper--${pageName}").find(":radio[name='warningRadio']:checked").focus();
$P.changeAnsBodyText(); $P.changeAnsBodyText();
$("#macroTarget--${pageName}").attr("for",""); $("#macroTarget--${pageName}").attr("for","");
}); });
$('#btnNonlevyAnsBodyTab--${pageName}').on('click', (event) => { $('#btnNonlevyAnsBodyTab--${pageName}').on('click', (event) => {
$("#wrapper--${pageName}").find(".area-answerbasic").hide(); $("#wrapper--${pageName}").find(".area-answerbasic").hide();
$("#wrapper--${pageName}").find(".area-answerbody").each(function(){ $("#wrapper--${pageName}").find(".area-answerbody").each(function(){
if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-nonlevy")){ if($(this).hasClass("area-answerbody-common") || $(this).hasClass("area-nonlevy")){
@ -745,26 +741,26 @@ $(document).ready(function(){
$(this).hide(); $(this).hide();
} }
}); });
$P.currentDisplay = "nonlevyAnsBody"; $P.currentDisplay = "nonlevyAnsBody";
$("#wrapper--${pageName}").find(":radio[name='nonlevyRadio']:checked").focus(); $("#wrapper--${pageName}").find(":radio[name='nonlevyRadio']:checked").focus();
$P.changeAnsBodyText(); $P.changeAnsBodyText();
$("#macroTarget--${pageName}").attr("for",""); $("#macroTarget--${pageName}").attr("for","");
}); });
//업무처리 버튼 //업무처리 버튼
$("#btnSaveAnsBasic--${pageName}").on("click", () => $P.fnSave(true)); $("#btnSaveAnsBasic--${pageName}").on("click", () => $P.fnSave(true));
$("#btnSaveAnsBody--${pageName}").on("click", () => $P.fnSave(false)); $("#btnSaveAnsBody--${pageName}").on("click", () => $P.fnSave(false));
$("#btnRemove--${pageName}").on("click", () => $P.fnRemove()); $("#btnRemove--${pageName}").on("click", () => $P.fnRemove());
$("#btnOpenPreviewPop--${pageName}").on("click", () => $P.fnOpenPreviewPop()); $("#btnOpenPreviewPop--${pageName}").on("click", () => $P.fnOpenPreviewPop());
$("#headerCn--${pageName},#footerCn--${pageName},#prcsRsltCn--${pageName}").on("focus", (event) => { $("#headerCn--${pageName},#footerCn--${pageName},#prcsRsltCn--${pageName}").on("focus", (event) => {
$("#macroTarget--${pageName}").attr("for", event.target.id); $("#macroTarget--${pageName}").attr("for", event.target.id);
}); });
$("#btnInsertMacro1--${pageName}").on("click", () => { $("#btnInsertMacro1--${pageName}").on("click", () => {
var macroTarget = $("#macroTarget--${pageName}").attr("for"); var macroTarget = $("#macroTarget--${pageName}").attr("for");
if(macroTarget == ""){ return; } if(macroTarget == ""){ return; }
@ -786,7 +782,7 @@ $(document).ready(function(){
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue); $P.fnResetAndChangeBiz(defaultBizValue);
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true"); $(this).prop("disabled", "true");
}); });

@ -9,7 +9,7 @@
<div class="container-search"> <div class="container-search">
<div class="row g-1"> <div class="row g-1">
<div class="col-12"> <div class="col-12">
<span class="form-label fw-bold form-search-title">업무구분</span> <span class="form-label fw-bold form-search-title w-px-120 text-end">업무구분</span>
<span class="form-search-linebox"> <span class="form-search-linebox">
<c:forEach items="${TaskListForSgg}" var="item"> <c:forEach items="${TaskListForSgg}" var="item">
<label> <label>
@ -24,15 +24,15 @@
</div> </div>
</div> </div>
</form> </form>
<div class="container-page-btn mt-3"> <div class="container-page-btn mt-3">
<button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화"> <button type="button" id="btnReset--${pageName}" class="btn btn-outline-dark w-px-120" title="초기화">
초기화 초기화
</button> </button>
</div> </div>
<div class="h-px-500 mt-4"> <div class="h-px-500 mt-4">
<div class="d-flex flex-row justify-content-center h-100"> <div class="d-flex flex-row justify-content-center h-100">
<div class="card p-4 d-flex flex-row w-px-1300"> <div class="card p-4 d-flex flex-row w-px-1300">
<!-- 그리드 영역 --> <!-- 그리드 영역 -->
@ -59,7 +59,7 @@
</template> </template>
<template id="warningWordsNotFound--${pageName}"> <template id="warningWordsNotFound--${pageName}">
<tr> <tr>
<td valign="top" colspan="2" <td valign="top" colspan="2"
class="dataTables_empty text-center">정보를 찾지 못했습니다.</td> class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
@ -85,7 +85,7 @@
class="w-px-130 bg-lighter pe-2 col-form-label text-sm-center" hidden> class="w-px-130 bg-lighter pe-2 col-form-label text-sm-center" hidden>
내용 내용
</label> </label>
<textarea id="mailCn--${pageName}" name="mailCn" class="form-control w-100" <textarea id="mailCn--${pageName}" name="mailCn" class="form-control w-100"
required rows="15" required rows="15"
></textarea> ></textarea>
</form> </form>
@ -94,7 +94,7 @@
<div class="row g-1 py-2"> <div class="row g-1 py-2">
<div class="col-12"> <div class="col-12">
<div class="btns float-end"> <div class="btns float-end">
<button type="button" id="btnSave--${pageName}" <button type="button" id="btnSave--${pageName}"
class="btn btn-primary" title="적용">적용</button> class="btn btn-primary" title="적용">적용</button>
</div> </div>
</div> </div>
@ -104,7 +104,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="toast-container position-fixed bottom-0 end-0 p-3"> <div class="toast-container position-fixed bottom-0 end-0 p-3">
<div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true"> <div id="divToast--${pageName}" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white"> <div class="toast-body bg-black text-white">
@ -112,14 +112,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="content-backdrop fade"></div> <div class="content-backdrop fade"></div>
</div> </div>
@ -132,23 +127,23 @@ pageObject["${pageName}"] = {};
$(document).ready(function(){ $(document).ready(function(){
var $P = pageObject["${pageName}"]; var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), { $P.toast = new bootstrap.Toast(document.getElementById('divToast--${pageName}'), {
animation: true, animation: true,
autohide: true, autohide: true,
delay: 2000 delay: 2000
}); });
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
**************************************************************************/ **************************************************************************/
$P.warningWordsControl = new DatasetControl({ $P.warningWordsControl = new DatasetControl({
dataGetter : obj => obj["List"], dataGetter : obj => obj["List"],
keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "", keymapper : info => info ? info.LEVY_EXCL_RSN_CD : "",
urls : {}, urls : {},
formats : {} formats : {}
}); });
/************************************************************************** /**************************************************************************
* pageObject.function * pageObject.function
**************************************************************************/ **************************************************************************/
@ -156,12 +151,12 @@ $(document).ready(function(){
$P.warningWordsControl.urls = {}; $P.warningWordsControl.urls = {};
$P.warningWordsControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/list.do"); $P.warningWordsControl.urls.load = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/list.do");
$P.warningWordsControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/save.do"); $P.warningWordsControl.urls.update = wctx.url("/"+taskSeCd+"/cvlc/cvlc06/010/save.do");
$P.fnReset(); $P.fnReset();
} }
$P.fnReset = () => { $P.fnReset = () => {
$P.warningWordsControl.dataset.setData([]); $P.warningWordsControl.dataset.setData([]);
$P.renderWarningWordsList(0); $P.renderWarningWordsList(0);
$("#frmEditWarningWords--${pageName}").find("input, textarea").val(""); $("#frmEditWarningWords--${pageName}").find("input, textarea").val("");
@ -174,7 +169,7 @@ $(document).ready(function(){
var data = formFields.get(); var data = formFields.get();
return data; return data;
} }
$P.searchWordsStng = () => { $P.searchWordsStng = () => {
var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val();
@ -194,14 +189,14 @@ $(document).ready(function(){
} }
}); });
} }
$P.renderWarningWordsList = (total) => { $P.renderWarningWordsList = (total) => {
var warningWordsDS = $P.warningWordsControl.dataset; var warningWordsDS = $P.warningWordsControl.dataset;
var empty = warningWordsDS.empty; var empty = warningWordsDS.empty;
var notFound = [document.getElementById("warningWordsNotFound--${pageName}").innerHTML]; var notFound = [document.getElementById("warningWordsNotFound--${pageName}").innerHTML];
var found = document.getElementById("warningWordsRow--${pageName}").innerHTML; var found = document.getElementById("warningWordsRow--${pageName}").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');")
.replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');"); .replace(/{onchange}/gi, "pageObject['${pageName}'].radioClickWarningWordsList('" + dataItem.getValue("LEVY_EXCL_RSN_CD") + "');");
@ -209,29 +204,29 @@ $(document).ready(function(){
var trs = empty ? notFound : warningWordsDS.inStrings(found, replacer); var trs = empty ? notFound : warningWordsDS.inStrings(found, replacer);
$("#warningWordsTbody--${pageName}").html(trs.join()); $("#warningWordsTbody--${pageName}").html(trs.join());
} }
$P.radioClickWarningWordsList = (dataKey, gridType) => { $P.radioClickWarningWordsList = (dataKey, gridType) => {
$P.warningWordsControl.dataset.setCurrent(dataKey); $P.warningWordsControl.dataset.setCurrent(dataKey);
$("#warningWordsTbody--${pageName}").setCurrentRow(dataKey); $("#warningWordsTbody--${pageName}").setCurrentRow(dataKey);
$P.changeTextarea(); $P.changeTextarea();
} }
$P.clickWarningWordsList = (dataKey, gridType) => { $P.clickWarningWordsList = (dataKey, gridType) => {
$("#wrapper--${pageName}").find(":radio[name='gridRadio'][value='"+dataKey+"']").prop("checked",true); $("#wrapper--${pageName}").find(":radio[name='gridRadio'][value='"+dataKey+"']").prop("checked",true);
$("#wrapper--${pageName}").find(":radio[name='gridRadio'][value='"+dataKey+"']").focus(); $("#wrapper--${pageName}").find(":radio[name='gridRadio'][value='"+dataKey+"']").focus();
$P.radioClickWarningWordsList(dataKey, gridType); $P.radioClickWarningWordsList(dataKey, gridType);
} }
$P.changeTextarea = () => { $P.changeTextarea = () => {
var curData = $P.warningWordsControl.dataset.getCurrent(); var curData = $P.warningWordsControl.dataset.getCurrent();
if(curData == null){ if(curData == null){
$("#ansRsnCd--${pageName}").val(""); $("#ansRsnCd--${pageName}").val("");
$("#ansWordsId--${pageName}").val(""); $("#ansWordsId--${pageName}").val("");
@ -239,15 +234,15 @@ $(document).ready(function(){
$("#mailCn--${pageName}").val(""); $("#mailCn--${pageName}").val("");
return; return;
} }
$("#ansRsnCd--${pageName}").val(curData["LEVY_EXCL_RSN_CD"]); $("#ansRsnCd--${pageName}").val(curData["LEVY_EXCL_RSN_CD"]);
$("#ansWordsId--${pageName}").val(curData["ANS_WORDS_ID"]); $("#ansWordsId--${pageName}").val(curData["ANS_WORDS_ID"]);
$("#mailTtlNm--${pageName}").val(curData["MAIL_TTL_NM"]); $("#mailTtlNm--${pageName}").val(curData["MAIL_TTL_NM"]);
$("#mailCn--${pageName}").val(curData["MAIL_CN"]); $("#mailCn--${pageName}").val(curData["MAIL_CN"]);
} }
$P.refreshWarningWordsInfo = () => { $P.refreshWarningWordsInfo = () => {
var cursor = $P.warningWordsControl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"]; var cursor = $P.warningWordsControl.dataset.getCurrent()["LEVY_EXCL_RSN_CD"];
var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); var taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val();
@ -256,7 +251,7 @@ $(document).ready(function(){
url : $P.warningWordsControl.urls.load, url : $P.warningWordsControl.urls.load,
data : {"taskSeCd" : taskSeCd}, data : {"taskSeCd" : taskSeCd},
success : (resp) => { success : (resp) => {
$P.warningWordsControl.dataset.setData(resp.List); $P.warningWordsControl.dataset.setData(resp.List);
$P.renderWarningWordsList(resp.List.length); $P.renderWarningWordsList(resp.List.length);
if(resp.List.length > 0){ if(resp.List.length > 0){
@ -271,26 +266,26 @@ $(document).ready(function(){
//적용 //적용
$P.fnSave = () => { $P.fnSave = () => {
if(!customValidate($("#frmEditWarningWords--${pageName}").find("input, select, textarea"))) return; if(!customValidate($("#frmEditWarningWords--${pageName}").find("input, select, textarea"))) return;
var info = (new FimsFormFields("#frmEditWarningWords--${pageName}")).get(); var info = (new FimsFormFields("#frmEditWarningWords--${pageName}")).get();
info.taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val(); info.taskSeCd = $("#frmSearch--${pageName}").find("input[name='taskSeCd']:checked").val();
dialog.alert({ dialog.alert({
content : "저장하시겠습니까?", content : "저장하시겠습니까?",
init : function() { init : function() {
focusOK(); focusOK();
}, },
onOK: () => { onOK: () => {
ajax.get({ ajax.get({
url : $P.warningWordsControl.urls.update, url : $P.warningWordsControl.urls.update,
data : info, data : info,
success : (resp) => { success : (resp) => {
if(resp.saved){ if(resp.saved){
$P.toast.show(); $P.toast.show();
sleep(1000).then(() => $P.refreshWarningWordsInfo()); sleep(1000).then(() => $P.refreshWarningWordsInfo());
} }
} }
@ -300,12 +295,12 @@ $(document).ready(function(){
} }
/************************************************************************** /**************************************************************************
* element.on * element.on
**************************************************************************/ **************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset()); $('#btnReset--${pageName}').on('click', () => $P.fnReset());
//업무처리 버튼 //업무처리 버튼
$("#btnSave--${pageName}").on("click", () => $P.fnSave()); $("#btnSave--${pageName}").on("click", () => $P.fnSave());
/************************************************************************** /**************************************************************************
* 초기화 * 초기화
@ -313,7 +308,7 @@ $(document).ready(function(){
var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val(); var defaultBizValue = $("#layout-navbar input[name='taskSeCd']:checked").val();
$("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true); $("#frmSearch--${pageName} input[name='taskSeCd'][value='" + defaultBizValue + "']").prop("checked",true);
$P.fnResetAndChangeBiz(defaultBizValue); $P.fnResetAndChangeBiz(defaultBizValue);
$("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) { $("#frmSearch--${pageName} input[name='taskSeCd']").each(function(i) {
$(this).prop("disabled", "true"); $(this).prop("disabled", "true");
}); });

Loading…
Cancel
Save