fix : 설정 > 원가 설정 - 기준일자 datepicker 적용

(cherry picked from commit 56f29943b6)
This commit is contained in:
이대환
2026-06-02 09:47:09 +09:00
parent 913e5bd678
commit 9b2fdee768
2 changed files with 44 additions and 36 deletions

View File

@@ -14,7 +14,7 @@ public class BOCostVO extends AbstractVO {
private int[] ctInnbArr; private int[] ctInnbArr;
/** 기준일자 */ /** 기준일자 */
private int[] stdrDeArr; private String[] stdrDeArr;
/** USD 환율 (1,000 円) */ /** USD 환율 (1,000 円) */
private BigDecimal[] usdRateArr; private BigDecimal[] usdRateArr;

View File

@@ -1,6 +1,7 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %> <%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%-- <%--
@@ -20,11 +21,17 @@
<%-- 공통 include --%> <%-- 공통 include --%>
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %> <%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
</head> </head>
<style>
.datepicker {
text-align: left;
width: 100%;
}
</style>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
// 숫자 처리 // 숫자 처리
$('.sep').each(function () { $('.sep').each(function () {
fn_format_sep($(this)); fn_format_sep($(this));
}); });
}); });
@@ -40,53 +47,54 @@
+ ' <td>' + ' <td>'
+ ' <label class="b-checkbox checkbox is-medium">' + ' <label class="b-checkbox checkbox is-medium">'
+ ' <input type="checkbox" name="costChk" value=""><span class="check"></span>' + ' <input type="checkbox" name="costChk" value=""><span class="check"></span>'
+ ' <input type="hidden" class="input-text number xl" name="ctInnbArr" title="원가고유번호" value="0">' + ' <input type="hidden" class="input-text number xl" name="ctInnbArr" title="원가고유번호" value="0">'
+ ' </label>' + ' </label>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text number xl" name="stdrDeArr" title="기준일자" maxlength="8">' + ' <input type="text" class="datepicker" name="stdrDeArr" title="기준일자" autocomplete="off">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text digit2 xl" name="usdRateArr" title="USD 환율 (1,000 円)" maxlength="25">' + ' <input type="text" class="input-text digit2 xl right" name="usdRateArr" title="USD 환율 (1,000 円)" maxlength="25">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text sep xl" name="jpDlvyCtArr" title="일본 내 물류비" maxlength="25">' + ' <input type="text" class="input-text sep xl right" name="jpDlvyCtArr" title="일본 내 물류비" maxlength="25">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text sep xl" name="intlDlvyAmtArr" title="운임비용(JP)" maxlength="25">' + ' <input type="text" class="input-text sep xl right" name="intlDlvyAmtArr" title="운임비용(JP)" maxlength="25">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text digit2 xl" name="pltfomFeeArr" title="플랫폼 수수료율" maxlength="25">' + ' <input type="text" class="input-text digit2 xl right" name="pltfomFeeArr" title="플랫폼 수수료율" maxlength="25">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text digit3 xl" name="expctTaxArr" title="예상세율" maxlength="25">' + ' <input type="text" class="input-text digit3 xl right" name="expctTaxArr" title="예상세율" maxlength="25">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text sep xl" name="cstmsFeeArr" title="통관수수료" maxlength="25">' + ' <input type="text" class="input-text sep xl right" name="cstmsFeeArr" title="통관수수료" maxlength="25">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ ' <td>' + ' <td>'
+ ' <div class="td-inner">' + ' <div class="td-inner">'
+ ' <input type="text" class="input-text sep xl" name="krDlvyCtArr" title="운임비용(KR)" maxlength="25">' + ' <input type="text" class="input-text sep xl right" name="krDlvyCtArr" title="운임비용(KR)" maxlength="25">'
+ ' </div>' + ' </div>'
+ ' </td>' + ' </td>'
+ '</tr>'; + '</tr>';
$('#tableCostSorting').append(trClone); $('#tableCostSorting').append(trClone);
$('#noData').hide(); $('#noData').hide();
fn_set_datepicker('.datepicker');
} }
/* ******************************************************** /* ********************************************************
@@ -123,10 +131,10 @@
******************************************************** */ ******************************************************** */
const fn_update_cost = function () { const fn_update_cost = function () {
if (confirm('원가 설정을 <spring:message code="confirm.common.save"/>')) { if (confirm('원가 설정을 <spring:message code="confirm.common.save"/>')) {
// 콤마 제거 // 콤마 제거
$('.sep').each(function () { $('.sep').each(function () {
fn_format_sep($(this), false); fn_format_sep($(this), false);
}); });
$.ajax({ $.ajax({
type: 'post', type: 'post',
@@ -137,7 +145,7 @@
location.reload(); location.reload();
} }
}); });
fn_format_sep($(this)); fn_format_sep($(this));
} }
} }
@@ -147,21 +155,21 @@
$(this).val(input.replace(/[^0-9]/g, "")); $(this).val(input.replace(/[^0-9]/g, ""));
}); });
$(document).on('input', '.sep', function () { $(document).on('input', '.sep', function () {
fn_format_sep($(this)); fn_format_sep($(this));
}); });
const fn_format_sep = function ($target, unformat) { const fn_format_sep = function ($target, unformat) {
var value = $target.val(); var value = $target.val();
if (unformat == undefined) { if (unformat == undefined) {
value = value value = value
.replace(/[^0-9]/g, "") .replace(/[^0-9]/g, "")
.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,"); .replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
} else { } else {
value = value.replace(/,/g, ""); value = value.replace(/,/g, "");
} }
$target.val(value); $target.val(value);
} }
// 자릿수 제한 // 자릿수 제한
$(document).on('input', '.digit2', function () { $(document).on('input', '.digit2', function () {
@@ -250,42 +258,42 @@
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text number xl" name="stdrDeArr" title="기준일자" maxlength="8" value="${cost.stdrDe}"> <input type="text" class="datepicker" name="stdrDeArr" title="기준일자" value="${cost.stdrDe}" autocomplete="off">
</div> </div>
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text digit2 xl" name="usdRateArr" title="USD 환율 (1,000 円)" maxlength="25" value="${cost.usdRate}"> <input type="text" class="input-text digit2 xl right" name="usdRateArr" title="USD 환율 (1,000 円)" maxlength="25" value="${cost.usdRate}">
</div> </div>
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text sep xl" name="jpDlvyCtArr" title="일본 내 물류비" maxlength="25" value="${cost.jpDlvyCt}"> <input type="text" class="input-text sep xl right" name="jpDlvyCtArr" title="일본 내 물류비" maxlength="25" value="${cost.jpDlvyCt}">
</div> </div>
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text sep xl" name="intlDlvyAmtArr" title="운임비용(JP)" maxlength="25" value="${cost.intlDlvyAmt}"> <input type="text" class="input-text sep xl right" name="intlDlvyAmtArr" title="운임비용(JP)" maxlength="25" value="${cost.intlDlvyAmt}">
</div> </div>
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text digit2 xl" name="pltfomFeeArr" title="플랫폼 수수료율" maxlength="25" value="${cost.pltfomFee}"> <input type="text" class="input-text digit2 xl right" name="pltfomFeeArr" title="플랫폼 수수료율" maxlength="25" value="${cost.pltfomFee}">
</div> </div>
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text digit3 xl" name="expctTaxArr" title="예상세율" maxlength="25" value="${cost.expctTax}"> <input type="text" class="input-text digit3 xl right" name="expctTaxArr" title="예상세율" maxlength="25" value="${cost.expctTax}">
</div> </div>
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text sep xl" name="cstmsFeeArr" title="통관수수료" maxlength="25" value="${cost.cstmsFee}"> <input type="text" class="input-text sep xl right" name="cstmsFeeArr" title="통관수수료" maxlength="25" value="${cost.cstmsFee}">
</div> </div>
</td> </td>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input type="text" class="input-text sep xl" name="krDlvyCtArr" title="운임비용(KR)" maxlength="25" value="${cost.krDlvyCt}"> <input type="text" class="input-text sep xl right" name="krDlvyCtArr" title="운임비용(KR)" maxlength="25" value="${cost.krDlvyCt}">
</div> </div>
</td> </td>
</tr> </tr>