Browse Source

pricereview-check update

main
Cheng 1 year ago
parent
commit
a1fa0938ea
  1. 11
      wms/mkt/pricereview-check.php
  2. 9
      wms/mkt/pricereview-create.php

11
wms/mkt/pricereview-check.php

@ -246,7 +246,8 @@ foreach ($res as $data) {
mysqli_free_result($res_p); mysqli_free_result($res_p);
function getMI($id){ function getMI($id)
{
$specarr = []; $specarr = [];
$elno = []; $elno = [];
require_once("./conn.php"); require_once("./conn.php");
@ -276,7 +277,6 @@ foreach ($res as $data) {
$speed = str_replace("CO", "", $openfn); $speed = str_replace("CO", "", $openfn);
$openname = "CO"; $openname = "CO";
} else { } else {
} }
// specarr[] = [trim(explode("-", $item['item_spec'])[0]), explode("*", explode("-", $item['item_spec'])[1])[1]]; // specarr[] = [trim(explode("-", $item['item_spec'])[0]), explode("*", explode("-", $item['item_spec'])[1])[1]];
@ -302,7 +302,6 @@ foreach ($res as $data) {
} }
} }
} }
} }
getMI($id); getMI($id);
?> ?>
@ -367,7 +366,11 @@ foreach ($res as $data) {
mihtml += "<li>" + data.content[k][18][m][0] + ":" + commafy(data.content[k][18][m][1]) + "</li>"; mihtml += "<li>" + data.content[k][18][m][0] + ":" + commafy(data.content[k][18][m][1]) + "</li>";
}); });
mihtml += "<li>" + data.content[k][19][0] + ":" + commafy(data.content[k][19][1]) + "</li>"; mihtml += "<li>" + data.content[k][19][0] + ":" + commafy(data.content[k][19][1]) + "</li>";
mihtml += "以上合計:" + commafy(data.content[k][13]) + "<br>"; // 總價 + 服務費
let total = data.content[k][13] + data.content[k][19][1];
mihtml += "以上合計:" + commafy(total) +
"<br>";
// console.log(data.content[k][13] + data.content[k][19][1])
$("#tb1").find("tr[name=facil_templ2]").eq(k).find('td').eq(1).html(mihtml); $("#tb1").find("tr[name=facil_templ2]").eq(k).find('td').eq(1).html(mihtml);
//$("#tb1").find("input[name=mi_fix]").eq(k).closest('td').append(mihtml); //$("#tb1").find("input[name=mi_fix]").eq(k).closest('td').append(mihtml);
}); });

9
wms/mkt/pricereview-create.php

@ -756,10 +756,10 @@ $option_str .= "</tbody></table>";
var pobj = $(this).closest('td').parent(); var pobj = $(this).closest('td').parent();
// 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(6).html());
jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html() + '<br />(' + pobj.find('td').eq(2).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_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(5).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');
@ -1974,6 +1974,9 @@ if($_SERVER["REQUEST_METHOD"] == "POST"){
<?php <?php
} }
} else { } else {
echo '<pre>';
print_r($v["option_price"]);
echo '</pre>';
?> ?>
<tr name="option_templ"> <tr name="option_templ">
<td name="option_seat"> <td name="option_seat">

Loading…
Cancel
Save