From 16ce8773d0d955140ba5c65f4928f06df00a513c Mon Sep 17 00:00:00 2001 From: jrbin Date: Thu, 2 Nov 2023 11:12:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B1=B0=E6=94=B9bug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/mkt/pricereview-edit.php | 2 +- wms/mkt/pricereview_renovate-edit.php | 2 +- wms/mkt/pricereview_renovate-record-update.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wms/mkt/pricereview-edit.php b/wms/mkt/pricereview-edit.php index 2977b790..eeb071cc 100644 --- a/wms/mkt/pricereview-edit.php +++ b/wms/mkt/pricereview-edit.php @@ -909,7 +909,7 @@ $(function(){ $("input[name='mn_memo']").each(function(){ mnMemoArr.push($(this).val()+"@@"); }) $('#mn_memo_all').val(mnMemoArr); var mnRelateFacilArr = []; - $("td[name='mn_relate_facil']").each(function(){ mnRelateFacilArr.push($(this).html()); }) + $("td[name='mn_relate_facil']").each(function(){ mnRelateFacilArr.push($(this).html().trim()); }) $('#mn_relate_facil_all').val(mnRelateFacilArr); var exNoteArr = []; $("input[name='except_note']").each(function(){ exNoteArr.push($(this).val()); }) diff --git a/wms/mkt/pricereview_renovate-edit.php b/wms/mkt/pricereview_renovate-edit.php index 951081ec..b78b4679 100644 --- a/wms/mkt/pricereview_renovate-edit.php +++ b/wms/mkt/pricereview_renovate-edit.php @@ -984,7 +984,7 @@ $(function(){ $("input[name='mn_memo']").each(function(){ mnMemoArr.push($(this).val()+"@@"); }) $('#mn_memo_all').val(mnMemoArr); var mnRelateFacilArr = []; - $("td[name='mn_relate_facil']").each(function(){ mnRelateFacilArr.push($(this).html()); }) + $("td[name='mn_relate_facil']").each(function(){ mnRelateFacilArr.push($(this).html().trim()); }) $('#mn_relate_facil_all').val(mnRelateFacilArr); var exNoteArr = []; $("input[name='except_note']").each(function(){ exNoteArr.push($(this).val()); }) diff --git a/wms/mkt/pricereview_renovate-record-update.php b/wms/mkt/pricereview_renovate-record-update.php index 2e7e589a..d8807140 100644 --- a/wms/mkt/pricereview_renovate-record-update.php +++ b/wms/mkt/pricereview_renovate-record-update.php @@ -223,6 +223,7 @@ if(isset($_POST['pmstatus'])) { if (empty($iid) && $op_act_arr[$k] == "I") { $to_ins_arr[] = $k; } else { + $option_relate_spec = ""; $tmp_arr = explode("
", $option_relate_facil_arr[$k]); foreach ($tmp_arr as $val) { $option_relate_spec .= substr($val, 0, strpos($val, ".")).","; From a7258c1784cd33c32a01bd3f0f71d486f3ff0e41 Mon Sep 17 00:00:00 2001 From: jrbin Date: Thu, 2 Nov 2023 14:52:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=96=8B=E6=94=BE=E5=B7=A5=E5=8B=99?= =?UTF-8?q?=E5=8A=A9=E7=90=86=E5=B0=88=E5=93=A1=E6=9F=A5=E8=A9=A2=E4=BF=9D?= =?UTF-8?q?=E9=A4=8A=E8=A1=8C=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/schedule-index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wms/schedule-index.php b/wms/schedule-index.php index 6125d9c8..f6d07a00 100644 --- a/wms/schedule-index.php +++ b/wms/schedule-index.php @@ -4,12 +4,16 @@ include "header.php"; $tourl = $_SERVER["SCRIPT_NAME"]."?function_name=schedule&token=".$token; // 工務總處可瀏覽全部資料 -$sql = "select department_id from account where accountid = '$user_id'"; +$sql = "select department_id, role_id from account where accountid = '$user_id'"; $res = mysqli_query($link, $sql); $row = mysqli_fetch_row($res); $user_department_id = $row[0]; +$user_role_id = $row[1]; mysqli_free_result($res); +// 各區工務助理專員可瀏覽全部 +$dr_arr = ['3114', '3133', '3144', '3152']; + if (!isset($_GET["p"]) || $_GET["p"] <= 0) $p = 1; else $p = $_GET["p"]; $page_each = 50; @@ -22,6 +26,7 @@ $page_close = 0; $sql_cmd2 = ""; $sql_cmd = sql_myself($user_id); if ($user_department_id == "501" || $user_department_id == "322" || $user_id == "M0012" || $user_id == "M0105") $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"]."' "; if (!empty($_GET["facilityno"])) $sql_cmd2 .= "and facilityno = '".$_GET["facilityno"]."' ";