|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
|
|
|
|
<%@ 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>
|
|
|
|
@ -11,13 +12,16 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
|
|
|
|
|
<div class="content-backdrop fade"></div>
|
|
|
|
|
<div class="content-backdrop fade"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<jsp:include page="/WEB-INF/jsp/fims/sprt/sprt01050-info.jsp" />
|
|
|
|
|
<jsp:include page="/WEB-INF/jsp/fims/sprt/sprt01060-info.jsp" />
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
<script type="module"
|
|
|
|
|
src="<c:url value='/resources/js/fims/sprt/integrationSearch.js?${ver}'/>"></script>
|
|
|
|
|
<script ${module}>
|
|
|
|
|
import { IntegrationSearchControl } from "<c:url value='/resources/js/fims/sprt/integrationSearch.js?${ver}'/>";
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* Global Variable
|
|
|
|
|
**************************************************************************/
|
|
|
|
@ -29,16 +33,15 @@ var FIM054 = new CommonCodes(${FIM054}, true);
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* DatasetControl
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
var integrationSearchControl = new DatasetControl({
|
|
|
|
|
var integrationSearchControl = new IntegrationSearchControl({
|
|
|
|
|
prefix : "integrationSearch", prefixName : "통합조회"
|
|
|
|
|
, infoSize : "lg"
|
|
|
|
|
, appendData : false
|
|
|
|
|
, keymapper : info => info ? info.CRDN_ID : ""
|
|
|
|
|
, dataGetter : obj => obj.integrationDataList
|
|
|
|
|
, urls : {
|
|
|
|
|
load : wctx.url("/sprt/sprt01/010/list.do"), // 검색
|
|
|
|
|
getInfo : wctx.url("/sprt/sprt02/010/main.do") // 개별총정보
|
|
|
|
|
}
|
|
|
|
|
, keymapper : data => data ? data.CRDN_ID : ""
|
|
|
|
|
, dataGetter : obj => Array.isArray(obj) ? obj : []
|
|
|
|
|
, urls : {
|
|
|
|
|
load : wctx.url("/sprt/sprt01/010/list.do") // 검색
|
|
|
|
|
}
|
|
|
|
|
, formats : {
|
|
|
|
|
LEVY_EXCL_YMD : dateFormat
|
|
|
|
|
, CRDN_YMD_TM : datetimeFormat
|
|
|
|
@ -54,129 +57,96 @@ var integrationSearchControl = new DatasetControl({
|
|
|
|
|
* DatasetControl 이벤트
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// Dataset 변경 이벤트
|
|
|
|
|
integrationSearchControl.onDatasetChange = (obj) => {
|
|
|
|
|
|
|
|
|
|
integrationSearchControl.updataset.onDatasetChange = (obj) => {
|
|
|
|
|
var upActiveTab = $("#upGridTabs--${pageName}").find("button.active").text().trim();
|
|
|
|
|
integrationSearch.renderList("up", upActiveTab);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
integrationSearchControl.downdataset.onDatasetChange = (obj) => {
|
|
|
|
|
var downActiveTab = $("#downGridTabs--${pageName}").find("button.active").text().trim();
|
|
|
|
|
integrationSearch.renderList("down", downActiveTab);
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 현재 선택 자료 변경 이벤트
|
|
|
|
|
integrationSearchControl.onCurrentChange = (item) => {
|
|
|
|
|
integrationSearchControl.updataset.onCurrentChange = (item) => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
|
|
|
|
|
var key = item.data.CRDN_ID;
|
|
|
|
|
|
|
|
|
|
$("#upTbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
integrationSearchControl.downdataset.onCurrentChange = (item) => {
|
|
|
|
|
if (!item) return;
|
|
|
|
|
var key = item.data.CRDN_ID;
|
|
|
|
|
$("#downTbody--${pageName}").setCurrentRow(key);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 선택(체크) 변경 이벤트
|
|
|
|
|
integrationSearchControl.onSelectionChange = selected => {
|
|
|
|
|
integrationSearchControl.updataset.onSelectionChange = (selected) => {
|
|
|
|
|
|
|
|
|
|
var ds = integrationSearchControl.dataset;
|
|
|
|
|
var ds = integrationSearchControl.updataset;
|
|
|
|
|
var keys = selected.map(e => ds.getKey(e));
|
|
|
|
|
|
|
|
|
|
$("#upTbody--${pageName},#downTbody--${pageName}").find("input[type='checkbox']").each(function() {
|
|
|
|
|
$("#upTbody--${pageName}").find("input[type='checkbox']").each(function() {
|
|
|
|
|
var checkbox = $(this);
|
|
|
|
|
checkbox.prop("checked", keys.includes(checkbox.val()));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 개별총정보 dialog
|
|
|
|
|
integrationSearchControl.getInfo = (crdnId) => {
|
|
|
|
|
if (crdnId == undefined || crdnId == null || crdnId == "") {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
integrationSearchControl.downdataset.onSelectionChange = (selected) => {
|
|
|
|
|
|
|
|
|
|
var params = {
|
|
|
|
|
callControlName : "integrationSearchControl"
|
|
|
|
|
, crdnId : crdnId
|
|
|
|
|
}
|
|
|
|
|
var ds = integrationSearchControl.downdataset;
|
|
|
|
|
var keys = selected.map(e => ds.getKey(e));
|
|
|
|
|
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : integrationSearchControl.urls.getInfo
|
|
|
|
|
, data : params || {}
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : "totalInfoMainDialog"
|
|
|
|
|
, title : "개별총정보"
|
|
|
|
|
, content : resp
|
|
|
|
|
, size : "xxl"
|
|
|
|
|
, init : () => { }
|
|
|
|
|
, onClose : () => { }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
$("#downTbody--${pageName}").find("input[type='checkbox']").each(function() {
|
|
|
|
|
var checkbox = $(this);
|
|
|
|
|
checkbox.prop("checked", keys.includes(checkbox.val()));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 삭제 callback
|
|
|
|
|
integrationSearchControl.onRemove = (selected, resp) => {
|
|
|
|
|
var btnTitle = $("#btnRemove--${pageName}").attr("title");
|
|
|
|
|
|
|
|
|
|
var showMessage = resp.retMessage.replace(/[S]|[F]/g, btnTitle);
|
|
|
|
|
|
|
|
|
|
dialog.alert(showMessage);
|
|
|
|
|
|
|
|
|
|
if (resp.saved) {
|
|
|
|
|
integrationSearchControl._load();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 삭제
|
|
|
|
|
integrationSearchControl.remove = (params) => {
|
|
|
|
|
var selected = integrationSearchControl.dataset.getKeys("selected");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (selected.length < 1) return;
|
|
|
|
|
|
|
|
|
|
if (!params) {
|
|
|
|
|
params = {};
|
|
|
|
|
params[integrationSearchControl.prefixed("IDs")] = selected.join(",");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajax.post({
|
|
|
|
|
url : integrationSearchControl.urls.remove
|
|
|
|
|
, data : params
|
|
|
|
|
, success : resp => integrationSearchControl.onRemove(selected, resp)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
*
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
var integrationSearch = {};
|
|
|
|
|
integrationSearch.renderList = (updown, tabGroup) => {
|
|
|
|
|
|
|
|
|
|
integrationSearch.renderList = (updown, tabGroup) => {
|
|
|
|
|
|
|
|
|
|
var tbody = updown == "up" ? "upTbody--${pageName}" : "downTbody--${pageName}";
|
|
|
|
|
var trs = "";
|
|
|
|
|
var notFound = [document.getElementById("notFound--${pageName}").innerHTML];
|
|
|
|
|
var found = document.getElementById("row--${pageName}").innerHTML;
|
|
|
|
|
var ds = integrationSearchControl.dataset;
|
|
|
|
|
var replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "integrationSearchControl.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "integrationSearchControl.getInfo('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
var ds;
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
ds = integrationSearchControl.updataset;
|
|
|
|
|
} else {
|
|
|
|
|
ds = integrationSearchControl.downdataset;
|
|
|
|
|
}
|
|
|
|
|
var replacer;
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "integrationSearchControl.updataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "integrationSearch.getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
} else {
|
|
|
|
|
replacer = (str, dataItem) => str
|
|
|
|
|
.replace(/{onclick}/gi, "integrationSearchControl.downdataset.setCurrent('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
.replace(/{ondblclick}/gi, "integrationSearch.getInfo('"+ dataItem.getValue("TASK_SE_CD") +"','" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var empty = ds.empty;
|
|
|
|
|
if(empty){
|
|
|
|
|
trs = notFound;
|
|
|
|
|
} else if(tabGroup == "전체"){
|
|
|
|
|
trs = ds.inStrings(found, replacer);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
var temp = ds._items;
|
|
|
|
|
|
|
|
|
|
var filtered = [];
|
|
|
|
|
if(tabGroup == null || tabGroup == "" || tabGroup == "전체"){
|
|
|
|
|
if(updown == "up"){
|
|
|
|
|
filtered = temp.filter(item => item.data.RCVMT_YN == "N");
|
|
|
|
|
} else {
|
|
|
|
|
filtered = temp.filter(item => item.data.RCVMT_YN == "Y");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
filtered = temp.filter(item => item.data.TAB_GROUP == tabGroup);
|
|
|
|
|
|
|
|
|
|
if(filtered.lenth < 1){
|
|
|
|
|
trs = notFound;
|
|
|
|
@ -195,6 +165,9 @@ var integrationSearch = {};
|
|
|
|
|
fn_securityModeToggle($("#securityMode--top").is(":checked"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
integrationSearch.setCurrent = () => {
|
|
|
|
|
console.log(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 검색 조건 파라미터 가져오기
|
|
|
|
|
integrationSearch.getParams = () => {
|
|
|
|
@ -204,73 +177,12 @@ integrationSearch.getParams = () => {
|
|
|
|
|
return formData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 수정 dialog -> callback 추가
|
|
|
|
|
integrationSearch.fnInfo = (params) => {
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : wctx.url("/sprt/sprt02/010/info.do?openerPageName=${pageName}")
|
|
|
|
|
, data : params || {}
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : integrationSearchControl.prefixed("Dialog")
|
|
|
|
|
, title : integrationSearchControl.prefixName + " 정보"
|
|
|
|
|
, content : resp
|
|
|
|
|
, size : integrationSearchControl.infoSize
|
|
|
|
|
, init : () => { }
|
|
|
|
|
, onClose : () => { integrationSearchControl.load(integrationSearchControl.query.pageNum); } // callback
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 초기 셋팅
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 이벤트
|
|
|
|
|
integrationSearch.setEvent = () => {
|
|
|
|
|
|
|
|
|
|
// 달력 초기화
|
|
|
|
|
initDatepicker("frmSearch--${pageName}");
|
|
|
|
|
|
|
|
|
|
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
|
|
|
|
$("#frmSearch--${pageName}").find(".form-date").each(function() {
|
|
|
|
|
$(this).on("input", function() {
|
|
|
|
|
var 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);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName}").find(".form-time").each(function(){
|
|
|
|
|
$(this).on("input",function(){
|
|
|
|
|
var value = this.value.replaceAll(":","");
|
|
|
|
|
|
|
|
|
|
if(value.length > 5){
|
|
|
|
|
this.value = value.substring(0,2)+":"+value.substring(2,4)+":"+value.substring(4);
|
|
|
|
|
} else if(value.length > 3){
|
|
|
|
|
this.value = value.substring(0,2)+":"+value.substring(2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// DataTables width 변경 조정
|
|
|
|
|
$("#upTable--${pageName}").find("th").resizable( {handles : "e"} );
|
|
|
|
|
$("#downTable--${pageName}").find("th").resizable( {handles : "e"} );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* 버튼 clickEvent
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
// 초기화
|
|
|
|
|
integrationSearch.fnReset = () => {
|
|
|
|
|
|
|
|
|
|
integrationSearchControl.dataset.clear();
|
|
|
|
|
integrationSearchControl.updataset.clear();
|
|
|
|
|
integrationSearchControl.downdataset.clear();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -308,7 +220,8 @@ integrationSearch.fnSearchList = () => {
|
|
|
|
|
$("#upGridTabs--${pageName}").find("button").eq(0).addClass("active");
|
|
|
|
|
$("#downGridTabs--${pageName}").find("button").not(":eq(0)").removeClass("active");
|
|
|
|
|
$("#downGridTabs--${pageName}").find("button").eq(0).addClass("active");
|
|
|
|
|
integrationSearchControl.dataset.clear();
|
|
|
|
|
integrationSearchControl.updataset.clear();
|
|
|
|
|
integrationSearchControl.downdataset.clear();
|
|
|
|
|
|
|
|
|
|
integrationSearchControl.load();
|
|
|
|
|
}
|
|
|
|
@ -318,23 +231,92 @@ integrationSearch.fnExcel = () => {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 수정
|
|
|
|
|
integrationSearch.fnUpdate = () => {
|
|
|
|
|
//개별총정보 dialog
|
|
|
|
|
integrationSearch.getInfo = (taskSeCd, crdnId) => {
|
|
|
|
|
if (crdnId == undefined || crdnId == null || crdnId == "") {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var params = {
|
|
|
|
|
callPurpose : "update"
|
|
|
|
|
, sggCd : integrationSearchControl.dataset.getValue("SGG_CD") // 시군구 코드
|
|
|
|
|
, taskSeCd : integrationSearchControl.dataset.getValue("TASK_SE_CD") // 업무 구분 코드
|
|
|
|
|
, crdnId : integrationSearchControl.dataset.getValue("CRDN_ID")
|
|
|
|
|
};
|
|
|
|
|
callControlName : "integrationSearchControl"
|
|
|
|
|
, crdnId : crdnId
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var url = wctx.url("/"+taskSeCd+"/sprt/sprt02/010/main.do");
|
|
|
|
|
|
|
|
|
|
integrationSearch.fnInfo(params);
|
|
|
|
|
ajax.get({
|
|
|
|
|
url : url
|
|
|
|
|
, data : params
|
|
|
|
|
, success : resp => {
|
|
|
|
|
dialog.open({
|
|
|
|
|
id : "totalInfoMainDialog"
|
|
|
|
|
, title : "개별총정보"
|
|
|
|
|
, size : "xxl"
|
|
|
|
|
, content : resp
|
|
|
|
|
, init : () => { }
|
|
|
|
|
, onClose : () => { }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* Event
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
//이벤트
|
|
|
|
|
integrationSearch.setEvent = () => {
|
|
|
|
|
|
|
|
|
|
$("#btnReset--${pageName}").on("click", function(){ integrationSearch.fnReset(); });
|
|
|
|
|
$("#btnSearch--${pageName}").on("click", function(){ integrationSearch.fnSearchList(); });
|
|
|
|
|
|
|
|
|
|
$("#btnUpExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel(); });
|
|
|
|
|
$("#btnDownExcel--${pageName}").on("click", function(){ integrationSearch.fnExcel(); });
|
|
|
|
|
|
|
|
|
|
//$("#btn").on("click", function(){ });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 달력 초기화
|
|
|
|
|
initDatepicker("frmSearch--${pageName}");
|
|
|
|
|
|
|
|
|
|
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
|
|
|
|
$("#frmSearch--${pageName}").find(".form-date").each(function() {
|
|
|
|
|
$(this).on("input", function() {
|
|
|
|
|
var 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);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#frmSearch--${pageName}").find(".form-time").each(function(){
|
|
|
|
|
$(this).on("input",function(){
|
|
|
|
|
var value = this.value.replaceAll(":","");
|
|
|
|
|
|
|
|
|
|
if(value.length > 5){
|
|
|
|
|
this.value = value.substring(0,2)+":"+value.substring(2,4)+":"+value.substring(4);
|
|
|
|
|
} else if(value.length > 3){
|
|
|
|
|
this.value = value.substring(0,2)+":"+value.substring(2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// DataTables width 변경 조정
|
|
|
|
|
$("#upTable--${pageName}").find("th").resizable( {handles : "e"} );
|
|
|
|
|
$("#downTable--${pageName}").find("th").resizable( {handles : "e"} );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.integrationSearchControl = integrationSearchControl;
|
|
|
|
|
window.integrationSearch = integrationSearch;
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* script 진입
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
$("#upTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML);
|
|
|
|
|
$("#downTheadTr--${pageName}").html(document.getElementById("cols--${pageName}").innerHTML);
|
|
|
|
|
|
|
|
|
|