들여쓰기 변경
This commit is contained in:
@@ -2,127 +2,50 @@
|
||||
<html layout:decorate="~{layout/layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<div layout:fragment="content">
|
||||
<main id="content" role="main">
|
||||
|
||||
<style>
|
||||
label {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
div {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.invalid-feedback {
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.is-invalid + .invalid-feedback {
|
||||
display: block;
|
||||
}
|
||||
|
||||
input[readonly] {
|
||||
background-color: #e9ecef;
|
||||
color: #6c757d;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div>
|
||||
<form
|
||||
method="get"
|
||||
name="reqForm"
|
||||
th:action="@{/user/info}" th:object="${userInfo}">
|
||||
|
||||
<input type="hidden" name="id" th:value="*{seq}">
|
||||
|
||||
<div>
|
||||
<label for="householdNum">임가번호</label>
|
||||
<input id="householdNum" name="householdNum" placeholder="아이디" readonly="readonly" th:field="*{householdNum}"
|
||||
type="text">
|
||||
<div class="invalid-feedback field-id"></div>
|
||||
<div layout:fragment="content" th:classappend="'mypage-wrap'">
|
||||
<main id="content" role="main">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
이번달의 <br>
|
||||
<strong>은행 자동이체 내역 입력 현황</strong>을
|
||||
확인하세요.
|
||||
</h3>
|
||||
</hgroup>
|
||||
<ul class="product-col-list">
|
||||
<li>
|
||||
<a href="">
|
||||
<p class="list-tit">수입</p>
|
||||
<span class="tag">미등록</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="complete">
|
||||
<a href="">
|
||||
<p class="list-tit">지출</p>
|
||||
<span class="tag">등록완료</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
<label for="ownerName">경영주</label>
|
||||
<input id="ownerName" name="ownerName" placeholder="경영주 이름" th:field="*{ownerName}" type="text">
|
||||
<div class="invalid-feedback field-id"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="ownerAge">만나이</label>
|
||||
<input id="ownerAge" name="ownerAge" placeholder="나이" th:field="*{ownerAge}" type="text">
|
||||
<div class="invalid-feedback field-id"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="tel">가구연락처</label>
|
||||
<input id="tel" name="tel" placeholder="가구연락처" th:field="*{tel}" type="text">
|
||||
<div class="invalid-feedback field-id"></div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="phone">핸드폰번호</label>
|
||||
<input id="phone" name="phone" placeholder="핸드폰번호" th:field="*{phone}" type="text">
|
||||
<div class="invalid-feedback field-id"></div>
|
||||
</div>
|
||||
<!-- <div>-->
|
||||
<!-- <label for="region">시.도</label>-->
|
||||
<!-- <input id="region" name="region" placeholder="시.도" th:field="*{region}" type="text">-->
|
||||
<!-- <div class="invalid-feedback field-id"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <label for="city">시.군.도</label>-->
|
||||
<!-- <input id="city" name="city" placeholder="시.군.도" th:field="*{city}" type="text">-->
|
||||
<!-- <div class="invalid-feedback field-id"></div>-->
|
||||
<!-- </div>-->
|
||||
<div>
|
||||
<label for="addressDetail">전체 주소</label>
|
||||
<input id="addressDetail" name="addressDetail" placeholder="세부 주소" th:field="*{address}" type="text">
|
||||
<div class="invalid-feedback field-id"></div>
|
||||
</div>
|
||||
</form>
|
||||
<button onclick="updateUser();">수정하기</button>
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script>
|
||||
const updateUser = () => {
|
||||
const f = document.reqForm;
|
||||
const obj = $(f).serializeObject();
|
||||
|
||||
// 기존 에러 메세지 초기화
|
||||
$('.is-invalid').removeClass('is-invalid');
|
||||
|
||||
$.ajax({
|
||||
method: 'PATCH',
|
||||
url: '/api/front/household/update',
|
||||
data: obj,
|
||||
beforeSend: function (xhr) {
|
||||
xhr.setRequestHeader(
|
||||
$("meta[name='_csrf_header']").attr("content"),
|
||||
$("meta[name='_csrf']").attr("content"));
|
||||
<script th:inline="javascript">
|
||||
let ENV = {
|
||||
httpUrl: {
|
||||
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
|
||||
},
|
||||
success(res) {
|
||||
if (confirm(`'${res.ownerName} 님의' 정보가 수정되었습니다.`)) {
|
||||
location.reload();
|
||||
}
|
||||
module: {
|
||||
confirmPopup: null
|
||||
},
|
||||
statusCode: {
|
||||
'422': (res) => {
|
||||
const fieldErrors = res.responseJSON.fieldErrors;
|
||||
$(fieldErrors).each(function (idx, error) {
|
||||
let target = $(f).find('[name=' + error.field + ']');
|
||||
target.addClass('is-invalid');
|
||||
submitted: false,
|
||||
};
|
||||
let formControl = {
|
||||
init() {
|
||||
|
||||
target.parent().find('.invalid-feedback').text(error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
</section>
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
httpUrl: {
|
||||
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
|
||||
},
|
||||
module:{
|
||||
confirmPopup : null
|
||||
module: {
|
||||
confirmPopup: null
|
||||
},
|
||||
submitted: false,
|
||||
};
|
||||
let formControl = {
|
||||
init(){
|
||||
init() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
httpUrl: {
|
||||
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
|
||||
},
|
||||
module:{
|
||||
confirmPopup : null
|
||||
module: {
|
||||
confirmPopup: null
|
||||
},
|
||||
submitted: false,
|
||||
};
|
||||
let formControl = {
|
||||
init(){
|
||||
init() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
<dl class="info-card">
|
||||
<dt class="name" th:text="${userInfo?.ownerName}"></dt>
|
||||
<dd class="location" th:text="${userInfo?.address}"></dd><!-- TODO 임가 주소 위치 임시로 . 처리함. -->
|
||||
<dd class="date" th:if="${latestRegisteredDate != null or !#strings.isEmpty(latestRegisteredDate)}" th:text="${'최근등록: '+latestRegisteredDate}"></dd>
|
||||
<dd class="date" th:if="${latestRegisteredDate != null or !#strings.isEmpty(latestRegisteredDate)}"
|
||||
th:text="${'최근등록: '+latestRegisteredDate}"></dd>
|
||||
</dl>
|
||||
<th:block th:if="${notice != null}">
|
||||
<a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box">
|
||||
@@ -63,7 +64,8 @@
|
||||
<dl>
|
||||
<dt>은행 자동이체 내역</dt>
|
||||
<dd>자동으로 입금·출금된 금액을 <br>
|
||||
기록해 주세요</dd>
|
||||
기록해 주세요
|
||||
</dd>
|
||||
</dl>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -25,19 +25,23 @@
|
||||
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full" style="margin-bottom:1.2rem" id="addItemBtn" onclick="formControl.addOpen()">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full" style="margin-bottom:1.2rem"
|
||||
id="addItemBtn" onclick="formControl.addOpen()">
|
||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-m btn-link btn-full" th:if="${pastMonthlyInfo != null && currentList.totalElements == 0}" id="callPastInfoBtn">
|
||||
<button type="button" class="btn btn-m btn-link btn-full"
|
||||
th:if="${pastMonthlyInfo != null && currentList.totalElements == 0}" id="callPastInfoBtn">
|
||||
<span class="btn-txt">이전 정보 불러오기</span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="component-input align-center" th:if="${currentList.totalElements == 0}" id="forestProductStatusDiv">
|
||||
<div class="component-input align-center" th:if="${currentList.totalElements == 0}"
|
||||
id="forestProductStatusDiv">
|
||||
<label class="checkbox-inner">
|
||||
<input type="checkbox" id="forestProductStatus" name="forestProductStatus" th:value="${MonthStatus.NOTHING}" onchange="formControl.handleCheckboxChange()">
|
||||
<input type="checkbox" id="forestProductStatus" name="forestProductStatus"
|
||||
th:value="${MonthStatus.NOTHING}" onchange="formControl.handleCheckboxChange()">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">이번달 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -52,7 +56,6 @@
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -67,12 +70,6 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 모달 팝업 -->
|
||||
<div class="layer-wrap">
|
||||
<div class="component-modal mypage-wrap addPopup" data-props-dimm-click="true">
|
||||
@@ -104,7 +101,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="town" placeholder="읍면동을 입력해 주세요" name="town" maxlength="10">
|
||||
<input type="text" id="town" placeholder="읍면동을 입력해 주세요" name="town"
|
||||
maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 지번 -->
|
||||
@@ -115,7 +113,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="streetNum" placeholder="지번을 입력해 주세요" name="streetNum" maxlength="10">
|
||||
<input type="text" id="streetNum" placeholder="지번을 입력해 주세요" name="streetNum"
|
||||
maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 지목 -->
|
||||
@@ -125,7 +124,8 @@
|
||||
지목
|
||||
</p>
|
||||
</div>
|
||||
<div id="landTypeSelect" class="component-select bottom-sheet" data-props-default="지목을 선택해 주세요" data-props-type="bottomSheet">
|
||||
<div id="landTypeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="지목을 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" id="landType" name="landType" data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
@@ -140,7 +140,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${purposeList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -155,7 +157,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="availableArea" placeholder="가능 면적을 입력해 주세요" name="availableArea" class="limitDecimalLength">
|
||||
<input type="number" id="availableArea" placeholder="가능 면적을 입력해 주세요"
|
||||
name="availableArea" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -172,7 +175,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="cropName" placeholder="재배 작물명을 입력해 주세요" name="cropName" maxlength="10">
|
||||
<input type="text" id="cropName" placeholder="재배 작물명을 입력해 주세요"
|
||||
name="cropName" maxlength="10">
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
<li>예 : 수확</li>
|
||||
@@ -186,7 +190,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="landArea" placeholder="작업 면적을 입력해 주세요" name="landArea" class="limitDecimalLength">
|
||||
<input type="number" id="landArea" placeholder="작업 면적을 입력해 주세요"
|
||||
name="landArea" class="limitDecimalLength">
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
<li>예 : 180, 6</li>
|
||||
@@ -205,7 +210,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="mainYield" placeholder="수확량을 입력해 주세요" name="mainYield" class="limitDecimalLength">
|
||||
<input type="number" id="mainYield" placeholder="수확량을 입력해 주세요"
|
||||
name="mainYield" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -217,8 +223,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="mainYieldUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainYieldUnitCode" id="mainYieldUnitCode" data-type="select">
|
||||
<div id="mainYieldUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainYieldUnitCode" id="mainYieldUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -232,7 +240,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -252,7 +262,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="mainSaleAmount" placeholder="판매량을 입력해 주세요" name="mainSaleAmount" class="limitDecimalLength">
|
||||
<input type="number" id="mainSaleAmount" placeholder="판매량을 입력해 주세요"
|
||||
name="mainSaleAmount" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -264,8 +275,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="mainSaleUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainSaleUnitCode" id="mainSaleUnitCode" data-type="select">
|
||||
<div id="mainSaleUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainSaleUnitCode" id="mainSaleUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -279,7 +292,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -299,7 +314,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="subYield" placeholder="수확량을 입력해 주세요" name="subYield" class="limitDecimalLength">
|
||||
<input type="number" id="subYield" placeholder="수확량을 입력해 주세요"
|
||||
name="subYield" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -311,8 +327,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="subYieldUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subYieldUnitCode" id="subYieldUnitCode" data-type="select">
|
||||
<div id="subYieldUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subYieldUnitCode" id="subYieldUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -326,7 +344,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -346,7 +366,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="subSaleAmount" placeholder="판매량을 입력해 주세요" name="subSaleAmount" class="limitDecimalLength">
|
||||
<input type="number" id="subSaleAmount" placeholder="판매량을 입력해 주세요"
|
||||
name="subSaleAmount" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -358,8 +379,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="subSaleUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subSaleUnitCode" id="subSaleUnitCode" data-type="select">
|
||||
<div id="subSaleUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subSaleUnitCode" id="subSaleUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -373,7 +396,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -383,7 +408,8 @@
|
||||
</section>
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.addData()">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary"
|
||||
onclick="formControl.addData()">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -401,52 +427,44 @@
|
||||
<!-- //모달 팝업 -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
let ENV = {
|
||||
httpUrl: {
|
||||
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
|
||||
},
|
||||
module:{
|
||||
addPopup : null
|
||||
module: {
|
||||
addPopup: null
|
||||
},
|
||||
data: {
|
||||
purposeList : [[${purposeList}]],
|
||||
unitList : [[${unitList}]],
|
||||
purposeList: [[${purposeList}]],
|
||||
unitList: [[${unitList}]],
|
||||
addProducts: []
|
||||
},
|
||||
target:{
|
||||
nothingCheck : document.getElementById("forestProductStatus"),
|
||||
addBtn:{
|
||||
target: {
|
||||
nothingCheck: document.getElementById("forestProductStatus"),
|
||||
addBtn: {
|
||||
button: null,
|
||||
icon : null
|
||||
icon: null
|
||||
}
|
||||
},
|
||||
submitted: false,
|
||||
};
|
||||
let formControl = {
|
||||
init(){
|
||||
init() {
|
||||
this._bindUI();
|
||||
this._listener();
|
||||
},
|
||||
_bindUI(){
|
||||
_bindUI() {
|
||||
ENV.module.addPopup = document.querySelector(".addPopup").ui;
|
||||
// ENV.target.addBtn.button = document.getElementById("addItemBtn");
|
||||
// ENV.target.addBtn.icon = button.querySelector("i");
|
||||
|
||||
},
|
||||
_listener(){
|
||||
_listener() {
|
||||
//소수점
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const inputs = document.querySelectorAll(".limitDecimalLength");
|
||||
@@ -473,16 +491,16 @@
|
||||
});
|
||||
});
|
||||
},
|
||||
checkNextBtn(){
|
||||
checkNextBtn() {
|
||||
|
||||
},
|
||||
// button
|
||||
//TODO 하나로 바꿔야함
|
||||
handleCheckboxChange(){
|
||||
handleCheckboxChange() {
|
||||
const isChecked = document.getElementById("forestProductStatus").checked;
|
||||
this.addButtonOnOff(!isChecked);
|
||||
},
|
||||
addButtonOnOff(isEnabled){
|
||||
addButtonOnOff(isEnabled) {
|
||||
const button = document.getElementById("addItemBtn");
|
||||
const icon = button.querySelector("i");
|
||||
|
||||
@@ -497,7 +515,7 @@
|
||||
}
|
||||
},
|
||||
// button
|
||||
addOpen(){
|
||||
addOpen() {
|
||||
const modalContent = document.querySelector('.modal-content');
|
||||
setTimeout(() => {
|
||||
modalContent.scrollTop = 0;
|
||||
@@ -513,7 +531,7 @@
|
||||
|
||||
ENV.module.addPopup.open();
|
||||
},
|
||||
addData(){
|
||||
addData() {
|
||||
const form = document.getElementById('forestForm');
|
||||
|
||||
const landTypeSelect = document.getElementById('landTypeSelect');
|
||||
@@ -540,30 +558,30 @@
|
||||
|
||||
const errorData = [];
|
||||
|
||||
if(!form.cropName.value) {
|
||||
const data = {field:'cropName', message: '재배 작물명을 입력해주세요.'}
|
||||
if (!form.cropName.value) {
|
||||
const data = {field: 'cropName', message: '재배 작물명을 입력해주세요.'}
|
||||
errorData.push(data);
|
||||
}
|
||||
if(form.mainYield.value && !form.mainYieldUnitCode.value) {
|
||||
const data = {field:'mainYieldUnitCode', message: '단위를 선택해주세요.'}
|
||||
if (form.mainYield.value && !form.mainYieldUnitCode.value) {
|
||||
const data = {field: 'mainYieldUnitCode', message: '단위를 선택해주세요.'}
|
||||
errorData.push(data);
|
||||
}
|
||||
if(form.mainSaleAmount.value && !form.mainSaleUnitCode.value) {
|
||||
const data = {field:'mainSaleUnitCode', message: '단위를 선택해주세요.'}
|
||||
if (form.mainSaleAmount.value && !form.mainSaleUnitCode.value) {
|
||||
const data = {field: 'mainSaleUnitCode', message: '단위를 선택해주세요.'}
|
||||
errorData.push(data);
|
||||
}
|
||||
|
||||
if(form.subYield.value && !form.subYieldUnitCode.value) {
|
||||
const data = {field:'subYieldUnitCode', message: '단위를 선택해주세요.'}
|
||||
if (form.subYield.value && !form.subYieldUnitCode.value) {
|
||||
const data = {field: 'subYieldUnitCode', message: '단위를 선택해주세요.'}
|
||||
errorData.push(data);
|
||||
}
|
||||
if(form.subSaleAmount.value && !form.subSaleUnitCode.value) {
|
||||
const data = {field:'subSaleUnitCode', message: '단위를 선택해주세요.'}
|
||||
if (form.subSaleAmount.value && !form.subSaleUnitCode.value) {
|
||||
const data = {field: 'subSaleUnitCode', message: '단위를 선택해주세요.'}
|
||||
errorData.push(data);
|
||||
}
|
||||
kri.form.error(errorData)
|
||||
|
||||
if(errorData.length === 0) {
|
||||
if (errorData.length === 0) {
|
||||
const formData = new FormData(form);
|
||||
|
||||
const data = {};
|
||||
@@ -571,14 +589,13 @@
|
||||
data[key] = value;
|
||||
});
|
||||
//구분 키
|
||||
if(!data['id']) {
|
||||
if (!data['id']) {
|
||||
data['id'] = Math.floor(Math.random() * 1000000) + 1;
|
||||
} else {
|
||||
data['id'] = Number(data['id']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const existingIndex = ENV.data.addProducts.findIndex(item => item.id == data.id);
|
||||
if (existingIndex !== -1) {
|
||||
ENV.data.addProducts[existingIndex] = data;
|
||||
@@ -590,25 +607,23 @@
|
||||
ENV.module.addPopup.close();
|
||||
|
||||
|
||||
setTimeout(function(){
|
||||
setTimeout(function () {
|
||||
renderControl.itemAdd(data);
|
||||
},300)
|
||||
|
||||
|
||||
}, 300)
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
getPurposeText(code){
|
||||
getPurposeText(code) {
|
||||
const found = ENV.data.purposeList.find(item => item.id === code);
|
||||
return found ? found.codeText : '-';
|
||||
},
|
||||
getUnitText(code){
|
||||
getUnitText(code) {
|
||||
const found = ENV.data.unitList.find(item => item.id === code);
|
||||
return found ? found.codeText : '-';
|
||||
},
|
||||
|
||||
deleteItem(id){
|
||||
deleteItem(id) {
|
||||
const listBody = document.getElementById('listBody');
|
||||
const target = listBody.querySelector(`div[data-id="${id}"]`);
|
||||
if (target) {
|
||||
@@ -617,17 +632,17 @@
|
||||
}
|
||||
formControl.setListHeader();
|
||||
},
|
||||
removeAll(){
|
||||
removeAll() {
|
||||
ENV.data.addProducts = [];
|
||||
const listBody = document.getElementById('listBody');
|
||||
listBody.innerHTML = '';
|
||||
this.setListHeader();
|
||||
},
|
||||
editItem(id){
|
||||
editItem(id) {
|
||||
|
||||
const item = ENV.data.addProducts.find(product => product.id == id);
|
||||
|
||||
if(item) {
|
||||
if (item) {
|
||||
|
||||
const form = document.getElementById('forestForm'); // 폼 ID로 선택
|
||||
|
||||
@@ -647,10 +662,10 @@
|
||||
formControl.addOpen();
|
||||
}
|
||||
},
|
||||
setListHeader(){
|
||||
setListHeader() {
|
||||
const listBody = document.getElementById('listHeader');
|
||||
const listCount = document.getElementById('listCount');
|
||||
if(ENV.data.addProducts.length > 0){
|
||||
if (ENV.data.addProducts.length > 0) {
|
||||
|
||||
listBody.style.display = '';
|
||||
listCount.textContent = ENV.data.addProducts.length;
|
||||
@@ -662,8 +677,8 @@
|
||||
};
|
||||
|
||||
|
||||
let renderControl={
|
||||
itemAdd(item){
|
||||
let renderControl = {
|
||||
itemAdd(item) {
|
||||
|
||||
const form = document.getElementById('forestForm');
|
||||
form.reset();
|
||||
@@ -678,24 +693,24 @@
|
||||
|
||||
|
||||
let tag1 = '';
|
||||
if(item.landArea) {
|
||||
if (item.landArea) {
|
||||
tag1 = `<span>${Number(item.landArea).toLocaleString() || '-'}평</span>`;
|
||||
}
|
||||
let tag2 = '';
|
||||
if(item.town && !item.streetNum) {
|
||||
if (item.town && !item.streetNum) {
|
||||
tag2 = `<li><span>${item.town}</span></li>`;
|
||||
} else if (!item.town && item.streetNum) {
|
||||
tag2 = `<li><span>${item.streetNum}</span></li>`;
|
||||
}else if (item.town && item.streetNum) {
|
||||
} else if (item.town && item.streetNum) {
|
||||
tag2 = `<li><span>${item.town} ${item.streetNum}</span></li>`;
|
||||
}
|
||||
let tag3 = '';
|
||||
if(item.landType ) {
|
||||
if (item.landType) {
|
||||
tag3 = `<li><p>지목</p><span>${formControl.getPurposeText(item.landType)}</span></li>`;
|
||||
}
|
||||
|
||||
let tag4 = '';
|
||||
if(item.availableArea ) {
|
||||
if (item.availableArea) {
|
||||
tag4 = `<li><p>가능면적</p><span>${Number(item.availableArea).toLocaleString() || '-'}평</span></li>`;
|
||||
}
|
||||
|
||||
@@ -738,8 +753,8 @@
|
||||
|
||||
|
||||
const existingItem = listBody.querySelector(`[data-id="${item.id}"]`);
|
||||
if(existingItem){
|
||||
listBody.replaceChild(div,existingItem);
|
||||
if (existingItem) {
|
||||
listBody.replaceChild(div, existingItem);
|
||||
} else {
|
||||
listBody.append(div);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
</hgroup>
|
||||
<ul class="product-col-list">
|
||||
|
||||
<li th:each="item : ${list.content}" th:classappend="${item.forestProductStatus != MonthStatus.NONE} ? ' complete'">
|
||||
<li th:each="item : ${list.content}"
|
||||
th:classappend="${item.forestProductStatus != MonthStatus.NONE} ? ' complete'">
|
||||
<a th:href="@{/info/monthly/create/{id}(id=${item.id})}">
|
||||
<p class="list-tit" th:text="${item.koreanMonth}"></p>
|
||||
<span class="tag" th:text="${item.forestProductStatus.desc}"></span>
|
||||
@@ -29,13 +30,13 @@
|
||||
httpUrl: {
|
||||
root: /*[[#{uri.front.info.monthly.path}]]*/'rootUrl'
|
||||
},
|
||||
module:{
|
||||
confirmPopup : null
|
||||
module: {
|
||||
confirmPopup: null
|
||||
},
|
||||
submitted: false,
|
||||
};
|
||||
let formControl = {
|
||||
init(){
|
||||
init() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,30 +14,36 @@
|
||||
</hgroup>
|
||||
|
||||
<section class="regist-item-area">
|
||||
<p class="total" style="display: none" id="listHeader"><!-- th:style="${currentList.totalElements == 0 ? 'display:none':''}"-->
|
||||
<p class="total" style="display: none" id="listHeader">
|
||||
<!-- th:style="${currentList.totalElements == 0 ? 'display:none':''}"-->
|
||||
<span>총 <strong id="listCount">0</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="formControl.clearAllItems()" id="clearAllItems">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
</p>
|
||||
<div class="item-list" style="display: none" id="listBody"> <!-- th:style="${currentList.totalElements == 0 ? 'display:none':''}"-->
|
||||
<div class="item-list" style="display: none" id="listBody">
|
||||
<!-- th:style="${currentList.totalElements == 0 ? 'display:none':''}"-->
|
||||
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full" style="margin-bottom:1.2rem" id="addItemBtn" onclick="formControl.openAddForm()">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full" style="margin-bottom:1.2rem"
|
||||
id="addItemBtn" onclick="formControl.openAddForm()">
|
||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-m btn-link btn-full" id="callPastInfoBtn"> <!-- th:style="${pastMonthlyInfo != null && currentList.totalElements == 0 ? '':'display:none'}"-->
|
||||
<button type="button" class="btn btn-m btn-link btn-full" id="callPastInfoBtn">
|
||||
<!-- th:style="${pastMonthlyInfo != null && currentList.totalElements == 0 ? '':'display:none'}"-->
|
||||
<span class="btn-txt">이전 정보 불러오기</span>
|
||||
</button>
|
||||
|
||||
|
||||
<div class="component-input align-center" id="forestProductStatusDiv"> <!-- th:style="${currentList.totalElements == 0 ? '':'display:none'}"-->
|
||||
<div class="component-input align-center" id="forestProductStatusDiv">
|
||||
<!-- th:style="${currentList.totalElements == 0 ? '':'display:none'}"-->
|
||||
<label class="checkbox-inner">
|
||||
<input type="checkbox" id="forestProductStatus" name="forestProductStatus" th:value="${MonthStatus.NOTHING}" onchange="formControl.handleNoDataToggle()">
|
||||
<input type="checkbox" id="forestProductStatus" name="forestProductStatus"
|
||||
th:value="${MonthStatus.NOTHING}" onchange="formControl.handleNoDataToggle()">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">이번달 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -52,7 +58,6 @@
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -60,19 +65,14 @@
|
||||
<div class="component-btns fixed">
|
||||
<div class="btns-row">
|
||||
<!-- 비활성화 스타일/ 버튼 속성 disable 추가-->
|
||||
<button type="button" class="btn btn-l btn-primary" id="complateBtn" disabled onclick="formControl.goSave()">
|
||||
<button type="button" class="btn btn-l btn-primary" id="complateBtn" disabled
|
||||
onclick="formControl.goSave()">
|
||||
<span class="btn-txt">등록 완료</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 모달 팝업 -->
|
||||
<div class="layer-wrap">
|
||||
<div class="component-modal mypage-wrap addPopup" data-props-dimm-click="true">
|
||||
@@ -104,7 +104,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="town" placeholder="읍면동을 입력해 주세요" name="town" maxlength="10">
|
||||
<input type="text" id="town" placeholder="읍면동을 입력해 주세요" name="town"
|
||||
maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 지번 -->
|
||||
@@ -115,7 +116,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="streetNum" placeholder="지번을 입력해 주세요" name="streetNum" maxlength="10">
|
||||
<input type="text" id="streetNum" placeholder="지번을 입력해 주세요" name="streetNum"
|
||||
maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 지목 -->
|
||||
@@ -125,7 +127,8 @@
|
||||
지목
|
||||
</p>
|
||||
</div>
|
||||
<div id="landTypeSelect" class="component-select bottom-sheet" data-props-default="지목을 선택해 주세요" data-props-type="bottomSheet">
|
||||
<div id="landTypeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="지목을 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" id="landType" name="landType" data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
@@ -140,7 +143,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${purposeList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -155,7 +160,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="availableArea" placeholder="가능 면적을 입력해 주세요" name="availableArea" class="limitDecimalLength">
|
||||
<input type="number" id="availableArea" placeholder="가능 면적을 입력해 주세요"
|
||||
name="availableArea" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@@ -172,7 +178,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="cropName" placeholder="재배 작물명을 입력해 주세요" name="cropName" maxlength="10">
|
||||
<input type="text" id="cropName" placeholder="재배 작물명을 입력해 주세요"
|
||||
name="cropName" maxlength="10">
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
<li>예 : 수확</li>
|
||||
@@ -186,7 +193,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="landArea" placeholder="작업 면적을 입력해 주세요" name="landArea" class="limitDecimalLength">
|
||||
<input type="number" id="landArea" placeholder="작업 면적을 입력해 주세요"
|
||||
name="landArea" class="limitDecimalLength">
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
<li>예 : 180, 6</li>
|
||||
@@ -205,7 +213,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="mainYield" placeholder="수확량을 입력해 주세요" name="mainYield" class="limitDecimalLength">
|
||||
<input type="number" id="mainYield" placeholder="수확량을 입력해 주세요"
|
||||
name="mainYield" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -217,8 +226,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="mainYieldUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainYieldUnitCode" id="mainYieldUnitCode" data-type="select">
|
||||
<div id="mainYieldUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainYieldUnitCode" id="mainYieldUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -232,7 +243,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -252,7 +265,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="mainSaleAmount" placeholder="판매량을 입력해 주세요" name="mainSaleAmount" class="limitDecimalLength">
|
||||
<input type="number" id="mainSaleAmount" placeholder="판매량을 입력해 주세요"
|
||||
name="mainSaleAmount" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -264,8 +278,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="mainSaleUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainSaleUnitCode" id="mainSaleUnitCode" data-type="select">
|
||||
<div id="mainSaleUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="mainSaleUnitCode" id="mainSaleUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -279,7 +295,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -299,7 +317,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="subYield" placeholder="수확량을 입력해 주세요" name="subYield" class="limitDecimalLength">
|
||||
<input type="number" id="subYield" placeholder="수확량을 입력해 주세요"
|
||||
name="subYield" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -311,8 +330,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="subYieldUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subYieldUnitCode" id="subYieldUnitCode" data-type="select">
|
||||
<div id="subYieldUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subYieldUnitCode" id="subYieldUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -326,7 +347,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -346,7 +369,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" id="subSaleAmount" placeholder="판매량을 입력해 주세요" name="subSaleAmount" class="limitDecimalLength">
|
||||
<input type="number" id="subSaleAmount" placeholder="판매량을 입력해 주세요"
|
||||
name="subSaleAmount" class="limitDecimalLength">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -358,8 +382,10 @@
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<div id="subSaleUnitCodeSelect" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subSaleUnitCode" id="subSaleUnitCode" data-type="select">
|
||||
<div id="subSaleUnitCodeSelect" class="component-select bottom-sheet"
|
||||
data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||
<input type="hidden" name="subSaleUnitCode" id="subSaleUnitCode"
|
||||
data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
@@ -373,7 +399,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${unitList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -383,7 +411,8 @@
|
||||
</section>
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.saveFormData()">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary"
|
||||
onclick="formControl.saveFormData()">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -401,17 +430,9 @@
|
||||
<!-- //모달 팝업 -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
// ✅ ENV 구조 (전역 설정 및 상태)
|
||||
@@ -429,11 +450,11 @@
|
||||
unitList: /*[[${unitList}]]*/ [],
|
||||
// productList: /*[[${currentList.content}]]*/ [],
|
||||
productList: /*[[${currentList.content}]]*/[],
|
||||
pastProductList : /*[[${pastList.content}]]*/ [],
|
||||
pastProductList: /*[[${pastList.content}]]*/ [],
|
||||
id: /*[[${currentMonthlyInfo.id}]]*/'',
|
||||
currentStatus: /*[[${currentMonthlyInfo.forestProductStatus}]]*/'',
|
||||
pastStatus: /*[[${pastMonthlyInfo?.forestProductStatus}]]*/'',
|
||||
editable : /*[[${editable}]]*/,
|
||||
editable: /*[[${editable}]]*/,
|
||||
},
|
||||
elementRefs: {
|
||||
noDataCheckbox: document.getElementById("forestProductStatus"),
|
||||
@@ -456,17 +477,17 @@
|
||||
|
||||
// ajaxUtil._alert('select 초기화/지정 방법?\n 6월의 카운트와 추가등록의 카운터의 차이?\n 신규 작성 이후 재진입시의 로직?\n 일단 저장데이터 뿌리는것은 막아둠',null);
|
||||
},
|
||||
checkUsePastData(){
|
||||
checkUsePastData() {
|
||||
etUI.dialog.alert({
|
||||
title: "이전 정보 불러오기",
|
||||
message: "이번달 정보를 아직 입력하지 않으셨네요.\n지난달 정보를 불러와 수정하여 등록하시겠어요?\n\n‘예’ 를 선택하시면 지난달 정보를 불러오고\n‘아니오’를 선택하시면 신규 등록이 가능합니다.\n계속 진행하시겠습니까?",
|
||||
type: "confirm",
|
||||
dialogType: "confirm",
|
||||
positiveText:"예",
|
||||
negativeText:"아니오",
|
||||
positiveText: "예",
|
||||
negativeText: "아니오",
|
||||
callback: function () {
|
||||
ENV.data.productList = JSON.parse(JSON.stringify(ENV.data.pastProductList));
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data,true));
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data, true));
|
||||
formControl.updateLayout();
|
||||
},
|
||||
});
|
||||
@@ -476,7 +497,7 @@
|
||||
ENV.module.modalPopup = document.querySelector(".addPopup").ui;
|
||||
},
|
||||
// 스크립트 단순화/고도화 필요.
|
||||
loadingLayout(){
|
||||
loadingLayout() {
|
||||
//아이템 추가 버튼
|
||||
const addItemBtn = document.getElementById("addItemBtn");
|
||||
const icon = addItemBtn.querySelector("i");
|
||||
@@ -489,13 +510,13 @@
|
||||
|
||||
const clearAllItems = document.getElementById('clearAllItems');
|
||||
|
||||
if(ENV.data.pastProductList.length == 0) {
|
||||
if (ENV.data.pastProductList.length == 0) {
|
||||
callPastInfoBtn.disabled = true;
|
||||
}
|
||||
|
||||
if(ENV.data.editable) {
|
||||
if (ENV.data.editable) {
|
||||
if (ENV.data.currentStatus == "NONE") {
|
||||
if(ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastProductList.length > 0){
|
||||
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastProductList.length > 0) {
|
||||
this.checkUsePastData();
|
||||
}
|
||||
} else if (ENV.data.currentStatus == "NOTHING") {
|
||||
@@ -509,8 +530,8 @@
|
||||
next.disabled = true;
|
||||
|
||||
} else if (ENV.data.currentStatus == "REGISTERED") {
|
||||
if(ENV.data.productList.length > 0) {
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data,true));
|
||||
if (ENV.data.productList.length > 0) {
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data, true));
|
||||
this.updateLayout();
|
||||
} else {
|
||||
|
||||
@@ -519,8 +540,8 @@
|
||||
} else {
|
||||
|
||||
if (ENV.data.currentStatus == "REGISTERED") {
|
||||
if(ENV.data.productList.length > 0) {
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data,false));
|
||||
if (ENV.data.productList.length > 0) {
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data, false));
|
||||
const header = document.getElementById('listHeader');
|
||||
const count = document.getElementById('listCount');
|
||||
const total = ENV.data.productList.length;
|
||||
@@ -534,7 +555,7 @@
|
||||
callPastInfoBtn.disabled = true;
|
||||
forestProductStatus.disabled = true;
|
||||
next.disabled = true;
|
||||
next.style.display="none";
|
||||
next.style.display = "none";
|
||||
clearAllItems.style.display = "none";
|
||||
}
|
||||
},
|
||||
@@ -563,7 +584,7 @@
|
||||
btn.disabled = isChecked;
|
||||
icon.classList.toggle("ico-add", !isChecked);
|
||||
icon.classList.toggle("ico-add-disabled", isChecked);
|
||||
if(isChecked) {
|
||||
if (isChecked) {
|
||||
next.disabled = !isChecked;
|
||||
} else {
|
||||
next.disabled = total <= 0;
|
||||
@@ -585,13 +606,13 @@
|
||||
});
|
||||
});
|
||||
},
|
||||
setting(){
|
||||
if(ENV.data.productList.length > 0) {
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data,true));
|
||||
setting() {
|
||||
if (ENV.data.productList.length > 0) {
|
||||
ENV.data.productList.forEach(data => productRenderer.addItem(data, true));
|
||||
}
|
||||
this.updateLayout();
|
||||
},
|
||||
pastMonthlyDataPopup(){
|
||||
pastMonthlyDataPopup() {
|
||||
//pastProductList 출력하면도미.
|
||||
},
|
||||
//등록없음 선택에 따른 추가하기 버튼 잠금
|
||||
@@ -604,7 +625,7 @@
|
||||
},
|
||||
//등록없음 버튼
|
||||
handleNoDataToggle() {
|
||||
if(!ENV.data.editable && ENV.data.currentStatus == "NOTHING") {
|
||||
if (!ENV.data.editable && ENV.data.currentStatus == "NOTHING") {
|
||||
ENV.elementRefs.noDataCheckbox.checked = true;
|
||||
return;
|
||||
}
|
||||
@@ -615,7 +636,9 @@
|
||||
// 등록폼 추가
|
||||
openAddForm() {
|
||||
const modalContent = document.querySelector('.modal-content');
|
||||
setTimeout(() => { modalContent.scrollTop = 0; }, 0);
|
||||
setTimeout(() => {
|
||||
modalContent.scrollTop = 0;
|
||||
}, 0);
|
||||
//초기화 안됨
|
||||
['landTypeSelect', 'mainYieldUnitCodeSelect', 'mainSaleUnitCodeSelect', 'subYieldUnitCodeSelect', 'subSaleUnitCodeSelect']
|
||||
.forEach(id => etUI.components.SelectBox().core.init(document.getElementById(id)));
|
||||
@@ -646,11 +669,23 @@
|
||||
});
|
||||
|
||||
const errors = [];
|
||||
if (!form.cropName.value) errors.push({ field: 'cropName', message: '재배 작물명을 입력해주세요.' });
|
||||
if (form.mainYield.value && !form.mainYieldUnitCode.value) errors.push({ field: 'mainYieldUnitCode', message: '단위를 선택해주세요.' });
|
||||
if (form.mainSaleAmount.value && !form.mainSaleUnitCode.value) errors.push({ field: 'mainSaleUnitCode', message: '단위를 선택해주세요.' });
|
||||
if (form.subYield.value && !form.subYieldUnitCode.value) errors.push({ field: 'subYieldUnitCode', message: '단위를 선택해주세요.' });
|
||||
if (form.subSaleAmount.value && !form.subSaleUnitCode.value) errors.push({ field: 'subSaleUnitCode', message: '단위를 선택해주세요.' });
|
||||
if (!form.cropName.value) errors.push({field: 'cropName', message: '재배 작물명을 입력해주세요.'});
|
||||
if (form.mainYield.value && !form.mainYieldUnitCode.value) errors.push({
|
||||
field: 'mainYieldUnitCode',
|
||||
message: '단위를 선택해주세요.'
|
||||
});
|
||||
if (form.mainSaleAmount.value && !form.mainSaleUnitCode.value) errors.push({
|
||||
field: 'mainSaleUnitCode',
|
||||
message: '단위를 선택해주세요.'
|
||||
});
|
||||
if (form.subYield.value && !form.subYieldUnitCode.value) errors.push({
|
||||
field: 'subYieldUnitCode',
|
||||
message: '단위를 선택해주세요.'
|
||||
});
|
||||
if (form.subSaleAmount.value && !form.subSaleUnitCode.value) errors.push({
|
||||
field: 'subSaleUnitCode',
|
||||
message: '단위를 선택해주세요.'
|
||||
});
|
||||
|
||||
kri.form.error(errors);
|
||||
if (errors.length > 0) return;
|
||||
@@ -665,7 +700,7 @@
|
||||
else ENV.data.productList.push(product);
|
||||
|
||||
ENV.module.modalPopup.close();
|
||||
setTimeout(() => productRenderer.addItem(product,true), 300);
|
||||
setTimeout(() => productRenderer.addItem(product, true), 300);
|
||||
},
|
||||
// 선택 아이템 수정 (폼 노출)
|
||||
editItemById(id) {
|
||||
@@ -717,15 +752,18 @@
|
||||
},
|
||||
|
||||
|
||||
|
||||
goSave(){
|
||||
goSave() {
|
||||
|
||||
|
||||
ajaxUtil._ajaxAsync(
|
||||
ENV.httpUrl.save,
|
||||
{status : ENV.elementRefs.noDataCheckbox.checked, id:ENV.data.id, productList : ENV.data.productList},
|
||||
{
|
||||
status: ENV.elementRefs.noDataCheckbox.checked,
|
||||
id: ENV.data.id,
|
||||
productList: ENV.data.productList
|
||||
},
|
||||
function (rstData, status) {
|
||||
if(rstData.code ==='SUCCESS'){
|
||||
if (rstData.code === 'SUCCESS') {
|
||||
ajaxUtil._alert('등록이 완료되었습니다.', null, function () {
|
||||
/**
|
||||
* TODO
|
||||
@@ -733,7 +771,7 @@
|
||||
*/
|
||||
history.back()
|
||||
});
|
||||
} else if (rstData.code === 'ERROR'){
|
||||
} else if (rstData.code === 'ERROR') {
|
||||
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
||||
}
|
||||
},
|
||||
@@ -742,7 +780,6 @@
|
||||
};
|
||||
|
||||
|
||||
|
||||
const productRenderer = {
|
||||
//화면에 아이템 추가
|
||||
addItem(product, isEdit) {
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
<main id="content" role="main">
|
||||
<div class="inner">
|
||||
<section class="search-area">
|
||||
<form autocomplete="off" method="get" name="reqForm" action="/info/notice" onsubmit="formControl.goSearch()"
|
||||
<form autocomplete="off" method="get" name="reqForm" action="/info/notice"
|
||||
onsubmit="formControl.goSearch()"
|
||||
th:object="${reqVO}"
|
||||
>
|
||||
<input type="hidden" name="sort" id="sort" value="createdAt,DESC"/>
|
||||
<input type="hidden" name="page" id="page" th:value="${notices != null} ? ${notices.number} : 0"/>
|
||||
|
||||
<div id="searchFieldId" class="component-select bottom-sheet" data-props-default="제목 + 내용" data-props-type="bottomSheet">
|
||||
<div id="searchFieldId" class="component-select bottom-sheet" data-props-default="제목 + 내용"
|
||||
data-props-type="bottomSheet">
|
||||
<input type="hidden" name="searchField"/>
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt">제목 + 내용</span>
|
||||
@@ -26,17 +28,26 @@
|
||||
</div>
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<li class="option" th:classappend="*{searchField == null or searchField == 'titleContent'} ? ' current' : ''" data-value="titleContent">제목 + 내용</li>
|
||||
<li class="option" th:classappend="*{searchField == 'title'} ? ' current' : ''" data-value="title">제목</li>
|
||||
<li class="option" th:classappend="*{searchField == 'content'} ? ' current' : ''" data-value="content">내용</li>
|
||||
<li class="option"
|
||||
th:classappend="*{searchField == null or searchField == 'titleContent'} ? ' current' : ''"
|
||||
data-value="titleContent">제목 + 내용
|
||||
</li>
|
||||
<li class="option" th:classappend="*{searchField == 'title'} ? ' current' : ''"
|
||||
data-value="title">제목
|
||||
</li>
|
||||
<li class="option" th:classappend="*{searchField == 'content'} ? ' current' : ''"
|
||||
data-value="content">내용
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요" name="searchValue" th:field="*{searchValue}"/>
|
||||
<i class="input-field-ico ico-search" aria-hidden="true" onclick="formControl.goSearch()"></i>
|
||||
<input type="text" id="temp_input_ico_id_0001" placeholder="검색어를 입력해 주세요" name="searchValue"
|
||||
th:field="*{searchValue}"/>
|
||||
<i class="input-field-ico ico-search" aria-hidden="true"
|
||||
onclick="formControl.goSearch()"></i>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -69,7 +80,6 @@
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<div th:replace="common/list-components :: paginationCommon(${notices})"></div>
|
||||
|
||||
|
||||
@@ -87,13 +97,13 @@
|
||||
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
|
||||
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
|
||||
},
|
||||
module:{
|
||||
confirmPopup : null
|
||||
module: {
|
||||
confirmPopup: null
|
||||
},
|
||||
submitted: false,
|
||||
};
|
||||
let formControl = {
|
||||
init(){
|
||||
init() {
|
||||
|
||||
},
|
||||
|
||||
@@ -101,13 +111,13 @@
|
||||
* TODO 검색할때 각 페이지에 함수 구현 필요.
|
||||
* TODO 일단 뒤로가기에 대한 부분 정의가 없기에 페이지 이동으로 처리해둠...
|
||||
*/
|
||||
goSearch(){
|
||||
goSearch() {
|
||||
const f = document.reqForm;
|
||||
|
||||
f.searchField.value = document.getElementById('searchFieldId').value;
|
||||
f.submit();
|
||||
},
|
||||
goPageable(page, size, sort){
|
||||
goPageable(page, size, sort) {
|
||||
const f = document.reqForm;
|
||||
f.page.value = page;
|
||||
f.submit();
|
||||
|
||||
@@ -8,19 +8,20 @@
|
||||
<div class="inner">
|
||||
<dl class="detail-tit-group">
|
||||
<dt th:text="${notice.title}"></dt>
|
||||
<dd>[[${#temporals.format(notice.createdAt, 'yyyy.MM.dd')}]] <span class="badge" th:if="${notice.newDate}">new</span></dd>
|
||||
<dd>[[${#temporals.format(notice.createdAt, 'yyyy.MM.dd')}]] <span class="badge"
|
||||
th:if="${notice.newDate}">new</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="detail-content">
|
||||
<p th:utext="${notice.content}"></p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="download-file" th:if="${!#lists.isEmpty(notice.uploadFiles)}">
|
||||
<p class="tit">첨부파일</p>
|
||||
<ul>
|
||||
<li th:each="item : ${notice.uploadFiles}"><a th:href="${item.attachmentURL}" download th:text="${item.originName}"></a></li>
|
||||
<li th:each="item : ${notice.uploadFiles}"><a th:href="${item.attachmentURL}" download
|
||||
th:text="${item.originName}"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -40,8 +41,8 @@ root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
|
||||
root: /*[[#{uri.front.info.notice.path}]]*/'detailUrl',
|
||||
notice: /*[[#{uri.front.info.notice.path}]]*/'noticeUrl'
|
||||
},
|
||||
module:{
|
||||
confirmPopup : null
|
||||
module: {
|
||||
confirmPopup: null
|
||||
},
|
||||
submitted: false,
|
||||
};
|
||||
@@ -49,7 +50,7 @@ root: /*[[|#{uri.front.info.user.path}/password|]]*/'rootUrl',
|
||||
init() {
|
||||
|
||||
},
|
||||
goList(){
|
||||
goList() {
|
||||
/**
|
||||
* TODO 외부 유입에 따라 history.back과 location.href 가 적절하게 사용되어야함...
|
||||
* 전체적인 수정 필요.(이전 페이지
|
||||
|
||||
@@ -15,18 +15,20 @@
|
||||
</hgroup>
|
||||
|
||||
<section class="form-group">
|
||||
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/}" >
|
||||
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/}">
|
||||
<div class="component-input" data-props-toggle-Password="true">
|
||||
<div class="input-label">
|
||||
<label for="password" class="label-txt">비밀번호</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password" maxlength="4">
|
||||
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password"
|
||||
maxlength="4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.authInfoUser()">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary"
|
||||
onclick="formControl.authInfoUser()">
|
||||
<span class="btn-txt">다음</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -49,8 +51,6 @@
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
submitted: false,
|
||||
};
|
||||
|
||||
@@ -64,11 +64,11 @@
|
||||
ENV.httpUrl.auth,
|
||||
obj,
|
||||
function (rstData, status) {
|
||||
if(rstData.code ==='SUCCESS'){
|
||||
if (rstData.code === 'SUCCESS') {
|
||||
location.replace(ENV.httpUrl.user);
|
||||
} else if (rstData.code === 'ERROR'){
|
||||
if(rstData.message ==='INVALID_PASSWORD'){
|
||||
ajaxUtil._alert('입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.',null);
|
||||
} else if (rstData.code === 'ERROR') {
|
||||
if (rstData.message === 'INVALID_PASSWORD') {
|
||||
ajaxUtil._alert('입력하신 정보가 맞지 않습니다.\n 다시 확인해주세요.', null);
|
||||
} else {
|
||||
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
<p class="form-desc">필수입력</p>
|
||||
|
||||
<section class="form-group">
|
||||
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/api/front/info/user/update}" th:object="${userInfo}">
|
||||
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();"
|
||||
th:action="@{/api/front/info/user/update}" th:object="${userInfo}">
|
||||
<!-- 이름 -->
|
||||
<div class="component-input">
|
||||
<div class="input-label">
|
||||
@@ -19,7 +20,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" th:field="*{ownerName}" maxlength="10">
|
||||
<input type="text" id="temp_input_0001" placeholder="이름을 입력해 주세요" th:field="*{ownerName}"
|
||||
maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 연령 -->
|
||||
@@ -30,7 +32,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_0002" placeholder="만 나이를 입력해 주세요" th:field="*{ownerAge}" maxlength="3" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
<input type="text" id="temp_input_0002" placeholder="만 나이를 입력해 주세요" th:field="*{ownerAge}"
|
||||
maxlength="3" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 가구연락처 -->
|
||||
@@ -43,7 +46,8 @@
|
||||
<div class="d-flex">
|
||||
<div class="select-group">
|
||||
|
||||
<div id="tel1Id" class="component-select bottom-sheet" th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
|
||||
<div id="tel1Id" class="component-select bottom-sheet"
|
||||
th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
|
||||
<input type="hidden" th:field="*{tel1}" data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
@@ -81,12 +85,14 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" placeholder=0000 th:field="*{tel2}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
|
||||
<input type="text" placeholder=0000 th:field="*{tel2}" maxlength="4"
|
||||
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" placeholder=0000 th:field="*{tel3}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
|
||||
<input type="text" placeholder=0000 th:field="*{tel3}" maxlength="4"
|
||||
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,7 +108,8 @@
|
||||
<div class="select-group">
|
||||
|
||||
|
||||
<div id="phoneId" class="component-select bottom-sheet" th:data-props-default="${userInfo.phone1}" data-props-type="bottomSheet">
|
||||
<div id="phoneId" class="component-select bottom-sheet"
|
||||
th:data-props-default="${userInfo.phone1}" data-props-type="bottomSheet">
|
||||
<input type="hidden" th:field="*{phone1}" data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
@@ -125,12 +132,14 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_0006" placeholder=0000 th:field="*{phone2}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
<input type="text" id="temp_input_0006" placeholder=0000 th:field="*{phone2}"
|
||||
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_0007" placeholder=0000 th:field="*{phone3}" maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
<input type="text" id="temp_input_0007" placeholder=0000 th:field="*{phone3}"
|
||||
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -146,7 +155,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="regionMainCodeId" class="component-select bottom-sheet" data-props-default="시/도 선택" data-props-type="bottomSheet">
|
||||
<div id="regionMainCodeId" class="component-select bottom-sheet" data-props-default="시/도 선택"
|
||||
data-props-type="bottomSheet">
|
||||
<input type="hidden" th:field="*{regionMainCode}" data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt">선택</span>
|
||||
@@ -161,7 +171,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${regionMainList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}">option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -172,7 +184,8 @@
|
||||
|
||||
|
||||
<div class="select-group">
|
||||
<div id="regionSubCodeId" class="component-select bottom-sheet" data-props-default="시/군/구 선택" data-props-type="bottomSheet">
|
||||
<div id="regionSubCodeId" class="component-select bottom-sheet"
|
||||
data-props-default="시/군/구 선택" data-props-type="bottomSheet">
|
||||
<input type="hidden" th:field="*{regionSubCode}" data-type="select">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt">선택</span>
|
||||
@@ -187,7 +200,9 @@
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<th:block th:each="item : ${regionSubList}">
|
||||
<li class="option" th:data-value="${item.id}" th:text="${item.codeText}" >option1</li>
|
||||
<li class="option" th:data-value="${item.id}"
|
||||
th:text="${item.codeText}">option1
|
||||
</li>
|
||||
</th:block>
|
||||
|
||||
</ul>
|
||||
@@ -197,7 +212,8 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요" th:field="*{address}" maxlength="50"/>
|
||||
<input type="text" id="temp_input_00023" placeholder="세부 주소를 입력해 주세요"
|
||||
th:field="*{address}" maxlength="50"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -216,8 +232,6 @@
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 모달 팝업 -->
|
||||
<div class="layer-wrap">
|
||||
<div class="component-modal confirmPopup" data-props-dimm-click="true">
|
||||
@@ -235,12 +249,14 @@
|
||||
<div class="component-btns">
|
||||
<div class="btns-row two-col">
|
||||
<div class="btns-col-1">
|
||||
<button type="button" class="btn btn-full btn-l btn-secondary" onclick="ENV.module.confirmPopup.close();">
|
||||
<button type="button" class="btn btn-full btn-l btn-secondary"
|
||||
onclick="ENV.module.confirmPopup.close();">
|
||||
<span class="btn-txt">동의 안함</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btns-col-2">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary" onclick="formControl.confirmPopupOk()">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary"
|
||||
onclick="formControl.confirmPopupOk()">
|
||||
<span class="btn-txt">동의</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -256,13 +272,9 @@
|
||||
<!-- //모달 팝업 -->
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
let ENV = {
|
||||
@@ -271,28 +283,28 @@
|
||||
user: /*[[|/api/front#{uri.front.info.user.path}/update|]]*/'updateUrl',
|
||||
myInfo: /*[[#{uri.front.info.path}]]*/'myInfoUrl',
|
||||
},
|
||||
module:{
|
||||
confirmPopup : null
|
||||
module: {
|
||||
confirmPopup: null
|
||||
},
|
||||
submitted: false,
|
||||
};
|
||||
|
||||
let formControl = {
|
||||
init(){
|
||||
init() {
|
||||
this._bindUI();
|
||||
ajaxUtil._alert('select 010->10으로 노출\n 최초값 지정 및 값 취득 함수 필요\n 개인정보 작성 필요\n 모달 내부 스크롤 기능 추가 필요',null);
|
||||
ajaxUtil._alert('select 010->10으로 노출\n 최초값 지정 및 값 취득 함수 필요\n 개인정보 작성 필요\n 모달 내부 스크롤 기능 추가 필요', null);
|
||||
|
||||
},
|
||||
_bindUI(){
|
||||
_bindUI() {
|
||||
ENV.module.confirmPopup = document.querySelector(".confirmPopup").ui;
|
||||
},
|
||||
confirmPopup(){
|
||||
confirmPopup() {
|
||||
ENV.module.confirmPopup.open();
|
||||
},
|
||||
confirmPopupOk(){
|
||||
confirmPopupOk() {
|
||||
ENV.module.confirmPopup.close();
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
formControl.updateUserInfo();
|
||||
}, 500);
|
||||
},
|
||||
@@ -324,7 +336,7 @@
|
||||
ENV.httpUrl.user,
|
||||
obj,
|
||||
function (rstData, status) {
|
||||
if(rstData.code ==='SUCCESS'){
|
||||
if (rstData.code === 'SUCCESS') {
|
||||
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, function () {
|
||||
/**
|
||||
* TODO
|
||||
@@ -332,7 +344,7 @@
|
||||
*/
|
||||
history.back()
|
||||
});
|
||||
} else if (rstData.code === 'ERROR'){
|
||||
} else if (rstData.code === 'ERROR') {
|
||||
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user