diff --git a/wms/T8_APItest.php b/wms/T8_APItest.php index e174719a..a6febca7 100644 --- a/wms/T8_APItest.php +++ b/wms/T8_APItest.php @@ -40,12 +40,12 @@ echo "ii"; "name": "salIncomeApplyDetail", "rows": [{ "BillNo": "B23100061", - "IncomeId": "A40003", + "IncomeId": "A40004", "TaxId": "ST005", "RowCode": 1, "ItemType": "1", "SPrice": 10000, - "SQuantity": 2, + "SQuantity": 0, "FromSourceTag": 0, "FromBillNo": "" }] diff --git a/wms/contract-repair/api/putContractData.php b/wms/contract-repair/api/putContractData.php index 70f080ab..1b960e02 100644 --- a/wms/contract-repair/api/putContractData.php +++ b/wms/contract-repair/api/putContractData.php @@ -67,7 +67,6 @@ if (isset($_POST['contracttype']) && $_POST['contracttype'] == 'r' && isset($_PO } } - function t8Insert($data) { require_once('../../contract/connt8.php'); @@ -99,7 +98,18 @@ function t8Insert($data) $stmt->bindParam(':CreateTime', $create); $stmt->execute(); + $sql = "INSERT INTO comCustomer + (OrgId,BizPartnerTypeId,CurrId,BizPartnerId,PersonId,CreatorId,IsInUsed,InvoiceAddress,CreateTime) + VALUES('1000','10','TWD',:BizPartnerId,:PersonId,:CreatorId,1,:InvoiceAddress,:CreateTime)"; + $stmt = $connT8->prepare($sql); + $stmt->bindParam(':BizPartnerId', $repair_no); + $stmt->bindParam(':PersonId', $salesman); + $stmt->bindParam(':CreatorId', $user_id); + $stmt->bindParam(':InvoiceAddress', $address); + $stmt->bindParam(':CreateTime', $create); + $stmt->execute(); + $sql = "INSERT INTO "; $connT8->commit(); } diff --git a/wms/contract/api/postContractData.php b/wms/contract/api/postContractData.php index 85b38f89..15443309 100644 --- a/wms/contract/api/postContractData.php +++ b/wms/contract/api/postContractData.php @@ -34,6 +34,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c $num = !empty($_POST['num']) ? $_POST['num'] : null; $files = !empty($_FILES['files']) ? $_FILES['files'] : null; $elevators = !empty($_POST['elevators']) ? json_decode($_POST['elevators'], true) : []; + $payType = !empty($_POST['payType']) ? $_POST['payType'] : null; // validate $fail_arr = []; if ($contractno === '') return $fail_arr[] = '合約號為必填'; @@ -56,6 +57,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c if ($partyAphone == '') $fail_arr[] = '業務聯繫人電話為必填'; if ($partyAemail == '') $fail_arr[] = '業務聯繫人Email為必填'; if ($num == '') $fail_arr[] = '電梯數量為必填'; + if ($payType == '') $fail_arr[] = '付款方式為必填'; if (count($fail_arr) > 0) { header("HTTP/1.1 422 Unprocessable Entity"); echo json_encode($fail_arr); @@ -283,8 +285,8 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c } else { $files = null; } - $sql_str = "INSERT INTO contract_b_signed_back (contract_no, contract_type, company, customer_no, salesperson, contract_start_date, contract_end_date, total_price, customer_phone, customer_email, repairman, cycle, contact_person, contact_address, contact_phone, contact_email, elevators_number, area, address, files_id, bonus, max_bonus, created_at, created_by) - VALUES (:contract_no, :contract_type, :company, :customer_no, :salesperson, :contract_start_date, :contract_end_date, :total_price, :customer_phone, :customer_email, :repairman, :cycle, :contact_person, :contact_address, :contact_phone, :contact_email, :elevators_number, :area, :address, :files_id, :bonus, :max_bonus, :created_at, :created_by)"; + $sql_str = "INSERT INTO contract_b_signed_back (contract_no, contract_type, company, customer_no, salesperson, contract_start_date, contract_end_date, total_price,payType, customer_phone, customer_email, repairman, cycle, contact_person, contact_address, contact_phone, contact_email, elevators_number, area, address, files_id, bonus, max_bonus, created_at, created_by) + VALUES (:contract_no, :contract_type, :company, :customer_no, :salesperson, :contract_start_date, :contract_end_date, :total_price, :payType ,:customer_phone, :customer_email, :repairman, :cycle, :contact_person, :contact_address, :contact_phone, :contact_email, :elevators_number, :area, :address, :files_id, :bonus, :max_bonus, :created_at, :created_by)"; $stmt = $conn->prepare($sql_str); $stmt->bindParam(":contract_no", $contractno); $stmt->bindParam(":contract_type", $contract_type); @@ -310,6 +312,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c $stmt->bindParam(":max_bonus", $max_bonus); $stmt->bindParam(":created_at", $created_at); $stmt->bindParam(":created_by", $user_id); + $stmt->bindParam(':payType', $payType); $stmt->execute(); @@ -324,7 +327,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c // $stmt->bindParam(':CreateTime', $createTime); // $stmt->execute(); - T8insert($_POST, $facilityno); + // T8insert($_POST, $facilityno); header('Content-Type: application/json'); $jsonData = json_encode($files); @@ -395,7 +398,8 @@ function T8insert($data, $facilityno) $stmt->execute(); - $sql = "INSERT INTO comCustomer(OrgId,BizPartnerTypeId,CurrId,BizPartnerId,PersonId,CreatorId,IsInUsed,InvoiceAddress,CreateTime) + $sql = "INSERT INTO comCustomer + (OrgId,BizPartnerTypeId,CurrId,BizPartnerId,PersonId,CreatorId,IsInUsed,InvoiceAddress,CreateTime) VALUES('1000','10','TWD',:BizPartnerId,:PersonId,:CreatorId,1,:InvoiceAddress,:CreateTime)"; $stmt = $connT8->prepare($sql); diff --git a/wms/contract/contract-input.php b/wms/contract/contract-input.php index 24840398..d3fdeacd 100644 --- a/wms/contract/contract-input.php +++ b/wms/contract/contract-input.php @@ -1,351 +1,374 @@ -prepare($sql_str); -$stmt->bindParam(':accounttype',$accounttype); -$stmt->execute(); -$workers = $stmt->fetchAll(PDO::FETCH_ASSOC); -$accounttype = "M"; -$sql_str = "SELECT id,accountid, name FROM account WHERE accounttype = :accounttype"; -$stmt = $conn->prepare($sql_str); -$stmt->bindParam(':accounttype',$accounttype); -$stmt->execute(); -$contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC); -?> - - - - - - -
- 合約入力(保養)- |
- |||||||
合約號 | -- - - | -- - | - -|||||
- 業務確認項- |
- - - - | -||||||
立約人 | -
-
- 未填寫 - |
- 營業員 | -
-
- 未填寫 - |
- 合約開始時間 | -
-
- 未填寫 - |
- 合約終止時間 | -
-
- 未填寫 - |
-
電梯台數 | -
-
- 未填寫 -電梯數量需大於0 - |
-
- 統一編號/身分證 | -
-
- 未填寫 - |
- 維修型態 | -
-
- 未填寫 - |
- - | - |
客戶電話 | -
-
- 未填寫 - |
-
-
- 未填寫 - |
- 保養員 | -
-
- 未填寫 - |
- 保養頻率 | -
-
- 未填寫 - |
- |
業務聯繫人 | -
-
- 未填寫 - |
- 業務聯繫人地址 | -
-
- 未填寫 - |
- 業務聯繫人電話 | -
-
- 未填寫 - |
- 業務聯繫人Email | -
-
- 未填寫 - |
-
區域 | -
-
- 未填寫 - |
- 詳細地址 | -
-
- 未填寫 - |
- 附件 | -- - | -||
- | |||||||
機種 | -
-
- 未填寫 - |
- 載重 | -
-
- 未填寫 - |
- 速度 | -
-
- 未填寫 - |
-
- 人乘 | -
-
- 未填寫 - |
-
樓停 | -
-
- 未填寫 - |
- 樓層 | -
-
- 未填寫 - |
- 緯度 | -
-
- 未填寫 - |
-
- 經度 | -
-
- 未填寫 - |
-
廠牌 | -
-
- 未填寫 - |
- - 開門方式 - | -
-
- 未填寫 - |
- 保養別 | -
-
- 未填寫 - |
- 竣檢日 | -
-
- 未填寫 - |
-
許可證有效時間 | -
-
- 未填寫 - |
- ||||||
- | - | - | - | - | - | - |
+ 合約入力(保養)+ |
+ |||||||
合約號 | ++ + + | ++ + | + +|||||
+ 業務確認項+ |
+ + + + | +||||||
立約人 | +
+
+ 未填寫 + |
+ 營業員 | +
+
+ 未填寫 + |
+ 合約開始時間 | +
+
+ 未填寫 + |
+ 合約終止時間 | +
+
+ 未填寫 + |
+
電梯台數 | +
+
+ 未填寫 +電梯數量需大於0 + |
+
+ 統一編號/身分證 | +
+
+ 未填寫 + |
+ 維修型態 | +
+
+ 未填寫 + |
+ 契約成交價 | +
+
+ 未填寫 + |
+
客戶電話 | +
+
+ 未填寫 + |
+
+
+ 未填寫 + |
+ 保養員 | +
+
+ 未填寫 + |
+ 保養頻率 | +
+
+ 未填寫 + |
+ |
業務聯繫人 | +
+
+ 未填寫 + |
+ 業務聯繫人地址 | +
+
+ 未填寫 + |
+ 業務聯繫人電話 | +
+
+ 未填寫 + |
+ 業務聯繫人Email | +
+
+ 未填寫 + |
+
區域 | +
+
+ 未填寫 + |
+ 詳細地址 | +
+
+ 未填寫 + |
+ 分期方式 | +
+
+ 未填寫 + |
+ ||
+ | + | + | + | + | 附件 | ++ + | +|
+ + | +|||||||
機種 | +
+
+ 未填寫 + |
+ 載重 | +
+
+ 未填寫 + |
+ 速度 | +
+
+ 未填寫 + |
+
+ 人乘 | +
+
+ 未填寫 + |
+
樓停 | +
+
+ 未填寫 + |
+ 樓層 | +
+
+ 未填寫 + |
+ 緯度 | +
+
+ 未填寫 + |
+
+ 經度 | +
+
+ 未填寫 + |
+
廠牌 | +
+
+ 未填寫 + |
+ + 開門方式 + | +
+
+ 未填寫 + |
+ 保養別 | +
+
+ 未填寫 + |
+ 竣檢日 | +
+
+ 未填寫 + |
+
許可證有效時間 | +
+
+ 未填寫 + |
+ ||||||
+ | + | + | + | + | + | + | + |
名稱 | @@ -195,6 +195,8 @@ foreach ($opt_data_arr as $k => $v) { */ } $option_str .= "
---|