diff --git a/wms/bons/api/get.php b/wms/bons/api/get.php index f2ad2a5e..b50687a3 100644 --- a/wms/bons/api/get.php +++ b/wms/bons/api/get.php @@ -1,9 +1,11 @@ prepare($sql); - $stmt->execute(); - $data = $stmt->fetch(PDO::FETCH_ASSOC); - $data['amount'] = intval($data['amount']); - $checkBillNo = $data['CBno']; +$stmt = $connT8->prepare($sql); +$stmt->execute(); +$data = $stmt->fetch(PDO::FETCH_ASSOC); +$data['amount'] = intval($data['amount']); +$checkBillNo = $data['CBno']; - $sql = "SELECT +$sql = "SELECT c.BillDate AS CheckBillDate FROM arWriteOffBill AS a LEFT JOIN arWriteOffBillRec AS b ON a.BillNo=b.BillNo @@ -44,26 +46,30 @@ if (!empty($_GET['contract_no'])) { WHERE c.checkBillNo = '$checkBillNo' "; - $stmt = $connT8->prepare($sql); - $stmt->execute(); - $check = $stmt->fetch(PDO::FETCH_ASSOC); +$stmt = $connT8->prepare($sql); +$stmt->execute(); +$check = $stmt->fetch(PDO::FETCH_ASSOC); + - $sql = "SELECT SQuantity FROM salIncomeApplyMaster WHERE BillNo = '$contract_no'"; - $stmt = $connT8->prepare($sql); - $stmt->execute(); - $result = $stmt->fetch(PDO::FETCH_ASSOC); - $count = COUNT($result); - $data['maintain_month'] = intval($conunt * $result['Squantity']); +$CU_MaterialId = $data['facility']; +$sql = "SELECT SQuantity FROM salIncomeApplyDetail WHERE BillNo = :contract_no AND CU_MaterialId = :CU_MaterialId"; +$stmt = $connT8->prepare($sql); +$stmt->bindParam(':contract_no', $contract_no); +$stmt->bindParam(':CU_MaterialId', $CU_MaterialId); +$stmt->execute(); +$result = $stmt->fetchAll(PDO::FETCH_ASSOC); +$count = COUNT($result); +$data['maintain_month'] = intval($count * $result[0]['SQuantity']); - if (!empty($check['CheckBillDate'])) { - header('Content-Type: application/json'); - echo json_encode($data); - } else { - echo false; - exit; - } +if (!empty($check['CheckBillDate'])) { + header('Content-Type: application/json'); + echo json_encode($data); +} else { + echo false; + exit; } +// } diff --git a/wms/bons/bons_index.php b/wms/bons/bons_index.php index 56f7af52..0ee7058a 100644 --- a/wms/bons/bons_index.php +++ b/wms/bons/bons_index.php @@ -87,6 +87,23 @@ require_once('../contract-repair/conn.php'); + + + + + + 獎金確認項 + + + 返回 + 關閉 + + + + + + + diff --git a/wms/contract-repair/js/alpine.js b/wms/contract-repair/js/alpine.js index 292ce38c..326d6908 100644 --- a/wms/contract-repair/js/alpine.js +++ b/wms/contract-repair/js/alpine.js @@ -895,7 +895,7 @@ const bonsIndex = () => { this.getContractData(); } else if (this.step == 2) { if (!this.data.disabled) { - this.createElevator(); + this.calBons(); } } this.step = 3; @@ -925,6 +925,7 @@ const bonsIndex = () => { this.data.receiver = res.data.personId; this.data.maintain_price_toal = res.data.amount; this.data.bons_verson = 2; + this.data.maintain_month = res.data.maintain_month; } this.step = 2; this.isLoading = false; @@ -933,12 +934,16 @@ const bonsIndex = () => { }) }, preStepFn() { + this.step = 1 if (this.step == 2) { - console.log + } }, save() { + }, + calBons() { + console.log('123'); }, errorFn() { let msg = ''; diff --git a/wms/mkt/pricereview-edit.php b/wms/mkt/pricereview-edit.php index 61cee874..3868a44f 100644 --- a/wms/mkt/pricereview-edit.php +++ b/wms/mkt/pricereview-edit.php @@ -1021,6 +1021,11 @@ foreach ($res as $data) { }) $('#mn_kind_all').val(mnKindArr); var mnSeatArr = []; + $("td[name='Exclusions']").each(function() { + exRelateFacilArr.push($(this).html()); + }) + $('#Exclusions_all').val(exRelateFacilArr); + var exSpecArr = []; $("select[name='mn_seat']").each(function() { mnSeatArr.push($(this).val()); }) @@ -1519,7 +1524,6 @@ foreach ($res as $data) { - 電梯 X @@ -1996,6 +2000,7 @@ foreach ($res as $data) { +