Browse Source

1.iotapi/database 改連線localhost

2.新增三聯地震感知程式碼
3.修改account新增可更改人物角色權限
4.大日程將編輯按鈕改至前方
5.規掉新增設計部門可查看下拉式選單權限
gary
IA2301\IA_2301 1 year ago
parent
commit
c1e7c9748e
  1. 2
      iotapi/database.php
  2. 165
      iotapi/receive_sanlien.php
  3. 114
      iotapi/receive_sanlien.sql
  4. 14
      iotapi/receive_sanlien.txt
  5. 26
      iotapi/receive_sanlien_send.php
  6. 15
      wms/account-edit.php
  7. 14
      wms/account-record-update.php
  8. BIN
      wms/excel/sanlien.xlsx
  9. 17
      wms/mkt/specsurvey_renovate-view.php
  10. BIN
      wms/pdf/【範本】營業提供官檢資料.pdf
  11. 85
      wms/sanlien/api/downloadExcel.php
  12. 26
      wms/sanlien/api/getSanlien.php
  13. 47
      wms/sanlien/conn.php
  14. 48
      wms/sanlien/js/alpine.js
  15. 5
      wms/sanlien/js/alpinejs/cdn.min.js
  16. 25
      wms/sanlien/js/axios.js
  17. 2
      wms/sanlien/js/axios/axios.min.js
  18. 48
      wms/sanlien/js/el.js
  19. 4
      wms/sanlien/js/jquery/jquery-3.1.1.min.js
  20. 80
      wms/sanlien/receive_sanlien_index.php
  21. 8
      wms/sanlien/styles/style.css
  22. 71
      wms/wipwhole-index-table-html.php
  23. 2
      wms/wipwhole-index.php
  24. 2
      wms/wipwhole-rec-invoice-edit-fileupload.php
  25. 42
      wms/wipwhole-rec-invoice-edit-notice-mail.php
  26. 2
      wms/wipwhole-rec-invoice-edit-submit.php
  27. 4
      wms/wipwhole-rec-invoice-edit-updatesql.php
  28. 147
      wms/wipwhole-rec-invoice-edit.php
  29. 2
      wms/wipwhole-renovate-index-function.php
  30. 71
      wms/wipwhole-renovate-index-table-html.php
  31. 2
      wms/wipwhole-renovate-index.php
  32. 44
      wms/wipwhole-renovate-rec-invoice-edit-notice-mail.php
  33. 2
      wms/wipwhole-renovate-rec-invoice-edit-submit.php
  34. 136
      wms/wipwhole-renovate-rec-invoice-edit.php
  35. 2
      wms/wipwholeinstall-index-table-html.php

2
iotapi/database.php

@ -1,6 +1,6 @@
<?php <?php
date_default_timezone_set("Asia/Taipei"); date_default_timezone_set("Asia/Taipei");
$host = 'db-104.coowo.com:3306'; $host = 'localhost';
$dbuser ='masadaroot'; $dbuser ='masadaroot';
$dbpassword = 'x6h5E5p#u8y'; $dbpassword = 'x6h5E5p#u8y';
$dbname = 'appwms'; $dbname = 'appwms';

165
iotapi/receive_sanlien.php

@ -1,23 +1,24 @@
<?php <?php
require_once "database.php";
date_default_timezone_set("Asia/Taipei"); date_default_timezone_set("Asia/Taipei");
$postData = file_get_contents('php://input'); $postData = file_get_contents('php://input');
echo "收到:" . $postData . date("Y-m-d H:i:s") . "<br>"; $from = "system";
$create_at = date("Y-m-d H:i:s");
$myfile = fopen("receive_sanlien.txt", "a") or die("Unable to open file!"); $myfile = fopen("receive_sanlien.txt", "a") or die("Unable to open file!");
fwrite($myfile, $postData . date("Y-m-d H:i:s") . "\n"); fwrite($myfile, $postData . $create_at . "\n");
fclose($myfile); fclose($myfile);
#with fopen("log.txt", "a") as f:
# f.write("asdf");
#$data = json_encode(array('a'=>" 234 ", 'b'=>2));
#echo $data;
// gary_start
if ($postData) { if ($postData) {
$data = json_decode($postData, true); $data = json_decode($postData, true);
//地震開關序號 裝置唯一值
$SERIAL_NO = isset($data['SERIAL NO.']) ? $data['SERIAL NO.'] : "";
//封包序號
$ID = isset($data['ID']) ? $data['ID'] : "";
//地震狀態, START為地震開始,END為地震結束。
$STATUS = isset($data['STATUS']) ? $data['STATUS'] : "";
$NETWORK_STATUS = isset($data['NETWORK STATUS']) ? $data['NETWORK STATUS'] : ""; $NETWORK_STATUS = isset($data['NETWORK STATUS']) ? $data['NETWORK STATUS'] : "";
$SS_SYS_YEAR = isset($data['SS_SYS_YEAR']) ? $data['SS_SYS_YEAR'] : ""; $SS_SYS_YEAR = isset($data['SS_SYS_YEAR']) ? $data['SS_SYS_YEAR'] : "";
$SS_SYS_MONTH = isset($data['SS_SYS_MONTH']) ? $data['SS_SYS_MONTH'] : ""; $SS_SYS_MONTH = isset($data['SS_SYS_MONTH']) ? $data['SS_SYS_MONTH'] : "";
@ -30,7 +31,7 @@ if ($postData) {
//地震事件時間、年 //地震事件時間、年
$SS_EVENT_YEAR = isset($data['SS_EVENT_YEAR']) ? $data['SS_EVENT_YEAR'] : ""; $SS_EVENT_YEAR = isset($data['SS_EVENT_YEAR']) ? $data['SS_EVENT_YEAR'] : "";
//地震事件時間、月 //地震事件時間、月
$SS_EVENT_MONTH = isset($data['S_EVENT_MONTH']) ? $data['SS_EVENT_MONTH'] : ""; $SS_EVENT_MONTH = isset($data['SS_EVENT_MONTH']) ? $data['SS_EVENT_MONTH'] : "";
//地震事件時間、日 //地震事件時間、日
$SS_EVENT_DAY = isset($data['SS_EVENT_DAY']) ? $data['SS_EVENT_DAY'] : ""; $SS_EVENT_DAY = isset($data['SS_EVENT_DAY']) ? $data['SS_EVENT_DAY'] : "";
//地震事件時間、時 //地震事件時間、時
@ -77,6 +78,8 @@ if ($postData) {
//64889轉換後為 -647 //64889轉換後為 -647
//-647 請除10 = -64.7 gal 代表地震時X軸瞬間加速度為負向 //-647 請除10 = -64.7 gal 代表地震時X軸瞬間加速度為負向
$SS_INTENSITY_PGA_VX = isset($data['SS_INTENSITY_PGA_VX']) ? $data['SS_INTENSITY_PGA_VX'] : ""; $SS_INTENSITY_PGA_VX = isset($data['SS_INTENSITY_PGA_VX']) ? $data['SS_INTENSITY_PGA_VX'] : "";
//X軸加速度 請除10,2044 / 10 = 204.4 gal
$SS_INTENSITY_PGAX = isset($data['SS_INTENSITY_PGAX']) ? $data['SS_INTENSITY_PGAX'] : "";
//Y軸加速度 請除10,2044 / 10 = 204.4 gal //Y軸加速度 請除10,2044 / 10 = 204.4 gal
$SS_INTENSITY_PGAY = isset($data['SS_INTENSITY_PGAY']) ? $data['SS_INTENSITY_PGAY'] : ""; $SS_INTENSITY_PGAY = isset($data['SS_INTENSITY_PGAY']) ? $data['SS_INTENSITY_PGAY'] : "";
//Z軸加速度 請除10,279 / 10 = 27.9 gal //Z軸加速度 請除10,279 / 10 = 27.9 gal
@ -92,24 +95,128 @@ if ($postData) {
// 0 = OFF 1 = ON,bit0-2對應Relay0-2 // 0 = OFF 1 = ON,bit0-2對應Relay0-2
$SS_INTENSITY_DO = isset($data['SS_INTENSITY_DO']) ? $data['SS_INTENSITY_DO'] : ""; $SS_INTENSITY_DO = isset($data['SS_INTENSITY_DO']) ? $data['SS_INTENSITY_DO'] : "";
//地震狀態, START為地震開始,END為地震結束。 $sql = "
$STATUS = isset($data['STATUS']) ? $data['STATUS'] : ""; INSERT INTO sanlien_log (
`SERIAL_NO`,
//地震開關序號 `ID`,
$SERIAL_NO = isset($data['SERIAL NO.']) ? $data['SERIAL NO.'] : ""; `STATUS`,
`SS_INTENSITY`,
//封包序號 `NETWORK_STATUS`,
$ID = isset($data['ID']) ? $data['ID'] : ""; `SS_SYS_YEAR`,
`SS_SYS_MONTH`,
`SS_SYS_DAY`,
// 地震開始 `SS_SYS_HOUR`,
if ($data['STATUS'] == "START") { `SS_SYS_MINUTE`,
`SS_SYS_SECOND`,
`SS_STATUS`,
`ELE_STATUS`,
`SS_EVENT_YEAR`,
`SS_EVENT_MONTH`,
`SS_EVENT_DAY`,
`SS_EVENT_HOUR`,
`SS_EVENT_MINUTE`,
`SS_EVENT_SECOND`,
`SS_INTENSITY_PGA`,
`SS_INTENSITY_PGV`,
`SS_INTENSITY_PGA_VX`,
`SS_INTENSITY_PGA_VY`,
`SS_INTENSITY_PGA_VZ`,
`SS_INTENSITY_PGV_VX`,
`SS_INTENSITY_PGV_VY`,
`SS_INTENSITY_PGV_VZ`,
`SS_INTENSITY_PGAX`,
`SS_INTENSITY_PGAY`,
`SS_INTENSITY_PGAZ`,
`SS_INTENSITY_PGVX`,
`SS_INTENSITY_PGVY`,
`SS_INTENSITY_PGVZ`,
`SS_INTENSITY_DO`,
`from`,
`create_at`
)VALUES(
'$SERIAL_NO',
'$ID',
'$STATUS',
'$SS_INTENSITY',
'$NETWORK_STATUS',
'$SS_SYS_YEAR',
'$SS_SYS_MONTH',
'$SS_SYS_DAY',
'$SS_SYS_HOUR',
'$SS_SYS_MINUTE',
'$SS_SYS_SECOND',
'$SS_STATUS',
'$ELE_STATUS',
'$SS_EVENT_YEAR',
'$SS_EVENT_MONTH',
'$SS_EVENT_DAY',
'$SS_EVENT_HOUR',
'$SS_EVENT_MINUTE',
'$SS_EVENT_SECOND',
'$SS_INTENSITY_PGA',
'$SS_INTENSITY_PGV',
'$SS_INTENSITY_PGA_VX',
'$SS_INTENSITY_PGA_VY',
'$SS_INTENSITY_PGA_VZ',
'$SS_INTENSITY_PGV_VX',
'$SS_INTENSITY_PGV_VY',
'$SS_INTENSITY_PGV_VZ',
'$SS_INTENSITY_PGAX',
'$SS_INTENSITY_PGAY',
'$SS_INTENSITY_PGAZ',
'$SS_INTENSITY_PGVX',
'$SS_INTENSITY_PGVY',
'$SS_INTENSITY_PGVZ',
'$SS_INTENSITY_DO',
'$from',
'$create_at'
)
";
mysqli_query($link, $sql);
mysqli_close($link);
$earthquake_magnitude = getEarthquakeMagnitude($SS_INTENSITY);
$earthquake_time = $SS_EVENT_YEAR . "/" . $SS_EVENT_MONTH . "/" . $SS_EVENT_DAY . " " . $SS_EVENT_HOUR . ":" . $SS_EVENT_MINUTE . ":" . $SS_EVENT_SECOND;
if (in_array($STATUS, ['START', 'END'])) {
//以下推送到客户端消息
$access_token = array();
// 正式環境群組
// $access_token[] = "blymLDSO21gDaCXA6nJ2jf6fEZTNE0wEwANbLAhKMhM";
// 測試環境群組
$access_token[] = "Z6mRhmUT9yzPTrhBcJGdvo3SNTLVVXPAoWA9WyoKl5W";
$TargetCount = count($access_token);
$Push_Content['message'] = $faultstate . "\n";
$Push_Content['message'] = $Push_Content['message'] . "三連裝置編號: " . $SERIAL_NO . "\n";
$Push_Content['message'] = $Push_Content['message'] . "地震發生時間:" . $earthquake_time . "\n";
$Push_Content['message'] = $Push_Content['message'] . $earthquake_magnitude . "\n";
for ($i = 0; $i < $TargetCount; $i++) {
$ch = curl_init("https://notify-api.line.me/api/notify");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($Push_Content));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Bearer ' . $access_token[$i]
));
$response_json_str = curl_exec($ch);
curl_close($ch);
}
} }
}
// 地震結束 function getEarthquakeMagnitude($SS_INTENSITY)
if ($data['STATUS'] == "END") { {
if (empty($SS_INTENSITY))
return "";
if (intval(substr($SS_INTENSITY, 0, 1)) < 5) {
return "發生" . substr($SS_INTENSITY, 0, 1) . "級地震";
} }
if (intval(substr($SS_INTENSITY, 0, 1)) >= 5) {
return "發生" . substr($SS_INTENSITY, 0, 1) . "級地震,強度為" . substr($SS_INTENSITY, 0, 1) . "";
}
return "";
} }
// gary_end

