fix: 폐기보고 통계 상세 목록 추가
parent
327e2aa536
commit
180f57bba7
@ -0,0 +1,145 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||||
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||||
|
|
||||||
|
<c:set var="prefixName" scope="request">취급별 폐기 현황 상세</c:set>
|
||||||
|
|
||||||
|
<div class="card-datatable text-nowrap">
|
||||||
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
|
||||||
|
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
|
||||||
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
|
||||||
|
<thead class="sticky-thead">
|
||||||
|
<tr>
|
||||||
|
<th class="cmn" style="width: 72px;">No.</th>
|
||||||
|
<th class="cmn" style="width: 130.141px;">폐기관리번호</th>
|
||||||
|
<th class="cmn" style="width: 120.469px;">폐기일자</th>
|
||||||
|
<th class="cmn" style="width: 120px;">폐기방법</th>
|
||||||
|
<th class="cmn" style="width: 200.469px;">업체명</th>
|
||||||
|
<th class="cmn" style="width: 150.469px;">제품코드</th>
|
||||||
|
<th class="cmn" style="width: 300px;">제품명</th>
|
||||||
|
<%-- <th class="cmn" style="width: 90px;">폐기건수</th>--%>
|
||||||
|
<th class="cmn" style="width: 90px;">폐기수량</th>
|
||||||
|
<th class="cmn" style="width: 130px;">업종명</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tbody--${pageName}">
|
||||||
|
</tbody>
|
||||||
|
<template id="${infoPrefix}Row--${pageName}">
|
||||||
|
<tr data-key="{ROW_NUM}">
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_cd}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_nm}</td>
|
||||||
|
<%-- <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td>--%>
|
||||||
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_qy}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{induty_nm}</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
<template id="${infoPrefix}NotFound--${pageName}">
|
||||||
|
<tr class="odd">
|
||||||
|
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**************************************************************************
|
||||||
|
* Global Variable
|
||||||
|
**************************************************************************/
|
||||||
|
pageObject["${pageName}"] = {};
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* script 진입
|
||||||
|
**************************************************************************/
|
||||||
|
$(document).ready(function() {
|
||||||
|
// pageObject
|
||||||
|
let $P = pageObject["${pageName}"];
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl
|
||||||
|
**************************************************************************/
|
||||||
|
$P.control = new DatasetControl({
|
||||||
|
prefix: "dsuseQyByBsshStatistics"
|
||||||
|
, prefixName: "취급자별 폐기 현황 상세"
|
||||||
|
, keymapper: info => info ? info.ROW_NUM : ""
|
||||||
|
, dataGetter : obj => obj
|
||||||
|
, appendData: true
|
||||||
|
, infoSize: "xl"
|
||||||
|
, formats: {
|
||||||
|
dsuse_de: dateFormat
|
||||||
|
, dsuse_qy: numberFormat
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// $P.control 설정
|
||||||
|
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
||||||
|
|
||||||
|
$P.control.beforeCurrent = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl 이벤트
|
||||||
|
**************************************************************************/
|
||||||
|
// Dataset 변경 이벤트
|
||||||
|
|
||||||
|
$P.control.onDatasetChange = (obj) => {
|
||||||
|
$P.renderList(obj.${infoPrefix}Total);
|
||||||
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
||||||
|
list: $P.control.dataset
|
||||||
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
||||||
|
, start: obj.${infoPrefix}Start
|
||||||
|
, totalSize: $P.control.dataset.length
|
||||||
|
, fetchSize: obj.${infoPrefix}Fetch
|
||||||
|
, func: "pageObject['${pageName}'].control.load({index})"
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// 현재 선택 자료 변경 이벤트
|
||||||
|
$P.control.onCurrentChange = item => {
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
|
let key = item.data.ROW_NUM;
|
||||||
|
$("#tbody--${pageName}").setCurrentRow(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
$P.renderList = (totalSize) => {
|
||||||
|
let ${infoPrefix}List = $P.control.dataset;
|
||||||
|
let empty = ${infoPrefix}List.empty;
|
||||||
|
|
||||||
|
// 업무별 DataTables(그리드) tr, td
|
||||||
|
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content;
|
||||||
|
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
|
||||||
|
let foundTds = $(foundContent).find("td");
|
||||||
|
|
||||||
|
foundTds.each(function() {
|
||||||
|
foundTr.appendChild(this.cloneNode(true));
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
let replacer = (str, dataItem) => str
|
||||||
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("ROW_NUM") + "');")
|
||||||
|
|
||||||
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
||||||
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
||||||
|
|
||||||
|
let noMore = (${infoPrefix}List.length >= totalSize);
|
||||||
|
let initScroll = ($P.control.query.pageNum < 2);
|
||||||
|
|
||||||
|
$("#tbody--${pageName}").html(trs.join());
|
||||||
|
}
|
||||||
|
|
||||||
|
$P.control.setData(${statisticsDtlList});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
@ -0,0 +1,145 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||||
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||||
|
|
||||||
|
<c:set var="prefixName" scope="request">취급 업종별 현황 상세</c:set>
|
||||||
|
|
||||||
|
<div class="card-datatable text-nowrap">
|
||||||
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
|
||||||
|
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
|
||||||
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
|
||||||
|
<thead class="sticky-thead">
|
||||||
|
<tr>
|
||||||
|
<th class="cmn" style="width: 72px;">No.</th>
|
||||||
|
<th class="cmn" style="width: 130.141px;">폐기관리번호</th>
|
||||||
|
<th class="cmn" style="width: 120.469px;">폐기일자</th>
|
||||||
|
<th class="cmn" style="width: 120px;">폐기방법</th>
|
||||||
|
<th class="cmn" style="width: 200.469px;">업체명</th>
|
||||||
|
<th class="cmn" style="width: 150.469px;">제품코드</th>
|
||||||
|
<th class="cmn" style="width: 300px;">제품명</th>
|
||||||
|
<%-- <th class="cmn" style="width: 90px;">폐기건수</th>--%>
|
||||||
|
<th class="cmn" style="width: 90px;">폐기수량</th>
|
||||||
|
<th class="cmn" style="width: 130px;">업종명</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tbody--${pageName}">
|
||||||
|
</tbody>
|
||||||
|
<template id="${infoPrefix}Row--${pageName}">
|
||||||
|
<tr data-key="{ROW_NUM}">
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_cd}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_nm}</td>
|
||||||
|
<%-- <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td>--%>
|
||||||
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_qy}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{induty_nm}</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
<template id="${infoPrefix}NotFound--${pageName}">
|
||||||
|
<tr class="odd">
|
||||||
|
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**************************************************************************
|
||||||
|
* Global Variable
|
||||||
|
**************************************************************************/
|
||||||
|
pageObject["${pageName}"] = {};
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* script 진입
|
||||||
|
**************************************************************************/
|
||||||
|
$(document).ready(function() {
|
||||||
|
// pageObject
|
||||||
|
let $P = pageObject["${pageName}"];
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl
|
||||||
|
**************************************************************************/
|
||||||
|
$P.control = new DatasetControl({
|
||||||
|
prefix: "dsuseQyByIndutyStatistics"
|
||||||
|
, prefixName: "취급 업종별 폐기 현황 상세"
|
||||||
|
, keymapper: info => info ? info.ROW_NUM : ""
|
||||||
|
, dataGetter : obj => obj
|
||||||
|
, appendData: true
|
||||||
|
, infoSize: "xl"
|
||||||
|
, formats: {
|
||||||
|
dsuse_de: dateFormat
|
||||||
|
, dsuse_qy: numberFormat
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// $P.control 설정
|
||||||
|
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
||||||
|
|
||||||
|
$P.control.beforeCurrent = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl 이벤트
|
||||||
|
**************************************************************************/
|
||||||
|
// Dataset 변경 이벤트
|
||||||
|
|
||||||
|
$P.control.onDatasetChange = (obj) => {
|
||||||
|
$P.renderList(obj.${infoPrefix}Total);
|
||||||
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
||||||
|
list: $P.control.dataset
|
||||||
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
||||||
|
, start: obj.${infoPrefix}Start
|
||||||
|
, totalSize: $P.control.dataset.length
|
||||||
|
, fetchSize: obj.${infoPrefix}Fetch
|
||||||
|
, func: "pageObject['${pageName}'].control.load({index})"
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// 현재 선택 자료 변경 이벤트
|
||||||
|
$P.control.onCurrentChange = item => {
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
|
let key = item.data.ROW_NUM;
|
||||||
|
$("#tbody--${pageName}").setCurrentRow(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
$P.renderList = (totalSize) => {
|
||||||
|
let ${infoPrefix}List = $P.control.dataset;
|
||||||
|
let empty = ${infoPrefix}List.empty;
|
||||||
|
|
||||||
|
// 업무별 DataTables(그리드) tr, td
|
||||||
|
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content;
|
||||||
|
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
|
||||||
|
let foundTds = $(foundContent).find("td");
|
||||||
|
|
||||||
|
foundTds.each(function() {
|
||||||
|
foundTr.appendChild(this.cloneNode(true));
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
let replacer = (str, dataItem) => str
|
||||||
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("ROW_NUM") + "');");
|
||||||
|
|
||||||
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
||||||
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
||||||
|
|
||||||
|
let noMore = (${infoPrefix}List.length >= totalSize);
|
||||||
|
let initScroll = ($P.control.query.pageNum < 2);
|
||||||
|
|
||||||
|
$("#tbody--${pageName}").html(trs.join());
|
||||||
|
}
|
||||||
|
|
||||||
|
$P.control.setData(${statisticsDtlList});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
@ -0,0 +1,146 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||||
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||||
|
|
||||||
|
<c:set var="prefixName" scope="request">제품별 폐기 현황 상세</c:set>
|
||||||
|
|
||||||
|
<div class="card-datatable text-nowrap">
|
||||||
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
|
||||||
|
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
|
||||||
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
|
||||||
|
<thead class="sticky-thead">
|
||||||
|
<tr>
|
||||||
|
<th class="cmn" style="width: 72px;">No.</th>
|
||||||
|
<th class="cmn" style="width: 130.141px;">폐기관리번호</th>
|
||||||
|
<th class="cmn" style="width: 120.469px;">폐기일자</th>
|
||||||
|
<th class="cmn" style="width: 120px;">폐기방법</th>
|
||||||
|
<th class="cmn" style="width: 200.469px;">업체명</th>
|
||||||
|
<th class="cmn" style="width: 150.469px;">제품코드</th>
|
||||||
|
<th class="cmn" style="width: 300px;">제품명</th>
|
||||||
|
<%-- <th class="cmn" style="width: 90px;">폐기건수</th>--%>
|
||||||
|
<th class="cmn" style="width: 90px;">폐기수량</th>
|
||||||
|
<th class="cmn" style="width: 130px;">진행상태</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tbody--${pageName}">
|
||||||
|
</tbody>
|
||||||
|
<template id="${infoPrefix}Row--${pageName}">
|
||||||
|
<tr data-key="{ROW_NUM}">
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_cd}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_nm}</td>
|
||||||
|
<%-- <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td>--%>
|
||||||
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_qy}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prgrs_stts_nm}</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
<template id="${infoPrefix}NotFound--${pageName}">
|
||||||
|
<tr class="odd">
|
||||||
|
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**************************************************************************
|
||||||
|
* Global Variable
|
||||||
|
**************************************************************************/
|
||||||
|
pageObject["${pageName}"] = {};
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* script 진입
|
||||||
|
**************************************************************************/
|
||||||
|
$(document).ready(function() {
|
||||||
|
// pageObject
|
||||||
|
let $P = pageObject["${pageName}"];
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl
|
||||||
|
**************************************************************************/
|
||||||
|
$P.control = new DatasetControl({
|
||||||
|
prefix: "dsuseQyByIndutyStatistics"
|
||||||
|
, prefixName: "취급 업종별 폐기 현황 상세"
|
||||||
|
, keymapper: info => info ? info.ROW_NUM : ""
|
||||||
|
, dataGetter : obj => obj
|
||||||
|
, appendData: true
|
||||||
|
, infoSize: "xl"
|
||||||
|
, formats: {
|
||||||
|
dsuse_de: dateFormat
|
||||||
|
, dsuse_qy: numberFormat
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// $P.control 설정
|
||||||
|
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
||||||
|
|
||||||
|
$P.control.beforeCurrent = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl 이벤트
|
||||||
|
**************************************************************************/
|
||||||
|
// Dataset 변경 이벤트
|
||||||
|
|
||||||
|
$P.control.onDatasetChange = (obj) => {
|
||||||
|
$P.renderList(obj.${infoPrefix}Total);
|
||||||
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
||||||
|
list: $P.control.dataset
|
||||||
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
||||||
|
, start: obj.${infoPrefix}Start
|
||||||
|
, totalSize: $P.control.dataset.length
|
||||||
|
, fetchSize: obj.${infoPrefix}Fetch
|
||||||
|
, func: "pageObject['${pageName}'].control.load({index})"
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// 현재 선택 자료 변경 이벤트
|
||||||
|
$P.control.onCurrentChange = item => {
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
|
let key = item.data.ROW_NUM;
|
||||||
|
$("#tbody--${pageName}").setCurrentRow(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
$P.renderList = (totalSize) => {
|
||||||
|
let ${infoPrefix}List = $P.control.dataset;
|
||||||
|
let empty = ${infoPrefix}List.empty;
|
||||||
|
|
||||||
|
// 업무별 DataTables(그리드) tr, td
|
||||||
|
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content;
|
||||||
|
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
|
||||||
|
let foundTds = $(foundContent).find("td");
|
||||||
|
|
||||||
|
foundTds.each(function() {
|
||||||
|
foundTr.appendChild(this.cloneNode(true));
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
let replacer = (str, dataItem) => str
|
||||||
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("ROW_NUM") + "');")
|
||||||
|
|
||||||
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
||||||
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
||||||
|
|
||||||
|
let noMore = (${infoPrefix}List.length >= totalSize);
|
||||||
|
let initScroll = ($P.control.query.pageNum < 2);
|
||||||
|
|
||||||
|
$("#tbody--${pageName}").html(trs.join());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
$P.control.setData(${statisticsDtlList});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
@ -0,0 +1,146 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||||
|
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||||
|
|
||||||
|
<c:set var="prefixName" scope="request">제품 구붑별 현황 상세</c:set>
|
||||||
|
|
||||||
|
<div class="card-datatable text-nowrap">
|
||||||
|
<div class="dataTables_wrapper dt-bootstrap5 no-footer" id="DataTables_Table_0_wrapper--${pageName}">
|
||||||
|
<div class="table-responsive ox-scroll oy-scroll h-px-500" id="table-responsive--${pageName}">
|
||||||
|
<table class="table-layout-fixed dataTable datatables-ajax table table-bordered no-footer" id="DataTables_Table_0--${pageName}" aria-describedby="DataTables_Table_0_info">
|
||||||
|
<thead class="sticky-thead">
|
||||||
|
<tr>
|
||||||
|
<th class="cmn" style="width: 72px;">No.</th>
|
||||||
|
<th class="cmn" style="width: 130.141px;">폐기관리번호</th>
|
||||||
|
<th class="cmn" style="width: 120.469px;">폐기일자</th>
|
||||||
|
<th class="cmn" style="width: 120px;">폐기방법</th>
|
||||||
|
<th class="cmn" style="width: 200.469px;">업체명</th>
|
||||||
|
<th class="cmn" style="width: 150.469px;">제품코드</th>
|
||||||
|
<th class="cmn" style="width: 300px;">제품명</th>
|
||||||
|
<%-- <th class="cmn" style="width: 90px;">폐기건수</th>--%>
|
||||||
|
<th class="cmn" style="width: 90px;">폐기수량</th>
|
||||||
|
<th class="cmn" style="width: 130px;">마약/향정구분</th>
|
||||||
|
<th class="cmn" style="width: 130px;">중점일반구분</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="tbody--${pageName}">
|
||||||
|
</tbody>
|
||||||
|
<template id="${infoPrefix}Row--${pageName}">
|
||||||
|
<tr data-key="{ROW_NUM}">
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dscdmng_id}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_de}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_mth_nm}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{bssh_nm}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_cd}</td>
|
||||||
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{prduct_nm}</td>
|
||||||
|
<%-- <td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{rnd_dtl_rpt_cnt}</td>--%>
|
||||||
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{dsuse_qy}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{nrcd_se_nm}</td>
|
||||||
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{prtm_se_nm}</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
<template id="${infoPrefix}NotFound--${pageName}">
|
||||||
|
<tr class="odd">
|
||||||
|
<td valign="top" colspan="13" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/**************************************************************************
|
||||||
|
* Global Variable
|
||||||
|
**************************************************************************/
|
||||||
|
pageObject["${pageName}"] = {};
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* script 진입
|
||||||
|
**************************************************************************/
|
||||||
|
$(document).ready(function() {
|
||||||
|
// pageObject
|
||||||
|
let $P = pageObject["${pageName}"];
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl
|
||||||
|
**************************************************************************/
|
||||||
|
$P.control = new DatasetControl({
|
||||||
|
prefix: "ncrdAndPrtmStatistics"
|
||||||
|
, prefixName: "제품 구분별 현황 상세"
|
||||||
|
, keymapper: info => info ? info.ROW_NUM : ""
|
||||||
|
, dataGetter : obj => obj
|
||||||
|
, appendData: true
|
||||||
|
, infoSize: "xl"
|
||||||
|
, formats: {
|
||||||
|
dsuse_de: dateFormat
|
||||||
|
, dsuse_qy: numberFormat
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// $P.control 설정
|
||||||
|
$P.control.defaultFetchSize = FETCH_XXS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
||||||
|
|
||||||
|
$P.control.beforeCurrent = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* DatasetControl 이벤트
|
||||||
|
**************************************************************************/
|
||||||
|
// Dataset 변경 이벤트
|
||||||
|
|
||||||
|
$P.control.onDatasetChange = (obj) => {
|
||||||
|
$P.renderList(obj.${infoPrefix}Total);
|
||||||
|
$("#${infoPrefix}Paging--${pageName}").setPagingInfo({
|
||||||
|
list: $P.control.dataset
|
||||||
|
, prefix: "${infoPrefix}Paging--${pageName}"
|
||||||
|
, start: obj.${infoPrefix}Start
|
||||||
|
, totalSize: $P.control.dataset.length
|
||||||
|
, fetchSize: obj.${infoPrefix}Fetch
|
||||||
|
, func: "pageObject['${pageName}'].control.load({index})"
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// 현재 선택 자료 변경 이벤트
|
||||||
|
$P.control.onCurrentChange = item => {
|
||||||
|
if (!item) return;
|
||||||
|
|
||||||
|
let key = item.data.ROW_NUM;
|
||||||
|
$("#tbody--${pageName}").setCurrentRow(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
$P.renderList = (totalSize) => {
|
||||||
|
let ${infoPrefix}List = $P.control.dataset;
|
||||||
|
let empty = ${infoPrefix}List.empty;
|
||||||
|
|
||||||
|
// 업무별 DataTables(그리드) tr, td
|
||||||
|
let foundContent = document.getElementById("${infoPrefix}Row--${pageName}").content;
|
||||||
|
let foundTr = $(foundContent).find("tr")[0].cloneNode(false);
|
||||||
|
let foundTds = $(foundContent).find("td");
|
||||||
|
|
||||||
|
foundTds.each(function() {
|
||||||
|
foundTr.appendChild(this.cloneNode(true));
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
let replacer = (str, dataItem) => str
|
||||||
|
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("ROW_NUM") + "');")
|
||||||
|
|
||||||
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
||||||
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
||||||
|
|
||||||
|
let noMore = (${infoPrefix}List.length >= totalSize);
|
||||||
|
let initScroll = ($P.control.query.pageNum < 2);
|
||||||
|
|
||||||
|
$("#tbody--${pageName}").html(trs.join());
|
||||||
|
}
|
||||||
|
$P.control.setData(${statisticsDtlList});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
Loading…
Reference in New Issue