From 26318a60040a16cee371c740da2681d09e0cb68c Mon Sep 17 00:00:00 2001 From: Cheng Date: Mon, 11 Dec 2023 17:33:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=83=B9=E5=AF=A9=E6=AC=84=E4=BD=8D=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9C=8D=E5=8B=99=E8=B2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mkt/IncludeCommon.php | 225 +- .../api/deleteNewContractData.php | 69 +- wms/contract-repair/api/getContractData.php | 228 +- wms/contract-repair/api/postContractData.php | 832 ++--- wms/contract-repair/api/putContractData.php | 364 +- wms/contract-repair/contract-repair-edit.php | 404 +-- wms/contract-repair/contract-repair-input.php | 358 +- .../contract-repair-management.php | 248 +- wms/contract-repair/js/alpine.js | 2998 +++++++++-------- wms/contract-repair/styles/style.css | 343 +- wms/contract-repair/styles/style.css.map | 2 +- wms/contract-repair/styles/style.scss | 1593 +++++---- wms/mkt/pricereview_contractno-api.php | 126 +- wms/mkt/pricereview_repair-check.php | 557 +-- wms/mkt/pricereview_repair-create.php | 1087 +++--- wms/mkt/pricereview_repair-record-submit.php | 159 +- wms/sign/list.php | 351 +- wms/sign/sign_form.php | 1202 +++---- 18 files changed, 5789 insertions(+), 5357 deletions(-) diff --git a/mkt/IncludeCommon.php b/mkt/IncludeCommon.php index bf89ca4f..67ebdd7d 100644 --- a/mkt/IncludeCommon.php +++ b/mkt/IncludeCommon.php @@ -1,110 +1,115 @@ - $explode[2]) { - $data['user_id'] = ''; - $data['user_name'] = ''; - $data['code'] = '401'; - $data['message'] = 'Token已过期,请重新登录'; - return $data; - } - if ($true_signature == $explode[4]) { - $data['user_id'] = $explode[0]; - $data['user_name'] = $explode[3]; - $data['code'] = '200'; - $data['message'] = 'Token合法'; - return $data; - } else { - $data['user_id'] = ''; - $data['user_name'] = ''; - $data['code'] = '400'; - $data['message'] = 'Token不合法'; - return $data; - } - } else { - $data['user_id'] = ''; - $data['user_name'] = ''; - $data['code'] = '400'; - $data['message'] = 'Token不合法'; - return $data; - } - } -//生成登录记录 - function save_log_response($source_flag='web', $account, $response_result){ - # 储存纪录并输出 - #echo date("Y-m-d"); - $file_path = "account_log/" . $account . "-" . date("Y-m-d") . ".ini"; - $data = serialize($response_result). date("H:i:s") . "\n"; - $fp = fopen($file_path,"a"); # 如果档案不存在择尝试建立再写入 - fwrite($fp, $data); - fclose($fp); - if ($source_flag == "web"){ -// header("Location: custom-create.php?function_list=" . serialize($response_result) . -// "&token=" . $response_result["token"]); #请输入使用者名称密码 -// exit(); - return true; - }else{ -// echo json_encode($response_result, JSON_UNESCAPED_UNICODE); - return false; - } - - /* - if ($source_flag == "app"){ - echo json_encode($response_result, JSON_UNESCAPED_UNICODE); - }elseif ($source_flag == "web"){ - header("Location: api-account-reply-functions.php?function_list=" . serialize($response_result) . - "&token=" . $response_result["token"]); #请输入使用者名称密码 - exit(); - } - */ - } - -//生成token - function CreateToken($user_id, $user_name) { - date_default_timezone_set("Asia/Taipei"); - $start_time = date("Y-m-d H:i:s"); - $end_time = date('Y-m-d H:i:s',strtotime('+24 hour')); #设定24小时 - $info = $user_id . '.' . $start_time . '.' . $end_time . '.' . $user_name; //设置token过期时间为一天 - $encryption_code = "MASADA!^***"; - //根据以上信息信息生成签名(密钥为 SIGNATURE 自定义全局常量) - $signature = hash_hmac('md5', $info, $encryption_code); - //最后将这两部分拼接起来,得到最终的Token字符串 - return $token = $info . '.' . $signature; - } -//生成菜单 - - function menu ($from='tw',$type){ - $function_type = array( - "tw" => array( - # F角色菜单 - "H" => array( - "language" => "tw", - "type" => "manage", - "list" => array( - array("name" => "批量导入", "path" => "http://192.168.0.12/wms/excel-upload"), - ), - "note" => "none", - "token" => "" - ), - ) - ); - - return $function_type[$from][$type]; - - } -} \ No newline at end of file + $explode[2]) { + $data['user_id'] = ''; + $data['user_name'] = ''; + $data['code'] = '401'; + $data['message'] = 'Token已過期,請重新登入'; + return $data; + } + if ($true_signature == $explode[4]) { + $data['user_id'] = $explode[0]; + $data['user_name'] = $explode[3]; + $data['code'] = '200'; + $data['message'] = 'Token合法'; + return $data; + } else { + $data['user_id'] = ''; + $data['user_name'] = ''; + $data['code'] = '400'; + $data['message'] = 'Token不合法'; + return $data; + } + } else { + $data['user_id'] = ''; + $data['user_name'] = ''; + $data['code'] = '400'; + $data['message'] = 'Token不合法'; + return $data; + } + } + //生成登录记录 + function save_log_response($source_flag = 'web', $account, $response_result) + { + # 储存纪录并输出 + #echo date("Y-m-d"); + $file_path = "account_log/" . $account . "-" . date("Y-m-d") . ".ini"; + $data = serialize($response_result) . date("H:i:s") . "\n"; + $fp = fopen($file_path, "a"); # 如果档案不存在择尝试建立再写入 + fwrite($fp, $data); + fclose($fp); + if ($source_flag == "web") { + // header("Location: custom-create.php?function_list=" . serialize($response_result) . + // "&token=" . $response_result["token"]); #请输入使用者名称密码 + // exit(); + return true; + } else { + // echo json_encode($response_result, JSON_UNESCAPED_UNICODE); + return false; + } + + /* + if ($source_flag == "app"){ + echo json_encode($response_result, JSON_UNESCAPED_UNICODE); + }elseif ($source_flag == "web"){ + header("Location: api-account-reply-functions.php?function_list=" . serialize($response_result) . + "&token=" . $response_result["token"]); #请输入使用者名称密码 + exit(); + } + */ + } + + //生成token + function CreateToken($user_id, $user_name) + { + date_default_timezone_set("Asia/Taipei"); + $start_time = date("Y-m-d H:i:s"); + $end_time = date('Y-m-d H:i:s', strtotime('+24 hour')); #设定24小时 + $info = $user_id . '.' . $start_time . '.' . $end_time . '.' . $user_name; //设置token过期时间为一天 + $encryption_code = "MASADA!^***"; + //根据以上信息信息生成签名(密钥为 SIGNATURE 自定义全局常量) + $signature = hash_hmac('md5', $info, $encryption_code); + //最后将这两部分拼接起来,得到最终的Token字符串 + return $token = $info . '.' . $signature; + } + //生成菜单 + + function menu($from = 'tw', $type) + { + $function_type = array( + "tw" => array( + # F角色菜单 + "H" => array( + "language" => "tw", + "type" => "manage", + "list" => array( + array("name" => "批量导入", "path" => "http://192.168.0.12/wms/excel-upload"), + ), + "note" => "none", + "token" => "" + ), + ) + ); + + return $function_type[$from][$type]; + } +} diff --git a/wms/contract-repair/api/deleteNewContractData.php b/wms/contract-repair/api/deleteNewContractData.php index 34575f0c..d2d7b6b7 100644 --- a/wms/contract-repair/api/deleteNewContractData.php +++ b/wms/contract-repair/api/deleteNewContractData.php @@ -1,35 +1,34 @@ -prepare($sql); - $stmt->bindParam(":id",$id); - $stmt->bindParam(":del",$del); - $stmt->bindParam(":user_id",$user_id); - $stmt->bindParam(":date",$date); - $stmt->execute(); - header("HTTP/1.1 204 NO Content"); - }catch(PDOException $e){ - die("ERROR!!!". $e->getMessage()); - } -} -if(isset($_GET['contractid']) && $_GET['contractid']!=""){ - try{ - $id = $_GET["contractid"]; - $sql_str = "DELETE FROM contract_m_signed_back WHERE id = :contractid"; - $stmt = $conn->prepare($sql_str); - $stmt->bindParam(":contractid", $id); - $stmt->execute(); - header("HTTP/1.1 204 No Content"); - }catch(PDOException $e){ - die("ERROR!!!: ". $e->getMessage()); - } -} -?> \ No newline at end of file +prepare($sql); + $stmt->bindParam(":id", $id); + $stmt->bindParam(":del", $del); + $stmt->bindParam(":user_id", $user_id); + $stmt->bindParam(":date", $date); + $stmt->execute(); + header("HTTP/1.1 204 NO Content"); + } catch (PDOException $e) { + die("ERROR!!!" . $e->getMessage()); + } +} +if (isset($_GET['contractid']) && $_GET['contractid'] != "") { + try { + $id = $_GET["contractid"]; + $sql_str = "DELETE FROM contract_m_signed_back WHERE id = :contractid"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(":contractid", $id); + $stmt->execute(); + header("HTTP/1.1 204 No Content"); + } catch (PDOException $e) { + die("ERROR!!!: " . $e->getMessage()); + } +} diff --git a/wms/contract-repair/api/getContractData.php b/wms/contract-repair/api/getContractData.php index 51085b0a..d04daad0 100644 --- a/wms/contract-repair/api/getContractData.php +++ b/wms/contract-repair/api/getContractData.php @@ -1,106 +1,122 @@ -prepare($sql_str); - $stmt->bindParam(':vol_no', $contractno); - $stmt->execute(); - $contract = $stmt->fetch(PDO::FETCH_ASSOC); - - if (empty($contract)) { - echo false; - exit; - } - $apply_key = $contract['apply_key']; - $sql_str = "SELECT * FROM con_maintance_examine_clear WHERE apply_key = :apply_key"; - $stmt = $conn->prepare($sql_str); - $stmt->bindParam(':apply_key', $apply_key); - $stmt->execute(); - $elevators = $stmt->fetchAll(PDO::FETCH_ASSOC); - $count = COUNT($elevators); - $contract['elevators'] = $elevators; - $contract['num'] = $count; - - $contractResponse = json_encode($contract); - - // 設定回應標頭為 JSON - header('Content-Type: application/json'); - - // 將 JSON 回應返回給客戶端 - echo $contractResponse; - // echo json_encode($contractResponse); - } catch (PDOException $e) { - die("ERROR!!!: " . $e->getMessage()); - } -} - -if (isset($_GET['contractno']) && $_GET['contractno'] != '' && isset($_GET['contracttype']) && $_GET['contracttype'] == 'm') { - try { - $contractno = $_GET['contractno']; - $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', $contractno); - $stmt->execute(); - $contract = $stmt->fetch(PDO::FETCH_ASSOC); - $contractResponse = json_encode($contract); - - // 設定回應標頭為 JSON - header('Content-Type: application/json'); - - // 將 JSON 回應返回給客戶端 - echo $contractResponse; - } catch (PDOException $e) { - die("ERROR!!!: " . $e->getMessage()); - } -} -////////////////////////////// -//// 合約簽回(修理) -//// -//// 製作人:梓誠 -/// 時間 : -////////////////////////////// -if (isset($_GET['contractno']) && $_GET['contractno'] != '' && isset($_GET['contracttype']) && $_GET['contracttype'] == 'r') { - try { - $contractno = $_GET['contractno']; - $fail_arr = []; - - $sql = "SELECT COUNT(*) AS num FROM pricereview_repair_main WHERE contractno = :contractno"; - $stmt = $conn->prepare($sql); - - $stmt->bindParam(":contractno", $contractno); - $stmt->execute(); - $result = $stmt->fetch(PDO::FETCH_ASSOC); - $count = $result['num']; - if ($count > 1) { - $fail_arr[] = '合約單號重複,請至契約管理(修理)查看。'; - header("HTTP/1.1 422 Unprocessable Entity"); - echo json_encode($fail_arr); - exit(); - } - // $contractno = $_GET['contractno']; - $sql = "SELECT a.*,b.name,b.accountid - FROM pricereview_repair_main AS a - LEFT JOIN account AS b - ON a.repairerid = b.accountid - WHERE a.contractno = :contractno "; - $stmt = $conn->prepare($sql); - - $stmt->bindParam(':contractno', $contractno); - $stmt->execute(); - $contract = $stmt->fetch(PDO::FETCH_ASSOC); - $contractResponse = json_encode($contract); - - // 設定回應標頭為 JSON - header('Content-Type : appliction/json'); - - // 將 JSON 回應給客戶端 - echo $contractResponse; - } catch (PDOException $e) { - die("ERROR!!:" . $e->getMessage()); - } -} +prepare($sql_str); + $stmt->bindParam(':vol_no', $contractno); + $stmt->execute(); + $contract = $stmt->fetch(PDO::FETCH_ASSOC); + + if (empty($contract)) { + echo false; + exit; + } + $apply_key = $contract['apply_key']; + $sql_str = "SELECT * FROM con_maintance_examine_clear WHERE apply_key = :apply_key"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':apply_key', $apply_key); + $stmt->execute(); + $elevators = $stmt->fetchAll(PDO::FETCH_ASSOC); + $count = COUNT($elevators); + $contract['elevators'] = $elevators; + $contract['num'] = $count; + + $contractResponse = json_encode($contract); + + // 設定回應標頭為 JSON + header('Content-Type: application/json'); + + // 將 JSON 回應返回給客戶端 + echo $contractResponse; + // echo json_encode($contractResponse); + } catch (PDOException $e) { + die("ERROR!!!: " . $e->getMessage()); + } +} + +if (isset($_GET['contractno']) && $_GET['contractno'] != '' && isset($_GET['contracttype']) && $_GET['contracttype'] == 'm') { + try { + $contractno = $_GET['contractno']; + $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', $contractno); + $stmt->execute(); + $contract = $stmt->fetch(PDO::FETCH_ASSOC); + $contractResponse = json_encode($contract); + + // 設定回應標頭為 JSON + header('Content-Type: application/json'); + + // 將 JSON 回應返回給客戶端 + echo $contractResponse; + } catch (PDOException $e) { + die("ERROR!!!: " . $e->getMessage()); + } +} +////////////////////////////// +//// 合約簽回(修理) +//// +//// 製作人:梓誠 +/// 時間 : +////////////////////////////// +if (isset($_GET['contractno']) && $_GET['contractno'] != '' && isset($_GET['contracttype']) && $_GET['contracttype'] == 'r') { + try { + $contractno = $_GET['contractno']; + $fail_arr = []; + $d_status = '1'; + // 判斷單號是否在合約簽核已建立 + $sql = "SELECT COUNT(*) AS num FROM contract_r_signed_back WHERE contractno = :contractno AND delete_status = :d_status "; + $stmt = $conn->prepare($sql); + $stmt->bindParam(":contractno", $contractno); + $stmt->bindParam(":d_status", $d_status); + $stmt->execute(); + $result = $stmt->fetch(PDO::FETCH_ASSOC); + $count = $result['num']; + if ($count >= 1) { + $fail_arr[] = '合約單號重複,請至契約管理(修理)查看。'; + header("HTTP/1.1 422 Unprocessable Entity"); + echo json_encode($fail_arr); + exit(); + } + // 判斷單號是否在價格審查中以建立。 + $sql = "SELECT COUNT(*) AS num FROM pricereview_repair_main WHERE contractno = :contractno"; + $stmt = $conn->prepare($sql); + $stmt->bindParam(":contractno", $contractno); + $stmt->execute(); + $result2 = $stmt->fetch(PDO::FETCH_ASSOC); + $count2 = $result2['num']; + if ($count2 == 0) { + $fail_arr[] = '找不到單號,請再確認。'; + header("HTTP/1.1 422 Unprocessable Entity"); + echo json_encode($fail_arr); + exit(); + } + + + // $contractno = $_GET['contractno']; + $sql = "SELECT a.*,b.name,b.accountid + FROM pricereview_repair_main AS a + LEFT JOIN account AS b + ON a.repairerid = b.accountid + WHERE a.contractno = :contractno "; + $stmt = $conn->prepare($sql); + + $stmt->bindParam(':contractno', $contractno); + $stmt->execute(); + $contract = $stmt->fetch(PDO::FETCH_ASSOC); + $contractResponse = json_encode($contract); + + // 設定回應標頭為 JSON + header('Content-Type : appliction/json'); + + // 將 JSON 回應給客戶端 + echo $contractResponse; + } catch (PDOException $e) { + die("ERROR!!:" . $e->getMessage()); + } +} diff --git a/wms/contract-repair/api/postContractData.php b/wms/contract-repair/api/postContractData.php index 635d81f9..b82a8cf2 100644 --- a/wms/contract-repair/api/postContractData.php +++ b/wms/contract-repair/api/postContractData.php @@ -1,412 +1,420 @@ - 0) { - header("HTTP/1.1 422 Unprocessable Entity"); - echo json_encode($fail_arr); - exit(); - } - - //create account table - $accounttype = "A"; - $accountid = $vat; - $pwd = "123"; - $name = $partyA; - $tel = $phone ?? ''; - $repairerid = $mworker; - $creater = $user_id; - $create_at = date('Y-m-d H:i:s'); - - $conn->beginTransaction(); - - $sql_str = "INSERT INTO account (accounttype, accountid, pwd, name, tel, address, email, repairerid, creater, create_at) VALUES (:accounttype, :accountid, :pwd, :name, :tel, :address, :email, :repairerid, :creater, :create_at)"; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(':accounttype' ,$accounttype); - $stmt -> bindParam(':accountid' ,$accountid); - $stmt -> bindParam(':pwd' ,$pwd); - $stmt -> bindParam(':name' ,$name); - $stmt -> bindParam(':tel' ,$tel); - $stmt -> bindParam(':address' ,$address); - $stmt -> bindParam(':email' ,$email); - $stmt -> bindParam(':repairerid' ,$repairerid); - $stmt -> bindParam(':creater' ,$creater); - $stmt -> bindParam(':create_at' ,$create_at); - $stmt -> execute(); - - //create contract table - - $contracttype = $mtype; - $company = $partyA; - $taxid = $vat; - $tel = $phone; - $promiser = $partyA; - $contractperson = $partyA; - - $contractaddress = $address; - $contracttel = $phone; - $contractemail = $email; - $contract_employee = $salesman; - $start_date = $contract_begin_date; - $end_date = $contract_end_date; - - $sql_str = "INSERT INTO contract (contracttype, contractno, company, taxid, address, tel, promiser, contractperson, contractaddress, contracttel, contractemail, contract_employee, start_date, end_date, creater, create_at) VALUES (:contracttype, :contractno, :company, :taxid, :address, :tel, :promiser, :contractperson, :contractaddress, :contracttel, :contractemail, :contract_employee, :start_date, :end_date, :creater, :create_at)"; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(':contracttype' ,$contracttype); - $stmt -> bindParam(':contractno' ,$contractno); - $stmt -> bindParam(':company' ,$company); - $stmt -> bindParam(':taxid' ,$taxid); - $stmt -> bindParam(':address' ,$address); - $stmt -> bindParam(':tel' ,$tel); - $stmt -> bindParam(':promiser' ,$promiser); - $stmt -> bindParam(':contractperson' ,$contractperson); - $stmt -> bindParam(':contractaddress' ,$contractaddress); - $stmt -> bindParam(':contracttel' ,$contracttel); - $stmt -> bindParam(':contractemail' ,$contractemail); - $stmt -> bindParam(':contract_employee' ,$contract_employee); - $stmt -> bindParam(':start_date' ,$start_date); - $stmt -> bindParam(':end_date' ,$end_date); - $stmt -> bindParam(':creater' ,$creater); - $stmt -> bindParam(':create_at' ,$create_at); - $stmt -> execute(); - - //create facility table - $createFacilityNo = new CreateFacilityNo(); - $dailyNecessities = [ - 'MAE100'=>'X', - 'MAM200'=>'W', - 'MAH100'=>'H', - 'MAQ100'=>'Z', - 'MAF100'=>'F', - 'MAZ100'=>'B', - ]; - $facility_arr = []; - foreach($elevators as $elevator){ - $facility_arr[] = $dailyNecessities[$elevator['spec']]; - } - echo json_encode($facility_arr); - $facilityno = $createFacilityNo->makeBFacilityNo("T", $facility_arr, (int)$num); - echo json_encode($facilityno); - echo '-------'; - $sql_str = "SELECT accountid, name FROM account WHERE accountid = :accountid"; - $stmt = $conn->prepare($sql_str); - $stmt->bindParam(':accountid',$mworker); - $stmt->execute(); - $worker = $stmt->fetch(PDO::FETCH_ASSOC); - $customerid = $vat; - $define = "B"; - $repairtype = $mtype; - $repairerid = $mworker; - $repairername = $worker['name']; - foreach($elevators as $idx=>$elevator){ - $sql_str = "INSERT INTO facility (contractno, define, facilityno, latitude, longitude, customerid, weight, numberofpassenger, numberofstop, numberoffloor, opentype, speed, repairtype, maintainance, facility_kind, address, repairerid, repairername, creater, create_at, area, takecertificatedate, licensedate) - VALUES (:contractno, :define, :facilityno, :latitude, :longitude, :customerid, :weight, :numberofpassenger, :numberofstop, :numberoffloor, :opentype, :speed, :repairtype, :maintainance, :facility_kind, :address, :repairerid, :repairername, :creater, :create_at, :area, :takecertificatedate, :licensedate)"; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(':contractno' ,$contractno); - $stmt -> bindParam(':define' ,$define); - $stmt -> bindParam(':facilityno' ,$facilityno[$idx]); - $stmt -> bindParam(':latitude' ,$elevator['latitude']); - $stmt -> bindParam(':longitude' ,$elevator['longitude']); - $stmt -> bindParam(':customerid' ,$customerid); - $stmt -> bindParam(':weight' ,$elevator['weight']); - $stmt -> bindParam(':numberofpassenger' ,$elevator['persons']); - $stmt -> bindParam(':numberofstop' ,$elevator['stop']); - $stmt -> bindParam(':numberoffloor' ,$elevator['floors']); - $stmt -> bindParam(':opentype' ,$elevator['opendoor']); - $stmt -> bindParam(':speed' ,$elevator['speed']); - $stmt -> bindParam(':repairtype' ,$repairtype); - $stmt -> bindParam(':maintainance' ,$elevator['maintainance']); - $stmt -> bindParam(':facility_kind' ,$elevator['spec']); - $stmt -> bindParam(':address' ,$address); - $stmt -> bindParam(':repairerid' ,$repairerid); - $stmt -> bindParam(':repairername' ,$repairername); - $stmt -> bindParam(':creater' ,$creater); - $stmt -> bindParam(':create_at' ,$create_at); - $stmt -> bindParam(':area' ,$area); - $stmt -> bindParam(':takecertificatedate' ,$elevator['takecertificatedate']); - $stmt -> bindParam(':licensedate' ,$elevator['useful_date']); - $result = $stmt -> execute(); - } - - //create schedule table - - $comboNo = new CreateComboNo($mcycle, $contract_begin_date, $contract_end_date); - $comboArr = json_decode($comboNo->getComboNo(), true); - foreach($facilityno as $no){ - foreach($comboArr as $combo){ - $sql_str = 'INSERT INTO schedule (contractno, facilityno, combono, repairerid, repairername, duedate, creater, create_at) VALUES (:contractno, :facilityno, :combono, :repairerid, :repairername, :duedate, :creater, :create_at)'; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(':contractno' ,$contractno); - $stmt -> bindParam(':facilityno' ,$no); - $stmt -> bindParam(':combono' ,$combo[0]); - $stmt -> bindParam(':repairerid' ,$repairerid); - $stmt -> bindParam(':repairername' ,$repairername); - $stmt -> bindParam(':duedate' ,$combo[1]); - $stmt -> bindParam(':creater' ,$creater); - $stmt -> bindParam(':create_at' ,$create_at); - $result = $stmt -> execute(); - } - } - // create contract_b_signed_back table - $contract_type = $mtype; - $company = $customer; - $customer_no = $vat; - $salesperson = $salesman; - $customer_phone = $phone; - $customer_email = $email; - $repairman = $mworker; - $cycle = $mcycle; - $contact_person = $partyA; - $contact_address = $partyAaddress; - $contact_phone = $partyAphone; - $contract_email = $partyAemail; - $elevators_number = $num; - $bonus = 1000; - $max_bonus = 2000; - - if(!empty($files)){ - $englisharr = range('a', 'z'); - $file = $_FILES['files']; - $file_name = $file['name']; - $file_type = $file['type']; - $tmp_name = $file['tmp_name']; - $file_size = $file['size']; - $error = $file['error']; - $newfiles = []; - foreach( $files as $file ){ - $i = 0; //新陣列的索引編號 - foreach( $file as $key => $val ){ - $newfiles[$i]['name'] = $files['name'][$key]; - $newfiles[$i]['type'] = $files['type'][$key]; - $newfiles[$i]['tmp_name'] = $files['tmp_name'][$key]; - $newfiles[$i]['error'] = $files['error'][$key]; - $newfiles[$i]['size'] = $files['size'][$key]; - $i++; - } //foreach 第2層 end - } - $max_size = 4096*4096; //設定允許上傳檔案容量的最大值(1M) - $allow_ext = array('jpeg', 'jpg', 'png','JPG','JPEG','PNG','GIF'); //設定允許上傳檔案的類型 - $path = '../images/contracts/'; - if (!file_exists($path)) { mkdir($path); } - $msg_result = ''; //負責接收所有檔案檢測後的回傳訊息 - $datetime = (string)date('YmdHis'); - $files_id = 'b' . $datetime; // 保養=>b + 日期時間 - foreach( $newfiles as $key => $file ){ - $randNum = rand(1000,9999); - $randEnglish = $englisharr[rand(0,25)]; - $file_name = 'b' . (string)date('YmdHis') . $randNum . $randEnglish . $randNum.$file['name']; - $msg = upload_chk( $file,$path, $max_size, $allow_ext, $file_name ); - if($msg==1){ - $msg = '檔案傳送成功!'; - $sql_str = "INSERT INTO contract_back_files (files_id, file_name, file_mime, file_size, created_at, created_by) VALUES (:files_id, :file_name, :file_mime, :file_size, :created_at, :created_by)"; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(':files_id' ,$files_id); - $stmt -> bindParam(':file_name' ,$file_name); - $stmt -> bindParam(':file_mime' ,$file['type']); - $stmt -> bindParam(':file_size' ,$file['size']); - $stmt -> bindParam(':created_at' ,$created_at); - $stmt -> bindParam(':created_by' ,$user_id); - $stmt ->execute(); - } - $msg_result .= '第' . ($key+1) . '個上傳檔案的結果:' . $msg . '
'; - $src_name = $path.$file['name']; - if( file_exists($src_name) ){ - //副檔名 - $extname = pathinfo($src_name, PATHINFO_EXTENSION); - //主檔名 - $basename = basename($src_name, '.'.$extname); - } - - } - }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)"; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(":contract_no",$contractno); - $stmt -> bindParam(":contract_type",$contract_type); - $stmt -> bindParam(":company",$company); - $stmt -> bindParam(":customer_no",$customer_no); - $stmt -> bindParam(":salesperson",$salesperson); - $stmt -> bindParam(":contract_start_date",$contract_begin_date); - $stmt -> bindParam(":contract_end_date",$contract_end_date); - $stmt -> bindParam(":total_price",$total_price); - $stmt -> bindParam(":customer_phone",$customer_phone); - $stmt -> bindParam(":customer_email",$customer_email); - $stmt -> bindParam(":repairman",$repairman); - $stmt -> bindParam(":cycle",$cycle); - $stmt -> bindParam(":contact_person",$contact_person); - $stmt -> bindParam(":contact_address",$contact_address); - $stmt -> bindParam(":contact_phone",$contact_phone); - $stmt -> bindParam(":contact_email",$contact_email); - $stmt -> bindParam(":elevators_number",$elevators_number); - $stmt -> bindParam(":area",$area); - $stmt -> bindParam(":address",$address); - $stmt -> bindParam(":files_id",$files_id); - $stmt -> bindParam(":bonus",$bonus); - $stmt -> bindParam(":max_bonus",$max_bonus); - $stmt -> bindParam(":created_at", $created_at); - $stmt -> bindParam(":created_by",$user_id); - - $stmt -> execute(); - - header('Content-Type: application/json'); - // $jsonData = json_encode($files); - - $conn->commit(); - }catch(PDOException $e){ - $conn->rollback(); - echo $e->getMessage(); - die('Error!:'.$e->getMessage()); - } -} - - -////////////////////////////// -//// 合約簽回(修理) -//// -//// 製作人:梓誠 -/// 時間 : -////////////////////////////// -if(isset($_POST['contractno']) && $_POST['contractno'] != "" && isset($_POST['contracttype']) && $_POST['contracttype'] == 'r'){ - try{ - $created_at = date('Y-m-d H:i:s'); - $contractno = !empty($_POST['contractno']) ? $_POST['contractno'] : null; - $company = !empty($_POST['company']) ? $_POST['company'] : null; - $repairid = !empty($_POST['repairid']) ? $_POST['repairid'] : null; - $facilityno = !empty($_POST['facilityno']) ? $_POST['facilityno'] : null; - $taxid = !empty($_POST['taxid']) ? $_POST['taxid'] : null; - $invoice = !empty($_POST['invoice']) ? $_POST['invoice'] : null; - $address = !empty($_POST['address']) ? $_POST['address'] : null; - $repair_no = !empty($_POST['repair_no']) ? $_POST['repair_no'] : null; - $total_price= !empty($_POST['total_price']) ? $_POST['total_price'] : null; - $user_id = !empty($_POST['user_id']) ? $_POST['user_id'] : null; - $type = !empty($_POST['type']) ? $_POST['type'] : null; - $sign_date = !empty($_POST['sign_date']) ? $_POST['sign_date']: null; - - $fail_arr = []; - if($contractno === '') return $fail_arr[] = '合約號為必填'; - if($repair_no === '') return $fail_arr[] = '報價單編號為必填'; - if($company === '') return $fail_arr[] = '客戶名稱為必填'; - // if($taxid === '') return $fail_arr[] = '統一編號為必填'; - if($facilityno === '') return $fail_arr[] = '電梯編號為必填'; - if($address === '') return $fail_arr[] = '工程地址為必填'; - if($type === '') return $fail_arr[] = '工程類別為必填'; - if($invoice === '') return $fail_arr[] = '發票抬頭為必填'; - if(count($fail_arr)>0){ - header("HTTP/1.1 422 Unprocessable Entity"); - echo json_encode($fail_arr); - exit(); - } - // exit(); - //create contrac_r_signed_back table - $conn -> beginTransaction(); - $sql = "INSERT INTO contract_r_signed_back( - repair_no, - contractno, - company, - taxid, - facilityno, - address, - type, - invoice, - repaireid, - total_price, - sign_date, - create_userid, - create_date) VALUES( - :repair_no, - :contractno, - :company, - :taxid, - :facilityno, - :address, - :type, - :invoice, - :repaireid, - :total_price, - :sign_date, - :create_userid, - :create_date - )"; - $stmt = $conn -> prepare($sql); - $stmt -> bindParam(":repair_no",$repair_no); - $stmt -> bindParam(":contractno",$contractno); - $stmt -> bindParam(":company",$company); - $stmt -> bindParam(":taxid",$taxid); - $stmt -> bindParam(":facilityno",$facilityno); - $stmt -> bindParam(":address",$address); - $stmt -> bindParam(":type", $type); - $stmt -> bindParam(":invoice", $invoice); - $stmt -> bindParam(":repaireid",$repaireid); - $stmt -> bindParam(":total_price",$total_price); - $stmt -> bindParam(":sign_date",$sign_date); - $stmt -> bindParam(":create_userid",$user_id); - $stmt -> bindParam("create_date",$created_at); - - $stmt -> execute(); - header('Content-Type: application/json'); - // $jsonData = json_encode($files); - - $conn -> commit(); - }catch(PDOException $e){ - $conn -> rollback(); - echo $e->getMessage(); - die('Error!' .$e->getMessage()); - } -} - - + 0) { + header("HTTP/1.1 422 Unprocessable Entity"); + echo json_encode($fail_arr); + exit(); + } + + //create account table + $accounttype = "A"; + $accountid = $vat; + $pwd = "123"; + $name = $partyA; + $tel = $phone ?? ''; + $repairerid = $mworker; + $creater = $user_id; + $create_at = date('Y-m-d H:i:s'); + + $conn->beginTransaction(); + + $sql_str = "INSERT INTO account (accounttype, accountid, pwd, name, tel, address, email, repairerid, creater, create_at) VALUES (:accounttype, :accountid, :pwd, :name, :tel, :address, :email, :repairerid, :creater, :create_at)"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':accounttype', $accounttype); + $stmt->bindParam(':accountid', $accountid); + $stmt->bindParam(':pwd', $pwd); + $stmt->bindParam(':name', $name); + $stmt->bindParam(':tel', $tel); + $stmt->bindParam(':address', $address); + $stmt->bindParam(':email', $email); + $stmt->bindParam(':repairerid', $repairerid); + $stmt->bindParam(':creater', $creater); + $stmt->bindParam(':create_at', $create_at); + $stmt->execute(); + + //create contract table + + $contracttype = $mtype; + $company = $partyA; + $taxid = $vat; + $tel = $phone; + $promiser = $partyA; + $contractperson = $partyA; + + $contractaddress = $address; + $contracttel = $phone; + $contractemail = $email; + $contract_employee = $salesman; + $start_date = $contract_begin_date; + $end_date = $contract_end_date; + + $sql_str = "INSERT INTO contract (contracttype, contractno, company, taxid, address, tel, promiser, contractperson, contractaddress, contracttel, contractemail, contract_employee, start_date, end_date, creater, create_at) VALUES (:contracttype, :contractno, :company, :taxid, :address, :tel, :promiser, :contractperson, :contractaddress, :contracttel, :contractemail, :contract_employee, :start_date, :end_date, :creater, :create_at)"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':contracttype', $contracttype); + $stmt->bindParam(':contractno', $contractno); + $stmt->bindParam(':company', $company); + $stmt->bindParam(':taxid', $taxid); + $stmt->bindParam(':address', $address); + $stmt->bindParam(':tel', $tel); + $stmt->bindParam(':promiser', $promiser); + $stmt->bindParam(':contractperson', $contractperson); + $stmt->bindParam(':contractaddress', $contractaddress); + $stmt->bindParam(':contracttel', $contracttel); + $stmt->bindParam(':contractemail', $contractemail); + $stmt->bindParam(':contract_employee', $contract_employee); + $stmt->bindParam(':start_date', $start_date); + $stmt->bindParam(':end_date', $end_date); + $stmt->bindParam(':creater', $creater); + $stmt->bindParam(':create_at', $create_at); + $stmt->execute(); + + //create facility table + $createFacilityNo = new CreateFacilityNo(); + $dailyNecessities = [ + 'MAE100' => 'X', + 'MAM200' => 'W', + 'MAH100' => 'H', + 'MAQ100' => 'Z', + 'MAF100' => 'F', + 'MAZ100' => 'B', + ]; + $facility_arr = []; + foreach ($elevators as $elevator) { + $facility_arr[] = $dailyNecessities[$elevator['spec']]; + } + echo json_encode($facility_arr); + $facilityno = $createFacilityNo->makeBFacilityNo("T", $facility_arr, (int)$num); + echo json_encode($facilityno); + echo '-------'; + $sql_str = "SELECT accountid, name FROM account WHERE accountid = :accountid"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':accountid', $mworker); + $stmt->execute(); + $worker = $stmt->fetch(PDO::FETCH_ASSOC); + $customerid = $vat; + $define = "B"; + $repairtype = $mtype; + $repairerid = $mworker; + $repairername = $worker['name']; + foreach ($elevators as $idx => $elevator) { + $sql_str = "INSERT INTO facility (contractno, define, facilityno, latitude, longitude, customerid, weight, numberofpassenger, numberofstop, numberoffloor, opentype, speed, repairtype, maintainance, facility_kind, address, repairerid, repairername, creater, create_at, area, takecertificatedate, licensedate) + VALUES (:contractno, :define, :facilityno, :latitude, :longitude, :customerid, :weight, :numberofpassenger, :numberofstop, :numberoffloor, :opentype, :speed, :repairtype, :maintainance, :facility_kind, :address, :repairerid, :repairername, :creater, :create_at, :area, :takecertificatedate, :licensedate)"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':contractno', $contractno); + $stmt->bindParam(':define', $define); + $stmt->bindParam(':facilityno', $facilityno[$idx]); + $stmt->bindParam(':latitude', $elevator['latitude']); + $stmt->bindParam(':longitude', $elevator['longitude']); + $stmt->bindParam(':customerid', $customerid); + $stmt->bindParam(':weight', $elevator['weight']); + $stmt->bindParam(':numberofpassenger', $elevator['persons']); + $stmt->bindParam(':numberofstop', $elevator['stop']); + $stmt->bindParam(':numberoffloor', $elevator['floors']); + $stmt->bindParam(':opentype', $elevator['opendoor']); + $stmt->bindParam(':speed', $elevator['speed']); + $stmt->bindParam(':repairtype', $repairtype); + $stmt->bindParam(':maintainance', $elevator['maintainance']); + $stmt->bindParam(':facility_kind', $elevator['spec']); + $stmt->bindParam(':address', $address); + $stmt->bindParam(':repairerid', $repairerid); + $stmt->bindParam(':repairername', $repairername); + $stmt->bindParam(':creater', $creater); + $stmt->bindParam(':create_at', $create_at); + $stmt->bindParam(':area', $area); + $stmt->bindParam(':takecertificatedate', $elevator['takecertificatedate']); + $stmt->bindParam(':licensedate', $elevator['useful_date']); + $result = $stmt->execute(); + } + + //create schedule table + + $comboNo = new CreateComboNo($mcycle, $contract_begin_date, $contract_end_date); + $comboArr = json_decode($comboNo->getComboNo(), true); + foreach ($facilityno as $no) { + foreach ($comboArr as $combo) { + $sql_str = 'INSERT INTO schedule (contractno, facilityno, combono, repairerid, repairername, duedate, creater, create_at) VALUES (:contractno, :facilityno, :combono, :repairerid, :repairername, :duedate, :creater, :create_at)'; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':contractno', $contractno); + $stmt->bindParam(':facilityno', $no); + $stmt->bindParam(':combono', $combo[0]); + $stmt->bindParam(':repairerid', $repairerid); + $stmt->bindParam(':repairername', $repairername); + $stmt->bindParam(':duedate', $combo[1]); + $stmt->bindParam(':creater', $creater); + $stmt->bindParam(':create_at', $create_at); + $result = $stmt->execute(); + } + } + // create contract_b_signed_back table + $contract_type = $mtype; + $company = $customer; + $customer_no = $vat; + $salesperson = $salesman; + $customer_phone = $phone; + $customer_email = $email; + $repairman = $mworker; + $cycle = $mcycle; + $contact_person = $partyA; + $contact_address = $partyAaddress; + $contact_phone = $partyAphone; + $contract_email = $partyAemail; + $elevators_number = $num; + $bonus = 1000; + $max_bonus = 2000; + + if (!empty($files)) { + $englisharr = range('a', 'z'); + $file = $_FILES['files']; + $file_name = $file['name']; + $file_type = $file['type']; + $tmp_name = $file['tmp_name']; + $file_size = $file['size']; + $error = $file['error']; + $newfiles = []; + foreach ($files as $file) { + $i = 0; //新陣列的索引編號 + foreach ($file as $key => $val) { + $newfiles[$i]['name'] = $files['name'][$key]; + $newfiles[$i]['type'] = $files['type'][$key]; + $newfiles[$i]['tmp_name'] = $files['tmp_name'][$key]; + $newfiles[$i]['error'] = $files['error'][$key]; + $newfiles[$i]['size'] = $files['size'][$key]; + $i++; + } //foreach 第2層 end + } + $max_size = 4096 * 4096; //設定允許上傳檔案容量的最大值(1M) + $allow_ext = array('jpeg', 'jpg', 'png', 'JPG', 'JPEG', 'PNG', 'GIF'); //設定允許上傳檔案的類型 + $path = '../images/contracts/'; + if (!file_exists($path)) { + mkdir($path); + } + $msg_result = ''; //負責接收所有檔案檢測後的回傳訊息 + $datetime = (string)date('YmdHis'); + $files_id = 'b' . $datetime; // 保養=>b + 日期時間 + foreach ($newfiles as $key => $file) { + $randNum = rand(1000, 9999); + $randEnglish = $englisharr[rand(0, 25)]; + $file_name = 'b' . (string)date('YmdHis') . $randNum . $randEnglish . $randNum . $file['name']; + $msg = upload_chk($file, $path, $max_size, $allow_ext, $file_name); + if ($msg == 1) { + $msg = '檔案傳送成功!'; + $sql_str = "INSERT INTO contract_back_files (files_id, file_name, file_mime, file_size, created_at, created_by) VALUES (:files_id, :file_name, :file_mime, :file_size, :created_at, :created_by)"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':files_id', $files_id); + $stmt->bindParam(':file_name', $file_name); + $stmt->bindParam(':file_mime', $file['type']); + $stmt->bindParam(':file_size', $file['size']); + $stmt->bindParam(':created_at', $created_at); + $stmt->bindParam(':created_by', $user_id); + $stmt->execute(); + } + $msg_result .= '第' . ($key + 1) . '個上傳檔案的結果:' . $msg . '
'; + $src_name = $path . $file['name']; + if (file_exists($src_name)) { + //副檔名 + $extname = pathinfo($src_name, PATHINFO_EXTENSION); + //主檔名 + $basename = basename($src_name, '.' . $extname); + } + } + } 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)"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(":contract_no", $contractno); + $stmt->bindParam(":contract_type", $contract_type); + $stmt->bindParam(":company", $company); + $stmt->bindParam(":customer_no", $customer_no); + $stmt->bindParam(":salesperson", $salesperson); + $stmt->bindParam(":contract_start_date", $contract_begin_date); + $stmt->bindParam(":contract_end_date", $contract_end_date); + $stmt->bindParam(":total_price", $total_price); + $stmt->bindParam(":customer_phone", $customer_phone); + $stmt->bindParam(":customer_email", $customer_email); + $stmt->bindParam(":repairman", $repairman); + $stmt->bindParam(":cycle", $cycle); + $stmt->bindParam(":contact_person", $contact_person); + $stmt->bindParam(":contact_address", $contact_address); + $stmt->bindParam(":contact_phone", $contact_phone); + $stmt->bindParam(":contact_email", $contact_email); + $stmt->bindParam(":elevators_number", $elevators_number); + $stmt->bindParam(":area", $area); + $stmt->bindParam(":address", $address); + $stmt->bindParam(":files_id", $files_id); + $stmt->bindParam(":bonus", $bonus); + $stmt->bindParam(":max_bonus", $max_bonus); + $stmt->bindParam(":created_at", $created_at); + $stmt->bindParam(":created_by", $user_id); + + $stmt->execute(); + + header('Content-Type: application/json'); + // $jsonData = json_encode($files); + + $conn->commit(); + } catch (PDOException $e) { + $conn->rollback(); + echo $e->getMessage(); + die('Error!:' . $e->getMessage()); + } +} + + +////////////////////////////// +//// 合約簽回(修理) +//// +//// 製作人:梓誠 +/// 時間 : +////////////////////////////// +if (isset($_POST['contractno']) && $_POST['contractno'] != "" && isset($_POST['contracttype']) && $_POST['contracttype'] == 'r') { + try { + $created_at = date('Y-m-d H:i:s'); + $contractno = !empty($_POST['contractno']) ? $_POST['contractno'] : null; + $company = !empty($_POST['company']) ? $_POST['company'] : null; + $repairid = !empty($_POST['repairid']) ? $_POST['repairid'] : null; + $facilityno = !empty($_POST['facilityno']) ? $_POST['facilityno'] : null; + $taxid = !empty($_POST['taxid']) ? $_POST['taxid'] : null; + $invoice = !empty($_POST['invoice']) ? $_POST['invoice'] : null; + $address = !empty($_POST['address']) ? $_POST['address'] : null; + $repair_no = !empty($_POST['repair_no']) ? $_POST['repair_no'] : null; + $total_price = !empty($_POST['total_price']) ? $_POST['total_price'] : null; + $user_id = !empty($_POST['user_id']) ? $_POST['user_id'] : null; + $type = !empty($_POST['type']) ? $_POST['type'] : null; + $sign_date = !empty($_POST['sign_date']) ? $_POST['sign_date'] : null; + $contract_status = !empty($_POST['contract_status']) ? $_POST['contract_status'] : null; + + $fail_arr = []; + + if (empty($contractno)) $fail_arr[] = '合約號為必填'; + if (empty($repair_no)) $fail_arr[] = '報價單編號為必填'; + if (empty($company)) $fail_arr[] = '客戶名稱為必填'; + if (empty($repairid)) $fail_arr[] = '為保人員為必填'; + // iempty(f($taxid === '') return $fail_arr[] = '統一編號為必填'; + if (empty($facilityno)) $fail_arr[] = '電梯編號為必填'; + if (empty($address)) $fail_arr[] = '工程地址為必填'; + if (empty($type)) $fail_arr[] = '工程類別為必填'; + if (empty($invoice)) $fail_arr[] = '發票抬頭為必填'; + if (empty($taxid)) $fail_arr[] = '統一編號為必填'; + // echo json_encode($fail_arr); + // exit; + if (count($fail_arr) > 0) { + header("HTTP/1.1 422 Unprocessable Entity"); + echo json_encode($fail_arr); + exit(); + } + // exit(); + //create contrac_r_signed_back table + $conn->beginTransaction(); + $sql = "INSERT INTO contract_r_signed_back( + repair_no, + contractno, + company, + taxid, + facilityno, + address, + type, + invoice, + repaireid, + total_price, + sign_date, + contract_status, + create_user, + create_date) VALUES( + :repair_no, + :contractno, + :company, + :taxid, + :facilityno, + :address, + :type, + :invoice, + :repaireid, + :total_price, + :sign_date, + :contract_status, + :create_userid, + :create_date + )"; + $stmt = $conn->prepare($sql); + $stmt->bindParam(":repair_no", $repair_no); + $stmt->bindParam(":contractno", $contractno); + $stmt->bindParam(":company", $company); + $stmt->bindParam(":taxid", $taxid); + $stmt->bindParam(":facilityno", $facilityno); + $stmt->bindParam(":address", $address); + $stmt->bindParam(":type", $type); + $stmt->bindParam(":invoice", $invoice); + $stmt->bindParam(":repaireid", $repaireid); + $stmt->bindParam(":total_price", $total_price); + $stmt->bindParam(":sign_date", $sign_date); + $stmt->bindParam(":contract_status", $contract_status); + $stmt->bindParam(":create_userid", $user_id); + $stmt->bindParam("create_date", $created_at); + + $stmt->execute(); + header('Content-Type: application/json'); + // $jsonData = json_encode($files); + + $conn->commit(); + } catch (PDOException $e) { + $conn->rollback(); + echo $e->getMessage(); + die('Error!' . $e->getMessage()); + } +} diff --git a/wms/contract-repair/api/putContractData.php b/wms/contract-repair/api/putContractData.php index 0698a041..cffa48a0 100644 --- a/wms/contract-repair/api/putContractData.php +++ b/wms/contract-repair/api/putContractData.php @@ -1,174 +1,190 @@ - 0){ - header("HTTP/1.1 442 Unprocessable Entity"); - echo json_encode($fail_arr); - exit(); - } - $conn -> beginTransaction(); - - - }catch(PDOException $e){ - $conn->rollback(); - header("HTTPP/1.1 500 Internal Server Error"); - die('Error!:' .$e->getMessage()); - } -} -if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"]) && $_POST['id']!=""){ - try{ - $created_at = date('Y-m-d H:i:s'); - $created_by = $_POST['user_id']; - $id = $_POST["id"]; - $contract_no = !empty($_POST['contractno']) ? $_POST['contractno'] : null; - $customer = !empty($_POST['customer']) ? $_POST['customer'] : null; - $manager = !empty($_POST['manager']) ? $_POST['manager'] : null; - $vat = !empty($_POST['vat']) ? $_POST['vat'] : null; - $case_name = !empty($_POST['case_name']) ? $_POST['case_name'] : null; - $linkman = !empty($_POST['linkman']) ? $_POST['linkman'] : null; - $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; - - $deletefilesArr = explode(',', $_POST['deletefiles']); - - $fail_arr = []; - if(empty($contract_no)) $fail_arr[] = '合約號為必填'; - if(empty($customer)) $fail_arr[] = '客戶名稱為必填'; - if(empty($manager)) $fail_arr[] = '負責人為必填'; - if(empty($vat)) $fail_arr[] = '統編/身分證為必填'; - if(empty($case_name)) $fail_arr[] = '案名為必填'; - if(empty($linkman)) $fail_arr[] = '聯絡人為必填'; - 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); - exit(); - } - - $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, qc_official_type=:qc WHERE id = :id"; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(':contract_no' ,$contract_no); - $stmt -> bindParam(':customer' ,$customer); - $stmt -> bindParam(':manager' ,$manager); - $stmt -> bindParam(':vat' ,$vat); - $stmt -> bindParam(':case_name' ,$case_name); - $stmt -> bindParam(':linkman' ,$linkman); - $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)){ - $sql_str = "DELETE FROM contract_back_files WHERE id IN ($deletefiles)"; - $stmt = $conn -> prepare($sql_str); - $stmt -> execute(); - } - - if(!empty($files)){ - $englisharr = range('a', 'z'); - $files = $_FILES['files']; - $newfiles = []; - foreach( $files as $file ){ - $i = 0; //新陣列的索引編號 - foreach( $file as $key => $val ){ - $newfiles[$i]['name'] = $files['name'][$key]; - $newfiles[$i]['type'] = $files['type'][$key]; - $newfiles[$i]['tmp_name'] = $files['tmp_name'][$key]; - $newfiles[$i]['error'] = $files['error'][$key]; - $newfiles[$i]['size'] = $files['size'][$key]; - $i++; - } //foreach 第2層 end - } - $max_size = 4096*4096; //設定允許上傳檔案容量的最大值(1M) - $allow_ext = array('jpeg', 'jpg', 'png','JPG','JPEG','PNG','GIF'); //設定允許上傳檔案的類型 - $path = '../images/contracts/'; - if (!file_exists($path)) { mkdir($path); } - $msg_result = ''; //負責接收所有檔案檢測後的回傳訊息 - $datetime = (string)date('YmdHis'); - $files_id = ($files_id !== null ) ? $files_id : 'm' . $datetime; // 新梯=>m + 日期時間 - foreach( $newfiles as $key => $file ){ - $randNum = rand(1000,9999); - $randEnglish = $englisharr[rand(0,25)]; - $file_name = 'm' . (string)date('YmdHis') . $randNum . $randEnglish . $randNum.$file['name']; - $msg = upload_chk( $file,$path, $max_size, $allow_ext, $file_name ); - if($msg==1){ - $msg = '檔案傳送成功!'; - $sql_str = "INSERT INTO contract_back_files (files_id, file_name, file_mime, file_size, created_at, created_by) VALUES (:files_id, :file_name, :file_mime, :file_size, :created_at, :created_by)"; - $stmt = $conn -> prepare($sql_str); - $stmt -> bindParam(':files_id' ,$files_id); - $stmt -> bindParam(':file_name' ,$file_name); - $stmt -> bindParam(':file_mime' ,$file['type']); - $stmt -> bindParam(':file_size' ,$file['size']); - $stmt -> bindParam(':created_at' ,$created_at); - $stmt -> bindParam(':created_by' ,$created_by); - $stmt ->execute(); - }else{ - throw new PDOException('檔案上傳失敗:' . $msg); - } - $msg_result .= '第' . ($key+1) . '個上傳檔案的結果:' . $msg . '
'; - $src_name = $path.$file['name']; - if( file_exists($src_name) ){ - //副檔名 - $extname = pathinfo($src_name, PATHINFO_EXTENSION); - //主檔名 - $basename = basename($src_name, '.'.$extname); - } - } - }else{ - $files = null; - } - - $conn->commit(); - }catch(PDOException $e) { - $conn->rollback(); - header("HTTP/1.1 500 Internal Server Error"); - die('Error!:'.$e->getMessage()); - } - - - - - - - - - -} \ No newline at end of file + 0) { + header("HTTP/1.1 442 Unprocessable Entity"); + echo json_encode($fail_arr); + exit(); + } + // $conn->beginTransaction(); + + $sql = "UPDATE contract_r_signed_back SET + repaireid = :repaireid,facilityno= :facilityno, invoice=:invoice, taxid=:taxid, address=:address,type=:type,contract_status=:contract_status,update_user=:update_user,update_date=:update_date + WHERE id = :id"; + + $stmt = $conn->prepare($sql); + $stmt->bindParam(':repaireid', $repaireid); + $stmt->bindParam(':facilityno', $facilityno); + $stmt->bindParam(':invoice', $invoice); + $stmt->bindParam(':taxid', $taxid); + $stmt->bindParam(':address', $address); + $stmt->bindParam(':type', $type); + $stmt->bindParam(':contract_status', $contract_status); + $stmt->bindParam(':update_user', $user_id); + $stmt->bindParam(':update_date', $create_date); + + $stmt->bindParam(':id', $_POST['id']); + // echo json_encode($sql); + // exit; + $stmt->execute(); + // header("HTTP/1.1 204 NO Content"); + + // $conn->commit(); + } catch (PDOException $e) { + // $conn->rollback(); + header("HTTPP/1.1 500 Internal Server Error"); + die('Error!:' . $e->getMessage()); + } +} +// if (isset($_POST['contractno']) && $_POST['contractno'] != "" && isset($_POST["id"]) && $_POST['id'] != "") { +// try { +// $created_at = date('Y-m-d H:i:s'); +// $created_by = $_POST['user_id']; +// $id = $_POST["id"]; +// $contract_no = !empty($_POST['contractno']) ? $_POST['contractno'] : null; +// $customer = !empty($_POST['customer']) ? $_POST['customer'] : null; +// $manager = !empty($_POST['manager']) ? $_POST['manager'] : null; +// $vat = !empty($_POST['vat']) ? $_POST['vat'] : null; +// $case_name = !empty($_POST['case_name']) ? $_POST['case_name'] : null; +// $linkman = !empty($_POST['linkman']) ? $_POST['linkman'] : null; +// $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; + +// $deletefilesArr = explode(',', $_POST['deletefiles']); + +// $fail_arr = []; +// if (empty($contract_no)) $fail_arr[] = '合約號為必填'; +// if (empty($customer)) $fail_arr[] = '客戶名稱為必填'; +// if (empty($manager)) $fail_arr[] = '負責人為必填'; +// if (empty($vat)) $fail_arr[] = '統編/身分證為必填'; +// if (empty($case_name)) $fail_arr[] = '案名為必填'; +// if (empty($linkman)) $fail_arr[] = '聯絡人為必填'; +// 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); +// exit(); +// } + +// $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, qc_official_type=:qc WHERE id = :id"; +// $stmt = $conn->prepare($sql_str); +// $stmt->bindParam(':contract_no', $contract_no); +// $stmt->bindParam(':customer', $customer); +// $stmt->bindParam(':manager', $manager); +// $stmt->bindParam(':vat', $vat); +// $stmt->bindParam(':case_name', $case_name); +// $stmt->bindParam(':linkman', $linkman); +// $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)) { +// $sql_str = "DELETE FROM contract_back_files WHERE id IN ($deletefiles)"; +// $stmt = $conn->prepare($sql_str); +// $stmt->execute(); +// } + +// if (!empty($files)) { +// $englisharr = range('a', 'z'); +// $files = $_FILES['files']; +// $newfiles = []; +// foreach ($files as $file) { +// $i = 0; //新陣列的索引編號 +// foreach ($file as $key => $val) { +// $newfiles[$i]['name'] = $files['name'][$key]; +// $newfiles[$i]['type'] = $files['type'][$key]; +// $newfiles[$i]['tmp_name'] = $files['tmp_name'][$key]; +// $newfiles[$i]['error'] = $files['error'][$key]; +// $newfiles[$i]['size'] = $files['size'][$key]; +// $i++; +// } //foreach 第2層 end +// } +// $max_size = 4096 * 4096; //設定允許上傳檔案容量的最大值(1M) +// $allow_ext = array('jpeg', 'jpg', 'png', 'JPG', 'JPEG', 'PNG', 'GIF'); //設定允許上傳檔案的類型 +// $path = '../images/contracts/'; +// if (!file_exists($path)) { +// mkdir($path); +// } +// $msg_result = ''; //負責接收所有檔案檢測後的回傳訊息 +// $datetime = (string)date('YmdHis'); +// $files_id = ($files_id !== null) ? $files_id : 'm' . $datetime; // 新梯=>m + 日期時間 +// foreach ($newfiles as $key => $file) { +// $randNum = rand(1000, 9999); +// $randEnglish = $englisharr[rand(0, 25)]; +// $file_name = 'm' . (string)date('YmdHis') . $randNum . $randEnglish . $randNum . $file['name']; +// $msg = upload_chk($file, $path, $max_size, $allow_ext, $file_name); +// if ($msg == 1) { +// $msg = '檔案傳送成功!'; +// $sql_str = "INSERT INTO contract_back_files (files_id, file_name, file_mime, file_size, created_at, created_by) VALUES (:files_id, :file_name, :file_mime, :file_size, :created_at, :created_by)"; +// $stmt = $conn->prepare($sql_str); +// $stmt->bindParam(':files_id', $files_id); +// $stmt->bindParam(':file_name', $file_name); +// $stmt->bindParam(':file_mime', $file['type']); +// $stmt->bindParam(':file_size', $file['size']); +// $stmt->bindParam(':created_at', $created_at); +// $stmt->bindParam(':created_by', $created_by); +// $stmt->execute(); +// } else { +// throw new PDOException('檔案上傳失敗:' . $msg); +// } +// $msg_result .= '第' . ($key + 1) . '個上傳檔案的結果:' . $msg . '
'; +// $src_name = $path . $file['name']; +// if (file_exists($src_name)) { +// //副檔名 +// $extname = pathinfo($src_name, PATHINFO_EXTENSION); +// //主檔名 +// $basename = basename($src_name, '.' . $extname); +// } +// } +// } else { +// $files = null; +// } + +// $conn->commit(); +// } catch (PDOException $e) { +// $conn->rollback(); +// header("HTTP/1.1 500 Internal Server Error"); +// die('Error!:' . $e->getMessage()); +// } +// } diff --git a/wms/contract-repair/contract-repair-edit.php b/wms/contract-repair/contract-repair-edit.php index 29f23282..fdd86381 100644 --- a/wms/contract-repair/contract-repair-edit.php +++ b/wms/contract-repair/contract-repair-edit.php @@ -1,196 +1,210 @@ -prepare($sql_str); -$stmt->bindParam(':id', $id); -$stmt->execute(); -$contract = $stmt->fetch(PDO::FETCH_ASSOC); -// echo '
';
-// print_r($contract);
-// echo '
'; -// $files_id = $contract['files_id']; -// $sql_str = "SELECT * FROM contract_back_files WHERE files_id = :files_id "; -// $stmt = $conn->prepare($sql_str); -// $stmt->bindParam(':files_id', $files_id); -// $stmt->execute(); -// $files= $stmt->fetchAll(PDO::FETCH_ASSOC); -// $files = json_encode($files); -$accounttype = "M"; -$sql_str = "SELECT accountid, name FROM account WHERE accounttype = :accounttype"; -$stmt = $conn->prepare($sql_str); -$stmt->bindParam(":accounttype", $accounttype); -$stmt->execute(); -$persons = $stmt->fetchAll(PDO::FETCH_ASSOC); -$persons = array_map(function ($person) { - return [ - 'view' => $person['accountid'] . '-' . $person['name'], - 'value' => $person['accountid'], - 'name' => $person['name'] - ]; -}, $persons); -?> - - - - - - - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

