cs관리 삭제 기능 추가 및 필요없는 검색필터 주석처리

This commit is contained in:
2026-01-09 16:28:17 +09:00
parent 1265bcde17
commit abbb8263ef
4 changed files with 147 additions and 10 deletions

View File

@@ -59,6 +59,11 @@ $(document).ready(function(){
fn_registActionPopUp();
});
// 삭제
$("#btnDelete").click(function(){
fn_delete();
});
fn_search();
});
@@ -239,6 +244,67 @@ function fn_FileRegist(objId, docType, docTypeName){
fn_centerPopup(popup_width, popup_height, url);
}
// 삭제
function fn_delete(){
var selected = _tabulGrid.getSelectedData();
if(selected.length == 0){
Swal.fire("삭제할 데이터를 선택해주세요.");
return;
}
// 선택된 OBJID 목록 추출
var objIds = [];
for(var i = 0; i < selected.length; i++){
objIds.push(selected[i].OBJID);
}
Swal.fire({
title: '삭제 확인',
text: selected.length + '건의 데이터를 삭제하시겠습니까?',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#d33',
cancelButtonColor: '#3085d6',
confirmButtonText: '삭제',
cancelButtonText: '취소'
}).then((result) => {
if(result.isConfirmed){
$.ajax({
url: "/quality/deleteCustomerCs.do",
type: "POST",
data: {
objIds: JSON.stringify(objIds)
},
dataType: "json",
success: function(response){
if(response.result){
Swal.fire({
icon: 'success',
title: '삭제 완료',
text: response.msg
}).then(function(){
fn_search();
});
} else {
Swal.fire({
icon: 'error',
title: '삭제 실패',
text: response.msg
});
}
},
error: function(xhr, status, error){
Swal.fire({
icon: 'error',
title: '오류',
text: '삭제 중 오류가 발생했습니다.'
});
}
});
}
});
}
</script>
<body>
@@ -257,6 +323,7 @@ function fn_FileRegist(objId, docType, docTypeName){
<div class="btnArea">
<input type="button" class="plm_btns" value="고객 이슈 등록" id="btnRegistDefect">
<input type="button" class="plm_btns" value="조치결과 등록" id="btnRegistAction">
<input type="button" class="plm_btns btn_red" value="삭제" id="btnDelete">
<input type="button" class="plm_btns" value="조회" id="btnSearch">
</div>
</div>
@@ -284,25 +351,22 @@ function fn_FileRegist(objId, docType, docTypeName){
</select>
</td> -->
<td><label>품번</label></td>
<td><input type="text" name="search_product_no" id="search_product_no" style="width:150px;" autocomplete="off"></td>
<td><input type="text" name="search_product_no" id="search_product_no" style="width:210px;" autocomplete="off"></td>
<td><label>품명</label></td>
<td><input type="text" name="search_product_name" id="search_product_name" style="width:150px;" autocomplete="off"></td>
<td><label>부품품번</label></td>
<!-- <td><label>부품품번</label></td>
<td><input type="text" name="search_part_no" id="search_part_no" style="width:215px;" autocomplete="off"></td>
<td><label>부품품명</label></td>
<td><input type="text" name="search_part_name" id="search_part_name" style="" autocomplete="off"></td>
</tr>
<tr>
<td><input type="text" name="search_part_name" id="search_part_name" style="" autocomplete="off"></td> -->
<td><label>S/N</label></td>
<td><input type="text" name="search_serial_no" id="search_serial_no" style="width:215px;" autocomplete="off"></td>
<td><label>제조사</label></td>
<td><input type="text" name="search_manufacturer" id="search_manufacturer" style="width:230px;" autocomplete="off"></td>
</tr>
<tr>
<td><label>귀책판정</label></td>
<td>
<select name="search_blame_decision" id="search_blame_decision" class="select2" autocomplete="off" style="">
<select name="search_blame_decision" id="search_blame_decision" class="select2" autocomplete="off" style="width:212px;">
<option value="">전체</option>
<option value="R">RPS</option>
<option value="C">고객사</option>
@@ -312,7 +376,7 @@ function fn_FileRegist(objId, docType, docTypeName){
</td>
<td><label>상태</label></td>
<td>
<select name="search_status" id="search_status" class="select2" autocomplete="off" style="">
<select name="search_status" id="search_status" class="select2" autocomplete="off" style="width:230px;">
<option value="">전체</option>
<option value="Open">Open</option>
<option value="Closed">Closed</option>