Browse Source

1.新增APP生產進度及安裝進度與作番大日程日期關聯

2.待簽新增判定 flow_code = 'Z' 不顯示
3.大日程地址顯示優先抓取 real_address 再抓取 address
4.新增個欄位維護人 modal
5.修正 在裝中統計表 總計 bug
6.展廳 分布圖 新增補丁code 超過兩個月沒保養的會帶入假資料
gary
gary_chen\gary_chen 1 year ago
parent
commit
9461fa3b77
  1. 146
      app/app-wipinstallation-log.php
  2. 103
      app/app-wipproduction-log.php
  3. 1111
      phb/map/tw.html
  4. 100
      wms/css/view/wipwhole-index.php
  5. 56
      wms/css/view/wipwhole-renovate-index.php
  6. 93
      wms/frame/api_getdata.php
  7. 2
      wms/wipwhole-index-table-html.php
  8. 64
      wms/wipwhole-index.php
  9. 2
      wms/wipwhole-renovate-index-table-html.php
  10. 128
      wms/wipwhole-renovate-index.php
  11. 9
      wms/wipwhole-wipinstallstatus-index.php
  12. 32
      wms/wipwholeinstall-index-table-html.php
  13. 17
      wms/wipwholeinstall-renovate-index-table-html.php

146
app/app-wipinstallation-log.php

@ -24,6 +24,150 @@ if ($user_id == 'A000000001') {
$sql = "SELECT * FROM wipinstallation where (facilityno = '$facilityno') order by id desc"; # sql語法存在變數中 $sql = "SELECT * FROM wipinstallation where (facilityno = '$facilityno') order by id desc"; # sql語法存在變數中
} else { } else {
$sql = " $sql = "
SELECT
'0' AS id,
facilityno,
SUBSTR(real_contract_arrival_date,1,10) AS issue_time,
'分配安裝人員' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND real_contract_arrival_date != ''
AND real_contract_arrival_date IS NOT NULL
UNION
SELECT
'1' AS id,
facilityno,
SUBSTR(real_arrival_date,1,10) AS issue_time,
'已出貨' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND real_arrival_date != ''
AND real_arrival_date IS NOT NULL
UNION
SELECT
'2' AS id,
facilityno,
SUBSTR(estimate_install_start_date,1,10) AS issue_time,
'預計安裝日期' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND estimate_install_start_date != ''
AND estimate_install_start_date IS NOT NULL
UNION
SELECT
'3' AS id,
facilityno,
SUBSTR(install_start_date,1,10) AS issue_time,
'已開工' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND install_start_date != ''
AND install_start_date IS NOT NULL
UNION
SELECT
'4' AS id,
facilityno,
SUBSTR(estimate_tryrun_start_date,1,10) AS issue_time,
'預計試車日期' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND estimate_tryrun_start_date != ''
AND estimate_tryrun_start_date IS NOT NULL
UNION
SELECT
'5' AS id,
facilityno,
SUBSTR(tryrun_start_date,1,10) AS issue_time,
'開始試車' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND tryrun_start_date != ''
AND tryrun_start_date IS NOT NULL
UNION
SELECT
'6' AS id,
facilityno,
SUBSTR(end_qc_date,1,10) AS issue_time,
'完成QC' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND end_qc_date != ''
AND end_qc_date IS NOT NULL
UNION
SELECT
'7' AS id,
facilityno,
SUBSTR(official_check_date,1,10) AS issue_time,
'完成官檢' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND official_check_date != ''
AND official_check_date IS NOT NULL
UNION
SELECT
'8' AS id,
facilityno,
SUBSTR(delivery_date,1,10) AS issue_time,
'完成移交' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE (facilityno = '$facilityno')
AND delivery_date != ''
AND delivery_date IS NOT NULL
/*
SELECT SELECT
'0' AS id, '0' AS id,
facilityno, facilityno,
@ -107,6 +251,8 @@ if ($user_id == 'A000000001') {
create_at create_at
FROM wipwholestatus FROM wipwholestatus
WHERE (facilityno = '$facilityno') WHERE (facilityno = '$facilityno')
*/
ORDER BY id DESC ORDER BY id DESC
"; ";
} }

