|
@ -244,7 +244,7 @@ $option_str .= "</tbody></table>"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.modal-content { |
|
|
.modal-content { |
|
|
height: 710px; |
|
|
height: 760px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#optionModal .modal-body { |
|
|
#optionModal .modal-body { |
|
@ -796,6 +796,37 @@ $option_str .= "</tbody></table>"; |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
$('#tb3').on('click', 'a[name=btnfaci]', function() { |
|
|
|
|
|
var jobj = $(this); // 父視窗 |
|
|
|
|
|
if (jobj.closest('td').parent().find('a[name=option_href]').html() != '點選') { |
|
|
|
|
|
var k = 1; |
|
|
|
|
|
$("input[name=item_spec]").each(function() { |
|
|
|
|
|
if ($(this).val() == '') return; |
|
|
|
|
|
var objInput = document.createElement("input"); |
|
|
|
|
|
objInput.setAttribute("type", "checkbox"); |
|
|
|
|
|
objInput.setAttribute("name", "sub_faci"); |
|
|
|
|
|
objInput.setAttribute("value", k + '.' + $(this).val()); |
|
|
|
|
|
$("#optionFaciModal .modal-body").append(objInput); |
|
|
|
|
|
$("#optionFaciModal .modal-body").append(k + '.' + $(this).val()); |
|
|
|
|
|
$("#optionFaciModal .modal-body").append("<br>"); |
|
|
|
|
|
k++; |
|
|
|
|
|
}); |
|
|
|
|
|
$("#optionFaciModal .modal-body").append("<p><button type='button' name='btnpost' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>確定</span></button></p>"); |
|
|
|
|
|
$("#optionFaciModal").modal('show'); |
|
|
|
|
|
var str = ""; |
|
|
|
|
|
$("button[name=btnpost]").click(function() { |
|
|
|
|
|
$('input[name=sub_faci]').each(function() { |
|
|
|
|
|
if ($(this).prop('checked')) { |
|
|
|
|
|
str += $(this).val() + "<br>"; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
jobj.closest('td').parent().find('td[name=option_relate_facil]').html(str); |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
alert("請先新增OPTION"); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
$('#tb4').on('click', 'a[name=btnfaci]', function() { |
|
|
$('#tb4').on('click', 'a[name=btnfaci]', function() { |
|
|
var jobj = $(this); // 父視窗 |
|
|
var jobj = $(this); // 父視窗 |
|
|
if (jobj.closest('td').parent().find('select[name=mn_kind]').val() != '') { |
|
|
if (jobj.closest('td').parent().find('select[name=mn_kind]').val() != '') { |
|
@ -1188,19 +1219,19 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC); |
|
|
<span aria-hidden="true">×</span> |
|
|
<span aria-hidden="true">×</span> |
|
|
</button> |
|
|
</button> |
|
|
<label for="" > |
|
|
<label for="" > |
|
|
<input type="text" class="form-control" style="float:left" placeholder="搜尋..." /> |
|
|
<input type="text" class="form-control" style="float:left" placeholder="搜尋..." x-model="searchtext" @keyup="searchOptions($event)" /> |
|
|
</label> |
|
|
</label> |
|
|
<div class="categories"> |
|
|
<div class="categories"> |
|
|
<button :class="['btn', (kind==0) ? 'btn-primary' : 'btn-secondary text-light']" @click="">顯示全部</button> |
|
|
<button :class="['btn', (kind==0) ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory(0)">顯示全部</button> |
|
|
<button :class="['btn', (kind=='A') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('A')">A-1 車廂意匠</button> |
|
|
<button :class="['btn', (kind=='A') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('A')">A-1 車廂意匠</button> |
|
|
<button :class="['btn', (kind=='B') ? 'btn-primary' : 'btn-secondary text-light']">A-2 車廂內裝</button> |
|
|
<button :class="['btn', (kind=='B') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('B')">A-2 車廂內裝</button> |
|
|
<button :class="['btn', (kind=='C') ? 'btn-primary' : 'btn-secondary text-light']">A-3 車廂外部</button> |
|
|
<button :class="['btn', (kind=='C') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('C')">A-3 車廂外部</button> |
|
|
<button :class="['btn', (kind=='D') ? 'btn-primary' : 'btn-secondary text-light']">A-4 控制與其他</button> |
|
|
<button :class="['btn', (kind=='D') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('D')">A-4 控制與其他</button> |
|
|
<button :class="['btn', (kind=='E') ? 'btn-primary' : 'btn-secondary text-light']">B-1 平台梯</button> |
|
|
<button :class="['btn', (kind=='E') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('E')">B-1 平台梯</button> |
|
|
<button :class="['btn', (kind=='F') ? 'btn-primary' : 'btn-secondary text-light']">C-1 汰改</button> |
|
|
<button :class="['btn', (kind=='F') ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('F')">C-1 汰改</button> |
|
|
<br /><br /> |
|
|
<br /><br /> |
|
|
<template x-for="button in buttons" > |
|
|
<template x-for="button in buttons" > |
|
|
<button :class="['btn', (kind==button) ? 'btn-primary' : 'btn-secondary text-light']" @click="kind=button"> |
|
|
<button style="margin-right:3px" :class="['btn', (button.type == subkind) ? 'btn-primary' : 'btn-secondary text-light']" @click="changeCategory('sub', button.type)" x-text="button.name"></button> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
@ -1870,7 +1901,6 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
<?php |
|
|
<?php |
|
|
if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) { |
|
|
if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) { |
|
|
foreach ($last_pritem_arr["B"] as $k => $v) { |
|
|
foreach ($last_pritem_arr["B"] as $k => $v) { |
|
|
print_r($last_pritem_arr); |
|
|
|
|
|
?> |
|
|
?> |
|
|
<tr name="option_templ"> |
|
|
<tr name="option_templ"> |
|
|
<td name="option_seat"> |
|
|
<td name="option_seat"> |
|
@ -1914,7 +1944,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
?> |
|
|
?> |
|
|
<tr name="option_templ"> |
|
|
<tr name="option_templ"> |
|
|
<td name="option_seat"> |
|
|
<td name="option_seat"> |
|
|
<a href="" name="option_href" data-toggle="modal">點選</a> |
|
|
<a href="" name="option_href" data-toggle="modal" @click="searchtext = ''">點選</a> |
|
|
</td> |
|
|
</td> |
|
|
<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_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_qty" class="form-control" size="2" maxlength="2" value="<?php echo (isset($v["option_num"])) ? $v["option_num"] : 0; ?>"></td> |
|
@ -1962,8 +1992,10 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
<td><input type="text" name="except_qty" class="form-control" size="4" maxlength="4" value="<?php echo $v["item_qty"]; ?>"><input type="hidden" name="except_qty_ori" value="<?php echo $v["item_qty"]; ?>"></td> |
|
|
<td><input type="text" name="except_qty" class="form-control" size="4" maxlength="4" value="<?php echo $v["item_qty"]; ?>"><input type="hidden" name="except_qty_ori" value="<?php echo $v["item_qty"]; ?>"></td> |
|
|
<td><input type="text" name="except_price_bp" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_price_bp"]); ?>" readonly> |
|
|
<td><input type="text" name="except_price_bp" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_price_bp"]); ?>" readonly> |
|
|
<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="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> |
|
|
|
|
|
<td name="mn_relate_facil" nowrap></td> |
|
|
</tr> |
|
|
</tr> |
|
|
<?php |
|
|
<?php |
|
|
} |
|
|
} |
|
@ -1975,8 +2007,10 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){ |
|
|
<td><input type="text" name="except_unit_price" class="form-control dollar-right" size="8"></td> |
|
|
<td><input type="text" name="except_unit_price" class="form-control dollar-right" size="8"></td> |
|
|
<td><input type="text" name="except_qty" class="form-control" size="4" maxlength="4"></td> |
|
|
<td><input type="text" name="except_qty" class="form-control" size="4" maxlength="4"></td> |
|
|
<td><input type="text" name="except_price_bp" class="form-control dollar-right" size="8" readonly> |
|
|
<td><input type="text" name="except_price_bp" class="form-control dollar-right" size="8" readonly> |
|
|
|
|
|
<a href="javascript:void(0);" name="btnfaci" 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> |
|
|
|
|
|
<td name="mn_relate_facil" nowrap></td> |
|
|
</tr> |
|
|
</tr> |
|
|
<?php |
|
|
<?php |
|
|
} |
|
|
} |
|
|