diff --git a/wms/contract-repair/api/bpmAPI.php b/wms/contract-repair/api/bpmAPI.php new file mode 100644 index 00000000..b6b686be --- /dev/null +++ b/wms/contract-repair/api/bpmAPI.php @@ -0,0 +1,13 @@ +prepare($sql); +$stmt->execute(); +$result = $stmt->fetch(PDO::FETCH_ASSOC); + +// echo '
';
+// print_r(json_encode($result));
+// echo '
'; + +return json_encode($result); diff --git a/wms/crm/crmm02-index.php b/wms/crm/crmm02-index.php index 92a073d4..1e18dcd3 100644 --- a/wms/crm/crmm02-index.php +++ b/wms/crm/crmm02-index.php @@ -170,7 +170,7 @@ if ($data) : - + 轉價審 diff --git a/wms/mkt/assets/js/alpine.js b/wms/mkt/assets/js/alpine.js index ec04fbd2..92bb356c 100644 --- a/wms/mkt/assets/js/alpine.js +++ b/wms/mkt/assets/js/alpine.js @@ -199,8 +199,8 @@ const pricereviewOptionSelect = () => { init() { this.optionCategory = 0 this.initButtons(); + console.log(this.options) }, - id: 1233, options: options, orioptions: options, optionalArr: { diff --git a/wms/mkt/pricereview-create.php b/wms/mkt/pricereview-create.php index 6ef6ed92..79fdffdd 100644 --- a/wms/mkt/pricereview-create.php +++ b/wms/mkt/pricereview-create.php @@ -749,16 +749,18 @@ $option_str .= ""; $('#table_index2_filter input').keyup(); // 恢復search前狀態 }); $('#tb2').on('focus', 'tr[name=option_templ] a[name=option_href]', function() { + $("#optionModal").modal('show'); var jobj = $(this); // 父視窗 $("#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('input[name=optionID]').val()); + // console.log(jobj.html(pobj.find('td').eq(0).html() + ' ' + pobj.find('td').eq(1).html())); + console.log(pobj.find('td').eq(0).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, ""))); - jobj.closest('td').parent().find('input[name=op_id]').val(pobj.find('input[name=option_id]').val()); + jobj.closest('td').parent().find('input[name=op_id]').val(pobj.find('td').eq(0).html()); $("#optionModal").modal('hide'); }); @@ -1050,11 +1052,11 @@ $option_str .= ""; optionSeatArr.push($(this).html() + "@@"); }) $('#option_seat_all').val(optionSeatArr); - var optionID = []; - $("td[class='_optionid']").each(function() { - optionID.push($(this).val()); - }) - $('#optionid_all').val() + // var optionID = []; + // $("td[class='_optionid']").each(function() { + // optionID.push($(this).val()); + // }) + // $('#optionid_all').val() var optionUnitPriceArr = []; $("input[name='option_unit_price']").each(function() { optionUnitPriceArr.push($(this).val().replace(/[,]+/g, "")); @@ -1281,7 +1283,7 @@ $options = $stmt->fetchAll(PDO::FETCH_ASSOC);