Browse Source

Merge branch 'gary'

gary
gary_chen\gary_chen 1 year ago
parent
commit
c6dffadf02
  1. 79
      wms/contract/api/createFacilityNo.php
  2. 4
      wms/css/dataTables.fixedColumns.min.js
  3. 2
      wms/css/select2.min.js
  4. 7
      wms/estimated_shipping_date_report.php
  5. 73
      wms/wipwhole-index-function.php
  6. 49
      wms/wipwhole-index-table-html.php
  7. 58
      wms/wipwhole-index.php
  8. 1
      wms/wipwhole-rec-invoice-edit-fileupload.php
  9. 207
      wms/wipwhole-rec-invoice-edit-submit.php
  10. 442
      wms/wipwhole-rec-invoice-edit.php
  11. 4
      wms/wipwhole-rec-invoice.php
  12. 106
      wms/wipwhole-renovate-index-function.php
  13. 48
      wms/wipwhole-renovate-index-table-html.php
  14. 114
      wms/wipwhole-renovate-index.php
  15. 211
      wms/wipwhole-renovate-rec-invoice-edit-submit.php
  16. 438
      wms/wipwhole-renovate-rec-invoice-edit.php
  17. 4
      wms/wipwhole-renovate-rec-invoice.php
  18. 34
      wms/wipwholeinstall-index-function.php
  19. 40
      wms/wipwholeinstall-index-table-html.php
  20. 48
      wms/wipwholeinstall-index.php
  21. 34
      wms/wipwholeinstall-renovate-index-function.php
  22. 39
      wms/wipwholeinstall-renovate-index-table-html.php
  23. 71
      wms/wipwholeinstall-renovate-index.php

79
wms/contract/api/createFacilityNo.php

