-
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/wms/loginapi.php b/wms/loginapi.php
index 63a1cbb2..38ccc299 100644
--- a/wms/loginapi.php
+++ b/wms/loginapi.php
@@ -18,7 +18,7 @@ if(!empty($_REQUEST["account"])&& !empty($_REQUEST["password"])) {
$accounttype = $row['accounttype'];
$user_name = $row['name'];
// 修正小寫登入 token 會帶入小寫的bug //M0117修改于 2023/07/31 13:45
- $accountid = $row['accountid'];
+ $accountid = strtoupper($row['accountid']);
if (strlen($accounttype) != 0) {
// B=保養員 M=永佳捷員工 E=管理員
if ($accounttype == "B" || $accounttype == "M" || $accounttype == "E" || $accounttype == "W"){
diff --git a/wms/wipwhole-index-function.php b/wms/wipwhole-index-function.php
index e26a6d94..c4ddabc9 100644
--- a/wms/wipwhole-index-function.php
+++ b/wms/wipwhole-index-function.php
@@ -772,11 +772,12 @@ function getGongWuokNo($link)
// 取得生管部主管編號
function getShengGuanokLeaderNo($link)
{
+ return "M0079";
$sql = "
SELECT accountid
FROM `account`
- WHERE `department_id` = '321'
- AND `role_id` = '1';
+ WHERE `department_id` = '250'
+ AND `role_id` = '4';
";
$result = mysqli_query($link, $sql);
$row = mysqli_fetch_array($result);
diff --git a/wms/wipwhole-index-table-html.php b/wms/wipwhole-index-table-html.php
index 5ba74871..4572b2cc 100644
--- a/wms/wipwhole-index-table-html.php
+++ b/wms/wipwhole-index-table-html.php
@@ -1,13 +1,4 @@
"table_index2",
- "A" => "table_index3",
- "B" => "table_index4",
- "G" => "table_index5",
- "CH" => "table_index6",
- "Z" => "table_index7"
-);
-
// 暫時可編輯及刪除權限
$update_delete_status = false;
if (in_array($user_id, ['M0175', 'M0079'])) {
@@ -15,7 +6,7 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
}
?>
-
+
$data) :
+ foreach ($data as $key => $data) :
//規格
$Specification = $data['facility_kind'];
diff --git a/wms/wipwhole-index.php b/wms/wipwhole-index.php
index 9f87ec09..ff37bb22 100644
--- a/wms/wipwhole-index.php
+++ b/wms/wipwhole-index.php
@@ -40,9 +40,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
}
-// 宣告主資料空陣列
-$data = array();
-
// 取得當前使用者所屬部門
$department_id = getDepartmentId($link, $user_id);
// 取得當前使用者所屬職位
@@ -62,30 +59,27 @@ $site_survey_contact_verify = !isset($_REQUEST['site_survey_contact_verify']) ?
$real_contract_arrival_date_start = empty($_REQUEST['real_contract_arrival_date_start']) ? null : $_REQUEST['real_contract_arrival_date_start'];
$real_contract_arrival_date_end = empty($_REQUEST['real_contract_arrival_date_end']) ? null : $_REQUEST['real_contract_arrival_date_end'];
$area_no = !isset($_REQUEST['area_no']) ? '' : $_REQUEST['area_no'];
+$sheetNum = empty($_GET['sheetNum']) ? 'All' : $_GET['sheetNum'];
+
+$tableArr = array(
+ "All" => "",
+ "A" => "A",
+ "B" => "B",
+ "G" => "G",
+ "CH" => "C,H",
+ "Z" => "Z"
+);
+if (empty($sheetNum) || $sheetNum == "All") {
+ $sql = getDataSql($department_id, $role_id, $user_id);
+} else {
+ $sql = getDataSqlByFlowCode($department_id, $role_id, $user_id, $tableArr[$sheetNum]);
+}
// 取得資料 sql
-$sql = getDataSql($department_id, $role_id, $user_id);
$data = mysqli_query($link, $sql);
-// 取得資料(營業部門階段) sql
-$sql = getDataSqlByFlowCode($department_id, $role_id, $user_id, "A");
-$dataA = mysqli_query($link, $sql);
-// 取得資料(設計部門階段) sql
-$sql = getDataSqlByFlowCode($department_id, $role_id, $user_id, "B");
-$dataB = mysqli_query($link, $sql);
-// 取得資料(工勘部門階段) sql
-$sql = getDataSqlByFlowCode($department_id, $role_id, $user_id, "G");
-$dataG = mysqli_query($link, $sql);
-
-// 取得資料(生管階段) sql
-$sql = getDataSqlByFlowCode($department_id, $role_id, $user_id, "C,H");
-$dataCH = mysqli_query($link, $sql);
-
-// 取得資料(結案階段) sql
-$sql = getDataSqlByFlowCode($department_id, $role_id, $user_id, "Z");
-$dataZ = mysqli_query($link, $sql);
?>
@@ -308,22 +302,11 @@ $dataZ = mysqli_query($link, $sql);
$data,
- "A" => $dataA,
- "B" => $dataB,
- "G" => $dataG,
- "CH" => $dataCH,
- "Z" => $dataZ
-);
-foreach ($dataArr as $key => $val) {
- if ($val) :
- $dataDetailsArr = $val;
- echo "";
- include "wipwhole-index-table-html.php";
- echo "
";
- endif;
-}
+
+echo "";
+include "wipwhole-index-table-html.php";
+echo "
";
+
// 結束連線
@@ -346,14 +329,13 @@ mysqli_close($link);
}
";
- // } else {
- // echo "";
- // }
+ if (checkWwsAssianStatus($link, $user_id, $id)) {
+ echo "";
+ } else {
+ echo "";
+ }
}
}
@@ -1029,8 +1054,8 @@ function checkWwsAssianStatus($link, $user_id, $id = null)
$data['designleadermail'] = accountid2email([getSheJiokLeaderNo($link)])[getSheJiokLeaderNo($link)];
$data['gongwokname'] = accountid2name(getGongWuokNo($link))[getGongWuokNo($link)];
$data['gongwokmail'] = accountid2email([getGongWuokNo($link)])[getGongWuokNo($link)];
- $data['shengguanokname'] = accountid2name(getShengGuanokLeaderNo($link))[getShengGuanokLeaderNo($link)];
- $data['shengguanokmail'] = accountid2email([getShengGuanokLeaderNo($link)])[getShengGuanokLeaderNo($link)];
+ $data['shengguanname'] = accountid2name(getShengGuanokLeaderNo($link))[getShengGuanokLeaderNo($link)];
+ $data['shengguanmail'] = accountid2email([getShengGuanokLeaderNo($link)])[getShengGuanokLeaderNo($link)];
// 確認營業階段
// 非主管進入主管階段
diff --git a/wms/wipwhole-rec-invoice-edit.php b/wms/wipwhole-rec-invoice-edit.php
index d4aad087..acc986dc 100644
--- a/wms/wipwhole-rec-invoice-edit.php
+++ b/wms/wipwhole-rec-invoice-edit.php
@@ -1158,15 +1158,18 @@ include "wipwhole-rec-invoice-edit-submit.php";
if (checkNowFormGStatus($link) == 'Z' && checkNowFormYDStatus($link) == 'Z' && ($user_department_id == 220 || $user_department_id == 321)) {
?>
-
-
+ // if ($user_id == 'M0168') {
+ ?>
+
diff --git a/wms/wipwhole-renovate-index-function.php b/wms/wipwhole-renovate-index-function.php
index 280e893b..a537c833 100644
--- a/wms/wipwhole-renovate-index-function.php
+++ b/wms/wipwhole-renovate-index-function.php
@@ -244,11 +244,12 @@ function getGongWuokNo($link)
// 取得生管部主管編號
function getShengGuanokLeaderNo($link)
{
+ return "M0079";
$sql = "
SELECT accountid
FROM `account`
- WHERE `department_id` = '321'
- AND `role_id` = '1';
+ WHERE `department_id` = '250'
+ AND `role_id` = '4';
";
$result = mysqli_query($link, $sql);
$row = mysqli_fetch_array($result);
diff --git a/wms/wipwhole-renovate-index-table-html.php b/wms/wipwhole-renovate-index-table-html.php
index 3be85123..78f863bc 100644
--- a/wms/wipwhole-renovate-index-table-html.php
+++ b/wms/wipwhole-renovate-index-table-html.php
@@ -1,13 +1,4 @@
"table_index2",
- "A" => "table_index3",
- "B" => "table_index4",
- "C" => "table_index5",
- "D" => "table_index6",
- "Z" => "table_index7"
-);
-
// 暫時可編輯及刪除權限
$update_delete_status = false;
if (in_array($user_id, ['M0175', 'M0079'])) {
@@ -15,7 +6,7 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
}
?>
-
+
$data) :
+ foreach ($data as $key => $data) :
//規格
$Specification = $data['facility_kind'];
diff --git a/wms/wipwhole-renovate-index.php b/wms/wipwhole-renovate-index.php
index f38bbd42..6f22b60d 100644
--- a/wms/wipwhole-renovate-index.php
+++ b/wms/wipwhole-renovate-index.php
@@ -1,6 +1,5 @@