[BO] 임가현황 작업 중 - url 변경
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
|
||||
layout:decorate="~{layout/layout}">
|
||||
|
||||
<div class="layer-wrap" th:fragment="modalFragment">
|
||||
<form autocomplete="off" method="get" name="reqVisitForm">
|
||||
<input name="page" value="0" type="hidden"/>
|
||||
<input name="size" value="10" type="hidden">
|
||||
|
||||
<div class="component-modal mypage-wrap modal01 modal-visit-info" data-props-dimm-click="true" data-state="close">
|
||||
<div class="modal-dimm"></div>
|
||||
<div class="modal-frame">
|
||||
<div class="modal-container">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-tit">
|
||||
임가방문정보
|
||||
</h3>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<div class="modal-content-inner">
|
||||
<table class="type-form">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<th>방문일</th>
|
||||
<td>
|
||||
<div class="component-datepicker">
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" class="datepicker-btn-trigger" name="visitDate" id="visitDate" aria-label="시작일"
|
||||
placeholder="시작일을 입력해주세요" />
|
||||
<span class="input-field-btn datepicker-state">
|
||||
<span class="hide-txt">달력</span>
|
||||
<i class="ico-calendar ico-normal" aria-hidden="true"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<th>관리분야<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="managementType" required>
|
||||
<option value="" disabled hidden selected>선택</option>
|
||||
<option value="">선택</option>
|
||||
<option value="VISIT">방문조사</option>
|
||||
<option value="CALL">전화상담</option>
|
||||
<option value="ETC">기타</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>내용<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td colspan="5">
|
||||
<div class="component-input">
|
||||
<div class="input-textarea-field">
|
||||
<textarea id="textarea_note" class="textarea" name="content" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>답례품 전달</th>
|
||||
<td class="radio-group">
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="isGiftSent_Y" name="isGiftSent" value="true">
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">전달</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="isGiftSent_N" name="isGiftSent" value="false" checked>
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">미전달</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-primary" onclick="">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" class="modal-close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script th:inline="javascript">
|
||||
const resetForm = () => {
|
||||
const form = document.forms['reqVisitForm'];
|
||||
if (!form) return;
|
||||
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
form.visitDate.value = today;
|
||||
form.managementType.value = '';
|
||||
form.content.value = '';
|
||||
document.getElementById('isGiftSent_N').checked = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script th:inline="javascript">
|
||||
const showVisitInfoModal = (id) => {
|
||||
document.querySelector(".modal-visit-info").ui.open();
|
||||
|
||||
resetForm();
|
||||
|
||||
if(id != null) {
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/visitInfo/' + id,
|
||||
{},
|
||||
(response) => {
|
||||
console.log("임가방문정보 상세 응답값 : ", response);
|
||||
setFormData(response);
|
||||
},
|
||||
function (code, rstData) {
|
||||
console.log("error : ", code);
|
||||
},
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const setFormData = (data) => {
|
||||
const form = document.forms['reqVisitForm'];
|
||||
if (!form) return;
|
||||
|
||||
// 폼에 값 세팅
|
||||
form.visitDate.value = data.visitDate || '';
|
||||
form.managementType.value = data.managementType || '';
|
||||
form.content.value = data.content || '';
|
||||
|
||||
// 라디오 버튼 처리
|
||||
document.getElementById('isGiftSent_Y').checked = data.isGiftSent === true;
|
||||
document.getElementById('isGiftSent_N').checked = data.isGiftSent === false;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
Reference in New Issue
Block a user