From 93bb2fd094d0d80159c1da9b8dd241bd2a21f2d1 Mon Sep 17 00:00:00 2001 From: 10994015 Date: Wed, 24 Jan 2024 15:01:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=83=B9=E5=AF=A9=20=E7=89=8C=E5=83=B9?= =?UTF-8?q?=E5=B0=87=E8=88=8A=E7=89=88=E5=81=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/fun_global.php | 45 ++++++++-------------------- wms/mkt/price_option-index.php | 2 ++ wms/mkt/price_option-select.php | 2 ++ wms/mkt/pricereview-check.php | 2 +- wms/mkt/pricereview-record-check.php | 3 +- wms/mkt/pricereview_mi-api.php | 5 ++-- 6 files changed, 22 insertions(+), 37 deletions(-) diff --git a/wms/fun_global.php b/wms/fun_global.php index b468f413..501fbb2e 100644 --- a/wms/fun_global.php +++ b/wms/fun_global.php @@ -83,13 +83,12 @@ function manage_class($user_id, &$ret = []) * @return array * */ -function pricereview_class($rate, $user_id, &$ret = [], $special_fee) +function pricereview_class($rate, $user_id, &$ret = [], $special_fee, $i = 0) { global $link; $sql = "select manager from account where accountid = '$user_id'"; $res = mysqli_query($link, $sql); - $i = 0; while ($row = mysqli_fetch_assoc($res)) { if ($row["manager"] == "M0001") return; // 董事長略過 if ($user_id == 'TEST01') { @@ -100,6 +99,7 @@ function pricereview_class($rate, $user_id, &$ret = [], $special_fee) return $ret; exit; } else { + // 若為第一層且使用者ID為區經理,直接訂好接下來的簽核人員並跳出。 if ($i == 0 && ($user_id == 'M0033' || $user_id == "M0137" || $user_id == 'M0029' || $user_id == 'M0054' || $user_id == "M0086")) { $ret[1] = $user_id . ",,"; $ret[2] = "M0024,,<##>M0107,,"; // 業務部專員:M0024許伃廷、M0107許紓晴(第2關有多位審核人) @@ -108,22 +108,21 @@ function pricereview_class($rate, $user_id, &$ret = [], $special_fee) $ret[4] = "M0006,,"; // 總經理 } return $ret; - exit(); + exit; } if ($row["manager"] != "M0060" && $row["manager"] != "M0006" && $row["manager"] != "M0008") { + // 新梯的部分 桃竹本該給陳家文,改為劉永德 if ($row["manager"] == 'M0029') { - $ret[1] = "M0147,,"; + $ret[1] = "M0137,,"; $i++; - pricereview_class($rate, $row["manager"], $ret, $special_fee); + pricereview_class($rate, $row["manager"], $ret, $special_fee, $i); } else { $ret[1] = $row["manager"] . ",,"; $i++; - pricereview_class($rate, $row["manager"], $ret, $special_fee); + pricereview_class($rate, $row["manager"], $ret, $special_fee, $i); } } else { - // if ($user_id == 'M0033' || $user_id == 'M0137' || $user_id == 'M0029' || $user_id == 'M0054' || $user_id == 'M0086') { - // $ret[1] = $user_id . ",,"; - // } + $ret[2] = "M0024,,<##>M0107,,"; // 業務部專員:M0024許伃廷、M0107許紓晴(第2關有多位審核人) $ret[3] = "M0060,,"; // 業務協理 if ($rate < 80 || $special_fee > 0) { @@ -152,19 +151,10 @@ function pricereview_renovate_class($rate, $user_id, $renovate_flag) $res = mysqli_query($link, $sql); if ($row = mysqli_fetch_assoc($res)) { if ($row["manager"] == "M0001") return; // 董事長略過 - if ($row["manager"] == "TEST04" || $user_id == 'TEST01') { - $ret[1] = "test04,,"; - $ret[2] = "test02,,"; - $ret[3] = "test03,,"; - $ret[4] = "test05,,"; - return $ret; - exit(); + if ($row["manager"] != "M0060" && $row["manager"] != "M0006" && $row["manager"] != "M0008") { + $ret[1] = $row["manager"]; } else { - if ($row["manager"] != "M0060" && $row["manager"] != "M0006" && $row["manager"] != "M0008") { - $ret[1] = $row["manager"]; - } else { - $ret[1] = $user_id; - } + $ret[1] = $user_id; } } // $ret[1] = "M0029"; @@ -183,17 +173,6 @@ function pricereview_renovate_class($rate, $user_id, $renovate_flag) return $ret; } -/** - * 汰改(契約)價審簽核順位 - * @param string $rate:破價比 - * @param string $user_id:使用者ID - * @param string $renovate_flag:REN=M1改 - * @return array - * - */ -function pricereview_maintainance_class($rate, $user_id, $renovate_flag) -{ -} /** * 檢查使用者選單權限 * @@ -257,7 +236,7 @@ function accountid2name() global $link; $arr = []; - $sql = "select accountid, name from account where 1=1"; + $sql = "select accountid, name from account where accounttype in ('B','E','M')"; $res = mysqli_query($link, $sql); while ($row = mysqli_fetch_row($res)) { $arr[$row[0]] = $row[1]; diff --git a/wms/mkt/price_option-index.php b/wms/mkt/price_option-index.php index 05388f59..ecf0afa6 100644 --- a/wms/mkt/price_option-index.php +++ b/wms/mkt/price_option-index.php @@ -67,6 +67,7 @@ $optional_arr = [1 => '標', 2 => '選']; + @@ -88,6 +89,7 @@ $optional_arr = [1 => '標', 2 => '選'];
ID 名稱 規格 備註