This commit is contained in:
1331
app/Views/pages/article/dept/detail.php
Normal file
1331
app/Views/pages/article/dept/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
1048
app/Views/pages/article/dept/lists.php
Normal file
1048
app/Views/pages/article/dept/lists.php
Normal file
File diff suppressed because it is too large
Load Diff
237
app/Views/pages/article/dept/printMap.php
Normal file
237
app/Views/pages/article/dept/printMap.php
Normal file
@@ -0,0 +1,237 @@
|
||||
<?php
|
||||
$cnt = count($listDept);
|
||||
$lati = 0;
|
||||
$long = 0;
|
||||
foreach ($listDept as $dept) {
|
||||
$lati += $dept['rcpt_y'];
|
||||
$long += $dept['rcpt_x'];
|
||||
}
|
||||
$lati = $lati / $cnt;
|
||||
$long = $long / $cnt;
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Language" content="ko">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>지도보기</title>
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
|
||||
<meta name="description" content="ArchitectUI HTML Bootstrap 5 Dashboard Template">
|
||||
|
||||
<script defer src="/architectui/assets/scripts/vendors.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/main.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/demo.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/ladda.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/blockui.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/circle_progress.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/count_up.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/toastr.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/sweet_alerts.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/scrollbar.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/sticky_elements.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/carousel_slider.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/fullcalendar.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/treeview.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/maps.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/rating.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/image_crop.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/guided_tours.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/tables.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/form_validation.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/form_wizard.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/clipboard.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/datepicker.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/input_mask.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/input_select.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/range_slider.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/textarea_autosize.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/toggle_switch.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/chart_js.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/apex_charts.98288b227c064e6a107f.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/sparklines.98288b227c064e6a107f.js"></script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
<link href="/architectui/assets/styles/vendors.98288b227c064e6a107f.css" rel="stylesheet">
|
||||
<link href="/architectui/assets/styles/main.98288b227c064e6a107f.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
.marker-label {
|
||||
position: absolute;
|
||||
transform: translate(-50%, -100%);
|
||||
background: #fff;
|
||||
border: 1px solid #333;
|
||||
border-radius: 6px;
|
||||
padding: 3px 6px;
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
|
||||
pointer-events: none;
|
||||
/* 지도 드래그 방해 안 하게 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="my-loader-template d-none">
|
||||
<div class="loader bg-transparent no-shadow p-0">
|
||||
<div class="ball-grid-pulse">
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
<div class="bg-white"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="app-container app-theme-white body-tabs-shadow">
|
||||
<div class="app-container">
|
||||
<div class="app-main__outer">
|
||||
<div class="app-main__inner px-4 py-3">
|
||||
<div class="app-page-title">
|
||||
<div class="page-title-wrapper d-flex align-items-center">
|
||||
<div class="page-title-heading">
|
||||
<div class="page-title-icon">
|
||||
<i class="pe-7s-map icon-gradient bg-premium-dark"></i>
|
||||
</div>
|
||||
<div>
|
||||
관할 배정 지도
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ms-auto">
|
||||
<button type="button" class="btn btn-primary" onclick="fn_print();">
|
||||
인쇄하기
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="main-card mb-3 card" id="mapArea">
|
||||
<div class="card-body" style="height: 400px;">
|
||||
<div id="map_view" style="width:100%;height:700px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpClientId=kvyjyj00fp"></script> -->
|
||||
<!-- <script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script> -->
|
||||
<!-- <script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpClientId=dtounkwjc5"></script> -->
|
||||
<script type="text/javascript" src="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=dtounkwjc5"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const tpl = document.querySelector('.my-loader-template');
|
||||
var map;
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
map = new naver.maps.Map('map_view', {
|
||||
center: new naver.maps.LatLng(<?= $lati ?>, <?= $long ?>), //지도의 초기 중심 좌표
|
||||
useStyleMap: true,
|
||||
zoom: 15, //지도의 초기 줌 레벨
|
||||
minZoom: 1, //지도의 최소 줌 레벨
|
||||
mapTypeControl: true, //지도 유형 컨트롤의 표시 여부
|
||||
mapTypeControlOptions: { //지도 유형 컨트롤의 옵션
|
||||
style: naver.maps.MapTypeControlStyle.BUTTON,
|
||||
position: naver.maps.Position.TOP_LEFT
|
||||
},
|
||||
zoomControl: true, //줌 컨트롤의 표시 여부
|
||||
zoomControlOptions: { //줌 컨트롤의 옵션
|
||||
position: naver.maps.Position.TOP_RIGHT
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
<?php reset($listDept);
|
||||
foreach ($listDept as $dept): ?>
|
||||
const pos_<?= $dept['dept_sq'] ?> = new naver.maps.LatLng(<?= $dept['rcpt_y'] ?>, <?= $dept['rcpt_x'] ?>);
|
||||
|
||||
// 기본 마커
|
||||
new naver.maps.Marker({
|
||||
position: pos_<?= $dept['dept_sq'] ?>,
|
||||
map: map,
|
||||
// icon: {
|
||||
// url: HOME_PATH + '/plugin/img/pin.png',
|
||||
// size: new naver.maps.Size(50, 52),
|
||||
// origin: new naver.maps.Point(0, 0),
|
||||
// anchor: new naver.maps.Point(25, 26)
|
||||
// }
|
||||
});
|
||||
|
||||
// 라벨 오버레이(텍스트만)
|
||||
new LabelOverlay({
|
||||
position: pos_<?= $dept['dept_sq'] ?>,
|
||||
text: '<?= $dept['rcpt_atclno'] ?> <?= $dept['rsrv_date'] ?> <?= $dept['rsrv_tm_ap'] ?> <?= $dept['rsrv_tm_hour'] ?>시',
|
||||
map: map
|
||||
});
|
||||
|
||||
<?php endforeach; ?>
|
||||
});
|
||||
|
||||
|
||||
function LabelOverlay(options) {
|
||||
this._position = options.position;
|
||||
this._text = options.text;
|
||||
this._map = options.map;
|
||||
this.setMap(this._map);
|
||||
}
|
||||
LabelOverlay.prototype = new naver.maps.OverlayView();
|
||||
|
||||
LabelOverlay.prototype.onAdd = function () {
|
||||
const el = document.createElement('div');
|
||||
el.className = 'marker-label';
|
||||
el.textContent = this._text;
|
||||
this._el = el;
|
||||
|
||||
const overlayLayer = this.getPanes().overlayLayer;
|
||||
overlayLayer.appendChild(el);
|
||||
};
|
||||
|
||||
LabelOverlay.prototype.draw = function () {
|
||||
const projection = this.getProjection();
|
||||
const point = projection.fromCoordToOffset(this._position);
|
||||
|
||||
// 라벨을 마커 위로 올리기
|
||||
this._el.style.left = point.x + 'px';
|
||||
this._el.style.top = (point.y - 30) + 'px';
|
||||
};
|
||||
|
||||
LabelOverlay.prototype.onRemove = function () {
|
||||
if (this._el && this._el.parentNode) this._el.parentNode.removeChild(this._el);
|
||||
this._el = null;
|
||||
};
|
||||
|
||||
|
||||
// 인쇄하기
|
||||
function fn_print() {
|
||||
var initBody;
|
||||
window.onbeforeprint = function () {
|
||||
initBody = document.body.innerHTML;
|
||||
document.body.innerHTML = document.getElementById('mapArea').innerHTML;
|
||||
};
|
||||
window.onafterprint = function () {
|
||||
document.body.innerHTML = initBody;
|
||||
};
|
||||
window.print();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -16,7 +16,7 @@ $long = $long / $cnt;
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Language" content="ko">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>컨펌스 로그인</title>
|
||||
<title>지도보기</title>
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
|
||||
<meta name="description" content="ArchitectUI HTML Bootstrap 5 Dashboard Template">
|
||||
|
||||
@@ -401,6 +401,10 @@ $usr_nm = session('usr_nm');
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
const date = new Date();
|
||||
var table;
|
||||
|
||||
@@ -636,7 +640,7 @@ $usr_nm = session('usr_nm');
|
||||
{ data: null, render: fn_prd_render },
|
||||
{ data: 'rcpt_product_info1' },
|
||||
<?php if ($usr_level != "45"): ?>
|
||||
{ data: 'dept_nm' },
|
||||
{ data: 'dept_nm' },
|
||||
{ data: 'usr_nm' },
|
||||
<?php endif; ?>
|
||||
{ data: 'parcel_out_yn' },
|
||||
@@ -665,7 +669,7 @@ $usr_nm = session('usr_nm');
|
||||
if (!rowData) return;
|
||||
|
||||
const rcpt_atclno = rowData.rcpt_atclno;
|
||||
location.href = "<?= site_url('article/receipt/detail') ?>/" + rcpt_atclno;
|
||||
location.href = "<?= site_url('article/dept/detail') ?>/" + rcpt_atclno;
|
||||
});
|
||||
|
||||
|
||||
|
||||
1331
app/Views/pages/article/record/detail.php
Normal file
1331
app/Views/pages/article/record/detail.php
Normal file
File diff suppressed because it is too large
Load Diff
613
app/Views/pages/article/record/lists.php
Normal file
613
app/Views/pages/article/record/lists.php
Normal file
@@ -0,0 +1,613 @@
|
||||
<?php
|
||||
$usr_level = session('usr_level');
|
||||
$usr_sq = session('usr_sq');
|
||||
$usr_nm = session('usr_nm');
|
||||
|
||||
?>
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#resultList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header-tab {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
|
||||
.table-scroll {
|
||||
max-height: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.swal2-cancel {
|
||||
background-color: #ff0000 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
#resultList.dataTable {
|
||||
width: max-content !important;
|
||||
}
|
||||
|
||||
table.dataTable td,
|
||||
table.dataTable th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 테이블이 내용만큼 커지고, wrapper가 스크롤 담당 */
|
||||
.table-responsive {
|
||||
overflow-x: auto !important;
|
||||
}
|
||||
|
||||
/* 테이블 폭: 내용 기준으로 커지되, 최소는 100% */
|
||||
.table-responsive #resultList {
|
||||
width: max-content !important;
|
||||
min-width: 100% !important;
|
||||
table-layout: auto !important;
|
||||
}
|
||||
|
||||
/* 줄바꿈 금지 */
|
||||
#resultList th,
|
||||
#resultList td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* PC에서 가로 스크롤이 잘리는 대표 구간들 강제 해제 */
|
||||
.main-card,
|
||||
.card,
|
||||
.card-body {
|
||||
overflow-x: visible !important;
|
||||
}
|
||||
|
||||
/* 만약 레이아웃 wrapper가 숨기고 있으면 이것도 */
|
||||
.app-main__outer,
|
||||
.app-main__inner,
|
||||
.app-main {
|
||||
overflow-x: visible !important;
|
||||
}
|
||||
|
||||
/* flex 환경에서 필수 */
|
||||
.app-main,
|
||||
.app-main__outer,
|
||||
.app-main__inner,
|
||||
.card,
|
||||
.card-body {
|
||||
min-width: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>녹취매물 내역</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form id="frm_srch_info" method="get" onsubmit="return false;">
|
||||
|
||||
<!-- 검색 폼 -->
|
||||
<div class="row g-3">
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매물ID</label>
|
||||
<input type="text" class="form-control" name="rcpt_atclno" id="rcpt_atclno"
|
||||
onkeypress="atcl_no_enter(event)">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">관할조직</label>
|
||||
<div class="d-flex gap-1">
|
||||
<select name="bonbu" id="bonbu" class="form-select form-select-sm">
|
||||
<option value="">-본부-</option>
|
||||
<?php foreach ($bonbu as $d): ?>
|
||||
<option value="<?= $d['dept_sq'] ?>">
|
||||
<?= $d['dept_nm'] ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="team" id="team" class="form-select form-select-sm">
|
||||
<option value="">-팀-</option>
|
||||
</select>
|
||||
<select name="damdang" id="damdang" class="form-select form-select-sm">
|
||||
<option value="">-담당자-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">지역별조회</label>
|
||||
<div class="d-flex gap-1">
|
||||
<select name="srcSido" id="srcSido" class="form-select form-select-sm">
|
||||
<option value="">-시/도-</option>
|
||||
<?php foreach ($sido as $s): ?>
|
||||
<option value="<?= $s['region_cd'] ?>">
|
||||
<?= $s['region_nm'] ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<select name="srcGugun" id="srcGugun" class="form-select form-select-sm">
|
||||
<option value="">-시/군/구-</option>
|
||||
</select>
|
||||
<select name="srcDong" id="srcDong" class="form-select form-select-sm">
|
||||
<option value="">-읍/면/동-</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">접수기간</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="sdate" id="sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="edate" id="edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">촬영완료일자</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="photo_sdate" id="photo_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="photo_edate" id="photo_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">녹취완료일자</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="date" class="form-control" name="record_sdate" id="record_sdate" placeholder="시작일">
|
||||
<span class="input-group-text">~</span>
|
||||
<input type="date" class="form-control" name="record_edate" id="record_edate" placeholder="종료일">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">녹취완료여부</label>
|
||||
<select class="form-select" name="rec_yn">
|
||||
<option value="">선택</option>
|
||||
<option value="Y">완료</option>
|
||||
<option value="N">미완료</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-3">
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">검색유형</label>
|
||||
<select class="form-select" name="srchType">
|
||||
<option value="">선택</option>
|
||||
<option value="1">중개사명</option>
|
||||
<option value="2">거주인명</option>
|
||||
<option value="3">거주인연락처</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검색어 -->
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">검색어</label>
|
||||
<input type="text" class="form-control" name="srchTxt" placeholder="검색어 입력">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 d-grid">
|
||||
<label class="form-label mb-1 invisible">검색</label>
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
<i class="pe-7s-search me-1"></i>검색
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header d-flex align-items-center">
|
||||
<div class="d-flex align-items-center flex-wrap" style="gap: 8px; flex: 1">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button class="btn btn-sm btn-outline-success" id="excel-download">
|
||||
<i class="fa fa-fw" aria-hidden="true" title="file-excel-o"></i>
|
||||
엑셀다운로드
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table id="resultList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>진행상태</th>
|
||||
<th>매물ID</th>
|
||||
<th>접수(등록)일자</th>
|
||||
<th>촬영일자</th>
|
||||
<th>녹취완료일자</th>
|
||||
<th>중개사</th>
|
||||
<th>주소</th>
|
||||
<th>거주인명</th>
|
||||
<th>거주인연락처</th>
|
||||
<th>관할조직</th>
|
||||
<th>방문담당</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css" />
|
||||
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
|
||||
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
|
||||
<script defer src="/architectui/assets/js/datatable.kor.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
const bonbuArr = <?= json_encode($bonbu, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const teamArr = <?= json_encode($team, JSON_UNESCAPED_UNICODE); ?>;
|
||||
const userArr = <?= json_encode($user, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
const date = new Date();
|
||||
var table;
|
||||
|
||||
$(function () {
|
||||
|
||||
// initReceiptDate();
|
||||
|
||||
$("#srcSido, #srcGugun, #srcSido2, #srcGugun2").on("change", function (e) {
|
||||
|
||||
const targetId = this.id;
|
||||
|
||||
const isSecond = this.id.endsWith("2");
|
||||
|
||||
const params = {
|
||||
srcSido: isSecond
|
||||
? $("#srcSido2").val()
|
||||
: $("#frm_srch_info [name=srcSido]").val(),
|
||||
|
||||
srcGugun: isSecond
|
||||
? $("#srcGugun2").val()
|
||||
: $("#frm_srch_info [name=srcGugun]").val(),
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/areas/getAreaList",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
data: params,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
switch (targetId) {
|
||||
case "srcSido":
|
||||
$("#srcGugun").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>시/군/구</option>";
|
||||
|
||||
if ($("#srcSido").val() !== "") {
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcGugun").append(str);
|
||||
|
||||
break;
|
||||
|
||||
case "srcGugun":
|
||||
$("#srcDong").empty()
|
||||
var str = "";
|
||||
str += "<option value=''>읍/면/동</option>";
|
||||
|
||||
if (result.length > 0) {
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
str += "<option value='" + result[i]['region_cd'] + "'>" + result[i].region_nm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#srcDong").append(str);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#bonbu, #team, #bonbu2, #team2").on("change", function (e) {
|
||||
const targetId = this.id;
|
||||
|
||||
|
||||
var str = "";
|
||||
if (targetId === "bonbu" || targetId === "bonbu2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-팀-</option>`;
|
||||
if (teamArr.length > 0) {
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(teamArr[i].pdept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${teamArr[i].dept_sq}">${teamArr[i].dept_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "bonbu") {
|
||||
$("#team").html(str);
|
||||
} else if (targetId === "bonbu2") {
|
||||
$("#team2").html(str);
|
||||
}
|
||||
|
||||
} else if (targetId === "team" || targetId === "team2") {
|
||||
const dept_sq = $("#" + targetId).val();
|
||||
|
||||
str += `<option value="">-담당자-</option>`;
|
||||
if (userArr.length > 0) {
|
||||
for (var i = 0; i < userArr.length; i++) {
|
||||
|
||||
// 이 팀이 현재 본부에 속한 팀인지 체크
|
||||
if (String(userArr[i].dept_sq) === String(dept_sq)) {
|
||||
str += `
|
||||
<option value="${userArr[i].usr_id}">${userArr[i].usr_nm}</option>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targetId === "team") {
|
||||
$("#damdang").html(str);
|
||||
} else if (targetId === "team2") {
|
||||
$("#damdang2").html(str);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 검증방식 onchange
|
||||
$("#vrfcreq_way").on("change", function (e) {
|
||||
const val = e.target.value;
|
||||
|
||||
var str = "";
|
||||
str += `<option value="">-선택-</option>`;
|
||||
if (e.val !== "") {
|
||||
$.getJSON("/common/common/getVrfcCode?type=" + val, function (result) {
|
||||
var total = result.length;
|
||||
for (var i = 0; i < total; i++) {
|
||||
var cateNm = result[i].cd_nm;
|
||||
|
||||
if (total == 1) {
|
||||
str += "<option value=\"" + result[i].cd + "\" selected>" + cateNm + "</option>";
|
||||
} else {
|
||||
str += "<option value=\"" + result[i].cd + "\">" + cateNm + "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
$("#vrfc_type_sub").html(str);
|
||||
});
|
||||
} else {
|
||||
$("#vrfc_type_sub").html(str);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#btnSearch").on("click", function () {
|
||||
table.ajax.reload();
|
||||
});
|
||||
|
||||
|
||||
table = $('#resultList').DataTable({
|
||||
language: lang_kor,
|
||||
serverSide: true,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/article/record/getResultList',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
data: function (d) {
|
||||
|
||||
d.rcpt_atclno = $("#frm_srch_info [name=rcpt_atclno]").val(); // 매물ID
|
||||
|
||||
d.sdate = $("#frm_srch_info [name=sdate]").val(); // 접수기간 시작
|
||||
d.edate = $("#frm_srch_info [name=edate]").val(); // 접수기간 종료
|
||||
|
||||
d.photo_sdate = $("#frm_srch_info [name=photo_sdate]").val(); // 촬영완료일자 시작
|
||||
d.photo_edate = $("#frm_srch_info [name=photo_edate]").val(); // 촬영완료일자 종료
|
||||
|
||||
d.record_sdate = $("#frm_srch_info [name=record_sdate]").val(); // 녹취완료일자 시작
|
||||
d.record_edate = $("#frm_srch_info [name=record_edate]").val(); // 녹취완료일자 종료
|
||||
|
||||
d.rec_yn = $("#frm_srch_info [name=rec_yn]").val(); // 녹취완료여부
|
||||
|
||||
d.bonbu = $("#frm_srch_info [name=bonbu]").val(); // 본부
|
||||
d.team = $("#frm_srch_info [name=team]").val(); // 팀
|
||||
d.user = $("#frm_srch_info [name=user]").val(); // 담당자
|
||||
|
||||
d.sido = $("#frm_srch_info [name=srcSido]").val(); // 시도
|
||||
d.gugun = $("#frm_srch_info [name=srcGugun]").val(); // 시군구
|
||||
d.dong = $("#frm_srch_info [name=srcDong]").val(); // 읍면동
|
||||
|
||||
d.srchType = $("#frm_srch_info [name=srchType]").val(); // 검색유형
|
||||
d.srchTxt = $("#frm_srch_info [name=srchTxt]").val(); // 검색어
|
||||
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
},
|
||||
},
|
||||
"columnDefs": [
|
||||
{ className: 'text-center', targets: '_all' },
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
],
|
||||
columns: [
|
||||
{ data: 'rcpt_stat_nm' },
|
||||
{ data: 'rcpt_atclno' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'photo_save_dt' },
|
||||
{ data: 'record_cplt_dt' },
|
||||
{ data: 'agent_nm' },
|
||||
{ data: null, render: fn_addr_render },
|
||||
{ data: 'rec_nm' },
|
||||
{ data: 'rec_tel' },
|
||||
{ data: 'dept_nm' },
|
||||
{ data: 'usr_nm' },
|
||||
],
|
||||
// 옵션들 예시
|
||||
destroy: true,
|
||||
deferRender: true,
|
||||
scrollX: false,
|
||||
autoWidth: false,
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
});
|
||||
|
||||
// 테이블 row click
|
||||
$('#resultList tbody').on('click', 'tr', function (e) {
|
||||
if ($(e.target).closest('td.dt-no-rowclick').length) return;
|
||||
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const rcpt_key = rowData.rcpt_key;
|
||||
location.href = "<?= site_url('article/record/detail') ?>/" + rcpt_key;
|
||||
});
|
||||
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/article/record/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 접수기간 초기화
|
||||
function initReceiptDate() {
|
||||
|
||||
const before3 = new Date();
|
||||
before3.setDate(date.getDate() - 2);
|
||||
|
||||
const fmt = d => d.toISOString().slice(0, 10);
|
||||
|
||||
$('#sdate').val(fmt(before3));
|
||||
$('#edate').val(fmt(date));
|
||||
|
||||
}
|
||||
|
||||
function atcl_no_enter(event) {
|
||||
if (event.keyCode == 13) {
|
||||
table.ajax.reload()
|
||||
}
|
||||
}
|
||||
|
||||
/** datatable render */
|
||||
function fn_addr_render(data, type, row) {
|
||||
var str = "";
|
||||
|
||||
str = row.addr + " " + row.rcpt_hscp_nm;
|
||||
|
||||
return str;
|
||||
}
|
||||
/** datatable render */
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
// ws['!cols'] = [
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 150 },
|
||||
// { wpx: 120 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// { wpx: 100 },
|
||||
// ];
|
||||
|
||||
const wb = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
|
||||
const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
|
||||
|
||||
const blob = new Blob([wbout], { type: 'application/octet-stream' });
|
||||
|
||||
const link = document.createElement("a");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = "녹취매물_내역" + getDateTimeString() + ".xlsx";
|
||||
link.click();
|
||||
URL.revokeObjectURL(link.href);
|
||||
}
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user