|
|
@ -43,7 +43,7 @@ if ($row[0] > 0) { |
|
|
|
|
|
|
|
// 退回重填價審,帶出上次價審內容 |
|
|
|
$last_pr_arr = $last_pritem_arr = $last_prpay_arr = []; |
|
|
|
$sql = "select * from pricereview_main where contractno = '$vol_no' and status in ('YN', 'D') order by id limit 1"; |
|
|
|
$sql = "SELECT * FROM pricereview_main WHERE contractno = '$vol_no' AND status in ('YN', 'D') ORDER BY id DESC limit 1"; |
|
|
|
$res = mysqli_query($link, $sql); |
|
|
|
if ($row = mysqli_fetch_assoc($res)) { |
|
|
|
$last_pr_arr = $row; |
|
|
@ -2549,20 +2549,20 @@ include "../footer.php"; |
|
|
|
|
|
|
|
<script> |
|
|
|
const options = [...<?php echo json_encode($options); ?>]; |
|
|
|
|
|
|
|
function selectOptionFn(pobj, jobj){ |
|
|
|
// var pobj = $(this).closest('td').parent(); |
|
|
|
console.log(pobj); |
|
|
|
// console.log(pobj.find('input[name=optionID]').val()); |
|
|
|
// console.log(jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html())); |
|
|
|
console.log(pobj.find('td').eq(0).html()); |
|
|
|
let sepc = pobj.find('td').eq(2).html() + '<br />(' + pobj.find('td').eq(3).html() + ')'; |
|
|
|
sepc = sepc.replace("()", "") |
|
|
|
jobj.html(pobj.find('td').eq(1).html() + " " ); |
|
|
|
jobj.closest('td').parent().find('input[name=option_unit_price]').val(pobj.find('td').eq(6).html()); |
|
|
|
jobj.closest('td').parent().find('input[name=option_price_bp]').val(commafy(pobj.find('td').eq(6).html().replace(/[,]+/g, "") * jobj.closest('td').parent().find('input[name=option_qty]').val().replace(/[,]+/g, ""))); |
|
|
|
jobj.closest('td').parent().find('input[name=op_id]').val(pobj.find('td').eq(0).html()); |
|
|
|
$("#optionModal").modal('hide'); |
|
|
|
|
|
|
|
function selectOptionFn(pobj, jobj) { |
|
|
|
// var pobj = $(this).closest('td').parent(); |
|
|
|
console.log(pobj); |
|
|
|
// console.log(pobj.find('input[name=optionID]').val()); |
|
|
|
// console.log(jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html())); |
|
|
|
console.log(pobj.find('td').eq(0).html()); |
|
|
|
let sepc = pobj.find('td').eq(2).html() + '<br />(' + pobj.find('td').eq(3).html() + ')'; |
|
|
|
sepc = sepc.replace("()", "") |
|
|
|
jobj.html(pobj.find('td').eq(1).html() + " "); |
|
|
|
jobj.closest('td').parent().find('input[name=option_unit_price]').val(pobj.find('td').eq(6).html()); |
|
|
|
jobj.closest('td').parent().find('input[name=option_price_bp]').val(commafy(pobj.find('td').eq(6).html().replace(/[,]+/g, "") * jobj.closest('td').parent().find('input[name=option_qty]').val().replace(/[,]+/g, ""))); |
|
|
|
jobj.closest('td').parent().find('input[name=op_id]').val(pobj.find('td').eq(0).html()); |
|
|
|
$("#optionModal").modal('hide'); |
|
|
|
} |
|
|
|
|
|
|
|
function checkSubmit() { |
|
|
|