[FO] 일계부 임업노동 CRUD
This commit is contained in:
88
front/src/main/resources/mappers/daily/DailyWorkMapper.xml
Normal file
88
front/src/main/resources/mappers/daily/DailyWorkMapper.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="app.module.front.usecase.daily.work.adapters.persistence.DailyWorkMapper">
|
||||
|
||||
<select id="getDailyWorkList"
|
||||
resultType="app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto">
|
||||
select ds.id, ds.daily_record_seq
|
||||
, ds.item_name, ds.item_mark, ds.work_name, ds.work_mark
|
||||
, ds.work_land_area, ds.area_unit_code, ds.area_unit_self, ds.harvest_quantity, ds.harvest_unit_code, ds.harvest_unit_self
|
||||
, ds.owner_time, ds.spouse_time, ds.family_m_hours, ds.family_f_hours, ds.hired_m_hours
|
||||
, ds.hired_f_hours, ds.shared_m_hours, ds.shared_f_hours, ds.volunteer_m_hours, ds.volunteer_f_hours
|
||||
, ds.is_deleted
|
||||
from daily_work ds
|
||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||
where ds.is_deleted = false
|
||||
<if test="id != null and id != '0'">
|
||||
and ds.id = ${id}
|
||||
</if>
|
||||
order by
|
||||
ds.id desc
|
||||
</select>
|
||||
|
||||
<select id="getRecordExistCount" resultType="int">
|
||||
select count(1)
|
||||
from daily_work ds
|
||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||
where ds.is_deleted = false
|
||||
<if test="id != null and id != '0'">
|
||||
and ds.id = ${id}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="createDailyWork" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into daily_work (
|
||||
daily_record_seq
|
||||
, item_name, item_mark, work_name, work_mark
|
||||
, work_land_area, area_unit_code, area_unit_self, harvest_quantity, harvest_unit_code, harvest_unit_self
|
||||
, owner_time, spouse_time, family_m_hours, family_f_hours, hired_m_hours, hired_f_hours, shared_m_hours, shared_f_hours, volunteer_m_hours, volunteer_f_hours
|
||||
, is_deleted
|
||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||
) values (
|
||||
#{dailyRecordSeq}
|
||||
, #{itemName}, #{itemMark}, #{workName}, #{workMark}
|
||||
, #{workLandArea}, #{areaUnitCode}, #{areaUnitSelf}, #{harvestQuantity}, #{harvestUnitCode}, #{harvestUnitSelf}
|
||||
, #{ownerTime}, #{spouseTime}, #{familyMHours}, #{familyFHours}, #{hiredMHours}, #{hiredFHours}, #{sharedMHours}, #{sharedFHours}, #{volunteerMHours}, #{volunteerFHours}
|
||||
, false
|
||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDailyWork">
|
||||
update daily_work set <include refid="common.fields.UpdateBaseSet"/>
|
||||
, item_name = #{itemName}
|
||||
, item_mark = #{itemMark}
|
||||
, work_name = #{workName}
|
||||
, work_mark = #{workMark}
|
||||
, work_land_area = #{workLandArea}
|
||||
, area_unit_code = #{areaUnitCode}
|
||||
, area_unit_self = #{areaUnitSelf}
|
||||
, harvest_quantity = #{harvestQuantity}
|
||||
, harvest_unit_code = #{harvestUnitCode}
|
||||
, harvest_unit_self = #{harvestUnitSelf}
|
||||
, owner_time = #{ownerTime}
|
||||
, spouse_time = #{spouseTime}
|
||||
, family_m_hours = #{familyMHours}
|
||||
, family_f_hours = #{familyFHours}
|
||||
, hired_m_hours = #{hiredMHours}
|
||||
, hired_f_hours = #{hiredFHours}
|
||||
, shared_m_hours = #{sharedMHours}
|
||||
, shared_f_hours = #{sharedFHours}
|
||||
, volunteer_m_hours = #{volunteerMHours}
|
||||
, volunteer_f_hours = #{volunteerFHours}
|
||||
where is_deleted = false
|
||||
and daily_record_seq = #{dailyRecordSeq}
|
||||
and id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeDailyWork">
|
||||
update daily_work set
|
||||
<include refid="common.fields.DeleteBaseSet"/>
|
||||
where is_deleted = false
|
||||
and daily_record_seq = #{dailyRecordSeq}
|
||||
<if test="id != null and id != ''">
|
||||
and id = #{id}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
1
front/src/main/resources/static/.gitignore
vendored
Normal file
1
front/src/main/resources/static/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.idea
|
||||
@@ -40,7 +40,7 @@
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<!--/*<div class="component-input">
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">임업노동 투입 내역</span>
|
||||
<input type="checkbox" name="workStatus" value="TARGET" data-target="work"
|
||||
@@ -49,7 +49,7 @@
|
||||
<span class="switch-handle"></span>
|
||||
</span>
|
||||
</label>
|
||||
</div>*/-->
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="switch-inner type-txt">
|
||||
<span class="switch-label">지출</span>
|
||||
|
||||
@@ -109,7 +109,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity" th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity"
|
||||
th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
<li>예 : 2, 2.5</li>
|
||||
@@ -163,7 +164,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field type-price">
|
||||
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price" th:value="${detail.price}" maxlength="10" placeholder="금액을 입력해 주세요">
|
||||
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price"
|
||||
th:value="${detail.price}" maxlength="10" placeholder="금액을 입력해 주세요">
|
||||
<span class="input-field-txt">원</span>
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
@@ -179,7 +181,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field type-price">
|
||||
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue" th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
|
||||
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue"
|
||||
th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
|
||||
<span class="input-field-txt">원</span>
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field type-hour">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="ownedHours" name="ownedHours" th:value="${detail.ownedHours}" maxlength="10" placeholder="자가에서 사용한 동력 사용시간을 입력해 주세요">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="ownedHours" name="ownedHours" th:value="${detail.ownedHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,7 +57,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field type-hour">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="leasedHours" name="leasedHours" th:value="${detail.leasedHours}" maxlength="10" placeholder="임차해서 사용한 동력 사용시간을 입력해 주세요">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="leasedHours" name="leasedHours" th:value="${detail.leasedHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
306
front/src/main/resources/templates/record/work/form.html
Normal file
306
front/src/main/resources/templates/record/work/form.html
Normal file
@@ -0,0 +1,306 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<th:block>
|
||||
<div class="modal-content-inner">
|
||||
<article class="alert-box full green">
|
||||
<ul>
|
||||
<li>자가소비용 임산물 및 채취 임산물의 노동 작업도 임업노동 투입내역에 기입해 주세요.</li>
|
||||
<li>임산물의 출하준비, 구입, 판매, 기획관리 등의 간접노동도 기입해 주세요.</li>
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<p class="form-desc">필수입력</p>
|
||||
<form name="reqModalForm">
|
||||
<input type="hidden" name="id" th:value="${detail.id}">
|
||||
<section class="form-group">
|
||||
<div class="component-input">
|
||||
<div class="input-label">
|
||||
<label for="itemName" class="label-txt">
|
||||
품목명<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="itemName" name="itemName" th:value="${detail.itemName}" maxlength="30" placeholder="품목을 입력해 주세요">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<hr>
|
||||
|
||||
<section class="form-group">
|
||||
<div class="component-input">
|
||||
<div class="input-label">
|
||||
<label for="workName" class="label-txt">
|
||||
작업명
|
||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="workName" name="workName" th:value="${detail.workName}" maxlength="30" placeholder="어떤 작업을 했는지 입력해 주세요">
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
<li>예 : 수확</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-label">
|
||||
<label for="workLandArea" class="label-txt">
|
||||
작업 면적
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="workLandArea" name="workLandArea"
|
||||
th:value="${detail.workLandArea}" maxlength="10" placeholder="작업 면적을 입력해 주세요">
|
||||
</div>
|
||||
<ul class="guide-info">
|
||||
<li>예 : 180, 6</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="select-group">
|
||||
<div class="select-label">
|
||||
<p class="label-txt">
|
||||
단위
|
||||
</p>
|
||||
</div>
|
||||
<div id="areaUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
|
||||
data-props-type="bottomSheet">
|
||||
<input type="hidden" name="areaUnitCode" th:value="${detail.areaUnitCode}">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
<div class="select-options">
|
||||
<div class="select-header">
|
||||
<p>단위</p>
|
||||
<button type="button" class="select-close">
|
||||
<span class="hide-txt">닫기</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<li class="option" th:each="uiCode : ${recordUnit}"
|
||||
th:data-value="${uiCode.id}"
|
||||
th:text="${uiCode.codeText}"
|
||||
th:selected="${uiCode.id eq detail.areaUnitCode ? 'current' : ''}"
|
||||
></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input" data-option="직접 입력">
|
||||
<div class="input-field">
|
||||
<input type="text" id="areaUnitSelf" name="areaUnitSelf" th:value="${detail.areaUnitSelf}" maxlength="30" placeholder="단위를 입력해 주세요">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<hr>
|
||||
|
||||
<section class="form-group">
|
||||
|
||||
<div class="component-input">
|
||||
<div class="input-label">
|
||||
<label for="harvestQuantity" class="label-txt">
|
||||
수확량
|
||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field">
|
||||
<input type="text" id="harvestQuantity" name="harvestQuantity" th:value="${detail.harvestQuantity}" maxlength="10" placeholder="수확량을 입력해 주세요">
|
||||
</div>
|
||||
</div>
|
||||
<div class="select-group">
|
||||
<div class="select-label">
|
||||
<p class="label-txt">
|
||||
단위
|
||||
</p>
|
||||
</div>
|
||||
<div id="harvestUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
|
||||
data-props-type="bottomSheet">
|
||||
<input type="hidden" name="harvestUnitCode" th:value="${detail.harvestUnitCode}">
|
||||
<button type="button" class="select-box">
|
||||
<span class="select-txt"></span>
|
||||
</button>
|
||||
<div class="select-options">
|
||||
<div class="select-header">
|
||||
<p>단위</p>
|
||||
<button type="button" class="select-close">
|
||||
<span class="hide-txt">닫기</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="select-scroll">
|
||||
<ul class="">
|
||||
<li class="option" th:each="uiCode : ${recordUnit}"
|
||||
th:data-value="${uiCode.id}"
|
||||
th:text="${uiCode.codeText}"
|
||||
th:selected="${uiCode.id eq detail.harvestUnitCode ? 'current' : ''}"
|
||||
></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input" data-option="직접 입력">
|
||||
<div class="input-field">
|
||||
<input type="text" id="harvestUnitSelf" name="harvestUnitSelf" th:value="${detail.harvestUnitSelf}" maxlength="30" placeholder="단위를 입력해 주세요">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<hr>
|
||||
|
||||
<section class="form-group">
|
||||
<div class="component-segment">
|
||||
<div class="segment-label">
|
||||
<p class="label-txt">
|
||||
노동투입시간 <i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||
</p>
|
||||
<ul class="guide-info">
|
||||
<li>'총 시간'을 기입해 주세요. </li>
|
||||
<li>최소 1개의 항목을 입력해 주세요.</li>
|
||||
<li>최소 1개의 노동투입시간을 입력해 주세요.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input type-sub">
|
||||
<div class="input-label">
|
||||
<label for="ownerTime" class="label-txt">
|
||||
경영주
|
||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field type-hour">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="ownerTime" name="ownerTime"
|
||||
th:value="${detail.ownerTime}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input type-sub">
|
||||
<div class="input-label">
|
||||
<label for="spouseTime" class="label-txt">
|
||||
배우자
|
||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-field type-hour">
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="spouseTime" name="spouseTime"
|
||||
th:value="${detail.spouseTime}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-flex-group">
|
||||
<div class="input-label">
|
||||
<label for="familyMHours" class="label-txt">
|
||||
가족노동
|
||||
</label>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">남</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="familyMHours" name="familyMHours"
|
||||
th:value="${detail.familyMHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">여</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="familyFHours" name="familyFHours"
|
||||
th:value="${detail.familyFHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-flex-group">
|
||||
<div class="input-label">
|
||||
<label for="hiredMHours" class="label-txt">
|
||||
고용노동
|
||||
</label>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">남</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="hiredMHours" name="hiredMHours"
|
||||
th:value="${detail.hiredMHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">여</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="hiredFHours" name="hiredFHours"
|
||||
th:value="${detail.hiredFHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-flex-group">
|
||||
<div class="input-label">
|
||||
<label for="sharedMHours" class="label-txt">
|
||||
품앗이
|
||||
</label>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">남</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="sharedMHours" name="sharedMHours"
|
||||
th:value="${detail.sharedMHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">여</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="sharedFHours" name="sharedFHours"
|
||||
th:value="${detail.sharedFHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-flex-group">
|
||||
<div class="input-label">
|
||||
<label for="volunteerMHours" class="label-txt">
|
||||
일손돕기
|
||||
</label>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">남</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="volunteerMHours" name="volunteerMHours"
|
||||
th:value="${detail.volunteerMHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field type-hour">
|
||||
<span class="input-front-txt">여</span>
|
||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="volunteerFHours" name="volunteerFHours"
|
||||
th:value="${detail.volunteerFHours}" maxlength="10" placeholder="00">
|
||||
<span class="input-field-txt">시간</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn btn-full btn-l btn-primary" onclick="modalControl.createVaild();">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</th:block>
|
||||
|
||||
</html>
|
||||
@@ -3,30 +3,258 @@
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
||||
<div>
|
||||
reqVO: [[${reqVO}]]
|
||||
</div>
|
||||
<div>
|
||||
detail: [[${detail}]]
|
||||
</div>
|
||||
</th:block>
|
||||
<main id="content" role="main">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
<th:block th:if="${dailyRecord.startDay eq dailyRecord.endDay}">
|
||||
[[${#temporals.format(dailyRecord.startDate, 'M월 d일')}]], <br>
|
||||
</th:block>
|
||||
<th:block th:if="not ${dailyRecord.startDay eq dailyRecord.endDay}">
|
||||
[[${#temporals.format(dailyRecord.startDate, 'M월 d일')}]]~[[${#temporals.format(dailyRecord.endDate, 'd일')}]], <br>
|
||||
</th:block>
|
||||
<strong>임업노동 투입 내역 [[${#lists.isEmpty(workList) ? 0 : #lists.size(workList)}]]건 등록</strong> <br>
|
||||
되었습니다.
|
||||
</h3>
|
||||
<p>임업노동 투입 내역을 등록해 주세요.</p>
|
||||
</hgroup>
|
||||
|
||||
<!--/* 신규 등록 */-->
|
||||
<th:block th:if="${#lists.isEmpty(workList)}">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:disabled="${#strings.equals(dailyRecord.workStatus, 'TODAY_NONE')}">
|
||||
<i class="ico-small" aria-hidden="true"
|
||||
th:classappend="${#strings.equals(dailyRecord.workStatus, 'TODAY_NONE') ? 'ico-add-disabled' : 'ico-add'}"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<div class="component-input align-center">
|
||||
<label class="checkbox-inner" id="todayNone">
|
||||
<input type="checkbox" name="todayNone"
|
||||
data-type="WORK"
|
||||
th:checked="${#strings.equals(dailyRecord.workStatus, 'TODAY_NONE')}">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<ul class="info-bullet-list">
|
||||
<li>
|
||||
자가소비용 임산물 및 채취 임산물의 노동 작업도 임업노동 투입내역에 기입해주세요.
|
||||
</li>
|
||||
<li>
|
||||
임산물의 출하준비, 구입, 판매, 기획관리 등의 간접노동도 기입해주세요.
|
||||
</li>
|
||||
</ul>
|
||||
</th:block>
|
||||
<!--/* 목록 */-->
|
||||
<th:block th:unless="${#lists.isEmpty(workList)}">
|
||||
<section class="regist-item-area">
|
||||
<p class="total">
|
||||
<span>총 <strong>[[${#lists.size(workList)}]]</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
</p>
|
||||
<div class="item-list">
|
||||
<div class="list-item"
|
||||
th:each="item, itemStatus : ${workList}">
|
||||
<div class="item-tit-group">
|
||||
<p class="item-name">[[${item.itemName}]]</p>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
||||
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="detail-list">
|
||||
<li th:if="${not #strings.isEmpty(item.workName)}">
|
||||
<p>작업명</p>
|
||||
<span th:text="${item.workName}">수확</span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.workLandArea)}">
|
||||
<p>작업 면적</p>
|
||||
<span th:text="|${item.workLandArea}${#strings.defaultString(item.areaUnitLabel,'')}|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.harvestQuantity)}">
|
||||
<p>수확량</p>
|
||||
<span th:text="|${item.harvestQuantity}${#strings.defaultString(item.harvestUnitLabel,'')}|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.ownerTime)}">
|
||||
<p>경영주 노동투입시간</p>
|
||||
<span th:text="|${item.ownerTime}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.spouseTime)}">
|
||||
<p>배우자 노동투입시간</p>
|
||||
<span th:text="|${item.spouseTime}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.familyMHours)}">
|
||||
<p>가족노동(남)</p>
|
||||
<span th:text="|${item.familyMHours}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.familyFHours)}">
|
||||
<p>가족노동(여)</p>
|
||||
<span th:text="|${item.familyFHours}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.hiredMHours)}">
|
||||
<p>고용노동(남)</p>
|
||||
<span th:text="|${item.hiredMHours}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.hiredFHours)}">
|
||||
<p>고용노동(여)</p>
|
||||
<span th:text="|${item.hiredFHours}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.sharedMHours)}">
|
||||
<p>품앗이(남)</p>
|
||||
<span th:text="|${item.sharedMHours}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.sharedFHours)}">
|
||||
<p>품앗이(여)</p>
|
||||
<span th:text="|${item.sharedFHours}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.volunteerMHours)}">
|
||||
<p>일손돕기(남)</p>
|
||||
<span th:text="|${item.volunteerMHours}시간|"></span>
|
||||
</li>
|
||||
<li th:if="${not #strings.isEmpty(item.volunteerFHours)}">
|
||||
<p>일손돕기(여)</p>
|
||||
<span th:text="|${item.volunteerFHours}시간|"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01">
|
||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<ul class="info-bullet-list">
|
||||
<li>
|
||||
자가소비용 임산물 및 채취 임산물의 노동 작업도 임업노동 투입내역에 기입해주세요.
|
||||
</li>
|
||||
<li>
|
||||
임산물의 출하준비, 구입, 판매, 기획관리 등의 간접노동도 기입해주세요.
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</th:block>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<!-- 하단 고정 버튼 -->
|
||||
<div class="component-btns fixed"
|
||||
th:if="${moveStep}">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
|
||||
<span class="btn-txt">이전 단계로 이동</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-l btn-primary"
|
||||
th:disabled="${not #strings.equals(dailyRecord.workStatus, 'TODAY_NONE') and #lists.isEmpty(workList)}"
|
||||
th:onclick="krip.daily.goToNext([[${nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 모달 팝업 -->
|
||||
<div class="layer-wrap">
|
||||
<div class="component-modal acco-wrap formModal" data-props-dimm-click="true">
|
||||
<div class="modal-dimm"></div>
|
||||
<div class="modal-frame">
|
||||
<div class="modal-container">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-tit">임업노동 투입 등록</h3>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<!--/* form */-->
|
||||
</div>
|
||||
<button type="button" class="modal-close"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //모달 팝업 -->
|
||||
<!-- /* 건의사항 모달 팝업 */ -->
|
||||
<th:block th:replace="~{/record/comment-modal}"></th:block>
|
||||
<!-- /* //건의사항 모달 팝업 */ -->
|
||||
</div>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:src="@{/static/ui/page/daily-record.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
$(function() {
|
||||
formControl.init();
|
||||
});
|
||||
|
||||
let ENV = {
|
||||
httpUrl: {
|
||||
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||
root: /*[[|/record/work/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',
|
||||
form: /*[[|/record/work/${reqVO.searchMonth}/${reqVO.groupNo}/form/{id}|]]*/'formUrl',
|
||||
create: /*[[|/api/record/work/${reqVO.searchMonth}/${reqVO.groupNo}/form/{id}|]]*/'createUrl',
|
||||
remove: /*[[|/api/record/work/${reqVO.searchMonth}/${reqVO.groupNo}/remove|]]*/'removeUrl',
|
||||
reset: /*[[|/api/record/work/${reqVO.searchMonth}/${reqVO.groupNo}/reset|]]*/'resetUrl',
|
||||
},
|
||||
month: [[${reqVO.searchMonth}]],
|
||||
groupNo: [[${reqVO.groupNo}]],
|
||||
modal: {
|
||||
// 등록 버튼
|
||||
selectorId: '.button-modal01',
|
||||
// 등록 영역
|
||||
selector: '.formModal',
|
||||
},
|
||||
month: /*[[${reqVO.searchMonth}]]*/'month',
|
||||
groupNo: /*[[${reqVO.groupNo}]]*/'groupNo',
|
||||
submitted: false,
|
||||
};
|
||||
|
||||
let formControl = {
|
||||
init() {
|
||||
krip.daily.baseBindUI();
|
||||
},
|
||||
};
|
||||
|
||||
let modalControl = {
|
||||
_bindModelUI() {
|
||||
const $select1 = document.querySelector('#areaUnitCode');
|
||||
const selectboxInstance1 = new etUI.components.SelectBox();
|
||||
selectboxInstance1.core.init($select1, {
|
||||
selectItemCallback({selectValue, dataValue}){
|
||||
console.log('selectItemCallback', selectValue, dataValue)
|
||||
$('input[name="areaUnitCode"]').val(dataValue)
|
||||
etUI.pages.initDirectInputToggle();
|
||||
}
|
||||
});
|
||||
|
||||
const $select2 = document.querySelector('#harvestUnitCode');
|
||||
const selectboxInstance2 = new etUI.components.SelectBox();
|
||||
selectboxInstance2.core.init($select2, {
|
||||
selectItemCallback({selectValue, dataValue}){
|
||||
console.log('selectItemCallback', selectValue, dataValue)
|
||||
$('input[name="harvestUnitCode"]').val(dataValue)
|
||||
etUI.pages.initDirectInputToggle();
|
||||
}
|
||||
});
|
||||
|
||||
const $formWrap = $(ENV.modal.selector).find('form');
|
||||
|
||||
// data set
|
||||
selectboxInstance1.setValue($formWrap.find('input[name="areaUnitCode"]').val());
|
||||
selectboxInstance2.setValue($formWrap.find('input[name="harvestUnitCode"]').val());
|
||||
},
|
||||
createVaild() {
|
||||
modalControl.create();
|
||||
},
|
||||
create() {
|
||||
const f = document.reqModalForm;
|
||||
|
||||
const obj = $(f).serializeObject();
|
||||
console.log(obj)
|
||||
|
||||
ajaxUtil._ajaxAsync(
|
||||
ENV.httpUrl.create.replace('{id}', f.id.value ? f.id.value : '0'),
|
||||
obj,
|
||||
function (rstData, status) {
|
||||
location.reload();
|
||||
},
|
||||
);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user