[FO] 일계수 수입/지출의 종류 selectbox 에서 input 으로 변경
This commit is contained in:
@@ -16,7 +16,6 @@ public class CreateDailyExpenseCmd extends FrontAuditCommand {
|
|||||||
private String inputType;
|
private String inputType;
|
||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String incomeMarkCode;
|
private String incomeMarkCode;
|
||||||
private String categoryCode;
|
|
||||||
private String categorySelf;
|
private String categorySelf;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ public class DailyExpenseDto {
|
|||||||
// TODO : SELF, OCR
|
// TODO : SELF, OCR
|
||||||
private String inputType;
|
private String inputType;
|
||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String categoryCode;
|
|
||||||
private String categoryLabel;
|
|
||||||
private String categorySelf;
|
private String categorySelf;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|||||||
@@ -41,11 +41,9 @@ public class DailyExpenseServiceImpl implements DailyExpenseService {
|
|||||||
private List<DailyExpenseDto> getRefineIncomeList(DailyExpenseUIReqVO reqVO) {
|
private List<DailyExpenseDto> getRefineIncomeList(DailyExpenseUIReqVO reqVO) {
|
||||||
List<DailyExpenseDto> list = DailyExpenseMapper.getDailyExpenseList(reqVO);
|
List<DailyExpenseDto> list = DailyExpenseMapper.getDailyExpenseList(reqVO);
|
||||||
|
|
||||||
List<UICodeElement> recordIncome = uiCodeListPortIn.connect("code.record.expense");
|
|
||||||
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
||||||
|
|
||||||
for (DailyExpenseDto dto : list) {
|
for (DailyExpenseDto dto : list) {
|
||||||
dto.setCategoryLabel(this.getCodeLabel(dto.getCategoryCode(), recordIncome));
|
|
||||||
dto.setUnitLabel(this.getCodeLabel(dto.getUnitCode(), recordUnit));
|
dto.setUnitLabel(this.getCodeLabel(dto.getUnitCode(), recordUnit));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +77,6 @@ public class DailyExpenseServiceImpl implements DailyExpenseService {
|
|||||||
formVO.getInputType(),
|
formVO.getInputType(),
|
||||||
formVO.getCredit(),
|
formVO.getCredit(),
|
||||||
(formVO.getCredit() ? "52210" : null), // [정책] 외상판매 Y 일 경우 수입부호 52210 적재
|
(formVO.getCredit() ? "52210" : null), // [정책] 외상판매 Y 일 경우 수입부호 52210 적재
|
||||||
formVO.getCategoryCode(),
|
|
||||||
formVO.getCategorySelf(),
|
formVO.getCategorySelf(),
|
||||||
formVO.getSourcePurpose(),
|
formVO.getSourcePurpose(),
|
||||||
formVO.getQuantity(),
|
formVO.getQuantity(),
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ public class DailyExpenseUIController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
model.addAttribute("recordExpense", uiCodeListPortIn.connect("code.record.expense"));
|
|
||||||
model.addAttribute("recordCrop", uiCodeListPortIn.connect("code.record.crop"));
|
model.addAttribute("recordCrop", uiCodeListPortIn.connect("code.record.crop"));
|
||||||
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
||||||
|
|
||||||
|
|||||||
@@ -26,14 +26,10 @@ public class CreateDailyExpenseReqVO extends DailyUIReqVO {
|
|||||||
* 외상판매 여부
|
* 외상판매 여부
|
||||||
*/
|
*/
|
||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
/**
|
|
||||||
* 지출의 종류 코드
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "지출 종류를 선택해 주세요.")
|
|
||||||
private String categoryCode;
|
|
||||||
/**
|
/**
|
||||||
* 지출의 종류 직접입력
|
* 지출의 종류 직접입력
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "지출 종류를 입력해 주세요.")
|
||||||
private String categorySelf;
|
private String categorySelf;
|
||||||
/**
|
/**
|
||||||
* 용도
|
* 용도
|
||||||
|
|||||||
@@ -20,18 +20,6 @@ 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 (StringUtils.isBlank(vo.getCategoryCode())) {
|
|
||||||
errors.rejectValue(
|
|
||||||
"categoryCode", "valid.common.required",
|
|
||||||
"지출 종류를 선택해 주세요.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("SELF".equals(vo.getCategoryCode()) && StringUtils.isBlank(vo.getCategorySelf())) {
|
|
||||||
errors.rejectValue(
|
|
||||||
"categorySelf", "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",
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ public class CreateDailyIncomeCmd extends FrontAuditCommand {
|
|||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String cropCode;
|
private String cropCode;
|
||||||
private String expenseMarkCode;
|
private String expenseMarkCode;
|
||||||
private String categoryCode;
|
|
||||||
private String categorySelf;
|
private String categorySelf;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ public class DailyIncomeDto {
|
|||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String cropCode;
|
private String cropCode;
|
||||||
private String cropLabel;
|
private String cropLabel;
|
||||||
private String categoryCode;
|
|
||||||
private String categoryLabel;
|
|
||||||
private String categorySelf;
|
private String categorySelf;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Integer quantity;
|
private Integer quantity;
|
||||||
|
|||||||
@@ -41,12 +41,10 @@ public class DailyIncomeServiceImpl implements DailyIncomeService {
|
|||||||
private List<DailyIncomeDto> getRefineIncomeList(DailyIncomeUIReqVO reqVO) {
|
private List<DailyIncomeDto> getRefineIncomeList(DailyIncomeUIReqVO reqVO) {
|
||||||
List<DailyIncomeDto> list = dailyIncomeMapper.getDailyIncomeList(reqVO);
|
List<DailyIncomeDto> list = dailyIncomeMapper.getDailyIncomeList(reqVO);
|
||||||
|
|
||||||
List<UICodeElement> recordIncome = uiCodeListPortIn.connect("code.record.income");
|
|
||||||
List<UICodeElement> recordCrop = uiCodeListPortIn.connect("code.record.crop");
|
List<UICodeElement> recordCrop = uiCodeListPortIn.connect("code.record.crop");
|
||||||
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
||||||
|
|
||||||
for (DailyIncomeDto dto : list) {
|
for (DailyIncomeDto dto : list) {
|
||||||
dto.setCategoryLabel(this.getCodeLabel(dto.getCategoryCode(), recordIncome));
|
|
||||||
dto.setCropLabel(this.getCodeLabel(dto.getCropCode(), recordCrop));
|
dto.setCropLabel(this.getCodeLabel(dto.getCropCode(), recordCrop));
|
||||||
dto.setUnitLabel(this.getCodeLabel(dto.getUnitCode(), recordUnit));
|
dto.setUnitLabel(this.getCodeLabel(dto.getUnitCode(), recordUnit));
|
||||||
}
|
}
|
||||||
@@ -82,7 +80,6 @@ public class DailyIncomeServiceImpl implements DailyIncomeService {
|
|||||||
formVO.getCredit(),
|
formVO.getCredit(),
|
||||||
formVO.getCropCode(),
|
formVO.getCropCode(),
|
||||||
(formVO.getCredit() ? "91206" : null), // [정책] 외상판매 Y 일 경우 지출부호 91206 적재
|
(formVO.getCredit() ? "91206" : null), // [정책] 외상판매 Y 일 경우 지출부호 91206 적재
|
||||||
formVO.getCategoryCode(),
|
|
||||||
formVO.getCategorySelf(),
|
formVO.getCategorySelf(),
|
||||||
formVO.getSourcePurpose(),
|
formVO.getSourcePurpose(),
|
||||||
formVO.getQuantity(),
|
formVO.getQuantity(),
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ public class DailyIncomeUIController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
model.addAttribute("recordIncome", uiCodeListPortIn.connect("code.record.income"));
|
|
||||||
model.addAttribute("recordCrop", uiCodeListPortIn.connect("code.record.crop"));
|
model.addAttribute("recordCrop", uiCodeListPortIn.connect("code.record.crop"));
|
||||||
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
||||||
|
|
||||||
|
|||||||
@@ -30,14 +30,10 @@ public class CreateDailyIncomeReqVO extends DailyUIReqVO {
|
|||||||
* 재배형태 코드
|
* 재배형태 코드
|
||||||
*/
|
*/
|
||||||
private String cropCode;
|
private String cropCode;
|
||||||
/**
|
|
||||||
* 수입의 종류 코드
|
|
||||||
*/
|
|
||||||
@NotBlank(message = "수입 종류를 선택해 주세요.")
|
|
||||||
private String categoryCode;
|
|
||||||
/**
|
/**
|
||||||
* 수입의 종류 직접입력
|
* 수입의 종류 직접입력
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "수입 종류를 입력해 주세요.")
|
||||||
private String categorySelf;
|
private String categorySelf;
|
||||||
/**
|
/**
|
||||||
* 수입원
|
* 수입원
|
||||||
|
|||||||
@@ -23,18 +23,6 @@ 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 (StringUtils.isBlank(vo.getCategoryCode())) {
|
|
||||||
errors.rejectValue(
|
|
||||||
"categoryCode", "valid.common.required",
|
|
||||||
"수입 종류를 선택해 주세요.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("SELF".equals(vo.getCategoryCode()) && StringUtils.isBlank(vo.getCategorySelf())) {
|
|
||||||
errors.rejectValue(
|
|
||||||
"categorySelf", "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",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<select id="getDailyExpenseList"
|
<select id="getDailyExpenseList"
|
||||||
resultType="app.module.front.usecase.daily.expense.persistence.model.DailyExpenseDto">
|
resultType="app.module.front.usecase.daily.expense.persistence.model.DailyExpenseDto">
|
||||||
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
||||||
, ds.category_code, ds.category_self, ds.source_purpose
|
, ds.category_self, ds.source_purpose
|
||||||
, ds.quantity, ds.unit_code, ds.price, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.price, ds.estimated_value
|
||||||
from daily_expense ds
|
from daily_expense ds
|
||||||
<include refid="app.module.front.usecase.daily.record.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.front.usecase.daily.record.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
@@ -29,13 +29,13 @@
|
|||||||
|
|
||||||
<insert id="createDailyExpense" useGeneratedKeys="true" keyProperty="id">
|
<insert id="createDailyExpense" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into daily_expense (
|
insert into daily_expense (
|
||||||
daily_record_seq, input_type, is_credit, income_mark_code, category_code, category_self, source_purpose
|
daily_record_seq, input_type, is_credit, income_mark_code, category_self, source_purpose
|
||||||
, quantity, unit_code, price, estimated_value
|
, quantity, unit_code, price, estimated_value
|
||||||
, is_deleted
|
, is_deleted
|
||||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||||
) values (
|
) values (
|
||||||
#{dailyRecordSeq}
|
#{dailyRecordSeq}
|
||||||
, #{inputType}, #{credit}, #{incomeMarkCode}, #{categoryCode}, #{categorySelf}, #{sourcePurpose}
|
, #{inputType}, #{credit}, #{incomeMarkCode}, #{categorySelf}, #{sourcePurpose}
|
||||||
, #{quantity}, #{unitCode}, #{price}, #{estimatedValue}
|
, #{quantity}, #{unitCode}, #{price}, #{estimatedValue}
|
||||||
, false
|
, false
|
||||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||||
@@ -46,7 +46,6 @@
|
|||||||
update daily_expense set <include refid="common.fields.UpdateBaseSet"/>
|
update daily_expense set <include refid="common.fields.UpdateBaseSet"/>
|
||||||
, is_credit = #{credit}
|
, is_credit = #{credit}
|
||||||
, income_mark_code = #{incomeMarkCode}
|
, income_mark_code = #{incomeMarkCode}
|
||||||
, category_code = #{categoryCode}
|
|
||||||
, category_self = #{categorySelf}
|
, category_self = #{categorySelf}
|
||||||
, source_purpose = #{sourcePurpose}
|
, source_purpose = #{sourcePurpose}
|
||||||
, quantity = #{quantity}
|
, quantity = #{quantity}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<select id="getDailyIncomeList"
|
<select id="getDailyIncomeList"
|
||||||
resultType="app.module.front.usecase.daily.income.persistence.model.DailyIncomeDto">
|
resultType="app.module.front.usecase.daily.income.persistence.model.DailyIncomeDto">
|
||||||
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
||||||
, ds.crop_code, ds.category_code, ds.category_self, ds.source_purpose
|
, ds.crop_code, ds.category_self, ds.source_purpose
|
||||||
, ds.quantity, ds.unit_code, ds.price, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.price, ds.estimated_value
|
||||||
from daily_income ds
|
from daily_income ds
|
||||||
<include refid="app.module.front.usecase.daily.record.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.front.usecase.daily.record.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
@@ -29,13 +29,13 @@
|
|||||||
|
|
||||||
<insert id="createDailyIncome" useGeneratedKeys="true" keyProperty="id">
|
<insert id="createDailyIncome" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into daily_income (
|
insert into daily_income (
|
||||||
daily_record_seq, input_type, is_credit, expense_mark_code, crop_code, category_code, category_self, source_purpose
|
daily_record_seq, input_type, is_credit, expense_mark_code, crop_code, category_self, source_purpose
|
||||||
, quantity, unit_code, price, estimated_value
|
, quantity, unit_code, price, estimated_value
|
||||||
, is_deleted
|
, is_deleted
|
||||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||||
) values (
|
) values (
|
||||||
#{dailyRecordSeq}
|
#{dailyRecordSeq}
|
||||||
, #{inputType}, #{credit}, #{expenseMarkCode}, #{cropCode}, #{categoryCode}, #{categorySelf}, #{sourcePurpose}
|
, #{inputType}, #{credit}, #{expenseMarkCode}, #{cropCode}, #{categorySelf}, #{sourcePurpose}
|
||||||
, #{quantity}, #{unitCode}, #{price}, #{estimatedValue}
|
, #{quantity}, #{unitCode}, #{price}, #{estimatedValue}
|
||||||
, false
|
, false
|
||||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||||
@@ -47,7 +47,6 @@
|
|||||||
, is_credit = #{credit}
|
, is_credit = #{credit}
|
||||||
, expense_mark_code = #{expenseMarkCode}
|
, expense_mark_code = #{expenseMarkCode}
|
||||||
, crop_code = #{cropCode}
|
, crop_code = #{cropCode}
|
||||||
, category_code = #{categoryCode}
|
|
||||||
, category_self = #{categorySelf}
|
, category_self = #{categorySelf}
|
||||||
, source_purpose = #{sourcePurpose}
|
, source_purpose = #{sourcePurpose}
|
||||||
, quantity = #{quantity}
|
, quantity = #{quantity}
|
||||||
|
|||||||
@@ -54,42 +54,14 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<section class="form-group">
|
<section class="form-group">
|
||||||
<div class="select-group">
|
<div class="component-input">
|
||||||
<div class="select-label">
|
<div class="input-label">
|
||||||
<p class="label-txt">
|
<label for="categorySelf" class="label-txt">
|
||||||
지출의 종류
|
지출의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
</label>
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="categoryCode" class="component-select bottom-sheet" data-props-default="지출 종류를 선택해 주세요" data-props-type="bottomSheet">
|
<div class="input-field">
|
||||||
<input type="hidden1" name="categoryCode" th:value="${detail.categoryCode}" data-type="select">
|
<input type="text" id="categorySelf" name="categorySelf" th:value="${detail.categorySelf}" maxlength="30" placeholder="지출의 종류를 입력해 주세요">
|
||||||
<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 : ${recordExpense}"
|
|
||||||
th:data-value="${uiCode.id}"
|
|
||||||
th:text="${uiCode.codeText}"></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="component-input input-invalid" data-option="직접 입력">
|
|
||||||
<div class="input-field">
|
|
||||||
<input type="text" id="categorySelf" name="categorySelf" th:value="${detail.categorySelf}" maxlength="30" placeholder="지출의 종류를 입력해 주세요">
|
|
||||||
</div>
|
|
||||||
<ul class="input-info">
|
|
||||||
<li>지출 종류를 입력해 주세요.</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<div class="list-item"
|
<div class="list-item"
|
||||||
th:each="item, itemStatus : ${expenseList}">
|
th:each="item, itemStatus : ${expenseList}">
|
||||||
<div class="item-tit-group">
|
<div class="item-tit-group">
|
||||||
<p class="item-name">[[${item.categoryLabel}]] [[${item.categorySelf}]]</p>
|
<p class="item-name">[[${item.categorySelf}]]</p>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="delete" th:onclick="formControl.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
<button type="button" class="delete" th:onclick="formControl.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
||||||
<button type="button" class="edit" th:onclick="formControl.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
<button type="button" class="edit" th:onclick="formControl.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
||||||
@@ -150,8 +150,8 @@
|
|||||||
remove: /*[[|/api/record/expense/${reqVO.searchMonth}/${reqVO.groupNo}/remove|]]*/'removeUrl',
|
remove: /*[[|/api/record/expense/${reqVO.searchMonth}/${reqVO.groupNo}/remove|]]*/'removeUrl',
|
||||||
reset: /*[[|/api/record/expense/${reqVO.searchMonth}/${reqVO.groupNo}/reset|]]*/'resetUrl',
|
reset: /*[[|/api/record/expense/${reqVO.searchMonth}/${reqVO.groupNo}/reset|]]*/'resetUrl',
|
||||||
},
|
},
|
||||||
month: [[${reqVO.searchMonth}]],
|
month: /*[[${reqVO.searchMonth}]]*/'month',
|
||||||
groupNo: [[${reqVO.groupNo}]],
|
groupNo: /*[[${reqVO.groupNo}]]*/'groupNo',
|
||||||
submitted: false,
|
submitted: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -209,6 +209,17 @@
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
_bindModelUI() {
|
_bindModelUI() {
|
||||||
|
etUI.initUI();
|
||||||
|
|
||||||
|
const $select2 = document.querySelector('#unitCode');
|
||||||
|
const selectboxInstance2 = new etUI.components.SelectBox();
|
||||||
|
selectboxInstance2.core.init($select2, {
|
||||||
|
selectItemCallback({selectValue, dataValue}){
|
||||||
|
console.log('selectItemCallback', selectValue, dataValue)
|
||||||
|
$('input[name="unitCode"]').val(dataValue)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
let $formWrap = $(bind.form.selector).find('form');
|
let $formWrap = $(bind.form.selector).find('form');
|
||||||
$formWrap.on('keyup', 'input[name="price"]', function() {
|
$formWrap.on('keyup', 'input[name="price"]', function() {
|
||||||
// TODO : UI disabled
|
// TODO : UI disabled
|
||||||
@@ -239,47 +250,9 @@
|
|||||||
function(rstHtml, status) {
|
function(rstHtml, status) {
|
||||||
$('.modal01').find('.modal-content').html(rstHtml);
|
$('.modal01').find('.modal-content').html(rstHtml);
|
||||||
|
|
||||||
// TODO
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#categoryCode'));
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#unitCode'));
|
|
||||||
|
|
||||||
/*
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#categoryCode'), {
|
|
||||||
onChange: function() {
|
|
||||||
console.log('sssssssssss')
|
|
||||||
},
|
|
||||||
selectItemCallback: function() {
|
|
||||||
// TODO : console.log ?
|
|
||||||
console.log(1111)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#unitCode'), {
|
|
||||||
onChange: function() {
|
|
||||||
console.log('sssssssssss')
|
|
||||||
},
|
|
||||||
selectItemCallback: function() {
|
|
||||||
console.log(3333)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*document.querySelector('#selectUnit').addEventListener('select:onChange', (e) => {
|
|
||||||
console.log(e.detail);
|
|
||||||
console.log(e.detail.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
const selectbox2 = document.querySelector('.component-select');
|
|
||||||
selectbox2.addEventListener('select:onChange', (e) => {
|
|
||||||
console.log(e.detail);
|
|
||||||
console.log(e.detail.value);
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
//document.queerySelector('#unitSelect')
|
|
||||||
|
|
||||||
const modal01 = document.querySelector(".modal01").ui;
|
const modal01 = document.querySelector(".modal01").ui;
|
||||||
modal01.open();
|
modal01.open();
|
||||||
|
|
||||||
formControl._bindModelUI();
|
formControl._bindModelUI();
|
||||||
},
|
},
|
||||||
function(code, rstData) {
|
function(code, rstData) {
|
||||||
@@ -290,12 +263,6 @@
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
createVaild() {
|
createVaild() {
|
||||||
const f = document.reqModalForm;
|
|
||||||
|
|
||||||
// TODO : setter
|
|
||||||
f.categoryCode.value = document.querySelector('#categoryCode').value !== undefined ? document.querySelector('#categoryCode').value : '';
|
|
||||||
f.unitCode.value = document.querySelector('#unitCode').value !== undefined ? document.querySelector('#unitCode').value : '';
|
|
||||||
|
|
||||||
formControl.create();
|
formControl.create();
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
|
|||||||
@@ -84,42 +84,14 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<section class="form-group">
|
<section class="form-group">
|
||||||
<div class="select-group">
|
<div class="component-input">
|
||||||
<div class="select-label">
|
<div class="input-label">
|
||||||
<p class="label-txt">
|
<label for="categorySelf" class="label-txt">
|
||||||
수입의 종류
|
수입의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
</label>
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="categoryCode" class="component-select bottom-sheet" data-props-default="수입 종류를 선택해 주세요" data-props-type="bottomSheet">
|
<div class="input-field">
|
||||||
<input type="hidden1" name="categoryCode" th:value="${detail.categoryCode}" data-type="select">
|
<input type="text" id="categorySelf" name="categorySelf" th:value="${detail.categorySelf}" maxlength="30" placeholder="수입의 종류를 입력해 주세요">
|
||||||
<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 : ${recordIncome}"
|
|
||||||
th:data-value="${uiCode.id}"
|
|
||||||
th:text="${uiCode.codeText}"></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="component-input input-invalid" data-option="직접 입력">
|
|
||||||
<div class="input-field">
|
|
||||||
<input type="text" id="categorySelf" name="categorySelf" th:value="${detail.categorySelf}" maxlength="30" placeholder="수입의 종류를 입력해 주세요">
|
|
||||||
</div>
|
|
||||||
<ul class="input-info">
|
|
||||||
<li>수입 종류를 입력해 주세요.</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<div class="list-item"
|
<div class="list-item"
|
||||||
th:each="item, itemStatus : ${incomeList}">
|
th:each="item, itemStatus : ${incomeList}">
|
||||||
<div class="item-tit-group">
|
<div class="item-tit-group">
|
||||||
<p class="item-name">[[${item.categoryLabel}]] [[${item.categorySelf}]]</p>
|
<p class="item-name">[[${item.categorySelf}]]</p>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="delete" th:onclick="formControl.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
<button type="button" class="delete" th:onclick="formControl.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
||||||
<button type="button" class="edit" th:onclick="formControl.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
<button type="button" class="edit" th:onclick="formControl.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
||||||
@@ -153,8 +153,8 @@
|
|||||||
remove: /*[[|/api/record/income/${reqVO.searchMonth}/${reqVO.groupNo}/remove|]]*/'removeUrl',
|
remove: /*[[|/api/record/income/${reqVO.searchMonth}/${reqVO.groupNo}/remove|]]*/'removeUrl',
|
||||||
reset: /*[[|/api/record/income/${reqVO.searchMonth}/${reqVO.groupNo}/reset|]]*/'resetUrl',
|
reset: /*[[|/api/record/income/${reqVO.searchMonth}/${reqVO.groupNo}/reset|]]*/'resetUrl',
|
||||||
},
|
},
|
||||||
month: [[${reqVO.searchMonth}]],
|
month: /*[[${reqVO.searchMonth}]]*/'month',
|
||||||
groupNo: [[${reqVO.groupNo}]],
|
groupNo: /*[[${reqVO.groupNo}]]*/'groupNo',
|
||||||
submitted: false,
|
submitted: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -209,7 +209,27 @@
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
_bindModelUI() {
|
_bindModelUI() {
|
||||||
let $formWrap = $(bind.form.selector).find('form');
|
etUI.initUI();
|
||||||
|
|
||||||
|
const $select1 = document.querySelector('#cropCode');
|
||||||
|
const selectboxInstance1 = new etUI.components.SelectBox();
|
||||||
|
selectboxInstance1.core.init($select1, {
|
||||||
|
selectItemCallback({selectValue, dataValue}){
|
||||||
|
console.log('selectItemCallback', selectValue, dataValue)
|
||||||
|
$('input[name="cropCode"]').val(dataValue)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const $select2 = document.querySelector('#unitCode');
|
||||||
|
const selectboxInstance2 = new etUI.components.SelectBox();
|
||||||
|
selectboxInstance2.core.init($select2, {
|
||||||
|
selectItemCallback({selectValue, dataValue}){
|
||||||
|
console.log('selectItemCallback', selectValue, dataValue)
|
||||||
|
$('input[name="unitCode"]').val(dataValue)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const $formWrap = $(bind.form.selector).find('form');
|
||||||
$formWrap.on('keyup', 'input[name="price"]', function() {
|
$formWrap.on('keyup', 'input[name="price"]', function() {
|
||||||
// TODO : UI disabled
|
// TODO : UI disabled
|
||||||
if ($(this).val() === '') {
|
if ($(this).val() === '') {
|
||||||
@@ -239,48 +259,9 @@
|
|||||||
function(rstHtml, status) {
|
function(rstHtml, status) {
|
||||||
$('.modal01').find('.modal-content').html(rstHtml);
|
$('.modal01').find('.modal-content').html(rstHtml);
|
||||||
|
|
||||||
// TODO
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#categoryCode'));
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#cropCode'));
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#unitCode'));
|
|
||||||
|
|
||||||
/*
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#categoryCode'), {
|
|
||||||
onChange: function() {
|
|
||||||
console.log('sssssssssss')
|
|
||||||
},
|
|
||||||
selectItemCallback: function() {
|
|
||||||
// TODO : console.log ?
|
|
||||||
console.log(1111)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
etUI.components.SelectBox().core.init(document.querySelector('#unitCode'), {
|
|
||||||
onChange: function() {
|
|
||||||
console.log('sssssssssss')
|
|
||||||
},
|
|
||||||
selectItemCallback: function() {
|
|
||||||
console.log(3333)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*document.querySelector('#selectUnit').addEventListener('select:onChange', (e) => {
|
|
||||||
console.log(e.detail);
|
|
||||||
console.log(e.detail.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
const selectbox2 = document.querySelector('.component-select');
|
|
||||||
selectbox2.addEventListener('select:onChange', (e) => {
|
|
||||||
console.log(e.detail);
|
|
||||||
console.log(e.detail.value);
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
//document.queerySelector('#unitSelect')
|
|
||||||
|
|
||||||
const modal01 = document.querySelector(".modal01").ui;
|
const modal01 = document.querySelector(".modal01").ui;
|
||||||
modal01.open();
|
modal01.open();
|
||||||
|
|
||||||
formControl._bindModelUI();
|
formControl._bindModelUI();
|
||||||
},
|
},
|
||||||
function(code, rstData) {
|
function(code, rstData) {
|
||||||
@@ -291,13 +272,6 @@
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
createVaild() {
|
createVaild() {
|
||||||
const f = document.reqModalForm;
|
|
||||||
|
|
||||||
// TODO : setter
|
|
||||||
f.categoryCode.value = document.querySelector('#categoryCode').value !== undefined ? document.querySelector('#categoryCode').value : '';
|
|
||||||
f.cropCode.value = document.querySelector('#cropCode').value !== undefined ? document.querySelector('#cropCode').value : '';
|
|
||||||
f.unitCode.value = document.querySelector('#unitCode').value !== undefined ? document.querySelector('#unitCode').value : '';
|
|
||||||
|
|
||||||
formControl.create();
|
formControl.create();
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
|
|||||||
Reference in New Issue
Block a user