You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
197 lines
7.6 KiB
197 lines
7.6 KiB
<!doctype html>
|
|
<html lang="en">
|
|
|
|
<?php
|
|
|
|
include "include-session-security.php";
|
|
require_once "db/database.php";
|
|
|
|
/**
|
|
* 員工編號轉姓名
|
|
* @return array
|
|
*/
|
|
function accountidToName($accountid)
|
|
{
|
|
global $link;
|
|
|
|
$name = "";
|
|
$sql = "select name from account where accountid = '$accountid' ";
|
|
$res = mysqli_query($link, $sql);
|
|
while ($row = mysqli_fetch_row($res)) {
|
|
$name = $row[0];
|
|
}
|
|
mysqli_free_result($res);
|
|
return $name;
|
|
}
|
|
|
|
|
|
foreach ($_POST as $k => $v) {
|
|
if ($k !== 'desin_taiwan_items_no' && $k !== 'desin_taiwan_items_name')
|
|
$$k = htmlspecialchars(stripslashes(trim($v)));
|
|
}
|
|
|
|
|
|
// 號機
|
|
$facility_temp_no = $_POST['facility_temp_no'];
|
|
//楼高通报
|
|
$building_heigh_verify = $_POST['building_heigh_verify'];
|
|
$building_heigh_verify_at = $_POST['building_heigh_verify_at'];
|
|
$building_heigh_verify_owner = $_POST['building_heigh_verify_owner'];
|
|
//工勘
|
|
$site_survey_contact_verify = $_POST['site_survey_contact_verify'];
|
|
$site_survey_contact_verify_at = $_POST['site_survey_contact_verify_at'];
|
|
$site_survey_contact_verify_owner = $_POST['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'];
|
|
$install_start_date = $_POST['install_start_date'];
|
|
$install_start_date_owner = $_POST['install_start_date_owner'];
|
|
$install_end_date = $_POST['install_end_date'];
|
|
$install_end_date_owner = $_POST['install_end_date_owner'];
|
|
$tryrun_start_date = $_POST['tryrun_start_date'];
|
|
$tryrun_start_date_owner = $_POST['tryrun_start_date_owner'];
|
|
$tryrun_end_date = $_POST['tryrun_end_date'];
|
|
$tryrun_end_date_owner = $_POST['tryrun_end_date_owner'];
|
|
|
|
// 各部門備註
|
|
$warehouse_remark = $_POST['warehouse_remark'];
|
|
|
|
|
|
$creater = $_POST['creater'];
|
|
$create_at = $_POST['create_at'];
|
|
|
|
// 上傳附件
|
|
$building_heigh_verify_file = fileIUpload("building_heigh_verify_file");
|
|
$site_survey_contact_verify_file = fileIUpload("site_survey_contact_verify_file");
|
|
|
|
function fileIUpload($post_name)
|
|
{
|
|
if ($_FILES[$post_name]["error"] == 0) {
|
|
if(!empty($_FILES[$post_name]["name"])){
|
|
$datetime = date("YmdHis");
|
|
$file_name = str_replace("#", "", $_FILES[$post_name]["name"]);
|
|
$temp_file_name = $_FILES[$post_name]["tmp_name"];
|
|
$target_dir = empty($file_name) ? "" : "../wms/public-wipwhole/";
|
|
$sales_spec_verify_file = strtolower($target_dir . basename($datetime . $file_name));
|
|
if (file_exists($sales_spec_verify_file))
|
|
unlink($sales_spec_verify_file);
|
|
move_uploaded_file($temp_file_name, $sales_spec_verify_file);
|
|
return strtolower($target_dir . basename($datetime . $file_name));
|
|
}else{
|
|
return "";
|
|
}
|
|
} else {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
$sql_query = "
|
|
UPDATE wipwholestatus
|
|
SET
|
|
facility_temp_no = '$facility_temp_no',
|
|
building_heigh_verify = '$building_heigh_verify',
|
|
building_heigh_verify_at = '$building_heigh_verify_at',
|
|
building_heigh_verify_owner = '$building_heigh_verify_owner',
|
|
site_survey_contact_verify = '$site_survey_contact_verify',
|
|
site_survey_contact_verify_at = '$site_survey_contact_verify_at',
|
|
site_survey_contact_verify_owner = '$site_survey_contact_verify_owner',
|
|
warehouse_remark = '',
|
|
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',
|
|
install_start_date = '$install_start_date',
|
|
install_start_date_owner = '$install_start_date_owner',
|
|
install_end_date = '$install_end_date',
|
|
install_end_date_owner = '$install_end_date_owner',
|
|
tryrun_start_date = '$tryrun_start_date',
|
|
tryrun_start_date_owner = '$tryrun_start_date_owner',
|
|
tryrun_end_date = '$tryrun_end_date',
|
|
tryrun_end_date_owner = '$tryrun_end_date_owner',
|
|
";
|
|
if (!empty(trim($warehouse_remark))) {
|
|
$sql_query .= "
|
|
all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $create_at . "<br/>" . $warehouse_remark . "<br/><br/>',IF(all_remark IS NULL,'',all_remark)),
|
|
";
|
|
}
|
|
if (!empty($building_heigh_verify_file))
|
|
$sql_query .= "building_heigh_verify_file = '$building_heigh_verify_file', ";
|
|
if (!empty($site_survey_contact_verify_file))
|
|
$sql_query .= "site_survey_contact_verify_file = '$site_survey_contact_verify_file', ";
|
|
|
|
$sql_query .= "
|
|
creater = '$creater',
|
|
create_at = '$create_at'
|
|
WHERE id = '$id'
|
|
";
|
|
// echo $sql_query;
|
|
// exit;
|
|
mysqli_query($link, $sql_query);
|
|
$data = mysqli_query($link, $sql_query);
|
|
|
|
|
|
|
|
include "include-header.php";
|
|
?>
|
|
|
|
<body class="bg-white">
|
|
<div id="loader">
|
|
<div class="spinner-border text-primary" role="status"></div>
|
|
</div>
|
|
<div class="appHeader no-border transparent position-absolute">
|
|
<div class="pageTitle"></div>
|
|
</div>
|
|
<div id="appCapsule">
|
|
<div class="alert alert-primary alert-dismissible fade show" role="alert">
|
|
<h4 class="alert-title">提交成功!</h4>
|
|
<button type="button" class="close" data-dismiss="alert">
|
|
<ion-icon name="close-outline"></ion-icon>
|
|
</button>
|
|
</div>
|
|
<div class="login-form">
|
|
<div class="section">
|
|
<h4></h4>
|
|
<!-- <button type="button" class="btn btn-primary mr-1 mb-1 goBack">返回</button> -->
|
|
<button type="button" class="btn btn-primary mr-1 mb-1 goBack">返回</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
include "include-footer.php";
|
|
mysqli_close($link);
|
|
?>
|
|
|
|
<?php
|
|
include "include-jsfiles.php";
|
|
?>
|
|
|
|
</body>
|
|
|
|
</html>
|