From b5b1cca104439e3efbc5064fbff2c7c2f9289a14 Mon Sep 17 00:00:00 2001 From: "IA2301\\IA_2301" Date: Tue, 19 Mar 2024 09:52:33 +0800 Subject: [PATCH] commit --- wms/facility-index.php | 2 +- wms/fnh/faultreview-index.php | 2 +- wms/schedule-index.php | 2 +- wms/wipwhole-index-export-excel.php | 40 ++++++----- wms/wipwhole-index-function.php | 6 +- wms/wipwhole-index.php | 5 +- wms/wipwhole-rec-invoice-edit.php | 32 +++++---- wms/wipwhole-renovate-index-export-excel.php | 43 ++++++----- wms/wipwhole-renovate-index-function.php | 4 +- wms/wipwhole-renovate-index.php | 5 +- wms/wipwhole-renovate-rec-invoice-edit.php | 32 +++++---- wms/wipwholeinstall-index-table-html.php | 52 ++++++-------- ...wholeinstall-renovate-index-table-html.php | 71 ++++++------------- 13 files changed, 146 insertions(+), 150 deletions(-) diff --git a/wms/facility-index.php b/wms/facility-index.php index 8815b5c8..4f1f2e18 100644 --- a/wms/facility-index.php +++ b/wms/facility-index.php @@ -12,7 +12,7 @@ mysqli_free_result($res); $data = array(); // sql語法存在變數中 $sql_cmd = sql_myself($user_id); -if ($user_department_id == "501" || $user_id == "M0105") $sql_cmd = ""; +if ($user_department_id == "501" || $user_id == "M0105"|| $user_id == "PT007"|| $user_id == "M0149") $sql_cmd = ""; $sql = "SELECT * FROM facility $sql_cmd ORDER BY id"; // 用mysqli_query方法執行(sql語法)將結果存在變數中 diff --git a/wms/fnh/faultreview-index.php b/wms/fnh/faultreview-index.php index 3de02187..ddcb8c04 100644 --- a/wms/fnh/faultreview-index.php +++ b/wms/fnh/faultreview-index.php @@ -20,7 +20,7 @@ if (getAccounttype($link, $user_id) == "B") { $facilitynos = getAllFacilitynos($link, $user_id); } else if (in_array(accountidToDepartId($user_id), ['912', '220'])) { $facilitynos = ''; -} else if (in_array($user_id, ['M0061', 'M0112', 'C0004', 'M0154'])) { +} else if (in_array($user_id, ['M0061', 'M0112', 'C0004', 'M0154', 'M0149', 'PT007'])) { $facilitynos = ''; } else { $facilitynos = "'NA'"; diff --git a/wms/schedule-index.php b/wms/schedule-index.php index bf13ef45..dce432f9 100644 --- a/wms/schedule-index.php +++ b/wms/schedule-index.php @@ -25,7 +25,7 @@ $data = array(); $page_close = 0; $sql_cmd2 = ""; $sql_cmd = sql_myself($user_id, "repairerid"); -if ($user_department_id == "501" || $user_department_id == "322" || $user_id == "M0012" || $user_id == "M0105") $sql_cmd = ""; +if ($user_department_id == "501" || $user_department_id == "322" || $user_id == "M0012" || $user_id == "M0105"|| $user_id == "PT007"|| $user_id == "M0149") $sql_cmd = ""; if (in_array($user_department_id . $user_role_id, $dr_arr)) $sql_cmd = ""; //if (empty($sql_cmd)) $sql_cmd = "where "; if (!empty($_GET["contractno"])) $sql_cmd2 .= "and contractno = '" . $_GET["contractno"] . "' "; diff --git a/wms/wipwhole-index-export-excel.php b/wms/wipwhole-index-export-excel.php index c97c4bdf..20dba6f2 100644 --- a/wms/wipwhole-index-export-excel.php +++ b/wms/wipwhole-index-export-excel.php @@ -18,7 +18,7 @@ use PhpOffice\PhpSpreadsheet\Style\Fill; function getArea($address) { $address = mb_substr($address, 0, 2); - if (in_array($address, ['宜蘭', '花蓮', '台東'])) + if (in_array($address, ['宜蘭', '花蓮'])) return '宜花東'; if (in_array($address, ['臺北', '台北', '基隆', '新北'])) return '北區'; @@ -26,7 +26,7 @@ function getArea($address) return '桃竹'; if (in_array($address, ['南投', '臺中', '台中', '彰化', '雲林', '苗栗'])) return '中區'; - if (in_array($address, ['台南', '臺南', '嘉義', '屏東', '高雄'])) + if (in_array($address, ['台南', '臺南', '嘉義', '屏東', '高雄', '台東'])) return '南區'; } if ($_SERVER["REQUEST_METHOD"] == "POST") { @@ -106,10 +106,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { '設計主管確認', '設計主管確認日期', '工務確認', - '樓高通報', - '樓高通報日期', - '工勘確認', - '工勘確認日期', + // '樓高通報', + // '樓高通報日期', + '工地進度', + '工地進度確認日期', '生管確認', '是否齊備', '是否齊備日期', @@ -158,8 +158,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { // $caiwuok = 0; // 工務統計已確認 - if ($row['building_heigh_verify'] == 0) - $gongwuok += 1; + // if ($row['building_heigh_verify'] == 0) + // $gongwuok += 1; // if ($row['site_survey_contact_verify'] == 0) if (!in_array($row['site_survey_contact_verify'], ['1', 'A'])) $gongwuok += 1; @@ -281,10 +281,18 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { // 設計 設計主管確認 $desin_leader_verify_status = !empty($status_arr[$row['desin_leader_verify']]) ? $status_arr[$row['desin_leader_verify']] : ""; - // 工務 樓高通報確認 - $dbuilding_heigh_verify_status = !empty($status_arr[$row['building_heigh_verify']]) ? $status_arr[$row['building_heigh_verify']] : ""; - // 工務 工勘確認 + // // 工務 樓高通報確認 + // $dbuilding_heigh_verify_status = !empty($status_arr[$row['building_heigh_verify']]) ? $status_arr[$row['building_heigh_verify']] : ""; + // // 工務 工勘確認 $site_survey_contact_verify_status = !empty($site_survey_status[$row['site_survey_contact_verify']]) ? $site_survey_status[$row['site_survey_contact_verify']] : ""; + $site_survey_contact_verify_status = ""; + if (!empty($site_survey_status[$row['site_survey_contact_verify']])) { + if ($site_survey_status[$row['site_survey_contact_verify']] !== $row['site_survey_contact_verify']) { + $site_survey_contact_verify_status = $row['site_survey_contact_verify'] . ":" . $site_survey_status[$row['site_survey_contact_verify']]; + } else { + $site_survey_contact_verify_status = $row['site_survey_contact_verify']; + } + } // 生管 是否齊備確認 $shengguanok_status = !empty($status_arr[$row['shengguanok_status']]) ? $status_arr[$row['shengguanok_status']] : ""; @@ -332,9 +340,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $desin_leader_verify_status, substr($row['desin_leader_verify_at'], 0, 10), // getGunwuName($row['address']) . $gongwuok . "/2", - accountidToName($row['warehouseid']) . $gongwuok . "/2", - $dbuilding_heigh_verify_status, - substr($row['building_heigh_verify_at'], 0, 10), + accountidToName($row['warehouseid']) . $gongwuok . "/1", + // $dbuilding_heigh_verify_status, + // substr($row['building_heigh_verify_at'], 0, 10), $site_survey_contact_verify_status, substr($row['site_survey_contact_verify_at'], 0, 10), '許伃廷 ' . $shengguanok . "/7", @@ -385,13 +393,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { ->getStartColor()->setRGB('FFBB66'); // 背景顏色為綠色 - $styleA1toC1 = $sheet->getStyle('AJ1:AN1'); + $styleA1toC1 = $sheet->getStyle('AJ1:AL1'); $fillA1toC1 = $styleA1toC1->getFill(); $fillA1toC1->setFillType(Fill::FILL_SOLID) ->getStartColor()->setRGB('DDFF77'); // 背景顏色為橘色 - $styleA1toC1 = $sheet->getStyle('AO1:BC1'); + $styleA1toC1 = $sheet->getStyle('AM1:BA1'); $fillA1toC1 = $styleA1toC1->getFill(); $fillA1toC1->setFillType(Fill::FILL_SOLID) ->getStartColor()->setRGB('FFCCCC'); diff --git a/wms/wipwhole-index-function.php b/wms/wipwhole-index-function.php index ff5afc12..28812f10 100644 --- a/wms/wipwhole-index-function.php +++ b/wms/wipwhole-index-function.php @@ -32,11 +32,11 @@ function getWipwholeSearchSql() { $area = [ - 'Y' => " '宜蘭','花蓮','台東' ", + 'Y' => " '宜蘭','花蓮' ", 'N' => " '臺北', '台北', '基隆', '新北' ", 'T' => " '桃園', '新竹' ", 'C' => " '南投', '臺中', '台中', '彰化', '雲林', '苗栗' ", - 'K' => " '台南', '臺南', '嘉義', '屏東', '高雄' " + 'K' => " '台南', '臺南', '嘉義', '屏東', '高雄','台東' " ]; $contractno = empty($_REQUEST['contractno']) ? null : trim($_REQUEST['contractno']); @@ -982,7 +982,7 @@ function getYewuStatus($link, $user_department_id, $role_id) // 取得工務的欄位權限 function getWarehouseStatus($link, $user_department_id, $role_id, $status) { - if (in_array($user_department_id, [521, 531, 541, 542, 543, 544, 545, 50, 501, 311, 313, 314, 521, 315, 912,220])) { + if (in_array($user_department_id, [521, 531, 541, 542, 543, 544, 545, 50, 501, 311, 313, 314, 521, 315, 912, 220])) { // if (getSaveEstimateInstallData($user_department_id, $role_id)) { if ($status == 1) { return checkNowFormGStatus($link) == 'G' ? "" : "disabled"; diff --git a/wms/wipwhole-index.php b/wms/wipwhole-index.php index da7acdd0..db817faf 100644 --- a/wms/wipwhole-index.php +++ b/wms/wipwhole-index.php @@ -175,10 +175,11 @@ $data = mysqli_query($link, $sql); 全部"; foreach ($site_survey_status as $key => $val) { + $key_tmp = $key == $val ? '' : $key . ":"; if ((string)$site_survey_contact_verify == (string)$key) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } } ?> diff --git a/wms/wipwhole-rec-invoice-edit.php b/wms/wipwhole-rec-invoice-edit.php index 1724e3f8..3ff125c5 100644 --- a/wms/wipwhole-rec-invoice-edit.php +++ b/wms/wipwhole-rec-invoice-edit.php @@ -542,7 +542,7 @@ if (!empty($row['official_check_file'])) 官檢資料上傳 - 範例下載 + 範例下載 @@ -1054,12 +1054,13 @@ if (!empty($row['official_check_file'])) "> @@ -1120,7 +1124,7 @@ if (!empty($row['official_check_file'])) ?> - + - 工勘確認 + 工地進度 > $val) { + $thisDisabled = $key == '0' ? 'disabled' : ''; + $key_tmp = $key == $val ? '' : $key . ":"; if ($row["site_survey_contact_verify"] == $key) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } } ?> @@ -1812,7 +1818,7 @@ if (!empty($row['official_check_file'])) - + 內部QC日 @@ -2166,7 +2172,7 @@ if (!empty($row['official_check_file'])) - 完工驗收單附件 + 安裝完工驗收單 > - 移交日附件(核准函) + 移交日附件 > diff --git a/wms/wipwhole-renovate-index-export-excel.php b/wms/wipwhole-renovate-index-export-excel.php index b8cc7551..5bc639bf 100644 --- a/wms/wipwhole-renovate-index-export-excel.php +++ b/wms/wipwhole-renovate-index-export-excel.php @@ -17,7 +17,7 @@ use PhpOffice\PhpSpreadsheet\Style\Fill; function getArea($address) { $address = mb_substr($address, 0, 2); - if (in_array($address, ['宜蘭', '花蓮', '台東'])) + if (in_array($address, ['宜蘭', '花蓮'])) return '宜花東'; if (in_array($address, ['臺北', '台北', '基隆', '新北'])) return '北區'; @@ -25,7 +25,7 @@ function getArea($address) return '桃竹'; if (in_array($address, ['南投', '臺中', '台中', '彰化', '雲林', '苗栗'])) return '中區'; - if (in_array($address, ['台南', '臺南', '嘉義', '屏東', '高雄'])) + if (in_array($address, ['台南', '臺南', '嘉義', '屏東', '高雄', '台東'])) return '南區'; } if ($_SERVER["REQUEST_METHOD"] == "POST") { @@ -83,10 +83,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { '實際到廠日(觀音廠)', '預計出貨日(到工地)', '工務確認', - '樓高通報', - '樓高通報日期', - '工勘確認', - '工勘確認日期', + // '樓高通報', + // '樓高通報日期', + '工地進度', + '工地進度確認日期', '營業/契約確認', '營業/契約規格', '營業/契約規格日期', @@ -157,8 +157,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { // $caiwuok = 0; // 工務統計已確認 - if ($row['building_heigh_verify'] == 0) - $gongwuok += 1; + // if ($row['building_heigh_verify'] == 0) + // $gongwuok += 1; if (!in_array($row['site_survey_contact_verify'], ['1', 'A'])) $gongwuok += 1; @@ -278,11 +278,18 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { // 設計 設計主管確認 $desin_leader_verify_status = !empty($status_arr[$row['desin_leader_verify']]) ? $status_arr[$row['desin_leader_verify']] : ""; - // 工務 樓高通報確認 - $dbuilding_heigh_verify_status = !empty($status_arr[$row['building_heigh_verify']]) ? $status_arr[$row['building_heigh_verify']] : ""; + // // 工務 樓高通報確認 + // $dbuilding_heigh_verify_status = !empty($status_arr[$row['building_heigh_verify']]) ? $status_arr[$row['building_heigh_verify']] : ""; // 工務 工勘確認 $site_survey_contact_verify_status = !empty($site_survey_status[$row['site_survey_contact_verify']]) ? $site_survey_status[$row['site_survey_contact_verify']] : ""; - + $site_survey_contact_verify_status = ""; + if(!empty($site_survey_status[$row['site_survey_contact_verify']])){ + if($site_survey_status[$row['site_survey_contact_verify']] !== $row['site_survey_contact_verify']){ + $site_survey_contact_verify_status = $row['site_survey_contact_verify'] . ":" . $site_survey_status[$row['site_survey_contact_verify']]; + }else{ + $site_survey_contact_verify_status = $row['site_survey_contact_verify']; + } + } // 生管 是否齊備確認 $shengguanok_status = !empty($status_arr[$row['shengguanok_status']]) ? $status_arr[$row['shengguanok_status']] : ""; @@ -309,9 +316,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { substr($row['actual_tofactory_date'], 0, 10), substr($row['real_contract_arrival_date'], 0, 10), // getGunwuName($row['address']) . $gongwuok . "/2", - accountidToName($row['warehouseid']) . $gongwuok . "/2", - $dbuilding_heigh_verify_status, - substr($row['building_heigh_verify_at'], 0, 10), + accountidToName($row['warehouseid']) . $gongwuok . "/1", + // $dbuilding_heigh_verify_status, + // substr($row['building_heigh_verify_at'], 0, 10), $site_survey_contact_verify_status, substr($row['site_survey_contact_verify_at'], 0, 10), accountidToName($row['salesid']) . " " . $yingyeok . "/5", @@ -371,25 +378,25 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { ->getStartColor()->setRGB('8EA9DB'); // 背景顏色為橘色 - $styleA1toC1 = $sheet->getStyle('O1:S1'); + $styleA1toC1 = $sheet->getStyle('O1:Q1'); $fillA1toC1 = $styleA1toC1->getFill(); $fillA1toC1->setFillType(Fill::FILL_SOLID) ->getStartColor()->setRGB('FFBB66'); // 背景顏色為綠色 - $styleA1toC1 = $sheet->getStyle('T1:AD1'); + $styleA1toC1 = $sheet->getStyle('R1:AB1'); $fillA1toC1 = $styleA1toC1->getFill(); $fillA1toC1->setFillType(Fill::FILL_SOLID) ->getStartColor()->setRGB('DDFF77'); // 背景顏色為藍色 - $styleA1toC1 = $sheet->getStyle('AE1:AO1'); + $styleA1toC1 = $sheet->getStyle('AC1:AM1'); $fillA1toC1 = $styleA1toC1->getFill(); $fillA1toC1->setFillType(Fill::FILL_SOLID) ->getStartColor()->setRGB('BBFFEE'); // 背景顏色為橘色 - $styleA1toC1 = $sheet->getStyle('AP1:BE1'); + $styleA1toC1 = $sheet->getStyle('AN1:BB1'); $fillA1toC1 = $styleA1toC1->getFill(); $fillA1toC1->setFillType(Fill::FILL_SOLID) ->getStartColor()->setRGB('FFCCCC'); diff --git a/wms/wipwhole-renovate-index-function.php b/wms/wipwhole-renovate-index-function.php index e7849513..06f38b7c 100644 --- a/wms/wipwhole-renovate-index-function.php +++ b/wms/wipwhole-renovate-index-function.php @@ -282,11 +282,11 @@ function getWipwholeSearchSql() { $area = [ - 'Y' => " '宜蘭','花蓮','台東' ", + 'Y' => " '宜蘭','花蓮' ", 'N' => " '臺北', '台北', '基隆', '新北' ", 'T' => " '桃園', '新竹' ", 'C' => " '南投', '臺中', '台中', '彰化', '雲林', '苗栗' ", - 'K' => " '台南', '臺南', '嘉義', '屏東', '高雄' " + 'K' => " '台南', '臺南', '嘉義', '屏東', '高雄','台東' " ]; $contractno = empty($_REQUEST['contractno']) ? null : trim($_REQUEST['contractno']); diff --git a/wms/wipwhole-renovate-index.php b/wms/wipwhole-renovate-index.php index 6bcd6c34..17a7f31d 100644 --- a/wms/wipwhole-renovate-index.php +++ b/wms/wipwhole-renovate-index.php @@ -172,10 +172,11 @@ $data = mysqli_query($link, $sql); 全部"; foreach ($site_survey_status as $key => $val) { + $key_tmp = $key == $val ? '' : $key . ":"; if ((string)$site_survey_contact_verify == (string)$key) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } } ?> diff --git a/wms/wipwhole-renovate-rec-invoice-edit.php b/wms/wipwhole-renovate-rec-invoice-edit.php index 9d285144..bbae8422 100644 --- a/wms/wipwhole-renovate-rec-invoice-edit.php +++ b/wms/wipwhole-renovate-rec-invoice-edit.php @@ -332,13 +332,14 @@ if (!empty($row['official_check_file'])) "> @@ -400,7 +404,7 @@ if (!empty($row['official_check_file'])) ?> - + - 工勘確認 + 工地進度 > $val) { + $thisDisabled = $key == '0' ? 'disabled' : ''; + $key_tmp = $key == $val ? '' : $key . ":"; if ($row["site_survey_contact_verify"] == $key) { - echo ""; + echo ""; } else { - echo ""; + echo ""; } } ?> @@ -1815,7 +1821,7 @@ if (!empty($row['official_check_file'])) - + 內部QC日 @@ -2169,7 +2175,7 @@ if (!empty($row['official_check_file'])) - 完工驗收單附件 + 安裝完工驗收單 > - 移交日附件(核准函) + 移交日附件 > diff --git a/wms/wipwholeinstall-index-table-html.php b/wms/wipwholeinstall-index-table-html.php index 0b4c887a..2ccdf47a 100644 --- a/wms/wipwholeinstall-index-table-html.php +++ b/wms/wipwholeinstall-index-table-html.php @@ -1,6 +1,7 @@ + @@ -10,16 +11,16 @@ - + - + - + @@ -52,6 +53,19 @@ } ?> --> + + + @@ -69,17 +83,6 @@ echo date("Y/m/d", strtotime(substr($data['real_contract_arrival_date'], 0, 10))); ?> - $val) { - // if ((string)$data['site_survey_contact_verify'] == (string)$key) { - // if (in_array($data['site_survey_contact_verify'], ['1', 'A'])) { - // echo ""; - // } else { - // echo ""; - // } - // } - // } - ?> - - diff --git a/wms/wipwholeinstall-renovate-index-table-html.php b/wms/wipwholeinstall-renovate-index-table-html.php index 6ec5e364..05789a5b 100644 --- a/wms/wipwholeinstall-renovate-index-table-html.php +++ b/wms/wipwholeinstall-renovate-index-table-html.php @@ -1,6 +1,7 @@
編輯 電梯編號 客戶姓名 合約地址預計出貨日(到工地) 發包廠商(工勘) 發包日期(工勘)預計開工日(工勘) 實際開工日(工勘)預計完工日(工勘) 實際完工日(工勘) QC日(品證) QC合格日(品證) 官檢日(品證) 移交日(營業) 營業人員編輯工勘人員
+

+ + + +

+
$val$val + + -

- - - -

-
+ @@ -11,24 +12,36 @@ - + - + - + $data) : ?> + + + - - @@ -226,31 +228,4 @@ }, function() { $("#subContentInsideDiv").hide(); }); - - - - \ No newline at end of file + \ No newline at end of file
編輯 汰改
種類
電梯編號 客戶姓名預計出貨日(到工地) 發包廠商(工勘) 發包日期(工勘)預計開工日(工勘) 實際開工日(工勘)預計完工日(工勘) 實際完工日(工勘) QC日(品證) QC合格日(品證) 官檢日(品證) 移交日(營業) 營業人員編輯工勘人員
+

+ + + +

+
+ + -

- - - -

-