Browse Source

新梯價審付款辦法修改

main
Cheng 1 year ago
parent
commit
601934ed62
  1. 44
      mkt/pricereview-create.php
  2. 271
      wms/mkt/pricereview-create.php

44
mkt/pricereview-create.php

@ -167,9 +167,15 @@ $(function(){
});
});
$('#deposit_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#keep_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#warranty_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#deposit_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#keep_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#warranty_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
/*
// for 動態表格的作法:event delegation
$('#tb1').on('click', $("input[name='item_qty']"), function(){
@ -257,28 +263,44 @@ $(function(){
});
$('#submit').click(function() {
var itemFpidArr = [];
$("input[name='fp_id']").each(function(){ itemFpidArr.push($(this).val()); })
$("input[name='fp_id']").each(function() {
itemFpidArr.push($(this).val());
})
$('#fp_id_all').val(itemFpidArr);
var itemSpecArr = [];
$("input[name='item_spec']").each(function(){ itemSpecArr.push($(this).val()); })
$("input[name='item_spec']").each(function() {
itemSpecArr.push($(this).val());
})
$('#item_spec_all').val(itemSpecArr);
var itemGroupArr = [];
$("input[name='item_group']").each(function(){ itemGroupArr.push($(this).val()); })
$("input[name='item_group']").each(function() {
itemGroupArr.push($(this).val());
})
$('#item_group_all').val(itemGroupArr);
var itemQtyArr = [];
$("input[name='item_qty']").each(function(){ itemQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_qty']").each(function() {
itemQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_qty_all').val(itemQtyArr);
var itemPriceBpArr = [];
$("input[name='item_price_bp']").each(function(){ itemPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price_bp']").each(function() {
itemPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_bp_all').val(itemPriceBpArr);
var itemPriceArr = [];
$("input[name='item_price']").each(function(){ itemPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price']").each(function() {
itemPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_all').val(itemPriceArr);
var pvRateArr = [];
$("input[name='pv_rate']").each(function(){ pvRateArr.push($(this).val()); })
$("input[name='pv_rate']").each(function() {
pvRateArr.push($(this).val());
})
$('#pv_rate_all').val(pvRateArr);
var noteArr = [];
$("input[name='note']").each(function(){ noteArr.push($(this).val()); })
$("input[name='note']").each(function() {
noteArr.push($(this).val());
})
$('#note_all').val(noteArr);
//console.log(itemNameArr);
//return false;

271
wms/mkt/pricereview-create.php

@ -199,89 +199,121 @@ $option_str .= "</tbody></table>";
width: 100%;
height: 100%;
}
.c_iframe {
width: 1350px;
height: 500px;
margin-right: auto;
margin-left: auto;
}
.container {
width: 1350px;
}
.nextline {
width: 100%;
height: 0;
}
#btnadd, #btnadd2, #btnadd3, #btnadd4, a[name=btndel], a[name=btndel2], a[name=btndel3], a[name=btndel4] {
#btnadd,
#btnadd2,
#btnadd3,
#btnadd4,
a[name=btndel],
a[name=btndel2],
a[name=btndel3],
a[name=btndel4] {
margin-left: 4px;
}
tr th svg {
vertical-align: text-top;
}
tr select {
margin: 8px;
}
.modal-dialog {
width: 1200px;
}
.modal-content {
height: 660px;
}
#optionModal .modal-body {
height: 540px;
overflow-y: auto;
}
#optionFaciModal .modal-body {
font-size: 16px;
}
#optionFaciModal .modal-dialog {
margin-top: 200px;
width: 400px;
}
#optionFaciModal .modal-content {
height: auto;
}
ol li {
margin-left: -20px;
line-height: 160%;
}
a[name=optdel] {
font-size: 13px;
text-decoration: none;
}
.dollar-right {
text-align: right;
}
.kind-title {
background-color: black;
color: white;
font-size: 18px;
}
.kind-col {
color: brown;
}
.col-md-6 {
width: 100%;
}
#table_index2_filter label {
width: 30%;
}
#table_index2 {
cursor: pointer;
}
.notice {
margin: 0 0 -2px 10px;
color: red;
}
.btn2:hover {
color: #fff;
}
button[name=btnpost] {
margin-top: 12px;
}
input[type=checkbox] {
margin: 8px;
}
.star {
color: red;
font-weight: bold;
@ -471,7 +503,25 @@ function selEX(o) {
$(function() {
$('[data-toggle="tooltip"]').tooltip();
$(document).ready(function() {
$('input[name=pay_scale]').each(function() {
if ($(this).val() != '') {
console.log($(this).val());
$(this).closest('td').next('td').find('input[name=pay_amount]').val(commafy(($("#price_total").val().replace(/[,]+/g, "") / 100 * $(this).val()).toFixed(0)));
var payAllScale = 0;
var payAllAmt = 0;
$("input[name=pay_scale]").each(function() {
payAllScale += Number($(this).val().replace(/[,]+/g, ""))
});
$("input[name=pay_amount]").each(function() {
payAllAmt += Number($(this).val().replace(/[,]+/g, ""))
});
$("input[name=pay_all_scale]").val(commafy(payAllScale));
$("input[name=pay_all_amount]").val(commafy(payAllAmt));
}
})
})
$('#table_index2').DataTable({
"language": {
"zeroRecords": "沒有符合的結果",
@ -529,10 +579,18 @@ $(function(){
});
});
$('#deposit_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#keep_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#warranty_rate').keyup(function(){ $(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')); });
$('#special_fee').keyup(function(){ $(this).val($(this).val().replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ",")); });
$('#deposit_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#keep_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#warranty_rate').keyup(function() {
$(this).val($(this).val().replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1'));
});
$('#special_fee').keyup(function() {
$(this).val($(this).val().replace(/\D/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ","));
});
/*
// for 動態表格的作法:event delegation
$('#tb1').on('click', $("input[name='item_qty']"), function(){
@ -763,6 +821,7 @@ $(function(){
return false;
}
});
$("input[name=pay_scale]").keyup(function() {
$(this).closest('td').next('td').find('input[name=pay_amount]').val(commafy(($("#price_total").val().replace(/[,]+/g, "") / 100 * $(this).val()).toFixed(0)));
var payAllScale = 0;
@ -822,49 +881,79 @@ $(function(){
$('button[name=submit],button[name=save').click(function() {
var itemFpidArr = [];
$("input[name='fp_id']").each(function(){ if ($(this).val() != '') itemFpidArr.push($(this).val()); })
$("input[name='fp_id']").each(function() {
if ($(this).val() != '') itemFpidArr.push($(this).val());
})
$('#fp_id_all').val(itemFpidArr);
var fpKindArr = [];
$("select[name='fp_kind']").each(function(){ if ($(this).val() != '') fpKindArr.push($(this).val()); })
$("select[name='fp_kind']").each(function() {
if ($(this).val() != '') fpKindArr.push($(this).val());
})
$('#fp_kind_all').val(fpKindArr);
var fpSeatArr = [];
$("select[name='fp_seat']").each(function(){ if ($(this).val() != '') fpSeatArr.push($(this).val()); })
$("select[name='fp_seat']").each(function() {
if ($(this).val() != '') fpSeatArr.push($(this).val());
})
$('#fp_seat_all').val(fpSeatArr);
var fpNumberofstopArr = [];
$("input[name='fp_numberofstop']").each(function(){ if ($(this).val() != '') fpNumberofstopArr.push($(this).val()); })
$("input[name='fp_numberofstop']").each(function() {
if ($(this).val() != '') fpNumberofstopArr.push($(this).val());
})
$('#fp_numberofstop_all').val(fpNumberofstopArr);
var fpSpeedArr = [];
$("select[name='fp_speed']").each(function(){ if ($(this).val() != '') fpSpeedArr.push($(this).val()); })
$("select[name='fp_speed']").each(function() {
if ($(this).val() != '') fpSpeedArr.push($(this).val());
})
$('#fp_speed_all').val(fpSpeedArr);
var itemOpArr = [];
$("select[name='item_op']").each(function(){ if ($(this).val() != '') itemOpArr.push($(this).val()); })
$("select[name='item_op']").each(function() {
if ($(this).val() != '') itemOpArr.push($(this).val());
})
$('#item_op_all').val(itemOpArr);
var itemWeightArr = [];
$("input[name='item_weight']").each(function(){ if ($(this).val() != '') itemWeightArr.push($(this).val()); })
$("input[name='item_weight']").each(function() {
if ($(this).val() != '') itemWeightArr.push($(this).val());
})
$('#item_weight_all').val(itemWeightArr);
var itemSpecArr = [];
$("input[name='item_spec']").each(function(){ itemSpecArr.push($(this).val()); })
$("input[name='item_spec']").each(function() {
itemSpecArr.push($(this).val());
})
$('#item_spec_all').val(itemSpecArr);
var itemGroupArr = [];
$("input[name='item_group']").each(function(){ itemGroupArr.push($(this).val()); })
$("input[name='item_group']").each(function() {
itemGroupArr.push($(this).val());
})
$('#item_group_all').val(itemGroupArr);
var itemUnitPriceArr = [];
$("input[name='item_unit_price']").each(function(){ itemUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_unit_price']").each(function() {
itemUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_unit_price_all').val(itemUnitPriceArr);
var itemQtyArr = [];
$("input[name='item_qty']").each(function(){ itemQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_qty']").each(function() {
itemQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_qty_all').val(itemQtyArr);
var itemQtyOriArr = [];
$("input[name='item_qty_ori']").each(function(){ itemQtyOriArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_qty_ori']").each(function() {
itemQtyOriArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_qty_ori_all').val(itemQtyOriArr);
var itemPriceBpArr = [];
$("input[name='item_price_bp']").each(function(){ itemPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price_bp']").each(function() {
itemPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_bp_all').val(itemPriceBpArr);
var itemPriceCtArr = [];
$("input[name='item_price_ct']").each(function(){ itemPriceCtArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price_ct']").each(function() {
itemPriceCtArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_ct_all').val(itemPriceCtArr);
var itemPriceArr = [];
$("input[name='item_price']").each(function(){ itemPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='item_price']").each(function() {
itemPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#item_price_all').val(itemPriceArr);
var grossProfitArr = [];
$("input[name='gross_profit']").each(function() {
@ -872,88 +961,144 @@ $(function(){
})
$('#gross_profit_all').val(grossProfitArr);
var pvRateArr = [];
$("input[name='pv_rate']").each(function(){ pvRateArr.push($(this).val()); })
$("input[name='pv_rate']").each(function() {
pvRateArr.push($(this).val());
})
$('#pv_rate_all').val(pvRateArr);
var noteArr = [];
$("input[name='note']").each(function(){ noteArr.push($(this).val()); })
$("input[name='note']").each(function() {
noteArr.push($(this).val());
})
$('#note_all').val(noteArr);
var payKindArr = [];
$("input[name='pay_kind']").each(function(){ payKindArr.push($(this).val()); })
$("input[name='pay_kind']").each(function() {
payKindArr.push($(this).val());
})
$('#pay_kind_all').val(payKindArr);
var payScaleArr = [];
$("input[name='pay_scale']").each(function(){ payScaleArr.push($(this).val()); })
$("input[name='pay_scale']").each(function() {
payScaleArr.push($(this).val());
})
$('#pay_scale_all').val(payScaleArr);
var payAmountArr = [];
$("input[name='pay_amount']").each(function(){ payAmountArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='pay_amount']").each(function() {
payAmountArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#pay_amount_all').val(payAmountArr);
var payPeriodArr = [];
$("select[name='pay_period']").each(function(){ payPeriodArr.push($(this).val()); })
$("select[name='pay_period']").each(function() {
payPeriodArr.push($(this).val());
})
$('#pay_period_all').val(payPeriodArr);
var itemOpidArr = [];
$("input[name='op_id']").each(function(){ itemOpidArr.push($(this).val()); })
$("input[name='op_id']").each(function() {
itemOpidArr.push($(this).val());
})
$('#op_id_all').val(itemOpidArr);
var optionSeatArr = [];
$("td[name='option_seat'] a").each(function(){ optionSeatArr.push($(this).html()+"@@"); })
$("td[name='option_seat'] a").each(function() {
optionSeatArr.push($(this).html() + "@@");
})
$('#option_seat_all').val(optionSeatArr);
var optionUnitPriceArr = [];
$("input[name='option_unit_price']").each(function(){ optionUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='option_unit_price']").each(function() {
optionUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#option_unit_price_all').val(optionUnitPriceArr);
var optionQtyArr = [];
$("input[name='option_qty']").each(function(){ optionQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='option_qty']").each(function() {
optionQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#option_qty_all').val(optionQtyArr);
var optionPriceBpArr = [];
$("input[name='option_price_bp']").each(function(){ optionPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='option_price_bp']").each(function() {
optionPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#option_price_bp_all').val(optionPriceBpArr);
var optionMemoArr = [];
$("input[name='option_memo']").each(function(){ optionMemoArr.push($(this).val()+"@@"); })
$("input[name='option_memo']").each(function() {
optionMemoArr.push($(this).val() + "@@");
})
$('#option_memo_all').val(optionMemoArr);
var optionRelateFacilArr = [];
$("td[name='option_relate_facil']").each(function(){ optionRelateFacilArr.push($(this).html()); })
$("td[name='option_relate_facil']").each(function() {
optionRelateFacilArr.push($(this).html());
})
$('#option_relate_facil_all').val(optionRelateFacilArr);
var mnIdArr = [];
$("input[name='mn_id']").each(function(){ mnIdArr.push($(this).val()); })
$("input[name='mn_id']").each(function() {
mnIdArr.push($(this).val());
})
$('#mn_id_all').val(mnIdArr);
var mnKindArr = [];
$("select[name='mn_kind']").each(function(){ mnKindArr.push($(this).val()); })
$("select[name='mn_kind']").each(function() {
mnKindArr.push($(this).val());
})
$('#mn_kind_all').val(mnKindArr);
var mnSeatArr = [];
$("select[name='mn_seat']").each(function(){ mnSeatArr.push($(this).val()); })
$("select[name='mn_seat']").each(function() {
mnSeatArr.push($(this).val());
})
$('#mn_seat_all').val(mnSeatArr);
var mnNumberofstopArr = [];
$("input[name='mn_numberofstop']").each(function(){ mnNumberofstopArr.push($(this).val()); })
$("input[name='mn_numberofstop']").each(function() {
mnNumberofstopArr.push($(this).val());
})
$('#mn_numberofstop_all').val(mnNumberofstopArr);
var mnSpeedArr = [];
$("select[name='mn_speed']").each(function(){ mnSpeedArr.push($(this).val()); })
$("select[name='mn_speed']").each(function() {
mnSpeedArr.push($(this).val());
})
$('#mn_speed_all').val(mnSpeedArr);
var mnUnitPriceArr = [];
$("input[name='mn_unit_price']").each(function(){ mnUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='mn_unit_price']").each(function() {
mnUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mn_unit_price_all').val(mnUnitPriceArr);
var mnQtyArr = [];
$("input[name='mn_qty']").each(function(){ mnQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='mn_qty']").each(function() {
mnQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mn_qty_all').val(mnQtyArr);
var mnPriceBpArr = [];
$("input[name='mn_price_bp']").each(function(){ mnPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='mn_price_bp']").each(function() {
mnPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#mn_price_bp_all').val(mnPriceBpArr);
var mnMemoArr = [];
$("input[name='mn_memo']").each(function(){ mnMemoArr.push($(this).val()+"@@"); })
$("input[name='mn_memo']").each(function() {
mnMemoArr.push($(this).val() + "@@");
})
$('#mn_memo_all').val(mnMemoArr);
var mnRelateFacilArr = [];
$("td[name='mn_relate_facil']").each(function(){ mnRelateFacilArr.push($(this).html()); })
$("td[name='mn_relate_facil']").each(function() {
mnRelateFacilArr.push($(this).html());
})
$('#mn_relate_facil_all').val(mnRelateFacilArr);
var exNoteArr = [];
$("input[name='except_note']").each(function(){ exNoteArr.push($(this).val()); })
$("input[name='except_note']").each(function() {
exNoteArr.push($(this).val());
})
$('#except_note_all').val(exNoteArr);
var exSpecArr = [];
$("input[name='except_spec']").each(function(){ exSpecArr.push($(this).val()); })
$("input[name='except_spec']").each(function() {
exSpecArr.push($(this).val());
})
$('#except_spec_all').val(exSpecArr);
var exUnitPriceArr = [];
$("input[name='except_unit_price']").each(function(){ exUnitPriceArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='except_unit_price']").each(function() {
exUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#except_unit_price_all').val(exUnitPriceArr);
var exQtyArr = [];
$("input[name='except_qty']").each(function(){ exQtyArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='except_qty']").each(function() {
exQtyArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#except_qty_all').val(exQtyArr);
var exPriceBpArr = [];
$("input[name='except_price_bp']").each(function(){ exPriceBpArr.push($(this).val().replace(/[,]+/g,"")); })
$("input[name='except_price_bp']").each(function() {
exPriceBpArr.push($(this).val().replace(/[,]+/g, ""));
})
$('#except_price_bp_all').val(exPriceBpArr);
$("input[name='pmstatus']").val($(this).val());
@ -1654,12 +1799,14 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<th>數量</th>
<th>複價</th>
<th>備註</th>
<th class="star"><div data-toggle="tooltip" data-placement="auto" title="每次選完OPTION後,請點選右方紅色按鈕「電梯」來勾選電梯項次">所屬電梯
<th class="star">
<div data-toggle="tooltip" data-placement="auto" title="每次選完OPTION後,請點選右方紅色按鈕「電梯」來勾選電梯項次">所屬電梯
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" />
<path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z" />
</svg>
</div></th>
</div>
</th>
<th>功能</th>
</tr>
</thead>
@ -1800,7 +1947,9 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) {
<th>數量(月)</th>
<th>複價</th>
<th>備註</th>
<th class="star">所屬電梯</div></th>
<th class="star">所屬電梯
</div>
</th>
<th>功能</th>
</tr>
</thead>
@ -1955,13 +2104,13 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) {
<tr>
<td rowspan="4">材料</td>
<td>1、訂金<input type="hidden" name="pay_kind" value="1"></td>
<td><input type="text" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[1]["pay_scale"]; ?>"></td>
<td><input type="text" id="pay_scale1" name="pay_scale" class="form-control" size="3" value="<?php echo empty(@$last_prpay_arr[1]["pay_scale"]) ? 20 : @$last_prpay_arr[1]["pay_scale"]; ?>"></td>
<td id="pay1"><input type="text" name="pay_amount" class="form-control dollar-right" size="8" value="<?php echo number_format(@$last_prpay_arr[1]["pay_amount"]); ?>" readonly></td>
<td>
<select name="pay_period" class="form-control">
<option value=""></option>
<option value="7" <?php if (@$last_prpay_arr[1]["pay_period"] == "7") echo " selected"; ?>>7天</option>
<option value="30"<?php if (@$last_prpay_arr[1]["pay_period"]=="30") echo " selected"; ?>>30天</option>
<option value="30" <?php if (@$last_prpay_arr[1]["pay_period"] == "30" || @$last_prpay_arr[1]["pay_period"] == "") echo " selected"; ?>>30天</option>
<option value="60" <?php if (@$last_prpay_arr[1]["pay_period"] == "60") echo " selected"; ?>>60天</option>
<option value="90" <?php if (@$last_prpay_arr[1]["pay_period"] == "90") echo " selected"; ?>>90天</option>
<option value="120" <?php if (@$last_prpay_arr[1]["pay_period"] == "120") echo " selected"; ?>>120天</option>
@ -1972,7 +2121,7 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) {
</tr>
<tr>
<td>2、二次款<input type="hidden" name="pay_kind" value="2"></td>
<td><input type="text" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[2]["pay_scale"]; ?>"></td>
<td><input type="text" id="pay_scale2" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[2]["pay_scale"]; ?>"></td>
<td id="pay2"><input type="text" name="pay_amount" class="form-control dollar-right" size="8" value="<?php echo number_format(@$last_prpay_arr[2]["pay_amount"]); ?>" readonly></td>
<td>
<select name="pay_period" class="form-control">
@ -1989,13 +2138,13 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) {
</tr>
<tr>
<td>3、貨到工地款<input type="hidden" name="pay_kind" value="3"></td>
<td><input type="text" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[3]["pay_scale"]; ?>"></td>
<td><input type="text" id="pay_scale3" name="pay_scale" class="form-control" size="3" value="<?php echo empty(@$last_prpay_arr[3]["pay_scale"]) ? 50 : @$last_prpay_arr[3]["pay_scale"]; ?>"></td>
<td id="pay3"><input type="text" name="pay_amount" class="form-control dollar-right" size="8" value="<?php echo number_format(@$last_prpay_arr[3]["pay_amount"]); ?>" readonly></td>
<td>
<select name="pay_period" class="form-control">
<option value=""></option>
<option value="7" <?php if (@$last_prpay_arr[3]["pay_period"] == "7") echo " selected"; ?>>7天</option>
<option value="30"<?php if (@$last_prpay_arr[3]["pay_period"]=="30") echo " selected"; ?>>30天</option>
<option value="30" <?php if (@$last_prpay_arr[3]["pay_period"] == "30" || @$last_prpay_arr[3]["pay_period"] == "") echo " selected"; ?>>30天</option>
<option value="60" <?php if (@$last_prpay_arr[3]["pay_period"] == "60") echo " selected"; ?>>60天</option>
<option value="90" <?php if (@$last_prpay_arr[3]["pay_period"] == "90") echo " selected"; ?>>90天</option>
<option value="120" <?php if (@$last_prpay_arr[3]["pay_period"] == "120") echo " selected"; ?>>120天</option>
@ -2006,7 +2155,7 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) {
</tr>
<tr>
<td>4、其它<input type="hidden" name="pay_kind" value="4"></td>
<td><input type="text" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[4]["pay_scale"]; ?>"></td>
<td><input type="text" id="pay_scale4" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[4]["pay_scale"]; ?>"></td>
<td id="pay4"><input type="text" name="pay_amount" class="form-control dollar-right" size="8" value="<?php echo number_format(@$last_prpay_arr[4]["pay_amount"]); ?>" readonly></td>
<td>
<select name="pay_period" class="form-control">
@ -2024,13 +2173,13 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) {
<tr>
<td rowspan="3">安裝</td>
<td>5、安裝完畢款<input type="hidden" name="pay_kind" value="5"></td>
<td><input type="text" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[5]["pay_scale"]; ?>"></td>
<td><input type="text" id="pay_scale5" name="pay_scale" class="form-control" size="3" value="<?php echo empty(@$last_prpay_arr[5]["pay_scale"]) ? 20 : @$last_prpay_arr[5]["pay_scale"]; ?>"></td>
<td id="pay5"><input type="text" name="pay_amount" class="form-control dollar-right" size="8" value="<?php echo number_format(@$last_prpay_arr[5]["pay_amount"]); ?>" readonly></td>
<td>
<select name="pay_period" class="form-control">
<option value=""></option>
<option value="7" <?php if (@$last_prpay_arr[5]["pay_period"] == "7") echo " selected"; ?>>7天</option>
<option value="30"<?php if (@$last_prpay_arr[5]["pay_period"]=="30") echo " selected"; ?>>30天</option>
<option value="30" <?php if (@$last_prpay_arr[5]["pay_period"] == "30" || @$last_prpay_arr[5]["pay_period"] == "") echo " selected"; ?>>30天</option>
<option value="60" <?php if (@$last_prpay_arr[5]["pay_period"] == "60") echo " selected"; ?>>60天</option>
<option value="90" <?php if (@$last_prpay_arr[5]["pay_period"] == "90") echo " selected"; ?>>90天</option>
<option value="120" <?php if (@$last_prpay_arr[5]["pay_period"] == "120") echo " selected"; ?>>120天</option>
@ -2041,13 +2190,13 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) {
</tr>
<tr>
<td>6、驗收款<input type="hidden" name="pay_kind" value="6"></td>
<td><input type="text" name="pay_scale" class="form-control" size="3" value="<?php echo @$last_prpay_arr[6]["pay_scale"]; ?>"></td>
<td><input type="text" id="pay_scale6" name="pay_scale" class="form-control" size="3" value="<?php echo empty(@$last_prpay_arr[6]["pay_scale"]) ? 10 : @$last_prpay_arr[6]["pay_scale"]; ?>"></td>
<td id="pay6"><input type="text" name="pay_amount" class="form-control dollar-right" size="8" value="<?php echo number_format(@$last_prpay_arr[6]["pay_amount"]); ?>" readonly></td>
<td>
<select name="pay_period" class="form-control">
<option value=""></option>
<option value="7" <?php if (@$last_prpay_arr[6]["pay_period"] == "7") echo " selected"; ?>>7天</option>
<option value="30"<?php if (@$last_prpay_arr[6]["pay_period"]=="30") echo " selected"; ?>>30天</option>
<option value="30" <?php if (@$last_prpay_arr[6]["pay_period"] == "30" || @$last_prpay_arr[6]["pay_period"] == "") echo " selected"; ?>>30天</option>
<option value="60" <?php if (@$last_prpay_arr[6]["pay_period"] == "60") echo " selected"; ?>>60天</option>
<option value="90" <?php if (@$last_prpay_arr[6]["pay_period"] == "90") echo " selected"; ?>>90天</option>
<option value="120" <?php if (@$last_prpay_arr[6]["pay_period"] == "120") echo " selected"; ?>>120天</option>

Loading…
Cancel
Save