diff --git a/wms/account-index.php b/wms/account-index.php index df0c2d3f..ed0e9e1d 100644 --- a/wms/account-index.php +++ b/wms/account-index.php @@ -17,23 +17,23 @@ $sql_cmd = sql_myself($user_id); if ($user_department_id == "501" || $user_id == "M0105") $sql_cmd = ""; $sql = "SELECT * FROM account $sql_cmd ORDER BY id"; // 用mysqli_query方法執行(sql語法)將結果存在變數中 -$data = mysqli_query($link, $sql); +$data = mysqli_query($link,$sql); ?> - -

- - - -

+ +

+ + + +

Please fill up the required field!

"; } else { header("Location:account-index.php"); @@ -42,151 +42,126 @@ if ($data) : ?> - +
- + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - + + + +
項次帳號類型帳號姓名電話地址電子郵件Line ID微信id遠端協助維修ID直屬主管建檔人建檔時間修改
項次帳號類型帳號姓名電話地址電子郵件Line ID微信id遠端協助維修ID直屬主管建檔人建檔時間修改新人資料
- 連結 -

- - - -

-
連結 +

+ + + +

+
- -
- There is no record!"; endif; @@ -195,4 +170,4 @@ mysqli_close($link); include "footer.php"; -?> \ No newline at end of file +?> diff --git a/wms/assets/img/icon/(Ñ╝¿╧Ñ╬)icon-star-active.png b/wms/assets/img/icon/(Ñ╝¿╧Ñ╬)icon-star-active.png new file mode 100644 index 00000000..b6da6739 Binary files /dev/null and b/wms/assets/img/icon/(Ñ╝¿╧Ñ╬)icon-star-active.png differ diff --git a/wms/assets/img/icon/(Ñ╝¿╧Ñ╬)icon-star-default.png b/wms/assets/img/icon/(Ñ╝¿╧Ñ╬)icon-star-default.png new file mode 100644 index 00000000..61dfa1ca Binary files /dev/null and b/wms/assets/img/icon/(Ñ╝¿╧Ñ╬)icon-star-default.png differ diff --git a/wms/board-index.php b/wms/board-index.php index ac67b1a9..c3dd41a6 100644 --- a/wms/board-index.php +++ b/wms/board-index.php @@ -8,189 +8,96 @@ $data = array(); $sql = "select * from board where status = 'Y' order by id"; // 用mysqli_query方法執行(sql語法)將結果存在變數中 -$data = mysqli_query($link, $sql); -$data2 = $data; +$data = mysqli_query($link,$sql); ?> - -

- - - -

+ +

+ + + +

- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
項次主旨附件建檔人建檔時間關閉公告
- -

- - - - - -

-
-
+img { + width:125px; +} - +table{ + width:100%; +} +#table_index_filter{ + float:right; +} +#table_index_paginate{ + float:right; +} +label { + display: inline-flex; + margin-bottom: .5rem; + margin-top: .5rem; + +} - + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
項次主旨附件建檔人建檔時間關閉公告
+

+ + + + + +

