You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
5.3 KiB
152 lines
5.3 KiB
<?php
|
|
include "header.php";
|
|
|
|
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
|
|
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$db_query = "SELECT * FROM repair WHERE id=$id";
|
|
|
|
// 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
$data = mysqli_query($link,$db_query);
|
|
/*
|
|
include "inc/record_update.php";
|
|
|
|
try {
|
|
// 設置一個空陣列來放資料
|
|
$data = array();
|
|
// sql語法存在變數中
|
|
$db_query = "SELECT * FROM expert WHERE id=$id";
|
|
|
|
// 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
$data = mysqli_query($link,$db_query);
|
|
}catch (Exception $e) {
|
|
echo 'Caught exception: ', $e->getMessage(), "\n";
|
|
}
|
|
*/
|
|
foreach($data as $data) :
|
|
?>
|
|
|
|
<div class="container">
|
|
<form class="form-inline" method="post" action="repair-record-update.php" enctype="multipart/form-data">
|
|
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
|
|
|
<div>
|
|
<label for="fixnumber">維修編號</label>
|
|
<input type="text" name="fixnumber" id="fixnumber" value="<?php echo $data['fixnumber']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="customerid">客戶編號</label>
|
|
<input type="text" name="customerid" id="customerid" value="<?php echo $data['customerid']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="contractno">合約編號</label>
|
|
<input type="text" name="contractno" id="contractno" value="<?php echo $data['contractno']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="facilityno">電梯編號</label>
|
|
<input type="text" name="facilityno" id="facilityno" value="<?php echo $data['facilityno']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="damage_detail">故障內容</label>
|
|
<input type="text" name="damage_detail" id="damage_detail" value="<?php echo $data['damage_detail']; ?>">
|
|
</div>
|
|
|
|
<!--
|
|
<div>
|
|
<label for="file_path">上傳圖片</label>
|
|
<input type="text" name="file_path" id="file_path" value="<?php echo $data['file_path']; ?>">
|
|
</div>
|
|
-->
|
|
|
|
<div>
|
|
<label for="contact_person">聯絡人</label>
|
|
<input type="text" name="contact_person" id="contact_person" value="<?php echo $data['contact_person']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="contact_number">聯繫電話</label>
|
|
<input type="text" name="contact_number" id="contact_number" value="<?php echo $data['contact_number']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="repairerid">保養人員工號</label>
|
|
<input type="text" name="repairerid" id="repairerid" value="<?php echo $data['repairerid']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="repairername">保養人員</label>
|
|
<input type="text" name="repairername" id="repairername" value="<?php echo $data['repairername']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="phone_call_help">技術支持電話</label>
|
|
<input type="text" name="phone_call_help" id="phone_call_help" value="<?php echo $data['phone_call_help']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="actual_repairerid">實際處理人員工號</label>
|
|
<input type="text" name="actual_repairerid" id="actual_repairerid" value="<?php echo $data['actual_repairerid']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="actual_repairername">實際處理人員</label>
|
|
<input type="text" name="actual_repairername" id="actual_repairername" value="<?php echo $data['actual_repairername']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="progress_flag">處理進度</label>
|
|
<Select name="progress_flag" id="progress_flag" required>
|
|
<?php
|
|
switch ($data['progress_flag']) {
|
|
case "C":
|
|
echo "<Option Value='C' selected='selected'>修理中</Option> <Option Value='E'>結案</Option>";
|
|
break;
|
|
case "E":
|
|
echo "<Option Value='C'>修理中</Option> <Option Value='E' selected='selected'>結案</Option>";
|
|
break;
|
|
}
|
|
?>
|
|
</Select>
|
|
<!-- <input type="text" name="status" id="status" value=""> -->
|
|
</div>
|
|
|
|
<div>
|
|
<label for="memo">備註</label>
|
|
<input type="text" name="memo" id="memo" value="<?php echo $data['memo']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="create_date">報修時間</label>
|
|
<input type="text" name="create_date" id="create_date" value="<?php echo $data['create_date']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="start_date">開始處理時間</label>
|
|
<input type="text" name="start_date" id="start_date" value="<?php echo $data['start_date']; ?>">
|
|
</div>
|
|
|
|
<div>
|
|
<label for="end_date">結案時間</label>
|
|
<input type="text" name="end_date" id="end_date" value="<?php echo $data['end_date']; ?>">
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<button type="submit" name="update">確定</button>
|
|
</div>
|
|
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
|
|
endforeach;
|
|
|
|
include "footer.php";
|
|
|
|
?>
|
|
|