|
@ -754,7 +754,7 @@ $option_str .= "</tbody></table>"; |
|
|
|
|
|
|
|
|
$("#optionModal").modal('show'); |
|
|
$("#optionModal").modal('show'); |
|
|
var jobj = $(this); // 父視窗 |
|
|
var jobj = $(this); // 父視窗 |
|
|
$("#optionModal .modal-body td").unbind().click(function(){ |
|
|
$("#optionModal .modal-body td").unbind().click(function() { |
|
|
var pobj = $(this).closest('td').parent(); |
|
|
var pobj = $(this).closest('td').parent(); |
|
|
selectOptionFn(pobj, jobj) |
|
|
selectOptionFn(pobj, jobj) |
|
|
}); |
|
|
}); |
|
@ -1198,7 +1198,7 @@ $option_str .= "</tbody></table>"; |
|
|
return rv3 = false; |
|
|
return rv3 = false; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
if ((rv3 === false)) return rv3; |
|
|
if ((rv3 === false)) return rv3; |
|
|
|
|
|
|
|
|
var rv4 = true; |
|
|
var rv4 = true; |
|
|
$("input[name='item_unit_price']").each(function() { |
|
|
$("input[name='item_unit_price']").each(function() { |
|
@ -2061,7 +2061,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
<td name="Exclusions"></td> |
|
|
<td name="Exclusions"></td> |
|
|
<td name="mn_relate_facil" nowrap> |
|
|
<td name="mn_relate_facil" nowrap> |
|
|
<input type="hidden" name="item_group" value="E"> |
|
|
<input type="hidden" name="item_group" value="E"> |
|
|
<a href="javascript:void(0);" name="btnfaci" class="btn btn-danger btn-sm">電梯</a> |
|
|
<a href="javascript:void(0);" name="F" class="btn btn-danger btn-sm">電梯</a> |
|
|
<a href="javascript:void(0);" name="btndel3" class="btn btn-danger btn-sm">X</a> |
|
|
<a href="javascript:void(0);" name="btndel3" class="btn btn-danger btn-sm">X</a> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
@ -2486,7 +2486,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
<input type="file" name="attatch2" id="attatch2"><a href="javascript:void(0);" name="filedel2" class="btn btn-danger btn-sm">X</a> |
|
|
<input type="file" name="attatch2" id="attatch2"><a href="javascript:void(0);" name="filedel2" class="btn btn-danger btn-sm">X</a> |
|
|
<div class="nextline"></div><br> |
|
|
<div class="nextline"></div><br> |
|
|
<button type="submit" name="save" id="save" value="save">保存</button> |
|
|
<button type="submit" name="save" id="save" value="save">保存</button> |
|
|
<button type="submit" name="submit" id="submit" value="tosign" >提交</button> |
|
|
<button type="submit" name="submit" id="submit" value="tosign">提交</button> |
|
|
|
|
|
|
|
|
<input type="hidden" name="fp_id_all" id="fp_id_all"> |
|
|
<input type="hidden" name="fp_id_all" id="fp_id_all"> |
|
|
<input type="hidden" name="fp_kind_all" id="fp_kind_all"> |
|
|
<input type="hidden" name="fp_kind_all" id="fp_kind_all"> |
|
@ -2549,21 +2549,22 @@ include "../footer.php"; |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
const options = [...<?php echo json_encode($options); ?>]; |
|
|
const options = [...<?php echo json_encode($options); ?>]; |
|
|
|
|
|
|
|
|
function selectOptionFn(pobj, jobj){ |
|
|
function selectOptionFn(pobj, jobj) { |
|
|
// var pobj = $(this).closest('td').parent(); |
|
|
// var pobj = $(this).closest('td').parent(); |
|
|
console.log(pobj); |
|
|
console.log(pobj); |
|
|
// console.log(pobj.find('input[name=optionID]').val()); |
|
|
// 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(jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html())); |
|
|
console.log(pobj.find('td').eq(0).html()); |
|
|
console.log(pobj.find('td').eq(0).html()); |
|
|
jobj.html(pobj.find('td').eq(1).html() + " " + pobj.find('td').eq(2).html() + '<br />(' + pobj.find('td').eq(3).html() + ')'); |
|
|
jobj.html(pobj.find('td').eq(1).html() + " " + pobj.find('td').eq(2).html() + '<br />(' + pobj.find('td').eq(3).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_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=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()); |
|
|
jobj.closest('td').parent().find('input[name=op_id]').val(pobj.find('td').eq(0).html()); |
|
|
$("#optionModal").modal('hide'); |
|
|
$("#optionModal").modal('hide'); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
function checkSubmit(){ |
|
|
|
|
|
|
|
|
function checkSubmit() { |
|
|
const price_total = document.getElementById('price_total') |
|
|
const price_total = document.getElementById('price_total') |
|
|
|
|
|
|
|
|
if (Number(price_total.value.replace(",", "")) > 0) { |
|
|
if (Number(price_total.value.replace(",", "")) > 0) { |
|
|