Browse Source

合約簽回(契約)

gary
Cheng 1 year ago
parent
commit
290bcfcc9d
  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. 161
      wms/mkt/assets/js/pricereviewAlpine.js
  12. 236
      wms/mkt/css/pricereview.css
  13. 11
      wms/mkt/css/pricereview.css.map
  14. 137
      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 = [];
if ($ver == "2.1") {
@ -54,13 +54,13 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
switch ($discount) {
case ($discount >= 0.8):
switch ($fee_per_st) {
case ($fee_per_st < 3000):
case ($fee_per_st <= 3000):
$sales_bonus = ($fee_per_st - $commission_fee) * 0.6;
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;
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;
break;
case ($fee_per_st >= 4000):
@ -153,36 +153,34 @@ function maintenance_contract_bonus_v2_1($ver, $contract_type, $payment_period,
#地區處長獎金
array_push($bonus_array, [
"bonus_type" => "2", #獎金名稱
"bonus_type" => "地區處長獎金", #獎金名稱
"bonus_receiver" => $region_director_id, #發放人員
"bonus_amount" => round($region_director_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間
"bonus_regulation" => "第1次款項收回後,次月發放", #發放規定
'discount' => $discount //折扣率
"bonus_regulation" => "第1次款項收回後,次月發放" #發放規定
]);
#專任契約經理獎金
if ($regular_contract_manger_id != '') {
array_push($bonus_array, [
"bonus_type" => "3", #獎金名稱
"bonus_type" => "專任契約經理獎金", #獎金名稱
"bonus_receiver" => $regular_contract_manger_id, #發放人員
"bonus_amount" => round($regular_contract_manger_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間
"bonus_regulation" => "第1次款項收回後,次月發放", #發放規定
'discount' => $discount //折扣率
"bonus_regulation" => "第1次款項收回後,次月發放" #發放規定
]);
}
#契約員獎金
switch ($payment_period) {
#年付
case "annually":
array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱
"bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($sales_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +1 months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定
'discount' => $discount //折扣率
"bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
]);
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])); #最後一次金額
};
array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱
"bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定
'discount' => $discount //折扣率
"bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
]);
}
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])); #最後一次金額
};
array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱
"bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定
'discount' => $discount //折扣率
"bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
]);
}
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])); #最後一次金額
};
array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱
"bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定
'discount' => $discount //折扣率
"bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
]);
}
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])); #最後一次金額
};
array_push($bonus_array, [
"bonus_type" => "1", #獎金名稱
"bonus_type" => "契約員獎金", #獎金名稱
"bonus_receiver" => $sales_id, #發放人員
"bonus_amount" => round($current_bonus), #金額
"pay_day_due" => date("Y-m-d", strtotime("$receivable_date_due +$payday_due_array[$i] months")), #預計發放時間
"bonus_regulation" => "每月收款後,按收款比率次月發放", #發放規定
'discount' => $discount //折扣率
"bonus_regulation" => "每月收款後,按收款比率次月發放" #發放規定
]);
}
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"],
#新簽約
#月繳(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, 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)
@ -261,6 +261,7 @@ $examination_array = [
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(
$examination_array[$i][0],
$examination_array[$i][1],
@ -284,8 +285,4 @@ for($i = 0; $i<count($examination_array); $i++){
. $result["bonus_array"][$j]["bonus_regulation"] . "<br>";
};
echo "-------------------------" . "<br>";
};
?>

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

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

18
wms/contract/api/getContractData.php

@ -23,6 +23,10 @@ if(isset($_GET['contractno']) && $_GET['contractno']!='' && isset($_GET['contrac
$stmt->execute();
$elevators = $stmt->fetchAll(PDO::FETCH_ASSOC);
$count = COUNT($elevators);
// foreach ($elevators as $key => $elevator) {
// $elevator['discount'] = ($elevator['sold_price'] / $elevator['stand_price']) * 100;
// }
$contract['elevators'] = $elevators;
$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;
$email = !empty($_POST['email']) ? $_POST['email'] : 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;
$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;
@ -36,16 +36,19 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$elevators = !empty($_POST['elevators']) ? json_decode($_POST['elevators'], true) : [];
$payType = !empty($_POST['payType']) ? $_POST['payType'] : null;
// validate
/// 獎金計算
bonusCreate($elevators);
$fail_arr = [];
if ($contractno === '') return $fail_arr[] = '合約號為必填';
if ($total_price == '') $fail_arr[] = '合約總價為必填';
if ($vat == '') $fail_arr[] = '統一編號為必填';
if ($mtype == '') $fail_arr[] = '維修型態為必填';
if ($phone == '') $fail_arr[] = '客戶電話為必填';
if ($email == '') $fail_arr[] = 'Email為必填';
if ($mworker == '') $fail_arr[] = '保養員為必填';
if ($mcycle == '') $fail_arr[] = '保養頻率為必填';
// if ($mcycle == '') $fail_arr[] = '保養頻率為必填';
if ($salesman == '') $fail_arr[] = '營業員為必填';
if ($contract_begin_date == '') $fail_arr[] = '合約開始時間為必填';
if ($contract_end_date == '') $fail_arr[] = '合約結束時間為必填';
@ -136,6 +139,11 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
'MAF100' => 'F',
'MAZ100' => 'B',
];
$maintain_times = [
'1' => 'em', //月保
'2' => 'bw' // 雙周保
];
$facility_arr = [];
foreach ($elevators as $elevator) {
$facility_arr[] = $dailyNecessities[$elevator['spec']];
@ -193,9 +201,11 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
//create schedule table
$comboNo = new CreateComboNo($mcycle, $contract_begin_date, $contract_end_date);
$comboArr = json_decode($comboNo->getComboNo(), true);
// $comboNo = new CreateComboNo($mcycle, $contract_begin_date, $contract_end_date);
// $comboArr = json_decode($comboNo->getComboNo(), true);
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) {
$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);
@ -218,7 +228,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$customer_phone = $phone;
$customer_email = $email;
$repairman = $mworker;
$cycle = $mcycle;
// $cycle = $mcycle;
$contact_person = $partyA;
$contact_address = $partyAaddress;
$contact_phone = $partyAphone;
@ -285,8 +295,8 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
} else {
$files = null;
}
$sql_str = "INSERT INTO contract_b_signed_back (contract_no, contract_type, company, customer_no, salesperson, contract_start_date, contract_end_date, total_price,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, :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, :contact_person, :contact_address, :contact_phone, :contact_email, :elevators_number, :area, :address, :files_id, :bonus, :max_bonus, :created_at, :created_by)";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(":contract_no", $contractno);
$stmt->bindParam(":contract_type", $contract_type);
@ -299,7 +309,7 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$stmt->bindParam(":customer_phone", $customer_phone);
$stmt->bindParam(":customer_email", $customer_email);
$stmt->bindParam(":repairman", $repairman);
$stmt->bindParam(":cycle", $cycle);
// $stmt->bindParam(":cycle", $cycle); // 保養頻率在做番上,這邊不 insert。
$stmt->bindParam(":contact_person", $contact_person);
$stmt->bindParam(":contact_address", $contact_address);
$stmt->bindParam(":contact_phone", $contact_phone);
@ -316,18 +326,8 @@ if (isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['c
$stmt->execute();
// $date = date('Y-m-sH-s-i');
// $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);
// T8insert($_POST, $facilityno);
// $stmt->execute();
T8insert($_POST, $facilityno);
header('Content-Type: application/json');
$jsonData = json_encode($files);
@ -601,3 +601,17 @@ function T8insert($data, $facilityno)
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);
$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) {
$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>
<p class="alerttext" x-show="data.mworker==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
<td style="vertical-align: middle">保養頻率</td>
<!-- <td style="vertical-align: middle">保養頻率</td>
<td>
<select class="ui search dropdown" name="repairer_name" x-model="data.mcycle">
<option value="">選擇保養頻率</option>
@ -144,6 +144,18 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<option value="em">月保</option>
</select>
<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>
</tr>
<tr>
@ -184,21 +196,13 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<input type="text" x-model="data.address" />
<p class="alerttext" x-show="data.address==''"><i class="fa-solid fa-circle-xmark"></i>未填寫</p>
</td>
<td style="vertical-align: middle">分期方式</td>
<td style="vertical-align: middle">附件</td>
<td colspan="2">
<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>
<input type="file" name="file[]" multiple draggable="true" @change="uploadFiles($event)" />
</td>
</tr>
<tr>
<!-- <tr>
<td></td>
<td></td>
<td></td>
@ -208,7 +212,7 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<td colspan="2">
<input type="file" name="file[]" multiple draggable="true" @change="uploadFiles($event)" />
</td>
</tr>
</tr> -->
</tbody>
</template>
<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">
<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 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>
<td></td>
@ -334,10 +347,65 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
</tbody>
</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>
<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">
<span>存檔</span>
</template>
@ -345,7 +413,7 @@ $contractpersons = $stmt->fetchAll(PDO::FETCH_ASSOC);
<div class="loader"></div>
</template>
</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">
<span>下一步</span>
</template>

53
wms/contract/js/alpine.js

@ -971,10 +971,16 @@ const contractInput = () => {
num: '', //電梯數量
disabled: false, //資料庫是否有電梯數量資料
elevators: [], //機種、載重、人乘、樓停、樓層、速度、緯度、經度、開門方式、保養別、廠牌、竣檢日、許可證日期
payType: '' //付款方式
payType: '', //付款方式
bonus_verson: 2.1,
// manager: '',
// regular_contract_manger_id: '',
// bonus: [],
},
customize: false,
step: 1,
isLoading: false,
fail_arr: [],
nextStepFn() {
@ -988,6 +994,33 @@ const contractInput = () => {
this.createElevator();
}
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) {
@ -1017,6 +1050,11 @@ const contractInput = () => {
maintainance: '', //保養別
takecertificatedate: '', //竣檢日
useful_date: '', //許可證有效日期
maintain_times: '', //保養頻率
discount: '', //折價率
contract_type: '',
manager: '',
regular_contract_manger_id: ''
})
}
},
@ -1028,9 +1066,13 @@ const contractInput = () => {
return
}
if (!this.customize) {
this.data.elevators = res.data.elevators;
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);
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.salesman = res.data.salesman
@ -1040,9 +1082,10 @@ const contractInput = () => {
this.data.customer = res.data.customer
this.data.partyA = res.data.customer
this.data.partyAaddress = res.data.address
this.data.num = res.data.num
this.data.num = res.data.num;
this.data.payType = res.data.payment_kind
this.data.disabled = (res.data.num > 0) ? true : false;
this.data.elevators = res.data.elevators
let cityIndex = this.data.address.indexOf('市');
// console.log(cityIndex);
if (cityIndex == -1) {
@ -1106,7 +1149,7 @@ const contractInput = () => {
form.append('phone', this.data.phone);
form.append('email', this.data.email);
form.append('mworker', this.data.mworker);
form.append('mcycle', this.data.mcycle);
// form.append('mcycle', this.data.mcycle);
form.append('salesman', this.data.salesman);
form.append('contract_begin_date', this.data.contract_begin_date);
form.append('contract_end_date', this.data.contract_end_date);

2
wms/crm/crmm02-index.php

@ -170,7 +170,7 @@ if ($data) :
<span class="glyphicon glyphicon-pencil"></span>
</a>
<?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>
<?php endif ?>

161
wms/mkt/assets/js/pricereviewAlpine.js

@ -101,14 +101,14 @@ const pricereviewCreate = ()=>{
const open_converted = this.elevators[idx].open_converted
const speed = this.elevators[idx].speed
const model = spec + '-' + person + '*' + stop + '-' + open_converted + speed;
console.log(model);
try {
const res = await axios.get("./api/getElevatorPrice.php", { params: { model: model } })
console.log(res.data);
if(res.data.id == null || res.data.id == ""){
if (res.data == null || res.data == "") {
console.log("公司並無提供此規格!!");
}
this.elevators[idx].price = res.data.price
this.elevators[idx].facility_id = res.data.id
this.elevators[idx].price = res.data
} catch (error) {
console.error("Error fetching elevator price:", error);
}
@ -119,11 +119,10 @@ const pricereviewCreate = ()=>{
try {
const res = await axios.get("./api/getElevatorPrice.php", { params: { model: model } })
console.log(res.data);
if(res.data.id == null || res.data.id == ""){
if (res.data == null || res.data == "") {
console.log("公司並無提供此規格!!");
}
this.modalElevatorInfo.price = res.data.price
this.modalElevatorInfo.facility_id = res.data.id
this.modalElevatorInfo.price = res.data
} catch (error) {
console.error("Error fetching elevator price:", error);
}
@ -231,52 +230,6 @@ const pricereviewCreate = ()=>{
this.$refs.optionsModal.style.display = 'none';
body.style.overflow = 'auto'
},
hideToElevatorModal(){
this.$refs.toElevatorModal.style.display = 'none';
body.style.overflow = 'auto'
},
hideToOtherOptionElevatorModal(){
this.$refs.toOtherOptionElevatorModal.style.display = 'none';
body.style.overflow = 'auto'
},
hideToMaintainOptionElevatorModal(){
this.$refs.toMaintainOptionElevatorModal.style.display = 'none';
body.style.overflow = 'auto'
},
hideCreateElevatorModal(){
this.$refs.createElevatorModal.style.display = 'none';
body.style.overflow = 'auto'
this.modalElevatorInfo = {
spec:'',
person:'',
stop:'',
speed:'',
open:'CO',
num: 1,
price:'',
sale_price:'',
};
},
hideCreateOtherOptionModal(){
this.$refs.createOtherOptionModal.style.display = 'none';
body.style.overflow = 'auto'
},
hideCreateMaintainModal(){
this.$refs.createMaintainModal.style.display = 'none';
body.style.overflow = 'auto'
},
openCreateElevatorModal(){
this.$refs.createElevatorModal.style.display = 'block';
body.style.overflow = 'hidden'
},
openCreateOtherOptionFn(){
this.$refs.createOtherOptionModal.style.display = 'block';
body.style.overflow = 'hidden'
},
openCreateMaintainModal(){
this.$refs.createMaintainModal.style.display = 'block';
body.style.overflow = 'hidden'
},
totalElevatorsPrice() {
return this.elevators.reduce((total, elevator) => {
return total + (elevator.spec_num * elevator.price);
@ -320,10 +273,18 @@ const pricereviewCreate = ()=>{
price: this.modalElevatorInfo.price,
open: '',
spec_num: this.modalElevatorInfo.num,
facility_id: this.modalElevatorInfo.facility_id,
});
console.log(this.elevators);
this.hideCreateElevatorModal();
this.modalElevatorInfo = {
spec: '',
person: '',
stop: '',
speed: '',
open: 'CO',
num: 1,
price: '',
sale_price: '',
};
this.$refs.closeCreateElevatorModalBtn.click();
},
copyElevator(idx) {
const spec = this.elevators[idx].specifications
@ -478,7 +439,8 @@ const pricereviewCreate = ()=>{
num: '',
}
this.otherOptionKey++;
this.hideCreateOtherOptionModal();
console.log(this.otherOptions);
this.$refs.closeCreateOtherOptionModalBtn.click();
},
totalOtherOptionsPrice() {
return this.otherOptions.reduce((total, option) => {
@ -504,7 +466,7 @@ const pricereviewCreate = ()=>{
memo: "",
}
this.maintainOptionKey++;
this.hideCreateMaintainModal();
this.$refs.closeCreateMaintainOptionModalBtn.click();
},
totalMaintainOptionsPrice() {
return this.maintainOptions.reduce((total, option) => {
@ -597,48 +559,7 @@ const pricereviewCreate = ()=>{
deposit_rate: 0,
keep_rate: 0,
warranty_rate: 0,
error: [],
submit() {
this.error = []
for(let i=0;i<this.elevators.length;i++){
if(this.elevators[i].specifications =='') this.error.push("整機單價:規格不能為空");
if(this.elevators[i].person =='') this.error.push("整機單價:人數不能為空");
if(this.elevators[i].stop =='') this.error.push("整機單價:梯數不能為空");
if(this.elevators[i].speed =='') this.error.push("整機單價:速度不能為空");
if(this.elevators[i].open_converted =='') this.error.push("整機單價:開梯方式不能為空");
if(this.elevators[i].price =='') this.error.push("整機單價:公司發布價無此規格");
if(this.elevators[i].spec_price <= 0) this.error.push("整機單價:售價需大於0");
if(this.elevators[i].spec_num <= 0) this.error.push("整機單價:電梯數量需大於0");
}
for(let i=0;i<this.selectedOptions.length;i++){
if(this.selectedOptions[i].qty =='' ) this.error.push("Option:數量需大於0")
if(this.selectedOptions[i].toElevator.length <= 0) this.error.push("Option:需配對至電梯")
}
for(let i=0;i<this.otherOptions.length;i++){
if(this.otherOptions[i].name == '' ) this.error.push("除外項目:名稱不得為空");
if(this.otherOptions[i].price == '' ) this.error.push("除外項目:價錢需大於0");
if(this.otherOptions[i].num == '' ) this.error.push("除外項目:數量需大於0");
if(this.otherOptions[i].toElevator.length <= 0) this.error.push("除外項目:需配對至電梯")
}
for(let i=0;i<this.maintainOptions.length;i++){
if(this.maintainOptions[i].price == '' ) this.error.push("保固延長:價錢需大於0");
if(this.maintainOptions[i].num == '' ) this.error.push("保固延長:數量需大於0");
if(this.maintainOptions[i].toElevator.length <= 0) this.error.push("保固延長:需配對至電梯")
}
if(this.totalScale() != 100) this.error.push('付款辦法比例需等於100%')
if(this.transactionDate == '') this.error.push('預定成交日不得為空')
if(this.shippingDate == '') this.error.push('預定出貨日不得為空')
if(this.error.length > 0){
let errortext = '';
this.error.forEach(err=>{
errortext += err+'\n';
})
alert(errortext)
return;
}
const form = new FormData();
form.append('contractno', contractno);
form.append('ekind', "新梯");
@ -708,8 +629,8 @@ const pricereviewCheck = ()=>{
if (option.option_relate_spec == elevator.item_no) {
elevator.optionsTotalPrice += option.option_mi * option.item_qty
this.elevators[idx].options.push({
'id': option.id, //&amp;lt;br&amp;gt;()
'item_spec': option.item_spec.trim().replaceAll('&amp;', '').replaceAll('lt;', '').replaceAll('br', '').replaceAll('gt;', '').replaceAll('()', ''),
'id': option.id,
'item_spec': option.item_spec.trim(),
'item_unit_price': option.item_unit_price,
'item_qty': option.item_qty,
'mi': Math.round(option.option_mi),
@ -761,24 +682,21 @@ const pricereviewCheck = ()=>{
this.getElevatorMi(idx, spec, person, stop, open, speed, elevator.item_weight)
});
this.sign1 = this.getUsername(sign1)
this.sign2 = this.getUsername(sign2)
this.sign3 = this.getUsername(sign3)
this.sign4 = this.getUsername(sign4)
})
},
async getElevatorMi(idx, spec, person, stop, open, speed, item_weight) {
try {
const res = await axios.get('./api/getElevatorMi.php', {params: {
const res = await axios.get('./api/getElevatorMi.php', {
params: {
spec: spec,
person: person,
stop: stop,
open: open,
speed: speed,
weight: item_weight
}})
}
})
console.log('---->', res.data);
if (res.data) {
this.elevators[idx].mi = res.data
@ -836,7 +754,6 @@ const pricereviewCheck = ()=>{
maintainOptions: [],
mid: mid,
user_id: user_id,
reviewcomment:'',
optionsTotalPrice() {
return this.options.reduce((total, option) => {
return total + (option.item_qty * option.item_unit_price);
@ -857,6 +774,7 @@ const pricereviewCheck = ()=>{
return total + Number(option.pay_scale);
}, 0);
},
check(sign, status) {
console.log(sign);
const form = new FormData();
@ -864,7 +782,6 @@ const pricereviewCheck = ()=>{
form.append('mid', this.mid);
form.append('result', status);
form.append('user_id', this.user_id);
form.append('reviewcomment', this.reviewcomment);
axios.post('./api/postPricereviewSign.php', form).then(res => {
console.log(res.data);
if (res.data == 1) {
@ -873,10 +790,26 @@ const pricereviewCheck = ()=>{
}
})
},
async getUsername(user_id){
if(user_id == '') return '---'
const res = await axios.get('./api/getUsername.php', {params: {user_id: user_id}})
return res.data ;
agree(sign) {
console.log(sign);
},
closeCase(sign) {
console.log(sign);
},
}
}
const pricereviewMaintainCreate = () => {
return {
init() {
// this.elevators = elevator;
},
elevator: [],
async getElevatorPrice(idx) {
const spec = this.elevator[idx].specifications;
const person = this.elevators[idx].person;
},
}
}

236
wms/mkt/css/pricereview.css

@ -1,51 +1,101 @@
#pricereviewCreate input[type=text], #pricereviewCreate input[type=number], #pricereviewCreate select {
#pricereviewCreate input[type=text],
#pricereviewCreate input[type=number],
#pricereviewCreate select {
margin: 1px;
}
#pricereviewCreate textarea {
resize: vertical;
}
#pricereviewCreate>.modal {
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;
}
#pricereviewCreate > .modal table > thead tr th {
#pricereviewCreate>.modal table>thead tr th,
#pricereviewMaintainCreate>.modal table>thead tr th {
color: #A52A2A;
}
#pricereviewCreate > .modal table > tbody .selected {
#pricereviewCreate>.modal table>tbody .selected,
#pricereviewMaintainCreate>.modal table>tbody .selected {
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;
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;
}
#pricereviewCreate .container table thead th {
#pricereviewCreate .container table thead th,
#pricereviewMaintainCreate .container table thead th {
background-color: #6D9EEB;
}
#pricereviewCreate .container table tbody td input {
#pricereviewCreate .container table tbody td input,
#pricereviewMaintainCreate .container table tbody td input {
font-size: 14px;
}
#pricereviewCreate .container table tbody th {
#pricereviewCreate .container table tbody th,
#pricereviewMaintainCreate .container table tbody th {
background-color: #CCE4F8;
font-size: 14px;
padding: 15px 2px;
min-width: 100px;
text-align: center;
}
#pricereviewCreate .container table input {
#pricereviewCreate .container table input,
#pricereviewMaintainCreate .container table input {
font-size: 13px;
}
#pricereviewCreate .container .pricreviewmain {
#pricereviewCreate .container .pricreviewmain,
#pricereviewMaintainCreate .container .pricreviewmain {
background-color: #F2F2F2;
padding: 20px;
border-radius: 6px;
margin: 30px 0;
}
#pricereviewCreate .container .pricreviewmain button {
#pricereviewCreate .container .pricreviewmain button,
#pricereviewMaintainCreate .container .pricreviewmain button {
color: #fff;
width: 55px;
height: 30px;
@ -53,56 +103,109 @@
margin-left: 10px;
font-size: 13px;
}
#pricereviewCreate .container .pricreviewmain button.addbtn {
#pricereviewCreate .container .pricreviewmain button.addbtn,
#pricereviewMaintainCreate .container .pricreviewmain button.addbtn {
background-color: #337AB7;
width: 30px;
}
#pricereviewCreate .container .pricreviewmain button.deleteBtn {
#pricereviewCreate .container .pricreviewmain button.deleteBtn,
#pricereviewMaintainCreate .container .pricreviewmain button.deleteBtn {
background-color: #D9534F;
color: #fff;
font-size: 12px;
width: 30px;
}
#pricereviewCreate .container .pricreviewmain button.selectElevator {
#pricereviewCreate .container .pricreviewmain button.selectElevator,
#pricereviewMaintainCreate .container .pricreviewmain button.selectElevator {
background-color: #D9534F;
color: #fff;
}
#pricereviewCreate .container .pricreviewmain > .divitem {
#pricereviewCreate .container .pricreviewmain>.divitem,
#pricereviewMaintainCreate .container .pricreviewmain>.divitem {
border: 1px #ccc solid;
padding: 10px;
border-radius: 4px;
}
#pricereviewCreate .container .pricreviewmain > .divitem .title {
#pricereviewCreate .container .pricreviewmain>.divitem .title,
#pricereviewMaintainCreate .container .pricreviewmain>.divitem .title {
display: flex;
align-items: center;
border-bottom: 1px #ccc solid;
padding: 10px 0;
margin-bottom: 10px;
}
#pricereviewCreate .container .pricreviewmain > .divitem .title h6 {
#pricereviewCreate .container .pricreviewmain>.divitem .title h6,
#pricereviewMaintainCreate .container .pricreviewmain>.divitem .title h6 {
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;
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;
}
#pricereviewCreate .container .pricreviewmain>.divitem table input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain > .divitem table input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain > .divitem th input[type=number]::-webkit-inner-spin-button, #pricereviewCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain > .divitem td input[type=number]::-webkit-inner-spin-button {
#pricereviewCreate .container .pricreviewmain>.divitem table input[type=number]::-webkit-inner-spin-button,
#pricereviewCreate .container .pricreviewmain>.divitem th input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain>.divitem th input[type=number]::-webkit-inner-spin-button,
#pricereviewCreate .container .pricreviewmain>.divitem td input[type=number]::-webkit-outer-spin-button,
#pricereviewCreate .container .pricreviewmain>.divitem td input[type=number]::-webkit-inner-spin-button,
#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;
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;
}
#pricereviewCreate .container .pricreviewmain > .divitem table .saletd {
#pricereviewCreate .container .pricreviewmain>.divitem table .saletd,
#pricereviewMaintainCreate .container .pricreviewmain>.divitem table .saletd {
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;
top: 50%;
transform: translateY(-50%);
@ -110,7 +213,9 @@
opacity: 0;
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;
top: 50%;
transform: translateY(-50%);
@ -120,29 +225,41 @@
width: 30px;
height: 30px;
}
#pricereviewCreate .container .pricreviewmain > .divitem table textarea {
#pricereviewCreate .container .pricreviewmain>.divitem table textarea,
#pricereviewMaintainCreate .container .pricreviewmain>.divitem table textarea {
height: auto;
min-height: 50px;
}
#pricereviewCreate .container .pricreviewmain > .filediv {
#pricereviewCreate .container .pricreviewmain>.filediv,
#pricereviewMaintainCreate .container .pricreviewmain>.filediv {
display: flex;
flex-direction: column;
margin-top: 20px;
}
#pricereviewCreate .container .pricreviewmain > .filediv label {
#pricereviewCreate .container .pricreviewmain>.filediv label,
#pricereviewMaintainCreate .container .pricreviewmain>.filediv label {
display: flex;
align-items: center;
margin: 10px 0;
}
#pricereviewCreate .container .pricreviewmain > .filediv label p {
#pricereviewCreate .container .pricreviewmain>.filediv label p,
#pricereviewMaintainCreate .container .pricreviewmain>.filediv label p {
width: 100px;
font-size: 15px;
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;
}
#pricereviewCreate .container .pricreviewmain > .filediv label button {
#pricereviewCreate .container .pricreviewmain>.filediv label button,
#pricereviewMaintainCreate .container .pricreviewmain>.filediv label button {
width: 90px;
height: 35px;
margin: 0;
@ -150,14 +267,19 @@
margin-top: 20px;
}
.container-fluid, .container {
.container-fluid,
.container {
max-width: 1400px !important;
width: 100%;
}
.container-fluid h4, .container h4 {
.container-fluid h4,
.container h4 {
font-weight: 600;
}
.container-fluid .btn-secondary, .container .btn-secondary {
.container-fluid .btn-secondary,
.container .btn-secondary {
background-color: #6C757D;
}
@ -172,39 +294,51 @@
padding: 20px;
display: none;
}
@keyframes fade-in {
0% {
transform: translate(-50%, -60%);
opacity: 0;
}
100% {
transform: translate(-50%, -55%);
opacity: 1;
}
}
.window-modal table, .window-modal th, .window-modal td {
.window-modal table,
.window-modal th,
.window-modal td {
border: 1px #ccc solid;
}
.window-modal table>thead tr th {
color: #A52A2A;
}
.window-modal table>tbody .selected {
background-color: #E7FEFB;
}
.window-modal#optionModal .window-modal-content {
max-height: 80vh;
}
.window-modal#optionModal .window-modal-content .window-modal-body {
height: 400px;
overflow-y: scroll;
}
.window-modal#toElevatorModal .window-modal-content {
min-height: 270px;
height: auto;
}
.window-modal#toElevatorModal .window-modal-content .window-modal-body {
height: auto;
}
.window-modal .window-modal-content {
z-index: 9;
background-color: #fff;
@ -218,19 +352,24 @@
box-shadow: 0 5px 5px #222;
animation: fade-in 0.2s linear;
}
.window-modal .window-modal-content.modal-xl {
width: 1200px;
}
.window-modal .window-modal-content.modal-lg {
width: 800px;
}
.window-modal .window-modal-content.modal-m {
width: 450px;
}
.window-modal .window-modal-content .window-modal-header {
display: flex;
flex-direction: column;
}
.window-modal .window-modal-content .window-modal-header button.btn-close {
position: absolute;
top: 10px;
@ -240,9 +379,11 @@
outline: none;
border-radius: 50%;
}
.window-modal .window-modal-content .window-modal-header>div>input {
width: 250px;
}
.window-modal .window-back {
position: absolute;
top: 0;
@ -257,40 +398,55 @@
border-radius: 15px;
padding: 20px;
}
#pricereviewCheck>.container textarea {
resize: vertical;
}
#pricereviewCheck > .container table, #pricereviewCheck > .container th, #pricereviewCheck > .container td {
#pricereviewCheck>.container table,
#pricereviewCheck>.container th,
#pricereviewCheck>.container td {
border: 1px #ccc solid;
}
#pricereviewCheck>.container table.noborder {
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;
}
#pricereviewCheck>.container .customerinfo-table input {
background-color: #EEE5E5;
}
#pricereviewCheck>.container .mi-table th {
font-weight: 600;
}
#pricereviewCheck>.container .mi-table input[type=text] {
background-color: #EEEEEE;
cursor: not-allowed;
padding: 6px 12px;
font-size: 14px;
}
#pricereviewCheck>.container .mi-table .mi-info {
font-size: 14px;
}
#pricereviewCheck>.container .mi-table .mi-info span {
font-size: 15px;
font-weight: 600;
}
#pricereviewCheck>.container .mi-table .mi-info .line {
width: 100%;
height: 0.5px;
margin: 30px 0;
background-color: #ccc;
}/*# sourceMappingURL=pricereview.css.map */
}
/*# sourceMappingURL=pricereview.css.map */

