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.
72 lines
2.8 KiB
72 lines
2.8 KiB
<?php
|
|
include "header.php";
|
|
?>
|
|
<div class="container">
|
|
<?php
|
|
include "receivable-record-submit.php";
|
|
?>
|
|
<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="facility">
|
|
<div class="form-group">
|
|
<div class="col-md-3">
|
|
<label for="maintance_contract_id">編號</label>
|
|
<input type="text" name="id" id="id" maxlength="20" value="1">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="paymentdate">付款日期</label>
|
|
<input class="paymentdates" type="date" name="paymentdate" id="paymentdate" value="<?=date("Y-m-d")?>">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="brand">應收金額</label>
|
|
<input class="receivableamounts" type="text" name="receivableamount" id="receivableamount">
|
|
</div>
|
|
<div class="col-md-3">
|
|
<label for="type">實收金額</label>
|
|
<input class="paidamounts" type="text" name="paidamount" id="paidamount">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-md-12 text-center" >
|
|
<h1 onclick="tan('d')" 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="paymentdates" id="paymentdates">
|
|
<input type="hidden" name="receivableamounts" id="receivableamounts">
|
|
<input type="hidden" name="paidamounts" id="paidamounts">
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
<script>
|
|
$(function () {
|
|
$('#submit').click(function(){
|
|
//處理多組數據
|
|
var paymentdatesArr = [];
|
|
$("input[name='paymentdate']").each(function(){ paymentdatesArr.push($(this).val()); })
|
|
$('#paymentdates').val(paymentdatesArr);
|
|
|
|
var receivableamountsArr = [];
|
|
$("input[name='receivableamount']").each(function(){ receivableamountsArr.push($(this).val()); })
|
|
$('#receivableamounts').val(receivableamountsArr);
|
|
|
|
var paidamountsArr = [];
|
|
$("input[name='paidamount']").each(function(){ paidamountsArr.push($(this).val()); })
|
|
$('#paidamounts').val(paidamountsArr);
|
|
|
|
});
|
|
|
|
})
|
|
</script>
|