1. 하단 그리드 행번호 표시

2. 하단 그리드 key값 오류 수정
3. 상단 그리드 건 수 표시
dev
이범준 5 months ago
parent 2a15bfab9c
commit cc76989a18

@ -123,7 +123,13 @@
</div>
</div>
</div>
<br>
<div class="d-flex flex-row p-3 justify-content-between">
<label id="${infoPrefix}Paging--${pageName}PagingInfo" class="dataTables_info" role="status" aria-live="polite"></label>
<ul id="${infoPrefix}Paging--${pageName}" class="pagination pagination-primary" style="display: none;">
</ul>
</div>
<!-- / DataTables(그리드) -->
<div class="card">
<div class="row g-1">
@ -146,7 +152,7 @@
<tbody id="tbody--${pageName}Detail">
</tbody>
<template id="${infoPrefix}Row--${pageName}Detail">
<tr data-key="DSCDMNG_SN">
<tr data-key="{DSCDMNG_SN}">
<td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_NM}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_CD}</td>
@ -168,11 +174,7 @@
</div> <!-- <div class="row g-1"> -->
</div> <!-- <div class="card"> -->
<div class="d-flex flex-row p-3 justify-content-between">
<label id="userPagingInfo" class="dataTables_info" role="status" aria-live="polite">1 ~ 2 / 2</label>
<ul id="userPaging" class="pagination pagination-primary" style="display: none;">
</ul>
</div>
<script>
@ -243,9 +245,9 @@
$P.control.onDatasetChange = (obj) => {
$P.renderList(obj.${infoPrefix}Total);
$("#paging--${pageName}").setPaging({
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
list: $P.control.dataset
, prefix: "paging--${pageName}"
, prefix: "${infoPrefix}Paging--${pageName}"
, start: obj.${infoPrefix}Start
, totalSize: obj.${infoPrefix}Total
, fetchSize: obj.${infoPrefix}Fetch
@ -319,8 +321,7 @@
//
let replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');")
.replace(/{ondblclick}/gi, "");
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("DSCDMNG_ID") + "');");
// .replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("DSCDMNG_ID") + "');");
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]

@ -148,14 +148,14 @@
<tbody id="tbody--${pageName}Detail">
</tbody>
<template id="${infoPrefix}Row--${pageName}Detail">
<tr data-key="DSCDMNG_SN">
<td {onclick}="" {ondblclick}="">{ROW_NUM}</td>
<td {onclick}="" {ondblclick}="">{PRDUCT_NM}</td>
<td class="text-center" {onclick}="" {ondblclick}="">{PRDUCT_CD}</td>
<td class="text-end" {onclick}="" {ondblclick}="">{DSUSE_QY} {PCE_UNIT}</td>
<td class="text-center" {onclick}="" {ondblclick}="">{PRD_VALID_DE}</td>
<td class="text-center" {onclick}="" {ondblclick}="">{MIN_DISTB_QY} {MIN_DISTB_UNIT}</td>
<td class="text-center" {onclick}="" {ondblclick}="">{PCE_QY} {PCE_UNIT}</td>
<tr data-key="{DSCDMNG_SN}">
<td class="row-num text-end" onclick="{onclick}" ondblclick="{ondblclick}"></td>
<td onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_NM}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRDUCT_CD}</td>
<td class="text-end" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_QY} {PCE_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRD_VALID_DE}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{MIN_DISTB_QY} {MIN_DISTB_UNIT}</td>
<td class="text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PCE_QY} {PCE_UNIT}</td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}Detail">
@ -518,6 +518,12 @@
// DataTables 스크롤 이벤트 생성
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
// 하단 테이블 행 번호 표시
fnMakeRowNumberingTable(document.getElementById('tbody--${pageName}Detail')
, (tr)=>{ return $(tr).find("td.row-num")[0]; }
, (marker, value)=>{ if(marker != null){ marker.innerHTML = value; } }
);
}
// 초기 화면 설정

Loading…
Cancel
Save