11
wms/mkt/css/pricereview.css.map

@ -1 +1,10 @@
{"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"
}

137
wms/mkt/css/pricereview.scss

@ -1,40 +1,60 @@
#pricereviewCreate {
input[type='text'], input[type='number'], select{
input[type='text'],
input[type='number'],
select {
margin: 1px;
}
textarea {
resize: vertical;
}
>.modal {
padding: 20px;
table, th, td{
table,
th,
td {
border: 1px #ccc solid;
}
table>thead tr th {
color: #A52A2A;
}
table>tbody .selected {
background-color: #E7FEFB;
}
table > tbody .selected td{
}
table>tbody .selected td {}
}
.container {
table, th, td{
table,
th,
td {
border: 1px #ccc solid;
padding: 15px;
&.noborder, .noborder th, .noborder td{
&.noborder,
.noborder th,
.noborder td {
border: none;
}
}
table {
thead th {
background-color: #6D9EEB;
}
tbody {
td input {
font-size: 14px;
}
th {
background-color: #CCE4F8;
font-size: 14px;
@ -43,15 +63,18 @@
text-align: center;
}
}
input {
font-size: 13px;
}
}
.pricreviewmain {
background-color: #F2F2F2;
padding: 20px;
border-radius: 6px;
margin: 30px 0;
button {
color: #fff;
width: 55px;
@ -59,16 +82,19 @@
padding: 0;
margin-left: 10px;
font-size: 13px;
&.addbtn {
background-color: #337AB7;
width: 30px;
}
&.deleteBtn {
background-color: #D9534F;
color: #fff;
font-size: 12px;
width: 30px;
}
&.selectElevator {
background-color: #D9534F;
color: #fff;
@ -79,35 +105,49 @@
border: 1px #ccc solid;
padding: 10px;
border-radius: 4px;
.title {
display: flex;
align-items: center;
border-bottom: 1px #ccc solid;
padding: 10px 0;
margin-bottom: 10px;
h6 {
font-weight: 600;
}
}
table, th, td{
table,
th,
td {
font-size: 14px;
background-color: transparent;
input, select, textarea{
input,
select,
textarea {
font-size: 13px;
}
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
table {
tr:hover .deleteBtn ,tr:hover .copyBtn{
tr:hover .deleteBtn,
tr:hover .copyBtn {
opacity: 1;
}
.saletd {
position: relative;
>.deleteBtn {
position: absolute;
top: 50%;
@ -116,6 +156,7 @@
opacity: 0;
transition: .3s;
}
>.copyBtn {
position: absolute;
top: 50%;
@ -127,28 +168,34 @@
height: 30px;
}
}
textarea {
height: auto;
min-height: 50px;
}
}
}
>.filediv {
display: flex;
flex-direction: column;
margin-top: 20px;
label {
display: flex;
align-items: center;
margin: 10px 0;
p {
width: 100px;
font-size: 15px;
font-weight: 600;
}
input[type="file"] {
width: 400px
}
button {
width: 90px;
height: 35px;
@ -162,12 +209,15 @@
}
}
.container-fluid, .container{
.container-fluid,
.container {
max-width: 1400px !important;
width: 100%;
h4 {
font-weight: 600;
}
.btn-secondary {
background-color: #6C757D;
}
@ -183,41 +233,34 @@
z-index: 9;
padding: 20px;
display: none;
@keyframes fade-in {
0% {
transform: translate(-50%, -60%);
transform: translate(-50%, -55%);
opacity: 0;
}
100% {
transform: translate(-50%, -55%);
transform: translate(-50%, -50%);
opacity: 1;
}
}
table, th, td{
table,
th,
td {
border: 1px #ccc solid;
}
table>thead tr th {
color: #A52A2A;
}
table>tbody .selected {
background-color: #E7FEFB;
}
&#optionModal .window-modal-content{
max-height: 80vh;
.window-modal-body{
height: 400px;
overflow-y: scroll;
}
}
&#toElevatorModal .window-modal-content{
min-height: 270px;
height: auto;
.window-modal-body{
height: auto;
}
}
.window-modal-content {
z-index: 9;
background-color: #fff;
border-radius: 10px;
position: absolute;
@ -225,21 +268,26 @@
padding: 30px;
top: 50%;
left: 50%;
transform: translate(-50%, -55%);
transform: translate(-50%, -50%);
box-shadow: 0 5px 5px #222;
animation: fade-in .2s linear;
&.modal-xl {
width: 1200px;
}
&.modal-lg {
width: 800px;
}
&.modal-m {
width:450px;
width: 400px;
}
.window-modal-header {
display: flex;
flex-direction: column;
button.btn-close {
position: absolute;
top: 10px;
@ -249,18 +297,16 @@
outline: none;
border-radius: 50%;
}
>div>input {
width: 250px;
}
}
.window-modal-body {
overflow-y: scroll;
height: 400px;
}
.window-back{
position: absolute;
top: 0;
left:0;
width: 100%;
height: 100%;
background-color: transparent;
}
}
@ -269,39 +315,52 @@
background-color: #F2F2F2;
border-radius: 15px;
padding: 20px;
textarea {
resize: vertical;
}
table, th, td{
table,
th,
td {
border: 1px #ccc solid;
}
table.noborder {
border: none !important;
th ,td{
th,
td {
border: none !important;
}
}
.customerinfo-table {
input {
background-color: #EEE5E5;
}
}
.mi-table {
th {
font-weight: 600;
}
input[type=text] {
background-color: #EEEEEE;
cursor: not-allowed;
padding: 6px 12px;
font-size: 14px;
}
.mi-info {
font-size: 14px;
span {
font-size: 15px;
font-weight: 600;
}
.line {
width: 100%;
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