diff --git a/wms/contract-repair/insertFacility.php b/wms/contract-repair/insertFacility.php index 788976f3..c15206f1 100644 --- a/wms/contract-repair/insertFacility.php +++ b/wms/contract-repair/insertFacility.php @@ -5,7 +5,7 @@ ini_set('data.timezone', 'Asia/Taipei'); use PhpOffice\PhpSpreadsheet\IOFactory; -$filePath = './facility/facility.xlsx'; +// $filePath = './facility/facility.xlsx'; try { $spreadsheet = IOFactory::load($filePath); diff --git a/wms/contract/contract-download.php b/wms/contract/contract-download.php index 3693ab7d..3ae40fa2 100644 --- a/wms/contract/contract-download.php +++ b/wms/contract/contract-download.php @@ -24,6 +24,7 @@ if (isset($_GET['id']) && $_GET['id'] != "") { $stmt->bindParam(':id', $id); $stmt->execute(); $contracts = $stmt->fetchAll(PDO::FETCH_ASSOC); + $contract = $contracts[0]; $contract_apply_id = $contract['id']; if (($contract['status'] !== "YY" && $user_id != 'M0107' && $user_id != "TEST02" && $user_id == "TEST01") && $user_id != 'M0174' && $user_id != 'M0225') { @@ -52,7 +53,8 @@ if (isset($_GET['id']) && $_GET['id'] != "") { $install_total_price = 0; // $noteArr = explode(",", $contracts[0]['note']); $noteArr = array(1, 1, 1, 1, 1); - $qty = $contracts[0]['total_items']; + // $qty = $contracts[0]['total_items']; + $qty = 1; foreach ($contracts as $idx => $amount) { $isset = false; if ($amount['pay_kind'] == 5 || $amount['pay_kind'] == 6) { @@ -413,8 +415,8 @@ if (isset($_GET['id']) && $_GET['id'] != "") { - - + + diff --git a/wms/contract/contract-maintainance-management.php b/wms/contract/contract-maintainance-management.php new file mode 100644 index 00000000..c0f94479 --- /dev/null +++ b/wms/contract/contract-maintainance-management.php @@ -0,0 +1,114 @@ +prepare($sql_str); +$stmt->execute(); +$contracts= $stmt->fetchAll(PDO::FETCH_ASSOC); + +?> + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
項次合約號客戶名稱統編營業員合約開始時間合約終止時間狀態建檔者建立時間操作
+ diff($endDate); + if ($interval->days <= 60) { + echo "60天以內。"; + } else { + echo "指定日期與當前日期相差超過60天。"; + } + + ?> + +

+ + + + + + +

+
+
+ + + \ No newline at end of file diff --git a/wms/contract/contract-new-apply.php b/wms/contract/contract-new-apply.php index 8c8d4628..c6e8ee2c 100644 --- a/wms/contract/contract-new-apply.php +++ b/wms/contract/contract-new-apply.php @@ -97,13 +97,14 @@ if (empty($contract_new_apply)) { $stmt->bindParam(':contract_id', $id); $stmt->execute(); $files = $stmt->fetchAll(PDO::FETCH_ASSOC); - print_r($files); + // print_r($files); } $secondPayDeadline = $contract['secondPayDeadline'] ?? 0; $status = isset($contract['status']) ? $contract['status'] : -1; $progress = isset($contract['progress']) ? $contract['progress'] : 0; $person = $contract['person']; +$para = "function_name=pricereview&" . $token_link; ?> @@ -129,7 +130,8 @@ $person = $contract['person']; - + + @@ -702,4 +704,14 @@ $person = $contract['person']; } - \ No newline at end of file + + + \ No newline at end of file diff --git a/wms/contract/js/alpine.js b/wms/contract/js/alpine.js index c93e56a0..d13d8389 100644 --- a/wms/contract/js/alpine.js +++ b/wms/contract/js/alpine.js @@ -1381,6 +1381,7 @@ const contractNewApply = () => { form.append('status', 1); form.append('review_comment', this.data.review_comment); form.append('description', this.data.description); + form.append('progress', 0); for (var i = 0; i < this.data.files.length; i++) { form.append('files[]', this.data.files[i]); } diff --git a/wms/contract/option/facility.xlsx b/wms/contract/option/facility.xlsx index 929a328d..f51a3944 100644 Binary files a/wms/contract/option/facility.xlsx and b/wms/contract/option/facility.xlsx differ diff --git a/wms/contract/prviewPdf.php b/wms/contract/prviewPdf.php index 6c57d5e9..1d311b0a 100644 --- a/wms/contract/prviewPdf.php +++ b/wms/contract/prviewPdf.php @@ -19,6 +19,7 @@ if($_POST['list']){ $total_price = $_POST['total_price']; $person = $_POST['person']; $personid = $_POST['personid']; + echo "----->" . $personid; $delivery_term = $_POST['delivery_term']; $install_period = $_POST['install_period']; $free_maintainance = $_POST['free_maintainance']; @@ -45,6 +46,10 @@ if($_POST['list']){ $stmt->bindParam(':vol_no', $partyAcontractno); $stmt->execute(); $customer = $stmt->fetch(PDO::FETCH_ASSOC); + if(empty($customer)){ + echo "有望客戶資料有誤!"; + exit; + } if(count($customer) <= 0 ){ echo "