You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1088 lines
59 KiB
1088 lines
59 KiB
<?php
|
|
|
|
// include "../header.php";
|
|
include_once('../header.php');
|
|
|
|
|
|
require_once('./conn.php');
|
|
//獲取option 加價所有資料
|
|
$sql_str = "SELECT * FROM option_price WHERE status='Y' ORDER BY kind ASC";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->execute();
|
|
$options = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
foreach ($options as $key => $option) {
|
|
$options[$key]['isShow'] = 1;
|
|
$options[$key]['selected'] = 0;
|
|
}
|
|
$vol_no = "";
|
|
$main = false;
|
|
if(isset($_GET['vol_no'])){
|
|
$vol_no = $_GET['vol_no'];
|
|
$sql_str = "SELECT * FROM pricereview_main WHERE contractno=:contractno ORDER BY id DESC LIMIT 1";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':contractno', $vol_no);
|
|
$stmt->execute();
|
|
$main = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
}
|
|
|
|
if(isset($_GET['id'])){
|
|
$id = $_GET['id'];
|
|
$sql_str = "SELECT * FROM pricereview_main WHERE id=:id ORDER BY id DESC LIMIT 1";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':id', $id);
|
|
$stmt->execute();
|
|
$main = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
$vol_no = $main['contractno'];
|
|
}
|
|
if($main && $main['status'] == 'YS'){
|
|
// echo "<script>alert('此單正在審核中!');window.history.go(-1);</script>";
|
|
// exit;
|
|
}
|
|
$hope_status = [
|
|
'A'=>'有望簽約(已報價)',
|
|
'B'=>'觀望考慮(等待時機報價)',
|
|
'C'=>'在途合約',
|
|
'D'=>'已簽約',
|
|
'N'=>'無望簽約',
|
|
];
|
|
//有望客戶基本資料
|
|
$sql_str = "SELECT hope_elevator_customer.*, code.content AS source_content, account.name AS salesman_name FROM hope_elevator_customer
|
|
LEFT JOIN code ON code.code_name = hope_elevator_customer.source
|
|
LEFT JOIN account ON account.accountid = hope_elevator_customer.salesman
|
|
WHERE hope_elevator_customer.vol_no = :vol_no AND code.field_name = 'customer_source'";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':vol_no', $vol_no);
|
|
$stmt->execute();
|
|
$hope_customer = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
|
|
if($user_id !== $hope_customer['salesman'] && $user_id !== "M0174"){
|
|
// echo "<script>alert('無權限編輯此紀錄!您不是該單營業員。');window.history.go(-1);</script>";
|
|
// exit;
|
|
}
|
|
if($hope_customer['vol_no']=="" ||
|
|
$hope_customer['customer']=="" ||
|
|
$hope_customer['manager']=="" ||
|
|
$hope_customer['uscc']=="" ||
|
|
$hope_customer['source']=="" ||
|
|
$hope_customer['linkman']=="" ||
|
|
$hope_customer['lm_tel']=="" ||
|
|
$hope_customer['salesman']=="" ||
|
|
$hope_customer['num']=="" ||
|
|
$hope_customer['pre_order_date']=="" ||
|
|
$hope_customer['status']=="" ||
|
|
$hope_customer['address']=="" ||
|
|
$hope_customer['case_name']==""
|
|
){
|
|
// echo "<script>alert('有望客戶資料不完整,請先填完整');window.history.go(-1);</script>";
|
|
// exit;
|
|
}
|
|
$hope_elevators = [];
|
|
$total_spec = 0;
|
|
$selectedOptions = [];
|
|
$optionKey = 0;
|
|
$otherOptions = [];
|
|
$otherOptionKey = 0;
|
|
$demolishOptions = [];
|
|
$demolishOptionKey = 0;
|
|
if($main){
|
|
$mid = $main["id"];
|
|
$sql_str = "SELECT
|
|
pricereview_item.*,
|
|
fp.price AS price,
|
|
fp.id AS facility_id,
|
|
pricereview_item.item_op AS open_converted
|
|
FROM
|
|
pricereview_item
|
|
LEFT JOIN
|
|
(
|
|
SELECT *,
|
|
ROW_NUMBER() OVER (PARTITION BY model ORDER BY create_dt DESC) as rn
|
|
FROM
|
|
facility_price
|
|
) fp
|
|
ON fp.model = pricereview_item.item_spec AND fp.rn = 1
|
|
WHERE
|
|
mid = :mid AND
|
|
item_group = 'A'
|
|
";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':mid', $mid);
|
|
$stmt->execute();
|
|
$elevators = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
foreach($elevators as $key=>$elevator){
|
|
$open = "";
|
|
if($elevator['item_op'] == "2U"){
|
|
$open = 4;
|
|
}elseif($elevator['item_op'] == "4PCO"){
|
|
$open = 5;
|
|
}elseif($elevator['item_op'] == "6PCO"){
|
|
$open = 7;
|
|
}elseif($elevator['item_op'] == "2S"){
|
|
$open = 8;
|
|
}elseif($elevator['item_op'] == "CO"){
|
|
$open = 9;
|
|
}
|
|
$hope_elevators[] = [
|
|
'id' => $elevator['item_no'],
|
|
'model' => $elevator['item_spec'],
|
|
'specifications' => explode(",", $elevator['note'])[0],
|
|
'person' => explode(",", $elevator['note'])[1],
|
|
'stop' => explode(",", $elevator['note'])[2],
|
|
'speed' => explode(",", $elevator['note'])[3],
|
|
'open_converted' => $elevator['item_op'],
|
|
'open' => $open,
|
|
'spec_price' => $elevator['item_price_ct'],
|
|
'price' => $elevator['price'],
|
|
'spec_num' => $elevator['item_qty'],
|
|
'facility_id' => $elevator['facility_id'],
|
|
'weight'=> $elevator['item_weight'],
|
|
];
|
|
if($elevator['item_no'] > $total_spec){
|
|
$total_spec = $elevator['item_no'];
|
|
}
|
|
}
|
|
|
|
$sql_str = "SELECT pricereview_item.price_id, pricereview_item.item_qty, pricereview_item.option_relate_spec, pricereview_item.item_no, option_price.* FROM pricereview_item
|
|
LEFT JOIN option_price ON option_price.id = pricereview_item.price_id
|
|
WHERE mid = :mid AND item_group = 'B'";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':mid', $mid);
|
|
$stmt->execute();
|
|
$oldOptions = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
foreach($oldOptions as $oldoption){
|
|
$selectedOptions[] = [
|
|
'id'=>$oldoption['price_id'],
|
|
'idx'=>0,
|
|
'key'=>$oldoption['item_no'],
|
|
'qty'=>$oldoption['item_qty'],
|
|
'name'=>$oldoption['group_name'],
|
|
'price'=>$oldoption['price'],
|
|
'memo'=>$oldoption['memo'],
|
|
'toElevator'=>[
|
|
[
|
|
'id'=>$oldoption['option_relate_spec'],
|
|
'model'=> array_values(array_filter($hope_elevators, fn($val)=> $val['id'] == $oldoption['option_relate_spec']))[0]['model'],
|
|
]
|
|
]
|
|
];
|
|
|
|
if($oldoption['item_no'] > $optionKey){
|
|
$optionKey = $oldoption['item_no'];
|
|
}
|
|
}
|
|
|
|
//除外項目
|
|
$sql_str = "SELECT * FROM pricereview_item WHERE mid = :mid AND item_group='E'";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':mid', $mid);
|
|
$stmt->execute();
|
|
$oldOtherOptions = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
foreach($oldOtherOptions as $oldotheroption){
|
|
$otherOptions[] = [
|
|
'id'=>$oldotheroption['item_no'],
|
|
'name'=>$oldotheroption['item_spec'],
|
|
'num'=>$oldotheroption['item_qty'],
|
|
'price'=>$oldotheroption['item_unit_price'],
|
|
'pr_no'=>$oldotheroption['note'],
|
|
'toElevator'=>[
|
|
[
|
|
'id'=>$oldotheroption['option_relate_spec'],
|
|
'model'=> array_values(array_filter($hope_elevators, fn($val)=> $val['id'] == $oldotheroption['option_relate_spec']))[0]['model'],
|
|
]
|
|
]
|
|
];
|
|
if($oldotheroption['item_no'] > $otherOptionKey){
|
|
$otherOptionKey = $oldotheroption['item_no'];
|
|
}
|
|
}
|
|
|
|
$sql_str = "SELECT * FROM pricereview_item WHERE mid = :mid AND item_group='C'";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':mid', $mid);
|
|
$stmt->execute();
|
|
$oldDemolishOptions = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
foreach($oldDemolishOptions as $olddemolishoption){
|
|
$demolishOptions[] = [
|
|
'id'=>$olddemolishoption['item_no'],
|
|
'price'=>$olddemolishoption['item_unit_price'],
|
|
'qty'=>$olddemolishoption['item_qty'],
|
|
'floor'=>$olddemolishoption['note'],
|
|
'person'=>$olddemolishoption['item_spec'],
|
|
'demolish_id'=>$olddemolishoption['price_id'],
|
|
'toElevator'=>[
|
|
[
|
|
'id'=>$olddemolishoption['option_relate_spec'],
|
|
'model'=> array_values(array_filter($hope_elevators, fn($val)=> $val['id'] == $olddemolishoption['option_relate_spec']))[0]['model'],
|
|
]
|
|
]
|
|
];
|
|
if($demolishOptionKey < $olddemolishoption['item_no']){
|
|
$demolishOptionKey = $olddemolishoption['item_no'];
|
|
}
|
|
}
|
|
|
|
$sql_str = "SELECT * FROM pricereview_pay WHERE mid = :mid ORDER BY pay_kind ASC";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':mid', $mid);
|
|
$stmt->execute();
|
|
$pays = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
$paymentRatio = [];
|
|
if($pays){
|
|
foreach($pays as $pay){
|
|
$paymentRatio[] = [
|
|
'scale'=>$pay['pay_scale'],
|
|
'ticket'=>$pay['pay_period'],
|
|
];
|
|
}
|
|
}else{
|
|
$paymentRatio = [
|
|
[
|
|
'scale'=>20,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>0,
|
|
'ticket'=>'',
|
|
],
|
|
[
|
|
'scale'=>50,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>0,
|
|
'ticket'=>'',
|
|
],
|
|
[
|
|
'scale'=>20,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>10,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>0,
|
|
'ticket'=>'',
|
|
],
|
|
];
|
|
}
|
|
|
|
}else{
|
|
//獲取有望客戶電梯規格
|
|
$sql_str = "SELECT
|
|
hope_project_elevator_spec.specifications,
|
|
hope_project_elevator_spec.person,
|
|
hope_project_elevator_spec.stop,
|
|
hope_project_elevator_spec.speed,
|
|
hope_project_elevator_spec.open,
|
|
hope_project_elevator_spec.spec_price,
|
|
hope_project_elevator_spec.spec_num,
|
|
fp.price AS price,
|
|
fp.id AS facility_id,
|
|
CASE hope_project_elevator_spec.open
|
|
WHEN 4 THEN '2U'
|
|
WHEN 5 THEN '4PCO'
|
|
WHEN 7 THEN '6PCO'
|
|
WHEN 8 THEN '2S'
|
|
WHEN 9 THEN 'CO'
|
|
ELSE hope_project_elevator_spec.open
|
|
END AS open_converted
|
|
FROM hope_project_elevator_spec
|
|
LEFT JOIN (
|
|
SELECT *,
|
|
ROW_NUMBER() OVER (PARTITION BY model ORDER BY create_dt DESC) as rn
|
|
FROM facility_price
|
|
) fp ON fp.model = CONCAT(hope_project_elevator_spec.specifications, '-', hope_project_elevator_spec.person, '*', hope_project_elevator_spec.stop, '-', CASE hope_project_elevator_spec.open
|
|
WHEN 4 THEN '2U'
|
|
WHEN 5 THEN '4PCO'
|
|
WHEN 7 THEN '6PCO'
|
|
WHEN 8 THEN '2S'
|
|
WHEN 9 THEN 'CO'
|
|
ELSE hope_project_elevator_spec.open
|
|
END, hope_project_elevator_spec.speed)
|
|
AND fp.rn = 1
|
|
WHERE hope_project_elevator_spec.vol_no = :vol_no
|
|
ORDER BY hope_project_elevator_spec.seq ASC;";
|
|
$stmt = $conn->prepare($sql_str);
|
|
$stmt->bindParam(':vol_no', $vol_no);
|
|
$stmt->execute();
|
|
$hope_elevators = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|
|
|
foreach ($hope_elevators as $key => $elevator) {
|
|
$hope_elevators[$key]['id'] = $key+1;
|
|
$hope_elevators[$key]['weight'] = '';
|
|
$spec = $elevator['specifications'];
|
|
if($spec == 'M1' || $spec == 'M1+M4(1:1)' || $spec == 'M1+M4(2:1)'){
|
|
//稍後再處理
|
|
}else{
|
|
$hope_elevators[$key]['model'] = $elevator['specifications'] . "-" . $elevator['person'] . "*" . $elevator['stop'] . "-" . $elevator['open_converted'] . $elevator['speed'];
|
|
}
|
|
$total_spec ++;
|
|
}
|
|
|
|
$paymentRatio = [
|
|
[
|
|
'scale'=>20,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>0,
|
|
'ticket'=>'',
|
|
],
|
|
[
|
|
'scale'=>50,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>0,
|
|
'ticket'=>'',
|
|
],
|
|
[
|
|
'scale'=>20,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>10,
|
|
'ticket'=>30,
|
|
],
|
|
[
|
|
'scale'=>0,
|
|
'ticket'=>'',
|
|
],
|
|
];
|
|
}
|
|
function convertDateTimeFormat($dateTimeStr) {
|
|
// 使用 DateTime::createFromFormat 解析给定格式的日期时间
|
|
$date = DateTime::createFromFormat('Y-m-d H:i:s', $dateTimeStr);
|
|
|
|
// 如果解析成功,则使用 DateTime::format 转换格式
|
|
if ($date) {
|
|
return $date->format('Y-m-d');
|
|
} else {
|
|
// 如果解析失败,返回原始字符串或错误信息
|
|
return $dateTimeStr; // 或者返回错误信息
|
|
}
|
|
}
|
|
?>
|
|
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css"> -->
|
|
<link rel="stylesheet" href="./css/pricereview.css">
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.5.0/axios.min.js" integrity="sha512-aoTNnqZcT8B4AmeCFmiSnDlc4Nj/KPaZyB5G7JnOnUEkdNpCZs1LCankiYi01sLTyWy+m2P+W4XM+BuQ3Q4/Dg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
<script defer src="./assets/js/alpinejs/cdn.min.js"></script>
|
|
<script src="./assets/js/pricereviewAlpine.js"></script>
|
|
|
|
<div id="pricereviewCreate" x-data=pricereviewCreate()>
|
|
<?php
|
|
//載入modal視窗
|
|
include_once('./window-modal/optionModal.php');
|
|
include_once('./window-modal/demolishOptionModal.php');
|
|
include_once('./window-modal/demolishToElevatorModal.php');
|
|
include_once('./window-modal/elevatorModal.php');
|
|
include_once('./window-modal/maintainOptionModal.php');
|
|
include_once('./window-modal/maintainToElevatorModal.php');
|
|
include_once('./window-modal/optionModal.php');
|
|
include_once('./window-modal/optionToElevatorModal.php');
|
|
include_once('./window-modal/otherOptionModal.php');
|
|
include_once('./window-modal/otherToElevatorModal.php');
|
|
?>
|
|
<div class="container">
|
|
<table class="table" border="1">
|
|
<thead >
|
|
<tr class="" >
|
|
<th scope="col" class="text-center " colspan="8">有望客戶基本資料</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<th >卷號</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['vol_no'] ?>" /></td>
|
|
<th>客戶名稱</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['customer'] ?>" /></td>
|
|
<th>負責人</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['manager'] ?>" /></td>
|
|
<th>客戶來源</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['source_content'] ?>" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>地址</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['address'] ?>" /></td>
|
|
<th>案件名稱</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['case_name'] ?>" /></td>
|
|
<th>統編/身份證</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['uscc'] ?>" /></td>
|
|
<th>業主方聯係人</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['linkman'] ?>" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>市話/手機</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['lm_tel'] ?>" /></td>
|
|
<th>營業員</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['salesman_name'] ?>" /></td>
|
|
<th>台數</th>
|
|
<td><input class="form-control" type="number" disabled value="<?php echo $hope_customer['num'] ?>" /></td>
|
|
<th>預定成交日</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['pre_order_date'] ?>" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>有望客戶狀態</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_status[$hope_customer['status']] ?>" /></td>
|
|
<th>汰改</th>
|
|
<td><input class="form-control" type="text" disabled value="<?php echo $hope_customer['is_renovation']=='Y' ? '是' :'否' ?>" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<table class="table" border="1">
|
|
<thead >
|
|
<tr class="" >
|
|
<th scope="col" class="text-center " colspan="8">洽商進度</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan=8>
|
|
<textarea class="form-control" name="progress" id="progress" cols="20" rows="5" disabled ><?php echo $hope_customer['progress_status']; ?></textarea>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="pricreviewmain container">
|
|
<div class="divitem">
|
|
<div class="title">
|
|
<h4>整機單價</h4>
|
|
<button class="addbtn btn" x-ref="addElevatorBtn" @click="openCreateElevatorModal()" >+</button>
|
|
</div>
|
|
<table class="table" border=1>
|
|
<thead>
|
|
<tr>
|
|
<th>項次</th>
|
|
<th>電梯</th>
|
|
<th>人乘</th>
|
|
<th>載重(KG)</th>
|
|
<th>停數</th>
|
|
<th>速度(m/min)</th>
|
|
<th>開門方式</th>
|
|
<th>規格</th>
|
|
<th>公司發布價(台)</th>
|
|
<th>數量</th>
|
|
<th>公司發布價(總價)</th>
|
|
<th>售價(台)</th>
|
|
<th>售價(總價) </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<template x-for="(elevator, idx) in elevators" :key="elevator.id" >
|
|
<tr>
|
|
<td x-text="elevator.id"></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="elevator.specifications" @change="getElevatorPrice(idx)">
|
|
<option value="">請選擇</option>
|
|
<option value="MAE100">MAE100有機房</option>
|
|
<option value="MAM200">MAM200無機房</option>
|
|
<option value="MAH100">MAH100小電梯</option>
|
|
<option value="MAF100">MAE100貨梯(有機房)</option>
|
|
<option value="MAQ100">MAQ100強趨梯</option>
|
|
<option value="MAP100">MAP100平台梯</option>
|
|
<?php if($hope_customer['is_renovation']): ?>
|
|
<option value="M1">M1(系統更新)</option>
|
|
<option value="M1+M4(1:1)">M1+M4(1:1)系統+主機</option>
|
|
<option value="M1+M4(2:1)">M1+M4(2:1)系統+主機</option>
|
|
<?php endif; ?>
|
|
</select>
|
|
<span x-show="!elevator.specifications" class="errortext" x-cloak data-type="errortext">請選擇規格</span>
|
|
</td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="elevator.person" @change="getElevatorPrice(idx)">
|
|
<option value="">請選擇</option>
|
|
<option value="6">6</option>
|
|
<option value="8">8</option>
|
|
<option value="9">9</option>
|
|
<option value="10">10</option>
|
|
<option value="11">11</option>
|
|
<option value="12">12</option>
|
|
<option value="13">13</option>
|
|
<option value="15">15</option>
|
|
<option value="17">17</option>
|
|
<option value="20">20</option>
|
|
<option value="24">24</option>
|
|
</select>
|
|
<span x-show="!elevator.person" min="1" class="errortext" x-cloak data-type="errortext">請填入人乘</span>
|
|
</td>
|
|
<td>
|
|
<input class="form-control" type="number" style="width:50px;padding-left:5px" x-model="elevator.weight" @keyup="getElevatorPrice(idx)" @change="getElevatorPrice(idx)" />
|
|
<span x-show="!elevator.weight || elevator.weight < 1" min="1" class="errortext" x-cloak data-type="errortext">載重需大於0</span>
|
|
</td>
|
|
<td>
|
|
<input class="form-control" type="number" style="width:50px;padding-left:5px" x-model="elevator.stop" @keyup="getElevatorPrice(idx)" @change="getElevatorPrice(idx)" />
|
|
<span x-show="!elevator.stop || !Number.isInteger(Number(elevator.stop)) " min="1" class="errortext" x-cloak data-type="errortext">請輸入正整數</span>
|
|
</td>
|
|
<td>
|
|
<select name="" id="" class="form-control" style="width:63px" x-model="elevator.speed" @change="getElevatorPrice(idx)">
|
|
<option value="">請選擇</option>
|
|
<option value="9">9</option>
|
|
<option value="24">24</option>
|
|
<option value="30">30</option>
|
|
<option value="45">45</option>
|
|
<option value="60">60</option>
|
|
<option value="90">90</option>
|
|
<option value="105">105</option>
|
|
<option value="120">120</option>
|
|
<option value="150">150</option>
|
|
</select>
|
|
<span x-show="!elevator.speed" min="1" class="errortext" x-cloak data-type="errortext">請選擇速度</span>
|
|
</td>
|
|
<td>
|
|
<select name="" id="" class="form-control" style="width:63px" x-model="elevator.open_converted" @change="getElevatorPrice(idx)">
|
|
<option value="CO">CO</option>
|
|
<option value="2S">2S</option>
|
|
<option value="2U">CO</option>
|
|
<option value="4PCO">4PCO</option>
|
|
<option value="6PCO">6PCO</option>
|
|
</select>
|
|
<span x-show="!elevator.open_converted" min="1" class="errortext" x-cloak data-type="errortext">請選擇開門方式</span>
|
|
</td>
|
|
<td>
|
|
<input type="text" x-show="elevator.specifications==''||elevator.person==''||elevator.stop==''||elevator.speed==''||elevator.open_converted==''" disabled class="form-control" />
|
|
<input type="text" style="width:150px" x-show="elevator.specifications!='' && elevator.person!='' && elevator.stop!='' && elevator.speed!='' && elevator.open_converted!=''" class="form-control" disabled x-model="elevator.model">
|
|
</td>
|
|
<td>
|
|
<input type="text" class="form-control" disabled :value="Number(elevator.price).toLocaleString()">
|
|
<span x-show="!elevator.price" class="errortext" x-cloak data-type="errortext">請填寫正確規格</span>
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control " value="1" style="width:40px;padding-left:5px" x-model="elevator.spec_num">
|
|
<span x-show="!elevator || elevator.spec_num < 0 || !Number.isInteger(Number(elevator.spec_num))" class="errortext" x-cloak data-type="errortext">請輸入正整數</span>
|
|
</td>
|
|
<td>
|
|
<input type="text" class="form-control " disabled x-model="(elevator.price * elevator.spec_num).toLocaleString()">
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control " x-model="(elevator.spec_price)">
|
|
<span x-show="!elevator.spec_price || elevator.spec_price < 1" class="errortext" x-cloak data-type="errortext">售價需大於0</span>
|
|
</td>
|
|
<td class="saletd">
|
|
<input type="text" class="form-control " disabled x-model="(elevator.spec_price * elevator.spec_num).toLocaleString()">
|
|
<button class="copyBtn btn btn-secondary" @click="copyElevator(idx)">+</button>
|
|
<button class="deleteBtn btn btn-danger" @click="removeElevator(elevator.id)">X</button>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
<template x-if="elevators.length > 0">
|
|
<tr>
|
|
<td colspan=9>小計</td>
|
|
<td><input type="text" class="form-control" disabled :value="totalElevatorsNum()" style="width:40px;padding-left:5px"></td>
|
|
<td><input type="text" class="form-control" disabled :value="totalElevatorsPrice().toLocaleString()" ></td>
|
|
<td></td>
|
|
<td><input type="text" class="form-control" disabled :value="totalElevatorsSalePrice().toLocaleString()" ></td>
|
|
</tr>
|
|
</template>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="divitem">
|
|
<div class="title">
|
|
<h4>Option加價</h4>
|
|
<button class="addbtn btn" x-ref="addElevatorBtn" @click="initModalSelectedOptions()">+</button>
|
|
</div>
|
|
<table class="table" border=1>
|
|
<thead x-show="selectedOptions.length > 0">
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>選配規格</th>
|
|
<th style="width:150px;">單價</th>
|
|
<th style="width:80px;">數量</th>
|
|
<th>複價</th>
|
|
<th>備註</th>
|
|
<th>所屬電梯</th>
|
|
<th>功能</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<template x-for="(option, key) in selectedOptions" :key="option.key">
|
|
<tr x-show="option != null">
|
|
<td x-text="option.id"></td>
|
|
<td x-text="option.name"></td>
|
|
<td><input type="text" class="form-control" :value="option.price.toLocaleString()" disabled></td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="option.qty" style="width:80px">
|
|
<span x-show="!option.qty|| option.qty <= 0 || !Number.isInteger(Number(option.qty))" class="errortext" x-cloak data-type="errortext">請輸入正整數</span>
|
|
</td>
|
|
<td><input type="text" class="form-control" disabled :value="Number(option.qty * option.price).toLocaleString()"></td>
|
|
<td><textarea class="form-control" x-text="option.memo" cols="30" rows="auto" disabled></textarea></td>
|
|
<td>
|
|
<template x-for="el in option.toElevator">
|
|
<p x-html="'<b>' + el.id + '</b>、' + el.model"></p>
|
|
</template>
|
|
<span x-show="option.toElevator.length <=0" class="errortext" x-cloak data-type="errortext">尚未選擇電梯</span>
|
|
</td>
|
|
<td>
|
|
<div class="d-flex">
|
|
<button class="copyBtn btn btn-secondary" @click="copyOption(option.key)">+</button>
|
|
<button class="selectElevator btn btn-danger" @click="addOptionToElevator(option.key)">電梯</button>
|
|
<button class="deleteBtn btn btn-danger" @click="removeOption(option.key)">X</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
<tr x-show="selectedOptions.length > 0">
|
|
<td colspan=4>小計</td>
|
|
<td colspan=1 ><input type="text" class="form-control" disabled :value="totalOptionsPrice().toLocaleString()" ></td>
|
|
<td colspan=4 ></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="divitem">
|
|
<div class="title">
|
|
<h4>除外項目</h4>
|
|
<button class="addbtn btn" @click="openCreateOtherOptionFn()" >+</button>
|
|
</div>
|
|
<table class="table" border=1>
|
|
<thead x-show="otherOptions.length > 0">
|
|
<tr>
|
|
<td>詢價單號</td>
|
|
<td>名稱</td>
|
|
<td>單價</td>
|
|
<td>數量</td>
|
|
<td>複價</td>
|
|
<td>所屬電梯</td>
|
|
<td>功能</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<template x-for="option in otherOptions">
|
|
<tr>
|
|
<td><input type="text" class="form-control" x-model="option.pr_no"></td>
|
|
<td>
|
|
<input type="text" class="form-control" x-model="option.name">
|
|
<span x-show="option.name==''" class="errortext" x-cloak data-type="errortext">請輸入除外項目名稱</span>
|
|
</td>
|
|
<td><input type="text" class="form-control" x-model="option.price"></td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="option.num">
|
|
<span x-show="!option.num || option.num <= 0 || !Number.isInteger(Number(option.num))" class="errortext" x-cloak data-type="errortext">請輸入正整數</span>
|
|
</td>
|
|
<td><input type="text" class="form-control" x-model="(option.price * option.num).toLocaleString()" disabled></td>
|
|
<td>
|
|
<template x-for="el in option.toElevator">
|
|
<p x-html="'<b>' + el.id + '</b>、' + el.model"></p>
|
|
</template>
|
|
<span x-show="option.toElevator.length <=0" class="errortext" x-cloak data-type="errortext">尚未選擇電梯</span>
|
|
</td>
|
|
<td>
|
|
<div class="d-flex">
|
|
<button class="copyBtn btn btn-secondary" @click="copyOtherOption(option.id)">+</button>
|
|
<button class="selectElevator btn btn-danger" @click="addOtherOptionToElevator(option.id)">電梯</button>
|
|
<button class="deleteBtn btn btn-danger" @click="removeOtherOption(option.id)">X</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
<tr x-show="otherOptions.length > 0">
|
|
<td colspan=3>小計</td>
|
|
<td colspan=1 ><input type="number" class="form-control" disabled :value="totalOtherOptionsNum().toLocaleString()" ></td>
|
|
<td colspan=1 ><input type="text" class="form-control" disabled :value="totalOtherOptionsPrice().toLocaleString()" ></td>
|
|
<td colspan=3 ></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="divitem" x-show="false">
|
|
<div class="title">
|
|
<h4>保固延長</h4>
|
|
<button class="addbtn btn" @click="openCreateMaintainModal()">+</button>
|
|
</div>
|
|
<table class="table" border=1>
|
|
<thead x-show="maintainOptions.length > 0">
|
|
<tr>
|
|
<td>單價</td>
|
|
<td>數量(月)</td>
|
|
<td>複價</td>
|
|
<td>備註</td>
|
|
<td>所屬電梯</td>
|
|
<td>功能</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<template x-for="option in maintainOptions">
|
|
<tr>
|
|
<td><input type="number" class="form-control" x-model="option.price"></td>
|
|
<td>
|
|
<input type="number" class="form-control " x-model="option.num" >
|
|
<span x-show="!option.num || option.num <= 0 || !Number.isInteger(Number(option.num))" class="errortext" x-cloak data-type="errortext">請輸入正整數</span>
|
|
</td>
|
|
<td><input type="text" class="form-control " x-model="(option.price * option.num).toLocaleString()" disabled ></td>
|
|
<td><input type="text" class="form-control" x-model="option.memo"></td>
|
|
<td>
|
|
<template x-for="el in option.toElevator">
|
|
<p x-html="'<b>' + el.id + '</b>、' + el.model"></p>
|
|
</template>
|
|
<span x-show="option.toElevator.length <=0" class="errortext" x-cloak data-type="errortext">尚未選擇電梯</span>
|
|
</td>
|
|
<td>
|
|
<div class="d-flex">
|
|
<button class="selectElevator btn btn-danger" @click="addMaintainOptionToElevator(option.id)">電梯</button>
|
|
<button class="deleteBtn btn btn-danger" @click="removeMaintainOption(option.id)">X</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
<tr x-show="maintainOptions.length > 0">
|
|
<td colspan=1>小計</td>
|
|
<td colspan=1 ><input type="text" class="form-control" disabled x-model="totalMaintainOptionsNum()" ></td>
|
|
<td colspan=1 ><input type="text" class="form-control" disabled x-model="totalMaintainOptionsPrice()" ></td>
|
|
<td colspan=3 ></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<template x-if="is_renovation == 'Y'">
|
|
<div class="divitem">
|
|
<div class="title">
|
|
<h4>拆梯價格</h4>
|
|
<button class="addbtn btn" @click="openCreateDemolishOptionModal()">+</button>
|
|
</div>
|
|
<table class="table" border=1>
|
|
<thead x-show="demolishOptions.length > 0">
|
|
<tr>
|
|
<td>人乘/載重</td>
|
|
<td>樓層</td>
|
|
<td>單價</td>
|
|
<td>數量</td>
|
|
<td>複價</td>
|
|
<td>所屬電梯</td>
|
|
<td>功能</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<template x-for="(option, idx) in demolishOptions" :key="option.id">
|
|
<tr>
|
|
<td>
|
|
<select class="form-control" x-model="option.person" @change="getDemolishPrice(idx)">
|
|
<option value="">請選擇</option>
|
|
<option value="15人(含)以下">15人(含)以下/1000KGS</option>
|
|
<option value="16~24人">16~24人/1001~1600KGS</option>
|
|
<option value="25~30人">25~30人/1601~2500KGS</option>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<select class="form-control" x-model="option.floor" @change="getDemolishPrice(idx)">
|
|
<option value="">請選擇</option>
|
|
<?php for($i=4;$i<=40;$i++): ?>
|
|
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
|
|
<?php endfor; ?>
|
|
</select>
|
|
</td>
|
|
<td><input type="text" disabled class="form-control" x-model="Number(option.price).toLocaleString()"></td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="option.qty">
|
|
<span x-show="!option.qty || option.qty <= 0 || !Number.isInteger(Number(option.qty))" class="errortext" x-cloak data-type="errortext">請輸入正整數</span>
|
|
</td>
|
|
<td><input type="text" disabled class="form-control" x-model="(option.price * option.qty).toLocaleString()"></td>
|
|
<td>
|
|
<template x-for="el in option.toElevator">
|
|
<p x-html="'<b>' + el.id + '</b>、' + el.model"></p>
|
|
</template>
|
|
<span x-show="option.toElevator.length <=0" class="errortext" x-cloak data-type="errortext">尚未選擇電梯</span>
|
|
</td>
|
|
<td>
|
|
<div class="d-flex">
|
|
<button class="selectElevator btn btn-danger" @click="addDemolishOptionToElevator(option.id)">電梯</button>
|
|
<button class="deleteBtn btn btn-danger" @click="removeDemolishOption(option.id)">X</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
<tr x-show="demolishOptions.length > 0">
|
|
<td colspan=3>小計</td>
|
|
<td colspan=1 ><input type="text" class="form-control" disabled x-model="totalDemolishOptionsNum()" ></td>
|
|
<td colspan=1 ><input type="text" class="form-control" disabled x-model="Number(totalDemolishOptionsPrice()).toLocaleString()" ></td>
|
|
<td colspan=2 ></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</template>
|
|
<div class="divitem">
|
|
<table style="width:800px" class="table" border=1>
|
|
<thead>
|
|
<tr>
|
|
<td>付款辦法</td>
|
|
<td>款別</td>
|
|
<td >比例(%)</td>
|
|
<td>金額</td>
|
|
<td>票期</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td rowspan="4">材料</td>
|
|
<td >1.訂金</td>
|
|
<td ><input type="number" class="form-control" x-model="paymentRatio[0].scale"></td>
|
|
<td><input type="text" class="form-control" x-model="scalePrice(paymentRatio[0].scale).toLocaleString()" disabled></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="paymentRatio[0].ticket">
|
|
<option value="">請選擇</option>
|
|
<option value="7">7天</option>
|
|
<option value="30" selected>30天</option>
|
|
<option value="60">60天</option>
|
|
<option value="90">90天</option>
|
|
<option value="120">120天</option>
|
|
<option value="180">180天</option>
|
|
<option value="">其他</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td >2.二次款</td>
|
|
<td ><input type="number" class="form-control" x-model="paymentRatio[1].scale"></td>
|
|
<td><input type="text" class="form-control" x-model="scalePrice(paymentRatio[1].scale).toLocaleString()" disabled></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="paymentRatio[1].ticket">
|
|
<option value="">請選擇</option>
|
|
<option value="7">7天</option>
|
|
<option value="30" selected>30天</option>
|
|
<option value="60">60天</option>
|
|
<option value="90">90天</option>
|
|
<option value="120">120天</option>
|
|
<option value="180">180天</option>
|
|
<option value="1000">其他</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td >3.貨到工地款</td>
|
|
<td ><input type="number" class="form-control" x-model="paymentRatio[2].scale"></td>
|
|
<td><input type="text" class="form-control" x-model="scalePrice(paymentRatio[2].scale).toLocaleString()" disabled></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="paymentRatio[2].ticket">
|
|
<option value="">請選擇</option>
|
|
<option value="7">7天</option>
|
|
<option value="30" selected>30天</option>
|
|
<option value="60">60天</option>
|
|
<option value="90">90天</option>
|
|
<option value="120">120天</option>
|
|
<option value="180">180天</option>
|
|
<option value="1000">其他</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td >4.其他</td>
|
|
<td ><input type="number" class="form-control" x-model="paymentRatio[3].scale"></td>
|
|
<td><input type="text" class="form-control" x-model="scalePrice(paymentRatio[3].scale).toLocaleString()" disabled></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="paymentRatio[3].ticket">
|
|
<option value="">請選擇</option>
|
|
<option value="7">7天</option>
|
|
<option value="30" selected>30天</option>
|
|
<option value="60">60天</option>
|
|
<option value="90">90天</option>
|
|
<option value="120">120天</option>
|
|
<option value="180">180天</option>
|
|
<option value="1000">其他</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td rowspan="3">安裝</td>
|
|
<td >5.安裝完畢款</td>
|
|
<td ><input type="number" class="form-control" x-model="paymentRatio[4].scale"></td>
|
|
<td><input type="text" class="form-control" x-model="scalePrice(paymentRatio[4].scale).toLocaleString()" disabled></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="paymentRatio[4].ticket">
|
|
<option value="">請選擇</option>
|
|
<option value="7">7天</option>
|
|
<option value="30" selected>30天</option>
|
|
<option value="60">60天</option>
|
|
<option value="90">90天</option>
|
|
<option value="120">120天</option>
|
|
<option value="180">180天</option>
|
|
<option value="1000">其他</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td >6.驗收款</td>
|
|
<td ><input type="number" class="form-control" x-model="paymentRatio[5].scale"></td>
|
|
<td><input type="text" class="form-control" x-model="scalePrice(paymentRatio[5].scale).toLocaleString()" disabled></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="paymentRatio[5].ticket">
|
|
<option value="">請選擇</option>
|
|
<option value="7">7天</option>
|
|
<option value="30" selected>30天</option>
|
|
<option value="60">60天</option>
|
|
<option value="90">90天</option>
|
|
<option value="120">120天</option>
|
|
<option value="180">180天</option>
|
|
<option value="1000">其他</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td >7.其他</td>
|
|
<td ><input type="number" class="form-control" x-model="paymentRatio[6].scale"></td>
|
|
<td><input type="text" class="form-control" x-model="scalePrice(paymentRatio[6].scale).toLocaleString()" disabled></td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="paymentRatio[6].ticket">
|
|
<option value="">請選擇</option>
|
|
<option value="7">7天</option>
|
|
<option value="30" selected>30天</option>
|
|
<option value="60">60天</option>
|
|
<option value="90">90天</option>
|
|
<option value="120">120天</option>
|
|
<option value="180">180天</option>
|
|
<option value="1000">其他</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=2>合計</td>
|
|
<td colspan=1 >
|
|
<input type="text" class="form-control" disabled x-model="totalScale()" >
|
|
<span x-show="totalScale() != 100" class="errortext" x-cloak data-type="errortext">總比例需為100%</span>
|
|
</td>
|
|
<td colspan=1 ><input type="text" class="form-control" disabled x-model="totalSalePrice().toLocaleString()" ></td>
|
|
<td colspan=3 ></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=2>備註</td>
|
|
<td colspan=4 >
|
|
<textarea name="" class="form-control" id="" cols="30" rows="5"></textarea>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="divitem">
|
|
<table style="width:800px" class="table noborder" >
|
|
<tbody>
|
|
<tr>
|
|
<th>牌價總額(A)</th>
|
|
<th>售價總額(B)</th>
|
|
<th>破價總額(B-A)</th>
|
|
<th>價率%(B/A)</th>
|
|
<th>總台數</th>
|
|
<th>服務費(介紹費)</th>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="text" class="form-control" x-model="totalPrice().toLocaleString()" disabled style="width:180px" /></td>
|
|
<td><input type="text" class="form-control" x-model="totalSalePrice().toLocaleString()" disabled style="width:180px" /></td>
|
|
<td><input type="text" class="form-control" x-model="(totalSalePrice() - totalPrice()).toLocaleString()" disabled style="width:180px" /></td>
|
|
<td>
|
|
<input type="text" class="form-control" x-show="totalPrice()!=0" x-model="Math.round(totalSalePrice() / totalPrice() * 100 * 10) /10" disabled />
|
|
<input type="text" class="form-control" x-show="totalPrice()==0" value="0" disabled />
|
|
</td>
|
|
<td><input type="text" class="form-control" x-model="totalElevatorsNum()" disabled /></td>
|
|
<td><input type="text" class="form-control" x-model="serviceFee" style="width:150px" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>預定成交日</th>
|
|
<th>預定出貨日</th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type="date" class="form-control" x-model="transactionDate" />
|
|
<span x-show="!transactionDate || transactionDate=='0000-00-00'" class="errortext" x-cloak data-type="errortext">請輸入預定成交日</span>
|
|
</td>
|
|
<td>
|
|
<input type="date" class="form-control" x-model="shippingDate" />
|
|
<span x-show="!shippingDate || shippingDate=='0000-00-00'" class="errortext" x-cloak data-type="errortext">請輸入預定出貨日</span>
|
|
</td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<th>罰則</th>
|
|
<th>訂金保證金(函)%</th>
|
|
<th>履約保證金(函)%</th>
|
|
<th>保固保證金(函)%</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="text" class="form-control" x-model="penalty" /></td>
|
|
<td><input type="text" class="form-control" x-model="deposit_rate" /></td>
|
|
<td><input type="text" class="form-control" x-model="keep_rate" /></td>
|
|
<td><input type="text" class="form-control" x-model="warranty_rate" /></td>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<th colspan="6">特記事項</th>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="6">
|
|
<textarea class="form-control" id="" cols="30" rows="5" x-model="remark"></textarea>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
<div class="filediv">
|
|
<label style="font-size:13px">▪️ 營業權限85%以上;85-80%呈至區處長審核;80%以下呈至總經理審核。</label>
|
|
<label for="">
|
|
<p>報價單</p>
|
|
<input type="file" class="form-control" multiple draggable="true" @change="uploadFiles($event, 1)" />
|
|
</label>
|
|
<label for="">
|
|
<p>附表</p>
|
|
<input type="file" class="form-control" multiple draggable="true" @change="uploadFiles($event, 2)" />
|
|
</label>
|
|
<label for="">
|
|
<?php if(!empty($main) && $main['attatch1'] != null): ?>
|
|
<a class="btn btn-primary" href="<?php echo $main['attatch1']; ?>" download="<?php echo $main['contractno']; ?>報價單">下載報價單</a>
|
|
<?php endif; ?>
|
|
<?php if(!empty($main) && $main['attatch2'] != null): ?>
|
|
<a class="btn btn-primary" href="<?php echo $main['attatch2']; ?>" download="<?php echo $main['contractno']; ?>附表一">下載附表一</a>
|
|
<?php endif; ?>
|
|
<button class="btn btn-primary" @click="save()">保存</button>
|
|
<button class="btn btn-primary" @click="submit()">送審</button>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<!-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js" integrity="sha384-BBtl+eGJRgqQAUMxJ7pMwbEyER4l1g+O15P+16Ep7Q9Q+zqX6gSbd85u4mG4QzX+" crossorigin="anonymous"></script> -->
|
|
<script defer>
|
|
const body = document.querySelector('body');
|
|
const options = [...<?php echo json_encode($options); ?>];
|
|
const elevators = [...<?php echo json_encode($hope_elevators); ?>];
|
|
const total_spec = <?php echo $total_spec; ?>;
|
|
const contractno = '<?php echo $hope_customer['vol_no']; ?>';
|
|
const customer = '<?php echo $hope_customer['customer']; ?>';
|
|
const manager = '<?php echo $hope_customer['manager']; ?>';
|
|
const address = '<?php echo $hope_customer['address']; ?>';
|
|
const case_name = '<?php echo $hope_customer['case_name']; ?>';
|
|
const uscc = '<?php echo $hope_customer['uscc']; ?>';
|
|
const salesman = '<?php echo $hope_customer['salesman']; ?>';
|
|
const pre_order_date = '<?php echo convertDateTimeFormat($hope_customer['pre_order_date']); ?>';
|
|
const is_renovation = '<?php echo $hope_customer['is_renovation']; ?>';
|
|
const token_link = '<?php echo $token_link; ?>';
|
|
const token = '<?php echo $para = "function_name=pricereview&" . $token_link;; ?>';
|
|
const selectedOptions = [...<?php echo json_encode($selectedOptions); ?>];
|
|
const optionKey = <?php echo $optionKey+1 ?>;
|
|
const otherOptions = [...<?php echo json_encode($otherOptions); ?>];
|
|
const otherOptionKey = <?php echo $otherOptionKey+1 ?>;
|
|
const demolishOptions = [...<?php echo json_encode($demolishOptions); ?>];
|
|
const demolishOptionKey = <?php echo $demolishOptionKey+1 ?>;
|
|
|
|
const serviceFee = <?php echo $main ? $main['special_fee'] : 0; ?>;
|
|
const transactionDate = '<?php echo $main ? $main['predeal_date'] : convertDateTimeFormat($hope_customer['pre_order_date']) ?>';
|
|
const shippingDate = '<?php echo $main ? $main['facilitok_date'] : "" ?>';
|
|
const remark = `<?php echo $main ? str_replace("\n", "\\n", $main['memo']) : ""; ?>`;
|
|
const penalty = '<?php echo $main ? $main['penalty'] : "" ?>';
|
|
const deposit_rate = '<?php echo $main ? $main['deposit_rate'] : 0 ?>';
|
|
const keep_rate = '<?php echo $main ? $main['keep_rate'] : 0 ?>';
|
|
const warranty_rate = '<?php echo $main ? $main['warranty_rate'] : 0 ?>';
|
|
const paymentRatio = [...<?php echo json_encode($paymentRatio); ?>];
|
|
const user_id = '<?php echo $user_id; ?>';
|
|
</script>
|