diff --git a/.env b/.env
deleted file mode 100644
index 6720dc21..00000000
--- a/.env
+++ /dev/null
@@ -1,13 +0,0 @@
-# DB_CONNECTION=mysql
-# DB_HOST=db-104.coowo.com:3306
-# DB_PORT=3306
-# DB_DATABASE=appwms
-# DB_USERNAME=masadaroot
-# DB_PASSWORD=x6h5E5p#u8y
-
-DB_CONNECTION=mysql
-DB_HOST=localhost
-DB_PORT=3306
-DB_DATABASE=appwms1113
-DB_USERNAME=root
-DB_PASSWORD=
\ No newline at end of file
diff --git a/wms/wipwhole-rec-invoice-edit-fileupload.php b/wms/wipwhole-rec-invoice-edit-fileupload.php
index b993edc2..933d44f1 100644
--- a/wms/wipwhole-rec-invoice-edit-fileupload.php
+++ b/wms/wipwhole-rec-invoice-edit-fileupload.php
@@ -21,6 +21,27 @@ function fileIUpload($post_name)
}
}
+function fileIUploads($post_name)
+{
+ $file_arr = [];
+ if (isset($_FILES[$post_name])) {
+ foreach ($_FILES[$post_name]['tmp_name'] as $key => $tmp_name) {
+ $file_name = $_FILES[$post_name]['name'][$key];
+ $temp_file_name = $_FILES[$post_name]['tmp_name'][$key];
+ $target_dir = empty($file_name) ? "" : "public-wipwhole/";
+ $datetime = date("YmdHis");
+ $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);
+ if (!empty($file_name)) {
+ array_push($file_arr, strtolower($target_dir . basename($datetime . $file_name)));
+ }
+ }
+ }
+ return json_encode($file_arr, JSON_UNESCAPED_UNICODE);
+}
+
// 營業
$sales_spec_verify_file = fileIUpload("sales_spec_verify_file");
$customer_planning_verify_file = fileIUpload("customer_planning_verify_file");
@@ -39,5 +60,8 @@ $desin_leader_verify_file = fileIUpload("desin_leader_verify_file");
$building_heigh_verify_file = fileIUpload("building_heigh_verify_file");
$site_survey_contact_verify_file = fileIUpload("site_survey_contact_verify_file");
$plan_diagram_file = fileIUpload("plan_diagram_file");
+$completion_acceptance_file = fileIUpload("completion_acceptance_file");
// 生管
$shengguanok_status_file = fileIUpload("shengguanok_status_file");
+// 工務助理
+$outsourcer_contract_file = fileIUploads("outsourcer_contract_file");
diff --git a/wms/wipwhole-rec-invoice-edit-submit.php b/wms/wipwhole-rec-invoice-edit-submit.php
index af4823a0..0412cc22 100644
--- a/wms/wipwhole-rec-invoice-edit-submit.php
+++ b/wms/wipwhole-rec-invoice-edit-submit.php
@@ -510,7 +510,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
// 工務助理
- if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
+ if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188','M0117'])) {
$updatesql .= "
outsourcer_type = '$outsourcer_type',
install_outsourcer = '$install_outsourcer',
@@ -535,8 +535,17 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
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)),
- ";
+ all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "
上傳了安裝圖附件
',IF(all_remark IS NULL,'',all_remark)),
+ ";
+ }
+ if (!empty($completion_acceptance_file)) {
+ $updatesql .= "completion_acceptance_file = '$completion_acceptance_file', ";
+ $updatesql .= "
+ all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "
上傳了完工驗收單附件
',IF(all_remark IS NULL,'',all_remark)),
+ ";
+ }
+ if (!empty($outsourcer_contract_file)) {
+ echo $updatesql .= "outsourcer_contract_file = '$outsourcer_contract_file', ";
}
}
diff --git a/wms/wipwhole-rec-invoice-edit.php b/wms/wipwhole-rec-invoice-edit.php
index c4398a84..9a2bc5bb 100644
--- a/wms/wipwhole-rec-invoice-edit.php
+++ b/wms/wipwhole-rec-invoice-edit.php
@@ -1,5 +1,5 @@
+
+ QC及官檢類型 |
+
+ />
+
+ />
+
+ />
+
+ |
+
內部QC日 |
@@ -1360,6 +1371,23 @@ include "wipwhole-rec-invoice-edit-submit.php";
?>
|
+
+ 合約上傳 |
+
+
+
+
+ " . str_replace("public-wipwhole/", "", $val) . "";
+ }
+ echo "";
+ }
+ ?>
+ |
+
安裝發包廠商 |
@@ -1509,6 +1537,15 @@ include "wipwhole-rec-invoice-edit-submit.php";
?>
|
+
+ 完工驗收單附件 |
+
+ >
+ 下載附件" : "";
+ ?>
+ |
+
";
+ html += "";
+ $("#ocfi_td").append(html);
+ }
+
+ function delOutsourcerContractFileItem(id) {
+ $("#outsourcer_contract_file_del_" + id).remove();
+ $("#outsourcer_contract_file_" + id).remove();
+ }
\ No newline at end of file
diff --git a/wms/wipwhole-rec-invoice.php b/wms/wipwhole-rec-invoice.php
index 033a370c..b2a4c852 100644
--- a/wms/wipwhole-rec-invoice.php
+++ b/wms/wipwhole-rec-invoice.php
@@ -427,6 +427,9 @@ if ($department_id == "321" || $department_id == "220") {
// 已備齊檢查人
$shengguanok_status_owner = postCheck('shengguanok_status_owner');
+ // QC與官檢種類
+ $qc_official_type = postCheck('qc_official_type');
+
// 建立人
$creater = postCheck('creater');
// 建立時間
@@ -520,6 +523,7 @@ if ($department_id == "321" || $department_id == "220") {
shengguanok_status_file,
shengguanok_status_at,
shengguanok_status_owner,
+ qc_official_type,
creater,
create_at
) VALUES (
@@ -607,6 +611,7 @@ if ($department_id == "321" || $department_id == "220") {
'$shengguanok_status_file',
'$shengguanok_status_at',
'$shengguanok_status_owner',
+ '$qc_official_type',
'$creater',
'$create_at'
)
@@ -776,6 +781,14 @@ if ($department_id == "321" || $department_id == "220") {
|
| -->
+
+
+
+
+
+
+
+ |
工地負責人 |
diff --git a/wms/wipwhole-renovate-rec-invoice-edit-submit.php b/wms/wipwhole-renovate-rec-invoice-edit-submit.php
index a7133eb6..bc7a1617 100644
--- a/wms/wipwhole-renovate-rec-invoice-edit-submit.php
+++ b/wms/wipwhole-renovate-rec-invoice-edit-submit.php
@@ -490,7 +490,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
// 工務助理
- if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
+ if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188', 'M0117'])) {
$updatesql .= "
outsourcer_type = '$outsourcer_type',
install_outsourcer = '$install_outsourcer',
@@ -514,8 +514,17 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
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)),
- ";
+ all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "
上傳了安裝圖附件
',IF(all_remark IS NULL,'',all_remark)),
+ ";
+ }
+ if (!empty($completion_acceptance_file)) {
+ $updatesql .= "completion_acceptance_file = '$completion_acceptance_file', ";
+ $updatesql .= "
+ all_remark = CONCAT('" . $user_id . accountidToName($user_id) . "_" . $datetime . "
上傳了完工驗收單附件
',IF(all_remark IS NULL,'',all_remark)),
+ ";
+ }
+ if (!empty($outsourcer_contract_file)) {
+ $updatesql .= "outsourcer_contract_file = '$outsourcer_contract_file', ";
}
}
diff --git a/wms/wipwhole-renovate-rec-invoice-edit.php b/wms/wipwhole-renovate-rec-invoice-edit.php
index a47ed372..cc7f0d13 100644
--- a/wms/wipwhole-renovate-rec-invoice-edit.php
+++ b/wms/wipwhole-renovate-rec-invoice-edit.php
@@ -50,7 +50,7 @@ $pinzheng = getPinzhengStatus($link, $user_department_id, $role_id);
$tab = getTabNo($user_department_id);
// 工務助理
-if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188'])) {
+if (in_array($user_id, ['M0164', 'M0165', 'M0127', 'M0193', 'M0170', 'M0188', 'M0117'])) {
$warehouse2 = "";
$tab = 5;
}
@@ -1246,6 +1246,17 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
+
+ QC及官檢類型 |
+
+ />
+
+ />
+
+ />
+
+ |
+
內部QC日 |
@@ -1356,6 +1367,23 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
?>
|
+
+ 合約上傳 |
+
+
+
+
+ " . str_replace("public-wipwhole/", "", $val) . "";
+ }
+ echo "";
+ }
+ ?>
+ |
+
安裝發包廠商 |
@@ -1505,6 +1533,15 @@ include "wipwhole-renovate-rec-invoice-edit-submit.php";
?>
|
+
+ 完工驗收單附件 |
+
+ >
+ 下載附件" : "";
+ ?>
+ |
+
";
+ html += "";
+ $("#ocfi_td").append(html);
+ }
+
+ function delOutsourcerContractFileItem(id) {
+ $("#outsourcer_contract_file_del_" + id).remove();
+ $("#outsourcer_contract_file_" + id).remove();
+ }
\ No newline at end of file
diff --git a/wms/wipwhole-renovate-rec-invoice.php b/wms/wipwhole-renovate-rec-invoice.php
index bf65e236..601026c8 100644
--- a/wms/wipwhole-renovate-rec-invoice.php
+++ b/wms/wipwhole-renovate-rec-invoice.php
@@ -433,6 +433,9 @@ if ($department_id == "321" || $department_id == "220") {
// 已備齊檢查人
$shengguanok_status_owner = postCheck('shengguanok_status_owner');
+ // QC與官檢種類
+ $qc_official_type = postCheck('qc_official_type');
+
// 建立人
$creater = postCheck('creater');
// 建立時間
@@ -526,6 +529,7 @@ if ($department_id == "321" || $department_id == "220") {
shengguanok_status_file,
shengguanok_status_at,
shengguanok_status_owner,
+ qc_official_type,
creater,
create_at
) VALUES (
@@ -614,6 +618,7 @@ if ($department_id == "321" || $department_id == "220") {
'$shengguanok_status_file',
'$shengguanok_status_at',
'$shengguanok_status_owner',
+ '$qc_official_type',
'$creater',
'$create_at'
)
@@ -850,7 +855,14 @@ if ($department_id == "321" || $department_id == "220") {
?>
|
- |
+
+
+
+
+
+
+
+ |
|