단속 등록&열람: 위치정보, 행위정보 selectbox 제거

dev
박성영 3 months ago
parent e116c9a9e8
commit 1c338a0323

@ -81,11 +81,11 @@
</td>
</tr>
<tr>
<th class="th"><span class="required">*</span> 지적(PTOUT)</th>
<th class="th"><span class="required">*</span> 지적</th>
<td>
<input type="text" id="ptout" name="ptout" class="input ptoutMask" style="width: 180px;" maxlength="25" placeholder="예) 12345.67" validation-check="required number" value="${data.ptout}"/>
</td>
<th class="th"><span class="required">*</span> 공시지가(OALP)</th>
<th class="th"><span class="required">*</span> 공시지가</th>
<td>
<input type="text" id="oalp" name="oalp" class="input oalpMask" style="width: 180px;" maxlength="13" placeholder="예) 1000000" validation-check="required integer" value="${data.oalp}"/>
</td>

@ -37,10 +37,9 @@
gridConfig.setOptGridId('grid3'); // 그리드를 출력할 Element ID
gridConfig.setOptGridHeight(200); // 그리드 높이(단위: px)
gridConfig.setOptRowHeight(30); // 그리드 행 높이(단위: px)
gridConfig.setOptRowHeaderType('rowNum'); // 행 첫번째 셀 타입(rowNum: 순번)
gridConfig.setOptUseClientSort(true); // 클라이언트 사이드 정렬
gridConfig.setOptRowHeaderType('checkbox');
gridConfig.setOptRowHeaderType('');
gridConfig.setOptColumns(this.getGridColumns());
return gridConfig;
@ -369,8 +368,13 @@
return;
}
var checkedRows = this.grid.instance.getCheckedRows();
if (checkedRows.length === 0) {
// checkbox 에서 focus 로 수정
//var checkedRows = this.grid.instance.getCheckedRows();
var focusedCell = this.grid.instance.getFocusedCell();
var rowKey = focusedCell.rowKey;
var rowData = this.grid.instance.getRow(rowKey);
var checkedRows = [rowData];
if (!rowData || checkedRows.length === 0) {
alert('삭제할 항목을 선택해 주세요.');
return;
}
@ -396,6 +400,8 @@
alert('불법행위 정보가 성공적으로 삭제되었습니다.');
// 중요로직: 그리드 리로드 처리
self.search();
// 삭제 시 삭제된 actInfoId 값을 찾아서 포커스 해주려고해서 그리드 깨짐
CrdnDetailView.actInfoId = null;
} else {
alert(response.message || '삭제 중 오류가 발생했습니다.');
}

@ -37,7 +37,7 @@
gridConfig.setOptGridId('pstnGrid'); // 그리드를 출력할 Element ID
gridConfig.setOptGridHeight(200); // 그리드 높이(단위: px)
gridConfig.setOptRowHeight(30); // 그리드 행 높이(단위: px)
gridConfig.setOptRowHeaderType('checkbox'); // 행 첫번째 셀 타입(checkbox: 체크박스)
gridConfig.setOptRowHeaderType(''); // 행 첫번째 셀 타입(checkbox: 체크박스)
gridConfig.setOptUseClientSort(true); // 클라이언트 사이드 정렬
gridConfig.setOptColumns(this.getGridColumns());
@ -58,8 +58,8 @@
{ header: '우편번호', name: 'zip', align: 'center', width: 90 },
{ header: '지번 전체주소', name: 'lotnoWholAddr', align: 'left', width: 300 },
{ header: '지목', name: 'ldcgCdNm', align: 'center', width: 90 },
{ header: '지적(PTOUT)', name: 'ptout', align: 'right', width: 180, formatter: function(e){ return e.value != null ? Number(e.value).toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 2 }) : ''; } },
{ header: '공시지가(OALP)', name: 'oalp', align: 'right', width: 180, formatter: function(e){ return e.value != null ? Number(e.value).toLocaleString() : ''; } },
{ header: '지적', name: 'ptout', align: 'right', width: 180, formatter: function(e){ return e.value != null ? Number(e.value).toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 2 }) : ''; } },
{ header: '공시지가', name: 'oalp', align: 'right', width: 180, formatter: function(e){ return e.value != null ? Number(e.value).toLocaleString() : ''; } },
{ header: '도로명 전체주소', name: 'roadNmWholAddr', align: 'left', width: 220, hidden: true },
{ header: '지번 주소', name: 'lotnoAddr', align: 'left', width: 180, hidden: true },
{ header: '도로명 주소', name: 'roadNmAddr', align: 'left', width: 200, hidden: true },
@ -197,7 +197,6 @@
this.instance.on('click', function(ev) {
if (ev.rowKey !== undefined && ev.rowKey !== null) {
var rowData = self.instance.getRow(ev.rowKey);
//console.log('위치 정보 행 클릭:', rowData);
CrdnDetailView.pstnInfoId = rowData.pstnInfoId;
// 아래는 위치정보가 여러개 일 경우 대비, 현재는 주석
//window.CrdnDetailView.refreshOtherGridsAfterLocation();
@ -208,7 +207,6 @@
this.instance.on('dblclick', function(ev) {
var rowKey = ev.rowKey;
var rowData = self.instance.getRow(rowKey);
//console.log('위치 정보 행 더블클릭:', rowData);
if (rowData) {
CrdnDetailView.pstnInfoId = rowData.pstnInfoId;
self.openEditPopup(rowData);
@ -284,9 +282,14 @@
alert('위치정보 그리드가 초기화되지 않았습니다.');
return;
}
var checkedRows = this.grid.instance.getCheckedRows();
if (checkedRows.length === 0) {
// checkbox 에서 focus 로 수정
//var checkedRows = this.grid.instance.getCheckedRows();
var focusedCell = this.grid.instance.getFocusedCell();
var rowKey = focusedCell.rowKey;
var rowData = this.grid.instance.getRow(rowKey);
var checkedRows = [rowData];
if (!rowData || checkedRows.length === 0) {
alert('삭제할 위치정보를 선택해주세요.');
return;
}
@ -327,6 +330,8 @@
alert('선택된 위치정보가 삭제되었습니다.');
// 중요로직: 그리드 리로드 처리
self.search();
// 삭제 시 삭제된 actInfoId 값을 찾아서 포커스 해주려고해서 그리드 깨짐
CrdnDetailView.pstnInfoId = null;
} else {
alert(response.message || '위치정보 삭제에 실패했습니다.');
}

Loading…
Cancel
Save