[FO] 일계부 숫자 키보드 oninput 추가

This commit is contained in:
김현주
2025-06-24 10:48:22 +09:00
parent e2f93a04ce
commit d51e8733ad
7 changed files with 35 additions and 24 deletions

View File

@@ -246,4 +246,10 @@ kri.form.error = function(errorList){
}
}
kri.form.maxlength = function(object){
if (object.value.length > object.maxLength) {
object.value = object.value.slice(0, object.maxLength);
}
}

View File

@@ -79,7 +79,8 @@
</label>
</div>
<div class="input-field">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity" th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity"
th:value="${detail.quantity}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="수량을 입력해 주세요">
</div>
<ul class="guide-info">
<li>예 : 2, 2.5</li>
@@ -133,7 +134,8 @@
</label>
</div>
<div class="input-field type-price">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price" th:value="${detail.price}" maxlength="10" placeholder="금액을 입력해 주세요">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price"
th:value="${detail.price}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="금액을 입력해 주세요">
<span class="input-field-txt">원</span>
</div>
<ul class="guide-info">
@@ -149,7 +151,8 @@
</label>
</div>
<div class="input-field type-price">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue" th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue"
th:value="${detail.estimatedValue}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="금액을 입력해 주세요">
<span class="input-field-txt">원</span>
</div>
<ul class="guide-info">

View File

@@ -67,7 +67,7 @@
</div>
<div class="input-field">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity"
th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
th:value="${detail.quantity}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="수량을 입력해 주세요">
</div>
<ul class="guide-info">
<li>예 : 2, 2.5</li>
@@ -122,7 +122,7 @@
</div>
<div class="input-field type-price">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue"
th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
th:value="${detail.estimatedValue}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="금액을 입력해 주세요">
<span class="input-field-txt">원</span>
</div>
<ul class="guide-info">

View File

@@ -42,7 +42,7 @@
</div>
<div class="input-field">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity"
th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
th:value="${detail.quantity}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="수량을 입력해 주세요">
</div>
<ul class="guide-info">
<li>예 : 2, 2.5</li>
@@ -97,7 +97,7 @@
</div>
<div class="input-field type-price">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue"
th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
th:value="${detail.estimatedValue}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="금액을 입력해 주세요">
<span class="input-field-txt">원</span>
</div>
<ul class="guide-info">

View File

@@ -110,7 +110,7 @@
</div>
<div class="input-field">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity"
th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
th:value="${detail.quantity}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="수량을 입력해 주세요">
</div>
<ul class="guide-info">
<li>예 : 2, 2.5</li>
@@ -165,7 +165,7 @@
</div>
<div class="input-field type-price">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price"
th:value="${detail.price}" maxlength="10" placeholder="금액을 입력해 주세요">
th:value="${detail.price}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="금액을 입력해 주세요">
<span class="input-field-txt">원</span>
</div>
<ul class="guide-info">
@@ -182,7 +182,7 @@
</div>
<div class="input-field type-price">
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue"
th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
th:value="${detail.estimatedValue}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="금액을 입력해 주세요">
<span class="input-field-txt">원</span>
</div>
<ul class="guide-info">

View File

@@ -45,7 +45,8 @@
</label>
</div>
<div class="input-field type-hour">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="ownedHours" name="ownedHours" th:value="${detail.ownedHours}" maxlength="10" placeholder="00">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="ownedHours" name="ownedHours"
th:value="${detail.ownedHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -57,7 +58,8 @@
</label>
</div>
<div class="input-field type-hour">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="leasedHours" name="leasedHours" th:value="${detail.leasedHours}" maxlength="10" placeholder="00">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="leasedHours" name="leasedHours"
th:value="${detail.leasedHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>

View File

@@ -52,7 +52,7 @@
</div>
<div class="input-field">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="workLandArea" name="workLandArea"
th:value="${detail.workLandArea}" maxlength="10" placeholder="작업 면적을 입력해 주세요">
th:value="${detail.workLandArea}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="작업 면적을 입력해 주세요">
</div>
<ul class="guide-info">
<li>예 : 180, 6</li>
@@ -109,7 +109,7 @@
</div>
<div class="input-field">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="harvestQuantity" name="harvestQuantity"
th:value="${detail.harvestQuantity}" maxlength="10" placeholder="수확량을 입력해 주세요">
th:value="${detail.harvestQuantity}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="수확량을 입력해 주세요">
</div>
</div>
<div class="select-group">
@@ -174,7 +174,7 @@
</div>
<div class="input-field type-hour">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="ownerTime" name="ownerTime"
th:value="${detail.ownerTime}" maxlength="10" placeholder="00">
th:value="${detail.ownerTime}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -187,7 +187,7 @@
</div>
<div class="input-field type-hour">
<input type="number" inputmode="decimal" pattern="[0-9]*" id="spouseTime" name="spouseTime"
th:value="${detail.spouseTime}" maxlength="10" placeholder="00">
th:value="${detail.spouseTime}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -202,7 +202,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">남</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="familyMHours" name="familyMHours"
th:value="${detail.familyMHours}" maxlength="10" placeholder="00">
th:value="${detail.familyMHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -210,7 +210,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">여</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="familyFHours" name="familyFHours"
th:value="${detail.familyFHours}" maxlength="10" placeholder="00">
th:value="${detail.familyFHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -227,7 +227,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">남</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="hiredMHours" name="hiredMHours"
th:value="${detail.hiredMHours}" maxlength="10" placeholder="00">
th:value="${detail.hiredMHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -235,7 +235,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">여</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="hiredFHours" name="hiredFHours"
th:value="${detail.hiredFHours}" maxlength="10" placeholder="00">
th:value="${detail.hiredFHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -252,7 +252,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">남</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="sharedMHours" name="sharedMHours"
th:value="${detail.sharedMHours}" maxlength="10" placeholder="00">
th:value="${detail.sharedMHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -260,7 +260,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">여</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="sharedFHours" name="sharedFHours"
th:value="${detail.sharedFHours}" maxlength="10" placeholder="00">
th:value="${detail.sharedFHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -277,7 +277,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">남</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="volunteerMHours" name="volunteerMHours"
th:value="${detail.volunteerMHours}" maxlength="10" placeholder="00">
th:value="${detail.volunteerMHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>
@@ -285,7 +285,7 @@
<div class="input-field type-hour">
<span class="input-front-txt">여</span>
<input type="number" inputmode="decimal" pattern="[0-9]*" id="volunteerFHours" name="volunteerFHours"
th:value="${detail.volunteerFHours}" maxlength="10" placeholder="00">
th:value="${detail.volunteerFHours}" maxlength="10" oninput="kri.form.maxlength(this)" placeholder="00">
<span class="input-field-txt">시간</span>
</div>
</div>