jsp 소스 이동

main
이범준 2 months ago
parent 4f2e63aefb
commit 7f9c0e1391

@ -0,0 +1,584 @@
<%@ 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="pageKorName" scope="request">시군구관리</c:set>
<div class="content-wrapper" data-doctx="${pageName}">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<form name="mainForm" method="post" enctype="multipart/form-data">
<div class="card my-2">
<div class="mx-3 my-2 d-block">
<span class="h3">
시군구 정보
</span>
<span>
<button type="button" name="btnSaveSgg" class="btn btn-primary w-px-100 float-end">저장</button>
</span>
</div>
<div class="row g-3 mt-1 mb-3">
<div class="col-md-6">
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">시군구명</label>
<input name="sggID" type="hidden" />
<input name="sggNm" type="text" class="form-control" readonly />
</div>
<div class="col-md-6">
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">기관명</label>
<input name="instCd" type="hidden" />
<input name="instNm" type="text" class="form-control" readonly />
</div>
<div class="col-md-4 d-flex align-items-center">
<label class="w-px-140 col-form-label text-sm-end pe-2">
직인
</label>
<img name="offcsImage"
alt="" src="" data-orgn-path="" data-orgn-name=""
class="mw-px-100 mh-px-100 fit-contain" />
<input type="file" name="offcs" hidden />
</div>
<div class="col-md-4 d-flex align-items-center">
<label class="w-px-140 col-form-label text-sm-end pe-2">
심볼
</label>
<img name="symbolImage"
alt="" src="" data-orgn-path="" data-orgn-name=""
class="mw-px-100 mh-px-100 fit-contain" />
<input type="file" name="symbol" hidden />
</div>
<div class="col-md-4 d-flex align-items-center">
<label class="w-px-140 col-form-label text-sm-end pe-2">
로고
</label>
<img name="logoImage"
alt="" src="" data-orgn-path="" data-orgn-name=""
class="mw-px-100 mh-px-100 fit-contain" />
<input type="file" name="logo" hidden />
</div>
</div>
</div>
</form>
<div class="card my-2">
<div class="mx-3 my-2 d-block">
<span class="h3">
시군구 업무 정보
</span>
</div>
<div class="nav-align-top my-2 mx-2 flex-row">
<ul class="nav nav-tabs" role="tablist" name="tabButtonContainer">
</ul>
<button type="button" name="btnOpenSelectTaskDialog"
class="btn btn-darkgray ms-1 superadmin">+ 새 과태료업무 추가</button>
</div>
<span class="tab-content" name="tabContentContainer">
</span>
</div>
</div>
</div>
<template name="taskTabButtonTemplate">
<li class="nav-item">
<button type="button" class="nav-link {active} w-px-150"
role="tab" data-bs-toggle="tab" data-bs-target="[data-doctx='${pageName}'] [name='tab{task}']"
onclick="">
{taskNm}
</button>
</li>
</template>
<template name="taskTabContentsTemplate">
<span name="tab{task}" class="tab-pane {activeshow}" role="tabpanel">
<div class="mx-3 my-2 d-flex flex-column">
<div class="float-end">
<button type="button" data-task="{task}"
onclick="pageObject['${pageName}'].fnSaveForTask(this);"
class="btn btn-primary w-px-100 float-end"
>저장</button>
</div>
</div>
<form name="{task}Form">
<div class="row g-3 mt-1 mb-3">
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">업무명</label>
<input name="taskSeNm" type="text" class="form-control w-px-150" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">사전통지일수</label>
<input name="advntceDayCnt" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">사전통지감경율</label>
<input name="advntceRdcrt" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">사회적약자감경율</label>
<input name="wksnRdcrt" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">과태료가산일자</label>
<input name="ffnlgAdtnYmd" type="text" class="form-control w-px-100" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">과태료가산율</label>
<input name="ffnlgAdtnRt" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">과태료중가산율</label>
<input name="ffnlgInadtnRt" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end" for="">과태료중가산최대수</label>
<input name="ffnlgInadtnMxmmCnt" type="text" class="form-control w-px-50" />
</div>
</div>
<div class="row g-3 mt-1 mb-3 superadmin">
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end text-red" for="">세외수입연계<br/>구분코드</label>
<input name="nxrpLinkSeCd" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-3">
<label class="w-px-140 col-form-label text-sm-end text-red" for="">세외수입연계<br/>구분상세순번</label>
<input name="nxrpLinkSeDtlSn" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-6"></div>
</div>
</form>
<div class="card-datatable text-nowrap area-photoinspection mx-2 mt-2 mb-3">
<div name="{task}Table_0_wrapper" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div name="{task}table-responsive" class="table-responsive ox-scroll oy-scroll h-px-300">
<table name="{task}Table_0"
class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr>
<th style="width: 90px;">위반코드</th>
<th style="width: 160px;">위반항목</th>
<th style="width: 360px;">위반법명</th>
<th style="width: 160px;">위반법1</th>
<th style="width: 160px;">위반법2</th>
<th style="width: 160px;">위반법기타</th>
<th style="width: 120px;">회계구분코드</th>
<th style="width: 120px;">회계구분명</th>
<th style="width: 120px;">세목코드</th>
<th style="width: 300px;">세목명</th>
<th style="width: 120px;">운영항목코드</th>
<th style="width: 300px;">운영항목명</th>
<th style="width: 160px;">특별회계사업코드</th>
<th style="width: 300px;">특별회계사업명</th>
<th class="dummy-th"></th>
</tr>
</thead>
<tbody name="{task}tbody"></tbody>
</table>
</div>
</div>
</div>
</span>
</template>
<template name="taskTbodyTemplate">
<tr data-key="{VLTN_ID}">
<td>{VLTN_CD}</td>
<td data-col="vltnArtcl">
<input type="text" class="form-control w-100" value="{VLTN_ARTCL}" />
</td>
<td data-col="vltnLawNm">
<input type="text" class="form-control w-100" value="{VLTN_LAW_NM}" />
</td>
<td data-col="vltnLaw1">
<input type="text" class="form-control w-100" value="{VLTN_LAW1}" />
</td>
<td data-col="vltnLaw2">
<input type="text" class="form-control w-100" value="{VLTN_LAW2}" />
</td>
<td data-col="vltnLawEtc">
<input type="text" class="form-control w-100" value="{VLTN_LAW_ETC}" />
</td>
<td data-col="acntgSeCd">
<input type="text" class="form-control w-100" value="{ACNTG_SE_CD}" />
</td>
<td data-col="acntgSeNm">
<input type="text" class="form-control w-100" value="{ACNTG_SE_NM}" />
</td>
<td data-col="txitmCd">
<input type="text" class="form-control w-100" value="{TXITM_CD}" />
</td>
<td data-col="txitmNm">
<input type="text" class="form-control w-100" value="{TXITM_NM}" />
</td>
<td data-col="operItemCd">
<input type="text" class="form-control w-100" value="{OPER_ITEM_CD}" />
</td>
<td data-col="operItemNm">
<input type="text" class="form-control w-100" value="{OPER_ITEM_NM}" />
</td>
<td data-col="spclBizCd">
<input type="text" class="form-control w-100" value="{SPCL_BIZ_CD}" />
</td>
<td data-col="spclBizNm">
<input type="text" class="form-control w-100" value="{SPCL_BIZ_NM}" />
</td>
</tr>
</template>
</div>
<script>
LoadScript("ogdp01010Script",wctx.url("/webjars/js/fims/ogdp/ogdp01010.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){
if(MY_INFO.institute != "ADMIN00"){
$(".superadmin").attr("hidden","hidden");
}
var $P = pageObject["${pageName}"];
$P.sggInfo = {};
$P.taskList = [];
$P.curSggCd = "";
if("${sggCd}" == ""){
$P.curSggCd = MY_INFO.info.sggCd;
} else {
$P.curSggCd = "${sggCd}";
}
$P.taskDatasets = {};
var taskCodes = Object.keys(ALL_TASK);
for(var i=0; i < taskCodes.length; i++){
$P.taskDatasets[taskCodes[i]+"Dataset"] = new Dataset({
keymapper : info => info ? info.VLTN_ID : ""
});
}
$P.getSggInfo = async function(){
return new Promise((resolve, reject) => {
ajax.get({
url: wctx.url("/ogdp/getSggStngInfo.do"),
data: {
sggCd : $P.curSggCd
},
success : function(resp, textStatus, jqXHR) {
$P.sggInfo = resp.sggInfo;
$P.$findn("mainForm").find("[name='sggID']").val($P.sggInfo.SGG_CD);
$P.$findn("mainForm").find("[name='sggNm']").val($P.sggInfo.SGG_NM);
$P.$findn("mainForm").find("[name='instCd']").val($P.sggInfo.INST_CD);
$P.$findn("mainForm").find("[name='instNm']").val($P.sggInfo.INST_NM);
$P.$findn("offcsImage")
.attr("data-orgn-name", $P.sggInfo.OFFCS_FILE_NM)
.attr("data-orgn-path", $P.sggInfo.OFFCS_FILE_PATH);
$P.$findn("offcs").val("");
$P.$findn("offcs").trigger("change");
$P.$findn("symbolImage")
.attr("data-orgn-name", $P.sggInfo.SYMBOL_FILE_NM)
.attr("data-orgn-path", $P.sggInfo.SYMBOL_FILE_PATH);
$P.$findn("symbol").val("");
$P.$findn("symbol").trigger("change");
$P.$findn("logoImage")
.attr("data-orgn-name", $P.sggInfo.LOGO_FILE_NM)
.attr("data-orgn-path", $P.sggInfo.LOGO_FILE_PATH);
$P.$findn("logo").val("");
$P.$findn("logo").trigger("change");
resolve({resp, textStatus, jqXHR});
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
$P.getSggTaskInfo = async function(){
return new Promise((resolve, reject) => {
ajax.get({
url: wctx.url("/ogdp/getTasks.do"),
data: {
useYn : "Y",
sggCd : $P.curSggCd
},
success : function(resp, textStatus, jqXHR) {
$P.taskList = resp.taskList;
var tabs = [];
var contents = [];
for(var i=0; i < $P.taskList.length; i++){
var task = $P.taskList[i];
var taskSeCd = task.TASK_SE_CD;
var taskSeNm = task.TASK_SE_NM;
var tabButtonTemplate = $P.findn("taskTabButtonTemplate").innerHTML;
var tabContentsTemplate = $P.findn("taskTabContentsTemplate").innerHTML;
tabButtonTemplate = tabButtonTemplate.replace(/{task}/gi, taskSeCd);
tabButtonTemplate = tabButtonTemplate.replace(/{taskNm}/gi, taskSeNm);
if(i==0){
tabButtonTemplate = tabButtonTemplate.replace(/{active}/gi, "active");
} else {
tabButtonTemplate = tabButtonTemplate.replace(/{active}/gi, "");
}
tabContentsTemplate = tabContentsTemplate.replace(/{task}/gi, taskSeCd);
if(i==0){
tabContentsTemplate = tabContentsTemplate.replace(/{activeshow}/gi, "active show");
} else {
tabContentsTemplate = tabContentsTemplate.replace(/{activeshow}/gi, "");
}
tabs.push(tabButtonTemplate);
contents.push(tabContentsTemplate);
}
$P.$findn("tabButtonContainer").html(tabs.join(""));
$P.$findn("tabContentContainer").html(contents.join(""));
if(MY_INFO.institute != "ADMIN00"){
$(".superadmin").attr("hidden","hidden");
}
for(var i=0; i < $P.taskList.length; i++){
var task = $P.taskList[i];
var taskSeCd = task.TASK_SE_CD;
var taskSeNm = task.TASK_SE_NM;
let formName = taskSeCd+"Form";
$P.$findn(formName).find("[name='taskSeNm']").val(taskSeNm);
$P.$findn(formName).find("[name='advntceDayCnt']").val(task.ADVNTCE_DAY_CNT);
$P.$findn(formName).find("[name='advntceRdcrt']").val(task.ADVNTCE_RDCRT);
$P.$findn(formName).find("[name='wksnRdcrt']").val(task.WKSN_RDCRT);
$P.$findn(formName).find("[name='ffnlgAdtnYmd']").val(task.FFNLG_ADTN_YMD);
$P.$findn(formName).find("[name='ffnlgAdtnRt']").val(task.FFNLG_ADTN_RT);
$P.$findn(formName).find("[name='ffnlgInadtnRt']").val(task.FFNLG_INADTN_RT);
$P.$findn(formName).find("[name='ffnlgInadtnMaxCnt']").val(task.FFNLG_INADTN_MAX_CNT);
$P.$findn(formName).find("[name='nxrpLinkSeCd']").val(task.NXRP_LINK_SE_CD);
$P.$findn(formName).find("[name='nxrpLinkSeDtlSn']").val(task.NXRP_LINK_SE_DTL_SN);
}
resolve({resp, textStatus, jqXHR});
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
$P.getVltnInfo = async function(){
return new Promise((resolve, reject) => {
ajax.get({
url: wctx.url("/ogdp/getVltns.do"),
data: {
useYN : "Y",
sggCd : $P.curSggCd
},
success : function(resp, textStatus, jqXHR) {
var datasetNames = Object.keys($P.taskDatasets);
for(var i=0; i < datasetNames.length; i++){
var filtered = resp.vltnList.filter(item => item.TASK_SE_CD == datasetNames[i].substr(0,3));
$P.taskDatasets[datasetNames[i]].setData(filtered);
}
for(var i=0; i < datasetNames.length; i++){
var taskSeCd = datasetNames[i].substr(0,3);
var template = $P.findn("taskTbodyTemplate").innerHTML;
var taskDataset = $P.taskDatasets[taskSeCd+"Dataset"];
var trs = taskDataset.empty ? [""] : taskDataset.inStrings(template);
$P.$findn(taskSeCd+"tbody").html(trs.join());
}
resolve({resp, textStatus, jqXHR});
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
//이미지 뷰어
FimsComponentization.fnMakeSingleImageViewer($P.findn("offcsImage"), $P.findn("offcs"), "orgn-path", "orgn-name");
FimsComponentization.fnMakeSingleImageViewer($P.findn("symbolImage"), $P.findn("symbol"), "orgn-path", "orgn-name");
FimsComponentization.fnMakeSingleImageViewer($P.findn("logoImage"), $P.findn("logo"), "orgn-path", "orgn-name");
//시군구 기본 설정 저장 버튼
$P.$findn("btnSaveSgg").on("click", function(){
var formData = new FormData($P.findn("mainForm"));
ajax.post({
url: wctx.url("/ogdp/updateSggStng.do"),
data: formData,
contentType : false, processData : false,
success: (resp) => {
dialog.alert({
content : "저장됐습니다.",
init : function(){
AppSupport.setDialogZindex();
AppSupport.focusClose();
},
onClose : () => {
$P.getSggInfo();
}
});
}
});
});
//업무 추가 버튼
$P.$findn("btnOpenSelectTaskDialog").on("click", function(){
$("#selectTaskButtons").html("");
var keys = Object.keys(ALL_TASK);
var ableKeys = [];
for(var i=0; i < keys.length; i++){
if($P.$findn("tabContentContainer").find("[name='tab"+keys[i]+"']").length < 1){
ableKeys.push(keys[i]);
}
}
if(ableKeys.length < 1){
alert("추가 가능한 과태료 업무가 없습니다.");
return;
}
var pn = "${pageName}";
for(var i=0; i < ableKeys.length; i++){
var button = `<button type="button" class="btn btn-xl btn-primary" onclick="pageObject['`
+pn
+`'].fnCreateTaskStng('`
+ableKeys[i]
+`');">`
+ALL_TASK[ableKeys[i]]
+`</button>`;
$("#selectTaskButtons").append(button);
}
$("#selectTaskModal").modal("show");
});
$P.fnCreateTaskStng = (taskSeCd) => {
$("#selectTaskModal").modal("hide");
ajax.post({
url: wctx.url("/ogdp/createTaskStng.do"),
data: {
sggCd : $P.$findn("mainForm").find("[name='sggID']").val(),
taskSeCd : taskSeCd
},
success: (resp) => {
dialog.alert({
content : "저장됐습니다.",
init : function(){
AppSupport.setDialogZindex();
AppSupport.focusClose();
},
onClose : () => {
$P.getSggTaskInfo().then(()=>{ $P.getVltnInfo(); });
}
});
}
});
};
$P.fnSaveForTask = (el) => {
var taskSeCd = el.dataset.task;
var sggCd = $P.$findn("mainForm").find("[name='sggID']").val();
var formData = new FormData($P.findn(taskSeCd+"Form"));
formData.append("taskSeCd",taskSeCd);
formData.append("sggCd", sggCd);
var rowArr = $P.getRowData(taskSeCd+"tbody", formData);
var vltnStngList = FimsSupport.fnJsonArrayToFormData(rowArr,"vltnStngList");
var keys = Object.keys(vltnStngList);
for(var i=0; i < keys.length; i++){
formData.append(keys[i], vltnStngList[keys[i]]);
}
ajax.post({
url: wctx.url("/ogdp/updateTaskStng.do"),
data: formData,
contentType : false, processData : false,
success: (resp) => {
dialog.alert({
content : "저장됐습니다.",
init : function(){
AppSupport.setDialogZindex();
AppSupport.focusClose();
},
onClose : () => {
$P.getSggTaskInfo().then(()=>{ $P.getVltnInfo(); });
}
});
}
});
};
$P.getRowData = (tbodyName, formData) => {
var rowArr = [];
$P.$findn(tbodyName).find("tr").each(function(){
var row = {};
row.vltnId = this.dataset.key;
row.vltnArtcl = $($P.fnGetElement(this,"vltnArtcl")).val();
row.vltnLawNm = $($P.fnGetElement(this,"vltnLawNm")).val();
row.vltnLaw1 = $($P.fnGetElement(this,"vltnLaw1")).val();
row.vltnLaw2 = $($P.fnGetElement(this,"vltnLaw2")).val();
row.vltnLawEtc = $($P.fnGetElement(this,"vltnLawEtc")).val();
row.acntgSeCd = $($P.fnGetElement(this,"acntgSeCd")).val();
row.acntgSeNm = $($P.fnGetElement(this,"acntgSeNm")).val();
row.txitmCd = $($P.fnGetElement(this,"txitmCd")).val();
row.txitmNm = $($P.fnGetElement(this,"txitmNm")).val();
row.operItemCd = $($P.fnGetElement(this,"operItemCd")).val();
row.operItemNm = $($P.fnGetElement(this,"operItemNm")).val();
row.spclBizCd = $($P.fnGetElement(this,"spclBizCd")).val();
row.spclBizNm = $($P.fnGetElement(this,"spclBizNm")).val();
row.sggCd = formData.get("sggID");
row.taskSeCd = formData.get("taskSeCd");
rowArr.push(row);
});
return rowArr;
};
$P.fnGetElement = (tableRow, colName) => {
return $(tableRow).find("td[data-col='"+colName+"']").children("input, select").first()[0];
}
/**************************************************************************
* 초기화
**************************************************************************/
$P.getSggInfo()
.then(() => {
return $P.getSggTaskInfo();
})
.then(() => {
return $P.getVltnInfo();
});
});
</script>

@ -0,0 +1,335 @@
<%@ 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="pageKorName" scope="request">부서관리</c:set>
<div class="content-wrapper" data-doctx="${pageName}">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<div class="container-page-btn">
<button type="button" name="btnReset" class="btn btn-outline-dark w-px-120" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" name="btnSearch" class="btn btn-search w-px-120" title="검색">
검색
</button>
</span>
</div>
<form name="frmSearch">
<div class="container-search">
<div class="row g-1">
<div class="col-3">
<label is="name-label" for="sggCd"
class="form-label fw-bold form-search-title">시군구</label>
<select is="id-select" name="sggCd" class="form-select" disabled>
<option value="">전체</option>
<c:forEach items="${sggList}" var="item">
<option value="${item.SGG_CD}">${item.SGG_NM}</option>
</c:forEach>
</select>
</div>
<div class="col-3">
<label is="name-label" for="instNm"
class="form-label fw-bold form-search-title">기관명</label>
<input type="text" is="id-input" name="instNm" class="form-control" />
</div>
<div class="col-3">
<label is="name-label" for="instCd"
class="form-label fw-bold form-search-title">기관코드</label>
<input type="text" is="id-input" name="instCd" class="form-control" maxlength="7" />
</div>
</div>
<div class="row g-1">
<div class="col-3">
<label is="name-label" for="deptNm"
class="form-label fw-bold form-search-title">부서명</label>
<input type="text" is="id-input" name="deptNm" class="form-control" />
</div>
<div class="col-3">
<label is="name-label" for="deptCd"
class="form-label fw-bold form-search-title">부서코드</label>
<input type="text" is="id-input" name="deptCd" class="form-control" maxlength="7" />
</div>
<div class="col-6">
</div>
</div>
</div>
</form>
<div>
<div name="gridButtonArea" class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="deptPagingInfo" class="dataTables_info"></span>
<ul name="deptPaging" class="pagination pagination-primary"></ul>
</div>
</div>
</div>
<div class="card-datatable text-nowrap">
<div name="DataTables_Table_0_wrapper" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div name="table-responsive" class="table-responsive ox-scroll oy-scroll h-px-500">
<table name="deptTable" class="table-layout-fixed datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr name="deptThead">
<th style="width: 80px;" class="cmn">No.</th>
<th class="cmn" style="width: 56px;">
<input type="checkbox" class="form-check-input"
onchange="pageObject['${pageName}'].ctrl.dataset.select(this.checked);" />
</th>
<th style="width: 200px;">시군구명</th>
<th style="width: 200px;">시군구코드</th>
<th style="width: 200px;">기관명</th>
<th style="width: 200px;">기관코드</th>
<th style="width: 200px;">부서명</th>
<th style="width: 200px;">부서코드</th>
<th style="width: 200px;">사용여부</th>
<th class="dummy-th"></th>
</tr>
</thead>
<tbody name="deptTbody">
</tbody>
<template is="curly-brackets" name="deptRow">
<tr data-index="DATA-INDEX">
<td onclick ondblclick class="text-end">ROW_NUM</td>
<td class="text-center">
<input type="checkbox" class="form-check-input" name="gridCheckbox" value="DATA-INDEX"
onchange="pageObject['${pageName}'].ctrl.dataset.select('{DATA-INDEX}', this.checked);">
</td>
<td onclick ondblclick class="text-start">SGG_NM</td>
<td onclick ondblclick class="text-center">SGG_CD</td>
<td onclick ondblclick class="text-start">INST_NM</td>
<td onclick ondblclick class="text-center">INST_CD</td>
<td onclick ondblclick class="text-start">DEPT_NM</td>
<td onclick ondblclick class="text-center">DEPT_CD</td>
<td onclick ondblclick class="text-center">USE_YN_NM</td>
<td class="dummy-td"></td>
</tr>
</template>
<template name="deptNotFound">
<tr>
<td valign="top" colspan="10" class="dataTables_empty text-center">
부서 정보를 찾지 못했습니다.
</td>
</tr>
</template>
</table>
</div>
</div>
</div>
<div class="toast-container position-fixed bottom-0 end-0 p-3">
<div name="divToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body bg-black text-white">
삭제 되었습니다.
</div>
</div>
</div>
</div>
</div>
<div class="content-backdrop fade"></div>
</div>
<script>
LoadScript("ogdp02010Script",wctx.url("/webjars/js/fims/ogdp/ogdp02010.js?ver=${ver}"));
/**************************************************************************
* Global Variable
**************************************************************************/
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
$(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.toast = new bootstrap.Toast($P.findn("divToast"), {
animation: true,
autohide: true,
delay: 2000
});
/**************************************************************************
* DatasetControl, DatasetSupport, FormFields
**************************************************************************/
var ctrl = newOgdp02020Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderDeptList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("deptTbody"));
}
ctrl.dataset.onSelectionChange = (selectedArr) => {
Apply.fromDataset.gridCheckbox(ctrl.dataset, $P.findn("deptTbody"), 1, selectedArr);
};
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='deptPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnReset = () => {
var searchForm = $P.$findn("frmSearch");
searchForm.find("input[type='radio']").not("[name='taskSeCd']").prop("checked", false);
searchForm.find("input[type='checkbox']").prop("checked", false);
searchForm.find("input[type='hidden']").val("");
searchForm.find("input[type='text']").val("");
searchForm.find("select[name='sggCd']").val(MY_INFO.info.sggCd);
ctrl.dataset.setData([]);
}
$P.getParams = () => {
var formFields = new FimsFormFields($P.selectorn("frmSearch"));
var data = formFields.get();
data.fetchSize = ctrl.defaultFetchSize;
return data;
}
$P.searchDeptList = () => {
ctrl.query = $P.getParams();
ctrl.load(1);
}
$P.scrollDeptList = () => {
ctrl.load(ctrl.query.pageNum + 1);
}
$P.refreshDeptList = () => {
if(ctrl.query.pageNum == null){
return;
}
ctrl.reload({all : true});
}
$P.getGridTemplate = () => {
var notFound = [$P.findn("deptNotFound").innerHTML];
var found = $P.findn("deptRow").innerHTML;
var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDeptList('{DATA-INDEX}');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblclickDeptList('{DEPT_CD}');");
return {
found : found,
notFound : notFound,
replacer : replacer
};
}
$P.renderDeptList = (total, listLength, trs, option) => {
let noMore = (listLength >= total);
var initScroll = (ctrl.query.pageNum < 2);
if(option != null && option.reloaded){
initScroll = false;
}
$P.findn("table-responsive").changeContent(trs, initScroll, noMore);
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
}
$P.clickDeptList = (dataIndex) => {
if(dataIndex == ""){
return;
}
$P.$findn("deptTbody").setCurrentRow(dataIndex);
Apply.toDataset.current(ctrl.dataset, dataIndex);
}
$P.dblclickDeptList = (dataKey) => {
$P.getInfo(dataKey);
}
$P.getInfo = (deptCd) => {
var params = {};
params.deptCd = deptCd;
ajax.get({
url : ctrl.urls.getInfo,
data : params,
success : (resp) => {
let dialogName = "deptInfoDialog";
let dialogId = dialogName+"-"+uuid();
dialog.open({
id : dialogId,
title : "부서 정보",
size : "xl",
content : resp,
init : () => {
$("#"+dialogId).attr("name", dialogName);
$("#"+dialogId).attr("data-ref-doctx","${pageName}");
var parentRes = new Object();
var childReq = pageObject.childReq.pop();
for(var reqKey in childReq) {
if($P.provide[reqKey]){
parentRes[reqKey] = $P.provide[reqKey];
} else {
parentRes[reqKey] = function(){};
}
}
pageObject.parentRes.push(parentRes);
}
});
}
});
}
$P.provide = {
"refreshList" : function(){
$P.refreshDeptList();
},
};
/**************************************************************************
* element.on
**************************************************************************/
$P.$findn("btnReset").on('click', () => $P.fnReset());
$P.$findn("btnSearch").on('click', () => $P.searchDeptList());
/**************************************************************************
* 초기화
**************************************************************************/
Componentization.fnMakeResizableTable($P.findn("table-responsive"));
Componentization.fnMakeScrollableTable($P.findn("table-responsive"), $P.scrollDeptList);
$P.fnReset();
fn_securityModeToggle($("#securityMode--top").is(":checked")); //보안모드
if(MY_INFO.institute == "ADMIN00"){
$P.$findn("sggCd").removeAttr("disabled");
}
});
</script>

@ -0,0 +1,347 @@
<%@ 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="pageKorName" scope="request">부서 정보</c:set>
<div class="content-wrapper" data-doctx="${pageName}">
<div class="container-xxl flex-grow-1 px-0">
<div class="card">
<form name="frmEdit">
<div class="row g-1" name="forRootAdmin" hidden>
<div class="col-md-6">
<label is="name-label" for="sggID"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end required">
시군구코드
</label>
<input type="text" is="id-input" name="sggID" data-map="SGG_CD"
class="form-control w-px-200" required maxlength="7" readonly />
</div>
<div class="col-md-6">
<label is="name-label" for="instCode"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end required">
기관코드
</label>
<input type="text" is="id-input" name="instCode" data-map="INST_CD"
class="form-control w-px-200" required maxlength="7" readonly />
</div>
</div>
<div class="row g-1">
<div class="col-md-6">
<label is="name-label" for="deptID"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end required">
부서코드
</label>
<input type="text" is="id-input" name="deptID" data-map="DEPT_CD"
class="form-control w-px-200" required maxlength="7" readonly />
</div>
<div class="col-md-6">
<label is="name-label" for="name"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end required">
부서명
</label>
<input type="text" is="id-input" name="name" data-map="DEPT_NM"
class="form-control w-px-200" required readonly />
</div>
<div class="col-md-12" hidden>
<input type="text" is="id-input" name="telno" data-map="DEPT_TELNO"
class="form-control w-px-200" />
<input type="text" is="id-input" name="faxno" data-map="DEPT_FXNO"
class="form-control w-px-200" />
</div>
</div>
<div class="row g-1">
<div class="col-md-6">
<label is="name-label" for="cvlcptLinkSeCd"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
민원연계구분
</label>
<input type="text" is="id-input" name="cvlcptLinkSeCd" data-map="CVLCPT_LINK_SE_CD"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="vrbacntLinkSeCd"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
가상계좌연계구분
</label>
<input type="text" is="id-input" name="vrbacntLinkSeCd" data-map="VRBACNT_LINK_SE_CD"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="pstofcNm"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
우체국명
</label>
<input type="text" is="id-input" name="pstofcNm" data-map="PSTOFC_NM"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="rgNoHeader"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
등기번호 헤더
</label>
<input type="text" is="id-input" name="rgNoHeader" data-map="RG_NO_HEADER"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="sndngLinkSeCd"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
발송연계구분
</label>
<input type="text" is="id-input" name="sndngLinkSeCd" data-map="SNDNG_LINK_SE_CD"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="egpConOrg"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
E그린 외부기관구분
</label>
<input type="text" is="id-input" name="egpConOrg" data-map="EGP_CON_ORG"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="egpRceptId"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
E그린 접수수체국기호
</label>
<input type="text" is="id-input" name="egpRceptId" data-map="EGP_RCEPT_ID"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="egpApvlNb"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
E그린 후납계약승인번호
</label>
<input type="text" is="id-input" name="egpApvlNb" data-map="EGP_APVL_NB"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="egpEsbPath"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
E그린 ESB경로
</label>
<input type="text" is="id-input" name="egpEsbPath" data-map="EGP_ESB_PATH"
class="form-control w-px-300" />
</div>
<div class="col-md-6">
<label is="name-label" for="egpPostInstId"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
E그린 우정정보센터 기관ID
</label>
<input type="text" is="id-input" name="egpPostInstId" data-map="EGP_POST_INST_ID"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="egpCertCn"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
E그린 인증서CN
</label>
<input type="text" is="id-input" name="egpCertCn" data-map="EGP_CERT_CN"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="ensInterfaceId"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
세외수입인터페이스ID
</label>
<input type="text" is="id-input" name="ensInterfaceId" data-map="ENS_INTERFACE_ID"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="ensSourceCd"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
세외수입소스코드
</label>
<input type="text" is="id-input" name="ensSourceCd" data-map="ENS_SOURCE_CD"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="ensTargetCd"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
세외수입타겟코드
</label>
<input type="text" is="id-input" name="ensTargetCd" data-map="ENS_TARGET_CD"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="ensUrl"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
세외수입URL
</label>
<input type="text" is="id-input" name="ensUrl" data-map="ENS_URL"
class="form-control w-px-300" />
</div>
<div class="col-md-6">
<label is="name-label" for="nxrpLinkYn"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
세외수입 연계 여부
</label>
<input type="text" is="id-input" name="nxrpLinkYn" data-map="NXRP_LINK_YN"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="nxrpLinkSrvcUrl"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
세외수입연계서비스URL
</label>
<input type="text" is="id-input" name="nxrpLinkSrvcUrl" data-map="NXRP_LINK_SRVC_URL"
class="form-control w-px-300" />
</div>
<div class="col-md-6">
<label is="name-label" for="nxrpRgnSeCd"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
세외수입지역구분코드
</label>
<input type="text" is="id-input" name="nxrpRgnSeCd" data-map="NXRP_RGN_SE_CD"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="dtbnBankNm"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
교부은행명
</label>
<input type="text" is="id-input" name="dtbnBankNm" data-map="DTBN_BANK_NM"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="dtbnActno"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
교부계좌번호
</label>
<input type="text" is="id-input" name="dtbnActno" data-map="DTBN_ACTNO"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="docHeader"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
문서머릿말
</label>
<input type="text" is="id-input" name="docHeader" data-map="DOC_HEADER"
class="form-control w-px-200" />
</div>
<div class="col-md-6">
<label is="name-label" for="srvrOs"
class="w-px-160 bg-lighter pe-2 col-form-label text-sm-end">
서버OS
</label>
<input type="text" is="id-input" name="srvrOs" data-map="SRVR_OS"
class="form-control w-px-200" />
</div>
</div>
<div class="row m-3">
<div class="col-md-12">
<span class="float-end">
<button type="button" name="btnSave" class="btn btn-primary">저장</button>
</span>
</div>
</div>
</form>
</div>
</div>
</div>
<script>
LoadScript("ogdp02020Script",wctx.url("/webjars/js/fims/ogdp/ogdp02020.js?ver=${ver}"));
pageObject["${pageName}"] = newDoctxFinder("${pageName}");
pageObject["${pageName}"].provided = {};
pageObject.childReq = [];
pageObject.childReq.push({
refreshList : function(){ },
});
$(document).ready(function(){
var $P = pageObject["${pageName}"];
if(pageObject.parentRes.length > 0){
$P.provided = pageObject.parentRes.pop();
} else {
$P.provided = pageObject.childReq.pop();
}
/**************************************************************************
* DatasetControl, Dataset, FormFields
**************************************************************************/
$P.formFields = new FimsFormFields($P.selectorn("frmEdit"));
var ctrl = newOgdp02010Control($P);
ctrl.dataset.onCurrentChange = (dataItem) => {
if(!dataItem){
return;
}
$P.formFields.set(ctrl,dataItem);
}
/**************************************************************************
* pageObject.function
**************************************************************************/
$P.fnSave = () => {
if(!AppSupport.customValidate($P.$findn("frmEdit").find("input"))) return;
var info = $P.formFields.get();
if(info.deptID.length != 7){
alert("부서코드는 7자리 숫자이여야 합니다.");
return;
}
var create = ctrl.dataset.empty;
ajax.post({
url : create ? ctrl.urls.create : ctrl.urls.update,
data : info,
success : (resp) => {
if(resp.saved){
dialog.close($P.selfDlgId());
dialog.alert({
content:"저장되었습니다.",
onOK : () => $P.provided.refreshList()
});
}
}
});
}
/**************************************************************************
* element.on
**************************************************************************/
$P.$findn("btnSave").on('click', () => $P.fnSave());
/**************************************************************************
* 초기화
**************************************************************************/
if(MY_INFO.institute == 'ADMIN00') {
$P.$findn("forRootAdmin").removeAttr("hidden");
}
var deptInfo = ${deptInfo};
$P.$findn("deptID").attr("disabled","disabled");
$P.$findn("name").attr("disabled","disabled");
ctrl.dataset.setData([deptInfo]);
if(deptInfo.USE_YN == "N"){
$P.$findn("btnSave").attr("disabled","disabled");
}
});
</script>

@ -0,0 +1,37 @@
<%@ 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="pageKorName" scope="request">시군구 목록</c:set>
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 px-0">
<div class="card wrapper-list">
<h1>시군구 선택</h1>
<div id="btnsGoToEditSgg--${pageName}">
<c:forEach items="${sggList}" var="item">
<c:if test="${item.SGG_CD ne 'ADMIN'}">
<button type="button" data-value="${item.SGG_CD}" class="w-px-200"
onclick="fnGoToEditSgg('${item.SGG_CD}')">
${item.SGG_NM}(${item.SGG_CD})
</button>
</c:if>
</c:forEach>
</div>
</div>
</div>
</div>
<script>
function fnGoToEditSgg(selected){
let menuUrl = wctx.url("/ogdp/sggStngMain.do");
let curTabId = FimsSupport.getActiveRootTabArea().id;
ajax.get({
url: menuUrl,
data : { sggCd : selected },
success:(resp) => {
$("#main-tab-content").find("div[id='"+curTabId+"']").html(resp);
}
});
}
</script>

@ -0,0 +1,374 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="/webjars/image/favicon.ico" />
<!-- Fonts -->
<link rel="stylesheet" href="/webjars/fonts/notoSansKr/fontface.css" />
<!-- Icons. Uncomment required icon fonts -->
<link rel="stylesheet" href="/webjars/3rd-party/sneat/fonts/boxicons.css" />
<link rel="stylesheet" href="/webjars/3rd-party/sneat/fonts/fontawesome.css" />
<link rel="stylesheet" href="/webjars/fonts/xit-icon.css" />
<!-- Core CSS -->
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/rtl/core.css"/>" class="template-customizer-core-css" />
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/css/rtl/theme-default.css"/>" class="template-customizer-theme-css" />
<link rel="stylesheet" href="<c:url value="/webjars/css/styles.css"/>" />
<link rel="stylesheet" href="<c:url value="/webjars/applib/css/overwrite.css?${ver}"/>" />
<link rel="stylesheet" href="<c:url value="/webjars/applib/css/applib.css?${ver}"/>" />
<link rel="stylesheet" href="<c:url value="/webjars/css/fims.css?${ver}"/>" />
<!-- Vendors CSS -->
<link rel="stylesheet" href="/webjars/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.css" />
<link rel="stylesheet" href="<c:url value="/webjars/3rd-party/sneat/libs/bootstrap-datepicker/bootstrap-datepicker.css"/>" />
<title>사용자정보</title>
</head>
<body>
<form id="user-form" data-doctx="user">
<input type="hidden" name="cntnSeCd" data-map="CNTN_SE_CD" />
<div class="row g-3 mt-4">
<c:if test="${cntnSeCd == '01'}">
<div class="col-md-12">
<label class="col-form-label required">
시군구/기관 및 부서
</label>
<select name="institute" class="form-select no-bgi" data-map="NSTT_CD"
required title="시군구/기관 및 부서" disabled>
<option value=""></option>
<c:forEach items="${allOgdpList}" var="item">
<option value="${item.INST_CD}">${item.SGG_NM} / ${item.INST_NM}</option>
</c:forEach>
</select>
<select name="deptCode" class="form-select no-bgi" data-map="DEPT_CD"
required title="시군구/기관 및 부서" disabled>
<option value=""></option>
<c:forEach items="${allOgdpList}" var="item">
<option value="${item.DEPT_CD}">${item.DEPT_NM}</option>
</c:forEach>
</select>
<input type="hidden" name="orgID" data-map="ORG_ID" />
<div class="dropdown d-inline-flex">
<button type="button"
class="btn btn-md btn-secondary dropdown-toggle"
data-bs-toggle="dropdown"
>선택</button>
<ul class="dropdown-menu oy-auto mh-px-300">
<c:forEach items="${ableOgdpList}" var="item">
<li>
<a class="dropdown-item"
onclick="setOgdpCodeValues('${item.INST_CD}','${item.DEPT_CD}','${item.SGG_CD}')">${item.OGDP_NM}</a>
</li>
</c:forEach>
</ul>
</div>
</div>
<div class="col-md-6">
<label class="col-sm-3 col-form-label text-sm-end required" for="userSeCd">
유저구분
</label>
<select name="userSeCd" data-map="USER_SE_CD" class="form-select">
<c:forEach items="${CMN008List}" var="item">
<c:if test="${item.code != '21'}">
<option value="${item.code}">${item.value}</option>
</c:if>
</c:forEach>
</select>
</div>
<div class="col-md-6"></div>
</c:if>
<c:if test="${cntnSeCd == '02'}">
<input type="hidden" name="orgID" data-map="ORG_ID" />
<input type="hidden" name="institute" data-map="NSTT_CD" />
<input type="hidden" name="deptCode" data-map="DEPT_CD" />
<input type="hidden" name="userSeCd" data-map="USER_SE_CD" />
</c:if>
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end required" for="account">
계정
</label>
<div class="col-sm-9">
<input name="id" type="hidden" data-map="USER_ID" />
<input name="account" type="text" required data-map="USER_ACNT" class="form-control"
placeholder="사용자 계정" />
<button type="button" id="btnDuplicate" class="btn btn-primary">중복 확인</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end required" for="name">
이름
</label>
<div class="col-sm-9">
<input name="name" type="text" required data-map="USER_NM" class="form-control"
placeholder="사용자 이름" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end required" for="password">
비밀번호
</label>
<div class="col-sm-9">
<input name="password" type="password" required class="form-control" placeholder="비밀번호" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end required" for="confirmPassword">
비밀번호 확인
</label>
<div class="col-sm-9">
<input name="confirmPassword" type="password" required class="form-control"
placeholder="비밀번호 확인" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end required" for="emailAddress">이메일 주소</label>
<div class="col-sm-9">
<input name="emailAddress" type="email" required data-map="EML_ADRS" class="form-control"
placeholder="이메일 주소" />
</div>
</div>
</div>
<div class="col-md-6 select2-primary">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end" for="phoneNo">전화번호(유선)</label>
<div class="col-sm-9">
<input name="phoneNo" type="text" data-map="TELNO" class="form-control phone-mask"
placeholder="000-0000-0000" />
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end" for="faxNo">팩스</label>
<div class="col-sm-9">
<input name="faxNo" type="text" data-map="FXNO" class="form-control phone-mask"
placeholder="000-0000-0000"/>
</div>
</div>
</div>
<c:if test="${cntnSeCd == '01'}">
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end" for="positionName">직위</label>
<div class="col-sm-9">
<input name="positionName" type="text" data-map="POS_NM" class="form-control"
placeholder="직위"/>
</div>
</div>
</div>
</c:if>
<c:if test="${cntnSeCd == '02'}">
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end" for="mobilePhoneNo">휴대전화</label>
<div class="col-sm-9">
<input name="mobilePhoneNo" type="text" data-map="MBL_TELNO" class="form-control"
placeholder="휴대전화"/>
</div>
</div>
</div>
</c:if>
<div class="col-md-6">
<div class="row">
<label class="col-sm-3 col-form-label text-sm-end" for="status">상태</label>
<div class="col-sm-9">
<select name="status" class="form-select no-bgi" data-map="STTS" title="상태" disabled>
<option value="A">신청</option>
<option value="P">승인</option>
</select>
</div>
</div>
</div>
</div>
<div class="row mt-4 justify-content-end">
<div class="col-md-6">
<div class="row justify-content-end">
<div class="col-sm-3">
<button type="button" onclick="userCtrl.saveUser();" class="btn btn-primary">저장</button>
</div>
</div>
</div>
</div>
</form>
<datalist id="allOgdpList">
<c:forEach items="${allOgdpList}" var="item">
<option value="${item.OGDP_CD}">${item.OGDP_NM}</option>
</c:forEach>
</datalist>
<!-- Core JS -->
<script src="<c:url value="/webjars/3rd-party/sneat/libs/popper/popper.js"/>"></script>
<script src="<c:url value="/webjars/3rd-party/sneat/js/bootstrap.js"/>"></script>
<script src="<c:url value="/webjars/3rd-party/sneat/libs/jquery/jquery.js"/>" ></script>
<script src="<c:url value="/webjars/3rd-party/jquery-ui/1.13.2/jquery-ui.js"/>"></script>
<script src="<c:url value="/webjars/3rd-party/sneat/js/config.js"/>"></script>
<script src="<c:url value="/webjars/3rd-party/sneat/libs/perfect-scrollbar/perfect-scrollbar.js"/>"></script>
<script src="<c:url value="/webjars/3rd-party/sneat/js/helpers.js"/>"></script>
<script src="<c:url value="/webjars/3rd-party/sneat/js/menu.js"/>"></script>
<!-- base -->
<script src="/webjars/js/base/base.js"></script>
<script src="/webjars/js/base/dataset.js"></script>
<script src="/webjars/js/base/user.js"></script>
<script src="/webjars/js/fims/cmmn/fims-base.js"></script>
<script>
var userFields = new FimsFormFields("#user-form");
var userCtrl = newUserControl();
userCtrl.setInfo = obj => {
userFields.set(userCtrl,obj);
let create = isEmpty(obj.USER_ACNT);
if(!create){
$("#btnDuplicate").hide();
}
$("#user-form input[name='account']").prop("readonly", !create);
$("#user-form input[name='name']").prop("readonly", !create);
$("#user-form input[type='password']").each(function(){
let password = $(this).prop("required", create);
let div = password.parent().parent().parent();
if (create) {
div.removeAttr("hidden");
} else
div.attr("hidden","hidden");
});
$("#user-form").find("input,select")
.change(function() {
let input = $(this),
name = input.attr("data-map"),
val = input.val();
userCtrl.setValue(name, val);
})
.onEnterPress(userCtrl.saveUser);
document.querySelector("#user-form input[name='" + (create ? "account" : "name") + "']").focus();
}
userCtrl.onModify = (changed) => {
if (["USER_NM", "EML_ADRS", "MBL_TELNO"].filter(e => changed.includes(e)).length < 1)
return;
userCtrl.dataset.setState();
}
userCtrl.saveUser = () => {
if (!$("#user-form").find("input,select").validInputs()) return;
let match = Array.from(document.querySelectorAll("#user-form input[type='password']"))
.map(input => input.value)
.reduce((total, current) => total == current);
if (!match) {
dialog.alert({
content:"비밀번호와 비밀번호 확인이 다릅니다.",
onClose:function(){
document.querySelector("#user-form input[name='confirmPassword']").focus();
}
});
return;
}
dialog.alert({
content:"현재 사용자 정보를 저장하시겠습니까?",
onOK:() => {
userCtrl.save(userFields.get());
}
});
}
userCtrl.save = (info) => {
var create = isEmpty(info.id)
if(create && "${cntnSeCd}" == "02"){
info.orgID = "${sggCd}";
info.institute = "${institute}";
info.deptCode = "EMPTY00";
info.userSeCd = "21";
}
info.account = info.account.toUpperCase();
ajax.post({
url:!create ? wctx.url("/user/updateMyInfo.do") : wctx.url("/signup.do"),
data:info,
success: (resp) => {
if(resp.saved){
dialog.alert({
content : "저장됐습니다.",
onClose : function() { window.close(); }
});
}
}
});
}
function setOgdpCodeValues(institute, deptCode, sggCd){
$("#user-form [name='institute']").val(institute).trigger("change");
$("#user-form [name='deptCode']").val(deptCode).trigger("change");
$("#user-form [name='orgID']").val(sggCd).trigger("change");
}
$("#btnDuplicate").on("click", function(){
if($("#user-form").find("[name='account']").val() == ""){
alert("계정을 입력하세요.");
return;
}
if($("#user-form").find("[name='institute']").val() == ""){
alert("기관을 선택하세요.");
return;
}
ajax.get({
url : wctx.url("/duplicate.do"),
data : {
account : $("#user-form").find("[name='account']").val(),
sggCd : $("#user-form").find("[name='orgID']").val()
},
success : resp => {
if(resp.duplicate){
alert("이미 존재하는 ID입니다.");
} else {
alert("사용할 수 있는 ID입니다.");
}
}
});
});
var userInfo = ${userInfo};
if(userInfo.USER_ID == null && "${cntnSeCd}" == "02"){
userInfo.ORG_ID = "${sggCd}";
userInfo.NSTT_CD = "${institute}";
userInfo.USER_SE_CD = "21";
userInfo.CNTN_SE_CD = "02";
}
userCtrl.setInfo(userInfo);
wctx.csrf = window.opener.wctx.csrf;
</script>
</body>
</html>

@ -0,0 +1,317 @@
<%@ 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>
<!-- inner page html -->
<div class="content-pop">
<!-- Content -->
<div class="container flex-grow-1 px-0">
<div class="card">
<!-- 상단 버튼 -->
<div class="container-page-btn">
<button type="button" class="btn btn-outline-dark w-px-120" id="btnReset--${pageName}" title="초기화">
초기화
</button>
<span class="container-window-btn-right">
<button type="button" class="btn btn-search w-px-120" id="btnSearch--${pageName}" title="검색">
검색
</button>
<button type="button" class="btn btn-primary w-px-120" id="btnOK--${pageName}" title="확인">
확인
</button>
</span>
</div>
<!-- 상단 버튼 -->
<!-- 검색 조건 영역 -->
<form id="frmSearch--${pageName}" name="frmSearch">
<!-- hidden -->
<input type="text" id="sggCd--${pageName}" name="sggCd" />
<input type="text" id="deptCd--${pageName}" name="deptCd" />
<!-- 메인 조건 -->
<div class="container-search">
<div class="row g-1">
<div class="col-6">
<select class="form-select" id="by--${pageName}" name="by" onchange='$("#term--${pageName}").focus();'>
<option value="${infoPrefix}Name">이름</option>
<option value="${infoPrefix}Account">계정</option>
</select>
<input type="text" class="form-control" id="term--${pageName}" name="term" autofocus placeholder="조회 조건을 입력하십시오.">
</div>
<div class="col-6">
</div>
</div>
</div>
<!-- 메인 조건 -->
</form>
<!-- 검색 조건 영역 -->
<!-- 업무 버튼 및 건수 표시 -->
<div>
<span class="container-page-btn">
<!-- 건수, 페이지 표시 -->
<div class="d-flex flex-row justify-content-between">
<span class="dataTables_info" id="paging--${pageName}PagingInfo" role="status" aria-live="polite"></span>
<ul class="pagination pagination-primary" id="paging--${pageName}">
</ul>
</div>
<!-- 업무 버튼 -->
<span class="container-window-btn-right">
</span>
</span>
</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-400" 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: 200px;">부서명</th>
<th class="cmn" style="width: 160px;">사용자계정</th>
<th class="cmn" style="width: 160px;">사용자이름</th>
<th class="cmn" style="width: 120px;">상태</th>
<th class="cmn" style="width: 180px;">등록일시</th>
<th class="cmn dummy-th"></th>
</tr>
</thead>
<tbody id="tbody--${pageName}">
</tbody>
<template id="${infoPrefix}Row--${pageName}">
<tr data-key="{USER_ID}">
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{ROW_NUM}</td>
<td class="cmn text-start" onclick="{onclick}" ondblclick="{ondblclick}">{DEPT_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{USER_ACNT}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{USER_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{STTS_NM}</td>
<td class="cmn text-center" onclick="{onclick}" ondblclick="{ondblclick}">{REG_DT}</td>
<td class="cmn dummy-td"></td>
</tr>
</template>
<template id="${infoPrefix}NotFound--${pageName}">
<tr class="odd">
<td valign="top" colspan="8" class="dataTables_empty text-center">${prefixName} 정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</div>
</div>
</div> <!-- DataTables(그리드) -->
</div> <!-- <div class="card"> -->
</div> <!-- <div class="container flex-grow-1 px-0"> -->
<!-- Content -->
</div>
<!-- / inner page html <div class="content-pop"> -->
<script>
/**************************************************************************
* 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({
prefix: "user"
, prefixName: "사용자"
, keymapper: info => info ? info.USER_ID : ""
, dataGetter: obj => obj.${infoPrefix}List
, appendData: true
, formats: {
REG_DT: datetimeFormat
}
});
// $P.control 설정
$P.control.defaultFetchSize = FETCH_XS; // 1 페이지당 조회되는 자료 건수 index.jsp에서 확인 FETCH_XS = 30
$P.control.query = { pageNum : 1, fetchSize : $P.control.defaultFetchSize };
$P.control.beforeCurrent = null;
/**************************************************************************
* DatasetControl 이벤트
**************************************************************************/
// Dataset 변경 이벤트
$P.control.onDatasetChange = (obj, option) => {
$P.renderList(obj.${infoPrefix}Total, option);
$("#paging--${pageName}").setPagingInfo({
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.onCurrentChange = (item) => {
if (!item) return;
let key = item.data.USER_ID;
$("#tbody--${pageName}").setCurrentRow(key);
};
/**************************************************************************
* DataTables 이벤트
**************************************************************************/
// DataTables에 click, dbclick 이벤트
$P.renderList = (totalSize, option) => {
let ${infoPrefix}List = $P.control.dataset;
let empty = ${infoPrefix}List.empty;
let trs = empty ?
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
${infoPrefix}List.inStrings(
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
(str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].control.setCurrent('" + dataItem.getValue("USER_ID") + "');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].fnOK('" + dataItem.getValue("USER_ID") + "');")
);
let noMore = (${infoPrefix}List.length >= totalSize);
let initScroll = ($P.control.query.pageNum < 2);
if (option != null && option.reloaded) {
initScroll = false;
}
$("#table-responsive--${pageName}")[0].changeContent(trs.join(), initScroll, noMore);
//보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
}
// DataTables에 스크롤이 맨 밑으로 이동했을 때 이벤트
$P.scrollDataList = () => {
$P.control.load($P.control.query.pageNum + 1);
}
/**************************************************************************
* 사용자 함수(function)
**************************************************************************/
// 검색 자료 재조회
$P.fnRefreshList = () => {
$P.control.reload({all : true});
}
/**************************************************************************
* 버튼 clickEvent
**************************************************************************/
// 업무 구분 변경 이벤트
$P.fnResetAndChangeBiz = (taskSeCd) => {
// 업무 구분 코드
if (typeof taskSeCd == "undefined" || taskSeCd == null || taskSeCd == "") {
taskSeCd = $("#layout-navbar input[name='taskSeCd']:checked").val();
}
// 초기 기본 설정
$P.initForm(taskSeCd);
// 업무 구분별 설정
$P.setTask(taskSeCd);
// dataset 초기화
$P.control.dataset.clear();
}
// 검색 버튼 클릭 이벤트
$P.fnSearchList = () => {
// 검색조건
$P.control.query = $P.formFields.get(); // 검색 조건
if($P.control.query.by == "userAccount"){
$P.control.query.term = $P.control.query.term.toUpperCase();
}
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.useYn = "Y"; // 사용 여부
$P.control.load(1);
}
// 확인
$P.fnOK = (userId) => {
// 사용자 ID
if (typeof userId == "undefined" || userId == null || userId == "") {
userId = $P.control.dataset.getValue("USER_ID");
}
if ("${callbackFuncName}" != "") {
${callbackFuncName}(userId, $P.control.dataset.getValue("USER_NM"));
}
dialog.close($("#frmSearch--${pageName}").parents(".modal")[0].id);
}
/**************************************************************************
* 초기 설정
**************************************************************************/
// 이벤트
$P.setEvent = () => {
// 기본 버튼 이벤트
$("#btnReset--${pageName}").on("click", () => $P.fnResetAndChangeBiz()); // 초기화
$("#btnSearch--${pageName}").on("click", () => $P.fnSearchList()); // 검색
$("#btnOK--${pageName}").on("click", () => $P.fnOK()); // 확인
// 동적검색에서 엔터(Enter) 키를 누르면 검색한다.
$("#term--${pageName}").onEnterPress(function() {
$P.fnSearchList();
});
// DataTables width 변경 조정
Componentization.fnMakeResizableTable($("#table-responsive--${pageName}")[0]);
// DataTables 스크롤 이벤트 생성
Componentization.fnMakeScrollableTable($("#table-responsive--${pageName}")[0], $P.scrollDataList);
}
// 화면 초기 설정
$P.initForm = (taskSeCd) => {
// 화면 초기화
$("#frmSearch--${pageName}")[0].reset();
// input 이 1개밖에 없으면 submit 으로 동작하기 때문에 text 로 지정하고 hide 처리하였다.
$("#sggCd--${pageName}").hide();
$("#deptCd--${pageName}").hide();
// 기본 데이터 설정
$("#sggCd--${pageName}").val("${sggCd}"); // 시군구 코드
$("#deptCd--${pageName}").val("${deptCd}"); // 부서 코드
$("#userAcnt--${pageName}").val("${userAcnt}"); // 사용자 계정
}
// 업무 구분별 설정
$P.setTask = (taskSeCd) => {
// 업무구분에 따른 URL 설정
$P.control.urls.load = wctx.url("/user/list.do"); // 검색
}
/**************************************************************************
* 최초 실행 함수
**************************************************************************/
// 1. 이벤트 설정
$P.setEvent();
// 2. 초기 설정 및 업무 구분 변경
$P.fnResetAndChangeBiz($("#layout-navbar input[name='taskSeCd']:checked").val());
// 3. 보안모드
fn_securityModeToggle($("#securityMode--top").is(":checked"));
});
</script>
Loading…
Cancel
Save