실적관리 추가
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
<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>
|
||||
<script src="https://cdn.jsdelivr.net/npm/xlsx-js-style@1.2.0/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">
|
||||
@@ -27,6 +27,123 @@
|
||||
</div>
|
||||
|
||||
<?= $this->renderSection('modals') ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
const tpl = document.querySelector('.my-loader-template')
|
||||
const usrLevel = <?= session('usr_level') != null ? session('usr_level') : '' ?>
|
||||
|
||||
|
||||
// 실적 조회
|
||||
function goStats() {
|
||||
|
||||
if ($("#statDate").val() === "") {
|
||||
Swal.fire({
|
||||
title: "일자를 선택해 주세요.",
|
||||
icon: "warning",
|
||||
draggable: true
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: '/home/viewStatData',
|
||||
type: 'GET',
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
data: { s_date: $("#statDate").val() },
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
});
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage();
|
||||
},
|
||||
error: function (xhr) {
|
||||
console.error("에러", xhr);
|
||||
},
|
||||
success: function (data) {
|
||||
var str = "";
|
||||
|
||||
if (String(usrLevel) === "62") {
|
||||
str = '실적 - 홍보확인서 : ' + data.paper_cnt + ' 건';
|
||||
} else if (String(usrLevel) === "61") {
|
||||
str = '실적 - 전화확인 : ' + data.phone_cnt + ' 건';
|
||||
} else if (String(usrLevel) === "8") {
|
||||
var sum = Number(data.reg_open_cnt) + Number(data.reg_tempOpen_cnt) + Number(data.real_top_R) + Number(data.real_top_G);
|
||||
|
||||
var deung = (Number(data.reg_open_cnt) / sum * 100).toFixed(0);
|
||||
var ga = (Number(data.reg_tempOpen_cnt) / sum * 100).toFixed(0);
|
||||
var real = (Number(data.real_top_R) / sum * 100).toFixed(0);
|
||||
var real_ga = (Number(data.real_top_G) / sum * 100).toFixed(0);
|
||||
|
||||
str = '실적 - 등기부등본 : ' + data.reg_open_cnt + ' 건' + ' (' + (deung = + deung || 0) + '%)'
|
||||
+ ' | 가열람 : ' + data.reg_tempOpen_cnt + ' 건' + ' (' + (ga = + ga || 0) + '%)'
|
||||
+ ' | 리얼탑 열람 : ' + data.real_top_R + ' 건' + ' (' + (real = + real || 0) + '%)'
|
||||
+ ' | 리얼탑 기열람 : ' + data.real_top_G + ' 건' + ' (' + (real_ga = + real_ga || 0) + '%)'
|
||||
} else if (String(usrLevel) === "1" || String(usrLevel) === "60") {
|
||||
str = '실적 - 홍보확인서 : ' + data.paper_cnt + ' 건 | 전화확인 : ' + data.phone_cnt + ' 건 | 등기부등본 : ' + data.reg_open_cnt + ' 건 | 가열람 : ' + data.reg_tempOpen_cnt + ' 건 ';
|
||||
}
|
||||
|
||||
$('#statView').text(str);
|
||||
playSlideIn('#statView');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 팩스조회
|
||||
function clickFax() {
|
||||
$.ajax({
|
||||
url: '/home/getHomeFaxCount',
|
||||
type: 'GET',
|
||||
beforeSend: function () {
|
||||
blockUI.blockPage({
|
||||
message: tpl
|
||||
});
|
||||
},
|
||||
complete: function () {
|
||||
blockUI.unblockPage();
|
||||
},
|
||||
error: function (xhr) {
|
||||
console.error("에러", xhr);
|
||||
},
|
||||
success: function (data) {
|
||||
var total = parseInt(data.enfax_count) + parseInt(data.lgfax_count);
|
||||
|
||||
$('#fax1').text(data.base_time + '시 부터 : 엔팩스 ' + data.enfax_count + ' 건 | LG ' + data.lgfax_count + ' 건 | 총 ' + total + ' 건');
|
||||
playSlideIn('#fax1');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function playSlideIn(selector) {
|
||||
const $el = $(selector);
|
||||
|
||||
// 이전 애니메이션 클래스 제거
|
||||
$el.removeClass('slide-in-left');
|
||||
|
||||
// 강제 리플로우(브라우저가 다시 계산하게 해서 애니메이션 재시작되도록)
|
||||
// DOM 객체가 있는 경우에만
|
||||
if ($el.length > 0 && $el[0]) {
|
||||
void $el[0].offsetWidth;
|
||||
}
|
||||
|
||||
// 새로 클래스 추가해서 애니메이션 시작
|
||||
$el.addClass('slide-in-left');
|
||||
|
||||
// 애니메이션 끝나면 클래스 제거 (다음번에도 다시 재생되도록)
|
||||
$el.one('animationend', function () {
|
||||
$(this).removeClass('slide-in-left');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const today = new Date().toISOString().slice(0, 10);
|
||||
document.getElementById("statDate").value = today;
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,3 +1,48 @@
|
||||
<style>
|
||||
.no-wrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header-divider {
|
||||
width: 1px;
|
||||
height: 22px;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.gap-2 {
|
||||
gap: 1.5rem !important;
|
||||
}
|
||||
|
||||
.top-stat-text,
|
||||
.top-fax-text {
|
||||
color: #000;
|
||||
max-width: 520px;
|
||||
/* white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 400px; */
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
/* 애니메이션 클래스 */
|
||||
.slide-in-left {
|
||||
animation: slideInLeft 0.5s ease-out;
|
||||
}
|
||||
|
||||
@keyframes slideInLeft {
|
||||
from {
|
||||
transform: translateX(-40px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="app-header header-shadow">
|
||||
<div class="app-header__logo">
|
||||
<div class="logo-src"></div>
|
||||
@@ -31,6 +76,25 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="app-header__content">
|
||||
<div class="app-header-left d-flex flex-column flex-lg-row align-items-start align-items-lg-center gap-2">
|
||||
<!-- 통계 -->
|
||||
<div class="d-flex align-items-center gap-2 flex-nowrap">
|
||||
<input type="date" class="form-control form-control-sm iText hasDatepicker" name="statDate"
|
||||
id="statDate" style="width: 120px;">
|
||||
<span onclick="goStats()" class="text-muted" style="cursor:pointer;">조회</span>
|
||||
<span id="statView" class="top-stat-text">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="header-divider d-none d-lg-block"></div>
|
||||
|
||||
<!-- 팩스 -->
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<span onclick="clickFax()" class="text-muted" style="cursor:pointer;">팩 스</span>
|
||||
<span id="fax1" class="top-fax-text">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="app-header-left">
|
||||
<div class="search-wrapper">
|
||||
<div class="input-holder">
|
||||
|
||||
Reference in New Issue
Block a user