[BO] 임가현황 - 임가방문정보 작업 중

This commit is contained in:
kangsunlee
2025-06-24 20:27:38 +09:00
parent 02d94fdbd4
commit ce142adec9
31 changed files with 505 additions and 24 deletions

View File

@@ -10,7 +10,7 @@
<h3></h3>
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
<button type="button" class="btn small btn-secondary">
<button type="button" class="btn small btn-secondary" onclick="goDeleteVisitInfo();">
<span class=" btn-txt">삭제</span>
</button>
<button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();">
@@ -68,7 +68,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="removeIds_${item.id}" name="removeIds" value="${item.id}">
</label>
</div>
</td>
@@ -93,6 +93,37 @@
'json'
);
}
// 임가방문정보 삭제
const goDeleteVisitInfo = () => {
const infoIds = $('input[name=removeIds]:checked');
if(infoIds.length <= 0) {
alert("임가방문정보를 선택해주세요.");
return
}
if(confirm("선택하신 내용을 삭제하시겠습니까? 삭제한 항목은 복구할 수 없습니다.")) {
const f = document.reqForm;
let dataOj = $(f).serializeObject();
console.log("dataOj", dataOj);
ajaxUtil._ajaxMethod(
'/api/visitInfo/remove',
JSON.stringify(dataOj),
(response) => { // 성공
alert("방문정보가 삭제되었습니다.");
getVisitInfo(0);
},
function (code, rstData) {
if(code == 422) alert(rstData.responseText);
},
'delete',
'json',
{ handle422Type: 'alert' }
);
}
}
</script>
</div>
</html>