From fb4710f63730b985cd1a701e0d8baeadc9d64c53 Mon Sep 17 00:00:00 2001 From: "gary_chen\\gary_chen" Date: Wed, 8 Nov 2023 10:11:23 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=AD=A3=E6=9C=AA=E4=B8=8A=E5=82=B3?= =?UTF-8?q?=E6=AA=94=E6=A1=88=E5=8D=BB=E7=94=A2=E7=94=9F=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E6=88=B3=E8=A8=98bug=202.=E5=A4=A7=E6=97=A5=E7=A8=8B=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E8=A8=B1=E5=8D=94=E7=90=86=E6=9B=B4=E6=94=B9=E6=A5=AD?= =?UTF-8?q?=E5=8B=99=E9=A0=85=E7=9B=AE=E7=9A=84=E6=AC=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/wipwhole-rec-invoice-edit-fileupload.php | 6 +++++- wms/wipwhole-rec-invoice-edit-submit.php | 12 +++++------- wms/wipwhole-rec-invoice-edit.php | 15 +++++++++++++-- ...wipwhole-renovate-rec-invoice-edit-submit.php | 16 ++++++---------- wms/wipwhole-renovate-rec-invoice-edit.php | 13 ++++++++++++- 5 files changed, 41 insertions(+), 21 deletions(-) diff --git a/wms/wipwhole-rec-invoice-edit-fileupload.php b/wms/wipwhole-rec-invoice-edit-fileupload.php index f62a3132..b993edc2 100644 --- a/wms/wipwhole-rec-invoice-edit-fileupload.php +++ b/wms/wipwhole-rec-invoice-edit-fileupload.php @@ -11,7 +11,11 @@ function fileIUpload($post_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)); + if (!empty($file_name)) { + return strtolower($target_dir . basename($datetime . $file_name)); + } else { + return ""; + } } else { return ""; } diff --git a/wms/wipwhole-rec-invoice-edit-submit.php b/wms/wipwhole-rec-invoice-edit-submit.php index 184f6790..6b4713a3 100644 --- a/wms/wipwhole-rec-invoice-edit-submit.php +++ b/wms/wipwhole-rec-invoice-edit-submit.php @@ -483,13 +483,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { "; if (!empty($official_check_file)) $updatesql .= "official_check_file = '$official_check_file', "; - } else { - echo "暫無權限"; - exit(); - } - - // 暫時可編輯及刪除權限 - if (in_array($user_id, ['M0175', 'M0079'])) { + } else if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) { + // 暫時可編輯及刪除權限 $updatesql .= " contractno = '$contractno', facility_temp_no = '$facility_temp_no', @@ -509,6 +504,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { contract_arrival_date = '$contract_arrival_date', facility_kind = '$facility_kind', "; + }else{ + echo "暫無權限"; + exit(); } // 工務助理 diff --git a/wms/wipwhole-rec-invoice-edit.php b/wms/wipwhole-rec-invoice-edit.php index 79ffaf66..f0588313 100644 --- a/wms/wipwhole-rec-invoice-edit.php +++ b/wms/wipwhole-rec-invoice-edit.php @@ -59,7 +59,7 @@ if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) // 暫時可編輯及刪除權限 $update_delete_status = "disabled"; -if (in_array($user_id, ['M0175', 'M0079'])) { +if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) { $update_delete_status = ""; } @@ -260,6 +260,17 @@ include "wipwhole-rec-invoice-edit-submit.php"; + + + + + + + @@ -1202,7 +1213,7 @@ include "wipwhole-rec-invoice-edit-submit.php"; 實際出貨日(到工地) - > + > diff --git a/wms/wipwhole-renovate-rec-invoice-edit-submit.php b/wms/wipwhole-renovate-rec-invoice-edit-submit.php index cd5ed9ea..5bf4080a 100644 --- a/wms/wipwhole-renovate-rec-invoice-edit-submit.php +++ b/wms/wipwhole-renovate-rec-invoice-edit-submit.php @@ -463,14 +463,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { "; if (!empty($official_check_file)) $updatesql .= "official_check_file = '$official_check_file', "; - } else { - echo "暫無權限"; - exit(); - } - - - // 暫時可編輯及刪除權限 - if (in_array($user_id, ['M0175', 'M0079'])) { + } else if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) { + // 暫時可編輯及刪除權限 $updatesql .= " contractno = '$contractno', facility_temp_no = '$facility_temp_no', @@ -490,9 +484,11 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { contract_arrival_date = '$contract_arrival_date', facility_kind = '$facility_kind', "; + } else { + echo "暫無權限"; + exit(); } - // 工務助理 $updatesql .= " install_outsourcer = '$install_outsourcer', @@ -513,7 +509,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { estimate_tryrun_end_date_owner = '$estimate_tryrun_end_date_owner', warehouse_assistant_remark = '$warehouse_assistant_remark', "; - if (!empty($plan_diagram_file)){ + if (!empty($plan_diagram_file)) { $updatesql .= "plan_diagram_file = '$plan_diagram_file', "; $updatesql .= " all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "
上傳了安裝圖附件

',IF(all_remark IS NULL,'',all_remark)), diff --git a/wms/wipwhole-renovate-rec-invoice-edit.php b/wms/wipwhole-renovate-rec-invoice-edit.php index fb4b4746..02a76d06 100644 --- a/wms/wipwhole-renovate-rec-invoice-edit.php +++ b/wms/wipwhole-renovate-rec-invoice-edit.php @@ -57,7 +57,7 @@ if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) // 暫時可編輯及刪除權限 $update_delete_status = "disabled"; -if (in_array($user_id, ['M0175', 'M0079'])) { +if (in_array($user_id, ['M0175', 'M0079', 'M0060'])) { $update_delete_status = ""; } @@ -249,6 +249,17 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php"; + + + + + + +