Browse Source

合約簽回(契約)

gary
Cheng 1 year ago
parent
commit
98868b44ee
  1. 50
      wms/bonus/other/maintenance_contract_bonus_v2_1.php
  2. 7
      wms/bonus/other/maintenance_contract_bonus_v2_1_examination.php
  3. 133
      wms/contract-repair/styles/style.css
  4. 15
      wms/contract/api/getComboNo.php
  5. 18
      wms/contract/api/getContractData.php
  6. 54
      wms/contract/api/postContractData.php
  7. 2
      wms/contract/conn.php
  8. 98
      wms/contract/contract-input.php
  9. 53
      wms/contract/js/alpine.js
  10. 2
      wms/crm/crmm02-index.php
  11. 21
      wms/mkt/assets/js/pricereviewAlpine.js
  12. 170
      wms/mkt/css/pricereview.css
  13. 2
      wms/mkt/css/pricereview.css.map
  14. 100
      wms/mkt/css/pricereview.scss
  15. 195
      wms/mkt/pricereviewMaintainCreate.php

50
wms/bonus/other/maintenance_contract_bonus_v2_1.php

@ -41,7 +41,7 @@ result_array[
function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period, $elevator_list_price, $fee_per_st, $commission_fee, $receivable_date_due, $sales_id, $region_director_id, $regular_contract_manger_id) function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period, $elevator_list_price, $fee_per_st, $commission_fee, $receivable_date_due, $sales_id, $region_director_id, $regular_contract_manger_id = '')
{ {
$bonus_array = []; $bonus_array = [];
if ($ver == "2.1") { if ($ver == "2.1") {
@ -54,13 +54,13 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
switch ($discount) { switch ($discount) {
case ($discount >= 0.8): case ($discount >= 0.8):
switch ($fee_per_st) { switch ($fee_per_st) {
case ($fee_per_st < 3000): case ($fee_per_st <= 3000):
$sales_bonus = ($fee_per_st - $commission_fee) * 0.6; $sales_bonus = ($fee_per_st - $commission_fee) * 0.6;
break; break;
case ($fee_per_st >= 3000 and $fee_per_st < 3500): case ($fee_per_st >= 3001 and $fee_per_st <= 3499):
$sales_bonus = ($fee_per_st - $commission_fee) * 0.7; $sales_bonus = ($fee_per_st - $commission_fee) * 0.7;
break; break;
case ($fee_per_st >= 3500 and $fee_per_st < 4000): case ($fee_per_st >= 3500 and $fee_per_st <= 3999):
$sales_bonus = ($fee_per_st - $commission_fee) * 0.8; $sales_bonus = ($fee_per_st - $commission_fee) * 0.8;
break; break;
case ($fee_per_st >= 4000): case ($fee_per_st >= 4000):
@ -153,36 +153,34 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
#地區處長獎金 #地區處長獎金
array_push($bonus_array, [ array_push($bonus_array, [
"bonus_type" => "2", #獎金名稱 "bonus_type" => "地區處長獎金", #獎金名稱
"bonus_receiver" => $region_director_id, #發放人員 "bonus_receiver" => $region_director_id, #發放人員
"bonus_amount" => round($region_director_bonus), #金額 "bonus_amount" => round($region_director_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間 "pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間
"bonus_regulation" => "第1次款項收回後,次月發放", #發放規定 "bonus_regulation" => "第1次款項收回後,次月發放" #發放規定
'discount' => $discount //折扣率
]); ]);
#專任契約經理獎金 #專任契約經理獎金
if ($regular_contract_manger_id != '') {
array_push($bonus_array, [ array_push($bonus_array, [
"bonus_type" => "3", #獎金名稱 "bonus_type" => "專任契約經理獎金", #獎金名稱
"bonus_receiver" => $regular_contract_manger_id, #發放人員 "bonus_receiver" => $regular_contract_manger_id, #發放人員
"bonus_amount" => round($regular_contract_manger_bonus), #金額 "bonus_amount" => round($regular_contract_manger_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間 "pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間
"bonus_regulation" => "第1次款項收回後,次月發放", #發放規定 "bonus_regulation" => "第1次款項收回後,次月發放" #發放規定
'discount' => $discount //折扣率
]); ]);
}
#契約員獎金 #契約員獎金
switch ($payment_period) { switch ($payment_period) {
#年付 #年付
case "annually": case "annually":
array_push($bonus_array, [ array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱 "bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員 "bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($sales_bonus), #金額 "bonus_amount" => round($sales_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間 "pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定 "bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
'discount' => $discount //折扣率
]); ]);
break; break;
@ -197,13 +195,11 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
$current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額 $current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額
}; };
array_push($bonus_array, [ array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱 "bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員 "bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額 "bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間 "pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定 "bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
'discount' => $discount //折扣率
]); ]);
} }
break; break;
@ -219,13 +215,11 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
$current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額 $current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額
}; };
array_push($bonus_array, [ array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱 "bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員 "bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額 "bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間 "pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定 "bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
'discount' => $discount //折扣率
]); ]);
} }
break; break;
@ -241,13 +235,11 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
$current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額 $current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額
}; };
array_push($bonus_array, [ array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱 "bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員 "bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額 "bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間 "pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定 "bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
'discount' => $discount //折扣率
]); ]);
} }
break; break;
@ -263,13 +255,11 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
$current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額 $current_bonus = round($sales_bonus - $i * round($sales_bonus * $payment_ratio_due_array[$i])); #最後一次金額
}; };
array_push($bonus_array, [ array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱 "bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員 "bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額 "bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間 "pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定 "bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
'discount' => $discount //折扣率
]); ]);
} }
break; break;

7
wms/bonus/other/maintenance_contract_bonus_v2_1_examination.php

