From c8c0f0baf0ef60cd9abbae46a74071b0f41a8444 Mon Sep 17 00:00:00 2001 From: 10994015 Date: Tue, 23 Jan 2024 18:12:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E6=A2=AF=E5=83=B9=E5=AF=A9=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=80=81=E7=B0=BD=E6=A0=B8=E6=88=90=E5=8A=9F=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E5=B0=8E=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/mkt/pricereview-check.php | 14 ++++++++----- wms/mkt/pricereview-create.php | 37 ++++++++++++++++++++++++++++++++-- wms/mkt/pricereview_mi-api.php | 15 +++++++++++++- 3 files changed, 58 insertions(+), 8 deletions(-) diff --git a/wms/mkt/pricereview-check.php b/wms/mkt/pricereview-check.php index e7f745e4..79f5eec1 100644 --- a/wms/mkt/pricereview-check.php +++ b/wms/mkt/pricereview-check.php @@ -326,6 +326,11 @@ foreach ($res as $data) { if (this.readyState == 4 && this.status == 200) { data = JSON.parse(this.responseText); console.log(data); + if(data.err == "notfoundmi"){ + for(let i=0;i', k); - // console.log(data.content); + console.log(data.content); //console.log(data.content[k][0]); // 有值表示先前已寫入MI if ($("#tb1").find("input[name=mi_fix]").eq(k).val() == "") { @@ -356,7 +361,7 @@ foreach ($res as $data) { mihtml += "
  • 一年免保:" + commafy(data.content[k][6]) + "
  • "; mihtml += "
  • 起吊+木箱+耗材:" + commafy(data.content[k][7]) + "
  • "; //mihtml += "
  • 加價:"+commafy(data.content[k][9])+"
  • "; - mihtml += "以上合計:" + commafy(data.content[k][12]) + "/台"; + mihtml += "以上合計:" + commafy(data.content[k][12]) + "/台" ; mihtml += "
    "; mihtml += "
    OPTION
    "; total_mi = total_mi + data.content[k][12]; @@ -385,6 +390,7 @@ foreach ($res as $data) { } $("#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); + console.log(document.getElementsByClassName('total_mi_fix')[k]); document.getElementsByClassName('total_mi_fix')[k].value = commafy(total_mi) // document.getElementsByClassName('item_price_ct')[k].value =commafy(total_mi) @@ -392,8 +398,6 @@ foreach ($res as $data) { document.getElementsByClassName('gross_profit_rate')[k].value = Math.round((Number(document.getElementsByClassName('gross_profit')[k].value.replace(/[,]+/g, "")) / Number(document.getElementsByClassName('item_price_ct')[k].value.replace(/[,]+/g, "")) * 100) * 10) / 10 }); } - - } xhr.open('POST', 'pricereview_mi-api.php', true); xhr.send(formdata); @@ -588,7 +592,7 @@ foreach ($res as $data) { [規調] "> - "> + " disabled> ">