|
|
@ -1,5 +1,5 @@ |
|
|
|
<?php |
|
|
|
ini_set('display_errors', 'on'); |
|
|
|
// ini_set('display_errors', 'on'); |
|
|
|
/** |
|
|
|
* 權限規則: |
|
|
|
* 1.工務:宜蘭=高培軒(M0087) 北=張潘榮(M0041) 中=林瑋隆(M0113) 南=鄭存邑(M0102) |
|
|
@ -43,11 +43,27 @@ $site_survey_contact_verify = !isset($_REQUEST['site_survey_contact_verify']) ? |
|
|
|
$real_arrival_date_start = empty($_REQUEST['real_arrival_date_start']) ? null : $_REQUEST['real_arrival_date_start']; |
|
|
|
$real_arrival_date_end = empty($_REQUEST['real_arrival_date_end']) ? null : $_REQUEST['real_arrival_date_end']; |
|
|
|
$area_no = !isset($_REQUEST['area_no']) ? '' : $_REQUEST['area_no']; |
|
|
|
$erro_mesage_search = !isset($_REQUEST['erro_mesage_search']) ? 'A' : $_REQUEST['erro_mesage_search']; |
|
|
|
|
|
|
|
// 取得資料 sql |
|
|
|
$sql = getDataSql($department_id, $role_id, $user_id); |
|
|
|
$data = mysqli_query($link, $sql); |
|
|
|
|
|
|
|
$Tdata = []; |
|
|
|
$Fdata = []; |
|
|
|
|
|
|
|
foreach($data as $row){ |
|
|
|
if(!empty(warningMessage($row))){ |
|
|
|
array_push($Tdata,$row); |
|
|
|
}else{ |
|
|
|
array_push($Fdata,$row); |
|
|
|
} |
|
|
|
} |
|
|
|
if($erro_mesage_search == 'T') |
|
|
|
$data = $Tdata; |
|
|
|
if($erro_mesage_search == 'F') |
|
|
|
$data = $Fdata; |
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
<div style="overflow-x:auto;"> |
|
|
@ -150,6 +166,12 @@ $data = mysqli_query($link, $sql); |
|
|
|
</select> |
|
|
|
</td> |
|
|
|
<td colspan="5" style='text-align:left'> |
|
|
|
<input type="radio" name="erro_mesage_search" id='erro_mesage_search' value='A' <?php echo $erro_mesage_search == 'A' ? "checked" : ""; ?> /> |
|
|
|
<label for="erro_mesage_search">全部</label> |
|
|
|
<input type="radio" name="erro_mesage_search" id='erro_mesage_search_true' value='T' <?php echo $erro_mesage_search == 'T' ? "checked" : ""; ?> /> |
|
|
|
<label for="erro_mesage_search_true">已出現警示</label> |
|
|
|
<input type="radio" name="erro_mesage_search" id='erro_mesage_search_false' value='F' <?php echo $erro_mesage_search == 'F' ? "checked" : ""; ?> /> |
|
|
|
<label for="erro_mesage_search_false">未出現警示</label> |
|
|
|
<button type="submit" style='text-align:center; margin:0 auto' class="btn btn-primary btn-sm">查詢</button> |
|
|
|
<button type="button" style='text-align:center; margin:0 auto' class="btn btn-primary btn-sm" onclick='day_before_input()'><?php echo $numberOfDaysToAdd; ?>天內資料</button> |
|
|
|
<button type="button" style='text-align:center; margin:0 auto' class="btn btn-primary btn-sm" onclick='day_before_all_input()'><?php echo $numberOfDaysToAdd; ?>天內資料(含今天以前)</button> |
|
|
@ -208,6 +230,7 @@ mysqli_close($link); |
|
|
|
formData.append("real_arrival_date_start", "<?php echo empty($_POST['real_arrival_date_start']) ? null : $_POST['real_arrival_date_start']; ?>"); |
|
|
|
formData.append("real_arrival_date_end", "<?php echo empty($_POST['real_arrival_date_end']) ? null : $_POST['real_arrival_date_end']; ?>"); |
|
|
|
formData.append("area_no", "<?php echo empty($_POST['area_no']) ? null : $_POST['area_no']; ?>"); |
|
|
|
formData.append("erro_mesage_search", "<?php echo empty($_POST['erro_mesage_search']) ? null : $_POST['erro_mesage_search']; ?>"); |
|
|
|
|
|
|
|
function generateButton() { |
|
|
|
var xhr = new XMLHttpRequest(); |
|
|
@ -307,6 +330,7 @@ mysqli_close($link); |
|
|
|
var real_arrival_date_start = $("#real_arrival_date_start").val(); |
|
|
|
var real_arrival_date_end = $("#real_arrival_date_end").val(); |
|
|
|
var area_no = $("#area_no").val(); |
|
|
|
var erro_mesage_search = $('input[name=erro_mesage_search]:checked').val(); |
|
|
|
|
|
|
|
var showNum = <?php echo empty($_GET['showNum']) ? '10' : $_GET['showNum']; ?>; |
|
|
|
var nowPage = <?php echo empty($_GET['nowPage']) ? '1' : $_GET['nowPage']; ?>; |
|
|
@ -356,6 +380,6 @@ mysqli_close($link); |
|
|
|
"&orderColumn=" + orderColumn + "&orderDirection=" + orderDirection + |
|
|
|
"&contractno=" + contractno + "&facilityno=" + facilityno + "&custom=" + custom + |
|
|
|
"&site_survey_contact_verify=" + site_survey_contact_verify + "&real_arrival_date_start=" + real_arrival_date_start + |
|
|
|
"&real_arrival_date_end=" + real_arrival_date_end + "&area_no=" + area_no; |
|
|
|
"&real_arrival_date_end=" + real_arrival_date_end + "&area_no=" + area_no + "&erro_mesage_search=" + erro_mesage_search; |
|
|
|
} |
|
|
|
</script> |