13 changed files with 260 additions and 38 deletions
@ -0,0 +1,114 @@ |
|||
<?php |
|||
include("../header.php"); |
|||
require_once("./conn.php"); |
|||
$sql_str = "SELECT * FROM contract_b_signed_back "; |
|||
$stmt = $conn->prepare($sql_str); |
|||
$stmt->execute(); |
|||
$contracts= $stmt->fetchAll(PDO::FETCH_ASSOC); |
|||
|
|||
?> |
|||
|
|||
<link rel="stylesheet" href="./styles/style.css"> |
|||
<link rel="stylesheet" href="semantic/dist/semantic.min.css"> |
|||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" /> |
|||
<script defer src="./js/alpinejs/cdn.min.js"></script> |
|||
<script src="./js/axios/axios.min.js"></script> |
|||
|
|||
|
|||
<div style="overflow-x:auto;margin-top:12px"> |
|||
<a href="contract-newelevator-input.php?function_name=repair&<?php echo $token_link; ?>" class="btn btn-info btn-sm"> |
|||
<span class="glyphicon glyphicon-plus"></span> |
|||
</a> |
|||
<table id="table_index" class="table table-striped table-bordered" style="width:100%"> |
|||
<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> |
|||
<?php foreach($contracts as $contract): ?> |
|||
<tr> |
|||
<td><?php echo $contract['id']; ?></td> |
|||
<td><?php echo $contract['contract_no'] ?></td> |
|||
<td><?php echo $contract['company'] ?></td> |
|||
<td><?php echo $contract['customer_no'] ?></td> |
|||
<td><?php echo $contract['salesperson'] ?></td> |
|||
<td><?php echo $contract['contract_start_date'] ?></td> |
|||
<td><?php echo $contract['contract_end_date'] ?></td> |
|||
<td> |
|||
<?php |
|||
$endDate = new DateTime($contract['contract_end_date']); |
|||
$now = new DateTime(); |
|||
$interval = $now->diff($endDate); |
|||
if ($interval->days <= 60) { |
|||
echo "60天以內。"; |
|||
} else { |
|||
echo "指定日期與當前日期相差超過60天。"; |
|||
} |
|||
|
|||
?> |
|||
</td> |
|||
<td><?php echo $contract['created_by'] ?></td> |
|||
<td><?php echo $contract['created_at'] ?></td> |
|||
<td style="width:30px"> |
|||
<p> |
|||
<a href="contract-newelevator-edit.php?contractid=<?php echo $contract['id']; ?>&function_name=repair&<?php echo $token_link; ?>" class="btn btn-info btn-sm"> |
|||
<span class="glyphicon glyphicon-pencil"></span> |
|||
</a> |
|||
<a href="javascript:;" class="btn btn-info btn-sm" style="margin-left:10px;" @click="deleteFn(<?php echo $contract['id']; ?>)"> |
|||
<span class="glyphicon glyphicon-remove"></span> |
|||
</a> |
|||
</p> |
|||
</td> |
|||
</tr> |
|||
<?php endforeach ?> |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
|
|||
<style> |
|||
table { |
|||
table-layout:fixed; |
|||
width: 100%; |
|||
} |
|||
|
|||
td { |
|||
word-wrap:break-word; |
|||
} |
|||
|
|||
img { |
|||
width:125px; |
|||
} |
|||
|
|||
.width_style_1 { |
|||
width:125px; |
|||
} |
|||
|
|||
table{ |
|||
width:100%; |
|||
} |
|||
#table_index_filter{ |
|||
float:right; |
|||
} |
|||
#table_index_paginate{ |
|||
float:right; |
|||
} |
|||
label { |
|||
display: inline-flex; |
|||
margin-bottom: .5rem; |
|||
margin-top: .5rem; |
|||
|
|||
} |
|||
|
|||
</style> |
Binary file not shown.
Loading…
Reference in new issue