@ -51,7 +51,7 @@ $examination_array = [
["1.0", "new", "one", 0.8, 4000, 333, "2014-07-01", "M0001", "M0002", "M0003"], ["1.0", "new", "one", 0.8, 4000, 333, "2014-07-01", "M0001", "M0002", "M0003"],
#新簽約 #新簽約
#月繳(monthly) #月繳(monthly)
["2.1","new","monthly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8) ["2.1", "new", "monthly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", ''], #新簽約、月繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "new", "monthly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8) ["2.1", "new", "monthly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "new", "monthly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8) ["2.1", "new", "monthly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "new", "monthly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8) ["2.1", "new", "monthly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
@ -261,6 +261,7 @@ $examination_array = [
for ($i = 0; $i < count($examination_array); $i++) { for ($i = 0; $i < count($examination_array); $i++) {
$examination_array[$i][9] = $examination_array[$i][9] == '' ? '' : $examination_array[$i][9];
$result = maintenance_contract_bonus_v2_1( $result = maintenance_contract_bonus_v2_1(
$examination_array[$i][0], $examination_array[$i][0],
$examination_array[$i][1], $examination_array[$i][1],
@ -284,8 +285,4 @@ for($i = 0; $i<count($examination_array); $i++){
. $result["bonus_array"][$j]["bonus_regulation"] . "<br>"; . $result["bonus_array"][$j]["bonus_regulation"] . "<br>";
}; };
echo "-------------------------" . "<br>"; echo "-------------------------" . "<br>";
}; };
?>

133
wms/contract-repair/styles/style.css

@ -1,15 +1,12 @@
@charset "UTF-8"; @charset "UTF-8";
main { main {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
margin-top: -20px; margin-top: -20px;
} }
main [x-cloak] { main [x-cloak] {
display: none !important; display: none !important;
} }
main > .sidebar { main > .sidebar {
width: 300px; width: 300px;
min-height: 100vh; min-height: 100vh;
@ -17,7 +14,6 @@ main>.sidebar {
box-shadow: 0px 0px 5px #ddd; box-shadow: 0px 0px 5px #ddd;
padding: 50px 20px; padding: 50px 20px;
} }
main > .sidebar button { main > .sidebar button {
display: block; display: block;
outline: none; outline: none;
@ -28,15 +24,12 @@ main>.sidebar button {
border-bottom: 1px #ccc solid; border-bottom: 1px #ccc solid;
opacity: 0.65; opacity: 0.65;
} }
main > .sidebar button.active { main > .sidebar button.active {
opacity: 1; opacity: 1;
} }
main > .sidebar button:hover { main > .sidebar button:hover {
opacity: 1; opacity: 1;
} }
main > .sidebar a { main > .sidebar a {
display: block; display: block;
width: 120px; width: 120px;
@ -48,17 +41,14 @@ main>.sidebar a {
color: #fff; color: #fff;
margin-top: 50px; margin-top: 50px;
} }
main .inputDiv { main .inputDiv {
padding: 30px; padding: 30px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
main .inputDiv label { main .inputDiv label {
margin-bottom: 10px; margin-bottom: 10px;
} }
main .inputDiv label input, main .inputDiv label input,
main .inputDiv label select { main .inputDiv label select {
border: 1px #aaa solid; border: 1px #aaa solid;
@ -68,7 +58,6 @@ main .inputDiv label select {
height: 32px; height: 32px;
padding: 0 10px; padding: 0 10px;
} }
main .inputDiv label button { main .inputDiv label button {
background-color: #1E74FD; background-color: #1E74FD;
color: #fff; color: #fff;
@ -80,7 +69,6 @@ main .inputDiv label button {
font-weight: 6500; font-weight: 6500;
margin-top: 15px; margin-top: 15px;
} }
main .contract-install-component, main .contract-install-component,
main .contract-material-component { main .contract-material-component {
width: 100%; width: 100%;
@ -88,24 +76,20 @@ main .contract-material-component {
margin: 30px auto; margin: 30px auto;
background-color: #f7f7f7 !important; background-color: #f7f7f7 !important;
} }
main .contract-install-component p, main .contract-install-component p,
main .contract-material-component p { main .contract-material-component p {
margin: 0; margin: 0;
} }
main .contract-install-component > .btn-list, main .contract-install-component > .btn-list,
main .contract-material-component > .btn-list { main .contract-material-component > .btn-list {
display: flex; display: flex;
align-items: center; align-items: center;
} }
main .contract-install-component > .btn-list > button, main .contract-install-component > .btn-list > button,
main .contract-material-component > .btn-list > button { main .contract-material-component > .btn-list > button {
padding: 8px; padding: 8px;
margin: 0 4px; margin: 0 4px;
} }
main .contract-install-component > .contract, main .contract-install-component > .contract,
main .contract-material-component > .contract { main .contract-material-component > .contract {
background: #fff; background: #fff;
@ -114,30 +98,25 @@ main .contract-material-component>.contract {
padding: 20px; padding: 20px;
font-family: "標楷體"; font-family: "標楷體";
} }
main .contract-install-component > .contract > h2, main .contract-install-component > .contract > h2,
main .contract-material-component > .contract > h2 { main .contract-material-component > .contract > h2 {
font-size: 18pt; font-size: 18pt;
text-align: center; text-align: center;
} }
main .contract-install-component > .contract br, main .contract-install-component > .contract br,
main .contract-material-component > .contract br { main .contract-material-component > .contract br {
line-height: 2.5; line-height: 2.5;
} }
main .contract-install-component > .contract .d-flex, main .contract-install-component > .contract .d-flex,
main .contract-material-component > .contract .d-flex { main .contract-material-component > .contract .d-flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
main .contract-install-component > .contract .mouseover, main .contract-install-component > .contract .mouseover,
main .contract-material-component > .contract .mouseover { main .contract-material-component > .contract .mouseover {
background-color: #f1f1f1; background-color: #f1f1f1;
cursor: pointer; cursor: pointer;
} }
main .contract-install-component > .contract div, main .contract-install-component > .contract div,
main .contract-install-component > .contract section, main .contract-install-component > .contract section,
main .contract-material-component > .contract div, main .contract-material-component > .contract div,
@ -145,7 +124,6 @@ main .contract-material-component>.contract section {
font-size: 12pt; font-size: 12pt;
line-height: 2.5; line-height: 2.5;
} }
main .contract-install-component > .contract div.party, main .contract-install-component > .contract div.party,
main .contract-install-component > .contract section.party, main .contract-install-component > .contract section.party,
main .contract-material-component > .contract div.party, main .contract-material-component > .contract div.party,
@ -155,14 +133,12 @@ main .contract-material-component>.contract section.party {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
main .contract-install-component > .contract div.party .company-name, main .contract-install-component > .contract div.party .company-name,
main .contract-install-component > .contract section.party .company-name, main .contract-install-component > .contract section.party .company-name,
main .contract-material-component > .contract div.party .company-name, main .contract-material-component > .contract div.party .company-name,
main .contract-material-component > .contract section.party .company-name { main .contract-material-component > .contract section.party .company-name {
text-indent: 80pt; text-indent: 80pt;
} }
main .contract-install-component > .contract div.party .notes, main .contract-install-component > .contract div.party .notes,
main .contract-install-component > .contract section.party .notes, main .contract-install-component > .contract section.party .notes,
main .contract-material-component > .contract div.party .notes, main .contract-material-component > .contract div.party .notes,
@ -170,14 +146,12 @@ main .contract-material-component>.contract section.party .notes {
margin-right: 25%; margin-right: 25%;
white-space: nowrap; white-space: nowrap;
} }
main .contract-install-component > .contract div.list-content, main .contract-install-component > .contract div.list-content,
main .contract-install-component > .contract section.list-content, main .contract-install-component > .contract section.list-content,
main .contract-material-component > .contract div.list-content, main .contract-material-component > .contract div.list-content,
main .contract-material-component > .contract section.list-content { main .contract-material-component > .contract section.list-content {
margin-left: 70px; margin-left: 70px;
} }
main .contract-install-component > .contract div.list-title, main .contract-install-component > .contract div.list-title,
main .contract-install-component > .contract section.list-title, main .contract-install-component > .contract section.list-title,
main .contract-material-component > .contract div.list-title, main .contract-material-component > .contract div.list-title,
@ -185,14 +159,12 @@ main .contract-material-component>.contract section.list-title {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
} }
main .contract-install-component > .contract div.list-title > strong, main .contract-install-component > .contract div.list-title > strong,
main .contract-install-component > .contract section.list-title > strong, main .contract-install-component > .contract section.list-title > strong,
main .contract-material-component > .contract div.list-title > strong, main .contract-material-component > .contract div.list-title > strong,
main .contract-material-component > .contract section.list-title > strong { main .contract-material-component > .contract section.list-title > strong {
min-width: 70px; min-width: 70px;
} }
main .contract-install-component > .contract p, main .contract-install-component > .contract p,
main .contract-install-component > .contract article, main .contract-install-component > .contract article,
main .contract-install-component > .contract div, main .contract-install-component > .contract div,
@ -202,7 +174,6 @@ main .contract-material-component>.contract div {
position: relative; position: relative;
display: block; display: block;
} }
main .contract-install-component > .contract .date, main .contract-install-component > .contract .date,
main .contract-material-component > .contract .date { main .contract-material-component > .contract .date {
display: flex; display: flex;
@ -210,13 +181,11 @@ main .contract-material-component>.contract .date {
width: 100%; width: 100%;
margin-top: 300px; margin-top: 300px;
} }
main .contract-install-component > .contract .date p, main .contract-install-component > .contract .date p,
main .contract-material-component > .contract .date p { main .contract-material-component > .contract .date p {
width: 50%; width: 50%;
letter-spacing: 20px; letter-spacing: 20px;
} }
main .contract-install-component > .contract .date > .ml, main .contract-install-component > .contract .date > .ml,
main .contract-material-component > .contract .date > .ml { main .contract-material-component > .contract .date > .ml {
width: 50%; width: 50%;
@ -224,7 +193,6 @@ main .contract-material-component>.contract .date>.ml {
justify-content: space-between; justify-content: space-between;
flex-direction: row-reverse; flex-direction: row-reverse;
} }
main .contract-install-component > .contract .buttons, main .contract-install-component > .contract .buttons,
main .contract-material-component > .contract .buttons { main .contract-material-component > .contract .buttons {
position: absolute; position: absolute;
@ -233,7 +201,6 @@ main .contract-material-component>.contract .buttons {
display: flex; display: flex;
z-index: 9; z-index: 9;
} }
main .contract-install-component > .contract .buttons > button, main .contract-install-component > .contract .buttons > button,
main .contract-material-component > .contract .buttons > button { main .contract-material-component > .contract .buttons > button {
width: 30px; width: 30px;
@ -248,27 +215,22 @@ main .contract-material-component>.contract .buttons>button {
color: #fff; color: #fff;
margin: 0 1px; margin: 0 1px;
} }
main .contract-install-component > .contract .buttons > button > i, main .contract-install-component > .contract .buttons > button > i,
main .contract-material-component > .contract .buttons > button > i { main .contract-material-component > .contract .buttons > button > i {
font-size: 12px; font-size: 12px;
} }
main .contract-install-component > .contract .buttons > button.edit, main .contract-install-component > .contract .buttons > button.edit,
main .contract-material-component > .contract .buttons > button.edit { main .contract-material-component > .contract .buttons > button.edit {
background-color: #5BC0DE; background-color: #5BC0DE;
} }
main .contract-install-component > .contract .buttons > button.add, main .contract-install-component > .contract .buttons > button.add,
main .contract-material-component > .contract .buttons > button.add { main .contract-material-component > .contract .buttons > button.add {
background-color: #F0AD4E; background-color: #F0AD4E;
} }
main .contract-install-component > .contract .buttons > button.delete, main .contract-install-component > .contract .buttons > button.delete,
main .contract-material-component > .contract .buttons > button.delete { main .contract-material-component > .contract .buttons > button.delete {
background-color: rgb(211, 0, 0); background-color: rgb(211, 0, 0);
} }
main .contract-install-component > .contract table, main .contract-install-component > .contract table,
main .contract-material-component > .contract table { main .contract-material-component > .contract table {
border: none; border: none;
@ -276,31 +238,26 @@ main .contract-material-component>.contract table {
font-family: "標楷體"; font-family: "標楷體";
width: 800px; width: 800px;
} }
main .contract-install-component > .contract table tr:nth-child(even), main .contract-install-component > .contract table tr:nth-child(even),
main .contract-install-component > .contract table tr:nth-child(odd), main .contract-install-component > .contract table tr:nth-child(odd),
main .contract-material-component > .contract table tr:nth-child(even), main .contract-material-component > .contract table tr:nth-child(even),
main .contract-material-component > .contract table tr:nth-child(odd) { main .contract-material-component > .contract table tr:nth-child(odd) {
background-color: #fff; background-color: #fff;
} }
main .contract-install-component > .contract table tr, main .contract-install-component > .contract table tr,
main .contract-material-component > .contract table tr { main .contract-material-component > .contract table tr {
font-size: 12pt; font-size: 12pt;
width: 100%; width: 100%;
position: relative; position: relative;
} }
main .contract-install-component > .contract table tr.mouseover, main .contract-install-component > .contract table tr.mouseover,
main .contract-material-component > .contract table tr.mouseover { main .contract-material-component > .contract table tr.mouseover {
background-color: #f3f3f3; background-color: #f3f3f3;
} }
main .contract-install-component > .contract table tr h2, main .contract-install-component > .contract table tr h2,
main .contract-material-component > .contract table tr h2 { main .contract-material-component > .contract table tr h2 {
font-size: 18pt; font-size: 18pt;
} }
main .contract-install-component > .contract table tr td, main .contract-install-component > .contract table tr td,
main .contract-material-component > .contract table tr td { main .contract-material-component > .contract table tr td {
width: 100%; width: 100%;
@ -308,14 +265,12 @@ main .contract-material-component>.contract table tr td {
line-height: 2; line-height: 2;
display: flex; display: flex;
} }
main .contract-install-component > .contract table tr td.center, main .contract-install-component > .contract table tr td.center,
main .contract-material-component > .contract table tr td.center { main .contract-material-component > .contract table tr td.center {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
main .contract-install-component > .contract table tr td.list, main .contract-install-component > .contract table tr td.list,
main .contract-material-component > .contract table tr td.list { main .contract-material-component > .contract table tr td.list {
width: 100%; width: 100%;
@ -323,20 +278,17 @@ main .contract-material-component>.contract table tr td.list {
white-space: nowrap; white-space: nowrap;
display: flex; display: flex;
} }
main .contract-install-component > .contract table tr td.list span, main .contract-install-component > .contract table tr td.list span,
main .contract-material-component > .contract table tr td.list span { main .contract-material-component > .contract table tr td.list span {
width: 100px; width: 100px;
min-height: 100%; min-height: 100%;
display: block; display: block;
} }
main .contract-install-component > .contract table tr td.list > p, main .contract-install-component > .contract table tr td.list > p,
main .contract-material-component > .contract table tr td.list > p { main .contract-material-component > .contract table tr td.list > p {
display: block; display: block;
text-align: justify; text-align: justify;
} }
main .contract-install-component > .contract table tr td.list div, main .contract-install-component > .contract table tr td.list div,
main .contract-install-component > .contract table tr td.list article, main .contract-install-component > .contract table tr td.list article,
main .contract-material-component > .contract table tr td.list div, main .contract-material-component > .contract table tr td.list div,
@ -344,7 +296,6 @@ main .contract-material-component>.contract table tr td.list article {
max-width: calc(100% - 100px); max-width: calc(100% - 100px);
white-space: normal; white-space: normal;
} }
main .contract-install-component > .contract table tr td.list div input[type=text], main .contract-install-component > .contract table tr td.list div input[type=text],
main .contract-install-component > .contract table tr td.list div input[type=number], main .contract-install-component > .contract table tr td.list div input[type=number],
main .contract-install-component > .contract table tr td.list div input, main .contract-install-component > .contract table tr td.list div input,
@ -363,7 +314,6 @@ main .contract-material-component>.contract table tr td.list article input {
outline: none; outline: none;
text-align: center; text-align: center;
} }
main .contract-install-component > .contract table tr td.list div.text-justify, main .contract-install-component > .contract table tr td.list div.text-justify,
main .contract-install-component > .contract table tr td.list article.text-justify, main .contract-install-component > .contract table tr td.list article.text-justify,
main .contract-material-component > .contract table tr td.list div.text-justify, main .contract-material-component > .contract table tr td.list div.text-justify,
@ -372,32 +322,27 @@ main .contract-material-component>.contract table tr td.list article.text-justif
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
} }
main .contract-install-component > .contract table tr.date td > div, main .contract-install-component > .contract table tr.date td > div,
main .contract-material-component > .contract table tr.date td > div { main .contract-material-component > .contract table tr.date td > div {
width: 100%; width: 100%;
text-align: right; text-align: right;
} }
main .contract-install-component > .contract table tr.date td > div.text-justify, main .contract-install-component > .contract table tr.date td > div.text-justify,
main .contract-material-component > .contract table tr.date td > div.text-justify { main .contract-material-component > .contract table tr.date td > div.text-justify {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
main .contract-install-component > .contract table td, main .contract-install-component > .contract table td,
main .contract-install-component > .contract table th, main .contract-install-component > .contract table th,
main .contract-material-component > .contract table td, main .contract-material-component > .contract table td,
main .contract-material-component > .contract table th { main .contract-material-component > .contract table th {
padding: 8px; padding: 8px;
} }
@keyframes modelanim { @keyframes modelanim {
0% { 0% {
opacity: 0; opacity: 0;
} }
} }
main .contract-model { main .contract-model {
position: fixed; position: fixed;
top: 0; top: 0;
@ -410,7 +355,6 @@ main .contract-model {
z-index: 999; z-index: 999;
animation: modelanim 0.2s linear; animation: modelanim 0.2s linear;
} }
main .contract-model > .contract-back { main .contract-model > .contract-back {
position: absolute; position: absolute;
top: 0; top: 0;
@ -419,7 +363,6 @@ main .contract-model>.contract-back {
height: 100%; height: 100%;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
} }
main .contract-model > .contract-content { main .contract-model > .contract-content {
z-index: 999; z-index: 999;
max-width: 600px; max-width: 600px;
@ -428,7 +371,6 @@ main .contract-model>.contract-content {
overflow: hidden; overflow: hidden;
background-color: white; background-color: white;
} }
main .contract-model > .contract-content > .model-header { main .contract-model > .contract-content > .model-header {
width: 100%; width: 100%;
background-color: #1E74FD; background-color: #1E74FD;
@ -438,25 +380,20 @@ main .contract-model>.contract-content>.model-header {
align-items: center; align-items: center;
padding: 0 15px; padding: 0 15px;
} }
main .contract-model > .contract-content > .model-header > i { main .contract-model > .contract-content > .model-header > i {
float: right; float: right;
color: rgba(255, 255, 255, 0.7058823529); color: rgba(255, 255, 255, 0.7058823529);
cursor: pointer; cursor: pointer;
} }
main .contract-model > .contract-content > .model-header > i:hover { main .contract-model > .contract-content > .model-header > i:hover {
color: #fff; color: #fff;
} }
main .contract-model > .contract-content > .model-header > span { main .contract-model > .contract-content > .model-header > span {
color: #fff; color: #fff;
} }
main .contract-model > .contract-content > .content { main .contract-model > .contract-content > .content {
padding: 30px; padding: 30px;
} }
main .contract-model > .contract-content > .content textarea { main .contract-model > .contract-content > .content textarea {
width: 100%; width: 100%;
resize: vertical; resize: vertical;
@ -465,7 +402,6 @@ main .contract-model>.contract-content>.content textarea {
outline: none; outline: none;
border-radius: 6px; border-radius: 6px;
} }
main .rebtn, main .rebtn,
main .prviewbtn { main .prviewbtn {
background-color: #5BC0DE; background-color: #5BC0DE;
@ -479,7 +415,6 @@ main .prviewbtn {
border-radius: 6px; border-radius: 6px;
margin-right: 5px; margin-right: 5px;
} }
main .prviewbtn { main .prviewbtn {
background-color: #2E6DA4; background-color: #2E6DA4;
} }
@ -495,7 +430,6 @@ input[type=radio].scorll {
cursor: pointer; cursor: pointer;
border-radius: 20px; border-radius: 20px;
} }
input[type=checkbox].scorll::before, input[type=checkbox].scorll::before,
input[type=radio].scorll::before { input[type=radio].scorll::before {
content: ""; content: "";
@ -509,17 +443,14 @@ input[type=radio].scorll::before {
transform: scale(0.98, 0.96); transform: scale(0.98, 0.96);
transition: 0.5s; transition: 0.5s;
} }
input[type=checkbox].scorll:checked, input[type=checkbox].scorll:checked,
input[type=radio].scorll:checked { input[type=radio].scorll:checked {
background: linear-gradient(to right, #5BC0DE, #2E6DA4); background: linear-gradient(to right, #5BC0DE, #2E6DA4);
} }
input[type=checkbox].scorll:checked::before, input[type=checkbox].scorll:checked::before,
input[type=radio].scorll:checked::before { input[type=radio].scorll:checked::before {
left: 25px; left: 25px;
} }
input[type=checkbox].scorll::after, input[type=checkbox].scorll::after,
input[type=radio].scorll::after { input[type=radio].scorll::after {
content: ""; content: "";
@ -532,80 +463,66 @@ input[type=radio].scorll::after {
width: 800px; width: 800px;
border: 1px #ccc solid; border: 1px #ccc solid;
} }
.prview table tr:nth-child(even), .prview table tr:nth-child(even),
.prview table tr:nth-child(odd) { .prview table tr:nth-child(odd) {
background-color: #fff; background-color: #fff;
} }
.prview table tr { .prview table tr {
font-size: 12pt; font-size: 12pt;
width: 100%; width: 100%;
position: relative; position: relative;
} }
.prview table tr.mouseover { .prview table tr.mouseover {
background-color: #f3f3f3; background-color: #f3f3f3;
} }
.prview table tr h2 { .prview table tr h2 {
font-size: 18pt; font-size: 18pt;
} }
.prview table tr td { .prview table tr td {
width: 100%; width: 100%;
height: 100%; height: 100%;
line-height: 2; line-height: 2;
display: flex; display: flex;
} }
.prview table tr td.center { .prview table tr td.center {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.prview table tr td.list { .prview table tr td.list {
width: 100%; width: 100%;
height: 100%; height: 100%;
white-space: nowrap; white-space: nowrap;
display: flex; display: flex;
} }
.prview table tr td.list span { .prview table tr td.list span {
width: 100px; width: 100px;
min-height: 100%; min-height: 100%;
display: block; display: block;
} }
.prview table tr td.list > p { .prview table tr td.list > p {
display: block; display: block;
text-align: justify; text-align: justify;
} }
.prview table tr td.list div, .prview table tr td.list div,
.prview table tr td.list article { .prview table tr td.list article {
max-width: calc(100% - 100px); max-width: calc(100% - 100px);
white-space: normal; white-space: normal;
} }
.prview table tr td.list div.text-justify, .prview table tr td.list div.text-justify,
.prview table tr td.list article.text-justify { .prview table tr td.list article.text-justify {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
} }
.prview table tr.date td > div { .prview table tr.date td > div {
width: 100%; width: 100%;
text-align: right; text-align: right;
} }
.prview table tr.date td > div.text-justify { .prview table tr.date td > div.text-justify {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.prview table td, .prview table td,
.prview table th { .prview table th {
padding: 8px; padding: 8px;
@ -617,78 +534,64 @@ main table {
font-family: "標楷體"; font-family: "標楷體";
width: 800px; width: 800px;
} }
main table tr:nth-child(even), main table tr:nth-child(even),
main table tr:nth-child(odd) { main table tr:nth-child(odd) {
background-color: #fff; background-color: #fff;
} }
main table tr { main table tr {
font-size: 12pt; font-size: 12pt;
width: 100%; width: 100%;
position: relative; position: relative;
} }
main table tr.mouseover { main table tr.mouseover {
background-color: #ccc; background-color: #ccc;
} }
main table tr h2 { main table tr h2 {
font-size: 18pt; font-size: 18pt;
} }
main table tr td { main table tr td {
width: 100%; width: 100%;
height: 100%; height: 100%;
line-height: 2; line-height: 2;
display: flex; display: flex;
} }
main table tr td.center { main table tr td.center {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
main table tr td.list { main table tr td.list {
width: 100%; width: 100%;
height: 100%; height: 100%;
white-space: nowrap; white-space: nowrap;
display: flex; display: flex;
} }
main table tr td.list span { main table tr td.list span {
width: 60px; width: 60px;
min-height: 100%; min-height: 100%;
display: block; display: block;
} }
main table tr td.list > p { main table tr td.list > p {
display: block; display: block;
text-align: justify; text-align: justify;
} }
main table tr td.list div { main table tr td.list div {
max-width: calc(100% - 60px); max-width: calc(100% - 60px);
white-space: normal; white-space: normal;
} }
main table tr td.list div.text-justify { main table tr td.list div.text-justify {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
} }
main table tr.date td > div { main table tr.date td > div {
width: 100%; width: 100%;
text-align: right; text-align: right;
} }
main table tr.date td > div.text-justify { main table tr.date td > div.text-justify {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
main table td, main table td,
main table th { main table th {
padding: 8px; padding: 8px;
@ -701,16 +604,13 @@ main table th {
padding: 20px; padding: 20px;
font-family: "標楷體"; font-family: "標楷體";
} }
.prview.none { .prview.none {
display: none; display: none;
} }
.prview h2 { .prview h2 {
font-size: 18pt; font-size: 18pt;
text-align: center; text-align: center;
} }
.prview p { .prview p {
font-size: 12pt; font-size: 12pt;
} }
@ -730,25 +630,21 @@ main table th {
0% { 0% {
transform: rotate(0deg); transform: rotate(0deg);
} }
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
.contract-input-component .form, .contract-input-component .form,
.contract-management .form, .contract-management .form,
.contract-new-apply-component .form { .contract-new-apply-component .form {
margin: 0 auto; margin: 0 auto;
} }
.contract-input-component .form .dropdown, .contract-input-component .form .dropdown,
.contract-management .form .dropdown, .contract-management .form .dropdown,
.contract-new-apply-component .form .dropdown { .contract-new-apply-component .form .dropdown {
width: 100%; width: 100%;
margin-top: 7px; margin-top: 7px;
} }
.contract-input-component .form .savebtn, .contract-input-component .form .savebtn,
.contract-management .form .savebtn, .contract-management .form .savebtn,
.contract-new-apply-component .form .savebtn { .contract-new-apply-component .form .savebtn {
@ -756,18 +652,16 @@ main table th {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 700px; width: 70px;
height: 45px; height: 45px;
font-size: 10px; font-size: 10px;
} }
.contract-input-component .form table .fixed, .contract-input-component .form table .fixed,
.contract-management .form table .fixed, .contract-management .form table .fixed,
.contract-new-apply-component .form table .fixed { .contract-new-apply-component .form table .fixed {
padding: 8px 0; padding: 8px 0;
cursor: not-allowed; cursor: not-allowed;
} }
.contract-input-component .form table .alerttext, .contract-input-component .form table .alerttext,
.contract-management .form table .alerttext, .contract-management .form table .alerttext,
.contract-new-apply-component .form table .alerttext { .contract-new-apply-component .form table .alerttext {
@ -778,38 +672,32 @@ main table th {
font-weight: 900; font-weight: 900;
padding: 0; padding: 0;
} }
.contract-input-component .form input[type=file], .contract-input-component .form input[type=file],
.contract-management .form input[type=file], .contract-management .form input[type=file],
.contract-new-apply-component .form input[type=file] { .contract-new-apply-component .form input[type=file] {
padding: 12px 20px; padding: 12px 20px;
margin: 8px 0; margin: 8px 0;
} }
.contract-input-component .form span, .contract-input-component .form span,
.contract-management .form span, .contract-management .form span,
.contract-new-apply-component .form span { .contract-new-apply-component .form span {
font-weight: 900; font-weight: 900;
} }
.contract-input-component .form span.successtext, .contract-input-component .form span.successtext,
.contract-management .form span.successtext, .contract-management .form span.successtext,
.contract-new-apply-component .form span.successtext { .contract-new-apply-component .form span.successtext {
color: #0a0; color: #0a0;
} }
.contract-input-component .form span.failtext, .contract-input-component .form span.failtext,
.contract-management .form span.failtext, .contract-management .form span.failtext,
.contract-new-apply-component .form span.failtext { .contract-new-apply-component .form span.failtext {
color: #a00; color: #a00;
} }
.contract-input-component .form span.readtext, .contract-input-component .form span.readtext,
.contract-management .form span.readtext, .contract-management .form span.readtext,
.contract-new-apply-component .form span.readtext { .contract-new-apply-component .form span.readtext {
color: #aa0; color: #aa0;
} }
.contract-input-component .form input[type=number]::-webkit-outer-spin-button, .contract-input-component .form input[type=number]::-webkit-outer-spin-button,
.contract-input-component .form input[type=number]::-webkit-inner-spin-button, .contract-input-component .form input[type=number]::-webkit-inner-spin-button,
.contract-management .form input[type=number]::-webkit-outer-spin-button, .contract-management .form input[type=number]::-webkit-outer-spin-button,
@ -819,13 +707,11 @@ main table th {
-webkit-appearance: none; -webkit-appearance: none;
margin: 0; margin: 0;
} }
.contract-input-component .form input[type=number], .contract-input-component .form input[type=number],
.contract-management .form input[type=number], .contract-management .form input[type=number],
.contract-new-apply-component .form input[type=number] { .contract-new-apply-component .form input[type=number] {
-moz-appearance: textfield; -moz-appearance: textfield;
} }
.contract-input-component .error, .contract-input-component .error,
.contract-management .error, .contract-management .error,
.contract-new-apply-component .error { .contract-new-apply-component .error {
@ -833,7 +719,6 @@ main table th {
flex-direction: column; flex-direction: column;
margin: 15px; margin: 15px;
} }
.contract-input-component .error .errortext, .contract-input-component .error .errortext,
.contract-management .error .errortext, .contract-management .error .errortext,
.contract-new-apply-component .error .errortext { .contract-new-apply-component .error .errortext {
@ -841,27 +726,22 @@ main table th {
font-weight: 500; font-weight: 500;
color: #a00; color: #a00;
} }
.contract-input-component .input-group-btn, .contract-input-component .input-group-btn,
.contract-management .input-group-btn, .contract-management .input-group-btn,
.contract-new-apply-component .input-group-btn { .contract-new-apply-component .input-group-btn {
font-size: 16px; font-size: 16px;
} }
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
.contract-input-component table, .contract-input-component table,
.contract-management table, .contract-management table,
.contract-new-apply-component table { .contract-new-apply-component table {
border: 0; border: 0;
} }
.contract-input-component table thead, .contract-input-component table thead,
.contract-management table thead, .contract-management table thead,
.contract-new-apply-component table thead { .contract-new-apply-component table thead {
display: none; display: none;
} }
.contract-input-component table tr, .contract-input-component table tr,
.contract-management table tr, .contract-management table tr,
.contract-new-apply-component table tr { .contract-new-apply-component table tr {
@ -869,7 +749,6 @@ main table th {
display: block; display: block;
border-bottom: 2px solid #ddd; border-bottom: 2px solid #ddd;
} }
.contract-input-component table td, .contract-input-component table td,
.contract-management table td, .contract-management table td,
.contract-new-apply-component table td { .contract-new-apply-component table td {
@ -878,13 +757,11 @@ main table th {
font-size: 14px; font-size: 14px;
border-bottom: 1px dotted #ccc; border-bottom: 1px dotted #ccc;
} }
.contract-input-component table td:last-child, .contract-input-component table td:last-child,
.contract-management table td:last-child, .contract-management table td:last-child,
.contract-new-apply-component table td:last-child { .contract-new-apply-component table td:last-child {
border-bottom: 0; border-bottom: 0;
} }
.contract-input-component table td:before, .contract-input-component table td:before,
.contract-management table td:before, .contract-management table td:before,
.contract-new-apply-component table td:before { .contract-new-apply-component table td:before {
@ -894,7 +771,6 @@ main table th {
font-weight: bold; font-weight: bold;
} }
} }
.contract-input-component .images, .contract-input-component .images,
.contract-management .images, .contract-management .images,
.contract-new-apply-component .images { .contract-new-apply-component .images {
@ -902,20 +778,17 @@ main table th {
flex-wrap: wrap; flex-wrap: wrap;
padding: 20px; padding: 20px;
} }
.contract-input-component .images > .image, .contract-input-component .images > .image,
.contract-management .images > .image, .contract-management .images > .image,
.contract-new-apply-component .images > .image { .contract-new-apply-component .images > .image {
position: relative; position: relative;
margin: 10px; margin: 10px;
} }
.contract-input-component .images > .image:hover > i, .contract-input-component .images > .image:hover > i,
.contract-management .images > .image:hover > i, .contract-management .images > .image:hover > i,
.contract-new-apply-component .images > .image:hover > i { .contract-new-apply-component .images > .image:hover > i {
opacity: 1; opacity: 1;
} }
.contract-input-component .images > .image > i, .contract-input-component .images > .image > i,
.contract-management .images > .image > i, .contract-management .images > .image > i,
.contract-new-apply-component .images > .image > i { .contract-new-apply-component .images > .image > i {
@ -961,6 +834,4 @@ label {
display: inline-flex; display: inline-flex;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
margin-top: 0.5rem; margin-top: 0.5rem;
} }/*# sourceMappingURL=style.css.map */
/*# sourceMappingURL=style.css.map */

15
wms/contract/api/getComboNo.php

@ -1,6 +1,7 @@
<?php <?php
class CreateComboNo{ class CreateComboNo
{
private $comboarr = [ private $comboarr = [
'week' => 'BW002', 'week' => 'BW002',
'month' => 'EM002', 'month' => 'EM002',
@ -21,12 +22,14 @@ class CreateComboNo{
private $combo; private $combo;
private $startdate; private $startdate;
private $enddate; private $enddate;
public function __construct($combo, $startdate, $enddate){ public function __construct($combo, $startdate, $enddate)
{
$this->combo = $combo; $this->combo = $combo;
$this->startdate = $startdate; $this->startdate = $startdate;
$this->enddate = $enddate; $this->enddate = $enddate;
} }
public function getComboNo(){ public function getComboNo()
{
$comboarr = (array) $this->combo === 'bw' ? $this->bwarr : $this->emarr; $comboarr = (array) $this->combo === 'bw' ? $this->bwarr : $this->emarr;
$startdate = new DateTime($this->startdate); $startdate = new DateTime($this->startdate);
@ -43,13 +46,13 @@ class CreateComboNo{
$first_day = date('Y-m-d', strtotime($this->startdate . ' + 3 days')); $first_day = date('Y-m-d', strtotime($this->startdate . ' + 3 days'));
$new_first_month = date('m', strtotime($first_day)); $new_first_month = date('m', strtotime($first_day));
if ($ori_first_month != $new_first_month) { if ($ori_first_month != $new_first_month) {
$first_day = date('Y-m-t', strtotime($this->startdate)); $first_day = date('Y-m-d', strtotime($this->startdate));
} }
$scheduleDate = new DateTime($first_day); $scheduleDate = new DateTime($first_day);
for ($i = 0; $i < $months; $i++){ for ($i = 0; $i <= $months; $i++) {
$newarr[] = [$this->comboarr[$comboarr[$idx]], $scheduleDate->format("Y-m-d")]; $newarr[] = [$this->comboarr[$comboarr[$idx]], $scheduleDate->format("Y-m-d")];
$idx++; $idx++;
$scheduleDate = $startdate->modify("+1 month"); $scheduleDate = $scheduleDate->modify("+1 month");
if ($idx >= count($comboarr)) { if ($idx >= count($comboarr)) {
$idx = 0; $idx = 0;
} }

18
wms/contract/api/getContractData.php

@ -23,6 +23,10 @@ if(isset($_GET['contractno']) && $_GET['contractno']!='' && isset($_GET['contrac
$stmt->execute(); $stmt->execute();
$elevators = $stmt->fetchAll(PDO::FETCH_ASSOC); $elevators = $stmt->fetchAll(PDO::FETCH_ASSOC);
$count = COUNT($elevators); $count = COUNT($elevators);
// foreach ($elevators as $key => $elevator) {
// $elevator['discount'] = ($elevator['sold_price'] / $elevator['stand_price']) * 100;
// }
$contract['elevators'] = $elevators; $contract['elevators'] = $elevators;
$contract['num'] = $count; $contract['num'] = $count;
@ -59,4 +63,18 @@ if(isset($_GET['contractno']) && $_GET['contractno']!='' && isset($_GET['contrac
} }
} }
if (!empty($_GET['contracttype']) && $_GET['contracttype'] == 'accountManger' && !empty($_GET['salesman'])) {
try {
$salesman = $_GET['salesman'];
$sql = "SELECT manager FROM account WHERE accountid = :accountid";
$stmt = $conn->prepare($sql);
$stmt->bindParam(':accountid', $salesman);
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_ASSOC);
header('Content-Type:application/json');
echo json_encode($result);
} catch (PDOException $e) {
die("ERROR!!!:" . $e->getMessage());
}
}

54
wms/contract/api/postContractData.php

@ -18,7 +18,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$phone = !empty($_POST['phone']) ? $_POST['phone'] : null; $phone = !empty($_POST['phone']) ? $_POST['phone'] : null;
$email = !empty($_POST['email']) ? $_POST['email'] : null; $email = !empty($_POST['email']) ? $_POST['email'] : null;
$mworker = !empty($_POST['mworker']) ? $_POST['mworker'] : null; $mworker = !empty($_POST['mworker']) ? $_POST['mworker'] : null;
$mcycle = !empty($_POST['mcycle']) ? $_POST['mcycle'] : null; // $mcycle = !empty($_POST['mcycle']) ? $_POST['mcycle'] : null;
$salesman = !empty($_POST['salesman']) ? $_POST['salesman'] : null; $salesman = !empty($_POST['salesman']) ? $_POST['salesman'] : null;
$contract_begin_date = !empty($_POST['contract_begin_date']) ? $_POST['contract_begin_date'] : null; $contract_begin_date = !empty($_POST['contract_begin_date']) ? $_POST['contract_begin_date'] : null;
$contract_end_date = !empty($_POST['contract_end_date']) ? $_POST['contract_end_date'] : null; $contract_end_date = !empty($_POST['contract_end_date']) ? $_POST['contract_end_date'] : null;
@ -36,16 +36,19 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$elevators = !empty($_POST['elevators']) ? json_decode($_POST['elevators'], true) : []; $elevators = !empty($_POST['elevators']) ? json_decode($_POST['elevators'], true) : [];
$payType = !empty($_POST['payType']) ? $_POST['payType'] : null; $payType = !empty($_POST['payType']) ? $_POST['payType'] : null;
// validate // validate
/// 獎金計算
bonusCreate($elevators);
$fail_arr = []; $fail_arr = [];
if ($contractno === '') return $fail_arr[] = '合約號為必填'; if ($contractno === '') return $fail_arr[] = '合約號為必填';
if ($total_price == '') $fail_arr[] = '合約總價為必填'; if ($total_price == '') $fail_arr[] = '合約總價為必填';
if ($vat == '') $fail_arr[] = '統一編號為必填'; if ($vat == '') $fail_arr[] = '統一編號為必填';
if ($mtype == '') $fail_arr[] = '維修型態為必填'; if ($mtype == '') $fail_arr[] = '維修型態為必填';
if ($phone == '') $fail_arr[] = '客戶電話為必填'; if ($phone == '') $fail_arr[] = '客戶電話為必填';
if ($email == '') $fail_arr[] = 'Email為必填'; if ($email == '') $fail_arr[] = 'Email為必填';
if ($mworker == '') $fail_arr[] = '保養員為必填'; if ($mworker == '') $fail_arr[] = '保養員為必填';
if ($mcycle == '') $fail_arr[] = '保養頻率為必填'; // if ($mcycle == '') $fail_arr[] = '保養頻率為必填';
if ($salesman == '') $fail_arr[] = '營業員為必填'; if ($salesman == '') $fail_arr[] = '營業員為必填';
if ($contract_begin_date == '') $fail_arr[] = '合約開始時間為必填'; if ($contract_begin_date == '') $fail_arr[] = '合約開始時間為必填';
if ($contract_end_date == '') $fail_arr[] = '合約結束時間為必填'; if ($contract_end_date == '') $fail_arr[] = '合約結束時間為必填';
@ -136,6 +139,11 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
'MAF100' => 'F', 'MAF100' => 'F',
'MAZ100' => 'B', 'MAZ100' => 'B',
]; ];
$maintain_times = [
'1' => 'em', //月保
'2' => 'bw' // 雙周保
];
$facility_arr = []; $facility_arr = [];
foreach ($elevators as $elevator) { foreach ($elevators as $elevator) {
$facility_arr[] = $dailyNecessities[$elevator['spec']]; $facility_arr[] = $dailyNecessities[$elevator['spec']];
@ -193,9 +201,11 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
//create schedule table //create schedule table
$comboNo = new CreateComboNo($mcycle, $contract_begin_date, $contract_end_date); // $comboNo = new CreateComboNo($mcycle, $contract_begin_date, $contract_end_date);
$comboArr = json_decode($comboNo->getComboNo(), true); // $comboArr = json_decode($comboNo->getComboNo(), true);
foreach ($facilityno as $no) { foreach ($facilityno as $no) {
// $comboNo = new CreateComboNo($maintain_times[$elevator['maintain_times']], $contract_begin_date, $contract_end_date);
$comboArr = json_decode($comboNo->getComboNo(), true);
foreach ($comboArr as $combo) { foreach ($comboArr as $combo) {
$sql_str = 'INSERT INTO schedule (contractno, facilityno, combono, repairerid, repairername, duedate, creater, create_at) VALUES (:contractno, :facilityno, :combono, :repairerid, :repairername, :duedate, :creater, :create_at)'; $sql_str = 'INSERT INTO schedule (contractno, facilityno, combono, repairerid, repairername, duedate, creater, create_at) VALUES (:contractno, :facilityno, :combono, :repairerid, :repairername, :duedate, :creater, :create_at)';
$stmt = $conn->prepare($sql_str); $stmt = $conn->prepare($sql_str);
@ -218,7 +228,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$customer_phone = $phone; $customer_phone = $phone;
$customer_email = $email; $customer_email = $email;
$repairman = $mworker; $repairman = $mworker;
$cycle = $mcycle; // $cycle = $mcycle;
$contact_person = $partyA; $contact_person = $partyA;
$contact_address = $partyAaddress; $contact_address = $partyAaddress;
$contact_phone = $partyAphone; $contact_phone = $partyAphone;
@ -285,8 +295,8 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
} else { } else {
$files = null; $files = null;
} }
$sql_str = "INSERT INTO contract_b_signed_back (contract_no, contract_type, company, customer_no, salesperson, contract_start_date, contract_end_date, total_price,payType, customer_phone, customer_email, repairman, cycle, contact_person, contact_address, contact_phone, contact_email, elevators_number, area, address, files_id, bonus, max_bonus, created_at, created_by) $sql_str = "INSERT INTO contract_b_signed_back (contract_no, contract_type, company, customer_no, salesperson, contract_start_date, contract_end_date, total_price,payType, customer_phone, customer_email, repairman, contact_person, contact_address, contact_phone, contact_email, elevators_number, area, address, files_id, bonus, max_bonus, created_at, created_by)
VALUES (:contract_no, :contract_type, :company, :customer_no, :salesperson, :contract_start_date, :contract_end_date, :total_price, :payType ,:customer_phone, :customer_email, :repairman, :cycle, :contact_person, :contact_address, :contact_phone, :contact_email, :elevators_number, :area, :address, :files_id, :bonus, :max_bonus, :created_at, :created_by)"; VALUES (:contract_no, :contract_type, :company, :customer_no, :salesperson, :contract_start_date, :contract_end_date, :total_price, :payType ,:customer_phone, :customer_email, :repairman, :contact_person, :contact_address, :contact_phone, :contact_email, :elevators_number, :area, :address, :files_id, :bonus, :max_bonus, :created_at, :created_by)";
$stmt = $conn->prepare($sql_str); $stmt = $conn->prepare($sql_str);
$stmt->bindParam(":contract_no", $contractno); $stmt->bindParam(":contract_no", $contractno);
$stmt->bindParam(":contract_type", $contract_type); $stmt->bindParam(":contract_type", $contract_type);
@ -299,7 +309,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$stmt->bindParam(":customer_phone", $customer_phone); $stmt->bindParam(":customer_phone", $customer_phone);
$stmt->bindParam(":customer_email", $customer_email); $stmt->bindParam(":customer_email", $customer_email);
$stmt->bindParam(":repairman", $repairman); $stmt->bindParam(":repairman", $repairman);
$stmt->bindParam(":cycle", $cycle); // $stmt->bindParam(":cycle", $cycle); // 保養頻率在做番上,這邊不 insert。
$stmt->bindParam(":contact_person", $contact_person); $stmt->bindParam(":contact_person", $contact_person);
$stmt->bindParam(":contact_address", $contact_address); $stmt->bindParam(":contact_address", $contact_address);
$stmt->bindParam(":contact_phone", $contact_phone); $stmt->bindParam(":contact_phone", $contact_phone);
@ -316,18 +326,8 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$stmt->execute(); $stmt->execute();
// $date = date('Y-m-sH-s-i'); // T8insert($_POST, $facilityno);
// $createTime = str_replace("-", '', $date);
// $sql = "INSERT INTO comCustomer(BizPartnerId,PersonId,CreatorId,IsInUsed,InvoiceAddress,CreateTime)VALUES(:BizPartnerId,:PersonId,:CreatorId,1,:InvoiceAddress,:CreateTime)";
// $stmt = $connT8->prepare($sql);
// $stmt->bindParam(':BizPartnerId', $contractno);
// $stmt->bindParam(':PersonId', $salesman);
// $stmt->bindParam(':CreatorId', $user_id);
// $stmt->bindParam(':InvoiceAddress', $address);
// $stmt->bindParam(':CreateTime', $createTime);
// $stmt->execute();
T8insert($_POST, $facilityno);
header('Content-Type: application/json'); header('Content-Type: application/json');
$jsonData = json_encode($files); $jsonData = json_encode($files);
@ -601,3 +601,17 @@ function T8insert($data, $facilityno)
die('Error!:' . $result['ErrorMsg']); die('Error!:' . $result['ErrorMsg']);
} }
} }
function bonusCreate($elevators)
{
require_once("../../bonus/other/maintenance_contract_bonus_v2_1.php");
$elevators = !empty($elevators) ? $elevators : '';
foreach ($elevators as $elevator) {
echo '<pre>';
print_r($elevator);
echo '</pre>';
exit;
}
}

2
wms/contract/conn.php

@ -34,7 +34,7 @@ try {
//設定主動以警告的形式報錯 //設定主動以警告的形式報錯
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$connT8 = new PDO("sqlsrv:Server=220.130.203.251;Database=T8masada", "M0225", "IFFBU1E="); $connT8 = new PDO("sqlsrv:Server=220.130.203.251;Database=T8TEST", "M0225", "IFFBU1E=");
if ($connT8) { if ($connT8) {
$connT8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $connT8->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} }

98
wms/contract/contract-input.php

@ -136,7 +136,7 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
</select> </select>
<p class="alerttext" x-show="data.mworker==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p> <p class="alerttext" x-show="data.mworker==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td> </td>
<td style="vertical-align: middle">保養頻率</td> <!-- <td style="vertical-align: middle">保養頻率</td>
<td> <td>
<select class="ui search dropdown" name="repairer_name" x-model="data.mcycle"> <select class="ui search dropdown" name="repairer_name" x-model="data.mcycle">
<option value="">選擇保養頻率</option> <option value="">選擇保養頻率</option>
@ -144,6 +144,18 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<option value="em">月保</option> <option value="em">月保</option>
</select> </select>
<p class="alerttext" x-show="data.mcycle==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p> <p class="alerttext" x-show="data.mcycle==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td> -->
<td style="vertical-align: middle">分期方式</td>
<td>
<select class="ui search dropdown" x-model="data.payType">
<option value="">選擇付款方式</option>
<option value="A40006">年繳</option>
<option value="A40007">季繳</option>
<option value="A40003">月繳</option>
<option value="A40004">雙月繳</option>
<option value="A40005">半年繳</option>
</select>
<p class="alerttext" x-show="data.payType==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -184,21 +196,13 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<input type="text" x-model="data.address" /> <input type="text" x-model="data.address" />
<p class="alerttext" x-show="data.address==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p> <p class="alerttext" x-show="data.address==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td> </td>
<td style="vertical-align: middle">分期方式</td> <td style="vertical-align: middle">附件</td>
<td colspan="2"> <td colspan="2">
<select class="ui search dropdown" x-model="data.payType"> <input type="file" name="file[]" multiple draggable="true" @change="uploadFiles($event)" />
<option value="">選擇付款方式</option>
<option value="A40006">年繳</option>
<option value="A40007">季繳</option>
<option value="A40003">月繳</option>
<option value="A40004">雙月繳</option>
<option value="A40005">半年繳</option>
</select>
<p class="alerttext" x-show="data.payType==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td> </td>
</tr> </tr>
<tr> <!-- <tr>
<td></td> <td></td>
<td></td> <td></td>
<td></td> <td></td>
@ -208,7 +212,7 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<td colspan="2"> <td colspan="2">
<input type="file" name="file[]" multiple draggable="true" @change="uploadFiles($event)" /> <input type="file" name="file[]" multiple draggable="true" @change="uploadFiles($event)" />
</td> </td>
</tr> </tr> -->
</tbody> </tbody>
</template> </template>
<template x-if="step==3"> <template x-if="step==3">
@ -320,6 +324,15 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<input class="form-control disabled_select" type="date" x-model="data.elevators[idx].useful_date"> <input class="form-control disabled_select" type="date" x-model="data.elevators[idx].useful_date">
<p class="alerttext" x-show="data.elevators[idx].useful_date=='' || !data.elevators[idx].useful_date"><i class="fa-solid fa-circle-xmark"></i>未填寫</p> <p class="alerttext" x-show="data.elevators[idx].useful_date=='' || !data.elevators[idx].useful_date"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td> </td>
<td style="vertical-align: middle">保養頻率</td>
<td>
<select class="ui search dropdown" name="repairer_name" x-model="data.elevators[idx].maintain_times">
<option value="">選擇保養頻率</option>
<option value="2">雙週保</option>
<option value="1">月保</option>
</select>
<p class="alerttext" x-show="data.maintain_times==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -334,10 +347,65 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
</tbody> </tbody>
</template> </template>
</template> </template>
<template x-if="step==4">
<template x-for="(elevator, idx) in data.elevators" :key="elevator.apply_key + elevator.register_code">
<tbody style="font-weight: bolder;margin-bottom: 20px" x-show="step==4">
<tr>
<td colspan=8>
<p x-text="'獎金計算 : 電梯' + Number(idx+1)"></p>
</td>
</tr>
<tr>
<td style="vertical-align:middle">契約人員</td>
<td><input type="text" x-model="data.salesman"></td>
<td style="vertical-align:middle">保養月份</td>
<td>
<input type="text" x-model="elevator.maintain_months">
</td>
<td style="vertical-align:middle">合約類別</td>
<td>
<select name="" id="" x-model="elevator.contract_type">
<option value="">請選擇</option>
<option value="new">新簽約</option>
<option value="free_to_charge">免保轉有費</option>
<option value="renew_priceissue">續簽約</option>
</select>
</td>
<td style="vertical-align:middle">獎金適用版本</td>
<td>
<input type="text" x-model="data.bonus_verson" disabled="disabled">
</td>
</tr>
<tr>
<td style="vertical-align:middle">作番契約金額(月)</td>
<td><input type="text" x-model="elevator.sold_price" disabled></td>
<td style="vertical-align:middle">牌價(標準價)</td>
<td>
<input type="text" x-model="elevator.stand_price" disabled>
<p>標準價+Option價格+與其他電梯共同分擔的費用貨價格</p>
</td>
<td style="vertical-align:middle">服務費</td>
<td>
<input type="text" x-model="elevator.service_expense" disabled>
</td>
<td style="vertical-align:middle">折扣率(%)</td>
<td><input type="text" x-model='elevator.discount' disabled></td>
</tr>
<tr>
<td style="vertical-align:middle">地區處長員工號</td>
<td><input type="text" x-model="elevator.manager" disabled></td>
<td style="vertical-align:middle">專任契約經理員工號</td>
<td><input type="text" x-model="elevator.regular_contract_manger_id"></td>
</tr>
</tbody>
</template>
</template>
</table> </table>
<button x-show="step==3" @click="save()" :disabled="isLoading" type="button" class="btn btn-primary btn-lg pull-right savebtn"> <button x-show=" step==4" @click="save()" :disabled="isLoading" type="button" class="btn btn-primary btn-lg pull-right savebtn">
<template x-if="!isLoading"> <template x-if="!isLoading">
<span>存檔</span> <span>存檔</span>
</template> </template>
@ -345,7 +413,7 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<div class="loader"></div> <div class="loader"></div>
</template> </template>
</button> </button>
<button x-show="step<=2" @click="nextStepFn()" type="button" class="btn btn-primary btn-lg pull-right savebtn" :disabled="isLoading"> <button x-show="step<=3" @click="nextStepFn()" type="button" class="btn btn-primary btn-lg pull-right savebtn" :disabled="isLoading">
<template x-if="!isLoading"> <template x-if="!isLoading">
<span>下一步</span> <span>下一步</span>
</template> </template>

53
wms/contract/js/alpine.js

@ -971,10 +971,16 @@ const contractInput = () => {
num: '', //電梯數量 num: '', //電梯數量
disabled: false, //資料庫是否有電梯數量資料 disabled: false, //資料庫是否有電梯數量資料
elevators: [], //機種、載重、人乘、樓停、樓層、速度、緯度、經度、開門方式、保養別、廠牌、竣檢日、許可證日期 elevators: [], //機種、載重、人乘、樓停、樓層、速度、緯度、經度、開門方式、保養別、廠牌、竣檢日、許可證日期
payType: '' //付款方式 payType: '', //付款方式
bonus_verson: 2.1,
// manager: '',
// regular_contract_manger_id: '',
// bonus: [],
}, },
customize: false, customize: false,
step: 1, step: 1,
isLoading: false, isLoading: false,
fail_arr: [], fail_arr: [],
nextStepFn() { nextStepFn() {
@ -988,6 +994,33 @@ const contractInput = () => {
this.createElevator(); this.createElevator();
} }
this.step = 3 this.step = 3
} else if (this.step == 3) {
this.getManager();
this.step = 4;
console.log(this.step);
}
},
createBonus() {
for (let i = 0; i < elevators.length; i++) {
this.data.bonus.push({
salesman: this.data.salesman,
contract_type: 'new',
bonus_verson: 2.1,
manager: this.data.manager,
discount: this.elevators[i].discount,
regular_contract_manger_id: ''
})
}
},
getManager() {
for (let i = 0; i < this.data.elevators.length; i++) {
axios.get('./api/getContractData.php?contracttype=accountManger&salesman=' + this.data.salesman).then(res => {
this.data.elevators[i].manager = res.data.manager;
console.log(res.data.manager);
}).catch(err => {
})
} }
}, },
nextStepKeyupFn(e) { nextStepKeyupFn(e) {
@ -1017,6 +1050,11 @@ const contractInput = () => {
maintainance: '', //保養別 maintainance: '', //保養別
takecertificatedate: '', //竣檢日 takecertificatedate: '', //竣檢日
useful_date: '', //許可證有效日期 useful_date: '', //許可證有效日期
maintain_times: '', //保養頻率
discount: '', //折價率
contract_type: '',
manager: '',
regular_contract_manger_id: ''
}) })
} }
}, },
@ -1028,9 +1066,13 @@ const contractInput = () => {
return return
} }
if (!this.customize) { if (!this.customize) {
this.data.elevators = res.data.elevators;
for (let i = 0; i < res.data.elevators.length; i++) { for (let i = 0; i < res.data.elevators.length; i++) {
this.data.total_price = Number(res.data.elevators[i].sold_price) + Number(this.data.total_price); this.data.total_price = Number(res.data.elevators[i].sold_price) + Number(this.data.total_price);
console.log(this.data.total_price);
// 折扣率
this.data.elevators[i].service_expense = Math.round(this.data.elevators[i].service_expense / 12);
this.data.elevators[i].discount = Math.round(((res.data.elevators[i].sold_price / res.data.elevators[i].stand_price) + this.data.elevators[i].service_expense) * 100);
} }
this.data.total_price = Number(res.data.elevators[0].maintain_months) * this.data.total_price; this.data.total_price = Number(res.data.elevators[0].maintain_months) * this.data.total_price;
this.data.salesman = res.data.salesman this.data.salesman = res.data.salesman
@ -1040,9 +1082,10 @@ const contractInput = () => {
this.data.customer = res.data.customer this.data.customer = res.data.customer
this.data.partyA = res.data.customer this.data.partyA = res.data.customer
this.data.partyAaddress = res.data.address this.data.partyAaddress = res.data.address
this.data.num = res.data.num this.data.num = res.data.num;
this.data.payType = res.data.payment_kind
this.data.disabled = (res.data.num > 0) ? true : false; this.data.disabled = (res.data.num > 0) ? true : false;
this.data.elevators = res.data.elevators
let cityIndex = this.data.address.indexOf('市'); let cityIndex = this.data.address.indexOf('市');
// console.log(cityIndex); // console.log(cityIndex);
if (cityIndex == -1) { if (cityIndex == -1) {
@ -1106,7 +1149,7 @@ const contractInput = () => {
form.append('phone', this.data.phone); form.append('phone', this.data.phone);
form.append('email', this.data.email); form.append('email', this.data.email);
form.append('mworker', this.data.mworker); form.append('mworker', this.data.mworker);
form.append('mcycle', this.data.mcycle); // form.append('mcycle', this.data.mcycle);
form.append('salesman', this.data.salesman); form.append('salesman', this.data.salesman);
form.append('contract_begin_date', this.data.contract_begin_date); form.append('contract_begin_date', this.data.contract_begin_date);
form.append('contract_end_date', this.data.contract_end_date); form.append('contract_end_date', this.data.contract_end_date);

2
wms/crm/crmm02-index.php

@ -170,7 +170,7 @@ if ($data) :
<span class="glyphicon glyphicon-pencil"></span> <span class="glyphicon glyphicon-pencil"></span>
</a> </a>
<?php if ($user_name === $row['salesman'] || $user_id = 'M0225') : ?> <?php if ($user_name === $row['salesman'] || $user_id = 'M0225') : ?>
<a href="https://bpm.masada.com.tw/km/review/km_review_main/kmReviewMain.do?method=add&fdTemplateId=18cf68c8bc2a8ec3c80950e4e2389f0a&s_css=default&vol_no=<?= $row['vol_no'] ?>" class="btn btn-info btn-sm"> <a href="../mkt/pricereviewMaintainCreate.php?function_name=customer&token=<?= $token_link ?>&vol_no=<?= $row['vol_no'] ?>" class="btn btn-info btn-sm">
轉價審 轉價審
</a> </a>
<?php endif ?> <?php endif ?>

21
wms/mkt/assets/js/pricereviewAlpine.js

@ -672,14 +672,16 @@ const pricereviewCheck = ()=>{
}, },
async getElevatorMi(idx, spec, person, stop, open, speed, item_weight) { async getElevatorMi(idx, spec, person, stop, open, speed, item_weight) {
try { try {
const res = await axios.get('./api/getElevatorMi.php', {params: { const res = await axios.get('./api/getElevatorMi.php', {
params: {
spec: spec, spec: spec,
person: person, person: person,
stop: stop, stop: stop,
open: open, open: open,
speed: speed, speed: speed,
weight: item_weight weight: item_weight
}}) }
})
console.log('---->', res.data); console.log('---->', res.data);
if (res.data) { if (res.data) {
this.elevators[idx].mi = res.data this.elevators[idx].mi = res.data
@ -777,3 +779,18 @@ const pricereviewCheck = ()=>{
}, },
} }
} }
const pricereviewMaintainCreate = () => {
return {
init() {
// this.elevators = elevator;
},
elevator: [],
async getElevatorPrice(idx) {
const spec = this.elevator[idx].specifications;
const person = this.elevators[idx].person;
},
}
}

170
wms/mkt/css/pricereview.css

@ -1,45 +1,81 @@
#pricereviewCreate > .modal { #pricereviewCreate > .modal,
#pricereviewMaintainCreate > .modal {
padding: 20px; padding: 20px;
} }
#pricereviewCreate > .modal table, #pricereviewCreate > .modal th, #pricereviewCreate > .modal td { #pricereviewCreate > .modal table,
#pricereviewCreate > .modal th,
#pricereviewCreate > .modal td,
#pricereviewMaintainCreate > .modal table,
#pricereviewMaintainCreate > .modal th,
#pricereviewMaintainCreate > .modal td {
border: 1px #ccc solid; border: 1px #ccc solid;
} }
#pricereviewCreate > .modal table > thead tr th { #pricereviewCreate > .modal table > thead tr th,
#pricereviewMaintainCreate > .modal table > thead tr th {
color: #A52A2A; color: #A52A2A;
} }
#pricereviewCreate > .modal table > tbody .selected { #pricereviewCreate > .modal table > tbody .selected,
#pricereviewMaintainCreate > .modal table > tbody .selected {
background-color: #E7FEFB; background-color: #E7FEFB;
} }
#pricereviewCreate .container table, #pricereviewCreate .container th, #pricereviewCreate .container td { #pricereviewCreate .container table,
#pricereviewCreate .container th,
#pricereviewCreate .container td,
#pricereviewMaintainCreate .container table,
#pricereviewMaintainCreate .container th,
#pricereviewMaintainCreate .container td {
border: 1px #ccc solid; border: 1px #ccc solid;
padding: 15px; padding: 15px;
} }
#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 { #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,
#pricereviewMaintainCreate .container table.noborder,
#pricereviewMaintainCreate .container table .noborder th,
#pricereviewMaintainCreate .container table .noborder td,
#pricereviewMaintainCreate .container th.noborder,
#pricereviewMaintainCreate .container th .noborder th,
#pricereviewMaintainCreate .container th .noborder td,
#pricereviewMaintainCreate .container td.noborder,
#pricereviewMaintainCreate .container td .noborder th,
#pricereviewMaintainCreate .container td .noborder td {
border: none; border: none;
} }
#pricereviewCreate .container table thead th { #pricereviewCreate .container table thead th,
#pricereviewMaintainCreate .container table thead th {
background-color: #6D9EEB; background-color: #6D9EEB;
} }
#pricereviewCreate .container table tbody td input { #pricereviewCreate .container table tbody td input,
#pricereviewMaintainCreate .container table tbody td input {
font-size: 14px; font-size: 14px;
} }
#pricereviewCreate .container table tbody th { #pricereviewCreate .container table tbody th,
#pricereviewMaintainCreate .container table tbody th {
background-color: #CCE4F8; background-color: #CCE4F8;
font-size: 14px; font-size: 14px;
padding: 15px 2px; padding: 15px 2px;
min-width: 100px; min-width: 100px;
text-align: center; text-align: center;
} }
#pricereviewCreate .container table input { #pricereviewCreate .container table input,
#pricereviewMaintainCreate .container table input {
font-size: 13px; font-size: 13px;
} }
#pricereviewCreate .container .pricreviewmain { #pricereviewCreate .container .pricreviewmain,
#pricereviewMaintainCreate .container .pricreviewmain {
background-color: #F2F2F2; background-color: #F2F2F2;
padding: 20px; padding: 20px;
border-radius: 6px; border-radius: 6px;
margin: 30px 0; margin: 30px 0;
} }
#pricereviewCreate .container .pricreviewmain button { #pricereviewCreate .container .pricreviewmain button,
#pricereviewMaintainCreate .container .pricreviewmain button {
color: #fff; color: #fff;
width: 55px; width: 55px;
height: 30px; height: 30px;
@ -47,56 +83,97 @@
margin-left: 10px; margin-left: 10px;
font-size: 13px; font-size: 13px;
} }
#pricereviewCreate .container .pricreviewmain button.addbtn { #pricereviewCreate .container .pricreviewmain button.addbtn,
#pricereviewMaintainCreate .container .pricreviewmain button.addbtn {
background-color: #337AB7; background-color: #337AB7;
width: 30px; width: 30px;
} }
#pricereviewCreate .container .pricreviewmain button.deleteBtn { #pricereviewCreate .container .pricreviewmain button.deleteBtn,
#pricereviewMaintainCreate .container .pricreviewmain button.deleteBtn {
background-color: #D9534F; background-color: #D9534F;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
width: 30px; width: 30px;
} }
#pricereviewCreate .container .pricreviewmain button.selectElevator { #pricereviewCreate .container .pricreviewmain button.selectElevator,
#pricereviewMaintainCreate .container .pricreviewmain button.selectElevator {
background-color: #D9534F; background-color: #D9534F;
color: #fff; color: #fff;
} }
#pricereviewCreate .container .pricreviewmain > .divitem { #pricereviewCreate .container .pricreviewmain > .divitem,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem {
border: 1px #ccc solid; border: 1px #ccc solid;
padding: 10px; padding: 10px;
border-radius: 4px; border-radius: 4px;
} }
#pricereviewCreate .container .pricreviewmain > .divitem .title { #pricereviewCreate .container .pricreviewmain > .divitem .title,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem .title {
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px #ccc solid; border-bottom: 1px #ccc solid;
padding: 10px 0; padding: 10px 0;
margin-bottom: 10px; margin-bottom: 10px;
} }
#pricereviewCreate .container .pricreviewmain > .divitem .title h6 { #pricereviewCreate .container .pricreviewmain > .divitem .title h6,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem .title h6 {
font-weight: 600; font-weight: 600;
} }
#pricereviewCreate .container .pricreviewmain > .divitem table, #pricereviewCreate .container .pricreviewmain > .divitem th, #pricereviewCreate .container .pricreviewmain > .divitem td { #pricereviewCreate .container .pricreviewmain > .divitem table,
#pricereviewCreate .container .pricreviewmain > .divitem th,
#pricereviewCreate .container .pricreviewmain > .divitem td,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem th,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem td {
font-size: 14px; font-size: 14px;
background-color: transparent; background-color: transparent;
} }
#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 { #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,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table input,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table select,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table textarea,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem th input,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem th select,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem th textarea,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem td input,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem td select,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem td textarea {
font-size: 13px; font-size: 13px;
} }
#pricereviewCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-outer-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 table input[type=number]::-webkit-inner-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 th input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-inner-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,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-outer-spin-button,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-inner-spin-button,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-outer-spin-button,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-inner-spin-button,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-outer-spin-button,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
margin: 0; margin: 0;
} }
#pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .deleteBtn, #pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .copyBtn { #pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .deleteBtn,
#pricereviewCreate .container .pricreviewmain > .divitem table tr:hover .copyBtn,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table tr:hover .deleteBtn,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table tr:hover .copyBtn {
opacity: 1; opacity: 1;
} }
#pricereviewCreate .container .pricreviewmain > .divitem table .saletd { #pricereviewCreate .container .pricreviewmain > .divitem table .saletd,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table .saletd {
position: relative; position: relative;
} }
#pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .deleteBtn { #pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .deleteBtn,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table .saletd > .deleteBtn {
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
@ -104,7 +181,8 @@
opacity: 0; opacity: 0;
transition: 0.3s; transition: 0.3s;
} }
#pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .copyBtn { #pricereviewCreate .container .pricreviewmain > .divitem table .saletd > .copyBtn,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table .saletd > .copyBtn {
position: absolute; position: absolute;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
@ -114,29 +192,35 @@
width: 30px; width: 30px;
height: 30px; height: 30px;
} }
#pricereviewCreate .container .pricreviewmain > .divitem table textarea { #pricereviewCreate .container .pricreviewmain > .divitem table textarea,
#pricereviewMaintainCreate .container .pricreviewmain > .divitem table textarea {
height: auto; height: auto;
min-height: 50px; min-height: 50px;
} }
#pricereviewCreate .container .pricreviewmain > .filediv { #pricereviewCreate .container .pricreviewmain > .filediv,
#pricereviewMaintainCreate .container .pricreviewmain > .filediv {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 20px; margin-top: 20px;
} }
#pricereviewCreate .container .pricreviewmain > .filediv label { #pricereviewCreate .container .pricreviewmain > .filediv label,
#pricereviewMaintainCreate .container .pricreviewmain > .filediv label {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 10px 0; margin: 10px 0;
} }
#pricereviewCreate .container .pricreviewmain > .filediv label p { #pricereviewCreate .container .pricreviewmain > .filediv label p,
#pricereviewMaintainCreate .container .pricreviewmain > .filediv label p {
width: 100px; width: 100px;
font-size: 15px; font-size: 15px;
font-weight: 600; font-weight: 600;
} }
#pricereviewCreate .container .pricreviewmain > .filediv label input[type=file] { #pricereviewCreate .container .pricreviewmain > .filediv label input[type=file],
#pricereviewMaintainCreate .container .pricreviewmain > .filediv label input[type=file] {
width: 400px; width: 400px;
} }
#pricereviewCreate .container .pricreviewmain > .filediv label button { #pricereviewCreate .container .pricreviewmain > .filediv label button,
#pricereviewMaintainCreate .container .pricreviewmain > .filediv label button {
width: 90px; width: 90px;
height: 35px; height: 35px;
margin: 0; margin: 0;
@ -144,14 +228,17 @@
margin-top: 20px; margin-top: 20px;
} }
.container-fluid, .container { .container-fluid,
.container {
max-width: 1400px !important; max-width: 1400px !important;
width: 100%; width: 100%;
} }
.container-fluid h4, .container h4 { .container-fluid h4,
.container h4 {
font-weight: 600; font-weight: 600;
} }
.container-fluid .btn-secondary, .container .btn-secondary { .container-fluid .btn-secondary,
.container .btn-secondary {
background-color: #6C757D; background-color: #6C757D;
} }
@ -176,7 +263,9 @@
opacity: 1; opacity: 1;
} }
} }
.window-modal table, .window-modal th, .window-modal td { .window-modal table,
.window-modal th,
.window-modal td {
border: 1px #ccc solid; border: 1px #ccc solid;
} }
.window-modal table > thead tr th { .window-modal table > thead tr th {
@ -236,13 +325,16 @@
#pricereviewCheck > .container textarea { #pricereviewCheck > .container textarea {
resize: vertical; resize: vertical;
} }
#pricereviewCheck > .container table, #pricereviewCheck > .container th, #pricereviewCheck > .container td { #pricereviewCheck > .container table,
#pricereviewCheck > .container th,
#pricereviewCheck > .container td {
border: 1px #ccc solid; border: 1px #ccc solid;
} }
#pricereviewCheck > .container table.noborder { #pricereviewCheck > .container table.noborder {
border: none !important; border: none !important;
} }
#pricereviewCheck > .container table.noborder th, #pricereviewCheck > .container table.noborder td { #pricereviewCheck > .container table.noborder th,
#pricereviewCheck > .container table.noborder td {
border: none !important; border: none !important;
} }
#pricereviewCheck > .container .customerinfo-table input { #pricereviewCheck > .container .customerinfo-table input {

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