114
iotapi/receive_sanlien.sql

@ -0,0 +1,114 @@
CREATE TABLE IF NOT EXISTS `sanlien_log` (
`sanlien_log_seq` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`SERIAL_NO` varchar(255) NULL,
`ID` varchar(255) NULL,
`STATUS` varchar(255) NULL,
`SS_INTENSITY` varchar(255) NULL,
`NETWORK_STATUS` varchar(255) NULL,
`SS_SYS_YEAR` varchar(255) NULL,
`SS_SYS_MONTH` varchar(255) NULL,
`SS_SYS_DAY` varchar(255) NULL,
`SS_SYS_HOUR` varchar(255) NULL,
`SS_SYS_MINUTE` varchar(255) NULL,
`SS_SYS_SECOND` varchar(255) NULL,
`SS_STATUS` varchar(255) NULL,
`ELE_STATUS` varchar(255) NULL,
`SS_EVENT_YEAR` varchar(255) NULL,
`SS_EVENT_MONTH` varchar(255) NULL,
`SS_EVENT_DAY` varchar(255) NULL,
`SS_EVENT_HOUR` varchar(255) NULL,
`SS_EVENT_MINUTE` varchar(255) NULL,
`SS_EVENT_SECOND` varchar(255) NULL,
`SS_INTENSITY_PGA` varchar(255) NULL,
`SS_INTENSITY_PGV` varchar(255) NULL,
`SS_INTENSITY_PGA_VX` varchar(255) NULL,
`SS_INTENSITY_PGA_VY` varchar(255) NULL,
`SS_INTENSITY_PGA_VZ` varchar(255) NULL,
`SS_INTENSITY_PGV_VX` varchar(255) NULL,
`SS_INTENSITY_PGV_VY` varchar(255) NULL,
`SS_INTENSITY_PGV_VZ` varchar(255) NULL,
`SS_INTENSITY_PGAY` varchar(255) NULL,
`SS_INTENSITY_PGAZ` varchar(255) NULL,
`SS_INTENSITY_PGVX` varchar(255) NULL,
`SS_INTENSITY_PGVY` varchar(255) NULL,
`SS_INTENSITY_PGVZ` varchar(255) NULL,
`SS_INTENSITY_DO` varchar(255) NULL,
`from` varchar(255) NULL,
`create_at` varchar(255) NULL
)
INSERT INTO sanlien_log (
`SERIAL_NO`,
`ID`,
`STATUS`,
`SS_INTENSITY`,
`NETWORK_STATUS`,
`SS_SYS_YEAR`,
`SS_SYS_MONTH`,
`SS_SYS_DAY`,
`SS_SYS_HOUR`,
`SS_SYS_MINUTE`,
`SS_SYS_SECOND`,
`SS_STATUS`,
`ELE_STATUS`,
`SS_EVENT_YEAR`,
`SS_EVENT_MONTH`,
`SS_EVENT_DAY`,
`SS_EVENT_HOUR`,
`SS_EVENT_MINUTE`,
`SS_EVENT_SECOND`,
`SS_INTENSITY_PGA`,
`SS_INTENSITY_PGV`,
`SS_INTENSITY_PGA_VX`,
`SS_INTENSITY_PGA_VY`,
`SS_INTENSITY_PGA_VZ`,
`SS_INTENSITY_PGV_VX`,
`SS_INTENSITY_PGV_VY`,
`SS_INTENSITY_PGV_VZ`,
`SS_INTENSITY_PGAX`,
`SS_INTENSITY_PGAY`,
`SS_INTENSITY_PGAZ`,
`SS_INTENSITY_PGVX`,
`SS_INTENSITY_PGVY`,
`SS_INTENSITY_PGVZ`,
`SS_INTENSITY_DO`,
`from`,
`create_at`
)VALUES(
'$SERIAL_NO',
'$ID',
'$STATUS',
'$SS_INTENSITY',
'$NETWORK_STATUS',
'$SS_SYS_YEAR',
'$SS_SYS_MONTH',
'$SS_SYS_DAY',
'$SS_SYS_HOUR',
'$SS_SYS_MINUTE',
'$SS_SYS_SECOND',
'$SS_STATUS',
'$ELE_STATUS',
'$SS_EVENT_YEAR',
'$SS_EVENT_MONTH',
'$SS_EVENT_DAY',
'$SS_EVENT_HOUR',
'$SS_EVENT_MINUTE',
'$SS_EVENT_SECOND',
'$SS_INTENSITY_PGA',
'$SS_INTENSITY_PGV',
'$SS_INTENSITY_PGA_VX',
'$SS_INTENSITY_PGA_VY',
'$SS_INTENSITY_PGA_VZ',
'$SS_INTENSITY_PGV_VX',
'$SS_INTENSITY_PGV_VY',
'$SS_INTENSITY_PGV_VZ',
'$SS_INTENSITY_PGAX',
'$SS_INTENSITY_PGAY',
'$SS_INTENSITY_PGAZ',
'$SS_INTENSITY_PGVX',
'$SS_INTENSITY_PGVY',
'$SS_INTENSITY_PGVZ',
'$SS_INTENSITY_DO',
'$from',
'$create_at'
)

14
iotapi/receive_sanlien.txt

@ -645,3 +645,17 @@
{"NETWORK STATUS":"NORMAL OPERATION","SERIAL NO.":"5710","ID":"21"}2024-02-16 15:28:28 {"NETWORK STATUS":"NORMAL OPERATION","SERIAL NO.":"5710","ID":"21"}2024-02-16 15:28:28
{"SS_SYS_YEAR":"2024","SS_SYS_MONTH":"02","SS_SYS_DAY":"16","SS_SYS_HOUR":"15","SS_SYS_MINUTE":"28","SS_SYS_SECOND":"28","SS_STATUS":"0","ELE_STATUS":"1","SERIAL NO.":"1","ID":"22"}2024-02-16 15:28:37 {"SS_SYS_YEAR":"2024","SS_SYS_MONTH":"02","SS_SYS_DAY":"16","SS_SYS_HOUR":"15","SS_SYS_MINUTE":"28","SS_SYS_SECOND":"28","SS_STATUS":"0","ELE_STATUS":"1","SERIAL NO.":"1","ID":"22"}2024-02-16 15:28:37
{"NETWORK STATUS":"NORMAL OPERATION","SERIAL NO.":"5710","ID":"23"}2024-02-16 15:29:13 {"NETWORK STATUS":"NORMAL OPERATION","SERIAL NO.":"5710","ID":"23"}2024-02-16 15:29:13
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"13","SS_EVENT_MINUTE":"7","SS_EVENT_SECOND":"42","SS_INTENSITY":"40","SS_INTENSITY_PGA":"1052","SS_INTENSITY_PGV":"438","SS_INTENSITY_PGA_VX":"898","SS_INTENSITY_PGA_VY":"546","SS_INTENSITY_PGA_VZ":"65502","SS_INTENSITY_PGV_VX":"375","SS_INTENSITY_PGV_VY":"227","SS_INTENSITY_PGV_VZ":"65534","SS_INTENSITY_PGAX":"898","SS_INTENSITY_PGAY":"546","SS_INTENSITY_PGAZ":"40","SS_INTENSITY_PGVX":"375","SS_INTENSITY_PGVY":"227","SS_INTENSITY_PGVZ":"7","SS_INTENSITY_DO":"7","STATUS":"END"}2024-03-05 15:16:11
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"13","SS_EVENT_MINUTE":"7","SS_EVENT_SECOND":"42","SS_INTENSITY":"40","SS_INTENSITY_PGA":"1052","SS_INTENSITY_PGV":"438","SS_INTENSITY_PGA_VX":"898","SS_INTENSITY_PGA_VY":"546","SS_INTENSITY_PGA_VZ":"65502","SS_INTENSITY_PGV_VX":"375","SS_INTENSITY_PGV_VY":"227","SS_INTENSITY_PGV_VZ":"65534","SS_INTENSITY_PGAX":"898","SS_INTENSITY_PGAY":"546","SS_INTENSITY_PGAZ":"40","SS_INTENSITY_PGVX":"375","SS_INTENSITY_PGVY":"227","SS_INTENSITY_PGVZ":"7","SS_INTENSITY_DO":"7","STATUS":"END"}2024-03-05 15:16:41
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"13","SS_EVENT_MINUTE":"7","SS_EVENT_SECOND":"42","SS_INTENSITY":"40","SS_INTENSITY_PGA":"1052","SS_INTENSITY_PGV":"438","SS_INTENSITY_PGA_VX":"898","SS_INTENSITY_PGA_VY":"546","SS_INTENSITY_PGA_VZ":"65502","SS_INTENSITY_PGV_VX":"375","SS_INTENSITY_PGV_VY":"227","SS_INTENSITY_PGV_VZ":"65534","SS_INTENSITY_PGAX":"898","SS_INTENSITY_PGAY":"546","SS_INTENSITY_PGAZ":"40","SS_INTENSITY_PGVX":"375","SS_INTENSITY_PGVY":"227","SS_INTENSITY_PGVZ":"7","SS_INTENSITY_DO":"7","STATUS":"END"}2024-03-05 15:17:47
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"13","SS_EVENT_MINUTE":"7","SS_EVENT_SECOND":"42","SS_INTENSITY":"40","SS_INTENSITY_PGA":"1052","SS_INTENSITY_PGV":"438","SS_INTENSITY_PGA_VX":"898","SS_INTENSITY_PGA_VY":"546","SS_INTENSITY_PGA_VZ":"65502","SS_INTENSITY_PGV_VX":"375","SS_INTENSITY_PGV_VY":"227","SS_INTENSITY_PGV_VZ":"65534","SS_INTENSITY_PGAX":"898","SS_INTENSITY_PGAY":"546","SS_INTENSITY_PGAZ":"40","SS_INTENSITY_PGVX":"375","SS_INTENSITY_PGVY":"227","SS_INTENSITY_PGVZ":"7","SS_INTENSITY_DO":"7","STATUS":"END"}2024-03-05 15:19:42
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"13","SS_EVENT_MINUTE":"7","SS_EVENT_SECOND":"42","SS_INTENSITY":"40","SS_INTENSITY_PGA":"1052","SS_INTENSITY_PGV":"438","SS_INTENSITY_PGA_VX":"898","SS_INTENSITY_PGA_VY":"546","SS_INTENSITY_PGA_VZ":"65502","SS_INTENSITY_PGV_VX":"375","SS_INTENSITY_PGV_VY":"227","SS_INTENSITY_PGV_VZ":"65534","SS_INTENSITY_PGAX":"898","SS_INTENSITY_PGAY":"546","SS_INTENSITY_PGAZ":"40","SS_INTENSITY_PGVX":"375","SS_INTENSITY_PGVY":"227","SS_INTENSITY_PGVZ":"7","SS_INTENSITY_DO":"7","STATUS":"END"}2024-03-05 15:19:48
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"START","SERIAL NO.":"5710","ID":"45"}2024-03-05 15:21:42
{"SS_SYS_YEAR":"2024","SS_SYS_MONTH":"02","SS_SYS_DAY":"16","SS_SYS_HOUR":"15","SS_SYS_MINUTE":"02","SS_SYS_SECOND":"44","SS_STATUS":"0","ELE_STATUS":"1","SERIAL NO.":"5710","ID":"46"}2024-03-05 15:21:47
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"END","SERIAL NO.":"5710","ID":"47"}2024-03-05 15:21:51
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"START","SERIAL NO.":"5710","ID":"45"}2024-03-05 15:22:17
{"SS_SYS_YEAR":"2024","SS_SYS_MONTH":"02","SS_SYS_DAY":"16","SS_SYS_HOUR":"15","SS_SYS_MINUTE":"02","SS_SYS_SECOND":"44","SS_STATUS":"0","ELE_STATUS":"1","SERIAL NO.":"5710","ID":"46"}2024-03-05 15:22:27
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"END","SERIAL NO.":"5710","ID":"47"}2024-03-05 15:22:32
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"START","SERIAL NO.":"5710","ID":"45"}2024-03-05 15:22:50
{"SS_SYS_YEAR":"2024","SS_SYS_MONTH":"02","SS_SYS_DAY":"16","SS_SYS_HOUR":"15","SS_SYS_MINUTE":"02","SS_SYS_SECOND":"44","SS_STATUS":"0","ELE_STATUS":"1","SERIAL NO.":"5710","ID":"46"}2024-03-05 15:22:54
{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"END","SERIAL NO.":"5710","ID":"47"}2024-03-05 15:22:59

26
iotapi/receive_sanlien_send.php