合約管理(修理)

-
-

檢視合約

-
- - -
立約人 - -

未填寫

-
維保人員 - -

未填寫

-
電梯編號 - -

未填寫

-
報價單編號 - -

未填寫

-
工程類別 - -

未填寫

-
簽訂時間 - -

未填寫

-
發票抬頭 - -

未填寫

-
統一編號 - -

未填寫

-
工程地址 - -

未填寫

-
- - -
-
-
- - - - - - + + + + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

合約管理(修理)

+
+

檢視合約

+
+ + +
立約人 + +

未填寫

+
維保人員 + +

未填寫

+
電梯編號 + +

未填寫

+
報價單編號 + +

未填寫

+
工程類別 + +

未填寫

+
簽訂時間 + +

未填寫

+
發票抬頭 + +

未填寫

+
統一編號 + +

未填寫

+
工程地址 + +

未填寫

+
工程進度 + +

未填寫

+
+ + +
+
+
+ + + + + + \ No newline at end of file diff --git a/wms/contract-repair/contract-repair-input.php b/wms/contract-repair/contract-repair-input.php index 0d598fee..7de93f97 100644 --- a/wms/contract-repair/contract-repair-input.php +++ b/wms/contract-repair/contract-repair-input.php @@ -1,187 +1,173 @@ -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); -?> - - - - - - -
-
- -
- - - - - - - - -
-

