|
|
@ -5,6 +5,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
if (!empty($_POST['custom_name'])) { |
|
|
|
if ($checkStatus) { |
|
|
|
|
|
|
|
$customer_planning_verify_file = fileIUpload("customer_planning_verify_file"); |
|
|
|
$all_contractno_change = empty($_POST['all_contractno_change']) ? null : $_POST['all_contractno_change']; |
|
|
|
$custom_name = $_POST['custom_name']; |
|
|
|
$contractno = $_POST['contractno']; |
|
|
@ -21,6 +22,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
'tds' => $tds, |
|
|
|
'form_key' => getFomkeySeq($link), |
|
|
|
'user_id' => $user_id, |
|
|
|
'customer_planning_verify_file' => $customer_planning_verify_file, |
|
|
|
'change_status' => $_POST['assign_status'] |
|
|
|
); |
|
|
|
// 寫入表單主檔 |
|
|
@ -40,6 +42,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
// 批次申請 |
|
|
|
if (($_POST['assign_status'] == 'A' || $_POST['assign_status'] == 'B') && !empty($all_contractno_change)) { |
|
|
|
$wipwholestatus_id_arr = getWipwholestatusIdByConstractNo($link, $contractno); |
|
|
|
$customer_planning_verify_file = fileIUpload("customer_planning_verify_file"); |
|
|
|
foreach ($wipwholestatus_id_arr as $wipwholestatus_id) { |
|
|
|
$data_arr = array( |
|
|
|
'id' => $wipwholestatus_id[0], |
|
|
@ -48,6 +51,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
'contractno' => $contractno, |
|
|
|
'tds' => $tds, |
|
|
|
'form_key' => getFomkeySeq($link), |
|
|
|
'customer_planning_verify_file' => $customer_planning_verify_file, |
|
|
|
'user_id' => $user_id |
|
|
|
); |
|
|
|
// 寫入表單主檔 |
|
|
@ -216,58 +220,58 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { |
|
|
|
"; |
|
|
|
mysqli_query($link, $sql); |
|
|
|
|
|
|
|
// // 發送系統通知 |
|
|
|
// $contractno = $_POST['contractno']; |
|
|
|
// $facilityno = $_POST['facilityno']; |
|
|
|
// $real_contract_arrival_date = $_POST['real_contract_arrival_date']; |
|
|
|
// $salesid = $_POST['salesid']; |
|
|
|
// $gongWuokid = $_POST['gongWuokid']; |
|
|
|
// $old_real_address = $_POST['old_real_address']; |
|
|
|
// $real_address = $_POST['real_address']; |
|
|
|
// $content = "合約號 : $contractno |
|
|
|
// 作番號 : $facilityno |
|
|
|
// 出貨日期微調: " . substr($real_contract_arrival_date, 0, 10) . " => " . substr($contract_arrival_date_tmp, 0, 10) . " |
|
|
|
// 工地地址微調: " . $old_real_address . " => " . $real_address_tmp; |
|
|
|
// // 發送系統通知 |
|
|
|
// $contractno = $_POST['contractno']; |
|
|
|
// $facilityno = $_POST['facilityno']; |
|
|
|
// $real_contract_arrival_date = $_POST['real_contract_arrival_date']; |
|
|
|
// $salesid = $_POST['salesid']; |
|
|
|
// $gongWuokid = $_POST['gongWuokid']; |
|
|
|
// $old_real_address = $_POST['old_real_address']; |
|
|
|
// $real_address = $_POST['real_address']; |
|
|
|
// $content = "合約號 : $contractno |
|
|
|
// 作番號 : $facilityno |
|
|
|
// 出貨日期微調: " . substr($real_contract_arrival_date, 0, 10) . " => " . substr($contract_arrival_date_tmp, 0, 10) . " |
|
|
|
// 工地地址微調: " . $old_real_address . " => " . $real_address_tmp; |
|
|
|
|
|
|
|
// // 大日程出貨日調整 通知營業人員 |
|
|
|
// $noticeData = array( |
|
|
|
// 'related_id' => $cid, |
|
|
|
// 'title' => '作番大日程(新梯)出貨日調整通知 > ' . $facilityno, |
|
|
|
// 'content' => $content, |
|
|
|
// 'permission' => $salesid, |
|
|
|
// ); |
|
|
|
// addNotice($link, $noticeData); |
|
|
|
// // 大日程出貨日調整 通知工務人員 |
|
|
|
// $noticeData = array( |
|
|
|
// 'related_id' => $cid, |
|
|
|
// 'title' => '作番大日程(新梯)出貨日調整通知 > ' . $facilityno, |
|
|
|
// 'content' => $content, |
|
|
|
// 'permission' => $gongWuokid, |
|
|
|
// ); |
|
|
|
// addNotice($link, $noticeData); |
|
|
|
// // 大日程出貨日調整 通知營業人員 |
|
|
|
// $noticeData = array( |
|
|
|
// 'related_id' => $cid, |
|
|
|
// 'title' => '作番大日程(新梯)出貨日調整通知 > ' . $facilityno, |
|
|
|
// 'content' => $content, |
|
|
|
// 'permission' => $salesid, |
|
|
|
// ); |
|
|
|
// addNotice($link, $noticeData); |
|
|
|
// // 大日程出貨日調整 通知工務人員 |
|
|
|
// $noticeData = array( |
|
|
|
// 'related_id' => $cid, |
|
|
|
// 'title' => '作番大日程(新梯)出貨日調整通知 > ' . $facilityno, |
|
|
|
// 'content' => $content, |
|
|
|
// 'permission' => $gongWuokid, |
|
|
|
// ); |
|
|
|
// addNotice($link, $noticeData); |
|
|
|
|
|
|
|
// $shengguano_arr = getShengguanokOptions($link); |
|
|
|
// foreach ($shengguano_arr as $row) : |
|
|
|
// $contractno = $_POST['contractno']; |
|
|
|
// $facilityno = $_POST['facilityno']; |
|
|
|
// $real_contract_arrival_date = $_POST['real_contract_arrival_date']; |
|
|
|
// $gongWuokid = $_POST['gongWuokid']; |
|
|
|
// $old_real_address = $_POST['old_real_address']; |
|
|
|
// $real_address = $_POST['real_address']; |
|
|
|
// $content = "合約號 : $contractno |
|
|
|
// 作番號 : $facilityno |
|
|
|
// 出貨日期微調: " . substr($real_contract_arrival_date, 0, 10) . " => " . substr($contract_arrival_date_tmp, 0, 10) . " |
|
|
|
// 工地地址微調: " . $old_real_address . " => " . $real_address_tmp; |
|
|
|
// $shengguano_arr = getShengguanokOptions($link); |
|
|
|
// foreach ($shengguano_arr as $row) : |
|
|
|
// $contractno = $_POST['contractno']; |
|
|
|
// $facilityno = $_POST['facilityno']; |
|
|
|
// $real_contract_arrival_date = $_POST['real_contract_arrival_date']; |
|
|
|
// $gongWuokid = $_POST['gongWuokid']; |
|
|
|
// $old_real_address = $_POST['old_real_address']; |
|
|
|
// $real_address = $_POST['real_address']; |
|
|
|
// $content = "合約號 : $contractno |
|
|
|
// 作番號 : $facilityno |
|
|
|
// 出貨日期微調: " . substr($real_contract_arrival_date, 0, 10) . " => " . substr($contract_arrival_date_tmp, 0, 10) . " |
|
|
|
// 工地地址微調: " . $old_real_address . " => " . $real_address_tmp; |
|
|
|
|
|
|
|
// // 大日程出貨日調整 通知營業人員 |
|
|
|
// $noticeData = array( |
|
|
|
// 'related_id' => $cid, |
|
|
|
// 'title' => '作番大日程(新梯)出貨日調整通知 > ' . $facilityno, |
|
|
|
// 'content' => $content, |
|
|
|
// 'permission' => $row['val'], |
|
|
|
// ); |
|
|
|
// addNotice($link, $noticeData); |
|
|
|
// endforeach; |
|
|
|
// // 大日程出貨日調整 通知營業人員 |
|
|
|
// $noticeData = array( |
|
|
|
// 'related_id' => $cid, |
|
|
|
// 'title' => '作番大日程(新梯)出貨日調整通知 > ' . $facilityno, |
|
|
|
// 'content' => $content, |
|
|
|
// 'permission' => $row['val'], |
|
|
|
// ); |
|
|
|
// addNotice($link, $noticeData); |
|
|
|
// endforeach; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|