@ -0,0 +1,26 @@
<?php
// $jsonData ='{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"13","SS_EVENT_MINUTE":"7","SS_EVENT_SECOND":"42","SS_INTENSITY":"40","SS_INTENSITY_PGA":"1052","SS_INTENSITY_PGV":"438","SS_INTENSITY_PGA_VX":"898","SS_INTENSITY_PGA_VY":"546","SS_INTENSITY_PGA_VZ":"65502","SS_INTENSITY_PGV_VX":"375","SS_INTENSITY_PGV_VY":"227","SS_INTENSITY_PGV_VZ":"65534","SS_INTENSITY_PGAX":"898","SS_INTENSITY_PGAY":"546","SS_INTENSITY_PGAZ":"40","SS_INTENSITY_PGVX":"375","SS_INTENSITY_PGVY":"227","SS_INTENSITY_PGVZ":"7","SS_INTENSITY_DO":"7","STATUS":"START"}';
// $jsonData ='{"NETWORK STATUS":"NORMAL OPERATION"}';
// $jsonData ='{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"13","SS_EVENT_MINUTE":"7","SS_EVENT_SECOND":"42","SS_INTENSITY":"40","SS_INTENSITY_PGA":"1052","SS_INTENSITY_PGV":"438","SS_INTENSITY_PGA_VX":"898","SS_INTENSITY_PGA_VY":"546","SS_INTENSITY_PGA_VZ":"65502","SS_INTENSITY_PGV_VX":"375","SS_INTENSITY_PGV_VY":"227","SS_INTENSITY_PGV_VZ":"65534","SS_INTENSITY_PGAX":"898","SS_INTENSITY_PGAY":"546","SS_INTENSITY_PGAZ":"40","SS_INTENSITY_PGVX":"375","SS_INTENSITY_PGVY":"227","SS_INTENSITY_PGVZ":"7","SS_INTENSITY_DO":"7","STATUS":"END"}';
// $jsonData ='{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"START","SERIAL NO.":"5710","ID":"45"}';
// $jsonData ='{"SS_SYS_YEAR":"2024","SS_SYS_MONTH":"02","SS_SYS_DAY":"16","SS_SYS_HOUR":"15","SS_SYS_MINUTE":"02","SS_SYS_SECOND":"44","SS_STATUS":"0","ELE_STATUS":"1","SERIAL NO.":"5710","ID":"46"}';
$jsonData ='{"SS_EVENT_YEAR":"2024","SS_EVENT_MONTH":"2","SS_EVENT_DAY":"16","SS_EVENT_HOUR":"15","SS_EVENT_MINUTE":"2","SS_EVENT_SECOND":"21","SS_INTENSITY":"40","SS_INTENSITY_PGA":"2144","SS_INTENSITY_PGV":"1251","SS_INTENSITY_PGA_VX":"64889","SS_INTENSITY_PGA_VY":"2044","SS_INTENSITY_PGA_VZ":"46","SS_INTENSITY_PGV_VX":"331","SS_INTENSITY_PGV_VY":"64333","SS_INTENSITY_PGV_VZ":"65444","SS_INTENSITY_PGAX":"647","SS_INTENSITY_PGAY":"2044","SS_INTENSITY_PGAZ":"279","SS_INTENSITY_PGVX":"431","SS_INTENSITY_PGVY":"1203","SS_INTENSITY_PGVZ":"161","SS_INTENSITY_DO":"7","STATUS":"END","SERIAL NO.":"5710","ID":"47"}';
$url = 'http://localhost/iotapi/receive_sanlien.php';
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($jsonData))
);
$response = curl_exec($curl);
if ($response === false) {
echo 'cURL error: ' . curl_error($curl);
} else {
echo 'Server Response: ' . $response;
}
curl_close($curl);

15
wms/account-edit.php

