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.
519 lines
30 KiB
519 lines
30 KiB
<?php
|
|
|
|
include_once "../header.php";
|
|
require_once "../mkt/conn.php";
|
|
|
|
?>
|
|
<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="./js/alpinejs/cdn.min.js"></script>
|
|
<script src="./js/pricereviewAlpine.js"></script>
|
|
<div id="pricereviewCreate" x-data=pricereviewCreate()>
|
|
<div class="window-modal" x-cloak data-type="window-modal" x-show="modalShow.elevator" x-ref="createElevatorModal" id="createElevatorModal">
|
|
<div class="window-modal-content modal-xl">
|
|
<div class="window-modal-header">
|
|
<h4>新增電梯規格</h4>
|
|
<button class="btn btn-close" @click="hideCreateElevatorModal()">X</button>
|
|
</div>
|
|
<div class="window-modal-body">
|
|
<div>
|
|
<table class="table">
|
|
<tr class="table-active">
|
|
<th>電梯</th>
|
|
<th>人乘</th>
|
|
<th>載重(KG)</th>
|
|
<th>停數</th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<select class="form-control" x-model="modalElevatorInfo.spec">
|
|
<option value="">請選擇</option>
|
|
<option value="MAE100">MAE100有機房</option>
|
|
<option value="MAM200">MAM200無機房</option>
|
|
<option value="MAH100">MAH100小電梯</option>
|
|
<option value="MAF100">MAF100貨梯(有機房)</option>
|
|
<option value="MAQ100">MAQ100強趨梯</option>
|
|
<option value="MAP100">MAP100平台梯</option>
|
|
<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>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="modalElevatorInfo.person">
|
|
<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>
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="modalElevatorInfo.weight" />
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="modalElevatorInfo.stop" />
|
|
</td>
|
|
</tr>
|
|
<tr class="table-active">
|
|
<th>速度</th>
|
|
<th>電梯許可證號</th>
|
|
<th>品牌</th>
|
|
<th>贈送M1</th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<select name="" id="" class="form-control" style="width:93px" x-model="modalElevatorInfo.speed" @change="getModalElevatorPrice()" >
|
|
<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>
|
|
</td>
|
|
<td>
|
|
<input type="text" class="form-control" x-model="modalElevatorInfo.permitNumber" />
|
|
</td>
|
|
<td>
|
|
<select class="form-control" x-model="modalElevatorInfo.brand">
|
|
<option value="請選擇">請選擇</option>
|
|
<option value='永大'>永大</option>
|
|
<option value='三菱'>三菱</option>
|
|
<option value='崇友'>崇友</option>
|
|
<option value='Otis'>Otis</option>
|
|
<option value='櫻花'>櫻花</option>
|
|
<option value='立路'>立路</option>
|
|
<option value='富士達'>富士達</option>
|
|
<option value='富士'>富士</option>
|
|
<option value='測試品牌'>測試品牌</option>
|
|
<option value='sanyo'>sanyo</option>
|
|
<option value='測試品牌2'>測試品牌2</option>
|
|
<option value='測試品牌4'>測試品牌4</option>
|
|
<option value='中升'>中升</option>
|
|
<option value='長合'>長合</option>
|
|
<option value='宏偉電機工業股份有限公司'>宏偉電機工業股份有限公司</option>
|
|
<option value='保速達'>保速達</option>
|
|
<option value='東棋'>東棋</option>
|
|
<option value='安達'>安達</option>
|
|
<option value='百朝'>百朝</option>
|
|
<option value='太友'>太友</option>
|
|
<option value='永佳捷'>永佳捷</option>
|
|
<option value='永勝'>永勝</option>
|
|
<option value='其他'>其他</option>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<select class="form-control" x-model="modalElevatorInfo.m1">
|
|
<option value="0">否</option>
|
|
<option value="1">是</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr class="table-active">
|
|
<th>保養月數</th>
|
|
<th>保養週期</th>
|
|
<th>竣工檢查年度</th>
|
|
<th>上次年檢日期</th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type="number" class="form-control" value="12" x-model="modalElevatorInfo.months" />
|
|
</td>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="modalElevatorInfo.cycle">
|
|
<option value="">請選擇</option>
|
|
<option value="">月保</option>
|
|
<option value="">雙週保</option>
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="modalElevatorInfo.checkYear" />
|
|
</td>
|
|
<td>
|
|
<input type="date" class="form-control" x-model="modalElevatorInfo.lastDate" />
|
|
</td>
|
|
</tr>
|
|
<tr class="table-active">
|
|
<th>年檢費用(元)</th>
|
|
<th>公司發布價(月)</th>
|
|
<th>電梯數量</th>
|
|
<th>契約報價(月)</th>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="modalElevatorInfo.yearCheckFee" />
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="modalElevatorInfo.price" />
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="modalElevatorInfo.qty" />
|
|
</td>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="modalElevatorInfo.sale_price" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" @click="hideCreateElevatorModal()">關閉</button>
|
|
<button type="button" class="btn btn-primary" @click="createElevatorFn()">新增</button>
|
|
</div>
|
|
</div>
|
|
<div class="window-back" @click="hideCreateElevatorModal()"></div>
|
|
</div>
|
|
<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="" /></td>
|
|
<th>卷號</th>
|
|
<td><input class="form-control" type="text" disabled value="" /></td>
|
|
<th>現場地址</th>
|
|
<td><input class="form-control" type="text" disabled value="" /></td>
|
|
<th>現場名稱</th>
|
|
<td><input class="form-control" type="text" disabled value="" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>電梯品牌</th>
|
|
<td><input class="form-control" type="text" disabled value="" /></td>
|
|
<th>數量</th>
|
|
<td><input class="form-control" type="number" disabled value="" /></td>
|
|
<th>營業員</th>
|
|
<td><input class="form-control" type="text" disabled value="" /></td>
|
|
<th>保養方式</th>
|
|
<td>
|
|
<select class="form-control" disabled>
|
|
<option value=""></option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>契約期限開始</th>
|
|
<td><input class="form-control" type="date" disabled value="" /></td>
|
|
<th>契約期限結束</th>
|
|
<td><input class="form-control" type="date" disabled value="" /></td>
|
|
<th>契約性質</th>
|
|
<td>
|
|
<select class="form-control" disabled>
|
|
<option value=""></option>
|
|
<option value="">新簽約</option>
|
|
<option value="">免保轉有費</option>
|
|
<option value="">續約</option>
|
|
</select>
|
|
</td>
|
|
<th>介紹人</th>
|
|
<td><input class="form-control" type="text" disabled value="" /></td>
|
|
</tr>
|
|
<tr>
|
|
<th>付款方式</th>
|
|
<td>
|
|
<select class="form-control" disabled>
|
|
<option value=""></option>
|
|
<option value="">月付</option>
|
|
<option value="">季付</option>
|
|
<option value="">半年付</option>
|
|
<option value="">年付</option>
|
|
</select>
|
|
</td>
|
|
<th></th>
|
|
<td></td>
|
|
<th></th>
|
|
<td></td>
|
|
<th></th>
|
|
<td></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 ></textarea>
|
|
</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="6" disabled>注意事項:
|
|
1.速度單位是 米/分.
|
|
2.選擇贈送M1,保養月數需填寫60.
|
|
3.標準價格未帶出,請聯係業務部建立該規格報價.
|
|
4.無機房速度20~60米 以60米為標準.
|
|
</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>
|
|
<template x-for="(elevator, idx) in elevators" :key="elevator.id">
|
|
<tbody>
|
|
<tr class="dark" >
|
|
<th colspan=1>項次</th>
|
|
<th colspan=9 style="text-align: left; padding-left: 15px;" x-text="elevator.id"></th>
|
|
<th colspan="2" >
|
|
<button class="copyBtn btn btn-secondary" @click="copyElevator(idx)">+</button>
|
|
<button class="btn btn-danger" @click="deleteElevator(elevator.id)">刪除</button>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th >電梯</th>
|
|
<td>
|
|
<select class="form-control" x-model="elevator.spec">
|
|
<option value="">請選擇</option>
|
|
<option value="MAE100">MAE100有機房</option>
|
|
<option value="MAM200">MAM200無機房</option>
|
|
<option value="MAH100">MAH100小電梯</option>
|
|
<option value="MAF100">MAF100貨梯(有機房)</option>
|
|
<option value="MAQ100">MAQ100強趨梯</option>
|
|
<option value="MAP100">MAP100平台梯</option>
|
|
<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>
|
|
</select>
|
|
</td>
|
|
<th>人乘</th>
|
|
<td>
|
|
<select class="form-control" x-model="elevator.person">
|
|
<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>
|
|
</td>
|
|
<th>載重(KG)</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.weight" />
|
|
</td>
|
|
<th>停數</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.stop" />
|
|
</td>
|
|
<th>速度(m/min)</th>
|
|
<td>
|
|
<select name="" id="" class="form-control" style="width:93px" x-model="elevator.speed" @change="getElevatorPrice()" >
|
|
<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>
|
|
</td>
|
|
<th>規格</th>
|
|
<td colspan=1>
|
|
<input type="text" class="form-control" disabled />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>電梯許可證號碼</th>
|
|
<td colspan=3>
|
|
<input type="text" class="form-control" x-model="elevator.permitNumber" />
|
|
</td>
|
|
<th>品牌</th>
|
|
<td colspan="1">
|
|
<select class="form-control" x-model="modalElevatorInfo.brand">
|
|
<option value="請選擇">請選擇</option>
|
|
<option value='永大'>永大</option>
|
|
<option value='三菱'>三菱</option>
|
|
<option value='崇友'>崇友</option>
|
|
<option value='Otis'>Otis</option>
|
|
<option value='櫻花'>櫻花</option>
|
|
<option value='立路'>立路</option>
|
|
<option value='富士達'>富士達</option>
|
|
<option value='富士'>富士</option>
|
|
<option value='測試品牌'>測試品牌</option>
|
|
<option value='sanyo'>sanyo</option>
|
|
<option value='測試品牌2'>測試品牌2</option>
|
|
<option value='測試品牌4'>測試品牌4</option>
|
|
<option value='中升'>中升</option>
|
|
<option value='長合'>長合</option>
|
|
<option value='宏偉電機工業股份有限公司'>宏偉電機工業股份有限公司</option>
|
|
<option value='保速達'>保速達</option>
|
|
<option value='東棋'>東棋</option>
|
|
<option value='安達'>安達</option>
|
|
<option value='百朝'>百朝</option>
|
|
<option value='太友'>太友</option>
|
|
<option value='永佳捷'>永佳捷</option>
|
|
<option value='永勝'>永勝</option>
|
|
<option value='其他'>其他</option>
|
|
</select>
|
|
</td>
|
|
<th>保養月數</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.months" />
|
|
</td>
|
|
<th>保養週期</th>
|
|
<td>
|
|
<select name="" id="" class="form-control" x-model="elevator.cycle">
|
|
<option value="">請選擇</option>
|
|
<option value="EM">月保</option>
|
|
<option value="BW">雙週保</option>
|
|
</select>
|
|
</td>
|
|
<th>送M1</th>
|
|
<td>
|
|
<select class="form-control" x-model="elevator.m1">
|
|
<option value="0">否</option>
|
|
<option value="1">是</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>竣工檢查年度</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.checkYear" />
|
|
</td>
|
|
<th>上次年檢日期</th>
|
|
<td>
|
|
<input type="date" class="form-control" x-model="elevator.lastDate" />
|
|
</td>
|
|
<th>年檢費用(元)</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.yearCheckFee" />
|
|
</td>
|
|
<th>公司發布價(月)</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.price" />
|
|
</td>
|
|
<th>電梯數量</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.qty" />
|
|
</td>
|
|
<th>契約報價(月)</th>
|
|
<td>
|
|
<input type="number" class="form-control" x-model="elevator.sale_price" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</template>
|
|
</table>
|
|
</div>
|
|
<div class="divitem" style="margin-top:20px">
|
|
<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="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>
|
|
const body = document.querySelector('body');
|
|
</script>
|