Browse Source

OPTION

main
Cheng 1 year ago
parent
commit
36818799fc
  1. 12
      wms/cont/apply_form.php
  2. 2
      wms/contract/contract-new-apply.php
  3. 2
      wms/mkt/assets/js/alpine.js
  4. 16
      wms/mkt/pricereview-create.php
  5. 6
      wms/mkt/pricereview-record-submit.php
  6. 4
      wms/mkt/pricereview_repair-record-submit.php
  7. 1
      wms/sign/sign_form.php

12
wms/cont/apply_form.php

@ -279,9 +279,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
<script type="text/javascript" src="<?php echo base_url('js/wf_property.js?') . rand(10, 100); ?>"></script> <script type="text/javascript" src="<?php echo base_url('js/wf_property.js?') . rand(10, 100); ?>"></script>
<script type="text/javascript" src="<?php echo base_url('js/flow_chart.js?' . rand(10, 100)); ?>"></script> <script type="text/javascript" src="<?php echo base_url('js/flow_chart.js?' . rand(10, 100)); ?>"></script>
<script src="<?php echo base_url('js/validate/jquery.validate.min.js?' . rand(10, 100)); ?>"></script> <script src="<?php echo base_url('js/validate/jquery.validate.min.js?' . rand(10, 100)); ?>"></script>
<script src="<?php echo base_url('js/validate/messages_zh_TW.js?' . rand(10, 100)); ?>"> <script src="<?php echo base_url('js/validate/messages_zh_TW.js?' . rand(10, 100)); ?>"></script>
</script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url('css/form.css?') . rand(10, 100); ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('css/form.css?') . rand(10, 100); ?>" />
<script type="text/javascript"> <script type="text/javascript">
window.param = { window.param = {
@ -387,7 +385,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
$('#reg_del').val(regDelStr); $('#reg_del').val(regDelStr);
}); });
}); });
addRow = function() { const addRow = function() {
if ($('#maintain_kind').val() == "") { if ($('#maintain_kind').val() == "") {
alert("請選擇保養方式!"); alert("請選擇保養方式!");
$('#maintain_kind').eq(0).focus(); $('#maintain_kind').eq(0).focus();
@ -482,7 +480,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
}); });
} }
delRow = function(btn) { const delRow = function(btn) {
if ($(btn).attr('name') == 'btn1') { if ($(btn).attr('name') == 'btn1') {
//console.log($(btn).parent().parent().prev('tr').find('input[id=register_code]').val()); //console.log($(btn).parent().parent().prev('tr').find('input[id=register_code]').val());
regDelStr += $(btn).parent().parent().find('input[id=register_code]').val() + ","; regDelStr += $(btn).parent().parent().find('input[id=register_code]').val() + ",";
@ -494,7 +492,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
} }
$(btn).parent().parent().remove(); $(btn).parent().parent().remove();
} }
setStandPrice = function(p, obj) { const setStandPrice = function(p, obj) {
$.ajax({ $.ajax({
url: '../cont/t.php', url: '../cont/t.php',
data: p, data: p,
@ -530,7 +528,7 @@ if ($result['department_id'] == 'M0137' || $result['department_id'] == 'M0086' |
}); });
} }
addNewBrand = function() { const addNewBrand = function() {
var new_brand = $("#new_brand").val(); var new_brand = $("#new_brand").val();
if (new_brand != '') { if (new_brand != '') {
p = { p = {

2
wms/contract/contract-new-apply.php

@ -577,7 +577,7 @@ $person = $contract['person'];
<?php <?php
if (($user_id === "M0107" || $user_id == "TEST02") && $contract['progress'] <= 1) { if (($user_id === "M0107" || $user_id == "TEST02") && $contract['progress'] <= 1) {
echo "同意(上呈)"; echo "同意(上呈)";
} elseif (($user_id === "M0060" || $user_id == "TEST03") && $contract['progress'] == 2) { // } elseif (($user_id === "M0060" || $user_id == "TEST03") && $contract['progress'] == 2) {
echo "同意(結案)"; echo "同意(結案)";
} }
?> ?>

2
wms/mkt/assets/js/alpine.js

@ -197,10 +197,10 @@ const priceOptionSelect = ()=>{
const pricereviewOptionSelect = () => { const pricereviewOptionSelect = () => {
return { return {
init() { init() {
console.log(options);
this.optionCategory = 0 this.optionCategory = 0
this.initButtons(); this.initButtons();
}, },
id: 1233,
options: options, options: options,
orioptions: options, orioptions: options,
optionalArr: { optionalArr: {

16
wms/mkt/pricereview-create.php

@ -1050,6 +1050,11 @@ $option_str .= "</tbody></table>";
optionSeatArr.push($(this).html() + "@@"); optionSeatArr.push($(this).html() + "@@");
}) })
$('#option_seat_all').val(optionSeatArr); $('#option_seat_all').val(optionSeatArr);
var optionID = [];
$("td[class='_optionid']").each(function() {
optionID.push($(this).val());
})
$('#optionid_all').val()
var optionUnitPriceArr = []; var optionUnitPriceArr = [];
$("input[name='option_unit_price']").each(function() { $("input[name='option_unit_price']").each(function() {
optionUnitPriceArr.push($(this).val().replace(/[,]+/g, "")); optionUnitPriceArr.push($(this).val().replace(/[,]+/g, ""));
@ -1077,11 +1082,11 @@ $option_str .= "</tbody></table>";
$('#option_relate_facil_all').val(optionRelateFacilArr); $('#option_relate_facil_all').val(optionRelateFacilArr);
var mnIdArr = []; var mnIdArr = [];
$("input[name='mn_id']").each(function() { $("input[name='mn_id']").each(function() {
mnIdArr.push($(this).val()); mnIdArr.push($(this).val());
}) })
$('#mn_id_all').val(mnIdArr); $('#mn_id_all').val(mnIdArr);
var mnKindArr = []; var mnKindArr = [];
$("select[name='mn_kind']").each(function() { $("select[name='mn_kind']").each(function() {
@ -1264,6 +1269,7 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC);
<table id="" class="table table-striped table-bordered" style="width:100%"> <table id="" class="table table-striped table-bordered" style="width:100%">
<thead> <thead>
<tr class="kind-col"> <tr class="kind-col">
<th scope='col'>ID</th>
<th scope="col" nowrap>名稱</th> <th scope="col" nowrap>名稱</th>
<th scope="col" nowrap>規格</th> <th scope="col" nowrap>規格</th>
<th scope="col" nowrap>備註</th> <th scope="col" nowrap>備註</th>
@ -1275,6 +1281,7 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC);
<tbody> <tbody>
<template x-for="option in options"> <template x-for="option in options">
<tr style="cursor:pointer"> <tr style="cursor:pointer">
<td x-text='option.id' class='_optionid'></td>
<td x-text="option.group_name"> </td> <td x-text="option.group_name"> </td>
<td x-text="option.spec"></td> <td x-text="option.spec"></td>
<td x-text="option.memo"></td> <td x-text="option.memo"></td>
@ -1933,7 +1940,7 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<td><input type="text" name="option_unit_price" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_unit_price"]); ?>" readonly></td> <td><input type="text" name="option_unit_price" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_unit_price"]); ?>" readonly></td>
<td><input type="text" name="option_qty" class="form-control" size="2" maxlength="2" value="<?php echo $v["item_qty"]; ?>"></td> <td><input type="text" name="option_qty" class="form-control" size="2" maxlength="2" value="<?php echo $v["item_qty"]; ?>"></td>
<td><input type="text" name="option_price_bp" class="form-control dollar-right" size="8" value="<?php echo number_format($v["item_price_bp"]); ?>" readonly> <td><input type="text" name="option_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="B"><input type="hidden" name="op_id" value="<?php echo $v["price_id"]; ?>"> <input type="hidden" name="item_group" value="B"><input type="hidden" name="op_id" value="<?php echo $v["id"]; ?>">
</td> </td>
<td><input type="text" name="option_memo" class="form-control" size="20" values="<?php echo $v["memo"]; ?>"></td> <td><input type="text" name="option_memo" class="form-control" size="20" values="<?php echo $v["memo"]; ?>"></td>
<td name="option_relate_facil"></td> <td name="option_relate_facil"></td>
@ -2478,7 +2485,8 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<input type="hidden" name="pay_amount_all" id="pay_amount_all"> <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="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="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="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_seat_all" id="option_seat_all">
<input type="hidden" name="option_unit_price_all" id="option_unit_price_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"> <input type="hidden" name="option_qty_all" id="option_qty_all">

6
wms/mkt/pricereview-record-submit.php

@ -1,7 +1,9 @@
<?php <?php
if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_SERVER["REQUEST_METHOD"] == "POST") {
// print_r($_POST); echo '<pre>';
// exit; print_r($_POST);
echo '</pre>';
exit;
foreach ($_POST as $k => $v) { foreach ($_POST as $k => $v) {
$$k = htmlspecialchars(stripslashes(trim($v))); $$k = htmlspecialchars(stripslashes(trim($v)));
} }

4
wms/mkt/pricereview_repair-record-submit.php

@ -1,8 +1,4 @@
<?php <?php
// echo '<pre>';
// print_r($_POST);
// echo '</pre>';
// exit();
if ($_SERVER["REQUEST_METHOD"] == "POST") { if ($_SERVER["REQUEST_METHOD"] == "POST") {
//print_r($_POST);exit; //print_r($_POST);exit;
foreach ($_POST as $k => $v) { foreach ($_POST as $k => $v) {

1
wms/sign/sign_form.php

@ -599,4 +599,3 @@ function base_url($url)
</div> </div>
</body> </body>
<?php ?>
Loading…
Cancel
Save