+
+
- There is no record!"; endif; diff --git a/wms/class/Cmail.php b/wms/class/Cmail.php index f2edd6a6..51ed924b 100644 --- a/wms/class/Cmail.php +++ b/wms/class/Cmail.php @@ -1,5 +1,4 @@ charset = "UTF-8"; $this->host = "mail.masada.com.tw"; @@ -24,8 +23,8 @@ class Cmail $this->smtp_user = "notice"; // 這裡填寫SMTP登入帳號, 例如 your.gmail.name@gmail.com 則填寫your.gmail.name $this->smtp_pwd = "90493119"; // 這裡填寫SMTP登入密碼 } - - function sendx($subject = "", $em_body = "", $sendlist = array(), $from = "永佳捷科技", $bcc = "", $files = array()) + + function sendx($subject="", $em_body="", $sendlist=array(), $from="永佳捷科技", $bcc="", $files=array()) { if (!$sendlist) return; $em_body = nl2br($em_body); @@ -53,15 +52,11 @@ class Cmail //$mail->addCC("personC@gmail.com", "person C"); //$mail->addBCC("personD@gmail.com", "person D"); //$mail->addAttachment("image1.jpg", "picture.jpg"); //設定附件, 對方會看到附件名稱為 picture.jpg - foreach ($files as $v) { - list($file, $file_name) = $v; - $mail->addAttachment($file, $file_name); - } //print_r($mail);exit; - if (!$mail->Send()) { + if (!$mail->Send()){ // echo "Mailer error: " . $mail->ErrorInfo; } else { //echo "Email sent"; } } -} +} \ No newline at end of file diff --git a/wms/contract/insertData.php b/wms/contract/insertData.php index 0d19cfee..5f1ffc00 100644 --- a/wms/contract/insertData.php +++ b/wms/contract/insertData.php @@ -109,8 +109,11 @@ foreach ($sheet->getRowIterator() as $key=>$row) { $kind ='D'; $subkind = 'D2'; }elseif($id == 15){ - $kind ='B'; - $subkind = 'B1'; + $kind ='E'; + $subkind = 'E1'; + }elseif($id == 16){ + $kind ='F'; + $subkind = 'F1'; } if(isset($_GET['id'])){ diff --git a/wms/css/jquery-ui.cssâ¬Zone.Identifier b/wms/css/jquery-ui.cssâ¬Zone.Identifier new file mode 100644 index 00000000..d72c7818 --- /dev/null +++ b/wms/css/jquery-ui.cssâ¬Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css diff --git a/wms/css/select2.min.cssâ¬Zone.Identifier b/wms/css/select2.min.cssâ¬Zone.Identifier new file mode 100644 index 00000000..d6a27703 --- /dev/null +++ b/wms/css/select2.min.cssâ¬Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css diff --git a/wms/css/view/wipwhole-index.php b/wms/css/view/wipwhole-index.php index c24af508..8284d7ca 100644 --- a/wms/css/view/wipwhole-index.php +++ b/wms/css/view/wipwhole-index.php @@ -3,27 +3,22 @@ #table_index2_paginate { text-align: right; } - #table_index3_filter, #table_index3_paginate { text-align: right; } - #table_index4_filter, #table_index4_paginate { text-align: right; } - #table_index5_filter, #table_index5_paginate { text-align: right; } - #table_index6_filter, #table_index6_paginate { text-align: right; } - #table_index7_filter, #table_index7_paginate { text-align: right; @@ -71,117 +66,6 @@ text-align: center; } - #loadingOverlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(255, 255, 255, 0.7); - /* 透明度的背景颜色 */ - z-index: 9999; - /* 确保在最上层显示 */ - /* 添加加载动画的样式 */ - } - - .hidden { - display: none; - } - - #loadingOverlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(255, 255, 255, 0.7); - /* 半透明的背景 */ - z-index: 9999; - /* 确保显示在最上层 */ - display: flex; - justify-content: center; - align-items: center; - } - - .loading-text { - text-align: center; - margin-top: 10px; - /* 调整文字与图标之间的间距 */ - font-size: 16px; - color: #333; - /* 文字颜色 */ - } - - .loading-icon { - /* 这里是你加载图标的样式,可以是一个动画、GIF图或者SVG等 */ - /* 例如一个简单的加载圆圈动画 */ - border: 10px solid #f3f3f3; - /* 灰色边框 */ - border-top: 10px solid #3498db; - /* 蓝色顶部边框 */ - border-radius: 50%; - width: 80px; - height: 80px; - animation: spin 2s linear infinite; - /* 旋转动画 */ - } - -/* The Modal (background) */ -.modal { - display: none; /* Hidden by default */ - position: fixed; /* Stay in place */ - z-index: 1; /* Sit on top */ - padding-top: 100px; /* Location of the box */ - left: 0; - top: 0; - width: 100%; /* Full width */ - height: 100%; /* Full height */ - overflow: auto; /* Enable scroll if needed */ - -} -.modal .back{ - position: absolute; - top: 0; - left:0; - width: 100%; - height: 100%; - background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ -} -/* Modal Content */ -.modal-content { - z-index: 9; - background-color: #fefefe; - margin: auto; - padding: 20px; - border: 1px solid #888; - width: 80%; -} - -/* The Close Button */ -.close { - color: #aaaaaa; - float: right; - font-size: 28px; - font-weight: bold; -} - -.close:hover, -.close:focus { - color: #000; - text-decoration: none; - cursor: pointer; -} - - - @keyframes spin { - 0% { - transform: rotate(0deg); - } - - 100% { - transform: rotate(360deg); - } - } @media screen and (max-width: 600px) { diff --git a/wms/css/view/wipwhole-renovate-index.php b/wms/css/view/wipwhole-renovate-index.php index 9bd7eef9..8284d7ca 100644 --- a/wms/css/view/wipwhole-renovate-index.php +++ b/wms/css/view/wipwhole-renovate-index.php @@ -3,27 +3,22 @@ #table_index2_paginate { text-align: right; } - #table_index3_filter, #table_index3_paginate { text-align: right; } - #table_index4_filter, #table_index4_paginate { text-align: right; } - #table_index5_filter, #table_index5_paginate { text-align: right; } - #table_index6_filter, #table_index6_paginate { text-align: right; } - #table_index7_filter, #table_index7_paginate { text-align: right; @@ -71,60 +66,6 @@ text-align: center; } - #loadingOverlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(255, 255, 255, 0.7); - /* 透明度的背景颜色 */ - z-index: 9999; - /* 确保在最上层显示 */ - /* 添加加载动画的样式 */ - } - - .hidden { - display: none; - } - - #loadingOverlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(255, 255, 255, 0.7); - /* 半透明的背景 */ - z-index: 9999; - /* 确保显示在最上层 */ - display: flex; - justify-content: center; - align-items: center; - } - - .loading-text { - text-align: center; - margin-top: 10px; - /* 调整文字与图标之间的间距 */ - font-size: 16px; - color: #333; - /* 文字颜色 */ - } - - .loading-icon { - /* 这里是你加载图标的样式,可以是一个动画、GIF图或者SVG等 */ - /* 例如一个简单的加载圆圈动画 */ - border: 10px solid #f3f3f3; - /* 灰色边框 */ - border-top: 10px solid #3498db; - /* 蓝色顶部边框 */ - border-radius: 50%; - width: 80px; - height: 80px; - animation: spin 2s linear infinite; - /* 旋转动画 */ - } @media screen and (max-width: 600px) { diff --git a/wms/excel/ªs⌐±⌐≤ÑD╛≈└╔ªW.xlsx b/wms/excel/ªs⌐±⌐≤ÑD╛≈└╔ªW.xlsx new file mode 100644 index 00000000..d7b52d08 Binary files /dev/null and b/wms/excel/ªs⌐±⌐≤ÑD╛≈└╔ªW.xlsx differ diff --git a/wms/gary.php b/wms/gary.php index d18ed12d..90696e89 100644 --- a/wms/gary.php +++ b/wms/gary.php @@ -3,61 +3,59 @@ ini_set('display_errors', 'on'); include "fun_global.php"; include "database.php"; -print_r(manage_class("M0117")); -echo manage_class("M0117")[0]; -// // account table -// $accounttype = "A"; -// $accountid = ""; -// $pwd = "123"; -// $name = ""; -// $creater = ""; -// $create_at = date("Y-m-d H:i:s"); +// account table +$accounttype = "A"; +$accountid = ""; +$pwd = "123"; +$name = ""; +$creater = ""; +$create_at = date("Y-m-d H:i:s"); -// // 檢查 accountid 是否未重複並寫入 account 資料表 -// $sql = " -// SELECT DISTINCT -// a.accountid, -// w.contractno, -// w.custom -// FROM wipwholestatus AS w -// LEFT JOIN ( -// SELECT -// accountid -// FROM account -// ) AS a -// ON a.accountid = w.contractno -// WHERE a.accountid IS NULL -// "; -// $data = mysqli_query($link, $sql); +// 檢查 accountid 是否未重複並寫入 account 資料表 +$sql = " + SELECT DISTINCT + a.accountid, + w.contractno, + w.custom + FROM wipwholestatus AS w + LEFT JOIN ( + SELECT + accountid + FROM account + ) AS a + ON a.accountid = w.contractno + WHERE a.accountid IS NULL +"; +$data = mysqli_query($link, $sql); -// $J = 0; -// foreach ($data as $key => $row) : -// echo $row['accountid']."
"; -// echo $J++; -// if (empty($row['accountid'])) { +$J = 0; +foreach ($data as $key => $row) : + echo $row['accountid']."
"; + echo $J++; + if (empty($row['accountid'])) { -// $accountid = $row['contractno']; -// $name = $row['custom']; -// echo $sql2 = " -// INSERT INTO account ( -// accounttype, -// accountid, -// pwd, -// name, -// creater, -// create_at -// ) VALUES ( -// '$accounttype', -// '$accountid', -// '$pwd', -// '$name', -// '$creater', -// '$create_at' -// ) -// "; -// echo "
"; -// mysqli_query($link, $sql2); -// } -// endforeach; + $accountid = $row['contractno']; + $name = $row['custom']; + echo $sql2 = " + INSERT INTO account ( + accounttype, + accountid, + pwd, + name, + creater, + create_at + ) VALUES ( + '$accounttype', + '$accountid', + '$pwd', + '$name', + '$creater', + '$create_at' + ) + "; + echo "
"; + mysqli_query($link, $sql2); + } +endforeach; diff --git a/wms/js/jquery-1.9.1.jsâ¬Zone.Identifier b/wms/js/jquery-1.9.1.jsâ¬Zone.Identifier new file mode 100644 index 00000000..103119d3 --- /dev/null +++ b/wms/js/jquery-1.9.1.jsâ¬Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=http://code.jquery.com/jquery-1.9.1.js diff --git a/wms/js/jquery-ui.jsâ¬Zone.Identifier b/wms/js/jquery-ui.jsâ¬Zone.Identifier new file mode 100644 index 00000000..68fd81a2 --- /dev/null +++ b/wms/js/jquery-ui.jsâ¬Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=http://code.jquery.com/ui/1.10.4/jquery-ui.js diff --git a/wms/js/select2.min.jsâ¬Zone.Identifier b/wms/js/select2.min.jsâ¬Zone.Identifier new file mode 100644 index 00000000..ff4df914 --- /dev/null +++ b/wms/js/select2.min.jsâ¬Zone.Identifier @@ -0,0 +1,3 @@ +[ZoneTransfer] +ZoneId=3 +HostUrl=https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js diff --git a/wms/menu-edit.php b/wms/menu-edit.php index d202247c..b7602d89 100644 --- a/wms/menu-edit.php +++ b/wms/menu-edit.php @@ -1,302 +1,95 @@ - - +
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
+
+ +
- -
-
- - -
-
- - - - - -
-
- - -
+
+ +
- -
-
- - -
-
- - - - - -
-
- - -
+
+ +
- -
-
- - -
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+
+
">
- - \ No newline at end of file diff --git a/wms/menu-record-update.php b/wms/menu-record-update.php index 8787ca98..81d07022 100644 --- a/wms/menu-record-update.php +++ b/wms/menu-record-update.php @@ -1,172 +1,29 @@ $v) { - // $$k = htmlspecialchars(stripslashes(trim($v))); - // } - - if (!empty($_POST['can_read'])) { - $auth_change_status = true; - $link_content = explode("\r\n", $_POST['link_content']); - foreach ($_POST['can_read'] as $id) { - - // 更新部門可寫權限 json - $permission = []; - $department_id = 0; - $role_id = 0; - - $sql = " - SELECT - department_id, - role_id, - permission - FROM department - WHERE 1=1 - AND id = '$id' - "; - $result = mysqli_query($link, $sql); - $data = mysqli_fetch_assoc($result); - $department_id = $data['department_id']; - $role_id = $data['role_id']; - mysqli_free_result($result); - $permission = json_decode($data['permission'], true); - foreach ($link_content as $row) { - $permission[$row] = '1'; - } - $new_permiccion = json_encode($permission); - - // 更改此職位權限 - $sql = " - UPDATE department - SET permission = '$new_permiccion' - WHERE 1=1 - AND id = '$id' - "; - mysqli_query($link, $sql); - - // 更改此職位底下所有員工的權限 - $sql = " - SELECT accountid - FROM account - WHERE 1=1 - AND department_id = '$department_id' - AND role_id = '$role_id' - "; - $result = mysqli_query($link, $sql); - $data2 = mysqli_fetch_all($result, MYSQLI_ASSOC); - mysqli_free_result($result); - foreach ($data2 as $row) { - $sql = " - UPDATE account_auth - SET permission = '$new_permiccion' - WHERE 1=1 - AND accountid = '" . $row['accountid'] . "' - "; - mysqli_query($link, $sql); - } - } +if(isset($_POST['update'])) { + foreach ($_POST as $k => $v) { + $$k = htmlspecialchars(stripslashes(trim($v))); } - if (!empty($_POST['can_write'])) { - $auth_change_status = true; - $link_content = explode("\r\n", $_POST['link_content']); - foreach ($_POST['can_write'] as $id) { - - // 更新部門可寫權限 json - $permission = []; - $department_id = 0; - $role_id = 0; - - $sql = " - SELECT - department_id, - role_id, - permission - FROM department - WHERE 1=1 - AND id = '$id' - "; - $result = mysqli_query($link, $sql); - $data = mysqli_fetch_assoc($result); - $department_id = $data['department_id']; - $role_id = $data['role_id']; - mysqli_free_result($result); - $permission = json_decode($data['permission'], true); - foreach ($link_content as $row) { - $permission[$row] = '3'; - } - $new_permiccion = json_encode($permission); - - // 更改此職位權限 - $sql = " - UPDATE department - SET permission = '$new_permiccion' - WHERE 1=1 - AND id = '$id' - "; - mysqli_query($link, $sql); - - // 更改此職位底下所有員工的權限 - $sql = " - SELECT accountid - FROM account - WHERE 1=1 - AND department_id = '$department_id' - AND role_id = '$role_id' - "; - $result = mysqli_query($link, $sql); - $data2 = mysqli_fetch_all($result, MYSQLI_ASSOC); - mysqli_free_result($result); - foreach ($data2 as $row) { - $sql = " - UPDATE account_auth - SET permission = '$new_permiccion' - WHERE 1=1 - AND accountid = '" . $row['accountid'] . "' - "; - mysqli_query($link, $sql); - } - } - } - $main_menu_seq = empty($_POST['main_menu_seq']) ? '' : $_POST['main_menu_seq']; - $main_menu = empty($_POST['main_menu']) ? '' : $_POST['main_menu']; - $sub_menu_seq = empty($_POST['sub_menu_seq']) ? '' : $_POST['sub_menu_seq']; - $sub_menu = empty($_POST['sub_menu']) ? '' : $_POST['sub_menu']; - $sub_menu_eng = empty($_POST['sub_menu_eng']) ? '' : $_POST['sub_menu_eng']; - $mlink = empty($_POST['mlink']) ? '' : $_POST['mlink']; - $link_content = empty($_POST['link_content']) ? '' : $_POST['link_content']; - $status = empty($_POST['status']) ? '' : $_POST['status']; - $id = empty($_POST['id']) ? '' : $_POST['id']; - $create_at = date('Y-m-d H:i:s'); - //$link_content = str_replace(PHP_EOL, ',', $link_content); $db_query = "UPDATE menu set main_menu_seq = '$main_menu_seq', main_menu = '$main_menu', sub_menu_seq = '$sub_menu_seq', sub_menu = '$sub_menu', "; $db_query .= "sub_menu_eng = '$sub_menu_eng', mlink = '$mlink', link_content = '$link_content', status = '$status', create_at = '$create_at' WHERE id='$id'"; - mysqli_query($link, $db_query); $affected = mysqli_affected_rows($link); mysqli_close($link); if ($affected > 0) { echo ""; - } elseif ($auth_change_status == true) { - echo ""; } elseif ($affected == 0) { echo ""; + echo "location.href='menu-index.php?function_name=menu&".$token_link."';"; + echo ""; } else { echo "{$db_query} 語法執行失敗,錯誤訊息SSS: " . mysqli_error($link); } } +?> \ No newline at end of file diff --git a/wms/sign/list.php b/wms/sign/list.php index 7fc3c622..d8b732d8 100644 --- a/wms/sign/list.php +++ b/wms/sign/list.php @@ -1,6 +1,6 @@
@@ -154,7 +133,7 @@ $flow_name_opt = (array_unique($flow_name_opt, SORT_REGULAR));
- + @@ -171,27 +150,7 @@ $flow_name_opt = (array_unique($flow_name_opt, SORT_REGULAR)); if ($data['flow_code'] !== 'Z') { ?> - + diff --git a/wms/wipwhole-change-contractdate.php b/wms/wipwhole-change-contractdate.php index 35aa30b0..ee6ff0f3 100644 --- a/wms/wipwhole-change-contractdate.php +++ b/wms/wipwhole-change-contractdate.php @@ -1,6 +1,36 @@ menu_v3($user_id, $accounttype); + $login_json = json_encode($jsonres, JSON_UNESCAPED_UNICODE); +} + +?> + + -
- - - - $data, @@ -299,7 +272,6 @@ mysqli_close($link); $(function() { $(".data_table_div").hide(); showTable(sheetNum); - document.getElementById('loadingOverlay').classList.add('hidden'); }) const formData = new FormData(); @@ -396,7 +368,6 @@ mysqli_close($link); } function showTable(code) { - console.log(code); var tmp_arr = { "All": "1", "A": "2", @@ -405,8 +376,8 @@ mysqli_close($link); "CH": "5", "Z": "6", } - $("nav.navbar.navbar-tabs div > ul > li").attr("class", ""); - $("nav.navbar.navbar-tabs div > ul > li:nth-child(" + tmp_arr[code] + ")").attr("class", "active"); + $("body > nav.navbar.navbar-tabs > div > ul > li").attr("class", ""); + $("body > nav.navbar.navbar-tabs > div > ul > li:nth-child(" + tmp_arr[code] + ")").attr("class", "active"); $(".data_table_div").hide(); $("#data_" + code + "_table_div").show(); } @@ -532,22 +503,6 @@ mysqli_close($link); $("#del_form").submit(); } - - diff --git a/wms/wipwhole-rec-invoice-edit-fileupload.php b/wms/wipwhole-rec-invoice-edit-fileupload.php index 82f3cb93..98acc091 100644 --- a/wms/wipwhole-rec-invoice-edit-fileupload.php +++ b/wms/wipwhole-rec-invoice-edit-fileupload.php @@ -67,5 +67,3 @@ $completion_acceptance_file = fileIUpload("completion_acceptance_file"); $shengguanok_status_file = fileIUpload("shengguanok_status_file"); // 工務助理 $outsourcer_contract_file = fileIUploads("outsourcer_contract_file"); -// 品證 -$official_check_file = fileIUpload("official_check_file"); \ No newline at end of file diff --git a/wms/wipwhole-rec-invoice-edit-submit.php b/wms/wipwhole-rec-invoice-edit-submit.php index 1de98846..0412cc22 100644 --- a/wms/wipwhole-rec-invoice-edit-submit.php +++ b/wms/wipwhole-rec-invoice-edit-submit.php @@ -1,5 +1,5 @@ $v) { $$k = htmlspecialchars(stripslashes(trim($v))); } - $id = empty($_POST['id']) ? null : $_POST['id']; // 檢查簽核狀態 - if (checkWwsAssianStatus($link, $user_id, $id)) { + if (checkWwsAssianStatus($link, $user_id)) { echo "退回至工務階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-退回至工務階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-退回至工務階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['gongwokname'], $data['gongwokmail']], - ], - "永佳捷科技" - ); do_wws_next_assign(getGongWuokNo($link), $form_key, 'A'); } } @@ -963,22 +899,7 @@ function backMarketingSssign($link, $salesid, $user_id) if (isset($_GET['id']) || isset($_GET['form_key'])) { $id = isset($_GET['id']) ? $_GET['id'] : getId($link, $_GET['form_key']); $form_key = isset($_GET['form_key']) ? $_GET['form_key'] : getForm_key($link, $id); - include "./class/Cmail.php"; - $cmail = new Cmail(); - $data = getWipwholestatusDetail($link, $id); - $data['salesname'] = accountid2name($data['salesid'])[$data['salesid']]; - $data['salesmail'] = accountid2email([$data['salesid']])[$data['salesid']]; write_note($link, $id, $user_id, "退回至營業階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-退回營業階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-退回營業階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['salesname'], $data['salesmail']], - ], - "永佳捷科技" - ); do_wws_next_assign($salesid, $form_key, 'B'); } } @@ -989,22 +910,7 @@ function backDesignssign($link, $user_id) if (isset($_GET['id']) || isset($_GET['form_key'])) { $id = isset($_GET['id']) ? $_GET['id'] : getId($link, $_GET['form_key']); $form_key = isset($_GET['form_key']) ? $_GET['form_key'] : getForm_key($link, $id); - include "./class/Cmail.php"; - $cmail = new Cmail(); - $data = getWipwholestatusDetail($link, $id); - $data['designname'] = accountid2name("M0173")["M0173"]; - $data['designmail'] = accountid2email(["M0173"])["M0173"]; write_note($link, $id, $user_id, "退回至設計階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-退回設計階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-退回設計階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['designname'], $data['designmail']], - ], - "永佳捷科技" - ); do_wws_next_assign("M0173", $form_key, 'C'); } } @@ -1021,172 +927,43 @@ function write_note($link, $id, $user_id, $content) mysqli_query($link, $updatesql); } -// 各區營銷(契約)經理判斷程式 -function checkUseridIsManager($user_id) -{ - // 北區 劉永德 - if (in_array($user_id, ['M0137'])) - return true; - // 中區 李烘銘 - if (in_array($user_id, ['M0086'])) - return true; - // 桃竹 張莉凱 - if (in_array($user_id, ['M0026'])) - return true; - // 宜花東 陳志文 - if (in_array($user_id, ['M0054'])) - return true; - // 南區 吳育宗 - if (in_array($user_id, ['M0033'])) - return true; - return false; -} - // 表單簽核狀態檢查主程式 function checkWwsAssianStatus($link, $user_id) { - if (isset($_GET['id']) || isset($_GET['form_key'])) { $id = isset($_GET['id']) ? $_GET['id'] : getId($link, $_GET['form_key']); $form_key = isset($_GET['form_key']) ? $_GET['form_key'] : getForm_key($link, $id); } - include "./class/Cmail.php"; - $cmail = new Cmail(); - $data = getWipwholestatusDetail($link, $id); - $data['salesname'] = accountid2name($data['salesid'])[$data['salesid']]; - $data['salesmail'] = accountid2email([$data['salesid']])[$data['salesid']]; - $data['salesmanagername'] = accountid2name(manage_class($data['salesid'])[0])[manage_class($data['salesid'])[0]]; - $data['salesmanagermail'] = accountid2email([manage_class($data['salesid'])[0]])[manage_class($data['salesid'])[0]]; - $data['designname'] = accountid2name("M0173")["M0173"]; - $data['designmail'] = accountid2email(["M0173"])["M0173"]; - $data['designleadername'] = accountid2name(getSheJiokLeaderNo($link))[getSheJiokLeaderNo($link)]; - $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)]; - // 確認工務階段 進入營業階段 if (checkNowFormStatus($link) == 'A' && checkGongWuok($link, $id) == '0') { write_note($link, $id, $user_id, "工務提交至營業階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-工務提交至營業階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-工務提交至營業階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['salesname'], $data['salesmail']], - [$data['gongwokname'], $data['gongwokmail']] - ], - "永佳捷科技" - ); do_wws_next_assign(getYingYeokNo($link), $form_key, 'B'); return; } // 確認營業階段 進入設計人員(汰改:林坤翰 M0052 改 林昭翰 M0173)階段 if (checkNowFormStatus($link) == 'B' && checkYingYeok($link, $id) == '0') { - if (checkUseridIsManager($user_id)) { - write_note($link, $id, $user_id, "營業提交至設計階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-營業提交至設計階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-營業提交至設計階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['salesname'], $data['salesmail']], - [$data['designname'], $data['designmail']] - ], - "永佳捷科技" - ); - do_wws_next_assign("M0173", $form_key, 'C'); - return; - } else { - write_note($link, $id, $user_id, "營業提交至營業經理階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-營業提交至營業經理階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-營業提交至營業經理階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['salesname'], $data['salesmail']], - [$data['salesmanagername'], $data['salesmanagermail']] - ], - "永佳捷科技" - ); - do_wws_next_assign(manage_class($data['salesid'])[0], $form_key, 'F'); - } - } - - // 確認營業主管階段 進入設計人員(新梯:郭承瑋 M0023)階段 - if (checkNowFormStatus($link) == 'F' && checkYingYeok($link, $id) == '0') { - if (checkUseridIsManager($user_id)) { - write_note($link, $id, $user_id, "營業經理提交至設計階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-營業經理提交至設計階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-營業經理提交至設計階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['salesname'], $data['salesmail']], - [$data['designname'], $data['designmail']] - ], - "永佳捷科技" - ); - do_wws_next_assign("M0173", $form_YD_key, 'C'); - return true; - } + write_note($link, $id, $user_id, "營業提交至設計階段"); + do_wws_next_assign("M0173", $form_key, 'C'); + return; } - // 確認設計人員(汰改:林坤翰 M0052 改 林昭翰 M0173)階段 進入設計主管階段 if (checkNowFormStatus($link) == 'C' && checkSheJiok($link, $id) == '0') { write_note($link, $id, $user_id, "設計提交至設計主管階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-設計提交至設計主管階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-設計提交至設計主管階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['designleadername'], $data['designleadermail']], - [$data['designname'], $data['designmail']] - ], - "永佳捷科技" - ); do_wws_next_assign(getSheJiokLeaderNo($link), $form_key, 'D'); return; } // 確認設計主管(江京鴻 M0019)階段 進入生管階段 if (checkNowFormStatus($link) == 'D' && checkSheJiokLeader($link, $id) == '0') { write_note($link, $id, $user_id, "設計主管提交至生管階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-設計提交至設計主管階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-設計提交至設計主管階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['designleadername'], $data['designleadermail']], - [$data['shengguanname'], $data['shengguanmail']] - ], - "永佳捷科技" - ); do_wws_next_assign(getShengGuanokLeaderNo($link), $form_key, 'E'); return; } // 確認生管階段(營業部及設計部) 結束簽核流程 if (checkNowFormStatus($link) == 'E' && checkShengGuanok($link, $id) == '0') { - write_note($link, $id, $user_id, "進入生產結案階段"); - $mail_title = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-進入生產結案階段"; - $mail_content = "作番大日程(汰改)合約號:" . $data['contractno'] . "作番號:" . $data['facilityno'] . "-進入生產結案階段"; - $cmail->sendx( - $mail_title, - $mail_content, - [ - [$data['shengguanname'], $data['shengguanmail']] - ], - "永佳捷科技" - ); + write_note($link, $id, $user_id, "進入結案階段"); do_wws_next_assign('00000', $form_key, 'Z'); return; } diff --git a/wms/wipwhole-renovate-rec-invoice-edit.php b/wms/wipwhole-renovate-rec-invoice-edit.php index 2fde966b..9b9757fb 100644 --- a/wms/wipwhole-renovate-rec-invoice-edit.php +++ b/wms/wipwhole-renovate-rec-invoice-edit.php @@ -5,9 +5,8 @@ * 1. A:工務組長確認中 生管建立大日程 (或是系統洗入) * 工務:宜蘭=高培軒(M0087) 北=吳宗紘(M0040) 中=林瑋隆(M0113) 南=韋宗榮(M0039)改鄭存邑(M0102) * 2. B:營業員確認中 - * 3. F:營業員主管確認中 * 3. C:設計部門確認中 (郭承瑋) - * 4. D:設計部門主管確認中 (M0019江京鴻) + * 4. D:設計部門主管確認中 (N0019江京鴻) * 5. E:生管確認中 (M0024伃廷) * 6. Z:本單結案 (00000) */ @@ -233,7 +232,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; $assign_status = array( 'A' => '工務確認中', 'B' => '工務部門已確認
營業部門確認中', - 'F' => '營業部門已確認
營業主管確認中', 'C' => '營業部門已確認
設計部門確認中', 'D' => '設計部門已確認
設計部門主管確認中', 'E' => '營業部門主管已確認
生管部門確認中', @@ -379,31 +377,31 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
(意匠圖) "; - // echo "申請上傳"; - // } else { - // if (in_array($row2['change_status'], ['A', 'B', 'D'])) { - // echo "
"; - // echo "客戶姓名:" . $row2['custom_name'] . "
狀態:審核中
"; - // } - // if ($row2['change_status'] == 'C') { - // echo "
"; - // echo "客戶姓名:" . $row2['custom_name'] . "
狀態:已取消
"; - // } - // if ($row2['change_status'] == 'Z') { - // echo "
"; - // echo "客戶姓名:" . $row2['custom_name'] . "
狀態:審核通過
"; - // } - // } + $result2 = getWipwholeChangePlanningCustomerDetailsStatus($link, $id); + $row2 = mysqli_fetch_assoc($result2); + if (empty($row2['change_status'])) { + $show_tmp_arr = [ + '311', '312', '313', '314', '315', + '501', '511', '512', '513', '514', + '220', '320' + ]; + if (in_array($user_department_id, $show_tmp_arr)) + echo "
"; + echo "申請上傳"; + } else { + if (in_array($row2['change_status'], ['A', 'B', 'D'])) { + echo "
"; + echo "客戶姓名:" . $row2['custom_name'] . "
狀態:審核中
"; + } + if ($row2['change_status'] == 'C') { + echo "
"; + echo "客戶姓名:" . $row2['custom_name'] . "
狀態:已取消
"; + } + if ($row2['change_status'] == 'Z') { + echo "
"; + echo "客戶姓名:" . $row2['custom_name'] . "
狀態:審核通過
"; + } + } ?> @@ -1257,12 +1249,12 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; @@ -1353,96 +1345,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; (工務助理項目) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
序號序號 系統名稱 流程名稱 接收日期
- - "> - 作番大日程-合約號: 作番號: - - - "> - - - - - "> @@ -416,9 +414,13 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; 附件 - 客戶姓名:" placeholder="輸入後即可上傳附件" /> -
- + > 下載附件" : ""; ?> @@ -711,22 +713,12 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; - + - - - - 若無工勘資料請勿移交至設計階段!
QC及官檢類型 - /> - - /> - - /> - + /> + + /> + + /> +
QC及官檢類型 - /> - - /> - - /> - -
內部QC日 -
- > - - - -
-
確認人 - -
QC合格日 -
- > - - - -
-
確認人 - -
官檢日 -
- > - > - - - -
-
確認人 - -
移交日 -
- > - - - -
-
確認人 - -
發包類型 @@ -1616,84 +1518,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
實際安裝開工日 -
- > - - - -
-
確認人 - -
實際安裝完工日 -
- > - - - -
-
確認人 - -
實際試車開工日 -
- > - - - -
-
確認人 - -
實際試車完工日 -
- > - - - -
-
確認人 - -
備註 @@ -1732,19 +1556,15 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
-
-
-
-
@@ -1808,34 +1628,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; $('#renovate_type').select2(); $("#renovate_type").val(jsonData).trigger("change"); $('#site_survey_contact_verify').select2(); - checkCustomerPlanningVerifyFileKeyinStatus(); - checkDeliveryDateKeyinStatus(); }); - - function checkCustomerPlanningVerifyFileKeyinStatus() { - checkCustomerPlanningVerifyFileDisabled(); - $("#real_custom_name").keyup(function() { - checkCustomerPlanningVerifyFileDisabled(); - }); - } - - function checkCustomerPlanningVerifyFileDisabled() { - if ($("#real_custom_name").val() !== "") { - $("#customer_planning_verify_file").prop("disabled", false); - } else { - $("#customer_planning_verify_file").prop("disabled", true); - } - } - - function checkDeliveryDateKeyinStatus() { - $("#delivery_date").prop("disabled", true); - if ($("#end_qc_date").val() !== "") { - $("#delivery_date").prop("disabled", false); - } - if ($("#official_check_date").val() !== "") { - $("#delivery_date").prop("disabled", false); - } - } $(function() { var tab = $('#tab').val(); $("#tabs").tabs({ @@ -1859,15 +1652,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; 'qc_date', 'end_qc_date', 'official_check_date', - 'delivery_date', - 'qc_date2', - 'end_qc_date2', - 'official_check_date2', - 'delivery_date2', - 'install_start_date2', - 'install_end_date2', - 'tryrun_start_date2', - 'tryrun_end_date2', + 'delivery_date' ] for (var i = 0; i < catchTime_input_arr.length; i++) { inputChangeCatchTime(catchTime_input_arr[i]); diff --git a/wms/wipwhole-renovate-rec-invoice.php b/wms/wipwhole-renovate-rec-invoice.php index 12f9b99a..601026c8 100644 --- a/wms/wipwhole-renovate-rec-invoice.php +++ b/wms/wipwhole-renovate-rec-invoice.php @@ -41,7 +41,6 @@ if ($department_id == "321" || $department_id == "220") { COUNT(*) FROM wipwholestatus WHERE facilityno = '$facilityno' - AND status = '1' "; $result = mysqli_query($link, $sql); $row = mysqli_fetch_array($result);