@ -59,7 +59,20 @@ $(function(){
<div> <div>
<label for="accounttype">帳號類別</label> <label for="accounttype">帳號類別</label>
<input type="text" name="accounttype" id="accounttype" value="<?php echo $data['accounttype']; ?>" readonly> <!-- <input type="text" name="accounttype" id="accounttype" value="<?php echo $data['accounttype']; ?>" readonly> -->
<select name="accounttype" id="accounttype" required>
<option value=""></option>
<option <?php echo $data['accounttype'] == "A" ? "selected" :""; ?> value="A">客戶(A)</option>
<option <?php echo $data['accounttype'] == "B" ? "selected" :""; ?> value="B">保養人員(B)</option>
<!--
<option value="C">檢查人員</option>
<option value="D">契約人員</option>
-->
<option <?php echo $data['accounttype'] == "E" ? "selected" :""; ?> value="E">管理人員(E)</option>
<option <?php echo $data['accounttype'] == "M" ? "selected" :""; ?> value="M">永佳捷員工(M)</option>
<option <?php echo $data['accounttype'] == "W" ? "selected" :""; ?> value="W">工勘人員(W)</option>
<option <?php echo $data['accounttype'] == "X" ? "selected" :""; ?> value="X">離職(X)</option>
</select>
</div> </div>
<div> <div>

14
wms/account-record-update.php

@ -1,8 +1,9 @@
<?php <?php
include "header.php"; include "header.php";
if(isset($_POST['update'])) { if (isset($_POST['update'])) {
function user_input( $data ) { function user_input($data)
{
$data1 = trim($data); $data1 = trim($data);
$data2 = stripslashes($data1); $data2 = stripslashes($data1);
$data3 = htmlspecialchars($data2); $data3 = htmlspecialchars($data2);
@ -34,11 +35,11 @@ if(isset($_POST['update'])) {
$db_query = "UPDATE account set pwd = '$pwd', name = '$name', tel = '$tel', address = '$address', "; $db_query = "UPDATE account set pwd = '$pwd', name = '$name', tel = '$tel', address = '$address', ";
$db_query .= "email = '$email', lineid = '$lineid', wechatid = '$wechatid', phone_call_help = '$phone_call_help', chat_for_help = '$chat_for_help', "; $db_query .= "email = '$email', lineid = '$lineid', wechatid = '$wechatid', phone_call_help = '$phone_call_help', chat_for_help = '$chat_for_help', ";
$db_query .= "remote_help = '$remote_help', repairerid = '$repairerid', manager = '$manager', "; $db_query .= "remote_help = '$remote_help', repairerid = '$repairerid', manager = '$manager', ";
$db_query .= "accounttype = '$accounttype', ";
$db_query .= "department_id = '$department_id', role_id = '$role_id', create_at = '$create_at' WHERE id='$id'"; $db_query .= "department_id = '$department_id', role_id = '$role_id', create_at = '$create_at' WHERE id='$id'";
mysqli_query($link, $db_query); mysqli_query($link, $db_query);
$affected = mysqli_affected_rows($link); $affected = mysqli_affected_rows($link);
if ((in_array($accounttype, ["B", "E", "M", "W"])) && $department_id && $role_id) {
if (($accounttype == "B" || $accounttype == "E" || $accounttype == "M") && $department_id && $role_id) {
$sql = "select permission from department where department_id = '$department_id' and role_id = '$role_id'"; $sql = "select permission from department where department_id = '$department_id' and role_id = '$role_id'";
$res = mysqli_query($link, $sql); $res = mysqli_query($link, $sql);
if ($row = mysqli_fetch_row($res)) { if ($row = mysqli_fetch_row($res)) {
@ -52,15 +53,14 @@ if(isset($_POST['update'])) {
if ($affected > 0) { if ($affected > 0) {
echo "<script type ='text/JavaScript'>"; echo "<script type ='text/JavaScript'>";
echo "alert('update成功');"; echo "alert('update成功');";
echo "location.href='account-index.php?function_name=account&".$token_link."';"; echo "location.href='account-index.php?function_name=account&" . $token_link . "';";
echo "</script>"; echo "</script>";
} elseif ($affected == 0) { } elseif ($affected == 0) {
echo "<script type ='text/JavaScript'>"; echo "<script type ='text/JavaScript'>";
echo "alert('無新增資料');"; echo "alert('無新增資料');";
echo "location.href='account-index.php?function_name=account&".$token_link."';"; echo "location.href='account-index.php?function_name=account&" . $token_link . "';";
echo "</script>"; echo "</script>";
} else { } else {
echo "{$db_query} 語法執行失敗,錯誤訊息SSS: " . mysqli_error($link); echo "{$db_query} 語法執行失敗,錯誤訊息SSS: " . mysqli_error($link);
} }
} }
?>

BIN
wms/excel/sanlien.xlsx

Binary file not shown.

17
wms/mkt/specsurvey_renovate-view.php

@ -125,11 +125,17 @@ foreach ($res as $data) {
</style> </style>
<script> <script>
$(function() { $(function() {
$(":input").prop("disabled", true); <?php
$('button').prop("disabled", false); if (!in_array(accountidToDepartId($user_id), ['911'])) {
$('button').click(function() { ?>
window.location.href = 'specsurvey_renovate-index.php?function=specsurvey_renovate&<?php echo $token_link; ?>'; $(":input").prop("disabled", true);
}); $('button').prop("disabled", false);
$('button').click(function() {
window.location.href = 'specsurvey_renovate-index.php?function=specsurvey_renovate&<?php echo $token_link; ?>';
});
<?php
}
?>
}); });
</script> </script>
<div class="container"> <div class="container">
@ -137,6 +143,7 @@ foreach ($res as $data) {
<div> <div>
<label for="pritem">電梯項次</label> <label for="pritem">電梯項次</label>
<input type="text" name="pritem" id="pritem" value="<?= $row_i['item_spec']; ?>"> <input type="text" name="pritem" id="pritem" value="<?= $row_i['item_spec']; ?>">
</div> </div>
<div> <div>
<label for="version">文件編號</label> <label for="version">文件編號</label>

BIN
wms/pdf/【範本】營業提供官檢資料.pdf

Binary file not shown.

85
wms/sanlien/api/downloadExcel.php

@ -0,0 +1,85 @@
<?php
require_once('../conn.php');
require dirname(dirname(dirname(__DIR__))) . '/common/composer/vendor/autoload.php';
header("Content-Type: application/json");
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Style\Fill;
//數字轉英文(0=>A、1=>B、26=>AA...以此類推)
function num2alpha($n)
{
for ($r = ""; $n >= 0; $n = intval($n / 26) - 1)
$r = chr($n % 26 + 0x41) . $r;
return $r;
}
//英文轉數字(A=>0、B=>1、AA=>26...以此類推)
function alpha2num($a)
{
$l = strlen($a);
$n = 0;
for ($i = 0; $i < $l; $i++)
$n = $n * 26 + ord($a[$i]) - 0x40;
return $n - 1;
}
try {
$create_at_start = isset($_REQUEST['create_at_start']) ? $_REQUEST['create_at_start'] : '';
$create_at_end = isset($_REQUEST['create_at_end']) ? $_REQUEST['create_at_end'] : '';
if (!empty($create_at_start) && !empty($create_at_end)) {
$sql_str = "SELECT *
FROM sanlien_log
WHERE SUBSTR(create_at, 1, 10)
BETWEEN :create_at_start AND :create_at_end
";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':create_at_start', $create_at_start);
$stmt->bindParam(':create_at_end', $create_at_end);
} else {
$sql_str = "SELECT * FROM sanlien_log ";
$stmt = $conn->prepare($sql_str);
}
$stmt->execute();
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setTitle('三連地震數據');
// 設定標題
$colTitleArr = [];
for ($i = 0; $i < $stmt->columnCount(); $i++) {
$columnMeta = $stmt->getColumnMeta($i);
$colTitleArr[] = $columnMeta['name'];
}
// 標題寫入 excel 第一列
for ($i = 0; $i < count($colTitleArr); $i++)
$sheet->setCellValue(num2alpha($i) . '1', $colTitleArr[$i]);
// 設定內容
$data = $stmt->fetchAll(PDO::FETCH_NUM);
$i = 2;
foreach ($data as $row) {
for ($j = 0; $j < count($row); $j++) {
$sheet->setCellValue(num2alpha($j) . $i, $row[$j]);
}
$i++;
}
$writer = new Xlsx($spreadsheet);
$file_path = dirname(dirname(dirname(__DIR__))) . '/wms/excel/' . 'sanlien.xlsx';
$writer->save($file_path);
try {
$writer->save($file_path);
// 回傳檔案路徑給 JavaScript
echo json_encode(['data' => $file_path]);
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
exit();
} catch (PDOException $e) {
die("ERROR!!!: " . $e->getMessage());
}

26
wms/sanlien/api/getSanlien.php

@ -0,0 +1,26 @@
<?php
require_once('../conn.php');
header("Content-Type: application/json");
try {
$create_at_start = isset($_REQUEST['create_at_start'])? $_REQUEST['create_at_start'] : '';
$create_at_end = isset($_REQUEST['create_at_end'])? $_REQUEST['create_at_end'] : '';
if (!empty($create_at_start) && !empty($create_at_end)) {
$sql_str = "SELECT *
FROM sanlien_log
WHERE SUBSTR(create_at, 1, 10)
BETWEEN :create_at_start AND :create_at_end
";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':create_at_start', $create_at_start);
$stmt->bindParam(':create_at_end', $create_at_end);
} else {
$sql_str = "SELECT * FROM sanlien_log ";
$stmt = $conn->prepare($sql_str);
}
$stmt->execute();
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo json_encode($data, JSON_UNESCAPED_UNICODE);
// echo json_encode(['data' => $data]);
} catch (PDOException $e) {
die("ERROR!!!: " . $e->getMessage());
}

47
wms/sanlien/conn.php

@ -0,0 +1,47 @@
<?php
$envFile = dirname(dirname(dirname(__file__))) . '/.env'; // .env 文件的路径
if (file_exists($envFile)) {
$lines = file($envFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if ($lines !== false) {
foreach ($lines as $line) {
list($key, $value) = explode('=', $line, 2);
$key = trim($key);
$value = trim($value);
// 设置环境变量
putenv("$key=$value");
}
}
}
$db_hostname = getenv('DB_HOST'); //資料庫主機名稱
$db_username = getenv('DB_USERNAME'); //登入資料庫的管理者的帳號
$db_password = getenv('DB_PASSWORD'); //登入密碼
$db_name = getenv('DB_DATABASE'); //使用的資料庫
$db_charset = 'utf8'; //設定字元編碼
//建立PDO的指定工作
$dsn = "mysql:host=$db_hostname;dbname=$db_name;charset=$db_charset";
try {
//使用PDO連接到MySQL資料庫,建立PDO物件
$conn = new PDO($dsn, $db_username, $db_password);
//當錯誤發生時會將錯誤資訊放到一個類物件裡(PDOException)
//PDO異常處理,PDO::ATTR_ERRMODE,有以下三種值的設定
//PDO::ERRMODE_SILENT: 預設模式,不主動報錯,需要以$conn->errorInfo()的形式獲取錯誤資訊
//PDO::ERRMODE_WARNING: 引發 E_WARNING 錯誤,主動報錯
//PDO::ERRMODE_EXCEPTION: 主動抛出 exceptions 異常,需要以try{}cath(){}輸出錯誤資訊。
//設定主動以警告的形式報錯
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// $connT8 = new PDO("sqlsrv:Server=220.130.203.251;Database=T8TEST", "M0117", "IFFCUFM=");
// if ($connT8) {
// $connT8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// }
//如果連接錯誤,將抛出一個PDOException異常對象
} catch (PDOException $e) {
//如果連結資料庫失敗則顯示錯誤訊並停止本頁的工作
die("ERROR!!!: " . $e->getMessage());
}
//$conn = null; //關閉資料庫的連線

48
wms/sanlien/js/alpine.js

@ -0,0 +1,48 @@
const sanlien = () => {
return {
init() {
this.search()
}, data: {
create_at_start: '',
create_at_end: '',
},
table_details: [],
searchLoading: false,
downloadLoading: false,
search() {
this.isLoading = true
const form = new FormData();
form.append('create_at_start', this.data.create_at_start);
form.append('create_at_end', this.data.create_at_end);
axios.post('./api/getSanlien.php', form).then(res => {
this.table_details = res.data
this.isLoading = false
}).catch(error => {
console.log(error.response.data)
this.isLoading = false
})
}, datatable() {
}, download() {
this.downloadLoading = true
const form = new FormData();
form.append('create_at_start', this.data.create_at_start);
form.append('create_at_end', this.data.create_at_end);
axios.post('./api/downloadExcel.php', form).then(res => {
var link = document.createElement('a');
link.setAttribute('href', window.location.origin + "/wms/excel/sanlien.xlsx");
link.setAttribute('download', '三連地震數據.xlsx');
link.style.display = 'none';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
this.downloadLoading = false
}).catch(error => {
console.log(error.response.data)
this.downloadLoading = false
})
}
}
}

5
wms/sanlien/js/alpinejs/cdn.min.js

File diff suppressed because one or more lines are too long

25
wms/sanlien/js/axios.js

@ -0,0 +1,25 @@
const axiosClient = axios.create({
baseURL : `${import.meta.env.VITE_API_BASE_URL}/api`,
});
axiosClient.interceptors.request.use( (config)=> {
config.headers.Authorization = `Bearer ${store.state.user.token}`
return config;
}, (error)=> {
return Promise.reject(error);
});
axiosClient.interceptors.response.use( (response)=> {
return response;
}, (error)=>{
if(error.response.status === 401){
store.commit('setToken', null)
sessionStorage.removeItem('TOKEN')
router.push({name:'login'})
}
throw error;
});
export default axiosClient;

2
wms/sanlien/js/axios/axios.min.js

File diff suppressed because one or more lines are too long

48
wms/sanlien/js/el.js

@ -0,0 +1,48 @@
export default {
data() {
return {
options: [],
value: [],
list: [],
loading: false,
states: ["Alabama", "Alaska", "Arizona",
"Arkansas", "California", "Colorado",
"Connecticut", "Delaware", "Florida",
"Georgia", "Hawaii", "Idaho", "Illinois",
"Indiana", "Iowa", "Kansas", "Kentucky",
"Louisiana", "Maine", "Maryland",
"Massachusetts", "Michigan", "Minnesota",
"Mississippi", "Missouri", "Montana",
"Nebraska", "Nevada", "New Hampshire",
"New Jersey", "New Mexico", "New York",
"North Carolina", "North Dakota", "Ohio",
"Oklahoma", "Oregon", "Pennsylvania",
"Rhode Island", "South Carolina",
"South Dakota", "Tennessee", "Texas",
"Utah", "Vermont", "Virginia",
"Washington", "West Virginia", "Wisconsin",
"Wyoming"]
}
},
mounted() {
this.list = this.states.map(item => {
return { value: `value:${item}`, label: `label:${item}` };
});
},
methods: {
remoteMethod(query) {
if (query !== '') {
this.loading = true;
setTimeout(() => {
this.loading = false;
this.options = this.list.filter(item => {
return item.label.toLowerCase()
.indexOf(query.toLowerCase()) > -1;
});
}, 200);
} else {
this.options = [];
}
}
}
}

4
wms/sanlien/js/jquery/jquery-3.1.1.min.js

File diff suppressed because one or more lines are too long

80
wms/sanlien/receive_sanlien_index.php

@ -0,0 +1,80 @@
<?php
include_once("../header.php");
require_once("./conn.php");
// if (!(isset($_GET['id']) && !empty($_GET['id']))) {
// $para = "function_name=sanlien&" . $token_link;
// echo "<script>alert('非法訪問!!!');</script>";
// echo "<script>window.history.go(-1);</script>";
// exit;
// }
$creat_at_start = isset($_GET['create_at_start']) ? $_GET['create_at_start'] : '';
$creat_at_end = isset($_GET['create_at_end']) ? $_GET['create_at_end'] : '';
?>
<link rel="stylesheet" href="./styles/style.css?id=<?php echo date("YmdHis"); ?>">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- <link rel="stylesheet" href="semantic/dist/semantic.min.css"> -->
<script defer src="./js/alpinejs/cdn.min.js"></script>
<script src="./js/axios/axios.min.js"></script>
<div class="form" method="post" x-data="sanlien">
<table class="table table-bordered query-table table-striped table-bordered display compact" style="width:99%;margin-left:.5%">
<thead>
<tr>
<td colspan="8">
<h3 style='text-align:center'>三連地震數據</h3>
</td>
</tr>
</thead>
<tbody style="font-weight: bolder;margin-bottom: 20px">
<tr>
<td style="vertical-align: middle">開始日期</td>
<td>
<input class="form-control" type="date" x-model="data.create_at_start">
</td>
<td style="vertical-align: middle">結束日期</td>
<td>
<input class="form-control" type="date" name="uscc" x-model="data.create_at_end">
</td>
</tr>
<tr>
<td colspan="4" style="text-align: center">
<button @click="search()" :disabled="searchLoading" type="button" class="btn btn-primary btn-sm savebtn">
<template x-if="!searchLoading">
<span>查詢</span>
</template>
<template x-if="searchLoading">
<div class="loader"></div>
</template>
</button>
<button @click="download()" :disabled="downloadLoading" type="button" class="btn btn-primary btn-sm savebtn">
<template x-if="!downloadLoading">
<span>下載</span>
</template>
<template x-if="downloadLoading">
<div class="loader"></div>
</template>
</button>
</td>
</tr>
</tbody>
</table>
<!-- <table class="table table-bordered query-table table-striped table-bordered display compact" style="width:99%;margin-left:.5%">
<thead>
<tr>
<th>123</th>
<th>qwe</th>
</tr>
</thead>
<tbody>
<template x-for="x-for=(value, index) in table_details">
<tr>
<td x-text="value.create_at"></td>
</tr>
</template>
</tbody>
</table> -->
</div>
<!-- <script src="./js/jquery/jquery-3.1.1.min.js"></script>
<script src="semantic/dist/semantic.min.js"></script> -->
<script src="./js/alpine.js?id=<?php echo date("YmdHis"); ?>"></script>

8
wms/sanlien/styles/style.css

@ -0,0 +1,8 @@
.loader {
border: 4px solid #f3f3f3; /* Light grey */
border-top: 4px solid #999; /* Blue */
border-radius: 50%;
width: 20px;
height: 20px;
animation: spin 2s linear infinite;
}

71
wms/wipwhole-index-table-html.php

@ -1,7 +1,7 @@
<?php <?php
// 暫時可編輯及刪除權限 // 暫時可編輯及刪除權限
$update_delete_status = false; $update_delete_status = false;
if (in_array($user_id, ['M0175', 'M0079'])) { if (in_array($user_id, ['M0175', 'M0079']) || in_array($department_id, ['220'])) {
$update_delete_status = true; $update_delete_status = true;
} }
@ -11,6 +11,11 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
<tr> <tr>
<?php <?php
echo $update_delete_status ? "<th style='text-align:center;width:80px;'>刪除</th>" : ""; echo $update_delete_status ? "<th style='text-align:center;width:80px;'>刪除</th>" : "";
if ($user_auth >= '2') {
?>
<th style="text-align:center;width:60px;">編輯</th>
<?php
}
?> ?>
<th style="text-align:center;width:80px;">序號</th> <th style="text-align:center;width:80px;">序號</th>
<th style="text-align:center;width:120px;">合約號</th> <th style="text-align:center;width:120px;">合約號</th>
@ -105,6 +110,17 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
?> ?>
<tr> <tr>
<?php echo $update_delete_status ? "<td><button type='button' class='btn btn-danger' onclick='delete_wipwholestatus(" . $data['id'] . ")'>刪除</button></td>" : ""; ?> <?php echo $update_delete_status ? "<td><button type='button' class='btn btn-danger' onclick='delete_wipwholestatus(" . $data['id'] . ")'>刪除</button></td>" : ""; ?>
<td>
<?php
if ($user_auth >= '2') {
?>
<a target='_blank' href="wipwhole-rec-invoice-edit.php?function_name=wipwholestatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<span class="glyphicon glyphicon-pencil"></span>
</a>
<?php
}
?>
</td>
<td><?php echo $data['id']; ?></td> <td><?php echo $data['id']; ?></td>
<td> <td>
<?php <?php
@ -193,70 +209,25 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
<td> <td>
<?php <?php
$str = $data['yingyeok'] . "/5"; $str = $data['yingyeok'] . "/5";
if ($edit_flag & 1 && ($user_auth & 2)) { echo $str . " " . accountidToName($data['salesid']);
?>
<p>
<?php echo $str; ?>
<a target='_blank' href="wipwhole-rec-invoice-edit.php?function_name=wipwholestatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<?php echo accountidToName($data['salesid']); ?>
</a>
</p>
<?php
} else echo $str . " " . accountidToName($data['salesid']);
?> ?>
</td> </td>
<td> <td>
<?php <?php
$str = $data['shejiok'] . "/5"; $str = $data['shejiok'] . "/5";
if ($edit_flag & 2 && ($user_auth & 2)) { echo $str . " 郭承瑋";
?>
<p>
<?php echo $str; ?>
<a target='_blank' href="wipwhole-rec-invoice-edit.php?function_name=wipwholestatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
郭承瑋
</a>
</p>
<?php
} else echo $str . " 郭承瑋";
?> ?>
</td> </td>
<td> <td>
<?php <?php
$str = $data['gongwuok'] . "/2"; $str = $data['gongwuok'] . "/2";
if ($edit_flag & 4 && ($user_auth & 2)) { echo $str . accountidToName($data['warehouseid']);
?>
<p>
<?php
echo $str;
?>
<a target='_blank' href="wipwhole-rec-invoice-edit.php?function_name=wipwholestatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<?php
echo accountidToName($data['warehouseid']);
// echo getGunwuName($data['address']);
?>
</a>
</p>
<?php
} else {
echo $str;
// echo getGunwuName($data['address']);
echo accountidToName($data['warehouseid']);
}
?> ?>
</td> </td>
<td> <td>
<?php <?php
$str = $data['shengguanok'] . "/7"; $str = $data['shengguanok'] . "/7";
if ($edit_flag & 8 && ($user_auth & 2)) { echo $str . "<br/>邱于雯(業務)<br/>林毓雯(生管)";
?>
<p>
<?php echo $str; ?>
<a target='_blank' href="wipwhole-rec-invoice-edit.php?function_name=wipwholestatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<span class="glyphicon glyphicon-pencil"></span>
</a>
</p>
<?php
} else echo $str . " ";
?> ?>
</td> </td>
</tr> </tr>

2
wms/wipwhole-index.php

@ -464,7 +464,7 @@ mysqli_close($link);
$('#table_index2').DataTable({ $('#table_index2').DataTable({
fixedColumns: { fixedColumns: {
leftColumns: 4 leftColumns: 5
}, },
scrollX: true, scrollX: true,
fixedHeader: true, fixedHeader: true,

2
wms/wipwhole-rec-invoice-edit-fileupload.php

@ -58,6 +58,8 @@ $official_check_4_file= fileIUpload("official_check_4_file");
$official_check_5_file= fileIUpload("official_check_5_file"); $official_check_5_file= fileIUpload("official_check_5_file");
$official_check_6_file= fileIUpload("official_check_6_file"); $official_check_6_file= fileIUpload("official_check_6_file");
$official_check_7_file= fileIUpload("official_check_7_file"); $official_check_7_file= fileIUpload("official_check_7_file");
$official_check_8_file= fileIUpload("official_check_8_file");
$official_check_9_file= fileIUpload("official_check_9_file");
// 設計 // 設計
$desin_spec_verify_file = fileIUpload("desin_spec_verify_file"); $desin_spec_verify_file = fileIUpload("desin_spec_verify_file");

42
wms/wipwhole-rec-invoice-edit-notice-mail.php

@ -172,12 +172,12 @@ if (!empty($delivery_date)) {
if (empty($change_all_contractno)) { if (empty($change_all_contractno)) {
$mail_title = "作番大日程(新梯)合約號:" . $contractno . "-移交日變更通知"; $mail_title = "作番大日程(新梯)合約號:" . $contractno . "-移交日變更通知";
$mail_content = "作番大日程(新梯) $mail_content = "作番大日程(新梯)
合約號:" . $contractno. "移交日:" . $old_delivery_date . " => " . $delivery_date; 合約號:" . $contractno . "移交日:" . $old_delivery_date . " => " . $delivery_date;
} else { } else {
$mail_title = "作番大日程(新梯)合約號:" . $contractno . "作番號:" . $facilityno . "-移交日變更通知"; $mail_title = "作番大日程(新梯)合約號:" . $contractno . "作番號:" . $facilityno . "-移交日變更通知";
$mail_content = "作番大日程(新梯) $mail_content = "作番大日程(新梯)
合約號:" . $contractno. " 合約號:" . $contractno . "
作番號:" . $facilityno. " 作番號:" . $facilityno . "
移交日:" . $old_delivery_date . " => " . $delivery_date; 移交日:" . $old_delivery_date . " => " . $delivery_date;
} }
@ -204,20 +204,34 @@ if (!empty($tryrun_end_date)) {
已完成試車, 請注意後續交車時間, 如需要官檢, 請提供如下資料 已完成試車, 請注意後續交車時間, 如需要官檢, 請提供如下資料
<img style='width: 500px' src='https://masada.com.tw/wms/img/mail001.jpg' /> <img style='width: 500px' src='https://masada.com.tw/wms/img/mail001.jpg' />
"; ";
$mail_send_users = [];
// 分區通知品保人員
if (in_array($area_no, ['N', 'Y', 'T'])) {
array_push($mail_send_users, ['袁宏嘉', 'mars_yuan@masada.com.tw']);
}
if (in_array($area_no, ['C'])) {
array_push($mail_send_users, ['許登毓', 'f9711225@masada.com.tw']);
}
if (in_array($area_no, ['K'])) {
array_push($mail_send_users, ['廖常超', 'sy0933405566@masada.com.tw']);
array_push($mail_send_users, ['劉尚鑫', 'tw58604067@masada.com.tw']);
}
array_push($mail_send_users, [$salesname, $salesmail]);
array_push(
$mail_send_users,
[
accountid2name(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)],
accountid2email(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)]
]
);
array_push($mail_send_users, ['張崇傑', 'jaychang@masada.com.tw']);
array_push($mail_send_users, ['賴定國', 'guo@masada.com.tw']);
array_push($mail_send_users, ['郭承瑋', 'chengwei@masada.com.tw']);
array_push($mail_send_users, ['林坤翰', 'kain@masada.com.tw']);
$cmail->sendx( $cmail->sendx(
$mail_title, $mail_title,
$mail_content, $mail_content,
[ $mail_send_users,
[$salesname, $salesmail],
[
accountid2name(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)],
accountid2email(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)]
],
['張崇傑', 'jaychang@masada.com.tw'],
['賴定國', 'guo@masada.com.tw']
// ['gary', 'gary_chen@masada.com.tw']
],
"永佳捷科技" "永佳捷科技"
); );
} }

2
wms/wipwhole-rec-invoice-edit-submit.php

@ -188,6 +188,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$official_check_7_file_owner = isset($_POST['official_check_7_file_owner']) ? $_POST['official_check_7_file_owner'] : $row['official_check_7_file_owner']; $official_check_7_file_owner = isset($_POST['official_check_7_file_owner']) ? $_POST['official_check_7_file_owner'] : $row['official_check_7_file_owner'];
$official_check_8_file_owner = isset($_POST['official_check_8_file_owner']) ? $_POST['official_check_8_file_owner'] : $row['official_check_8_file_owner']; $official_check_8_file_owner = isset($_POST['official_check_8_file_owner']) ? $_POST['official_check_8_file_owner'] : $row['official_check_8_file_owner'];
$official_check_9_file_owner = isset($_POST['official_check_9_file_owner']) ? $_POST['official_check_9_file_owner'] : $row['official_check_9_file_owner']; $official_check_9_file_owner = isset($_POST['official_check_9_file_owner']) ? $_POST['official_check_9_file_owner'] : $row['official_check_9_file_owner'];
$office_check_file_check_status = isset($_POST['office_check_file_check_status']) ? $_POST['office_check_file_check_status'] : $row['office_check_file_check_status'];
$pinzheng_remark = isset($_POST['pinzheng_remark']) ? $_POST['pinzheng_remark'] : $row['pinzheng_remark'];
$salesname = accountid2name($salesid)[$salesid]; $salesname = accountid2name($salesid)[$salesid];

4
wms/wipwhole-rec-invoice-edit-updatesql.php

@ -120,6 +120,8 @@ $updatesql = "UPDATE wipwholestatus
official_check_5_file_date = '$official_check_5_file_date', official_check_5_file_date = '$official_check_5_file_date',
official_check_6_file_date = '$official_check_6_file_date', official_check_6_file_date = '$official_check_6_file_date',
official_check_7_file_date = '$official_check_7_file_date', official_check_7_file_date = '$official_check_7_file_date',
official_check_8_file_date = '$official_check_8_file_date',
official_check_9_file_date = '$official_check_9_file_date',
official_check_1_file_owner = '$official_check_1_file_owner', official_check_1_file_owner = '$official_check_1_file_owner',
official_check_2_file_owner = '$official_check_2_file_owner', official_check_2_file_owner = '$official_check_2_file_owner',
official_check_3_file_owner = '$official_check_3_file_owner', official_check_3_file_owner = '$official_check_3_file_owner',
@ -131,6 +133,8 @@ $updatesql = "UPDATE wipwholestatus
official_check_9_file_owner = '$official_check_9_file_owner', official_check_9_file_owner = '$official_check_9_file_owner',
official_check_file_date = '$official_check_file_date', official_check_file_date = '$official_check_file_date',
official_check_file_owner = '$official_check_file_owner', official_check_file_owner = '$official_check_file_owner',
office_check_file_check_status = '$office_check_file_check_status',
pinzheng_remark = '$pinzheng_remark',
"; ";

147
wms/wipwhole-rec-invoice-edit.php

@ -1,5 +1,5 @@
<?php <?php
ini_set('display_errors', 'on'); // ini_set('display_errors', 'on');
/** /**
* (新梯)流程規則: * (新梯)流程規則:
* 1. A:營業員確認中 業務建立大日程 (或是系統洗入) * 1. A:營業員確認中 業務建立大日程 (或是系統洗入)
@ -44,18 +44,19 @@ $warehouse = getWarehouseStatus($link, $user_department_id, $role_id, 1);
$marketing = getMarketingStatus($link, $user_department_id, $role_id, 1); $marketing = getMarketingStatus($link, $user_department_id, $role_id, 1);
$marketing2 = getMarketingStatus($link, $user_department_id, $role_id, 2); $marketing2 = getMarketingStatus($link, $user_department_id, $role_id, 2);
$desin = getDesinStatus($link, $user_department_id, $role_id); $desin = getDesinStatus($link, $user_department_id, $role_id);
$desin2 = $user_department_id == '911' ? "" : "disabled";
$desin_leader = getDesinLeaderStatus($link, $user_department_id, $role_id); $desin_leader = getDesinLeaderStatus($link, $user_department_id, $role_id);
$shengguan = getShengguanStatus($link, $user_department_id, $role_id, 1); $shengguan = getShengguanStatus($link, $user_department_id, $role_id, 1);
$warehouse2 = getWarehouseStatus($link, $user_department_id, $role_id, 2); $warehouse2 = getWarehouseStatus($link, $user_department_id, $role_id, 2);
$shengguan2 = getShengguanStatus($link, $user_department_id, $role_id, 2); $shengguan2 = getShengguanStatus($link, $user_department_id, $role_id, 2);
$pinzheng = getPinzhengStatus($link, $user_department_id, $role_id); $pinzheng = getPinzhengStatus($link, $user_department_id, $role_id);
$pinzheng2 = $user_department_id == '912' ? "" : "disabled";
// 取得分頁頁碼 // 取得分頁頁碼
$user_department_id; $user_department_id;
$tab = getTabNo($user_department_id); $tab = getTabNo($user_department_id);
// 工務助理 // 工務助理
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188', 'M0117'])) { if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
$warehouse2 = ""; $warehouse2 = "";
$tab = 5; $tab = 5;
} }
@ -79,6 +80,44 @@ $all_users_options = getAllUsersOptions($link);
// 更新數據 接收 post 命令 // 更新數據 接收 post 命令
include "wipwhole-rec-invoice-edit-submit.php"; include "wipwhole-rec-invoice-edit-submit.php";
//補丁 避免新梯跑到此頁面
if (!empty($row['contract_type'])) {
if ($row['contract_type'] == 'B') {
echo "<script type ='text/JavaScript'>";
echo "location.href='wipwhole-renovate-rec-invoice-edit.php?function_name=wipwholestatus&id=$id&" . $token_link . "';";
echo "</script>";
}
} else {
echo "此大日程未選擇新梯或是汰改種類,請通知資訊人員處理!";
}
$official_check_file_yingye_count = 0;
$official_check_file_design_count = 0;
$official_check_file_pinzheng_count = 0;
if (!empty($row['official_check_1_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_2_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_3_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_4_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_5_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_6_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_7_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_8_file']))
$official_check_file_design_count++;
if (!empty($row['official_check_9_file']))
$official_check_file_design_count++;
if (!empty($row['official_check_file']))
$official_check_file_pinzheng_count++;
?> ?>
<form method="post" id="form" enctype="multipart/form-data"> <form method="post" id="form" enctype="multipart/form-data">
@ -502,7 +541,9 @@ include "wipwhole-rec-invoice-edit-submit.php";
</td> </td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="8" style="vertical-align: middle">官檢資料上傳</td> <td colspan="8" style="vertical-align: middle">官檢資料上傳
<a href="./pdf/【範本】營業提供官檢資料.pdf" style='color:#00F;' download>範例下載</a>
</td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="8">項目 1 <B-17>建築物昇降設備竣工檢查申請書(正本)X3</td> <td colspan="8">項目 1 <B-17>建築物昇降設備竣工檢查申請書(正本)X3</td>
@ -843,13 +884,12 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr> <tr>
<tr> <tr>
<td style='width:180px;'>追加技術文件</td> <td style='width:180px;'>追加技術文件</td>
<td> <td colspan='7'>
<input style="width:70%;display:inline;" type="file" id="desin_documents_verify_file" name="desin_documents_verify_file" <?= $desin; ?>> <input style="width:70%;display:inline;" type="file" id="desin_documents_verify_file" name="desin_documents_verify_file" <?= $desin; ?>>
<?php <?php
echo !empty($row['desin_documents_verify_file']) ? "<a id='desin_documents_verify_file' style='color:#00F;' href='" . $row['desin_documents_verify_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['desin_documents_verify_file']) ? "<a id='desin_documents_verify_file' style='color:#00F;' href='" . $row['desin_documents_verify_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
</td> </td>
<td colspan='6'></td>
</tr> </tr>
<tr> <tr>
<td colspan="8"> <td colspan="8">
@ -905,7 +945,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="2" style="vertical-align: middle;"> <td colspan="2" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" id="official_check_8_file" name="official_check_8_file" <?= $marketing; ?>> <input style="width:70%;display:inline;" type="file" id="official_check_8_file" name="official_check_8_file" <?= $desin2; ?>>
<?php <?php
echo !empty($row['official_check_8_file']) ? "<a id='official_check_8_file_a' style='color:#00F;' href='" . $row['official_check_8_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['official_check_8_file']) ? "<a id='official_check_8_file_a' style='color:#00F;' href='" . $row['official_check_8_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
@ -925,7 +965,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="2" style="vertical-align: middle;"> <td colspan="2" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" id="official_check_9_file" name="official_check_9_file" <?= $marketing; ?>> <input style="width:70%;display:inline;" type="file" id="official_check_9_file" name="official_check_9_file" <?= $desin2; ?>>
<?php <?php
echo !empty($row['official_check_9_file']) ? "<a id='official_check_9_file_a' style='color:#00F;' href='" . $row['official_check_9_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['official_check_9_file']) ? "<a id='official_check_9_file_a' style='color:#00F;' href='" . $row['official_check_9_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
@ -985,16 +1025,15 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td colspan="8"> <td colspan="8">
<input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>" readonly> <input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>" readonly>
<input class="form-control " type="hidden" name="create_at" value="<?= $row["create_at"]; ?>" readonly> <input class="form-control " type="hidden" name="create_at" value="<?= $row["create_at"]; ?>" readonly>
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button>
<?php <?php
if (checkNowFormYDStatus($link) == 'B' && ($user_department_id == 220 || $user_department_id == 911)) { if (checkNowFormYDStatus($link) == 'B' && ($user_department_id == 220 || $user_department_id == 911)) {
?> ?>
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button>
<button onclick="doDesignLeaderAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">提交至設計主管</button> <button onclick="doDesignLeaderAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">提交至設計主管</button>
<button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回營業</button> <button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回營業</button>
<?php <?php
} else if (checkNowFormYDStatus($link) == 'C' && ($user_department_id == 220 || ($user_department_id == 911 && $role_id == 1))) { } else if (checkNowFormYDStatus($link) == 'C' && ($user_department_id == 220 || ($user_department_id == 911 && $role_id == 1))) {
?> ?>
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">存檔</button>
<button onclick="doDesignAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">提交至生管</button> <button onclick="doDesignAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;">提交至生管</button>
<button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回營業</button> <button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回營業</button>
<button onclick="doBackDesignAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回設計部門</button> <button onclick="doBackDesignAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;">退回設計部門</button>
@ -1256,7 +1295,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle"> <td style="vertical-align: middle">
<div class="input-group"> <div class="input-group">
<input type="hidden" name="old_tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>"> <input type="hidden" name="old_tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>">
<input class="form-control" type="date" id="tryrun_end_date" name="tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>" <?= $warehouse2; ?>> <input class="form-control disabled_select" type="date" id="tryrun_end_date" name="tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button> <button class="btn btn-default" type='button' onclick='$("#tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span> </span>
@ -1643,8 +1682,8 @@ include "wipwhole-rec-invoice-edit-submit.php";
<table class="table table-bordered" style="width:100%"> <table class="table table-bordered" style="width:100%">
<tbody style="font-weight: bolder;margin-bottom: 20px"> <tbody style="font-weight: bolder;margin-bottom: 20px">
<tr> <tr>
<td style="vertical-align: middle">QC及官檢類型</td> <td style="vertical-align: middle;width:160px;">QC及官檢類型</td>
<td> <td colspan="7">
<input type='radio' id="qc_official_type_0" disabled <?php echo $row['association_check_type'] == '0' ? "checked" : ""; ?> /> <input type='radio' id="qc_official_type_0" disabled <?php echo $row['association_check_type'] == '0' ? "checked" : ""; ?> />
<label for='qc_official_type_0'>未選擇</label> <label for='qc_official_type_0'>未選擇</label>
<input type='radio' id="qc_official_type_2" disabled <?php echo $row['association_check_type'] == '2' ? "checked" : ""; ?> /> <input type='radio' id="qc_official_type_2" disabled <?php echo $row['association_check_type'] == '2' ? "checked" : ""; ?> />
@ -1665,11 +1704,12 @@ include "wipwhole-rec-invoice-edit-submit.php";
</td> </td>
<td style="vertical-align: middle">確認人</td> <td style="vertical-align: middle">確認人</td>
<td> <td>
<select class="disabled_select" id="qc_date_owner" name="qc_date_owner" disabled> <select class="disabled_select" style="width:180px;" id="qc_date_owner" name="qc_date_owner" disabled>
<option value="">請選擇</option> <option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['qc_date_owner']); ?> <?php echo getSelectOptionHtml($all_users_options, $row['qc_date_owner']); ?>
</select> </select>
</td> </td>
<td colspan="4"></td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: middle">QC合格日</td> <td style="vertical-align: middle">QC合格日</td>
@ -1688,6 +1728,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<?php echo getSelectOptionHtml($all_users_options, $row['end_qc_date_owner']); ?> <?php echo getSelectOptionHtml($all_users_options, $row['end_qc_date_owner']); ?>
</select> </select>
</td> </td>
<td colspan="4"></td>
</tr> </tr>
<tr> <tr>
<td style="vertical-align: middle">官檢日</td> <td style="vertical-align: middle">官檢日</td>
@ -1708,22 +1749,35 @@ include "wipwhole-rec-invoice-edit-submit.php";
<?php echo getSelectOptionHtml($all_users_options, $row['official_check_date_owner']); ?> <?php echo getSelectOptionHtml($all_users_options, $row['official_check_date_owner']); ?>
</select> </select>
</td> </td>
<td colspan="4"></td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="8" style="vertical-align: middle">官檢資料上傳</td> <td colspan="8" style="vertical-align: middle">官檢資料上傳</td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="8">試驗報告表X1</td> <td colspan="1">試驗報告表X1</td>
<td colspan="4">
營業確認項目 <?php echo $official_check_file_yingye_count; ?>/7  設計確認項目<?php echo $official_check_file_design_count; ?>/2  品證確認項目 <?php echo $official_check_file_pinzheng_count; ?>/1
<br />
<br />
</td>
<td colspan="2">
<input type="radio" id="office_check_file_currect" name="office_check_file_check_status" value="1" <?= $pinzheng2; ?> <?php echo $row['office_check_file_check_status'] == '1' ? "checked" : ""; ?>>
<label for="office_check_file_currect">正確</label>
<input type="radio" id="office_check_file_error" name="office_check_file_check_status" value="2" <?= $pinzheng2; ?> <?php echo $row['office_check_file_check_status'] == '2' ? "checked" : ""; ?>>
<label for="office_check_file_error">不正確</label>
</td>
<td>
<textarea placeholder="意見描述" name="pinzheng_remark"><?php echo $row['pinzheng_remark']; ?></textarea>
</td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="2" style="vertical-align: middle;"> <td colspan="2" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" id="official_check_file" name="official_check_file" <?= $marketing; ?>> <input style="width:70%;display:inline;" type="file" id="official_check_file" name="official_check_file" <?= $pinzheng2; ?>>
<?php <?php
echo !empty($row['official_check_file']) ? "<a id='official_check_file_a' style='color:#00F;' href='" . $row['official_check_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['official_check_file']) ? "<a id='official_check_file_a' style='color:#00F;' href='" . $row['official_check_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
</td> </td>
<td style="vertical-align: middle">確認時間</td>
<td><input class="form-control disabled_select" type="datetime-local" id="official_check_file_date" name="official_check_file_date" value="<?= $row['official_check_file_date']; ?>" readonly></td>
<td style="vertical-align: middle">確認人</td> <td style="vertical-align: middle">確認人</td>
<td> <td>
<select name="official_check_file_owner" class="disabled_select" id="official_check_file_owner" disabled> <select name="official_check_file_owner" class="disabled_select" id="official_check_file_owner" disabled>
@ -1731,6 +1785,8 @@ include "wipwhole-rec-invoice-edit-submit.php";
<?php echo getSelectOptionHtml($all_users_options, $row['official_check_file_owner']); ?> <?php echo getSelectOptionHtml($all_users_options, $row['official_check_file_owner']); ?>
</select> </select>
</td> </td>
<td style="vertical-align: middle">確認時間</td>
<td><input class="form-control disabled_select" type="datetime-local" id="official_check_file_date" name="official_check_file_date" value="<?= $row['official_check_file_date']; ?>" readonly></td>
</tr> </tr>
<tr> <tr>
<td colspan="8"> <td colspan="8">
@ -2175,25 +2231,6 @@ include "wipwhole-rec-invoice-edit-submit.php";
<input type="hidden" name='form_name' value="update_date_form" /> <input type="hidden" name='form_name' value="update_date_form" />
</form> </form>
<!-- <form method="post" id="update_install_date_form" enctype="multipart/form-data">
<input type="hidden" id="change_all_contractno" name='change_all_contractno' value="0" />
<input type="hidden" id="contractno2" name='contractno2' value="<?php echo $row['contractno']; ?>" />
<input type="hidden" id="install_start_date" name='install_start_date' value="<?php echo $row['install_start_date']; ?>" />
<input type="hidden" id="install_start_date_owner" name='install_start_date_owner' value="<?php echo $row['install_start_date_owner']; ?>" />
<input type="hidden" id="install_end_date" name='install_end_date' value="<?php echo $row['install_end_date']; ?>" />
<input type="hidden" id="install_end_date_owner" name='install_end_date_owner' value="<?php echo $row['install_end_date_owner']; ?>" />
<input type="hidden" id="tryrun_start_date" name='tryrun_start_date' value="<?php echo $row['tryrun_start_date']; ?>" />
<input type="hidden" id="tryrun_start_date_owner" name='tryrun_start_date_owner' value="<?php echo $row['tryrun_start_date_owner']; ?>" />
<input type="hidden" id="tryrun_end_date" name='tryrun_end_date' value="<?php echo $row['tryrun_end_date']; ?>" />
<input type="hidden" id="tryrun_end_date_owner" name='tryrun_end_date_owner' value="<?php echo $row['tryrun_end_date_owner']; ?>" />
<input type="hidden" id="delivery_date" name='delivery_date' value="<?php echo $row['delivery_date']; ?>" />
<input type="hidden" id="old_delivery_date" name='old_delivery_date' value="<?php echo $row['delivery_date']; ?>" />
<input type="hidden" id="delivery_date_owner" name='delivery_date_owner' value="<?php echo $row['delivery_date_owner']; ?>" />
<input type="hidden" id="facilityno" name='facilityno' value="<?php echo $row['facilityno']; ?>" />
<input type="hidden" id="contractno" name='contractno' value="<?php echo $row['contractno']; ?>" />
<input type="hidden" name='salesid' value="<?php echo $row['salesid']; ?>" />
<input type="hidden" name='form_name' value="update_install_date_form" />
</form> -->
<form method="post" id="update_shengguan_form" enctype="multipart/form-data"> <form method="post" id="update_shengguan_form" enctype="multipart/form-data">
<input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>"> <input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>">
<input type="hidden" id="arrival_date_verify" name='arrival_date_verify' value="<?php echo $row['arrival_date_verify']; ?>" /> <input type="hidden" id="arrival_date_verify" name='arrival_date_verify' value="<?php echo $row['arrival_date_verify']; ?>" />
@ -2623,42 +2660,6 @@ include "wipwhole-rec-invoice-edit-submit.php";
} }
} }
// function saveInstallData() {
// if (confirm('確定要更改實際安裝日程嗎?') == true) {
// if ($("#change_all_contractno_tmp").prop('checked')) {
// if ($("#contractno").val() == '' || $("#contractno").val() == null) {
// alert("合約號空白");
// } else {
// $("#change_all_contractno").val($("#change_all_contractno_tmp").prop('checked'));
// $("#contractno2").val($("#contractno").val());
// $("#install_start_date").val($("#install_start_date_tmp").val());
// $("#install_start_date_owner").val($("#install_start_date_owner_tmp").val());
// $("#install_end_date").val($("#install_end_date_tmp").val());
// $("#install_end_date_owner").val($("#install_end_date_owner_tmp").val());
// $("#tryrun_start_date").val($("#tryrun_start_date_tmp").val());
// $("#tryrun_start_date_owner").val($("#tryrun_start_date_owner_tmp").val());
// $("#tryrun_end_date").val($("#tryrun_end_date_tmp").val());
// $("#tryrun_end_date_owner").val($("#tryrun_end_date_owner_tmp").val());
// $("#delivery_date").val($("#delivery_date_tmp").val());
// $("#delivery_date_owner").val($("#delivery_date_owner_tmp").val());
// $('#update_install_date_form').submit();
// }
// } else {
// $("#install_start_date").val($("#install_start_date_tmp").val());
// $("#install_start_date_owner").val($("#install_start_date_owner_tmp").val());
// $("#install_end_date").val($("#install_end_date_tmp").val());
// $("#install_end_date_owner").val($("#install_end_date_owner_tmp").val());
// $("#tryrun_start_date").val($("#tryrun_start_date_tmp").val());
// $("#tryrun_start_date_owner").val($("#tryrun_start_date_owner_tmp").val());
// $("#tryrun_end_date").val($("#tryrun_end_date_tmp").val());
// $("#tryrun_end_date_owner").val($("#tryrun_end_date_owner_tmp").val());
// $("#delivery_date").val($("#delivery_date_tmp").val());
// $("#delivery_date_owner").val($("#delivery_date_owner_tmp").val());
// $('#update_install_date_form').submit();
// }
// }
// }
function setOutSourcerDate() { function setOutSourcerDate() {
// 發包類型 // 發包類型

2
wms/wipwhole-renovate-index-function.php

@ -1042,7 +1042,7 @@ function getTabNo($user_department_id)
return 2; return 2;
if (in_array($user_department_id, [521, 531, 541, 542, 543, 544, 545])) if (in_array($user_department_id, [521, 531, 541, 542, 543, 544, 545]))
return 0; return 0;
if ($user_department_id == 321 || $user_department_id == 250) if (in_array($user_department_id, [321, 250]))
return 3; return 3;
if ($user_department_id == 912) if ($user_department_id == 912)
return 4; return 4;

71
wms/wipwhole-renovate-index-table-html.php

@ -1,7 +1,7 @@
<?php <?php
// 暫時可編輯及刪除權限 // 暫時可編輯及刪除權限
$update_delete_status = false; $update_delete_status = false;
if (in_array($user_id, ['M0175', 'M0079'])) { if (in_array($user_id, ['M0175', 'M0079']) || in_array($department_id, ['220'])) {
$update_delete_status = true; $update_delete_status = true;
} }
@ -11,6 +11,11 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
<tr> <tr>
<?php <?php
echo $update_delete_status ? "<th style='text-align:center;width:80px;'>刪除</th>" : ""; echo $update_delete_status ? "<th style='text-align:center;width:80px;'>刪除</th>" : "";
if ($user_auth >= '2') {
?>
<th style="text-align:center;width:60px;">編輯</th>
<?php
}
?> ?>
<th style="text-align:center;width:120px;">序號</th> <th style="text-align:center;width:120px;">序號</th>
<th style="text-align:center;width:120px;">合約號</th> <th style="text-align:center;width:120px;">合約號</th>
@ -106,6 +111,17 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
?> ?>
<tr> <tr>
<?php echo $update_delete_status ? "<td><button type='button' class='btn btn-danger' onclick='delete_wipwholestatus(" . $data['id'] . ")'>刪除</button></td>" : ""; ?> <?php echo $update_delete_status ? "<td><button type='button' class='btn btn-danger' onclick='delete_wipwholestatus(" . $data['id'] . ")'>刪除</button></td>" : ""; ?>
<td>
<?php
if ($user_auth >= '2') {
?>
<a target='_blank' href="wipwhole-renovate-rec-invoice-edit.php?function_name=wipwholestatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<span class="glyphicon glyphicon-pencil"></span>
</a>
<?php
}
?>
</td>
<td><?php echo $data['id']; ?></td> <td><?php echo $data['id']; ?></td>
<td> <td>
<?php <?php
@ -200,70 +216,25 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
<td> <td>
<?php <?php
$str = $data['gongwuok'] . "/2"; $str = $data['gongwuok'] . "/2";
if ($edit_flag & 4 && ($user_auth & 2)) { echo $str . " " . accountidToName($data['warehouseid']);
?>
<p>
<?php echo $str; ?>
<a target='_blank' href="wipwhole-renovate-rec-invoice-edit.php?function_name=wipwholerenstatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<?php
// echo getGunwuName($data['address']);
echo accountidToName($data['warehouseid']);
?>
</a>
</p>
<?php
} else {
echo $str;
// echo getGunwuName($data['address']);
echo accountidToName($data['warehouseid']);
}
?> ?>
</td> </td>
<td> <td>
<?php <?php
$str = $data['yingyeok'] . "/5"; $str = $data['yingyeok'] . "/5";
if ($edit_flag & 1 && ($user_auth & 2)) { echo $str . " " . accountidToName($data['salesid']);
?>
<p>
<?php echo $str; ?>
<a target='_blank' href="wipwhole-renovate-rec-invoice-edit.php?function_name=wipwholerenstatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<!-- <span class="glyphicon glyphicon-pencil"></span> -->
<?php echo accountidToName($data['salesid']); ?>
</a>
</p>
<?php
} else echo $str . " " . accountidToName($data['salesid']);
?> ?>
</td> </td>
<td> <td>
<?php <?php
$str = $data['shejiok'] . "/5"; $str = $data['shejiok'] . "/5";
if ($edit_flag & 2 && ($user_auth & 2)) { echo $str . "林昭翰";
?>
<p>
<?php echo $str; ?>
<a target='_blank' href="wipwhole-renovate-rec-invoice-edit.php?function_name=wipwholerenstatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
林昭翰
</a>
</p>
<?php
} else echo $str . "林昭翰";
?> ?>
</td> </td>
<td> <td>
<?php <?php
$str = $data['shengguanok'] . "/7"; $str = $data['shengguanok'] . "/7";
if ($edit_flag & 8 && ($user_auth & 2)) { echo $str . "<br/>邱于雯(業務)<br/>林毓雯(生管)";
?>
<p>
<?php echo $str; ?>
<a target='_blank' href="wipwhole-renovate-rec-invoice-edit.php?function_name=wipwholerenstatus&<?php echo $token_link; ?>&id=<?php echo $data['id']; ?>" class="btn btn-primary btn-sm">
<span class="glyphicon glyphicon-pencil"></span>
</a>
</p>
<?php
} else echo $str . " ";
?> ?>
</td> </td>
</tr> </tr>

2
wms/wipwhole-renovate-index.php

@ -409,7 +409,7 @@ mysqli_close($link);
$('#table_index2').DataTable({ $('#table_index2').DataTable({
fixedColumns: { fixedColumns: {
leftColumns: 4 leftColumns: 7
}, },
scrollX: true, scrollX: true,
fixedHeader: true, fixedHeader: true,

44
wms/wipwhole-renovate-rec-invoice-edit-notice-mail.php

@ -171,13 +171,13 @@ if (!empty($delivery_date)) {
if (empty($change_all_contractno)) { if (empty($change_all_contractno)) {
$mail_title = "作番大日程(汰改)合約號:" . $contractno . "-移交日變更通知"; $mail_title = "作番大日程(汰改)合約號:" . $contractno . "-移交日變更通知";
$mail_content = "作番大日程(汰改) $mail_content = "作番大日程(汰改)
合約號:" . $contractno. " 合約號:" . $contractno . "
移交日:" . $old_delivery_date . " => " . $delivery_date; 移交日:" . $old_delivery_date . " => " . $delivery_date;
} else { } else {
$mail_title = "作番大日程(汰改)合約號:" . $contractno . "作番號:" . $facilityno . "-移交日變更通知"; $mail_title = "作番大日程(汰改)合約號:" . $contractno . "作番號:" . $facilityno . "-移交日變更通知";
$mail_content = "作番大日程(汰改) $mail_content = "作番大日程(汰改)
合約號:" . $contractno. " 合約號:" . $contractno . "
作番號:" . $facilityno. " 作番號:" . $facilityno . "
移交日:" . $old_delivery_date . " => " . $delivery_date; 移交日:" . $old_delivery_date . " => " . $delivery_date;
} }
@ -204,19 +204,37 @@ if (!empty($tryrun_end_date)) {
已完成試車, 請注意後續交車時間, 如需要官檢, 請提供如下資料 已完成試車, 請注意後續交車時間, 如需要官檢, 請提供如下資料
<img style='width: 500px' src='https://masada.com.tw/wms/img/mail001.jpg' /> <img style='width: 500px' src='https://masada.com.tw/wms/img/mail001.jpg' />
"; ";
$mail_send_users = [];
// 分區通知品保人員
if (in_array($area_no, ['N', 'Y', 'T'])) {
array_push($mail_send_users, ['袁宏嘉', 'mars_yuan@masada.com.tw']);
}
if (in_array($area_no, ['C'])) {
array_push($mail_send_users, ['許登毓', 'f9711225@masada.com.tw']);
}
if (in_array($area_no, ['K'])) {
array_push($mail_send_users, ['廖常超', 'sy0933405566@masada.com.tw']);
array_push($mail_send_users, ['劉尚鑫', 'tw58604067@masada.com.tw']);
}
array_push($mail_send_users, [$salesname, $salesmail]);
array_push(
$mail_send_users,
[
accountid2name(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)],
accountid2email(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)]
]
);
array_push($mail_send_users, ['張崇傑', 'jaychang@masada.com.tw']);
array_push($mail_send_users, ['賴定國', 'guo@masada.com.tw']);
array_push($mail_send_users, ['郭承瑋', 'chengwei@masada.com.tw']);
array_push($mail_send_users, ['林坤翰', 'kain@masada.com.tw']);
// array_push($mail_send_users, ['gary', 'gary_chen@masada.com.tw']);
// array_push($mail_send_users, ['gkgarytw', 'gkgarytw@gmail.com']);
$cmail->sendx( $cmail->sendx(
$mail_title, $mail_title,
$mail_content, $mail_content,
[ $mail_send_users,
[$salesname, $salesmail],
[
accountid2name(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)],
accountid2email(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)]
],
['張崇傑', 'jaychang@masada.com.tw'],
['賴定國', 'guo@masada.com.tw']
// ['gary', 'gary_chen@masada.com.tw']
],
"永佳捷科技" "永佳捷科技"
); );
} }

2
wms/wipwhole-renovate-rec-invoice-edit-submit.php

@ -186,6 +186,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$official_check_7_file_owner = isset($_POST['official_check_7_file_owner']) ? $_POST['official_check_7_file_owner'] : $row['official_check_7_file_owner']; $official_check_7_file_owner = isset($_POST['official_check_7_file_owner']) ? $_POST['official_check_7_file_owner'] : $row['official_check_7_file_owner'];
$official_check_8_file_owner = isset($_POST['official_check_8_file_owner']) ? $_POST['official_check_8_file_owner'] : $row['official_check_8_file_owner']; $official_check_8_file_owner = isset($_POST['official_check_8_file_owner']) ? $_POST['official_check_8_file_owner'] : $row['official_check_8_file_owner'];
$official_check_9_file_owner = isset($_POST['official_check_9_file_owner']) ? $_POST['official_check_9_file_owner'] : $row['official_check_9_file_owner']; $official_check_9_file_owner = isset($_POST['official_check_9_file_owner']) ? $_POST['official_check_9_file_owner'] : $row['official_check_9_file_owner'];
$office_check_file_check_status = isset($_POST['office_check_file_check_status']) ? $_POST['office_check_file_check_status'] : $row['office_check_file_check_status'];
$pinzheng_remark = isset($_POST['pinzheng_remark']) ? $_POST['pinzheng_remark'] : $row['pinzheng_remark'];
$salesname = accountid2name($salesid)[$salesid]; $salesname = accountid2name($salesid)[$salesid];

136
wms/wipwhole-renovate-rec-invoice-edit.php

@ -1,5 +1,5 @@
<?php <?php
ini_set('display_errors', 'on'); // ini_set('display_errors', 'on');
/** /**
* (汰改)流程規則: * (汰改)流程規則:
* 1. A:工務組長確認中 生管建立大日程 (或是系統洗入) * 1. A:工務組長確認中 生管建立大日程 (或是系統洗入)
@ -42,16 +42,18 @@ $warehouse2 = getWarehouseStatus($link, $user_department_id, $role_id, 2);
$marketing = getMarketingStatus($link, $user_department_id, $role_id, 1); $marketing = getMarketingStatus($link, $user_department_id, $role_id, 1);
$marketing2 = getMarketingStatus($link, $user_department_id, $role_id, 2); $marketing2 = getMarketingStatus($link, $user_department_id, $role_id, 2);
$desin = getDesinStatus($link, $user_department_id, $role_id); $desin = getDesinStatus($link, $user_department_id, $role_id);
$desin2 = $user_department_id == '911' ? "" : "disabled";
$desin_leader = getDesinLeaderStatus($link, $user_department_id, $role_id); $desin_leader = getDesinLeaderStatus($link, $user_department_id, $role_id);
$shengguan = getShengguanStatus($link, $user_department_id, $role_id, 1); $shengguan = getShengguanStatus($link, $user_department_id, $role_id, 1);
$shengguan2 = getShengguanStatus($link, $user_department_id, $role_id, 2); $shengguan2 = getShengguanStatus($link, $user_department_id, $role_id, 2);
$pinzheng = getPinzhengStatus($link, $user_department_id, $role_id); $pinzheng = getPinzhengStatus($link, $user_department_id, $role_id);
$pinzheng2 = $user_department_id == '912' ? "" : "disabled";
// 取得分頁頁碼 // 取得分頁頁碼
$tab = getTabNo($user_department_id); $tab = getTabNo($user_department_id);
// 工務助理 // 工務助理
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188', 'M0117'])) { if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
$warehouse2 = ""; $warehouse2 = "";
$tab = 5; $tab = 5;
} }
@ -76,6 +78,45 @@ $all_users_options = getAllUsersOptions($link);
//更新數據 //更新數據
include "wipwhole-renovate-rec-invoice-edit-submit.php"; include "wipwhole-renovate-rec-invoice-edit-submit.php";
//補丁 避免新梯跑到此頁面
if (!empty($row['contract_type'])) {
if ($row['contract_type'] == 'A') {
echo "<script type ='text/JavaScript'>";
echo "location.href='wipwhole-rec-invoice-edit.php?function_name=wipwholestatus&id=$id&" . $token_link . "';";
echo "</script>";
}
} else {
echo "此大日程未選擇新梯或是汰改種類,請通知資訊人員處理!";
}
$official_check_file_yingye_count = 0;
$official_check_file_design_count = 0;
$official_check_file_pinzheng_count = 0;
if (!empty($row['official_check_1_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_2_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_3_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_4_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_5_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_6_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_7_file']))
$official_check_file_yingye_count++;
if (!empty($row['official_check_8_file']))
$official_check_file_design_count++;
if (!empty($row['official_check_9_file']))
$official_check_file_design_count++;
if (!empty($row['official_check_file']))
$official_check_file_pinzheng_count++;
?> ?>
<form method="post" id="form" enctype="multipart/form-data"> <form method="post" id="form" enctype="multipart/form-data">
@ -538,7 +579,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td style="vertical-align: middle"> <td style="vertical-align: middle">
<div class="input-group"> <div class="input-group">
<input type="hidden" name="old_tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>"> <input type="hidden" name="old_tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>">
<input class="form-control" type="date" id="tryrun_end_date" name="tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>" <?= $warehouse2; ?>> <input class="form-control disabled_select" type="date" id="tryrun_end_date" name="tryrun_end_date" value="<?= $row['tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn"> <span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button> <button class="btn btn-default" type='button' onclick='$("#tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span> </span>
@ -822,7 +863,9 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</td> </td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="8" style="vertical-align: middle">官檢資料上傳</td> <td colspan="8" style="vertical-align: middle">官檢資料上傳
<a href="./pdf/【範本】營業提供官檢資料.pdf" style='color:#00F;' download>範例下載</a>
</td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="8">項目 1 <B-17>建築物昇降設備竣工檢查申請書(正本)X3</td> <td colspan="8">項目 1 <B-17>建築物昇降設備竣工檢查申請書(正本)X3</td>
@ -1162,13 +1205,12 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</tr> </tr>
<tr> <tr>
<td style='width:180px;'>追加技術文件</td> <td style='width:180px;'>追加技術文件</td>
<td> <td colspan='7'>
<input style="width:70%;display:inline;" type="file" id="desin_documents_verify_file" name="desin_documents_verify_file" <?= $desin; ?>> <input style="width:70%;display:inline;" type="file" id="desin_documents_verify_file" name="desin_documents_verify_file" <?= $desin; ?>>
<?php <?php
echo !empty($row['desin_documents_verify_file']) ? "<a id='desin_documents_verify_file' style='color:#00F;' href='" . $row['desin_documents_verify_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['desin_documents_verify_file']) ? "<a id='desin_documents_verify_file' style='color:#00F;' href='" . $row['desin_documents_verify_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
</td> </td>
<td colspan='6'></td>
</tr> </tr>
<tr> <tr>
<td colspan="8"> <td colspan="8">
@ -1224,7 +1266,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="2" style="vertical-align: middle;"> <td colspan="2" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" id="official_check_8_file" name="official_check_8_file" <?= $marketing; ?>> <input style="width:70%;display:inline;" type="file" id="official_check_8_file" name="official_check_8_file" <?= $desin2; ?>>
<?php <?php
echo !empty($row['official_check_8_file']) ? "<a id='official_check_8_file_a' style='color:#00F;' href='" . $row['official_check_8_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['official_check_8_file']) ? "<a id='official_check_8_file_a' style='color:#00F;' href='" . $row['official_check_8_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
@ -1244,7 +1286,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="2" style="vertical-align: middle;"> <td colspan="2" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" id="official_check_9_file" name="official_check_9_file" <?= $marketing; ?>> <input style="width:70%;display:inline;" type="file" id="official_check_9_file" name="official_check_9_file" <?= $desin2; ?>>
<?php <?php
echo !empty($row['official_check_9_file']) ? "<a id='official_check_9_file_a' style='color:#00F;' href='" . $row['official_check_9_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['official_check_9_file']) ? "<a id='official_check_9_file_a' style='color:#00F;' href='" . $row['official_check_9_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
@ -1303,17 +1345,16 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td colspan="8"> <td colspan="8">
<input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?> <?= $desin; ?>" readonly> <input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?> <?= $desin; ?>" readonly>
<input class="form-control " type="hidden" name="create_at" value="<?= $row["create_at"]; ?> <?= $desin; ?>" readonly> <input class="form-control " type="hidden" name="create_at" value="<?= $row["create_at"]; ?> <?= $desin; ?>" readonly>
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?= $desin2; ?>>存檔</button>
<?php <?php
if (checkNowFormStatus($link) == 'C' && ($user_department_id == 220 || $user_department_id == 911)) { if (checkNowFormStatus($link) == 'C' && ($user_department_id == 220 || $user_department_id == 911)) {
?> ?>
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?= $desin; ?>>存檔</button>
<button onclick="doDesignLeaderAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?= $desin; ?>>提交至設計主管</button> <button onclick="doDesignLeaderAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?= $desin; ?>>提交至設計主管</button>
<button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin; ?>>退回營業</button> <button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin; ?>>退回營業</button>
<button onclick="doBackWarhouseAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin; ?>>退回工務</button> <button onclick="doBackWarhouseAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin; ?>>退回工務</button>
<?php <?php
} else if (checkNowFormStatus($link) == 'D' && ($user_department_id == 220 || $user_department_id == 911)) { } else if (checkNowFormStatus($link) == 'D' && ($user_department_id == 220 || $user_department_id == 911)) {
?> ?>
<button onclick="savedata()" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?= $desin_leader; ?>>存檔</button>
<button onclick="doDesignAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?= $desin_leader; ?>>提交至生管</button> <button onclick="doDesignAssign()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?= $desin_leader; ?>>提交至生管</button>
<button onclick="doBackDesignAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin_leader; ?>>退回設計部門</button> <button onclick="doBackDesignAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin_leader; ?>>退回設計部門</button>
<button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin_leader; ?>>退回營業</button> <button onclick="doBackMarketingAssign()" type="button" class="btn btn-danger btn-lg pull-right" style="margin-left:3px;" <?= $desin_leader; ?>>退回營業</button>
@ -1713,11 +1754,25 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<td colspan="8" style="vertical-align: middle">官檢資料上傳</td> <td colspan="8" style="vertical-align: middle">官檢資料上傳</td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="8">試驗報告表X1</td> <td colspan="1">試驗報告表X1</td>
<td colspan="4">
營業確認項目 <?php echo $official_check_file_yingye_count; ?>/7  設計確認項目<?php echo $official_check_file_design_count; ?>/2  品證確認項目 <?php echo $official_check_file_pinzheng_count; ?>/1
<br />
<br />
</td>
<td colspan="2">
<input type="radio" id="office_check_file_currect" name="office_check_file_check_status" value="1" <?= $pinzheng2; ?> <?php echo $row['office_check_file_check_status'] == '1' ? "checked" : ""; ?>>
<label for="office_check_file_currect">正確</label>
<input type="radio" id="office_check_file_error" name="office_check_file_check_status" value="2" <?= $pinzheng2; ?> <?php echo $row['office_check_file_check_status'] == '2' ? "checked" : ""; ?>>
<label for="office_check_file_error">不正確</label>
</td>
<td>
<textarea placeholder="意見描述" name="pinzheng_remark"><?php echo $row['pinzheng_remark']; ?></textarea>
</td>
</tr> </tr>
<tr class="official_check_tr"> <tr class="official_check_tr">
<td colspan="2" style="vertical-align: middle;"> <td colspan="2" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" id="official_check_file" name="official_check_file" <?= $marketing; ?>> <input style="width:70%;display:inline;" type="file" id="official_check_file" name="official_check_file" <?= $pinzheng2; ?>>
<?php <?php
echo !empty($row['official_check_file']) ? "<a id='official_check_file_a' style='color:#00F;' href='" . $row['official_check_file'] . "' target='_blank'>下載附件</a>" : ""; echo !empty($row['official_check_file']) ? "<a id='official_check_file_a' style='color:#00F;' href='" . $row['official_check_file'] . "' target='_blank'>下載附件</a>" : "";
?> ?>
@ -2176,26 +2231,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<input type="hidden" id="real_arrival_date" name='real_arrival_date' value="<?php echo $row['real_arrival_date']; ?>" /> <input type="hidden" id="real_arrival_date" name='real_arrival_date' value="<?php echo $row['real_arrival_date']; ?>" />
<input type="hidden" name='form_name' value="update_date_form" /> <input type="hidden" name='form_name' value="update_date_form" />
</form> </form>
<!-- <form method="post" id="update_install_date_form" enctype="multipart/form-data">
<input type="hidden" id="change_all_contractno" name='change_all_contractno' value="0" />
<input type="hidden" id="contractno2" name='contractno2' value="<?php echo $row['contractno']; ?>" />
<input type="hidden" id="install_start_date" name='install_start_date' value="<?php echo $row['install_start_date']; ?>" />
<input type="hidden" id="install_start_date_owner" name='install_start_date_owner' value="<?php echo $row['install_start_date_owner']; ?>" />
<input type="hidden" id="install_end_date" name='install_end_date' value="<?php echo $row['install_end_date']; ?>" />
<input type="hidden" id="install_end_date_owner" name='install_end_date_owner' value="<?php echo $row['install_end_date_owner']; ?>" />
<input type="hidden" id="tryrun_start_date" name='tryrun_start_date' value="<?php echo $row['tryrun_start_date']; ?>" />
<input type="hidden" id="tryrun_start_date_owner" name='tryrun_start_date_owner' value="<?php echo $row['tryrun_start_date_owner']; ?>" />
<input type="hidden" id="tryrun_end_date" name='tryrun_end_date' value="<?php echo $row['tryrun_end_date']; ?>" />
<input type="hidden" id="tryrun_end_date_owner" name='tryrun_end_date_owner' value="<?php echo $row['tryrun_end_date_owner']; ?>" />
<input type="hidden" id="delivery_date" name='delivery_date' value="<?php echo $row['delivery_date']; ?>" />
<input type="hidden" id="old_delivery_date" name='old_delivery_date' value="<?php echo $row['delivery_date']; ?>" />
<input type="hidden" id="delivery_date_owner" name='delivery_date_owner' value="<?php echo $row['delivery_date_owner']; ?>" />
<input type="hidden" id="facilityno" name='facilityno' value="<?php echo $row['facilityno']; ?>" />
<input type="hidden" id="contractno" name='contractno' value="<?php echo $row['contractno']; ?>" />
<input type="hidden" name='salesid' value="<?php echo $row['salesid']; ?>" />
<input type="hidden" name='form_name' value="update_install_date_form" />
</form> -->
<form method="post" id="update_shengguan_form" enctype="multipart/form-data"> <form method="post" id="update_shengguan_form" enctype="multipart/form-data">
<input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>"> <input class="form-control " type="hidden" name="creater" value="<?= $user_id; ?>">
<input type="hidden" id="arrival_date_verify" name='arrival_date_verify' value="<?php echo $row['arrival_date_verify']; ?>" /> <input type="hidden" id="arrival_date_verify" name='arrival_date_verify' value="<?php echo $row['arrival_date_verify']; ?>" />
@ -2660,43 +2695,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
} }
} }
// function saveInstallData() {
// if (confirm('確定要更改實際安裝日程嗎?') == true) {
// if ($("#change_all_contractno_tmp").prop('checked')) {
// if ($("#contractno").val() == '' || $("#contractno").val() == null) {
// alert("合約號空白");
// } else {
// $("#change_all_contractno").val($("#change_all_contractno_tmp").prop('checked'));
// $("#contractno2").val($("#contractno").val());
// $("#install_start_date").val($("#install_start_date_tmp").val());
// $("#install_start_date_owner").val($("#install_start_date_owner_tmp").val());
// $("#install_end_date").val($("#install_end_date_tmp").val());
// $("#install_end_date_owner").val($("#install_end_date_owner_tmp").val());
// $("#tryrun_start_date").val($("#tryrun_start_date_tmp").val());
// $("#tryrun_start_date_owner").val($("#tryrun_start_date_owner_tmp").val());
// $("#tryrun_end_date").val($("#tryrun_end_date_tmp").val());
// $("#tryrun_end_date_owner").val($("#tryrun_end_date_owner_tmp").val());
// $("#delivery_date").val($("#delivery_date_tmp").val());
// $("#delivery_date_owner").val($("#delivery_date_owner_tmp").val());
// $('#update_install_date_form').submit();
// }
// } else {
// $("#install_start_date").val($("#install_start_date_tmp").val());
// $("#install_start_date_owner").val($("#install_start_date_owner_tmp").val());
// $("#install_end_date").val($("#install_end_date_tmp").val());
// $("#install_end_date_owner").val($("#install_end_date_owner_tmp").val());
// $("#tryrun_start_date").val($("#tryrun_start_date_tmp").val());
// $("#tryrun_start_date_owner").val($("#tryrun_start_date_owner_tmp").val());
// $("#tryrun_end_date").val($("#tryrun_end_date_tmp").val());
// $("#tryrun_end_date_owner").val($("#tryrun_end_date_owner_tmp").val());
// $("#delivery_date").val($("#delivery_date_tmp").val());
// $("#delivery_date_owner").val($("#delivery_date_owner_tmp").val());
// $('#update_install_date_form').submit();
// }
// }
// }
function setOutSourcerDate() { function setOutSourcerDate() {
// 發包類型 // 發包類型

2
wms/wipwholeinstall-index-table-html.php

@ -4,7 +4,7 @@
<th style="vertical-align: middle;text-align:center;width:150px;">電梯編號</th> <th style="vertical-align: middle;text-align:center;width:150px;">電梯編號</th>
<th style="vertical-align: middle;text-align:center;width:150px;">客戶姓名</th> <th style="vertical-align: middle;text-align:center;width:150px;">客戶姓名</th>
<th style="vertical-align: middle;text-align:center;width:250px;">合約地址</th> <th style="vertical-align: middle;text-align:center;width:250px;">合約地址</th>
<th style="vertical-align: middle;text-align:center;width:250px;">工地址</th> <th style="vertical-align: middle;text-align:center;width:250px;">地址</th>
<th style="vertical-align: middle;text-align:center;width:140px;">警示</th> <th style="vertical-align: middle;text-align:center;width:140px;">警示</th>
<th style="text-align:center;width:100px;">實際到廠日(觀音廠)</th> <th style="text-align:center;width:100px;">實際到廠日(觀音廠)</th>
<th style="text-align:center;width:100px;">預計出貨日(到工地)</th> <th style="text-align:center;width:100px;">預計出貨日(到工地)</th>

Loading…
Cancel
Save