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.
249 lines
10 KiB
249 lines
10 KiB
<?php
|
|
require_once "database.php";
|
|
include "../header.php";
|
|
?>
|
|
<div class="container">
|
|
<?php
|
|
include "fault-record-submit.php";
|
|
$db_query = "select * from fault_log";
|
|
$res = mysqli_query($link, $db_query);
|
|
|
|
?>
|
|
<form role="form" class="form-horizontal" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" enctype="multipart/form-data">
|
|
<input type="hidden" name="account" value="<?=$_GET['account'];?>">
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="facilityno">電梯ID</label>
|
|
<select name="facilityno" id="facilityno" style="margin-top: 10px" onchange="select()">
|
|
<?php foreach ($res as $data) { ?>
|
|
<option value="<?=$data['facilityno'];?>"><?=$data['facilityno'];?></option>
|
|
<?php }?>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="sitename">現場名稱</label>
|
|
<input type="text" name="sitename" id="sitename">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="caller">來電者</label>
|
|
<input type="text" name="caller" id="caller">
|
|
</div>
|
|
<!-- <div class="col-md-3">-->
|
|
<!-- <label for="customerconfirmationbar">客戶確認欄</label>-->
|
|
<!-- <input type="text" name="customerconfirmationbar" id="customerconfirmationbar">-->
|
|
<!-- </div>-->
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-9">
|
|
<label for="address">地址</label>
|
|
<input type="text" name="address" id="address" >
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="buildingnumber">棟別</label>
|
|
<input type="text" name="buildingnumber" id="buildingnumber">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="positionnumber">號機</label>
|
|
<input type="text" name="positionnumber" id="positionnumber">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="maintenanceoperationcategory">保養別</label>
|
|
|
|
<select name="maintenanceoperationcategory" id="maintenanceoperationcategory" style="margin-top: 10px">
|
|
<option value="清包">清包</option>
|
|
<option value="半包">半包</option>
|
|
<option value="全包">全包</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<!-- <label for="brandmodel">廠牌</label>-->
|
|
<!-- <input type="text" name="brandmodel" id="brandmodel" >-->
|
|
<label for="brandmodel">廠牌</label>
|
|
<select name="brandmodel" id="brandmodel" style="margin-top: 10px" >
|
|
<option value="三菱">三菱</option>
|
|
<option value="日立">日立</option>
|
|
<option value="迅達">迅達</option>
|
|
<option value="永大">永大</option>
|
|
|
|
<option value="奧的斯機電">奧的斯機電</option>
|
|
<option value="通力">通力</option>
|
|
<option value="杭州西奧">杭州西奧</option>
|
|
<option value="康力">康力</option>
|
|
|
|
<option value="帝奧">帝奧</option>
|
|
<option value="帝森">帝森</option>
|
|
<option value="東芝">東芝</option>
|
|
<option value="廣日">廣日</option>
|
|
|
|
<option value="富士達">富士達</option>
|
|
<option value="富士">富士</option>
|
|
<option value="江南嘉捷">江南嘉捷</option>
|
|
<option value="巨人通力">巨人通力</option>
|
|
|
|
<option value="許繼迅達">許繼迅達</option>
|
|
<option value="快速">快速</option>
|
|
<option value="現代">現代</option>
|
|
<option value="其他">其他</option>
|
|
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-6">
|
|
<label for="faultcode">故障代碼</label>
|
|
<!-- <input type="text" name="faultcode" id="faultcode" > -->
|
|
<select name="faultcode" id="faultcode" style="margin-top: 10px" >
|
|
<option value="TCD 10">TCD 10</option>
|
|
<option value="TCD 11">TCD 11</option>
|
|
<option value="TCD 12">TCD 12</option>
|
|
<option value="TCD 13">TCD 13</option>
|
|
<option value="TCD 14">TCD 14</option>
|
|
<option value="TCD 15">TCD 15</option>
|
|
<option value="TCD 16">TCD 16</option>
|
|
<option value="TCD 17">TCD 17</option>
|
|
<option value="TCD 18">TCD 18</option>
|
|
<option value="TCD 19">TCD 19</option>
|
|
<option value="TCD 20">TCD 20</option>
|
|
<option value="TCD 21">TCD 21</option>
|
|
<option value="TCD 22">TCD 22</option>
|
|
<option value="TCD 23">TCD 23</option>
|
|
<option value="TCD 24">TCD 24</option>
|
|
<option value="TCD 25">TCD 25</option>
|
|
<option value="TCD 26">TCD 26</option>
|
|
<option value="TCD 27">TCD 27</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="faultstate">故障狀態</label>
|
|
<input type="text" name="faultstate" id="faultstate">
|
|
</div>
|
|
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-12">
|
|
<label for="investigationprocess">調查過程</label>
|
|
<input type="text" name="investigationprocess" id="investigationprocess">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-12">
|
|
<label for="causeanalysis">原因分析</label>
|
|
<input type="text" name="causeanalysis" id="causeanalysis">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-12">
|
|
<label for="processingprocess">處理過程</label>
|
|
<input type="text" name="processingprocess" id="processingprocess" >
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="calltime">來電時間</label>
|
|
<input type="text" name="calltime" id="calltime">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="arrivaltime">到達時間</label>
|
|
<input type="text" name="arrivaltime" id="arrivaltime">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="completiontime">完成時間</label>
|
|
<input type="text" name="completiontime" id="completiontime" >
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="returntime">返回時間</label>
|
|
<input type="text" name="returntime" id="returntime">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="brandmodel">處理人員</label>
|
|
<input type="text" name="handlestaff" id="handlestaff" >
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="supportstaff">支持人員</label>
|
|
<input type="text" name="supportstaff" id="supportstaff">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="supporttime">支援時間</label>
|
|
<input type="text" name="supporttime" id="supporttime">
|
|
</div>
|
|
|
|
</div>
|
|
<!-- <div class="form-group">-->
|
|
<!---->
|
|
<!-- <div class="col-md-4">-->
|
|
<!-- <label for="operationstaff">作業人員</label>-->
|
|
<!-- <input type="text" name="operationstaff" id="operationstaff" value="--><?//=$_GET['account'];?><!--">-->
|
|
<!-- </div>-->
|
|
<!-- <div class="col-md-4">-->
|
|
<!-- <label for="filingstaff">存檔人員</label>-->
|
|
<!-- <input type="text" name="filingstaff" id="filingstaff">-->
|
|
<!-- </div>-->
|
|
<!-- <div class="col-md-4">-->
|
|
<!-- <label for="supervisor">主管</label>-->
|
|
<!-- <input type="text" name="supervisor" id="supervisor">-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<div class="form-group">
|
|
<div class="col-md-12">
|
|
<label for="remarks">備註欄</label>
|
|
<input type="text" name="remarks" id="remarks" >
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-12 ">
|
|
<button type="submit" class="btn btn-primary btn-lg" >點擊後提交故障資料</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
<script src="../css/jquery.datetimepicker.full.min.js"></script>
|
|
<link rel="stylesheet" href="../css/jquery.datetimepicker.min.css">
|
|
<script>
|
|
$('#calltime').datetimepicker({
|
|
formatDate:'Y-m-d H:i:s'
|
|
});
|
|
$('#arrivaltime').datetimepicker({
|
|
formatDate:'Y-m-d H:i:s'
|
|
});
|
|
$('#completiontime').datetimepicker({
|
|
formatDate:'Y-m-d H:i:s'
|
|
});
|
|
$('#returntime').datetimepicker({
|
|
formatDate:'Y-m-d H:i:s'
|
|
});
|
|
|
|
function select(){
|
|
var facilityno=$('#facilityno').val();
|
|
var url = "fault-select.php";
|
|
$.ajax({
|
|
method: 'post',
|
|
url: url,
|
|
data: {
|
|
facilityno:facilityno,
|
|
},
|
|
success: function (data) {
|
|
console.log('返回的結果');
|
|
res=eval("("+data+")");
|
|
console.log(res);
|
|
var flag=res.flag;
|
|
var fault_message=res.fault_message;
|
|
console.log(flag);
|
|
console.log(fault_message);
|
|
$('#faultcode').val(flag);
|
|
$('#faultstate').val(fault_message);
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
<?php
|
|
include "../footer.php";
|
|
?>
|