103
app/app-wipproduction-log.php

@ -27,6 +27,101 @@ if ($user_id == 'A000000001') {
SELECT SELECT
'0' AS id, '0' AS id,
facilityno, facilityno,
'' AS issue_time,
'生產中' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE facilityno = '$facilityno'
UNION
SELECT
'1' AS id,
facilityno,
SUBSTR(estimated_shipping_date,1,10) AS issue_time,
'生產完成' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE facilityno = '$facilityno'
AND estimated_shipping_date != ''
AND estimated_shipping_date IS NOT NULL
UNION
SELECT
'2' AS id,
facilityno,
SUBSTR(estimated_shipping_schedule_date,1,10) AS issue_time,
'預計攬收' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE facilityno = '$facilityno'
AND estimated_shipping_schedule_date != ''
AND estimated_shipping_schedule_date IS NOT NULL
UNION
SELECT
'3' AS id,
facilityno,
SUBSTR(actual_tofactory_date,1,10) AS issue_time,
'攬收成功(桃園)' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE facilityno = '$facilityno'
AND actual_tofactory_date != ''
AND actual_tofactory_date IS NOT NULL
UNION
SELECT
'4' AS id,
facilityno,
SUBSTR(real_contract_arrival_date,1,10) AS issue_time,
'預計出貨日' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE facilityno = '$facilityno'
AND real_contract_arrival_date != ''
AND real_contract_arrival_date IS NOT NULL
UNION
SELECT
'5' AS id,
facilityno,
SUBSTR(real_arrival_date,1,10) AS issue_time,
'出貨' AS 'process',
'bg-success' AS 'light_color',
'' AS memo,
creater,
create_at
FROM wipwholestatus
WHERE facilityno = '$facilityno'
AND real_arrival_date != ''
AND real_arrival_date IS NOT NULL
/*
UNION
SELECT
'1' AS id,
facilityno,
SUBSTR(prattford_order_date,1,10) AS issue_time, SUBSTR(prattford_order_date,1,10) AS issue_time,
CASE prattford_order_date_verify CASE prattford_order_date_verify
WHEN 0 THEN '生產完成' WHEN 0 THEN '生產完成'
@ -47,7 +142,7 @@ if ($user_id == 'A000000001') {
WHERE (facilityno = '$facilityno') WHERE (facilityno = '$facilityno')
UNION UNION
SELECT SELECT
'1' AS id, '2' AS id,
facilityno, facilityno,
SUBSTR(goods_type_date,1,10) AS issue_time, SUBSTR(goods_type_date,1,10) AS issue_time,
CASE goods_type CASE goods_type
@ -71,7 +166,7 @@ if ($user_id == 'A000000001') {
WHERE (facilityno = '$facilityno') WHERE (facilityno = '$facilityno')
UNION UNION
SELECT SELECT
'2' AS id, '3' AS id,
facilityno, facilityno,
SUBSTR(actual_tofactory_date,1,10) AS issue_time, SUBSTR(actual_tofactory_date,1,10) AS issue_time,
CASE arrival_date_verify CASE arrival_date_verify
@ -97,7 +192,7 @@ if ($user_id == 'A000000001') {
WHERE (facilityno = '$facilityno') WHERE (facilityno = '$facilityno')
UNION UNION
SELECT SELECT
'3' AS id, '4' AS id,
facilityno, facilityno,
SUBSTR(real_arrival_date,1,10) AS issue_time, SUBSTR(real_arrival_date,1,10) AS issue_time,
IF(real_arrival_date IS NOT NULL || real_arrival_date != '','已出貨','未出貨') AS 'process', IF(real_arrival_date IS NOT NULL || real_arrival_date != '','已出貨','未出貨') AS 'process',
@ -107,6 +202,8 @@ if ($user_id == 'A000000001') {
create_at create_at
FROM wipwholestatus FROM wipwholestatus
WHERE (facilityno = '$facilityno') WHERE (facilityno = '$facilityno')
*/
ORDER BY id DESC ORDER BY id DESC
"; ";
} }

1111
phb/map/tw.html