@ -1,9 +1,12 @@
<?php
ini_set('display_errors', 'on');
// ini_set('display_errors', 'on');
// 汰改 前三碼 流水號 + 後兩碼 號機
// 新梯 流水號
// 新增 seq 的初始值
// INSERT INTO `sequence` (`seq_name`, `current_val`, `increment_val`, `remark`, `yyyymm`, `prefix`, `creator`, `create_at`) VALUES ('bf_vol_no', '0', '1', '保養-作番編號', '202310', '', 'M0117', '2023-10-26 11:28:11'), ('mf_vol_no', '0', '1', '新梯-作番編號', '202310', '', 'M0117', '2023-10-26 11:28:11'), ('tf_vol_no', '0', '1', '汰改-作番編號', '202310', '', 'M0117', '2023-10-26 11:28:11')
class CreateFacilityNo
{
/**
@ -11,6 +14,25 @@ class CreateFacilityNo
*/
function connectionDB()
{
$envFile = __DIR__ . '/../../../.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");
}
}
}
date_default_timezone_set("Asia/Taipei");
$host = getenv('DB_HOST');
$dbport = getenv('DB_PORT');
$dbuser = getenv('DB_USERNAME');
$dbpassword = getenv('DB_PASSWORD');
$dbname = getenv('DB_DATABASE');
try {
$options = [
PDO::ATTR_PERSISTENT => false,
@ -19,7 +41,7 @@ class CreateFacilityNo
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',
];
$pdo = new PDO('mysql:host=localhost;port=3306;dbname=appwms', 'masadaroot', 'x6h5E5p#u8y', $options);
$pdo = new PDO('mysql:host=' . $host . ';port=' . $dbport . ';dbname=' . $dbname . '', $dbuser, $dbpassword, $options);
$pdo->exec('SET CHARACTER SET utf8mb4');
return $pdo;
} catch (PDOException $e) {
@ -199,8 +221,8 @@ class CreateFacilityNo
}
foreach ($new_facility_no_arr as $new_facility_no) {
if ($this->getMakeNewTFacilityNoStatus($faclikity_details) !== "1") {
return $new_facility_no . ":" . $this->getMakeNewTFacilityNoStatus($faclikity_details);
if ($this->getMakeNewBFacilityNoStatus($faclikity_details) !== "1") {
return $new_facility_no . ":" . $this->getMakeNewBFacilityNoStatus($faclikity_details);
}
// seq +1
$this->facilitySeqAddOne("B");
@ -215,11 +237,8 @@ class CreateFacilityNo
*/
function getMakeNewMFacilityNoStatus($faclikity_details)
{
$Y = substr(date("Y"), 3, 1);
$sale_type = $faclikity_details['sale_type'];
$make_type = $faclikity_details['make_type'];
$next_seq = $this->getNextFacilitySeq("mf_vol_no");
$new_facility_no = $Y . $sale_type . $make_type . str_pad($next_seq + 1, 5, "0", STR_PAD_LEFT);
if ($this->checkSaleTypeStatus($sale_type) == false)
return "銷售代號錯誤";
@ -235,14 +254,25 @@ class CreateFacilityNo
*/
function getMakeNewTFacilityNoStatus($faclikity_details)
{
$Y = substr(date("Y"), 3, 1);
$sale_type = $faclikity_details['sale_type'];
$make_type = $faclikity_details['make_type'];
$num = $faclikity_details['num'];
$next_seq = $this->getNextFacilitySeq("mf_vol_no");
$new_facility_no = $Y . $sale_type . $make_type
. str_pad($next_seq + 1, 3, "0", STR_PAD_LEFT)
. str_pad($num, 2, "0", STR_PAD_LEFT);
if ($this->checkSaleTypeStatus($sale_type) == false)
return "銷售代號錯誤";
if ($this->checkMakeTypeStatus($make_type) == false)
return "製造編號類型錯誤";
return "1";
}
/**
* 檢查作番編列狀態 - 保養
* @param array $faclikity_details
* @return string $status : 1:正確 else:error message
*/
function getMakeNewBFacilityNoStatus($faclikity_details)
{
$sale_type = $faclikity_details['sale_type'];
$make_type = $faclikity_details['make_type'];
if ($this->checkSaleTypeStatus($sale_type) == false)
return "銷售代號錯誤";
@ -468,14 +498,13 @@ class CreateFacilityNo
}
$cfn = new CreateFacilityNo;
// 建立作番號 - 新梯
print_r($cfn->makeMFacilityNo("M", "X", 5));
echo "<br/><br/>";
// 建立作番號 - 汰改
print_r($cfn->makeTFacilityNo( "M", "X", 1));
echo "<br/><br/>";
// 建立作番號 - 保養
print_r($cfn->makeBFacilityNo( "M", "X", 1));
echo "<br/><br/>";
// $cfn = new CreateFacilityNo;
// // 建立作番號 - 新梯
// print_r($cfn->makeMFacilityNo("M", "X", 5));
// echo "<br/><br/>";
// // 建立作番號 - 汰改
// print_r($cfn->makeTFacilityNo("M", "X", 1));
// echo "<br/><br/>";
// // 建立作番號 - 保養
// print_r($cfn->makeBFacilityNo("M", "X", 1));
// echo "<br/><br/>";

4
wms/css/dataTables.fixedColumns.min.js

File diff suppressed because one or more lines are too long

2
wms/css/select2.min.js

File diff suppressed because one or more lines are too long

7
wms/estimated_shipping_date_report.php

@ -1,5 +1,5 @@
<?php
error_reporting(0);
// ini_set('display_errors', 'on');
require dirname(__DIR__) . '/common/composer/vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
@ -22,12 +22,13 @@ $sql = "
COUNT(this_order.sub_address) AS facility_count
FROM(
SELECT
SUBSTR(w.address,1,2) AS sub_address,
SUBSTR(TRIM(w.address),1,2) AS sub_address,
SUBSTR(CONVERT(real_contract_arrival_date, DATETIME),1,4) AS date_year,
SUBSTR(CONVERT(real_contract_arrival_date, DATETIME),6,2) AS date_month,
w.facility_kind,
w.contract_type
FROM wipwholestatus AS w
WHERE status = '1'
) AS this_order
WHERE 1 = 1
GROUP BY this_order.contract_type,
@ -132,6 +133,7 @@ $sql = "
w.facility_kind
FROM wipwholestatus AS w
WHERE 1=1
AND status = '1'
AND real_contract_arrival_date >= '$start_y-$start_m-0'
AND real_contract_arrival_date <= '$end_y-$end_m-0'
) AS new_order
@ -172,6 +174,7 @@ $sql = "
w.renovate_type
FROM wipwholestatus AS w
WHERE 1=1
AND status = '1'
AND real_contract_arrival_date >= '$start_y-$start_m-0'
AND real_contract_arrival_date <= '$end_y-$end_m-0'
AND contract_type = 'B'

73
wms/wipwhole-index-function.php

@ -5,6 +5,7 @@ function getWipwholestatusData($link, $id)
$db_query = "
SELECT * FROM wipwholestatus
WHERE id='$id'
AND status = '1'
";
$receivabledata = mysqli_query($link, $db_query);
return mysqli_fetch_array($receivabledata, MYSQLI_ASSOC);
@ -125,11 +126,16 @@ function getDataSql($department_id, $role_id, $user_id)
'511', '512', '513', '514'
];
// 補丁 黃孟澤 & 葉博澄 權限 = 李烘銘
if(in_array($user_id,['M0166','M0091'])){
$user_id = 'M0086';
}
$sql_cmd = sql_myself($user_id, "salesid");
$sql = "
SELECT * FROM wipwholestatus $sql_cmd
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND status = '1' AND contract_type = '$contract_type' " : " AND status = '1' AND contract_type = '$contract_type'";
$sql .= getWipwholeSearchSql();
$sql .= "ORDER BY real_contract_arrival_date DESC ";
@ -145,6 +151,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -155,6 +162,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -165,6 +173,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -175,6 +184,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -185,6 +195,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -206,6 +217,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -217,6 +229,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('宜蘭')
@ -229,6 +242,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
@ -241,6 +255,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
@ -253,6 +268,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
@ -265,6 +281,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -276,6 +293,13 @@ function getDataSql($department_id, $role_id, $user_id)
function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
{
// 補丁 黃孟澤 & 葉博澄 權限 = 李烘銘
if(in_array($user_id,['M0166','M0091'])){
$user_id = 'M0086';
}
$flow_code_tmp = explode(',', $flow_code);
$flow_code = implode("','", $flow_code_tmp);
// 合約類型
@ -293,6 +317,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -303,6 +328,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -313,6 +339,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -323,6 +350,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -333,6 +361,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -345,6 +374,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= "
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -372,6 +402,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -392,6 +423,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -412,6 +444,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -432,6 +465,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -452,6 +486,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -472,6 +507,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -568,6 +604,7 @@ function checkYingYeok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -588,6 +625,7 @@ function checkSheJiok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -605,6 +643,7 @@ function checkSheJiokLeader($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -622,6 +661,7 @@ function checkGongWuok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -645,6 +685,7 @@ function checkShengGuanok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -676,6 +717,7 @@ function getGongWuokNo($link)
SUBSTR(address,1,2)
FROM `wipwholestatus`
WHERE id = '$id'
AND status = '1'
";
$result = mysqli_query($link, $sql);
$row = mysqli_fetch_array($result);
@ -1016,19 +1058,23 @@ function getSelectOptionHtml($options, $selected_val)
function getSaveEstimateInstallData($user_department_id, $role_id)
{
if (in_array($user_department_id, ['50', '501', '315']) && $role_id == '2')
if (in_array($user_department_id, ['50', '501']) && $role_id == '2')
return true;
if ($user_department_id == '311' && $role_id == '4')
return true;
if ($user_department_id == '312' && $role_id == '3')
return true;
if ($user_department_id == '313' && $role_id == '3')
return true;
if (in_array($user_department_id, ['311', '314']) && $role_id == '4')
if ($user_department_id == '314' && $role_id == '4')
return true;
if ($user_department_id == '521' && $role_id == '11')
if ($user_department_id == '315' && in_array($role_id, ['1', '2']))
return true;
if (in_array($user_department_id, [220, 531]))
return true;
if ($user_department_id == '521' && in_array($role_id, ['9', '12']))
if ($user_department_id == '521' && in_array($role_id, ['11', '9', '12']))
return true;
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '544' && $role_id == '3')
return true;
@ -1036,21 +1082,21 @@ function getSaveEstimateInstallData($user_department_id, $role_id)
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;
if ($user_department_id == '312' && $role_id == '3')
return true;
return false;
}
function saveInstallData($user_department_id, $role_id)
{
if ($user_department_id == '521' && $role_id == '9')
if ($user_department_id == '315' && $role_id == '1')
return true;
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
if ($user_department_id == '521' && $role_id == '9')
return true;
if ($user_department_id == '544' && $role_id == '3')
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '543' && $role_id == '2')
return true;
if ($user_department_id == '544' && $role_id == '3')
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;
if ($user_department_id == '220')
@ -1059,7 +1105,8 @@ function saveInstallData($user_department_id, $role_id)
}
function getWipwholeChangePlanningCustomerDetailsStatus($link,$id){
function getWipwholeChangePlanningCustomerDetailsStatus($link, $id)
{
$sql = "
SELECT
custom_name,
@ -1072,4 +1119,4 @@ function getWipwholeChangePlanningCustomerDetailsStatus($link,$id){
LIMIT 1
";
return mysqli_query($link, $sql);
}
}

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

@ -7,24 +7,35 @@ $tableArr = array(
"CH" => "table_index6",
"Z" => "table_index7"
);
// 暫時可編輯及刪除權限
$update_delete_status = false;
if (in_array($user_id, ['M0175', 'M0079'])) {
$update_delete_status = true;
}
?>
<table id="<?php echo $tableArr[$key]; ?>" class="table table-striped table-bordered" style="width:98.5%">
<table id="<?php echo $tableArr[$key]; ?>" class="table table-striped table-bordered " style="width:100%;table-layout:fixed;">
<thead>
<tr>
<th style="vertical-align: middle;text-align:center;">合約號</th>
<th style="vertical-align: middle;text-align:center;">電梯編號</th>
<th style="vertical-align: middle;text-align:center;">客戶姓名</th>
<th style="vertical-align: middle;text-align:center;">規格</th>
<th style="vertical-align: middle;text-align:center;">地址</th>
<th style="vertical-align: middle;text-align:center;">工勘狀態</th>
<th style="vertical-align: middle;text-align:center;">下單日<br />(普來特富)</th>
<th style="vertical-align: middle;text-align:center;">預計到廠日<br />(觀音廠)</th>
<th style="vertical-align: middle;text-align:center;">實際到廠日<br />(觀音廠)</th>
<th style="vertical-align: middle;text-align:center;">預計出貨日<br />(到工地)</th>
<th style="vertical-align: middle;text-align:center;">營業/契約確認</th>
<th style="vertical-align: middle;text-align:center;">設計確認</th>
<th style="vertical-align: middle;text-align:center;">工務確認</th>
<th style="vertical-align: middle;text-align:center;">生管(業 務)確認</th>
<?php
echo $update_delete_status ? "<th style='text-align:center;width:80px;'>刪除</th>" : "";
?>
<th style="text-align:center;width:120px;">合約號</th>
<th style="text-align:center;width:120px;">電梯編號</th>
<th style="text-align:center;width:150px;">客戶姓名</th>
<th style="text-align:center;width:150px;">規格</th>
<th style="text-align:center;width:150px;">地址</th>
<th style="text-align:center;width:80px;">工勘狀態</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>
<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>
<th style="text-align:center;width:120px;">生管(業務)確認</th>
</tr>
</thead>
<tbody>
@ -100,6 +111,7 @@ $tableArr = array(
?>
<tr>
<?php echo $update_delete_status ? "<td><button type='button' class='btn btn-danger' onclick='delete_wipwholestatus(" . $data['id'] . ")'>刪除</button></td>" : ""; ?>
<td>
<?php
if (in_array($department_id, [311, 312, 313, 314, 315, 501, 511, 512, 513, 513, 220, 911])) {
@ -172,7 +184,12 @@ $tableArr = array(
echo "<td></td>";
}
?>
<td>
<?php
if (!empty($data['real_arrival_date']))
echo date("Y/m/d", strtotime($data['real_arrival_date']));
?>
</td>
<td>
<?php
$str = $data['yingyeok'] . "/5";

58
wms/wipwhole-index.php

@ -25,6 +25,14 @@ $futureDate = date("Y/m/d", strtotime(date("Y-m-d") . " +{$numberOfDaysToAdd} da
include "wipwhole-index-function.php";
include "css/view/wipwhole-index.php";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST['form_name'] == 'del_form') {
$del_seq = $_POST['del_seq'];
$sql = "UPDATE wipwholestatus SET status = '0' WHERE id = '$del_seq' ";
mysqli_query($link, $sql);
}
}
// 宣告主資料空陣列
$data = array();
@ -190,6 +198,7 @@ $dataZ = mysqli_query($link, $sql);
</tr>
</tbody>
</table>
</form>
</div>
<nav class="navbar navbar-tabs" style="margin:0;margin-top:5px;">
<div class="container-fluid">
@ -237,8 +246,22 @@ foreach ($dataArr as $key => $val) {
// 結束連線
mysqli_close($link);
?>
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<link href="/wms/css/select2.min.css" rel="stylesheet" />
<script src="/wms/css/select2.min.js"></script>
<script src="/wms/css/dataTables.fixedColumns.min.js"></script>
<style>
.dataTables_scrollHead .dataTable {
margin-bottom: -2px;
}
.dataTables_scrollBody .dataTable {
margin-bottom: 0;
}
table {
margin-left: 0px;
}
</style>
<script>
var sheetNum = "<?php echo empty($_GET['sheetNum']) ? 'All' : $_GET['sheetNum']; ?>";
@ -364,6 +387,9 @@ mysqli_close($link);
}
$('#table_index2,#table_index3,#table_index4,#table_index5,#table_index6,#table_index7').DataTable({
scrollX: true,
fixedHeader: true,
scrollY: 500,
"language": {
"emptyTable": "無資料...",
"processing": "處理中...",
@ -414,6 +440,8 @@ mysqli_close($link);
var showNum = <?php echo empty($_GET['showNum']) ? '10' : $_GET['showNum']; ?>;
var nowPage = <?php echo empty($_GET['nowPage']) ? '1' : $_GET['nowPage']; ?>;
var searchContent = "<?php echo empty($_GET['searchContent']) ? '' : $_GET['searchContent']; ?>";
var orderColumn = "<?php echo empty($_GET['orderColumn']) ? '' : $_GET['orderColumn']; ?>";
var orderDirection = "<?php echo empty($_GET['orderDirection']) ? '' : $_GET['orderDirection']; ?>";
var dataArr2 = {
"All": "table_index2",
@ -425,10 +453,23 @@ mysqli_close($link);
}
var table = $('#' + dataArr2[sheetNum]).DataTable();
// 设置排序信息
if (orderColumn !== '' && orderDirection !== '') {
table.order([orderColumn, orderDirection]).draw();
}
table.search(searchContent).draw();
table.page.len(showNum).draw();
table.page((nowPage) - 1).draw('page');
// 監聽排序
table.on('order.dt', function() {
var order = table.order();
orderColumn = order[0][0];
orderDirection = order[0][1];
});
// 監聽頁碼
table.on('page.dt', function() {
searchDatatable(table);
@ -450,8 +491,19 @@ mysqli_close($link);
searchContent = table.search();
window.location.href = "<?php echo "wipwhole-index.php?function_name=wipinstall&$token_link"; ?>" +
"&showNum=" + showNum + "&nowPage=" + nowPage + "&searchContent=" + searchContent + "&sheetNum=" + sheetNum +
"&orderColumn=" + orderColumn + "&orderDirection=" + orderDirection +
"&contractno=" + contractno + "&facilityno=" + facilityno + "&custom=" + custom +
"&site_survey_contact_verify=" + site_survey_contact_verify + "&real_contract_arrival_date_start=" + real_contract_arrival_date_start +
"&real_contract_arrival_date_end=" + real_contract_arrival_date_end + "&area_no=" + area_no;
}
</script>
function delete_wipwholestatus(id) {
$("#del_seq").val(id);
alert(id)
$("#del_form").submit();
}
</script>
<form id='del_form' method='post'>
<input type='hidden' id='del_seq' name='del_seq' value='' />
<input type='hidden' id='form_name' name='form_name' value='del_form' />
</form>

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

@ -34,5 +34,6 @@ $desin_leader_verify_file = fileIUpload("desin_leader_verify_file");
// 工務
$building_heigh_verify_file = fileIUpload("building_heigh_verify_file");
$site_survey_contact_verify_file = fileIUpload("site_survey_contact_verify_file");
$plan_diagram_file = fileIUpload("plan_diagram_file");
// 生管
$shengguanok_status_file = fileIUpload("shengguanok_status_file");

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

@ -153,6 +153,25 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$delivery_date = $_POST['delivery_date'] ?: $row['delivery_date'];
$delivery_date_owner = $_POST['delivery_date_owner'] ?: $row['delivery_date_owner'];
// 工務助理
$install_outsourcer = $_POST['install_outsourcer'];
$install_outsourcer_owner = $_POST['install_outsourcer_owner'];
$install_outsourcer_date = $_POST['install_outsourcer_date'];
$install_outsourcer_date_owner = $_POST['install_outsourcer_date_owner'];
$estimate_install_start_date = $_POST['estimate_install_start_date'];
$estimate_install_start_date_owner = $_POST['estimate_install_start_date_owner'];
$estimate_install_end_date = $_POST['estimate_install_end_date'];
$estimate_install_end_date_owner = $_POST['estimate_install_end_date_owner'];
$tryrun_outsourcer = $_POST['tryrun_outsourcer'];
$tryrun_outsourcer_owner = $_POST['tryrun_outsourcer_owner'];
$tryrun_outsourcer_date = $_POST['tryrun_outsourcer_date'];
$tryrun_outsourcer_date_owner = $_POST['tryrun_outsourcer_date_owner'];
$estimate_tryrun_start_date = $_POST['estimate_tryrun_start_date'];
$estimate_tryrun_start_date_owner = $_POST['estimate_tryrun_start_date_owner'];
$estimate_tryrun_end_date = $_POST['estimate_tryrun_end_date'];
$estimate_tryrun_end_date_owner = $_POST['estimate_tryrun_end_date_owner'];
$warehouse_assistant_remark = $_POST['warehouse_assistant_remark'];
$creater = $_POST['creater'];
$create_at = $_POST['create_at'];
@ -193,7 +212,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
null,
'$permission',
'$creater',
'".date("Y-m-d H:i:s")."'
'" . date("Y-m-d H:i:s") . "'
);
";
mysqli_query($link, $sql);
@ -383,25 +402,25 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
} else if ($user_department_id == 321) {
// 共用更新
$updatesql .= "
contractno = '$contractno',
facility_temp_no = '$facility_temp_no',
facilityno = '$facilityno',
custom='$custom' ,
latitude = '$latitude',
longitude = '$longitude',
weight = '$weight',
numberofpassenger = '$numberofpassenger',
numberofstop = '$numberofstop',
numberoffloor = '$numberoffloor',
opentype = '$opentype',
speed = '$speed',
site_manager = '$site_manager',
address = '$address',
real_address = '$real_address',
contract_arrival_date = '$contract_arrival_date',
facility_kind = '$facility_kind',
";
// $updatesql .= "
// contractno = '$contractno',
// facility_temp_no = '$facility_temp_no',
// facilityno = '$facilityno',
// custom='$custom' ,
// latitude = '$latitude',
// longitude = '$longitude',
// weight = '$weight',
// numberofpassenger = '$numberofpassenger',
// numberofstop = '$numberofstop',
// numberoffloor = '$numberoffloor',
// opentype = '$opentype',
// speed = '$speed',
// site_manager = '$site_manager',
// address = '$address',
// real_address = '$real_address',
// contract_arrival_date = '$contract_arrival_date',
// facility_kind = '$facility_kind',
// ";
// 業務更新
$updatesql .= "
prattford_order_date_verify = '$prattford_order_date_verify' ,
@ -468,6 +487,56 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
echo "暫無權限";
exit();
}
// 暫時可編輯及刪除權限
if (in_array($user_id, ['M0175', 'M0079'])) {
$updatesql .= "
contractno = '$contractno',
facility_temp_no = '$facility_temp_no',
renovate_type = '$renovate_type',
facilityno = '$facilityno',
custom='$custom' ,
latitude = '$latitude',
longitude = '$longitude',
weight = '$weight',
numberofpassenger = '$numberofpassenger',
numberofstop = '$numberofstop',
numberoffloor = '$numberoffloor',
opentype = '$opentype',
speed = '$speed',
site_manager = '$site_manager',
address = '$address',
contract_arrival_date = '$contract_arrival_date',
facility_kind = '$facility_kind',
";
}
// 工務助理
$updatesql .= "
install_outsourcer = '$install_outsourcer',
install_outsourcer_owner = '$install_outsourcer_owner',
install_outsourcer_date = '$install_outsourcer_date',
install_outsourcer_date_owner = '$install_outsourcer_date_owner',
estimate_install_start_date = '$estimate_install_start_date',
estimate_install_start_date_owner = '$estimate_install_start_date_owner',
estimate_install_end_date = '$estimate_install_end_date',
estimate_install_end_date_owner = '$estimate_install_end_date_owner',
tryrun_outsourcer = '$tryrun_outsourcer',
tryrun_outsourcer_owner = '$tryrun_outsourcer_owner',
tryrun_outsourcer_date = '$tryrun_outsourcer_date',
tryrun_outsourcer_date_owner = '$tryrun_outsourcer_date_owner',
estimate_tryrun_start_date = '$estimate_tryrun_start_date',
estimate_tryrun_start_date_owner = '$estimate_tryrun_start_date_owner',
estimate_tryrun_end_date = '$estimate_tryrun_end_date',
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner',
warehouse_assistant_remark = '$warehouse_assistant_remark',
";
if (!empty($plan_diagram_file)) {
$updatesql .= "plan_diagram_file = '$plan_diagram_file', ";
$updatesql .= "
all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "<br/>上傳了安裝圖附件<br/><br/>',IF(all_remark IS NULL,'',all_remark)),
";
}
$updatesql .= "
creater = '$creater',
create_at = '$create_at'
@ -649,10 +718,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST['form_name'] == 'update_date_form') {
$creater = $user_id;
foreach ($_POST as $k => $v)
$$k = htmlspecialchars(stripslashes(trim($v)));
$real_contract_arrival_date = $_POST['real_arrival_date'];
$real_arrival_date = $_POST['real_arrival_date'];
$updatesql = "
UPDATE wipwholestatus
SET
@ -661,61 +733,48 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
";
mysqli_query($link, $updatesql);
echo "<script type ='text/JavaScript'>";
echo "alert('已更新日期');";
echo "location.href='wipwhole-rec-invoice-edit.php?function_name=pricereview&id=$id&" . $token_link . "';";
echo "</script>";
}
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST['form_name'] == 'update_estimate_install_date_form') {
foreach ($_POST as $k => $v)
$$k = htmlspecialchars(stripslashes(trim($v)));
$install_outsourcer = $_POST['install_outsourcer'];
$install_outsourcer_owner = $_POST['install_outsourcer_owner'];
$install_outsourcer_date = $_POST['install_outsourcer_date'];
$install_outsourcer_date_owner = $_POST['install_outsourcer_date_owner'];
$estimate_install_start_date = $_POST['estimate_install_start_date'];
$estimate_install_start_date_owner = $_POST['estimate_install_start_date_owner'];
$estimate_install_end_date = $_POST['estimate_install_end_date'];
$estimate_install_end_date_owner = $_POST['estimate_install_end_date_owner'];
$tryrun_outsourcer = $_POST['tryrun_outsourcer'];
$tryrun_outsourcer_owner = $_POST['tryrun_outsourcer_owner'];
$tryrun_outsourcer_date = $_POST['tryrun_outsourcer_date'];
$tryrun_outsourcer_date_owner = $_POST['tryrun_outsourcer_date_owner'];
$estimate_tryrun_start_date = $_POST['estimate_tryrun_start_date'];
$estimate_tryrun_start_date_owner = $_POST['estimate_tryrun_start_date_owner'];
$estimate_tryrun_end_date = $_POST['estimate_tryrun_end_date'];
$estimate_tryrun_end_date_owner = $_POST['estimate_tryrun_end_date_owner'];
$warehouse_assistant_remark = $_POST['warehouse_assistant_remark'];
$updatesql = "
UPDATE wipwholestatus
SET
install_outsourcer = '$install_outsourcer',
install_outsourcer_owner = '$install_outsourcer_owner',
install_outsourcer_date = '$install_outsourcer_date',
install_outsourcer_date_owner = '$install_outsourcer_date_owner',
estimate_install_start_date = '$estimate_install_start_date',
estimate_install_start_date_owner = '$estimate_install_start_date_owner',
estimate_install_end_date = '$estimate_install_end_date',
estimate_install_end_date_owner = '$estimate_install_end_date_owner',
tryrun_outsourcer = '$tryrun_outsourcer',
tryrun_outsourcer_owner = '$tryrun_outsourcer_owner',
tryrun_outsourcer_date = '$tryrun_outsourcer_date',
tryrun_outsourcer_date_owner = '$tryrun_outsourcer_date_owner',
estimate_tryrun_start_date = '$estimate_tryrun_start_date',
estimate_tryrun_start_date_owner = '$estimate_tryrun_start_date_owner',
estimate_tryrun_end_date = '$estimate_tryrun_end_date',
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner',
warehouse_assistant_remark = '$warehouse_assistant_remark'
WHERE id = '$id'
$sql = "
SELECT
`custom`,
`facilityno`,
`salesid`
FROM `wipwholestatus`
where `id` = '$id'
";
// echo $updatesql;
// exit;
mysqli_query($link, $updatesql);
$result = mysqli_query($link, $sql);
foreach ($result as $row) {
$permission = $row["salesid"];
$custom = $row["custom"];
$facilityno = $row["facilityno"];
$title = "客戶:$custom 作番:$facilityno 實際出貨日變更";
$content = "客戶:$custom
作番:$facilityno
實際出貨日(到工地):$real_arrival_date";
$sql = "
INSERT INTO notice(
kind,
related_id,
title,
content,
haveread,
permission,
creater,
create_at
)VALUES(
'1',
'$id',
'$title',
'$content',
null,
'$permission',
'$creater',
'" . date("Y-m-d H:i:s") . "'
);
";
mysqli_query($link, $sql);
}
echo "<script type ='text/JavaScript'>";
echo "alert('已更新日期');";

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

@ -1,5 +1,5 @@
<?php
ini_set('display_errors', 'on');
// ini_set('display_errors', 'on');
/**
* (新梯)流程規則:
* 1. A:營業員確認中 生管建立大日程 (或是系統洗入)
@ -51,9 +51,16 @@ $pinzheng = getPinzhengStatus($link, $user_department_id, $role_id);
// 取得分頁頁碼
$tab = getTabNo($user_department_id);
if (in_array($user_id, ['M0164', 'M0165', 'M0127'])) {
// 工務助理
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193'])) {
$warehouse2 = "";
$tab = 2;
$tab = 5;
}
// 暫時可編輯及刪除權限
$update_delete_status = "disabled";
if (in_array($user_id, ['M0175', 'M0079'])) {
$update_delete_status = "";
}
// select => options 開門方式
@ -90,7 +97,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">合約號</td>
<td>
<input class="form-control " type="text" name="contractno" value="<?= $row["contractno"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="contractno" value="<?= $row["contractno"]; ?>" <?php echo $update_delete_status; ?>>
<?php
if (in_array($user_department_id, [311, 312, 313, 314, 315, 501, 511, 512, 513, 514, 220, 911, 50, 320, 250])) {
$sql = "
@ -111,29 +118,29 @@ include "wipwhole-rec-invoice-edit-submit.php";
</td>
<td style="vertical-align: middle">作番號</td>
<td>
<input class="form-control disabled_select" type="text" name="facilityno" value="<?= $row["facilityno"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="facilityno" value="<?= $row["facilityno"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">客戶名稱</td>
<td>
<input class="form-control disabled_select" type="text" name="custom" value="<?= $row["custom"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="custom" value="<?= $row["custom"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">號機</td>
<td>
<input class="form-control disabled_select" type="text" name="facility_temp_no" value="<?= $row["facility_temp_no"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="facility_temp_no" value="<?= $row["facility_temp_no"]; ?>" <?php echo $update_delete_status; ?>>
</td>
</tr>
<tr>
<td style="vertical-align: middle">經度</td>
<td style="vertical-align: middle">
<input class="form-control disabled_select" type="text" name="longitude" value="<?= $row["longitude"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="longitude" value="<?= $row["longitude"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">緯度</td>
<td>
<input class="form-control disabled_select" type="text" name="latitude" value="<?= $row["latitude"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="latitude" value="<?= $row["latitude"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">地址</td>
<td>
<input class="form-control disabled_select" type="text" name="address" value="<?= $row["address"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="address" value="<?= $row["address"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">工地地址<br />
<?php
@ -154,11 +161,11 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">機型</td>
<td>
<input class="form-control disabled_select" type="text" name="facility_kind" value="<?= $row["facility_kind"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="facility_kind" value="<?= $row["facility_kind"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">開門方式</td>
<td style="vertical-align: middle">
<select class="form-control disabled_select" name="opentype" <?php echo $yewu; ?>>
<select class="form-control disabled_select" name="opentype" <?php echo $update_delete_status; ?>>
<option value=""></option>
<?php
foreach ($opendoor_options as $opendoor_option) :
@ -173,35 +180,35 @@ include "wipwhole-rec-invoice-edit-submit.php";
</td>
<td style="vertical-align: middle">速度</td>
<td style="vertical-align: middle" <?php echo $information; ?>>
<input class="form-control disabled_select" type="number" name="speed" min="0" value="<?= $row["speed"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="number" name="speed" min="0" value="<?= $row["speed"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">工地負責人</td>
<td>
<input class="form-control disabled_select" type="text" name="site_manager" value="<?= $row["site_manager"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="text" name="site_manager" value="<?= $row["site_manager"]; ?>" <?php echo $update_delete_status; ?>>
</td>
</tr>
<tr>
<td style="vertical-align: middle">載重</td>
<td style="vertical-align: middle">
<input class="form-control disabled_select" type="number" name="weight" min="0" value="<?= $row["weight"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="number" name="weight" min="0" value="<?= $row["weight"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">人乘</td>
<td style="vertical-align: middle">
<input class="form-control disabled_select" type="number" name="numberofpassenger" min="0" value="<?= $row["numberofpassenger"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="number" name="numberofpassenger" min="0" value="<?= $row["numberofpassenger"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">樓停</td>
<td>
<input class="form-control disabled_select" type="number" name="numberofstop" min="0" value="<?= $row["numberofstop"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="number" name="numberofstop" min="0" value="<?= $row["numberofstop"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">樓層</td>
<td>
<input class="form-control disabled_select" type="number" name="numberoffloor" min="0" value="<?= $row["numberoffloor"]; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="number" name="numberoffloor" min="0" value="<?= $row["numberoffloor"]; ?>" <?php echo $update_delete_status; ?>>
</td>
</tr>
<tr>
<td style="vertical-align: middle">合約交期<br />(到工地)</td>
<td>
<input class="form-control disabled_select" type="date" name="contract_arrival_date" value="<?= $row['contract_arrival_date']; ?>" <?php echo $yewu; ?>>
<input class="form-control disabled_select" type="date" name="contract_arrival_date" value="<?= $row['contract_arrival_date']; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">預計交期(到工地)
<br />
@ -264,6 +271,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<li><a href="#tabs-3">工務確認項</a></li>
<li><a href="#tabs-4">生管確認項</a></li>
<li><a href="#tabs-5">品證確認項</a></li>
<li><a href="#tabs-6">工務助理確認項</a></li>
</ul>
<div id="tabs-1">
<table class="table table-bordered" style="width:100%">
@ -341,9 +349,9 @@ include "wipwhole-rec-invoice-edit-submit.php";
<td style="vertical-align: middle;">附件</td>
<td style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" id="customer_planning_verify_file" name="customer_planning_verify_file" <?php
if (isset($row2['change_status'])){
if (isset($row2['change_status'])) {
echo $row2['change_status'] === 'Z' ? "" : "disabled";
}else{
} else {
echo "disabled";
}
?>>
@ -834,162 +842,6 @@ include "wipwhole-rec-invoice-edit-submit.php";
?>
</td>
</tr>
<tr>
<td colspan="4">
預計安裝及試車日程
<br />
(工務助理項目)
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包廠商</td>
<td>
<input id="install_outsourcer_tmp" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="install_outsourcer_date_tmp" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#install_outsourcer_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_install_start_date_tmp" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_start_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_start_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_install_end_date_tmp" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_end_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_end_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包廠商</td>
<td>
<input id="tryrun_outsourcer_tmp" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="tryrun_outsourcer_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="tryrun_outsourcer_date_tmp" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_outsourcer_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="tryrun_outsourcer_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_tryrun_start_date_tmp" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_start_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_tryrun_start_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_tryrun_end_date_tmp" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_end_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_tryrun_end_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td>備註</td>
<td colspan="3">
<textarea class="form-control" id="warehouse_assistant_remark_tmp" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
</td>
</tr>
<tr>
<td colspan="4">
<?php
if (getSaveEstimateInstallData($user_department_id, $role_id))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
?>
</td>
</tr>
<tr>
<td colspan="4">
實際安裝及試車日程
@ -1350,7 +1202,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">實際出貨日(到工地)</td>
<td>
<input class="form-control" type="date" id="real_arrival_date_tmp" value="<?= $row['real_arrival_date']; ?>" <?php echo $shengguan; ?>>
<input class="form-control" type="date" id="real_arrival_date_tmp" value="<?= SUBSTR($row['real_arrival_date'],0,10); ?>" <?php echo $shengguan; ?>>
</td>
<td colspan="4">
<button onclick="updateRealArrivalDate()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?php echo $shengguan2; ?>>出貨日調整</button>
@ -1439,6 +1291,174 @@ include "wipwhole-rec-invoice-edit-submit.php";
</tbody>
</table>
</div>
<div id="tabs-6">
<table class="table table-bordered" style="width:100%">
<tr>
<td colspan="4">
預計安裝及試車日程
<br />
(工務助理項目)
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包廠商</td>
<td>
<input name="install_outsourcer" id="install_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_owner" name="install_outsourcer_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="install_outsourcer_date" id="install_outsourcer_date" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#install_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_date_owner" name="install_outsourcer_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_start_date" id="estimate_install_start_date" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_start_date_owner" name="estimate_install_start_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_end_date" id="estimate_install_end_date" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_end_date_owner" name="estimate_install_end_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包廠商</td>
<td>
<input name="tryrun_outsourcer" id="tryrun_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="tryrun_outsourcer_owner" name="tryrun_outsourcer_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="tryrun_outsourcer_date" id="tryrun_outsourcer_date" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" name="tryrun_outsourcer_date_owner" id="tryrun_outsourcer_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_start_date" id="estimate_tryrun_start_date" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_tryrun_start_date_owner" name="estimate_tryrun_start_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_end_date" id="estimate_tryrun_end_date" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" name="estimate_tryrun_end_date_owner" id="estimate_tryrun_end_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td>備註</td>
<td colspan="3">
<textarea class="form-control" name="warehouse_assistant_remark" id="warehouse_assistant_remark" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
</td>
</tr>
<tr>
<td style="vertical-align: middle;">安裝圖附件</td>
<td colspan="5" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" name="plan_diagram_file" <?= $warehouse2; ?>>
<?php
echo !empty($row['plan_diagram_file']) ? "<a id='plan_diagram_file_a' style='color:#00F;' href='" . $row['plan_diagram_file'] . "' target='_blank'>下載附件</a>" : "";
?>
</td>
</tr>
<tr>
<td colspan="4">
<?php
if (getSaveEstimateInstallData($user_department_id, $role_id))
echo "<button type='button' onclick='savedata()' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
?>
</td>
</tr>
</table>
</div>
</div>
</form>
<form method="post" id="assign_form" enctype="multipart/form-data">
@ -1471,26 +1491,7 @@ include "wipwhole-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" name='form_name' value="update_date_form" />
</form>
<form method="post" id="update_estimate_install_date_form" enctype="multipart/form-data">
<input type="hidden" id="install_outsourcer" name='install_outsourcer' value="<?php echo $row['install_outsourcer']; ?>" />
<input type="hidden" id="install_outsourcer_owner" name='install_outsourcer_owner' value="<?php echo $row['install_outsourcer_owner']; ?>" />
<input type="hidden" id="install_outsourcer_date" name='install_outsourcer_date' value="<?php echo $row['install_outsourcer_date']; ?>" />
<input type="hidden" id="install_outsourcer_date_owner" name='install_outsourcer_date_owner' value="<?php echo $row['install_outsourcer_date_owner']; ?>" />
<input type="hidden" id="estimate_install_start_date" name='estimate_install_start_date' value="<?php echo $row['estimate_install_start_date']; ?>" />
<input type="hidden" id="estimate_install_start_date_owner" name='estimate_install_start_date_owner' value="<?php echo $row['estimate_install_start_date_owner']; ?>" />
<input type="hidden" id="estimate_install_end_date" name='estimate_install_end_date' value="<?php echo $row['estimate_install_end_date']; ?>" />
<input type="hidden" id="estimate_install_end_date_owner" name='estimate_install_end_date_owner' value="<?php echo $row['estimate_install_end_date_owner']; ?>" />
<input type="hidden" id="tryrun_outsourcer" name='tryrun_outsourcer' value="<?php echo $row['tryrun_outsourcer']; ?>" />
<input type="hidden" id="tryrun_outsourcer_owner" name='tryrun_outsourcer_owner' value="<?php echo $row['tryrun_outsourcer_owner']; ?>" />
<input type="hidden" id="tryrun_outsourcer_date" name='tryrun_outsourcer_date' value="<?php echo $row['tryrun_outsourcer_date']; ?>" />
<input type="hidden" id="tryrun_outsourcer_date_owner" name='tryrun_outsourcer_date_owner' value="<?php echo $row['tryrun_outsourcer_date_owner']; ?>" />
<input type="hidden" id="estimate_tryrun_start_date" name='estimate_tryrun_start_date' value="<?php echo $row['estimate_tryrun_start_date']; ?>" />
<input type="hidden" id="estimate_tryrun_start_date_owner" name='estimate_tryrun_start_date_owner' value="<?php echo $row['estimate_tryrun_start_date_owner']; ?>" />
<input type="hidden" id="estimate_tryrun_end_date" name='estimate_tryrun_end_date' value="<?php echo $row['estimate_tryrun_end_date']; ?>" />
<input type="hidden" id="estimate_tryrun_end_date_owner" name='estimate_tryrun_end_date_owner' value="<?php echo $row['estimate_tryrun_end_date_owner']; ?>" />
<input type="hidden" id="warehouse_assistant_remark" name='warehouse_assistant_remark' value="<?php echo $row['warehouse_assistant_remark']; ?>" />
<input type="hidden" name='form_name' value="update_estimate_install_date_form" />
</form>
<form method="post" id="update_install_date_form" enctype="multipart/form-data">
<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']; ?>" />
@ -1579,14 +1580,20 @@ include "wipwhole-rec-invoice-edit-submit.php";
});
var oursourcer_input_arr = [
'install_outsourcer',
'install_outsourcer_date',
'install_start_date',
'install_end_date',
'tryrun_outsourcer',
'tryrun_outsourcer_date',
'tryrun_start_date',
'tryrun_end_date',
]
for (var i = 0; i < oursourcer_input_arr.length; i++) {
inputChangeOutsourcer(oursourcer_input_arr[i]);
}
var oursourcer_input_arr = [
'install_outsourcer',
'install_outsourcer_date',
'tryrun_outsourcer',
'tryrun_outsourcer_date',
'estimate_install_outsourcer',
'estimate_install_start_date',
'estimate_install_end_date',
@ -1595,7 +1602,7 @@ include "wipwhole-rec-invoice-edit-submit.php";
'estimate_tryrun_end_date',
]
for (var i = 0; i < oursourcer_input_arr.length; i++) {
inputChangeOutsourcer(oursourcer_input_arr[i]);
inputChangeOutsourcer2(oursourcer_input_arr[i]);
}
});
@ -1613,6 +1620,12 @@ include "wipwhole-rec-invoice-edit-submit.php";
});
}
function inputChangeOutsourcer2(input_name) {
$("#" + input_name).on("change", function() {
$("#" + input_name + "_owner").val("<?php echo $user_id; ?>");
});
}
function formatDate() {
var timestamp = Date.now();
var date = new Date(timestamp);
@ -1829,29 +1842,6 @@ include "wipwhole-rec-invoice-edit-submit.php";
}
}
function saveEstimateInstallData() {
if (confirm('確定要更改預計安裝日程嗎?') == true) {
$("#install_outsourcer").val($("#install_outsourcer_tmp").val());
$("#install_outsourcer_owner").val($("#install_outsourcer_owner_tmp").val());
$("#install_outsourcer_date").val($("#install_outsourcer_date_tmp").val());
$("#install_outsourcer_date_owner").val($("#install_outsourcer_date_owner_tmp").val());
$("#estimate_install_start_date").val($("#estimate_install_start_date_tmp").val());
$("#estimate_install_start_date_owner").val($("#estimate_install_start_date_owner_tmp").val());
$("#estimate_install_end_date").val($("#estimate_install_end_date_tmp").val());
$("#estimate_install_end_date_owner").val($("#estimate_install_end_date_owner_tmp").val());
$("#tryrun_outsourcer").val($("#tryrun_outsourcer_tmp").val());
$("#tryrun_outsourcer_owner").val($("#tryrun_outsourcer_owner_tmp").val());
$("#tryrun_outsourcer_date").val($("#tryrun_outsourcer_date_tmp").val());
$("#tryrun_outsourcer_date_owner").val($("#tryrun_outsourcer_date_owner_tmp").val());
$("#estimate_tryrun_start_date").val($("#estimate_tryrun_start_date_tmp").val());
$("#estimate_tryrun_start_date_owner").val($("#estimate_tryrun_start_date_owner_tmp").val());
$("#estimate_tryrun_end_date").val($("#estimate_tryrun_end_date_tmp").val());
$("#estimate_tryrun_end_date_owner").val($("#estimate_tryrun_end_date_owner_tmp").val());
$("#warehouse_assistant_remark").val($("#warehouse_assistant_remark_tmp").val());
$('#update_estimate_install_date_form').submit();
}
}
function saveInstallData() {
if (confirm('確定要更改實際安裝日程嗎?') == true) {
$("#install_start_date").val($("#install_start_date_tmp").val());

4
wms/wipwhole-rec-invoice.php

@ -770,11 +770,11 @@ if ($department_id == "321" || $department_id == "220") {
</td>
<td style="vertical-align: middle">合約交期<br />(到工地)</td>
<td>
<input class="form-control " type="datetime-local" id="contract_arrival_date" name="contract_arrival_date" value="<?php echo $contract_arrival_date; ?>">
<input class="form-control " type="date" id="contract_arrival_date" name="contract_arrival_date" value="<?php echo $contract_arrival_date; ?>">
</td>
<td style="vertical-align: middle">預計交期<br />(到工地)</td>
<td>
<input class="form-control " type="datetime-local" include_once="real_contract_arrival_date" name="real_contract_arrival_date" value="<?php echo $real_contract_arrival_date; ?>">
<input class="form-control " type="date" include_once="real_contract_arrival_date" name="real_contract_arrival_date" value="<?php echo $real_contract_arrival_date; ?>">
</td>
</tr>
<tr>

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

@ -38,8 +38,10 @@ function getForm_key($link, $form_id)
function getWipwholestatusData($link, $id)
{
$db_query = "
SELECT * FROM
wipwholestatus WHERE id = '$id'
SELECT *
FROM wipwholestatus
WHERE id = '$id'
AND status = '1'
";
$receivabledata = mysqli_query($link, $db_query);
return mysqli_fetch_array($receivabledata, MYSQLI_ASSOC);
@ -363,6 +365,12 @@ function getEditFlag($department_id, $role_id, $user_id)
function getDataSql($department_id, $role_id, $user_id)
{
// 補丁 黃孟澤 & 葉博澄 權限 = 李烘銘
if(in_array($user_id,['M0166','M0091'])){
$user_id = 'M0086';
}
$contract_type = 'B';
// 營業員主管或營業員
$department_arr = [
@ -374,7 +382,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus $sql_cmd
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND status = '1' AND contract_type = '$contract_type' " : " AND status = '1' AND contract_type = '$contract_type'";
$sql .= getWipwholeSearchSql();
$sql .= "ORDER BY real_contract_arrival_date DESC ";
@ -390,6 +398,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -400,6 +409,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -410,6 +420,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -420,6 +431,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -430,6 +442,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -451,6 +464,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -460,8 +474,9 @@ function getDataSql($department_id, $role_id, $user_id)
// (宜蘭)工務組長
if ($user_id == 'M0087') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('宜蘭')
@ -472,8 +487,9 @@ function getDataSql($department_id, $role_id, $user_id)
// 北區工務組長
if ($user_id == 'M0040' || $user_id == 'M0176') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
@ -484,8 +500,9 @@ function getDataSql($department_id, $role_id, $user_id)
// 中區工務組長
if ($user_id == 'M0113' || $user_id == 'M0158') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
@ -496,8 +513,9 @@ function getDataSql($department_id, $role_id, $user_id)
// 南區工務組長
if ($user_id == 'M0039' || $user_id == 'M0078') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
@ -508,8 +526,9 @@ function getDataSql($department_id, $role_id, $user_id)
// 工務
if (in_array($department_id, [521, 531, 541, 542, 543, 544, 545])) {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -521,6 +540,12 @@ function getDataSql($department_id, $role_id, $user_id)
function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
{
// 補丁 黃孟澤 & 葉博澄 權限 = 李烘銘
if(in_array($user_id,['M0166','M0091'])){
$user_id = 'M0086';
}
$contract_type = 'B';
// 營業員主管或營業員
$department_arr = ['501', '511', '512', '513', '514'];
@ -531,6 +556,7 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= "
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -554,6 +580,7 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -564,6 +591,7 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -574,6 +602,7 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -584,6 +613,7 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -594,6 +624,7 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -616,6 +647,7 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -634,8 +666,9 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
// (宜蘭)工務組長
if ($user_id == 'M0087') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -654,8 +687,9 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
// 北區工務組長
if ($user_id == 'M0040' || $user_id == 'M0176') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -674,8 +708,9 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
// 中區工務組長
if ($user_id == 'M0113' || $user_id == 'M0158') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -694,8 +729,9 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
// 南區工務組長
if ($user_id == 'M0039' || $user_id == 'M0078') {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -714,8 +750,9 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
// 工務
if (in_array($department_id, [521, 531, 541, 542, 543, 544, 545])) {
$sql = "
SELECT * FROM wipwholestatus
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -999,11 +1036,26 @@ function getWipwholeChangeButtonStatus($user_department_id)
return false;
}
function getSaveInstallDataButtonStatus($user_department_id, $role_id)
function getSaveEstimateInstallData($user_department_id, $role_id)
{
if ($user_department_id == '521' && $role_id == '9')
if (in_array($user_department_id, ['50', '501']) && $role_id == '2')
return true;
if ($user_department_id == '311' && $role_id == '4')
return true;
if ($user_department_id == '312' && $role_id == '3')
return true;
if ($user_department_id == '313' && $role_id == '3')
return true;
if ($user_department_id == '314' && $role_id == '4')
return true;
if ($user_department_id == '315' && in_array($role_id, ['1', '2']))
return true;
if (in_array($user_department_id, [220, 531]))
return true;
if ($user_department_id == '521' && in_array($role_id, ['11', '9', '12']))
return true;
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '544' && $role_id == '3')
return true;
@ -1011,12 +1063,30 @@ function getSaveInstallDataButtonStatus($user_department_id, $role_id)
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;
return false;
}
function getSaveInstallDataButtonStatus($user_department_id, $role_id)
{
if ($user_department_id == '315' && $role_id == '1')
return true;
if ($user_department_id == '521' && $role_id == '9')
return true;
if ($user_department_id == '542' && in_array($role_id, ['1', '5', '6']))
return true;
if ($user_department_id == '543' && $role_id == '2')
return true;
if ($user_department_id == '544' && $role_id == '3')
return true;
if ($user_department_id == '545' && $role_id == '6')
return true;
if ($user_department_id == '220')
return true;
return false;
}
function getWipwholeChangePlanningCustomerDetailsStatus($link,$id){
function getWipwholeChangePlanningCustomerDetailsStatus($link, $id)
{
$sql = "
SELECT
custom_name,
@ -1029,4 +1099,4 @@ function getWipwholeChangePlanningCustomerDetailsStatus($link,$id){
LIMIT 1
";
return mysqli_query($link, $sql);
}
}

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

@ -7,25 +7,36 @@ $tableArr = array(
"D" => "table_index6",
"Z" => "table_index7"
);
// 暫時可編輯及刪除權限
$update_delete_status = false;
if (in_array($user_id, ['M0175', 'M0079'])) {
$update_delete_status = true;
}
?>
<table id="<?php echo $tableArr[$key]; ?>" class="table table-striped table-bordered dt-responsive nowrap" style="width:98.5%">
<thead>
<tr>
<th style="vertical-align: middle;text-align:center;">合約號</th>
<th style="vertical-align: middle;text-align:center;">汰改種類</th>
<th style="vertical-align: middle;text-align:center;">電梯編號</th>
<th style="vertical-align: middle;text-align:center;">客戶姓名</th>
<th style="vertical-align: middle;text-align:center;">規格</th>
<th style="vertical-align: middle;text-align:center;">地址</th>
<th style="vertical-align: middle;text-align:center;">工勘狀態</th>
<th style="vertical-align: middle;text-align:center;">下單日<br />(普來特富)</th>
<th style="vertical-align: middle;text-align:center;">預計到廠日<br />(觀音廠)</th>
<th style="vertical-align: middle;text-align:center;">實際到廠日<br />(觀音廠)</th>
<th style="vertical-align: middle;text-align:center;">預計出貨日<br />(到工地)</th>
<th style="vertical-align: middle;text-align:center;">工務確認</th>
<th style="vertical-align: middle;text-align:center;">營業/契約確認</th>
<th style="vertical-align: middle;text-align:center;">設計確認</th>
<th style="vertical-align: middle;text-align:center;">生管(業務)<br />確認</th>
<?php
echo $update_delete_status ? "<th style='text-align:center;width:80px;'>刪除</th>" : "";
?>
<th style="text-align:center;width:120px;">合約號</th>
<th style="text-align:center;width:100px;">汰改種類</th>
<th style="text-align:center;width:120px;">電梯編號</th>
<th style="text-align:center;width:150px;">客戶姓名</th>
<th style="text-align:center;width:150px;">規格</th>
<th style="text-align:center;width:150px;">地址</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>
<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>
<th style="text-align:center;width:100px;">設計確認</th>
<th style="text-align:center;width:120px;">生管(業務)確認</th>
</tr>
</thead>
<tbody>
@ -101,6 +112,7 @@ $tableArr = array(
?>
<tr>
<?php echo $update_delete_status ? "<td><button type='button' class='btn btn-danger' onclick='delete_wipwholestatus(" . $data['id'] . ")'>刪除</button></td>" : ""; ?>
<td>
<?php
if (in_array($department_id, [311, 312, 313, 314, 315, 501, 511, 512, 513, 514, 220, 911])) {
@ -179,6 +191,12 @@ $tableArr = array(
echo "<td></td>";
}
?>
<td>
<?php
if (!empty($data['real_arrival_date']))
echo date("Y/m/d", strtotime($data['real_arrival_date']));
?>
</td>
<td>
<?php
$str = $data['gongwuok'] . "/3";

114
wms/wipwhole-renovate-index.php

@ -21,6 +21,14 @@ include "header.php";
include "wipwhole-renovate-index-function.php";
include "css/view/wipwhole-renovate-index.php";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST['form_name'] == 'del_form') {
$del_seq = $_POST['del_seq'];
$sql = "UPDATE wipwholestatus SET status = '0' WHERE id = '$del_seq' ";
mysqli_query($link, $sql);
}
}
// 設定警告出貨到期的天數
$numberOfDaysToAdd = 45;
$futureDate = date("Y/m/d", strtotime(date("Y-m-d") . " +{$numberOfDaysToAdd} days"));
@ -189,6 +197,7 @@ $dataZ = mysqli_query($link, $sql);
</tr>
</tfoot>
</table>
</form>
</div>
<nav class="navbar navbar-tabs" style="margin:0;margin-top:5px;">
<div class="container-fluid">
@ -235,9 +244,22 @@ foreach ($dataArr as $key => $val) {
#結束連線
mysqli_close($link);
?>
<link href="/wms/css/select2.min.css" rel="stylesheet" />
<script src="/wms/css/select2.min.js"></script>
<script src="/wms/css/dataTables.fixedColumns.min.js"></script>
<style>
.dataTables_scrollHead .dataTable {
margin-bottom: -2px;
}
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
.dataTables_scrollBody .dataTable {
margin-bottom: 0;
}
table {
margin-left: 0px;
}
</style>
<script>
var sheetNum = "<?php echo empty($_GET['sheetNum']) ? 'All' : $_GET['sheetNum']; ?>";
@ -319,64 +341,9 @@ mysqli_close($link);
}
$('#table_index2,#table_index3,#table_index4,#table_index5,#table_index6,#table_index7').DataTable({
// columnDefs: [{
// width: 100,
// targets: 0
// },{
// width: 100,
// targets: 1
// },{
// width: 100,
// targets: 2
// },{
// width: 200,
// targets: 3
// },{
// width: 230,
// targets: 4
// },{
// width: 250,
// targets: 5
// },{
// width: 100,
// targets: 6
// }
// ,{
// width: 100,
// targets: 7
// }
// ,{
// width: 100,
// targets: 8
// }
// ,{
// width: 100,
// targets: 9
// }
// ,{
// width: 100,
// targets: 10
// }
// ,{
// width: 100,
// targets: 11
// }
// ,{
// width: 100,
// targets: 12
// }
// ,{
// width: 100,
// targets: 13
// }
// ,{
// width: 100,
// targets: 14
// }],
// fixedColumns: true,
// paging: false,
// scrollCollapse: true,
// scrollX: true,
scrollX: true,
fixedHeader: true,
scrollY: 500,
"language": {
"emptyTable": "無資料...",
"processing": "處理中...",
@ -473,6 +440,8 @@ mysqli_close($link);
var showNum = <?php echo empty($_GET['showNum']) ? '10' : $_GET['showNum']; ?>;
var nowPage = <?php echo empty($_GET['nowPage']) ? '1' : $_GET['nowPage']; ?>;
var searchContent = "<?php echo empty($_GET['searchContent']) ? '' : $_GET['searchContent']; ?>";
var orderColumn = "<?php echo empty($_GET['orderColumn']) ? '' : $_GET['orderColumn']; ?>";
var orderDirection = "<?php echo empty($_GET['orderDirection']) ? '' : $_GET['orderDirection']; ?>";
var dataArr2 = {
"All": "table_index2",
@ -485,10 +454,23 @@ mysqli_close($link);
var table = $('#' + dataArr2[sheetNum]).DataTable();
// 设置排序信息
if (orderColumn !== '' && orderDirection !== '') {
table.order([orderColumn, orderDirection]).draw();
}
table.search(searchContent).draw();
table.page.len(showNum).draw();
table.page((nowPage) - 1).draw('page');
// 監聽排序
table.on('order.dt', function() {
var order = table.order();
orderColumn = order[0][0];
orderDirection = order[0][1];
});
// 監聽頁碼
table.on('page.dt', function() {
searchDatatable(table);
@ -511,8 +493,18 @@ mysqli_close($link);
searchContent = table.search();
window.location.href = "<?php echo "wipwhole-renovate-index.php?function_name=wipinstall&$token_link"; ?>" +
"&showNum=" + showNum + "&nowPage=" + nowPage + "&searchContent=" + searchContent + "&sheetNum=" + sheetNum +
"&orderColumn=" + orderColumn + "&orderDirection=" + orderDirection +
"&contractno=" + contractno + "&facilityno=" + facilityno + "&custom=" + custom +
"&site_survey_contact_verify=" + site_survey_contact_verify + "&real_contract_arrival_date_start=" + real_contract_arrival_date_start +
"&real_contract_arrival_date_end=" + real_contract_arrival_date_end + "&area_no=" + area_no;
}
</script>
function delete_wipwholestatus(id) {
$("#del_seq").val(id);
$("#del_form").submit();
}
</script>
<form id='del_form' method='post'>
<input type='hidden' id='del_seq' name='del_seq' value='' />
<input type='hidden' id='form_name' name='form_name' value='del_form' />
</form>

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

@ -93,6 +93,25 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$site_survey_contact_verify_owner = $_POST['site_survey_contact_verify_owner'] ?: $row['site_survey_contact_verify_owner'];
$old_site_survey_contact_verify = $_POST['old_site_survey_contact_verify'];
// 工務助理
$install_outsourcer = $_POST['install_outsourcer'];
$install_outsourcer_owner = $_POST['install_outsourcer_owner'];
$install_outsourcer_date = $_POST['install_outsourcer_date'];
$install_outsourcer_date_owner = $_POST['install_outsourcer_date_owner'];
$estimate_install_start_date = $_POST['estimate_install_start_date'];
$estimate_install_start_date_owner = $_POST['estimate_install_start_date_owner'];
$estimate_install_end_date = $_POST['estimate_install_end_date'];
$estimate_install_end_date_owner = $_POST['estimate_install_end_date_owner'];
$tryrun_outsourcer = $_POST['tryrun_outsourcer'];
$tryrun_outsourcer_owner = $_POST['tryrun_outsourcer_owner'];
$tryrun_outsourcer_date = $_POST['tryrun_outsourcer_date'];
$tryrun_outsourcer_date_owner = $_POST['tryrun_outsourcer_date_owner'];
$estimate_tryrun_start_date = $_POST['estimate_tryrun_start_date'];
$estimate_tryrun_start_date_owner = $_POST['estimate_tryrun_start_date_owner'];
$estimate_tryrun_end_date = $_POST['estimate_tryrun_end_date'];
$estimate_tryrun_end_date_owner = $_POST['estimate_tryrun_end_date_owner'];
$warehouse_assistant_remark = $_POST['warehouse_assistant_remark'];
// 工勘變更通知繪圖人員
if ($site_survey_contact_verify !== $old_site_survey_contact_verify) {
$site_survey_status = array(
@ -253,7 +272,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
null,
'$permission',
'$creater',
'".date("Y-m-d H:i:s")."'
'" . date("Y-m-d H:i:s") . "'
);
";
mysqli_query($link, $sql);
@ -360,26 +379,26 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
} else if ($user_department_id == 321) {
// 共用更新
$updatesql .= "
contractno = '$contractno',
facility_temp_no = '$facility_temp_no',
renovate_type = '$renovate_type',
facilityno = '$facilityno',
custom='$custom' ,
latitude = '$latitude',
longitude = '$longitude',
weight = '$weight',
numberofpassenger = '$numberofpassenger',
numberofstop = '$numberofstop',
numberoffloor = '$numberoffloor',
opentype = '$opentype',
speed = '$speed',
site_manager = '$site_manager',
address = '$address',
real_address = '$real_address',
contract_arrival_date = '$contract_arrival_date',
facility_kind = '$facility_kind',
";
// $updatesql .= "
// contractno = '$contractno',
// facility_temp_no = '$facility_temp_no',
// renovate_type = '$renovate_type',
// facilityno = '$facilityno',
// custom='$custom' ,
// latitude = '$latitude',
// longitude = '$longitude',
// weight = '$weight',
// numberofpassenger = '$numberofpassenger',
// numberofstop = '$numberofstop',
// numberoffloor = '$numberoffloor',
// opentype = '$opentype',
// speed = '$speed',
// site_manager = '$site_manager',
// address = '$address',
// real_address = '$real_address',
// contract_arrival_date = '$contract_arrival_date',
// facility_kind = '$facility_kind',
// ";
// 業務更新
$updatesql .= "
@ -448,6 +467,58 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
echo "暫無權限";
exit();
}
// 暫時可編輯及刪除權限
if (in_array($user_id, ['M0175', 'M0079'])) {
$updatesql .= "
contractno = '$contractno',
facility_temp_no = '$facility_temp_no',
renovate_type = '$renovate_type',
facilityno = '$facilityno',
custom='$custom' ,
latitude = '$latitude',
longitude = '$longitude',
weight = '$weight',
numberofpassenger = '$numberofpassenger',
numberofstop = '$numberofstop',
numberoffloor = '$numberoffloor',
opentype = '$opentype',
speed = '$speed',
site_manager = '$site_manager',
address = '$address',
contract_arrival_date = '$contract_arrival_date',
facility_kind = '$facility_kind',
";
}
// 工務助理
$updatesql .= "
install_outsourcer = '$install_outsourcer',
install_outsourcer_owner = '$install_outsourcer_owner',
install_outsourcer_date = '$install_outsourcer_date',
install_outsourcer_date_owner = '$install_outsourcer_date_owner',
estimate_install_start_date = '$estimate_install_start_date',
estimate_install_start_date_owner = '$estimate_install_start_date_owner',
estimate_install_end_date = '$estimate_install_end_date',
estimate_install_end_date_owner = '$estimate_install_end_date_owner',
tryrun_outsourcer = '$tryrun_outsourcer',
tryrun_outsourcer_owner = '$tryrun_outsourcer_owner',
tryrun_outsourcer_date = '$tryrun_outsourcer_date',
tryrun_outsourcer_date_owner = '$tryrun_outsourcer_date_owner',
estimate_tryrun_start_date = '$estimate_tryrun_start_date',
estimate_tryrun_start_date_owner = '$estimate_tryrun_start_date_owner',
estimate_tryrun_end_date = '$estimate_tryrun_end_date',
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner',
warehouse_assistant_remark = '$warehouse_assistant_remark',
";
if (!empty($plan_diagram_file)){
$updatesql .= "plan_diagram_file = '$plan_diagram_file', ";
$updatesql .= "
all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "<br/>上傳了安裝圖附件<br/><br/>',IF(all_remark IS NULL,'',all_remark)),
";
}
$updatesql .= "
creater = '$creater',
create_at = '$create_at'
@ -625,10 +696,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST['form_name'] == 'update_date_form') {
$creater = $user_id;
foreach ($_POST as $k => $v)
$$k = htmlspecialchars(stripslashes(trim($v)));
$real_contract_arrival_date = $_POST['real_arrival_date'];
$real_arrival_date = $_POST['real_arrival_date'];
$updatesql = "
UPDATE wipwholestatus
SET
@ -637,62 +711,46 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
";
mysqli_query($link, $updatesql);
echo "<script type ='text/JavaScript'>";
echo "alert('已更新日期');";
echo "location.href='wipwhole-renovate-rec-invoice-edit.php?function_name=pricereview&id=$id&" . $token_link . "';";
echo "</script>";
}
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST['form_name'] == 'update_estimate_install_date_form') {
foreach ($_POST as $k => $v)
$$k = htmlspecialchars(stripslashes(trim($v)));
$sql = "
SELECT
`custom`,
`facilityno`,
`salesid`
FROM `wipwholestatus`
where `id` = '$id'
";
$result = mysqli_query($link, $sql);
foreach ($result as $row) {
$permission = $row["salesid"];
$title = "客戶:$custom 作番:$facilityno 實際出貨日變更";
$content = "客戶:$custom
作番:$facilityno
實際出貨日(到工地):$real_arrival_date";
$install_outsourcer = $_POST['install_outsourcer'];
$install_outsourcer_owner = $_POST['install_outsourcer_owner'];
$install_outsourcer_date = $_POST['install_outsourcer_date'];
$install_outsourcer_date_owner = $_POST['install_outsourcer_date_owner'];
$estimate_install_start_date = $_POST['estimate_install_start_date'];
$estimate_install_start_date_owner = $_POST['estimate_install_start_date_owner'];
$estimate_install_end_date = $_POST['estimate_install_end_date'];
$estimate_install_end_date_owner = $_POST['estimate_install_end_date_owner'];
$tryrun_outsourcer = $_POST['tryrun_outsourcer'];
$tryrun_outsourcer_owner = $_POST['tryrun_outsourcer_owner'];
$tryrun_outsourcer_date = $_POST['tryrun_outsourcer_date'];
$tryrun_outsourcer_date_owner = $_POST['tryrun_outsourcer_date_owner'];
$estimate_tryrun_start_date = $_POST['estimate_tryrun_start_date'];
$estimate_tryrun_start_date_owner = $_POST['estimate_tryrun_start_date_owner'];
$estimate_tryrun_end_date = $_POST['estimate_tryrun_end_date'];
$estimate_tryrun_end_date_owner = $_POST['estimate_tryrun_end_date_owner'];
$warehouse_assistant_remark = $_POST['warehouse_assistant_remark'];
$sql = "
INSERT INTO notice(
kind,
related_id,
title,
content,
haveread,
permission,
creater,
create_at
)VALUES(
'1',
'$id',
'$title',
'$content',
null,
'$permission',
'$creater',
'" . date("Y-m-d H:i:s") . "'
);
";
mysqli_query($link, $sql);
}
$updatesql = "
UPDATE wipwholestatus
SET
install_outsourcer = '$install_outsourcer',
install_outsourcer_owner = '$install_outsourcer_owner',
install_outsourcer_date = '$install_outsourcer_date',
install_outsourcer_date_owner = '$install_outsourcer_date_owner',
estimate_install_start_date = '$estimate_install_start_date',
estimate_install_start_date_owner = '$estimate_install_start_date_owner',
estimate_install_end_date = '$estimate_install_end_date',
estimate_install_end_date_owner = '$estimate_install_end_date_owner',
tryrun_outsourcer = '$tryrun_outsourcer',
tryrun_outsourcer_owner = '$tryrun_outsourcer_owner',
tryrun_outsourcer_date = '$tryrun_outsourcer_date',
tryrun_outsourcer_date_owner = '$tryrun_outsourcer_date_owner',
estimate_tryrun_start_date = '$estimate_tryrun_start_date',
estimate_tryrun_start_date_owner = '$estimate_tryrun_start_date_owner',
estimate_tryrun_end_date = '$estimate_tryrun_end_date',
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner',
warehouse_assistant_remark = '$warehouse_assistant_remark'
WHERE id = '$id'
";
// echo $updatesql;
// exit;
mysqli_query($link, $updatesql);
echo "<script type ='text/JavaScript'>";
echo "alert('已更新日期');";
@ -701,6 +759,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if ($_POST['form_name'] == 'update_install_date_form') {
foreach ($_POST as $k => $v)

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

@ -1,5 +1,5 @@
<?php
ini_set('display_errors', 'on');
// ini_set('display_errors', 'on');
/**
* (汰改)流程規則:
* 1. A:工務組長確認中 生管建立大日程 (或是系統洗入)
@ -49,9 +49,16 @@ $pinzheng = getPinzhengStatus($link, $user_department_id, $role_id);
// 取得分頁頁碼
$tab = getTabNo($user_department_id);
if (in_array($user_id, ['M0164', 'M0165', 'M0127'])) {
// 工務助理
if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193'])) {
$warehouse2 = "";
$tab = 0;
$tab = 5;
}
// 暫時可編輯及刪除權限
$update_delete_status = "disabled";
if (in_array($user_id, ['M0175', 'M0079'])) {
$update_delete_status = "";
}
// select => options 開門方式
@ -87,7 +94,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">合約號</td>
<td>
<input class="form-control " type="text" name="contractno" value="<?= $row["contractno"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="contractno" value="<?= $row["contractno"]; ?>" <?php echo $update_delete_status; ?>>
<?php
if (in_array($user_department_id, [311, 312, 313, 314, 315, 501, 511, 512, 513, 514, 220, 911, 50, 320, 250])) {
$sql = "
@ -108,11 +115,11 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</td>
<td style="vertical-align: middle">作番號</td>
<td>
<input class="form-control " type="text" name="facilityno" value="<?= $row["facilityno"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="facilityno" value="<?= $row["facilityno"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">汰改種類</td>
<td style="vertical-align: middle">
<select class="form-control" multiple="multiple" id="renovate_type" name="renovate_type[]" <?php echo $yewu; ?>>
<select class="form-control" multiple="multiple" id="renovate_type" name="renovate_type[]" <?php echo $update_delete_status; ?>>
<option value="M1">M1</option>
<option value="M2">M2</option>
<option value="M3">M3</option>
@ -122,21 +129,21 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</td>
<td style="vertical-align: middle">合約交期<br />(到工地)</td>
<td style="vertical-align: middle">
<input class="form-control" type="date" name="contract_arrival_date" value="<?= $row['contract_arrival_date']; ?>" <?php echo $yewu; ?>>
<input class="form-control" type="date" name="contract_arrival_date" value="<?= $row['contract_arrival_date']; ?>" <?php echo $update_delete_status; ?>>
</td>
</tr>
<tr>
<td style="vertical-align: middle">客戶名稱</td>
<td>
<input class="form-control " type="text" name="custom" value="<?= $row["custom"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="custom" value="<?= $row["custom"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">號機</td>
<td>
<input class="form-control " type="text" name="facility_temp_no" value="<?= $row["facility_temp_no"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="facility_temp_no" value="<?= $row["facility_temp_no"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">工地負責人</td>
<td>
<input class="form-control " type="text" name="site_manager" value="<?= $row["site_manager"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="site_manager" value="<?= $row["site_manager"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">預計交期(到工地)
<br />
@ -152,15 +159,15 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">經度</td>
<td style="vertical-align: middle">
<input class="form-control " type="text" name="longitude" value="<?= $row["longitude"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="longitude" value="<?= $row["longitude"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">緯度</td>
<td>
<input class="form-control " type="text" name="latitude" value="<?= $row["latitude"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="latitude" value="<?= $row["latitude"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">地址</td>
<td>
<input class="form-control " type="text" name="address" value="<?= $row["address"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="address" value="<?= $row["address"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">工地地址<br />
<?php
@ -175,29 +182,29 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">載重</td>
<td style="vertical-align: middle">
<input class="form-control " type="number" name="weight" min="0" value="<?= $row["weight"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="number" name="weight" min="0" value="<?= $row["weight"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">人乘</td>
<td style="vertical-align: middle">
<input class="form-control " type="number" name="numberofpassenger" min="0" value="<?= $row["numberofpassenger"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="number" name="numberofpassenger" min="0" value="<?= $row["numberofpassenger"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">樓停</td>
<td>
<input class="form-control " type="number" name="numberofstop" min="0" value="<?= $row["numberofstop"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="number" name="numberofstop" min="0" value="<?= $row["numberofstop"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">樓層</td>
<td>
<input class="form-control " type="number" name="numberoffloor" min="0" value="<?= $row["numberoffloor"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="number" name="numberoffloor" min="0" value="<?= $row["numberoffloor"]; ?>" <?php echo $update_delete_status; ?>>
</td>
</tr>
<tr>
<td style="vertical-align: middle">機型</td>
<td>
<input class="form-control " type="text" name="facility_kind" value="<?= $row["facility_kind"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="text" name="facility_kind" value="<?= $row["facility_kind"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">開門方式</td>
<td style="vertical-align: middle">
<select class="form-control" name="opentype" <?php echo $yewu; ?>>
<select class="form-control" name="opentype" <?php echo $update_delete_status; ?>>
<option value=""></option>
<?php
foreach ($opendoor_options as $opendoor_option) :
@ -212,7 +219,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</td>
<td style="vertical-align: middle">速度</td>
<td style="vertical-align: middle">
<input class="form-control " type="number" name="speed" min="0" value="<?= $row["speed"]; ?>" <?php echo $yewu; ?>>
<input class="form-control " type="number" name="speed" min="0" value="<?= $row["speed"]; ?>" <?php echo $update_delete_status; ?>>
</td>
<td style="vertical-align: middle">簽核狀況</td>
<td style="vertical-align: middle">
@ -253,6 +260,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<li><a href="#tabs-2">設計確認項</a></li>
<li><a href="#tabs-4">生管確認項</a></li>
<li><a href="#tabs-5">品証確認項</a></li>
<li><a href="#tabs-6">工務助理確認項</a></li>
</ul>
<div id="tabs-3">
<table class="table table-bordered" style="width:100%">
@ -436,182 +444,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
?>
</td>
</tr>
<tr>
<td colspan="4">
預計安裝及試車日程
<br />
(工務助理項目)
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包廠商</td>
<td>
<input id="install_outsourcer_tmp" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="install_outsourcer_date_tmp" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#install_outsourcer_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_install_start_date_tmp" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_start_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_start_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_install_end_date_tmp" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_end_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_end_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包廠商</td>
<td>
<input id="tryrun_outsourcer_tmp" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="tryrun_outsourcer_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="tryrun_outsourcer_date_tmp" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_outsourcer_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="tryrun_outsourcer_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_tryrun_start_date_tmp" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_start_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_tryrun_start_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" id="estimate_tryrun_end_date_tmp" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_end_date_tmp").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_tryrun_end_date_owner_tmp" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td>備註</td>
<td colspan="3">
<textarea class="form-control" id="warehouse_assistant_remark_tmp" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
</td>
</tr>
<tr>
<td colspan="4">
<?php
if (in_array($user_department_id, ['50', '501', '315']) && $role_id == '2')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '312' && $role_id == '3')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '313' && $role_id == '3')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if (in_array($user_department_id, ['311', '314']) && $role_id == '4')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '521' && $role_id == '11')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if (in_array($user_department_id, [220, 531]))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '521' && in_array($role_id, ['9', '12']))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '542' && in_array($role_id, ['5', '6']))
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '544' && $role_id == '3')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '543' && $role_id == '2')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
if ($user_department_id == '545' && $role_id == '6')
echo "<button onclick='saveEstimateInstallData()' type='button' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
?>
</td>
</tr>
<tr>
<td colspan="4">
實際安裝及試車日程
@ -1365,7 +1197,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
<tr>
<td style="vertical-align: middle">實際出貨日(到工地)</td>
<td>
<input class="form-control " type="date" id="real_arrival_date_tmp" value="<?= $row['real_arrival_date']; ?>" <?php echo $shengguan; ?>>
<input class="form-control " type="date" id="real_arrival_date_tmp" value="<?= SUBSTR($row['real_arrival_date'], 0, 10); ?>" <?php echo $shengguan; ?>>
</td>
<td colspan="4">
<button onclick="updateRealArrivalDate()" type="button" class="btn btn-primary btn-lg pull-right" style="margin-left:3px;" <?php echo $shengguan; ?>>出貨日調整</button>
@ -1456,6 +1288,174 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
</tbody>
</table>
</div>
<div id="tabs-6">
<table class="table table-bordered" style="width:100%">
<tr>
<td colspan="4">
預計安裝及試車日程
<br />
(工務助理項目)
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包廠商</td>
<td>
<input name="install_outsourcer" id="install_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['install_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_owner" name="install_outsourcer_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">安裝發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="install_outsourcer_date" id="install_outsourcer_date" value="<?= $row['install_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#install_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="install_outsourcer_date_owner" name="install_outsourcer_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['install_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_start_date" id="estimate_install_start_date" value="<?= $row['estimate_install_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_start_date_owner" name="estimate_install_start_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計安裝完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_install_end_date" id="estimate_install_end_date" value="<?= $row['estimate_install_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_install_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_install_end_date_owner" name="estimate_install_end_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_install_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包廠商</td>
<td>
<input name="tryrun_outsourcer" id="tryrun_outsourcer" class="form-control disabled_select" type="text" value="<?php echo $row['tryrun_outsourcer']; ?>" <?= $warehouse2; ?> />
</td>
<td style="vertical-align: middle;">確認人</td>
<td>
<select class="disabled_select" id="tryrun_outsourcer_owner" name="tryrun_outsourcer_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">試車發包日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="tryrun_outsourcer_date" id="tryrun_outsourcer_date" value="<?= $row['tryrun_outsourcer_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#tryrun_outsourcer_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" name="tryrun_outsourcer_date_owner" id="tryrun_outsourcer_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['tryrun_outsourcer_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車開工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_start_date" id="estimate_tryrun_start_date" value="<?= $row['estimate_tryrun_start_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_start_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" id="estimate_tryrun_start_date_owner" name="estimate_tryrun_start_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_start_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td style="vertical-align: middle">預計試車完工日</td>
<td style="vertical-align: middle">
<div class="input-group">
<input class="form-control" type="date" name="estimate_tryrun_end_date" id="estimate_tryrun_end_date" value="<?= $row['estimate_tryrun_end_date']; ?>" <?= $warehouse2; ?>>
<span class="input-group-btn">
<button class="btn btn-default" type='button' onclick='$("#estimate_tryrun_end_date").val("");' <?= $warehouse2; ?>>清除</button>
</span>
</div>
</td>
<td style="vertical-align: middle">確認人</td>
<td>
<select class="disabled_select" name="estimate_tryrun_end_date_owner" id="estimate_tryrun_end_date_owner" disabled>
<option value="">請選擇</option>
<?php echo getSelectOptionHtml($all_users_options, $row['estimate_tryrun_end_date_owner']); ?>
</select>
</td>
</tr>
<tr>
<td>備註</td>
<td colspan="3">
<textarea class="form-control" name="warehouse_assistant_remark" id="warehouse_assistant_remark" <?= $warehouse2; ?>><?php echo $row['warehouse_assistant_remark']; ?></textarea>
</td>
</tr>
<tr>
<td style="vertical-align: middle;">安裝圖附件</td>
<td colspan="5" style="vertical-align: middle;">
<input style="width:70%;display:inline;" type="file" name="plan_diagram_file" <?= $warehouse2; ?>>
<?php
echo !empty($row['plan_diagram_file']) ? "<a id='plan_diagram_file_a' style='color:#00F;' href='" . $row['plan_diagram_file'] . "' target='_blank'>下載附件</a>" : "";
?>
</td>
</tr>
<tr>
<td colspan="4">
<?php
if (getSaveEstimateInstallData($user_department_id, $role_id))
echo "<button type='button' onclick='savedata()' class='btn btn-primary btn-lg pull-right' style='margin-left:3px;'>存檔</button>";
?>
</td>
</tr>
</table>
</div>
</div>
</form>
<form method="post" id="assign_form" enctype="multipart/form-data">
@ -1488,26 +1488,7 @@ 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" name='form_name' value="update_date_form" />
</form>
<form method="post" id="update_estimate_install_date_form" enctype="multipart/form-data">
<input type="hidden" id="install_outsourcer" name='install_outsourcer' value="<?php echo $row['install_outsourcer']; ?>" />
<input type="hidden" id="install_outsourcer_owner" name='install_outsourcer_owner' value="<?php echo $row['install_outsourcer_owner']; ?>" />
<input type="hidden" id="install_outsourcer_date" name='install_outsourcer_date' value="<?php echo $row['install_outsourcer_date']; ?>" />
<input type="hidden" id="install_outsourcer_date_owner" name='install_outsourcer_date_owner' value="<?php echo $row['install_outsourcer_date_owner']; ?>" />
<input type="hidden" id="estimate_install_start_date" name='estimate_install_start_date' value="<?php echo $row['estimate_install_start_date']; ?>" />
<input type="hidden" id="estimate_install_start_date_owner" name='estimate_install_start_date_owner' value="<?php echo $row['estimate_install_start_date_owner']; ?>" />
<input type="hidden" id="estimate_install_end_date" name='estimate_install_end_date' value="<?php echo $row['estimate_install_end_date']; ?>" />
<input type="hidden" id="estimate_install_end_date_owner" name='estimate_install_end_date_owner' value="<?php echo $row['estimate_install_end_date_owner']; ?>" />
<input type="hidden" id="tryrun_outsourcer" name='tryrun_outsourcer' value="<?php echo $row['tryrun_outsourcer']; ?>" />
<input type="hidden" id="tryrun_outsourcer_owner" name='tryrun_outsourcer_owner' value="<?php echo $row['tryrun_outsourcer_owner']; ?>" />
<input type="hidden" id="tryrun_outsourcer_date" name='tryrun_outsourcer_date' value="<?php echo $row['tryrun_outsourcer_date']; ?>" />
<input type="hidden" id="tryrun_outsourcer_date_owner" name='tryrun_outsourcer_date_owner' value="<?php echo $row['tryrun_outsourcer_date_owner']; ?>" />
<input type="hidden" id="estimate_tryrun_start_date" name='estimate_tryrun_start_date' value="<?php echo $row['estimate_tryrun_start_date']; ?>" />
<input type="hidden" id="estimate_tryrun_start_date_owner" name='estimate_tryrun_start_date_owner' value="<?php echo $row['estimate_tryrun_start_date_owner']; ?>" />
<input type="hidden" id="estimate_tryrun_end_date" name='estimate_tryrun_end_date' value="<?php echo $row['estimate_tryrun_end_date']; ?>" />
<input type="hidden" id="estimate_tryrun_end_date_owner" name='estimate_tryrun_end_date_owner' value="<?php echo $row['estimate_tryrun_end_date_owner']; ?>" />
<input type="hidden" id="warehouse_assistant_remark" name='warehouse_assistant_remark' value="<?php echo $row['warehouse_assistant_remark']; ?>" />
<input type="hidden" name='form_name' value="update_estimate_install_date_form" />
</form>
<form method="post" id="update_install_date_form" enctype="multipart/form-data">
<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']; ?>" />
@ -1597,15 +1578,22 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
$("#arrival_date_verify_tmp,#actual_tofactory_date_tmp").on("change", function() {
$("#arrival_date_owner_tmp").val("<?php echo $user_id; ?>");
});
var oursourcer_input_arr = [
'install_outsourcer',
'install_outsourcer_date',
'install_start_date',
'install_end_date',
'tryrun_outsourcer',
'tryrun_outsourcer_date',
'tryrun_start_date',
'tryrun_end_date',
]
for (var i = 0; i < oursourcer_input_arr.length; i++) {
inputChangeOutsourcer(oursourcer_input_arr[i]);
}
var oursourcer_input_arr = [
'install_outsourcer',
'install_outsourcer_date',
'tryrun_outsourcer',
'tryrun_outsourcer_date',
'estimate_install_outsourcer',
'estimate_install_start_date',
'estimate_install_end_date',
@ -1614,7 +1602,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
'estimate_tryrun_end_date',
]
for (var i = 0; i < oursourcer_input_arr.length; i++) {
inputChangeOutsourcer(oursourcer_input_arr[i]);
inputChangeOutsourcer2(oursourcer_input_arr[i]);
}
});
@ -1632,6 +1620,12 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
});
}
function inputChangeOutsourcer2(input_name) {
$("#" + input_name).on("change", function() {
$("#" + input_name + "_owner").val("<?php echo $user_id; ?>");
});
}
function formatDate() {
var timestamp = Date.now();
var date = new Date(timestamp);

4
wms/wipwhole-renovate-rec-invoice.php

@ -808,11 +808,11 @@ if ($department_id == "321" || $department_id == "220") {
</td>
<td style="vertical-align: middle">合約交期<br />(到工地)</td>
<td>
<input class="form-control " type="datetime-local" id="contract_arrival_date" name="contract_arrival_date" value="<?php echo $contract_arrival_date; ?>">
<input class="form-control " type="date" id="contract_arrival_date" name="contract_arrival_date" value="<?php echo $contract_arrival_date; ?>">
</td>
<td style="vertical-align: middle">預計交期<br />(到工地)</td>
<td>
<input class="form-control " type="datetime-local" id="real_contract_arrival_date" name="real_contract_arrival_date" value="<?php echo $real_contract_arrival_date; ?>">
<input class="form-control " type="date" id="real_contract_arrival_date" name="real_contract_arrival_date" value="<?php echo $real_contract_arrival_date; ?>">
</td>
</tr>
<tr>

34
wms/wipwholeinstall-index-function.php

@ -5,6 +5,7 @@ function getWipwholestatusData($link, $id)
$db_query = "
SELECT * FROM wipwholestatus
WHERE id='$id'
AND status = '1'
";
$receivabledata = mysqli_query($link, $db_query);
return mysqli_fetch_array($receivabledata, MYSQLI_ASSOC);
@ -160,6 +161,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -171,6 +173,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -182,6 +185,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
@ -194,6 +198,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
@ -206,6 +211,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
@ -218,6 +224,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -229,6 +236,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東')
@ -250,6 +258,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -260,6 +269,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -270,6 +280,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -280,6 +291,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -290,6 +302,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -300,7 +313,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus $sql_cmd
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND status = '1' AND contract_type = '$contract_type' " : " AND status = '1' AND contract_type = '$contract_type'";
$sql .= getWipwholeSearchSql();
$sql .= "ORDER BY real_contract_arrival_date DESC ";
}
@ -318,6 +331,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -329,6 +343,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('宜蘭')
@ -341,6 +356,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
@ -353,6 +369,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
@ -365,6 +382,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
@ -377,6 +395,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -406,6 +425,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= "
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -433,6 +453,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -453,6 +474,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -473,6 +495,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -493,6 +516,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -513,6 +537,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -533,6 +558,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -629,6 +655,7 @@ function checkYingYeok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -649,6 +676,7 @@ function checkSheJiok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -666,6 +694,7 @@ function checkSheJiokLeader($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -683,6 +712,7 @@ function checkGongWuok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -706,6 +736,7 @@ function checkShengGuanok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -737,6 +768,7 @@ function getGongWuokNo($link)
SUBSTR(address,1,2)
FROM `wipwholestatus`
WHERE id = '$id'
AND status = '1'
";
$result = mysqli_query($link, $sql);
$row = mysqli_fetch_array($result);

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

@ -1,25 +1,23 @@
<table id="table_index2" class="table table-striped table-bordered" style="width:98.5%">
<thead>
<tr>
<!-- <th style="vertical-align: middle;text-align:center;">合約號</th> -->
<th style="vertical-align: middle;text-align:center;">電梯編號</th>
<th style="vertical-align: middle;text-align:center;">客戶姓名</th>
<th style="vertical-align: middle;text-align:center;">合約地址</th>
<th style="vertical-align: middle;text-align:center;">地工地址</th>
<th style="vertical-align: middle;text-align:center;">預計出貨日</th>
<!-- <th style="vertical-align: middle;text-align:center;">工勘狀態</th> -->
<th style="vertical-align: middle;text-align:center;">發包廠商(工勘)</th>
<th style="vertical-align: middle;text-align:center;">發包日期(工勘)</th>
<th style="vertical-align: middle;text-align:center;">預計開工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">實際開工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">預計完工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">實際完工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">QC日(品證)</th>
<th style="vertical-align: middle;text-align:center;">QC合格日(品證)</th>
<th style="vertical-align: middle;text-align:center;">官檢日(品證)</th>
<th style="vertical-align: middle;text-align:center;">移交日(營業)</th>
<th style="vertical-align: middle;text-align:center;">營業人員</th>
<th style="vertical-align: middle;text-align:center;">編輯</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: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>
<th style="vertical-align: middle;text-align:center;width:140px;">實際完工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;width:140px;">QC日(品證)</th>
<th style="vertical-align: middle;text-align:center;width:140px;">QC合格日(品證)</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:120px;">營業人員</th>
<th style="vertical-align: middle;text-align:center;width:120px;">編輯</th>
</tr>
</thead>
<tbody>
@ -77,7 +75,7 @@
if (!empty($data['install_outsourcer']))
echo "安裝:" . $data['install_outsourcer'];
if (!empty($data['tryrun_outsourcer']))
echo "試車:" . $data['tryrun_outsourcer'];
echo "<br/>試車:" . $data['tryrun_outsourcer'];
}
?>
</td>
@ -102,7 +100,7 @@
} else {
if (!empty($data['estimate_install_start_date']))
echo date("Y/m/d", strtotime($data['estimate_install_start_date'])) . "<br/> ";
if (!empty($data['estimate_ryrun_start_date']))
if (!empty($data['estimate_tryrun_start_date']))
echo " <br/>" . date("Y/m/d", strtotime($data['estimate_tryrun_start_date']));
}
?>

48
wms/wipwholeinstall-index.php

@ -177,10 +177,23 @@ foreach ($dataArr as $key => $val) {
// 結束連線
mysqli_close($link);
?>
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script>
<link href="/wms/css/select2.min.css" rel="stylesheet" />
<script src="/wms/css/select2.min.js"></script>
<script src="/wms/css/dataTables.fixedColumns.min.js"></script>
<style>
.dataTables_scrollHead .dataTable {
margin-bottom: -2px;
}
.dataTables_scrollBody .dataTable {
margin-bottom: 0;
}
table {
margin-left: 0px;
}
</style>
<script>
// 設定 select2 (下拉式選單)
$(document).ready(function() {
$('#site_survey_contact_verify').select2();
@ -250,6 +263,9 @@ mysqli_close($link);
// 設置 datatable.js
$('#table_index2').DataTable({
scrollX: true,
fixedHeader: true,
scrollY: 500,
"language": {
"emptyTable": "無資料...",
"processing": "處理中...",
@ -295,12 +311,27 @@ mysqli_close($link);
var showNum = <?php echo empty($_GET['showNum']) ? '10' : $_GET['showNum']; ?>;
var nowPage = <?php echo empty($_GET['nowPage']) ? '1' : $_GET['nowPage']; ?>;
var searchContent = "<?php echo empty($_GET['searchContent']) ? '' : $_GET['searchContent']; ?>";
var orderColumn = "<?php echo empty($_GET['orderColumn']) ? '' : $_GET['orderColumn']; ?>";
var orderDirection = "<?php echo empty($_GET['orderDirection']) ? '' : $_GET['orderDirection']; ?>";
var table = $('#table_index2').DataTable();
// 设置排序信息
if (orderColumn !== '' && orderDirection !== '') {
table.order([orderColumn, orderDirection]).draw();
}
table.search(searchContent).draw();
table.page.len(showNum).draw();
table.page((nowPage) - 1).draw('page');
// 監聽排序
table.on('order.dt', function() {
var order = table.order();
orderColumn = order[0][0];
orderDirection = order[0][1];
});
// 監聽頁碼
table.on('page.dt', function() {
searchDatatable(table);
@ -320,10 +351,11 @@ mysqli_close($link);
showNum = table.page.len();
nowPage = table.page.info().page + 1;
searchContent = table.search();
window.location.href = "<?php echo "wipwholeinstall-index.php?function_name=wipinstallrenovate&$token_link"; ?>"
+ "&showNum=" + showNum + "&nowPage=" + nowPage + "&searchContent=" + searchContent
+ "&contractno=" + contractno + "&facilityno=" + facilityno + "&custom=" + custom
+ "&site_survey_contact_verify=" + site_survey_contact_verify + "&real_arrival_date_start=" + real_arrival_date_start
+ "&real_arrival_date_end=" + real_arrival_date_end + "&area_no=" + area_no;
window.location.href = "<?php echo "wipwholeinstall-index.php?function_name=wipinstall&$token_link"; ?>" +
"&showNum=" + showNum + "&nowPage=" + nowPage + "&searchContent=" + searchContent +
"&orderColumn=" + orderColumn + "&orderDirection=" + orderDirection +
"&contractno=" + contractno + "&facilityno=" + facilityno + "&custom=" + custom +
"&site_survey_contact_verify=" + site_survey_contact_verify + "&real_arrival_date_start=" + real_arrival_date_start +
"&real_arrival_date_end=" + real_arrival_date_end + "&area_no=" + area_no;
}
</script>

34
wms/wipwholeinstall-renovate-index-function.php

@ -5,6 +5,7 @@ function getWipwholestatusData($link, $id)
$db_query = "
SELECT * FROM wipwholestatus
WHERE id='$id'
AND status = '1'
";
$receivabledata = mysqli_query($link, $db_query);
return mysqli_fetch_array($receivabledata, MYSQLI_ASSOC);
@ -160,6 +161,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -171,6 +173,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -182,6 +185,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
@ -194,6 +198,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
@ -206,6 +211,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
@ -218,6 +224,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -229,6 +236,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東')
@ -249,6 +257,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -259,6 +268,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -269,6 +279,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -279,6 +290,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -289,6 +301,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -300,7 +313,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus $sql_cmd
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND status = '1' AND contract_type = '$contract_type' " : "AND status = '1' AND contract_type = '$contract_type'";
$sql .= getWipwholeSearchSql();
$sql .= "ORDER BY real_contract_arrival_date DESC ";
}
@ -318,6 +331,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date ASC
@ -329,6 +343,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('宜蘭')
@ -341,6 +356,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
@ -353,6 +369,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
@ -365,6 +382,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
@ -377,6 +395,7 @@ function getDataSql($department_id, $role_id, $user_id)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
ORDER BY real_contract_arrival_date DESC
@ -401,6 +420,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
";
$sql .= empty($sql_cmd) ? " WHERE 1=1 AND contract_type = '$contract_type' " : " AND contract_type = '$contract_type'";
$sql .= "
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -428,6 +448,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
AND id IN (
SELECT
@ -448,6 +469,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -468,6 +490,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -488,6 +511,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -508,6 +532,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -528,6 +553,7 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id IN (
SELECT
form_id AS id
@ -624,6 +650,7 @@ function checkYingYeok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -644,6 +671,7 @@ function checkSheJiok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -661,6 +689,7 @@ function checkSheJiokLeader($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -678,6 +707,7 @@ function checkGongWuok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -701,6 +731,7 @@ function checkShengGuanok($link, $id)
) AS sum_num
FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND id = '$id'
";
$result = mysqli_query($link, $sql);
@ -732,6 +763,7 @@ function getGongWuokNo($link)
SUBSTR(address,1,2)
FROM `wipwholestatus`
WHERE id = '$id'
AND status = '1'
";
$result = mysqli_query($link, $sql);
$row = mysqli_fetch_array($result);

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

@ -2,24 +2,23 @@
<thead>
<tr>
<th style="vertical-align: middle;text-align:center;width:70px;"><span id="th_1">汰改<br />種類</span></th>
<th style="vertical-align: middle;text-align:center;">電梯編號</th>
<th style="vertical-align: middle;text-align:center;">客戶姓名</th>
<th style="vertical-align: middle;text-align:center;">合約地址</th>
<th style="vertical-align: middle;text-align:center;">地工地址</th>
<th style="vertical-align: middle;text-align:center;">預計出貨日</th>
<!-- <th style="vertical-align: middle;text-align:center;">工勘狀態</th> -->
<th style="vertical-align: middle;text-align:center;">發包廠商(工勘)</th>
<th style="vertical-align: middle;text-align:center;">發包日期(工勘)</th>
<th style="vertical-align: middle;text-align:center;">預計開工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">實際開工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">預計完工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">實際完工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;">QC日(品證)</th>
<th style="vertical-align: middle;text-align:center;">QC合格日(品證)</th>
<th style="vertical-align: middle;text-align:center;">官檢日(品證)</th>
<th style="vertical-align: middle;text-align:center;">移交日(營業)</th>
<th style="vertical-align: middle;text-align:center;">營業人員</th>
<th style="vertical-align: middle;text-align:center;">編輯</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: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>
<th style="vertical-align: middle;text-align:center;width:140px;">實際完工日(工勘)</th>
<th style="vertical-align: middle;text-align:center;width:140px;">QC日(品證)</th>
<th style="vertical-align: middle;text-align:center;width:140px;">QC合格日(品證)</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:120px;">營業人員</th>
<th style="vertical-align: middle;text-align:center;width:120px;">編輯</th>
</tr>
</thead>
<tbody>
@ -59,7 +58,7 @@
if (!empty($data['install_outsourcer']))
echo "安裝:" . $data['install_outsourcer'];
if (!empty($data['tryrun_outsourcer']))
echo "試車:" . $data['tryrun_outsourcer'];
echo "<br/>試車:" . $data['tryrun_outsourcer'];
}
?>
</td>
@ -84,7 +83,7 @@
} else {
if (!empty($data['estimate_install_start_date']))
echo date("Y/m/d", strtotime($data['estimate_install_start_date'])) . "<br/> ";
if (!empty($data['estimate_ryrun_start_date']))
if (!empty($data['estimate_tryrun_start_date']))
echo " <br/>" . date("Y/m/d", strtotime($data['estimate_tryrun_start_date']));
}
?>

71
wms/wipwholeinstall-renovate-index.php

@ -177,8 +177,22 @@ foreach ($dataArr as $key => $val) {
// 結束連線
mysqli_close($link);
?>
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<link href="/wms/css/select2.min.css" rel="stylesheet" />
<script src="/wms/css/select2.min.js"></script>
<script src="/wms/css/dataTables.fixedColumns.min.js"></script>
<style>
.dataTables_scrollHead .dataTable {
margin-bottom: -2px;
}
.dataTables_scrollBody .dataTable {
margin-bottom: 0;
}
table {
margin-left: 0px;
}
</style>
<script>
$(document).ready(function() {
$('#site_survey_contact_verify').select2();
@ -243,36 +257,10 @@ mysqli_close($link);
document.getElementById("myForm").submit();
}
$('#table_index2,#table_index3,#table_index4,#table_index5,#table_index6,#table_index7').DataTable({
// "columns": [
// {"width": "10"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// {"width": "5.5%"},
// ],
// columnDefs: [{
// width: 200,
// targets: 0
// }],
// fixedColumns: true,
// paging: false,
// scrollCollapse: true,
// scrollX: true,
// scrollY: 300,
$('#table_index2').DataTable({
scrollX: true,
fixedHeader: true,
scrollY: 500,
"language": {
"emptyTable": "無資料...",
"processing": "處理中...",
@ -318,12 +306,27 @@ mysqli_close($link);
var showNum = <?php echo empty($_GET['showNum']) ? '10' : $_GET['showNum']; ?>;
var nowPage = <?php echo empty($_GET['nowPage']) ? '1' : $_GET['nowPage']; ?>;
var searchContent = "<?php echo empty($_GET['searchContent']) ? '' : $_GET['searchContent']; ?>";
var orderColumn = "<?php echo empty($_GET['orderColumn']) ? '' : $_GET['orderColumn']; ?>";
var orderDirection = "<?php echo empty($_GET['orderDirection']) ? '' : $_GET['orderDirection']; ?>";
var table = $('#table_index2').DataTable();
// 设置排序信息
if (orderColumn !== '' && orderDirection !== '') {
table.order([orderColumn, orderDirection]).draw();
}
table.search(searchContent).draw();
table.page.len(showNum).draw();
table.page((nowPage) - 1).draw('page');
// 監聽排序
table.on('order.dt', function() {
var order = table.order();
orderColumn = order[0][0];
orderDirection = order[0][1];
});
// 監聽頁碼
table.on('page.dt', function() {
searchDatatable(table);
@ -343,8 +346,12 @@ mysqli_close($link);
showNum = table.page.len();
nowPage = table.page.info().page + 1;
searchContent = table.search();
var order = table.order();
orderColumn = order[0][0]; // 获取排序的列索引
orderDirection = order[0][1]; // 获取排序的方向
window.location.href = "<?php echo "wipwholeinstall-renovate-index.php?function_name=wipinstall&$token_link"; ?>" +
"&showNum=" + showNum + "&nowPage=" + nowPage + "&searchContent=" + searchContent +
"&orderColumn=" + orderColumn + "&orderDirection=" + orderDirection +
"&contractno=" + contractno + "&facilityno=" + facilityno + "&custom=" + custom +
"&site_survey_contact_verify=" + site_survey_contact_verify + "&real_arrival_date_start=" + real_arrival_date_start +
"&real_arrival_date_end=" + real_arrival_date_end + "&area_no=" + area_no;

Loading…
Cancel
Save