合約入力(修理)

-
- - - - - -
-
- -
- - - - + + +
+
+ +
+ + + + + + + + +
+

合約入力(修理)

+
+ + + + + +
+
+ +
+ + + + \ No newline at end of file diff --git a/wms/contract-repair/contract-repair-management.php b/wms/contract-repair/contract-repair-management.php index bf1070a7..8aed456e 100644 --- a/wms/contract-repair/contract-repair-management.php +++ b/wms/contract-repair/contract-repair-management.php @@ -1,119 +1,131 @@ -prepare($sql_str); -$stmt->execute(); -$contracts= $stmt->fetchAll(PDO::FETCH_ASSOC); -?> - - - - - - -
- -
- - - - - - - - - - - - - - - - - - $contract): ?> - - - - - - - - - - - - -
項次合約號客戶名稱統編總金額建檔者建立時間操作
-

- - - - - - -

-
-
-
- - - - - + + +
+ +
+ + + + + + + + + + + + + + + + + + + $contract) : ?> + + + + + + + + + + + + + +
項次合約號客戶名稱統編總金額工程進度建檔者建立時間操作
+

+ + + + + + +

+
+
+
+ + + + + \ No newline at end of file diff --git a/wms/contract-repair/js/alpine.js b/wms/contract-repair/js/alpine.js index bfaa80f3..0d53a94a 100644 --- a/wms/contract-repair/js/alpine.js +++ b/wms/contract-repair/js/alpine.js @@ -1,1496 +1,1504 @@ -const contractDownload = () => { - return { - init() { - this.standardData = this.deepClone(this.data); - this.onstandardViewData = this.deepClone(this.data); - this.buystandardData = this.deepClone(this.buydata); - this.buyonstandardViewData = this.deepClone(this.buydata); - // CKEDITOR.replace('editor',{ - // extraplugins:'filebrowser', - // height:80, - // width:'100%', - // filebrowserUploadMethod:'form', - // filebrowserUploadUrl:'./ckeditor_upload.php' - // }); - }, - installfill1: '', - installfill2: '', - installAffix: 1, - buyfill1: '', - buyfill2: '', - buyAffix: 1, - css: `table { background-color: #fff; border: none; margin-top: 30px; font-family: '標楷體'; width: 600px; } table tr:nth-child(even), table tr:nth-child(odd) { background-color: #fff; } table tr { font-size: 12pt; width: 100%; } table tr h2 { font-size: 18pt; } table tr td { width: 100%; height: 100%; line-height: 2; display: flex; } table tr td.center { display: flex; justify-content: center; align-items: center; } table tr td.list { width: 100%; height: 100%; white-space: nowrap; display: flex; } table tr td.list span { width: 60px; min-height: 100%; display: block; } table tr td.list > p { display: block; text-align: justify; } table tr td.list div { max-width: calc(100% - 60px); white-space: normal; } table tr td.list div.text-justify { display: flex; width: 100%; justify-content: space-between; } table tr.date td > div { width: 100%; text-align: right; } table tr.date td > div.text-justify { display: flex; justify-content: space-between; } table td, table th { padding: 8px; }`, - data: { - illustrate: { - editshow: false, - plaintext: '茲因甲方向乙方訂購電梯,並委由乙方安裝系爭電梯,經雙方同意共同訂立本合約書,其條款如下:' - }, - partyA: { - editshow: false, - plaintext: partyAcompany, - }, - partyAcontractno: { - editshow: false, - plaintext: partyAcontractno, - }, - list: { - plaintext: [ - { - editshow: false, - origin: true, - text: `安裝產品名稱、數量及單價:
1、 ${people} 人座  ${floor} 停站速度每分鐘 ${speed} 公尺 交流變頻變壓電腦智能控制升降機 ${num} 部。單價:新台幣 ${numberToChinese(totalInstallPrice)} 元整( ${numberWithCommas(totalInstallPrice)} )(含5%加值型營業稅)。`, - type: 'title', - deleted: false, - id: 0, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '安裝產品規格:如附表一。', - type: 'title', - deleted: false, - id: 1, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '安裝地點:' + partyAaddress + '。', - type: 'title', - deleted: false, - id: 2, - input_id: null, - }, - { - editshow: false, - origin: true, - text: `安裝報酬:安裝勞務報酬為新台幣(以下皆同) ${numberToChinese(totalPrice)} 元整(${numberWithCommas(totalPrice)} )(含5%加值型營業稅)。`, - type: 'title', - deleted: false, - id: 3, - input_id: null, - }, - { - editshow: false, - origin: true, - text: install_pay_text, - type: 'title', - deleted: false, - id: 4, - input_id: 'fill1', - }, - { - editshow: false, - origin: true, - text: '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台__日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於__日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。', - type: 'title', - deleted: false, - id: 5, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '交車事項:
一、乙方完成產品安裝後,甲方應儘速理交車事宜,不得無故或藉故拖延。如經乙方通知,甲方遲未辦理交車事宜,則於乙方催告後,即視同交車完成。
二、乙方試車完成後,甲方應配合提供建物使用執照及其他竣工檢查所需文件,以利乙方代甲方辦理昇降設備竣工檢查。
三、甲方於昇降設備竣工檢查合格及取得使用許可證後,交車事項即為完成。', - type: 'title', - deleted: false, - id: 6, - input_id: null, - }, - - { - editshow: false, - origin: true, - text: '因故延期:
如因天災、地變及其他不可抗力之因素,或甲方未將電梯昇降路及機械室之建築工程等配合事項未於貨抵工地前七日整理完善,或甲方未將符合規格之電源於安裝前送電至機械室,或房屋建築及其他應配合相關事項未完成,致影響乙方如期安裝產品時,乙方安裝日期應依受影響日數向後延展,如因可歸責於甲方事由者亦同。', - type: 'title', - deleted: false, - id: 7, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '工程變更:
甲方對本工程之規格有變更設計及增減工程數量時,應於合約訂立日後壹個月內預先以書面通知乙方且需經雙方同意,如因工程變更而致乙方成本增加時,則甲方應吸收所有增加之成本並追認給付給乙方,否則乙方依原合約之貨品規格、數量交貨,甲方亦應依原合約之貨品規格、數量給付款項。', - type: 'title', - deleted: false, - id: 8, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '工地清理及除外事項:
一、本工程於貨到現場前,其工地廢料雜物及臨時設備,應由甲方清除整理,同時提供乙方放置貨品之處所。
二、有關建築工事回填澆灌後之清潔,應由甲方負責清理。
三、升降設備除外工程表所列之各項工程不包括於乙方本合約施作範圍,應由甲方負責處理。', - type: 'title', - deleted: false, - id: 9, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '電梯保養:
一、乙方完工交車後,期後__個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。', - type: 'title', - deleted: false, - id: 10, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '特約條款:
一、本設備器材在款項未付清前,其所有權仍歸屬乙方所有,價款付清後所有權始轉移給甲方。
二、如因甲方因素或建物設計上之疏忽,致影響驗收時,甲方不得以此做為逾期或拒付款之藉口。
三、本合約所有日數約定,均以工作天計算。', - type: 'title', - deleted: false, - id: 11, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '終止合約權:
一、甲乙雙方之任一方若有違反合約之事實或發生清算或破產等信用貶落情形,致工程無法進行時,經催告而未改善者,他方得終止本合約,違約方必須賠償對方之損失。
二、乙方逾期交貨或甲方逾期未交付工地受領產品逾壹個月以上經他方催告仍不改善,他方得終止本合約,並請求損害賠償。', - type: 'title', - deleted: false, - id: 12, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '合意管轄:
因本合約而涉訟,甲、乙方雙方同意以桃園地方法院為第一審管轄法院。催告仍不改善,他方得終止本合約,並請求損害賠償。', - type: 'title', - deleted: false, - id: 13, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '附則:
本合約經甲、乙雙方簽章後立即生效,甲、乙雙方各存執正副本各壹份為憑,印花雙方各自貼付。', - type: 'title', - deleted: false, - id: 14, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '合約附件:
本合約附件為本合約之一部份,與本合約具同等效力,甲乙雙方均應遵守之。', - type: 'title', - deleted: false, - id: 15, - input_id: null, - }, - ] - } - }, - buydata: { - illustrate: { - editshow: false, - plaintext: '茲因甲方向乙方訂購電梯,經雙方同意共同訂立本合約書,其條款如下:' - }, - partyA: { - editshow: false, - plaintext: partyAcompany, - }, - partyAcontractno: { - editshow: false, - plaintext: partyAcontractno, - }, - list: { - plaintext: [ - { - editshow: false, - origin: true, - text: `產品名稱、數量及單價:
1、 ${people} 人座 ${floor} 停站速度每分鐘 ${speed} 公尺 交流變頻變壓電腦智能控制升降機 ${bigChineseArr[num]} 部。單價:新台幣 ${numberToChinese(totalBuyPrice)} 元整( ${numberWithCommas(totalBuyPrice)} )(含5%加值型營業稅)。`, - type: 'title', - deleted: false, - id: 0, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '產品規格:如附表一。', - type: 'title', - deleted: false, - id: 1, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '交貨及安裝地點:' + partyAaddress + '。', - type: 'title', - deleted: false, - id: 2, - input_id: null, - }, - { - editshow: false, - origin: true, - text: `產品總價:產品價金為新台幣 ${numberToChinese(totalBuyPrice)} 元整( ${numberWithCommas(totalBuyPrice)} )(含5%加值型營業稅)。`, - type: 'title', - deleted: false, - id: 3, - input_id: null, - }, - { - editshow: false, - origin: true, - text: buy_pay_text, - type: 'title', - deleted: false, - id: 4, - input_id: 'buyfill1', - }, - { - editshow: false, - origin: true, - text: '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第180日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。', - type: 'title', - deleted: false, - id: 5, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '施工規範依據:
甲方或其指定工程師,於本契約簽訂後二星期內,提供組立電梯之大樓建築有關圖面,以供乙方製作電梯配置圖,乙方製妥電梯配置圖後請甲方簽認,甲方於接獲乙方提請審核之電梯配置圖後,一星期內簽認並送還乙方,乙方應於接獲甲方簽認之電梯配置圖後,安排電梯組件之生產並按預定時間內製造完成。', - type: 'title', - deleted: false, - id: 6, - input_id: null, - }, - - { - editshow: false, - origin: true, - text: '因故延期:
一、如因天災、地變及其他不可抗力之因素,致影響乙方如期交付產品時,本合約第六條之交貨日期應依受影響日數向後延展,如因可歸責於甲方事由者亦同。
二、如因可歸責甲方事由致工期展延逾第六條日期時,如因物價波動致成本增加,乙方得請求物價調漲之補償,或終止合約。', - type: 'title', - deleted: false, - id: 7, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '工程變更:
甲方對本工程之規格有變更設計及增減工程數量時,應於合約訂立日後壹個月內預先以書面通知乙方且需經雙方同意,如因工程變更而致乙方成本增加時,則甲方應吸收所有增加之成本並追認給付給乙方,否則乙方依原合約之貨品規格、數量交貨,甲方亦應依原合約之貨品規格、數量給付款項。', - type: 'title', - deleted: false, - id: 8, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '工地清理及除外事項:
一、本工程於貨到現場前,其工地廢料雜物及臨時設備,應由甲方清除整理,同時提供乙方放置貨品之處所。
二、有關建築工事回填澆灌後之清潔,應由甲方負責清理。', - type: 'title', - deleted: false, - id: 9, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '合約時效:
本合約及其附件自簽訂之日起,至保固期滿之日止為有效期間。', - type: 'title', - deleted: false, - id: 10, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '特約條款:
一、本設備器材在款項未付清前,其所有權仍歸屬乙方所有,價款付清後所有權始轉移給甲方。
二、如因甲方因素或建物設計上之疏忽,致影響驗收時,甲方不得以此做為逾期或拒付款之藉口。
三、本合約所有日數約定,均以工作天計算。', - type: 'title', - deleted: false, - id: 11, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '終止合約權:
一、甲乙雙方之任一方若有違反合約之事實或發生清算或破產等信用貶落情形,致工程無法進行時,經催告而未改善者,他方得終止本合約,違約方必須賠償對方之損失。
二、乙方逾期交貨或甲方逾期未交付工地受領產品逾壹個月以上經他方催告仍不改善,他方得終止本合約,並請求損害賠償。', - type: 'title', - deleted: false, - id: 12, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '合意管轄:
因本合約而涉訟,甲、乙方雙方同意以桃園地方法院為第一審管轄法院。', - type: 'title', - deleted: false, - id: 13, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '附則:
本合約經甲、乙雙方簽章後立即生效,甲、乙雙方各存執正本各壹份為憑。', - type: 'title', - deleted: false, - id: 14, - input_id: null, - }, - { - editshow: false, - origin: true, - text: '合約附件:
本合約附件為本合約之一部份,與本合約具同等效力,甲乙雙方均應遵守之,本合約附件計有:', - type: 'title', - deleted: false, - id: 15, - input_id: null, - }, - ] - } - }, - fill: [], - standardData: {}, - onstandardViewData: {}, - deepClone: function (obj) { - let clone = Array.isArray(obj) ? [] : {}; - for (let key in obj) { - if (obj.hasOwnProperty(key)) { - if (typeof obj[key] === 'object' && obj[key] !== null) { - clone[key] = this.deepClone(obj[key]); - if (clone[key].text != undefined) { - // clone[key].text = clone[key].text.replace(/ insert , u=> update - index: 0, - isInstall: true, - chineseNumbers(number) { - const units = ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']; - if (number <= 10) { - return units[number]; - } else if (number < 20) { - return '十' + units[number - 10]; - } else if (number < 30) { - return '二十' + units[number - 20]; - } else if (number < 40) { - return '三十' + units[number - 30]; - } else if (number < 50) { - return '四十' + units[number - 40]; - } else { - return '五十'; - } - }, - mouseover(obj, isInstall = true) { - if (isInstall) { - if (!this.onstandardViewData[obj].editshow) { - this.onstandardViewData[obj].editshow = true - } - } else { - if (!this.buyonstandardViewData[obj].editshow) { - this.buyonstandardViewData[obj].editshow = true - } - } - - }, - mouseoverlist(idx, inInstall = true) { - if (inInstall) { - if (!this.onstandardViewData.list.plaintext[idx].editshow) { - this.onstandardViewData.list.plaintext[idx].editshow = true - } - } else { - if (!this.buyonstandardViewData.list.plaintext[idx].editshow) { - this.buyonstandardViewData.list.plaintext[idx].editshow = true - } - } - - }, - mouseoutlist(idx) { - if (this.onstandardViewData.list.plaintext[idx].editshow) { - this.onstandardViewData.list.plaintext[idx].editshow = false - } - if (this.buyonstandardViewData.list.plaintext[idx].editshow) { - this.buyonstandardViewData.list.plaintext[idx].editshow = false - } - }, - mouseout(obj) { - if (this.onstandardViewData[obj].editshow) { - this.onstandardViewData[obj].editshow = false - } - if (this.buyonstandardViewData[obj].editshow) { - this.buyonstandardViewData[obj].editshow = false - } - }, - modelshowEditFn(text, obj, isList = false, isInstall = true) { - if (this.modelshow) { - return; - } - this.isInstall = isInstall - this.actionType = 'u' - this.modelshow = true - this.modelText = text - this.objName = obj - this.isList = isList - this.actionType = 'u' - if (isInstall) { - if (isList) { - this.$refs.editor.value = this.onstandardViewData.list.plaintext[obj].text - // CKEDITOR.instances.editor.setData(this.onstandardViewData.list.plaintext[obj].text); - return - } - if (!isList) { - this.$refs.editor.value = this.onstandardViewData[obj].plaintext - // CKEDITOR.instances.editor.setData(this.onstandardViewData[obj].plaintext); - return - } - } else { - if (isList) { - this.$refs.editor.value = this.buyonstandardViewData.list.plaintext[obj].text - // CKEDITOR.instances.editor.setData(this.buyonstandardViewData.list.plaintext[obj].text); - return - } - if (!isList) { - this.$refs.editor.value = this.buyonstandardViewData[obj].plaintext - // CKEDITOR.instances.editor.setData(this.buyonstandardViewData[obj].plaintext); - return - } - } - - }, - modelcloseFn() { - if (this.modelshow) { - this.modelshow = false - this.modelText = '' - this.modelContent = '' - this.isList = false - this.$refs.editor.value = '' - // CKEDITOR.instances.editor.setData('') - } - }, - modelshowAddUpFn(idx, isInstall = true) { - this.isInstall = isInstall - this.index = idx - this.actionType = 'i' - this.modelshow = true - this.modelText = '新增一條例' - }, - modelshowAddDownFn(idx, isInstall = true) { - this.isInstall = isInstall - this.index = idx + 1 - this.actionType = 'i' - this.modelshow = true - this.modelText = '新增一條例' - }, - updateEditor() { - let max = 0; - if (this.isInstall) { - this.onstandardViewData.list.plaintext.forEach(item => { - if (item.id > max) { - max = item.id - }; - }) - } else { - this.buyonstandardViewData.list.plaintext.forEach(item => { - if (item.id > max) { - max = item.id - }; - }) - } - - max = max + 1 - if (this.actionType == 'i') { - let newObj = { - editshow: false, - origin: false, - text: this.removeTrailingNewline(this.$refs.editor.value), - // text:this.removeTrailingNewline(this.convertHtmlToPlainText(this.$refs.editor.value)), - // text:this.removeTrailingNewline(this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData())), - type: 'title', - deleted: false, - id: max, - } - if (this.isInstall) { - this.data.list.plaintext.splice(this.index, 0, newObj) - this.onstandardViewData.list.plaintext.splice(this.index, 0, newObj) - } else { - this.buydata.list.plaintext.splice(this.index, 0, newObj) - this.buyonstandardViewData.list.plaintext.splice(this.index, 0, newObj) - } - this.modelcloseFn() - return - } - if (this.actionType == 'u') { - if (this.isInstall) { - if (this.isList) { - // this.data.list.plaintext[this.objName].text = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) - this.data.list.plaintext[this.objName].text = this.convertHtmlToPlainText(this.$refs.editor.value) - // this.onstandardViewData.list.plaintext[this.objName].text = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) - // this.onstandardViewData.list.plaintext[this.objName].text = this.convertHtmlToPlainText(this.$refs.editor.value) - this.onstandardViewData.list.plaintext[this.objName].text = this.$refs.editor.value - } else { - // this.data[this.objName].plaintext = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) - this.data[this.objName].plaintext = this.convertHtmlToPlainText(this.$refs.editor.value) - // this.onstandardViewData[this.objName].plaintext = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) - // this.onstandardViewData[this.objName].plaintext = this.convertHtmlToPlainText(this.$refs.editor.value) - this.onstandardViewData[this.objName].plaintext = this.$refs.editor.value - } - } else { - if (this.isList) { - this.buydata.list.plaintext[this.objName].text = this.convertHtmlToPlainText(this.$refs.editor.value) - this.buyonstandardViewData.list.plaintext[this.objName].text = this.$refs.editor.value - } else { - this.buydata[this.objName].plaintext = this.convertHtmlToPlainText(this.$refs.editor.value) - this.buyonstandardViewData[this.objName].plaintext = this.$refs.editor.value - } - } - } - this.modelcloseFn() - return - }, - deleteEditor(idx, isInstall = true) { - if (isInstall) { - if (confirm('確定要刪除嗎?')) { - let id = this.onstandardViewData.list.plaintext[idx].id - this.data.list.plaintext.forEach(item => { - if (item.id == id) { - item.deleted = 1; - } - }) - this.onstandardViewData.list.plaintext.splice(idx, 1) - } - } else { - if (confirm('確定要刪除嗎?')) { - let id = this.buyonstandardViewData.list.plaintext[idx].id - // this.buydata.list.plaintext[idx].deleted = 1 - this.buydata.list.plaintext.forEach(item => { - if (item.id == id) { - if (!item.deleted) { - item.deleted = 1; - } - } - }) - this.buyonstandardViewData.list.plaintext.splice(idx, 1) - } - } - }, - removeTrailingNewline(str) { - return str.replace(/\n+$/, ''); - }, - convertHtmlToPlainText(htmlString) { - // 創建一個新的DOMParser對象 - var parser = new DOMParser(); - - // 使用parseFromString方法解析傳入的HTML字符串 - var doc = parser.parseFromString(htmlString, 'text/html'); - - // 返回解析後的純文本內容 - return doc.body.textContent || ''; - }, - exportFn(type) { - const form = this.$refs.form - const prviewType = this.$refs.form.querySelector('#prview-type'); - const list = this.$refs.form.querySelector('#prview-list'); - const standardList = this.$refs.form.querySelector('#standard-prview-list'); - const illustrate = this.$refs.form.querySelector('#illustrate'); - const standardIllustrate = this.$refs.form.querySelector('#standard-illustrate'); - const partyA = this.$refs.form.querySelector('#partyA'); - const partyAcontractno = this.$refs.form.querySelector('#partyAcontractno'); - const total_price = this.$refs.form.querySelector('#total_price'); - prviewType.value = type - if (type === 1) { - const standardJsonText = this.buystandardData.list.plaintext.map((item, idx) => { - let text = '' - text = item.text.replace(/\s+/g, "") - this.buydata.list.plaintext[idx].text = this.buydata.list.plaintext[idx].text.replace(/\s+/g, "") - - return { - text: text, - id: item.id - } - }); - const jsonText = this.buydata.list.plaintext.map(item => { - let text = '' - text = item.text - return { - text: text, - origin: item.origin ? 1 : 0, - deleted: item.deleted ? 1 : 0, - id: item.id, - updated: item.updated ? 1 : 0, - } - }); - list.value = JSON.stringify(jsonText) - standardList.value = JSON.stringify(standardJsonText) - illustrate.value = this.buydata.illustrate.plaintext - standardIllustrate.value = this.buystandardData.illustrate.plaintext - partyA.value = this.buydata.partyA.plaintext - partyAcontractno.value = this.buydata.partyAcontractno.plaintext - total_price.value = totalBuyPrice - form.submit(); - return; - } - if (type === 2) { - // list.value = JSON.stringify(this.data.list.plaintext) - const standardJsonText = this.standardData.list.plaintext.map((item, idx) => { - let text = '' - text = item.text.replace(/\s+/g, "") - if (this.data.list.plaintext[idx] !== undefined) { - this.data.list.plaintext[idx].text = this.data.list.plaintext[idx].text.replace(/\s+/g, "") - } - return { - text: text, - id: item.id - } - }) - const jsonText = this.data.list.plaintext.map(item => { - let text = '' - item.text - text = item.text - return { - text: text, - origin: item.origin ? 1 : 0, - deleted: item.deleted ? 1 : 0, - id: item.id, - updated: item.updated ? 1 : 0, - } - }) - list.value = JSON.stringify(jsonText) - standardList.value = JSON.stringify(standardJsonText) - illustrate.value = this.data.illustrate.plaintext - standardIllustrate.value = this.standardData.illustrate.plaintext - partyA.value = this.data.partyA.plaintext - partyAcontractno.value = this.data.partyAcontractno.plaintext - total_price.value = totalInstallPrice - form.submit(); - - return; - } - }, - toggleBuyStandard: true, - toggleInstallStandard: true, - isbuyShow: true, - sendInstallInputFn() { - if (this.installfill1 == '') { - alert('請輸入安裝試車期限'); - return; - } - if (this.installfill2 == '') { - alert('請輸入免費保養月數'); - return; - } - if (this.installfill1 < 45) { - alert('安裝試車期限不得低於45日'); - return; - } - if (this.installfill1 < 1) { - alert('免費保養月數不得低於1個月'); - return; - } - this.isInstallInputIng = false - this.data.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' - this.standardData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' - this.onstandardViewData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' - this.data.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' - this.standardData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' - this.onstandardViewData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' - this.data.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' - this.standardData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' - this.onstandardViewData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' - }, - sendInstallInputKeyupFn(e) { - if (e.keyCode !== 13) return - if (this.installfill1 == '') { - alert('請輸入安裝試車期限'); - return; - } - if (this.installfill2 == '') { - alert('請輸入免費保養月數'); - return; - } - if (this.installfill1 < 45) { - alert('安裝試車期限不得低於45日'); - return; - } - if (this.installfill1 < 1) { - alert('免費保養月數不得低於1個月'); - return; - } - this.isInstallInputIng = false - this.data.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' - this.standardData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' - this.onstandardViewData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' - this.data.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' - this.standardData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' - this.onstandardViewData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' - this.data.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' - this.standardData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' - this.onstandardViewData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' - }, - sendBuyInputFn() { - if (this.buyfill1 == '') { - alert('請輸入交貨期限'); - return; - } - if (this.buyfill1 < 1) { - alert('交貨期限不得低於1日'); - return; - } - if (buyArr[1].installment == 2) { - this.buydata.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); - this.buystandardData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); - this.buyonstandardViewData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); - } - this.isBuyInputIng = false - this.buydata.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' - this.buystandardData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' - this.buyonstandardViewData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' - this.buydata.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' - this.buystandardData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' - this.buyonstandardViewData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' - let buyAffixHtml = '' - for (let i = 0; i < Number(this.buyAffix); i++) { - buyAffixHtml += `
${numberToSmallChinese(i + 1)}、附表${numberToSmallChinese(i + 1)}                                                       共 1 張` - } - this.buydata.list.plaintext[15].text = this.buydata.list.plaintext[15].text + buyAffixHtml - this.buystandardData.list.plaintext[15].text = this.buystandardData.list.plaintext[15].text + buyAffixHtml - this.buyonstandardViewData.list.plaintext[15].text = this.buyonstandardViewData.list.plaintext[15].text + buyAffixHtml - }, - sendBuyInputKeyupFn(e) { - if (e.keyCode !== 13) return - if (this.buyfill1 == '') { - alert('請輸入交貨期限'); - return; - } - if (this.buyfill1 < 1) { - alert('交貨期限不得低於1日'); - return; - } - if (buyArr[1].installment == 2) { - this.buydata.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); - this.buystandardData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); - this.buyonstandardViewData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); - } - this.isBuyInputIng = false - this.buydata.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' - this.buystandardData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' - this.buyonstandardViewData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' - this.buydata.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' - this.buystandardData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' - this.buyonstandardViewData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' - let buyAffixHtml = '' - for (let i = 0; i < Number(this.buyAffix); i++) { - buyAffixHtml += `
${numberToSmallChinese(i + 1)}、附表${numberToSmallChinese(i + 1)}                                                       共 1 張` - } - this.buydata.list.plaintext[15].text = this.buydata.list.plaintext[15].text + buyAffixHtml - this.buystandardData.list.plaintext[15].text = this.buystandardData.list.plaintext[15].text + buyAffixHtml - this.buyonstandardViewData.list.plaintext[15].text = this.buyonstandardViewData.list.plaintext[15].text + buyAffixHtml - }, - affixArr: ['', '一', '一、二', '一、二、三', '一、二、三、四', '一、二、三、四、五'], - isBuyInputIng: true, - isInstallInputIng: true, - } -}; - -const contractNewInput = () => { - return { - init() { }, - data: { - contractno: '', - customer: '', - manager: '', - vat: '', - case_name: '', - linkman: '', - lm_tel: '', - address: '', - salesman: '', - qc: '', - qc: '', - // files:[], - }, - step: 1, - isLoading: false, - customize: false, - nextStepFn() { - if (this.data.contractno == '') return alert('合約號為必填') - this.isLoading = true - if (this.step == 1) { - this.getContractDate(); - } - }, - nextStepKeyupFn(e) { - if (e.keyCode != 13) return - if (this.step == 1) { - this.getContractDate(); - console.log(this.step); - } - }, - preStepFn() { - if (this.step == 2) { - this.step = 1 - } - }, - getContractDate() { - axios.get('./api/getContractData.php?contracttype=m&contractno=' + this.data.contractno).then(res => { - if (!res.data) { - this.step = 2 - this.isLoading = false - return - } - if (!this.customize) { - console.log(res.data); - this.data.customer = res.data.customer - this.data.manager = res.data.manager - this.data.vat = res.data.uscc - this.data.case_name = res.data.case_name - this.data.linkman = res.data.linkman - this.data.lm_tel = res.data.lm_tel - this.data.address = res.data.address - this.data.salesman = res.data.salesman - this.data.qc = res.data.qc - } - this.step = 2 - this.isLoading = false - }).catch(err => { - console.error(err) - this.isLoading = false - }) - }, - save() { - this.isLoading = true - const form = new FormData(); - form.append('contractno', this.data.contractno); - form.append('customer', this.data.customer); - form.append('manager', this.data.manager); - form.append('vat', this.data.vat); - form.append('case_name', this.data.case_name); - form.append('linkman', this.data.linkman); - form.append('lm_tel', this.data.lm_tel); - form.append('address', this.data.address); - form.append('salesman', this.data.salesman); - form.append('qc', this.data.qc); - form.append('contracttype', 'm'); - form.append('user_id', user_id); - for (var i = 0; i < this.data.files.length; i++) { - form.append('files[]', this.data.files[i]); - } - axios.post('./api/postNewContractData.php', form).then(res => { - console.log(res); - if (res.status === 201) { - alert('儲存成功'); - this.step = 1 - this.data.contractno = '' - this.data.customer = '' - this.data.manager = '' - this.data.vat = '' - this.data.case_name = '' - this.data.linkman = '' - this.data.lm_tel = '' - this.data.address = '' - this.data.salesman = '' - this.data.qc = '' - this.data.files = [] - this.customize = false - - } else { - alert('儲存失敗!可能為以下錯誤:\n' + res.data) - } - this.isLoading = false - }).catch(error => { - let code = error.response.status; - if (code == 422) { - this.fail_arr = error.response.data - this.errorFn(); - } - if (code == 500) { - alert('儲存失敗!可能為以下錯誤:\n' + error.response.data) - } - - this.isLoading = false - }) - }, - errorFn() { - let msg = '' - for (let i = 0; i < this.fail_arr.length; i++) { - msg += this.fail_arr[i] + '、' - } - alert(msg) - }, - uploadFiles(e) { - this.data.files = e.target.files - }, - } -}; - -////////////////////////////// -//// 合約簽回(修理) -//// -//// 製作人:梓誠 -/// 時間 : -////////////////////////////// -const contractRepair = () => { - return { - init() { }, - data: { - contractno: '', - company: '', - repairer: '', - repairid: '', - facilityno: '', - taxid: '', - invoice: '', //發票抬頭 - type: '', //工程類別需新增,用 post - address: '', - repair_no: '', - total_price: '', - sign_date: '' - }, - step: 1, - isLoading: false, - customize: false, - - - nextStepFn() { - if (this.data.contractno == '') return alert('合約號為必填') - this.isLoading = true - if (this.step == 1) { - this.getContractDate(); - } - }, - nextStepKeyupFn(e) { - if (e.keyCode != 13) return - if (this.step == 1) { - this.getContractDate(); - console.log(this.step); - } - }, - // 抓資料 - getContractDate() { - axios.get('./api/getContractData.php?contracttype=r&contractno=' + this.data.contractno).then(res => { - if (!res.data) { - this.step = 2; - this.isLoading = false; - // console.log(123); - return - } - if (!this.customize) { - // console.log(res.data); - this.data.contractno = res.data.contractno; - this.data.company = res.data.company; - this.data.repairer = res.data.name; - this.data.facilityno = res.data.facilityno; - this.data.taxid = res.data.taxid; - this.data.invoice = res.data.invoice; - this.data.address = res.data.address; - this.data.repair_no = res.data.repair_no; - this.data.total_price = res.data.total_price; - this.data.repairid = res.data.accountid; - this.data.sign_date = res.data.sign_date; - } - this.step = 2; - this.isLoading = false; - // console.log(user_name); - // console.log(this.data.sign_date); - }).catch(err => { - console.log(err); - alert(err.response.data); - this.isLoading = false - }) - }, - preStepFn() { - if (this.step == 2) { - if (confirm('回到上一頁會初始化資料,確定要返回嗎?')) { - this.step = 1; - this.data.contractno = ''; - this.data.company = ''; - this.data.repairer = ''; - this.data.facilityno = ''; - this.data.taxid = ''; - this.data.invoice = ''; - this.data.address = ''; - this.data.repair_no = ''; - this.data.total_price = ''; - this.data.repairid = ''; - this.data.sign_date = ''; - - return; - } - } - }, - save() { - this.isLoading = true; - const form = new FormData(); - form.append('contractno', this.data.contractno); - form.append('company', this.data.company); - form.append('repairid', this.data.repairid); - form.append('facilityno', this.data.facilityno); - form.append('taxid', this.data.taxid); - form.append('invoice', this.data.invoice); - form.append('address', this.data.address); - form.append('repair_no', this.data.repair_no); - form.append('total_price', this.data.total_price); - form.append('sign_date', this.data.sign_date); - form.append('contracttype', 'r'); - form.append('user_id', user_id); - form.append('type', this.data.type); - axios.post('./api/postContractData.php', form).then(res => { - console.log(res.status); - if (res.status === 200) { - alert('儲存成功'); - this.step = 1; - this.data.contractno = ''; - this.data.company = ''; - this.data.repairid = ''; - this.data.facilityno = ''; - this.data.repairer = ''; - this.data.taxid = ''; - this.data.invoice = ''; - this.data.address = ''; - this.data.repair_no = ''; - this.data.total_price = ''; - this.data.user_id = ''; - this.data.type = ''; - this.data.sign_date = ''; - } - this.isLoading = false; - }).catch(error => { - let code = error.response.status; - if (code == 422) { - this.fail_arr = error.response.data; - this.errorFn(); - } - if (code == 500) { - alert('儲存失敗!可能為以下錯誤:\n' + error.response.data); - } - - this.isLoading = false; - }) - }, - errorFn() { - let msg = ''; - for (let i = 0; i < this.fail_arr.length; i++) { - msg += this.fail_arr[i] + '、'; - } - alert(msg); - }, - uploadFiles(e) { - this.data.files = e.target.files; - } - - } -}; - -const contractInput = () => { - return { - init() { - $('.contract-input-component .form .dropdown').dropdown(); - - axios.get('./twzip.json').then(res => { - this.cities = res.data.cities - }) - }, - cities: [], - data: { - contractno: 'B23100060', - total_price: '', //合約總價 - vat: '', //統一編號 - mtype: 'A', //維修型態 - phone: '', //客戶電話 - email: '', //Email - mworker: '', //保養員 - mcycle: '', //保養頻率 - salesman: '', //營業員 - contract_begin_date: '', //合約開始時間 - contract_end_date: '', //合約終止時間 - area: '', //區域 - zip: '', //郵遞區號 - address: '', //地址 - customer: '', //立約人 - partyA: '', //業務聯繫人 - partyAaddress: '', //業務聯繫人地址 - partyAphone: '', //業務聯繫人電話 - partyAemail: '', //業務聯繫人email - files: [], //附件檔案 - num: '', //電梯數量 - disabled: false, //資料庫是否有電梯數量資料 - elevators: [], //機種、載重、人乘、樓停、樓層、速度、緯度、經度、開門方式、保養別、廠牌、竣檢日、許可證日期 - }, - customize: false, - step: 1, - isLoading: false, - fail_arr: [], - nextStepFn() { - if (this.step == 1) { - if (this.data.contractno == '') return alert('請輸入合約號'); - this.isLoading = true - this.getContractDate(); - } else if (this.step == 2) { - if (this.data.num <= 0) return alert('請填寫電梯數量!') - if (!this.data.disabled) { - this.createElevator(); - } - this.step = 3 - } - }, - nextStepKeyupFn(e) { - if (e.keyCode !== 13) return - if (this.step == 1) { - if (this.data.contractno == '') return alert('請輸入合約號'); - this.isLoading = true - this.getContractDate(); - - } else if (this.step == 2) { - this.step = 3 - } - }, - createElevator() { - for (let i = 0; i < this.data.num; i++) { - this.data.elevators.push({ - spec: '', //規格 - weight: '', //載重 - speed: '', //速度 - persons: '', //人乘 - stop: '', //樓停 - floors: '', //樓層 - latitude: '', //緯度 - longitude: '', //經度 - elevator_brand: '', //廠牌 - opendoor: '', //開門方式 - maintainance: '', //保養別 - takecertificatedate: '', //竣檢日 - useful_date: '', //許可證有效日期 - }) - } - }, - getContractDate() { - axios.get('./api/getContractData.php?contracttype=b&contractno=' + this.data.contractno).then(res => { - if (!res.data) { - this.step = 2 - this.isLoading = false - return - } - if (!this.customize) { - console.log(res.data); - this.data.total_price = res.data.sold_price - this.data.salesman = res.data.salesman - this.data.contract_begin_date = res.data.contract_begin_date - this.data.contract_end_date = res.data.contract_end_date - this.data.address = res.data.address - this.data.customer = res.data.customer - this.data.partyA = res.data.customer - this.data.partyAaddress = res.data.address - this.data.num = res.data.num - this.data.disabled = (res.data.num > 0) ? true : false; - this.data.elevators = res.data.elevators - let cityIndex = this.data.address.indexOf('市'); - console.log(cityIndex); - if (cityIndex == -1) { - cityIndex = this.data.address.indexOf('縣'); - } - if (cityIndex > 1) { - // 獲取''市''前面的兩個字 - let city = this.data.address.substring(cityIndex - 2, cityIndex + 1); - this.data.area = city; - } else { - this.data.area = '' - } - } - this.step = 2 - this.isLoading = false - }).catch(err => { - console.error(err) - this.isLoading = false - }) - }, - preStepFn() { - if (this.step == 2) { - if (confirm('回到上一頁會將會初始化資料,確定返回嗎?')) { - this.step = 1 - this.data.total_price = '' - this.data.salesman = '' - this.data.contract_begin_date = '' - this.data.contract_end_date = '' - this.data.address = '' - this.data.customer = '' - this.data.partyA = '' - this.data.partyAaddress = '' - this.step = 1 - this.data.num = '' - this.data.disabled = false - this.data.elevators = [] - this.data.files = [] - this.data.vat = '' - this.data.mtype = '' - this.data.phone = '' - this.data.email = '' - this.data.mworker = '' - this.data.mcycle = '' - this.data.area = '' - this.data.zip = '' - this.data.partyAphone = '' - this.data.partyAemail = '' - return; - } - } else if (this.step == 3) { - this.step = 2 - } - }, - save() { - this.isLoading = true - const form = new FormData(); - form.append('contractno', this.data.contractno); - form.append('total_price', this.data.total_price); - form.append('vat', this.data.vat); - form.append('mtype', this.data.mtype); - form.append('phone', this.data.phone); - form.append('email', this.data.email); - form.append('mworker', this.data.mworker); - form.append('mcycle', this.data.mcycle); - form.append('salesman', this.data.salesman); - form.append('contract_begin_date', this.data.contract_begin_date); - form.append('contract_end_date', this.data.contract_end_date); - form.append('address', this.data.address); - form.append('area', this.data.area); - form.append('customer', this.data.customer); - form.append('partyA', this.data.partyA); - form.append('partyAaddress', this.data.partyAaddress); - form.append('partyAphone', this.data.partyAphone); - form.append('partyAemail', this.data.partyAemail); - form.append('user_id', user_id); - form.append('user_name', user_name); - form.append('num', this.data.num); - form.append('elevators', JSON.stringify(this.data.elevators)); - form.append('contracttype', 'b'); - - // 如果有附件檔案,可以逐一加入 - for (var i = 0; i < this.data.files.length; i++) { - form.append('files[]', this.data.files[i]); - } - axios.post('./api/postContractData.php', form).then(res => { - console.log(res.status); - if (res.status === 200) { - alert('儲存成功'); - this.step = 1 - this.data.total_price = '' - this.data.salesman = '' - this.data.contract_begin_date = '' - this.data.contract_end_date = '' - this.data.address = '' - this.data.customer = '' - this.data.partyA = '' - this.data.partyAaddress = '' - this.step = 1 - this.data.num = '' - this.data.disabled = false - this.data.elevators = [] - this.data.files = [] - this.data.vat = '' - this.data.mtype = '' - this.data.phone = '' - this.data.email = '' - this.data.mworker = '' - this.data.mcycle = '' - this.data.area = '' - this.data.zip = '' - this.data.partyAphone = '' - this.data.partyAemail = '' - } - this.isLoading = false - }).catch(error => { - let code = error.response.status; - if (code == 422) { - this.fail_arr = error.response.data - this.errorFn(); - } - if (code == 500) { - alert('儲存失敗!可能為以下錯誤:\n' + error.response.data) - } - - this.isLoading = false - }) - }, - errorFn() { - let msg = '' - for (let i = 0; i < this.fail_arr.length; i++) { - msg += this.fail_arr[i] + '、' - } - alert(msg) - }, - uploadFiles(e) { - this.data.files = e.target.files - }, - } -}; - -const contractNewApply = () => { - return { - step: 1, - isLoading: false, - data: { - mid: mid, - vol_no: contractno, - salesman: salesman, - salesmanname: salesmanname, - apply_date: apply_date, - apply_type: 'A', - case_name: case_name, - company: company, - manager: manager, - vat: vat, - total_price: price_total, - price_a: price_a, - price_b: price_b, - address: address, - workdeadline_a: 30, //完工期限: 幾天內安裝完成,預設30 - workdeadline_b: 7, //完工期限: 幾天內整理完善,預設7 - regulations: 10, //附則 - freedeadline: 18, //免保期限(月) - tradeaddress: '', //交貨地點 - tradedeadline: 90, //交貨期限 - items: items, - }, - pays: { - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - 6: 0, - 7: 0, - }, - tickets: { - 1: 0, - 2: 0, - 3: 0, - 4: 0, - 5: 0, - 6: 0, - 7: 0, - }, - localnumber(num) { - return num.toLocaleString(); - }, - storageFn() { - this.isLoading = true - const isFirst = 1; - const form = new FormData(); - form.append('mid', this.data.mid); - form.append('vol_no', this.data.vol_no); - form.append('salesman', this.data.salesman); - form.append('apply_date', this.data.apply_date); - form.append('apply_type', this.data.apply_type); - form.append('case_name', this.data.case_name); - form.append('company', this.data.company); - form.append('manager', this.data.manager); - form.append('vat', this.data.vat); - form.append('total_price', this.data.total_price); - form.append('price_a', this.data.price_a); - form.append('price_b', this.data.price_b); - form.append('address', this.data.address); - form.append('workdeadline_a', this.data.workdeadline_a); - form.append('workdeadline_b', this.data.workdeadline_b); - form.append('regulations', this.data.regulations); - form.append('freedeadline', this.data.freedeadline); - form.append('tradeaddress', this.data.tradeaddress); - form.append('tradedeadline', this.data.tradedeadline); - form.append('isFirst', isFirst); - form.append('user_id', user_id); - axios.post('./api/postContractNewApplyData.php', form).then(res => { - if (res.status === 200) { - alert('暫存成功'); - console.log(res.data); - } - this.isLoading = false - }).catch(error => { - alert('儲存失敗!可能為以下錯誤:\n' + error.response.data) - this.isLoading = false - }) - } - } -} - -const contract_edit = () => { - return { - isLoading: false, - data: { - id: id, - repair_no: repair_no, - contractno: contractno, - company: company, - taxid: taxid, - facilityno: facilityno, - address: address, - type: type, - invoice: invoice, - repaireid: repaireid, - total_price: total_price, - sign_date: sign_date, - user_id: user_id, - - }, - fail_arr: [], - deleteFileFn(id) { - if (!confirm("確定要刪除嗎?")) return - this.data.files = this.data.files.filter(file => id != file.id) - this.data.deletefiles.push(id) - console.log(this.data.deletefiles); - }, - save() { - this.isLoading = true - const form = new FormData(); - form.append("id", this.data.id); - form.append("repair_no", this.data.repair_no); - form.append("contractno", this.data.contractno); - form.append("company", this.data.company); - form.append("taxid", this.data.taxid); - form.append("facilityno", this.data.facilityno); - form.append("address", this.data.address); - form.append("type", this.data.type); - form.append("invoice", this.data.invoice); - form.append("repaireid", this.data.repaireid); - form.append("total_price", this.data.total_price); - form.append("sign_date", this.data.sign_date); - form.append("user_id", user_id); - form.append('contracttype', 'r'); - - axios.post("./api/putContractData.php", form).then(res => { - console.log(res.data) - if (res.status === 200) { - alert("更新成功"); - window.location.reload(); - } - this.isLoading = false - }).catch(error => { - let code = error.response.status; - if (code == 422) { - this.fail_arr = error.response.data - this.errorFn() - } - if (code == 500) { - alert("更新失敗!可能為以下錯誤:\n" + error.response.data) - } - this.isLoading = false - }) - - }, - uploadFiles(e) { - this.data.newfiles = e.target.files - }, - errorFn() { - let msg = "" - for (let i = 0; i < this.fail_arr.length; i++) { - msg += this.fail_arr[i] + "、" - } - alert(msg) - } - } - +const contractDownload = () => { + return { + init() { + this.standardData = this.deepClone(this.data); + this.onstandardViewData = this.deepClone(this.data); + this.buystandardData = this.deepClone(this.buydata); + this.buyonstandardViewData = this.deepClone(this.buydata); + // CKEDITOR.replace('editor',{ + // extraplugins:'filebrowser', + // height:80, + // width:'100%', + // filebrowserUploadMethod:'form', + // filebrowserUploadUrl:'./ckeditor_upload.php' + // }); + }, + installfill1: '', + installfill2: '', + installAffix: 1, + buyfill1: '', + buyfill2: '', + buyAffix: 1, + css: `table { background-color: #fff; border: none; margin-top: 30px; font-family: '標楷體'; width: 600px; } table tr:nth-child(even), table tr:nth-child(odd) { background-color: #fff; } table tr { font-size: 12pt; width: 100%; } table tr h2 { font-size: 18pt; } table tr td { width: 100%; height: 100%; line-height: 2; display: flex; } table tr td.center { display: flex; justify-content: center; align-items: center; } table tr td.list { width: 100%; height: 100%; white-space: nowrap; display: flex; } table tr td.list span { width: 60px; min-height: 100%; display: block; } table tr td.list > p { display: block; text-align: justify; } table tr td.list div { max-width: calc(100% - 60px); white-space: normal; } table tr td.list div.text-justify { display: flex; width: 100%; justify-content: space-between; } table tr.date td > div { width: 100%; text-align: right; } table tr.date td > div.text-justify { display: flex; justify-content: space-between; } table td, table th { padding: 8px; }`, + data: { + illustrate: { + editshow: false, + plaintext: '茲因甲方向乙方訂購電梯,並委由乙方安裝系爭電梯,經雙方同意共同訂立本合約書,其條款如下:' + }, + partyA: { + editshow: false, + plaintext: partyAcompany, + }, + partyAcontractno: { + editshow: false, + plaintext: partyAcontractno, + }, + list: { + plaintext: [ + { + editshow: false, + origin: true, + text: `安裝產品名稱、數量及單價:
1、 ${people} 人座  ${floor} 停站速度每分鐘 ${speed} 公尺 交流變頻變壓電腦智能控制升降機 ${num} 部。單價:新台幣 ${numberToChinese(totalInstallPrice)} 元整( ${numberWithCommas(totalInstallPrice)} )(含5%加值型營業稅)。`, + type: 'title', + deleted: false, + id: 0, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '安裝產品規格:如附表一。', + type: 'title', + deleted: false, + id: 1, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '安裝地點:' + partyAaddress + '。', + type: 'title', + deleted: false, + id: 2, + input_id: null, + }, + { + editshow: false, + origin: true, + text: `安裝報酬:安裝勞務報酬為新台幣(以下皆同) ${numberToChinese(totalPrice)} 元整(${numberWithCommas(totalPrice)} )(含5%加值型營業稅)。`, + type: 'title', + deleted: false, + id: 3, + input_id: null, + }, + { + editshow: false, + origin: true, + text: install_pay_text, + type: 'title', + deleted: false, + id: 4, + input_id: 'fill1', + }, + { + editshow: false, + origin: true, + text: '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台__日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於__日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。', + type: 'title', + deleted: false, + id: 5, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '交車事項:
一、乙方完成產品安裝後,甲方應儘速理交車事宜,不得無故或藉故拖延。如經乙方通知,甲方遲未辦理交車事宜,則於乙方催告後,即視同交車完成。
二、乙方試車完成後,甲方應配合提供建物使用執照及其他竣工檢查所需文件,以利乙方代甲方辦理昇降設備竣工檢查。
三、甲方於昇降設備竣工檢查合格及取得使用許可證後,交車事項即為完成。', + type: 'title', + deleted: false, + id: 6, + input_id: null, + }, + + { + editshow: false, + origin: true, + text: '因故延期:
如因天災、地變及其他不可抗力之因素,或甲方未將電梯昇降路及機械室之建築工程等配合事項未於貨抵工地前七日整理完善,或甲方未將符合規格之電源於安裝前送電至機械室,或房屋建築及其他應配合相關事項未完成,致影響乙方如期安裝產品時,乙方安裝日期應依受影響日數向後延展,如因可歸責於甲方事由者亦同。', + type: 'title', + deleted: false, + id: 7, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '工程變更:
甲方對本工程之規格有變更設計及增減工程數量時,應於合約訂立日後壹個月內預先以書面通知乙方且需經雙方同意,如因工程變更而致乙方成本增加時,則甲方應吸收所有增加之成本並追認給付給乙方,否則乙方依原合約之貨品規格、數量交貨,甲方亦應依原合約之貨品規格、數量給付款項。', + type: 'title', + deleted: false, + id: 8, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '工地清理及除外事項:
一、本工程於貨到現場前,其工地廢料雜物及臨時設備,應由甲方清除整理,同時提供乙方放置貨品之處所。
二、有關建築工事回填澆灌後之清潔,應由甲方負責清理。
三、升降設備除外工程表所列之各項工程不包括於乙方本合約施作範圍,應由甲方負責處理。', + type: 'title', + deleted: false, + id: 9, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '電梯保養:
一、乙方完工交車後,期後__個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。', + type: 'title', + deleted: false, + id: 10, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '特約條款:
一、本設備器材在款項未付清前,其所有權仍歸屬乙方所有,價款付清後所有權始轉移給甲方。
二、如因甲方因素或建物設計上之疏忽,致影響驗收時,甲方不得以此做為逾期或拒付款之藉口。
三、本合約所有日數約定,均以工作天計算。', + type: 'title', + deleted: false, + id: 11, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '終止合約權:
一、甲乙雙方之任一方若有違反合約之事實或發生清算或破產等信用貶落情形,致工程無法進行時,經催告而未改善者,他方得終止本合約,違約方必須賠償對方之損失。
二、乙方逾期交貨或甲方逾期未交付工地受領產品逾壹個月以上經他方催告仍不改善,他方得終止本合約,並請求損害賠償。', + type: 'title', + deleted: false, + id: 12, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '合意管轄:
因本合約而涉訟,甲、乙方雙方同意以桃園地方法院為第一審管轄法院。催告仍不改善,他方得終止本合約,並請求損害賠償。', + type: 'title', + deleted: false, + id: 13, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '附則:
本合約經甲、乙雙方簽章後立即生效,甲、乙雙方各存執正副本各壹份為憑,印花雙方各自貼付。', + type: 'title', + deleted: false, + id: 14, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '合約附件:
本合約附件為本合約之一部份,與本合約具同等效力,甲乙雙方均應遵守之。', + type: 'title', + deleted: false, + id: 15, + input_id: null, + }, + ] + } + }, + buydata: { + illustrate: { + editshow: false, + plaintext: '茲因甲方向乙方訂購電梯,經雙方同意共同訂立本合約書,其條款如下:' + }, + partyA: { + editshow: false, + plaintext: partyAcompany, + }, + partyAcontractno: { + editshow: false, + plaintext: partyAcontractno, + }, + list: { + plaintext: [ + { + editshow: false, + origin: true, + text: `產品名稱、數量及單價:
1、 ${people} 人座 ${floor} 停站速度每分鐘 ${speed} 公尺 交流變頻變壓電腦智能控制升降機 ${bigChineseArr[num]} 部。單價:新台幣 ${numberToChinese(totalBuyPrice)} 元整( ${numberWithCommas(totalBuyPrice)} )(含5%加值型營業稅)。`, + type: 'title', + deleted: false, + id: 0, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '產品規格:如附表一。', + type: 'title', + deleted: false, + id: 1, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '交貨及安裝地點:' + partyAaddress + '。', + type: 'title', + deleted: false, + id: 2, + input_id: null, + }, + { + editshow: false, + origin: true, + text: `產品總價:產品價金為新台幣 ${numberToChinese(totalBuyPrice)} 元整( ${numberWithCommas(totalBuyPrice)} )(含5%加值型營業稅)。`, + type: 'title', + deleted: false, + id: 3, + input_id: null, + }, + { + editshow: false, + origin: true, + text: buy_pay_text, + type: 'title', + deleted: false, + id: 4, + input_id: 'buyfill1', + }, + { + editshow: false, + origin: true, + text: '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第180日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。', + type: 'title', + deleted: false, + id: 5, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '施工規範依據:
甲方或其指定工程師,於本契約簽訂後二星期內,提供組立電梯之大樓建築有關圖面,以供乙方製作電梯配置圖,乙方製妥電梯配置圖後請甲方簽認,甲方於接獲乙方提請審核之電梯配置圖後,一星期內簽認並送還乙方,乙方應於接獲甲方簽認之電梯配置圖後,安排電梯組件之生產並按預定時間內製造完成。', + type: 'title', + deleted: false, + id: 6, + input_id: null, + }, + + { + editshow: false, + origin: true, + text: '因故延期:
一、如因天災、地變及其他不可抗力之因素,致影響乙方如期交付產品時,本合約第六條之交貨日期應依受影響日數向後延展,如因可歸責於甲方事由者亦同。
二、如因可歸責甲方事由致工期展延逾第六條日期時,如因物價波動致成本增加,乙方得請求物價調漲之補償,或終止合約。', + type: 'title', + deleted: false, + id: 7, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '工程變更:
甲方對本工程之規格有變更設計及增減工程數量時,應於合約訂立日後壹個月內預先以書面通知乙方且需經雙方同意,如因工程變更而致乙方成本增加時,則甲方應吸收所有增加之成本並追認給付給乙方,否則乙方依原合約之貨品規格、數量交貨,甲方亦應依原合約之貨品規格、數量給付款項。', + type: 'title', + deleted: false, + id: 8, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '工地清理及除外事項:
一、本工程於貨到現場前,其工地廢料雜物及臨時設備,應由甲方清除整理,同時提供乙方放置貨品之處所。
二、有關建築工事回填澆灌後之清潔,應由甲方負責清理。', + type: 'title', + deleted: false, + id: 9, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '合約時效:
本合約及其附件自簽訂之日起,至保固期滿之日止為有效期間。', + type: 'title', + deleted: false, + id: 10, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '特約條款:
一、本設備器材在款項未付清前,其所有權仍歸屬乙方所有,價款付清後所有權始轉移給甲方。
二、如因甲方因素或建物設計上之疏忽,致影響驗收時,甲方不得以此做為逾期或拒付款之藉口。
三、本合約所有日數約定,均以工作天計算。', + type: 'title', + deleted: false, + id: 11, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '終止合約權:
一、甲乙雙方之任一方若有違反合約之事實或發生清算或破產等信用貶落情形,致工程無法進行時,經催告而未改善者,他方得終止本合約,違約方必須賠償對方之損失。
二、乙方逾期交貨或甲方逾期未交付工地受領產品逾壹個月以上經他方催告仍不改善,他方得終止本合約,並請求損害賠償。', + type: 'title', + deleted: false, + id: 12, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '合意管轄:
因本合約而涉訟,甲、乙方雙方同意以桃園地方法院為第一審管轄法院。', + type: 'title', + deleted: false, + id: 13, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '附則:
本合約經甲、乙雙方簽章後立即生效,甲、乙雙方各存執正本各壹份為憑。', + type: 'title', + deleted: false, + id: 14, + input_id: null, + }, + { + editshow: false, + origin: true, + text: '合約附件:
本合約附件為本合約之一部份,與本合約具同等效力,甲乙雙方均應遵守之,本合約附件計有:', + type: 'title', + deleted: false, + id: 15, + input_id: null, + }, + ] + } + }, + fill: [], + standardData: {}, + onstandardViewData: {}, + deepClone: function (obj) { + let clone = Array.isArray(obj) ? [] : {}; + for (let key in obj) { + if (obj.hasOwnProperty(key)) { + if (typeof obj[key] === 'object' && obj[key] !== null) { + clone[key] = this.deepClone(obj[key]); + if (clone[key].text != undefined) { + // clone[key].text = clone[key].text.replace(/ insert , u=> update + index: 0, + isInstall: true, + chineseNumbers(number) { + const units = ['', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十']; + if (number <= 10) { + return units[number]; + } else if (number < 20) { + return '十' + units[number - 10]; + } else if (number < 30) { + return '二十' + units[number - 20]; + } else if (number < 40) { + return '三十' + units[number - 30]; + } else if (number < 50) { + return '四十' + units[number - 40]; + } else { + return '五十'; + } + }, + mouseover(obj, isInstall = true) { + if (isInstall) { + if (!this.onstandardViewData[obj].editshow) { + this.onstandardViewData[obj].editshow = true + } + } else { + if (!this.buyonstandardViewData[obj].editshow) { + this.buyonstandardViewData[obj].editshow = true + } + } + + }, + mouseoverlist(idx, inInstall = true) { + if (inInstall) { + if (!this.onstandardViewData.list.plaintext[idx].editshow) { + this.onstandardViewData.list.plaintext[idx].editshow = true + } + } else { + if (!this.buyonstandardViewData.list.plaintext[idx].editshow) { + this.buyonstandardViewData.list.plaintext[idx].editshow = true + } + } + + }, + mouseoutlist(idx) { + if (this.onstandardViewData.list.plaintext[idx].editshow) { + this.onstandardViewData.list.plaintext[idx].editshow = false + } + if (this.buyonstandardViewData.list.plaintext[idx].editshow) { + this.buyonstandardViewData.list.plaintext[idx].editshow = false + } + }, + mouseout(obj) { + if (this.onstandardViewData[obj].editshow) { + this.onstandardViewData[obj].editshow = false + } + if (this.buyonstandardViewData[obj].editshow) { + this.buyonstandardViewData[obj].editshow = false + } + }, + modelshowEditFn(text, obj, isList = false, isInstall = true) { + if (this.modelshow) { + return; + } + this.isInstall = isInstall + this.actionType = 'u' + this.modelshow = true + this.modelText = text + this.objName = obj + this.isList = isList + this.actionType = 'u' + if (isInstall) { + if (isList) { + this.$refs.editor.value = this.onstandardViewData.list.plaintext[obj].text + // CKEDITOR.instances.editor.setData(this.onstandardViewData.list.plaintext[obj].text); + return + } + if (!isList) { + this.$refs.editor.value = this.onstandardViewData[obj].plaintext + // CKEDITOR.instances.editor.setData(this.onstandardViewData[obj].plaintext); + return + } + } else { + if (isList) { + this.$refs.editor.value = this.buyonstandardViewData.list.plaintext[obj].text + // CKEDITOR.instances.editor.setData(this.buyonstandardViewData.list.plaintext[obj].text); + return + } + if (!isList) { + this.$refs.editor.value = this.buyonstandardViewData[obj].plaintext + // CKEDITOR.instances.editor.setData(this.buyonstandardViewData[obj].plaintext); + return + } + } + + }, + modelcloseFn() { + if (this.modelshow) { + this.modelshow = false + this.modelText = '' + this.modelContent = '' + this.isList = false + this.$refs.editor.value = '' + // CKEDITOR.instances.editor.setData('') + } + }, + modelshowAddUpFn(idx, isInstall = true) { + this.isInstall = isInstall + this.index = idx + this.actionType = 'i' + this.modelshow = true + this.modelText = '新增一條例' + }, + modelshowAddDownFn(idx, isInstall = true) { + this.isInstall = isInstall + this.index = idx + 1 + this.actionType = 'i' + this.modelshow = true + this.modelText = '新增一條例' + }, + updateEditor() { + let max = 0; + if (this.isInstall) { + this.onstandardViewData.list.plaintext.forEach(item => { + if (item.id > max) { + max = item.id + }; + }) + } else { + this.buyonstandardViewData.list.plaintext.forEach(item => { + if (item.id > max) { + max = item.id + }; + }) + } + + max = max + 1 + if (this.actionType == 'i') { + let newObj = { + editshow: false, + origin: false, + text: this.removeTrailingNewline(this.$refs.editor.value), + // text:this.removeTrailingNewline(this.convertHtmlToPlainText(this.$refs.editor.value)), + // text:this.removeTrailingNewline(this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData())), + type: 'title', + deleted: false, + id: max, + } + if (this.isInstall) { + this.data.list.plaintext.splice(this.index, 0, newObj) + this.onstandardViewData.list.plaintext.splice(this.index, 0, newObj) + } else { + this.buydata.list.plaintext.splice(this.index, 0, newObj) + this.buyonstandardViewData.list.plaintext.splice(this.index, 0, newObj) + } + this.modelcloseFn() + return + } + if (this.actionType == 'u') { + if (this.isInstall) { + if (this.isList) { + // this.data.list.plaintext[this.objName].text = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) + this.data.list.plaintext[this.objName].text = this.convertHtmlToPlainText(this.$refs.editor.value) + // this.onstandardViewData.list.plaintext[this.objName].text = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) + // this.onstandardViewData.list.plaintext[this.objName].text = this.convertHtmlToPlainText(this.$refs.editor.value) + this.onstandardViewData.list.plaintext[this.objName].text = this.$refs.editor.value + } else { + // this.data[this.objName].plaintext = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) + this.data[this.objName].plaintext = this.convertHtmlToPlainText(this.$refs.editor.value) + // this.onstandardViewData[this.objName].plaintext = this.convertHtmlToPlainText(CKEDITOR.instances.editor.getData()) + // this.onstandardViewData[this.objName].plaintext = this.convertHtmlToPlainText(this.$refs.editor.value) + this.onstandardViewData[this.objName].plaintext = this.$refs.editor.value + } + } else { + if (this.isList) { + this.buydata.list.plaintext[this.objName].text = this.convertHtmlToPlainText(this.$refs.editor.value) + this.buyonstandardViewData.list.plaintext[this.objName].text = this.$refs.editor.value + } else { + this.buydata[this.objName].plaintext = this.convertHtmlToPlainText(this.$refs.editor.value) + this.buyonstandardViewData[this.objName].plaintext = this.$refs.editor.value + } + } + } + this.modelcloseFn() + return + }, + deleteEditor(idx, isInstall = true) { + if (isInstall) { + if (confirm('確定要刪除嗎?')) { + let id = this.onstandardViewData.list.plaintext[idx].id + this.data.list.plaintext.forEach(item => { + if (item.id == id) { + item.deleted = 1; + } + }) + this.onstandardViewData.list.plaintext.splice(idx, 1) + } + } else { + if (confirm('確定要刪除嗎?')) { + let id = this.buyonstandardViewData.list.plaintext[idx].id + // this.buydata.list.plaintext[idx].deleted = 1 + this.buydata.list.plaintext.forEach(item => { + if (item.id == id) { + if (!item.deleted) { + item.deleted = 1; + } + } + }) + this.buyonstandardViewData.list.plaintext.splice(idx, 1) + } + } + }, + removeTrailingNewline(str) { + return str.replace(/\n+$/, ''); + }, + convertHtmlToPlainText(htmlString) { + // 創建一個新的DOMParser對象 + var parser = new DOMParser(); + + // 使用parseFromString方法解析傳入的HTML字符串 + var doc = parser.parseFromString(htmlString, 'text/html'); + + // 返回解析後的純文本內容 + return doc.body.textContent || ''; + }, + exportFn(type) { + const form = this.$refs.form + const prviewType = this.$refs.form.querySelector('#prview-type'); + const list = this.$refs.form.querySelector('#prview-list'); + const standardList = this.$refs.form.querySelector('#standard-prview-list'); + const illustrate = this.$refs.form.querySelector('#illustrate'); + const standardIllustrate = this.$refs.form.querySelector('#standard-illustrate'); + const partyA = this.$refs.form.querySelector('#partyA'); + const partyAcontractno = this.$refs.form.querySelector('#partyAcontractno'); + const total_price = this.$refs.form.querySelector('#total_price'); + prviewType.value = type + if (type === 1) { + const standardJsonText = this.buystandardData.list.plaintext.map((item, idx) => { + let text = '' + text = item.text.replace(/\s+/g, "") + this.buydata.list.plaintext[idx].text = this.buydata.list.plaintext[idx].text.replace(/\s+/g, "") + + return { + text: text, + id: item.id + } + }); + const jsonText = this.buydata.list.plaintext.map(item => { + let text = '' + text = item.text + return { + text: text, + origin: item.origin ? 1 : 0, + deleted: item.deleted ? 1 : 0, + id: item.id, + updated: item.updated ? 1 : 0, + } + }); + list.value = JSON.stringify(jsonText) + standardList.value = JSON.stringify(standardJsonText) + illustrate.value = this.buydata.illustrate.plaintext + standardIllustrate.value = this.buystandardData.illustrate.plaintext + partyA.value = this.buydata.partyA.plaintext + partyAcontractno.value = this.buydata.partyAcontractno.plaintext + total_price.value = totalBuyPrice + form.submit(); + return; + } + if (type === 2) { + // list.value = JSON.stringify(this.data.list.plaintext) + const standardJsonText = this.standardData.list.plaintext.map((item, idx) => { + let text = '' + text = item.text.replace(/\s+/g, "") + if (this.data.list.plaintext[idx] !== undefined) { + this.data.list.plaintext[idx].text = this.data.list.plaintext[idx].text.replace(/\s+/g, "") + } + return { + text: text, + id: item.id + } + }) + const jsonText = this.data.list.plaintext.map(item => { + let text = '' + item.text + text = item.text + return { + text: text, + origin: item.origin ? 1 : 0, + deleted: item.deleted ? 1 : 0, + id: item.id, + updated: item.updated ? 1 : 0, + } + }) + list.value = JSON.stringify(jsonText) + standardList.value = JSON.stringify(standardJsonText) + illustrate.value = this.data.illustrate.plaintext + standardIllustrate.value = this.standardData.illustrate.plaintext + partyA.value = this.data.partyA.plaintext + partyAcontractno.value = this.data.partyAcontractno.plaintext + total_price.value = totalInstallPrice + form.submit(); + + return; + } + }, + toggleBuyStandard: true, + toggleInstallStandard: true, + isbuyShow: true, + sendInstallInputFn() { + if (this.installfill1 == '') { + alert('請輸入安裝試車期限'); + return; + } + if (this.installfill2 == '') { + alert('請輸入免費保養月數'); + return; + } + if (this.installfill1 < 45) { + alert('安裝試車期限不得低於45日'); + return; + } + if (this.installfill1 < 1) { + alert('免費保養月數不得低於1個月'); + return; + } + this.isInstallInputIng = false + this.data.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' + this.standardData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' + this.onstandardViewData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' + this.data.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' + this.standardData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' + this.onstandardViewData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' + this.data.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' + this.standardData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' + this.onstandardViewData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' + }, + sendInstallInputKeyupFn(e) { + if (e.keyCode !== 13) return + if (this.installfill1 == '') { + alert('請輸入安裝試車期限'); + return; + } + if (this.installfill2 == '') { + alert('請輸入免費保養月數'); + return; + } + if (this.installfill1 < 45) { + alert('安裝試車期限不得低於45日'); + return; + } + if (this.installfill1 < 1) { + alert('免費保養月數不得低於1個月'); + return; + } + this.isInstallInputIng = false + this.data.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' + this.standardData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' + this.onstandardViewData.list.plaintext[1].text = '安裝產品規格:如附表' + this.affixArr[Number(this.installAffix)] + '。' + this.data.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' + this.standardData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' + this.onstandardViewData.list.plaintext[5].text = '安裝試車事項:
一、甲方應於實際出貨日期前七日,清理升降設備之建築物升降道,及完成底坑防水之處理,上述事項完成後,甲方即以書面或電話通知乙方進場安裝,乙方應於貨抵工地後每台 ' + this.installfill1 + ' 日內安裝完成。
二、甲方接到乙方電梯安裝完成通知之日起,倘因甲方因素致無法於四十五日內交車時,甲方應付清總價款全部餘額。
三、如因非關乙方因素致乙方無法進場施作時,於該因素或障礙排除前,甲方應對已進場之材料或設備負保管責任及整修費用。' + this.data.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' + this.standardData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' + this.onstandardViewData.list.plaintext[10].text = '電梯保養:
一、乙方完工交車後,期後 ' + this.installfill2 + ' 個月內應負責免費定期保養,及履行免費保固,於免費保養期間屆至後,雙方再協商嗣後保養事宜。
二、如因可歸責乙方因素致安裝產品有所瑕疵時,乙方應負責修復或修繕,惟非因乙方因素致有修復產品需要時,乙方仍負責修復或修繕,惟得向甲方酌收基本材料與人工費用。
三、另依法令規定,非經竣工檢查合格後取得使用許可證之電梯,依法不得使用。' + }, + sendBuyInputFn() { + if (this.buyfill1 == '') { + alert('請輸入交貨期限'); + return; + } + if (this.buyfill1 < 1) { + alert('交貨期限不得低於1日'); + return; + } + if (buyArr[1].installment == 2) { + this.buydata.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); + this.buystandardData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); + this.buyonstandardViewData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); + } + this.isBuyInputIng = false + this.buydata.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' + this.buystandardData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' + this.buyonstandardViewData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' + this.buydata.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' + this.buystandardData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' + this.buyonstandardViewData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' + let buyAffixHtml = '' + for (let i = 0; i < Number(this.buyAffix); i++) { + buyAffixHtml += `
${numberToSmallChinese(i + 1)}、附表${numberToSmallChinese(i + 1)}                                                       共 1 張` + } + this.buydata.list.plaintext[15].text = this.buydata.list.plaintext[15].text + buyAffixHtml + this.buystandardData.list.plaintext[15].text = this.buystandardData.list.plaintext[15].text + buyAffixHtml + this.buyonstandardViewData.list.plaintext[15].text = this.buyonstandardViewData.list.plaintext[15].text + buyAffixHtml + }, + sendBuyInputKeyupFn(e) { + if (e.keyCode !== 13) return + if (this.buyfill1 == '') { + alert('請輸入交貨期限'); + return; + } + if (this.buyfill1 < 1) { + alert('交貨期限不得低於1日'); + return; + } + if (buyArr[1].installment == 2) { + this.buydata.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); + this.buystandardData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); + this.buyonstandardViewData.list.plaintext[4].text = this.buydata.list.plaintext[4].text.replace('____', this.buyfill2); + } + this.isBuyInputIng = false + this.buydata.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' + this.buystandardData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' + this.buyonstandardViewData.list.plaintext[1].text = '產品規格:如附表' + this.affixArr[Number(this.buyAffix)] + '。' + this.buydata.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' + this.buystandardData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' + this.buyonstandardViewData.list.plaintext[5].text = '交貨期限及甲方配合事項:
乙方應於接獲甲方圖色確認第 ' + this.buyfill1 + ' 日(應於合約簽訂日起兩年內),將本工程所需之全部設備、器材 運抵工地,甲方應提供適當的場所供乙方貯放設備、器材。' + let buyAffixHtml = '' + for (let i = 0; i < Number(this.buyAffix); i++) { + buyAffixHtml += `
${numberToSmallChinese(i + 1)}、附表${numberToSmallChinese(i + 1)}                                                       共 1 張` + } + this.buydata.list.plaintext[15].text = this.buydata.list.plaintext[15].text + buyAffixHtml + this.buystandardData.list.plaintext[15].text = this.buystandardData.list.plaintext[15].text + buyAffixHtml + this.buyonstandardViewData.list.plaintext[15].text = this.buyonstandardViewData.list.plaintext[15].text + buyAffixHtml + }, + affixArr: ['', '一', '一、二', '一、二、三', '一、二、三、四', '一、二、三、四、五'], + isBuyInputIng: true, + isInstallInputIng: true, + } +}; + +const contractNewInput = () => { + return { + init() { }, + data: { + contractno: '', + customer: '', + manager: '', + vat: '', + case_name: '', + linkman: '', + lm_tel: '', + address: '', + salesman: '', + qc: '', + qc: '', + // files:[], + }, + step: 1, + isLoading: false, + customize: false, + nextStepFn() { + if (this.data.contractno == '') return alert('合約號為必填') + this.isLoading = true + if (this.step == 1) { + this.getContractDate(); + } + }, + nextStepKeyupFn(e) { + if (e.keyCode != 13) return + if (this.step == 1) { + this.getContractDate(); + console.log(this.step); + } + }, + preStepFn() { + if (this.step == 2) { + this.step = 1 + } + }, + getContractDate() { + axios.get('./api/getContractData.php?contracttype=m&contractno=' + this.data.contractno).then(res => { + if (!res.data) { + this.step = 2 + this.isLoading = false + return + } + if (!this.customize) { + console.log(res.data); + this.data.customer = res.data.customer + this.data.manager = res.data.manager + this.data.vat = res.data.uscc + this.data.case_name = res.data.case_name + this.data.linkman = res.data.linkman + this.data.lm_tel = res.data.lm_tel + this.data.address = res.data.address + this.data.salesman = res.data.salesman + this.data.qc = res.data.qc + } + this.step = 2 + this.isLoading = false + }).catch(err => { + console.error(err) + this.isLoading = false + }) + }, + save() { + this.isLoading = true + const form = new FormData(); + form.append('contractno', this.data.contractno); + form.append('customer', this.data.customer); + form.append('manager', this.data.manager); + form.append('vat', this.data.vat); + form.append('case_name', this.data.case_name); + form.append('linkman', this.data.linkman); + form.append('lm_tel', this.data.lm_tel); + form.append('address', this.data.address); + form.append('salesman', this.data.salesman); + form.append('qc', this.data.qc); + form.append('contracttype', 'm'); + form.append('user_id', user_id); + for (var i = 0; i < this.data.files.length; i++) { + form.append('files[]', this.data.files[i]); + } + axios.post('./api/postNewContractData.php', form).then(res => { + console.log(res); + if (res.status === 201) { + alert('儲存成功'); + this.step = 1 + this.data.contractno = '' + this.data.customer = '' + this.data.manager = '' + this.data.vat = '' + this.data.case_name = '' + this.data.linkman = '' + this.data.lm_tel = '' + this.data.address = '' + this.data.salesman = '' + this.data.qc = '' + this.data.files = [] + this.customize = false + + } else { + alert('儲存失敗!可能為以下錯誤:\n' + res.data) + } + this.isLoading = false + }).catch(error => { + let code = error.response.status; + if (code == 422) { + this.fail_arr = error.response.data + this.errorFn(); + } + if (code == 500) { + alert('儲存失敗!可能為以下錯誤:\n' + error.response.data) + } + + this.isLoading = false + }) + }, + errorFn() { + let msg = '' + for (let i = 0; i < this.fail_arr.length; i++) { + msg += this.fail_arr[i] + '、' + } + alert(msg) + }, + uploadFiles(e) { + this.data.files = e.target.files + }, + } +}; + +////////////////////////////// +//// 合約簽回(修理) +//// +//// 製作人:梓誠 +/// 時間 : +////////////////////////////// +const contractRepair = () => { + return { + init() { }, + data: { + contractno: '', + company: '', + repairer: '', + repairid: '', + facilityno: '', + taxid: '', + invoice: '', //發票抬頭 + type: '', //工程類別需新增,用 post + address: '', + repair_no: '', + total_price: '', + sign_date: '', + contract_status: '' + }, + step: 1, + isLoading: false, + customize: false, + + + nextStepFn() { + if (this.data.contractno == '') return alert('合約號為必填') + this.isLoading = true + if (this.step == 1) { + this.getContractDate(); + } + }, + nextStepKeyupFn(e) { + if (e.keyCode != 13) return + if (this.step == 1) { + this.getContractDate(); + console.log(this.step); + } + }, + // 抓資料 + getContractDate() { + axios.get('./api/getContractData.php?contracttype=r&contractno=' + this.data.contractno).then(res => { + if (!res.data) { + this.step = 2; + this.isLoading = false; + // console.log(123); + return + } + if (!this.customize) { + // console.log(res.data); + this.data.contractno = res.data.contractno; + this.data.company = res.data.company; + this.data.repairer = res.data.name; + this.data.facilityno = res.data.facilityno; + this.data.taxid = res.data.taxid; + this.data.invoice = res.data.invoice; + this.data.address = res.data.address; + this.data.repair_no = res.data.repair_no; + this.data.total_price = res.data.total_price; + this.data.repairid = res.data.accountid; + this.data.sign_date = res.data.sign_date; + } + this.step = 2; + this.isLoading = false; + // console.log(user_name); + // console.log(this.data.sign_date); + }).catch(err => { + console.log(err); + alert(err.response.data); + this.isLoading = false + }) + }, + preStepFn() { + if (this.step == 2) { + if (confirm('回到上一頁會初始化資料,確定要返回嗎?')) { + this.step = 1; + this.data.contractno = ''; + this.data.company = ''; + this.data.repairer = ''; + this.data.facilityno = ''; + this.data.taxid = ''; + this.data.invoice = ''; + this.data.address = ''; + this.data.repair_no = ''; + this.data.total_price = ''; + this.data.repairid = ''; + this.data.sign_date = ''; + + return; + } + } + }, + save() { + this.isLoading = true; + const form = new FormData(); + form.append('contractno', this.data.contractno); + form.append('company', this.data.company); + form.append('repairid', this.data.repairid); + form.append('facilityno', this.data.facilityno); + form.append('taxid', this.data.taxid); + form.append('invoice', this.data.invoice); + form.append('address', this.data.address); + form.append('repair_no', this.data.repair_no); + form.append('total_price', this.data.total_price); + form.append('sign_date', this.data.sign_date); + form.append('contract_status', this.data.contract_status); + form.append('contracttype', 'r'); + form.append('user_id', user_id); + form.append('type', this.data.type); + axios.post('./api/postContractData.php', form).then(res => { + console.log(res.status); + if (res.status === 200) { + alert('儲存成功'); + this.step = 1; + this.data.contractno = ''; + this.data.company = ''; + this.data.repairid = ''; + this.data.facilityno = ''; + this.data.repairer = ''; + this.data.taxid = ''; + this.data.invoice = ''; + this.data.address = ''; + this.data.repair_no = ''; + this.data.total_price = ''; + this.data.user_id = ''; + this.data.type = ''; + this.data.sign_date = ''; + this.data.contract_status = ''; + } + this.isLoading = false; + }).catch(error => { + let code = error.response.status; + if (code == 422) { + this.fail_arr = error.response.data; + this.errorFn(); + } + if (code == 500) { + alert('儲存失敗!可能為以下錯誤:\n' + error.response.data); + } + + this.isLoading = false; + }) + }, + errorFn() { + let msg = ''; + for (let i = 0; i < this.fail_arr.length; i++) { + msg += this.fail_arr[i] + '、'; + } + alert(msg); + }, + uploadFiles(e) { + this.data.files = e.target.files; + } + + } +}; + +const contractInput = () => { + return { + init() { + $('.contract-input-component .form .dropdown').dropdown(); + + axios.get('./twzip.json').then(res => { + this.cities = res.data.cities + }) + }, + cities: [], + data: { + contractno: 'B23100060', + total_price: '', //合約總價 + vat: '', //統一編號 + mtype: 'A', //維修型態 + phone: '', //客戶電話 + email: '', //Email + mworker: '', //保養員 + mcycle: '', //保養頻率 + salesman: '', //營業員 + contract_begin_date: '', //合約開始時間 + contract_end_date: '', //合約終止時間 + area: '', //區域 + zip: '', //郵遞區號 + address: '', //地址 + customer: '', //立約人 + partyA: '', //業務聯繫人 + partyAaddress: '', //業務聯繫人地址 + partyAphone: '', //業務聯繫人電話 + partyAemail: '', //業務聯繫人email + files: [], //附件檔案 + num: '', //電梯數量 + disabled: false, //資料庫是否有電梯數量資料 + elevators: [], //機種、載重、人乘、樓停、樓層、速度、緯度、經度、開門方式、保養別、廠牌、竣檢日、許可證日期 + }, + customize: false, + step: 1, + isLoading: false, + fail_arr: [], + nextStepFn() { + if (this.step == 1) { + if (this.data.contractno == '') return alert('請輸入合約號'); + this.isLoading = true + this.getContractDate(); + } else if (this.step == 2) { + if (this.data.num <= 0) return alert('請填寫電梯數量!') + if (!this.data.disabled) { + this.createElevator(); + } + this.step = 3 + } + }, + nextStepKeyupFn(e) { + if (e.keyCode !== 13) return + if (this.step == 1) { + if (this.data.contractno == '') return alert('請輸入合約號'); + this.isLoading = true + this.getContractDate(); + + } else if (this.step == 2) { + this.step = 3 + } + }, + createElevator() { + for (let i = 0; i < this.data.num; i++) { + this.data.elevators.push({ + spec: '', //規格 + weight: '', //載重 + speed: '', //速度 + persons: '', //人乘 + stop: '', //樓停 + floors: '', //樓層 + latitude: '', //緯度 + longitude: '', //經度 + elevator_brand: '', //廠牌 + opendoor: '', //開門方式 + maintainance: '', //保養別 + takecertificatedate: '', //竣檢日 + useful_date: '', //許可證有效日期 + }) + } + }, + getContractDate() { + axios.get('./api/getContractData.php?contracttype=b&contractno=' + this.data.contractno).then(res => { + if (!res.data) { + this.step = 2 + this.isLoading = false + return + } + if (!this.customize) { + console.log(res.data); + this.data.total_price = res.data.sold_price + this.data.salesman = res.data.salesman + this.data.contract_begin_date = res.data.contract_begin_date + this.data.contract_end_date = res.data.contract_end_date + this.data.address = res.data.address + this.data.customer = res.data.customer + this.data.partyA = res.data.customer + this.data.partyAaddress = res.data.address + this.data.num = res.data.num + this.data.disabled = (res.data.num > 0) ? true : false; + this.data.elevators = res.data.elevators + let cityIndex = this.data.address.indexOf('市'); + console.log(cityIndex); + if (cityIndex == -1) { + cityIndex = this.data.address.indexOf('縣'); + } + if (cityIndex > 1) { + // 獲取''市''前面的兩個字 + let city = this.data.address.substring(cityIndex - 2, cityIndex + 1); + this.data.area = city; + } else { + this.data.area = '' + } + } + this.step = 2 + this.isLoading = false + }).catch(err => { + console.error(err) + this.isLoading = false + }) + }, + preStepFn() { + if (this.step == 2) { + if (confirm('回到上一頁會將會初始化資料,確定返回嗎?')) { + this.step = 1 + this.data.total_price = '' + this.data.salesman = '' + this.data.contract_begin_date = '' + this.data.contract_end_date = '' + this.data.address = '' + this.data.customer = '' + this.data.partyA = '' + this.data.partyAaddress = '' + this.step = 1 + this.data.num = '' + this.data.disabled = false + this.data.elevators = [] + this.data.files = [] + this.data.vat = '' + this.data.mtype = '' + this.data.phone = '' + this.data.email = '' + this.data.mworker = '' + this.data.mcycle = '' + this.data.area = '' + this.data.zip = '' + this.data.partyAphone = '' + this.data.partyAemail = '' + return; + } + } else if (this.step == 3) { + this.step = 2 + } + }, + save() { + this.isLoading = true + const form = new FormData(); + form.append('contractno', this.data.contractno); + form.append('total_price', this.data.total_price); + form.append('vat', this.data.vat); + form.append('mtype', this.data.mtype); + form.append('phone', this.data.phone); + form.append('email', this.data.email); + form.append('mworker', this.data.mworker); + form.append('mcycle', this.data.mcycle); + form.append('salesman', this.data.salesman); + form.append('contract_begin_date', this.data.contract_begin_date); + form.append('contract_end_date', this.data.contract_end_date); + form.append('address', this.data.address); + form.append('area', this.data.area); + form.append('customer', this.data.customer); + form.append('partyA', this.data.partyA); + form.append('partyAaddress', this.data.partyAaddress); + form.append('partyAphone', this.data.partyAphone); + form.append('partyAemail', this.data.partyAemail); + form.append('user_id', user_id); + form.append('user_name', user_name); + form.append('num', this.data.num); + form.append('elevators', JSON.stringify(this.data.elevators)); + form.append('contracttype', 'b'); + + // 如果有附件檔案,可以逐一加入 + for (var i = 0; i < this.data.files.length; i++) { + form.append('files[]', this.data.files[i]); + } + axios.post('./api/postContractData.php', form).then(res => { + console.log(res.status); + if (res.status === 200) { + alert('儲存成功'); + this.step = 1 + this.data.total_price = '' + this.data.salesman = '' + this.data.contract_begin_date = '' + this.data.contract_end_date = '' + this.data.address = '' + this.data.customer = '' + this.data.partyA = '' + this.data.partyAaddress = '' + this.step = 1 + this.data.num = '' + this.data.disabled = false + this.data.elevators = [] + this.data.files = [] + this.data.vat = '' + this.data.mtype = '' + this.data.phone = '' + this.data.email = '' + this.data.mworker = '' + this.data.mcycle = '' + this.data.area = '' + this.data.zip = '' + this.data.partyAphone = '' + this.data.partyAemail = '' + } + this.isLoading = false + }).catch(error => { + let code = error.response.status; + if (code == 422) { + this.fail_arr = error.response.data + this.errorFn(); + } + if (code == 500) { + alert('儲存失敗!可能為以下錯誤:\n' + error.response.data) + } + + this.isLoading = false + }) + }, + errorFn() { + let msg = '' + for (let i = 0; i < this.fail_arr.length; i++) { + msg += this.fail_arr[i] + '、' + } + alert(msg) + }, + uploadFiles(e) { + this.data.files = e.target.files + }, + } +}; + +const contractNewApply = () => { + return { + step: 1, + isLoading: false, + data: { + mid: mid, + vol_no: contractno, + salesman: salesman, + salesmanname: salesmanname, + apply_date: apply_date, + apply_type: 'A', + case_name: case_name, + company: company, + manager: manager, + vat: vat, + total_price: price_total, + price_a: price_a, + price_b: price_b, + address: address, + workdeadline_a: 30, //完工期限: 幾天內安裝完成,預設30 + workdeadline_b: 7, //完工期限: 幾天內整理完善,預設7 + regulations: 10, //附則 + freedeadline: 18, //免保期限(月) + tradeaddress: '', //交貨地點 + tradedeadline: 90, //交貨期限 + items: items, + }, + pays: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + 6: 0, + 7: 0, + }, + tickets: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + 5: 0, + 6: 0, + 7: 0, + }, + localnumber(num) { + return num.toLocaleString(); + }, + storageFn() { + this.isLoading = true + const isFirst = 1; + const form = new FormData(); + form.append('mid', this.data.mid); + form.append('vol_no', this.data.vol_no); + form.append('salesman', this.data.salesman); + form.append('apply_date', this.data.apply_date); + form.append('apply_type', this.data.apply_type); + form.append('case_name', this.data.case_name); + form.append('company', this.data.company); + form.append('manager', this.data.manager); + form.append('vat', this.data.vat); + form.append('total_price', this.data.total_price); + form.append('price_a', this.data.price_a); + form.append('price_b', this.data.price_b); + form.append('address', this.data.address); + form.append('workdeadline_a', this.data.workdeadline_a); + form.append('workdeadline_b', this.data.workdeadline_b); + form.append('regulations', this.data.regulations); + form.append('freedeadline', this.data.freedeadline); + form.append('tradeaddress', this.data.tradeaddress); + form.append('tradedeadline', this.data.tradedeadline); + form.append('isFirst', isFirst); + form.append('user_id', user_id); + axios.post('./api/postContractNewApplyData.php', form).then(res => { + if (res.status === 200) { + alert('暫存成功'); + console.log(res.data); + } + this.isLoading = false + }).catch(error => { + alert('儲存失敗!可能為以下錯誤:\n' + error.response.data) + this.isLoading = false + }) + } + } +} + +const contract_edit = () => { + console.log(contract_status); + return { + isLoading: false, + data: { + id: id, + repair_no: repair_no, + contractno: contractno, + company: company, + taxid: taxid, + facilityno: facilityno, + address: address, + type: type, + invoice: invoice, + repaireid: repaireid, + total_price: total_price, + sign_date: sign_date, + user_id: user_id, + contract_status: contract_status + + }, + fail_arr: [], + deleteFileFn(id) { + if (!confirm("確定要刪除嗎?")) return + this.data.files = this.data.files.filter(file => id != file.id) + this.data.deletefiles.push(id) + console.log(this.data.deletefiles); + }, + save() { + this.isLoading = true + const form = new FormData(); + form.append("id", this.data.id); + form.append("repair_no", this.data.repair_no); + form.append("contractno", this.data.contractno); + form.append("company", this.data.company); + form.append("taxid", this.data.taxid); + form.append("facilityno", this.data.facilityno); + form.append("address", this.data.address); + form.append("type", this.data.type); + form.append("invoice", this.data.invoice); + form.append("repaireid", this.data.repaireid); + form.append("total_price", this.data.total_price); + form.append("sign_date", this.data.sign_date); + form.append("user_id", user_id); + form.append("contract_status", this.data.contract_status); + form.append('contracttype', 'r'); + + axios.post("./api/putContractData.php", form).then(res => { + console.log(res); + if (res.status === 200) { + alert("更新成功"); + window.location.reload(); + } + this.isLoading = false + }).catch(error => { + console.log(this.data); + console.log(error); + let code = error.response.status; + if (code == 422) { + this.fail_arr = error.response.data + this.errorFn() + } + if (code == 500) { + alert("更新失敗!可能為以下錯誤:\n" + error.response.data) + } + this.isLoading = false + }) + + }, + uploadFiles(e) { + this.data.newfiles = e.target.files + }, + errorFn() { + let msg = "" + for (let i = 0; i < this.fail_arr.length; i++) { + msg += this.fail_arr[i] + "、" + } + alert(msg) + } + } + } \ No newline at end of file diff --git a/wms/contract-repair/styles/style.css b/wms/contract-repair/styles/style.css index 8868e264..7cc8f7dd 100644 --- a/wms/contract-repair/styles/style.css +++ b/wms/contract-repair/styles/style.css @@ -49,7 +49,8 @@ main .inputDiv { main .inputDiv label { margin-bottom: 10px; } -main .inputDiv label input, main .inputDiv label select { +main .inputDiv label input, +main .inputDiv label select { border: 1px #aaa solid; outline: none; border-radius: 5px; @@ -68,100 +69,140 @@ main .inputDiv label button { font-weight: 6500; margin-top: 15px; } -main .contract-install-component, main .contract-material-component { +main .contract-install-component, +main .contract-material-component { width: 100%; max-width: 816px; margin: 30px auto; background-color: #f7f7f7 !important; } -main .contract-install-component p, main .contract-material-component p { +main .contract-install-component p, +main .contract-material-component p { margin: 0; } -main .contract-install-component > .btn-list, main .contract-material-component > .btn-list { +main .contract-install-component > .btn-list, +main .contract-material-component > .btn-list { display: flex; align-items: center; } -main .contract-install-component > .btn-list > button, main .contract-material-component > .btn-list > button { +main .contract-install-component > .btn-list > button, +main .contract-material-component > .btn-list > button { padding: 8px; margin: 0 4px; } -main .contract-install-component > .contract, main .contract-material-component > .contract { +main .contract-install-component > .contract, +main .contract-material-component > .contract { background: #fff; width: 100%; margin-top: 15px; padding: 20px; font-family: "標楷體"; } -main .contract-install-component > .contract > h2, main .contract-material-component > .contract > h2 { +main .contract-install-component > .contract > h2, +main .contract-material-component > .contract > h2 { font-size: 18pt; text-align: center; } -main .contract-install-component > .contract br, main .contract-material-component > .contract br { +main .contract-install-component > .contract br, +main .contract-material-component > .contract br { line-height: 2.5; } -main .contract-install-component > .contract .d-flex, main .contract-material-component > .contract .d-flex { +main .contract-install-component > .contract .d-flex, +main .contract-material-component > .contract .d-flex { display: flex; align-items: center; } -main .contract-install-component > .contract .mouseover, main .contract-material-component > .contract .mouseover { +main .contract-install-component > .contract .mouseover, +main .contract-material-component > .contract .mouseover { background-color: #f1f1f1; cursor: pointer; } -main .contract-install-component > .contract div, main .contract-install-component > .contract section, main .contract-material-component > .contract div, main .contract-material-component > .contract section { +main .contract-install-component > .contract div, +main .contract-install-component > .contract section, +main .contract-material-component > .contract div, +main .contract-material-component > .contract section { font-size: 12pt; line-height: 2.5; } -main .contract-install-component > .contract div.party, main .contract-install-component > .contract section.party, main .contract-material-component > .contract div.party, main .contract-material-component > .contract section.party { +main .contract-install-component > .contract div.party, +main .contract-install-component > .contract section.party, +main .contract-material-component > .contract div.party, +main .contract-material-component > .contract section.party { width: 100%; display: flex; align-items: center; justify-content: space-between; } -main .contract-install-component > .contract div.party .company-name, main .contract-install-component > .contract section.party .company-name, main .contract-material-component > .contract div.party .company-name, main .contract-material-component > .contract section.party .company-name { +main .contract-install-component > .contract div.party .company-name, +main .contract-install-component > .contract section.party .company-name, +main .contract-material-component > .contract div.party .company-name, +main .contract-material-component > .contract section.party .company-name { text-indent: 80pt; } -main .contract-install-component > .contract div.party .notes, main .contract-install-component > .contract section.party .notes, main .contract-material-component > .contract div.party .notes, main .contract-material-component > .contract section.party .notes { +main .contract-install-component > .contract div.party .notes, +main .contract-install-component > .contract section.party .notes, +main .contract-material-component > .contract div.party .notes, +main .contract-material-component > .contract section.party .notes { margin-right: 25%; white-space: nowrap; } -main .contract-install-component > .contract div.list-content, main .contract-install-component > .contract section.list-content, main .contract-material-component > .contract div.list-content, main .contract-material-component > .contract section.list-content { +main .contract-install-component > .contract div.list-content, +main .contract-install-component > .contract section.list-content, +main .contract-material-component > .contract div.list-content, +main .contract-material-component > .contract section.list-content { margin-left: 70px; } -main .contract-install-component > .contract div.list-title, main .contract-install-component > .contract section.list-title, main .contract-material-component > .contract div.list-title, main .contract-material-component > .contract section.list-title { +main .contract-install-component > .contract div.list-title, +main .contract-install-component > .contract section.list-title, +main .contract-material-component > .contract div.list-title, +main .contract-material-component > .contract section.list-title { display: flex; align-items: flex-start; } -main .contract-install-component > .contract div.list-title > strong, main .contract-install-component > .contract section.list-title > strong, main .contract-material-component > .contract div.list-title > strong, main .contract-material-component > .contract section.list-title > strong { +main .contract-install-component > .contract div.list-title > strong, +main .contract-install-component > .contract section.list-title > strong, +main .contract-material-component > .contract div.list-title > strong, +main .contract-material-component > .contract section.list-title > strong { min-width: 70px; } -main .contract-install-component > .contract p, main .contract-install-component > .contract article, main .contract-install-component > .contract div, main .contract-material-component > .contract p, main .contract-material-component > .contract article, main .contract-material-component > .contract div { +main .contract-install-component > .contract p, +main .contract-install-component > .contract article, +main .contract-install-component > .contract div, +main .contract-material-component > .contract p, +main .contract-material-component > .contract article, +main .contract-material-component > .contract div { position: relative; display: block; } -main .contract-install-component > .contract .date, main .contract-material-component > .contract .date { +main .contract-install-component > .contract .date, +main .contract-material-component > .contract .date { display: flex; align-items: center; width: 100%; margin-top: 300px; } -main .contract-install-component > .contract .date p, main .contract-material-component > .contract .date p { +main .contract-install-component > .contract .date p, +main .contract-material-component > .contract .date p { width: 50%; letter-spacing: 20px; } -main .contract-install-component > .contract .date > .ml, main .contract-material-component > .contract .date > .ml { +main .contract-install-component > .contract .date > .ml, +main .contract-material-component > .contract .date > .ml { width: 50%; display: flex; justify-content: space-between; flex-direction: row-reverse; } -main .contract-install-component > .contract .buttons, main .contract-material-component > .contract .buttons { +main .contract-install-component > .contract .buttons, +main .contract-material-component > .contract .buttons { position: absolute; top: 0; right: 0; display: flex; z-index: 9; } -main .contract-install-component > .contract .buttons > button, main .contract-material-component > .contract .buttons > button { +main .contract-install-component > .contract .buttons > button, +main .contract-material-component > .contract .buttons > button { width: 30px; height: 30px; border-radius: 5px; @@ -174,89 +215,127 @@ main .contract-install-component > .contract .buttons > button, main .contract-m color: #fff; margin: 0 1px; } -main .contract-install-component > .contract .buttons > button > i, main .contract-material-component > .contract .buttons > button > i { +main .contract-install-component > .contract .buttons > button > i, +main .contract-material-component > .contract .buttons > button > i { font-size: 12px; } -main .contract-install-component > .contract .buttons > button.edit, main .contract-material-component > .contract .buttons > button.edit { +main .contract-install-component > .contract .buttons > button.edit, +main .contract-material-component > .contract .buttons > button.edit { background-color: #5BC0DE; } -main .contract-install-component > .contract .buttons > button.add, main .contract-material-component > .contract .buttons > button.add { +main .contract-install-component > .contract .buttons > button.add, +main .contract-material-component > .contract .buttons > button.add { background-color: #F0AD4E; } -main .contract-install-component > .contract .buttons > button.delete, main .contract-material-component > .contract .buttons > button.delete { +main .contract-install-component > .contract .buttons > button.delete, +main .contract-material-component > .contract .buttons > button.delete { background-color: rgb(211, 0, 0); } -main .contract-install-component > .contract table, main .contract-material-component > .contract table { +main .contract-install-component > .contract table, +main .contract-material-component > .contract table { border: none; margin-top: 30px; font-family: "標楷體"; width: 800px; } -main .contract-install-component > .contract table tr:nth-child(even), main .contract-install-component > .contract table tr:nth-child(odd), main .contract-material-component > .contract table tr:nth-child(even), main .contract-material-component > .contract table tr:nth-child(odd) { +main .contract-install-component > .contract table tr:nth-child(even), +main .contract-install-component > .contract table tr:nth-child(odd), +main .contract-material-component > .contract table tr:nth-child(even), +main .contract-material-component > .contract table tr:nth-child(odd) { background-color: #fff; } -main .contract-install-component > .contract table tr, main .contract-material-component > .contract table tr { +main .contract-install-component > .contract table tr, +main .contract-material-component > .contract table tr { font-size: 12pt; width: 100%; position: relative; } -main .contract-install-component > .contract table tr.mouseover, main .contract-material-component > .contract table tr.mouseover { +main .contract-install-component > .contract table tr.mouseover, +main .contract-material-component > .contract table tr.mouseover { background-color: #f3f3f3; } -main .contract-install-component > .contract table tr h2, main .contract-material-component > .contract table tr h2 { +main .contract-install-component > .contract table tr h2, +main .contract-material-component > .contract table tr h2 { font-size: 18pt; } -main .contract-install-component > .contract table tr td, main .contract-material-component > .contract table tr td { +main .contract-install-component > .contract table tr td, +main .contract-material-component > .contract table tr td { width: 100%; height: 100%; line-height: 2; display: flex; } -main .contract-install-component > .contract table tr td.center, main .contract-material-component > .contract table tr td.center { +main .contract-install-component > .contract table tr td.center, +main .contract-material-component > .contract table tr td.center { display: flex; justify-content: center; align-items: center; } -main .contract-install-component > .contract table tr td.list, main .contract-material-component > .contract table tr td.list { +main .contract-install-component > .contract table tr td.list, +main .contract-material-component > .contract table tr td.list { width: 100%; height: 100%; white-space: nowrap; display: flex; } -main .contract-install-component > .contract table tr td.list span, main .contract-material-component > .contract table tr td.list span { +main .contract-install-component > .contract table tr td.list span, +main .contract-material-component > .contract table tr td.list span { width: 100px; min-height: 100%; display: block; } -main .contract-install-component > .contract table tr td.list > p, main .contract-material-component > .contract table tr td.list > p { +main .contract-install-component > .contract table tr td.list > p, +main .contract-material-component > .contract table tr td.list > p { display: block; text-align: justify; } -main .contract-install-component > .contract table tr td.list div, main .contract-install-component > .contract table tr td.list article, main .contract-material-component > .contract table tr td.list div, main .contract-material-component > .contract table tr td.list article { +main .contract-install-component > .contract table tr td.list div, +main .contract-install-component > .contract table tr td.list article, +main .contract-material-component > .contract table tr td.list div, +main .contract-material-component > .contract table tr td.list article { max-width: calc(100% - 100px); white-space: normal; } -main .contract-install-component > .contract table tr td.list div input[type=text], main .contract-install-component > .contract table tr td.list div input[type=number], main .contract-install-component > .contract table tr td.list div input, main .contract-install-component > .contract table tr td.list article input[type=text], main .contract-install-component > .contract table tr td.list article input[type=number], main .contract-install-component > .contract table tr td.list article input, main .contract-material-component > .contract table tr td.list div input[type=text], main .contract-material-component > .contract table tr td.list div input[type=number], main .contract-material-component > .contract table tr td.list div input, main .contract-material-component > .contract table tr td.list article input[type=text], main .contract-material-component > .contract table tr td.list article input[type=number], main .contract-material-component > .contract table tr td.list article input { +main .contract-install-component > .contract table tr td.list div input[type=text], +main .contract-install-component > .contract table tr td.list div input[type=number], +main .contract-install-component > .contract table tr td.list div input, +main .contract-install-component > .contract table tr td.list article input[type=text], +main .contract-install-component > .contract table tr td.list article input[type=number], +main .contract-install-component > .contract table tr td.list article input, +main .contract-material-component > .contract table tr td.list div input[type=text], +main .contract-material-component > .contract table tr td.list div input[type=number], +main .contract-material-component > .contract table tr td.list div input, +main .contract-material-component > .contract table tr td.list article input[type=text], +main .contract-material-component > .contract table tr td.list article input[type=number], +main .contract-material-component > .contract table tr td.list article input { border: none !important; border-bottom: 1px #222 solid !important; width: 50px; outline: none; text-align: center; } -main .contract-install-component > .contract table tr td.list div.text-justify, main .contract-install-component > .contract table tr td.list article.text-justify, main .contract-material-component > .contract table tr td.list div.text-justify, main .contract-material-component > .contract table tr td.list article.text-justify { +main .contract-install-component > .contract table tr td.list div.text-justify, +main .contract-install-component > .contract table tr td.list article.text-justify, +main .contract-material-component > .contract table tr td.list div.text-justify, +main .contract-material-component > .contract table tr td.list article.text-justify { display: flex; width: 100%; justify-content: space-between; } -main .contract-install-component > .contract table tr.date td > div, main .contract-material-component > .contract table tr.date td > div { +main .contract-install-component > .contract table tr.date td > div, +main .contract-material-component > .contract table tr.date td > div { width: 100%; text-align: right; } -main .contract-install-component > .contract table tr.date td > div.text-justify, main .contract-material-component > .contract table tr.date td > div.text-justify { +main .contract-install-component > .contract table tr.date td > div.text-justify, +main .contract-material-component > .contract table tr.date td > div.text-justify { display: flex; justify-content: space-between; } -main .contract-install-component > .contract table td, main .contract-install-component > .contract table th, main .contract-material-component > .contract table td, main .contract-material-component > .contract table th { +main .contract-install-component > .contract table td, +main .contract-install-component > .contract table th, +main .contract-material-component > .contract table td, +main .contract-material-component > .contract table th { padding: 8px; } @keyframes modelanim { @@ -323,7 +402,8 @@ main .contract-model > .contract-content > .content textarea { outline: none; border-radius: 6px; } -main .rebtn, main .prviewbtn { +main .rebtn, +main .prviewbtn { background-color: #5BC0DE; color: #fff; outline: none; @@ -339,7 +419,8 @@ main .prviewbtn { background-color: #2E6DA4; } -input[type=checkbox].scorll, input[type=radio].scorll { +input[type=checkbox].scorll, +input[type=radio].scorll { position: relative; width: 50px; height: 25px; @@ -349,7 +430,8 @@ input[type=checkbox].scorll, input[type=radio].scorll { cursor: pointer; border-radius: 20px; } -input[type=checkbox].scorll::before, input[type=radio].scorll::before { +input[type=checkbox].scorll::before, +input[type=radio].scorll::before { content: ""; position: absolute; top: 0; @@ -361,13 +443,16 @@ input[type=checkbox].scorll::before, input[type=radio].scorll::before { transform: scale(0.98, 0.96); transition: 0.5s; } -input[type=checkbox].scorll:checked, input[type=radio].scorll:checked { +input[type=checkbox].scorll:checked, +input[type=radio].scorll:checked { background: linear-gradient(to right, #5BC0DE, #2E6DA4); } -input[type=checkbox].scorll:checked::before, input[type=radio].scorll:checked::before { +input[type=checkbox].scorll:checked::before, +input[type=radio].scorll:checked::before { left: 25px; } -input[type=checkbox].scorll::after, input[type=radio].scorll::after { +input[type=checkbox].scorll::after, +input[type=radio].scorll::after { content: ""; } @@ -378,7 +463,8 @@ input[type=checkbox].scorll::after, input[type=radio].scorll::after { width: 800px; border: 1px #ccc solid; } -.prview table tr:nth-child(even), .prview table tr:nth-child(odd) { +.prview table tr:nth-child(even), +.prview table tr:nth-child(odd) { background-color: #fff; } .prview table tr { @@ -418,11 +504,13 @@ input[type=checkbox].scorll::after, input[type=radio].scorll::after { display: block; text-align: justify; } -.prview table tr td.list div, .prview table tr td.list article { +.prview table tr td.list div, +.prview table tr td.list article { max-width: calc(100% - 100px); white-space: normal; } -.prview table tr td.list div.text-justify, .prview table tr td.list article.text-justify { +.prview table tr td.list div.text-justify, +.prview table tr td.list article.text-justify { display: flex; width: 100%; justify-content: space-between; @@ -435,7 +523,8 @@ input[type=checkbox].scorll::after, input[type=radio].scorll::after { display: flex; justify-content: space-between; } -.prview table td, .prview table th { +.prview table td, +.prview table th { padding: 8px; } @@ -445,7 +534,8 @@ main table { font-family: "標楷體"; width: 800px; } -main table tr:nth-child(even), main table tr:nth-child(odd) { +main table tr:nth-child(even), +main table tr:nth-child(odd) { background-color: #fff; } main table tr { @@ -502,7 +592,8 @@ main table tr.date td > div.text-justify { display: flex; justify-content: space-between; } -main table td, main table th { +main table td, +main table th { padding: 8px; } @@ -525,8 +616,10 @@ main table td, main table th { } .loader { - border: 4px solid #f3f3f3; /* Light grey */ - border-top: 4px solid #999; /* Blue */ + border: 4px solid #f3f3f3; + /* Light grey */ + border-top: 4px solid #999; + /* Blue */ border-radius: 50%; width: 20px; height: 20px; @@ -541,14 +634,20 @@ main table td, main table th { transform: rotate(360deg); } } -.contract-input-component .contract-input-component .form, .contract-input-component .contract-management .form, .contract-input-component .contract-new-apply-component .form, .contract-management .contract-input-component .form, .contract-management .contract-management .form, .contract-management .contract-new-apply-component .form, .contract-new-apply-component .contract-input-component .form, .contract-new-apply-component .contract-management .form, .contract-new-apply-component .contract-new-apply-component .form { +.contract-input-component .form, +.contract-management .form, +.contract-new-apply-component .form { margin: 0 auto; } -.contract-input-component .contract-input-component .form .dropdown, .contract-input-component .contract-management .form .dropdown, .contract-input-component .contract-new-apply-component .form .dropdown, .contract-management .contract-input-component .form .dropdown, .contract-management .contract-management .form .dropdown, .contract-management .contract-new-apply-component .form .dropdown, .contract-new-apply-component .contract-input-component .form .dropdown, .contract-new-apply-component .contract-management .form .dropdown, .contract-new-apply-component .contract-new-apply-component .form .dropdown { +.contract-input-component .form .dropdown, +.contract-management .form .dropdown, +.contract-new-apply-component .form .dropdown { width: 100%; margin-top: 7px; } -.contract-input-component .contract-input-component .form .savebtn, .contract-input-component .contract-management .form .savebtn, .contract-input-component .contract-new-apply-component .form .savebtn, .contract-management .contract-input-component .form .savebtn, .contract-management .contract-management .form .savebtn, .contract-management .contract-new-apply-component .form .savebtn, .contract-new-apply-component .contract-input-component .form .savebtn, .contract-new-apply-component .contract-management .form .savebtn, .contract-new-apply-component .contract-new-apply-component .form .savebtn { +.contract-input-component .form .savebtn, +.contract-management .form .savebtn, +.contract-new-apply-component .form .savebtn { margin-right: 13px; display: flex; justify-content: center; @@ -557,11 +656,15 @@ main table td, main table th { height: 45px; font-size: 15px; } -.contract-input-component .contract-input-component .form table .fixed, .contract-input-component .contract-management .form table .fixed, .contract-input-component .contract-new-apply-component .form table .fixed, .contract-management .contract-input-component .form table .fixed, .contract-management .contract-management .form table .fixed, .contract-management .contract-new-apply-component .form table .fixed, .contract-new-apply-component .contract-input-component .form table .fixed, .contract-new-apply-component .contract-management .form table .fixed, .contract-new-apply-component .contract-new-apply-component .form table .fixed { +.contract-input-component .form table .fixed, +.contract-management .form table .fixed, +.contract-new-apply-component .form table .fixed { padding: 8px 0; cursor: not-allowed; } -.contract-input-component .contract-input-component .form table .alerttext, .contract-input-component .contract-management .form table .alerttext, .contract-input-component .contract-new-apply-component .form table .alerttext, .contract-management .contract-input-component .form table .alerttext, .contract-management .contract-management .form table .alerttext, .contract-management .contract-new-apply-component .form table .alerttext, .contract-new-apply-component .contract-input-component .form table .alerttext, .contract-new-apply-component .contract-management .form table .alerttext, .contract-new-apply-component .contract-new-apply-component .form table .alerttext { +.contract-input-component .form table .alerttext, +.contract-management .form table .alerttext, +.contract-new-apply-component .form table .alerttext { font-size: 13px; color: #a00; font-weight: 500; @@ -569,92 +672,126 @@ main table td, main table th { font-weight: 900; padding: 0; } -.contract-input-component .contract-input-component .form input[type=file], .contract-input-component .contract-management .form input[type=file], .contract-input-component .contract-new-apply-component .form input[type=file], .contract-management .contract-input-component .form input[type=file], .contract-management .contract-management .form input[type=file], .contract-management .contract-new-apply-component .form input[type=file], .contract-new-apply-component .contract-input-component .form input[type=file], .contract-new-apply-component .contract-management .form input[type=file], .contract-new-apply-component .contract-new-apply-component .form input[type=file] { +.contract-input-component .form input[type=file], +.contract-management .form input[type=file], +.contract-new-apply-component .form input[type=file] { padding: 12px 20px; margin: 8px 0; } -.contract-input-component .contract-input-component .form span, .contract-input-component .contract-management .form span, .contract-input-component .contract-new-apply-component .form span, .contract-management .contract-input-component .form span, .contract-management .contract-management .form span, .contract-management .contract-new-apply-component .form span, .contract-new-apply-component .contract-input-component .form span, .contract-new-apply-component .contract-management .form span, .contract-new-apply-component .contract-new-apply-component .form span { +.contract-input-component .form span, +.contract-management .form span, +.contract-new-apply-component .form span { font-weight: 900; } -.contract-input-component .contract-input-component .form span.successtext, .contract-input-component .contract-management .form span.successtext, .contract-input-component .contract-new-apply-component .form span.successtext, .contract-management .contract-input-component .form span.successtext, .contract-management .contract-management .form span.successtext, .contract-management .contract-new-apply-component .form span.successtext, .contract-new-apply-component .contract-input-component .form span.successtext, .contract-new-apply-component .contract-management .form span.successtext, .contract-new-apply-component .contract-new-apply-component .form span.successtext { +.contract-input-component .form span.successtext, +.contract-management .form span.successtext, +.contract-new-apply-component .form span.successtext { color: #0a0; } -.contract-input-component .contract-input-component .form span.failtext, .contract-input-component .contract-management .form span.failtext, .contract-input-component .contract-new-apply-component .form span.failtext, .contract-management .contract-input-component .form span.failtext, .contract-management .contract-management .form span.failtext, .contract-management .contract-new-apply-component .form span.failtext, .contract-new-apply-component .contract-input-component .form span.failtext, .contract-new-apply-component .contract-management .form span.failtext, .contract-new-apply-component .contract-new-apply-component .form span.failtext { +.contract-input-component .form span.failtext, +.contract-management .form span.failtext, +.contract-new-apply-component .form span.failtext { color: #a00; } -.contract-input-component .contract-input-component .form span.readtext, .contract-input-component .contract-management .form span.readtext, .contract-input-component .contract-new-apply-component .form span.readtext, .contract-management .contract-input-component .form span.readtext, .contract-management .contract-management .form span.readtext, .contract-management .contract-new-apply-component .form span.readtext, .contract-new-apply-component .contract-input-component .form span.readtext, .contract-new-apply-component .contract-management .form span.readtext, .contract-new-apply-component .contract-new-apply-component .form span.readtext { +.contract-input-component .form span.readtext, +.contract-management .form span.readtext, +.contract-new-apply-component .form span.readtext { color: #aa0; } -.contract-input-component .contract-input-component .form input[type=number]::-webkit-outer-spin-button, -.contract-input-component .contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-input-component .contract-management .form input[type=number]::-webkit-outer-spin-button, -.contract-input-component .contract-management .form input[type=number]::-webkit-inner-spin-button, .contract-input-component .contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button, -.contract-input-component .contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button, .contract-management .contract-input-component .form input[type=number]::-webkit-outer-spin-button, -.contract-management .contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-management .contract-management .form input[type=number]::-webkit-outer-spin-button, -.contract-management .contract-management .form input[type=number]::-webkit-inner-spin-button, .contract-management .contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button, -.contract-management .contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button, .contract-new-apply-component .contract-input-component .form input[type=number]::-webkit-outer-spin-button, -.contract-new-apply-component .contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-new-apply-component .contract-management .form input[type=number]::-webkit-outer-spin-button, -.contract-new-apply-component .contract-management .form input[type=number]::-webkit-inner-spin-button, .contract-new-apply-component .contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button, -.contract-new-apply-component .contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button { +.contract-input-component .form input[type=number]::-webkit-outer-spin-button, +.contract-input-component .form input[type=number]::-webkit-inner-spin-button, +.contract-management .form input[type=number]::-webkit-outer-spin-button, +.contract-management .form input[type=number]::-webkit-inner-spin-button, +.contract-new-apply-component .form input[type=number]::-webkit-outer-spin-button, +.contract-new-apply-component .form input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } -.contract-input-component .contract-input-component .form input[type=number], .contract-input-component .contract-management .form input[type=number], .contract-input-component .contract-new-apply-component .form input[type=number], .contract-management .contract-input-component .form input[type=number], .contract-management .contract-management .form input[type=number], .contract-management .contract-new-apply-component .form input[type=number], .contract-new-apply-component .contract-input-component .form input[type=number], .contract-new-apply-component .contract-management .form input[type=number], .contract-new-apply-component .contract-new-apply-component .form input[type=number] { +.contract-input-component .form input[type=number], +.contract-management .form input[type=number], +.contract-new-apply-component .form input[type=number] { -moz-appearance: textfield; } -.contract-input-component .contract-input-component .error, .contract-input-component .contract-management .error, .contract-input-component .contract-new-apply-component .error, .contract-management .contract-input-component .error, .contract-management .contract-management .error, .contract-management .contract-new-apply-component .error, .contract-new-apply-component .contract-input-component .error, .contract-new-apply-component .contract-management .error, .contract-new-apply-component .contract-new-apply-component .error { +.contract-input-component .error, +.contract-management .error, +.contract-new-apply-component .error { display: flex; flex-direction: column; margin: 15px; } -.contract-input-component .contract-input-component .error .errortext, .contract-input-component .contract-management .error .errortext, .contract-input-component .contract-new-apply-component .error .errortext, .contract-management .contract-input-component .error .errortext, .contract-management .contract-management .error .errortext, .contract-management .contract-new-apply-component .error .errortext, .contract-new-apply-component .contract-input-component .error .errortext, .contract-new-apply-component .contract-management .error .errortext, .contract-new-apply-component .contract-new-apply-component .error .errortext { +.contract-input-component .error .errortext, +.contract-management .error .errortext, +.contract-new-apply-component .error .errortext { font-size: 16px; font-weight: 500; color: #a00; } -.contract-input-component .contract-input-component .input-group-btn, .contract-input-component .contract-management .input-group-btn, .contract-input-component .contract-new-apply-component .input-group-btn, .contract-management .contract-input-component .input-group-btn, .contract-management .contract-management .input-group-btn, .contract-management .contract-new-apply-component .input-group-btn, .contract-new-apply-component .contract-input-component .input-group-btn, .contract-new-apply-component .contract-management .input-group-btn, .contract-new-apply-component .contract-new-apply-component .input-group-btn { +.contract-input-component .input-group-btn, +.contract-management .input-group-btn, +.contract-new-apply-component .input-group-btn { font-size: 16px; } @media screen and (max-width: 600px) { - .contract-input-component .contract-input-component table, .contract-input-component .contract-management table, .contract-input-component .contract-new-apply-component table, .contract-management .contract-input-component table, .contract-management .contract-management table, .contract-management .contract-new-apply-component table, .contract-new-apply-component .contract-input-component table, .contract-new-apply-component .contract-management table, .contract-new-apply-component .contract-new-apply-component table { + .contract-input-component table, + .contract-management table, + .contract-new-apply-component table { border: 0; } - .contract-input-component .contract-input-component table thead, .contract-input-component .contract-management table thead, .contract-input-component .contract-new-apply-component table thead, .contract-management .contract-input-component table thead, .contract-management .contract-management table thead, .contract-management .contract-new-apply-component table thead, .contract-new-apply-component .contract-input-component table thead, .contract-new-apply-component .contract-management table thead, .contract-new-apply-component .contract-new-apply-component table thead { + .contract-input-component table thead, + .contract-management table thead, + .contract-new-apply-component table thead { display: none; } - .contract-input-component .contract-input-component table tr, .contract-input-component .contract-management table tr, .contract-input-component .contract-new-apply-component table tr, .contract-management .contract-input-component table tr, .contract-management .contract-management table tr, .contract-management .contract-new-apply-component table tr, .contract-new-apply-component .contract-input-component table tr, .contract-new-apply-component .contract-management table tr, .contract-new-apply-component .contract-new-apply-component table tr { + .contract-input-component table tr, + .contract-management table tr, + .contract-new-apply-component table tr { margin-bottom: 10px; display: block; border-bottom: 2px solid #ddd; } - .contract-input-component .contract-input-component table td, .contract-input-component .contract-management table td, .contract-input-component .contract-new-apply-component table td, .contract-management .contract-input-component table td, .contract-management .contract-management table td, .contract-management .contract-new-apply-component table td, .contract-new-apply-component .contract-input-component table td, .contract-new-apply-component .contract-management table td, .contract-new-apply-component .contract-new-apply-component table td { + .contract-input-component table td, + .contract-management table td, + .contract-new-apply-component table td { display: block; text-align: left; font-size: 14px; border-bottom: 1px dotted #ccc; } - .contract-input-component .contract-input-component table td:last-child, .contract-input-component .contract-management table td:last-child, .contract-input-component .contract-new-apply-component table td:last-child, .contract-management .contract-input-component table td:last-child, .contract-management .contract-management table td:last-child, .contract-management .contract-new-apply-component table td:last-child, .contract-new-apply-component .contract-input-component table td:last-child, .contract-new-apply-component .contract-management table td:last-child, .contract-new-apply-component .contract-new-apply-component table td:last-child { + .contract-input-component table td:last-child, + .contract-management table td:last-child, + .contract-new-apply-component table td:last-child { border-bottom: 0; } - .contract-input-component .contract-input-component table td:before, .contract-input-component .contract-management table td:before, .contract-input-component .contract-new-apply-component table td:before, .contract-management .contract-input-component table td:before, .contract-management .contract-management table td:before, .contract-management .contract-new-apply-component table td:before, .contract-new-apply-component .contract-input-component table td:before, .contract-new-apply-component .contract-management table td:before, .contract-new-apply-component .contract-new-apply-component table td:before { + .contract-input-component table td:before, + .contract-management table td:before, + .contract-new-apply-component table td:before { content: attr(data-label); float: left; text-transform: uppercase; font-weight: bold; } } -.contract-input-component .contract-input-component .images, .contract-input-component .contract-management .images, .contract-input-component .contract-new-apply-component .images, .contract-management .contract-input-component .images, .contract-management .contract-management .images, .contract-management .contract-new-apply-component .images, .contract-new-apply-component .contract-input-component .images, .contract-new-apply-component .contract-management .images, .contract-new-apply-component .contract-new-apply-component .images { +.contract-input-component .images, +.contract-management .images, +.contract-new-apply-component .images { display: flex; flex-wrap: wrap; padding: 20px; } -.contract-input-component .contract-input-component .images > .image, .contract-input-component .contract-management .images > .image, .contract-input-component .contract-new-apply-component .images > .image, .contract-management .contract-input-component .images > .image, .contract-management .contract-management .images > .image, .contract-management .contract-new-apply-component .images > .image, .contract-new-apply-component .contract-input-component .images > .image, .contract-new-apply-component .contract-management .images > .image, .contract-new-apply-component .contract-new-apply-component .images > .image { +.contract-input-component .images > .image, +.contract-management .images > .image, +.contract-new-apply-component .images > .image { position: relative; margin: 10px; } -.contract-input-component .contract-input-component .images > .image:hover > i, .contract-input-component .contract-management .images > .image:hover > i, .contract-input-component .contract-new-apply-component .images > .image:hover > i, .contract-management .contract-input-component .images > .image:hover > i, .contract-management .contract-management .images > .image:hover > i, .contract-management .contract-new-apply-component .images > .image:hover > i, .contract-new-apply-component .contract-input-component .images > .image:hover > i, .contract-new-apply-component .contract-management .images > .image:hover > i, .contract-new-apply-component .contract-new-apply-component .images > .image:hover > i { +.contract-input-component .images > .image:hover > i, +.contract-management .images > .image:hover > i, +.contract-new-apply-component .images > .image:hover > i { opacity: 1; } -.contract-input-component .contract-input-component .images > .image > i, .contract-input-component .contract-management .images > .image > i, .contract-input-component .contract-new-apply-component .images > .image > i, .contract-management .contract-input-component .images > .image > i, .contract-management .contract-management .images > .image > i, .contract-management .contract-new-apply-component .images > .image > i, .contract-new-apply-component .contract-input-component .images > .image > i, .contract-new-apply-component .contract-management .images > .image > i, .contract-new-apply-component .contract-new-apply-component .images > .image > i { +.contract-input-component .images > .image > i, +.contract-management .images > .image > i, +.contract-new-apply-component .images > .image > i { position: absolute; top: -12px; right: -12px; @@ -663,29 +800,37 @@ main table td, main table th { opacity: 0; transition: 0.3s; } -.contract-input-component table, .contract-management table, .contract-new-apply-component table { + +table { table-layout: fixed; width: 100%; } -.contract-input-component td, .contract-management td, .contract-new-apply-component td { + +td { word-wrap: break-word; } -.contract-input-component img, .contract-management img, .contract-new-apply-component img { + +img { width: 125px; } -.contract-input-component .width_style_1, .contract-management .width_style_1, .contract-new-apply-component .width_style_1 { + +.width_style_1 { width: 125px; } -.contract-input-component table, .contract-management table, .contract-new-apply-component table { + +table { width: 100%; } -.contract-input-component #table_index_filter, .contract-management #table_index_filter, .contract-new-apply-component #table_index_filter { + +#table_index_filter { float: right; } -.contract-input-component #table_index_paginate, .contract-management #table_index_paginate, .contract-new-apply-component #table_index_paginate { + +#table_index_paginate { float: right; } -.contract-input-component label, .contract-management label, .contract-new-apply-component label { + +label { display: inline-flex; margin-bottom: 0.5rem; margin-top: 0.5rem; diff --git a/wms/contract-repair/styles/style.css.map b/wms/contract-repair/styles/style.css.map index bfb5f800..01c2d24a 100644 --- a/wms/contract-repair/styles/style.css.map +++ b/wms/contract-repair/styles/style.css.map @@ -1 +1 @@ -{"version":3,"sources":["style.css","style.scss"],"names":[],"mappings":"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","file":"style.css"} \ No newline at end of file +{"version":3,"sources":["style.css","style.scss"],"names":[],"mappings":"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","file":"style.css"} \ No newline at end of file diff --git a/wms/contract-repair/styles/style.scss b/wms/contract-repair/styles/style.scss index 76899a30..2eabc33d 100644 --- a/wms/contract-repair/styles/style.scss +++ b/wms/contract-repair/styles/style.scss @@ -1,722 +1,871 @@ - - -main{ - [x-cloak] { display: none !important; } - display: flex; - justify-content: flex-start; - margin-top: -20px; - >.sidebar{ - width:300px; - min-height: 100vh; - border-right:1px #ddd solid; - box-shadow: 0px 0px 5px #ddd; - padding: 50px 20px; - button { - display: block; - outline: none; - border:none; - color:#1E74FD; - background-color: transparent; - margin-bottom: 20px; - border-bottom: 1px #ccc solid; - opacity: .65; - &.active{ - opacity: 1; - } - &:hover{ - opacity: 1; - } - } - a{ - display: block; - width: 120px; - height: 35px; - text-align: center; - line-height: 35px; - text-decoration: none; - background-color: #1E74FD; - color:#fff; - margin-top: 50px; - } - } - .inputDiv{ - padding: 30px; - display: flex; - flex-direction: column; - label{ - margin-bottom: 10px; - input, select{ - border:1px #aaa solid; - outline: none; - border-radius: 5px; - width: 220px; - height: 32px; - padding: 0 10px; - } - button{ - background-color:#1E74FD ; - color:#fff; - outline: none; - border:none; - border:1px #ccc solid; - width: 220px; - height: 32px; - font-weight: 6500; - margin-top: 15px; - } - } - } - .contract-install-component, .contract-material-component{ - p{ - margin:0; - } - - width: 100%; - max-width: 816px; - margin:30px auto; - background-color: #f7f7f7 !important; - >.btn-list{ - display: flex; - align-items: center; - >button{ - padding: 8px; - margin: 0 4px; - } - } - >.contract{ - background: #fff; - width: 100%; - margin-top: 15px; - padding: 20px ; - font-family:'標楷體'; - >h2{ - font-size: 18pt; - text-align: center; - } - br{ - line-height: 2.5; - } - .d-flex{ - display: flex; - align-items: center; - } - .mouseover{ - background-color: #f1f1f1; - cursor: pointer; - } - div, section{ - font-size: 12pt; - line-height: 2.5; - - &.party{ - width: 100%; - display: flex; - align-items: center; - justify-content: space-between; - .company-name{ - text-indent:80pt; - } - .notes{ - margin-right: 25%; - white-space:nowrap - } - } - &.list-content{ - margin-left:70px; - - } - &.list-title{ - display: flex; - align-items: flex-start; - >strong{ - min-width: 70px; - } - } - } - p, article, div{ - position: relative; - display: block; - - - } - .date{ - display: flex; - align-items: center; - width: 100%; - margin-top: 300px; - p{ - width: 50%; - letter-spacing: 20px; - } - >.ml{ - width: 50%; - display: flex; - justify-content: space-between; - flex-direction: row-reverse; - } - } - .buttons{ - position: absolute; - top: 0; - right:0; - display: flex; - z-index: 9; - >button{ - width: 30px; - height: 30px; - border-radius: 5px; - padding: 0; - display: flex; - justify-content: center; - align-items: center; - border:2px #fff solid; - outline: none; - color:#fff; - margin: 0 1px; - >i{ - font-size: 12px; - } - &.edit{ - background-color: #5BC0DE; - } - &.add{ - background-color: #F0AD4E; - } - &.delete{ - background-color: rgb(211, 0, 0); - } - } - } - } - >.contract table{ - border:none; - margin-top: 30px; - font-family:'標楷體'; - width: 800px; - tr:nth-child(even), tr:nth-child(odd) { - background-color: #fff; - } - tr{ - font-size: 12pt; - width: 100%; - position: relative; - &.mouseover{ - background-color: #f3f3f3; - } - h2{ - font-size: 18pt; - } - td{ - width: 100%; - height: 100%; - line-height: 2; - &.center{ - display: flex; - justify-content: center; - align-items: center; - } - display: flex; - &.list{ - width: 100%; - height: 100%; - white-space: nowrap; - display: flex; - span{ - width: 100px; - min-height: 100%; - display: block; - } - >p{ - display: block; - text-align: justify ; - } - div, article{ - max-width:calc(100% - 100px); - white-space: normal; - input[type='text'], input[type='number'], input{ - border:none !important; - border-bottom: 1px #222 solid !important; - width:50px; - outline: none; - text-align: center; - } - &.text-justify{ - display: flex; - width: 100%; - justify-content: space-between; - } - - } - } - - } - &.date{ - td{ - >div{ - width: 100%; - text-align: right; - &.text-justify{ - display: flex; - justify-content: space-between; - } - - } - } - } - } - td, th{ - padding: 8px; - } - } - - @keyframes modelanim { - 0%{ - opacity: 0; - } - } - } - .contract-model{ - position: fixed; - top: 0; - left:0; - width: 100%; - height: 100vh; - display: flex; - justify-content: center; - align-items: center; - z-index: 999; - animation: modelanim .2s linear; - >.contract-back{ - position: absolute; - top:0; - left:0; - width: 100%; - height: 100%; - background-color: rgba($color: #000000, $alpha: .5); - } - >.contract-content{ - z-index: 999; - max-width: 600px; - width: 100%; - border-radius: 6px; - overflow: hidden; - background-color: rgba($color: #fff, $alpha: 1.0); - >.model-header{ - width: 100%; - background-color: #1E74FD; - height: 38px; - display: flex; - justify-content: space-between; - align-items: center; - padding: 0 15px; - >i{ - float: right; - color:#ffffffb4; - cursor: pointer; - &:hover{ - color:#fff; - } - } - >span{ - color:#fff; - } - } - >.content{ - padding: 30px; - textarea{ - width: 100%; - resize: vertical; - height: 150px; - border:1px #ccc solid; - outline: none; - border-radius: 6px; - } - } - } - } - .rebtn, .prviewbtn{ - background-color : #5BC0DE ; - color:#fff; - outline: none; - border:none; - border:1px #ccc solid; - width: 100px; - height: 32px; - font-weight: 600; - border-radius: 6px; - margin-right: 5px; - } - .prviewbtn{ - background-color: #2E6DA4; - } -} -input[type="checkbox"].scorll ,input[type="radio"].scorll{ - position: relative; - width:50px; - height: 25px; - outline: none; - background:linear-gradient(to right,#bbb ,#999); - -webkit-appearance: none; - cursor: pointer; - border-radius: 20px; - &::before{ - content: ''; - position: absolute; - top: 0; - left: 0; - width:25px; - height: 25px; - background: #fff; - border-radius: 50%; - transform: scale(0.98,0.96); - transition: .5s; - } - &:checked{ - background: linear-gradient(to right, #5BC0DE,#2E6DA4); - &::before{ - left:25px; - } - - } - &::after{ - content:''; - } - -} - -.prview table{ - border:none; - margin-top: 30px; - font-family:'標楷體'; - width: 800px; - border:1px #ccc solid; - tr:nth-child(even), tr:nth-child(odd) { - background-color: #fff; - } - tr{ - font-size: 12pt; - width: 100%; - position: relative; - &.mouseover{ - background-color: #f3f3f3; - } - h2{ - font-size: 18pt; - } - td{ - width: 100%; - height: 100%; - line-height: 2; - &.center{ - display: flex; - justify-content: center; - align-items: center; - } - display: flex; - &.list{ - width: 100%; - height: 100%; - white-space: nowrap; - display: flex; - span{ - width: 100px; - min-height: 100%; - display: block; - } - >p{ - display: block; - text-align: justify ; - } - div, article{ - max-width:calc(100% - 100px); - white-space: normal; - &.text-justify{ - display: flex; - width: 100%; - justify-content: space-between; - } - } - } - } - &.date{ - td{ - >div{ - width: 100%; - text-align: right; - &.text-justify{ - display: flex; - justify-content: space-between; - } - - } - } - } - } - td, th{ - padding: 8px; - } -} -main{ - table{ - border:none; - margin-top: 30px; - font-family:'標楷體'; - width: 800px; - tr:nth-child(even), tr:nth-child(odd) { - background-color: #fff; - } - tr{ - font-size: 12pt; - width: 100%; - position: relative; - &.mouseover{ - background-color: #ccc; - } - h2{ - font-size: 18pt; - } - td{ - width: 100%; - height: 100%; - line-height: 2; - &.center{ - display: flex; - justify-content: center; - align-items: center; - } - display: flex; - &.list{ - width: 100%; - height: 100%; - white-space: nowrap; - display: flex; - span{ - width: 60px; - min-height: 100%; - display: block; - } - >p{ - display: block; - text-align: justify ; - } - div{ - max-width:calc(100% - 60px); - white-space: normal; - &.text-justify{ - display: flex; - width: 100%; - justify-content: space-between; - } - } - } - - - } - &.date{ - td{ - >div{ - width: 100%; - text-align: right; - &.text-justify{ - display: flex; - justify-content: space-between; - } - - } - } - } - } - td, th{ - padding: 8px; - } - } -} - -.prview{ - width: 800px; - margin:0 auto; - border:1px #ccc solid; - padding: 20px; - font-family:'標楷體'; - &.none{ - display: none; - } - h2{ - font-size: 18pt; - text-align: center; - } - p{ - font-size: 12pt; - } -} -.loader { - border: 4px solid #f3f3f3; /* Light grey */ - border-top: 4px solid #999; /* Blue */ - border-radius: 50%; - width: 20px; - height: 20px; - animation: spin 2s linear infinite; - } - -@keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} -.contract-input-component, .contract-management, .contract-new-apply-component{ -.contract-input-component, .contract-management, .contract-new-apply-component{ - .form{ - margin:0 auto; - .dropdown{ - width:100%; - margin-top: 7px; - } - .savebtn{ - margin-right: 13px; - display: flex; - justify-content: center; - align-items: center; - width:70px; - height: 45px; - font-size: 15px; - } - table{ - .fixed{ - padding: 8px 0; - cursor: not-allowed; - } - .alerttext{ - font-size: 13px; - color:#a00; - font-weight: 500; - margin: 3px; - font-weight: 900; - padding: 0; - } - } - input[type="file"]{ - padding: 12px 20px; - margin: 8px 0; - } - span{ - font-weight: 900; - &.successtext{ - color:#0a0; - } - &.failtext{ - color:#a00; - } - &.readtext{ - color:#aa0; - } - } - input[type=number]::-webkit-outer-spin-button, - input[type=number]::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; - } - input[type=number] { - -moz-appearance: textfield; - } - } - .error{ - display: flex; - flex-direction: column; - margin:15px ; - .errortext{ - font-size: 16px; - font-weight: 500; - color: #a00; - } - } - - .input-group-btn{ - font-size: 16px; - } - @media screen and (max-width: 600px) { - table { - border: 0; - } - - table thead { - display: none; - } - - table tr { - margin-bottom: 10px; - display: block; - border-bottom: 2px solid #ddd; - } - - table td { - display: block; - text-align: left; - font-size: 14px; - border-bottom: 1px dotted #ccc; - } - - table td:last-child { - border-bottom: 0; - } - - table td:before { - content: attr(data-label); - float: left; - text-transform: uppercase; - font-weight: bold; - } - } - .images{ - display: flex; - flex-wrap: wrap; - padding: 20px; - >.image{ - position: relative; - margin:10px; - &:hover > i{ - opacity: 1; - } - >i{ - position: absolute; - top: -12px; - right:-12px; - color:#b00; - cursor: pointer; - opacity: 0; - transition: .3s; - } - } - - } -} -table { - table-layout:fixed; - width: 100%; -} - -td { - word-wrap:break-word; -} - -img { - width:125px; -} - -.width_style_1 { - width:125px; -} - -table{ - width:100%; -} -#table_index_filter{ - float:right; -} -#table_index_paginate{ - float:right; -} -label { - display: inline-flex; - margin-bottom: .5rem; - margin-top: .5rem; -} -} +main { + [x-cloak] { + display: none !important; + } + + display: flex; + justify-content: flex-start; + margin-top: -20px; + + >.sidebar { + width: 300px; + min-height: 100vh; + border-right: 1px #ddd solid; + box-shadow: 0px 0px 5px #ddd; + padding: 50px 20px; + + button { + display: block; + outline: none; + border: none; + color: #1E74FD; + background-color: transparent; + margin-bottom: 20px; + border-bottom: 1px #ccc solid; + opacity: .65; + + &.active { + opacity: 1; + } + + &:hover { + opacity: 1; + } + } + + a { + display: block; + width: 120px; + height: 35px; + text-align: center; + line-height: 35px; + text-decoration: none; + background-color: #1E74FD; + color: #fff; + margin-top: 50px; + } + } + + .inputDiv { + padding: 30px; + display: flex; + flex-direction: column; + + label { + margin-bottom: 10px; + + input, + select { + border: 1px #aaa solid; + outline: none; + border-radius: 5px; + width: 220px; + height: 32px; + padding: 0 10px; + } + + button { + background-color: #1E74FD; + color: #fff; + outline: none; + border: none; + border: 1px #ccc solid; + width: 220px; + height: 32px; + font-weight: 6500; + margin-top: 15px; + } + } + } + + .contract-install-component, + .contract-material-component { + p { + margin: 0; + } + + width: 100%; + max-width: 816px; + margin:30px auto; + background-color: #f7f7f7 !important; + + >.btn-list { + display: flex; + align-items: center; + + >button { + padding: 8px; + margin: 0 4px; + } + } + + >.contract { + background: #fff; + width: 100%; + margin-top: 15px; + padding: 20px; + font-family: '標楷體'; + + >h2 { + font-size: 18pt; + text-align: center; + } + + br { + line-height: 2.5; + } + + .d-flex { + display: flex; + align-items: center; + } + + .mouseover { + background-color: #f1f1f1; + cursor: pointer; + } + + div, + section { + font-size: 12pt; + line-height: 2.5; + + &.party { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + + .company-name { + text-indent: 80pt; + } + + .notes { + margin-right: 25%; + white-space: nowrap + } + } + + &.list-content { + margin-left: 70px; + + } + + &.list-title { + display: flex; + align-items: flex-start; + + >strong { + min-width: 70px; + } + } + } + + p, + article, + div { + position: relative; + display: block; + + + } + + .date { + display: flex; + align-items: center; + width: 100%; + margin-top: 300px; + + p { + width: 50%; + letter-spacing: 20px; + } + + >.ml { + width: 50%; + display: flex; + justify-content: space-between; + flex-direction: row-reverse; + } + } + + .buttons { + position: absolute; + top: 0; + right: 0; + display: flex; + z-index: 9; + + >button { + width: 30px; + height: 30px; + border-radius: 5px; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + border: 2px #fff solid; + outline: none; + color: #fff; + margin: 0 1px; + + >i { + font-size: 12px; + } + + &.edit { + background-color: #5BC0DE; + } + + &.add { + background-color: #F0AD4E; + } + + &.delete { + background-color: rgb(211, 0, 0); + } + } + } + } + + >.contract table { + border: none; + margin-top: 30px; + font-family: '標楷體'; + width: 800px; + + tr:nth-child(even), + tr:nth-child(odd) { + background-color: #fff; + } + + tr { + font-size: 12pt; + width: 100%; + position: relative; + + &.mouseover { + background-color: #f3f3f3; + } + + h2 { + font-size: 18pt; + } + + td { + width: 100%; + height: 100%; + line-height: 2; + + &.center { + display: flex; + justify-content: center; + align-items: center; + } + + display: flex; + + &.list { + width: 100%; + height: 100%; + white-space: nowrap; + display: flex; + + span { + width: 100px; + min-height: 100%; + display: block; + } + + >p { + display: block; + text-align: justify; + } + + div, + article { + max-width: calc(100% - 100px); + white-space: normal; + + input[type='text'], + input[type='number'], + input { + border: none !important; + border-bottom: 1px #222 solid !important; + width: 50px; + outline: none; + text-align: center; + } + + &.text-justify { + display: flex; + width: 100%; + justify-content: space-between; + } + + } + } + + } + + &.date { + td { + >div { + width: 100%; + text-align: right; + + &.text-justify { + display: flex; + justify-content: space-between; + } + + } + } + } + } + + td, + th { + padding: 8px; + } + } + + @keyframes modelanim { + 0% { + opacity: 0; + } + } + } + + .contract-model { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; + z-index: 999; + animation: modelanim .2s linear; + + >.contract-back { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba($color: #000000, $alpha: .5); + } + + >.contract-content { + z-index: 999; + max-width: 600px; + width: 100%; + border-radius: 6px; + overflow: hidden; + background-color: rgba($color: #fff, $alpha: 1.0); + + >.model-header { + width: 100%; + background-color: #1E74FD; + height: 38px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 15px; + + >i { + float: right; + color: #ffffffb4; + cursor: pointer; + + &:hover { + color: #fff; + } + } + + >span { + color: #fff; + } + } + + >.content { + padding: 30px; + + textarea { + width: 100%; + resize: vertical; + height: 150px; + border: 1px #ccc solid; + outline: none; + border-radius: 6px; + } + } + } + } + + .rebtn, + .prviewbtn { + background-color: #5BC0DE; + color: #fff; + outline: none; + border: none; + border: 1px #ccc solid; + width: 100px; + height: 32px; + font-weight: 600; + border-radius: 6px; + margin-right: 5px; + } + + .prviewbtn { + background-color: #2E6DA4; + } +} + +input[type="checkbox"].scorll, +input[type="radio"].scorll { + position: relative; + width: 50px; + height: 25px; + outline: none; + background: linear-gradient(to right, #bbb, #999); + -webkit-appearance: none; + cursor: pointer; + border-radius: 20px; + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 25px; + height: 25px; + background: #fff; + border-radius: 50%; + transform: scale(0.98, 0.96); + transition: .5s; + } + + &:checked { + background: linear-gradient(to right, #5BC0DE, #2E6DA4); + + &::before { + left: 25px; + } + + } + + &::after { + content: ''; + } + +} + +.prview table { + border: none; + margin-top: 30px; + font-family: '標楷體'; + width: 800px; + border: 1px #ccc solid; + + tr:nth-child(even), + tr:nth-child(odd) { + background-color: #fff; + } + + tr { + font-size: 12pt; + width: 100%; + position: relative; + + &.mouseover { + background-color: #f3f3f3; + } + + h2 { + font-size: 18pt; + } + + td { + width: 100%; + height: 100%; + line-height: 2; + + &.center { + display: flex; + justify-content: center; + align-items: center; + } + + display: flex; + + &.list { + width: 100%; + height: 100%; + white-space: nowrap; + display: flex; + + span { + width: 100px; + min-height: 100%; + display: block; + } + + >p { + display: block; + text-align: justify; + } + + div, + article { + max-width: calc(100% - 100px); + white-space: normal; + + &.text-justify { + display: flex; + width: 100%; + justify-content: space-between; + } + } + } + } + + &.date { + td { + >div { + width: 100%; + text-align: right; + + &.text-justify { + display: flex; + justify-content: space-between; + } + + } + } + } + } + + td, + th { + padding: 8px; + } +} + +main { + table { + border: none; + margin-top: 30px; + font-family: '標楷體'; + width: 800px; + + tr:nth-child(even), + tr:nth-child(odd) { + background-color: #fff; + } + + tr { + font-size: 12pt; + width: 100%; + position: relative; + + &.mouseover { + background-color: #ccc; + } + + h2 { + font-size: 18pt; + } + + td { + width: 100%; + height: 100%; + line-height: 2; + + &.center { + display: flex; + justify-content: center; + align-items: center; + } + + display: flex; + + &.list { + width: 100%; + height: 100%; + white-space: nowrap; + display: flex; + + span { + width: 60px; + min-height: 100%; + display: block; + } + + >p { + display: block; + text-align: justify; + } + + div { + max-width: calc(100% - 60px); + white-space: normal; + + &.text-justify { + display: flex; + width: 100%; + justify-content: space-between; + } + } + } + + + } + + &.date { + td { + >div { + width: 100%; + text-align: right; + + &.text-justify { + display: flex; + justify-content: space-between; + } + + } + } + } + } + + td, + th { + padding: 8px; + } + } +} + +.prview { + width: 800px; + margin: 0 auto; + border: 1px #ccc solid; + padding: 20px; + font-family: '標楷體'; + + &.none { + display: none; + } + + h2 { + font-size: 18pt; + text-align: center; + } + + p { + font-size: 12pt; + } +} + +.loader { + border: 4px solid #f3f3f3; + /* Light grey */ + border-top: 4px solid #999; + /* Blue */ + border-radius: 50%; + width: 20px; + height: 20px; + animation: spin 2s linear infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +.contract-input-component, +.contract-management, +.contract-new-apply-component { + .form { + margin: 0 auto; + + .dropdown { + width: 100%; + margin-top: 7px; + } + + .savebtn { + margin-right: 13px; + display: flex; + justify-content: center; + align-items: center; + width: 70px; + height: 45px; + font-size: 15px; + } + + table { + .fixed { + padding: 8px 0; + cursor: not-allowed; + } + + .alerttext { + font-size: 13px; + color: #a00; + font-weight: 500; + margin: 3px; + font-weight: 900; + padding: 0; + } + } + + input[type="file"] { + padding: 12px 20px; + margin: 8px 0; + } + + span { + font-weight: 900; + + &.successtext { + color: #0a0; + } + + &.failtext { + color: #a00; + } + + &.readtext { + color: #aa0; + } + } + + input[type=number]::-webkit-outer-spin-button, + input[type=number]::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input[type=number] { + -moz-appearance: textfield; + } + } + + .error { + display: flex; + flex-direction: column; + margin: 15px; + + .errortext { + font-size: 16px; + font-weight: 500; + color: #a00; + } + } + + .input-group-btn { + font-size: 16px; + } + + @media screen and (max-width: 600px) { + table { + border: 0; + } + + table thead { + display: none; + } + + table tr { + margin-bottom: 10px; + display: block; + border-bottom: 2px solid #ddd; + } + + table td { + display: block; + text-align: left; + font-size: 14px; + border-bottom: 1px dotted #ccc; + } + + table td:last-child { + border-bottom: 0; + } + + table td:before { + content: attr(data-label); + float: left; + text-transform: uppercase; + font-weight: bold; + } + } + + .images { + display: flex; + flex-wrap: wrap; + padding: 20px; + + >.image { + position: relative; + margin: 10px; + + &:hover>i { + opacity: 1; + } + + >i { + position: absolute; + top: -12px; + right: -12px; + color: #b00; + cursor: pointer; + opacity: 0; + transition: .3s; + } + } + + } +} + +table { + table-layout: fixed; + width: 100%; +} + +td { + word-wrap: break-word; +} + +img { + width: 125px; +} + +.width_style_1 { + width: 125px; +} + +table { + width: 100%; +} + +#table_index_filter { + float: right; +} + +#table_index_paginate { + float: right; +} + +label { + display: inline-flex; + margin-bottom: .5rem; + margin-top: .5rem; +} \ No newline at end of file diff --git a/wms/mkt/pricereview_contractno-api.php b/wms/mkt/pricereview_contractno-api.php index 2c33004b..97b60a3d 100644 --- a/wms/mkt/pricereview_contractno-api.php +++ b/wms/mkt/pricereview_contractno-api.php @@ -1,63 +1,63 @@ - "ok", "err" => ""); - -try { - if (empty($_POST) || empty($_POST["pa"])) throw new \Exception("parameter empty"); - - foreach ($_POST as $k => $v) { - $$k = htmlspecialchars(stripslashes(trim($v))); - } - - // 基本資料 - $db_query = "select a.address, a.repairerid, c.contractno, c.company, c.taxid from account a, contract c "; - $db_query .= "where a.accountid = c.customerid and c.contractno = '$pa'"; - $res = mysqli_query($link, $db_query); - if ($row = mysqli_fetch_row($res)) { - $rarr["address"] = $row[0]; - $rarr["repairerid"] = $row[1]; - $rarr["contractno"] = $row[2]; - $rarr["company"] = $row[3]; - $rarr["taxid"] = $row[4]; - } - mysqli_free_result($res); - - // 電梯編號 - $db_query = "select facilityno from facility where contractno = '$pa' order by facilityno"; - $res = mysqli_query($link, $db_query); - while ($row = mysqli_fetch_row($res)) { - $rarr["faci"][] = $row[0]; - } - mysqli_free_result($res); - - if (!isset($rarr["contractno"])) { - $rarr["st"] = "err"; - $rarr["err"] = "無資料!"; - } -}catch(\Exception $e) { - $rarr["st"] = "err"; - $rarr["err"] = $e->getMessage(); -} -//print_r($rarr);exit; -echo json_encode($rarr, JSON_UNESCAPED_UNICODE); -exit; -?> \ No newline at end of file + "ok", "err" => ""); + +try { + if (empty($_POST) || empty($_POST["pa"])) throw new \Exception("parameter empty"); + + foreach ($_POST as $k => $v) { + $$k = htmlspecialchars(stripslashes(trim($v))); + } + + // 基本資料 + $db_query = "select a.address, a.repairerid, c.contractno, c.company, c.taxid from account a, contract c "; + $db_query .= "where a.accountid = c.customerid and c.contractno = '$pa'"; + $res = mysqli_query($link, $db_query); + if ($row = mysqli_fetch_row($res)) { + $rarr["address"] = $row[0]; + $rarr["repairerid"] = $row[1]; + $rarr["contractno"] = $row[2]; + $rarr["company"] = $row[3]; + $rarr["taxid"] = $row[4]; + } + mysqli_free_result($res); + + // 電梯編號 + $db_query = "select facilityno from facility where contractno = '$pa' order by facilityno"; + $res = mysqli_query($link, $db_query); + while ($row = mysqli_fetch_row($res)) { + $rarr["faci"][] = $row[0]; + } + mysqli_free_result($res); + + if (!isset($rarr["contractno"])) { + $rarr["st"] = "err"; + $rarr["err"] = "無資料!"; + } +} catch (\Exception $e) { + $rarr["st"] = "err"; + $rarr["err"] = $e->getMessage(); +} +//print_r($rarr);exit; +echo json_encode($rarr, JSON_UNESCAPED_UNICODE); +exit; diff --git a/wms/mkt/pricereview_repair-check.php b/wms/mkt/pricereview_repair-check.php index 56caeff1..46d53655 100644 --- a/wms/mkt/pricereview_repair-check.php +++ b/wms/mkt/pricereview_repair-check.php @@ -1,271 +1,288 @@ -"; - echo "alert('請勿重覆簽核!!');"; - echo "window.close();"; - echo ""; - exit; - } -} - -$assign_status = ''; - -$data = []; -$db_query = "select * from pricereview_repair_main where id = '$id'"; -$data = mysqli_query($link, $db_query); - -foreach($data as $data) : - // 公司站點 - $sql = "select content from code where field_name = 'masada_addr' and code_name = '".$data["masada_addr"]."'"; - $res = mysqli_query($link, $sql); - if ($row = mysqli_fetch_row($res)) { - $data["maddr"] = $row[0]; - } - mysqli_free_result($res); - - // 保養人員 - $repairer_arr = []; - $sql = "select name from account where accounttype = 'B' and accountid = '".$data["repairerid"]."'"; - $res = mysqli_query($link, $sql); - if ($row = mysqli_fetch_row($res)) { - $data["repair"] = $row[0]; - } - mysqli_free_result($res); - - // 價審明細 - $item_arr = []; - $sql = "select * from pricereview_repair_item where rid = '$id' order by item_no"; - $res = mysqli_query($link, $sql); - while ($row = mysqli_fetch_assoc($res)) { - $item_arr[$row["item_no"]]["title"] = $row["title"]; - $item_arr[$row["item_no"]]["item_unit_price"] = $row["item_unit_price"]; - $item_arr[$row["item_no"]]["item_qty"] = $row["item_qty"]; - $item_arr[$row["item_no"]]["item_price_bp"] = $row["item_price_bp"]; - $item_arr[$row["item_no"]]["memo"] = $row["memo"]; - } - mysqli_free_result($res); - - // get form_key - $sql = "select max(form_key) from assign where assign_opinion = '".$data["repair_no"]."'"; - $res = mysqli_query($link, $sql); - $row = mysqli_fetch_row($res); - $form_key = $row[0]; - mysqli_free_result($res); -?> - - - -
-
-
- - "> -
-
- - "> -
-
-
-
- "> -
-
- - "> -
-
- - "> -
-
- - "> -
-
-
- - "> -
-
- - "> -
-
- - "> -
-
- - "> -
-
-
-
- -
- -
-
- -
- - - - - - - - - - - - - $v) { - ?> - - - - - - - - - - - - - - - - - - - - -
項次名稱數量單價合計備註
- - - "> - - "> - - "> - - "> - - "> -
營業稅
- "> -
總價
- "> -
-
- -
- -
- - - - - - - - - - - - - - - -
簽核操作*
簽核狀態 - - 下位簽核者 - - - -
-
- - - - -
-
- -"; + echo "alert('請勿重覆簽核!!');"; + echo "window.close();"; + echo ""; + exit; + } +} + +$assign_status = ''; + +$data = []; +$db_query = "select * from pricereview_repair_main where id = '$id'"; +$data = mysqli_query($link, $db_query); + +foreach ($data as $data) : + // 公司站點 + $sql = "select content from code where field_name = 'masada_addr' and code_name = '" . $data["masada_addr"] . "'"; + $res = mysqli_query($link, $sql); + if ($row = mysqli_fetch_row($res)) { + $data["maddr"] = $row[0]; + } + mysqli_free_result($res); + + // 保養人員 + $repairer_arr = []; + $sql = "select name from account where accounttype = 'B' and accountid = '" . $data["repairerid"] . "'"; + $res = mysqli_query($link, $sql); + if ($row = mysqli_fetch_row($res)) { + $data["repair"] = $row[0]; + } + mysqli_free_result($res); + + // 價審明細 + $item_arr = []; + $sql = "select * from pricereview_repair_item where rid = '$id' order by item_no"; + $res = mysqli_query($link, $sql); + while ($row = mysqli_fetch_assoc($res)) { + $item_arr[$row["item_no"]]["title"] = $row["title"]; + $item_arr[$row["item_no"]]["item_unit_price"] = $row["item_unit_price"]; + $item_arr[$row["item_no"]]["item_qty"] = $row["item_qty"]; + $item_arr[$row["item_no"]]["item_price_bp"] = $row["item_price_bp"]; + $item_arr[$row["item_no"]]["memo"] = $row["memo"]; + } + mysqli_free_result($res); + + // get form_key + $sql = "select max(form_key) from assign where assign_opinion = '" . $data["repair_no"] . "'"; + $res = mysqli_query($link, $sql); + $row = mysqli_fetch_row($res); + $form_key = $row[0]; + mysqli_free_result($res); +?> + + + +
+
+
+ + "> +
+
+ + "> +
+
+
+
+ "> +
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+ + "> +
+
+
+
+ +
+ +
+
+ +
+ + + + + + + + + + + + + $v) { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
項次名稱數量單價合計備註
+ + + "> + + "> + + "> + + "> + + "> +
+
服務費
+
+ "> +
+
營業稅
+
+ "> +
+
總價
+
+ "> +
+
+ +
+ +
+ + + + + + + + + + + + + + + +
簽核操作*
簽核狀態 + + 下位簽核者 + + + +
+
+ + + + +
+
+ + \ No newline at end of file diff --git a/wms/mkt/pricereview_repair-create.php b/wms/mkt/pricereview_repair-create.php index 0393cafb..1edefc5e 100644 --- a/wms/mkt/pricereview_repair-create.php +++ b/wms/mkt/pricereview_repair-create.php @@ -1,518 +1,571 @@ - 管理人員。 原本是 'B' -$sql = "select accountid, name from account where accounttype = 'B' and accountid not in ('B000000001', 'M0008') order by accountid"; -$res = mysqli_query($link, $sql); -while ($row = mysqli_fetch_row($res)) { - $repairer_arr[$row[0]] = $row[1]; -} -mysqli_free_result($res); - -// 備品項目 -$item_arr = []; -$sql = "select * from supplies where ver = '20231103'"; -$res = mysqli_query($link, $sql); -while ($row = mysqli_fetch_assoc($res)) { - $item_arr[$row["id"]]["title"] = $row["title"]; - $item_arr[$row["id"]]["stype"] = $row["stype"]; - $item_arr[$row["id"]]["unit"] = $row["unit"]; - $item_arr[$row["id"]]["price"] = $row["price"]; - $item_arr[$row["id"]]["memo"] = $row["memo"]; -} -mysqli_free_result($res); -$item_str = ''; -$item_str .= ' - - - - - - - - '; -foreach ($item_arr as $k => $v) { - $item_str .= ""; - $item_str .= ""; - $item_str .= ""; - $item_str .= ""; - $item_str .= ""; - $item_str .= ""; - $item_str .= ""; - $item_str .= ""; -} -$item_str .= "
序號名稱類別單位售價備註
".$k."".$v["title"]."".$v["stype"]."".$v["unit"]."".number_format($v["price"])."".$v["memo"]."
"; - -/* -#獲取簽核意見 -$assign_opinions = Assign::get_records($form_key); -$assigner = $wf->getAssignerList(); -$assign_status = $wf->getAssignStatus($assigner); -*/ -$assign_status = '' -?> - - - - - - - - -
-Please fill up the required field!

"; - } else { - echo "

Record has added successfully

"; - } -} -*/ -?> -
" enctype="multipart/form-data"> -
- - -
-
-
- -
-
-
- - -
-
-
-
- -
-
- - -
-
- - -
-
- - - -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
- -
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
新增備品 *
名稱數量單價合計備註操作
- 點選 - - - - - - - - - - - - X -
營業稅
- -
總價
- -
-
- -
- -
- - - - - - - - - - - - - - - -
簽核操作*
簽核狀態 - - 下位簽核者 - - - -
-
- - - - - - - - -
-
- - 管理人員。 原本是 'B' +$sql = "select accountid, name from account where accounttype = 'B' and accountid not in ('B000000001', 'M0008') order by accountid"; +$res = mysqli_query($link, $sql); +while ($row = mysqli_fetch_row($res)) { + $repairer_arr[$row[0]] = $row[1]; +} +mysqli_free_result($res); + +// 備品項目 +$item_arr = []; +$sql = "SELECT * FROM supplies WHERE ver = '20231103'"; +$res = mysqli_query($link, $sql); +while ($row = mysqli_fetch_assoc($res)) { + $item_arr[$row["id"]]["title"] = $row["title"]; + $item_arr[$row["id"]]["stype"] = $row["stype"]; + $item_arr[$row["id"]]["unit"] = $row["unit"]; + $item_arr[$row["id"]]["price"] = $row["price"]; + $item_arr[$row["id"]]["memo"] = $row["memo"]; +} +mysqli_free_result($res); +$item_str = ''; +$item_str .= ' + + + + + + + + '; +foreach ($item_arr as $k => $v) { + $item_str .= ""; + $item_str .= ""; + $item_str .= ""; + $item_str .= ""; + $item_str .= ""; + $item_str .= ""; + $item_str .= ""; + $item_str .= ""; +} +$item_str .= "
序號名稱類別單位售價備註
" . $k . "" . $v["title"] . "" . $v["stype"] . "" . $v["unit"] . "" . number_format($v["price"]) . "" . $v["memo"] . "
"; + +/* +#獲取簽核意見 +$assign_opinions = Assign::get_records($form_key); +$assigner = $wf->getAssignerList(); +$assign_status = $wf->getAssignStatus($assigner); +*/ +$assign_status = '' +?> + + + + + + + + +
+ Please fill up the required field!

"; + } else { + echo "

Record has added successfully

"; + } +} +*/ + ?> +
" enctype="multipart/form-data"> +
+ + +
+
+
+ +
+
+
+ + +
+
+
+
+ +
+
+ + +
+
+ + +
+
+ + + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
新增備品 *
名稱數量單價合計備註操作
+ 點選 + + + + + + + + + + + + X +
+
服務費
+
+ +
+
營業稅
+
+ +
+
總價
+
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + +
簽核操作*
簽核狀態 + + 下位簽核者 + + + +
+
+ + + + + + + + +
+
+ + \ No newline at end of file diff --git a/wms/mkt/pricereview_repair-record-submit.php b/wms/mkt/pricereview_repair-record-submit.php index ced4dfe0..bde9cd59 100644 --- a/wms/mkt/pricereview_repair-record-submit.php +++ b/wms/mkt/pricereview_repair-record-submit.php @@ -1,78 +1,81 @@ - $v) { - $$k = htmlspecialchars(stripslashes(trim($v))); - } - - $sales_tax = str_replace(",", "", $sales_tax); - $total_price = str_replace(",", "", $total_price); - $item_memo_arr = explode("@@,", rtrim($item_memo_all, "@@")); - $create_at = date("Y-m-d H:i:s"); - - // 避免報價單編號重覆 - $repair_no_a = date("Ymd"); - $sql = "select max(repair_no) from pricereview_repair_main where SUBSTRING(repair_no, 1, 8) = '$repair_no_a'"; - $res = mysqli_query($link, $sql); - $row = mysqli_fetch_row($res); - if (empty($row[0])) $serial = "001"; - else $serial = str_pad(substr($row[0]+1, -3), 3, 0, STR_PAD_LEFT); - $new_repair_no = $repair_no_a.$serial; - if ($new_repair_no != $repair_no) $repair_no = $new_repair_no; - - // 價審單-主文 pricereview_repair_main - $db_query = "insert into pricereview_repair_main(repair_no, contractno, masada_addr, company, taxid, invoice, facilityno, "; - $db_query .= "address, sales_tax, total_price, sign_date, memo, repairerid, pstatus, checker, creater, create_at) values ("; - $db_query .= "'$repair_no', '$contractno', '$masada_addr', '$company', '$taxid', '$invoice', '$facilityno', "; - $db_query .= "'$address', $sales_tax, $total_price, '$sign_date', '$memo', '$repairerid', 'A', '$next_users', '$user_id', '$create_at')"; - $result = mysqli_query($link, $db_query); - $affected = mysqli_affected_rows($link); - if ($rid = mysqli_insert_id($link)) { - // 價審單-明細項目 pricereview_repair_item - $item_title_all = str_replace("點選", "", $item_title_all); - $item_title_arr = explode(",", $item_title_all); - $item_qty_arr = explode(",", $item_qty_all); - $item_unit_price_arr = explode(",", $item_unit_price_all); - $item_price_bp_arr = explode(",", $item_price_bp_all); - $item_memo_arr = explode("@@,", rtrim($item_memo_all, "@@")); - $item_no = 1; - for ($i=0; $iinitWorkFlow($user_id); - $form_key = $wf->flowContext->getFormKey(); - $sql = "insert into assign (form_key, seq, assigner, assign_opinion) values ('$form_key', 1, '$next_users', '$repair_no')"; - mysqli_query($link, $sql); - $sql = "update subflow set seq = seq+1, current_assigner = '$next_users', update_date = '$create_at' where form_key = '$form_key'"; - mysqli_query($link, $sql); - } - - mysqli_close($link); - if ($affected > 0) { - echo ""; - } else { - echo ""; - } -} -?> \ No newline at end of file +'; +// print_r($_POST); +// echo ''; +// exit(); +if ($_SERVER["REQUEST_METHOD"] == "POST") { + //print_r($_POST);exit; + foreach ($_POST as $k => $v) { + $$k = htmlspecialchars(stripslashes(trim($v))); + } + $sales_tax = str_replace(",", "", $sales_tax); + $service_charge = str_replace(",", "", $service_charge); + $total_price = str_replace(",", "", $total_price); + $item_memo_arr = explode("@@,", rtrim($item_memo_all, "@@")); + $create_at = date("Y-m-d H:i:s"); + + // 避免報價單編號重覆 + $repair_no_a = date("Ymd"); + $sql = "select max(repair_no) from pricereview_repair_main where SUBSTRING(repair_no, 1, 8) = '$repair_no_a'"; + $res = mysqli_query($link, $sql); + $row = mysqli_fetch_row($res); + if (empty($row[0])) $serial = "001"; + else $serial = str_pad(substr($row[0] + 1, -3), 3, 0, STR_PAD_LEFT); + $new_repair_no = $repair_no_a . $serial; + if ($new_repair_no != $repair_no) $repair_no = $new_repair_no; + + // 價審單-主文 pricereview_repair_main + $db_query = "INSERT INTO pricereview_repair_main(repair_no, contractno, masada_addr, company, taxid, invoice, facilityno, "; + $db_query .= "address, sales_tax, service_charge, total_price, sign_date, memo, repairerid, pstatus, checker, creater, create_at) values ("; + $db_query .= "'$repair_no', '$contractno', '$masada_addr', '$company', '$taxid', '$invoice', '$facilityno', "; + $db_query .= "'$address', $sales_tax ,$service_charge ,$total_price, '$sign_date', '$memo', '$repairerid', 'A', '$next_users', '$user_id', '$create_at')"; + $result = mysqli_query($link, $db_query); + $affected = mysqli_affected_rows($link); + if ($rid = mysqli_insert_id($link)) { + // 價審單-明細項目 pricereview_repair_item + $item_title_all = str_replace("點選", "", $item_title_all); + $item_title_arr = explode(",", $item_title_all); + $item_qty_arr = explode(",", $item_qty_all); + $item_unit_price_arr = explode(",", $item_unit_price_all); + $item_price_bp_arr = explode(",", $item_price_bp_all); + $item_memo_arr = explode("@@,", rtrim($item_memo_all, "@@")); + $item_no = 1; + for ($i = 0; $i < count($item_title_arr); $i++) { + $item_qty_arr[$i] = str_replace(",", "", $item_qty_arr[$i]); + $item_unit_price_arr[$i] = str_replace(",", "", $item_unit_price_arr[$i]); + $item_price_bp_arr[$i] = str_replace(",", "", $item_price_bp_arr[$i]); + $db_query = "insert into pricereview_repair_item (rid, item_no, title, item_unit_price, item_qty, item_price_bp, memo) values ("; + $db_query .= "'$rid', '$item_no', '$item_title_arr[$i]', '$item_unit_price_arr[$i]', '$item_qty_arr[$i]', '$item_price_bp_arr[$i]', '$item_memo_arr[$i]')"; + $result = mysqli_query($link, $db_query); + $item_no++; + } + + // 更新待簽表 + #係統ID + $system_id = 'prm'; + #流程ID + $flow_id = 'prm03'; + #表單號 $form_id; + $form_id = $rid; + $wf = new WorkFlow($system_id, $flow_id, $form_id); + $wf->initWorkFlow($user_id); + $form_key = $wf->flowContext->getFormKey(); + $sql = "insert into assign (form_key, seq, assigner, assign_opinion) values ('$form_key', 1, '$next_users', '$repair_no')"; + mysqli_query($link, $sql); + $sql = "update subflow set seq = seq+1, current_assigner = '$next_users', update_date = '$create_at' where form_key = '$form_key'"; + mysqli_query($link, $sql); + } + + mysqli_close($link); + if ($affected > 0) { + echo ""; + } else { + echo ""; + } +} diff --git a/wms/sign/list.php b/wms/sign/list.php index d8b732d8..f7c66f29 100644 --- a/wms/sign/list.php +++ b/wms/sign/list.php @@ -1,176 +1,177 @@ - $item['system_id'], 'system_name' => $item['system_name']); -}, $res_get); -$system_name_opt = (array_unique($system_name_opt, SORT_REGULAR)); - - -$flow_name_opt = array_map(function ($item) { - return array('flow_id' => $item['flow_id'], 'flow_name' => $item['flow_name']); -}, $res_get); -$flow_name_opt = (array_unique($flow_name_opt, SORT_REGULAR)); - -?> - -
- - - - - - - - - - - - - - - - - - - - - -
-

待簽查詢

-
系統名稱 - - 流程名稱
- -
-
- - - - - - - - - - - - - - $data) : - //嘗試將已結案隱藏起來 : 測試使用者體驗 - if ($data['flow_code'] !== 'Z') { - ?> - - - - - - - - - - - - -
序號系統名稱流程名稱接收日期當前簽核者狀態
">
-
-
- $item['system_id'], 'system_name' => $item['system_name']); +}, $res_get); +$system_name_opt = (array_unique($system_name_opt, SORT_REGULAR)); + + +$flow_name_opt = array_map(function ($item) { + return array('flow_id' => $item['flow_id'], 'flow_name' => $item['flow_name']); +}, $res_get); +$flow_name_opt = (array_unique($flow_name_opt, SORT_REGULAR)); + +?> + +
+ + + + + + + + + + + + + + + + + + + + + +
+

待簽查詢

+
系統名稱 + + 流程名稱
+ +
+
+ + + + + + + + + + + + + + $data) : + //嘗試將已結案隱藏起來 : 測試使用者體驗 + if ($data['flow_code'] !== 'Z') { + ?> + + + + + + + + + + + + +
序號系統名稱流程名稱接收日期當前簽核者狀態
">
+
+
+ \ No newline at end of file diff --git a/wms/sign/sign_form.php b/wms/sign/sign_form.php index 28e634da..571a2e74 100644 --- a/wms/sign/sign_form.php +++ b/wms/sign/sign_form.php @@ -1,602 +1,602 @@ -system_id, $flow->flow_id, 'form_id', $form_key); -#获取签核意见 -$assign_opinions = Assign::get_records($form_key); -#会签部门意见 -$subflow_assign_opinions = SubflowManager::getCounterSignComments($form_key); - -$flowName = $wf->getFlowName(); -$assigner = $wf->getAssignerList(); -$assign_status = $wf->getAssignStatus($assigner); -$if_show_assign = true; -//加载流程图 -$fc = WorkFLowItems::get_records($flow->getSystemID(), $flow->getFlowID()); - -#是否可会签 -$isSplitable = $wf->isSplitable(); -function base_url($url) -{ - return "https://www.masada.com.tw/fds/" . $url; -} - -?> - - - - - - - <?php echo $flowName; ?> - - - - - - - - - - - - - - - - - - - - - - - - - -
- 流程: - - - - -
- - -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

测试表单

-
- 表单流水号: - - 申请日期: - -
基本信息
申请单号 申请人 部门
请假开始日期 请假结束日期请假时数
- - - - - - - - - - - - - - - - - - - - -
- 表单附件 -
- -
- -
- - - - - - - - - - - - - - - - - - '; - } ?> - - - "; - } - ?> - - - - - - - -
签核操作
签核意见 - -
会签人员: - -
签核接收人员:'; - echo implode(" ", $subflowMembers); - echo "
签核状态 - - 下位签核者 - - -
- - - -
- -
- - -
- -
- -
- - - - ' . $wf->getNodeDescriptions($as['flow_code']) . ' -
'; - $tmp_code = $as['flow_code']; - ?> -
"> -
- - - - -   - " . $as['position_name'] . " "; ?> - - - - - - -   - 申请人 "; ?> - 退回"; ?> - 会签"; ?> - - - - 签核于: - - - -
-
-

-
- -
- -
- - - -
- -
-
- - -
- $as) { ?> -
- - 第' . $as['cs_seq'] . '次会签 -
'; - $cs_seq = $as['cs_seq']; - ?> -
"> -
- - - -   - " . $as['position_name'] . " "; ?> - - - - - - 不同意"; ?> - 同意"; ?> - 未回复"; ?> - - - - 签核于: - -
-
-

-
-
- -
- - - -
- - -
- - -
- -
- - - - - - -
-
-
- - -
- -
- - - - +system_id, $flow->flow_id, 'form_id', $form_key); +#获取签核意见 +$assign_opinions = Assign::get_records($form_key); +#会签部门意见 +$subflow_assign_opinions = SubflowManager::getCounterSignComments($form_key); + +$flowName = $wf->getFlowName(); +$assigner = $wf->getAssignerList(); +$assign_status = $wf->getAssignStatus($assigner); +$if_show_assign = true; +//加载流程图 +$fc = WorkFLowItems::get_records($flow->getSystemID(), $flow->getFlowID()); + +#是否可会签 +$isSplitable = $wf->isSplitable(); +function base_url($url) +{ + return "https://www.masada.com.tw/fds/" . $url; +} + +?> + + + + + + + <?php echo $flowName; ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 流程: + + + + +
+ + +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

測試表單

+
+ 表單流水號: + + 申请日期: + +
基本信息
申請單號 申請人 部門
請假開始日期 請假結束日期請假時數
+ + + + + + + + + + + + + + + + + + + + +
+ 表单附件 +
+ +
+ +
+ + + + + + + + + + + + + + + + + + '; + } ?> + + + "; + } + ?> + + + + + + + +
簽核操作
签核意见 + +
会签人员: + +
签核接收人员:'; + echo implode(" ", $subflowMembers); + echo "
簽核狀態 + + 下位簽核者 + + +
+ + + +
+ +
+ + +
+ +
+ +
+ + + + ' . $wf->getNodeDescriptions($as['flow_code']) . ' +
'; + $tmp_code = $as['flow_code']; + ?> +
"> +
+ + + + +   + " . $as['position_name'] . " "; ?> + + + + + + +   + 申请人 "; ?> + 退回"; ?> + 会签"; ?> + + + + 签核于: + + + +
+
+

+
+ +
+ +
+ + + +
+ +
+
+ + +
+ $as) { ?> +
+ + 第' . $as['cs_seq'] . '次会签 +
'; + $cs_seq = $as['cs_seq']; + ?> +
"> +
+ + + +   + " . $as['position_name'] . " "; ?> + + + + + + 不同意"; ?> + 同意"; ?> + 未回复"; ?> + + + + 签核于: + +
+
+

+
+
+ +
+ + + +
+ + +
+ + +
+ +
+ + + + + + +
+
+
+ + +
+ +
+ + + + \ No newline at end of file