Browse Source

20240216

main
10994015 1 year ago
parent
commit
b959c370d7
  1. 4
      wms/contract/contract-new-apply.php
  2. 5
      wms/contract/insertData.php
  3. BIN
      wms/contract/option/f1.xlsx
  4. BIN
      wms/contract/option/facility.xlsx
  5. BIN
      wms/contract/option/option1.xlsx
  6. BIN
      wms/contract/option/option10.xlsx
  7. BIN
      wms/contract/option/option11.xlsx
  8. BIN
      wms/contract/option/option1127/option.xlsx
  9. BIN
      wms/contract/option/option1127/option1.xlsx
  10. BIN
      wms/contract/option/option1127/option10.xlsx
  11. BIN
      wms/contract/option/option1127/option11.xlsx
  12. BIN
      wms/contract/option/option1127/option12.xlsx
  13. BIN
      wms/contract/option/option1127/option13.xlsx
  14. BIN
      wms/contract/option/option1127/option14.xlsx
  15. BIN
      wms/contract/option/option1127/option15.xlsx
  16. BIN
      wms/contract/option/option1127/option16.xlsx
  17. BIN
      wms/contract/option/option1127/option2.xlsx
  18. BIN
      wms/contract/option/option1127/option20.xlsx
  19. BIN
      wms/contract/option/option1127/option3.xlsx
  20. BIN
      wms/contract/option/option1127/option4.xlsx
  21. BIN
      wms/contract/option/option1127/option5.xlsx
  22. BIN
      wms/contract/option/option1127/option6.xlsx
  23. BIN
      wms/contract/option/option1127/option7.xlsx
  24. BIN
      wms/contract/option/option1127/option8.xlsx
  25. BIN
      wms/contract/option/option1127/option9.xlsx
  26. BIN
      wms/contract/option/option12.xlsx
  27. BIN
      wms/contract/option/option1220/option.xlsx
  28. BIN
      wms/contract/option/option1220/option1.xlsx
  29. BIN
      wms/contract/option/option1220/option10.xlsx
  30. BIN
      wms/contract/option/option1220/option11.xlsx
  31. BIN
      wms/contract/option/option1220/option12.xlsx
  32. BIN
      wms/contract/option/option1220/option13.xlsx
  33. BIN
      wms/contract/option/option1220/option14.xlsx
  34. BIN
      wms/contract/option/option1220/option15.xlsx
  35. BIN
      wms/contract/option/option1220/option16.xlsx
  36. BIN
      wms/contract/option/option1220/option2.xlsx
  37. BIN
      wms/contract/option/option1220/option20.xlsx
  38. BIN
      wms/contract/option/option1220/option3.xlsx
  39. BIN
      wms/contract/option/option1220/option4.xlsx
  40. BIN
      wms/contract/option/option1220/option5.xlsx
  41. BIN
      wms/contract/option/option1220/option6.xlsx
  42. BIN
      wms/contract/option/option1220/option7.xlsx
  43. BIN
      wms/contract/option/option1220/option8.xlsx
  44. BIN
      wms/contract/option/option1220/option9.xlsx
  45. BIN
      wms/contract/option/option13.xlsx
  46. BIN
      wms/contract/option/option14.xlsx
  47. BIN
      wms/contract/option/option15.xlsx
  48. BIN
      wms/contract/option/option2.xlsx
  49. BIN
      wms/contract/option/option3.xlsx
  50. BIN
      wms/contract/option/option4.xlsx
  51. BIN
      wms/contract/option/option5.xlsx
  52. BIN
      wms/contract/option/option6.xlsx
  53. BIN
      wms/contract/option/option7.xlsx
  54. BIN
      wms/contract/option/option8.xlsx
  55. BIN
      wms/contract/option/option9.xlsx
  56. 2
      wms/crm/crmm01-index.php
  57. 17
      wms/mkt/api/getElevatorPrice.php
  58. 204
      wms/mkt/api/postNewElevatorPricereview.php
  59. 595
      wms/mkt/assets/js/pricereviewAlpine.js
  60. 183
      wms/mkt/css/pricereview.css
  61. 2
      wms/mkt/css/pricereview.css.map
  62. 299
      wms/mkt/css/pricereview.scss
  63. 13
      wms/mkt/pricereviewCheck.php
  64. 1111
      wms/mkt/pricereviewCreate.php
  65. 3
      wms/mkt/pricereview_mi-api.php
  66. 2
      wms/mkt/pricereview_renovate-edit.php
  67. 1
      wms/mkt/specsurvey-create.php

4
wms/contract/contract-new-apply.php

@ -202,7 +202,7 @@ $para = "function_name=pricereview&" . $token_link;
<td style="vertical-align: middle">免保期限</td>
<td style="vertical-align: middle" colspan=3>
<div class="ui labeled input">
<input type="text" placeholder="18" style="width:45px;padding:0 12px;" x-model="data.freedeadline">
<input type="text" placeholder="12" style="width:45px;padding:0 12px;" x-model="data.freedeadline">
<div class="ui label">
個月
</div>
@ -634,7 +634,7 @@ $para = "function_name=pricereview&" . $token_link;
const secondPayDeadline = '';
const tradeaddress = '<?php echo $contract['address'] ?? ''; ?>';
const tradedeadline = 180
const freedeadline = 18;
const freedeadline = 12;
const regulations = 10;
const workdeadline_a = 60;
const workdeadline_b = 7;

5
wms/contract/insertData.php

@ -114,7 +114,10 @@ foreach ($sheet->getRowIterator() as $key => $row) {
} elseif ($id == 15) {
$kind = 'E';
$subkind = 'E1';
} elseif ($id == 16) {
} elseif ($id == 17) {
$kind = 'E';
$subkind = 'E1';
}elseif ($id == 18) {
$kind = 'F';
$subkind = 'F1';
}

BIN
wms/contract/option/f1.xlsx

Binary file not shown.

BIN
wms/contract/option/facility.xlsx

Binary file not shown.

BIN
wms/contract/option/option1.xlsx

Binary file not shown.

BIN
wms/contract/option/option10.xlsx

Binary file not shown.

BIN
wms/contract/option/option11.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option1.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option10.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option11.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option12.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option13.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option14.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option15.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option16.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option2.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option20.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option3.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option4.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option5.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option6.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option7.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option8.xlsx

Binary file not shown.

BIN
wms/contract/option/option1127/option9.xlsx

Binary file not shown.

BIN
wms/contract/option/option12.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option1.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option10.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option11.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option12.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option13.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option14.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option15.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option16.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option2.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option20.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option3.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option4.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option5.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option6.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option7.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option8.xlsx

Binary file not shown.

BIN
wms/contract/option/option1220/option9.xlsx

Binary file not shown.

BIN
wms/contract/option/option13.xlsx

Binary file not shown.

BIN
wms/contract/option/option14.xlsx

Binary file not shown.

BIN
wms/contract/option/option15.xlsx

Binary file not shown.

BIN
wms/contract/option/option2.xlsx

