fix : 설정 > 원가 설정 - 기준일자 datepicker 적용
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<%@ 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="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="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%--
|
||||
@@ -20,11 +21,17 @@
|
||||
<%-- 공통 include --%>
|
||||
<%@include file ="/WEB-INF/views/comm/mngr/Include.jsp" %>
|
||||
</head>
|
||||
<style>
|
||||
.datepicker {
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// 숫자 처리
|
||||
$('.sep').each(function () {
|
||||
fn_format_sep($(this));
|
||||
fn_format_sep($(this));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -40,53 +47,54 @@
|
||||
+ ' <td>'
|
||||
+ ' <label class="b-checkbox checkbox is-medium">'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ ' <td>'
|
||||
+ ' <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>'
|
||||
+ ' </td>'
|
||||
+ '</tr>';
|
||||
|
||||
$('#tableCostSorting').append(trClone);
|
||||
$('#noData').hide();
|
||||
fn_set_datepicker('.datepicker');
|
||||
}
|
||||
|
||||
/* ********************************************************
|
||||
@@ -123,10 +131,10 @@
|
||||
******************************************************** */
|
||||
const fn_update_cost = function () {
|
||||
if (confirm('원가 설정을 <spring:message code="confirm.common.save"/>')) {
|
||||
// 콤마 제거
|
||||
$('.sep').each(function () {
|
||||
fn_format_sep($(this), false);
|
||||
});
|
||||
// 콤마 제거
|
||||
$('.sep').each(function () {
|
||||
fn_format_sep($(this), false);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
@@ -137,7 +145,7 @@
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
fn_format_sep($(this));
|
||||
fn_format_sep($(this));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,21 +155,21 @@
|
||||
$(this).val(input.replace(/[^0-9]/g, ""));
|
||||
});
|
||||
$(document).on('input', '.sep', function () {
|
||||
fn_format_sep($(this));
|
||||
fn_format_sep($(this));
|
||||
});
|
||||
const fn_format_sep = function ($target, unformat) {
|
||||
var value = $target.val();
|
||||
const fn_format_sep = function ($target, unformat) {
|
||||
var value = $target.val();
|
||||
|
||||
if (unformat == undefined) {
|
||||
value = value
|
||||
.replace(/[^0-9]/g, "")
|
||||
.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
|
||||
} else {
|
||||
value = value.replace(/,/g, "");
|
||||
}
|
||||
if (unformat == undefined) {
|
||||
value = value
|
||||
.replace(/[^0-9]/g, "")
|
||||
.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
|
||||
} else {
|
||||
value = value.replace(/,/g, "");
|
||||
}
|
||||
|
||||
$target.val(value);
|
||||
}
|
||||
$target.val(value);
|
||||
}
|
||||
|
||||
// 자릿수 제한
|
||||
$(document).on('input', '.digit2', function () {
|
||||
@@ -250,42 +258,42 @@
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user