fix : 외사경찰 경력 현재재직중 추가 수정사항 60번
parent
9330763c2c
commit
32eaa08b2f
|
|
@ -65,6 +65,8 @@ public class UserCareer{
|
|||
@Column(name = "wrt_dt")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
private LocalDateTime wrtDt;
|
||||
@Column(name = "in_office_yn")
|
||||
private String inOfficeYn;
|
||||
|
||||
|
||||
@Transient
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ $(document).on('change', '#positionCheckBox', function (){
|
|||
$(document).on('click', '#saveBtn', function (){
|
||||
if(checkValue()){
|
||||
contentFade("in");
|
||||
document.getElementById("endDate").disabled = false;
|
||||
const formData = new FormData($("#careerForm")[0]);
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
|
|
@ -205,3 +206,30 @@ function checkValue(){
|
|||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
$(document).on('change', '#inOfficeYn', function (){
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
const month = ('0' + (today.getMonth() + 1)).slice(-2);
|
||||
const day = ('0' + today.getDate()).slice(-2);
|
||||
const dateString = year + '-' + month + '-' + day;
|
||||
if($("#startDate").val() == ""){
|
||||
alert("근무시작일을 입력해주세요");
|
||||
$('#startDate').focus();
|
||||
this.checked = false;
|
||||
}
|
||||
|
||||
if(this.checked){
|
||||
$(this).attr('value', 'Y');
|
||||
$("#endDate").val(dateString);
|
||||
$("#endDate").attr("disabled",true);
|
||||
}else{
|
||||
$(this).attr('value', 'N');
|
||||
$("#endDate").val('');
|
||||
$("#endDate").removeAttr("disabled");
|
||||
}
|
||||
console.log($("#inOfficeYn").val());
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
|
|
|||
|
|
@ -67,15 +67,25 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label for="dateSelectorDiv" class="col-sm-2 col-form-label col-form-label-sm text-center fs-13">근무일</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly>
|
||||
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly>
|
||||
<label class="col-sm-2 col-form-label col-form-label-sm text-center fs-13">근무일</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row border m-0 py-1">
|
||||
<div class="col-12">
|
||||
<input type="checkbox" id="inOfficeYn" name="inOfficeYn">
|
||||
<label for="inOfficeYn" class="col-sm-2 col-form-label col-form-label-sm px-2">현재재직중</label>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group w-auto input-daterange" id="dateSelectorDiv">
|
||||
<input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly>
|
||||
<input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer row justify-content-between bg-light">
|
||||
|
|
|
|||
Loading…
Reference in New Issue