|
|
|
@ -1,108 +1,132 @@
|
|
|
|
|
<%@ 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>
|
|
|
|
|
<c:set var="prefixName" scope="request">폐기 보고 확인</c:set>
|
|
|
|
|
<!-- Page Body -->
|
|
|
|
|
<div class="container-page-btn">
|
|
|
|
|
<button type="button" class="btn btn-outline-dark w-px-120" id="btnReset--excl01010" title="초기화">
|
|
|
|
|
초기화
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="container-search">
|
|
|
|
|
<div class="row g-1">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<span class="form-label fw-bold form-search-title text-end">
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분" value="DPV" onchange="pageObject['levy01010'].fnResetAndChangeBiz(this.value);" disabled="">
|
|
|
|
|
취급일자
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<label>
|
|
|
|
|
<input type="radio" class="form-check-input" name="taskSeCd" alt="업무구분" value="BPV" onchange="pageObject['levy01010'].fnResetAndChangeBiz(this.value);" disabled="">
|
|
|
|
|
보고일자
|
|
|
|
|
</label>
|
|
|
|
|
<span class="form-search-linebox">
|
|
|
|
|
<input type="text" class="form-control form-date" id="schCrdnYmdFrom--${pageName}" name="schCrdnYmdFrom" data-fmt-type="day" title="시작 날짜 선택" maxlength="10">
|
|
|
|
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
|
|
|
|
~
|
|
|
|
|
<input type="text" class="form-control form-date" id="schCrdnYmdTo--${pageName}" name="schCrdnYmdTo" data-fmt-type="day" title="종료 날짜 선택" maxlength="10">
|
|
|
|
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 차량번호 -->
|
|
|
|
|
<div class="col-5">
|
|
|
|
|
<label class="form-label fw-bold form-search-title text-end" for="schVltnCd--levy01010">처리상태</label>
|
|
|
|
|
<select class="form-select" id="schVltnCd--levy01010" name="schVltnCd"><option value="">전체</option><option value="01">폐기 신청서 접수</option><option value="03">폐기보고 맵핑</option><option value="05">종료</option></select>
|
|
|
|
|
</div>
|
|
|
|
|
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">
|
|
|
|
|
검색
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<button type="button" class="btn btn-outline-dark w-px-120" id="btnReset--${pageName}" title="초기화">
|
|
|
|
|
초기화
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 검색 조건 영역 -->
|
|
|
|
|
<form id="frmSearch--${pageName}" name="frmSearch">
|
|
|
|
|
<div class="container-search">
|
|
|
|
|
<div class="row g-1">
|
|
|
|
|
<div class="col-5">
|
|
|
|
|
<label class="form-label fw-bold form-search-title text-end" for="schSggCd--${pageName}">관할관청</label>
|
|
|
|
|
<select class="form-select" id="schSttsCd--${pageName}" name="schSttsCd">
|
|
|
|
|
<option value="">전체</option>
|
|
|
|
|
<option value="01">수지구</option>
|
|
|
|
|
<option value="03">기흥구</option>
|
|
|
|
|
<option value="05">처인구</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-5">
|
|
|
|
|
<label class="form-label fw-bold form-search-title text-end"">취급일자</label>
|
|
|
|
|
<span class="form-search-linebox">
|
|
|
|
|
<input type="text" class="form-control form-date" id="schDateFrom--${pageName}" name="schDateFrom" data-fmt-type="day" autocomplete="off" title="시작 날짜 선택" />
|
|
|
|
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
|
|
|
|
~
|
|
|
|
|
<input type="text" class="form-control form-date" id="schDateTo--${pageName}" name="schDateTo" data-fmt-type="day" autocomplete="off" title="종료 날짜 선택" />
|
|
|
|
|
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 업체명 -->
|
|
|
|
|
<div class="col-5">
|
|
|
|
|
<label class="form-label fw-bold form-search-title text-end" for="schVhrno--${pageName}">업체명</label>
|
|
|
|
|
<input type="text" class="form-control w-px-160" id="schBsshNM--${pageName}" name="schBsshNm" autocomplete="off" readonly/>
|
|
|
|
|
<input type="hidden" id="schBsshCd--${pageName}" name="schBsshCd" autocomplete="off" />
|
|
|
|
|
<button type="button" class="btn btn-search w-px-120" id="btnBsshSearch--${pageName}" title="업체 검색">
|
|
|
|
|
업체 검색
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 처리상태 -->
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<label class="form-label fw-bold form-search-title text-end" for="schSttsCd--${pageName}">처리상태</label>
|
|
|
|
|
<select class="form-select" id="schSttsCd--${pageName}" name="schSttsCd">
|
|
|
|
|
<option value="">전체</option>
|
|
|
|
|
<option value="01">폐기 신청서 접수</option>
|
|
|
|
|
<option value="03">폐기보고 맵핑</option>
|
|
|
|
|
<option value="05">종료</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-1">
|
|
|
|
|
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">
|
|
|
|
|
검색
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
<!-- 업무 버튼 및 건수 표시 -->
|
|
|
|
|
<div class="d-flex flex-row justify-content-between p-3">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="input-group" id="DataTables_Table_0_length">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<button type="button" class="btn btn-search w-px-120" id="btnSearch--excl01010" title="검색">폐기 결과 통보서 출력</button>
|
|
|
|
|
<button type="button" class="btn btn-search w-px-120" id="btnSearch--excl01010" title="등록">폐기 결과 보고서 출력</button>
|
|
|
|
|
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--excl01010" title="엑셀">
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseMGT--${pageName}" title="폐기 결과 통보서 출력">
|
|
|
|
|
폐기 결과 통보서 출력
|
|
|
|
|
</button>
|
|
|
|
|
<button type="button" class="btn btn-primary w-px-120" id="btnCreateDsuseMGT--${pageName}" title="폐기 결과 보고서 출력">
|
|
|
|
|
폐기 결과 보고서 출력
|
|
|
|
|
</button>
|
|
|
|
|
<button type="button" class="btn btn-excel w-px-120" id="btnExcel--${pageName}" title="엑셀">
|
|
|
|
|
엑셀
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
<table class="datatables-ajax table table-bordered dataTable no-footer" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr><th style="width: 15.828px;text-align:center;" tabindex="0">No</th>
|
|
|
|
|
<th class="cmn" style="width: 56px;"><input type="checkbox" class="form-check-input" id="gridAllCheckbox--levy01010" onchange="pageObject['levy01010'].control.select(this.checked);"></th>
|
|
|
|
|
<th class="sorting sorting_asc" aria-sort="ascending" style="width: 100px;">식별번호</th>
|
|
|
|
|
<th class="sorting" style="width: 400px;">보고업체명</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">보고일자</th>
|
|
|
|
|
<th class="sorting" style="width: 160.141px;">취급일자</th>
|
|
|
|
|
|
|
|
|
|
<th class="sorting" style="width: 180px;">폐기종류</th><th class="sorting" style="width: 230.469px;">폐기방법</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">보고라인수</th>
|
|
|
|
|
<th class="sorting" style="width: 180px;">처리자</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">처리일자</th>
|
|
|
|
|
<th class="sorting" style="width: 230.469px;">처리상태</th>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="dsuseDocList">
|
|
|
|
|
<tr data-key="0000000001" class="">
|
|
|
|
|
<td style="text-align:center;">1</td>
|
|
|
|
|
<td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="20244623020230001049" onchange="pageObject['levy01010'].control.select('20244623020230001049', this.checked);"></td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">2024050000</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">수지미래산부인과의원</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">20240401</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">20240401</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">보건소폐기</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">중화</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">1</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">api-user</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">2024-05-01 09:11:08</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">폐기신청서접수</td>
|
|
|
|
|
</tr><tr data-key="0000000000" class="current-row">
|
|
|
|
|
<td style="text-align:center;">2</td>
|
|
|
|
|
<td class="cmn text-center"><input type="checkbox" class="form-check-input" name="gridCheckbox" value="20244623020230001049" onchange="pageObject['levy01010'].control.select('20244623020230001049', this.checked);"></td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">2024050001</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">수지미래산부인과의원</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">20240401</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">20240401</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">보건소폐기</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">소각</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">3</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">api-user</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">2024-05-08 09:11:08</td>
|
|
|
|
|
<td ondblclick="authorityControl.authorities.newInfo();">폐기보고매핑</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- DataTables(그리드) -->
|
|
|
|
|
<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 id="theadTr--${pageName}"
|
|
|
|
|
data-by="by--${pageName}" data-by-output="byOutput--${pageName}" data-main-option="mainOption--${pageName}" data-sub-option="subOption--${pageName}">
|
|
|
|
|
<th class="cmn" style="width: 72px;">No.</th>
|
|
|
|
|
<th class="cmn" style="width: 160.141px;">취급일자</th>
|
|
|
|
|
<th class="cmn" style="width: 160.141px;">관리번호</th>
|
|
|
|
|
<th class="cmn" style="width: 230.469px;">업체명</th>
|
|
|
|
|
<th class="cmn" style="width: 100px;">보고건수</th>
|
|
|
|
|
<th class="cmn" style="width: 230.469px;">처리상태</th>
|
|
|
|
|
<th class="cmn" style="width: 180px;">폐기구분</th>
|
|
|
|
|
<th class="cmn" style="width: 230.469px;">폐기사유</th>
|
|
|
|
|
<th class="cmn" style="width: 180px;">폐기방법</th>
|
|
|
|
|
<th class="cmn" style="width: 230.469px;">폐기장소</th>
|
|
|
|
|
<th class="cmn" style="width: 230.469px;">폐기일자</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody id="tbody--${pageName}">
|
|
|
|
|
</tbody>
|
|
|
|
|
<template id="${infoPrefix}Row--${pageName}">
|
|
|
|
|
<tr data-key="USR_RPT_ID_NO">
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{HDR_DE}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSCDMNG_ID}</td>
|
|
|
|
|
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{BSSH_NM}</td>
|
|
|
|
|
<td class="cmn text-end" onclick="{onclick}" ondblclick="{ondblclick}">{RND_DTL_RPT_CNT}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{PRGRS_STTS_NM}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_SE_NM}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_PRV_NM}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_MTH_NM}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_LOC}</td>
|
|
|
|
|
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{DSUSE_DE}</td>
|
|
|
|
|
<%-- <td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{USR_RPT_ID_NO}</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>
|
|
|
|
|
<!-- / DataTables(그리드) -->
|
|
|
|
|
|
|
|
|
|
<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;">
|
|
|
|
@ -110,9 +134,337 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
<!--/ Page Body -->
|
|
|
|
|
<script >
|
|
|
|
|
var authorityControl = new AuthorityControl();
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* Global Variable
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
pageObject["${pageName}"] = {};
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* script 진입
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
// pageObject
|
|
|
|
|
let $P = pageObject["${pageName}"];
|
|
|
|
|
|
|
|
|
|
// FormFields
|
|
|
|
|
$P.formFields = new FimsFormFields("#frmSearch--${pageName}");
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$P.control = new DatasetControl({
|
|
|
|
|
urls : {
|
|
|
|
|
load : wctx.url("/adds/nims/dsuseMgtRslt-list.do")
|
|
|
|
|
// FIXME: POST로 변경
|
|
|
|
|
//load : '<c:url value="${apiHost}/api/biz/nims/v1/getDsuseMgts" />'
|
|
|
|
|
}
|
|
|
|
|
, prefix: "dsuseMgtMapping"
|
|
|
|
|
, prefixName: "폐기 보고 확인"
|
|
|
|
|
, keymapper: info => info ? info.USR_RPT_ID_NO : ""
|
|
|
|
|
, dataGetter: obj => obj.${infoPrefix}List
|
|
|
|
|
, appendData: true
|
|
|
|
|
, infoSize: "xl"
|
|
|
|
|
, formats: {
|
|
|
|
|
RPT_DE: dateFormat
|
|
|
|
|
, HDR_DE: dateFormat
|
|
|
|
|
, DSUSE_DE: dateFormat
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
// $P.control 설정
|
|
|
|
|
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
|
|
|
|
|
$P.control.untilPageNum = 0; // 현재 페이지 번호
|
|
|
|
|
$P.control.beforeCurrent = null;
|
|
|
|
|
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 완료 여부
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
|
/* $P.control.onDatasetChange = (obj) => {
|
|
|
|
|
$P.renderList(obj.${infoPrefix}Total);
|
|
|
|
|
|
|
|
|
|
$("#paging--${pageName}").setPaging({
|
|
|
|
|
list: $P.control.dataset
|
|
|
|
|
, prefix: "paging--${pageName}"
|
|
|
|
|
, start: obj.${infoPrefix}Start
|
|
|
|
|
, totalSize: obj.${infoPrefix}Total
|
|
|
|
|
, fetchSize: obj.${infoPrefix}Fetch
|
|
|
|
|
, func: "pageObject['${pageName}'].control.load({index})"
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$P.control.tableRenderComplete = true; // dataTables 에 자료 추가 완료
|
|
|
|
|
};*/
|
|
|
|
|
|
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
|
$P.control.onCurrentChange = (item) => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
let key = item.data.LEVY_EXCL_ID;
|
|
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 신청서 정보 dialog
|
|
|
|
|
$P.control.getInfo = (gdccId) => {
|
|
|
|
|
let dialogTitle = "신청서 정보 등록";
|
|
|
|
|
let params = {};
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/adds/nims/dsuseMgtReceipt-info.do")
|
|
|
|
|
, data : params || {}
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : $P.control.prefixed("Dialog")
|
|
|
|
|
, title : dialogTitle
|
|
|
|
|
, content : resp
|
|
|
|
|
, size : $P.control.infoSize
|
|
|
|
|
, onClose : () => { $P.refreshList(); }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DataTables 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// DataTables에 click, dbclick 이벤트
|
|
|
|
|
$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("LEVY_EXCL_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');");
|
|
|
|
|
|
|
|
|
|
let trs = empty ? [document.getElementById("${infoPrefix}NotFound--${pageName}").content.outerHTML]
|
|
|
|
|
: ${infoPrefix}List.inStrings(foundTr.outerHTML, replacer);
|
|
|
|
|
|
|
|
|
|
let noMore = (totalSize == ${infoPrefix}List.length);
|
|
|
|
|
let initScroll = ($P.control.query.pageNum < 2) && ($P.control.untilPageNum == 0);
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
|
|
|
|
|
|
|
|
|
|
if ($P.control.untilPageNum != 0) {
|
|
|
|
|
$P.control.query.fetchSize = $P.control.defaultFetchSize;
|
|
|
|
|
$P.control.query.pageNum = $P.control.untilPageNum;
|
|
|
|
|
$P.control.untilPageNum = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
|
|
|
|
|
$P.scrollDataList = () => {
|
|
|
|
|
$P.control.tableRenderComplete = false; // dataTables 에 자료 추가 false
|
|
|
|
|
|
|
|
|
|
$P.control.load($P.control.query.pageNum + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DataTables에 더블 클릭시 개별총정보 dialog
|
|
|
|
|
$P.getTotalInfo = (crdnId) => {
|
|
|
|
|
if (typeof crdnId == "undefined" || crdnId == null || crdnId == "") return;
|
|
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
callControlName: "pageObject['${pageName}'].control"
|
|
|
|
|
, sggCd: $P.control.dataset.getValue("SGG_CD")
|
|
|
|
|
, taskSeCd: $P.control.dataset.getValue("TASK_SE_CD")
|
|
|
|
|
, crdnId: crdnId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/adds/nims/dsuseMgtReceipt-info.do")
|
|
|
|
|
, data: params
|
|
|
|
|
, success: resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id: "dsuseMgtReceiptinfoDialog"
|
|
|
|
|
, title: "신청서 정보 상세"
|
|
|
|
|
, content: resp
|
|
|
|
|
, size: "xl"
|
|
|
|
|
, init: () => { }
|
|
|
|
|
, onClose: () => { }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$P.control.getBsshInfo = (gdccId) => {
|
|
|
|
|
let dialogTitle = "마약류 취급자 조회";
|
|
|
|
|
let params = {};
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/adds/nims/bssh-main.do")
|
|
|
|
|
, data : params || {}
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : $P.control.prefixed("Dialog")
|
|
|
|
|
, title : dialogTitle
|
|
|
|
|
, content : resp
|
|
|
|
|
, size : $P.control.infoSize
|
|
|
|
|
, onClose : () => { $P.control.setData(); }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 사용자 함수(function)
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 검색 자료 재조회
|
|
|
|
|
$P.fnRefreshList = () => {
|
|
|
|
|
$P.control.untilPageNum = $P.control.query.pageNum;
|
|
|
|
|
$P.control.query.fetchSize = $P.control.defaultFetchSize * $P.control.query.pageNum;
|
|
|
|
|
|
|
|
|
|
$P.control.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 사용자검색 callback
|
|
|
|
|
$P.callbackFindUser = (userId, userNm) => {
|
|
|
|
|
$("#schRgtrCd--${pageName}").val(userId); // 사용자 ID
|
|
|
|
|
$("#schRgtrNm--${pageName}").val(userNm); // 사용자 명
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 전자우편 안내문 등록 버튼 이벤트
|
|
|
|
|
$P.fnCreateEpostGdcc = (title) => {
|
|
|
|
|
$P.control.getInfo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 전자우편 안내문 등록 버튼 이벤트
|
|
|
|
|
$P.fnSearchBssh = (title) => {
|
|
|
|
|
$P.control.getBsshInfo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 버튼 clickEvent
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 업무 구분 변경 이벤트
|
|
|
|
|
$P.fnResetAndChangeBiz = (taskSeCd) => {
|
|
|
|
|
// 업무 구분 코드
|
|
|
|
|
if (typeof taskSeCd == "undefined" || taskSeCd == null || taskSeCd == "") {
|
|
|
|
|
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 기본 설정
|
|
|
|
|
$P.initForm(taskSeCd);
|
|
|
|
|
|
|
|
|
|
// dataset 초기화
|
|
|
|
|
$P.control.dataset.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 검색 버튼 클릭 이벤트
|
|
|
|
|
$P.fnSearchList = () => {
|
|
|
|
|
// 검색조건
|
|
|
|
|
$P.control.query = $P.formFields.get(); // 검색 조건
|
|
|
|
|
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
|
|
|
|
|
$P.control.query.delYn = "N"; // 삭제 여부
|
|
|
|
|
|
|
|
|
|
$P.control.load(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 엑셀 버튼 클릭 이벤트
|
|
|
|
|
$P.fnExcel = () => {
|
|
|
|
|
if ($P.control.dataset.empty) {
|
|
|
|
|
dialog.alert({
|
|
|
|
|
content: "검색된 자료가 없습니다."
|
|
|
|
|
, onOK: () => { }
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DataTables(그리드)
|
|
|
|
|
let cellDefs = getCellDefs($("#theadTr--${pageName} th").not(".dummy-th").not(":eq(0)")
|
|
|
|
|
, $($("#${infoPrefix}Row--${pageName}")[0].content).find("td").not(".dummy-td").not(":eq(0)"));
|
|
|
|
|
$P.control.query.cellDefs = cellDefs;
|
|
|
|
|
|
|
|
|
|
$P.control.download();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기 설정
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 이벤트 설정
|
|
|
|
|
$P.setEvent = () => {
|
|
|
|
|
// 기본 버튼 이벤트
|
|
|
|
|
$("#btnReset--${pageName}").on("click", () => $P.fnResetAndChangeBiz()); // 초기화
|
|
|
|
|
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList()); // 검색
|
|
|
|
|
$("#btnExcel--${pageName}").on("click", () => $P.fnExcel()); // 엑셀
|
|
|
|
|
|
|
|
|
|
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
|
|
|
|
|
$("#term--${pageName}").keypress(function(e) {
|
|
|
|
|
if (e.keyCode == 13) {
|
|
|
|
|
$P.fnSearchList();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 안내문 등록 버튼 이벤트
|
|
|
|
|
$("#btnCreateDsuseMGT--${pageName}").on("click", function() {
|
|
|
|
|
$P.fnCreateEpostGdcc($(this).attr("title"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
|
|
|
|
$("#frmSearch--${pageName}").find(".form-date").each(function() {
|
|
|
|
|
$(this).on("input", function() {
|
|
|
|
|
let value = this.value.replaceAll("-", "");
|
|
|
|
|
|
|
|
|
|
if (value.length > 7) {
|
|
|
|
|
this.value = value.substring(0, 4) + "-" + value.substring(4, 6) + "-" + value.substring(6);
|
|
|
|
|
} else if (value.length > 5) {
|
|
|
|
|
this.value = value.substring(0, 4) + "-" + value.substring(4);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 안내문 등록 버튼 이벤트
|
|
|
|
|
$("#btnBsshSearch--${pageName}").on("click", function() {
|
|
|
|
|
$P.fnSearchBssh($(this).attr("title"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// DataTables width 변경 조정 (업무별 그리드가 존재 한다면.. crdn06010-main.jsp 참고)
|
|
|
|
|
fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
|
|
|
|
|
|
|
|
|
|
// DataTables 스크롤 이벤트 생성
|
|
|
|
|
fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 초기 화면 설정
|
|
|
|
|
$P.initForm = (taskSeCd) => {
|
|
|
|
|
// 화면 초기화
|
|
|
|
|
$("#frmSearch--${pageName}")[0].reset();
|
|
|
|
|
|
|
|
|
|
// input, select 초기화
|
|
|
|
|
let searchForm = $("#frmSearch--${pageName}");
|
|
|
|
|
searchForm.find("input[type='checkbox']").prop("checked", false);
|
|
|
|
|
searchForm.find("input[type='text']").val("");
|
|
|
|
|
searchForm.find("input[type='hidden']").val("");
|
|
|
|
|
searchForm.find("select").each(function() { $(this).find("option:eq(0)").prop("selected", true); });
|
|
|
|
|
|
|
|
|
|
// 기본 데이터 설정
|
|
|
|
|
initDatepicker("frmSearch--${pageName}"); // 달력 초기화
|
|
|
|
|
$("#schDateFrom--${pageName}").datepicker("setDate", DateUtil.getDateDay(-7).date); // 부과 제외 일자 시작
|
|
|
|
|
$("#schDateTo--${pageName}").datepicker("setDate", new Date()); // 부과 제외 일자 종료
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 최초 실행 함수
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 1. 이벤트 설정
|
|
|
|
|
$P.setEvent();
|
|
|
|
|
|
|
|
|
|
// 2. 초기 설정 및 업무 구분 변경
|
|
|
|
|
$P.fnResetAndChangeBiz($("#layout-navbar input[name='taskSeCd']:checked").val());
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
</script>
|
|
|
|
|