@ -1 +1 @@
{"version":3,"sources":["pricereview.scss","pricereview.css"],"names":[],"mappings":"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","file":"pricereview.css"} {"version":3,"sources":["pricereview.scss","pricereview.css"],"names":[],"mappings":"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","file":"pricereview.css"}

100
wms/mkt/css/pricereview.scss

@ -1,34 +1,50 @@
#pricereviewCreate{ #pricereviewCreate,
#pricereviewMaintainCreate {
>.modal { >.modal {
padding: 20px; padding: 20px;
table, th, td{
table,
th,
td {
border: 1px #ccc solid; border: 1px #ccc solid;
} }
table>thead tr th { table>thead tr th {
color: #A52A2A; color: #A52A2A;
} }
table>tbody .selected { table>tbody .selected {
background-color: #E7FEFB; background-color: #E7FEFB;
} }
table > tbody .selected td{
} table>tbody .selected td {}
} }
.container { .container {
table, th, td{
table,
th,
td {
border: 1px #ccc solid; border: 1px #ccc solid;
padding: 15px; padding: 15px;
&.noborder, .noborder th, .noborder td{
&.noborder,
.noborder th,
.noborder td {
border: none; border: none;
} }
} }
table { table {
thead th { thead th {
background-color: #6D9EEB; background-color: #6D9EEB;
} }
tbody { tbody {
td input { td input {
font-size: 14px; font-size: 14px;
} }
th { th {
background-color: #CCE4F8; background-color: #CCE4F8;
font-size: 14px; font-size: 14px;
@ -37,15 +53,18 @@
text-align: center; text-align: center;
} }
} }
input { input {
font-size: 13px; font-size: 13px;
} }
} }
.pricreviewmain { .pricreviewmain {
background-color: #F2F2F2; background-color: #F2F2F2;
padding: 20px; padding: 20px;
border-radius: 6px; border-radius: 6px;
margin: 30px 0; margin: 30px 0;
button { button {
color: #fff; color: #fff;
width: 55px; width: 55px;
@ -53,16 +72,19 @@
padding: 0; padding: 0;
margin-left: 10px; margin-left: 10px;
font-size: 13px; font-size: 13px;
&.addbtn { &.addbtn {
background-color: #337AB7; background-color: #337AB7;
width: 30px; width: 30px;
} }
&.deleteBtn { &.deleteBtn {
background-color: #D9534F; background-color: #D9534F;
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
width: 30px; width: 30px;
} }
&.selectElevator { &.selectElevator {
background-color: #D9534F; background-color: #D9534F;
color: #fff; color: #fff;
@ -73,35 +95,49 @@
border: 1px #ccc solid; border: 1px #ccc solid;
padding: 10px; padding: 10px;
border-radius: 4px; border-radius: 4px;
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px #ccc solid; border-bottom: 1px #ccc solid;
padding: 10px 0; padding: 10px 0;
margin-bottom: 10px; margin-bottom: 10px;
h6 { h6 {
font-weight: 600; font-weight: 600;
} }
} }
table, th, td{
table,
th,
td {
font-size: 14px; font-size: 14px;
background-color: transparent; background-color: transparent;
input, select, textarea{
input,
select,
textarea {
font-size: 13px; font-size: 13px;
} }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
margin: 0; margin: 0;
} }
} }
table { table {
tr:hover .deleteBtn ,tr:hover .copyBtn{
tr:hover .deleteBtn,
tr:hover .copyBtn {
opacity: 1; opacity: 1;
} }
.saletd { .saletd {
position: relative; position: relative;
>.deleteBtn { >.deleteBtn {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -110,6 +146,7 @@
opacity: 0; opacity: 0;
transition: .3s; transition: .3s;
} }
>.copyBtn { >.copyBtn {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -121,28 +158,34 @@
height: 30px; height: 30px;
} }
} }
textarea { textarea {
height: auto; height: auto;
min-height: 50px; min-height: 50px;
} }
} }
} }
>.filediv { >.filediv {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 20px; margin-top: 20px;
label { label {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 10px 0; margin: 10px 0;
p { p {
width: 100px; width: 100px;
font-size: 15px; font-size: 15px;
font-weight: 600; font-weight: 600;
} }
input[type="file"] { input[type="file"] {
width: 400px width: 400px
} }
button { button {
width: 90px; width: 90px;
height: 35px; height: 35px;
@ -156,12 +199,15 @@
} }
} }
.container-fluid, .container{ .container-fluid,
.container {
max-width: 1400px !important; max-width: 1400px !important;
width: 100%; width: 100%;
h4 { h4 {
font-weight: 600; font-weight: 600;
} }
.btn-secondary { .btn-secondary {
background-color: #6C757D; background-color: #6C757D;
} }
@ -177,25 +223,33 @@
z-index: 9; z-index: 9;
padding: 20px; padding: 20px;
display: none; display: none;
@keyframes fade-in { @keyframes fade-in {
0% { 0% {
transform: translate(-50%, -55%); transform: translate(-50%, -55%);
opacity: 0; opacity: 0;
} }
100% { 100% {
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
opacity: 1; opacity: 1;
} }
} }
table, th, td{
table,
th,
td {
border: 1px #ccc solid; border: 1px #ccc solid;
} }
table>thead tr th { table>thead tr th {
color: #A52A2A; color: #A52A2A;
} }
table>tbody .selected { table>tbody .selected {
background-color: #E7FEFB; background-color: #E7FEFB;
} }
.window-modal-content { .window-modal-content {
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 10px;
@ -208,18 +262,23 @@
box-shadow: 0 5px 5px #222; box-shadow: 0 5px 5px #222;
max-height: 80vh; max-height: 80vh;
animation: fade-in .2s linear; animation: fade-in .2s linear;
&.modal-xl { &.modal-xl {
width: 1200px; width: 1200px;
} }
&.modal-lg { &.modal-lg {
width: 800px; width: 800px;
} }
&.modal-m { &.modal-m {
width: 400px; width: 400px;
} }
.window-modal-header { .window-modal-header {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
button.btn-close { button.btn-close {
position: absolute; position: absolute;
top: 10px; top: 10px;
@ -229,10 +288,12 @@
outline: none; outline: none;
border-radius: 50%; border-radius: 50%;
} }
>div>input { >div>input {
width: 250px; width: 250px;
} }
} }
.window-modal-body { .window-modal-body {
overflow-y: scroll; overflow-y: scroll;
height: 400px; height: 400px;
@ -245,39 +306,52 @@
background-color: #F2F2F2; background-color: #F2F2F2;
border-radius: 15px; border-radius: 15px;
padding: 20px; padding: 20px;
textarea { textarea {
resize: vertical; resize: vertical;
} }
table, th, td{
table,
th,
td {
border: 1px #ccc solid; border: 1px #ccc solid;
} }
table.noborder { table.noborder {
border: none !important; border: none !important;
th ,td{
th,
td {
border: none !important; border: none !important;
} }
} }
.customerinfo-table { .customerinfo-table {
input { input {
background-color: #EEE5E5; background-color: #EEE5E5;
} }
} }
.mi-table { .mi-table {
th { th {
font-weight: 600; font-weight: 600;
} }
input[type=text] { input[type=text] {
background-color: #EEEEEE; background-color: #EEEEEE;
cursor: not-allowed; cursor: not-allowed;
padding: 6px 12px; padding: 6px 12px;
font-size: 14px; font-size: 14px;
} }
.mi-info { .mi-info {
font-size: 14px; font-size: 14px;
span { span {
font-size: 15px; font-size: 15px;
font-weight: 600; font-weight: 600;
} }
.line { .line {
width: 100%; width: 100%;
height: .5px; height: .5px;

195
wms/mkt/pricereviewMaintainCreate.php

@ -0,0 +1,195 @@
<?php
include_once('../header.php');
require_once('./conn.php');
$vol_no = empty($_GET['vol_no']) ? '' : $_GET['vol_no'];
// 有望客戶
$sql = "SELECT a.*,b.content FROM hope_contract_customer AS a
LEFT JOIN code AS b ON a.source = b.code_name
WHERE a.vol_no = '$vol_no' AND b.field_name = 'customer_source'
";
$stmt = $conn->prepare($sql);
// $stmt->bindParam(':vol_no', $vol_no);
$stmt->execute();
$hope_contract = $stmt->fetch(PDO::FETCH_ASSOC);
$hope_customer_status = [
'A' => '有望簽約(已報價)',
'B' => '觀望考慮(等待時機報價)',
'C' => '在途合約',
'D' => '已簽約',
'N' => '無望簽約',
];
$salename = $hope_contract['salesman'];
$sql = "SELECT * FROM account WHERE accountid = :salename";
$stmt = $conn->prepare($sql);
$stmt->bindParam(':salename', $salename);
$stmt->execute();
$salename = $stmt->fetch(PDO::FETCH_ASSOC);
// echo '<pre>';
// print_r($hope_customer_status);
// echo '</pre>';
?>
<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="pricereviewMaintainCreate" x-data=pricereviewMaintainCreate()>
<div class="container">
<table class="table" border="1">
<thead>
<tr class=""></tr>
<th scope="col" class="text-center" colspan=8>有望客戶基本資料</th>
</thead>
<tbody>
<tr>
<th>卷號</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['vol_no'] ?>"></td>
<th>客戶名稱</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['customer'] ?>"></td>
<th>負責人</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['manager'] ?>"></td>
<th>客戶來源</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['content'] ?>"></td>
</tr>
<tr>
<th>地址</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['address'] ?>"></td>
<th>案件名稱</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['customer'] ?>"></td>
<th>市話 / 手機</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['tel'] ?>"></td>
<th>業主方聯繫人</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['linkman'] ?>"></td>
</tr>
<tr>
<th>營業員</th>
<td><input type="text" class="form-control" disabled value="<?= $salename['name'] ?>"></td>
<th>台數</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['num'] ?>"></td>
<th>預定成交日</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_contract['pre_order_date'] ?>"></td>
<th>有望客戶狀態</th>
<td><input type="text" class="form-control" disabled value="<?= $hope_customer_status[$hope_contract['status']] ?>"></td>
</tr>
<tr>
<th>有望客戶狀態</th>
<td><input type="text" class="form-control" disabled value=""></td>
</tr>
</tbody>
</table>
<table class="table" border="1">
<thead>
<tr class=""></tr>
<th scope="col" class="text-center" colspan="8">洽商進度</th>
</thead>
<tbody>
<td colspan=8>
<textarea name="progress" class="form-control" id="progress" cols="20" rows="5" disabled><?= $hope_contract['progress_status'] ?></textarea>
</td>
</tbody>
</table>
<div class="pricreviewmain container">
<div class="divitem">
<div class="title">
<h4>整機單價</h4>
<button class="addbtn btn" x-ref="addElevatorBtn" data-bs-toggle="modal" data-bs-target="#createElevatorModal">+</button>
</div>
<table class="table" border=1>
<thead>
<tr>
<td>項次</td>
<td>電梯</td>
<td>人乘/<br>載重</td>
<td>停數</td>
<td>速度(m/min)</td>
<td>保養月數</td>
<td>保養次數(月)</td>
<td>保養方式</td>
<td>公司發布價(月)</td>
<td>數量</td>
<td>公司發布價(總價)</td>
<td>售價(月)</td>
<td>售價(總價)</td>
</tr>
</thead>
<tbody>
<template x-for="(elevator, idx) in elevator" :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>
</select>
</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>
</td>
<td>
<input type="number" class="form-control" style="width: 83px;" x-model="elevator.stop" @keyup="getElevatorPrice(idx)" ">
</td>
<td>
<select name="" id="" class=" form-control" x-model="elevator.speed" @change="getElevatorPrice(idx)"></select>
<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>
</td>
<td>
<input type="number" class="form-control" style="width: 63px;" x-model="maintain_month" @keyup="getElevatorPrice(idx)">
</td>
<td>
<input type="number" class="form-control" style="width: 63px;" x-model="maintain_times" @keyup="getElevatorPrice(idx)">
</td>
<td>
<select name="" id="" class="form-control" style="width: 63px" x-model="maintain_kind" @change="getElevatorPrice(idx)">
<option value="">請選擇</option>
<option value="2">半包</option>
<option value="3">全包</option>
<option value="4">清包</option>
</select>
</td>
</tr>
</template>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
const body = document.querySelector('body');
// const elevator = [...<?= json_encode($hope_elevator) ?>];
</script>
Loading…
Cancel
Save