Binary file not shown.

BIN
wms/contract/option/option3.xlsx

Binary file not shown.

BIN
wms/contract/option/option4.xlsx

Binary file not shown.

BIN
wms/contract/option/option5.xlsx

Binary file not shown.

BIN
wms/contract/option/option6.xlsx

Binary file not shown.

BIN
wms/contract/option/option7.xlsx

Binary file not shown.

BIN
wms/contract/option/option8.xlsx

Binary file not shown.

BIN
wms/contract/option/option9.xlsx

Binary file not shown.

2
wms/crm/crmm01-index.php

@ -41,7 +41,7 @@ $where .= " and salesman_name like '$salesman'";
$sql_cmd = sql_myself($user_id, "salesman");
// max,許紓晴,林慧珊,鄭伊岑
if (in_array($user_department_id, $depart_arr) || $user_id == "M0060" || $user_id == "M0107" || $user_id == "M0193" || $user_id == "M0149" || $user_id == "M0189" || $user_id == "M0061" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04" ) $sql_cmd = "";
if (in_array($user_department_id, $depart_arr) || $user_id == "M0060" || $user_id == "M0107" || $user_id == "M0193" || $user_id == "M0149" || $user_id == "M0189" || $user_id == "M0061" || $user_id == "TEST01" || $user_id == "TEST02" || $user_id == "TEST03" || $user_id == "TEST04" || $user_id == "M0175") $sql_cmd = "";
if (!empty($sql_cmd)) $where .= " and " . str_replace("where", "", $sql_cmd);
/*
$checkAll = ['p0044', 'M0007'];

17
wms/mkt/api/getElevatorPrice.php

@ -0,0 +1,17 @@
<?php
require_once("../conn.php");
$model = $_GET['model'];
$sql_str = "SELECT id, model, price FROM facility_price WHERE model = :model ORDER BY id DESC";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':model', $model);
$stmt->execute();
$el = $stmt->fetch(PDO::FETCH_ASSOC);
if($el){
$price = $el['price'];
}else{
$price = null;
}
echo $price;

204
wms/mkt/api/postNewElevatorPricereview.php

@ -0,0 +1,204 @@
<?php
require_once("../conn.php");
date_default_timezone_set('Asia/Taipei');
$contractno = $_POST['contractno'];
$ekind = $_POST['ekind'];
$person = $_POST['person'];
$company = $_POST['company'];
$case_name = $_POST['case_name'];
$address = $_POST['address'];
$compete = "";
$price_lowest = $_POST['price_lowest'];
$price_total = $_POST['price_total'];
$price_rate = $_POST['price_rate'];
$special_fee = $_POST['special_fee'];
$predeal_date = $_POST['predeal_date'];
$penalty = $_POST['penalty'];
$deposit_rate = $_POST['deposit_rate'];
$warranty_rate = $_POST['warranty_rate'];
$keep_rate = $_POST['keep_rate'];
$memo = $_POST['memo'];
$status = $_POST['status'];
$attatch1 = $_POST['attatch1'] =='' ? NULL : $_POST['attatch1'];
$attatch2 = $_POST['attatch2'] =='' ? NULL : $_POST['attatch2'];
$creater = "M0174";
$create_at = date("Y-m-d H:i:s");
$elevators = $_POST['elevators'];
$options = $_POST['options'];
$otherOptions = $_POST['otherOptions'];
$maintainOptions = $_POST['maintainOptions'];
$paymentRatio = $_POST['paymentRatio'];
$conn->beginTransaction();
try{
$sql_str = "INSERT INTO pricereview_main (contractno, ekind, person, company, case_name, address, compete, price_lowest, price_total, price_rate, special_fee, predeal_date, facilitok_date, penalty, deposit_rate, keep_rate, warranty_rate, memo, status, attatch1, attatch2, creater, create_at)
VALUES (:contractno, :ekind, :person, :company, :case_name, :address, :compete, :price_lowest, :price_total, :price_rate, :special_fee, :predeal_date, :facilitok_date, :penalty, :deposit_rate, :keep_rate, :warranty_rate, :memo, :status, :attatch1, :attatch2, :creater, :create_at)";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':contractno', $contractno);
$stmt->bindParam(':ekind', $ekind);
$stmt->bindParam(':person', $person);
$stmt->bindParam(':company', $company);
$stmt->bindParam(':case_name', $case_name);
$stmt->bindParam(':address', $address);
$stmt->bindParam(':compete', $compete);
$stmt->bindParam(':price_lowest', $price_lowest);
$stmt->bindParam(':price_total', $price_total);
$stmt->bindParam(':price_rate', $price_rate);
$stmt->bindParam(':special_fee', $special_fee);
$stmt->bindParam(':predeal_date', $predeal_date);
$stmt->bindParam(':facilitok_date', $facilitok_date);
$stmt->bindParam(':penalty', $penalty);
$stmt->bindParam(':deposit_rate', $deposit_rate);
$stmt->bindParam(':keep_rate', $keep_rate);
$stmt->bindParam(':warranty_rate', $warranty_rate);
$stmt->bindParam(':memo', $memo);
$stmt->bindParam(':status', $status);
$stmt->bindParam(':attatch1', $attatch1);
$stmt->bindParam(':attatch2', $attatch2);
$stmt->bindParam(':creater', $creater);
$stmt->bindParam(':create_at', $create_at);
$stmt->execute();
$mid = $conn->lastInsertId();
//insert 整機單價
//insert options 加價
$sql_str = "INSERT INTO pricereview_item (mid, price_id, item_no, item_group, item_spec, option_relate_spec, item_unit_price, item_qty, item_price_bp)
VALUES (:mid, :price_id, :item_no, :item_group, :item_spec, :option_relate_spec, :item_unit_price, :item_qty, :item_price_bp)";
foreach(json_decode($options, true) as $option){
$price_id = $option['id'];
$item_no = $option['key'] + 1;
$item_group = "B";
$item_spec = $option['name'] . $option['memo'];
$option_relate_spec = $option['toElevator'][0]['id'];
$item_unit_price = $option['price'];
$item_qty = $option['qty'];
$item_price_bp = $option['price'] * $option['qty'];
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':mid', $mid);
$stmt->bindParam(':price_id', $price_id);
$stmt->bindParam(':item_no', $item_no);
$stmt->bindParam(':item_group', $item_group);
$stmt->bindParam(':item_spec', $item_spec);
$stmt->bindParam(':option_relate_spec', $option_relate_spec);
$stmt->bindParam(':item_unit_price', $item_unit_price);
$stmt->bindParam(':item_qty', $item_qty);
$stmt->bindParam(':item_price_bp', $item_price_bp);
$stmt->execute();
}
//insert 除外項目
$sql_str = "INSERT INTO pricereview_item (mid, item_no, item_group, item_spec, option_relate_spec, item_unit_price, item_qty, item_price_bp)
VALUES (:mid, :item_no, :item_group, :item_spec, :option_relate_spec, :item_unit_price, :item_qty, :item_price_bp)";
foreach(json_decode($otherOptions, true) as $option){
$item_no = $option['id'] + 1;
$item_group = "E";
$item_spec = $option['name'];
$option_relate_spec = $option['toElevator'][0]['id'];
$item_unit_price = $option['price'];
$item_qty = $option['num'];
$item_price_bp = $option['price'] * $option['num'];
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':mid', $mid);
$stmt->bindParam(':item_no', $item_no);
$stmt->bindParam(':item_group', $item_group);
$stmt->bindParam(':item_spec', $item_spec);
$stmt->bindParam(':option_relate_spec', $option_relate_spec);
$stmt->bindParam(':item_unit_price', $item_unit_price);
$stmt->bindParam(':item_qty', $item_qty);
$stmt->bindParam(':item_price_bp', $item_price_bp);
$stmt->execute();
}
$sql_str = "INSERT INTO pricereview_item (mid, item_no, item_group, item_spec, option_relate_spec, item_unit_price, item_qty, item_price_bp)
VALUES (:mid, :item_no, :item_group, :item_spec, :option_relate_spec, :item_unit_price, :item_qty, :item_price_bp)";
//insert 保養延長
foreach(json_decode($maintainOptions, true) as $option){
$item_no = $option['id'] + 1;
$item_group = "D";
$item_spec = $option['toElevator'][0]['model'];
$option_relate_spec = $option['toElevator'][0]['id'];
$item_unit_price = $option['price'];
$item_qty = $option['num'];
$item_price_bp = $option['price'] * $option['num'];
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':mid', $mid);
$stmt->bindParam(':item_no', $item_no);
$stmt->bindParam(':item_group', $item_group);
$stmt->bindParam(':item_spec', $item_spec);
$stmt->bindParam(':option_relate_spec', $option_relate_spec);
$stmt->bindParam(':item_unit_price', $item_unit_price);
$stmt->bindParam(':item_qty', $item_qty);
$stmt->bindParam(':item_price_bp', $item_price_bp);
$stmt->execute();
}
$sql_str = "INSERT INTO pricereview_pay (mid, pay_kind, pay_scale, pay_amount, pay_period)
VALUES (:mid, :pay_kind, :pay_scale, :pay_amount, :pay_period)";
foreach(json_decode($paymentRatio, true) as $key=>$pay){
$pay_kind = $key +1;
$pay_scale = $pay['scale'] == '' ? 0 : $pay['scale'];
$pay_amount = $pay['scale']/100 * $price_total;
$pay_period = $pay['ticket'];
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':mid', $mid);
$stmt->bindParam(':pay_kind', $pay_kind);
$stmt->bindParam(':pay_scale', $pay_scale);
$stmt->bindParam(':pay_amount', $pay_amount);
$stmt->bindParam(':pay_period', $pay_period);
$stmt->execute();
}
$sql_str = "SELECT * FROM account WHERE accountid = :accountid";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':accountid', $creater);
$stmt->execute();
$account = $stmt->fetch(PDO::FETCH_ASSOC);
$manager = $account['manager'];
$sign1 = "$manager,,"; //區處長
$sign2 = NULL; // 業務承辦人
$sign3 = "M0060,,"; //業務部協理
//是否呈核至總經理(M0006)
if($price_rate < 80 || $special_fee > 0){
$sign4 = "M0006,,";
$sign_total = 4;
}else{
$sign4 = NULL;
$sign_total = 3;
}
$sql_str = "INSERT INTO pricereview_sign (mid, sign1, sign2, sign3, sign4, sign_total)
VALUES (:mid, :sign1, :sign2, :sign3, :sign4, :sign_total)";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':mid', $mid);
$stmt->bindParam(':sign1', $sign1);
$stmt->bindParam(':sign2', $sign2);
$stmt->bindParam(':sign3', $sign3);
$stmt->bindParam(':sign4', $sign4);
$stmt->bindParam(':sign_total', $sign_total);
$stmt->execute();
echo "success";
$conn->commit();
}catch (PDOException $e) {
$conn->rollback();
echo $e->getMessage();
die('Error!:' . $e->getMessage());
}

595
wms/mkt/assets/js/pricereviewAlpine.js

@ -1,7 +1,600 @@
const pricereviewCreate = ()=>{
return {
init(){
this.elevators = elevators;
console.log(this.elevators);
console.log(this.total_spec);
},
openFn:{
4:'2U',
5:"4PCO",
7:"6PCO",
8:"2S",
9:"CO"
},
optionalArr: {
1:'標配',
2:'選配',
3:'選配',
},
total_spec: total_spec,
options: options,
// orioptions: options,
searchtext: '',
kind: 1,
subkind: 1,
buttons: [],
modalSelectedOptions: {},
selectedOptions:[],
elevators: [],
toElevators:[],
toElevatorNo: '',
currentOptionKey: '',
currentOtherOptionKey: '',
currentMaintainOptionKey: '',
optionKey:0,
otherOptionKey:0,
maintainOptionKey:0,
modalElevatorInfo:{
spec:'',
person:'',
stop:'',
speed:'',
open:'CO',
num: 1,
price:'',
sale_price:'',
},
otherOptions: [],
modalOtherOptionInfo:{
pr_no:"",
name:"",
price: 0,
num:"",
},
maintainOptions:[],
modalMaintainInfo:{
price:0,
num:"",
memo:"",
},
paymentRatio:[
{
scale: 20,
ticket: 30,
},
{
scale: 0,
ticket: 30,
},
{
scale: 50,
ticket: 30,
},
{
scale: 0,
ticket: 30,
},
{
scale: 20,
ticket: 30,
},
{
scale: 10,
ticket: 30,
},
{
scale: 0,
ticket: 30,
},
],
serviceFee:0,
transactionDate: pre_order_date,
shippingDate:'',
remark:'',
async getElevatorPrice(idx){
const spec = this.elevators[idx].specifications
const person = this.elevators[idx].person
const stop = this.elevators[idx].stop
const open_converted = this.elevators[idx].open_converted
const speed = this.elevators[idx].speed
const model = spec + '-' + person + '*' + stop + '-' + open_converted + speed;
console.log(model);
try{
const res = await axios.get("./api/getElevatorPrice.php", {params: {model: model}})
console.log(res.data);
if(res.data == null || res.data == ""){
console.log("公司並無提供此規格!!");
}
this.elevators[idx].price = res.data
}catch (error) {
console.error("Error fetching elevator price:", error);
}
},
async getModalElevatorPrice(){
let model = this.modalElevatorInfo.spec + '-' + this.modalElevatorInfo.person + '*' + this.modalElevatorInfo.stop + '-' + this.modalElevatorInfo.open + this.modalElevatorInfo.speed;
try{
const res = await axios.get("./api/getElevatorPrice.php", {params: {model: model}})
console.log(res.data);
if(res.data == null || res.data == ""){
console.log("公司並無提供此規格!!");
}
this.modalElevatorInfo.price = res.data
}catch (error) {
console.error("Error fetching elevator price:", error);
}
},
initButtons(kind) {
if (kind == 'A') {
this.buttons = [
{ name: '車廂意匠', type: 'A1' }
]
} else if (kind == 'B') {
this.buttons = [
{ name: '天井', type: 'B1' },
{ name: '地板', type: 'B2' },
{ name: '操縱盤', type: 'B3' },
{ name: '扶手', type: 'B4' },
{ name: '車廂門與層門(轎門/層門)', type: 'B5' },
{ name: '轎壁(車廂側板)', type: 'B6' },
{ name: '其他車廂內裝配件', type: 'B7' },
]
} else if (kind == 'C') {
this.buttons = [
{ name: '框', type: 'C1' },
{ name: '乘場指示器', type: 'C2' },
{ name: '燈', type: 'C3' },
{ name: '方式與門', type: 'C4' },
]
} else if (kind == 'D') {
this.buttons = [
{ name: '功能與配置', type: 'D1' },
{ name: 'OH與樓高', type: 'D2' },
]
} else if (kind == 'E') {
this.buttons = [
{ name: '平台梯', type: 'E1' },
]
} else if (kind == 'F') {
this.buttons = [
{ name: '汰改', type: 'F1' },
]
} else if (kind == 1) {
this.buttons = []
}
},
optionSubCategory: 1,
initOptinos(){
this.options.forEach(option=>{
option.isShow = 1;
})
},
searchOptions(kind=this.kind, subkind=this.subkind){
if(kind!=null) this.kind = kind;
if(subkind!=null) this.subkind = subkind;
this.initOptinos();
this.initButtons(kind);
this.options.forEach(option=>{
if(option.kind != this.kind && this.kind != 1){
option.isShow = 0;
}else{
if(option.subkind != this.subkind && this.subkind != 1){
option.isShow = 0;
}
}
if(option.isShow == 1){
if(option.group_name == null) option.group_name = ''
if(option.spec == null) option.spec = ''
if(option.memo == null) option.memo = ''
if(option.price == null) option.price = 0
if(option.unit == null) option.unit = ''
if(String(option.id).includes(this.searchtext) || option.group_name.includes(this.searchtext) || option.memo.toLowerCase().includes(this.searchtext) || option.spec.toLowerCase().includes(this.searchtext) || option.unit.includes(this.searchtext) || String(option.price).includes(this.searchtext)){
option.isShow = 1
}else{
option.isShow = 0
}
}
})
},
selectOption(idx, id, name, price, memo){
this.options[idx].selected = this.options[idx].selected==1 ? 0 : 1;
if(this.modalSelectedOptions.hasOwnProperty(idx)){
delete this.modalSelectedOptions[idx];
}else{
//this.optionKey => 已選option 流水號, idx:option表內的流水號, id:option 資料庫的ID
this.modalSelectedOptions[idx] = {key:this.optionKey, 'idx':idx, 'id': id, 'name': name, 'price': price, qty:1, 'memo': memo, 'toElevator':[] }
}
this.optionKey ++;
},
initModalSelectedOptions(){
this.modalSelectedOptions = {}
this.options.forEach(option=>{
option.selected = 0
})
this.$refs.optionsModal.style.display = "block"
body.style.overflow = 'hidden'
},
chkOptions(){
Object.keys(this.modalSelectedOptions).forEach(option=>{
this.selectedOptions.push(this.modalSelectedOptions[option])
})
console.log(this.selectedOptions);
this.$refs.optionsModal.style.display = 'none';
},
hideOptionsModal(){
this.$refs.optionsModal.style.display = 'none';
body.style.overflow = 'auto'
},
totalElevatorsPrice(){
return this.elevators.reduce((total, elevator) => {
return total + (elevator.spec_num * elevator.price);
}, 0);
},
totalElevatorsNum(){
return this.elevators.reduce((total, elevator) => {
return total + Number(elevator.spec_num);
}, 0)
},
totalElevatorsSalePrice(){
return this.elevators.reduce((total, elevator) => {
return total + (elevator.spec_num * elevator.spec_price);
}, 0);
},
totalOptionsPrice(){
return this.selectedOptions.reduce((total, option) => {
return total + (option.qty * option.price);
}, 0);
},
openAddElevatorFn(){
},
createElevatorFn(){
if(this.modalElevatorInfo.spec == '') return alert("請選擇電梯規格");
if(this.modalElevatorInfo.stop == '') return alert("請填入停數");
if(this.modalElevatorInfo.speed == '') return alert("請選擇速度");
if(this.modalElevatorInfo.open == '') return alert("請選擇開梯方式");
if(this.modalElevatorInfo.person == '') return alert("請填入人乘/載重");
if(this.modalElevatorInfo.num == '') return alert("請填入數量");
if(this.modalElevatorInfo.sale_price == '') return alert("請填入售價");
this.total_spec ++;
this.elevators.push({
id: this.total_spec,
specifications: this.modalElevatorInfo.spec,
person: this.modalElevatorInfo.person,
stop: this.modalElevatorInfo.stop,
speed: this.modalElevatorInfo.speed,
open_converted: this.modalElevatorInfo.open,
spec_price: this.modalElevatorInfo.sale_price,
price: this.modalElevatorInfo.price,
open:'',
spec_num: this.modalElevatorInfo.num,
});
this.modalElevatorInfo = {
spec:'',
person:'',
stop:'',
speed:'',
open:'CO',
num: 1,
price:'',
sale_price:'',
};
this.$refs.closeCreateElevatorModalBtn.click();
},
copyElevator(idx){
const spec = this.elevators[idx].specifications
const person = this.elevators[idx].person
const stop = this.elevators[idx].stop
const open_converted = this.elevators[idx].open_converted
const speed = this.elevators[idx].speed
const spec_price = this.elevators[idx].spec_price
const open = this.elevators[idx].open
const spec_num = this.elevators[idx].spec_num
const price = this.elevators[idx].price
this.total_spec ++;
this.elevators.push({
id: this.total_spec,
specifications: spec,
person: person,
stop: stop,
speed: speed,
open_converted: open_converted,
spec_price: spec_price,
price: price,
open: open,
spec_num: spec_num,
});
console.log(this.elevators);
},
addOptionToElevator(key){
this.currentOptionKey = key;
this.toElevators = [];
this.toElevatorNo = "";
const matchElevators = this.selectedOptions.filter(option=> option.key == key)[0].toElevator.map(elevator=> elevator.id)
console.log(matchElevators);
this.toElevatorNo = matchElevators[0]
this.elevators.forEach(elevator=>{
if(elevator.price > 0){
this.toElevators.push({
id: elevator.id,
model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
checked: matchElevators.includes(elevator.id) ? 1: 0,
})
}
})
},
addOtherOptionToElevator(id){
this.currentOtherOptionKey = id;
this.toElevators = [];
this.toElevatorNo = "";
const matchElevators = this.otherOptions.filter(option=> option.id == id)[0].toElevator.map(elevator=> elevator.id)
this.toElevatorNo = matchElevators[0]
this.elevators.forEach(elevator=>{
if(elevator.price > 0){
this.toElevators.push({
id: elevator.id,
model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
checked: matchElevators.includes(elevator.id) ? 1: 0,
})
}
})
},
chkOptionToElevators(){
const checkedOptions = [];
// this.toElevators.forEach(elevator=>{
// if(elevator.checked){
// checkedOptions.push({
// id: elevator.id,
// model: elevator.model,
// });
// }
// })
const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
checkedOptions.push({
id: this.toElevatorNo,
model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
})
this.selectedOptions.forEach(option=>{
if(option.key == this.currentOptionKey){
option.toElevator = [];
option.toElevator.push(...checkedOptions)
}
})
this.currentOptionKey = ''
},
chkOtherOptionToElevators(){
const checkedOptions = [];
// this.toElevators.forEach(elevator=>{
// if(elevator.checked){
// checkedOptions.push({
// id: elevator.id,
// model: elevator.model,
// });
// }
// })
const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
checkedOptions.push({
id: this.toElevatorNo,
model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
})
this.otherOptions.forEach(option=>{
if(option.id == this.currentOtherOptionKey){
option.toElevator = [];
option.toElevator.push(...checkedOptions)
}
})
this.currentOtherOptionKey = ''
},
removeElevator(id){
if(!confirm("確定刪除嗎?")) return;
this.elevators = this.elevators.filter(elevator=> elevator.id != id)
const issetElevators = [];
this.elevators.forEach(elevator=>{
issetElevators.push(elevator.id);
})
this.selectedOptions.forEach(option=>{
option.toElevator = option.toElevator.filter(el=>{
return issetElevators.includes(el.id)
})
})
console.log(this.selectedOptions);
},
removeOption(key){
console.log(this.selectedOptions);
this.selectedOptions = this.selectedOptions.filter(option=> option.key != key)
},
removeOtherOption(id){
this.otherOptions = this.otherOptions.filter(option=> option.id != id)
},
createOtherOptionFn(){
this.otherOptions.push({
id: this.otherOptionKey,
pr_no: this.modalOtherOptionInfo.pr_no,
name: this.modalOtherOptionInfo.name,
price: this.modalOtherOptionInfo.price,
num: this.modalOtherOptionInfo.num,
toElevator:[],
})
this.modalOtherOptionInfo = {
pr_no: '',
name: '',
price: 0,
num: '',
}
this.otherOptionKey ++;
console.log(this.otherOptions);
this.$refs.closeCreateOtherOptionModalBtn.click();
},
totalOtherOptionsPrice(){
return this.otherOptions.reduce((total, option) => {
return total + (Number(option.num) * Number(option.price));
}, 0);
},
totalOtherOptionsNum(){
return this.otherOptions.reduce((total, option) => {
return total + Number(option.num);
}, 0);
},
createMaintainOptionFn(){
this.maintainOptions.push({
id: this.maintainOptionKey,
price: this.modalMaintainInfo.price,
num: this.modalMaintainInfo.num,
memo: this.modalMaintainInfo.memo,
toElevator:[],
})
this.modalMaintainInfo = {
price:0,
num:"",
memo:"",
}
this.maintainOptionKey ++;
this.$refs.closeCreateMaintainOptionModalBtn.click();
},
totalMaintainOptionsPrice(){
return this.maintainOptions.reduce((total, option) => {
return total + (Number(option.num) * Number(option.price));
}, 0);
},
totalMaintainOptionsNum(){
return this.maintainOptions.reduce((total, option) => {
return total + Number(option.num);
}, 0);
},
chkMaintainOptionToElevators(){
const checkedOptions = [];
// this.toElevators.forEach(elevator=>{
// if(elevator.checked){
// checkedOptions.push({
// id: elevator.id,
// model: elevator.model,
// });
// }
// })
const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
checkedOptions.push({
id: this.toElevatorNo,
model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
})
this.maintainOptions.forEach(option=>{
if(option.id == this.currentMaintainOptionKey){
option.toElevator = [];
option.toElevator.push(...checkedOptions)
}
})
this.currentMaintainOptionKey = ''
},
addMaintainOptionToElevator(id){
this.currentMaintainOptionKey = id;
this.toElevators = [];
this.toElevatorNo = "";
const matchElevators = this.maintainOptions.filter(option=> option.id == id)[0].toElevator.map(elevator=> elevator.id)
this.toElevatorNo = matchElevators[0]
this.elevators.forEach(elevator=>{
if(elevator.price > 0){
this.toElevators.push({
id: elevator.id,
model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
checked: matchElevators.includes(elevator.id) ? 1: 0,
})
}
})
},
removeMaintainOption(id){
this.maintainOptions = this.maintainOptions.filter(option=> option.id != id)
},
totalPrice(){
return this.totalElevatorsPrice() + this.totalOptionsPrice() + this.totalOtherOptionsPrice() + this.totalMaintainOptionsPrice();
},
totalSalePrice(){
return this.elevators.reduce((total, elevator) => {
return total + (elevator.spec_num * elevator.spec_price);
}, 0);
},
scalePrice(scale){
if(scale === '') return 0;
return this.totalSalePrice() * scale / 100;
},
totalScale(){
let total = 0;
Object.keys(this.paymentRatio).forEach(pay=>{
if(this.paymentRatio[pay].scale != '' && this.paymentRatio[pay].scale > 0){
total += Number(this.paymentRatio[pay].scale)
}
})
return total;
},
customerInfo:{
contractno: contractno,
company: customer,
manager: manager,
address: address,
case_name: case_name,
uscc: uscc,
person: salesman,
},
penalty:"",
deposit_rate:0,
keep_rate:0,
warranty_rate:0,
submit(){
const form = new FormData();
form.append('contractno', contractno);
form.append('ekind', "新梯");
form.append('person', this.customerInfo.person);
form.append('company', this.customerInfo.company);
form.append('case_name', this.customerInfo.case_name);
form.append('address', this.customerInfo.address);
form.append('price_lowest', this.totalPrice());
form.append('price_total', this.totalSalePrice());
form.append('price_rate', Math.round(this.totalSalePrice() / this.totalPrice() * 100 *10) / 10);
form.append('special_fee', this.serviceFee);
form.append('predeal_date', this.transactionDate);
form.append('facilitok_date', this.shippingDate);
form.append('penalty', this.penalty);
form.append('deposit_rate', this.deposit_rate);
form.append('keep_rate', this.keep_rate);
form.append('warranty_rate', this.warranty_rate);
form.append('memo', this.remark);
form.append('status', "YS");
form.append('attatch1', "");
form.append('attatch2', "");
form.append('elevators', JSON.stringify(this.elevators));
form.append('options', JSON.stringify(this.selectedOptions));
form.append('otherOptions', JSON.stringify(this.otherOptions));
form.append('maintainOptions', JSON.stringify(this.maintainOptions));
form.append('paymentRatio', JSON.stringify(this.paymentRatio));
axios.post('./api/postNewElevatorPricereview.php', form).then(res=>{
console.log(res.data);
if(res.data == "success"){
alert("送審成功!");
}
}).catch(err=>{
console.error(err);
})
},
}
}
const pricereviewCheck = ()=>{
return {
init(){
console.log(123)
}
},
}
}

183
wms/mkt/css/pricereview.css

@ -1,29 +1,45 @@
#pricereviewCreate table, #pricereviewCreate th, #pricereviewCreate td {
#pricereviewCreate > .modal {
padding: 20px;
}
#pricereviewCreate > .modal table, #pricereviewCreate > .modal th, #pricereviewCreate > .modal td {
border: 1px #ccc solid;
}
#pricereviewCreate > .modal table > thead tr th {
color: #A52A2A;
}
#pricereviewCreate > .modal table > tbody .selected {
background-color: #E7FEFB;
}
#pricereviewCreate .container table, #pricereviewCreate .container th, #pricereviewCreate .container td {
border: 1px #ccc solid;
padding: 15px;
}
#pricereviewCreate table thead th {
#pricereviewCreate .container table.noborder, #pricereviewCreate .container table .noborder th, #pricereviewCreate .container table .noborder td, #pricereviewCreate .container th.noborder, #pricereviewCreate .container th .noborder th, #pricereviewCreate .container th .noborder td, #pricereviewCreate .container td.noborder, #pricereviewCreate .container td .noborder th, #pricereviewCreate .container td .noborder td {
border: none;
}
#pricereviewCreate .container table thead th {
background-color: #6D9EEB;
}
#pricereviewCreate table tbody td input {
#pricereviewCreate .container table tbody td input {
font-size: 14px;
}
#pricereviewCreate table tbody th {
#pricereviewCreate .container table tbody th {
background-color: #CCE4F8;
font-size: 14px;
padding: 15px 2px;
min-width: 100px;
text-align: center;
}
#pricereviewCreate table input {
#pricereviewCreate .container table input {
font-size: 13px;
}
#pricereviewCreate .pricreviewmain {
#pricereviewCreate .container .pricreviewmain {
background-color: #F2F2F2;
padding: 20px;
border-radius: 6px;
margin: 30px 0;
}
#pricereviewCreate .pricreviewmain button {
#pricereviewCreate .container .pricreviewmain button {
color: #fff;
width: 55px;
height: 30px;
@ -31,60 +47,183 @@
margin-left: 10px;
font-size: 13px;
}
#pricereviewCreate .pricreviewmain button.addbtn {
#pricereviewCreate .container .pricreviewmain button.addbtn {
background-color: #337AB7;
width: 30px;
}
#pricereviewCreate .pricreviewmain button.deleteBtn {
#pricereviewCreate .container .pricreviewmain button.deleteBtn {
background-color: #D9534F;
color: #fff;
font-size: 12px;
width: 30px;
}
#pricereviewCreate .pricreviewmain button.selectElevator {
#pricereviewCreate .container .pricreviewmain button.selectElevator {
background-color: #D9534F;
color: #fff;
}
#pricereviewCreate .pricreviewmain > .divitem {
#pricereviewCreate .container .pricreviewmain > .divitem {
border: 1px #ccc solid;
padding: 10px;
border-radius: 4px;
}
#pricereviewCreate .pricreviewmain > .divitem .title {
#pricereviewCreate .container .pricreviewmain > .divitem .title {
display: flex;
align-items: center;
border-bottom: 1px #ccc solid;
padding: 10px 0;
margin-bottom: 10px;
}
#pricereviewCreate .pricreviewmain > .divitem .title h6 {
#pricereviewCreate .container .pricreviewmain > .divitem .title h6 {
font-weight: 600;
}
#pricereviewCreate .pricreviewmain > .divitem table, #pricereviewCreate .pricreviewmain > .divitem th, #pricereviewCreate .pricreviewmain > .divitem td {
#pricereviewCreate .container .pricreviewmain > .divitem table, #pricereviewCreate .container .pricreviewmain > .divitem th, #pricereviewCreate .container .pricreviewmain > .divitem td {
font-size: 14px;
background-color: transparent;
}
#pricereviewCreate .pricreviewmain > .divitem table input, #pricereviewCreate .pricreviewmain > .divitem table select, #pricereviewCreate .pricreviewmain > .divitem table textarea, #pricereviewCreate .pricreviewmain > .divitem th input, #pricereviewCreate .pricreviewmain > .divitem th select, #pricereviewCreate .pricreviewmain > .divitem th textarea, #pricereviewCreate .pricreviewmain > .divitem td input, #pricereviewCreate .pricreviewmain > .divitem td select, #pricereviewCreate .pricreviewmain > .divitem td textarea {
#pricereviewCreate .container .pricreviewmain > .divitem table input, #pricereviewCreate .container .pricreviewmain > .divitem table select, #pricereviewCreate .container .pricreviewmain > .divitem table textarea, #pricereviewCreate .container .pricreviewmain > .divitem th input, #pricereviewCreate .container .pricreviewmain > .divitem th select, #pricereviewCreate .container .pricreviewmain > .divitem th textarea, #pricereviewCreate .container .pricreviewmain > .divitem td input, #pricereviewCreate .container .pricreviewmain > .divitem td select, #pricereviewCreate .container .pricreviewmain > .divitem td textarea {
font-size: 13px;
}
#pricereviewCreate .pricreviewmain > .divitem table input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .pricreviewmain > .divitem table input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .pricreviewmain > .divitem th input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .pricreviewmain > .divitem th input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .pricreviewmain > .divitem td input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .pricreviewmain > .divitem td input[type=number]::-webkit-inner-spin-button {
#pricereviewCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
#pricereviewCreate .pricreviewmain > .divitem table tr:hover .deleteBtn {
#pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .deleteBtn, #pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .copyBtn {
opacity: 1;
}
#pricereviewCreate .pricreviewmain > .divitem table .saletd {
#pricereviewCreate .container .pricreviewmain > .divitem table .saletd {
position: relative;
}
#pricereviewCreate .pricreviewmain > .divitem table .saletd > .deleteBtn {
#pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .deleteBtn {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 2px;
opacity: 0;
transition: 0.3s;
}
#pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .copyBtn {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 38px;
opacity: 0;
transition: 0.3s;
width: 30px;
height: 30px;
}
#pricereviewCreate .container .pricreviewmain > .divitem table textarea {
height: auto;
min-height: 50px;
}
#pricereviewCreate .container .pricreviewmain > .filediv {
display: flex;
flex-direction: column;
margin-top: 20px;
}
#pricereviewCreate .container .pricreviewmain > .filediv label {
display: flex;
align-items: center;
margin: 10px 0;
}
#pricereviewCreate .container .pricreviewmain > .filediv label p {
width: 100px;
font-size: 15px;
font-weight: 600;
}
#pricereviewCreate .container .pricreviewmain > .filediv label input[type=file] {
width: 400px;
}
#pricereviewCreate .container .pricreviewmain > .filediv label button {
width: 90px;
height: 35px;
margin: 0;
margin-right: 15px;
margin-top: 20px;
}
.container-fluid, .container {
max-width: 1400px !important;
width: 100%;
}
.container-fluid h4, .container h4 {
font-weight: 600;
}
.container-fluid .btn-secondary, .container .btn-secondary {
background-color: #6C757D;
}
.window-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9;
padding: 20px;
display: none;
}
@keyframes fade-in {
0% {
transform: translate(-50%, -55%);
opacity: 0;
}
100% {
transform: translate(-50%, -50%);
opacity: 1;
}
}
.window-modal table, .window-modal th, .window-modal td {
border: 1px #ccc solid;
}
.window-modal table > thead tr th {
color: #A52A2A;
}
.window-modal table > tbody .selected {
background-color: #E7FEFB;
}
.window-modal .window-modal-content {
background-color: #fff;
border-radius: 10px;
position: absolute;
width: 1200px;
padding: 30px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-shadow: 0 5px 5px #222;
max-height: 80vh;
animation: fade-in 0.2s linear;
}
.window-modal .window-modal-content.modal-xl {
width: 1200px;
}
.window-modal .window-modal-content.modal-lg {
width: 800px;
}
.window-modal .window-modal-content.modal-m {
width: 400px;
}
.window-modal .window-modal-content .window-modal-header {
display: flex;
flex-direction: column;
}
.window-modal .window-modal-content .window-modal-header button.btn-close {
position: absolute;
top: 10px;
right: 10px;
background-color: transparent;
border: none;
outline: none;
border-radius: 50%;
}
.window-modal .window-modal-content .window-modal-header > div > input {
width: 250px;
}
.window-modal .window-modal-content .window-modal-body {
overflow-y: scroll;
height: 400px;
}/*# sourceMappingURL=pricereview.css.map */

2
wms/mkt/css/pricereview.css.map

@ -1 +1 @@
{"version":3,"sources":["pricereview.scss","pricereview.css"],"names":[],"mappings":"AACI;EACI,sBAAA;EACA,aAAA;ACAR;ADGQ;EACI,yBAAA;ACDZ;ADIY;EACI,eAAA;ACFhB;ADIY;EACI,yBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;ACFhB;ADKQ;EACI,eAAA;ACHZ;ADMI;EACI,yBAAA;EACA,aAAA;EACA,kBAAA;ACJR;ADKQ;EACI,WAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,iBAAA;EACA,eAAA;ACHZ;ADIY;EACI,yBAAA;EACA,WAAA;ACFhB;ADIY;EACI,yBAAA;EACA,WAAA;EACA,eAAA;EACA,WAAA;ACFhB;ADIY;EACI,yBAAA;EACA,WAAA;ACFhB;ADMQ;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;ACJZ;ADKY;EACI,aAAA;EACA,mBAAA;EACA,6BAAA;EACA,eAAA;EACA,mBAAA;ACHhB;ADIgB;EACI,gBAAA;ACFpB;ADMY;EACI,eAAA;EACA,6BAAA;ACJhB;ADKgB;EACI,eAAA;ACHpB;ADKgB;;;;EAEA,wBAAA;EACA,SAAA;ACDhB;ADKgB;EACI,UAAA;ACHpB;ADKgB;EACI,kBAAA;ACHpB;ADIoB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,UAAA;EACA,UAAA;EACA,gBAAA;ACFxB","file":"pricereview.css"}
{"version":3,"sources":["pricereview.scss","pricereview.css"],"names":[],"mappings":"AACI;EACI,aAAA;ACAR;ADCQ;EACI,sBAAA;ACCZ;ADCQ;EACI,cAAA;ACCZ;ADCQ;EACI,yBAAA;ACCZ;ADKQ;EACI,sBAAA;EACA,aAAA;ACHZ;ADIY;EACI,YAAA;ACFhB;ADMY;EACI,yBAAA;ACJhB;ADOgB;EACI,eAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;ACLpB;ADQY;EACI,eAAA;ACNhB;ADSQ;EACI,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,cAAA;ACPZ;ADQY;EACI,WAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,iBAAA;EACA,eAAA;ACNhB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;EACA,eAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADSY;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;ACPhB;ADQgB;EACI,aAAA;EACA,mBAAA;EACA,6BAAA;EACA,eAAA;EACA,mBAAA;ACNpB;ADOoB;EACI,gBAAA;ACLxB;ADSgB;EACI,eAAA;EACA,6BAAA;ACPpB;ADQoB;EACI,eAAA;ACNxB;ADQoB;;;;EAEA,wBAAA;EACA,SAAA;ACJpB;ADQoB;EACI,UAAA;ACNxB;ADQoB;EACI,kBAAA;ACNxB;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,UAAA;EACA,UAAA;EACA,gBAAA;ACL5B;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,WAAA;EACA,YAAA;ACL5B;ADQoB;EACI,YAAA;EACA,gBAAA;ACNxB;ADUY;EACI,aAAA;EACA,sBAAA;EACA,gBAAA;ACRhB;ADSgB;EACI,aAAA;EACA,mBAAA;EACA,cAAA;ACPpB;ADQoB;EACI,YAAA;EACA,eAAA;EACA,gBAAA;ACNxB;ADQoB;EACI,YAAA;ACNxB;ADQoB;EACI,WAAA;EACA,YAAA;EACA,SAAA;EACA,kBAAA;EACA,gBAAA;ACNxB;;ADcA;EACI,4BAAA;EACA,WAAA;ACXJ;ADYI;EACI,gBAAA;ACVR;ADYI;EACI,yBAAA;ACVR;;ADcA;EACI,eAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;EACA,oCAAA;EACA,UAAA;EACA,aAAA;EACA,aAAA;ACXJ;ADYI;EACI;IACI,gCAAA;IACA,UAAA;ECVV;EDYM;IACI,gCAAA;IACA,UAAA;ECVV;AACF;ADYI;EACI,sBAAA;ACVR;ADYI;EACI,cAAA;ACVR;ADYI;EACI,yBAAA;ACVR;ADYI;EACI,sBAAA;EACA,mBAAA;EACA,kBAAA;EACA,aAAA;EACA,aAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;EACA,0BAAA;EACA,gBAAA;EACA,8BAAA;ACVR;ADWQ;EACI,aAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,aAAA;EACA,sBAAA;ACTZ;ADUY;EACI,kBAAA;EACA,SAAA;EACA,WAAA;EACA,6BAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;ACRhB;ADUY;EACI,YAAA;ACRhB;ADWQ;EACI,kBAAA;EACA,aAAA;ACTZ","file":"pricereview.css"}

299
wms/mkt/css/pricereview.scss

@ -1,98 +1,241 @@
#pricereviewCreate{
table, th, td{
border:1px #ccc solid;
padding: 15px;
}
table{
thead th{
background-color: #6D9EEB;
>.modal{
padding: 20px;
table, th, td{
border:1px #ccc solid;
}
tbody {
td input{
font-size: 14px;
}
th{
background-color: #CCE4F8;
font-size: 14px;
padding: 15px 2px;
min-width: 100px;
text-align: center;
}
table > thead tr th{
color:#A52A2A;
}
input{
font-size: 13px;
table > tbody .selected{
background-color: #E7FEFB;
}
table > tbody .selected td{
}
}
.pricreviewmain{
background-color: #F2F2F2;
padding: 20px;
border-radius: 6px ;
button{
color:#fff;
width: 55px;
height: 30px;
padding: 0;
margin-left: 10px;
font-size: 13px;
&.addbtn{
background-color: #337AB7;
width: 30px;
.container{
table, th, td{
border:1px #ccc solid;
padding: 15px;
&.noborder, .noborder th, .noborder td{
border:none;
}
&.deleteBtn{
background-color: #D9534F;
color:#fff;
font-size: 12px;
width: 30px;
}
table{
thead th{
background-color: #6D9EEB;
}
&.selectElevator{
background-color: #D9534F;
color:#fff;
tbody {
td input{
font-size: 14px;
}
th{
background-color: #CCE4F8;
font-size: 14px;
padding: 15px 2px;
min-width: 100px;
text-align: center;
}
}
input{
font-size: 13px;
}
}
>.divitem{
border:1px #ccc solid;
padding: 10px;
border-radius: 4px ;
.title{
display: flex;
align-items: center;
border-bottom: 1px #ccc solid;
padding: 10px 0;
margin-bottom: 10px;
h6{
font-weight: 600;
.pricreviewmain{
background-color: #F2F2F2;
padding: 20px;
border-radius: 6px ;
margin:30px 0;
button{
color:#fff;
width: 55px;
height: 30px;
padding: 0;
margin-left: 10px;
font-size: 13px;
&.addbtn{
background-color: #337AB7;
width: 30px;
}
}
table, th, td{
font-size: 14px;
background-color: transparent;
input, select, textarea{
font-size: 13px;
&.deleteBtn{
background-color: #D9534F;
color:#fff;
font-size: 12px;
width: 30px;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
&.selectElevator{
background-color: #D9534F;
color:#fff;
}
}
table {
tr:hover .deleteBtn{
opacity: 1;
>.divitem{
border:1px #ccc solid;
padding: 10px;
border-radius: 4px ;
.title{
display: flex;
align-items: center;
border-bottom: 1px #ccc solid;
padding: 10px 0;
margin-bottom: 10px;
h6{
font-weight: 600;
}
}
table, th, td{
font-size: 14px;
background-color: transparent;
input, select, textarea{
font-size: 13px;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
table {
tr:hover .deleteBtn ,tr:hover .copyBtn{
opacity: 1;
}
.saletd{
position: relative;
>.deleteBtn{
position: absolute;
top: 50%;
transform: translateY(-50%);
right:2px;
opacity: 0;
transition: .3s;
}
>.copyBtn{
position: absolute;
top: 50%;
transform: translateY(-50%);
right:38px;
opacity: 0;
transition: .3s;
width: 30px;
height: 30px;
}
}
textarea{
height: auto;
min-height: 50px;
}
}
.saletd{
position: relative;
>.deleteBtn{
position: absolute;
top: 50%;
transform: translateY(-50%);
right:2px;
opacity: 0;
transition: .3s;
}
>.filediv{
display: flex;
flex-direction: column;
margin-top: 20px;
label{
display: flex;
align-items: center;
margin:10px 0;
p{
width:100px;
font-size: 15px;
font-weight: 600;
}
input[type="file"]{
width:400px
}
button{
width:90px;
height: 35px;
margin:0;
margin-right: 15px;
margin-top: 20px;
}
}
}
}
}
}
.container-fluid, .container{
max-width:1400px !important;
width: 100%;
h4{
font-weight: 600;
}
.btn-secondary{
background-color: #6C757D;
}
}
.window-modal{
position: fixed;
top: 0;
left:0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
z-index: 9;
padding: 20px;
display: none;
@keyframes fade-in {
0%{
transform: translate(-50%, -55%);
opacity: 0;
}
100%{
transform: translate(-50%, -50%);
opacity: 1;
}
}
table, th, td{
border:1px #ccc solid;
}
table > thead tr th{
color:#A52A2A;
}
table > tbody .selected{
background-color: #E7FEFB;
}
.window-modal-content{
background-color: #fff;
border-radius: 10px;
position: absolute;
width:1200px;
padding: 30px;
top: 50%;
left:50%;
transform: translate(-50%, -50%);
box-shadow: 0 5px 5px #222;
max-height: 80vh;
animation: fade-in .2s linear;
&.modal-xl{
width:1200px;
}
&.modal-lg{
width:800px;
}
&.modal-m{
width:400px;
}
.window-modal-header{
display: flex;
flex-direction: column;
button.btn-close{
position: absolute;
top: 10px;
right:10px;
background-color: transparent;
border:none;
outline: none;
border-radius: 50%;
}
>div > input{
width: 250px;
}
}
.window-modal-body{
overflow-y: scroll;
height: 400px;
}
}
}

13
wms/mkt/pricereviewCheck.php

@ -0,0 +1,13 @@
<?php
include_once('../header.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="./assets/js/alpinejs/cdn.min.js"></script>
<script src="./assets/js/pricereviewAlpine.js"></script>
<div id="pricereviewCheck" x-data=pricereviewCheck()>
</div>

1111
wms/mkt/pricereviewCreate.php

File diff suppressed because it is too large

3
wms/mkt/pricereview_mi-api.php

@ -491,8 +491,7 @@ try {
}
}
// $rarr["content"][] = $exceptArr;
print_r($rarr["content"]);
exit;
foreach($rarr["content"] as $idx=>&$item){
$newTotal = 0;
$item[16] = [];

2
wms/mkt/pricereview_renovate-edit.php

@ -2127,7 +2127,7 @@ foreach ($res as $data) {
<input type="file" name="attatch2" id="attatch2"><a href="javascript:void(0);" name="filedel2" class="btn btn-danger btn-sm">X</a>
<div class="nextline"></div><br>
<button type="submit" name="save" id="save" value="save">保存</button>&nbsp;
<button type="submit" name="submit" id="submit" value="tosign">提交</button>
<button type="submit" name="submit" id="submit" value="tosign">提交(送審)</button>
<input type="hidden" name="fp_id_all" id="fp_id_all">
<input type="hidden" name="fp_kind_all" id="fp_kind_all">

1
wms/mkt/specsurvey-create.php

@ -596,6 +596,7 @@ C:當天第3版,依次類推……" readonly>
<option value="MB010">MB010</option>
<option value="">--小電梯 天井--</option>
<option value="MB011">MB011</option>
<option value="MB012">MB012</option>
<option value="MB013">MB013</option>
<option value="MB014">MB014</option>
<option value="MB015">MB015</option>

Loading…
Cancel
Save