|
@ -1,10 +1,11 @@ |
|
|
<?php |
|
|
<?php |
|
|
// ini_set('display_errors', 'on'); |
|
|
// ini_set('display_errors', 'on'); |
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
include("class/Cnotice.php"); |
|
|
|
|
|
$cn = new Cnotice(); |
|
|
|
|
|
if ($_POST['form_name'] == 'main_form') { |
|
|
if ($_POST['form_name'] == 'main_form') { |
|
|
|
|
|
include "class/Cnotice.php"; |
|
|
|
|
|
include "./class/Cmail.php"; |
|
|
|
|
|
$cmail = new Cmail(); |
|
|
|
|
|
$cn = new Cnotice(); |
|
|
foreach ($_POST as $k => $v) { |
|
|
foreach ($_POST as $k => $v) { |
|
|
if ($k !== 'renovate_type' && $k !== 'desin_taiwan_items_no' && $k !== 'desin_taiwan_items_name') |
|
|
if ($k !== 'renovate_type' && $k !== 'desin_taiwan_items_no' && $k !== 'desin_taiwan_items_name') |
|
|
$$k = htmlspecialchars(stripslashes(trim($v))); |
|
|
$$k = htmlspecialchars(stripslashes(trim($v))); |
|
@ -285,23 +286,57 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
$cn->sendx($data); |
|
|
$cn->sendx($data); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!empty($delivery_date)) { |
|
|
if (!empty($delivery_date)) { |
|
|
if ($delivery_date !== $old_delivery_date) { |
|
|
if ($delivery_date !== $old_delivery_date) { |
|
|
$permission = "M0168"; |
|
|
$permission_arr = ['M0168', 'M0012']; |
|
|
$title = "移交日變更 客戶:$custom 作番:$facilityno"; |
|
|
foreach ($permission_arr as $permission) { |
|
|
$content = "客戶:$custom |
|
|
// $permission = "M0168"; |
|
|
|
|
|
$title = "移交日變更 客戶:$custom 作番:$facilityno"; |
|
|
|
|
|
$content = "客戶:$custom |
|
|
作番:$facilityno |
|
|
作番:$facilityno |
|
|
移交日 $old_delivery_date => $delivery_date"; |
|
|
移交日 $old_delivery_date => $delivery_date"; |
|
|
$data = array( |
|
|
$data = array( |
|
|
'kind' => 1, |
|
|
'kind' => 1, |
|
|
'related_id' => $id, |
|
|
'related_id' => $id, |
|
|
'title' => $title, |
|
|
'title' => $title, |
|
|
'content' => $content, |
|
|
'content' => $content, |
|
|
'permission' => $permission, |
|
|
'permission' => $permission, |
|
|
'creater' => $creater, |
|
|
'creater' => $creater, |
|
|
'create_at' => date("Y-m-d H:i:s") |
|
|
'create_at' => date("Y-m-d H:i:s") |
|
|
|
|
|
); |
|
|
|
|
|
$cn->sendx($data); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($delivery_date)) { |
|
|
|
|
|
if ($old_delivery_date !== $delivery_date) { |
|
|
|
|
|
|
|
|
|
|
|
if (empty($change_all_contractno)) { |
|
|
|
|
|
$mail_title = "作番大日程(汰改)合約號:" . $contractno . "-移交日變更通知"; |
|
|
|
|
|
$mail_content = "作番大日程(汰改) |
|
|
|
|
|
合約號:" . $contractno |
|
|
|
|
|
. " |
|
|
|
|
|
移交日:" . $old_delivery_date . " => " . $delivery_date; |
|
|
|
|
|
} else { |
|
|
|
|
|
$mail_title = "作番大日程(汰改)合約號:" . $contractno . "作番號:" . $facilityno . "-移交日變更通知"; |
|
|
|
|
|
$mail_content = "作番大日程(汰改) |
|
|
|
|
|
合約號:" . $contractno |
|
|
|
|
|
. " |
|
|
|
|
|
作番號:" . $facilityno |
|
|
|
|
|
. " |
|
|
|
|
|
移交日:" . $old_delivery_date . " => " . $delivery_date; |
|
|
|
|
|
} |
|
|
|
|
|
$cmail->sendx( |
|
|
|
|
|
$mail_title, |
|
|
|
|
|
$mail_content, |
|
|
|
|
|
[ |
|
|
|
|
|
[$salesname, $salesmail] |
|
|
|
|
|
// ['gary', 'gary_chen@masada.com.tw'] |
|
|
|
|
|
], |
|
|
|
|
|
"永佳捷科技" |
|
|
); |
|
|
); |
|
|
$cn->sendx($data); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -522,84 +557,81 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|| in_array($user_department_id, [521, 531, 541, 542, 543, 544, 545]) |
|
|
|| in_array($user_department_id, [521, 531, 541, 542, 543, 544, 545]) |
|
|
) { |
|
|
) { |
|
|
|
|
|
|
|
|
// $outsourcer_type = $_POST['outsourcer_type']; |
|
|
$outsourcer_type = isset($_POST['outsourcer_type']) ? $_POST['outsourcer_type'] : $outsourcer_type; |
|
|
// $qc_official_type = $_POST['qc_official_type2'] ?: $row['qc_official_type']; |
|
|
$qc_official_type = isset($_POST['qc_official_type2']) ? $_POST['qc_official_type2'] : $qc_official_type; |
|
|
// $qc_date = $_POST['qc_date2'] ?: $row['qc_date']; |
|
|
$qc_date = isset($_POST['qc_date2']) ? $_POST['qc_date2'] : $qc_date; |
|
|
// $qc_date_owner = $_POST['qc_date2_owner'] ?: $row['qc_date_owner']; |
|
|
$qc_date_owner = isset($_POST['qc_date2_owner']) ? $_POST['qc_date2_owner'] : $qc_date_owner; |
|
|
// $end_qc_date = $_POST['end_qc_date2'] ?: $row['end_qc_date']; |
|
|
|
|
|
// $end_qc_date_owner = $_POST['end_qc_date2_owner'] ?: $row['end_qc_date_owner']; |
|
|
|
|
|
// $official_check_date = $_POST['official_check_date2'] ?: $row['official_check_date']; |
|
|
|
|
|
// $old_official_check_date = $_POST['old_official_check_date2'] ?: $row['old_official_check_date']; |
|
|
|
|
|
// $official_check_date_owner = $_POST['official_check_date2_owner'] ?: $row['official_check_date_owner']; |
|
|
|
|
|
// $delivery_date = $_POST['delivery_date2'] ?: $row['delivery_date']; |
|
|
|
|
|
// $delivery_date_owner = $_POST['delivery_date2_owner'] ?: $row['delivery_date_owner']; |
|
|
|
|
|
// $install_start_date = $_POST['install_start_date2'] ?: $row['install_start_date']; |
|
|
|
|
|
// $install_start_date_owner = $_POST['install_start_date2_owner'] ?: $row['install_start_date_owner']; |
|
|
|
|
|
// $install_end_date = $_POST['install_end_date2'] ?: $row['install_end_date']; |
|
|
|
|
|
// $install_end_date_owner = $_POST['install_end_date2_owner'] ?: $row['install_end_date_owner']; |
|
|
|
|
|
// $tryrun_start_date = $_POST['tryrun_start_date2'] ?: $row['tryrun_start_date']; |
|
|
|
|
|
// $tryrun_start_date_owner = $_POST['tryrun_start_date2_owner'] ?: $row['tryrun_start_date_owner']; |
|
|
|
|
|
// $tryrun_end_date = $_POST['tryrun_end_date2'] ?: $row['tryrun_end_date']; |
|
|
|
|
|
// $tryrun_end_date_owner = $_POST['tryrun_end_date2_owner'] ?: $row['tryrun_end_date_owner']; |
|
|
|
|
|
|
|
|
|
|
|
$outsourcer_type = isset($_POST['outsourcer_type']) ? $_POST['outsourcer_type'] : $row['outsourcer_type']; |
|
|
|
|
|
$qc_official_type = isset($_POST['qc_official_type2']) ? $_POST['qc_official_type2'] : $row['qc_official_type']; |
|
|
|
|
|
$qc_date = isset($_POST['qc_date2']) ? $_POST['qc_date2'] : $row['qc_date']; |
|
|
|
|
|
$qc_date_owner = isset($_POST['qc_date2_owner']) ? $_POST['qc_date2_owner'] : $row['qc_date_owner']; |
|
|
|
|
|
$end_qc_date = isset($_POST['end_qc_date2']) ? $_POST['end_qc_date2'] : $row['end_qc_date']; |
|
|
$end_qc_date = isset($_POST['end_qc_date2']) ? $_POST['end_qc_date2'] : $row['end_qc_date']; |
|
|
$end_qc_date_owner = isset($_POST['end_qc_date2_owner']) ? $_POST['end_qc_date2_owner'] : $row['end_qc_date_owner']; |
|
|
$end_qc_date_owner = isset($_POST['end_qc_date2_owner']) ? $_POST['end_qc_date2_owner'] : $end_qc_date_owner; |
|
|
$official_check_date = isset($_POST['official_check_date2']) ? $_POST['official_check_date2'] : $row['official_check_date']; |
|
|
$official_check_date = isset($_POST['official_check_date2']) ? $_POST['official_check_date2'] : $official_check_date; |
|
|
$old_official_check_date = isset($_POST['old_official_check_date2']) ? $_POST['old_official_check_date2'] : $row['old_official_check_date']; |
|
|
$old_official_check_date = isset($_POST['old_official_check_date2']) ? $_POST['old_official_check_date2'] : $old_official_check_date; |
|
|
$official_check_date_owner = isset($_POST['official_check_date2_owner']) ? $_POST['official_check_date2_owner'] : $row['official_check_date_owner']; |
|
|
$official_check_date_owner = isset($_POST['official_check_date2_owner']) ? $_POST['official_check_date2_owner'] : $official_check_date_owner; |
|
|
$delivery_date = isset($_POST['delivery_date2']) ? $_POST['delivery_date2'] : $row['delivery_date']; |
|
|
|
|
|
$delivery_date_owner = isset($_POST['delivery_date2_owner']) ? $_POST['delivery_date2_owner'] : $row['delivery_date_owner']; |
|
|
$delivery_date = isset($_POST['delivery_date2']) ? $_POST['delivery_date2'] : $delivery_date; |
|
|
$install_start_date = isset($_POST['install_start_date2']) ? $_POST['install_start_date2'] : $row['install_start_date']; |
|
|
$delivery_date_owner = isset($_POST['delivery_date2_owner']) ? $_POST['delivery_date2_owner'] : $delivery_date_owner; |
|
|
$install_start_date_owner = isset($_POST['install_start_date2_owner']) ? $_POST['install_start_date2_owner'] : $row['install_start_date_owner']; |
|
|
$install_start_date = isset($_POST['install_start_date2']) ? $_POST['install_start_date2'] : $install_start_date; |
|
|
$install_end_date = isset($_POST['install_end_date2']) ? $_POST['install_end_date2'] : $row['install_end_date']; |
|
|
$install_start_date_owner = isset($_POST['install_start_date2_owner']) ? $_POST['install_start_date2_owner'] : $install_start_date_owner; |
|
|
$install_end_date_owner = isset($_POST['install_end_date2_owner']) ? $_POST['install_end_date2_owner'] : $row['install_end_date_owner']; |
|
|
$install_end_date = isset($_POST['install_end_date2']) ? $_POST['install_end_date2'] : $install_end_date; |
|
|
$tryrun_start_date = isset($_POST['tryrun_start_date2']) ? $_POST['tryrun_start_date2'] : $row['tryrun_start_date']; |
|
|
$install_end_date_owner = isset($_POST['install_end_date2_owner']) ? $_POST['install_end_date2_owner'] : $install_end_date_owner; |
|
|
$tryrun_start_date_owner = isset($_POST['tryrun_start_date2_owner']) ? $_POST['tryrun_start_date2_owner'] : $row['tryrun_start_date_owner']; |
|
|
$tryrun_start_date = isset($_POST['tryrun_start_date2']) ? $_POST['tryrun_start_date2'] : $tryrun_start_date; |
|
|
$tryrun_end_date = isset($_POST['tryrun_end_date2']) ? $_POST['tryrun_end_date2'] : $row['tryrun_end_date']; |
|
|
$tryrun_start_date_owner = isset($_POST['tryrun_start_date2_owner']) ? $_POST['tryrun_start_date2_owner'] : $tryrun_start_date_owner; |
|
|
$tryrun_end_date_owner = isset($_POST['tryrun_end_date2_owner']) ? $_POST['tryrun_end_date2_owner'] : $row['tryrun_end_date_owner']; |
|
|
$tryrun_end_date = isset($_POST['tryrun_end_date2']) ? $_POST['tryrun_end_date2'] : $tryrun_end_date; |
|
|
|
|
|
$tryrun_end_date_owner = isset($_POST['tryrun_end_date2_owner']) ? $_POST['tryrun_end_date2_owner'] : $tryrun_end_date_owner; |
|
|
|
|
|
|
|
|
$updatesql .= " |
|
|
$updatesql .= " |
|
|
qc_official_type = '$qc_official_type', |
|
|
qc_official_type = '$qc_official_type', |
|
|
install_start_date = '$install_start_date', |
|
|
install_start_date = '$install_start_date', |
|
|
install_start_date_owner = '$install_start_date_owner', |
|
|
install_start_date_owner = '$install_start_date_owner', |
|
|
install_end_date = '$install_end_date', |
|
|
install_end_date = '$install_end_date', |
|
|
install_end_date_owner = '$install_end_date_owner', |
|
|
install_end_date_owner = '$install_end_date_owner', |
|
|
tryrun_start_date = '$tryrun_start_date', |
|
|
tryrun_start_date = '$tryrun_start_date', |
|
|
tryrun_start_date_owner = '$tryrun_start_date_owner', |
|
|
tryrun_start_date_owner = '$tryrun_start_date_owner', |
|
|
tryrun_end_date = '$tryrun_end_date', |
|
|
tryrun_end_date = '$tryrun_end_date', |
|
|
tryrun_end_date_owner = '$tryrun_end_date_owner', |
|
|
tryrun_end_date_owner = '$tryrun_end_date_owner', |
|
|
delivery_date = '$delivery_date', |
|
|
delivery_date = '$delivery_date', |
|
|
delivery_date_owner = '$delivery_date_owner', |
|
|
delivery_date_owner = '$delivery_date_owner', |
|
|
qc_date = '$qc_date', |
|
|
qc_date = '$qc_date', |
|
|
qc_date_owner = '$qc_date_owner', |
|
|
qc_date_owner = '$qc_date_owner', |
|
|
end_qc_date = '$end_qc_date', |
|
|
end_qc_date = '$end_qc_date', |
|
|
end_qc_date_owner = '$end_qc_date_owner', |
|
|
end_qc_date_owner = '$end_qc_date_owner', |
|
|
official_check_date = '$official_check_date', |
|
|
official_check_date = '$official_check_date', |
|
|
official_check_date_owner = '$official_check_date_owner', |
|
|
official_check_date_owner = '$official_check_date_owner', |
|
|
outsourcer_type = '$outsourcer_type', |
|
|
outsourcer_type = '$outsourcer_type', |
|
|
install_outsourcer = '$install_outsourcer', |
|
|
install_outsourcer = '$install_outsourcer', |
|
|
install_outsourcer_owner = '$install_outsourcer_owner', |
|
|
install_outsourcer_owner = '$install_outsourcer_owner', |
|
|
install_outsourcer_date = '$install_outsourcer_date', |
|
|
install_outsourcer_date = '$install_outsourcer_date', |
|
|
install_outsourcer_date_owner = '$install_outsourcer_date_owner', |
|
|
install_outsourcer_date_owner = '$install_outsourcer_date_owner', |
|
|
estimate_install_start_date = '$estimate_install_start_date', |
|
|
estimate_install_start_date = '$estimate_install_start_date', |
|
|
estimate_install_start_date_owner = '$estimate_install_start_date_owner', |
|
|
estimate_install_start_date_owner = '$estimate_install_start_date_owner', |
|
|
estimate_install_end_date = '$estimate_install_end_date', |
|
|
estimate_install_end_date = '$estimate_install_end_date', |
|
|
estimate_install_end_date_owner = '$estimate_install_end_date_owner', |
|
|
estimate_install_end_date_owner = '$estimate_install_end_date_owner', |
|
|
tryrun_outsourcer = '$tryrun_outsourcer', |
|
|
tryrun_outsourcer = '$tryrun_outsourcer', |
|
|
tryrun_outsourcer_owner = '$tryrun_outsourcer_owner', |
|
|
tryrun_outsourcer_owner = '$tryrun_outsourcer_owner', |
|
|
tryrun_outsourcer_date = '$tryrun_outsourcer_date', |
|
|
tryrun_outsourcer_date = '$tryrun_outsourcer_date', |
|
|
tryrun_outsourcer_date_owner = '$tryrun_outsourcer_date_owner', |
|
|
tryrun_outsourcer_date_owner = '$tryrun_outsourcer_date_owner', |
|
|
estimate_tryrun_start_date = '$estimate_tryrun_start_date', |
|
|
estimate_tryrun_start_date = '$estimate_tryrun_start_date', |
|
|
estimate_tryrun_start_date_owner = '$estimate_tryrun_start_date_owner', |
|
|
estimate_tryrun_start_date_owner = '$estimate_tryrun_start_date_owner', |
|
|
estimate_tryrun_end_date = '$estimate_tryrun_end_date', |
|
|
estimate_tryrun_end_date = '$estimate_tryrun_end_date', |
|
|
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner', |
|
|
estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner', |
|
|
warehouse_assistant_remark = '$warehouse_assistant_remark', |
|
|
warehouse_assistant_remark = '$warehouse_assistant_remark', |
|
|
|
|
|
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_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', |
|
|
|
|
|
delivery_date = '$delivery_date', |
|
|
|
|
|
delivery_date_owner = '$delivery_date_owner', |
|
|
"; |
|
|
"; |
|
|
|
|
|
|
|
|
if (!empty($plan_diagram_file)) { |
|
|
if (!empty($plan_diagram_file)) { |
|
|
$updatesql .= "plan_diagram_file = '$plan_diagram_file', "; |
|
|
$updatesql .= "plan_diagram_file = '$plan_diagram_file', "; |
|
|
$updatesql .= " |
|
|
$updatesql .= " |
|
@ -615,6 +647,17 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
if (!empty($outsourcer_contract_file)) { |
|
|
if (!empty($outsourcer_contract_file)) { |
|
|
echo $updatesql .= "outsourcer_contract_file = '$outsourcer_contract_file', "; |
|
|
echo $updatesql .= "outsourcer_contract_file = '$outsourcer_contract_file', "; |
|
|
} |
|
|
} |
|
|
|
|
|
if (!empty(trim($warehouse_remark))) { |
|
|
|
|
|
$updatesql .= " |
|
|
|
|
|
all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "<br/>" . $warehouse_remark . "<br/><br/>',IF(all_remark IS NULL,'',all_remark)), |
|
|
|
|
|
"; |
|
|
|
|
|
} |
|
|
|
|
|
if (!empty($building_heigh_verify_file)) |
|
|
|
|
|
$updatesql .= "building_heigh_verify_file = '$building_heigh_verify_file', "; |
|
|
|
|
|
if (!empty($site_survey_contact_verify_file)) |
|
|
|
|
|
$updatesql .= "site_survey_contact_verify_file = '$site_survey_contact_verify_file', "; |
|
|
|
|
|
if (!empty($delivery_date_file)) |
|
|
|
|
|
$updatesql .= "delivery_date_file = '$delivery_date_file', "; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 許協更新業務確認項目權限 |
|
|
// 許協更新業務確認項目權限 |
|
@ -892,89 +935,89 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
// if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
if ($_POST['form_name'] == 'update_install_date_form') { |
|
|
// if ($_POST['form_name'] == 'update_install_date_form') { |
|
|
include "./class/Cmail.php"; |
|
|
// include "./class/Cmail.php"; |
|
|
$cmail = new Cmail(); |
|
|
// $cmail = new Cmail(); |
|
|
foreach ($_POST as $k => $v) |
|
|
// foreach ($_POST as $k => $v) |
|
|
$$k = htmlspecialchars(stripslashes(trim($v))); |
|
|
// $$k = htmlspecialchars(stripslashes(trim($v))); |
|
|
|
|
|
|
|
|
$change_all_contractno = $_POST['change_all_contractno']; |
|
|
// $change_all_contractno = $_POST['change_all_contractno']; |
|
|
$contractno = $_POST['contractno2']; |
|
|
// $contractno = $_POST['contractno2']; |
|
|
$install_start_date = $_POST['install_start_date']; |
|
|
// $install_start_date = $_POST['install_start_date']; |
|
|
$install_start_date_owner = $_POST['install_start_date_owner']; |
|
|
// $install_start_date_owner = $_POST['install_start_date_owner']; |
|
|
$install_end_date = $_POST['install_end_date']; |
|
|
// $install_end_date = $_POST['install_end_date']; |
|
|
$install_end_date_owner = $_POST['install_end_date_owner']; |
|
|
// $install_end_date_owner = $_POST['install_end_date_owner']; |
|
|
$tryrun_start_date = $_POST['tryrun_start_date']; |
|
|
// $tryrun_start_date = $_POST['tryrun_start_date']; |
|
|
$tryrun_start_date_owner = $_POST['tryrun_start_date_owner']; |
|
|
// $tryrun_start_date_owner = $_POST['tryrun_start_date_owner']; |
|
|
$tryrun_end_date = $_POST['tryrun_end_date']; |
|
|
// $tryrun_end_date = $_POST['tryrun_end_date']; |
|
|
$tryrun_end_date_owner = $_POST['tryrun_end_date_owner']; |
|
|
// $tryrun_end_date_owner = $_POST['tryrun_end_date_owner']; |
|
|
$old_delivery_date = $_POST['old_delivery_date']; |
|
|
// $old_delivery_date = $_POST['old_delivery_date']; |
|
|
$delivery_date = $_POST['delivery_date']; |
|
|
// $delivery_date = $_POST['delivery_date']; |
|
|
$delivery_date_owner = $_POST['delivery_date_owner']; |
|
|
// $delivery_date_owner = $_POST['delivery_date_owner']; |
|
|
$contractno = $_POST['contractno']; |
|
|
// $contractno = $_POST['contractno']; |
|
|
$facilityno = $_POST['facilityno']; |
|
|
// $facilityno = $_POST['facilityno']; |
|
|
$salesid = $_POST['salesid']; |
|
|
// $salesid = $_POST['salesid']; |
|
|
|
|
|
|
|
|
$salesname = accountid2name($salesid)[$salesid]; |
|
|
// $salesname = accountid2name($salesid)[$salesid]; |
|
|
$salesmail = accountid2email([$salesid])[$salesid]; |
|
|
// $salesmail = accountid2email([$salesid])[$salesid]; |
|
|
|
|
|
|
|
|
if ($old_delivery_date !== $delivery_date) { |
|
|
// if ($old_delivery_date !== $delivery_date) { |
|
|
|
|
|
|
|
|
if (empty($change_all_contractno)) { |
|
|
// if (empty($change_all_contractno)) { |
|
|
$mail_title = "作番大日程(汰改)合約號:" . $contractno . "-移交日變更通知"; |
|
|
// $mail_title = "作番大日程(汰改)合約號:" . $contractno . "-移交日變更通知"; |
|
|
$mail_content = "作番大日程(汰改)$salesname$salesmail |
|
|
// $mail_content = "作番大日程(汰改)$salesname$salesmail |
|
|
合約號:" . $contractno |
|
|
// 合約號:" . $contractno |
|
|
. " |
|
|
// . " |
|
|
移交日:" . $old_delivery_date . " => " . $delivery_date; |
|
|
// 移交日:" . $old_delivery_date . " => " . $delivery_date; |
|
|
} else { |
|
|
// } else { |
|
|
$mail_title = "作番大日程(汰改)合約號:" . $contractno . "作番號:" . $facilityno . "-移交日變更通知"; |
|
|
// $mail_title = "作番大日程(汰改)合約號:" . $contractno . "作番號:" . $facilityno . "-移交日變更通知"; |
|
|
$mail_content = "作番大日程(汰改) |
|
|
// $mail_content = "作番大日程(汰改) |
|
|
合約號:" . $contractno |
|
|
// 合約號:" . $contractno |
|
|
. " |
|
|
// . " |
|
|
作番號:" . $facilityno |
|
|
// 作番號:" . $facilityno |
|
|
. " |
|
|
// . " |
|
|
移交日:" . $old_delivery_date . " => " . $delivery_date; |
|
|
// 移交日:" . $old_delivery_date . " => " . $delivery_date; |
|
|
} |
|
|
// } |
|
|
$cmail->sendx( |
|
|
// $cmail->sendx( |
|
|
$mail_title, |
|
|
// $mail_title, |
|
|
$mail_content, |
|
|
// $mail_content, |
|
|
[ |
|
|
// [ |
|
|
[$salesname, $salesmail] |
|
|
// [$salesname, $salesmail] |
|
|
], |
|
|
// ], |
|
|
"永佳捷科技" |
|
|
// "永佳捷科技" |
|
|
); |
|
|
// ); |
|
|
} |
|
|
// } |
|
|
|
|
|
|
|
|
$updatesql = " |
|
|
// $updatesql = " |
|
|
UPDATE wipwholestatus |
|
|
// UPDATE wipwholestatus |
|
|
SET |
|
|
// SET |
|
|
install_start_date = '$install_start_date', |
|
|
// install_start_date = '$install_start_date', |
|
|
install_start_date_owner = '$install_start_date_owner', |
|
|
// install_start_date_owner = '$install_start_date_owner', |
|
|
install_end_date = '$install_end_date', |
|
|
// install_end_date = '$install_end_date', |
|
|
install_end_date_owner = '$install_end_date_owner', |
|
|
// install_end_date_owner = '$install_end_date_owner', |
|
|
tryrun_start_date = '$tryrun_start_date', |
|
|
// tryrun_start_date = '$tryrun_start_date', |
|
|
tryrun_start_date_owner = '$tryrun_start_date_owner', |
|
|
// tryrun_start_date_owner = '$tryrun_start_date_owner', |
|
|
tryrun_end_date = '$tryrun_end_date', |
|
|
// tryrun_end_date = '$tryrun_end_date', |
|
|
tryrun_end_date_owner = '$tryrun_end_date_owner', |
|
|
// tryrun_end_date_owner = '$tryrun_end_date_owner', |
|
|
delivery_date = '$delivery_date', |
|
|
// delivery_date = '$delivery_date', |
|
|
delivery_date_owner = '$delivery_date_owner' |
|
|
// delivery_date_owner = '$delivery_date_owner' |
|
|
"; |
|
|
// "; |
|
|
if (empty($change_all_contractno)) { |
|
|
// if (empty($change_all_contractno)) { |
|
|
$updatesql .= "WHERE id = '$id' "; |
|
|
// $updatesql .= "WHERE id = '$id' "; |
|
|
} else { |
|
|
// } else { |
|
|
$updatesql .= "WHERE contractno = '$contractno' "; |
|
|
// $updatesql .= "WHERE contractno = '$contractno' "; |
|
|
} |
|
|
// } |
|
|
// echo $updatesql; |
|
|
// // echo $updatesql; |
|
|
// exit; |
|
|
// // exit; |
|
|
mysqli_query($link, $updatesql); |
|
|
// mysqli_query($link, $updatesql); |
|
|
|
|
|
|
|
|
echo "<script type ='text/JavaScript'>"; |
|
|
// echo "<script type ='text/JavaScript'>"; |
|
|
echo "alert('已更新日期');"; |
|
|
// echo "alert('已更新日期');"; |
|
|
echo "location.href='wipwhole-renovate-rec-invoice-edit.php?function_name=pricereview&id=$id&" . $token_link . "';"; |
|
|
// echo "location.href='wipwhole-renovate-rec-invoice-edit.php?function_name=pricereview&id=$id&" . $token_link . "';"; |
|
|
echo "</script>"; |
|
|
// echo "</script>"; |
|
|
} |
|
|
// } |
|
|
} |
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
@ -1010,6 +1053,42 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 外示系統寄信 |
|
|
|
|
|
if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
|
|
if ($_POST['form_name'] == 'send_expression_mail_to_platform_form') { |
|
|
|
|
|
|
|
|
|
|
|
include "./class/Cmail.php"; |
|
|
|
|
|
$cmail = new Cmail(); |
|
|
|
|
|
|
|
|
|
|
|
$id = $_POST['id']; |
|
|
|
|
|
$sql = " |
|
|
|
|
|
SELECT * FROM wipwholestatus WHERE id = '$id' |
|
|
|
|
|
AND status = '1' |
|
|
|
|
|
"; |
|
|
|
|
|
$data = mysqli_fetch_assoc(mysqli_query($link, $sql)); |
|
|
|
|
|
|
|
|
|
|
|
$encodedString = urlencode("expression-index.php?function_name=expression&id=$id"); |
|
|
|
|
|
$href = "<a href='https://www.masada.com.tw/wms/login.php?redirect=$encodedString' target='_blank'>永佳捷 - 普萊特富 規格聯繫</a>"; |
|
|
|
|
|
$mail_title = "外示系統通知 合約號:" . $data['contractno'] . "作番號:" . $data['facilityno']; |
|
|
|
|
|
$mail_content = "外示系統通知 合約號:" . $data['contractno'] |
|
|
|
|
|
. " |
|
|
|
|
|
作番號:" . $data['facilityno'] . " |
|
|
|
|
|
$href |
|
|
|
|
|
"; |
|
|
|
|
|
$cmail->sendx( |
|
|
|
|
|
$mail_title, |
|
|
|
|
|
$mail_content, |
|
|
|
|
|
[ |
|
|
|
|
|
["gary", "gary_chen@masada.com.tw"], |
|
|
|
|
|
["owen", "owen@masada.com.tw"], |
|
|
|
|
|
["舒立成", "shulicheng@platform-cn.com"], |
|
|
|
|
|
], |
|
|
|
|
|
"永佳捷科技" |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 退回至工務階段 |
|
|
// 退回至工務階段 |
|
|
function backWarehouse($link, $user_id) |
|
|
function backWarehouse($link, $user_id) |
|
|
{ |
|
|
{ |
|
|