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> ">