diff --git a/wms/contract/api/postNewContractData.php b/wms/contract/api/postNewContractData.php index dc08c30c..001fe1f5 100644 --- a/wms/contract/api/postNewContractData.php +++ b/wms/contract/api/postNewContractData.php @@ -22,6 +22,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $lm_tel = $_POST["lm_tel"]; $address = $_POST["address"]; $salesman = $_POST["salesman"]; + $qc = $_POST["qc"]; $contracttype = $_POST["contracttype"]; $files = !empty($_FILES['files']) ? $_FILES['files'] : null; $files_id = null; @@ -36,6 +37,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co if(empty($lm_tel)) $fail_arr[] = '聯絡人電話為必填'; if(empty($address)) $fail_arr[] = '地址為必填'; if(empty($salesman)) $fail_arr[] = '營業員為必填'; + if(empty($qc)) $fail_arr[] = '請選擇QC或官檢'; if(count($fail_arr) > 0) { header("HTTP/1.1 422 Unprocessable Entity"); echo json_encode($fail_arr); @@ -105,7 +107,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $files = null; } - $sql_str = "INSERT INTO contract_m_signed_back (contract_no, customer, manager, vat, case_name, linkman, lm_tel, address, salesman, salesman_name, files_id, created_at, created_by) VALUES (:contract_no, :customer, :manager, :vat, :case_name, :linkman, :lm_tel, :address, :salesman, :salesman_name, :files_id, :created_at, :created_by)"; + $sql_str = "INSERT INTO contract_m_signed_back (contract_no, customer, manager, vat, case_name, linkman, lm_tel, address, salesman, salesman_name, files_id, created_at, created_by, qc_official_type) VALUES (:contract_no, :customer, :manager, :vat, :case_name, :linkman, :lm_tel, :address, :salesman, :salesman_name, :files_id, :created_at, :created_by, :qc)"; $stmt = $conn -> prepare($sql_str); $stmt -> bindParam(":contract_no",$contractno); $stmt -> bindParam(":customer",$customer); @@ -120,6 +122,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $stmt -> bindParam(":files_id",$files_id); $stmt -> bindParam(":created_at",$created_at); $stmt -> bindParam(":created_by",$created_by); + $stmt -> bindParam(":qc",$qc); $stmt -> execute(); diff --git a/wms/contract/api/putContractData.php b/wms/contract/api/putContractData.php index 63694e83..f1e78164 100644 --- a/wms/contract/api/putContractData.php +++ b/wms/contract/api/putContractData.php @@ -17,6 +17,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $lm_tel = !empty($_POST['lm_tel']) ? $_POST['lm_tel'] : null; $address = !empty($_POST['address']) ? $_POST['address'] : null; $salesman = !empty($_POST['salesman']) ? $_POST['salesman'] : null; + $qc = !empty($_POST['qc']) ? $_POST['qc'] : null; $deletefiles = !empty($_POST['deletefiles']) ? $_POST['deletefiles'] : null; $files_id = !empty($_POST['files_id']) ? $_POST['files_id'] : null; $files = !empty($_FILES['files']) ? $_FILES['files'] : null; @@ -33,6 +34,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] if(empty($lm_tel)) $fail_arr[] = '聯絡人電話為必填'; if(empty($address)) $fail_arr[] = '地址為必填'; if(empty($salesman)) $fail_arr[] = '營業員為必填'; + if(empty($qc)) $fail_arr[] = '請選擇QC或管檢'; if(count($fail_arr) > 0) { header("HTTP/1.1 422 Unprocessable Entity"); echo json_encode($fail_arr); @@ -41,7 +43,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $conn->beginTransaction(); - $sql_str = "UPDATE contract_m_signed_back SET contract_no=:contract_no, customer=:customer, manager=:manager, vat=:vat, case_name=:case_name, linkman=:linkman, lm_tel=:lm_tel, address=:address, salesman=:salesman WHERE id = :id"; + $sql_str = "UPDATE contract_m_signed_back SET contract_no=:contract_no, customer=:customer, manager=:manager, vat=:vat, case_name=:case_name, linkman=:linkman, lm_tel=:lm_tel, address=:address, salesman=:salesman, qc_official_type=:qc WHERE id = :id"; $stmt = $conn -> prepare($sql_str); $stmt -> bindParam(':contract_no' ,$contract_no); $stmt -> bindParam(':customer' ,$customer); @@ -52,6 +54,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $stmt -> bindParam(':lm_tel' ,$lm_tel); $stmt -> bindParam(':address' ,$address); $stmt -> bindParam(':salesman' ,$salesman); + $stmt -> bindParam(':qc' ,$qc); $stmt -> bindParam(':id' ,$id); $stmt -> execute(); if(!empty($deletefiles)){ diff --git a/wms/contract/contract-new-apply.php b/wms/contract/contract-new-apply.php new file mode 100644 index 00000000..15eb41f5 --- /dev/null +++ b/wms/contract/contract-new-apply.php @@ -0,0 +1,460 @@ +alert('非法訪問!!!');"; + echo ""; + exit; +} +$id = $_GET["id"]; +$sql_str = "SELECT pricereview_main.*, account.name as accountname + FROM pricereview_main + JOIN account ON pricereview_main.person = account.accountid + WHERE pricereview_main.id = :id"; +$stmt = $conn->prepare($sql_str); +$stmt->bindParam(':id',$id); +$stmt->execute(); +$contract = $stmt->fetch(PDO::FETCH_ASSOC); + +$accounttype = "M"; +$sql_str = "SELECT * FROM account WHERE accounttype = :accounttype"; +$stmt = $conn->prepare($sql_str); +$stmt->bindParam(':accounttype',$accounttype); +$stmt->execute(); +$persons = $stmt->fetchAll(PDO::FETCH_ASSOC); + +$sql_str = "SELECT * FROM hope_elevator_customer WHERE vol_no = :vol_no ORDER BY created_at DESC"; +$stmt = $conn->prepare($sql_str); +$stmt->bindParam(':vol_no', $contract['contractno']); +$stmt->execute(); +$customer = $stmt->fetch(PDO::FETCH_ASSOC); +print_r($customer); +?> + + + + + +
+ 合約書申請(新梯)+ |
+ |||||||
+ 業務確認項+ |
+ + + + | +||||||
卷號 | +
+
+ 未填寫 + |
+ 營業員 | +
+
+ 未填寫 + |
+ 合約書申請日期 | +
+
+ 未填寫 + |
+ 申請類別 | +
+
+ 未填寫 + |
+
案件名稱 | +
+
+ 未填寫 + |
+ 立約人 | +
+
+ 未填寫 + |
+ 負責人 | +
+
+ 未填寫 + |
+ 統一編號 | +
+
+ 未填寫 + |
+
含稅給約總價 | +
+
+ 未填寫 + |
+ 含稅貸款(A) | +
+
+ 未填寫 + |
+ 含稅安裝款(A) | +
+
+ 未填寫 + |
+ ||
聯絡地址 | +
+
+ 未填寫 + |
+ 完工期限 | +
+
+ 未填寫 + |
+ ||||
附則 | +
+
+ 未填寫 + |
+ 免保期限 | +
+
+ 未填寫 + |
+ 交貨地點 | +
+
+ 未填寫 + |
+ 交貨期限 | +
+
+ 未填寫 + |
+
+ 項次 + |
+
+ 規格 + |
+
+ 數量 + |
+
+ 金額 + |
+ ||||
1 | +
+
+ 未填寫 + |
+
+
+ 未填寫 + |
+
+
+ 未填寫 + |
+
+ 合約類別 + |
+
+ 款別 + |
+
+ 條件名稱 + |
+
+ 收款條件日期區分 + |
+
+ 條件日期 + |
+
+ 票期 + |
+
+ 付款比率 + |
+
+ 金額 + |
+
+ 銷售 + |
+
+ 訂金 + |
+
+ 簽約後X天付訂金 + |
+
+ 合約日 + |
+
+ 30天 + |
+
+ 30天 + |
+
+ 20% + |
+
+ 636000 + |
+
+ 銷售 + |
+
+ 二次款 + |
+
+ 簽約後X天付二次款 + |
+
+ 合約日 + |
+
+ 30天 + |
+
+ 30天 + |
+
+ 0%% + |
+
+ 0 + |
+
+ 銷售 + |
+
+ 貨到款 + |
+
+ 貨抵工地付貨到款 + |
+
+ 出貨日 + |
+
+ - + |
+
+ 30天 + |
+
+ 50% + |
+
+ 1590000 + |
+
+ + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ + | +
+ 安裝 + |
+
+ 安裝款 + |
+
+ 安裝完成後X天收款 + |
+
+ 竣檢日 + |
+
+ 30天 + |
+
+ 30天 + |
+
+ 20% + |
+
+ 636000 + |
+
+ 安裝 + |
+
+ 尾款 + |
+
+ 交車後X天付尾款 + |
+
+ 交車日 + |
+
+ 0天 + |
+
+ 30天 + |
+
+ 10% + |
+
+ 318000 + |
+
+ + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ + | +
+ 簽核流程+ |
+ |||||||
業務部協理 | +已通過 | +業務部承辦人 | +已通過 | +營業經理 | +已通過 | +營業員 | +已通過 | +
未填寫
+未填寫
+未填寫