Compare commits

...

2 Commits

Author SHA1 Message Date
이대환
8d4aa4277f Merge remote-tracking branch 'origin/master' 2026-04-03 09:50:03 +09:00
이대환
eac94e1e2b fix : 관리자 구독서비스 등록 - 기본&판매정보 입력값 0 허용 2026-04-02 17:36:04 +09:00

View File

@@ -322,15 +322,16 @@
} }
// 텍스트 입력 내용중 필수 항목 체크 // 텍스트 입력 내용중 필수 항목 체크
$(':text[required]').each(function () { $(':text[required]').each(function () {
const inputVal = $(this).val().trim();
if($(this).hasClass('number')){ if($(this).hasClass('number')){
if ($(this).val().trim() == '' || $(this).val().trim() == '0') { if (inputVal == '' || inputVal == '0' && !$(this).hasClass('allow-zero')) {
alert($(this).prop('title')+"은(는) 필수입니다"); alert($(this).prop('title')+"은(는) 필수입니다");
$(this).focus(); $(this).focus();
retVal = false; retVal = false;
return false; return false;
} }
}else{ }else{
if ($(this).val().trim() == '') { if (inputVal == '') {
alert($(this).prop('title')+"은(는) 필수입니다"); alert($(this).prop('title')+"은(는) 필수입니다");
$(this).focus(); $(this).focus();
retVal = false; retVal = false;
@@ -372,8 +373,11 @@
$('#expsrEndDt').val(expsrEndDt); $('#expsrEndDt').val(expsrEndDt);
} }
//선택한 재고정책
const choiceInvntryPolicyCd = $('input[name="invntryPolicyCd"]:checked').val()
//재고가 있으면 판매인 경우 개수 품절처리 필수 //재고가 있으면 판매인 경우 개수 품절처리 필수
if($('input[name="invntryPolicyCd"]:checked').val() == '01'){ if(choiceInvntryPolicyCd == '01'){
if($('#avlinvLmttQy').val() == ''){ if($('#avlinvLmttQy').val() == ''){
alert($('#avlinvLmttQy').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다"); alert($('#avlinvLmttQy').prop('title')+"은(는) 노출여부가 노출예약인 경우 필수입니다");
$('#avlinvLmttQy').focus(); $('#avlinvLmttQy').focus();
@@ -574,7 +578,7 @@
<th>구독기간<span class="red-7">*</span></th> <th>구독기간<span class="red-7">*</span></th>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input class="input-text xsm number text-right" type="text" title="구독기간" id="subPd" name="subPd" maxlength="3" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subPd}</c:if>" required> 개월 <input class="input-text xsm number text-right allow-zero" type="text" title="구독기간" id="subPd" name="subPd" maxlength="3" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subPd}</c:if>" required> 개월
</div> </div>
</td> </td>
</tr> </tr>
@@ -596,7 +600,7 @@
<th>배송횟수<span class="red-7">*</span></th> <th>배송횟수<span class="red-7">*</span></th>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input class="input-text xsm number text-right" type="text" title="배송횟수" id="dlvyCnt" name="dlvyCnt" maxlength="3" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.dlvyCnt}</c:if>" required> 회 <input class="input-text xsm number text-right allow-zero" type="text" title="배송횟수" id="dlvyCnt" name="dlvyCnt" maxlength="3" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.dlvyCnt}</c:if>" required> 회
</div> </div>
</td> </td>
<th>배송주기<span class="red-7">*</span></th> <th>배송주기<span class="red-7">*</span></th>
@@ -631,13 +635,13 @@
<th>구독료<span class="red-7">*</span></th> <th>구독료<span class="red-7">*</span></th>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input class="input-text sm number text-right" type="text" title="구독료" id="subsvcCt" name="subsvcCt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subsvcCt}</c:if>" required> 円(엔) <input class="input-text sm number text-right allow-zero" type="text" title="구독료" id="subsvcCt" name="subsvcCt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.subsvcCt}</c:if>" required> 円(엔)
</div> </div>
</td> </td>
<th>1회 배송비<span class="red-7">*</span></th> <th>1회 배송비<span class="red-7">*</span></th>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input class="input-text sm number text-right" type="text" title="1회 배송비" id="tmeDlvyAmt" name="tmeDlvyAmt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.tmeDlvyAmt}</c:if>" required> 円(엔) <input class="input-text sm number text-right allow-zero" type="text" title="1회 배송비" id="tmeDlvyAmt" name="tmeDlvyAmt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.tmeDlvyAmt}</c:if>" required> 円(엔)
</div> </div>
</td> </td>
</tr> </tr>
@@ -651,7 +655,7 @@
<th>실판매가<span class="red-7">*</span></th> <th>실판매가<span class="red-7">*</span></th>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input class="input-text sm number text-right" type="text" title="실판매가" id="selpric" name="selpric" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.selpric}</c:if>" readonly> 円(엔) <input class="input-text sm number text-right allow-zero" type="text" title="실판매가" id="selpric" name="selpric" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.selpric}</c:if>" readonly> 円(엔)
</div> </div>
</td> </td>
</tr> </tr>
@@ -686,7 +690,7 @@
<th>가용재고</th> <th>가용재고</th>
<td> <td>
<div class="td-inner"> <div class="td-inner">
<input class="input-text sm number text-right" type="text" title="가용재고" id="availQt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.availQt}</c:if>" readonly> <input class="input-text sm text-right" type="text" title="가용재고" id="availQt" maxlength="11" value="<c:if test='${resultMap.subsvcDtl != null}'>${resultMap.subsvcDtl.availQt}</c:if>" readonly>
</div> </div>
</td> </td>
</tr> </tr>