From a2df7a4f618dcb427758ef3f534852c6e37951a0 Mon Sep 17 00:00:00 2001 From: Cheng Date: Tue, 9 Jan 2024 18:07:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=A4=E5=A4=96=E8=B2=BB=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/fun_global.php | 2 +- wms/mkt/pricereview-create.php | 53 ++++++++++++++++++++------ wms/mkt/pricereview-index.php | 6 +-- wms/mkt/pricereview-record-submit.php | 7 +++- wms/mkt/pricereview_renovate-index.php | 2 +- 5 files changed, 51 insertions(+), 19 deletions(-) diff --git a/wms/fun_global.php b/wms/fun_global.php index 6bf9e017..a9fa465f 100644 --- a/wms/fun_global.php +++ b/wms/fun_global.php @@ -223,7 +223,7 @@ function accountid2name() global $link; $arr = []; - $sql = "select accountid, name from account where accounttype in ('B','E','M')"; + $sql = "select accountid, name from account where 1=1"; $res = mysqli_query($link, $sql); while ($row = mysqli_fetch_row($res)) { $arr[$row[0]] = $row[1]; diff --git a/wms/mkt/pricereview-create.php b/wms/mkt/pricereview-create.php index a1d86d4f..bba18a5e 100644 --- a/wms/mkt/pricereview-create.php +++ b/wms/mkt/pricereview-create.php @@ -743,7 +743,7 @@ $option_str .= ""; $("#optionModal .modal-body td").unbind().click(function() { var pobj = $(this).closest('td').parent(); console.log(jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html())); - console.log(pobj.find('td').eq(0).html()+ pobj.find('td').eq(2).html() + ' ' + pobj.find('td').eq(1).html()); + console.log(pobj.find('td').eq(0).html() + pobj.find('td').eq(2).html() + ' ' + pobj.find('td').eq(1).html()); jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html() + '
(' + 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_price_bp]').val(commafy(pobj.find('td').eq(5).html().replace(/[,]+/g, "") * jobj.closest('td').parent().find('input[name=option_qty]').val().replace(/[,]+/g, ""))); @@ -820,7 +820,7 @@ $option_str .= ""; str += $(this).val() + "
"; } }); - jobj.closest('td').parent().find('td[name=option_relate_facil]').html(str); + jobj.closest('td').parent().find('td[name=Exclusions]').html(str); }); } else { alert("請先新增OPTION"); @@ -1065,6 +1065,9 @@ $option_str .= ""; }) $('#option_relate_facil_all').val(optionRelateFacilArr); var mnIdArr = []; + + + $("input[name='mn_id']").each(function() { mnIdArr.push($(this).val()); }) @@ -1115,11 +1118,21 @@ $option_str .= ""; }) $('#mn_relate_facil_all').val(mnRelateFacilArr); var exNoteArr = []; + + $("input[name='except_note']").each(function() { exNoteArr.push($(this).val()); }) $('#except_note_all').val(exNoteArr); var exSpecArr = []; + + $("td[name='Exclusions']").each(function() { + exNoteArr.push($(this).html()); + }) + $('#Exclusions_all').val(exNoteArr); + var exSpecArr = []; + + $("input[name='except_spec']").each(function() { exSpecArr.push($(this).val()); }) @@ -1174,7 +1187,7 @@ $option_str .= ""; }); }); -prepare($sql_str); @@ -1218,7 +1231,7 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC); -