[BO] 일계부 등록 현황의 삭제 처리
This commit is contained in:
@@ -502,7 +502,7 @@
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<label class="checkbox-inner">
|
||||
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
|
||||
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_income" value="${item.id}">
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
@@ -510,7 +510,7 @@
|
||||
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
|
||||
<td class="underline">${ifNullHyphen(item.incomeKind)}</td><!-- 수입의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
@@ -817,7 +817,39 @@
|
||||
const currentListId = $(el).data('listId');
|
||||
console.log('removeDaily', currentStep, currentListId);
|
||||
|
||||
alert('TODO : 삭제')
|
||||
if ($('#'+currentListId).find('input[type="checkbox"]:checked').length === 0) {
|
||||
alert('삭제내용은 최소 1건은 선택해야 합니다.');
|
||||
return;
|
||||
} else if ($('#'+currentListId).find('input[type="checkbox"]').length === $('#'+currentListId).find('input[type="checkbox"]:checked').length) {
|
||||
alert('등록내용은 최소 1건이 남아 있어야 합니다.');
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedValues = [];
|
||||
$('#'+currentListId).find('input[type="checkbox"]:checked').each((idx, item) => {
|
||||
selectedValues.push($(item).val());
|
||||
});
|
||||
|
||||
const obj = {};
|
||||
obj.selectedIds = selectedValues;
|
||||
obj.currentStep = currentStep;
|
||||
console.log(obj)
|
||||
|
||||
etUI.dialog.confirm({
|
||||
title: '삭제 안내',
|
||||
message: '선택하신 항목을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
||||
positiveCallback: function () {
|
||||
ajaxUtil._ajaxAsyncNoWaiting(
|
||||
'/api/household/daily/remove',
|
||||
obj,
|
||||
function () {
|
||||
alert('데이터 삭제가 완료되었습니다.');
|
||||
|
||||
getDailyRecordsView(f.dailyId.value, f.groupNo.value, f.dayGroupText.value);
|
||||
},
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user