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.
77 lines
3.1 KiB
77 lines
3.1 KiB
<?php
|
|
include "header.php";
|
|
require_once "database.php";
|
|
?>
|
|
<div class="container">
|
|
<?php
|
|
include "review-record-submit.php";
|
|
$data = array(); # 設置一個空陣列來放資料is
|
|
$sql = "SELECT * FROM account where accounttype = 'G'"; # sql語法存在變數中
|
|
$data = mysqli_query($link, $sql); # 用mysqli_query方法執行(sql語法)將結果存在變數中
|
|
$row = mysqli_fetch_array($data, MYSQLI_ASSOC);
|
|
?>
|
|
<form class="form-horizontal" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" enctype="multipart/form-data">
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="maintance_contract_id">價審單編號</label>
|
|
<input type="text" name="maintance_contract_id" id="maintance_contract_id" maxlength="20" value="<?=$_GET['id'] ?>">
|
|
</div>
|
|
</div>
|
|
<div id="review">
|
|
<div class="form-group">
|
|
<div class="col-md-6">
|
|
<label for="signrole">部門</label>
|
|
<select name="signrole" id="signrole" class="signrole" style="margin-top: 10px">
|
|
<option value="直屬主管(經理)">直屬主管(經理)</option>
|
|
<option value="直屬主管(總監)">直屬主管(總監)</option>
|
|
<option value="評估部門(管理部專人)">評估部門(管理部專人)</option>
|
|
<option value="總經理">總經理</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6" >
|
|
<label for="signer">簽核人員</label>
|
|
<select name="signer" id="choosesigner" class="signer" style="margin-top: 10px">
|
|
<?php
|
|
foreach($data as $k=>$data) :
|
|
?>
|
|
<option value="<?php echo $data['accountid']; ?>"><?php echo $data['name']; ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-12 text-center" >
|
|
<h1 onclick="tan('q')" style="cursor: pointer;">+</h1>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-md-12 ">
|
|
<button type="submit" name="submit" id="submit" class="btn btn-primary btn-lg" >點擊後提交合約審查</button>
|
|
</div>
|
|
<input type="hidden" name="signroles" id="signroles">
|
|
<input type="hidden" name="signers" id="signers">
|
|
<input type="hidden" name="selectdata" id="selectdata" value="<?php echo $row;?>">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
$('#submit').click(function(){
|
|
//處理多組數據
|
|
var signrolesArr = [];
|
|
$('.signrole').each(function(){ signrolesArr.push($(this).val()); })
|
|
$('#signroles').val(signrolesArr);
|
|
|
|
var signersArr = [];
|
|
$(".signer").each(function(){ signersArr.push($(this).val()); })
|
|
$('#signers').val(signersArr);
|
|
|
|
});
|
|
|
|
})
|
|
</script>
|