부과예고 계산식 중간저장...

소스 점검 및 정리
dev
박성영 3 months ago
parent f98da123d0
commit 33eba72f33

@ -71,6 +71,7 @@
MDFR
from tb_cmpttn_rt_2
where USE_YN = 'Y'
order by CMPTTN_RT_2_CD asc
</select>
</mapper>

@ -124,6 +124,63 @@
<li class="tit">이행강제금 산출조사서</li>
</ul>
<div id="dynamicViewer">
<%-- 해당년도 시가표준액 계산 --%>
<div class="containers">
<div class="tabels cols2 no-info">
<table class="display" id="calculationTable">
<tr>
<th rowspan="3" style="width: 100px;">${crdnData.crdnYr} 년도</th>
<th style="border-right: 0; border-bottom: 0;">건물<br/>기준시가액</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">구조지수</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">용도지수</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">위치지수</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">경과년수<br/>별잔가율</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">기초공시율</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">건축물<br/>과세시가</th>
<th style="border-bottom: 0;">시가표준액<br/>(1,000원미만절삭)</th>
</tr>
<tr>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input numericMask" id="bldgNewPrcCrtrAmt_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input" id="strctIdx_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input" id="usgIdx_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input numericMask" id="pstnIdx_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input" style="text-align: right;" id="elpsYrRdvlrt_yr" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;">
<select id="bscsCstrnSeCd" name="bscsCstrnSeCd" class="input" validation-check="required">
<option value="">선택하세요</option>
<c:forEach var="code" items="${bscsCstrnSeCdList}">
<option value="${code.cdId}">${code.cdNm}</option>
</c:forEach>
</select>
</td>
<td rowspan="2" style="width: 23px; border-right: 0;">=</td>
<td rowspan="2" style="border-right: 0; border-bottom: 0;"><input type="text" class="input numericMask" id="taxableMarketPrice" readonly/></td>
<td rowspan="2" style="border-bottom: 0;"><input type="text" class="input numericMask" id="standardMarketPrice" readonly/></td>
</tr>
<tr>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input numericMask" id="bldgNewPrcCrtrAmt" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="strctIdx" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="usgIdx" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="pstnIdx" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask4" id="elpsYrRdvlrt" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="bscsCstrnRt" readonly/></td>
</tr>
</table>
</div>
</div>
<div class="containers">
<div class="tabels cols2 no-info">
<table class="display">
@ -151,8 +208,14 @@
</td>
<td rowspan="2" style="width: 23px; border-right: 0; border-bottom: 0;">X</td>
<td style="border-right: 0; border-bottom: 0; padding: 0 !important;">
<button type="button" id="" class="newbtn bg2-1" style="width: 93px; padding: 5px 5px;">+ 가산 [100%]</button>
<button type="button" id="" class="newbtn bg6" style="width: 90px;padding: 5px 5px;">- 감산 [100%]</button>
<button type="button" id="btnOpenAddPopup" class="newbtn bg2-1" style="width: 93px; padding: 5px 5px;">+ 가산 [100%]</button>
<button type="button" id="btnOpenMinusPopup" class="newbtn bg6" style="width: 90px;padding: 5px 5px;">- 감산 [100%]</button>
<input type="hidden" id="adsbmtnRtCdAdd" value=""/>
<input type="hidden" id="adsbmtnRtAdd" value=""/>
<input type="hidden" id="adsbmtnRtRateAdd" value=""/>
<input type="hidden" id="adsbmtnRtCdMinus" value=""/>
<input type="hidden" id="adsbmtnRtMinus" value=""/>
<input type="hidden" id="adsbmtnRtRateMinus" value=""/>
</td>
<td rowspan="2" style="width: 23px; border-right: 0; border-bottom: 0;">X</td>
<td rowspan="2" style="border-right: 0; border-bottom: 0;">
@ -187,61 +250,7 @@
</table>
</div>
</div>
<%-- 해당년도 시가표준액 계산 --%>
<div class="containers">
<div class="tabels cols2 no-info">
<table class="display" id="calculationTable">
<tr>
<th rowspan="3" style="width: 100px;">${crdnData.crdnYr} 년도</th>
<th style="border-right: 0; border-bottom: 0;">건물<br/>기준시가액</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">구조지수</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">용도지수</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">위치지수</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">경과년수<br/>별잔가율</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">기초공시율</th>
<th style="width: 23px; border-right: 0; border-bottom: 0;"></th>
<th style="border-right: 0; border-bottom: 0;">건축물<br/>과세시가</th>
<th style="border-bottom: 0;">시가표준액<br/>(1,000원미만절삭)</th>
</tr>
<tr>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input numericMask" id="bldgNewPrcCrtrAmt_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input" id="strctIdx_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input" id="usgIdx_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input numericMask" id="pstnIdx_nm" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;"><input type="text" class="input" style="text-align: right;" id="elpsYrRdvlrt_yr" readonly/></td>
<td rowspan="2" style="width: 23px; border-right: 0;">X</td>
<td style="border-right: 0; border-bottom: 0;">
<select id="bscsCstrnSeCd" name="bscsCstrnSeCd" class="input" validation-check="required">
<option value="">선택하세요</option>
<c:forEach var="code" items="${bscsCstrnSeCdList}">
<option value="${code.cdId}">${code.cdNm}</option>
</c:forEach>
</select>
</td>
<td rowspan="2" style="width: 23px; border-right: 0;">=</td>
<td rowspan="2" style="border-right: 0; border-bottom: 0;"><input type="text" class="input numericMask" id="taxableMarketPrice" readonly/></td>
<td rowspan="2" style="border-bottom: 0;"><input type="text" class="input numericMask" id="standardMarketPrice" readonly/></td>
</tr>
<tr>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input numericMask" id="bldgNewPrcCrtrAmt" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="strctIdx" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="usgIdx" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="pstnIdx" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input numericMask" id="elpsYrRdvlrt" readonly/></td>
<td style="border-right: 0; border-top: 0;"><input type="text" class="input decimalMask" id="bscsCstrnRt" readonly/></td>
</tr>
</table>
</div>
</div>
</div>
</div>
@ -497,17 +506,27 @@
});
// 저장 버튼
$('#btnSave').on('click', function() {
$('#btnSave').on('click', function () {
self.save();
});
// 닫기 버튼 이벤트 바인딩
$('.modalclose').on('click', function(e) {
$('.modalclose').on('click', function (e) {
e.preventDefault();
self.cancel();
});
$('#bscsCstrnSeCd').on('change', function() { // 기초공사구분 변경 시
// 가산 버튼 이벤트 바인딩
$('.btnOpenAddPopup').on('click', function (e) {
self.openAddMinusPopup('add');
});
// 감산 버튼 이벤트 바인딩
$('.btnOpenMinusPopup').on('click', function (e) {
self.openAddMinusPopup('minus');
});
$('#bscsCstrnSeCd').on('change', function () { // 기초공사구분 변경 시
var focusedCell = self.grid.instance.getFocusedCell();
if (focusedCell && focusedCell.rowKey !== null) {
var rowData = self.grid.instance.getRow(focusedCell.rowKey);
@ -524,7 +543,7 @@
rate = "";
}
$('#bscsCstrnRt').val(rate).trigger('focus'); // 기초공사율 설정
// 자동계산 함수 호출
calculateAuto();
}
@ -532,7 +551,7 @@
});
// 산정률2 선택 시 산정률2 input에 값 설정
$('#cmpttnRt2Cd').on('change', function() {
$('#cmpttnRt2Cd').on('change', function () {
var selectedOption = $(this).find('option:selected');
var rateValue = selectedOption.attr('rateValueAttribute');
$('#actCmpttnRt').val(rateValue || '').trigger('focus');
@ -547,10 +566,22 @@
* 팝업 취소 처리
* 중요한 로직 주석: 팝업창을 닫는 기능을 제공합니다.
*/
cancel: function() {
cancel: function () {
window.close();
},
openAddMinusPopup: function (type) {
var adsbmtnRtCd = "";
if( type === 'add' ){
adsbmtnRtCd = $('#adsbmtnRtCdAdd').val();
}else{
adsbmtnRtCd = $('#adsbmtnRtCdMinus').val();
}
var url = '<c:url value="/crdn/crndRegistAndView/crdnLevyPrvntc/LevyAddMinusPopup.do"/>?type=' +
encodeURIComponent(type) + '&adsbmtnRtCd=' +
encodeURIComponent(adsbmtnRtCd);
openPopup(url, 800, 700, 'LevyAddMinusPopup');
},
/**
* 저장

@ -60,6 +60,18 @@ $(document).ready(function () {
});
});
// 중요로직: - decimal(4,4) 스펙에 맞춤
$("body").on("focus", ".decimalMask4", function () {
$(this).inputmask("numeric", {
autoGroup: true, // 그룹화 사용 안함
allowMinus: false, // 음수 사용 안함
autoUnmask: true,
groupSeparator: ",", // 그룹 구분자 없음
repeat: 1, // 정수부 최대 1자리 (0)
digits: 4, // 소수점 최대 4자리
});
});
// 중요로직: PTOUT 지적 전용 마스크 - decimal(22,2) 스펙에 맞춤
$("body").on("focus", ".ptoutMask", function () {
$(this).inputmask("numeric", {
@ -150,7 +162,7 @@ $(document).ready(function () {
groupSeparator: ",", // 그룹 구분자 없음
repeat: 1, // 정수부 최대 1자리 (0)
digits: 4, // 소수점 최대 4자리
max: 0.9999
max: 0.9999,
});
});

@ -1788,6 +1788,10 @@ select[data-auto-color="true"] option[data-color] {
text-align: right;
}
.decimalMask4 {
text-align: right;
}
.decimalMask {
text-align: right;
}

Loading…
Cancel
Save