동적 조회 함수 수정

main
이범준 1 year ago
parent d5d78d9964
commit 717fa2550f

@ -57,16 +57,16 @@
<table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer" >
<thead>
<tr id="crdnTheadTr--${pageName}">
<tr id="crdnTheadTr--${pageName}" data-by="by--${pageName}" data-by-output="byOutput--${pageName}">
<th width="80">No.</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_INPT_SE_CD',this.innerText);">자료출처</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_YMD','위반일자');">위반일시</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','VHRNO',this.innerText);">차량번호</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_STDG_NM',this.innerText);">법정동</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','APLCNT_CRDN_NM',this.innerText);">신고/단속자</th>
<th width="80" onclick="searchFromGridTitle('CRDN_INPT_SE_CD',this.innerText);">자료출처</th>
<th width="80" onclick="searchFromGridTitle('CRDN_YMD','위반일자');">위반일시</th>
<th width="80" onclick="searchFromGridTitle('VHRNO',this.innerText);">차량번호</th>
<th width="80" onclick="searchFromGridTitle('CRDN_STDG_NM',this.innerText);">법정동</th>
<th width="80" onclick="searchFromGridTitle('APLCNT_CRDN_NM',this.innerText);">신고/단속자</th>
<th width="80" class="text-orange">잔액</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','ATCH_FILE_CNT',this.innerText);">사진건수</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_SN',this.innerText);">발행번호</th>
<th width="80" onclick="searchFromGridTitle('ATCH_FILE_CNT',this.innerText);">사진건수</th>
<th width="80" onclick="searchFromGridTitle('CRDN_SN',this.innerText);">발행번호</th>
</tr>
</thead>
<tbody id="crdnTbody--${pageName}">

@ -70,16 +70,16 @@
<table id="DataTables_Table_0--${pageName}"
class="datatables-ajax table table-bordered dataTable no-footer">
<thead>
<tr id="crdnTheadTr--${pageName}">
<tr id="crdnTheadTr--${pageName}" data-by="by--${pageName}" data-by-output="byOutput--${pageName}">
<th width="80">No.</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDUCT_YMD',this.innerText);">감액일자</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDUCT_RSN_CD',this.innerText);">감액사유</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_YMD','위반일자');">접수(위반)일시</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','VHRNO',this.innerText);">차량번호</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDUCT_AMT',this.innerText);">감액금액</th>
<th width="80" onclick="searchFromGridTitle('RDUCT_YMD',this.innerText);">감액일자</th>
<th width="80" onclick="searchFromGridTitle('RDUCT_RSN_CD',this.innerText);">감액사유</th>
<th width="80" onclick="searchFromGridTitle('CRDN_YMD','위반일자');">접수(위반)일시</th>
<th width="80" onclick="searchFromGridTitle('VHRNO',this.innerText);">차량번호</th>
<th width="80" onclick="searchFromGridTitle('RDUCT_AMT',this.innerText);">감액금액</th>
<th width="80" class="text-orange">잔액</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','RDUCT_ETC_CN',this.innerText);">감액특기사항</th>
<th width="80" onclick="searchFromGridTitle('by--${pageName}','byOutput--${pageName}','CRDN_STTS_CD',this.innerText);">처리상태</th>
<th width="80" onclick="searchFromGridTitle('RDUCT_ETC_CN',this.innerText);">감액특기사항</th>
<th width="80" onclick="searchFromGridTitle('CRDN_STTS_CD',this.innerText);">처리상태</th>
</tr>
</thead>
<tbody id="crdnTbody--${pageName}"></tbody>

@ -1,13 +1,12 @@
function searchFromGridTitle(byElement, byOutputElement, byValue, byOutputValue, advancedOptionIndex){
function searchFromGridTitle(byValue, byOutputValue){
var trDataset = event.target.parentElement.dataset;
if(advancedOptionIndex > 0){
document.getElementById(byElement).value = "advancedOption" + advancedOptionIndex;
} else {
document.getElementById(byElement).value = snakeToCamel(byValue);
}
var byElementId = trDataset.by;
var byOutputElementId = trDataset.byOutput;
document.getElementById(byOutputElement).value = byOutputValue + " 검색";
document.getElementById(byElementId).value = snakeToCamel(byValue);
document.getElementById(byOutputElementId).value = byOutputValue + " 검색";
}

Loading…
Cancel
Save