|
|
@ -749,17 +749,18 @@ $option_str .= "</tbody></table>"; |
|
|
|
$('#table_index2_filter input').keyup(); // 恢復search前狀態 |
|
|
|
}); |
|
|
|
$('#tb2').on('focus', 'tr[name=option_templ] a[name=option_href]', function() { |
|
|
|
|
|
|
|
$("#optionModal").modal('show'); |
|
|
|
var jobj = $(this); // 父視窗 |
|
|
|
$("#optionModal .modal-body td").unbind().click(function() { |
|
|
|
var pobj = $(this).closest('td').parent(); |
|
|
|
console.log(1111111111111); |
|
|
|
console.log(jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html())); |
|
|
|
console.log(pobj.find('td').eq(0).html() + pobj.find('td').eq(2).html() + ' ' + pobj.find('td').eq(1).html()); |
|
|
|
// 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()); |
|
|
|
jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html() + '<br />(' + pobj.find('td').eq(2).html() + ')'); |
|
|
|
jobj.closest('td').parent().find('input[name=option_unit_price]').val(pobj.find('td').eq(5).html()); |
|
|
|
jobj.closest('td').parent().find('input[name=option_price_bp]').val(commafy(pobj.find('td').eq(5).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('input[name=option_id]').val()); |
|
|
|
jobj.closest('td').parent().find('input[name=op_id]').val(pobj.find('td').eq(0).html()); |
|
|
|
$("#optionModal").modal('hide'); |
|
|
|
|
|
|
|
}); |
|
|
@ -1051,11 +1052,11 @@ $option_str .= "</tbody></table>"; |
|
|
|
optionSeatArr.push($(this).html() + "@@"); |
|
|
|
}) |
|
|
|
$('#option_seat_all').val(optionSeatArr); |
|
|
|
var optionID = []; |
|
|
|
$("td[class='_optionid']").each(function() { |
|
|
|
optionID.push($(this).val()); |
|
|
|
}) |
|
|
|
$('#optionid_all').val() |
|
|
|
// var optionID = []; |
|
|
|
// $("td[class='_optionid']").each(function() { |
|
|
|
// optionID.push($(this).val()); |
|
|
|
// }) |
|
|
|
// $('#optionid_all').val() |
|
|
|
var optionUnitPriceArr = []; |
|
|
|
$("input[name='option_unit_price']").each(function() { |
|
|
|
optionUnitPriceArr.push($(this).val().replace(/[,]+/g, "")); |
|
|
@ -1282,7 +1283,7 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC); |
|
|
|
<tbody> |
|
|
|
<template x-for="option in options"> |
|
|
|
<tr style="cursor:pointer"> |
|
|
|
<td x-text='option.id' class='_optionid'></td> |
|
|
|
<td x-text='option.id' name="optionID"></td> |
|
|
|
<td x-text="option.group_name"> </td> |
|
|
|
<td x-text="option.spec"></td> |
|
|
|
<td x-text="option.memo"></td> |
|
|
@ -1962,7 +1963,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
|
<td><input type="text" name="option_qty" class="form-control" size="2" maxlength="2" value="<?php echo (isset($v["option_num"])) ? $v["option_num"] : 0; ?>"></td> |
|
|
|
<td><input type="text" name="option_price_bp" class="form-control dollar-right" size="8" value="<?php echo (isset($v["option_price"]) && isset($v["option_num"])) ? number_format($v["option_price"] * $v["option_num"]) : 0; ?>" readonly> |
|
|
|
<input type="hidden" name="item_group" value="B"> |
|
|
|
<input type="hidden" name="op_id" value="<?php echo isset($v['id']) ? $v['id'] : ""; ?>"> |
|
|
|
<input type="hidden" name="op_id" class="optionshow" value="<?php echo isset($v['id']) ? $v['id'] : ""; ?>"> |
|
|
|
</td> |
|
|
|
<td><input type="text" name="option_memo" class="form-control" size="20"></td> |
|
|
|
<td name="option_relate_facil"></td> |
|
|
@ -1981,7 +1982,8 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
|
<td><input type="text" name="option_unit_price" class="form-control dollar-right" size="8" value="<?php echo (isset($v["option_price"])) ? number_format($v["option_price"]) : 0; ?>" readonly></td> |
|
|
|
<td><input type="text" name="option_qty" class="form-control" size="2" maxlength="2" value="<?php echo (isset($v["option_num"])) ? $v["option_num"] : 0; ?>"></td> |
|
|
|
<td><input type="text" name="option_price_bp" class="form-control dollar-right" size="8" value="<?php echo (isset($v["option_price"]) && isset($v["option_num"])) ? number_format($v["option_price"] * $v["option_num"]) : 0; ?>" readonly> |
|
|
|
<input type="hidden" name="item_group" value="B"><input type="hidden" name="op_id"> |
|
|
|
<input type="hidden" name="item_group" value="B"> |
|
|
|
<input type="hidden" name="op_id" value=""> |
|
|
|
</td> |
|
|
|
<td><input type="text" name="option_memo" class="form-control" size="20"></td> |
|
|
|
<td name="option_relate_facil"></td> |
|
|
@ -2486,8 +2488,8 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
|
<input type="hidden" name="pay_amount_all" id="pay_amount_all"> |
|
|
|
<input type="hidden" name="pay_period_all" id="pay_period_all"> |
|
|
|
<input type="hidden" name="vol_no" id="vol_no" value="<?php echo $vol_no; ?>"> |
|
|
|
<!-- <input type="hidden" name="op_id_all" id="op_id_all"> --> |
|
|
|
<input type="hidden" name="optionid_all" id="optionid_all"> |
|
|
|
<input type="hidden" name="op_id_all" id="op_id_all"> |
|
|
|
<!-- <input type="hidden" name="optionid_all" id="optionid_all"> --> |
|
|
|
<input type="hidden" name="option_seat_all" id="option_seat_all"> |
|
|
|
<input type="hidden" name="option_unit_price_all" id="option_unit_price_all"> |
|
|
|
<input type="hidden" name="option_qty_all" id="option_qty_all"> |
|
|
|