머지
This commit is contained in:
@@ -2,6 +2,7 @@ package app.module.admin.usecase.household.createHouseholdUI.adapters.web;
|
|||||||
|
|
||||||
import app.module.admin.config.application.util.AdminUtil;
|
import app.module.admin.config.application.util.AdminUtil;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
|
import app.module.core.usecase.uicode.toptier.ports.UICodeTopTierPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
@@ -15,6 +16,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|||||||
class CreateHouseholdUIController {
|
class CreateHouseholdUIController {
|
||||||
|
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final UICodeTopTierPortIn uiCodeTopTierPortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/households/create")
|
@GetMapping(path = "/households/create")
|
||||||
String operate(Model model, @ModelAttribute("reqVO") CreateHouseholdUIReqVO reqVO,
|
String operate(Model model, @ModelAttribute("reqVO") CreateHouseholdUIReqVO reqVO,
|
||||||
@@ -28,14 +30,10 @@ class CreateHouseholdUIController {
|
|||||||
|
|
||||||
// 실사
|
// 실사
|
||||||
model.addAttribute("regionMainList", uiCodeListPortIn.connect("code.region.main"));
|
model.addAttribute("regionMainList", uiCodeListPortIn.connect("code.region.main"));
|
||||||
// 지역
|
// 지역 + 세부지역
|
||||||
model.addAttribute("regionSubList", uiCodeListPortIn.connect("code.region.sub"));
|
model.addAttribute("regionSubList", uiCodeTopTierPortIn.connect("code.region.sub"));
|
||||||
// 세부지역
|
// 업종 대분류 + 업종 중분류1
|
||||||
model.addAttribute("regionDetailList", uiCodeListPortIn.connect("code.region.detail"));
|
model.addAttribute("industryLargeList", uiCodeTopTierPortIn.connect("code.industry.large"));
|
||||||
// 업종 대분류
|
|
||||||
model.addAttribute("industryLargeList", uiCodeListPortIn.connect("code.industry.large"));
|
|
||||||
// 업종 중분류1
|
|
||||||
model.addAttribute("industryMiddleList", uiCodeListPortIn.connect("code.industry.middle"));
|
|
||||||
|
|
||||||
return "households/create";
|
return "households/create";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import app.module.core.config.application.util.CommonUtil;
|
|||||||
import app.module.core.usecase.admin.view.ports.AdminViewPortIn;
|
import app.module.core.usecase.admin.view.ports.AdminViewPortIn;
|
||||||
import app.module.core.usecase.admin.view.ports.application.domain.AdminView;
|
import app.module.core.usecase.admin.view.ports.application.domain.AdminView;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
|
import app.module.core.usecase.uicode.toptier.ports.UICodeTopTierPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class GetHouseholdsStatusUIController {
|
class GetHouseholdsStatusUIController {
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final UICodeTopTierPortIn uiCodeTopTierPortIn;
|
||||||
private final AdminViewPortIn adminViewPortIn;
|
private final AdminViewPortIn adminViewPortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/households")
|
@GetMapping(path = "/households")
|
||||||
@@ -43,14 +45,10 @@ class GetHouseholdsStatusUIController {
|
|||||||
model.addAttribute("regionMainList", uiCodeListPortIn.connect("code.region.main"));
|
model.addAttribute("regionMainList", uiCodeListPortIn.connect("code.region.main"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 지역
|
// 지역 + 세부지역
|
||||||
model.addAttribute("regionSubList", uiCodeListPortIn.connect("code.region.sub"));
|
model.addAttribute("regionSubList", uiCodeTopTierPortIn.connect("code.region.sub"));
|
||||||
// 세부지역
|
// 업종 대분류 + 업종 중분류1
|
||||||
model.addAttribute("regionDetailList", uiCodeListPortIn.connect("code.region.detail"));
|
model.addAttribute("industryLargeList", uiCodeTopTierPortIn.connect("code.industry.large"));
|
||||||
// 업종 대분류
|
|
||||||
model.addAttribute("industryLargeList", uiCodeListPortIn.connect("code.industry.large"));
|
|
||||||
// 업종 중분류1
|
|
||||||
model.addAttribute("industryMiddleList", uiCodeListPortIn.connect("code.industry.middle"));
|
|
||||||
|
|
||||||
model.addAttribute("monthList", DateUiUtil.getRecentMonths(13));
|
model.addAttribute("monthList", DateUiUtil.getRecentMonths(13));
|
||||||
model.addAttribute("currentMonth", DateUiUtil.getCurrentMonthValue());
|
model.addAttribute("currentMonth", DateUiUtil.getCurrentMonthValue());
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.
|
|||||||
|
|
||||||
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.RemoveDailyPortOut;
|
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.RemoveDailyPortOut;
|
||||||
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain.RemoveDailyCmd;
|
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain.RemoveDailyCmd;
|
||||||
|
import app.module.core.config.application.annotation.UpdateCommand;
|
||||||
import app.module.core.config.application.enums.DailySort;
|
import app.module.core.config.application.enums.DailySort;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -13,6 +14,7 @@ import org.springframework.stereotype.Repository;
|
|||||||
public class RemoveDailyDao implements RemoveDailyPortOut {
|
public class RemoveDailyDao implements RemoveDailyPortOut {
|
||||||
private final RemoveDailyMapper mapper;
|
private final RemoveDailyMapper mapper;
|
||||||
|
|
||||||
|
@UpdateCommand
|
||||||
@Override
|
@Override
|
||||||
public void operate(RemoveDailyCmd command) {
|
public void operate(RemoveDailyCmd command) {
|
||||||
if (command.getCurrentStep() != null) {
|
if (command.getCurrentStep() != null) {
|
||||||
|
|||||||
@@ -15,11 +15,9 @@ public class RemoveDailyService implements RemoveDailyPortIn {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void operate(RemoveDailyReqVO reqVO) {
|
public void operate(RemoveDailyReqVO reqVO) {
|
||||||
RemoveDailyCmd command = AuditUtil.update(
|
RemoveDailyCmd command = new RemoveDailyCmd(
|
||||||
new RemoveDailyCmd(
|
|
||||||
reqVO.getSelectedIds(),
|
reqVO.getSelectedIds(),
|
||||||
reqVO.getCurrentStep())
|
reqVO.getCurrentStep());
|
||||||
);
|
|
||||||
|
|
||||||
portOut.operate(command);
|
portOut.operate(command);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.adapt
|
|||||||
|
|
||||||
import app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.ports.UpdateDailyNonePortOut;
|
import app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.ports.UpdateDailyNonePortOut;
|
||||||
import app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.ports.application.domain.UpdateDailyNoneCmd;
|
import app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.ports.application.domain.UpdateDailyNoneCmd;
|
||||||
|
import app.module.core.config.application.annotation.UpdateCommand;
|
||||||
import app.module.core.config.application.enums.DailySort;
|
import app.module.core.config.application.enums.DailySort;
|
||||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||||
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
@@ -16,6 +17,7 @@ class UpdateDailyNoneDao implements UpdateDailyNonePortOut {
|
|||||||
private final UpdateDailyNoneMapper mapper;
|
private final UpdateDailyNoneMapper mapper;
|
||||||
private final DailyRecordPortIn dailyRecordPortIn;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
|
@UpdateCommand
|
||||||
@Override
|
@Override
|
||||||
public void create(UpdateDailyNoneCmd command) {
|
public void create(UpdateDailyNoneCmd command) {
|
||||||
command.setDailyRecordSeq(mapper.getDailyRecordSeq(command));
|
command.setDailyRecordSeq(mapper.getDailyRecordSeq(command));
|
||||||
|
|||||||
@@ -18,15 +18,13 @@ public class UpdateDailyNoneService implements UpdateDailyNonePortIn {
|
|||||||
public void create(UpdateDailyNoneReqVO formVO) {
|
public void create(UpdateDailyNoneReqVO formVO) {
|
||||||
DailyTargetStatus currentStatus = "Y".equals(formVO.getTodayNone()) ? DailyTargetStatus.TODAY_NONE : DailyTargetStatus.TARGET;
|
DailyTargetStatus currentStatus = "Y".equals(formVO.getTodayNone()) ? DailyTargetStatus.TODAY_NONE : DailyTargetStatus.TARGET;
|
||||||
|
|
||||||
UpdateDailyNoneCmd command = AuditUtil.update(
|
UpdateDailyNoneCmd command = new UpdateDailyNoneCmd(
|
||||||
new UpdateDailyNoneCmd(
|
|
||||||
formVO.getRecordMonth(),
|
formVO.getRecordMonth(),
|
||||||
formVO.getGroupNo(),
|
formVO.getGroupNo(),
|
||||||
formVO.getHouseholdSeq(),
|
formVO.getHouseholdSeq(),
|
||||||
formVO.getCurrentStep(),
|
formVO.getCurrentStep(),
|
||||||
currentStatus,
|
currentStatus,
|
||||||
null)
|
null);
|
||||||
);
|
|
||||||
|
|
||||||
portOut.create(command);
|
portOut.create(command);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,11 @@ import app.module.admin.usecase.household.getHouseholdStatus.ports.application.d
|
|||||||
import app.module.admin.usecase.household.getHouseholdStatus.ports.application.domain.GetHouseholdStatusCmd;
|
import app.module.admin.usecase.household.getHouseholdStatus.ports.application.domain.GetHouseholdStatusCmd;
|
||||||
import app.module.admin.usecase.household.updateHouseholdStatusUI.adapters.web.model.UpdateHouseholdStatusUIResVO;
|
import app.module.admin.usecase.household.updateHouseholdStatusUI.adapters.web.model.UpdateHouseholdStatusUIResVO;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
|
import app.module.core.usecase.uicode.toptier.ports.UICodeTopTierPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@@ -22,6 +24,7 @@ class UpdateHouseholdStatusUIController {
|
|||||||
|
|
||||||
private final GetHouseholdStatusPortIn getHouseholdStatusPortIn;
|
private final GetHouseholdStatusPortIn getHouseholdStatusPortIn;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final UICodeTopTierPortIn uiCodeTopTierPortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/households/update/{seq}")
|
@GetMapping(path = "/households/update/{seq}")
|
||||||
String operate(@PathVariable Long seq, Model model,
|
String operate(@PathVariable Long seq, Model model,
|
||||||
@@ -39,14 +42,10 @@ class UpdateHouseholdStatusUIController {
|
|||||||
|
|
||||||
// 실사
|
// 실사
|
||||||
model.addAttribute("regionMainList", uiCodeListPortIn.connect("code.region.main"));
|
model.addAttribute("regionMainList", uiCodeListPortIn.connect("code.region.main"));
|
||||||
// 지역
|
// 지역 + 세부지역
|
||||||
model.addAttribute("regionSubList", uiCodeListPortIn.connect("code.region.sub"));
|
model.addAttribute("regionSubList", uiCodeTopTierPortIn.connect("code.region.sub"));
|
||||||
// 세부지역
|
// 업종 대분류 + 업종 중분류1
|
||||||
model.addAttribute("regionDetailList", uiCodeListPortIn.connect("code.region.detail"));
|
model.addAttribute("industryLargeList", uiCodeTopTierPortIn.connect("code.industry.large"));
|
||||||
// 업종 대분류
|
|
||||||
model.addAttribute("industryLargeList", uiCodeListPortIn.connect("code.industry.large"));
|
|
||||||
// 업종 중분류1
|
|
||||||
model.addAttribute("industryMiddleList", uiCodeListPortIn.connect("code.industry.middle"));
|
|
||||||
|
|
||||||
|
|
||||||
// 임가 상세 정보
|
// 임가 상세 정보
|
||||||
@@ -59,12 +58,12 @@ class UpdateHouseholdStatusUIController {
|
|||||||
result.getHouseholdNum(),
|
result.getHouseholdNum(),
|
||||||
result.getHouseholdName(),
|
result.getHouseholdName(),
|
||||||
result.getHouseholdAge(),
|
result.getHouseholdAge(),
|
||||||
result.getHouseholdTel() != null ? result.getHouseholdTel().split("-")[0] : "",
|
StringUtils.hasText(result.getHouseholdTel()) ? result.getHouseholdTel().split("-")[0] : "",
|
||||||
result.getHouseholdTel() != null ? result.getHouseholdTel().split("-")[1] : "",
|
StringUtils.hasText(result.getHouseholdTel()) ? result.getHouseholdTel().split("-")[1] : "",
|
||||||
result.getHouseholdTel() != null ? result.getHouseholdTel().split("-")[2] : "",
|
StringUtils.hasText(result.getHouseholdTel()) ? result.getHouseholdTel().split("-")[2] : "",
|
||||||
result.getHouseholdPhone() != null ? result.getHouseholdPhone().split("-")[0] : "",
|
StringUtils.hasText(result.getHouseholdPhone()) ? result.getHouseholdPhone().split("-")[0] : "",
|
||||||
result.getHouseholdPhone() != null ? result.getHouseholdPhone().split("-")[1] : "",
|
StringUtils.hasText(result.getHouseholdPhone()) ? result.getHouseholdPhone().split("-")[1] : "",
|
||||||
result.getHouseholdPhone() != null ? result.getHouseholdPhone().split("-")[2] : "",
|
StringUtils.hasText(result.getHouseholdPhone()) ? result.getHouseholdPhone().split("-")[2] : "",
|
||||||
result.getRegionMainCode(),
|
result.getRegionMainCode(),
|
||||||
result.getRegionSubCode(),
|
result.getRegionSubCode(),
|
||||||
result.getRegionDetailCode(),
|
result.getRegionDetailCode(),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import app.module.admin.usecase.researcher.adpaters.web.model.GetResearchersUIRe
|
|||||||
import app.module.admin.usecase.researcher.adpaters.web.model.ResearchersDetailUIReqVO;
|
import app.module.admin.usecase.researcher.adpaters.web.model.ResearchersDetailUIReqVO;
|
||||||
import app.module.admin.usecase.researcher.ports.ResearcherPortIn;
|
import app.module.admin.usecase.researcher.ports.ResearcherPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
|
import app.module.core.usecase.uicode.toptier.ports.UICodeTopTierPortIn;
|
||||||
import app.module.core.usecase.uicode.view.ports.UICodeViewPortIn;
|
import app.module.core.usecase.uicode.view.ports.UICodeViewPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -22,6 +23,7 @@ import java.util.Objects;
|
|||||||
@RequestMapping(path = "/researcher")
|
@RequestMapping(path = "/researcher")
|
||||||
class ResearcherController {
|
class ResearcherController {
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final UICodeTopTierPortIn uiCodeTopTierPortIn;
|
||||||
private final ResearcherPortIn researcherPortIn;
|
private final ResearcherPortIn researcherPortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/researchers")
|
@GetMapping(path = "/researchers")
|
||||||
@@ -45,10 +47,8 @@ class ResearcherController {
|
|||||||
model.addAttribute("researcherDto", researcherPortIn.detail(adminSeq));
|
model.addAttribute("researcherDto", researcherPortIn.detail(adminSeq));
|
||||||
model.addAttribute("monthList", DateUiUtil.getRecentMonths(13));
|
model.addAttribute("monthList", DateUiUtil.getRecentMonths(13));
|
||||||
model.addAttribute("currentMonth", DateUiUtil.getCurrentMonthValue());
|
model.addAttribute("currentMonth", DateUiUtil.getCurrentMonthValue());
|
||||||
// 모달용 지역
|
// 모달용 지역 + 세부지역
|
||||||
model.addAttribute("regionSubList", uiCodeListPortIn.connect("code.region.sub"));
|
model.addAttribute("regionSubList", uiCodeTopTierPortIn.connect("code.region.sub"));
|
||||||
// 모달용 세부지역
|
|
||||||
model.addAttribute("regionDetailList", uiCodeListPortIn.connect("code.region.detail"));
|
|
||||||
|
|
||||||
return "researcher/detail";
|
return "researcher/detail";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
join researcher_has_household rhh ON h.seq = rhh.household_seq and rhh.is_deleted = false
|
join researcher_has_household rhh ON h.seq = rhh.household_seq and rhh.is_deleted = false
|
||||||
left join uicode rm ON rm.parent_id = 'code.region.main' AND rm.id = h.region_main_code
|
left join uicode rm ON rm.parent_id = 'code.region.main' AND rm.id = h.region_main_code
|
||||||
left join uicode rs ON rs.parent_id = 'code.region.sub' AND rs.id = h.region_sub_code
|
left join uicode rs ON rs.parent_id = 'code.region.sub' AND rs.id = h.region_sub_code
|
||||||
left join uicode rd ON rd.parent_id = 'code.region.detail' AND rd.id = h.region_detail_code
|
left join uicode rd ON rd.id = h.region_detail_code
|
||||||
left join uicode il ON il.parent_id = 'code.industry.large' AND il.id = h.industry_large_code
|
left join uicode il ON il.parent_id = 'code.industry.large' AND il.id = h.industry_large_code
|
||||||
left join uicode im ON im.parent_id = 'code.industry.middle' AND im.id = h.industry_middle_code
|
left join uicode im ON im.parent_id = 'code.industry.middle' AND im.id = h.industry_middle_code
|
||||||
where 1=1
|
where 1=1
|
||||||
|
|||||||
@@ -470,3 +470,50 @@ const limitMaxLength = (el) => {
|
|||||||
el.value = el.value.replace(/\D/g, '').slice(0, maxLength);
|
el.value = el.value.replace(/\D/g, '').slice(0, maxLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 공통코드 기반의 2단계 셀렉트박스(부모/자식) UI를 구성하는 함수
|
||||||
|
*
|
||||||
|
* @param {Object} codeList - 공통코드 리스트 객체
|
||||||
|
* @param {string} parentSelector - 부모 셀렉트박스 셀렉터 (ex. '#regionSubCode')
|
||||||
|
* @param {string} childSelector - 자식 셀렉트박스 셀렉터 (ex. '#regionDetailCode')
|
||||||
|
* @param {string} selectedParentCode - 초기 선택할 부모 코드값 (ex. 'code.region.sub.31')
|
||||||
|
* @param {string} selectedChildCode - 초기 선택할 자식 코드값 (ex. 'code.region.detail.9')
|
||||||
|
*/
|
||||||
|
const setSelectBoxUiCode = ({
|
||||||
|
codeList,
|
||||||
|
parentSelector,
|
||||||
|
childSelector,
|
||||||
|
selectedParentCode = '',
|
||||||
|
selectedChildCode = ''
|
||||||
|
}) => {
|
||||||
|
const $parent = $(parentSelector);
|
||||||
|
const $child = $(childSelector);
|
||||||
|
|
||||||
|
if (!codeList?.nodes || !$parent.length || !$child.length) return;
|
||||||
|
|
||||||
|
const renderOptions = ($el, list, selected) => {
|
||||||
|
$el.html('<option value="">전체</option>');
|
||||||
|
list.forEach(item => {
|
||||||
|
const val = item.id.split('.').pop();
|
||||||
|
const isSelected = item.id === selected ? 'selected' : '';
|
||||||
|
$el.append(`<option value="${item.id}" ${isSelected}>${val}. ${item.codeText}</option>`);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const loadChildren = (parentId, selectedChild = '') => {
|
||||||
|
$child.html('<option value="">전체</option>');
|
||||||
|
if (!parentId) return;
|
||||||
|
|
||||||
|
const parent = codeList.nodes.find(n => n.id === parentId);
|
||||||
|
if (!parent?.nodes) return;
|
||||||
|
renderOptions($child, parent.nodes, selectedChild);
|
||||||
|
};
|
||||||
|
|
||||||
|
renderOptions($parent, codeList.nodes, selectedParentCode);
|
||||||
|
if (selectedParentCode) loadChildren(selectedParentCode, selectedChildCode);
|
||||||
|
|
||||||
|
$parent.on('change', function () {
|
||||||
|
loadChildren($(this).val());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<select class="select-list" id="regionSubCode" name="regionSubCode">
|
<select class="select-list" id="regionSubCode" name="regionSubCode">
|
||||||
<option value="" selected>전체</option>
|
<option value="" selected>전체</option>
|
||||||
<option th:each="region : ${regionSubList}" th:value="${region.id}" th:text="${region.codeText}"></option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
@@ -58,7 +57,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<select class="select-list" id="regionDetailCode" name="regionDetailCode">
|
<select class="select-list" id="regionDetailCode" name="regionDetailCode">
|
||||||
<option value="" selected>전체</option>
|
<option value="" selected>전체</option>
|
||||||
<option th:each="subRegion : ${regionDetailList}" th:value="${subRegion.id}" th:text="${subRegion.codeText}"></option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -142,6 +140,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
const regionList = [[${regionSubList}]];
|
||||||
|
</script>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
const showHouseholdModal = (button) => {
|
const showHouseholdModal = (button) => {
|
||||||
const regionMainCode = button.getAttribute('data-region-main-code') || '';
|
const regionMainCode = button.getAttribute('data-region-main-code') || '';
|
||||||
@@ -154,6 +156,13 @@
|
|||||||
existingModal.remove();
|
existingModal.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 지역, 세부지역 셀렉트박스 세팅
|
||||||
|
setSelectBoxUiCode({
|
||||||
|
codeList: regionList,
|
||||||
|
parentSelector: '#regionSubCode',
|
||||||
|
childSelector: '#regionDetailCode',
|
||||||
|
});
|
||||||
|
|
||||||
document.querySelector(".modal01").ui.open();
|
document.querySelector(".modal01").ui.open();
|
||||||
|
|
||||||
// 초기 데이터 조회
|
// 초기 데이터 조회
|
||||||
|
|||||||
@@ -131,22 +131,16 @@
|
|||||||
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="regionSubCode" required>
|
<select class="select-list" name="regionSubCode" id="regionSubCode" required>
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${regionSubList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>세부 지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
<th>세부 지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="regionDetailCode" required>
|
<select class="select-list" name="regionDetailCode" id="regionDetailCode" required>
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${regionDetailList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -165,22 +159,16 @@
|
|||||||
<th>업종 대분류</th>
|
<th>업종 대분류</th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="industryLargeCode">
|
<select class="select-list" name="industryLargeCode" id="industryLargeCode">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${industryLargeList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>업종 중분류1</th>
|
<th>업종 중분류1</th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="industryMiddleCode">
|
<select class="select-list" name="industryMiddleCode" id="industryMiddleCode">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>>
|
||||||
<option th:each="item : ${industryMiddleList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -269,6 +257,27 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
|
<script th:inline="javascript">
|
||||||
|
const regionList = [[${regionSubList}]];
|
||||||
|
const industryLargeList = [[${industryLargeList}]];
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
// 지역, 세부지역 셀렉트박스 세팅
|
||||||
|
setSelectBoxUiCode({
|
||||||
|
codeList: regionList,
|
||||||
|
parentSelector: '#regionSubCode',
|
||||||
|
childSelector: '#regionDetailCode'
|
||||||
|
});
|
||||||
|
|
||||||
|
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||||
|
setSelectBoxUiCode({
|
||||||
|
codeList: industryLargeList,
|
||||||
|
parentSelector: '#industryLargeCode',
|
||||||
|
childSelector: '#industryMiddleCode',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
// 임가번호 중복확인 변수
|
// 임가번호 중복확인 변수
|
||||||
let checkDuplicate = false;
|
let checkDuplicate = false;
|
||||||
|
|||||||
@@ -78,11 +78,8 @@
|
|||||||
지역
|
지역
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<select class="select-list" name="regionSubCode" th:field="*{regionSubCode}">
|
<select class="select-list" name="regionSubCode" id="regionSubCode" th:field="*{regionSubCode}">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${regionSubList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
@@ -91,11 +88,8 @@
|
|||||||
세부지역
|
세부지역
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<select class="select-list" name="regionDetailCode" th:field="*{regionDetailCode}">
|
<select class="select-list" name="regionDetailCode" id="regionDetailCode" th:field="*{regionDetailCode}">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${regionDetailList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,11 +103,8 @@
|
|||||||
업종 대분류
|
업종 대분류
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<select class="select-list" name="industryLargeCode" th:field="*{industryLargeCode}">
|
<select class="select-list" name="industryLargeCode" id="industryLargeCode" th:field="*{industryLargeCode}">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${industryLargeList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
@@ -122,11 +113,8 @@
|
|||||||
업종 중분류
|
업종 중분류
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<select class="select-list" name="industryMiddleCode" th:field="*{industryMiddleCode}">
|
<select class="select-list" name="industryMiddleCode" id="industryMiddleCode" th:field="*{industryMiddleCode}">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${industryMiddleList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -309,6 +297,36 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
|
<script th:inline="javascript">
|
||||||
|
const regionList = [[${regionSubList}]];
|
||||||
|
const selectedRegionSubCode = /*[[${reqVO.regionSubCode}]]*/ '';
|
||||||
|
const selectedRegionDetailCode = /*[[${reqVO.regionDetailCode}]]*/ '';
|
||||||
|
|
||||||
|
const industryLargeList = [[${industryLargeList}]];
|
||||||
|
const selectedIndustryLargeCode = /*[[${reqVO.industryLargeCode}]]*/ '';
|
||||||
|
const selectedIndustryMiddleCode= /*[[${reqVO.industryMiddleCode}]]*/ '';
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
// 지역, 세부지역 셀렉트박스 세팅
|
||||||
|
setSelectBoxUiCode({
|
||||||
|
codeList: regionList,
|
||||||
|
parentSelector: '#regionSubCode',
|
||||||
|
childSelector: '#regionDetailCode',
|
||||||
|
selectedParentCode: selectedRegionSubCode,
|
||||||
|
selectedChildCode: selectedRegionDetailCode
|
||||||
|
});
|
||||||
|
|
||||||
|
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||||
|
setSelectBoxUiCode({
|
||||||
|
codeList: industryLargeList,
|
||||||
|
parentSelector: '#industryLargeCode',
|
||||||
|
childSelector: '#industryMiddleCode',
|
||||||
|
selectedParentCode: selectedIndustryLargeCode,
|
||||||
|
selectedChildCode: selectedIndustryMiddleCode
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
// 임가 목록 조회
|
// 임가 목록 조회
|
||||||
const getHouseholds = (pageNo) => {
|
const getHouseholds = (pageNo) => {
|
||||||
|
|||||||
@@ -145,6 +145,7 @@
|
|||||||
(response) => {
|
(response) => {
|
||||||
console.log("임가방문정보 상세 응답값 : ", response);
|
console.log("임가방문정보 상세 응답값 : ", response);
|
||||||
setVisitFormData(response);
|
setVisitFormData(response);
|
||||||
|
document.querySelector(".modal-visit-info").ui.open();
|
||||||
},
|
},
|
||||||
function (code, rstData) {
|
function (code, rstData) {
|
||||||
console.log("error : ", code);
|
console.log("error : ", code);
|
||||||
@@ -152,10 +153,10 @@
|
|||||||
'get',
|
'get',
|
||||||
'json'
|
'json'
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
|
|
||||||
document.querySelector(".modal-visit-info").ui.open();
|
document.querySelector(".modal-visit-info").ui.open();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 임가방문정보 상세 값 set
|
// 임가방문정보 상세 값 set
|
||||||
const setVisitFormData = (data) => {
|
const setVisitFormData = (data) => {
|
||||||
|
|||||||
@@ -222,9 +222,6 @@
|
|||||||
etUI.dialog.confirm({
|
etUI.dialog.confirm({
|
||||||
title: '삭제 안내',
|
title: '삭제 안내',
|
||||||
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
||||||
negativeCallback: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
positiveCallback: function () {
|
positiveCallback: function () {
|
||||||
goDeleteForestProduct(checkedIds);
|
goDeleteForestProduct(checkedIds);
|
||||||
},
|
},
|
||||||
@@ -234,7 +231,6 @@
|
|||||||
// 임산물현황 삭제
|
// 임산물현황 삭제
|
||||||
const goDeleteForestProduct = (checkedIds) => {
|
const goDeleteForestProduct = (checkedIds) => {
|
||||||
const f = document.reqForm;
|
const f = document.reqForm;
|
||||||
console.log("f.monthlyInputStatusId.value", f.monthlyInputStatusId.value);
|
|
||||||
|
|
||||||
ajaxUtil._ajaxMethod(
|
ajaxUtil._ajaxMethod(
|
||||||
'/api/household/forestProducts/delete',
|
'/api/household/forestProducts/delete',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<h3></h3>
|
<h3></h3>
|
||||||
<div class="component-btns bottom-btn-group">
|
<div class="component-btns bottom-btn-group">
|
||||||
<div class="btns-row align-right">
|
<div class="btns-row align-right">
|
||||||
<button type="button" class="btn small btn-secondary" onclick="goDeleteVisitInfo();">
|
<button type="button" class="btn small btn-secondary" onclick="showDeleteVisitInfoConfirm();">
|
||||||
<span class=" btn-txt">삭제</span>
|
<span class=" btn-txt">삭제</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();">
|
<button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();">
|
||||||
@@ -94,18 +94,28 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 임가방문정보 삭제
|
// 임가방문정보 삭제 confirm
|
||||||
const goDeleteVisitInfo = () => {
|
const showDeleteVisitInfoConfirm = () => {
|
||||||
const checkedIds = Array.from(
|
const checkedIds = Array.from(
|
||||||
document.querySelectorAll('input[name="visitRemoveIds"]:checked')
|
document.querySelectorAll('input[name="visitRemoveIds"]:checked')
|
||||||
).map(el => Number(el.value));
|
).map(el => Number(el.value));
|
||||||
|
|
||||||
if(checkedIds.length <= 0) {
|
if(checkedIds.length <= 0) {
|
||||||
alert("임가방문정보를 선택해주세요.");
|
alert("임가방문정보를 선택해주세요.");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(confirm("선택하신 내용을 삭제하시겠습니까? 삭제한 항목은 복구할 수 없습니다.")) {
|
etUI.dialog.confirm({
|
||||||
|
title: '삭제 안내',
|
||||||
|
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
||||||
|
positiveCallback: function () {
|
||||||
|
goDeleteVisitInfo(checkedIds);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 임가방문정보 삭제
|
||||||
|
const goDeleteVisitInfo = (checkedIds) => {
|
||||||
const f = document.reqForm;
|
const f = document.reqForm;
|
||||||
|
|
||||||
ajaxUtil._ajaxMethod(
|
ajaxUtil._ajaxMethod(
|
||||||
@@ -114,7 +124,7 @@
|
|||||||
householdSeq: f.householdSeq.value,
|
householdSeq: f.householdSeq.value,
|
||||||
visitRemoveIds: checkedIds
|
visitRemoveIds: checkedIds
|
||||||
}),
|
}),
|
||||||
(response) => { // 성공
|
() => { // 성공
|
||||||
alert("방문정보가 삭제되었습니다.");
|
alert("방문정보가 삭제되었습니다.");
|
||||||
getVisitInfo();
|
getVisitInfo();
|
||||||
},
|
},
|
||||||
@@ -126,7 +136,6 @@
|
|||||||
{ handle422Type: 'alert' }
|
{ handle422Type: 'alert' }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</html>
|
</html>
|
||||||
@@ -141,24 +141,16 @@
|
|||||||
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="regionSubCode" required>
|
<select class="select-list" name="regionSubCode" id="regionSubCode" required>
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${regionSubList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}"
|
|
||||||
th:selected="${item.id == householdInfo.regionSubCode}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>세부 지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
<th>세부 지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="regionDetailCode" required>
|
<select class="select-list" name="regionDetailCode" id="regionDetailCode" required>
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${regionDetailList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}"
|
|
||||||
th:selected="${item.id == householdInfo.regionDetailCode}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -178,24 +170,16 @@
|
|||||||
<th>업종 대분류</th>
|
<th>업종 대분류</th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="industryLargeCode">
|
<select class="select-list" name="industryLargeCode" id="industryLargeCode">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>>
|
||||||
<option th:each="item : ${industryLargeList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}"
|
|
||||||
th:selected="${item.id == householdInfo.industryLargeCode}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<th>업종 중분류1</th>
|
<th>업종 중분류1</th>
|
||||||
<td>
|
<td>
|
||||||
<div class="component-select">
|
<div class="component-select">
|
||||||
<select class="select-list" name="industryMiddleCode">
|
<select class="select-list" name="industryMiddleCode" id="industryMiddleCode">
|
||||||
<option value="">전체</option>
|
<option value="">전체</option>
|
||||||
<option th:each="item : ${industryMiddleList}"
|
|
||||||
th:value="${item.id}"
|
|
||||||
th:text="${item.codeValue + '. ' + item.codeText}"
|
|
||||||
th:selected="${item.id == householdInfo.industryMiddleCode}">
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -296,6 +280,36 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
|
<script th:inline="javascript">
|
||||||
|
const regionList = [[${regionSubList}]];
|
||||||
|
const selectedRegionSubCode = /*[[${householdInfo.regionSubCode}]]*/ '';
|
||||||
|
const selectedRegionDetailCode = /*[[${householdInfo.regionDetailCode}]]*/ '';
|
||||||
|
|
||||||
|
const industryLargeList = [[${industryLargeList}]];
|
||||||
|
const selectedIndustryLargeCode = /*[[${householdInfo.industryLargeCode}]]*/ '';
|
||||||
|
const selectedIndustryMiddleCode= /*[[${householdInfo.industryMiddleCode}]]*/ '';
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
// 지역, 세부지역 셀렉트박스 세팅
|
||||||
|
setSelectBoxUiCode({
|
||||||
|
codeList: regionList,
|
||||||
|
parentSelector: '#regionSubCode',
|
||||||
|
childSelector: '#regionDetailCode',
|
||||||
|
selectedParentCode: selectedRegionSubCode,
|
||||||
|
selectedChildCode: selectedRegionDetailCode
|
||||||
|
});
|
||||||
|
|
||||||
|
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||||
|
setSelectBoxUiCode({
|
||||||
|
codeList: industryLargeList,
|
||||||
|
parentSelector: '#industryLargeCode',
|
||||||
|
childSelector: '#industryMiddleCode',
|
||||||
|
selectedParentCode: selectedIndustryLargeCode,
|
||||||
|
selectedChildCode: selectedIndustryMiddleCode
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
// 임가 수정
|
// 임가 수정
|
||||||
const updateHousehold= () => {
|
const updateHousehold= () => {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import app.module.core.config.adapters.persistence.entity.UploadFile;
|
|||||||
import app.module.core.config.application.annotation.DeleteCommand;
|
import app.module.core.config.application.annotation.DeleteCommand;
|
||||||
import app.module.core.config.application.annotation.UpdateCommand;
|
import app.module.core.config.application.annotation.UpdateCommand;
|
||||||
import app.module.core.config.application.enums.FileUploadType;
|
import app.module.core.config.application.enums.FileUploadType;
|
||||||
|
import app.module.core.config.application.util.AuditUtil;
|
||||||
import app.module.core.config.application.util.CommonUtil;
|
import app.module.core.config.application.util.CommonUtil;
|
||||||
import app.module.core.config.application.util.SftpFileDeleteUtil;
|
import app.module.core.config.application.util.SftpFileDeleteUtil;
|
||||||
import app.module.core.usecase.file.createFile.ports.CreateFilePortOut;
|
import app.module.core.usecase.file.createFile.ports.CreateFilePortOut;
|
||||||
@@ -34,11 +35,11 @@ class UpdateFileDao implements UpdateFilePortOut {
|
|||||||
@DeleteCommand
|
@DeleteCommand
|
||||||
public void operate(UpdateFileCmd command) {
|
public void operate(UpdateFileCmd command) {
|
||||||
|
|
||||||
List<UploadFileDto> deletedFileList = mapper.findDeleteFileList(new UpdateUploadFileParam(
|
List<UploadFileDto> deletedFileList = mapper.findDeleteFileList(AuditUtil.update(new UpdateUploadFileParam(
|
||||||
command.getId(),
|
command.getId(),
|
||||||
command.getFileMappingIds(),
|
command.getFileMappingIds(),
|
||||||
command.getType().getName()
|
command.getType().getName()
|
||||||
));
|
)));
|
||||||
|
|
||||||
for (UploadFileDto file : deletedFileList) {
|
for (UploadFileDto file : deletedFileList) {
|
||||||
try {
|
try {
|
||||||
@@ -54,13 +55,13 @@ class UpdateFileDao implements UpdateFilePortOut {
|
|||||||
|
|
||||||
if (!deletedFileList.isEmpty()) {
|
if (!deletedFileList.isEmpty()) {
|
||||||
mapper.deleteFile(
|
mapper.deleteFile(
|
||||||
new UpdateUploadFileParam(
|
AuditUtil.delete(new UpdateUploadFileParam(
|
||||||
command.getId(),
|
command.getId(),
|
||||||
deletedFileList.stream().map(UploadFileDto::getId).toList(),
|
deletedFileList.stream().map(UploadFileDto::getId).toList(),
|
||||||
command.getType().getName()));
|
command.getType().getName())));
|
||||||
}
|
}
|
||||||
|
|
||||||
command.getFileMappingIds().forEach(fileId -> mapper.updateFile(new UploadFileDto(fileId, command.getId(),command.getType().getName())));
|
command.getFileMappingIds().forEach(fileId -> mapper.updateFile(AuditUtil.update(new UploadFileDto(fileId, command.getId(),command.getType().getName()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ class UICodeTopTierDao implements UICodeTopTierPortOut {
|
|||||||
return recursiveMapping(topTier);
|
return recursiveMapping(topTier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public UICodeTopTier connect(String id) {
|
||||||
|
UICode topTier = mapper.findTopTierId(id);
|
||||||
|
return recursiveMapping(topTier);
|
||||||
|
}
|
||||||
|
|
||||||
private UICodeTopTier recursiveMapping(UICode topTier) {
|
private UICodeTopTier recursiveMapping(UICode topTier) {
|
||||||
List<UICode> children = mapper.findChildren(topTier.getId());
|
List<UICode> children = mapper.findChildren(topTier.getId());
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface UICodeTopTierMapper {
|
public interface UICodeTopTierMapper {
|
||||||
UICode findTopTier(); // parent_id IS NULL 인 UICode 조회
|
UICode findTopTier(); // parent_id IS NULL 인 UICode 조회
|
||||||
|
UICode findTopTierId(String id); // UICode id 조회
|
||||||
List<UICode> findChildren(String parentId); // 재귀 하위 코드
|
List<UICode> findChildren(String parentId); // 재귀 하위 코드
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ import app.module.core.usecase.uicode.toptier.ports.application.domain.UICodeTop
|
|||||||
public interface UICodeTopTierPortIn {
|
public interface UICodeTopTierPortIn {
|
||||||
|
|
||||||
UICodeTopTier connect();
|
UICodeTopTier connect();
|
||||||
|
UICodeTopTier connect(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,4 +5,5 @@ import app.module.core.usecase.uicode.toptier.ports.application.domain.UICodeTop
|
|||||||
public interface UICodeTopTierPortOut {
|
public interface UICodeTopTierPortOut {
|
||||||
|
|
||||||
UICodeTopTier connect();
|
UICodeTopTier connect();
|
||||||
|
UICodeTopTier connect(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,4 +16,10 @@ public class UICodeTopTierService implements UICodeTopTierPortIn {
|
|||||||
public UICodeTopTier connect() {
|
public UICodeTopTier connect() {
|
||||||
return portOut.connect();
|
return portOut.connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UICodeTopTier connect(String parentId) {
|
||||||
|
return portOut.connect(parentId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,12 @@
|
|||||||
AND is_deleted = false
|
AND is_deleted = false
|
||||||
ORDER BY order_no ASC
|
ORDER BY order_no ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findTopTierId"
|
||||||
|
resultType="app.module.core.config.adapters.persistence.entity.UICode">
|
||||||
|
SELECT id, code_text, order_no, parent_id
|
||||||
|
FROM uicode
|
||||||
|
WHERE id = #{id}
|
||||||
|
AND is_deleted = false
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -101,7 +101,9 @@ public class FrontSecurityConfig {
|
|||||||
.clearAuthentication(true)
|
.clearAuthentication(true)
|
||||||
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")))
|
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")))
|
||||||
.sessionManagement(
|
.sessionManagement(
|
||||||
session -> session.maximumSessions(maxSessionNum).maxSessionsPreventsLogin(false))
|
session -> session.maximumSessions(maxSessionNum).maxSessionsPreventsLogin(false).expiredUrl("/login"))
|
||||||
|
.sessionManagement(
|
||||||
|
session -> session.invalidSessionUrl("/login"))
|
||||||
.oauth2Login(
|
.oauth2Login(
|
||||||
config ->
|
config ->
|
||||||
config
|
config
|
||||||
|
|||||||
@@ -9,4 +9,9 @@ public class CommonConstants {
|
|||||||
* 단위의 직접입력 코드
|
* 단위의 직접입력 코드
|
||||||
*/
|
*/
|
||||||
public static final String UNIT_CODE_SELF = "code.record.unit.self";
|
public static final String UNIT_CODE_SELF = "code.record.unit.self";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 작업 면적의 직접입력 코드
|
||||||
|
*/
|
||||||
|
public static final String AREA_CODE_OTHER = "code.record.area.self";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,24 @@ public class CreateDailyExpenseValidator implements Validator {
|
|||||||
public void validate(Object target, Errors errors) {
|
public void validate(Object target, Errors errors) {
|
||||||
CreateDailyExpenseReqVO vo = (CreateDailyExpenseReqVO) target;
|
CreateDailyExpenseReqVO vo = (CreateDailyExpenseReqVO) target;
|
||||||
|
|
||||||
|
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"quantity", "valid.common.required",
|
||||||
|
"수량을 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitCode", "valid.common.required",
|
||||||
|
"단위를 선택해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitSelf", "valid.common.required",
|
||||||
|
"단위를 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
|
if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"price", "valid.common.required",
|
"price", "valid.common.required",
|
||||||
@@ -29,11 +47,5 @@ public class CreateDailyExpenseValidator implements Validator {
|
|||||||
"estimatedValue", "valid.common.required",
|
"estimatedValue", "valid.common.required",
|
||||||
"현금 또는 현물평가액을 입력해 주세요.");
|
"현금 또는 현물평가액을 입력해 주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
|
|
||||||
errors.rejectValue(
|
|
||||||
"unitSelf", "valid.common.required",
|
|
||||||
"단위를 입력해 주세요.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class CreateDailyFarmingReqVO extends DailyUIReqVO {
|
|||||||
/**
|
/**
|
||||||
* 생산물
|
* 생산물
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "생산물을 입력해 주세요.")
|
@NotBlank(message = "생산물을 선택해 주세요.")
|
||||||
private String productCode;
|
private String productCode;
|
||||||
/**
|
/**
|
||||||
* 생산물 직접 입력
|
* 생산물 직접 입력
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.farming.adapters.web.validator;
|
package app.module.front.usecase.daily.farming.adapters.web.validator;
|
||||||
|
|
||||||
|
import app.module.front.config.constants.CommonConstants;
|
||||||
import app.module.front.usecase.daily.farming.adapters.web.model.CreateDailyFarmingReqVO;
|
import app.module.front.usecase.daily.farming.adapters.web.model.CreateDailyFarmingReqVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.tika.utils.StringUtils;
|
import org.apache.tika.utils.StringUtils;
|
||||||
@@ -20,12 +21,30 @@ public class CreateDailyFarmingValidator implements Validator {
|
|||||||
public void validate(Object target, Errors errors) {
|
public void validate(Object target, Errors errors) {
|
||||||
CreateDailyFarmingReqVO vo = (CreateDailyFarmingReqVO) target;
|
CreateDailyFarmingReqVO vo = (CreateDailyFarmingReqVO) target;
|
||||||
|
|
||||||
if ("SELF".equals(vo.getProductCode()) && StringUtils.isBlank(vo.getProductSelf())) {
|
if ("code.record.farming.self".equals(vo.getProductCode()) && StringUtils.isBlank(vo.getProductSelf())) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"categorySelf", "valid.common.required",
|
"productSelf", "valid.common.required",
|
||||||
"생산물을 입력해 주세요.");
|
"생산물을 입력해 주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"quantity", "valid.common.required",
|
||||||
|
"수량을 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitCode", "valid.common.required",
|
||||||
|
"단위를 선택해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitSelf", "valid.common.required",
|
||||||
|
"단위를 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
if (vo.getEstimatedValue() == null) {
|
if (vo.getEstimatedValue() == null) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"estimatedValue", "valid.common.required",
|
"estimatedValue", "valid.common.required",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.forestry.adapters.web.validator;
|
package app.module.front.usecase.daily.forestry.adapters.web.validator;
|
||||||
|
|
||||||
|
import app.module.front.config.constants.CommonConstants;
|
||||||
import app.module.front.usecase.daily.forestry.adapters.web.model.CreateDailyForestryReqVO;
|
import app.module.front.usecase.daily.forestry.adapters.web.model.CreateDailyForestryReqVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.tika.utils.StringUtils;
|
import org.apache.tika.utils.StringUtils;
|
||||||
@@ -20,6 +21,24 @@ public class CreateDailyForestryValidator implements Validator {
|
|||||||
public void validate(Object target, Errors errors) {
|
public void validate(Object target, Errors errors) {
|
||||||
CreateDailyForestryReqVO vo = (CreateDailyForestryReqVO) target;
|
CreateDailyForestryReqVO vo = (CreateDailyForestryReqVO) target;
|
||||||
|
|
||||||
|
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"quantity", "valid.common.required",
|
||||||
|
"수량을 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitCode", "valid.common.required",
|
||||||
|
"단위를 선택해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitSelf", "valid.common.required",
|
||||||
|
"단위를 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
if (vo.getEstimatedValue() == null) {
|
if (vo.getEstimatedValue() == null) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"estimatedValue", "valid.common.required",
|
"estimatedValue", "valid.common.required",
|
||||||
|
|||||||
@@ -21,6 +21,24 @@ public class CreateDailyIncomeValidator implements Validator {
|
|||||||
public void validate(Object target, Errors errors) {
|
public void validate(Object target, Errors errors) {
|
||||||
CreateDailyIncomeReqVO vo = (CreateDailyIncomeReqVO) target;
|
CreateDailyIncomeReqVO vo = (CreateDailyIncomeReqVO) target;
|
||||||
|
|
||||||
|
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"quantity", "valid.common.required",
|
||||||
|
"수량을 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitCode", "valid.common.required",
|
||||||
|
"단위를 선택해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitSelf", "valid.common.required",
|
||||||
|
"단위를 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
|
if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"price", "valid.common.required",
|
"price", "valid.common.required",
|
||||||
@@ -29,11 +47,5 @@ public class CreateDailyIncomeValidator implements Validator {
|
|||||||
"estimatedValue", "valid.common.required",
|
"estimatedValue", "valid.common.required",
|
||||||
"현금 또는 현물평가액을 입력해 주세요.");
|
"현금 또는 현물평가액을 입력해 주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
|
|
||||||
errors.rejectValue(
|
|
||||||
"unitSelf", "valid.common.required",
|
|
||||||
"단위를 입력해 주세요.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.work.adapters.web.validator;
|
package app.module.front.usecase.daily.work.adapters.web.validator;
|
||||||
|
|
||||||
|
import app.module.front.config.constants.CommonConstants;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.tika.utils.StringUtils;
|
import org.apache.tika.utils.StringUtils;
|
||||||
@@ -20,19 +21,37 @@ public class CreateDailyWorkValidator implements Validator {
|
|||||||
public void validate(Object target, Errors errors) {
|
public void validate(Object target, Errors errors) {
|
||||||
CreateDailyWorkReqVO vo = (CreateDailyWorkReqVO) target;
|
CreateDailyWorkReqVO vo = (CreateDailyWorkReqVO) target;
|
||||||
|
|
||||||
if (vo.getHarvestQuantity() == null) {
|
if (vo.getWorkLandArea() == null && !StringUtils.isBlank(vo.getAreaUnitCode())) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"harvestQuantity", "valid.common.required",
|
"workLandArea", "valid.common.required",
|
||||||
"수확량을 입력해 주세요.");
|
"작업 면적을 입력해 주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("SELF".equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) {
|
if (vo.getWorkLandArea() != null && StringUtils.isBlank(vo.getAreaUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"areaUnitCode", "valid.common.required",
|
||||||
|
"단위를 선택해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommonConstants.AREA_CODE_OTHER.equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"areaUnitSelf", "valid.common.required",
|
"areaUnitSelf", "valid.common.required",
|
||||||
"단위를 입력해 주세요.");
|
"단위를 입력해 주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("SELF".equals(vo.getHarvestUnitCode()) && StringUtils.isBlank(vo.getHarvestUnitSelf())) {
|
if (vo.getHarvestQuantity() == null && !StringUtils.isBlank(vo.getHarvestUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"harvestQuantity", "valid.common.required",
|
||||||
|
"수확량을 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vo.getHarvestQuantity() != null && StringUtils.isBlank(vo.getHarvestUnitCode())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"harvestUnitCode", "valid.common.required",
|
||||||
|
"단위를 선택해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getHarvestUnitCode()) && StringUtils.isBlank(vo.getHarvestUnitSelf())) {
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"harvestUnitSelf", "valid.common.required",
|
"harvestUnitSelf", "valid.common.required",
|
||||||
"단위를 입력해 주세요.");
|
"단위를 입력해 주세요.");
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ class CreateBankInputController {
|
|||||||
//TODO 트렌젝션 고려
|
//TODO 트렌젝션 고려
|
||||||
removeBanksPortIn.operate(new RemoveBanksCmd(currentMonthlyInfo.getId(), AuthUtil.getUserSeq(), reqVO.getTransferType()));
|
removeBanksPortIn.operate(new RemoveBanksCmd(currentMonthlyInfo.getId(), AuthUtil.getUserSeq(), reqVO.getTransferType()));
|
||||||
|
|
||||||
if (!reqVO.getStatus() && reqVO.getBankList() != null && !reqVO.getBankList().isEmpty()) { // 등록없음 처리가 아님.
|
// if (!reqVO.getStatus() && reqVO.getBankList() != null && !reqVO.getBankList().isEmpty()) { // 등록없음 처리가 아님.
|
||||||
|
if (reqVO.getBankList() != null && !reqVO.getBankList().isEmpty()) { // 등록없음 처리가 아님.
|
||||||
for (CreateBankInputProductReqVO item : reqVO.getBankList()) {
|
for (CreateBankInputProductReqVO item : reqVO.getBankList()) {
|
||||||
|
|
||||||
UICodeView code = uiCodeViewPortIn.connect(item.getTransferCategoryCode()).orElse(null);
|
UICodeView code = uiCodeViewPortIn.connect(item.getTransferCategoryCode()).orElse(null);
|
||||||
@@ -99,16 +100,17 @@ class CreateBankInputController {
|
|||||||
reqVO.getTransferType().equals("code.bank.input") ? MonthStatus.REGISTERED : currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
reqVO.getTransferType().equals("code.bank.input") ? MonthStatus.REGISTERED : currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
||||||
reqVO.getTransferType().equals("code.bank.output") ? MonthStatus.REGISTERED : currentMonthlyInfo.getBankAutoTransferOutputStatus()
|
reqVO.getTransferType().equals("code.bank.output") ? MonthStatus.REGISTERED : currentMonthlyInfo.getBankAutoTransferOutputStatus()
|
||||||
));
|
));
|
||||||
} else {
|
|
||||||
updateMonthlyInputStatusPortIn.operate(new UpdateMonthlyInputStatusCmd(
|
|
||||||
currentMonthlyInfo.getId(),
|
|
||||||
AuthUtil.getUserSeq(),
|
|
||||||
currentMonthlyInfo.getMonth(),
|
|
||||||
currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
|
||||||
reqVO.getTransferType().equals("code.bank.input") ? MonthStatus.NOTHING : currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
|
||||||
reqVO.getTransferType().equals("code.bank.output") ? MonthStatus.NOTHING : currentMonthlyInfo.getBankAutoTransferOutputStatus()
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
// else {
|
||||||
|
// updateMonthlyInputStatusPortIn.operate(new UpdateMonthlyInputStatusCmd(
|
||||||
|
// currentMonthlyInfo.getId(),
|
||||||
|
// AuthUtil.getUserSeq(),
|
||||||
|
// currentMonthlyInfo.getMonth(),
|
||||||
|
// currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
||||||
|
// reqVO.getTransferType().equals("code.bank.input") ? MonthStatus.NOTHING : currentMonthlyInfo.getBankAutoTransferInputStatus(),
|
||||||
|
// reqVO.getTransferType().equals("code.bank.output") ? MonthStatus.NOTHING : currentMonthlyInfo.getBankAutoTransferOutputStatus()
|
||||||
|
// ));
|
||||||
|
// }
|
||||||
return ResponseEntity.ok(ApiResponse.success(null));
|
return ResponseEntity.ok(ApiResponse.success(null));
|
||||||
} else {
|
} else {
|
||||||
return ResponseEntity.ok(ApiResponse.failure(null));
|
return ResponseEntity.ok(ApiResponse.failure(null));
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import java.util.List;
|
|||||||
public class CreateBankInputReqVO {
|
public class CreateBankInputReqVO {
|
||||||
|
|
||||||
|
|
||||||
private Boolean status;
|
// private Boolean status;
|
||||||
private Long id;
|
private Long id;
|
||||||
private String transferType;
|
private String transferType;
|
||||||
private List<CreateBankInputProductReqVO> bankList;
|
private List<CreateBankInputProductReqVO> bankList;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
|
|||||||
public class UpdateUserReqVO {
|
public class UpdateUserReqVO {
|
||||||
|
|
||||||
@NotBlank(message = "이름을 입력해주세요.")//"이름은 필수 항목입니다.")
|
@NotBlank(message = "이름을 입력해주세요.")//"이름은 필수 항목입니다.")
|
||||||
@Pattern(regexp = "^[가-힣]{2,10}$", message = "이름을 입력해주세요.")//"이름은 2~10자의 한글이어야 합니다.")
|
@Pattern(regexp = "^[가-힣0-9()]{2,10}$", message = "이름을 입력해주세요.")//"이름은 2~10자의 한글이어야 합니다.")
|
||||||
private String ownerName;
|
private String ownerName;
|
||||||
|
|
||||||
@NotNull(message = "나이를 입력해주세요.")
|
@NotNull(message = "나이를 입력해주세요.")
|
||||||
@@ -19,13 +19,13 @@ public class UpdateUserReqVO {
|
|||||||
@Max(value = 120, message = "나이를 입력해주세요.")//"나이는 120세 이하이어야 합니다.")
|
@Max(value = 120, message = "나이를 입력해주세요.")//"나이는 120세 이하이어야 합니다.")
|
||||||
private Integer ownerAge;
|
private Integer ownerAge;
|
||||||
|
|
||||||
@Pattern(regexp = "^\\d{2,3}$", message = "가구 연락처를 입력해주세요.")//"가구 연락처는 2~3자리 숫자여야 합니다.")
|
@Pattern(regexp = "^$|^\\d{2,3}$", message = "가구 연락처를 입력해주세요.")//"가구 연락처는 2~3자리 숫자여야 합니다.")
|
||||||
private String tel1;
|
private String tel1;
|
||||||
|
|
||||||
@Pattern(regexp = "^\\d{3,4}$", message = "가구 연락처를 입력해주세요.")//"가운데 번호는 3~4자리 숫자여야 합니다.")
|
@Pattern(regexp = "^$|^\\d{3,4}$", message = "가구 연락처를 입력해주세요.")//"가운데 번호는 3~4자리 숫자여야 합니다.")
|
||||||
private String tel2;
|
private String tel2;
|
||||||
|
|
||||||
@Pattern(regexp = "^\\d{4}$", message = "가구 연락처를 입력해주세요.")//"끝 번호는 4자리 숫자여야 합니다.")
|
@Pattern(regexp = "^$|^\\d{4}$", message = "가구 연락처를 입력해주세요.")//"끝 번호는 4자리 숫자여야 합니다.")
|
||||||
private String tel3;
|
private String tel3;
|
||||||
|
|
||||||
@Pattern(regexp = "^\\d{2,3}$", message = "휴대폰 번호를 입력해주세요.")//"휴대폰 번호는 2~3자리 숫자여야 합니다.")
|
@Pattern(regexp = "^\\d{2,3}$", message = "휴대폰 번호를 입력해주세요.")//"휴대폰 번호는 2~3자리 숫자여야 합니다.")
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
AND a.forest_product_status != 'NONE'
|
AND a.forest_product_status != 'NONE'
|
||||||
AND a.household_seq = #{householdSeq}
|
AND a.household_seq = #{householdSeq}
|
||||||
AND a.month = (
|
AND a.month = (
|
||||||
SELECT TO_CHAR(TO_DATE(month, 'YYYY-MM') - INTERVAL '1 month', 'YYYY-MM')
|
SELECT TO_CHAR(TO_DATE(month, 'YYYYMM') - INTERVAL '1 month', 'YYYYMM')
|
||||||
FROM monthly_input_status
|
FROM monthly_input_status
|
||||||
WHERE is_deleted = false AND id = #{id}
|
WHERE is_deleted = false AND id = #{id}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12.332 2.5C17.8549 2.5 22.332 6.97715 22.332 12.5C22.332 18.0228 17.8549 22.5 12.332 22.5C6.80918 22.5 2.33203 18.0228 2.33203 12.5C2.33203 6.97715 6.80918 2.5 12.332 2.5ZM12.332 4.5C7.91375 4.5 4.33203 8.08172 4.33203 12.5C4.33203 16.9183 7.91375 20.5 12.332 20.5C16.7503 20.5 20.332 16.9183 20.332 12.5C20.332 8.08172 16.7503 4.5 12.332 4.5ZM12.4346 11.1299C12.9387 11.1812 13.332 11.6073 13.332 12.125V16.0322C13.7632 16.1433 14.082 16.5341 14.082 17C14.082 17.5523 13.6343 18 13.082 18H12.332C11.7797 18 11.332 17.5523 11.332 17V13.0918C10.9009 12.9806 10.582 12.5908 10.582 12.125C10.582 11.5727 11.0297 11.125 11.582 11.125H12.332L12.4346 11.1299ZM12.1445 6.875C12.973 6.875 13.6445 7.54657 13.6445 8.375C13.6445 9.20343 12.973 9.875 12.1445 9.875C11.3161 9.875 10.6445 9.20343 10.6445 8.375C10.6445 7.54657 11.3161 6.875 12.1445 6.875Z" fill="#ADB5BD"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 974 B |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12.332 2.5C17.8549 2.5 22.332 6.97715 22.332 12.5C22.332 18.0228 17.8549 22.5 12.332 22.5C6.80918 22.5 2.33203 18.0228 2.33203 12.5C2.33203 6.97715 6.80918 2.5 12.332 2.5ZM11.582 11.125C11.0297 11.125 10.582 11.5727 10.582 12.125C10.582 12.5908 10.9009 12.9806 11.332 13.0918V17C11.332 17.5523 11.7797 18 12.332 18H13.082C13.6343 18 14.082 17.5523 14.082 17C14.082 16.5341 13.7632 16.1433 13.332 16.0322V12.125C13.332 11.6073 12.9387 11.1812 12.4346 11.1299L12.332 11.125H11.582ZM12.1445 6.875C11.3161 6.875 10.6445 7.54657 10.6445 8.375C10.6445 9.20343 11.3161 9.875 12.1445 9.875C12.973 9.875 13.6445 9.20343 13.6445 8.375C13.6445 7.54657 12.973 6.875 12.1445 6.875Z" fill="#4BBC43"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 800 B |
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12.332 2.5C17.8549 2.5 22.332 6.97715 22.332 12.5C22.332 18.0228 17.8549 22.5 12.332 22.5C6.80918 22.5 2.33203 18.0228 2.33203 12.5C2.33203 6.97715 6.80918 2.5 12.332 2.5ZM12.332 4.5C7.91375 4.5 4.33203 8.08172 4.33203 12.5C4.33203 16.9183 7.91375 20.5 12.332 20.5C16.7503 20.5 20.332 16.9183 20.332 12.5C20.332 8.08172 16.7503 4.5 12.332 4.5ZM12.4346 11.1299C12.9387 11.1812 13.332 11.6073 13.332 12.125V16.0322C13.7632 16.1433 14.082 16.5341 14.082 17C14.082 17.5523 13.6343 18 13.082 18H12.332C11.7797 18 11.332 17.5523 11.332 17V13.0918C10.9009 12.9806 10.582 12.5908 10.582 12.125C10.582 11.5727 11.0297 11.125 11.582 11.125H12.332L12.4346 11.1299ZM12.1445 6.875C12.973 6.875 13.6445 7.54657 13.6445 8.375C13.6445 9.20343 12.973 9.875 12.1445 9.875C11.3161 9.875 10.6445 9.20343 10.6445 8.375C10.6445 7.54657 11.3161 6.875 12.1445 6.875Z" fill="#DEE2E6"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 974 B |
File diff suppressed because one or more lines are too long
@@ -180,7 +180,7 @@ var ajaxUtil = {
|
|||||||
if (formElement.length > 0) {
|
if (formElement.length > 0) {
|
||||||
$(formElement).find('.component-input').removeClass('input-invalid');
|
$(formElement).find('.component-input').removeClass('input-invalid');
|
||||||
$(formElement).find('.input-flex-group').removeClass('invalid');
|
$(formElement).find('.input-flex-group').removeClass('invalid');
|
||||||
$(formElement).find('.select-group').removeClass('input-invalid');
|
$(formElement).find('.select-group').removeClass('select-invalid');
|
||||||
$(formElement).find('.input-info').each(function () {
|
$(formElement).find('.input-info').each(function () {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
@@ -223,7 +223,7 @@ var ajaxUtil = {
|
|||||||
infoBox = $('<ul class="input-info"></ul>').appendTo(component);
|
infoBox = $('<ul class="input-info"></ul>').appendTo(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
infoBox.html('<li>' + oj.message + '1111</li>');
|
infoBox.html('<li>' + oj.message + '</li>');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -238,7 +238,10 @@ var ajaxUtil = {
|
|||||||
|
|
||||||
// 포커스 이동
|
// 포커스 이동
|
||||||
if ($('.input-invalid').length != 0) {
|
if ($('.input-invalid').length != 0) {
|
||||||
$('.input-invalid').eq(0).find('input,select').focus();
|
$('.input-invalid').eq(0).find('input').focus();
|
||||||
|
}
|
||||||
|
if ($('.select-invalid').length != 0) {
|
||||||
|
$('.select-invalid').eq(0).find('button').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof errorCallback !== 'undefined') {
|
if (typeof errorCallback !== 'undefined') {
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ kri.form.errorInit = function (formElement) {
|
|||||||
if (formElement.length > 0) {
|
if (formElement.length > 0) {
|
||||||
$(formElement).find('.component-input').removeClass('input-invalid');
|
$(formElement).find('.component-input').removeClass('input-invalid');
|
||||||
$(formElement).find('.input-flex-group').removeClass('invalid');
|
$(formElement).find('.input-flex-group').removeClass('invalid');
|
||||||
$(formElement).find('.select-group').removeClass('select-invalid');
|
$(formElement).find('.select-group').removeClass('input-invalid');
|
||||||
$(formElement).find('.input-info').each(function () {
|
$(formElement).find('.input-info').each(function () {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
@@ -238,11 +238,12 @@ kri.form.error = function(errorList){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(errorList && errorList.length > 0){
|
// 포커스 이동
|
||||||
const target = $('[name="' + errorList[0].field + '"]');
|
if ($('.input-invalid').length != 0) {
|
||||||
if (target.length > 0) {
|
$('.input-invalid').eq(0).find('input').focus();
|
||||||
target.focus();
|
|
||||||
}
|
}
|
||||||
|
if ($('.select-invalid').length != 0) {
|
||||||
|
$('.select-invalid').eq(0).find('button').focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,8 +95,6 @@ krip.daily.baseBindUI = function() {
|
|||||||
//document.reqForm.todayNone.value = 'N';
|
//document.reqForm.todayNone.value = 'N';
|
||||||
$noneWrap.val('N');
|
$noneWrap.val('N');
|
||||||
}
|
}
|
||||||
// TODO 2번 이벤트 발생하는 원인 찾기
|
|
||||||
console.log(1111)
|
|
||||||
|
|
||||||
krip.daily.todayNone(ENV.month, ENV.groupNo, $noneWrap.data('type'), checked);
|
krip.daily.todayNone(ENV.month, ENV.groupNo, $noneWrap.data('type'), checked);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -31,18 +31,18 @@
|
|||||||
<span class="btn-txt">추가 등록</span>
|
<span class="btn-txt">추가 등록</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button type="button" class="btn btn-m btn-link btn-full" id="callPastInfoBtn">
|
<button type="button" class="btn btn-m btn-link btn-full" id="callPastInfoBtn" onclick="formControl.checkUsePastData()">
|
||||||
<span class="btn-txt">이전 정보 불러오기</span>
|
<span class="btn-txt">이전 정보 불러오기</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
<div class="component-input align-center" id="forestProductStatusDiv">
|
<!-- <div class="component-input align-center" id="forestProductStatusDiv">-->
|
||||||
<label class="checkbox-inner">
|
<!-- <label class="checkbox-inner">-->
|
||||||
<input type="checkbox" id="forestProductStatus" name="forestProductStatus"
|
<!-- <input type="checkbox" id="forestProductStatus" name="forestProductStatus"-->
|
||||||
th:value="${MonthStatus.NOTHING}" onchange="formControl.handleNoDataToggle()">
|
<!-- th:value="${MonthStatus.NOTHING}" onchange="formControl.handleNoDataToggle()">-->
|
||||||
<span class="checkbox-item"><span class="checkbox-txt">이번달 등록내용 없음</span></span>
|
<!-- <span class="checkbox-item"><span class="checkbox-txt">이번달 등록내용 없음</span></span>-->
|
||||||
</label>
|
<!-- </label>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>"/api/front/info/bank/create"
|
</div>
|
||||||
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
editable: /*[[${editable}]]*/,
|
editable: /*[[${editable}]]*/,
|
||||||
},
|
},
|
||||||
elementRefs: {
|
elementRefs: {
|
||||||
noDataCheckbox: document.getElementById("forestProductStatus"),
|
// noDataCheckbox: document.getElementById("forestProductStatus"),
|
||||||
select:{
|
select:{
|
||||||
cropCodeSelect : null,
|
cropCodeSelect : null,
|
||||||
transferCategoryCodeSelect : null,
|
transferCategoryCodeSelect : null,
|
||||||
@@ -190,7 +190,8 @@
|
|||||||
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
||||||
|
|
||||||
//데이터 없음 버튼
|
//데이터 없음 버튼
|
||||||
const forestProductStatus = document.getElementById("forestProductStatus");
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
|
// const forestProductStatus = document.getElementById("forestProductStatus");
|
||||||
|
|
||||||
//등록 완료 버튼
|
//등록 완료 버튼
|
||||||
const next = document.getElementById('complateBtn');
|
const next = document.getElementById('complateBtn');
|
||||||
@@ -206,15 +207,17 @@
|
|||||||
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastBankList.length > 0) {
|
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastBankList.length > 0) {
|
||||||
this.checkUsePastData();
|
this.checkUsePastData();
|
||||||
}
|
}
|
||||||
} else if (ENV.data.currentStatus == "NOTHING") {
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
|
// }
|
||||||
|
// else if (ENV.data.currentStatus == "NOTHING") {
|
||||||
addItemBtn.disabled = true;
|
//
|
||||||
icon.classList.toggle("ico-add", false);
|
//
|
||||||
icon.classList.toggle("ico-add-disabled", true);
|
// addItemBtn.disabled = true;
|
||||||
callPastInfoBtn.disabled = true;
|
// icon.classList.toggle("ico-add", false);
|
||||||
forestProductStatus.checked = true;
|
// icon.classList.toggle("ico-add-disabled", true);
|
||||||
next.disabled = true;
|
// callPastInfoBtn.disabled = true;
|
||||||
|
// forestProductStatus.checked = true;
|
||||||
|
// next.disabled = true;
|
||||||
|
|
||||||
} else if (ENV.data.currentStatus == "REGISTERED") {
|
} else if (ENV.data.currentStatus == "REGISTERED") {
|
||||||
if (ENV.data.bankList.length > 0) {
|
if (ENV.data.bankList.length > 0) {
|
||||||
@@ -240,7 +243,7 @@
|
|||||||
icon.classList.toggle("ico-add", false);
|
icon.classList.toggle("ico-add", false);
|
||||||
icon.classList.toggle("ico-add-disabled", true);
|
icon.classList.toggle("ico-add-disabled", true);
|
||||||
callPastInfoBtn.disabled = true;
|
callPastInfoBtn.disabled = true;
|
||||||
forestProductStatus.disabled = true;
|
// forestProductStatus.disabled = true;
|
||||||
next.disabled = true;
|
next.disabled = true;
|
||||||
next.style.display = "none";
|
next.style.display = "none";
|
||||||
clearAllItems.style.display = "none";
|
clearAllItems.style.display = "none";
|
||||||
@@ -321,31 +324,33 @@
|
|||||||
},
|
},
|
||||||
updateLayout() {
|
updateLayout() {
|
||||||
|
|
||||||
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
|
// const btn = document.getElementById("addItemBtn");
|
||||||
|
// const isChecked = ENV.elementRefs.noDataCheckbox.checked;
|
||||||
|
// const icon = btn.querySelector("i");
|
||||||
|
// const status = document.getElementById('forestProductStatusDiv');
|
||||||
|
|
||||||
const isChecked = ENV.elementRefs.noDataCheckbox.checked;
|
|
||||||
const btn = document.getElementById("addItemBtn");
|
|
||||||
const icon = btn.querySelector("i");
|
|
||||||
|
|
||||||
const status = document.getElementById('forestProductStatusDiv');
|
|
||||||
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
||||||
|
|
||||||
const next = document.getElementById('complateBtn');
|
const next = document.getElementById('complateBtn');
|
||||||
const header = document.getElementById('listHeader');
|
const header = document.getElementById('listHeader');
|
||||||
const count = document.getElementById('listCount');
|
const count = document.getElementById('listCount');
|
||||||
|
const totalItems = document.getElementById('totalItems');
|
||||||
const total = ENV.data.bankList.length;
|
const total = ENV.data.bankList.length;
|
||||||
|
const isData = total > 0;
|
||||||
|
|
||||||
|
header.style.display = isData ? '' : 'none';
|
||||||
header.style.display = total > 0 ? '' : 'none';
|
// status.style.display = total > 0 ? 'none' : '';
|
||||||
status.style.display = total > 0 ? 'none' : '';
|
callPastInfoBtn.style.display = isData? 'none' : '';
|
||||||
callPastInfoBtn.style.display = total > 0 ? 'none' : '';
|
|
||||||
count.textContent = total;
|
count.textContent = total;
|
||||||
|
totalItems.textContent = total;
|
||||||
|
|
||||||
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
btn.disabled = isChecked;
|
// btn.disabled = isData;
|
||||||
icon.classList.toggle("ico-add", !isChecked);
|
// icon.classList.toggle("ico-add", !isData);
|
||||||
icon.classList.toggle("ico-add-disabled", isChecked);
|
// icon.classList.toggle("ico-add-disabled", isData);
|
||||||
if (isChecked) {
|
if (isData) {
|
||||||
next.disabled = !isChecked;
|
next.disabled = !isData;
|
||||||
} else {
|
} else {
|
||||||
next.disabled = total <= 0;
|
next.disabled = total <= 0;
|
||||||
}
|
}
|
||||||
@@ -369,7 +374,6 @@
|
|||||||
errors.push({field: form.transferCategoryCode.value+"_value", message: '수입대상을 입력해주세요.'});
|
errors.push({field: form.transferCategoryCode.value+"_value", message: '수입대상을 입력해주세요.'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!form.sourcePurpose.value) errors.push({field: 'sourcePurpose', message: '수입원을 입력해주세요.'});
|
|
||||||
|
|
||||||
if(form.count.value){
|
if(form.count.value){
|
||||||
if(!form.unitCode.value){
|
if(!form.unitCode.value){
|
||||||
@@ -475,9 +479,6 @@
|
|||||||
ENV.data.bankList = [];
|
ENV.data.bankList = [];
|
||||||
document.getElementById('listBody').innerHTML = '';
|
document.getElementById('listBody').innerHTML = '';
|
||||||
formControl.updateLayout();
|
formControl.updateLayout();
|
||||||
|
|
||||||
// TODO(ks): 선택 삭제 시 전체 count 미반영 중. 일단 전체 초기화에서만 count 갱신.
|
|
||||||
document.getElementById('totalItems').textContent = ENV.data.bankList.length;
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -488,7 +489,7 @@
|
|||||||
ajaxUtil._ajaxAsync(
|
ajaxUtil._ajaxAsync(
|
||||||
ENV.httpUrl.save,
|
ENV.httpUrl.save,
|
||||||
{
|
{
|
||||||
status: ENV.elementRefs.noDataCheckbox.checked,
|
// status: ENV.elementRefs.noDataCheckbox.checked,
|
||||||
id: ENV.data.id,
|
id: ENV.data.id,
|
||||||
transferType:"code.bank.input",
|
transferType:"code.bank.input",
|
||||||
bankList: ENV.data.bankList
|
bankList: ENV.data.bankList
|
||||||
@@ -533,10 +534,14 @@
|
|||||||
: `${getCategory(categoryCode)}`;
|
: `${getCategory(categoryCode)}`;
|
||||||
|
|
||||||
let tagCount = '';
|
let tagCount = '';
|
||||||
if(product.count && product.unitCode != "code.record.unit.self"){
|
if (product.count > 0) {
|
||||||
tagCount = `<li><p>수량</p><span>${format(product.count)}${getUnit(product.unitCode)}</span></li>`;
|
const unitText = product.unitCode !== 'code.record.unit.self'
|
||||||
|
? getUnit(product.unitCode)
|
||||||
|
: product.unit;
|
||||||
|
|
||||||
|
tagCount = `<li><p>수량</p><span>${format(product.count)}${unitText}</span></li>`;
|
||||||
} else {
|
} else {
|
||||||
tagCount = `<li><p>수량</p><span>${format(product.count)}${product.unit}</span></li>`
|
tagCount = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const buttonGroupHtml = isEdit
|
const buttonGroupHtml = isEdit
|
||||||
@@ -558,8 +563,12 @@
|
|||||||
${buttonGroupHtml}
|
${buttonGroupHtml}
|
||||||
</div>
|
</div>
|
||||||
<ul class="detail-list">
|
<ul class="detail-list">
|
||||||
<li><p>재배형태</p><span>${getCrop(product.cropCode)}</span></li>
|
${product.cropCode != null && product.cropCode != ''
|
||||||
<li><p>수입원</p><span>${product.sourcePurpose}</span></li>
|
? `<li><p>재배형태</p><span>${getCrop(product.cropCode)}</span></li>`
|
||||||
|
: ''}
|
||||||
|
${product.sourcePurpose != null && product.sourcePurpose != ''
|
||||||
|
? `<li><p>수입원</p><span>${product.sourcePurpose}</span></li>`
|
||||||
|
: ''}
|
||||||
${tagCount}
|
${tagCount}
|
||||||
<li><p>현금</p><span>${format(product.price)}원</span></li>
|
<li><p>현금</p><span>${format(product.price)}원</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -86,12 +86,16 @@
|
|||||||
<!-- transferCategory+Text-->
|
<!-- transferCategory+Text-->
|
||||||
<th:block th:each="item : ${transferCategoryList}">
|
<th:block th:each="item : ${transferCategoryList}">
|
||||||
<div class="component-input " th:data-option="${item.codeText}">
|
<div class="component-input " th:data-option="${item.codeText}">
|
||||||
<div class="input-field">
|
<div class="input-field" th:if="${item.id != 'code.bank.input.10' and item.id != 'code.bank.input.12' and item.id != 'code.bank.input.13'}">
|
||||||
<input type="text" th:id="${item.id}+'_value'" th:name="${item.id}+'_value'" value="" placeholder="수입 대상을 입력해 주세요." maxlength="30">
|
<input type="text" th:id="${item.id}+'_value'" th:name="${item.id}+'_value'"
|
||||||
|
value="" maxlength="30"
|
||||||
|
th:placeholder="${item.id == 'code.bank.input.self' ? '수입의 종류를 입력해 주세요.' : '수입 대상을 입력해 주세요.'}">
|
||||||
</div>
|
</div>
|
||||||
|
<th:block th:if="${item.id == 'code.bank.input.1' or item.id == 'code.bank.input.4'}">
|
||||||
<ul class="guide-info" th:if="${item.msgCode}">
|
<ul class="guide-info" th:if="${item.msgCode}">
|
||||||
<li class="txt-blue" th:text="${item.msgCode}"></li>
|
<li class="txt-blue" th:text="${item.msgCode}"></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
@@ -100,7 +104,6 @@
|
|||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<label for="sourcePurpose" class="label-txt">
|
<label for="sourcePurpose" class="label-txt">
|
||||||
수입원
|
수입원
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
|
|||||||
@@ -31,18 +31,18 @@
|
|||||||
<span class="btn-txt">추가 등록</span>
|
<span class="btn-txt">추가 등록</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button type="button" class="btn btn-m btn-link btn-full" id="callPastInfoBtn">
|
<button type="button" class="btn btn-m btn-link btn-full" id="callPastInfoBtn" onclick="formControl.checkUsePastData()">
|
||||||
<span class="btn-txt">이전 정보 불러오기</span>
|
<span class="btn-txt">이전 정보 불러오기</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
<div class="component-input align-center" id="forestProductStatusDiv">
|
<!-- <div class="component-input align-center" id="forestProductStatusDiv">-->
|
||||||
<label class="checkbox-inner">
|
<!-- <label class="checkbox-inner">-->
|
||||||
<input type="checkbox" id="forestProductStatus" name="forestProductStatus"
|
<!-- <input type="checkbox" id="forestProductStatus" name="forestProductStatus"-->
|
||||||
th:value="${MonthStatus.NOTHING}" onchange="formControl.handleNoDataToggle()">
|
<!-- th:value="${MonthStatus.NOTHING}" onchange="formControl.handleNoDataToggle()">-->
|
||||||
<span class="checkbox-item"><span class="checkbox-txt">이번달 등록내용 없음</span></span>
|
<!-- <span class="checkbox-item"><span class="checkbox-txt">이번달 등록내용 없음</span></span>-->
|
||||||
</label>
|
<!-- </label>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
editable: /*[[${editable}]]*/,
|
editable: /*[[${editable}]]*/,
|
||||||
},
|
},
|
||||||
elementRefs: {
|
elementRefs: {
|
||||||
noDataCheckbox: document.getElementById("forestProductStatus"),
|
// noDataCheckbox: document.getElementById("forestProductStatus"),
|
||||||
select:{
|
select:{
|
||||||
transferCategoryCodeSelect : null,
|
transferCategoryCodeSelect : null,
|
||||||
unitCodeSelect : null,
|
unitCodeSelect : null,
|
||||||
@@ -189,7 +189,8 @@
|
|||||||
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
||||||
|
|
||||||
//데이터 없음 버튼
|
//데이터 없음 버튼
|
||||||
const forestProductStatus = document.getElementById("forestProductStatus");
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
|
// const forestProductStatus = document.getElementById("forestProductStatus");
|
||||||
|
|
||||||
//등록 완료 버튼
|
//등록 완료 버튼
|
||||||
const next = document.getElementById('complateBtn');
|
const next = document.getElementById('complateBtn');
|
||||||
@@ -205,15 +206,16 @@
|
|||||||
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastBankList.length > 0) {
|
if (ENV.data.pastStatus && ENV.data.pastStatus == "REGISTERED" && ENV.data.pastBankList.length > 0) {
|
||||||
this.checkUsePastData();
|
this.checkUsePastData();
|
||||||
}
|
}
|
||||||
} else if (ENV.data.currentStatus == "NOTHING") {
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
|
// } else if (ENV.data.currentStatus == "NOTHING") {
|
||||||
|
//
|
||||||
addItemBtn.disabled = true;
|
//
|
||||||
icon.classList.toggle("ico-add", false);
|
// addItemBtn.disabled = true;
|
||||||
icon.classList.toggle("ico-add-disabled", true);
|
// icon.classList.toggle("ico-add", false);
|
||||||
callPastInfoBtn.disabled = true;
|
// icon.classList.toggle("ico-add-disabled", true);
|
||||||
forestProductStatus.checked = true;
|
// callPastInfoBtn.disabled = true;
|
||||||
next.disabled = true;
|
// forestProductStatus.checked = true;
|
||||||
|
// next.disabled = true;
|
||||||
|
|
||||||
} else if (ENV.data.currentStatus == "REGISTERED") {
|
} else if (ENV.data.currentStatus == "REGISTERED") {
|
||||||
if (ENV.data.bankList.length > 0) {
|
if (ENV.data.bankList.length > 0) {
|
||||||
@@ -239,7 +241,7 @@
|
|||||||
icon.classList.toggle("ico-add", false);
|
icon.classList.toggle("ico-add", false);
|
||||||
icon.classList.toggle("ico-add-disabled", true);
|
icon.classList.toggle("ico-add-disabled", true);
|
||||||
callPastInfoBtn.disabled = true;
|
callPastInfoBtn.disabled = true;
|
||||||
forestProductStatus.disabled = true;
|
// forestProductStatus.disabled = true;
|
||||||
next.disabled = true;
|
next.disabled = true;
|
||||||
next.style.display = "none";
|
next.style.display = "none";
|
||||||
clearAllItems.style.display = "none";
|
clearAllItems.style.display = "none";
|
||||||
@@ -313,30 +315,33 @@
|
|||||||
updateLayout() {
|
updateLayout() {
|
||||||
|
|
||||||
|
|
||||||
const isChecked = ENV.elementRefs.noDataCheckbox.checked;
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
const btn = document.getElementById("addItemBtn");
|
// const isChecked = ENV.elementRefs.noDataCheckbox.checked;
|
||||||
const icon = btn.querySelector("i");
|
// const btn = document.getElementById("addItemBtn");
|
||||||
|
// const icon = btn.querySelector("i");
|
||||||
const status = document.getElementById('forestProductStatusDiv');
|
// const status = document.getElementById('forestProductStatusDiv');
|
||||||
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
const callPastInfoBtn = document.getElementById("callPastInfoBtn");
|
||||||
|
|
||||||
const next = document.getElementById('complateBtn');
|
const next = document.getElementById('complateBtn');
|
||||||
const header = document.getElementById('listHeader');
|
const header = document.getElementById('listHeader');
|
||||||
const count = document.getElementById('listCount');
|
const count = document.getElementById('listCount');
|
||||||
|
const totalItems = document.getElementById('totalItems');
|
||||||
const total = ENV.data.bankList.length;
|
const total = ENV.data.bankList.length;
|
||||||
|
const isData = total > 0;
|
||||||
|
|
||||||
|
|
||||||
header.style.display = total > 0 ? '' : 'none';
|
header.style.display = isData ? '' : 'none';
|
||||||
status.style.display = total > 0 ? 'none' : '';
|
// status.style.display = total > 0 ? 'none' : '';
|
||||||
callPastInfoBtn.style.display = total > 0 ? 'none' : '';
|
callPastInfoBtn.style.display = isData ? 'none' : '';
|
||||||
count.textContent = total;
|
count.textContent = total;
|
||||||
|
totalItems.textContent = total;
|
||||||
|
|
||||||
|
<!-- TODO(ks) : "이번달 등록내용 없음" 삭제 확정 시 주석 지우기 -->
|
||||||
btn.disabled = isChecked;
|
// btn.disabled = isData;
|
||||||
icon.classList.toggle("ico-add", !isChecked);
|
// icon.classList.toggle("ico-add", !isData);
|
||||||
icon.classList.toggle("ico-add-disabled", isChecked);
|
// icon.classList.toggle("ico-add-disabled", isData);
|
||||||
if (isChecked) {
|
if (isData) {
|
||||||
next.disabled = !isChecked;
|
next.disabled = !isData;
|
||||||
} else {
|
} else {
|
||||||
next.disabled = total <= 0;
|
next.disabled = total <= 0;
|
||||||
}
|
}
|
||||||
@@ -361,7 +366,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!form.sourcePurpose.value) errors.push({field: 'sourcePurpose', message: '용도 입력해주세요.'});
|
|
||||||
if(form.count.value){
|
if(form.count.value){
|
||||||
if(!form.unitCode.value){
|
if(!form.unitCode.value){
|
||||||
errors.push({
|
errors.push({
|
||||||
@@ -469,9 +473,6 @@
|
|||||||
ENV.data.bankList = [];
|
ENV.data.bankList = [];
|
||||||
document.getElementById('listBody').innerHTML = '';
|
document.getElementById('listBody').innerHTML = '';
|
||||||
formControl.updateLayout();
|
formControl.updateLayout();
|
||||||
|
|
||||||
// TODO(ks): 선택 삭제 시 전체 count 미반영 중. 일단 전체 초기화에서만 count 갱신.
|
|
||||||
document.getElementById('totalItems').textContent = ENV.data.bankList.length;
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -482,7 +483,7 @@
|
|||||||
ajaxUtil._ajaxAsync(
|
ajaxUtil._ajaxAsync(
|
||||||
ENV.httpUrl.save,
|
ENV.httpUrl.save,
|
||||||
{
|
{
|
||||||
status: ENV.elementRefs.noDataCheckbox.checked,
|
// status: ENV.elementRefs.noDataCheckbox.checked,
|
||||||
id: ENV.data.id,
|
id: ENV.data.id,
|
||||||
transferType:"code.bank.output",
|
transferType:"code.bank.output",
|
||||||
bankList: ENV.data.bankList
|
bankList: ENV.data.bankList
|
||||||
@@ -526,10 +527,14 @@
|
|||||||
: `${getCategory(categoryCode)}`;
|
: `${getCategory(categoryCode)}`;
|
||||||
|
|
||||||
let tagCount = '';
|
let tagCount = '';
|
||||||
if(product.count && product.unitCode != "code.record.unit.self"){
|
if (product.count > 0) {
|
||||||
tagCount = `<li><p>수량</p><span>${format(product.count)}${getUnit(product.unitCode)}</span></li>`;
|
const unitText = product.unitCode !== 'code.record.unit.self'
|
||||||
|
? getUnit(product.unitCode)
|
||||||
|
: product.unit;
|
||||||
|
|
||||||
|
tagCount = `<li><p>수량</p><span>${format(product.count)}${unitText}</span></li>`;
|
||||||
} else {
|
} else {
|
||||||
tagCount = `<li><p>수량</p><span>${format(product.count)}${product.unit}</span></li>`
|
tagCount = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const buttonGroupHtml = isEdit
|
const buttonGroupHtml = isEdit
|
||||||
@@ -552,7 +557,9 @@
|
|||||||
${buttonGroupHtml}
|
${buttonGroupHtml}
|
||||||
</div>
|
</div>
|
||||||
<ul class="detail-list">
|
<ul class="detail-list">
|
||||||
<li><p>용도</p><span>${product.sourcePurpose}</span></li>
|
${product.sourcePurpose != null && product.sourcePurpose != ''
|
||||||
|
? `<li><p>용도</p><span>${product.sourcePurpose}</span></li>`
|
||||||
|
: ''}
|
||||||
${tagCount}
|
${tagCount}
|
||||||
<li><p>현금</p><span>${format(product.price)}원</span></li>
|
<li><p>현금</p><span>${format(product.price)}원</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -63,7 +63,6 @@
|
|||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<label for="sourcePurpose" class="label-txt">
|
<label for="sourcePurpose" class="label-txt">
|
||||||
용도
|
용도
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
|
|||||||
@@ -333,24 +333,22 @@
|
|||||||
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
||||||
},
|
},
|
||||||
confirmPopup() {
|
confirmPopup() {
|
||||||
|
// 이름 변경 여부 처리
|
||||||
const currentName = document.querySelector('input[name="ownerName"]').value.trim();
|
const currentName = document.querySelector('input[name="ownerName"]').value.trim();
|
||||||
|
const isNameChanged = currentName !== ENV.initialOwnerName;
|
||||||
|
|
||||||
if (currentName === '') { // 이름 비어있을 경우 유효성검사 실시
|
formControl.updateUserInfo(isNameChanged);
|
||||||
formControl.updateUserInfo();
|
|
||||||
} else if (currentName !== ENV.initialOwnerName) { // 이름이 변경됐을 경우 개인정보동의 모달창 띄우기
|
|
||||||
ENV.module.confirmPopup.open();
|
|
||||||
} else {
|
|
||||||
formControl.updateUserInfo();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
confirmPopupOk() {
|
confirmPopupOk() {
|
||||||
ENV.module.confirmPopup.close();
|
ENV.module.confirmPopup.close();
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(() => {
|
||||||
formControl.updateUserInfo();
|
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
||||||
|
location.href = '/info';
|
||||||
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
updateUserInfo() {
|
updateUserInfo(showPopupIfValidNameChanged = false) {
|
||||||
|
|
||||||
const f = document.reqForm;
|
const f = document.reqForm;
|
||||||
// // TODO 어쩔수 없이 이렇게 하는데..... 콤포넌트값 핸들링 방법 UX에서 지정하면 수정해야함.
|
// // TODO 어쩔수 없이 이렇게 하는데..... 콤포넌트값 핸들링 방법 UX에서 지정하면 수정해야함.
|
||||||
@@ -386,14 +384,13 @@
|
|||||||
obj,
|
obj,
|
||||||
function (rstData, status) {
|
function (rstData, status) {
|
||||||
if (rstData.code === 'SUCCESS') {
|
if (rstData.code === 'SUCCESS') {
|
||||||
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, function () {
|
// 유효성 검사를 모두 통과한 후
|
||||||
/**
|
if (showPopupIfValidNameChanged) {
|
||||||
* TODO
|
// 이름이 바뀐 경우만 팝업
|
||||||
* 내정보에서만 들어온다는 가정하에서 back을 하게함 SB에는 내정보로 이동하게 되어 있음.
|
ENV.module.confirmPopup.open();
|
||||||
*/
|
} else {
|
||||||
// history.back();
|
|
||||||
location.href = '/info';
|
location.href = '/info';
|
||||||
});
|
}
|
||||||
} else if (rstData.code === 'ERROR') {
|
} else if (rstData.code === 'ERROR') {
|
||||||
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,7 +93,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="unitCode" th:value="${detail.unitCode}">
|
<input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<strong>지출 내역 [[${#lists.isEmpty(expenseList) ? 0 : #lists.size(expenseList)}]]건 등록</strong> <br>
|
<strong>지출 내역 [[${#lists.isEmpty(expenseList) ? 0 : #lists.size(expenseList)}]]건 등록</strong> <br>
|
||||||
되었습니다.
|
되었습니다.
|
||||||
</h3>
|
</h3>
|
||||||
<p th:if="${#lists.isEmpty(expenseList)}">지출 내역을 등록해 주세요..</p>
|
<p th:if="${#lists.isEmpty(expenseList)}">지출 내역을 등록해 주세요.</p>
|
||||||
<p th:unless="${#lists.isEmpty(expenseList)}">등록 내용을 확인하거나 다음 단계로 이동하세요.</p>
|
<p th:unless="${#lists.isEmpty(expenseList)}">등록 내용을 확인하거나 다음 단계로 이동하세요.</p>
|
||||||
</hgroup>
|
</hgroup>
|
||||||
|
|
||||||
@@ -140,10 +140,6 @@
|
|||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(function() {
|
|
||||||
formControl.init();
|
|
||||||
});
|
|
||||||
|
|
||||||
let ENV = {
|
let ENV = {
|
||||||
httpUrl: {
|
httpUrl: {
|
||||||
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="productCode" class="component-select bottom-sheet" data-props-default="생산물을 선택해 주세요" data-props-type="bottomSheet">
|
<div id="productCode" class="component-select bottom-sheet" data-props-default="생산물을 선택해 주세요" data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="productCode" th:value="${detail.productCode}">
|
<input type="hidden" name="productCode" data-type="select" th:value="${detail.productCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="unitCode" th:value="${detail.unitCode}">
|
<input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -3,19 +3,11 @@
|
|||||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||||
|
|
||||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||||
[[${dailyRecord.registrable}]]
|
|
||||||
[[${moveStep}]],
|
|
||||||
[[${dailyRecord.modifiable}]]
|
|
||||||
--
|
|
||||||
[[${(not dailyRecord.modifiable)}]]
|
|
||||||
|
|
||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
, btnDisabled=${(not btnActive)
|
, btnDisabled=${(not btnActive)
|
||||||
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
||||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||||
|
|
||||||
[[${btnActive}]], [[${btnDisabled}]], [[${btnIcoClass}]]
|
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<hgroup class="tit-group">
|
<hgroup class="tit-group">
|
||||||
<h3>
|
<h3>
|
||||||
@@ -151,10 +143,6 @@
|
|||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(function() {
|
|
||||||
formControl.init();
|
|
||||||
});
|
|
||||||
|
|
||||||
let ENV = {
|
let ENV = {
|
||||||
httpUrl: {
|
httpUrl: {
|
||||||
root: /*[[|/record/farming/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
root: /*[[|/record/farming/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="unitCode" th:value="${detail.unitCode}">
|
<input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -143,10 +143,6 @@
|
|||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(function() {
|
|
||||||
formControl.init();
|
|
||||||
});
|
|
||||||
|
|
||||||
let ENV = {
|
let ENV = {
|
||||||
httpUrl: {
|
httpUrl: {
|
||||||
root: /*[[|/record/forestry/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
root: /*[[|/record/forestry/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="unitCode" th:value="${detail.unitCode}">
|
<input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -10,13 +10,6 @@
|
|||||||
<div>
|
<div>
|
||||||
detail: [[${dailyRecord}]]
|
detail: [[${dailyRecord}]]
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
[[${dailyRecord.registrable}]]
|
|
||||||
[[${moveStep}]],
|
|
||||||
[[${dailyRecord.modifiable}]]
|
|
||||||
<br>
|
|
||||||
//http://localhost:8080/record/income/202505/12?type=step1&target=income
|
|
||||||
</div>
|
|
||||||
</th:block>
|
</th:block>
|
||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
@@ -162,10 +155,6 @@
|
|||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(function() {
|
|
||||||
formControl.init();
|
|
||||||
});
|
|
||||||
|
|
||||||
let ENV = {
|
let ENV = {
|
||||||
httpUrl: {
|
httpUrl: {
|
||||||
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||||
|
|||||||
@@ -128,10 +128,6 @@
|
|||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(function() {
|
|
||||||
formControl.init();
|
|
||||||
});
|
|
||||||
|
|
||||||
let ENV = {
|
let ENV = {
|
||||||
httpUrl: {
|
httpUrl: {
|
||||||
root: /*[[|/record/power/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
root: /*[[|/record/power/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="areaUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
|
<div id="areaUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
|
||||||
data-props-type="bottomSheet">
|
data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="areaUnitCode" th:value="${detail.areaUnitCode}">
|
<input type="hidden" name="areaUnitCode" data-type="select" th:value="${detail.areaUnitCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
@@ -104,7 +104,6 @@
|
|||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<label for="harvestQuantity" class="label-txt">
|
<label for="harvestQuantity" class="label-txt">
|
||||||
수확량
|
수확량
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
@@ -120,7 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="harvestUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
|
<div id="harvestUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
|
||||||
data-props-type="bottomSheet">
|
data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="harvestUnitCode" th:value="${detail.harvestUnitCode}">
|
<input type="hidden" name="harvestUnitCode" data-type="select" th:value="${detail.harvestUnitCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -189,10 +189,6 @@
|
|||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(function() {
|
|
||||||
formControl.init();
|
|
||||||
});
|
|
||||||
|
|
||||||
let ENV = {
|
let ENV = {
|
||||||
httpUrl: {
|
httpUrl: {
|
||||||
root: /*[[|/record/work/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
root: /*[[|/record/work/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="password" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요" maxlength="4">
|
<input type="password" inputmode="numeric" maxlength="4" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요">
|
||||||
</div>
|
</div>
|
||||||
<ul class="input-info" id="password-error" style="display: none;">
|
<ul class="input-info" id="password-error" style="display: none;">
|
||||||
<li>비밀번호를 입력해주세요</li>
|
<li>비밀번호를 입력해주세요</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user