v1.2.36
- [OIL HISTORY] 로딩 문구 삽입, 전체 계정 볼수 있는 버튼 추가. - [REPORT-REGION] 지역별 커스터머,컨테이너, 오일현황 리포트 추가
This commit is contained in:
parent
ba43ed2fcc
commit
9caa02c2b4
|
|
@ -2,24 +2,18 @@
|
||||||
// Level 9 이하만 사용 가능
|
// Level 9 이하만 사용 가능
|
||||||
$func->checkLevelModal(9);
|
$func->checkLevelModal(9);
|
||||||
|
|
||||||
/*
|
// 페이징(Next, 화살표) 클릭 시 파라미터가 유실되지 않도록 모든 필수 변수를 REQUEST로 명확히 수집
|
||||||
for($i=0; $i<sizeof($_POST); $i++) {
|
$page = isset($_REQUEST['page']) ? (int)$_REQUEST['page'] : 1;
|
||||||
list($key, $value) = each($_POST);
|
if($page <= 0) $page = 1;
|
||||||
$$key = $value;
|
|
||||||
|
|
||||||
if(is_array($value))
|
$searchtype = isset($_REQUEST['searchtype']) ? $_REQUEST['searchtype'] : '';
|
||||||
{
|
$searchDriver = isset($_REQUEST['searchDriver']) ? $_REQUEST['searchDriver'] : '';
|
||||||
$count = 10;
|
$key_word = isset($_REQUEST['key_word']) ? $_REQUEST['key_word'] : '';
|
||||||
for($i = 0; $i < $count; $i ++) {
|
$cstatus = isset($_REQUEST['cstatus']) ? $_REQUEST['cstatus'] : '';
|
||||||
if ($value[$i]) echo "ARRAY[$key][$value[$i]]<br>";
|
$switched = isset($_REQUEST['switched']) ? $_REQUEST['switched'] : '';
|
||||||
}
|
$switch = isset($_REQUEST['switch']) ? $_REQUEST['switch'] : '';
|
||||||
}
|
$show_all = isset($_REQUEST['show_all']) ? $_REQUEST['show_all'] : '';
|
||||||
else echo "[$key][$value]<br>";
|
$view = isset($_REQUEST['view']) ? $_REQUEST['view'] : 'oilhistory_list';
|
||||||
//print_r($_POST);
|
|
||||||
}
|
|
||||||
|
|
||||||
exit;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Download 기능 제한 (Admin : 1, Manager : 3, Staff : 5 만 가능)
|
// Download 기능 제한 (Admin : 1, Manager : 3, Staff : 5 만 가능)
|
||||||
$permit = array("1", "5", "6", "7", "9");
|
$permit = array("1", "5", "6", "7", "9");
|
||||||
|
|
@ -31,6 +25,7 @@ if (in_array($_SESSION['ss_LEVEL'], $permit)) {
|
||||||
|
|
||||||
$time_start = microtime(true);
|
$time_start = microtime(true);
|
||||||
|
|
||||||
|
// 변수 초기화 및 받아오기
|
||||||
$add_srchquery = "";
|
$add_srchquery = "";
|
||||||
$isSearchPerformed = false;
|
$isSearchPerformed = false;
|
||||||
|
|
||||||
|
|
@ -43,6 +38,11 @@ if($searchtype == "R" && trim($key_word)) {
|
||||||
$isSearchPerformed = true;
|
$isSearchPerformed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 전체보기 버튼을 눌렀거나 페이징 이동 시 강제로 리스트 검색 실행 상태로 유지
|
||||||
|
if ($show_all == 'Y') {
|
||||||
|
$isSearchPerformed = true;
|
||||||
|
}
|
||||||
|
|
||||||
// sorting
|
// sorting
|
||||||
if($switch) {
|
if($switch) {
|
||||||
$switched = $func -> switchOrder($switch, $switched);
|
$switched = $func -> switchOrder($switch, $switched);
|
||||||
|
|
@ -97,9 +97,11 @@ if ($isSearchPerformed) {
|
||||||
WHERE d.d_status = 'F' AND $qrySTR $status_query $add_srchquery";
|
WHERE d.d_status = 'F' AND $qrySTR $status_query $add_srchquery";
|
||||||
$total_count = $jdb->rQuery($query_cnt, "Count Error");
|
$total_count = $jdb->rQuery($query_cnt, "Count Error");
|
||||||
|
|
||||||
if(!$page) $page = 1;
|
|
||||||
if(!$list_count) $list_count = (int)$INIT_PAGECNT;
|
if(!$list_count) $list_count = (int)$INIT_PAGECNT;
|
||||||
if($list_count <= 0) $list_count = 20;
|
if($list_count <= 0) $list_count = 20;
|
||||||
|
|
||||||
|
if(!$page_count) $page_count = 10;
|
||||||
|
|
||||||
$start_number = $list_count * ($page-1);
|
$start_number = $list_count * ($page-1);
|
||||||
|
|
||||||
// 2. 메인 리스트 쿼리
|
// 2. 메인 리스트 쿼리
|
||||||
|
|
@ -145,7 +147,7 @@ if ($isSearchPerformed) {
|
||||||
$strList .= "
|
$strList .= "
|
||||||
<tr>
|
<tr>
|
||||||
<td>$list_number</td>
|
<td>$list_number</td>
|
||||||
<td onclick=\"location.href='/index_intranet.php?view=oilhistory_detail&d_customeruid=".$list['c_uid']."&searchtype=$searchtype&searchDriver=$searchDriver&page=$page&key_word=".urlencode($key_word)."&cstatus=$cstatus&switched=$getSWHStr'\" style='cursor:pointer;'><b class='customer-info-detail'>$max_nameSTR</b></td>
|
<td onclick=\"showLoading(); location.href='/index_intranet.php?view=oilhistory_detail&d_customeruid=".$list['c_uid']."&searchtype=$searchtype&searchDriver=$searchDriver&page=$page&key_word=".urlencode($key_word)."&cstatus=$cstatus&switched=$getSWHStr&show_all=$show_all'\" style='cursor:pointer;'><b class='customer-info-detail'>$max_nameSTR</b></td>
|
||||||
<td>$max_accountnoSTR </td>
|
<td>$max_accountnoSTR </td>
|
||||||
<td>$max_paymenttype </td>
|
<td>$max_paymenttype </td>
|
||||||
<td>".$list['c_rate']." </td>
|
<td>".$list['c_rate']." </td>
|
||||||
|
|
@ -216,7 +218,67 @@ $time_end = microtime(true);
|
||||||
$timeStr = " [".round(($time_end - $time_start),2)."]";
|
$timeStr = " [".round(($time_end - $time_start),2)."]";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#loading-overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
|
z-index: 9999;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.spinner {
|
||||||
|
border: 6px solid #f3f3f3;
|
||||||
|
border-top: 6px solid #2A9B56;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
@keyframes spin {
|
||||||
|
0% { transform: rotate(0deg); }
|
||||||
|
100% { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
.loading-text {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-equal-sync {
|
||||||
|
width: 165px !important;
|
||||||
|
height: 38px !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
line-height: 38px !important;
|
||||||
|
|
||||||
|
font-size: 18px !important;
|
||||||
|
font-weight: normal !important;
|
||||||
|
font-family: inherit !important;
|
||||||
|
|
||||||
|
border-radius: 4px !important;
|
||||||
|
text-align: center !important;
|
||||||
|
display: inline-block !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="loading-overlay" style="display: none;">
|
||||||
|
<div class="spinner"></div>
|
||||||
|
<div class="loading-text">Data is being loaded. Please wait a moment…</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<SCRIPT language=javascript>
|
<SCRIPT language=javascript>
|
||||||
|
function showLoading() {
|
||||||
|
var overlay = document.getElementById("loading-overlay");
|
||||||
|
if(overlay) overlay.style.display = "flex";
|
||||||
|
}
|
||||||
|
|
||||||
function viewCont(){
|
function viewCont(){
|
||||||
var obj = document.getElementById("searchtype").value;
|
var obj = document.getElementById("searchtype").value;
|
||||||
if (obj == 'R') {
|
if (obj == 'R') {
|
||||||
|
|
@ -227,14 +289,65 @@ function viewCont(){
|
||||||
document.getElementById("restnamefnc").style.display="none";
|
document.getElementById("restnamefnc").style.display="none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</SCRIPT>
|
|
||||||
|
|
||||||
<SCRIPT TYPE="TEXT/JAVASCRIPT">
|
function viewAllData() {
|
||||||
$(document).ready(function(){
|
showLoading();
|
||||||
$("#form_cstatus").change(function(){
|
|
||||||
document.getElementById("searchtypeaccount").value = document.getElementById("searchtype").value;
|
var form = document.createElement("form");
|
||||||
$('#form_cstatus').submit();
|
form.setAttribute("method", "post");
|
||||||
});
|
form.setAttribute("action", "<?=$_SERVER['PHP_SELF']?>");
|
||||||
|
|
||||||
|
var hiddenView = document.createElement("input");
|
||||||
|
hiddenView.setAttribute("type", "hidden");
|
||||||
|
hiddenView.setAttribute("name", "view");
|
||||||
|
hiddenView.setAttribute("value", "oilhistory_list");
|
||||||
|
form.appendChild(hiddenView);
|
||||||
|
|
||||||
|
var hiddenShowAll = document.createElement("input");
|
||||||
|
hiddenShowAll.setAttribute("type", "hidden");
|
||||||
|
hiddenShowAll.setAttribute("name", "show_all");
|
||||||
|
hiddenShowAll.setAttribute("value", "Y");
|
||||||
|
form.appendChild(hiddenShowAll);
|
||||||
|
|
||||||
|
document.body.appendChild(form);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
var cstatusSelect = document.getElementById("form_cstatus_select");
|
||||||
|
if(cstatusSelect) {
|
||||||
|
cstatusSelect.addEventListener("change", function() {
|
||||||
|
showLoading();
|
||||||
|
var searchTypeAcc = document.getElementById("searchtypeaccount");
|
||||||
|
var searchType = document.getElementById("searchtype");
|
||||||
|
if(searchTypeAcc && searchType) searchTypeAcc.value = searchType.value;
|
||||||
|
|
||||||
|
var formCstatus = document.getElementById("form_cstatus");
|
||||||
|
if(formCstatus) formCstatus.submit();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var searchDriverSelect = document.getElementById("searchDriver");
|
||||||
|
if(searchDriverSelect) {
|
||||||
|
searchDriverSelect.addEventListener("change", function() {
|
||||||
|
showLoading();
|
||||||
|
this.form.submit();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var form2 = document.getElementsByName("form2")[0];
|
||||||
|
if(form2) {
|
||||||
|
form2.addEventListener("submit", function() {
|
||||||
|
showLoading();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var paginationLinks = document.querySelectorAll(".pagination a");
|
||||||
|
paginationLinks.forEach(function(link) {
|
||||||
|
link.addEventListener("click", function() {
|
||||||
|
showLoading();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</SCRIPT>
|
</SCRIPT>
|
||||||
|
|
||||||
|
|
@ -257,6 +370,8 @@ $(document).ready(function(){
|
||||||
<FORM METHOD=POST NAME=form2 action='<?=$_SERVER["PHP_SELF"]?>' class="form-customer">
|
<FORM METHOD=POST NAME=form2 action='<?=$_SERVER["PHP_SELF"]?>' class="form-customer">
|
||||||
<INPUT TYPE=HIDDEN NAME=view VALUE='oilhistory_list'>
|
<INPUT TYPE=HIDDEN NAME=view VALUE='oilhistory_list'>
|
||||||
<input type=hidden name=cstatus value="<?=$cstatus?>">
|
<input type=hidden name=cstatus value="<?=$cstatus?>">
|
||||||
|
<input type=hidden name=show_all value="<?=$show_all?>">
|
||||||
|
<input type=hidden name=page value="<?=$page?>">
|
||||||
<table class="table-search-customer">
|
<table class="table-search-customer">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="td-title">
|
<td class="td-title">
|
||||||
|
|
@ -280,7 +395,9 @@ $(document).ready(function(){
|
||||||
<INPUT TYPE=HIDDEN NAME=view VALUE='oilhistory_list'>
|
<INPUT TYPE=HIDDEN NAME=view VALUE='oilhistory_list'>
|
||||||
<input type=hidden name=cstatus value="<?=$cstatus?>">
|
<input type=hidden name=cstatus value="<?=$cstatus?>">
|
||||||
<INPUT TYPE=HIDDEN NAME=searchtype VALUE='D'>
|
<INPUT TYPE=HIDDEN NAME=searchtype VALUE='D'>
|
||||||
<select name="searchDriver" id="searchDriver" class="custom-select" onChange="this.form.submit()">
|
<input type=hidden name=show_all value="<?=$show_all?>">
|
||||||
|
<input type=hidden name=page value="<?=$page?>">
|
||||||
|
<select name="searchDriver" id="searchDriver" class="custom-select">
|
||||||
<option value=''>Select</option>
|
<option value=''>Select</option>
|
||||||
<?=$c_driveruidSTR?>
|
<?=$c_driveruidSTR?>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -299,7 +416,8 @@ $(document).ready(function(){
|
||||||
<input type=hidden name=switch value="<?=$switch?>">
|
<input type=hidden name=switch value="<?=$switch?>">
|
||||||
<INPUT TYPE=HIDDEN NAME=searchtype id=searchtypeaccount VALUE='<?=$searchtype?>'>
|
<INPUT TYPE=HIDDEN NAME=searchtype id=searchtypeaccount VALUE='<?=$searchtype?>'>
|
||||||
<input TYPE=hidden NAME=searchDriver VALUE="<?=$searchDriver?>">
|
<input TYPE=hidden NAME=searchDriver VALUE="<?=$searchDriver?>">
|
||||||
<select name="cstatus" id="cstatus" class="custom-select1">
|
<input type=hidden name=show_all value="<?=$show_all?>">
|
||||||
|
<select name="cstatus" id="form_cstatus_select" class="custom-select1">
|
||||||
<option value='A' <?=($cstatus == "A")?"selected":"";?>>Active Account</option>
|
<option value='A' <?=($cstatus == "A")?"selected":"";?>>Active Account</option>
|
||||||
<option value='I' <?=($cstatus == "I")?"selected":"";?>>Inactive Account</option>
|
<option value='I' <?=($cstatus == "I")?"selected":"";?>>Inactive Account</option>
|
||||||
<option value='T' <?=($cstatus == "T")?"selected":"";?>>All Account</option>
|
<option value='T' <?=($cstatus == "T")?"selected":"";?>>All Account</option>
|
||||||
|
|
@ -307,17 +425,22 @@ $(document).ready(function(){
|
||||||
</FORM>
|
</FORM>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td align="right">
|
<td align="right" style="vertical-align: middle;">
|
||||||
<? if ($_SESSION['ss_LEVEL'] < 7) { ?>
|
<div style="display: flex; gap: 10px; justify-content: flex-end; align-items: center;">
|
||||||
<FORM NAME=exportorder id=exportorder METHOD=POST ACTION=/doc/export_process.php >
|
<button type="button" class="btn-add text-center btn-equal-sync" onclick="viewAllData();" style="background-color: #555; border:none;">SHOW ALL</button>
|
||||||
<input type=hidden name=mode value="export">
|
|
||||||
<input type=hidden name=actionStr value="OILHISTORYSUM">
|
<? if ($_SESSION['ss_LEVEL'] < 7) { ?>
|
||||||
<input TYPE=hidden NAME=searchtype VALUE="<?=$searchtype?>">
|
<FORM NAME=exportorder id=exportorder METHOD=POST ACTION=/doc/export_process.php style="margin:0; display: inline-block;">
|
||||||
<input TYPE=hidden NAME=searchDriver VALUE="<?=$searchDriver?>">
|
<input type=hidden name=mode value="export">
|
||||||
<input type=hidden name=cstatus value="<?=$cstatus?>">
|
<input type=hidden name=actionStr value="OILHISTORYSUM">
|
||||||
<button type='submit' class="btn-add text-center">DOWNLOAD</button>
|
<input TYPE=hidden NAME=searchtype VALUE="<?=$searchtype?>">
|
||||||
</FORM>
|
<input TYPE=hidden NAME=searchDriver VALUE="<?=$searchDriver?>">
|
||||||
<? } ?>
|
<input type=hidden name=cstatus value="<?=$cstatus?>">
|
||||||
|
<input type=hidden name=show_all value="<?=$show_all?>">
|
||||||
|
<button type='submit' class="btn-add text-center btn-equal-sync">DOWNLOAD</button>
|
||||||
|
</FORM>
|
||||||
|
<? } ?>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -373,9 +496,9 @@ $(document).ready(function(){
|
||||||
<div class="container-inner">
|
<div class="container-inner">
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
<?
|
<?
|
||||||
if ($total_count > 0) {
|
if ((int)$total_count > 0) {
|
||||||
$page_string = "view=$view&searchtype=$searchtype&searchDriver=$searchDriver&key_word=".urlencode($key_word)."&cstatus=$cstatus&switched=$getSWHStr";
|
$page_string = "view=oilhistory_list&searchtype=".urlencode($searchtype)."&searchDriver=".urlencode($searchDriver)."&key_word=".urlencode($key_word)."&cstatus=".urlencode($cstatus)."&switched=".urlencode($getSWHStr)."&show_all=".urlencode($show_all);
|
||||||
$paging = new PAGE('page',$total_count,$list_count,$page_count,$page,$page_string,'#c71930','','','#c71930','');
|
$paging = new PAGE('page', (int)$total_count, (int)$list_count, (int)$page_count, (int)$page, $page_string, '#c71930', '', '', '#c71930', '');
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -91,6 +91,7 @@ $canExport = in_array($level, [1, 5, 6, 7]);
|
||||||
<li><a href="/index_intranet.php?view=report_monthly">MONTHLY-AREA</a></li>
|
<li><a href="/index_intranet.php?view=report_monthly">MONTHLY-AREA</a></li>
|
||||||
<li><a href="/index_intranet.php?view=report_monthly_driver">MONTHLY-DRIVER</a></li>
|
<li><a href="/index_intranet.php?view=report_monthly_driver">MONTHLY-DRIVER</a></li>
|
||||||
<li><a href="/index_intranet.php?view=report_daily">DAILY</a></li>
|
<li><a href="/index_intranet.php?view=report_daily">DAILY</a></li>
|
||||||
|
<li><a href="/index_intranet.php?view=report_region">REGION</a></li>
|
||||||
<li><a href="#">------------------</a></li>
|
<li><a href="#">------------------</a></li>
|
||||||
<li><a href="/index_intranet.php?view=report_monthly_2024">MONTHLY-AREA(~2023)</a></li>
|
<li><a href="/index_intranet.php?view=report_monthly_2024">MONTHLY-AREA(~2023)</a></li>
|
||||||
<li><a href="/index_intranet.php?view=report_daily_2024">DAILY(~2023)</a></li>
|
<li><a href="/index_intranet.php?view=report_daily_2024">DAILY(~2023)</a></li>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue