This commit is contained in:
@@ -1,12 +1,56 @@
|
||||
<meta charset="utf-8">
|
||||
<title><?= $title ?? 'Dashboard' ?></title>
|
||||
|
||||
<meta http-equiv="Content-Language" content="ko">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?= $title ?? '컨펌스' ?></title>
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" />
|
||||
<link rel="icon" href="/architectui/assets/favicon.ico">
|
||||
<script defer src="/architectui/assets/scripts/main.js"></script>
|
||||
<!-- <script defer src="/architectui/assets/scripts/main.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/demo.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/toastr.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/scrollbar.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/fullcalendar.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/maps.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/chart_js.js"></script>
|
||||
<script defer src="/architectui/assets/scripts/chart_js.js"></script> -->
|
||||
|
||||
|
||||
<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://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.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>
|
||||
<script src="https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js"></script>
|
||||
|
||||
<link href="/architectui/assets/styles/vendors.98288b227c064e6a107f.css" rel="stylesheet">
|
||||
<link href="/architectui/assets/styles/main.98288b227c064e6a107f.css" rel="stylesheet">
|
||||
15
app/Views/layouts/loading-indicator.php
Normal file
15
app/Views/layouts/loading-indicator.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<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>
|
||||
@@ -1,5 +1,6 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<?= $this->include('layouts/header') ?>
|
||||
</head>
|
||||
@@ -10,16 +11,22 @@
|
||||
<?= $this->include('layouts/topbar') ?>
|
||||
|
||||
<div class="app-main">
|
||||
<?= $this->include('layouts/sidebar') ?>
|
||||
|
||||
<?= view_cell('\App\Cells\MenuCell::index') ?>
|
||||
|
||||
<div class="app-main__outer">
|
||||
<?= $this->include('layouts/loading-indicator') ?>
|
||||
<div class="app-main__inner">
|
||||
<?= $this->renderSection('content') ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?= $this->include('layouts/footer') ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->renderSection('modals') ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
@@ -100,140 +100,89 @@
|
||||
</ul>
|
||||
</li>
|
||||
-->
|
||||
<!--
|
||||
<li class="mm-active">
|
||||
<a href="#">
|
||||
<i class="metismenu-icon pe-7s-car"></i>
|
||||
Components
|
||||
<i class="metismenu-state-icon pe-7s-angle-down caret-left"></i>
|
||||
</a>
|
||||
<ul class="mm-show">
|
||||
<li>
|
||||
<a href="components-tabs.html" class="mm-active">
|
||||
<i class="metismenu-icon">
|
||||
</i>Tabs
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-accordions.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Accordions
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-notifications.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Notifications
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-modals.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Modals
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-progress-bar.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Progress Bar
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-tooltips-popovers.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Tooltips & Popovers
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-carousel.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Carousel
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-calendar.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Calendar
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-pagination.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Pagination
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-scrollable-elements.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Scrollable
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="components-maps.html">
|
||||
<i class="metismenu-icon">
|
||||
</i>Maps
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="tables-regular.html">
|
||||
<i class="metismenu-icon pe-7s-display2"></i>
|
||||
Tables
|
||||
</a>
|
||||
</li>
|
||||
<li class="app-sidebar__heading">Widgets</li>
|
||||
-->
|
||||
<li>
|
||||
<a href="dashboard-boxes.html">
|
||||
<i class="metismenu-icon pe-7s-display2"></i>
|
||||
Dashboard
|
||||
</a>
|
||||
</li>
|
||||
<li class="app-sidebar__heading">컨펌스</li>
|
||||
<li>
|
||||
<a href="forms-controls.html">
|
||||
<i class="metismenu-icon pe-7s-monitor">
|
||||
</i>
|
||||
현장확인매물 관리
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="forms-layouts.html">
|
||||
<i class="metismenu-icon pe-7s-monitor">
|
||||
</i>일반확인매물 관리
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="forms-validation.html">
|
||||
<i class="metismenu-icon pe-7s-server">
|
||||
</i>아파트단지DB구축
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="forms-validation.html">
|
||||
<i class="metismenu-icon pe-7s-mail">
|
||||
</i>SMS발송
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="forms-validation.html">
|
||||
<i class="metismenu-icon pe-7s-display2">
|
||||
</i>실적관리
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="forms-validation.html">
|
||||
<i class="metismenu-icon pe-7s-config">
|
||||
</i>시스템관리
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="forms-validation.html">
|
||||
<i class="metismenu-icon pe-7s-graph2">
|
||||
</i>금리비교
|
||||
</a>
|
||||
|
||||
|
||||
|
||||
<li class="app-sidebar__heading">컨펌스
|
||||
<?php
|
||||
$serverIp = $_SERVER['SERVER_ADDR'] ?? '';
|
||||
|
||||
// 개발 서버
|
||||
$devServers = ['192.168.200.8', '192.168.10.231'];
|
||||
|
||||
// 도커 테스트 서버
|
||||
$dockerServers = ['172.18.0.2'];
|
||||
|
||||
// 테스트 서버
|
||||
$testServers = ['192.168.200.9', '192.168.10.237', '175.126.191.182'];
|
||||
|
||||
// 운영 서버 IP 매핑
|
||||
$prodServers = [
|
||||
'172.16.100.2' => "WEB 1",
|
||||
'172.16.100.3' => "WEB 2",
|
||||
'172.16.100.4' => "WEB 3",
|
||||
'172.16.100.5' => "WEB 4",
|
||||
];
|
||||
|
||||
|
||||
if (in_array($serverIp, $devServers, true)) {
|
||||
// 개발
|
||||
echo "<img src='/img/gnb_dev_00.png' alt='' />";
|
||||
|
||||
} elseif (in_array($serverIp, $dockerServers, true)) {
|
||||
// 도커
|
||||
echo "
|
||||
<div style='width:180px; height:43px;text-align:center;
|
||||
font-size:12px;color:#ffffff;font-weight:bold;
|
||||
padding-top:2px;background-color:#0000ff'>
|
||||
DOCKER <br>{$serverIp}<br>{$this->load->db->hostname}
|
||||
</div>
|
||||
";
|
||||
|
||||
} elseif (in_array($serverIp, $testServers, true)) {
|
||||
// 테스트
|
||||
echo "테스트";
|
||||
|
||||
} else {
|
||||
// 운영
|
||||
$serverName = $prodServers[$serverIp] ?? 'UNKNOWN';
|
||||
|
||||
echo "{$serverName}";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</li>
|
||||
|
||||
<?php foreach ($mMenu as $menu): ?>
|
||||
<li>
|
||||
<?php if ($menu["mnu_pid"] == '0') { ?>
|
||||
<a href="#">
|
||||
<i class="metismenu-icon <?= $icons[$menu['mnu_id']] ?>"></i>
|
||||
|
||||
<?= $menu["mnu_nm"] ?>
|
||||
|
||||
<i class="metismenu-state-icon pe-7s-angle-down caret-left"></i>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<ul>
|
||||
<?php foreach ($sMenu as $subMenu): ?>
|
||||
<?php if ($menu["mnu_id"] == $subMenu["mnu_pid"]): ?>
|
||||
<li>
|
||||
<a href="<?= $subMenu["mnu_url"] ?>">
|
||||
<i class="metismenu-icon"></i>
|
||||
<?= $subMenu["mnu_nm"] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div> -->
|
||||
|
||||
<div class="app-header-right">
|
||||
<div class="header-btn-lg pe-0">
|
||||
<div class="widget-content p-0">
|
||||
@@ -78,23 +79,25 @@
|
||||
<h6 tabindex="-1" class="dropdown-header">Header</h6>
|
||||
<button type="button" tabindex="0" class="dropdown-item">Actions</button>
|
||||
<div tabindex="-1" class="dropdown-divider"></div>
|
||||
<button type="button" tabindex="0" class="dropdown-item">Dividers</button>
|
||||
<button type="button" tabindex="0" class="dropdown-item"
|
||||
onclick="location.href='/logout'">로그아웃</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="widget-content-left ms-3 header-user-info">
|
||||
<div class="widget-heading">
|
||||
관리자
|
||||
<?= session('usr_nm'); ?>
|
||||
</div>
|
||||
<div class="widget-subheading">
|
||||
[admin | confrims] 님
|
||||
[ <?= session('usr_id'); ?> | <?= session('dept_nm'); ?> ] 님
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-content-right header-user-info ms-3">
|
||||
<!-- <div class="widget-content-right header-user-info ms-3">
|
||||
<button type="button" class="btn-shadow p-1 btn btn-primary btn-sm show-toastr-example">
|
||||
<i class="fa text-white fa-calendar pe-1 ps-1"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
135
app/Views/pages/board/notice.php
Normal file
135
app/Views/pages/board/notice.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
#noticeList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form class="row g-3 align-items-center" id="frm_srch_info" onsubmit="return false;">
|
||||
|
||||
<!-- 검색타입 -->
|
||||
<div class="col-md-2">
|
||||
<select class="form-control" name="srchType">
|
||||
<option value="">선택</option>
|
||||
<option value="1">제목</option>
|
||||
<option value="2">작성자</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검색어 -->
|
||||
<div class="col-md-2">
|
||||
<input name="srchTxt" type="text" class="form-control" placeholder="검색어 입력">
|
||||
</div>
|
||||
|
||||
<!-- 버튼 -->
|
||||
<div class="col-md-1">
|
||||
<button type="button" class="btn btn-success btn-transition w-100" id="btnSearch">
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header">공지사항</div>
|
||||
<div class="card-body">
|
||||
<table id="noticeList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>글쓴이</th>
|
||||
<th>날짜</th>
|
||||
<th>조회</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button class="mb-2 me-2 btn-transition btn btn-outline-primary"
|
||||
onclick="location.href='/board/notice/write'">글쓰기</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.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">
|
||||
|
||||
$(function () {
|
||||
|
||||
// 혹시 기존 데모가 자동으로 초기화했다면 파괴 후 다시 초기화
|
||||
// if ($.fn.DataTable.isDataTable('#noticeList')) {
|
||||
// $('#noticeList').DataTable().destroy();
|
||||
// }
|
||||
|
||||
let table = $('#noticeList').DataTable({
|
||||
language: lang_kor,
|
||||
processing: true,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: '/board/notice/getNoticeList',
|
||||
type: 'GET',
|
||||
data: function (d) {
|
||||
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": [
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
{ 'className': 'text-center', 'targets': [0, 2, 3, 4] },
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
"data": null,
|
||||
"width": "50px",
|
||||
"render": function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
{ data: 'subject' },
|
||||
{ data: 'insert_nm', "width": "100px" },
|
||||
{ data: 'insert_tm', "width": "150px" },
|
||||
{ data: 'hit', "width": "100px" }
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
serverSide: true,
|
||||
order: [[3, 'desc']]
|
||||
});
|
||||
|
||||
|
||||
$('#noticeList tbody').on('click', 'tr', function () {
|
||||
const rowData = table.row(this).data();
|
||||
if (!rowData) return;
|
||||
|
||||
const id = rowData.bbs_sq;
|
||||
location.href = "<?= site_url('board/notice/detail') ?>/" + id;
|
||||
});
|
||||
|
||||
// [검색] 버튼 눌렀을 때 다시 조회
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
127
app/Views/pages/board/noticeDetail.php
Normal file
127
app/Views/pages/board/noticeDetail.php
Normal file
@@ -0,0 +1,127 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<h1>공지사항</h1>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="width:150px;">제목</th>
|
||||
<td colspan="5"><?= $notice['subject'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>작성자</th>
|
||||
<td><?= $notice['insert_nm'] ?></td>
|
||||
<th style="width:150px;">작성일</th>
|
||||
<td><?= $notice['insert_tm'] ?></td>
|
||||
<th>조회수</th>
|
||||
<td><?= $notice['hit'] ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>내용</th>
|
||||
<td colspan="5" style="min-height: 200px;">
|
||||
<?= $notice['content'] ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (!empty($files)): ?>
|
||||
<tr>
|
||||
<th>첨부파일</th>
|
||||
<td colspan="5" style="min-height: 200px;">
|
||||
<div>
|
||||
<a href="<?= site_url('/board/notice/download/' . $files['file_sq']) ?>">
|
||||
<?= esc($files['orig_name']) ?>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button class="mb-2 me-2 btn-transition btn btn-outline-primary"
|
||||
onclick="location.href='/board/notice/lists'">목록</button>
|
||||
<button class="mb-2 me-2 btn-transition btn btn-outline-primary"
|
||||
onclick="location.href='/board/notice/modify/<?= $notice['bbs_sq'] ?>'">수정</button>
|
||||
<button class="mb-2 me-2 btn-transition btn btn-outline-primary" id="btn_remove">삭제</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
const tpl = document.querySelector('.my-loader-template');
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#btn_remove").on("click", function () {
|
||||
|
||||
swal.fire({
|
||||
text: "삭제 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/board/notice/remove',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: { bbs_sq: <?= $notice['bbs_sq'] ?> },
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
location.replace('/board/notice/lists')
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
134
app/Views/pages/board/noticeModify.php
Normal file
134
app/Views/pages/board/noticeModify.php
Normal file
@@ -0,0 +1,134 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<h1>공지사항</h1>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form class="form-control" id="frm_board_info" enctype="multipart/form-data">
|
||||
<input type="hidden" name="bbs_sq" value="<?= $notice['bbs_sq'] ?>">
|
||||
<div class="position-relative mb-3">
|
||||
<label for="subject" class="form-label">제목</label>
|
||||
<input name="subject" id="subject" type="text" class="form-control"
|
||||
value="<?= $notice['subject'] ?>">
|
||||
</div>
|
||||
<div class="position-relative mb-3">
|
||||
<label for="subject" class="form-label">내용</label>
|
||||
<textarea class="form-control" name="content" id="content" rows="10"
|
||||
cols="100"><?= $notice['content'] ?></textarea>
|
||||
</div>
|
||||
<div class="position-relative mb-3">
|
||||
<label for="file" class="form-label">첨부파일</label>
|
||||
<input name="file" id="file" type="file" class="form-control">
|
||||
</div>
|
||||
<?php if (!empty($files)): ?>
|
||||
<input type="hidden" name="file_sq" value="<?= $files['file_sq'] ?>">
|
||||
<div class="position-relative mb-3">
|
||||
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button class="mb-2 me-2 btn btn-primary" id="btn_save">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<link href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<script type="text/javascript"
|
||||
src="https://cdn.jsdelivr.net/npm/froala-editor@latest/js/froala_editor.pkgd.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
const editorKey = '5OA4gF4D3I3G3B6C4D-13TMIBDIa2NTMNZFFPFZe2a1Id1f1I1fA8D6C4F4G3H3I2A18A15A6==';
|
||||
const tpl = document.querySelector('.my-loader-template');
|
||||
|
||||
$(function () {
|
||||
editor = new FroalaEditor("#content", {
|
||||
fileUpload: true
|
||||
, 'key': editorKey
|
||||
, 'height': 150
|
||||
, toolbarButtons: [
|
||||
'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'fontFamily', 'fontSize',
|
||||
'color', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', 'insertHR',
|
||||
'undo', 'redo', 'clearFormatting', 'selectAll', 'html'
|
||||
]
|
||||
, toolbarButtonsXS: [
|
||||
'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'fontFamily', 'fontSize',
|
||||
'color', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', 'insertHR',
|
||||
'undo', 'redo', 'clearFormatting', 'selectAll', 'html'
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
$("#btn_save").on("click", function () {
|
||||
|
||||
swal.fire({
|
||||
text: "저장 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/board/notice/actModify',
|
||||
method: 'POST',
|
||||
data: new FormData($("#frm_board_info")[0]),
|
||||
processData: false,
|
||||
contentType: false,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
location.replace('/board/notice/lists')
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
126
app/Views/pages/board/noticeWrite.php
Normal file
126
app/Views/pages/board/noticeWrite.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
|
||||
<h1>공지사항</h1>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form class="form-control" id="frm_board_info" enctype="multipart/form-data">
|
||||
<div class="position-relative mb-3">
|
||||
<label for="subject" class="form-label">제목</label>
|
||||
<input name="subject" id="subject" type="text" class="form-control">
|
||||
</div>
|
||||
<div class="position-relative mb-3">
|
||||
<label for="subject" class="form-label">내용</label>
|
||||
<textarea class="form-control" name="content" id="content" rows="10" cols="100"></textarea>
|
||||
</div>
|
||||
<div class="position-relative mb-3">
|
||||
<label for="file" class="form-label">첨부파일</label>
|
||||
<input name="file" id="file" type="file" class="form-control">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button class="mb-2 me-2 btn btn-primary" id="btn_save">저장</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <script src="https://cdn.ckeditor.com/4.12.1/standard/ckeditor.js"></script> -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/froala-editor@latest/css/froala_editor.pkgd.min.css" rel="stylesheet"
|
||||
type="text/css" />
|
||||
<script type="text/javascript"
|
||||
src="https://cdn.jsdelivr.net/npm/froala-editor@latest/js/froala_editor.pkgd.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
const editorKey = '5OA4gF4D3I3G3B6C4D-13TMIBDIa2NTMNZFFPFZe2a1Id1f1I1fA8D6C4F4G3H3I2A18A15A6==';
|
||||
const tpl = document.querySelector('.my-loader-template');
|
||||
|
||||
$(function () {
|
||||
editor = new FroalaEditor("#content", {
|
||||
fileUpload: true
|
||||
, 'key': editorKey
|
||||
, 'height': 150
|
||||
, toolbarButtons: [
|
||||
'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'fontFamily', 'fontSize',
|
||||
'color', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', 'insertHR',
|
||||
'undo', 'redo', 'clearFormatting', 'selectAll', 'html'
|
||||
]
|
||||
, toolbarButtonsXS: [
|
||||
'bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'fontFamily', 'fontSize',
|
||||
'color', 'paragraphFormat', 'align', 'formatOL', 'formatUL', 'outdent', 'indent', 'quote', 'insertHR',
|
||||
'undo', 'redo', 'clearFormatting', 'selectAll', 'html'
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
$("#btn_save").on("click", function () {
|
||||
|
||||
swal.fire({
|
||||
text: "저장 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/board/notice/actWrite',
|
||||
method: 'POST',
|
||||
data: new FormData($("#frm_board_info")[0]),
|
||||
processData: false,
|
||||
contentType: false,
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
location.replace('/board/notice/lists')
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
@@ -1,196 +0,0 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<h1>Dashboard</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">예약 미확정 매물 목록</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>접수일자</th>
|
||||
<th>예약일자</th>
|
||||
<th>오전/오후</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">공지사항</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순번</th>
|
||||
<th>제목</th>
|
||||
<th>등록일자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">검수지연내역(녹취필요)</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>접수일자</th>
|
||||
<th>촬영일자</th>
|
||||
<th>경과일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">검수지연내역(홍보확인서)</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>접수일자</th>
|
||||
<th>촬영일자</th>
|
||||
<th>경과일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"></th>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
161
app/Views/pages/home/dashboard.php
Normal file
161
app/Views/pages/home/dashboard.php
Normal file
@@ -0,0 +1,161 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>Dashboard</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">예약 미확정 매물 목록</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>접수일자</th>
|
||||
<th>예약일자</th>
|
||||
<th>오전/오후</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$nRow = 1;
|
||||
foreach ($statistics['reserve'] as $row):
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"> <?= substr($row['rcpt_tm'], 0, 10) ?></th>
|
||||
<td class="text-center"><?= substr($row['rsrv_date'], 0, 10) ?></td>
|
||||
<td class="text-center"><?= $row['rsrv_tm_ap'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$nRow++;
|
||||
endforeach;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">공지사항</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<colgroup>
|
||||
<col width="10%" />
|
||||
<col width="60%" />
|
||||
<col width="30%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순번</th>
|
||||
<th>제목</th>
|
||||
<th>등록일자</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($notice as $key => $n): ?>
|
||||
<tr onclick="location.href='board/notice/detail/<?= $n['bbs_sq'] ?>'">
|
||||
<th scope="row"><?= ($key + 1) ?></th>
|
||||
<td><?= $n["subject"] ?></td>
|
||||
<td class="text-center"><?= $n["update_tm"] ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">검수지연내역(녹취필요)</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>접수일자</th>
|
||||
<th>촬영일자</th>
|
||||
<th>경과일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$nRow = 1;
|
||||
foreach ($statistics['status2'] as $row):
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"> <?= substr($row['rcpt_tm'], 0, 10) ?></th>
|
||||
<td class="text-center"><?= substr($row['photo_save_dt'], 0, 10) ?></td>
|
||||
<td class="text-center"><?= $row['elapsed_dt'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$nRow++;
|
||||
endforeach;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-xl-4">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">검수지연내역(홍보확인서)</h5>
|
||||
<div class="table-responsive">
|
||||
<table class="mb-0 table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>접수일자</th>
|
||||
<th>촬영일자</th>
|
||||
<th>경과일</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$nRow = 1;
|
||||
foreach ($statistics['status3'] as $row):
|
||||
?>
|
||||
<tr>
|
||||
<th scope="row"> <?= substr($row['rcpt_tm'], 0, 10) ?></th>
|
||||
<td class="text-center"><?= substr($row['photo_save_dt'], 0, 10) ?></td>
|
||||
<td class="text-center"><?= $row['elapsed_dt'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$nRow++;
|
||||
endforeach;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
@@ -1,5 +1,203 @@
|
||||
<?php
|
||||
<!doctype html>
|
||||
<html lang="ko">
|
||||
|
||||
echo 'login';
|
||||
<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">
|
||||
</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="h-100 bg-plum-plate bg-animation">
|
||||
<div class="d-flex h-100 justify-content-center align-items-center py-4">
|
||||
<div class="mx-auto col-sm-10 col-md-8 col-lg-6 col-xl-5">
|
||||
<div class="card border-0"
|
||||
style="border-radius: 24px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);">
|
||||
<div class="card-body p-5">
|
||||
<div class="text-center mb-5">
|
||||
<div class="app-logo mx-auto mb-4"></div>
|
||||
<h1 class="fw-bold text-dark mb-2" style="font-size: 2rem;">Welcome Back!</h1>
|
||||
<p class="text-muted fs-5 mb-0">Sign in to your account to continue</p>
|
||||
</div>
|
||||
|
||||
<form class="" id="frm_login_info">
|
||||
<div class="form-floating mb-4">
|
||||
<input name="user_id" id="user_id" placeholder="아이디 입력" type="text"
|
||||
class="form-control form-control-lg border-0 shadow-sm"
|
||||
style="border-radius: 16px; background: rgba(248, 250, 252, 0.8); height: 58px;">
|
||||
<label for="user_id" class="text-muted">
|
||||
<i class="fa fa-user me-2 text-primary"></i>
|
||||
아이디
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mb-4">
|
||||
<input name="user_pw" id="user_pw" placeholder="비밀번호 입력" type="password"
|
||||
class="form-control form-control-lg border-0 shadow-sm"
|
||||
style="border-radius: 16px; background: rgba(248, 250, 252, 0.8); height: 58px;">
|
||||
<label for="user_pw" class="text-muted">
|
||||
<i class="fa fa-lock me-2 text-primary"></i>
|
||||
비밀번호
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<div class="form-check">
|
||||
<input name="check" id="exampleCheck" type="checkbox"
|
||||
class="form-check-input" style="transform: scale(1.2);">
|
||||
<label for="exampleCheck"
|
||||
class="form-check-label text-muted fw-medium">아이디저장</label>
|
||||
</div>
|
||||
<a href="javascript:void(0);"
|
||||
class="text-primary text-decoration-none fw-semibold">
|
||||
팩스 수신 확인
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-gradient-primary btn-shadow btn-lg w-100 mb-4 fw-semibold text-white"
|
||||
id="btn_login" style="border-radius: 16px; height: 58px; font-size: 1.1rem;">
|
||||
<i class="fa fa-sign-in-alt me-2"></i>로그인
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center mt-4">
|
||||
<p class="text-white mb-0"
|
||||
style="font-size: 0.9rem; text-shadow: 0 1px 2px rgba(0,0,0,0.1);">
|
||||
Copyright © Confirms
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
const tpl = document.querySelector('.my-loader-template');
|
||||
|
||||
$(function () {
|
||||
|
||||
console.log('login page loaded')
|
||||
|
||||
|
||||
$("#btn_login").on("click", function () {
|
||||
|
||||
$.ajax({
|
||||
url: '/login/chkLogin',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: $("#frm_login_info").serialize(),
|
||||
beforeSend: function () {
|
||||
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
console.log(xhr.responseText);
|
||||
},
|
||||
success: function (result) {
|
||||
if (result.code === "0") {
|
||||
location.href = '/'
|
||||
} else {
|
||||
var errors = result.errors
|
||||
|
||||
if (errors != null) {
|
||||
|
||||
var msg = ""
|
||||
msg += errors.user_id != null ? errors.user_id : ""
|
||||
msg += errors.user_pw != null ? "\n" + errors.user_pw : ""
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
559
app/Views/pages/manage/dept/lists.php
Normal file
559
app/Views/pages/manage/dept/lists.php
Normal file
@@ -0,0 +1,559 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#deptList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>조직 관리</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form class="row align-items-end" id="frm_srch_info" onsubmit="return false;">
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">조직구분</label>
|
||||
<select class="form-control" name="srchDepth">
|
||||
<option value="">선택</option>
|
||||
<option value="1">본부</option>
|
||||
<option value="2">팀</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">조직명칭</label>
|
||||
<input type="text" class="form-control" name="srcDeptNm">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">총괄팀장</label>
|
||||
<input type="text" class="form-control" name="srcDeptHead">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">사용여부</label>
|
||||
<select class="form-control" name="useYn">
|
||||
<option value="">선택</option>
|
||||
<option value="Y">사용</option>
|
||||
<option value="N">미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검색 버튼 -->
|
||||
<div class="col-md-1 d-grid">
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header">조직 관리</div>
|
||||
<div class="card-body">
|
||||
<table id="deptList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순번</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 class="card-footer">
|
||||
<button type="button" class="btn btn-primary" id="addUser">
|
||||
등록
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->section('modals') ?>
|
||||
<div class="modal fade" id="deptModal" tabindex="-1" aria-labelledby="deptModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="deptModalLabel">조직정보</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="frm_dept_info" class="needs-validation" onsubmit="return false;" novalidate>
|
||||
<input type="hidden" name="dept_sq" />
|
||||
<input type="hidden" name="pdept_sq" />
|
||||
<input type="hidden" name="type" value="create" />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">조직구분</label>
|
||||
<select class="form-control" name="addDepth" id="addDepth" required>
|
||||
<option value="">선택</option>
|
||||
<option value="1">본부</option>
|
||||
<option value="2">팀</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">상위조직</label>
|
||||
<select class="form-control" name="addPdept" id="addPdept" required>
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">조직명칭</label>
|
||||
<input type="text" class="form-control" name="addDeptNm" id="addDeptNm" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label class="form-label">총괄팀장</label>
|
||||
|
||||
<div class="row g-2">
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="addDeptHeadNm" id="addDeptHeadNm"
|
||||
readonly required>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<input type="text" class="form-control" name="addDeptHead" id="addDeptHead"
|
||||
readonly required>
|
||||
</div>
|
||||
<div class="col-md-2 d-grid">
|
||||
<button type="button" class="btn btn-info w-100"
|
||||
onclick="fUsrDupIdChk();">찾기</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">사용여부</label>
|
||||
<select class="form-control" name="addUseYn" id="addUseYn" required>
|
||||
<option value="">선택</option>
|
||||
<option value="Y" selected>사용</option>
|
||||
<option value="N">미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label">부서설명</label>
|
||||
<input type="text" class="form-control" name="addDeptDesc" id="addDeptDesc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary" id="deptSave">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.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 tpl = document.querySelector('.my-loader-template');
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#srchBonbu").on("change", function (e) {
|
||||
|
||||
var dept_sq = e.target.value
|
||||
|
||||
$("#srchTeam").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (dept_sq === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srchTeam").append(str)
|
||||
|
||||
});
|
||||
|
||||
|
||||
let table = $('#deptList').DataTable({
|
||||
language: lang_kor,
|
||||
processing: true,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: '/manage/dept/getDeptList',
|
||||
type: 'GET',
|
||||
data: function (d) {
|
||||
d.srchDepth = $("#frm_srch_info [name=srchDepth]").val()
|
||||
d.srcDeptNm = $("#frm_srch_info [name=srcDeptNm]").val()
|
||||
d.srcDeptHead = $("#frm_srch_info [name=srcDeptHead]").val()
|
||||
d.useYn = $("#frm_srch_info [name=useYn]").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": [
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
// { 'className': 'text-center', 'targets': [0, 2, 3, 4] },
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
"data": null,
|
||||
"width": "50px",
|
||||
"render": function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
{ data: 'pdept_nm' },
|
||||
{ data: 'dept_nm' },
|
||||
{ data: 'dept_head_nm' },
|
||||
{ data: 'use_yn_nm' },
|
||||
{ data: 'depth_nm' },
|
||||
{ data: 'insert_tm' },
|
||||
{ data: 'insert_usr' },
|
||||
{ data: 'update_tm' },
|
||||
{ data: 'update_usr' },
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
serverSide: true,
|
||||
});
|
||||
|
||||
|
||||
$('#deptList tbody').on('click', 'tr', function () {
|
||||
const row = table.row(this).data()
|
||||
if (!row) return
|
||||
|
||||
const modalEl = document.getElementById('deptModal');
|
||||
const myModal = new bootstrap.Modal(modalEl);
|
||||
|
||||
$("#frm_dept_info")[0].reset()
|
||||
|
||||
$("#frm_dept_info [name=dept_sq]").val(row.dept_sq)
|
||||
$("#frm_dept_info [name=pdept_sq]").val(row.pdept_sq)
|
||||
$("#frm_dept_info [name=type]").val("update")
|
||||
$("#frm_dept_info [name=addDeptNm]").val(row.dept_nm)
|
||||
$("#frm_dept_info [name=addDeptHeadNm]").val(row.dept_head_nm)
|
||||
$("#frm_dept_info [name=addDeptHead]").val(row.dept_head)
|
||||
$("#frm_dept_info [name=addUseYn]").val(row.use_yn)
|
||||
$("#frm_dept_info [name=addDeptDesc]").val(row.dept_desc)
|
||||
|
||||
|
||||
var pdept_sq = row.pdept_sq
|
||||
$("#frm_dept_info [name=addDepth]").val(pdept_sq)
|
||||
|
||||
|
||||
|
||||
var str = "";
|
||||
str += "<option value=''>선택</option>"
|
||||
|
||||
if (pdept_sq === "1") {
|
||||
str += "<option value='1' selected>컨펌스</option>"
|
||||
|
||||
$("#addPdept").empty()
|
||||
$("#addPdept").append(str)
|
||||
} else if (pdept_sq === "2") {
|
||||
|
||||
$.ajax({
|
||||
url: '/manage/dept/getPdept',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'GET',
|
||||
data: $("#frm_dept_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
const data = result.data;
|
||||
|
||||
if (data.length > 0) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (pdept_sq === data[i].dept_sq) {
|
||||
str += "<option value='" + data[i].dept_sq + "' selected>" + data[i].dept_nm + "</option>";
|
||||
} else {
|
||||
str += "<option value='" + data[i].dept_sq + "'>" + data[i].dept_nm + "</option>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#addPdept").empty()
|
||||
$("#addPdept").append(str)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
myModal.show();
|
||||
|
||||
});
|
||||
|
||||
// [검색] 버튼 눌렀을 때 다시 조회
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
|
||||
// 상위조직 검색 - onchange
|
||||
$("#addDepth").on("change", function (e) {
|
||||
|
||||
var val = e.target.value
|
||||
|
||||
var str = "";
|
||||
str += "<option value=''>선택</option>"
|
||||
|
||||
if (val === "1") {
|
||||
str += "<option value='1'>컨펌스</option>"
|
||||
|
||||
$("#addPdept").empty()
|
||||
$("#addPdept").append(str)
|
||||
} else {
|
||||
|
||||
$.ajax({
|
||||
url: '/manage/dept/getPdept',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'GET',
|
||||
data: $("#frm_dept_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
const data = result.data;
|
||||
|
||||
if (data.length > 0) {
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
str += "<option value='" + data[i].dept_sq + "'>" + data[i].dept_nm + "</option>";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$("#addPdept").empty()
|
||||
$("#addPdept").append(str)
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 유저 등록 모달
|
||||
$("#addUser").on("click", function () {
|
||||
$("#frm_dept_info")[0].reset()
|
||||
|
||||
$("#frm_dept_info [name=dept_sq]").val("")
|
||||
$("#frm_dept_info [name=pdept_sq]").val("")
|
||||
$("#frm_dept_info [name=type]").val("create")
|
||||
$("#frm_dept_info [name=addUserId]").prop("readonly", false)
|
||||
|
||||
const modalEl = document.getElementById('deptModal');
|
||||
const myModal = new bootstrap.Modal(modalEl);
|
||||
myModal.show();
|
||||
});
|
||||
|
||||
|
||||
// 유저정보저장
|
||||
$("#deptSave").on("click", function () {
|
||||
|
||||
const form = document.getElementById('frm_dept_info');
|
||||
const type = $("#frm_dept_info [name=type]").val();
|
||||
|
||||
let isValid = true;
|
||||
|
||||
// Bootstrap5 기본 validation 적용
|
||||
if (!form.checkValidity()) {
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
if (!isValid) {
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
if ($("#frm_dept_info [name=addDeptHeadNm]").val() == "" || $("#frm_dept_info [name=addDeptHead]").val() == "") {
|
||||
Swal.fire({
|
||||
title: "총괄팀장 정보 누락",
|
||||
icon: "error"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
swal.fire({
|
||||
text: "저장 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/manage/dept/saveDept',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: $("#frm_dept_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
deptModalHide()
|
||||
$("#btnSearch").trigger('click')
|
||||
Swal.fire({
|
||||
title: '정상 처리되었습니다.',
|
||||
icon: "success"
|
||||
|
||||
})
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 총괄팀장 찾기
|
||||
function fUsrDupIdChk() {
|
||||
// var paramstr = $("#paramstr").val();
|
||||
window.open('/manage/dept/getchkuser', 'get', 'width=600,height=800');
|
||||
}
|
||||
|
||||
// 응답 유저 정보 입력
|
||||
function setSelectedUser(id, name, usrSq) {
|
||||
$("#frm_dept_info [name=addDeptHeadNm]").val(name);
|
||||
$("#frm_dept_info [name=addDeptHead]").val(usrSq);
|
||||
}
|
||||
|
||||
|
||||
function deptModalHide() {
|
||||
const modalEl = document.getElementById('deptModal');
|
||||
const modal = bootstrap.Modal.getInstance(modalEl); // 기존 인스턴스 가져오기
|
||||
|
||||
if (modal) {
|
||||
modal.hide();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
159
app/Views/pages/manage/dept/users.php
Normal file
159
app/Views/pages/manage/dept/users.php
Normal file
@@ -0,0 +1,159 @@
|
||||
<!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>
|
||||
#userList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
</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="main-card mb-3 card">
|
||||
<div class="card-header">사용자 목록</div>
|
||||
<div class="card-body">
|
||||
<table id="userList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순번</th>
|
||||
<th>아이디</th>
|
||||
<th>이름</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="button" class="btn btn-primary" id="addUser">
|
||||
등록
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.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 tpl = document.querySelector('.my-loader-template');
|
||||
|
||||
$(function () {
|
||||
let table = $('#userList').DataTable({
|
||||
language: lang_kor,
|
||||
processing: true,
|
||||
ajax: {
|
||||
url: '/manage/dept/getUserList',
|
||||
type: 'GET',
|
||||
data: function (d) {
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
}
|
||||
},
|
||||
"columnDefs": [
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
{ 'className': 'text-center', 'targets': [0, 1, 2] },
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
"data": null,
|
||||
"width": "50px",
|
||||
"render": function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
{ data: 'usr_id' },
|
||||
{ data: 'usr_nm' },
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
serverSide: true,
|
||||
});
|
||||
|
||||
|
||||
$('#userList tbody').on('click', 'tr', function () {
|
||||
const row = table.row(this).data()
|
||||
if (!row) return
|
||||
|
||||
if (window.opener && !window.opener.closed) {
|
||||
const id = row.usr_id
|
||||
const name = row.usr_nm
|
||||
const usrSq = row.usr_sq
|
||||
|
||||
window.opener.setSelectedUser(id, name, usrSq)
|
||||
}
|
||||
|
||||
window.close()
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
164
app/Views/pages/manage/log/lists.php
Normal file
164
app/Views/pages/manage/log/lists.php
Normal file
@@ -0,0 +1,164 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#logList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>조직 관리</h1>
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header">조직 관리</div>
|
||||
<div class="card-body">
|
||||
<table id="logList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순번</th>
|
||||
<th>아이디</th>
|
||||
<th>사용자명</th>
|
||||
<th>입력아이디</th>
|
||||
<th>사유</th>
|
||||
<th>아이피</th>
|
||||
<th>사용자 에이전트</th>
|
||||
<th>일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button class="mb-2 me-2 border-0 btn-transition btn btn-shadow btn-outline-success"
|
||||
id="excel-download">엑셀다운로드</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.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 tpl = document.querySelector('.my-loader-template')
|
||||
let date = new Date()
|
||||
|
||||
$(function () {
|
||||
|
||||
let table = $('#logList').DataTable({
|
||||
language: lang_kor,
|
||||
processing: true,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: '/manage/loginlog/getLogList',
|
||||
type: 'GET',
|
||||
data: function (d) {
|
||||
d.start = d.start || 0
|
||||
d.length = d.length || 10
|
||||
}
|
||||
},
|
||||
"columnDefs": [
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
{ 'className': 'text-center', 'targets': [0, 1, 2, 3, 4, 5, 7] },
|
||||
{ targets: 6, className: "ellipsis" }
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
"data": null,
|
||||
"width": "50px",
|
||||
"render": function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
{ data: 'usr_id_in' },
|
||||
{ data: 'usr_nm' },
|
||||
{ data: 'usr_id_in' },
|
||||
{ data: 'reason' },
|
||||
{ data: 'ip' },
|
||||
{ data: 'useragent' },
|
||||
{ data: 'regdate' },
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: true,
|
||||
ordering: false,
|
||||
serverSide: true,
|
||||
});
|
||||
|
||||
|
||||
// 엑셀 다운로드 click
|
||||
$("#excel-download").on("click", function () {
|
||||
$.ajax({
|
||||
url: "/manage/loginlog/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 100 },
|
||||
{ wpx: 120 },
|
||||
{ wpx: 120 }
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
133
app/Views/pages/manage/menu/lists.php
Normal file
133
app/Views/pages/manage/menu/lists.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#logList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 180px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>메뉴 관리</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7 col-xl-7">
|
||||
<div class="main-card mb-3 card">
|
||||
<!-- <div class="card-header">조직 관리</div> -->
|
||||
<div class="card-body">
|
||||
<table id="menuList" class="table table-hover table-striped table-bordered"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-xl-5">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header">메뉴 정보</div>
|
||||
<div class="card-body">
|
||||
<form action="frm_menu_info" onsubmit="return false;">
|
||||
<div class="form-group">
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- The jqGrid language file code-->
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/jqgrid/4.6.0/i18n/grid.locale-kr.js">
|
||||
</script>
|
||||
<!-- The atual jqGrid code -->
|
||||
<script type="text/javascript" src="//cdn.jsdelivr.net/jqgrid/4.6.0/jquery.jqGrid.src.js">
|
||||
</script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/themes/redmond/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.5/css/ui.jqgrid.min.css">
|
||||
<script type="text/javascript">
|
||||
|
||||
const tpl = document.querySelector('.my-loader-template')
|
||||
let date = new Date()
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#menuList").jqGrid({
|
||||
url: "/manage/menu/getMenuList",
|
||||
datatype: "json",
|
||||
mtype: "POST",
|
||||
height: 480,
|
||||
rowNum: 10000,
|
||||
autowidth: true,
|
||||
width: "auto",
|
||||
shrinkToFit: true,
|
||||
treeGrid: true,
|
||||
treedatatype: "json",
|
||||
gridview: true,
|
||||
sortorder: "desc",
|
||||
ExpandColumn: 'mnu_nm',
|
||||
expanded: true,
|
||||
viewrecords: true,
|
||||
scrollrows: true,
|
||||
treeGridModel: 'adjacency',
|
||||
colNames: ['메뉴명', '메뉴ID', '메뉴유형코드', '메뉴유형', 'URL', '정렬순서'],
|
||||
colModel: [
|
||||
{ name: 'mnu_nm', index: 'mnu_nm', width: 150 },
|
||||
{ name: 'mnu_id', index: 'mnu_id', width: 80 },
|
||||
{ name: 'menu_tp', index: 'menu_tp', width: 50, hidden: true },
|
||||
{ name: 'menu_tp_nm', index: 'menu_tp_nm', width: 100, align: "center" },
|
||||
{ name: 'mnu_url', index: 'mnu_url', width: 200 },
|
||||
{ name: 'view_odr', index: 'view_odr', width: 50, align: "center" }
|
||||
],
|
||||
|
||||
jsonReader: {
|
||||
// root: "rows", // 🔹 지금 JSON 구조: { total: "...", rows: [ ... ] }
|
||||
repeatitems: false,
|
||||
id: "mnu_id"
|
||||
},
|
||||
|
||||
treeReader: {
|
||||
parent_id_field: "mnu_pid", // 🔴 부모 필드 지정 (중요)
|
||||
level_field: "level", // 이미 JSON에 들어있음
|
||||
left_field: "lft",
|
||||
right_field: "rgt",
|
||||
leaf_field: "isLeaf", // true / false (boolean 권장)
|
||||
expanded_field: "expanded", // ROOT(M) 에만 true 있으면 됨
|
||||
icon_field: "iconCls"
|
||||
},
|
||||
|
||||
|
||||
sortname: "mnu_id",
|
||||
sortorder: "asc",
|
||||
|
||||
loadComplete: function () {
|
||||
$("#menuList")
|
||||
.jqGrid('setGridParam', { datatype: 'local' })
|
||||
.trigger("reloadGrid");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
431
app/Views/pages/manage/phone/lists.php
Normal file
431
app/Views/pages/manage/phone/lists.php
Normal file
@@ -0,0 +1,431 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#phoneList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>전화확인 관리</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form class="row align-items-end" id="frm_srch_info" onsubmit="return false;">
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">매체사</label>
|
||||
<select class="form-control" name="cpid">
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($code as $c): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">등록기간</label>
|
||||
<div class="row g-2">
|
||||
<div class="col-5">
|
||||
<input type="date" class="form-control" name="s_date">
|
||||
</div>
|
||||
<div class="col-1" style="text-align: center;line-height: 35px;">
|
||||
-
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<input type="date" class="form-control" name="e_date">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<label class="form-label mb-1">연락처</label>
|
||||
<input type="text" class="form-control" name="phone_number">
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">사용여부</label>
|
||||
<select class="form-control" name="useYn">
|
||||
<option value="">선택</option>
|
||||
<option value="Y">사용</option>
|
||||
<option value="N">미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검색 버튼 -->
|
||||
<div class="col-md-1 d-grid">
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header">조직 관리</div>
|
||||
<div class="card-body">
|
||||
<table id="phoneList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>연락처</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 class="card-footer">
|
||||
<button type="button" class="btn btn-primary" id="addPhone">
|
||||
등록
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->section('modals') ?>
|
||||
<div class="modal fade" id="deptModal" tabindex="-1" aria-labelledby="deptModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="deptModalLabel">연락처 정보</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="frm_phone_info" class="needs-validation" onsubmit="return false;" novalidate>
|
||||
<input type="hidden" name="type" value="create">
|
||||
<!-- 1 row -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">연락처</label>
|
||||
<input type="text" name="phone_number" id="phone_number" placeholder="(-)을 포함해 주세요"
|
||||
class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">매체사</label>
|
||||
<select name="cpid" id="cpid" class="form-select" required>
|
||||
<option value="">-전체-</option>
|
||||
<?php foreach ($code as $c): ?>
|
||||
<option value="<?= $c['cd'] ?>"><?= $c['cd_nm'] ?></option>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">사용유무</label>
|
||||
<select name="use_yn" id="use_yn" class="form-select">
|
||||
<option value="Y" selected>사용</option>
|
||||
<option value="N">미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 2 row -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">소유주</label>
|
||||
<input type="text" name="owner" id="owner" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">신청인</label>
|
||||
<input type="text" name="applicant" id="applicant" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<label class="form-label">관계</label>
|
||||
<input type="text" name="relation" id="relation" class="form-control" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 3 row -->
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">주소</label>
|
||||
<input type="text" name="address" id="address" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label class="form-label">등록기간</label>
|
||||
<div class="row g-2">
|
||||
<div class="col-5">
|
||||
<input type="date" class="form-control" name="s_date" required>
|
||||
</div>
|
||||
<div class="col-1" style="text-align: center;line-height: 35px;">
|
||||
-
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<input type="date" class="form-control" name="e_date" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 4 row -->
|
||||
<div class="row mb-3">
|
||||
<div class="col">
|
||||
<label class="form-label">메모</label>
|
||||
<textarea name="memo" id="memo" class="form-control" rows="2"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-primary" id="phoneSave">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.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 tpl = document.querySelector('.my-loader-template');
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#srchBonbu").on("change", function (e) {
|
||||
|
||||
var dept_sq = e.target.value
|
||||
|
||||
$("#srchTeam").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (dept_sq === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$("#srchTeam").append(str)
|
||||
|
||||
});
|
||||
|
||||
|
||||
let table = $('#phoneList').DataTable({
|
||||
language: lang_kor,
|
||||
processing: true,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: '/manage/dupl_phone/getDuplPhoneList',
|
||||
type: 'GET',
|
||||
data: function (d) {
|
||||
d.srchDepth = $("#frm_srch_info [name=srchDepth]").val()
|
||||
d.srcDeptNm = $("#frm_srch_info [name=srcDeptNm]").val()
|
||||
d.srcDeptHead = $("#frm_srch_info [name=srcDeptHead]").val()
|
||||
d.useYn = $("#frm_srch_info [name=useYn]").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": [
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
// { 'className': 'text-center', 'targets': [0, 2, 3, 4] },
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
"data": null,
|
||||
"width": "50px",
|
||||
"render": function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
{ data: 'phone_number' },
|
||||
{ data: 's_date' },
|
||||
{ data: 'e_date' },
|
||||
{ data: 'cpid_nm' },
|
||||
{ data: 'address' },
|
||||
{ data: 'owner' },
|
||||
{ data: 'applicant' },
|
||||
{ data: 'relation' },
|
||||
{ data: 'use_yn_nm' },
|
||||
{ data: 'memo', "width": "200px" },
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
serverSide: true,
|
||||
});
|
||||
|
||||
|
||||
$('#phoneList tbody').on('click', 'tr', function () {
|
||||
const row = table.row(this).data()
|
||||
if (!row) return
|
||||
|
||||
const modalEl = document.getElementById('deptModal');
|
||||
const myModal = new bootstrap.Modal(modalEl);
|
||||
|
||||
$("#frm_phone_info")[0].reset()
|
||||
$("#frm_phone_info [name=type]").val("update")
|
||||
|
||||
$("#frm_phone_info [name=phone_number]").val(row.phone_number)
|
||||
$("#frm_phone_info [name=phone_number]").prop("readonly", true)
|
||||
$("#frm_phone_info [name=cpid]").val(row.cpid)
|
||||
$("#frm_phone_info [name=use_yn]").val(row.use_yn)
|
||||
$("#frm_phone_info [name=owner]").val(row.owner)
|
||||
$("#frm_phone_info [name=applicant]").val(row.applicant)
|
||||
$("#frm_phone_info [name=relation]").val(row.relation)
|
||||
$("#frm_phone_info [name=address]").val(row.address)
|
||||
$("#frm_phone_info [name=s_date]").val(row.s_date)
|
||||
$("#frm_phone_info [name=e_date]").val(row.e_date)
|
||||
$("#frm_phone_info [name=memo]").val(row.memo)
|
||||
|
||||
|
||||
myModal.show();
|
||||
|
||||
});
|
||||
|
||||
// [검색] 버튼 눌렀을 때 다시 조회
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
// 유저 등록 모달
|
||||
$("#addPhone").on("click", function () {
|
||||
$("#frm_phone_info")[0].reset()
|
||||
|
||||
$("#frm_phone_info [name=type]").val("create")
|
||||
$("#frm_phone_info [name=phone_number]").prop("readonly", false)
|
||||
|
||||
const modalEl = document.getElementById('deptModal');
|
||||
const myModal = new bootstrap.Modal(modalEl);
|
||||
myModal.show();
|
||||
});
|
||||
|
||||
|
||||
// 유저정보저장
|
||||
$("#phoneSave").on("click", function () {
|
||||
|
||||
const form = document.getElementById('frm_phone_info');
|
||||
|
||||
let isValid = true;
|
||||
|
||||
// Bootstrap5 기본 validation 적용
|
||||
if (!form.checkValidity()) {
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
if (!isValid) {
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
swal.fire({
|
||||
text: "저장 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/manage/dupl_phone/savePhone',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: $("#frm_phone_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
deptModalHide()
|
||||
$("#btnSearch").trigger('click')
|
||||
Swal.fire({
|
||||
title: '정상 처리되었습니다.',
|
||||
icon: "success"
|
||||
|
||||
})
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
function deptModalHide() {
|
||||
const modalEl = document.getElementById('deptModal');
|
||||
const modal = bootstrap.Modal.getInstance(modalEl); // 기존 인스턴스 가져오기
|
||||
|
||||
if (modal) {
|
||||
modal.hide();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
658
app/Views/pages/manage/user/lists.php
Normal file
658
app/Views/pages/manage/user/lists.php
Normal file
@@ -0,0 +1,658 @@
|
||||
<?= $this->extend('layouts/main') ?>
|
||||
|
||||
<?= $this->section('content') ?>
|
||||
<style>
|
||||
th {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#userList tbody tr {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockUI {
|
||||
z-index: 1500 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>사용자 관리</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-body">
|
||||
<form class="row align-items-end" id="frm_srch_info" onsubmit="return false;">
|
||||
|
||||
<!-- 등급 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">등급</label>
|
||||
<select class="form-control" name="srchLevel">
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($userLevel as $level): ?>
|
||||
<option value="<?= $level['cd'] ?>"><?= $level['cd_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 소속본부 / 소속팀 -->
|
||||
<div class="col-md-3">
|
||||
<label class="form-label mb-1">소속본부 / 소속팀</label>
|
||||
<div class="row g-2">
|
||||
<div class="col-6">
|
||||
<select class="form-control" name="srchBonbu" id="srchBonbu">
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($bonbuList as $bonbu): ?>
|
||||
<option value="<?= $bonbu['dept_sq'] ?>"><?= $bonbu['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<select class="form-control" name="srchTeam" id="srchTeam">
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">사용여부</label>
|
||||
<select class="form-control" name="useYn">
|
||||
<option value="">선택</option>
|
||||
<option value="Y">사용</option>
|
||||
<option value="N">미사용</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 검색유형 -->
|
||||
<div class="col-md-1">
|
||||
<label class="form-label mb-1">검색유형</label>
|
||||
<select class="form-control" name="srchType">
|
||||
<option value="">선택</option>
|
||||
<option value="1">사용자명</option>
|
||||
<option value="2">사원번호</option>
|
||||
<option value="3">직급</option>
|
||||
<option value="4">연락처</option>
|
||||
<option value="5">주소</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">
|
||||
<button type="button" class="btn btn-primary" id="btnSearch">
|
||||
검색
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 엑셀 버튼 -->
|
||||
<div class="col-md-2">
|
||||
<button type="button" class="btn btn-outline-success" id="btnExcel">
|
||||
<i class="fa fas fa-file-excel-o"></i> 엑셀 다운로드
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12 col-xl-12">
|
||||
<div class="main-card mb-3 card">
|
||||
<div class="card-header">사용자 관리</div>
|
||||
<div class="card-body">
|
||||
<table id="userList" class="table table-hover table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>순번</th>
|
||||
<th>소속본부</th>
|
||||
<th>소속팀</th>
|
||||
<th>사원번호</th>
|
||||
<th>사용자명</th>
|
||||
<th>등급</th>
|
||||
<th>직급</th>
|
||||
<th>연락처</th>
|
||||
<th>SMS인증여부</th>
|
||||
<th>사용여부</th>
|
||||
<th>비밀번호변경일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 여기는 비워둠: AJAX로 채움 -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="button" class="btn btn-primary" id="addUser">
|
||||
등록
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?= $this->section('modals') ?>
|
||||
<div class="modal fade" id="userModal" tabindex="-1" aria-labelledby="userModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="userModalLabel">사용자정보</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="frm_user_info" class="needs-validation" onsubmit="return false;" novalidate>
|
||||
<input type="hidden" name="usr_sq" />
|
||||
<input type="hidden" name="type" value="create" />
|
||||
<div class="row">
|
||||
|
||||
<!-- 이름 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">이름</label>
|
||||
<input type="text" class="form-control" name="addUserNm" id="addUserNm" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 소속조직 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">소속조직</label>
|
||||
<select class="form-control" name="addUserDept" id="addUserDept" required>
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($deptCode as $dept): ?>
|
||||
<option value="<?= $dept['dept_sq'] ?>"><?= $dept['dept_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사원번호 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">사원번호</label>
|
||||
<input type="text" class="form-control" name="addUserId" id="addUserId" readonly
|
||||
required>
|
||||
<small id="idDupText" class="text-danger"></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 비밀번호 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">비밀번호</label>
|
||||
<input type="password" class="form-control" name="addUserPswd" id="addUserPswd">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 등급 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">등급</label>
|
||||
<select class="form-control" name="addUserLevel" id="addUserLevel" required>
|
||||
<option value="">선택</option>
|
||||
<?php foreach ($userLevel as $level): ?>
|
||||
<option value="<?= $level['cd'] ?>"><?= $level['cd_nm'] ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 직급 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">직급</label>
|
||||
<input type="text" class="form-control" name="addUserPosition" id="addUserPosition"
|
||||
required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 연락처 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">연락처</label>
|
||||
<input type="text" class="form-control" name="addUserTel1" id="addUserTel1" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 연락처2 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">연락처2</label>
|
||||
<input type="text" class="form-control" name="addUserTel2" id="addUserTel2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SMS 여부 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">SMS 인증여부</label>
|
||||
<select class="form-control" name="addSmsYn" id="addSmsYn">
|
||||
<option value="Y">예</option>
|
||||
<option value="N" selected>아니요</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 주소 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">주소</label>
|
||||
<input type="text" class="form-control" name="addUserAddr1" id="addUserAddr1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 상세주소 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">상세주소</label>
|
||||
<input type="text" class="form-control" name="addUserAddr2" id="addUserAddr2">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 사용여부 -->
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label class="form-label">사용여부</label>
|
||||
<select class="form-control" name="addUseYn" id="addUseYn">
|
||||
<option value="Y" selected>예</option>
|
||||
<option value="N">아니요</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
|
||||
<button type="button" class="btn btn-danger" id="userRemove">삭제</button>
|
||||
<button type="button" class="btn btn-primary" id="userSave">저장</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.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 tpl = document.querySelector('.my-loader-template');
|
||||
var teamArr = <?= json_encode($teamList, JSON_UNESCAPED_UNICODE); ?>;
|
||||
|
||||
let date = new Date();
|
||||
|
||||
$(function () {
|
||||
|
||||
$("#srchBonbu").on("change", function (e) {
|
||||
|
||||
var dept_sq = e.target.value
|
||||
|
||||
$("#srchTeam").empty()
|
||||
|
||||
var str = "<option value=''>선택</option>"
|
||||
if (teamArr != null) {
|
||||
|
||||
for (var i = 0; i < teamArr.length; i++) {
|
||||
if (dept_sq === teamArr[i].pdept_sq) {
|
||||
str += "<option value='" + teamArr[i].dept_sq + "'>" + teamArr[i].dept_nm + "</option>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log(str)
|
||||
|
||||
$("#srchTeam").append(str)
|
||||
|
||||
});
|
||||
|
||||
|
||||
let table = $('#userList').DataTable({
|
||||
language: lang_kor,
|
||||
processing: true,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: '/manage/user/getUserList',
|
||||
type: 'GET',
|
||||
data: function (d) {
|
||||
d.srchLevel = $("#frm_srch_info [name=srchLevel]").val()
|
||||
d.srchBonbu = $("#frm_srch_info [name=srchBonbu]").val()
|
||||
d.srchTeam = $("#frm_srch_info [name=srchTeam]").val()
|
||||
d.useYn = $("#frm_srch_info [name=useYn]").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": [
|
||||
{ 'targets': '_all', "defaultContent": "" },
|
||||
// { 'className': 'text-center', 'targets': [0, 2, 3, 4] },
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
"data": null,
|
||||
"width": "50px",
|
||||
"render": function (data, type, row, meta) {
|
||||
return meta.row + meta.settings._iDisplayStart + 1;
|
||||
}
|
||||
},
|
||||
{ data: 'pdept_nm' },
|
||||
{ data: 'dept_nm' },
|
||||
{ data: 'usr_id' },
|
||||
{ data: 'usr_nm' },
|
||||
{ data: 'level_nm' },
|
||||
{ data: 'usr_position' },
|
||||
|
||||
{ data: 'usr_tel1' },
|
||||
{ data: 'sms_auth_yn_nm' },
|
||||
{ data: 'use_yn_nm' },
|
||||
{ data: 'last_usr_pw_tm' },
|
||||
],
|
||||
// 옵션들 예시
|
||||
paging: true,
|
||||
searching: false,
|
||||
ordering: false,
|
||||
serverSide: true,
|
||||
});
|
||||
|
||||
|
||||
$('#userList tbody').on('click', 'tr', function () {
|
||||
const row = table.row(this).data()
|
||||
if (!row) return
|
||||
|
||||
const modalEl = document.getElementById('userModal');
|
||||
const myModal = new bootstrap.Modal(modalEl);
|
||||
|
||||
$("#frm_user_info")[0].reset()
|
||||
|
||||
$("#frm_user_info [name=usr_sq]").val(row.usr_sq)
|
||||
$("#frm_user_info [name=type]").val("update")
|
||||
|
||||
$("#frm_user_info [name=addUserNm]").val(row.usr_nm)
|
||||
$("#frm_user_info [name=addUserDept]").val(row.dept_sq)
|
||||
$("#frm_user_info [name=addUserId]").val(row.usr_id)
|
||||
$("#frm_user_info [name=addUserId]").prop("readonly", true)
|
||||
|
||||
$("#frm_user_info [name=addUserLevel]").val(row.usr_level)
|
||||
$("#frm_user_info [name=addUserPosition]").val(row.usr_position)
|
||||
$("#frm_user_info [name=addUserTel1]").val(row.usr_tel1)
|
||||
$("#frm_user_info [name=addUserTel2]").val(row.usr_tel2)
|
||||
$("#frm_user_info [name=addSmsYn]").val(row.sms_auth_yn)
|
||||
$("#frm_user_info [name=addUserAddr1]").val(row.usr_addr1)
|
||||
$("#frm_user_info [name=addUserAddr2]").val(row.usr_addr2)
|
||||
$("#frm_user_info [name=addUseYn]").val(row.use_yn)
|
||||
|
||||
myModal.show();
|
||||
|
||||
});
|
||||
|
||||
// [검색] 버튼 눌렀을 때 다시 조회
|
||||
$('#btnSearch').on('click', function () {
|
||||
table.ajax.reload()
|
||||
});
|
||||
|
||||
|
||||
// 유저 등록 모달
|
||||
$("#addUser").on("click", function () {
|
||||
$("#frm_user_info")[0].reset()
|
||||
|
||||
$("#frm_user_info [name=usr_sq]").val("")
|
||||
$("#frm_user_info [name=type]").val("create")
|
||||
$("#frm_user_info [name=addUserId]").prop("readonly", false)
|
||||
|
||||
const modalEl = document.getElementById('userModal');
|
||||
const myModal = new bootstrap.Modal(modalEl);
|
||||
myModal.show();
|
||||
});
|
||||
|
||||
|
||||
// 유저정보저장
|
||||
$("#userSave").on("click", function () {
|
||||
|
||||
const form = document.getElementById('frm_user_info');
|
||||
const type = $("#frm_user_info [name=type]").val();
|
||||
|
||||
let isValid = true;
|
||||
|
||||
if (type === 'create') {
|
||||
if ($("#frm_user_info [name=addUserPswd]").val() == "") {
|
||||
Swal.fire({
|
||||
title: "비밀번호를 입력하세요",
|
||||
icon: "error",
|
||||
draggable: true
|
||||
})
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Bootstrap5 기본 validation 적용
|
||||
if (!form.checkValidity()) {
|
||||
isValid = false;
|
||||
}
|
||||
|
||||
if (!isValid) {
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
swal.fire({
|
||||
text: "저장 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/manage/user/save',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: $("#frm_user_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
userModalHide()
|
||||
$("#btnSearch").trigger('click')
|
||||
Swal.fire({
|
||||
title: '정상 처리되었습니다.',
|
||||
icon: "success"
|
||||
|
||||
})
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
// 유저정보삭제
|
||||
$("#userRemove").on("click", function () {
|
||||
|
||||
if ($("#frm_user_info [name=usr_sq]").val() == "") {
|
||||
Swal.fire({
|
||||
title: "유저를 선택해 주세요.",
|
||||
icon: "warning"
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
swal.fire({
|
||||
text: "삭제 하시겠습니까?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "예",
|
||||
cancelButtonText: "아니오",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
confirmButtonColor: "#3085d6",
|
||||
cancelButtonColor: "#d33",
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
$.ajax({
|
||||
url: '/manage/user/remove',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
method: 'POST',
|
||||
data: $("#frm_user_info").serialize(),
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
})
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage()
|
||||
},
|
||||
error: function (xhr, error, thrown) {
|
||||
blockUI.unblockPage()
|
||||
var msg = "";
|
||||
if (xhr.responseText != null) {
|
||||
msg = xhr.responseText
|
||||
} else {
|
||||
msg = "잠시후 다시 시도해 주세요."
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
title: msg,
|
||||
icon: "error"
|
||||
})
|
||||
},
|
||||
success: function (result) {
|
||||
|
||||
if (result.code == '0') {
|
||||
userModalHide()
|
||||
$("#btnSearch").trigger('click')
|
||||
Swal.fire({
|
||||
title: '정상 처리되었습니다.',
|
||||
icon: "success"
|
||||
|
||||
})
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: result.msg,
|
||||
icon: "error"
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
// 엑셀다운 click
|
||||
$("#btnExcel").on("click", function () {
|
||||
|
||||
console.log('excel start')
|
||||
|
||||
$.ajax({
|
||||
url: "/manage/user/excel",
|
||||
method: "GET",
|
||||
dataType: "json",
|
||||
data: $("#frm_srch_info").serialize(),
|
||||
success: function (result) {
|
||||
downloadExcel(result.data);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function userModalHide() {
|
||||
const modalEl = document.getElementById('userModal');
|
||||
const modal = bootstrap.Modal.getInstance(modalEl); // 기존 인스턴스 가져오기
|
||||
|
||||
if (modal) {
|
||||
modal.hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 엑셀 다운로드
|
||||
function downloadExcel(data) {
|
||||
const ws = XLSX.utils.json_to_sheet(data);
|
||||
ws['!cols'] = [
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 80 },
|
||||
{ wpx: 130 },
|
||||
{ wpx: 80 },
|
||||
];
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
function getDateTimeString() {
|
||||
const d = new Date();
|
||||
const yyyy = d.getFullYear();
|
||||
const mm = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const dd = String(d.getDate()).padStart(2, '0');
|
||||
const hh = String(d.getHours()).padStart(2, '0');
|
||||
const mi = String(d.getMinutes()).padStart(2, '0');
|
||||
const ss = String(d.getSeconds()).padStart(2, '0');
|
||||
return `${yyyy}${mm}${dd}${hh}${mi}${ss}`;
|
||||
}
|
||||
|
||||
</script>
|
||||
<?= $this->endSection() ?>
|
||||
Reference in New Issue
Block a user