감경부과 등록 수정.
parent
66e44dbe3c
commit
187fef2946
@ -0,0 +1,205 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
|
||||
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
|
||||
|
||||
<!-- inner page html -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content -->
|
||||
<div class="container flex-grow-1 px-0">
|
||||
<c:set var="prefixName" scope="request">부과 정보</c:set>
|
||||
|
||||
<!-- Page Body -->
|
||||
<div class="card">
|
||||
<!-- 입력 영역 -->
|
||||
<form id="frmEdit--${pageName}" name="frmEdit">
|
||||
<!-- hidden -->
|
||||
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
|
||||
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
|
||||
|
||||
<div class="row g-1">
|
||||
<!-- 총건수 -->
|
||||
<div class="col-md-12">
|
||||
<label for="tnocs--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">총 건수/금액</label>
|
||||
<input type="text" class="form-control w-px-80" id="tnocs--${pageName}" name="tnocs" data-map="TNOCS" readonly />
|
||||
<input type="text" class="form-control w-px-120" id="gramt--${pageName}" name="gramt" data-map="GRAMT" readonly />
|
||||
</div>
|
||||
<!-- 회계연도 -->
|
||||
<div class="col-md-12">
|
||||
<label for="fyr--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">회계연도</label>
|
||||
<input type="text" class="form-control w-px-80" id="fyr--${pageName}" name="fyr" data-map="FYR" autocomplete="off" required />
|
||||
</div>
|
||||
<!-- 부과 일자 -->
|
||||
<div class="col-md-12">
|
||||
<label for="levyYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">부과일자</label>
|
||||
<input type="text" class="form-control form-date" id="levyYmd--${pageName}" name="levyYmd" data-map="LEVY_YMD"
|
||||
data-fmt-type="day" autocomplete="off" title="날짜 선택" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 납기 일자 -->
|
||||
<div class="col-md-12">
|
||||
<label for="dudtYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">납기일자</label>
|
||||
<input type="text" class="form-control form-date" id="dudtYmd--${pageName}" name="dudtYmd" data-map="DUDT_YMD"
|
||||
data-fmt-type="day" autocomplete="off" title="날짜 선택" maxlength="10" required />
|
||||
<button type="button" class="bx bx-sm bx-calendar bg-white"></button>
|
||||
</div>
|
||||
<!-- 감경율 -->
|
||||
<div class="col-md-12">
|
||||
<label for="rductRt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">감경율</label>
|
||||
<input type="text" class="form-control w-px-120" id="rductRt--${pageName}" name="rductRt" data-map="RDUCT_RT"
|
||||
autocomplete="off" required readonly />
|
||||
</div>
|
||||
</div>
|
||||
</form> <!-- /입력 영역 -->
|
||||
</div> <!-- <div class="card"> -->
|
||||
|
||||
<!-- 업무 버튼 표시 -->
|
||||
<div>
|
||||
<span class="container-page-btn">
|
||||
<span class="container-window-btn-right">
|
||||
<!-- 업무 버튼 -->
|
||||
<button type="button" class="btn btn-primary w-px-80" id="btnSave--${pageName}" title="저장" onclick="fnSave${pageName}()">
|
||||
저장
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- / 업무 버튼 표시 -->
|
||||
|
||||
</div> <!-- / Content <div class="container flex-grow-1 px-0"> -->
|
||||
</div> <!-- / inner page html <div class="content-wrapper"> -->
|
||||
|
||||
<script>
|
||||
/**************************************************************************
|
||||
* Global Variable
|
||||
**************************************************************************/
|
||||
// URL
|
||||
var ${pageName}PrefixUrl = "/excl/excl01";
|
||||
// FormFields
|
||||
var ${pageName}Fields = new FimsFormFields("#frmEdit--${pageName}");
|
||||
//
|
||||
var ${pageName}Query = ${levyQuery};
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl
|
||||
**************************************************************************/
|
||||
var ${pageName}Control = new DatasetControl({
|
||||
prefix : "rductLevy"
|
||||
, prefixName : "감경부과"
|
||||
, keymapper : info => info ? info.CRDN_ID : ""
|
||||
, dataGetter : obj => obj.levyExclInfo
|
||||
, urls : {
|
||||
create : wctx.url(${pageName}PrefixUrl + "/020/create.do") // 등록
|
||||
, update : wctx.url(${pageName}PrefixUrl + "/020/update.do") // 수정
|
||||
}
|
||||
});
|
||||
|
||||
${pageName}Control.onCurrentChange = item => {
|
||||
if (!item) return;
|
||||
|
||||
// Dataset 셋팅
|
||||
${pageName}Fields.set(item);
|
||||
|
||||
// 업무구분에 따른 url 변경
|
||||
${pageName}Control.urls.create = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/create.do");
|
||||
${pageName}Control.urls.update = wctx.url(item.data.TASK_SE_CD + ${pageName}PrefixUrl + "/020/update.do");
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* DatasetControl 이벤트
|
||||
**************************************************************************/
|
||||
// 저장 callback
|
||||
${pageName}Control.onSave = (resp) => {
|
||||
let dialogTitle = $("#" + ${pageName}Control.prefix + "Dialog").find("h5.modal-title").html();
|
||||
let showMessage = resp.retMessage.replace(/[S]|[F]/g, dialogTitle);
|
||||
|
||||
dialog.alert(showMessage);
|
||||
|
||||
if (resp.saved) {
|
||||
dialog.close(${pageName}Control.prefix + "Dialog");
|
||||
|
||||
if ("${savedCallbackFuncName}" != "") {
|
||||
${savedCallbackFuncName}(resp.saved);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 저장
|
||||
${pageName}Control.save = (info) => {
|
||||
if (!info) return;
|
||||
|
||||
let create = isEmpty(info.levyExclId);
|
||||
|
||||
// 민원 접수 관리에서 호출했다면..
|
||||
if (create && "${saveCallbackFuncName}" != "") {
|
||||
${saveCallbackFuncName}(info);
|
||||
} else {
|
||||
ajax.post({
|
||||
url : !create ? ${pageName}Control.urls.update : ${pageName}Control.urls.create
|
||||
, data : info
|
||||
, success : resp => ${pageName}Control.onSave(resp)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
/**************************************************************************
|
||||
* 초기 셋팅
|
||||
**************************************************************************/
|
||||
// 이벤트 설정
|
||||
setEvent${pageName} = () => {
|
||||
// form-date 항목에서 키보드로 입력시 날짜 포맷팅 적용
|
||||
$("#frmEdit--${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);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 검색조건 초기값 셋팅
|
||||
setForm${pageName} = () => {
|
||||
// 달력 초기화
|
||||
initDatepicker("frmEdit--${pageName}");
|
||||
$("#levyYmd--${pageName}").datepicker("setDate", new Date());
|
||||
$("#dudtYmd--${pageName}").datepicker("setDate", new Date());
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* function
|
||||
**************************************************************************/
|
||||
// 저장
|
||||
fnSave${pageName} = () => {
|
||||
// validate 확인
|
||||
if (!customValidate($("#frmEdit--${pageName}").find("input, select, textarea"))) return;
|
||||
|
||||
dialog.alert({
|
||||
content : "현재 " + ${pageName}Control.prefixName + " 정보를 저장하시겠습니까?"
|
||||
, onOK : () => {
|
||||
${pageName}Control.save(${pageName}Fields.get());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* script 진입
|
||||
**************************************************************************/
|
||||
$(document).ready(function() {
|
||||
// 이벤트 설정
|
||||
setEvent${pageName}();
|
||||
|
||||
// 화면 초기 설정
|
||||
setForm${pageName}();
|
||||
|
||||
// Dataset 셋팅
|
||||
${pageName}Control.setData([${rductLevyYmdInfo}]);
|
||||
debugger;
|
||||
});
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue