민원답변대상자료 동적 조회 추가

main
이범준 1 year ago
parent 3fef97ee5b
commit 24df4d5e2d

@ -231,7 +231,30 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
AND C.CRDN_REG_SE_CD = '02'
AND CC.CVLCPT_PRCS_CD IN ('02','03','04')
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
<include refid="dynamicSearch.start" />
<choose>
<when test="by == 'crdnRegSeCd'">C.CRDN_REG_SE_CD</when>
<when test="by == 'cvlcptAplcntNm'">CC.CVLCPT_APLCNT_NM</when>
<when test="by == 'cvlcptPrcsPicNm'">CC.CVLCPT_PRCS_PIC_NM</when>
<when test="by == 'cvlcptPrcsPicTelno'">CC.CVLCPT_PRCS_PIC_TELNO</when>
<when test="by == 'cvlcptRcptYmd'">CC.CVLCPT_RCPT_YMD</when>
<when test="by == 'cvlcptPrcsPrnmntDt'">CC.CVLCPT_PRCS_PRNMNT_DT</when>
<when test="by == 'crdnYmd'">C.CRDN_YMD</when>
<when test="by == 'cvlcptRcptNo'">CC.CVLCPT_RCPT_NO</when>
<when test="by == 'vhrno'">C.VHRNO</when>
<when test="by == 'levyExclRsnCd'">LE.LEVY_EXCL_RSN_CD</when>
<when test="by == 'etcCn'">C.ETC_CN</when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
<otherwise>
<if test="by == 'vltnArtcl'">
AND (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) LIKE CONCAT('%', #{term}, '%')
</if>
</otherwise>
</choose>
</if>
<if test="schCvlcptRcptYmdFrom != null or schCvlcptRcptYmdTo != null">
<if test="schCvlcptRcptYmdFrom != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ >= ]]> #{schCvlcptRcptYmdFrom} </if>

@ -408,7 +408,7 @@ $(document).ready(function(){
return (index+1) + " of " + ds.length;
};
}
if(reqKey == "getNextKey"){
else if(reqKey == "getNextKey"){
parentRes[reqKey] = function(currentKey){
var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
@ -419,7 +419,7 @@ $(document).ready(function(){
}
};
}
if(reqKey == "getPrevKey"){
else if(reqKey == "getPrevKey"){
parentRes[reqKey] = function(currentKey){
var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
@ -430,11 +430,14 @@ $(document).ready(function(){
}
};
}
if(reqKey == "selectRow"){
else if(reqKey == "selectRow"){
parentRes[reqKey] = function(currentKey){
$P.clickCrdnList(currentKey);
};
}
else {
parentRes[reqKey] = function(){}
}
}
pageObject.parentRes.push(parentRes);

@ -56,6 +56,8 @@
<div class="col-6">
<input type="hidden" id="by--${pageName}" name="by" />
<input type="text" id="byOutput--${pageName}" class="form-control" readonly value="동적 검색" />
<input type="hidden" id="mainOption--${pageName}" name="mainOption" />
<input type="hidden" id="subOption--${pageName}" name="subOption" />
<input type="text" id="term--${pageName}" name="term" class="form-control" />
</div>
</div>
@ -70,7 +72,7 @@
</ul>
</div>
<span class="container-window-btn-right">
<a href="#" id="" class="btn btn-blue" title="민원원본보기">민원원본보기</a>
<a href="#" id="btnOpenCvlcptOrgnl--${pageName}" class="btn btn-blue" title="민원원본보기">민원원본보기</a>
<a href="#" id="" class="btn btn-blue" title="답변미리보기">답변미리보기</a>
<a href="#" id="" class="btn btn-blue" title="선택자료답변등록실행">선택자료답변등록실행</a>
<a href="#" id="" class="btn btn-blue" title="답변완료로 수정">답변완료로 수정</a>
@ -85,20 +87,33 @@
<table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead id="crdnThead--${pageName}">
<tr>
<tr data-by="by--${pageName}" data-by-output="byOutput--${pageName}"
data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
<th style="min-width: 80px;">No.</th>
<th style="min-width: 80px;">등록구분</th>
<th style="min-width: 80px;">위반내용</th>
<th style="min-width: 80px;">신고자</th>
<th style="min-width: 80px;">담당자</th>
<th style="min-width: 80px;">담당자전화번호</th>
<th style="min-width: 80px;">접수일자</th>
<th style="min-width: 80px;">처리기한</th>
<th style="min-width: 80px;">위반일자</th>
<th style="min-width: 80px;">접수번호</th>
<th style="min-width: 80px;">차량번호</th>
<th style="min-width: 80px;">서손/계도사유</th>
<th style="min-width: 80px;">특기사항</th>
<th onclick="searchFromGridTitle('CRDN_REG_SE_CD',this.innerText,'codeValue','FIM026');"
style="min-width: 80px;">등록구분</th>
<th onclick="searchFromGridTitle('VLTN_ARTCL',this.innerText);"
style="min-width: 80px;">위반내용</th>
<th onclick="searchFromGridTitle('CVLCPT_APLCNT_NM',this.innerText,'match','part');"
style="min-width: 80px;">신고자</th>
<th onclick="searchFromGridTitle('CVLCPT_PRCS_PIC_NM',this.innerText,'match','part');"
style="min-width: 80px;">담당자</th>
<th onclick="searchFromGridTitle('CVLCPT_PRCS_PIC_TELNO',this.innerText,'match','part');"
style="min-width: 80px;">담당자전화번호</th>
<th onclick="searchFromGridTitle('CVLCPT_RCPT_YMD',this.innerText,'ymd','');"
style="min-width: 80px;">접수일자</th>
<th onclick="searchFromGridTitle('CVLCPT_PRCS_PRNMNT_DT',this.innerText,'ymd','');"
style="min-width: 80px;">처리기한</th>
<th onclick="searchFromGridTitle('CRDN_YMD','위반일자','ymd','');"
style="min-width: 80px;">위반일시</th>
<th onclick="searchFromGridTitle('CVLCPT_RCPT_NO',this.innerText,'match','part');"
style="min-width: 80px;">접수번호</th>
<th onclick="searchFromGridTitle('VHRNO',this.innerText,'match','part');"
style="min-width: 80px;">차량번호</th>
<th onclick="searchFromGridTitle('LEVY_EXCL_RSN_CD',this.innerText,'codeValue','FIM022');"
style="min-width: 80px;">서손/계도사유</th>
<th onclick="searchFromGridTitle('ETC_CN',this.innerText,'match','part');"
style="min-width: 80px;">특기사항</th>
</tr>
</thead>
<tbody id="crdnTbody--${pageName}"></tbody>
@ -274,12 +289,80 @@ $(document).ready(function(){
return data;
}
$P.fnOpenCvlcptOrgnl = () => {
var cur = $P.crdnControl.getCurrent();
if(cur == null){
return;
}
var taskSeCd = $("#frmSearch--${pageName} input[name='taskSeCd']:checked").val();
var dialogId = "cvlcptOrgnlDialog--${pageName}";
ajax.get({
url : wctx.url("/"+taskSeCd+"/crdn/crdn01/050/info.do"),
data : { crdnId : cur["CRDN_ID"] },
success : resp => {
dialog.open({
id : dialogId,
title : "민원내역 원본",
content : resp,
size : "xl",
init : () => {
var parentRes = new Object();
var childReq = pageObject.childReq.pop();
for(var reqKey in childReq) {
if(reqKey == "getCountStatus"){
parentRes[reqKey] = function(currentKey){
var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
return (index+1) + " of " + ds.length;
};
}
else if(reqKey == "getNextKey"){
parentRes[reqKey] = function(currentKey){
var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
if(ds.length > index+1){
return ds[index+1]["CRDN_ID"];
} else {
return "";
}
};
}
else if(reqKey == "getPrevKey"){
parentRes[reqKey] = function(currentKey){
var ds = $P.crdnControl.dataset.getDataset();
var index = ds.findIndex(item => item.CRDN_ID == currentKey);
if(index != 0 && ds.length > 1){
return ds[index-1]["CRDN_ID"];
} else {
return "";
}
};
}
else if(reqKey == "selectRow"){
parentRes[reqKey] = function(currentKey){
$P.clickCrdnList(currentKey);
};
}
else {
parentRes[reqKey] = function(){}
}
}
pageObject.parentRes.push(parentRes);
}
});
}
});
}
/**************************************************************************
* element.on
**************************************************************************/
$('#btnReset--${pageName}').on('click', () => $P.fnReset());
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl());
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
/**************************************************************************

Loading…
Cancel
Save