diff --git a/.gitignore b/.gitignore
index 39bef4b0..4e1c1487 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ wms/test.php
app/account_log/
wms/gary2.php
wms/chinese.php
+phpinfo.php
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 9dc6b4df..22c9965b 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -8,7 +8,7 @@
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
- "port": 9003
+ "port": 9004
},
{
"name": "Launch currently open script",
@@ -37,7 +37,7 @@
],
"program": "",
"cwd": "${workspaceRoot}",
- "port": 9003,
+ "port": 9004,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
diff --git a/wms/gary.php b/wms/gary.php
index c8143ea5..efabf743 100644
--- a/wms/gary.php
+++ b/wms/gary.php
@@ -16,7 +16,7 @@ function getUserIP() {
// 获取用户的 IP 地址
$user_ip = getUserIP();
-
+echo $test = "123";
// 输出用户的 IP 地址
echo "用户的 IP 地址是:$user_ip";
exit;
diff --git a/wms/ship_run_chart-model.php b/wms/ship_run_chart-model.php
index 167b099b..2d5f064f 100644
--- a/wms/ship_run_chart-model.php
+++ b/wms/ship_run_chart-model.php
@@ -1,31 +1,66 @@
$row) {
+ foreach ($row as $field => $value) {
+ if ($value === null) {
+ $data[$key][$field] = '';
+ }
+ }
+ }
+ return $data;
}
// 出貨台數
@@ -51,7 +86,7 @@ function getShipping($type, $mtype, $year, $month)
$sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
- return json_encode($data, JSON_UNESCAPED_UNICODE);
+ return json_encode(fixDataNull($data), JSON_UNESCAPED_UNICODE);
}
// 在裝台數
@@ -77,7 +112,7 @@ function getInstalling($type, $mtype, $year, $month)
$sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
- return json_encode($data, JSON_UNESCAPED_UNICODE);
+ return json_encode(fixDataNull($data), JSON_UNESCAPED_UNICODE);
}
// 完工台數
@@ -99,7 +134,7 @@ function getInstalling2($type, $mtype, $year, $month)
$sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
- return json_encode($data, JSON_UNESCAPED_UNICODE);
+ return json_encode(fixDataNull($data), JSON_UNESCAPED_UNICODE);
}
// QC台數
@@ -121,7 +156,7 @@ function getQCing($type, $mtype, $year, $month)
$sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
- return json_encode($data, JSON_UNESCAPED_UNICODE);
+ return json_encode(fixDataNull($data), JSON_UNESCAPED_UNICODE);
}
// 移交台數
@@ -143,5 +178,180 @@ function getDeliverying($type, $mtype, $year, $month)
$sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
$result = mysqli_query($link, $sql);
$data = mysqli_fetch_all($result, MYSQLI_ASSOC);
- return json_encode($data, JSON_UNESCAPED_UNICODE);
+ return json_encode(fixDataNull($data), JSON_UNESCAPED_UNICODE);
+}
+
+
+
+
+// 出貨台數 產生excel
+function getShipping_makeExcel($type, $mtype, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ AND (
+ real_arrival_date IS NOT NULL
+ AND real_arrival_date != ''
+ )
+ ";
+ if (!empty($month)) {
+ $sql .= " AND real_arrival_date BETWEEN '$year-$month-01' AND '$year-$month-31'";
+ } else {
+ $sql .= " AND real_arrival_date BETWEEN '$year-01-01' AND '$year-12-31'";
+ }
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ $result = mysqli_query($link, $sql);
+ return mysqli_fetch_all($result, MYSQLI_ASSOC);
+}
+
+// 在裝台數 產生excel
+function getInstalling_makeExcel($type, $mtype, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ AND (
+ tryrun_end_date = ''
+ OR tryrun_end_date IS NULL
+ )
+ ";
+ if (!empty($month)) {
+ $sql .= " AND real_arrival_date BETWEEN '$year-$month-01' AND '$year-$month-31'";
+ } else {
+ $sql .= " AND real_arrival_date BETWEEN '$year-01-01' AND '$year-12-31'";
+ }
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ $result = mysqli_query($link, $sql);
+ return mysqli_fetch_all($result, MYSQLI_ASSOC);
+}
+
+// 完工台數 產生excel
+function getInstalling2_makeExcel($type, $mtype, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ ";
+ if (!empty($month)) {
+ $sql .= " AND tryrun_end_date BETWEEN '$year-$month-01' AND '$year-$month-31'";
+ } else {
+ $sql .= " AND tryrun_end_date BETWEEN '$year-01-01' AND '$year-12-31'";
+ }
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ $result = mysqli_query($link, $sql);
+ return mysqli_fetch_all($result, MYSQLI_ASSOC);
+}
+
+// QC台數 產生excel
+function getQCing_makeExcel($type, $mtype, $year, $month)
+{
+ global $link;
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ ";
+ if (!empty($month)) {
+ $sql .= " AND end_qc_date BETWEEN '$year-$month-01' AND '$year-$month-31'";
+ } else {
+ $sql .= " AND end_qc_date BETWEEN '$year-01-01' AND '$year-12-31'";
+ }
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ $result = mysqli_query($link, $sql);
+ return mysqli_fetch_all($result, MYSQLI_ASSOC);
+}
+
+// 移交台數 產生excel
+function getDeliverying_makeExcel($type, $mtype, $year, $month)
+{
+
+ global $link;
+ // 建立一個新的 Spreadsheet 物件
+ $sql = "
+ SELECT
+ *
+ FROM wipwholestatus
+ WHERE status = '1'
+ ";
+ if (!empty($month)) {
+ $sql .= " AND delivery_date BETWEEN '$year-$month-01' AND '$year-$month-31'";
+ } else {
+ $sql .= " AND delivery_date BETWEEN '$year-01-01' AND '$year-12-31'";
+ }
+ $sql .= !empty($type) ? " AND contract_type = '$type'" : "";
+ $sql .= !empty($mtype) ? " AND renovate_type Like '%$mtype%'" : "";
+ $result = mysqli_query($link, $sql);
+ return mysqli_fetch_all($result, MYSQLI_ASSOC);
+}
+
+
+function downloadExcel($data)
+{
+
+ $spreadsheet = new Spreadsheet();
+ $sheet = $spreadsheet->getActiveSheet();
+ $colArr = [
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+ ];
+ $colTitleArr = [
+ '合約號',
+ '作番號',
+ '客戶名稱',
+ '預計出貨日',
+ '試車完工日',
+ 'QC合格日',
+ '官檢日',
+ '移交日',
+ ];
+ $sheet->setTitle('出貨完工推移表');
+ for ($i = 0; $i < count($colArr); $i++)
+ $sheet->setCellValue($colArr[$i] . '1', $colTitleArr[$i]);
+
+ $i = 2;
+ foreach ($data as $row) {
+ $colContentArr = [
+ $row['contractno'],
+ $row['facilityno'],
+ $row['custom'],
+ $row['real_arrival_date'],
+ $row['tryrun_end_date'],
+ $row['end_qc_date'],
+ $row['official_check_date'],
+ $row['delivery_date']
+ ];
+ for ($j = 0; $j < count($colContentArr); $j++)
+ $sheet->setCellValue($colArr[$j] . $i, $colContentArr[$j]);
+ $i++;
+ }
+
+ // 調整欄位大小
+ foreach ($sheet->getColumnIterator() as $column) {
+ $sheet->getColumnDimension($column->getColumnIndex())->setAutoSize(true);
+ }
+
+ $writer = new Xlsx($spreadsheet);
+ $file_path = dirname(__DIR__) . '/wms/excel/' . 'gary_test.xlsx';
+ try {
+ $writer->save($file_path);
+ // 回傳檔案路徑給 JavaScript
+ echo $file_path;
+ } catch (Exception $e) {
+ echo 'Error: ' . $e->getMessage();
+ }
+ exit();
}
diff --git a/wms/ship_run_chart.php b/wms/ship_run_chart.php
index 2ed7d112..5f1b0e83 100644
--- a/wms/ship_run_chart.php
+++ b/wms/ship_run_chart.php
@@ -132,6 +132,11 @@ foreach ($contract_type as $c_val => $c_key) {
+
@@ -349,6 +354,7 @@ foreach ($contract_type as $c_val => $c_key) {
});
function showDetail(form_name, type, mtype, year, month) {
+ $("#btn_download").attr("onclick", "generateButton('" + form_name + "', '" + type + "', '" + mtype + "', '" + year + "', '" + month + "')");
$.ajax({
type: "POST",
dataType: "json",
@@ -361,7 +367,6 @@ foreach ($contract_type as $c_val => $c_key) {
month: month
},
complete: function(data) {
- console.log(data);
var data = data.responseJSON
var str = "";
for (var i = 0; i < data.length; i++) {
@@ -382,10 +387,46 @@ foreach ($contract_type as $c_val => $c_key) {
dttable.fnDestroy();
}
$("#table_detail").find("tbody").html(str);
- $('#table_detail').dataTable();
+ $('#table_detail').dataTable({
+ displayLength: 100,
+ });
}
})
}
+
+ // 使用 JavaScript 監聽按鈕點擊事件
+ function generateButton(form_name, type, mtype, year, month) {
+
+ const formData = new FormData();
+ formData.append("form_name", form_name + "_makeExcel");
+ formData.append("type", type);
+ formData.append("mtype", mtype);
+ formData.append("year", year);
+ formData.append("month", month);
+
+ // 使用 XMLHttpRequest 來呼叫 PHP 檔案,生成 Excel
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', window.location.origin + "/wms/ship_run_chart-model.php", true);
+ xhr.responseType = 'text';
+ xhr.onload = function() {
+ if (xhr.status === 200) {
+ // 取得 PHP 回傳的檔案路徑
+ var response = xhr.responseText;
+ console.log(xhr.responseText);
+ var file_path = xhr.responseText;
+ // 創建下載連結
+ var link = document.createElement('a');
+ link.setAttribute('href', window.location.origin + "/wms/excel/gary_test.xlsx");
+ // 設定下載的檔案名稱
+ link.setAttribute('download', '出貨完工推移表.xlsx');
+ link.style.display = 'none';
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }
+ };
+ xhr.send(formData);
+ }
setTitle('作番大日程(新梯)');
for ($i = 0; $i < count($colArr); $i++)
@@ -349,6 +352,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
substr($row['taiwan_goods_type_date'], 0, 10),
$arrival_date_verify_status,
substr($row['actual_tofactory_date'], 0, 10),
+ empty($row['plan_diagram_file']) ? "無" : "已上傳",
+ empty($row['completion_acceptance_file']) ? "無" : "已上傳",
+ empty($row['delivery_date_file']) ? "無" : "已上傳"
];
for ($j = 0; $j < count($colContentArr); $j++)
$sheet->setCellValue($colArr[$j] . $i, $colContentArr[$j]);
diff --git a/wms/wipwhole-index-function.php b/wms/wipwhole-index-function.php
index af5a1964..0a14bc7f 100644
--- a/wms/wipwhole-index-function.php
+++ b/wms/wipwhole-index-function.php
@@ -48,7 +48,8 @@ function getWipwholeSearchSql()
$area_no = empty($_REQUEST['area_no']) ? null : trim($_REQUEST['area_no']);
$sql = "";
- $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
+ $sql .= empty($area_no) ? "" : " AND area_no = '$area_no' ";
+ // $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
$sql .= empty($contractno) ? "" : " AND contractno LIKE '%$contractno%' ";
$sql .= empty($facilityno) ? "" : " AND facilityno LIKE '%$facilityno%' ";
$sql .= empty($custom) ? "" : " AND custom LIKE '%$custom%' ";
@@ -284,7 +285,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -297,7 +299,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -310,7 +313,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -323,7 +327,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -564,7 +569,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -585,7 +591,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -606,7 +613,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -627,7 +635,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
diff --git a/wms/wipwhole-rec-invoice-edit-fileupload.php b/wms/wipwhole-rec-invoice-edit-fileupload.php
index 66c86b59..6406aea2 100644
--- a/wms/wipwhole-rec-invoice-edit-fileupload.php
+++ b/wms/wipwhole-rec-invoice-edit-fileupload.php
@@ -2,16 +2,16 @@
function fileIUpload($post_name)
{
- if ($_FILES[$post_name]["error"] == 0) {
+ if (empty($_FILES[$post_name]["error"])) {
$datetime = date("YmdHis");
- $file_name = str_replace("#", "", $_FILES[$post_name]["name"]);
- $temp_file_name = $_FILES[$post_name]["tmp_name"];
- $target_dir = empty($file_name) ? "" : "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);
+ $file_name = empty($_FILES[$post_name]["name"]) ? "" : str_replace("#", "", $_FILES[$post_name]["name"]);
if (!empty($file_name)) {
+ $temp_file_name = $_FILES[$post_name]["tmp_name"];
+ $target_dir = empty($file_name) ? "" : "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 "";
@@ -71,4 +71,4 @@ $shengguanok_status_file = fileIUpload("shengguanok_status_file");
$outsourcer_contract_file = fileIUploads("outsourcer_contract_file");
$delivery_date_file2 = fileIUpload("delivery_date_file2");
// 品證
-$official_check_file = fileIUpload("official_check_file");
\ No newline at end of file
+$official_check_file = fileIUpload("official_check_file");
diff --git a/wms/wipwhole-rec-invoice-edit-submit.php b/wms/wipwhole-rec-invoice-edit-submit.php
index aee4bb36..ebf61c7d 100644
--- a/wms/wipwhole-rec-invoice-edit-submit.php
+++ b/wms/wipwhole-rec-invoice-edit-submit.php
@@ -12,141 +12,143 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
$datetime = date("Y-m-d H:i:s");
- $contractno = $_POST['contractno'];
- $facility_temp_no = $_POST['facility_temp_no'];
- $facilityno = $_POST['facilityno'];
- $custom = $_POST['custom'];
- $site_manager = $_POST['site_manager'];
- $latitude = $_POST['latitude'];
- $longitude = $_POST['longitude'];
- $weight = $_POST['weight'];
- $numberofpassenger = $_POST['numberofpassenger'];
- $numberofstop = $_POST['numberofstop'];
- $numberoffloor = $_POST['numberoffloor'];
- $opentype = $_POST['opentype'];
- $speed = $_POST['speed'];
- $facility_kind = $_POST['facility_kind'];
- $address = $_POST['address'];
- $real_address = $_POST['real_address'];
- $contract_arrival_date = $_POST['contract_arrival_date'];
- $real_contract_arrival_date = $_POST['real_contract_arrival_date'];
- $sales_spec_verify = $_POST['sales_spec_verify'];
- $sales_spec_verify_at = $_POST['sales_spec_verify_at'] ?: $row['sales_spec_verify_at'];
- $sales_spec_verify_owner = $_POST['sales_spec_verify_owner'] ?: $row['sales_spec_verify_owner'];
- $real_custom_name = $_POST['real_custom_name'] ?: $row['real_custom_name'];
- $customer_planning_verify = $_POST['customer_planning_verify'];
- $customer_planning_verify_at = $_POST['customer_planning_verify_at'] ?: $row['customer_planning_verify_at'];
- $customer_planning_verify_owner = $_POST['customer_planning_verify_owner'] ?: $row['customer_planning_verify_owner'];
- $customer_color_verify = $_POST['customer_color_verify'];
- $customer_color_verify_at = $_POST['customer_color_verify_at'] ?: $row['customer_color_verify_at'];
- $customer_color_verify_owner = $_POST['customer_color_verify_owner'] ?: $row['customer_color_verify_owner'];
- $customer_style_verify = $_POST['customer_style_verify'];
- $customer_style_verify_at = $_POST['customer_style_verify_at'] ?: $row['customer_style_verify_at'];
- $customer_style_verify_owner = $_POST['customer_style_verify_owner'] ?: $row['customer_style_verify_owner'];
- $site_survey_contact_form_verify = $_POST['site_survey_contact_form_verify'];
- $site_survey_contact_form_verify_at = $_POST['site_survey_contact_form_verify_at'] ?: $row['site_survey_contact_form_verify_at'];
- $site_survey_contact_form_verify_owner = $_POST['site_survey_contact_form_verify_owner'] ?: $row['site_survey_contact_form_verify_owner'];
- $desin_spec_verify = $_POST['desin_spec_verify'];
- $desin_spec_verify_at = $_POST['desin_spec_verify_at'] ?: $row['desin_spec_verify_at'];
- $desin_spec_verify_owner = $_POST['desin_spec_verify_owner'] ?: $row['desin_spec_verify_owner'];
- $desin_planning_verify = $_POST['desin_planning_verify'];
- $desin_planning_verify_at = $_POST['desin_planning_verify_at'] ?: $row['desin_planning_verify_at'];
- $desin_planning_verify_owner = $_POST['desin_planning_verify_owner'] ?: $row['desin_planning_verify_owner'];
- $desin_color_verify = $_POST['desin_color_verify'];
- $desin_color_verify_at = $_POST['desin_color_verify_at'] ?: $row['desin_color_verify_at'];
- $desin_color_verify_owner = $_POST['desin_color_verify_owner'] ?: $row['desin_color_verify_owner'];
- $desin_style_verify = $_POST['desin_style_verify'];
- $desin_style_verify_at = $_POST['desin_style_verify_at'] ?: $row['desin_style_verify_at'];
- $desin_style_verify_owner = $_POST['desin_style_verify_owner'] ?: $row['desin_style_verify_owner'];
- $desin_leader_verify = $_POST['desin_leader_verify'];
- $desin_leader_verify_at = $_POST['desin_leader_verify_at'] ?: $row['desin_leader_verify_at'];
- $desin_leader_verify_owner = $_POST['desin_leader_verify_owner'] ?: $row['desin_leader_verify_owner'];
- $building_heigh_verify = $_POST['building_heigh_verify'];
- $building_heigh_verify_at = $_POST['building_heigh_verify_at'] ?: $row['building_heigh_verify_at'];
- $building_heigh_verify_owner = $_POST['building_heigh_verify_owner'] ?: $row['building_heigh_verify_owner'];
- $site_survey_contact_verify = $_POST['site_survey_contact_verify'];
- $site_survey_contact_verify_at = $_POST['site_survey_contact_verify_at'] ?: $row['site_survey_contact_verify_at'];
- $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'];
- $shengguanok_status = $_POST['shengguanok_status'];
- $shengguanok_status_at = $_POST['shengguanok_status_at'];
- $shengguanok_status_owner = $_POST['shengguanok_status_owner'] ?: $row['shengguanok_status_owner'];
- $prattford_order_date_verify = $_POST['prattford_order_date_verify'];
- $prattford_order_date = $_POST['prattford_order_date'];
- $prattford_order_date_owner = $_POST['prattford_order_date_owner'] ?: $row['prattford_order_date_owner'];
- $estimated_shipping_date_verify = $_POST['estimated_shipping_date_verify'];
- $estimated_shipping_date = $_POST['estimated_shipping_date'];
- $estimated_shipping_date_owner = $_POST['estimated_shipping_date_owner'] ?: $row['estimated_shipping_date_owner'];
- $estimated_shipping_schedule_date_verify = $_POST['estimated_shipping_schedule_date_verify'];
- $estimated_shipping_schedule_date = $_POST['estimated_shipping_schedule_date'];
- $estimated_shipping_schedule_date_owner = $_POST['estimated_shipping_schedule_date_owner'] ?: $row['estimated_shipping_schedule_date_owner'];
- $goods_type = $_POST['goods_type'] ?: $row['goods_type'];
- $goods_type_date = $_POST['goods_type_date'] ?: $row['goods_type_date'];
- $goods_type_owner = $_POST['goods_type_owner'] ?: $row['goods_type_owner'];
- $taiwan_goods_type = $_POST['taiwan_goods_type'] ?: $row['taiwan_goods_type'];
- $taiwan_goods_type_date = $_POST['taiwan_goods_type_date'];
- $taiwan_goods_type_owner = $_POST['taiwan_goods_type_owner'] ?: $row['taiwan_goods_type_owner'];
- $arrival_date_verify = $_POST['arrival_date_verify'] ?: $row['arrival_date_verify'];
- $actual_tofactory_date = $_POST['actual_tofactory_date'];
- $arrival_date_owner = $_POST['arrival_date_owner'] ?: $row['arrival_da
- te_owner'];
- $marketing_remark = $_POST['marketing_remark'] ?: $row['marketing_remark'];
- $desin_remark = $_POST['desin_remark'] ?: $row['desin_remark'];
- $desin_leader_remark = $_POST['desin_leader_remark'] ?: $row['desin_leader_remark'];
- $warehouse_remark = $_POST['warehouse_remark'] ?: $row['warehouse_remark'];
- $yewu_remark = $_POST['yewu_remark'] ?: $row['yewu_remark'];
- $shengguan_remark = $_POST['shengguan_remark'] ?: $row['shengguan_remark'];
- $desin_taiwan_items_no = json_encode($_POST['desin_taiwan_items_no'], JSON_UNESCAPED_UNICODE);
- $desin_taiwan_items_name = json_encode($_POST['desin_taiwan_items_name'], JSON_UNESCAPED_UNICODE);
+ $create_at = date("Y-m-d H:i:s");
+ $contractno = isset($_POST['contractno']) ? $_POST['contractno'] : $row['contractno'];
+ $facility_temp_no = isset($_POST['facility_temp_no']) ? $_POST['facility_temp_no'] : $row['facility_temp_no'];
+ $facilityno = isset($_POST['facilityno']) ? $_POST['facilityno'] : $row['facilityno'];
+ $custom = isset($_POST['custom']) ? $_POST['custom'] : $row['custom'];
+ $site_manager = isset($_POST['site_manager']) ? $_POST['site_manager'] : $row['site_manager'];
+ $latitude = isset($_POST['latitude']) ? $_POST['latitude'] : $row['latitude'];
+ $longitude = isset($_POST['longitude']) ? $_POST['longitude'] : $row['longitude'];
+ $weight = isset($_POST['weight']) ? $_POST['weight'] : $row['weight'];
+ $numberofpassenger = isset($_POST['numberofpassenger']) ? $_POST['numberofpassenger'] : $row['numberofpassenger'];
+ $numberofstop = isset($_POST['numberofstop']) ? $_POST['numberofstop'] : $row['numberofstop'];
+ $numberoffloor = isset($_POST['numberoffloor']) ? $_POST['numberoffloor'] : $row['numberoffloor'];
+ $opentype = isset($_POST['opentype']) ? $_POST['opentype'] : $row['opentype'];
+ $speed = isset($_POST['speed']) ? $_POST['speed'] : $row['speed'];
+ $facility_kind = isset($_POST['facility_kind']) ? $_POST['facility_kind'] : $row['facility_kind'];
+ $address = isset($_POST['address']) ? $_POST['address'] : $row['address'];
+ $real_address = isset($_POST['real_address']) ? $_POST['real_address'] : $row['real_address'];
+ $contract_arrival_date = isset($_POST['contract_arrival_date']) ? $_POST['contract_arrival_date'] : $row['contract_arrival_date'];
+ $real_contract_arrival_date = isset($_POST['real_contract_arrival_date']) ? $_POST['real_contract_arrival_date'] : $row['real_contract_arrival_date'];
+ $sales_spec_verify = isset($_POST['sales_spec_verify']) ? $_POST['sales_spec_verify'] : $row['sales_spec_verify'];
+ $sales_spec_verify_at = isset($_POST['sales_spec_verify_at']) ? $_POST['sales_spec_verify_at'] : $row['sales_spec_verify_at'];
+ $sales_spec_verify_owner = isset($_POST['sales_spec_verify_owner']) ? $_POST['sales_spec_verify_owner'] : $row['sales_spec_verify_owner'];
+ $real_custom_name = isset($_POST['real_custom_name']) ? $_POST['real_custom_name'] : $row['real_custom_name'];
+ $customer_planning_verify = isset($_POST['customer_planning_verify']) ? $_POST['customer_planning_verify'] : $row['customer_planning_verify'];
+ $customer_planning_verify_at = isset($_POST['customer_planning_verify_at']) ? $_POST['customer_planning_verify_at'] : $row['customer_planning_verify_at'];
+ $customer_planning_verify_owner = isset($_POST['customer_planning_verify_owner']) ? $_POST['customer_planning_verify_owner'] : $row['customer_planning_verify_owner'];
+ $customer_color_verify = isset($_POST['customer_color_verify']) ? $_POST['customer_color_verify'] : $row['customer_color_verify'];
+ $customer_color_verify_at = isset($_POST['customer_color_verify_at']) ? $_POST['customer_color_verify_at'] : $row['customer_color_verify_at'];
+ $customer_color_verify_owner = isset($_POST['customer_color_verify_owner']) ? $_POST['customer_color_verify_owner'] : $row['customer_color_verify_owner'];
+ $customer_style_verify = isset($_POST['customer_style_verify']) ? $_POST['customer_style_verify'] : $row['customer_style_verify'];
+ $customer_style_verify_at = isset($_POST['customer_style_verify_at']) ? $_POST['customer_style_verify_at'] : $row['customer_style_verify_at'];
+ $customer_style_verify_owner = isset($_POST['customer_style_verify_owner']) ? $_POST['customer_style_verify_owner'] : $row['customer_style_verify_owner'];
+ $site_survey_contact_form_verify = isset($_POST['site_survey_contact_form_verify']) ? $_POST['site_survey_contact_form_verify'] : $row['site_survey_contact_form_verify'];
+ $site_survey_contact_form_verify_at = isset($_POST['site_survey_contact_form_verify_at']) ? $_POST['site_survey_contact_form_verify_at'] : $row['site_survey_contact_form_verify_at'];
+ $site_survey_contact_form_verify_owner = isset($_POST['site_survey_contact_form_verify_owner']) ? $_POST['site_survey_contact_form_verify_owner'] : $row['site_survey_contact_form_verify_owner'];
+ $desin_spec_verify = isset($_POST['desin_spec_verify']) ? $_POST['desin_spec_verify'] : $row['desin_spec_verify'];
+ $desin_spec_verify_at = isset($_POST['desin_spec_verify_at']) ? $_POST['desin_spec_verify_at'] : $row['desin_spec_verify_at'];
+ $desin_spec_verify_owner = isset($_POST['desin_spec_verify_owner']) ? $_POST['desin_spec_verify_owner'] : $row['desin_spec_verify_owner'];
+ $desin_planning_verify = isset($_POST['desin_planning_verify']) ? $_POST['desin_planning_verify'] : $row['desin_planning_verify'];
+ $desin_planning_verify_at = isset($_POST['desin_planning_verify_at']) ? $_POST['desin_planning_verify_at'] : $row['desin_planning_verify_at'];
+ $desin_planning_verify_owner = isset($_POST['desin_planning_verify_owner']) ? $_POST['desin_planning_verify_owner'] : $row['desin_planning_verify_owner'];
+ $desin_color_verify = isset($_POST['desin_color_verify']) ? $_POST['desin_color_verify'] : $row['desin_color_verify'];
+ $desin_color_verify_at = isset($_POST['desin_color_verify_at']) ? $_POST['desin_color_verify_at'] : $row['desin_color_verify_at'];
+ $desin_color_verify_owner = isset($_POST['desin_color_verify_owner']) ? $_POST['desin_color_verify_owner'] : $row['desin_color_verify_owner'];
+ $desin_style_verify = isset($_POST['desin_style_verify']) ? $_POST['desin_style_verify'] : $row['desin_style_verify'];
+ $desin_style_verify_at = isset($_POST['desin_style_verify_at']) ? $_POST['desin_style_verify_at'] : $row['desin_style_verify_at'];
+ $desin_style_verify_owner = isset($_POST['desin_style_verify_owner']) ? $_POST['desin_style_verify_owner'] : $row['desin_style_verify_owner'];
+ $desin_leader_verify = isset($_POST['desin_leader_verify']) ? $_POST['desin_leader_verify'] : $row['desin_leader_verify'];
+ $desin_leader_verify_at = isset($_POST['desin_leader_verify_at']) ? $_POST['desin_leader_verify_at'] : $row['desin_leader_verify_at'];
+ $desin_leader_verify_owner = isset($_POST['desin_leader_verify_owner']) ? $_POST['desin_leader_verify_owner'] : $row['desin_leader_verify_owner'];
+ $building_heigh_verify = isset($_POST['building_heigh_verify']) ? $_POST['building_heigh_verify'] : $row['building_heigh_verify'];
+ $building_heigh_verify_at = isset($_POST['building_heigh_verify_at']) ? $_POST['building_heigh_verify_at'] : $row['building_heigh_verify_at'];
+ $building_heigh_verify_owner = isset($_POST['building_heigh_verify_owner']) ? $_POST['building_heigh_verify_owner'] : $row['building_heigh_verify_owner'];
+ $site_survey_contact_verify = isset($_POST['site_survey_contact_verify']) ? $_POST['site_survey_contact_verify'] : $row['site_survey_contact_verify'];
+ $site_survey_contact_verify_at = isset($_POST['site_survey_contact_verify_at']) ? $_POST['site_survey_contact_verify_at'] : $row['site_survey_contact_verify_at'];
+ $site_survey_contact_verify_owner = isset($_POST['site_survey_contact_verify_owner']) ? $_POST['site_survey_contact_verify_owner'] : $row['site_survey_contact_verify_owner'];
+ $old_site_survey_contact_verify = isset($_POST['old_site_survey_contact_verify']) ? $_POST['old_site_survey_contact_verify'] : $row['site_survey_contact_verify'];
+ $shengguanok_status = isset($_POST['shengguanok_status']) ? $_POST['shengguanok_status'] : $row['shengguanok_status'];
+ $shengguanok_status_at = isset($_POST['shengguanok_status_at']) ? $_POST['shengguanok_status_at'] : $row['shengguanok_status_at'];
+ $shengguanok_status_owner = isset($_POST['shengguanok_status_owner']) ? $_POST['shengguanok_status_owner'] : $row['shengguanok_status_owner'];
+ $prattford_order_date_verify = isset($_POST['prattford_order_date_verify']) ? $_POST['prattford_order_date_verify'] : $row['prattford_order_date_verify'];
+ $prattford_order_date = isset($_POST['prattford_order_date']) ? $_POST['prattford_order_date'] : $row['prattford_order_date'];
+ $prattford_order_date_owner = isset($_POST['prattford_order_date_owner']) ? $_POST['prattford_order_date_owner'] : $row['prattford_order_date_owner'];
+ $estimated_shipping_date_verify = isset($_POST['estimated_shipping_date_verify']) ? $_POST['estimated_shipping_date_verify'] : $row['estimated_shipping_date_verify'];
+ $estimated_shipping_date = isset($_POST['estimated_shipping_date']) ? $_POST['estimated_shipping_date'] : $row['estimated_shipping_date'];
+ $estimated_shipping_date_owner = isset($_POST['estimated_shipping_date_owner']) ? $_POST['estimated_shipping_date_owner'] : $row['estimated_shipping_date_owner'];
+ $estimated_shipping_schedule_date_verify = isset($_POST['estimated_shipping_schedule_date_verify']) ? $_POST['estimated_shipping_schedule_date_verify'] : $row['estimated_shipping_schedule_date_verify'];
+ $estimated_shipping_schedule_date = isset($_POST['estimated_shipping_schedule_date']) ? $_POST['estimated_shipping_schedule_date'] : $row['estimated_shipping_schedule_date'];
+ $estimated_shipping_schedule_date_owner = isset($_POST['estimated_shipping_schedule_date_owner']) ? $_POST['estimated_shipping_schedule_date_owner'] : $row['estimated_shipping_schedule_date_owner'];
+ $goods_type = isset($_POST['goods_type']) ? $_POST['goods_type'] : $row['goods_type'];
+ $goods_type_date = isset($_POST['goods_type_date']) ? $_POST['goods_type_date'] : $row['goods_type_date'];
+ $goods_type_owner = isset($_POST['goods_type_owner']) ? $_POST['goods_type_owner'] : $row['goods_type_owner'];
+ $taiwan_goods_type = isset($_POST['taiwan_goods_type']) ? $_POST['taiwan_goods_type'] : $row['taiwan_goods_type'];
+ $taiwan_goods_type_date = isset($_POST['taiwan_goods_type_date']) ? $_POST['taiwan_goods_type_date'] : $row['taiwan_goods_type_date'];
+ $taiwan_goods_type_owner = isset($_POST['taiwan_goods_type_owner']) ? $_POST['taiwan_goods_type_owner'] : $row['taiwan_goods_type_owner'];
+ $arrival_date_verify = isset($_POST['arrival_date_verify']) ? $_POST['arrival_date_verify'] : $row['arrival_date_verify'];
+ $actual_tofactory_date = isset($_POST['actual_tofactory_date']) ? $_POST['actual_tofactory_date'] : $row['actual_tofactory_date'];
+ $arrival_date_owner = isset($_POST['arrival_date_owner']) ? $_POST['arrival_date_owner'] : $row['arrival_date_owner'];
+ $marketing_remark = isset($_POST['marketing_remark']) ? $_POST['marketing_remark'] : $row['marketing_remark'];
+ $desin_remark = isset($_POST['desin_remark']) ? $_POST['desin_remark'] : $row['desin_remark'];
+ $desin_leader_remark = isset($_POST['desin_leader_remark']) ? $_POST['desin_leader_remark'] : $row['desin_leader_remark'];
+ $warehouse_remark = isset($_POST['warehouse_remark']) ? $_POST['warehouse_remark'] : $row['warehouse_remark'];
+ $yewu_remark = isset($_POST['yewu_remark']) ? $_POST['yewu_remark'] : $row['yewu_remark'];
+ $shengguan_remark = isset($_POST['shengguan_remark']) ? $_POST['shengguan_remark'] : $row['shengguan_remark'];
+ $qc_date = isset($_POST['qc_date']) ? $_POST['qc_date'] : $row['qc_date'];
+ $qc_date_owner = isset($_POST['qc_date_owner']) ? $_POST['qc_date_owner'] : $row['qc_date_owner'];
+ $end_qc_date = isset($_POST['end_qc_date']) ? $_POST['end_qc_date'] : $row['end_qc_date'];
+ $end_qc_date_owner = isset($_POST['end_qc_date_owner']) ? $_POST['end_qc_date_owner'] : $row['end_qc_date_owner'];
+ $official_check_date = isset($_POST['official_check_date']) ? $_POST['official_check_date'] : $row['official_check_date'];
+ $old_official_check_date = isset($_POST['old_official_check_date']) ? $_POST['old_official_check_date'] : $row['official_check_date'];
+ $official_check_date_owner = isset($_POST['official_check_date_owner']) ? $_POST['official_check_date_owner'] : $row['official_check_date_owner'];
+ $delivery_date = isset($_POST['delivery_date']) ? $_POST['delivery_date'] : $row['delivery_date'];
+ $old_delivery_date = isset($_POST['old_delivery_date']) ? $_POST['old_delivery_date'] : $row['delivery_date'];
+ $delivery_date_owner = isset($_POST['delivery_date_owner']) ? $_POST['delivery_date_owner'] : $row['delivery_date_owner'];
+ $qc_official_type = isset($_POST['qc_official_type']) ? $_POST['qc_official_type'] : $row['qc_official_type'];
+ $outsourcer_type = isset($_POST['outsourcer_type']) ? $_POST['outsourcer_type'] : $row['outsourcer_type'];
+ $install_outsourcer = isset($_POST['install_outsourcer']) ? $_POST['install_outsourcer'] : $row['install_outsourcer'];
+ $install_outsourcer_owner = isset($_POST['install_outsourcer_owner']) ? $_POST['install_outsourcer_owner'] : $row['install_outsourcer_owner'];
+ $install_outsourcer_date = isset($_POST['install_outsourcer_date']) ? $_POST['install_outsourcer_date'] : $row['install_outsourcer_date'];
+ $install_outsourcer_date_owner = isset($_POST['install_outsourcer_date_owner']) ? $_POST['install_outsourcer_date_owner'] : $row['install_outsourcer_date_owner'];
+ $estimate_install_start_date = isset($_POST['estimate_install_start_date']) ? $_POST['estimate_install_start_date'] : $row['estimate_install_start_date'];
+ $estimate_install_start_date_owner = isset($_POST['estimate_install_start_date_owner']) ? $_POST['estimate_install_start_date_owner'] : $row['estimate_install_start_date_owner'];
+ $estimate_install_end_date = isset($_POST['estimate_install_end_date']) ? $_POST['estimate_install_end_date'] : $row['estimate_install_end_date'];
+ $estimate_install_end_date_owner = isset($_POST['estimate_install_end_date_owner']) ? $_POST['estimate_install_end_date_owner'] : $row['estimate_install_end_date_owner'];
+ $tryrun_outsourcer = isset($_POST['tryrun_outsourcer']) ? $_POST['tryrun_outsourcer'] : $row['tryrun_outsourcer'];
+ $tryrun_outsourcer_owner = isset($_POST['tryrun_outsourcer_owner']) ? $_POST['tryrun_outsourcer_owner'] : $row['tryrun_outsourcer_owner'];
+ $tryrun_outsourcer_date = isset($_POST['tryrun_outsourcer_date']) ? $_POST['tryrun_outsourcer_date'] : $row['tryrun_outsourcer_date'];
+ $tryrun_outsourcer_date_owner = isset($_POST['tryrun_outsourcer_date_owner']) ? $_POST['tryrun_outsourcer_date_owner'] : $row['tryrun_outsourcer_date_owner'];
+ $estimate_tryrun_start_date = isset($_POST['estimate_tryrun_start_date']) ? $_POST['estimate_tryrun_start_date'] : $row['estimate_tryrun_start_date'];
+ $estimate_tryrun_start_date_owner = isset($_POST['estimate_tryrun_start_date_owner']) ? $_POST['estimate_tryrun_start_date_owner'] : $row['estimate_tryrun_start_date_owner'];
+ $estimate_tryrun_end_date = isset($_POST['estimate_tryrun_end_date']) ? $_POST['estimate_tryrun_end_date'] : $row['estimate_tryrun_end_date'];
+ $estimate_tryrun_end_date_owner = isset($_POST['estimate_tryrun_end_date_owner']) ? $_POST['estimate_tryrun_end_date_owner'] : $row['estimate_tryrun_end_date_owner'];
+ $warehouse_assistant_remark = isset($_POST['warehouse_assistant_remark']) ? $_POST['warehouse_assistant_remark'] : $row['warehouse_assistant_remark'];
+ $warehouseid = isset($_POST['warehouseid']) ? $_POST['warehouseid'] : $row['warehouseid'];
+ $old_warehouseid = isset($_POST['old_warehouseid']) ? $_POST['old_warehouseid'] : $row['warehouseid'];
+ $salesid = isset($_POST['salesid']) ? $_POST['salesid'] : $row['salesid'];
+ $install_start_date = isset($_POST['install_start_date']) ? $_POST['install_start_date'] : $row['install_start_date'];
+ $install_start_date_owner = isset($_POST['install_start_date_owner']) ? $_POST['install_start_date_owner'] : $row['install_start_date_owner'];
+ $install_end_date = isset($_POST['install_end_date']) ? $_POST['install_end_date'] : $row['install_end_date'];
+ $install_end_date_owner = isset($_POST['install_end_date_owner']) ? $_POST['install_end_date_owner'] : $row['install_end_date_owner'];
+ $tryrun_start_date = isset($_POST['tryrun_start_date']) ? $_POST['tryrun_start_date'] : $row['tryrun_start_date'];
+ $tryrun_start_date_owner = isset($_POST['tryrun_start_date_owner']) ? $_POST['tryrun_start_date_owner'] : $row['tryrun_start_date_owner'];
+ $tryrun_end_date = isset($_POST['tryrun_end_date']) ? $_POST['tryrun_end_date'] : $row['tryrun_end_date'];
+ $old_tryrun_end_date = isset($_POST['old_tryrun_end_date']) ? $_POST['old_tryrun_end_date'] : $row['tryrun_end_date'];
+ $tryrun_end_date_owner = isset($_POST['tryrun_end_date_owner']) ? $_POST['tryrun_end_date_owner'] : $row['tryrun_end_date_owner'];
+ $association_check_type = isset($_POST['association_check_type']) ? $_POST['association_check_type'] : $row['association_check_type'];
+ $old_delivery_date_file = isset($_POST['old_delivery_date_file']) ? $_POST['old_delivery_date_file'] : $row['delivery_date_file'];
+
+ $desin_taiwan_items_no = isset($_POST['desin_taiwan_items_no']) ? $_POST['desin_taiwan_items_no'] : "";
+ $desin_taiwan_items_name = isset($_POST['desin_taiwan_items_name']) ? $_POST['desin_taiwan_items_name'] : "";
+ $desin_taiwan_items_no = json_encode($desin_taiwan_items_no, JSON_UNESCAPED_UNICODE);
+ $desin_taiwan_items_name = json_encode($desin_taiwan_items_name, JSON_UNESCAPED_UNICODE);
$desin_taiwan_items_no = $desin_taiwan_items_no == 'null' ? null : $desin_taiwan_items_no;
$desin_taiwan_items_name = $desin_taiwan_items_name == 'null' ? null : $desin_taiwan_items_name;
- $qc_date = $_POST['qc_date'] ?: $row['qc_date'];
- $qc_date_owner = $_POST['qc_date_owner'] ?: $row['qc_date_owner'];
- $end_qc_date = $_POST['end_qc_date'] ?: $row['end_qc_date'];
- $end_qc_date_owner = $_POST['end_qc_date_owner'] ?: $row['end_qc_date_owner'];
- $official_check_date = $_POST['official_check_date'] ?: $row['official_check_date'];
- $old_official_check_date = $_POST['old_official_check_date'] ?: $row['old_official_check_date'];
- $official_check_date_owner = $_POST['official_check_date_owner'] ?: $row['official_check_date_owner'];
- $delivery_date = $_POST['delivery_date'] ?: $row['delivery_date'];
- $old_delivery_date = $_POST['old_delivery_date'] ?: $row['old_delivery_date'];
- $delivery_date_owner = $_POST['delivery_date_owner'] ?: $row['delivery_date_owner'];
- $qc_official_type = $_POST['qc_official_type'] ?: $row['qc_official_type'];
- $outsourcer_type = $_POST['outsourcer_type'];
- $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'];
- $warehouseid = $_POST['warehouseid'] ?: $row['warehouseid'];
- $old_warehouseid = $_POST['old_warehouseid'] ?: $row['warehouseid'];
- $salesid = $_POST['salesid'] ?: $row['salesid'];
- $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'];
- $old_tryrun_end_date = $_POST['old_tryrun_end_date'];
- $tryrun_end_date_owner = $_POST['tryrun_end_date_owner'];
- $association_check_type = $_POST['association_check_type'];
- $old_delivery_date_file = $_POST['old_delivery_date_file'];
$salesname = accountid2name($salesid)[$salesid];
$salesmail = accountid2email([$salesid])[$salesid];
- // $creater = $_POST['creater'];
$creater = $user_id;
$create_at = date("Y-m-d H:i:s");
@@ -355,7 +357,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$end_qc_date = isset($_POST['end_qc_date2']) ? $_POST['end_qc_date2'] : $end_qc_date;
$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'] : $official_check_date;
- $old_official_check_date = isset($_POST['old_official_check_date2']) ? $_POST['old_official_check_date2'] : $old_official_check_date;
+ $old_official_check_date = isset($_POST['old_official_check_date2']) ? $_POST['official_check_date'] : $old_official_check_date;
$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'] : $delivery_date;
@@ -697,9 +699,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
// 當試車完工日更改時 發出通知
- if (!empty($tryrun_end_date) || !empty($tryrun_end_date2)) {
- if ($tryrun_end_date !== $old_tryrun_end_date || $tryrun_end_date2 !== $old_tryrun_end_date) {
- $tryrun_end_date_tmp = $tryrun_end_date !== $old_tryrun_end_date ? $tryrun_end_date : $tryrun_end_date2;
+ if (!empty($tryrun_end_date)) {
+ if ($tryrun_end_date !== $old_tryrun_end_date) {
$mail_title = "作番大日程(新梯)合約號:" . $contractno . "作番號:" . $facilityno . "客戶名稱:" . $custom . "-試車已完成通知";
$mail_content = "作番大日程(新梯)
合約號:" . $contractno . "
@@ -717,7 +718,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
[
accountid2name(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)],
accountid2email(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)]
- ]
+ ],
+ ['張崇傑', 'jaychang@masada.com.tw'],
+ ['賴定國', 'guo@masada.com.tw']
// ['gary', 'gary_chen@masada.com.tw']
],
"永佳捷科技"
diff --git a/wms/wipwhole-rec-invoice-edit.php b/wms/wipwhole-rec-invoice-edit.php
index 87528efb..0e1f6cd2 100644
--- a/wms/wipwhole-rec-invoice-edit.php
+++ b/wms/wipwhole-rec-invoice-edit.php
@@ -567,6 +567,10 @@ include "wipwhole-rec-invoice-edit-submit.php";
若無工勘資料請勿移交至設計階段!
+
+
diff --git a/wms/wipwhole-renovate-index-export-excel.php b/wms/wipwhole-renovate-index-export-excel.php
index f651773f..b8cc7551 100644
--- a/wms/wipwhole-renovate-index-export-excel.php
+++ b/wms/wipwhole-renovate-index-export-excel.php
@@ -123,7 +123,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
'台灣自理項目(發貨類別)',
'台灣自理項目(發貨類別)日期',
'實際到貨日(到觀音廠日)',
- '實際到貨日(到觀音廠日)日期'
+ '實際到貨日(到觀音廠日)日期',
+ '安裝圖上傳狀態',
+ '完工驗收單上傳狀態',
+ '移交日附件(核准函)上傳狀態'
];
$sheet->setTitle('作番大日程(汰改)');
for ($i = 0; $i < count($colArr); $i++) {
@@ -348,6 +351,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
substr($row['taiwan_goods_type_date'], 0, 10),
$arrival_date_verify_status,
substr($row['actual_tofactory_date'], 0, 10),
+ empty($row['plan_diagram_file']) ? "無" : "已上傳",
+ empty($row['completion_acceptance_file']) ? "無" : "已上傳",
+ empty($row['delivery_date_file']) ? "無" : "已上傳"
];
for ($j = 0; $j < count($colContentArr); $j++)
$sheet->setCellValue($colArr[$j] . $i, $colContentArr[$j]);
diff --git a/wms/wipwhole-renovate-index-function.php b/wms/wipwhole-renovate-index-function.php
index e3b997d6..8fdc1ea6 100644
--- a/wms/wipwhole-renovate-index-function.php
+++ b/wms/wipwhole-renovate-index-function.php
@@ -298,7 +298,8 @@ function getWipwholeSearchSql()
$area_no = empty($_REQUEST['area_no']) ? null : trim($_REQUEST['area_no']);
$sql = "";
- $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
+ $sql .= empty($area_no) ? "" : " AND area_no = '$area_no' ";
+ // $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
$sql .= empty($contractno) ? "" : " AND contractno LIKE '%$contractno%' ";
$sql .= empty($facilityno) ? "" : " AND facilityno LIKE '%$facilityno%' ";
$sql .= empty($custom) ? "" : " AND custom LIKE '%$custom%' ";
@@ -544,7 +545,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -557,7 +559,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -570,7 +573,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -583,7 +587,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -822,7 +827,8 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
AND flow_code IN ('$flow_code')
)
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -843,7 +849,8 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
AND flow_code IN ('$flow_code')
)
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -864,7 +871,8 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
AND flow_code IN ('$flow_code')
)
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -885,7 +893,8 @@ function getDataSqlByflowCode($department_id, $role_id, $user_id, $flow_code)
AND flow_code IN ('$flow_code')
)
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
diff --git a/wms/wipwhole-renovate-rec-invoice-edit-submit.php b/wms/wipwhole-renovate-rec-invoice-edit-submit.php
index cb3c4371..6e596d9d 100644
--- a/wms/wipwhole-renovate-rec-invoice-edit-submit.php
+++ b/wms/wipwhole-renovate-rec-invoice-edit-submit.php
@@ -13,135 +13,136 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
$datetime = date("Y-m-d H:i:s");
$create_at = date("Y-m-d H:i:s");
- $contractno = $_POST['contractno'];
- $facility_temp_no = $_POST['facility_temp_no'];
+ $contractno = isset($_POST['contractno']) ? $_POST['contractno'] : $row['contractno'];
+ $facility_temp_no = isset($_POST['facility_temp_no']) ? $_POST['facility_temp_no'] : $row['facility_temp_no'];
+ $facilityno = isset($_POST['facilityno']) ? $_POST['facilityno'] : $row['facilityno'];
+ $custom = isset($_POST['custom']) ? $_POST['custom'] : $row['custom'];
+ $site_manager = isset($_POST['site_manager']) ? $_POST['site_manager'] : $row['site_manager'];
+ $latitude = isset($_POST['latitude']) ? $_POST['latitude'] : $row['latitude'];
+ $longitude = isset($_POST['longitude']) ? $_POST['longitude'] : $row['longitude'];
+ $weight = isset($_POST['weight']) ? $_POST['weight'] : $row['weight'];
+ $numberofpassenger = isset($_POST['numberofpassenger']) ? $_POST['numberofpassenger'] : $row['numberofpassenger'];
+ $numberofstop = isset($_POST['numberofstop']) ? $_POST['numberofstop'] : $row['numberofstop'];
+ $numberoffloor = isset($_POST['numberoffloor']) ? $_POST['numberoffloor'] : $row['numberoffloor'];
+ $opentype = isset($_POST['opentype']) ? $_POST['opentype'] : $row['opentype'];
+ $speed = isset($_POST['speed']) ? $_POST['speed'] : $row['speed'];
+ $facility_kind = isset($_POST['facility_kind']) ? $_POST['facility_kind'] : $row['facility_kind'];
+ $address = isset($_POST['address']) ? $_POST['address'] : $row['address'];
+ $real_address = isset($_POST['real_address']) ? $_POST['real_address'] : $row['real_address'];
+ $contract_arrival_date = isset($_POST['contract_arrival_date']) ? $_POST['contract_arrival_date'] : $row['contract_arrival_date'];;
+ $real_contract_arrival_date = isset($_POST['real_contract_arrival_date']) ? $_POST['real_contract_arrival_date'] : $row['real_contract_arrival_date'];
+ $sales_spec_verify = isset($_POST['sales_spec_verify']) ? $_POST['sales_spec_verify'] : $row['sales_spec_verify'];
+ $sales_spec_verify_at = isset($_POST['sales_spec_verify_at']) ? $_POST['sales_spec_verify_at'] : $row['sales_spec_verify_at'];
+ $sales_spec_verify_owner = isset($_POST['sales_spec_verify_owner']) ? $_POST['sales_spec_verify_owner'] : $row['sales_spec_verify_owner'];
+ $customer_color_verify = isset($_POST['customer_color_verify']) ? $_POST['customer_color_verify'] : $row['customer_color_verify'];
+ $customer_color_verify_at = isset($_POST['customer_color_verify_at']) ? $_POST['customer_color_verify_at'] : $row['customer_color_verify_at'];
+ $customer_color_verify_owner = isset($_POST['customer_color_verify_owner']) ? $_POST['customer_color_verify_owner'] : $row['customer_color_verify_owner'];
+ $customer_style_verify = isset($_POST['customer_style_verify']) ? $_POST['customer_style_verify'] : $row['customer_style_verify'];
+ $customer_style_verify_at = isset($_POST['customer_style_verify_at']) ? $_POST['customer_style_verify_at'] : $row['customer_style_verify_at'];
+ $customer_style_verify_owner = isset($_POST['customer_style_verify_owner']) ? $_POST['customer_style_verify_owner'] : $row['customer_style_verify_owner'];
+ $site_survey_contact_form_verify = isset($_POST['site_survey_contact_form_verify']) ? $_POST['site_survey_contact_form_verify'] : $row['site_survey_contact_form_verify'];
+ $site_survey_contact_form_verify_at = isset($_POST['site_survey_contact_form_verify_at']) ? $_POST['site_survey_contact_form_verify_at'] : $row['site_survey_contact_form_verify_at'];
+ $site_survey_contact_form_verify_owner = isset($_POST['site_survey_contact_form_verify_owner']) ? $_POST['site_survey_contact_form_verify_owner'] : $row['site_survey_contact_form_verify_owner'];
+ $desin_spec_verify = isset($_POST['desin_spec_verify']) ? $_POST['desin_spec_verify'] : $row['desin_spec_verify'];
+ $desin_spec_verify_at = isset($_POST['desin_spec_verify_at']) ? $_POST['desin_spec_verify_at'] : $row['desin_spec_verify_at'];
+ $desin_spec_verify_owner = isset($_POST['desin_spec_verify_owner']) ? $_POST['desin_spec_verify_owner'] : $row['desin_spec_verify_owner'];
+ $desin_planning_verify = isset($_POST['desin_planning_verify']) ? $_POST['desin_planning_verify'] : $row['desin_planning_verify'];
+ $desin_planning_verify_at = isset($_POST['desin_planning_verify_at']) ? $_POST['desin_planning_verify_at'] : $row['desin_planning_verify_at'];
+ $desin_planning_verify_owner = isset($_POST['desin_planning_verify_owner']) ? $_POST['desin_planning_verify_owner'] : $row['desin_planning_verify_owner'];
+ $desin_color_verify = isset($_POST['desin_color_verify']) ? $_POST['desin_color_verify'] : $row['desin_color_verify'];
+ $desin_color_verify_at = isset($_POST['desin_color_verify_at']) ? $_POST['desin_color_verify_at'] : $row['desin_color_verify_at'];
+ $desin_color_verify_owner = isset($_POST['desin_color_verify_owner']) ? $_POST['desin_color_verify_owner'] : $row['desin_color_verify_owner'];
+ $desin_style_verify = isset($_POST['desin_style_verify']) ? $_POST['desin_style_verify'] : $row['desin_style_verify'];
+ $desin_style_verify_at = isset($_POST['desin_style_verify_at']) ? $_POST['desin_style_verify_at'] : $row['desin_style_verify_at'];
+ $desin_style_verify_owner = isset($_POST['desin_style_verify_owner']) ? $_POST['desin_style_verify_owner'] : $row['desin_style_verify_owner'];
+ $desin_leader_verify = isset($_POST['desin_leader_verify']) ? $_POST['desin_leader_verify'] : $row['desin_leader_verify'];
+ $desin_leader_verify_at = isset($_POST['desin_leader_verify_at']) ? $_POST['desin_leader_verify_at'] : $row['desin_leader_verify_at'];
+ $desin_leader_verify_owner = isset($_POST['desin_leader_verify_owner']) ? $_POST['desin_leader_verify_owner'] : $row['desin_leader_verify_owner'];
+ $building_heigh_verify = isset($_POST['building_heigh_verify']) ? $_POST['building_heigh_verify'] : $row['building_heigh_verify'];
+ $building_heigh_verify_at = isset($_POST['building_heigh_verify_at']) ? $_POST['building_heigh_verify_at'] : $row['building_heigh_verify_at'];
+ $building_heigh_verify_owner = isset($_POST['building_heigh_verify_owner']) ? $_POST['building_heigh_verify_owner'] : $row['building_heigh_verify_owner'];
+ $customer_planning_verify = isset($_POST['customer_planning_verify']) ? $_POST['customer_planning_verify'] : $row['customer_planning_verify'];
+ $customer_planning_verify_at = isset($_POST['customer_planning_verify_at']) ? $_POST['customer_planning_verify_at'] : $row['customer_planning_verify_at'];
+ $customer_planning_verify_owner = isset($_POST['customer_planning_verify_owner']) ? $_POST['customer_planning_verify_owner'] : $row['customer_planning_verify_owner'];
+ $site_survey_contact_verify = isset($_POST['site_survey_contact_verify']) ? $_POST['site_survey_contact_verify'] : $row['site_survey_contact_verify'];
+ $site_survey_contact_verify_at = isset($_POST['site_survey_contact_verify_at']) ? $_POST['site_survey_contact_verify_at'] : $row['site_survey_contact_verify_at'];
+ $site_survey_contact_verify_owner = isset($_POST['site_survey_contact_verify_owner']) ? $_POST['site_survey_contact_verify_owner'] : $row['site_survey_contact_verify_owner'];
+ $old_site_survey_contact_verify = isset($_POST['old_site_survey_contact_verify']) ? $_POST['old_site_survey_contact_verify'] : $row['site_survey_contact_verify_owner'];
+ $outsourcer_type = isset($_POST['outsourcer_type']) ? $_POST['outsourcer_type'] : $row['outsourcer_type'];
+ $install_outsourcer = isset($_POST['install_outsourcer']) ? $_POST['install_outsourcer'] : $row['install_outsourcer'];
+ $install_outsourcer_owner = isset($_POST['install_outsourcer_owner']) ? $_POST['install_outsourcer_owner'] : $row['install_outsourcer_owner'];
+ $install_outsourcer_date = isset($_POST['install_outsourcer_date']) ? $_POST['install_outsourcer_date'] : $row['install_outsourcer_date'];
+ $install_outsourcer_date_owner = isset($_POST['install_outsourcer_date_owner']) ? $_POST['install_outsourcer_date_owner'] : $row['install_outsourcer_date_owner'];
+ $estimate_install_start_date = isset($_POST['estimate_install_start_date']) ? $_POST['estimate_install_start_date'] : $row['estimate_install_start_date'];
+ $estimate_install_start_date_owner = isset($_POST['estimate_install_start_date_owner']) ? $_POST['estimate_install_start_date_owner'] : $row['estimate_install_start_date_owner'];
+ $estimate_install_end_date = isset($_POST['estimate_install_end_date']) ? $_POST['estimate_install_end_date'] : $row['estimate_install_end_date'];
+ $estimate_install_end_date_owner = isset($_POST['estimate_install_end_date_owner']) ? $_POST['estimate_install_end_date_owner'] : $row['estimate_install_end_date_owner'];
+ $tryrun_outsourcer = isset($_POST['tryrun_outsourcer']) ? $_POST['tryrun_outsourcer'] : $row['tryrun_outsourcer'];
+ $tryrun_outsourcer_owner = isset($_POST['tryrun_outsourcer_owner']) ? $_POST['tryrun_outsourcer_owner'] : $row['tryrun_outsourcer_owner'];
+ $tryrun_outsourcer_date = isset($_POST['tryrun_outsourcer_date']) ? $_POST['tryrun_outsourcer_date'] : $row['tryrun_outsourcer_date'];
+ $tryrun_outsourcer_date_owner = isset($_POST['tryrun_outsourcer_date_owner']) ? $_POST['tryrun_outsourcer_date_owner'] : $row['tryrun_outsourcer_date_owner'];
+ $estimate_tryrun_start_date = isset($_POST['estimate_tryrun_start_date']) ? $_POST['estimate_tryrun_start_date'] : $row['estimate_tryrun_start_date'];
+ $estimate_tryrun_start_date_owner = isset($_POST['estimate_tryrun_start_date_owner']) ? $_POST['estimate_tryrun_start_date_owner'] : $row['estimate_tryrun_start_date_owner'];
+ $estimate_tryrun_end_date = isset($_POST['estimate_tryrun_end_date']) ? $_POST['estimate_tryrun_end_date'] : $row['estimate_tryrun_end_date'];
+ $estimate_tryrun_end_date_owner = isset($_POST['estimate_tryrun_end_date_owner']) ? $_POST['estimate_tryrun_end_date_owner'] : $row['estimate_tryrun_end_date_owner'];
+ $warehouse_assistant_remark = isset($_POST['warehouse_assistant_remark']) ? $_POST['warehouse_assistant_remark'] : $row['warehouse_assistant_remark'];
+ $shengguanok_status = isset($_POST['shengguanok_status']) ? $_POST['shengguanok_status'] : $row['shengguanok_status'];
+ $shengguanok_status_at = isset($_POST['shengguanok_status_at']) ? $_POST['shengguanok_status_at'] : $row['shengguanok_status_at'];
+ $shengguanok_status_owner = isset($_POST['shengguanok_status_owner']) ? $_POST['shengguanok_status_owner'] : $row['shengguanok_status_owner'];
+ $prattford_order_date_verify = isset($_POST['prattford_order_date_verify']) ? $_POST['prattford_order_date_verify'] : $row['prattford_order_date_verify'];
+ $prattford_order_date = isset($_POST['prattford_order_date']) ? $_POST['prattford_order_date'] : $row['prattford_order_date'];
+ $prattford_order_date_owner = isset($_POST['prattford_order_date_owner']) ? $_POST['prattford_order_date_owner'] : $row['prattford_order_date_owner'];
+ $estimated_shipping_date_verify = isset($_POST['estimated_shipping_date_verify']) ? $_POST['estimated_shipping_date_verify'] : $row['estimated_shipping_date_verify'];
+ $estimated_shipping_date = isset($_POST['estimated_shipping_date']) ? $_POST['estimated_shipping_date'] : $row['estimated_shipping_date'];
+ $estimated_shipping_date_owner = isset($_POST['estimated_shipping_date_owner']) ? $_POST['estimated_shipping_date_owner'] : $row['estimated_shipping_date_owner'];
+ $estimated_shipping_schedule_date_verify = isset($_POST['estimated_shipping_schedule_date_verify']) ? $_POST['estimated_shipping_schedule_date_verify'] : $row['estimated_shipping_schedule_date_verify'];
+ $estimated_shipping_schedule_date = isset($_POST['estimated_shipping_schedule_date']) ? $_POST['estimated_shipping_schedule_date'] : $row['estimated_shipping_schedule_date'];
+ $estimated_shipping_schedule_date_owner = isset($_POST['estimated_shipping_schedule_date_owner']) ? $_POST['estimated_shipping_schedule_date_owner'] : $row['estimated_shipping_schedule_date_owner'];
+ $goods_type = isset($_POST['goods_type']) ? $_POST['goods_type'] : $row['goods_type'];
+ $goods_type_date = isset($_POST['goods_type_date']) ? $_POST['goods_type_date'] : $row['goods_type_date'];
+ $goods_type_owner = isset($_POST['goods_type_owner']) ? $_POST['goods_type_owner'] : $row['goods_type_owner'];
+ $taiwan_goods_type = isset($_POST['taiwan_goods_type']) ? $_POST['taiwan_goods_type'] : $row['taiwan_goods_type'];
+ $taiwan_goods_type_date = isset($_POST['taiwan_goods_type_date']) ? $_POST['taiwan_goods_type_date'] : $row['taiwan_goods_type_date'];
+ $taiwan_goods_type_owner = isset($_POST['taiwan_goods_type_owner']) ? $_POST['taiwan_goods_type_owner'] : $row['taiwan_goods_type_owner'];
+ $arrival_date_verify = isset($_POST['arrival_date_verify']) ? $_POST['arrival_date_verify'] : $row['arrival_date_verify'];
+ $actual_tofactory_date = isset($_POST['actual_tofactory_date']) ? $_POST['actual_tofactory_date'] : $row['actual_tofactory_date'];
+ $arrival_date_owner = isset($_POST['arrival_date_owner']) ? $_POST['arrival_date_owner'] : $row['arrival_date_owner'];
+ $marketing_remark = isset($_POST['marketing_remark']) ? $_POST['marketing_remark'] : $row['marketing_remark'];
+ $desin_remark = isset($_POST['desin_remark']) ? $_POST['desin_remark'] : $row['desin_remark'];
+ $desin_leader_remark = isset($_POST['desin_leader_remark']) ? $_POST['desin_leader_remark'] : $row['desin_leader_remark'];
+ $warehouse_remark = isset($_POST['warehouse_remark']) ? $_POST['warehouse_remark'] : $row['warehouse_remark'];
+ $yewu_remark = isset($_POST['yewu_remark']) ? $_POST['yewu_remark'] : $row['yewu_remark'];
+ $shengguan_remark = isset($_POST['shengguan_remark']) ? $_POST['shengguan_remark'] : $row['shengguan_remark'];
+ $qc_date = isset($_POST['qc_date']) ? $_POST['qc_date'] : $row['qc_date'];
+ $qc_date_owner = isset($_POST['qc_date_owner']) ? $_POST['qc_date_owner'] : $row['qc_date_owner'];
+ $end_qc_date = isset($_POST['end_qc_date']) ? $_POST['end_qc_date'] : $row['end_qc_date'];
+ $end_qc_date_owner = isset($_POST['end_qc_date_owner']) ? $_POST['end_qc_date_owner'] : $row['end_qc_date_owner'];
+ $official_check_date = isset($_POST['official_check_date']) ? $_POST['official_check_date'] : $row['official_check_date'];
+ $old_official_check_date = isset($_POST['old_official_check_date']) ? $_POST['old_official_check_date'] : $row['official_check_date'];
+ $official_check_date_owner = isset($_POST['official_check_date_owner']) ? $_POST['official_check_date_owner'] : $row['official_check_date_owner'];
+ $delivery_date = isset($_POST['delivery_date']) ? $_POST['delivery_date'] : $row['delivery_date'];
+ $old_delivery_date = isset($_POST['old_delivery_date']) ? $_POST['old_delivery_date'] : $row['delivery_date'];
+ $delivery_date_owner = isset($_POST['delivery_date_owner']) ? $_POST['delivery_date_owner'] : $row['delivery_date_owner'];
+ $salesid = isset($_POST['salesid']) ? $_POST['salesid'] : $row['salesid'];
+ $warehouseid = isset($_POST['warehouseid']) ? $_POST['warehouseid'] : $row['warehouseid'];
+ $old_warehouseid = isset($_POST['old_warehouseid']) ? $_POST['old_warehouseid'] : $row['warehouseid'];
+ $association_check_type = isset($_POST['association_check_type']) ? $_POST['association_check_type'] : $row['association_check_type'];
+ $install_start_date = isset($_POST['install_start_date']) ? $_POST['install_start_date'] : $row['install_start_date'];
+ $install_start_date_owner = isset($_POST['install_start_date_owner']) ? $_POST['install_start_date_owner'] : $row['install_start_date_owner'];
+ $install_end_date = isset($_POST['install_end_date']) ? $_POST['install_end_date'] : $row['install_end_date'];
+ $install_end_date_owner = isset($_POST['install_end_date_owner']) ? $_POST['install_end_date_owner'] : $row['install_end_date_owner'];
+ $tryrun_start_date = isset($_POST['tryrun_start_date']) ? $_POST['tryrun_start_date'] : $row['tryrun_start_date'];
+ $tryrun_start_date_owner = isset($_POST['tryrun_start_date_owner']) ? $_POST['tryrun_start_date_owner'] : $row['tryrun_start_date_owner'];
+ $tryrun_end_date = isset($_POST['tryrun_end_date']) ? $_POST['tryrun_end_date'] : $row['tryrun_end_date'];
+ $old_tryrun_end_date = isset($_POST['old_tryrun_end_date']) ? $_POST['old_tryrun_end_date'] : $row['tryrun_end_date'];
+ $tryrun_end_date_owner = isset($_POST['tryrun_end_date_owner']) ? $_POST['tryrun_end_date_owner'] : $row['tryrun_end_date_owner'];
+ $old_delivery_date_file = isset($_POST['old_delivery_date_file']) ? $_POST['old_delivery_date_file'] : $row['delivery_date_file'];
+
$renovate_type = json_encode($_POST['renovate_type'], JSON_UNESCAPED_UNICODE);
- $facilityno = $_POST['facilityno'];
- $custom = $_POST['custom'];
- $site_manager = $_POST['site_manager'];
- $latitude = $_POST['latitude'];
- $longitude = $_POST['longitude'];
- $weight = $_POST['weight'];
- $numberofpassenger = $_POST['numberofpassenger'];
- $numberofstop = $_POST['numberofstop'];
- $numberoffloor = $_POST['numberoffloor'];
- $opentype = $_POST['opentype'];
- $speed = $_POST['speed'];
- $facility_kind = $_POST['facility_kind'];
- $address = $_POST['address'];
- $real_address = $_POST['real_address'];
- $contract_arrival_date = $_POST['contract_arrival_date'];
- $real_contract_arrival_date = $_POST['real_contract_arrival_date'];
- $sales_spec_verify = $_POST['sales_spec_verify'];
- $sales_spec_verify_at = $_POST['sales_spec_verify_at'] ?: $row['sales_spec_verify_at'];
- $sales_spec_verify_owner = $_POST['sales_spec_verify_owner'] ?: $row['sales_spec_verify_owner'];
- $customer_color_verify = $_POST['customer_color_verify'];
- $customer_color_verify_at = $_POST['customer_color_verify_at'] ?: $row['customer_color_verify_at'];
- $customer_color_verify_owner = $_POST['customer_color_verify_owner'] ?: $row['customer_color_verify_owner'];
- $customer_style_verify = $_POST['customer_style_verify'];
- $customer_style_verify_at = $_POST['customer_style_verify_at'] ?: $row['customer_style_verify_at'];
- $customer_style_verify_owner = $_POST['customer_style_verify_owner'] ?: $row['customer_style_verify_owner'];
- $site_survey_contact_form_verify = $_POST['site_survey_contact_form_verify'];
- $site_survey_contact_form_verify_at = $_POST['site_survey_contact_form_verify_at'] ?: $row['site_survey_contact_form_verify_at'];
- $site_survey_contact_form_verify_owner = $_POST['site_survey_contact_form_verify_owner'] ?: $row['site_survey_contact_form_verify_owner'];
- $desin_spec_verify = $_POST['desin_spec_verify'];
- $desin_spec_verify_at = $_POST['desin_spec_verify_at'] ?: $row['desin_spec_verify_at'];
- $desin_spec_verify_owner = $_POST['desin_spec_verify_owner'] ?: $row['desin_spec_verify_owner'];
- $desin_planning_verify = $_POST['desin_planning_verify'];
- $desin_planning_verify_at = $_POST['desin_planning_verify_at'] ?: $row['desin_planning_verify_at'];
- $desin_planning_verify_owner = $_POST['desin_planning_verify_owner'] ?: $row['desin_planning_verify_owner'];
- $desin_color_verify = $_POST['desin_color_verify'];
- $desin_color_verify_at = $_POST['desin_color_verify_at'] ?: $row['desin_color_verify_at'];
- $desin_color_verify_owner = $_POST['desin_color_verify_owner'] ?: $row['desin_color_verify_owner'];
- $desin_style_verify = $_POST['desin_style_verify'];
- $desin_style_verify_at = $_POST['desin_style_verify_at'] ?: $row['desin_style_verify_at'];
- $desin_style_verify_owner = $_POST['desin_style_verify_owner'] ?: $row['desin_style_verify_owner'];
- $desin_leader_verify = $_POST['desin_leader_verify'];
- $desin_leader_verify_at = $_POST['desin_leader_verify_at'] ?: $row['desin_leader_verify_at'];
- $desin_leader_verify_owner = $_POST['desin_leader_verify_owner'] ?: $row['desin_leader_verify_owner'];
- $building_heigh_verify = $_POST['building_heigh_verify'];
- $building_heigh_verify_at = $_POST['building_heigh_verify_at'] ?: $row['building_heigh_verify_at'];
- $building_heigh_verify_owner = $_POST['building_heigh_verify_owner'] ?: $row['building_heigh_verify_owner'];
- $customer_planning_verify = $_POST['customer_planning_verify'];
- $customer_planning_verify_at = $_POST['customer_planning_verify_at'] ?: $row['customer_planning_verify_at'];
- $customer_planning_verify_owner = $_POST['customer_planning_verify_owner'] ?: $row['customer_planning_verify_owner'];
- $site_survey_contact_verify = $_POST['site_survey_contact_verify'];
- $site_survey_contact_verify_at = $_POST['site_survey_contact_verify_at'] ?: $row['site_survey_contact_verify_at'];
- $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'];
- $outsourcer_type = $_POST['outsourcer_type'];
- $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'];
- $shengguanok_status = $_POST['shengguanok_status'];
- $shengguanok_status_at = $_POST['shengguanok_status_at'];
- $shengguanok_status_owner = $_POST['shengguanok_status_owner'] ?: $row['shengguanok_status_owner'];
- $prattford_order_date_verify = $_POST['prattford_order_date_verify'];
- $prattford_order_date = $_POST['prattford_order_date'];
- $prattford_order_date_owner = $_POST['prattford_order_date_owner'] ?: $row['prattford_order_date_owner'];
- $estimated_shipping_date_verify = $_POST['estimated_shipping_date_verify'];
- $estimated_shipping_date = $_POST['estimated_shipping_date'];
- $estimated_shipping_date_owner = $_POST['estimated_shipping_date_owner'] ?: $row['estimated_shipping_date_owner'];
- $estimated_shipping_schedule_date_verify = $_POST['estimated_shipping_schedule_date_verify'];
- $estimated_shipping_schedule_date = $_POST['estimated_shipping_schedule_date'];
- $estimated_shipping_schedule_date_owner = $_POST['estimated_shipping_schedule_date_owner'] ?: $row['estimated_shipping_schedule_date_owner'];
- $goods_type = $_POST['goods_type'] ?: $row['goods_type'];
- $goods_type_date = $_POST['goods_type_date'];
- $goods_type_owner = $_POST['goods_type_owner'] ?: $row['goods_type_owner'];
- $taiwan_goods_type = $_POST['taiwan_goods_type'] ?: $row['taiwan_goods_type'];
- $taiwan_goods_type_date = $_POST['taiwan_goods_type_date'];
- $taiwan_goods_type_owner = $_POST['taiwan_goods_type_owner'] ?: $row['taiwan_goods_type_owner'];
- $arrival_date_verify = $_POST['arrival_date_verify'] ?: $row['arrival_date_verify'];
- $actual_tofactory_date = $_POST['actual_tofactory_date'];
- $arrival_date_owner = $_POST['arrival_date_owner'] ?: $row['arrival_date_owner'];
- $marketing_remark = $_POST['marketing_remark'] ?: $row['marketing_remark'];
- $desin_remark = $_POST['desin_remark'] ?: $row['desin_remark'];
- $desin_leader_remark = $_POST['desin_leader_remark'] ?: $row['desin_leader_remark'];
- $warehouse_remark = $_POST['warehouse_remark'] ?: $row['warehouse_remark'];
- $yewu_remark = $_POST['yewu_remark'] ?: $row['yewu_remark'];
- $shengguan_remark = $_POST['shengguan_remark'] ?: $row['shengguan_remark'];
$desin_taiwan_items_no = json_encode($_POST['desin_taiwan_items_no'], JSON_UNESCAPED_UNICODE);
$desin_taiwan_items_name = json_encode($_POST['desin_taiwan_items_name'], JSON_UNESCAPED_UNICODE);
$desin_taiwan_items_no = $desin_taiwan_items_no == 'null' ? null : $desin_taiwan_items_no;
$desin_taiwan_items_name = $desin_taiwan_items_name == 'null' ? null : $desin_taiwan_items_name;
- $qc_date = $_POST['qc_date'] ?: $row['qc_date'];
- $qc_date_owner = $_POST['qc_date_owner'] ?: $row['qc_date_owner'];
- $end_qc_date = $_POST['end_qc_date'] ?: $row['end_qc_date'];
- $end_qc_date_owner = $_POST['end_qc_date_owner'] ?: $row['end_qc_date_owner'];
- $official_check_date = $_POST['official_check_date'] ?: $row['official_check_date'];
- $old_official_check_date = $_POST['old_official_check_date'] ?: $row['old_official_check_date'];
- $official_check_date_owner = $_POST['official_check_date_owner'] ?: $row['official_check_date_owner'];
- $delivery_date = $_POST['delivery_date'] ?: $row['delivery_date'];
- $old_delivery_date = $_POST['old_delivery_date'] ?: $row['old_delivery_date'];
- $delivery_date_owner = $_POST['delivery_date_owner'] ?: $row['delivery_date_owner'];
- $salesid = $_POST['salesid'] ?: $row['salesid'];
- $warehouseid = $_POST['warehouseid'] ?: $row['warehouseid'];
- $old_warehouseid = $_POST['old_warehouseid'] ?: $row['warehouseid'];
- $association_check_type = $_POST['association_check_type'] ?: $row['association_check_type'];
- $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'];
- $old_tryrun_end_date = $_POST['old_tryrun_end_date'];
- $tryrun_end_date_owner = $_POST['tryrun_end_date_owner'];
- $old_delivery_date_file = $_POST['old_delivery_date_file'];
$salesname = accountid2name($salesid)[$salesid];
$salesmail = accountid2email([$salesid])[$salesid];
@@ -747,7 +748,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
[
accountid2name(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)],
accountid2email(manage_class_gary_ver($salesid))[manage_class_gary_ver($salesid)]
- ]
+ ],
+ ['張崇傑', 'jaychang@masada.com.tw'],
+ ['賴定國', 'guo@masada.com.tw']
// ['gary', 'gary_chen@masada.com.tw']
],
"永佳捷科技"
diff --git a/wms/wipwhole-renovate-rec-invoice-edit.php b/wms/wipwhole-renovate-rec-invoice-edit.php
index e3631755..d0d28515 100644
--- a/wms/wipwhole-renovate-rec-invoice-edit.php
+++ b/wms/wipwhole-renovate-rec-invoice-edit.php
@@ -537,7 +537,7 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
實際試車完工日 |
-
+
>
@@ -885,6 +885,10 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
若無工勘資料請勿移交至設計階段!
+
+
|
@@ -2213,6 +2217,8 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
return 3;
if ($("#site_survey_contact_form_verify").val() == '0' && !$('#site_survey_contact_form_verify_file_a').length)
return 3;
+ if ($("#customer_planning_verify").val() == '0' && !$('#customer_planning_verify_file_a').length)
+ return 3;
return 1;
}
@@ -2276,8 +2282,6 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
return 3;
if ($("#site_survey_contact_verify").val() == '0' && !$('#site_survey_contact_verify_file_a').length)
return 3;
- if ($("#customer_planning_verify").val() == '0' && !$('#customer_planning_verify_file_a').length)
- return 3;
return true;
}
diff --git a/wms/wipwholeinstall-index-export-excel.php b/wms/wipwholeinstall-index-export-excel.php
index c3a0b4ea..6a96ab31 100644
--- a/wms/wipwholeinstall-index-export-excel.php
+++ b/wms/wipwholeinstall-index-export-excel.php
@@ -63,8 +63,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
// 取得當前使用者所屬職位
$role_id = getRoleId($link, $user_id);
- $sql = getDataSql($department_id, $user_id, "A");
-
+ $sql = getDataSql($department_id, $role_id, $user_id);
$result = mysqli_query($link, $sql);
if ($result) {
$data = array();
@@ -110,7 +109,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
'QC合格日',
'官檢日',
'移交日',
- '營業人員'
+ '營業人員',
+ '安裝圖上傳狀態',
+ '完工驗收單上傳狀態',
+ '移交日附件(核准函)上傳狀態'
];
$sheet->setTitle('新梯出貨預定表');
for ($i = 0; $i < count($colTitleArr); $i++)
@@ -177,7 +179,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
substr($row['end_qc_date'], 0, 10),
$row['association_check_type'] == '1' ? "-" : substr($row['official_check_date'], 0, 10),
substr($row['delivery_date'], 0, 10),
- accountidToName($row['salesid'])
+ accountidToName($row['salesid']),
+ empty($row['plan_diagram_file']) ? "無" : "已上傳",
+ empty($row['completion_acceptance_file']) ? "無" : "已上傳",
+ empty($row['delivery_date_file']) ? "無" : "已上傳"
];
// $colContentArr2 = [
// !empty($row['tryrun_outsourcer']) ? "試車:" . $row['tryrun_outsourcer'] : "",
diff --git a/wms/wipwholeinstall-index-function.php b/wms/wipwholeinstall-index-function.php
index a2b99b11..fa388cb7 100644
--- a/wms/wipwholeinstall-index-function.php
+++ b/wms/wipwholeinstall-index-function.php
@@ -31,7 +31,8 @@ function getWipwholeSearchSql()
$area_no = empty($_REQUEST['area_no']) ? null : trim($_REQUEST['area_no']);
$sql = "";
- $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
+ $sql .= empty($area_no) ? "" : " AND area_no = '$area_no' ";
+ // $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
$sql .= empty($contractno) ? "" : " AND contractno LIKE '%$contractno%' ";
$sql .= empty($facilityno) ? "" : " AND facilityno LIKE '%$facilityno%' ";
$sql .= empty($custom) ? "" : " AND custom LIKE '%$custom%' ";
@@ -191,7 +192,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -204,7 +206,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -217,20 +220,22 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
}
// 宜花東營銷部 工務助理
- if ($department_id == '314' && $role_id == '4') {
+ if ($department_id == '315' && $role_id == '4') {
$sql = "
SELECT * FROM wipwholestatus
WHERE 1=1
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台東','宜蘭','花蓮')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('台東','宜蘭','花蓮')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -255,7 +260,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -362,7 +368,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -375,7 +382,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -388,7 +396,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -401,7 +410,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -522,7 +532,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -543,7 +554,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -564,7 +576,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
diff --git a/wms/wipwholeinstall-index-table-html.php b/wms/wipwholeinstall-index-table-html.php
index b5c9bcda..1147d618 100644
--- a/wms/wipwholeinstall-index-table-html.php
+++ b/wms/wipwholeinstall-index-table-html.php
@@ -199,13 +199,13 @@
diff --git a/wms/wipwholeinstall-renovate-index-export-excel.php b/wms/wipwholeinstall-renovate-index-export-excel.php
index a5598afa..041587bb 100644
--- a/wms/wipwholeinstall-renovate-index-export-excel.php
+++ b/wms/wipwholeinstall-renovate-index-export-excel.php
@@ -63,7 +63,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
// 取得當前使用者所屬職位
$role_id = getRoleId($link, $user_id);
- $sql = getDataSql($department_id, $user_id, "A");
+ $sql = getDataSql($department_id, $role_id, $user_id);
$result = mysqli_query($link, $sql);
if ($result) {
@@ -110,7 +110,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
'QC合格日',
'官檢日',
'移交日',
- '營業人員'
+ '營業人員',
+ '安裝圖上傳狀態',
+ '完工驗收單上傳狀態',
+ '移交日附件(核准函)上傳狀態'
];
$sheet->setTitle('汰改出貨預定表');
@@ -179,7 +182,10 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
substr($row['end_qc_date'], 0, 10),
$row['association_check_type'] == '1' ? "-" : substr($row['official_check_date'], 0, 10),
substr($row['delivery_date'], 0, 10),
- accountidToName($row['salesid'])
+ accountidToName($row['salesid']),
+ empty($row['plan_diagram_file']) ? "無" : "已上傳",
+ empty($row['completion_acceptance_file']) ? "無" : "已上傳",
+ empty($row['delivery_date_file']) ? "無" : "已上傳"
];
for ($j = 0; $j < count($colContentArr); $j++) {
$sheet->setCellValue(num2alpha($j) . $i, $colContentArr[$j]);
diff --git a/wms/wipwholeinstall-renovate-index-function.php b/wms/wipwholeinstall-renovate-index-function.php
index c8aa2898..b0d645c4 100644
--- a/wms/wipwholeinstall-renovate-index-function.php
+++ b/wms/wipwholeinstall-renovate-index-function.php
@@ -31,7 +31,8 @@ function getWipwholeSearchSql()
$area_no = empty($_REQUEST['area_no']) ? null : trim($_REQUEST['area_no']);
$sql = "";
- $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
+ $sql .= empty($area_no) ? "" : " AND area_no = '$area_no' ";
+ // $sql .= empty($area_no) ? "" : " AND SUBSTR(address,1,2) IN (" . $area[$area_no] . ") ";
$sql .= empty($contractno) ? "" : " AND contractno LIKE '%$contractno%' ";
$sql .= empty($facilityno) ? "" : " AND facilityno LIKE '%$facilityno%' ";
$sql .= empty($custom) ? "" : " AND custom LIKE '%$custom%' ";
@@ -191,7 +192,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -204,7 +206,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -217,7 +220,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -230,7 +234,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東','臺東')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東','臺東')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -255,7 +260,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭','花蓮','台東')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -362,7 +368,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('宜蘭')
+ AND area_no = 'Y'
+ -- AND SUBSTR(address,1,2) in ('宜蘭')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -375,7 +382,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -388,7 +396,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -401,7 +410,8 @@ function getDataSql($department_id, $role_id, $user_id)
AND status = '1'
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -517,7 +527,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
+ AND area_no IN ('N','T')
+ -- AND SUBSTR(address,1,2) in ('臺北','台北','基隆','新北','桃園','新竹')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -538,7 +549,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
+ AND area_no = 'C'
+ -- AND SUBSTR(address,1,2) in ('南投','臺中','台中','彰化','雲林','苗栗')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
@@ -559,7 +571,8 @@ function getDataSqlByFlowCode($department_id, $role_id, $user_id, $flow_code)
)
AND contract_type = '$contract_type'
" . getWipwholeSearchSql() . "
- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
+ AND area_no = 'K'
+ -- AND SUBSTR(address,1,2) in ('台南','臺南','嘉義','屏東','高雄')
ORDER BY real_contract_arrival_date DESC
";
return $sql;
diff --git a/wms/wipwholeinstall-renovate-index-table-html.php b/wms/wipwholeinstall-renovate-index-table-html.php
index 7a9715ea..7ae47f09 100644
--- a/wms/wipwholeinstall-renovate-index-table-html.php
+++ b/wms/wipwholeinstall-renovate-index-table-html.php
@@ -182,13 +182,13 @@