시군구 정보 관리 화면 추가

main
이범준 11 months ago
parent 05aedda926
commit 36d0cc743c

@ -49,6 +49,7 @@
, V.OPER_ITEM_CD /* 운영 항목 코드 */
, V.OPER_ITEM_NM /* 운영 항목 명 */
, V.SPCL_BIZ_CD /* 특별회계 사업 코드 */
, V.SPCL_BIZ_NM /* 특별회계 사업 명 */
, V.USE_YN /* 사용 여부 */
, V.REG_DT /* 등록 일시 */
, V.RGTR /* 등록자 */

@ -1,4 +1,356 @@
<%@ 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">
<form id="mainForm--${pageName}">
<div class="card my-2">
<div class="mx-3 my-2 d-block">
<span class="h3">
시군구 정보
</span>
<span>
<button type="button" onclick="" class="btn btn-primary w-px-100" style="float:right"
disabled>저장</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="sggCd" 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-12">
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">
주소
</label>
<input name="instZip" type="text" class="form-control w-px-60" />
<input name="instAddr" type="text" class="form-control w-px-300" />
<input name="instDaddr" type="text" class="form-control w-px-300" />
</div>
<div class="col-md-4" style="display: flex;align-items: center;">
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">
직인
</label>
<img id="offcs--${pageName}" alt="파일이 없습니다." src="/resources/image/no-image.png"
style="object-fit:contain;max-width:100px;max-heigt:100px;" />
<input name="" type="hidden" />
<input name="" type="hidden" />
</div>
<div class="col-md-4" style="display: flex;align-items: center;">
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">
심볼
</label>
<img id="symbol--${pageName}" alt="파일이 없습니다." src="/resources/image/no-image.png"
style="object-fit:contain;max-width:100px;max-heigt:100px;" />
<input name="" type="hidden" />
<input name="" type="hidden" />
</div>
<div class="col-md-4" style="display: flex;align-items: center;">
<label class="w-px-140 col-form-label text-sm-end pe-2" for="">
로고
</label>
<img id="logo--${pageName}" alt="파일이 없습니다." src="/resources/image/no-image.png"
style="object-fit:contain;max-width:100px;max-heigt:100px;" />
<input name="" type="hidden" />
<input name="" type="hidden" />
</div>
</div>
</div>
</form>
<div class="card my-2">
<div class="mx-3 my-2 d-block">
<span class="h3">
시군구 업무 정보
</span>
</div>
<div id="" class="nav-align-top my-2 mx-2" style="flex-direction: row;">
<ul class="nav nav-tabs" role="tablist" id="tabButtonContainer--${pageName}">
</ul>
<button type="button" class="btn btn-darkgray ms-1">+ 과태료업무 추가</button>
</div>
<span class="tab-content" id="tabContentContainer--${pageName}">
</span>
</div>
</div>
</div>
</div>
<template id="taskTabButtonTemplate--${pageName}">
<li class="nav-item">
<button type="button" class="nav-link {active} w-px-150"
role="tab" data-bs-toggle="tab" data-bs-target="#tab{task}--${pageName}"
onclick="">
{taskNm}
</button>
</li>
</template>
<template id="taskTabContentsTemplate--${pageName}">
<span id="tab{task}--${pageName}" class="tab-pane {activeshow}" role="tabpanel">
<div class="mx-3 my-2 d-block">
<span>
<button type="button" onclick="" class="btn btn-primary w-px-100" style="float:right"
disabled>저장</button>
</span>
</div>
<form id="{task}Form--${pageName}">
<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="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="advntceRductRt" 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="wksnRductRt" type="text" class="form-control w-px-50" />
</div>
<div class="col-md-3">
</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>
<button id="btn{task}AddVltn--${pageName}" type="button" class="btn btn-darkgray ms-2">+ 위반항목 추가</button>
<div class="card-datatable text-nowrap area-photoinspection mx-2 mt-2 mb-3">
<div id="{task}Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="{task}table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:300px;overflow-y: scroll;">
<table id="{task}Table_0--${pageName}"
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 id="{task}tbody--${pageName}"></tbody>
</table>
</div>
</div>
</div>
</form>
</span>
</template>
<template id="taskTbodyTemplate--${pageName}">
<tr data-key="{VLTN_ID}">
<td>{VLTN_CD}</td>
<td><input type="text" class="form-control w-100" value="{VLTN_ARTCL}" /></td>
<td><input type="text" class="form-control w-100" value="{VLTN_LAW_NM}" /></td>
<td><input type="text" class="form-control w-100" value="{VLTN_LAW1}" /></td>
<td><input type="text" class="form-control w-100" value="{VLTN_LAW2}" /></td>
<td><input type="text" class="form-control w-100" value="{VLTN_LAW_ETC}" /></td>
<td><input type="text" class="form-control w-100" value="{ACNTG_SE_CD}" /></td>
<td><input type="text" class="form-control w-100" value="{ACNTG_SE_NM}" /></td>
<td><input type="text" class="form-control w-100" value="{TXITM_CD}" /></td>
<td><input type="text" class="form-control w-100" value="{TXITM_NM}" /></td>
<td><input type="text" class="form-control w-100" value="{OPER_ITEM_CD}" /></td>
<td><input type="text" class="form-control w-100" value="{OPER_ITEM_NM}" /></td>
<td><input type="text" class="form-control w-100" value="{SPCL_BIZ_CD}" /></td>
<td><input type="text" class="form-control w-100" value="{SPCL_BIZ_NM}" /></td>
</tr>
</template>
<script>
pageObject["${pageName}"] = {};
$(document).ready(function(){
var $P = pageObject["${pageName}"];
$P.sggInfo = {};
$P.taskList = [];
$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("user/stngInfo.do"),
data: { type : "sgg" },
success : function(resp, textStatus, jqXHR) {
$P.sggInfo = resp.stngInfo;
$("#mainForm--${pageName}").find("[name='sggCd']").val($P.sggInfo.SGG_CD);
$("#mainForm--${pageName}").find("[name='sggNm']").val($P.sggInfo.SGG_NM);
$("#mainForm--${pageName}").find("[name='instCd']").val($P.sggInfo.INST_CD);
$("#mainForm--${pageName}").find("[name='instNm']").val($P.sggInfo.INST_NM);
$("#mainForm--${pageName}").find("[name='instZip']").val($P.sggInfo.INST_ZIP);
$("#mainForm--${pageName}").find("[name='instAddr']").val($P.sggInfo.INST_ADDR);
$("#mainForm--${pageName}").find("[name='instDaddr']").val($P.sggInfo.INST_DADDR);
$("#offcs--${pageName}").attr("alt", $P.sggInfo.OFFCS_FILE_NM);
$("#offcs--${pageName}").attr("src", $P.sggInfo.OFFCS_FILE_PATH);
$("#symbol--${pageName}").attr("alt", $P.sggInfo.SYMBOL_FILE_NM);
$("#symbol--${pageName}").attr("src", $P.sggInfo.SYMBOL_FILE_PATH);
$("#logo--${pageName}").attr("alt", $P.sggInfo.LOGO_FILE_NM);
$("#logo--${pageName}").attr("src", $P.sggInfo.LOGO_FILE_PATH);
resolve({resp, textStatus, jqXHR});
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
$P.getSggTaskInfo = async function(){
return new Promise((resolve, reject) => {
ajax.get({
url: wctx.url("mngt/mngt03/getTasks.do"),
data: { useYN : "Y", sggCd : MY_INFO.info.sggCd },
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 = document.getElementById("taskTabButtonTemplate--${pageName}").innerHTML;
var tabContentsTemplate = document.getElementById("taskTabContentsTemplate--${pageName}").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);
}
$("#tabButtonContainer--${pageName}").html(tabs.join(""));
$("#tabContentContainer--${pageName}").html(contents.join(""));
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;
$("#"+taskSeCd+"Form--${pageName}").find("[name='advntceDayCnt']").val(task.ADVNTCE_DAY_CNT);
$("#"+taskSeCd+"Form--${pageName}").find("[name='advntceRductRt']").val(task.ADVNTCE_RDUCT_RT);
$("#"+taskSeCd+"Form--${pageName}").find("[name='wksnRductRt']").val(task.WKSN_RDUCT_RT);
$("#"+taskSeCd+"Form--${pageName}").find("[name='ffnlgAdtnYmd']").val(task.FFNLG_ADTN_YMD);
$("#"+taskSeCd+"Form--${pageName}").find("[name='ffnlgAdtnRt']").val(task.FFNLG_ADTN_RT);
$("#"+taskSeCd+"Form--${pageName}").find("[name='ffnlgInadtnRt']").val(task.FFNLG_INADTN_RT);
$("#"+taskSeCd+"Form--${pageName}").find("[name='ffnlgInadtnMxmmCnt']").val(task.FFNLG_INADTN_MXMM_CNT);
}
resolve({resp, textStatus, jqXHR});
},
error: function(jqXHR, textStatus, error) {
}
});
});
};
$P.getVltnInfo = async function(){
return new Promise((resolve, reject) => {
ajax.get({
url: wctx.url("mngt/mngt03/getVltns.do"),
data: { useYN : "Y", sggCd : MY_INFO.info.sggCd },
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 = document.getElementById("taskTbodyTemplate--${pageName}").innerHTML;
var taskDataset = $P.taskDatasets[taskSeCd+"Dataset"];
var trs = taskDataset.empty ? [""] : taskDataset.inStrings(template);
$("#"+taskSeCd+"tbody--${pageName}").html(trs.join());
}
resolve({resp, textStatus, jqXHR});
},
error: function(jqXHR, textStatus, error) {
}
});
});
}
$P.getSggInfo()
.then(() => {
return $P.getSggTaskInfo();
})
.then(() => {
return $P.getVltnInfo();
})
.then(() => {
console.log('end...');
});
});
</script>
Loading…
Cancel
Save