File diff suppressed because it is too large

100
wms/css/view/wipwhole-index.php

@ -126,51 +126,61 @@
/* 旋转动画 */ /* 旋转动画 */
} }
/* The Modal (background) */ /* The Modal (background) */
.modal { .modal {
display: none; /* Hidden by default */ display: none;
position: fixed; /* Stay in place */ /* Hidden by default */
z-index: 1; /* Sit on top */ position: fixed;
padding-top: 100px; /* Location of the box */ /* Stay in place */
left: 0; z-index: 1;
top: 0; /* Sit on top */
width: 100%; /* Full width */ padding-top: 100px;
height: 100%; /* Full height */ /* Location of the box */
overflow: auto; /* Enable scroll if needed */ left: 0;
top: 0;
} width: 100%;
.modal .back{ /* Full width */
position: absolute; height: 100%;
top: 0; /* Full height */
left:0; overflow: auto;
width: 100%; /* Enable scroll if needed */
height: 100%;
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ }
}
/* Modal Content */ .modal .back {
.modal-content { position: absolute;
z-index: 9; top: 0;
background-color: #fefefe; left: 0;
margin: auto; width: 100%;
padding: 20px; height: 100%;
border: 1px solid #888; background-color: rgba(0, 0, 0, 0.4);
width: 80%; /* Black w/ opacity */
} }
/* The Close Button */ /* Modal Content */
.close { .modal-content {
color: #aaaaaa; z-index: 9;
float: right; background-color: #fefefe;
font-size: 28px; margin: auto;
font-weight: bold; padding: 20px;
} border: 1px solid #888;
width: 80%;
.close:hover, }
.close:focus {
color: #000; /* The Close Button */
text-decoration: none; .close {
cursor: pointer; color: #aaaaaa;
} float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
@keyframes spin { @keyframes spin {

56
wms/css/view/wipwhole-renovate-index.php

@ -126,6 +126,62 @@
/* 旋转动画 */ /* 旋转动画 */
} }
/* The Modal (background) */
.modal {
display: none;
/* Hidden by default */
position: fixed;
/* Stay in place */
z-index: 1;
/* Sit on top */
padding-top: 100px;
/* Location of the box */
left: 0;
top: 0;
width: 100%;
/* Full width */
height: 100%;
/* Full height */
overflow: auto;
/* Enable scroll if needed */
}
.modal .back {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
/* Black w/ opacity */
}
/* Modal Content */
.modal-content {
z-index: 9;
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}
/* The Close Button */
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
table { table {

93
wms/frame/api_getdata.php

@ -1,4 +1,5 @@
<?php <?php
/** /**
* 提供首頁資料 * 提供首頁資料
* @url /frame/api_getdata.php * @url /frame/api_getdata.php
@ -20,12 +21,13 @@
* *
*/ */
$json = array("st"=>"ok","err"=>"","errCode"=>""); $json = array("st" => "ok", "err" => "", "errCode" => "");
/** /**
* 表單列表 * 表單列表
*/ */
function get_forms() { function get_forms()
{
global $link; global $link;
$i = 1; $i = 1;
@ -45,7 +47,8 @@ function get_forms() {
/** /**
* 公告欄列表 * 公告欄列表
*/ */
function get_board() { function get_board()
{
global $link; global $link;
$i = 1; $i = 1;
@ -70,14 +73,15 @@ function get_board() {
/** /**
* 系統通知列表 * 系統通知列表
*/ */
function get_notice($token) { function get_notice($token)
{
global $link; global $link;
if (!$token) throw new \Exception("token empty", 802); if (!$token) throw new \Exception("token empty", 802);
list($user_id) = explode(".", $token); list($user_id) = explode(".", $token);
$i = 1; $i = 1;
$data = []; $data = [];
$sql = "select id, kind, related_id, title from notice "; $sql = "select id, kind, related_id, title from notice ";
$sql .= "where (permission like '%".$user_id."%' or permission = 'ALL' or creater = '$user_id') "; $sql .= "where (permission like '%" . $user_id . "%' or permission = 'ALL' or creater = '$user_id') ";
$sql .= "and haveread != '1' "; $sql .= "and haveread != '1' ";
$sql .= "order by create_at desc limit 0, 6"; $sql .= "order by create_at desc limit 0, 6";
$res = mysqli_query($link, $sql); $res = mysqli_query($link, $sql);
@ -95,24 +99,64 @@ function get_notice($token) {
/** /**
* 待我簽核 * 待我簽核
*/ */
function get_pending($token) { function get_pending($token)
{
global $link; global $link;
if (!$token) throw new \Exception("token empty", 802); if (!$token) throw new \Exception("token empty", 802);
list($user_id) = explode(".", $token); list($user_id) = explode(".", $token);
$i = 1; $i = 1;
$data = []; $data = [];
$sql = "
SELECT
t.system_id,
t.system_name,
t.flow_id,
t.flow_name,
COUNT(*)
FROM (
SELECT s.form_key,
m.system_id,
y.system_name,
m.flow_id,
m.flow_name,
m.path
FROM subflow s,
flow f,
flow_main m,
system_main y
WHERE EXISTS (
SELECT form_key,
MAX(seq)
FROM subflow
GROUP BY form_key
HAVING SUBSTRING(s.form_key, 1, 10) = form_key
AND s.seq = max(seq)
)
AND SUBSTRING(s.form_key, 1, 10) = f.form_key
AND f.flow_id = m.flow_id
AND f.system_id = y.system_id
AND s.current_assigner = '$user_id'
AND f.flow_code != 'Z'
) t
GROUP BY t.system_id,
t.flow_id,
t.system_name,
t.flow_name
LIMIT 0, 6
";
// $sql = "select t.system_id, t.system_name, t.flow_id, t.flow_name, count(*) from (";
// $sql .= "select s.form_key, m.system_id, y.system_name, m.flow_id, m.flow_name, m.path from subflow s, flow f, flow_main m, system_main y ";
// $sql .= "where ";
// $sql .= "EXISTS (
// select form_key, max(seq) from subflow
// group by form_key
// having SUBSTRING(s.form_key,1,10) = form_key and s.seq = max(seq)
// ) ";
// $sql .= "and SUBSTRING(s.form_key,1,10) = f.form_key and f.flow_id = m.flow_id and f.system_id = y.system_id and s.current_assigner = '$user_id'";
// $sql .= ") t group by t.system_id, t.flow_id, t.system_name, t.flow_name ";
// $sql .= "limit 0, 6";
$sql = "select t.system_id, t.system_name, t.flow_id, t.flow_name, count(*) from (";
$sql .= "select s.form_key, m.system_id, y.system_name, m.flow_id, m.flow_name, m.path from subflow s, flow f, flow_main m, system_main y ";
$sql .= "where ";
$sql .= "EXISTS (
select form_key, max(seq) from subflow
group by form_key
having SUBSTRING(s.form_key,1,10) = form_key and s.seq = max(seq)
) ";
$sql .= "and SUBSTRING(s.form_key,1,10) = f.form_key and f.flow_id = m.flow_id and f.system_id = y.system_id and s.current_assigner = '$user_id'";
$sql .= ") t group by t.system_id, t.flow_id, t.system_name, t.flow_name ";
$sql .= "limit 0, 6";
$res = mysqli_query($link, $sql); $res = mysqli_query($link, $sql);
while ($row = mysqli_fetch_row($res)) { while ($row = mysqli_fetch_row($res)) {
$data[$i]["sid"] = $row[0]; $data[$i]["sid"] = $row[0];
@ -139,7 +183,7 @@ function get_pending($token) {
return $data; return $data;
} }
try{ try {
if (empty($_REQUEST)) throw new \Exception("post empty", 801); if (empty($_REQUEST)) throw new \Exception("post empty", 801);
if (empty($_REQUEST["p"])) throw new \Exception("post p empty", 801); if (empty($_REQUEST["p"])) throw new \Exception("post p empty", 801);
@ -161,13 +205,10 @@ try{
default: default:
echo "error"; echo "error";
} }
} catch (\Exception $ex) {
$json["st"] = "err";
}catch(\Exception $ex){ $json["err"] = $ex->getMessage();
$json["st"] = "err"; $json["errCode"] = (!empty($ex->getCode())) ? $ex->getCode() : 701;
$json["err"] = $ex->getMessage();
$json["errCode"] = (!empty($ex->getCode()))?$ex->getCode():701;
} }
echo json_encode($json,JSON_UNESCAPED_UNICODE); echo json_encode($json, JSON_UNESCAPED_UNICODE);
?>

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

@ -139,7 +139,7 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
<td><?php echo $data['facilityno']; ?></td> <td><?php echo $data['facilityno']; ?></td>
<td><?php echo $data['custom']; ?></td> <td><?php echo $data['custom']; ?></td>
<td><?php echo $Specification; ?></td> <td><?php echo $Specification; ?></td>
<td><?php echo $data['address']; ?></td> <td><?php echo empty($data['real_address']) ? $data['address'] : $data['real_address']; ?></td>
<?php <?php
foreach ($site_survey_status as $key => $val) { foreach ($site_survey_status as $key => $val) {
if ((string)$data['site_survey_contact_verify'] == (string)$key) { if ((string)$data['site_survey_contact_verify'] == (string)$key) {

64
wms/wipwhole-index.php

@ -234,11 +234,8 @@ $dataZ = mysqli_query($link, $sql);
</div> </div>
<div class="col-md-3 col-12 text-right" id="myBtn"> <div class="col-md-3 col-12 text-right" id="myBtn">
<button class="btn btn-primary " type="button">欄位維護權限</button> <button class="btn btn-primary " type="button">欄位維護權限</button>
</div> </div>
</div> </div>
</div> </div>
</nav> </nav>
@ -247,7 +244,66 @@ $dataZ = mysqli_query($link, $sql);
<div class="modal-content"> <div class="modal-content">
<button type="button" class="close" id="myCloseBtn">X</button> <button type="button" class="close" id="myCloseBtn">X</button>
<div class='col-12' style='text-align:center'> <div class='col-12' style='text-align:center'>
<h3>欄位維護權限</h3>
<hr>
<div class='row'>
<div class='col-12'>
<table class="table table-bordered" style="width:50%; margin:0 auto;">
<tr>
<th style="text-align:right;">欄位</th>
<th style="text-align:left;">維護單位</th>
</tr>
<tr>
<td style="text-align:right;">合約號</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">電梯編號</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">客戶姓名</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">規格</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">地址</td>
<td style="text-align:left;">業務部(營業人員 or 工勘人員透過申請單)</td>
</tr>
<tr>
<td style="text-align:right;">工勘狀態</td>
<td style="text-align:left;">工勘人員</td>
</tr>
<tr>
<td style="text-align:right;">合約交期(到工地)</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">下單日(普來特富)</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">預計到廠日(觀音廠)</td>
<td style="text-align:left;">生管部門</td>
</tr>
<tr>
<td style="text-align:right;">實際到廠日(觀音廠)</td>
<td style="text-align:left;">生管部門</td>
</tr>
<tr>
<td style="text-align:right;">預計出貨日(到工地)</td>
<td style="text-align:left;">業務部(營業人員 or 工勘人員透過申請單)</td>
</tr>
<tr>
<td style="text-align:right;">實際出貨日(到工地)</td>
<td style="text-align:left;">生管部門</td>
</tr>
</table>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

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

@ -146,7 +146,7 @@ if (in_array($user_id, ['M0175', 'M0079'])) {
<td><?php echo $data['facilityno']; ?></td> <td><?php echo $data['facilityno']; ?></td>
<td><?php echo $data['custom']; ?></td> <td><?php echo $data['custom']; ?></td>
<td><?php echo $Specification; ?></td> <td><?php echo $Specification; ?></td>
<td><?php echo $data['address']; ?></td> <td><?php echo empty($data['real_address']) ? $data['address'] : $data['real_address']; ?></td>
<?php <?php
foreach ($site_survey_status as $key => $val) { foreach ($site_survey_status as $key => $val) {
if ((string)$data['site_survey_contact_verify'] == (string)$key) { if ((string)$data['site_survey_contact_verify'] == (string)$key) {

128
wms/wipwhole-renovate-index.php

@ -209,28 +209,101 @@ $dataZ = mysqli_query($link, $sql);
</div> </div>
<nav class="navbar navbar-tabs" style="margin:0;margin-top:5px;"> <nav class="navbar navbar-tabs" style="margin:0;margin-top:5px;">
<div class="container-fluid"> <div class="container-fluid">
<ul class="nav nav-pills"> <div class="col-md-9 col-12">
<li class="active"> <ul class="nav nav-pills">
<a href="#" onclick="showAllTable()">全部資料</a> <li class="active">
</li> <a href="#" onclick="showAllTable()">全部資料</a>
<li> </li>
<a href="#" onclick="showATable()">廠務確認中</a> <li>
</li> <a href="#" onclick="showATable()">廠務確認中</a>
<li> </li>
<a href="#" onclick="showBTable()">營業確認中</a> <li>
</li> <a href="#" onclick="showBTable()">營業確認中</a>
<li> </li>
<a href="#" onclick="showCTable()">設計確認中</a> <li>
</li> <a href="#" onclick="showCTable()">設計確認中</a>
<li> </li>
<a href="#" onclick="showDTable()">生管理確認中</a> <li>
</li> <a href="#" onclick="showDTable()">生管理確認中</a>
<li> </li>
<a href="#" onclick="showZTable()">已結案</a> <li>
</li> <a href="#" onclick="showZTable()">已結案</a>
</ul> </li>
</ul>
</div>
<div class="col-md-3 col-12 text-right" id="myBtn">
<button class="btn btn-primary " type="button">欄位維護權限</button>
</div>
</div> </div>
</nav> </nav>
<div id="myModal" class="modal">
<div class="back"></div>
<div class="modal-content">
<button type="button" class="close" id="myCloseBtn">X</button>
<div class='col-12' style='text-align:center'>
<h3>欄位維護權限</h3>
<hr>
<div class='row'>
<div class='col-12'>
<table class="table table-bordered" style="width:50%; margin:0 auto;">
<tr>
<th style="text-align:right;">欄位</th>
<th style="text-align:left;">維護單位</th>
</tr>
<tr>
<td style="text-align:right;">合約號</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">電梯編號</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">客戶姓名</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">規格</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">地址</td>
<td style="text-align:left;">業務部(營業人員 or 工勘人員透過申請單)</td>
</tr>
<tr>
<td style="text-align:right;">工勘狀態</td>
<td style="text-align:left;">工勘人員</td>
</tr>
<tr>
<td style="text-align:right;">合約交期(到工地)</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">下單日(普來特富)</td>
<td style="text-align:left;">業務部</td>
</tr>
<tr>
<td style="text-align:right;">預計到廠日(觀音廠)</td>
<td style="text-align:left;">生管部門</td>
</tr>
<tr>
<td style="text-align:right;">實際到廠日(觀音廠)</td>
<td style="text-align:left;">生管部門</td>
</tr>
<tr>
<td style="text-align:right;">預計出貨日(到工地)</td>
<td style="text-align:left;">業務部(營業人員 or 工勘人員透過申請單)</td>
</tr>
<tr>
<td style="text-align:right;">實際出貨日(到工地)</td>
<td style="text-align:left;">生管部門</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<?php <?php
$dataArr = array( $dataArr = array(
"All" => $data, "All" => $data,
@ -513,6 +586,21 @@ mysqli_close($link);
$("#del_form").submit(); $("#del_form").submit();
} }
</script> </script>
<script>
var modal = document.getElementById("myModal");
$("#myBtn").click(function() {
$("#myModal").show();
});
$("#myCloseBtn").click(function(e) {
console.log(e.target);
$("#myModal").hide();
// modal.style.display = "none"
});
$(".back").click(function(e) {
$("#myModal").hide();
// modal.style.display = "none"
});
</script>
<form id='del_form' method='post'> <form id='del_form' method='post'>
<input type='hidden' id='del_seq' name='del_seq' value='' /> <input type='hidden' id='del_seq' name='del_seq' value='' />
<input type='hidden' id='form_name' name='form_name' value='del_form' /> <input type='hidden' id='form_name' name='form_name' value='del_form' />

9
wms/wipwhole-wipinstallstatus-index.php

@ -504,6 +504,9 @@ if ((int)$radsY . $radsM > (int)$radeY . $radeM) {
<tr> <tr>
<td>M1</td> <td>M1</td>
<?php <?php
$a_count = 0;
$b_count = 0;
$c_count = 0;
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) { for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
$start_month = 1; $start_month = 1;
$end_month = 12; $end_month = 12;
@ -559,6 +562,9 @@ if ((int)$radsY . $radsM > (int)$radeY . $radeM) {
<tr> <tr>
<td>MA</td> <td>MA</td>
<?php <?php
$a_count = 0;
$b_count = 0;
$c_count = 0;
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) { for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
$start_month = 1; $start_month = 1;
$end_month = 12; $end_month = 12;
@ -614,6 +620,9 @@ if ((int)$radsY . $radsM > (int)$radeY . $radeM) {
<tr> <tr>
<td>合計</td> <td>合計</td>
<?php <?php
$a_count = 0;
$b_count = 0;
$c_count = 0;
for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) { for ($radsYi = $radsY; $radsYi <= $radeY; $radsYi++) {
$start_month = 1; $start_month = 1;
$end_month = 12; $end_month = 12;

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

@ -6,7 +6,8 @@
<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="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="vertical-align: middle;text-align:center;width:140px;">發包廠商(工勘)</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="vertical-align: middle;text-align:center;width:140px;">發包日期(工勘)</th>
<th style="vertical-align: middle;text-align:center;width:140px;">預計開工日(工勘)</th> <th style="vertical-align: middle;text-align:center;width:140px;">預計開工日(工勘)</th>
@ -56,7 +57,18 @@
<td><?php echo $data['address']; ?></td> <td><?php echo $data['address']; ?></td>
<td><?php echo $data['real_address']; ?></td> <td><?php echo $data['real_address']; ?></td>
<td style="text-align:left;"><span class="text-danger"><?php echo warningMessage($data); ?></span></td> <td style="text-align:left;"><span class="text-danger"><?php echo warningMessage($data); ?></span></td>
<td><?php echo substr($data['real_contract_arrival_date'], 0, 10); ?></td> <td>
<?php
if (!empty($data['actual_tofactory_date']))
echo date("Y/m/d", strtotime($data['actual_tofactory_date']));
?>
</td>
<td>
<?php
if (!empty($data['real_contract_arrival_date']))
echo date("Y/m/d", strtotime(substr($data['real_contract_arrival_date'], 0, 10)));
?>
</td>
<?php <?php
// foreach ($site_survey_status as $key => $val) { // foreach ($site_survey_status as $key => $val) {
// if ((string)$data['site_survey_contact_verify'] == (string)$key) { // if ((string)$data['site_survey_contact_verify'] == (string)$key) {
@ -88,9 +100,9 @@
echo "<br/>" . date("Y/m/d", strtotime($data['tryrun_outsourcer_date'])); echo "<br/>" . date("Y/m/d", strtotime($data['tryrun_outsourcer_date']));
} else { } else {
if (!empty($data['install_outsourcer_date'])) if (!empty($data['install_outsourcer_date']))
echo date("Y/m/d", strtotime($data['install_outsourcer_date'])). "<br/> "; echo date("Y/m/d", strtotime($data['install_outsourcer_date'])) . "<br/> ";
if (!empty($data['tryrun_outsourcer_date'])) if (!empty($data['tryrun_outsourcer_date']))
echo " <br/>" .date("Y/m/d", strtotime($data['tryrun_outsourcer_date'])); echo " <br/>" . date("Y/m/d", strtotime($data['tryrun_outsourcer_date']));
} }
?> ?>
</td> </td>
@ -114,9 +126,9 @@
echo "<br/>" . date("Y/m/d", strtotime($data['tryrun_start_date'])); echo "<br/>" . date("Y/m/d", strtotime($data['tryrun_start_date']));
} else { } else {
if (!empty($data['install_start_date'])) if (!empty($data['install_start_date']))
echo date("Y/m/d", strtotime($data['install_start_date'])). "<br/> "; echo date("Y/m/d", strtotime($data['install_start_date'])) . "<br/> ";
if (!empty($data['tryrun_start_date'])) if (!empty($data['tryrun_start_date']))
echo " <br/>" .date("Y/m/d", strtotime($data['tryrun_start_date'])); echo " <br/>" . date("Y/m/d", strtotime($data['tryrun_start_date']));
} }
?> ?>
</td> </td>
@ -127,9 +139,9 @@
echo "<br/>" . date("Y/m/d", strtotime($data['estimate_tryrun_end_date'])); echo "<br/>" . date("Y/m/d", strtotime($data['estimate_tryrun_end_date']));
} else { } else {
if (!empty($data['estimate_install_end_date'])) if (!empty($data['estimate_install_end_date']))
echo date("Y/m/d", strtotime($data['estimate_install_end_date'])). "<br/> "; echo date("Y/m/d", strtotime($data['estimate_install_end_date'])) . "<br/> ";
if (!empty($data['estimate_tryrun_end_date'])) if (!empty($data['estimate_tryrun_end_date']))
echo " <br/>" .date("Y/m/d", strtotime($data['estimate_tryrun_end_date'])); echo " <br/>" . date("Y/m/d", strtotime($data['estimate_tryrun_end_date']));
} }
?> ?>
</td> </td>
@ -140,9 +152,9 @@
echo "<br/>" . date("Y/m/d", strtotime($data['tryrun_end_date'])); echo "<br/>" . date("Y/m/d", strtotime($data['tryrun_end_date']));
} else { } else {
if (!empty($data['install_end_date'])) if (!empty($data['install_end_date']))
echo date("Y/m/d", strtotime($data['install_end_date'])). "<br/> "; echo date("Y/m/d", strtotime($data['install_end_date'])) . "<br/> ";
if (!empty($data['tryrun_end_date'])) if (!empty($data['tryrun_end_date']))
echo " <br/>" .date("Y/m/d", strtotime($data['tryrun_end_date'])); echo " <br/>" . date("Y/m/d", strtotime($data['tryrun_end_date']));
} }
?> ?>
</td> </td>

17
wms/wipwholeinstall-renovate-index-table-html.php

@ -7,7 +7,8 @@
<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: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="text-align:center;width:100px;">實際到廠日(觀音廠)</th>
<th style="text-align:center;width:100px;">預計出貨日(到工地)</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="vertical-align: middle;text-align:center;width:140px;">發包日期(工勘)</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="vertical-align: middle;text-align:center;width:140px;">預計開工日(工勘)</th>
@ -39,7 +40,18 @@
<td><?php echo $data['address']; ?></td> <td><?php echo $data['address']; ?></td>
<td><?php echo $data['real_address']; ?></td> <td><?php echo $data['real_address']; ?></td>
<td style="text-align:left;"><span class="text-danger"><?php echo warningMessage($data); ?></span></td> <td style="text-align:left;"><span class="text-danger"><?php echo warningMessage($data); ?></span></td>
<td><?php echo substr($data['real_contract_arrival_date'], 0, 10); ?></td> <td>
<?php
if (!empty($data['actual_tofactory_date']))
echo date("Y/m/d", strtotime($data['actual_tofactory_date']));
?>
</td>
<td>
<?php
if (!empty($data['real_contract_arrival_date']))
echo date("Y/m/d", strtotime(substr($data['real_contract_arrival_date'], 0, 10)));
?>
</td>
<?php <?php
// foreach ($site_survey_status as $key => $val) { // foreach ($site_survey_status as $key => $val) {
// if ((string)$data['site_survey_contact_verify'] == (string)$key) { // if ((string)$data['site_survey_contact_verify'] == (string)$key) {
@ -181,7 +193,6 @@
</tbody> </tbody>
</table> </table>
<script> <script>
const subContentDiv = document.createElement("div"); const subContentDiv = document.createElement("div");
subContentDiv.style.position = "relative"; subContentDiv.style.position = "relative";
subContentDiv.style.top = 0; subContentDiv.style.top = 0;

Loading…
Cancel
Save