Browse Source

合約簽回(契約)

gary
Cheng 1 year ago
parent
commit
290bcfcc9d
  1. 60
      wms/bonus/other/maintenance_contract_bonus_v2_1.php
  2. 427
      wms/bonus/other/maintenance_contract_bonus_v2_1_examination.php
  3. 421
      wms/contract-repair/styles/style.css
  4. 121
      wms/contract/api/getComboNo.php
  5. 52
      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. 2
      wms/fun_global.php
  12. 591
      wms/mkt/assets/js/pricereviewAlpine.js
  13. 264
      wms/mkt/css/pricereview.css
  14. 11
      wms/mkt/css/pricereview.css.map
  15. 321
      wms/mkt/css/pricereview.scss
  16. 195
      wms/mkt/pricereviewMaintainCreate.php

60
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次款項收回後,次月發放" #發放規定
]);
#專任契約經理獎金
array_push($bonus_array, [
"bonus_type" => "3", #獎金名稱
"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 //折扣率
]);
if ($regular_contract_manger_id != '') {
array_push($bonus_array, [
"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次款項收回後,次月發放" #發放規定
]);
}
#契約員獎金
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;

427
wms/bonus/other/maintenance_contract_bonus_v2_1_examination.php

@ -48,244 +48,241 @@ require_once("maintenance_contract_bonus_v2_1.php");
#獎金測試
$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)
["2.1","new","monthly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價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)
["2.1","new","monthly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","new","monthly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","new","monthly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","new","monthly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","new","monthly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","new","monthly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","new","monthly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","new","monthly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#2月1次繳(bimonthly)
["2.1","new","bimonthly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","new","bimonthly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","new","bimonthly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","new","bimonthly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","new","bimonthly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","new","bimonthly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","new","bimonthly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","new","bimonthly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","new","bimonthly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","new","bimonthly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","new","bimonthly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","new","bimonthly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#季付(quarterly)
["2.1","new","quarterly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","new","quarterly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","new","quarterly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","new","quarterly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","new","quarterly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","new","quarterly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","new","quarterly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","new","quarterly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","new","quarterly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","new","quarterly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","new","quarterly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","new","quarterly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#月繳(monthly)
["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)
["2.1", "new", "monthly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "new", "monthly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "new", "monthly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "new", "monthly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "new", "monthly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "new", "monthly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "new", "monthly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "new", "monthly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、月繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#2月1次繳(bimonthly)
["2.1", "new", "bimonthly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "new", "bimonthly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "new", "bimonthly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "new", "bimonthly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "new", "bimonthly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "new", "bimonthly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "new", "bimonthly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "new", "bimonthly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "new", "bimonthly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "new", "bimonthly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "new", "bimonthly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "new", "bimonthly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、2月1次繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#季付(quarterly)
["2.1", "new", "quarterly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "new", "quarterly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "new", "quarterly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "new", "quarterly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "new", "quarterly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "new", "quarterly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "new", "quarterly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "new", "quarterly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "new", "quarterly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "new", "quarterly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "new", "quarterly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "new", "quarterly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、季付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#半年付(semiannually)
["2.1","new","semiannually",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","new","semiannually",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","new","semiannually",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","new","semiannually",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","new","semiannually",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","new","semiannually",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","new","semiannually",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","new","semiannually",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","new","semiannually",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","new","semiannually",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","new","semiannually",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","new","semiannually",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#半年付(semiannually)
["2.1", "new", "semiannually", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "new", "semiannually", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "new", "semiannually", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "new", "semiannually", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "new", "semiannually", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "new", "semiannually", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "new", "semiannually", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "new", "semiannually", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "new", "semiannually", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "new", "semiannually", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "new", "semiannually", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "new", "semiannually", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、半年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#年付(annually)
["2.1","new","annually",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","new","annually",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","new","annually",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","new","annually",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","new","annually",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","new","annually",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","new","annually",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","new","annually",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","new","annually",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","new","annually",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","new","annually",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","new","annually",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#年付(annually)
["2.1", "new", "annually", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "new", "annually", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "new", "annually", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "new", "annually", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "new", "annually", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "new", "annually", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "new", "annually", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "new", "annually", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "new", "annually", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "new", "annually", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "new", "annually", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "new", "annually", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #新簽約、年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#免保轉有費(free_to_charge)
#月繳(monthly)
["2.1","free_to_charge","monthly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","free_to_charge","monthly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","free_to_charge","monthly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","free_to_charge","monthly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","free_to_charge","monthly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","free_to_charge","monthly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","free_to_charge","monthly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","free_to_charge","monthly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","free_to_charge","monthly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","free_to_charge","monthly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","free_to_charge","monthly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","free_to_charge","monthly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#2月1次繳(bimonthly)
["2.1","free_to_charge","bimonthly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","free_to_charge","bimonthly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","free_to_charge","bimonthly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","free_to_charge","bimonthly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","free_to_charge","bimonthly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","free_to_charge","bimonthly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","free_to_charge","bimonthly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","free_to_charge","bimonthly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","free_to_charge","bimonthly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","free_to_charge","bimonthly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","free_to_charge","bimonthly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","free_to_charge","bimonthly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#季付(quarterly)
["2.1","free_to_charge","quarterly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","free_to_charge","quarterly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","free_to_charge","quarterly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","free_to_charge","quarterly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","free_to_charge","quarterly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","free_to_charge","quarterly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","free_to_charge","quarterly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","free_to_charge","quarterly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","free_to_charge","quarterly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","free_to_charge","quarterly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","free_to_charge","quarterly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","free_to_charge","quarterly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#月繳(monthly)
["2.1", "free_to_charge", "monthly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "free_to_charge", "monthly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "free_to_charge", "monthly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "free_to_charge", "monthly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "free_to_charge", "monthly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "free_to_charge", "monthly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "free_to_charge", "monthly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "free_to_charge", "monthly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "free_to_charge", "monthly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "free_to_charge", "monthly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "free_to_charge", "monthly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "free_to_charge", "monthly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、月繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#2月1次繳(bimonthly)
["2.1", "free_to_charge", "bimonthly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "free_to_charge", "bimonthly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "free_to_charge", "bimonthly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "free_to_charge", "bimonthly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "free_to_charge", "bimonthly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "free_to_charge", "bimonthly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "free_to_charge", "bimonthly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "free_to_charge", "bimonthly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "free_to_charge", "bimonthly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "free_to_charge", "bimonthly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "free_to_charge", "bimonthly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "free_to_charge", "bimonthly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、2月1次繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#季付(quarterly)
["2.1", "free_to_charge", "quarterly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "free_to_charge", "quarterly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "free_to_charge", "quarterly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "free_to_charge", "quarterly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "free_to_charge", "quarterly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "free_to_charge", "quarterly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "free_to_charge", "quarterly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "free_to_charge", "quarterly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "free_to_charge", "quarterly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "free_to_charge", "quarterly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "free_to_charge", "quarterly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "free_to_charge", "quarterly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、季付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#半年付(semiannually)
["2.1","free_to_charge","semiannually",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","free_to_charge","semiannually",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","free_to_charge","semiannually",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","free_to_charge","semiannually",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","free_to_charge","semiannually",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","free_to_charge","semiannually",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","free_to_charge","semiannually",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","free_to_charge","semiannually",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","free_to_charge","semiannually",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","free_to_charge","semiannually",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","free_to_charge","semiannually",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","free_to_charge","semiannually",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#半年付(semiannually)
["2.1", "free_to_charge", "semiannually", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "free_to_charge", "semiannually", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "free_to_charge", "semiannually", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "free_to_charge", "semiannually", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "free_to_charge", "semiannually", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "free_to_charge", "semiannually", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "free_to_charge", "semiannually", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "free_to_charge", "semiannually", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "free_to_charge", "semiannually", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "free_to_charge", "semiannually", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "free_to_charge", "semiannually", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "free_to_charge", "semiannually", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、半年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#年付(annually)
["2.1","free_to_charge","annually",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","free_to_charge","annually",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","free_to_charge","annually",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","free_to_charge","annually",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","free_to_charge","annually",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","free_to_charge","annually",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","free_to_charge","annually",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","free_to_charge","annually",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","free_to_charge","annually",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","free_to_charge","annually",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","free_to_charge","annually",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","free_to_charge","annually",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#年付(annually)
["2.1", "free_to_charge", "annually", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "free_to_charge", "annually", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "free_to_charge", "annually", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "free_to_charge", "annually", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "free_to_charge", "annually", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "free_to_charge", "annually", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "free_to_charge", "annually", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "free_to_charge", "annually", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "free_to_charge", "annually", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "free_to_charge", "annually", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "free_to_charge", "annually", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "free_to_charge", "annually", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #免保轉有費、年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#續簽約(原價或僅契約金額異動)(renew_priceissue)
#月繳(monthly)
["2.1","renew_priceissue","monthly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","renew_priceissue","monthly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","renew_priceissue","monthly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","renew_priceissue","monthly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","renew_priceissue","monthly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","renew_priceissue","monthly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","renew_priceissue","monthly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","renew_priceissue","monthly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","renew_priceissue","monthly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","renew_priceissue","monthly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","renew_priceissue","monthly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","renew_priceissue","monthly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#2月1次繳(bimonthly)
["2.1","renew_priceissue","bimonthly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","renew_priceissue","bimonthly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","renew_priceissue","bimonthly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","renew_priceissue","bimonthly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","renew_priceissue","bimonthly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","renew_priceissue","bimonthly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","renew_priceissue","bimonthly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","renew_priceissue","bimonthly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","renew_priceissue","bimonthly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","renew_priceissue","bimonthly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","renew_priceissue","bimonthly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","renew_priceissue","bimonthly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#季付(quarterly)
["2.1","renew_priceissue","quarterly",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","renew_priceissue","quarterly",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","renew_priceissue","quarterly",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","renew_priceissue","quarterly",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","renew_priceissue","quarterly",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","renew_priceissue","quarterly",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","renew_priceissue","quarterly",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","renew_priceissue","quarterly",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","renew_priceissue","quarterly",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","renew_priceissue","quarterly",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","renew_priceissue","quarterly",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","renew_priceissue","quarterly",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#月繳(monthly)
["2.1", "renew_priceissue", "monthly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "renew_priceissue", "monthly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "renew_priceissue", "monthly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "renew_priceissue", "monthly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "renew_priceissue", "monthly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "renew_priceissue", "monthly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "renew_priceissue", "monthly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "renew_priceissue", "monthly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "renew_priceissue", "monthly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "renew_priceissue", "monthly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "renew_priceissue", "monthly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "renew_priceissue", "monthly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、月繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#2月1次繳(bimonthly)
["2.1", "renew_priceissue", "bimonthly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "renew_priceissue", "bimonthly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "renew_priceissue", "bimonthly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "renew_priceissue", "bimonthly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "renew_priceissue", "bimonthly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "renew_priceissue", "bimonthly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "renew_priceissue", "bimonthly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "renew_priceissue", "bimonthly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "renew_priceissue", "bimonthly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "renew_priceissue", "bimonthly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "renew_priceissue", "bimonthly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "renew_priceissue", "bimonthly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、2月1次繳、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#季付(quarterly)
["2.1", "renew_priceissue", "quarterly", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "renew_priceissue", "quarterly", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "renew_priceissue", "quarterly", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "renew_priceissue", "quarterly", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "renew_priceissue", "quarterly", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "renew_priceissue", "quarterly", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "renew_priceissue", "quarterly", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "renew_priceissue", "quarterly", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "renew_priceissue", "quarterly", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "renew_priceissue", "quarterly", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "renew_priceissue", "quarterly", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "renew_priceissue", "quarterly", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、季付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#半年付(semiannually)
["2.1","renew_priceissue","semiannually",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","renew_priceissue","semiannually",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","renew_priceissue","semiannually",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","renew_priceissue","semiannually",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","renew_priceissue","semiannually",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","renew_priceissue","semiannually",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","renew_priceissue","semiannually",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","renew_priceissue","semiannually",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","renew_priceissue","semiannually",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","renew_priceissue","semiannually",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","renew_priceissue","semiannually",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","renew_priceissue","semiannually",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#半年付(semiannually)
["2.1", "renew_priceissue", "semiannually", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "renew_priceissue", "semiannually", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "renew_priceissue", "semiannually", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "renew_priceissue", "semiannually", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "renew_priceissue", "semiannually", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "renew_priceissue", "semiannually", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "renew_priceissue", "semiannually", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "renew_priceissue", "semiannually", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "renew_priceissue", "semiannually", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "renew_priceissue", "semiannually", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "renew_priceissue", "semiannually", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "renew_priceissue", "semiannually", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、半年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#年付(annually)
["2.1","renew_priceissue","annually",3000,3000,600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1","renew_priceissue","annually",3000,3001,601,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1","renew_priceissue","annually",3000,3500,1100,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1","renew_priceissue","annually",3000,4000,1600,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1","renew_priceissue","annually",3000,3000,1200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1","renew_priceissue","annually",3000,3001,1201,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1","renew_priceissue","annually",3000,3500,1700,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1","renew_priceissue","annually",3000,4000,2200,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1","renew_priceissue","annually",3000,3000,1230,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1","renew_priceissue","annually",3000,3001,1231,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1","renew_priceissue","annually",3000,3500,1730,"2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1","renew_priceissue","annually",3000,4000,2230,"2014-07-01", "M0001", "M0002", "M0003"] #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
#年付(annually)
["2.1", "renew_priceissue", "annually", 3000, 3000, 600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3000元、服務費600元(折扣率0.8)
["2.1", "renew_priceissue", "annually", 3000, 3001, 601, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3001元、服務費601元(折扣率0.8)
["2.1", "renew_priceissue", "annually", 3000, 3500, 1100, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3500元、服務費1100元(折扣率0.8)
["2.1", "renew_priceissue", "annually", 3000, 4000, 1600, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價4000元、服務費1600元(折扣率0.8)
["2.1", "renew_priceissue", "annually", 3000, 3000, 1200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3000元、服務費1200元(折扣率0.6)
["2.1", "renew_priceissue", "annually", 3000, 3001, 1201, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3001元、服務費1201元(折扣率0.6)
["2.1", "renew_priceissue", "annually", 3000, 3500, 1700, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3500元、服務費1700元(折扣率0.6)
["2.1", "renew_priceissue", "annually", 3000, 4000, 2200, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價4000元、服務費2200元(折扣率0.6)
["2.1", "renew_priceissue", "annually", 3000, 3000, 1230, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3000元、服務費1230元(折扣率0.59)
["2.1", "renew_priceissue", "annually", 3000, 3001, 1231, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3001元、服務費1231元(折扣率0.59)
["2.1", "renew_priceissue", "annually", 3000, 3500, 1730, "2014-07-01", "M0001", "M0002", "M0003"], #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價3500元、服務費1730元(折扣率0.59)
["2.1", "renew_priceissue", "annually", 3000, 4000, 2230, "2014-07-01", "M0001", "M0002", "M0003"] #續簽約(原價或僅契約金額異動)、年付、牌價3000、簽約價4000元、服務費2230元(折扣率0.59)
];
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(
$examination_array[$i][0],
$examination_array[$i][1],
$examination_array[$i][2],
$examination_array[$i][3],
$examination_array[$i][4],
$examination_array[$i][5],
$examination_array[$i][6],
$examination_array[$i][7],
$examination_array[$i][8],
$examination_array[$i][9]
$examination_array[$i][1],
$examination_array[$i][2],
$examination_array[$i][3],
$examination_array[$i][4],
$examination_array[$i][5],
$examination_array[$i][6],
$examination_array[$i][7],
$examination_array[$i][8],
$examination_array[$i][9]
);
echo "獎金版本:" . $result["ver"] . "<br>";
echo "計算結果:" . $result["result_status"] . "<br>";
echo "輸入參數:" . $examination_array[$i][1] . " " . $examination_array[$i][2] . " " . $examination_array[$i][3] . " " . $examination_array[$i][4] . " "
. $examination_array[$i][5] . " " . $examination_array[$i][6] . " " . $examination_array[$i][7]. " " . $examination_array[$i][8] . " "
. $examination_array[$i][9] . "<br>";
for($j = 0; $j<count($result["bonus_array"]); $j++){
. $examination_array[$i][5] . " " . $examination_array[$i][6] . " " . $examination_array[$i][7] . " " . $examination_array[$i][8] . " "
. $examination_array[$i][9] . "<br>";
for ($j = 0; $j < count($result["bonus_array"]); $j++) {
echo "輸出結果:" . $result["bonus_array"][$j]["bonus_type"] . " " . $result["bonus_array"][$j]["bonus_receiver"] . " "
. $result["bonus_array"][$j]["bonus_amount"] . " " . $result["bonus_array"][$j]["pay_day_due"] . " "
. $result["bonus_array"][$j]["bonus_regulation"] . "<br>";
. $result["bonus_array"][$j]["bonus_amount"] . " " . $result["bonus_array"][$j]["pay_day_due"] . " "
. $result["bonus_array"][$j]["bonus_regulation"] . "<br>";
};
echo "-------------------------" . "<br>";
};
?>

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

@ -1,24 +1,20 @@
@charset "UTF-8";
main {
display: flex;
justify-content: flex-start;
margin-top: -20px;
}
main [x-cloak] {
display: none !important;
}
main>.sidebar {
main > .sidebar {
width: 300px;
min-height: 100vh;
border-right: 1px #ddd solid;
box-shadow: 0px 0px 5px #ddd;
padding: 50px 20px;
}
main>.sidebar button {
main > .sidebar button {
display: block;
outline: none;
border: none;
@ -28,16 +24,13 @@ main>.sidebar button {
border-bottom: 1px #ccc solid;
opacity: 0.65;
}
main>.sidebar button.active {
main > .sidebar button.active {
opacity: 1;
}
main>.sidebar button:hover {
main > .sidebar button:hover {
opacity: 1;
}
main>.sidebar a {
main > .sidebar a {
display: block;
width: 120px;
height: 35px;
@ -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,154 +76,133 @@ 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 {
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 {
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 {
main .contract-install-component > .contract,
main .contract-material-component > .contract {
background: #fff;
width: 100%;
margin-top: 15px;
padding: 20px;
font-family: "標楷體";
}
main .contract-install-component>.contract>h2,
main .contract-material-component>.contract>h2 {
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 {
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 {
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 {
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,
main .contract-material-component>.contract section {
main .contract-install-component > .contract div,
main .contract-install-component > .contract section,
main .contract-material-component > .contract div,
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,
main .contract-material-component>.contract section.party {
main .contract-install-component > .contract div.party,
main .contract-install-component > .contract section.party,
main .contract-material-component > .contract div.party,
main .contract-material-component > .contract section.party {
width: 100%;
display: flex;
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 {
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,
main .contract-material-component>.contract section.party .notes {
main .contract-install-component > .contract div.party .notes,
main .contract-install-component > .contract section.party .notes,
main .contract-material-component > .contract div.party .notes,
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 {
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,
main .contract-material-component>.contract section.list-title {
main .contract-install-component > .contract div.list-title,
main .contract-install-component > .contract section.list-title,
main .contract-material-component > .contract div.list-title,
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 {
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,
main .contract-material-component>.contract p,
main .contract-material-component>.contract article,
main .contract-material-component>.contract div {
main .contract-install-component > .contract p,
main .contract-install-component > .contract article,
main .contract-install-component > .contract div,
main .contract-material-component > .contract p,
main .contract-material-component > .contract article,
main .contract-material-component > .contract div {
position: relative;
display: block;
}
main .contract-install-component>.contract .date,
main .contract-material-component>.contract .date {
main .contract-install-component > .contract .date,
main .contract-material-component > .contract .date {
display: flex;
align-items: center;
width: 100%;
margin-top: 300px;
}
main .contract-install-component>.contract .date p,
main .contract-material-component>.contract .date p {
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 {
main .contract-install-component > .contract .date > .ml,
main .contract-material-component > .contract .date > .ml {
width: 50%;
display: flex;
justify-content: space-between;
flex-direction: row-reverse;
}
main .contract-install-component>.contract .buttons,
main .contract-material-component>.contract .buttons {
main .contract-install-component > .contract .buttons,
main .contract-material-component > .contract .buttons {
position: absolute;
top: 0;
right: 0;
display: flex;
z-index: 9;
}
main .contract-install-component>.contract .buttons>button,
main .contract-material-component>.contract .buttons>button {
main .contract-install-component > .contract .buttons > button,
main .contract-material-component > .contract .buttons > button {
width: 30px;
height: 30px;
border-radius: 5px;
@ -248,156 +215,134 @@ 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 {
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 {
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 {
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 {
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 {
main .contract-install-component > .contract table,
main .contract-material-component > .contract table {
border: none;
margin-top: 30px;
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) {
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 {
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 {
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 {
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 {
main .contract-install-component > .contract table tr td,
main .contract-material-component > .contract table tr td {
width: 100%;
height: 100%;
line-height: 2;
display: flex;
}
main .contract-install-component>.contract table tr td.center,
main .contract-material-component>.contract table tr td.center {
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 {
main .contract-install-component > .contract table tr td.list,
main .contract-material-component > .contract table tr td.list {
width: 100%;
height: 100%;
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 {
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 {
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,
main .contract-material-component>.contract table tr td.list article {
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,
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,
main .contract-install-component>.contract table tr td.list article input[type=text],
main .contract-install-component>.contract table tr td.list article input[type=number],
main .contract-install-component>.contract table tr td.list article input,
main .contract-material-component>.contract table tr td.list div input[type=text],
main .contract-material-component>.contract table tr td.list div input[type=number],
main .contract-material-component>.contract table tr td.list div input,
main .contract-material-component>.contract table tr td.list article input[type=text],
main .contract-material-component>.contract table tr td.list article input[type=number],
main .contract-material-component>.contract table tr td.list article input {
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,
main .contract-install-component > .contract table tr td.list article input[type=text],
main .contract-install-component > .contract table tr td.list article input[type=number],
main .contract-install-component > .contract table tr td.list article input,
main .contract-material-component > .contract table tr td.list div input[type=text],
main .contract-material-component > .contract table tr td.list div input[type=number],
main .contract-material-component > .contract table tr td.list div input,
main .contract-material-component > .contract table tr td.list article input[type=text],
main .contract-material-component > .contract table tr td.list article input[type=number],
main .contract-material-component > .contract table tr td.list article input {
border: none !important;
border-bottom: 1px #222 solid !important;
width: 50px;
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,
main .contract-material-component>.contract table tr td.list article.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-material-component > .contract table tr td.list div.text-justify,
main .contract-material-component > .contract table tr td.list article.text-justify {
display: flex;
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 {
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 {
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 {
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,8 +355,7 @@ main .contract-model {
z-index: 999;
animation: modelanim 0.2s linear;
}
main .contract-model>.contract-back {
main .contract-model > .contract-back {
position: absolute;
top: 0;
left: 0;
@ -419,8 +363,7 @@ main .contract-model>.contract-back {
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
main .contract-model>.contract-content {
main .contract-model > .contract-content {
z-index: 999;
max-width: 600px;
width: 100%;
@ -428,8 +371,7 @@ main .contract-model>.contract-content {
overflow: hidden;
background-color: white;
}
main .contract-model>.contract-content>.model-header {
main .contract-model > .contract-content > .model-header {
width: 100%;
background-color: #1E74FD;
height: 38px;
@ -438,26 +380,21 @@ main .contract-model>.contract-content>.model-header {
align-items: center;
padding: 0 15px;
}
main .contract-model>.contract-content>.model-header>i {
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 {
main .contract-model > .contract-content > .model-header > i:hover {
color: #fff;
}
main .contract-model>.contract-content>.model-header>span {
main .contract-model > .contract-content > .model-header > span {
color: #fff;
}
main .contract-model>.contract-content>.content {
main .contract-model > .contract-content > .content {
padding: 30px;
}
main .contract-model>.contract-content>.content textarea {
main .contract-model > .contract-content > .content textarea {
width: 100%;
resize: vertical;
height: 150px;
@ -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 {
.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 {
.prview table tr.date td > div {
width: 100%;
text-align: right;
}
.prview table tr.date td>div.text-justify {
.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 {
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 {
main table tr.date td > div {
width: 100%;
text-align: right;
}
main table tr.date td>div.text-justify {
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,23 +778,20 @@ main table th {
flex-wrap: wrap;
padding: 20px;
}
.contract-input-component .images>.image,
.contract-management .images>.image,
.contract-new-apply-component .images>.image {
.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 {
.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 {
.contract-input-component .images > .image > i,
.contract-management .images > .image > i,
.contract-new-apply-component .images > .image > i {
position: absolute;
top: -12px;
right: -12px;
@ -961,6 +834,4 @@ label {
display: inline-flex;
margin-bottom: 0.5rem;
margin-top: 0.5rem;
}
/*# sourceMappingURL=style.css.map */
}/*# sourceMappingURL=style.css.map */

121
wms/contract/api/getComboNo.php

@ -1,59 +1,62 @@
<?php
class CreateComboNo{
private $comboarr = [
'week'=>'BW002',
'month'=>'EM002',
'quarter'=>'EQ002',
'half'=>'HY002',
'year'=>'EY002'
];
private $bwarr = [
'week','month','week','month','week','quarter',
'week','month','week','month','week','half',
'week','month','week','month','week','quarter',
'week','month','week','month','week','year'
];
private $emarr = [
'month','month','quarter','month','month','half',
'month','month','quarter','month','month','year'
];
private $combo;
private $startdate;
private $enddate;
public function __construct($combo, $startdate, $enddate){
$this->combo = $combo;
$this->startdate = $startdate;
$this->enddate = $enddate;
}
public function getComboNo(){
$comboarr = (array) $this->combo === 'bw' ? $this->bwarr : $this->emarr;
$startdate = new DateTime($this->startdate);
$enddate = new DateTime($this->enddate);
$interval = date_diff($startdate, $enddate);
$months = $interval->y * 12 + $interval->m;
$months = $this->combo === 'bw' ? $months*2 : $months;
$newarr = [];
$idx = 0;
$ori_first_month = date('m', strtotime($this->startdate));
$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));
}
$scheduleDate = new DateTime($first_day);
for ($i = 0; $i < $months; $i++){
$newarr[] = [$this->comboarr[$comboarr[$idx]], $scheduleDate->format("Y-m-d")];
$idx ++;
$scheduleDate = $startdate->modify("+1 month");
if($idx >= count($comboarr)){
$idx = 0;
}
}
return json_encode($newarr);
}
}
<?php
class CreateComboNo
{
private $comboarr = [
'week' => 'BW002',
'month' => 'EM002',
'quarter' => 'EQ002',
'half' => 'HY002',
'year' => 'EY002'
];
private $bwarr = [
'week', 'month', 'week', 'month', 'week', 'quarter',
'week', 'month', 'week', 'month', 'week', 'half',
'week', 'month', 'week', 'month', 'week', 'quarter',
'week', 'month', 'week', 'month', 'week', 'year'
];
private $emarr = [
'month', 'month', 'quarter', 'month', 'month', 'half',
'month', 'month', 'quarter', 'month', 'month', 'year'
];
private $combo;
private $startdate;
private $enddate;
public function __construct($combo, $startdate, $enddate)
{
$this->combo = $combo;
$this->startdate = $startdate;
$this->enddate = $enddate;
}
public function getComboNo()
{
$comboarr = (array) $this->combo === 'bw' ? $this->bwarr : $this->emarr;
$startdate = new DateTime($this->startdate);
$enddate = new DateTime($this->enddate);
$interval = date_diff($startdate, $enddate);
$months = $interval->y * 12 + $interval->m;
$months = $this->combo === 'bw' ? $months * 2 : $months;
$newarr = [];
$idx = 0;
$ori_first_month = date('m', strtotime($this->startdate));
$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-d', strtotime($this->startdate));
}
$scheduleDate = new DateTime($first_day);
for ($i = 0; $i <= $months; $i++) {
$newarr[] = [$this->comboarr[$comboarr[$idx]], $scheduleDate->format("Y-m-d")];
$idx++;
$scheduleDate = $scheduleDate->modify("+1 month");
if ($idx >= count($comboarr)) {
$idx = 0;
}
}
return json_encode($newarr);
}
}

52
wms/contract/api/getContractData.php

@ -1,7 +1,7 @@
<?php
<?php
require_once('../conn.php');
if(isset($_GET['contractno']) && $_GET['contractno']!='' && isset($_GET['contracttype']) && $_GET['contracttype']=='b'){
try{
if (isset($_GET['contractno']) && $_GET['contractno'] != '' && isset($_GET['contracttype']) && $_GET['contracttype'] == 'b') {
try {
$contractno = $_GET['contractno'];
$sql_str = "SELECT con_maintance_examine_apply.*, con_maintance_examine_clear.* FROM con_maintance_examine_apply
JOIN con_maintance_examine_clear on con_maintance_examine_apply.apply_key=con_maintance_examine_clear.apply_key
@ -10,9 +10,9 @@ if(isset($_GET['contractno']) && $_GET['contractno']!='' && isset($_GET['contrac
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':vol_no', $contractno);
$stmt->execute();
$contract= $stmt->fetch(PDO::FETCH_ASSOC);
$contract = $stmt->fetch(PDO::FETCH_ASSOC);
if(empty($contract)){
if (empty($contract)) {
echo false;
exit;
}
@ -21,42 +21,60 @@ if(isset($_GET['contractno']) && $_GET['contractno']!='' && isset($_GET['contrac
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':apply_key', $apply_key);
$stmt->execute();
$elevators= $stmt->fetchAll(PDO::FETCH_ASSOC);
$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;
$contractResponse = json_encode($contract);
// 設定回應標頭為 JSON
header('Content-Type: application/json');
// 將 JSON 回應返回給客戶端
echo $contractResponse;
// echo json_encode($contractResponse);
}catch (PDOException $e ){
die("ERROR!!!: ". $e->getMessage());
} catch (PDOException $e) {
die("ERROR!!!: " . $e->getMessage());
}
}
if(isset($_GET['contractno']) && $_GET['contractno']!='' && isset($_GET['contracttype']) && $_GET['contracttype']=='m'){
try{
if (isset($_GET['contractno']) && $_GET['contractno'] != '' && isset($_GET['contracttype']) && $_GET['contracttype'] == 'm') {
try {
$contractno = $_GET['contractno'];
$sql_str = "SELECT * FROM hope_elevator_customer WHERE vol_no = :vol_no ORDER BY created_at DESC";
$stmt = $conn->prepare($sql_str);
$stmt->bindParam(':vol_no', $contractno);
$stmt->execute();
$contract= $stmt->fetch(PDO::FETCH_ASSOC);
$contract = $stmt->fetch(PDO::FETCH_ASSOC);
$contractResponse = json_encode($contract);
// 設定回應標頭為 JSON
header('Content-Type: application/json');
// 將 JSON 回應返回給客戶端
echo $contractResponse;
}catch (PDOException $e ){
die("ERROR!!!: ". $e->getMessage());
} catch (PDOException $e) {
die("ERROR!!!: " . $e->getMessage());
}
}
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 ?>

2
wms/fun_global.php

@ -14,7 +14,7 @@ function sql_myself($user_id, $column = "creater")
global $link;
$follower_arr = []; // 下屬列表
if($user_id == 'M0105'){
if ($user_id == 'M0105') {
$user_id = "M0137";
}
$sql_cmd = "where ($column = '$user_id'";

591
wms/mkt/assets/js/pricereviewAlpine.js

@ -1,22 +1,22 @@
const pricereviewCreate = ()=>{
const pricereviewCreate = () => {
return {
init(){
init() {
this.elevators = elevators;
console.log(this.elevators);
console.log(this.total_spec);
},
openFn:{
4:'2U',
5:"4PCO",
7:"6PCO",
8:"2S",
9:"CO"
openFn: {
4: '2U',
5: "4PCO",
7: "6PCO",
8: "2S",
9: "CO"
},
optionalArr: {
1:'標配',
2:'選配',
3:'選配',
1: '標配',
2: '選配',
3: '選配',
},
total_spec: total_spec,
options: options,
@ -26,41 +26,41 @@ const pricereviewCreate = ()=>{
subkind: 1,
buttons: [],
modalSelectedOptions: {},
selectedOptions:[],
selectedOptions: [],
elevators: [],
toElevators:[],
toElevators: [],
toElevatorNo: '',
currentOptionKey: '',
currentOtherOptionKey: '',
currentMaintainOptionKey: '',
optionKey:0,
otherOptionKey:0,
maintainOptionKey:0,
modalElevatorInfo:{
spec:'',
person:'',
stop:'',
speed:'',
open:'CO',
optionKey: 0,
otherOptionKey: 0,
maintainOptionKey: 0,
modalElevatorInfo: {
spec: '',
person: '',
stop: '',
speed: '',
open: 'CO',
num: 1,
price:'',
sale_price:'',
price: '',
sale_price: '',
facility_id: '',
},
otherOptions: [],
modalOtherOptionInfo:{
pr_no:"",
name:"",
modalOtherOptionInfo: {
pr_no: "",
name: "",
price: 0,
num:"",
num: "",
},
maintainOptions:[],
modalMaintainInfo:{
price:0,
num:"",
memo:"",
maintainOptions: [],
modalMaintainInfo: {
price: 0,
num: "",
memo: "",
},
paymentRatio:[
paymentRatio: [
{
scale: 20,
ticket: 30,
@ -90,41 +90,40 @@ const pricereviewCreate = ()=>{
ticket: '',
},
],
serviceFee:0,
serviceFee: 0,
transactionDate: pre_order_date,
shippingDate:'',
remark:'',
async getElevatorPrice(idx){
shippingDate: '',
remark: '',
async getElevatorPrice(idx) {
const spec = this.elevators[idx].specifications
const person = this.elevators[idx].person
const stop = this.elevators[idx].stop
const open_converted = this.elevators[idx].open_converted
const speed = this.elevators[idx].speed
const model = spec + '-' + person + '*' + stop + '-' + open_converted + speed;
try{
const res = await axios.get("./api/getElevatorPrice.php", {params: {model: model}})
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
}catch (error) {
this.elevators[idx].price = res.data
} catch (error) {
console.error("Error fetching elevator price:", error);
}
},
async getModalElevatorPrice(){
async getModalElevatorPrice() {
let model = this.modalElevatorInfo.spec + '-' + this.modalElevatorInfo.person + '*' + this.modalElevatorInfo.stop + '-' + this.modalElevatorInfo.open + this.modalElevatorInfo.speed;
try{
const res = await axios.get("./api/getElevatorPrice.php", {params: {model: model}})
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
}catch (error) {
this.modalElevatorInfo.price = res.data
} catch (error) {
console.error("Error fetching elevator price:", error);
}
},
@ -168,147 +167,101 @@ const pricereviewCreate = ()=>{
}
},
optionSubCategory: 1,
initOptinos(){
this.options.forEach(option=>{
initOptinos() {
this.options.forEach(option => {
option.isShow = 1;
})
},
searchOptions(kind=this.kind, subkind=this.subkind){
if(kind!=null) this.kind = kind;
if(subkind!=null) this.subkind = subkind;
searchOptions(kind = this.kind, subkind = this.subkind) {
if (kind != null) this.kind = kind;
if (subkind != null) this.subkind = subkind;
this.initOptinos();
this.initButtons(kind);
this.options.forEach(option=>{
if(option.kind != this.kind && this.kind != 1){
this.options.forEach(option => {
if (option.kind != this.kind && this.kind != 1) {
option.isShow = 0;
}else{
if(option.subkind != this.subkind && this.subkind != 1){
} else {
if (option.subkind != this.subkind && this.subkind != 1) {
option.isShow = 0;
}
}
if(option.isShow == 1){
if(option.group_name == null) option.group_name = ''
if(option.spec == null) option.spec = ''
if(option.memo == null) option.memo = ''
if(option.price == null) option.price = 0
if(option.unit == null) option.unit = ''
if(String(option.id).includes(this.searchtext) || option.group_name.includes(this.searchtext) || option.memo.toLowerCase().includes(this.searchtext) || option.spec.toLowerCase().includes(this.searchtext) || option.unit.includes(this.searchtext) || String(option.price).includes(this.searchtext)){
if (option.isShow == 1) {
if (option.group_name == null) option.group_name = ''
if (option.spec == null) option.spec = ''
if (option.memo == null) option.memo = ''
if (option.price == null) option.price = 0
if (option.unit == null) option.unit = ''
if (String(option.id).includes(this.searchtext) || option.group_name.includes(this.searchtext) || option.memo.toLowerCase().includes(this.searchtext) || option.spec.toLowerCase().includes(this.searchtext) || option.unit.includes(this.searchtext) || String(option.price).includes(this.searchtext)) {
option.isShow = 1
}else{
} else {
option.isShow = 0
}
}
})
},
selectOption(idx, id, name, price, memo){
this.options[idx].selected = this.options[idx].selected==1 ? 0 : 1;
if(this.modalSelectedOptions.hasOwnProperty(idx)){
selectOption(idx, id, name, price, memo) {
this.options[idx].selected = this.options[idx].selected == 1 ? 0 : 1;
if (this.modalSelectedOptions.hasOwnProperty(idx)) {
delete this.modalSelectedOptions[idx];
}else{
} else {
//this.optionKey => 已選option 流水號, idx:option表內的流水號, id:option 資料庫的ID
this.modalSelectedOptions[idx] = {key:this.optionKey, 'idx':idx, 'id': id, 'name': name, 'price': price, qty:1, 'memo': memo, 'toElevator':[] }
this.modalSelectedOptions[idx] = { key: this.optionKey, 'idx': idx, 'id': id, 'name': name, 'price': price, qty: 1, 'memo': memo, 'toElevator': [] }
}
this.optionKey ++;
this.optionKey++;
},
initModalSelectedOptions(){
initModalSelectedOptions() {
this.modalSelectedOptions = {}
this.options.forEach(option=>{
this.options.forEach(option => {
option.selected = 0
})
this.$refs.optionsModal.style.display = "block"
body.style.overflow = 'hidden'
},
chkOptions(){
Object.keys(this.modalSelectedOptions).forEach(option=>{
chkOptions() {
Object.keys(this.modalSelectedOptions).forEach(option => {
this.selectedOptions.push(this.modalSelectedOptions[option])
})
console.log(this.modalSelectedOptions);
console.log(this.selectedOptions);
this.hideOptionsModal();
},
hideOptionsModal(){
hideOptionsModal() {
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(){
totalElevatorsPrice() {
return this.elevators.reduce((total, elevator) => {
return total + (elevator.spec_num * elevator.price);
}, 0);
},
totalElevatorsNum(){
totalElevatorsNum() {
return this.elevators.reduce((total, elevator) => {
return total + Number(elevator.spec_num);
}, 0)
},
totalElevatorsSalePrice(){
totalElevatorsSalePrice() {
return this.elevators.reduce((total, elevator) => {
return total + (elevator.spec_num * elevator.spec_price);
}, 0);
},
totalOptionsPrice(){
totalOptionsPrice() {
return this.selectedOptions.reduce((total, option) => {
return total + (option.qty * option.price);
}, 0);
},
openAddElevatorFn(){
openAddElevatorFn() {
},
createElevatorFn(){
if(this.modalElevatorInfo.spec == '') return alert("請選擇電梯規格");
if(this.modalElevatorInfo.stop == '') return alert("請填入停數");
if(this.modalElevatorInfo.speed == '') return alert("請選擇速度");
if(this.modalElevatorInfo.open == '') return alert("請選擇開梯方式");
if(this.modalElevatorInfo.person == '') return alert("請填入人乘/載重");
if(this.modalElevatorInfo.num == '') return alert("請填入數量");
if(this.modalElevatorInfo.sale_price == '') return alert("請填入售價");
this.total_spec ++;
createElevatorFn() {
if (this.modalElevatorInfo.spec == '') return alert("請選擇電梯規格");
if (this.modalElevatorInfo.stop == '') return alert("請填入停數");
if (this.modalElevatorInfo.speed == '') return alert("請選擇速度");
if (this.modalElevatorInfo.open == '') return alert("請選擇開梯方式");
if (this.modalElevatorInfo.person == '') return alert("請填入人乘/載重");
if (this.modalElevatorInfo.num == '') return alert("請填入數量");
if (this.modalElevatorInfo.sale_price == '') return alert("請填入售價");
this.total_spec++;
this.elevators.push({
id: this.total_spec,
specifications: this.modalElevatorInfo.spec,
@ -318,14 +271,22 @@ const pricereviewCreate = ()=>{
open_converted: this.modalElevatorInfo.open,
spec_price: this.modalElevatorInfo.sale_price,
price: this.modalElevatorInfo.price,
open:'',
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){
copyElevator(idx) {
const spec = this.elevators[idx].specifications
const person = this.elevators[idx].person
const stop = this.elevators[idx].stop
@ -337,7 +298,7 @@ const pricereviewCreate = ()=>{
const price = this.elevators[idx].price
const facility_id = this.elevators[idx].facility_id
this.total_spec ++;
this.total_spec++;
this.elevators.push({
id: this.total_spec,
specifications: spec,
@ -353,44 +314,44 @@ const pricereviewCreate = ()=>{
});
console.log(this.elevators);
},
addOptionToElevator(key){
addOptionToElevator(key) {
this.currentOptionKey = key;
this.toElevators = [];
this.toElevatorNo = "";
const matchElevators = this.selectedOptions.filter(option=> option.key == key)[0].toElevator.map(elevator=> elevator.id)
const matchElevators = this.selectedOptions.filter(option => option.key == key)[0].toElevator.map(elevator => elevator.id)
console.log(matchElevators);
this.toElevatorNo = matchElevators[0]
this.elevators.forEach(elevator=>{
if(elevator.price > 0){
this.elevators.forEach(elevator => {
if (elevator.price > 0) {
this.toElevators.push({
id: elevator.id,
model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
checked: matchElevators.includes(elevator.id) ? 1: 0,
checked: matchElevators.includes(elevator.id) ? 1 : 0,
})
}
})
this.$refs.toElevatorModal.style.display = 'block';
body.style.overflow = 'hidden'
},
addOtherOptionToElevator(id){
addOtherOptionToElevator(id) {
this.currentOtherOptionKey = id;
this.toElevators = [];
this.toElevatorNo = "";
const matchElevators = this.otherOptions.filter(option=> option.id == id)[0].toElevator.map(elevator=> elevator.id)
const matchElevators = this.otherOptions.filter(option => option.id == id)[0].toElevator.map(elevator => elevator.id)
this.toElevatorNo = matchElevators[0]
this.elevators.forEach(elevator=>{
if(elevator.price > 0){
this.elevators.forEach(elevator => {
if (elevator.price > 0) {
this.toElevators.push({
id: elevator.id,
model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
checked: matchElevators.includes(elevator.id) ? 1: 0,
checked: matchElevators.includes(elevator.id) ? 1 : 0,
})
}
})
this.$refs.toOtherOptionElevatorModal.style.display = 'block';
body.style.overflow = 'hidden'
},
chkOptionToElevators(){
chkOptionToElevators() {
const checkedOptions = [];
// this.toElevators.forEach(elevator=>{
// if(elevator.checked){
@ -400,13 +361,13 @@ const pricereviewCreate = ()=>{
// });
// }
// })
const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
const matchElevators = this.elevators.filter(elevator => elevator.id == this.toElevatorNo)[0]
checkedOptions.push({
id: this.toElevatorNo,
model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
})
this.selectedOptions.forEach(option=>{
if(option.key == this.currentOptionKey){
this.selectedOptions.forEach(option => {
if (option.key == this.currentOptionKey) {
option.toElevator = [];
option.toElevator.push(...checkedOptions)
}
@ -414,7 +375,7 @@ const pricereviewCreate = ()=>{
this.currentOptionKey = ''
this.hideToElevatorModal();
},
chkOtherOptionToElevators(){
chkOtherOptionToElevators() {
const checkedOptions = [];
// this.toElevators.forEach(elevator=>{
// if(elevator.checked){
@ -424,13 +385,13 @@ const pricereviewCreate = ()=>{
// });
// }
// })
const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
const matchElevators = this.elevators.filter(elevator => elevator.id == this.toElevatorNo)[0]
checkedOptions.push({
id: this.toElevatorNo,
model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
})
this.otherOptions.forEach(option=>{
if(option.id == this.currentOtherOptionKey){
this.otherOptions.forEach(option => {
if (option.id == this.currentOtherOptionKey) {
option.toElevator = [];
option.toElevator.push(...checkedOptions)
}
@ -440,36 +401,36 @@ const pricereviewCreate = ()=>{
this.hideToOtherOptionElevatorModal();
},
removeElevator(id){
if(!confirm("確定刪除嗎?")) return;
this.elevators = this.elevators.filter(elevator=> elevator.id != id)
removeElevator(id) {
if (!confirm("確定刪除嗎?")) return;
this.elevators = this.elevators.filter(elevator => elevator.id != id)
const issetElevators = [];
this.elevators.forEach(elevator=>{
this.elevators.forEach(elevator => {
issetElevators.push(elevator.id);
})
this.selectedOptions.forEach(option=>{
option.toElevator = option.toElevator.filter(el=>{
this.selectedOptions.forEach(option => {
option.toElevator = option.toElevator.filter(el => {
return issetElevators.includes(el.id)
})
})
console.log(this.selectedOptions);
},
removeOption(key){
removeOption(key) {
console.log(this.selectedOptions);
this.selectedOptions = this.selectedOptions.filter(option=> option.key != key)
this.selectedOptions = this.selectedOptions.filter(option => option.key != key)
},
removeOtherOption(id){
this.otherOptions = this.otherOptions.filter(option=> option.id != id)
removeOtherOption(id) {
this.otherOptions = this.otherOptions.filter(option => option.id != id)
},
createOtherOptionFn(){
createOtherOptionFn() {
this.otherOptions.push({
id: this.otherOptionKey,
pr_no: this.modalOtherOptionInfo.pr_no,
name: this.modalOtherOptionInfo.name,
price: this.modalOtherOptionInfo.price,
num: this.modalOtherOptionInfo.num,
toElevator:[],
toElevator: [],
})
this.modalOtherOptionInfo = {
pr_no: '',
@ -477,46 +438,47 @@ const pricereviewCreate = ()=>{
price: 0,
num: '',
}
this.otherOptionKey ++;
this.hideCreateOtherOptionModal();
this.otherOptionKey++;
console.log(this.otherOptions);
this.$refs.closeCreateOtherOptionModalBtn.click();
},
totalOtherOptionsPrice(){
totalOtherOptionsPrice() {
return this.otherOptions.reduce((total, option) => {
return total + (Number(option.num) * Number(option.price));
}, 0);
},
totalOtherOptionsNum(){
totalOtherOptionsNum() {
return this.otherOptions.reduce((total, option) => {
return total + Number(option.num);
}, 0);
},
createMaintainOptionFn(){
createMaintainOptionFn() {
this.maintainOptions.push({
id: this.maintainOptionKey,
price: this.modalMaintainInfo.price,
num: this.modalMaintainInfo.num,
memo: this.modalMaintainInfo.memo,
toElevator:[],
toElevator: [],
})
this.modalMaintainInfo = {
price:0,
num:"",
memo:"",
price: 0,
num: "",
memo: "",
}
this.maintainOptionKey ++;
this.hideCreateMaintainModal();
this.maintainOptionKey++;
this.$refs.closeCreateMaintainOptionModalBtn.click();
},
totalMaintainOptionsPrice(){
totalMaintainOptionsPrice() {
return this.maintainOptions.reduce((total, option) => {
return total + (Number(option.num) * Number(option.price));
}, 0);
},
totalMaintainOptionsNum(){
totalMaintainOptionsNum() {
return this.maintainOptions.reduce((total, option) => {
return total + Number(option.num);
}, 0);
},
chkMaintainOptionToElevators(){
chkMaintainOptionToElevators() {
const checkedOptions = [];
// this.toElevators.forEach(elevator=>{
// if(elevator.checked){
@ -526,13 +488,13 @@ const pricereviewCreate = ()=>{
// });
// }
// })
const matchElevators = this.elevators.filter(elevator=> elevator.id == this.toElevatorNo)[0]
const matchElevators = this.elevators.filter(elevator => elevator.id == this.toElevatorNo)[0]
checkedOptions.push({
id: this.toElevatorNo,
model: matchElevators['specifications'] + '-' + matchElevators['person'] + '*' + matchElevators['stop'] + '-' + matchElevators['open_converted'] + matchElevators['speed'],
})
this.maintainOptions.forEach(option=>{
if(option.id == this.currentMaintainOptionKey){
this.maintainOptions.forEach(option => {
if (option.id == this.currentMaintainOptionKey) {
option.toElevator = [];
option.toElevator.push(...checkedOptions)
}
@ -540,18 +502,18 @@ const pricereviewCreate = ()=>{
this.currentMaintainOptionKey = ''
this.hideToMaintainOptionElevatorModal();
},
addMaintainOptionToElevator(id){
addMaintainOptionToElevator(id) {
this.currentMaintainOptionKey = id;
this.toElevators = [];
this.toElevatorNo = "";
const matchElevators = this.maintainOptions.filter(option=> option.id == id)[0].toElevator.map(elevator=> elevator.id)
const matchElevators = this.maintainOptions.filter(option => option.id == id)[0].toElevator.map(elevator => elevator.id)
this.toElevatorNo = matchElevators[0]
this.elevators.forEach(elevator=>{
if(elevator.price > 0){
this.elevators.forEach(elevator => {
if (elevator.price > 0) {
this.toElevators.push({
id: elevator.id,
model: elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed,
checked: matchElevators.includes(elevator.id) ? 1: 0,
checked: matchElevators.includes(elevator.id) ? 1 : 0,
})
}
})
@ -559,32 +521,32 @@ const pricereviewCreate = ()=>{
this.$refs.toMaintainOptionElevatorModal.style.display = 'block';
body.style.overflow = 'hidden'
},
removeMaintainOption(id){
this.maintainOptions = this.maintainOptions.filter(option=> option.id != id)
removeMaintainOption(id) {
this.maintainOptions = this.maintainOptions.filter(option => option.id != id)
},
totalPrice(){
totalPrice() {
return this.totalElevatorsPrice() + this.totalOptionsPrice() + this.totalOtherOptionsPrice() + this.totalMaintainOptionsPrice();
},
totalSalePrice(){
totalSalePrice() {
return this.elevators.reduce((total, elevator) => {
return total + (elevator.spec_num * elevator.spec_price);
}, 0);
},
scalePrice(scale){
if(scale === '') return 0;
scalePrice(scale) {
if (scale === '') return 0;
return this.totalSalePrice() * scale / 100;
},
totalScale(){
totalScale() {
let total = 0;
Object.keys(this.paymentRatio).forEach(pay=>{
if(this.paymentRatio[pay].scale != '' && this.paymentRatio[pay].scale > 0){
Object.keys(this.paymentRatio).forEach(pay => {
if (this.paymentRatio[pay].scale != '' && this.paymentRatio[pay].scale > 0) {
total += Number(this.paymentRatio[pay].scale)
}
})
return total;
},
customerInfo:{
customerInfo: {
contractno: contractno,
company: customer,
manager: manager,
@ -593,52 +555,11 @@ const pricereviewCreate = ()=>{
uscc: uscc,
person: salesman,
},
penalty:"",
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;
}
penalty: "",
deposit_rate: 0,
keep_rate: 0,
warranty_rate: 0,
submit() {
const form = new FormData();
form.append('contractno', contractno);
form.append('ekind', "新梯");
@ -648,7 +569,7 @@ const pricereviewCreate = ()=>{
form.append('address', this.customerInfo.address);
form.append('price_lowest', this.totalPrice());
form.append('price_total', this.totalSalePrice());
form.append('price_rate', Math.round(this.totalSalePrice() / this.totalPrice() * 100 *10) / 10);
form.append('price_rate', Math.round(this.totalSalePrice() / this.totalPrice() * 100 * 10) / 10);
form.append('special_fee', this.serviceFee);
form.append('predeal_date', this.transactionDate);
form.append('facilitok_date', this.shippingDate);
@ -669,27 +590,27 @@ const pricereviewCreate = ()=>{
form.append('maintainOptions', JSON.stringify(this.maintainOptions));
form.append('paymentRatio', JSON.stringify(this.paymentRatio));
axios.post('./api/postNewElevatorPricereview.php', form).then(res=>{
axios.post('./api/postNewElevatorPricereview.php', form).then(res => {
console.log(res.data);
if(res.data == "success"){
if (res.data == "success") {
alert("送審成功!");
window.location.href = './pricereview-index.php?' + token_link;
}
}).catch(err=>{
}).catch(err => {
console.error(err);
})
},
}
}
const pricereviewCheck = ()=>{
const pricereviewCheck = () => {
return {
init(){
this.elevators = items.filter(item=> item.item_group =='A');
this.elevators.forEach(el=>{
init() {
this.elevators = items.filter(item => item.item_group == 'A');
this.elevators.forEach(el => {
el.options = []
el.optionsTotalPrice = 0;
el.otherOptions = []
@ -698,18 +619,18 @@ const pricereviewCheck = ()=>{
el.maintainOptionsTotalPrice = 0;
})
this.options = options;
this.otherOptions = items.filter(item=> item.item_group =='E');
this.maintainOptions = items.filter(item=> item.item_group =='D');
this.otherOptions = items.filter(item => item.item_group == 'E');
this.maintainOptions = items.filter(item => item.item_group == 'D');
console.log(this.options);
this.elevators.forEach((elevator, idx)=>{
this.options.forEach(option=>{
if(option.option_relate_spec == elevator.item_no){
this.elevators.forEach((elevator, idx) => {
this.options.forEach(option => {
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),
@ -717,11 +638,11 @@ const pricereviewCheck = ()=>{
}
})
this.otherOptions.forEach(option=>{
if(option.option_relate_spec == elevator.item_no){
this.otherOptions.forEach(option => {
if (option.option_relate_spec == elevator.item_no) {
elevator.otherOptionsTotalPrice += option.item_unit_price * option.item_qty
this.elevators[idx].otherOptions.push({
'id': option.id,
'id': option.id,
'item_spec': option.item_spec.trim(),
'item_unit_price': option.item_unit_price,
'item_qty': option.item_qty,
@ -730,11 +651,11 @@ const pricereviewCheck = ()=>{
}
})
this.maintainOptions.forEach(option=>{
if(option.option_relate_spec == elevator.item_no){
this.maintainOptions.forEach(option => {
if (option.option_relate_spec == elevator.item_no) {
elevator.maintainOptionsTotalPrice += option.item_unit_price * option.item_qty
this.elevators[idx].maintainOptions.push({
'id': option.id,
'id': option.id,
'item_spec': option.item_spe.trim(),
'item_unit_price': option.item_unit_price,
'item_qty': option.item_qty,
@ -751,39 +672,36 @@ const pricereviewCheck = ()=>{
let stop = model.split('-')[1].split('*')[1].split('-')[0];
let open = model.split('-')[2];
let speed = '';
for(let i=0;i<this.openFn.length;i++){
if(open.includes(this.openFn[i])){
for (let i = 0; i < this.openFn.length; i++) {
if (open.includes(this.openFn[i])) {
speed = open.replace(this.openFn[i], '')
open = this.openFn[i];
break;
}
}
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: {
spec: spec,
person: person,
stop: stop,
open: open,
speed: speed,
weight: item_weight
}})
console.log('---->',res.data);
if(res.data){
})
},
async getElevatorMi(idx, spec, person, stop, open, speed, item_weight) {
try {
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
this.elevators[idx].totalMi = res.data['equipment_fee'] + res.data['customs_shipping_fee'] + res.data['free1y_fee'] + res.data['install_fee'] + res.data['other_fee'] + res.data['transport_site_fee'] + res.data['unloading_fee'];
}else{
} else {
this.isNotfoundMi = true;
this.elevators[idx].mi = {
'equipment_fee': 0,
@ -795,22 +713,22 @@ const pricereviewCheck = ()=>{
'unloading_fee': 0
}
}
console.log(this.elevators[idx]);
}catch (error) {
} catch (error) {
console.error("Error fetching elevator price:", error);
}
},
isNotfoundMi:false,
openFn:[
isNotfoundMi: false,
openFn: [
'CO', '2S', '2U', '4PCO', '6PCO'
],
sign1:'',
sign2:'',
sign3:'',
sign4:'',
sign1: '',
sign2: '',
sign3: '',
sign4: '',
is_renovate: false,
elevators_total_price: 0,
contractno: contractno,
@ -830,53 +748,68 @@ const pricereviewCheck = ()=>{
memo: memo,
qty: 0,
pays: pays,
elevators:[],
elevators: [],
options: [],
otherOptions: [],
maintainOptions: [],
mid: mid,
user_id: user_id,
reviewcomment:'',
optionsTotalPrice(){
optionsTotalPrice() {
return this.options.reduce((total, option) => {
return total + (option.item_qty * option.item_unit_price);
}, 0);
},
otherOptionsTotalPrice(){
otherOptionsTotalPrice() {
return this.otherOptions.reduce((total, option) => {
return total + (option.item_qty * option.item_unit_price);
}, 0);
},
maintainOptionsTotalPrice(){
maintainOptionsTotalPrice() {
return this.maintainOptions.reduce((total, option) => {
return total + (option.item_qty * option.item_unit_price);
}, 0);
},
totalScale(){
totalScale() {
return this.pays.reduce((total, option) => {
return total + Number(option.pay_scale );
return total + Number(option.pay_scale);
}, 0);
},
check(sign, status){
check(sign, status) {
console.log(sign);
const form = new FormData();
form.append('sign', sign);
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=>{
axios.post('./api/postPricereviewSign.php', form).then(res => {
console.log(res.data);
if(res.data == 1){
if (res.data == 1) {
alert("簽核成功!");
window.location.reload()
}
})
},
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;
},
}
}

264
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 {
#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-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,
#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 {
.window-modal table>thead tr th {
color: #A52A2A;
}
.window-modal table > tbody .selected {
.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 {
.window-modal .window-modal-content .window-modal-header>div>input {
width: 250px;
}
.window-modal .window-back {
position: absolute;
top: 0;
@ -252,45 +393,60 @@
background-color: transparent;
}
#pricereviewCheck > .container {
#pricereviewCheck>.container {
background-color: #F2F2F2;
border-radius: 15px;
padding: 20px;
}
#pricereviewCheck > .container textarea {
#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 {
#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 {
#pricereviewCheck>.container .customerinfo-table input {
background-color: #EEE5E5;
}
#pricereviewCheck > .container .mi-table th {
#pricereviewCheck>.container .mi-table th {
font-weight: 600;
}
#pricereviewCheck > .container .mi-table input[type=text] {
#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 {
#pricereviewCheck>.container .mi-table .mi-info {
font-size: 14px;
}
#pricereviewCheck > .container .mi-table .mi-info span {
#pricereviewCheck>.container .mi-table .mi-info span {
font-size: 15px;
font-weight: 600;
}
#pricereviewCheck > .container .mi-table .mi-info .line {
#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":"AACI;EACI,WAAA;ACAR;ADEI;EACI,gBAAA;ACAR;ADEI;EACI,aAAA;ACAR;ADCQ;EACI,sBAAA;ACCZ;ADCQ;EACI,cAAA;ACCZ;ADCQ;EACI,yBAAA;ACCZ;ADKQ;EACI,sBAAA;EACA,aAAA;ACHZ;ADIY;EACI,YAAA;ACFhB;ADMY;EACI,yBAAA;ACJhB;ADOgB;EACI,eAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;ACLpB;ADQY;EACI,eAAA;ACNhB;ADSQ;EACI,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,cAAA;ACPZ;ADQY;EACI,WAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,iBAAA;EACA,eAAA;ACNhB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;EACA,eAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADSY;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;ACPhB;ADQgB;EACI,aAAA;EACA,mBAAA;EACA,6BAAA;EACA,eAAA;EACA,mBAAA;ACNpB;ADOoB;EACI,gBAAA;ACLxB;ADSgB;EACI,eAAA;EACA,6BAAA;ACPpB;ADQoB;EACI,eAAA;ACNxB;ADQoB;;;;EAEA,wBAAA;EACA,SAAA;ACJpB;ADQoB;EACI,UAAA;ACNxB;ADQoB;EACI,kBAAA;ACNxB;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,UAAA;EACA,UAAA;EACA,gBAAA;ACL5B;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,WAAA;EACA,YAAA;ACL5B;ADQoB;EACI,YAAA;EACA,gBAAA;ACNxB;ADUY;EACI,aAAA;EACA,sBAAA;EACA,gBAAA;ACRhB;ADSgB;EACI,aAAA;EACA,mBAAA;EACA,cAAA;ACPpB;ADQoB;EACI,YAAA;EACA,eAAA;EACA,gBAAA;ACNxB;ADQoB;EACI,YAAA;ACNxB;ADQoB;EACI,WAAA;EACA,YAAA;EACA,SAAA;EACA,kBAAA;EACA,gBAAA;ACNxB;;ADcA;EACI,4BAAA;EACA,WAAA;ACXJ;ADYI;EACI,gBAAA;ACVR;ADYI;EACI,yBAAA;ACVR;;ADcA;EACI,eAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;EACA,oCAAA;EACA,UAAA;EACA,aAAA;EACA,aAAA;ACXJ;ADYI;EACI;IACI,gCAAA;IACA,UAAA;ECVV;EDYM;IACI,gCAAA;IACA,UAAA;ECVV;AACF;ADYI;EACI,sBAAA;ACVR;ADYI;EACI,cAAA;ACVR;ADYI;EACI,yBAAA;ACVR;ADYI;EACI,gBAAA;ACVR;ADWQ;EACI,aAAA;EACA,kBAAA;ACTZ;ADYI;EACI,iBAAA;EACA,YAAA;ACVR;ADWQ;EACI,YAAA;ACTZ;ADYI;EACI,UAAA;EACA,sBAAA;EACA,mBAAA;EACA,kBAAA;EACA,aAAA;EACA,aAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;EACA,0BAAA;EACA,8BAAA;ACVR;ADWQ;EACI,aAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,aAAA;EACA,sBAAA;ACTZ;ADUY;EACI,kBAAA;EACA,SAAA;EACA,WAAA;EACA,6BAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;ACRhB;ADUY;EACI,YAAA;ACRhB;ADYI;EACI,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,6BAAA;ACVR;;ADeI;EACI,yBAAA;EACA,mBAAA;EACA,aAAA;ACZR;ADaQ;EACI,gBAAA;ACXZ;ADaQ;EACI,sBAAA;ACXZ;ADaQ;EACI,uBAAA;ACXZ;ADYY;EACI,uBAAA;ACVhB;ADcY;EACI,yBAAA;ACZhB;ADgBY;EACI,gBAAA;ACdhB;ADgBY;EACI,yBAAA;EACA,mBAAA;EACA,iBAAA;EACA,eAAA;ACdhB;ADgBY;EACI,eAAA;ACdhB;ADegB;EACI,eAAA;EACA,gBAAA;ACbpB;ADegB;EACI,WAAA;EACA,aAAA;EACA,cAAA;EACA,sBAAA;ACbpB","file":"pricereview.css"}
{
"version": 3,
"sources": [
"pricereview.scss",
"pricereview.css"
],
"names": [],
"mappings": "AACI;EACI,WAAA;ACAR;ADEI;EACI,gBAAA;ACAR;ADEI;EACI,aAAA;ACAR;ADCQ;EACI,sBAAA;ACCZ;ADCQ;EACI,cAAA;ACCZ;ADCQ;EACI,yBAAA;ACCZ;ADKQ;EACI,sBAAA;EACA,aAAA;ACHZ;ADIY;EACI,YAAA;ACFhB;ADMY;EACI,yBAAA;ACJhB;ADOgB;EACI,eAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,kBAAA;ACLpB;ADQY;EACI,eAAA;ACNhB;ADSQ;EACI,yBAAA;EACA,aAAA;EACA,kBAAA;EACA,cAAA;ACPZ;ADQY;EACI,WAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,iBAAA;EACA,eAAA;ACNhB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;EACA,eAAA;EACA,WAAA;ACLpB;ADOgB;EACI,yBAAA;EACA,WAAA;ACLpB;ADSY;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;ACPhB;ADQgB;EACI,aAAA;EACA,mBAAA;EACA,6BAAA;EACA,eAAA;EACA,mBAAA;ACNpB;ADOoB;EACI,gBAAA;ACLxB;ADSgB;EACI,eAAA;EACA,6BAAA;ACPpB;ADQoB;EACI,eAAA;ACNxB;ADQoB;;;;EAEA,wBAAA;EACA,SAAA;ACJpB;ADQoB;EACI,UAAA;ACNxB;ADQoB;EACI,kBAAA;ACNxB;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,UAAA;EACA,UAAA;EACA,gBAAA;ACL5B;ADOwB;EACI,kBAAA;EACA,QAAA;EACA,2BAAA;EACA,WAAA;EACA,UAAA;EACA,gBAAA;EACA,WAAA;EACA,YAAA;ACL5B;ADQoB;EACI,YAAA;EACA,gBAAA;ACNxB;ADUY;EACI,aAAA;EACA,sBAAA;EACA,gBAAA;ACRhB;ADSgB;EACI,aAAA;EACA,mBAAA;EACA,cAAA;ACPpB;ADQoB;EACI,YAAA;EACA,eAAA;EACA,gBAAA;ACNxB;ADQoB;EACI,YAAA;ACNxB;ADQoB;EACI,WAAA;EACA,YAAA;EACA,SAAA;EACA,kBAAA;EACA,gBAAA;ACNxB;;ADcA;EACI,4BAAA;EACA,WAAA;ACXJ;ADYI;EACI,gBAAA;ACVR;ADYI;EACI,yBAAA;ACVR;;ADcA;EACI,eAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,aAAA;EACA,oCAAA;EACA,UAAA;EACA,aAAA;EACA,aAAA;ACXJ;ADYI;EACI;IACI,gCAAA;IACA,UAAA;ECVV;EDYM;IACI,gCAAA;IACA,UAAA;ECVV;AACF;ADYI;EACI,sBAAA;ACVR;ADYI;EACI,cAAA;ACVR;ADYI;EACI,yBAAA;ACVR;ADYI;EACI,gBAAA;ACVR;ADWQ;EACI,aAAA;EACA,kBAAA;ACTZ;ADYI;EACI,iBAAA;EACA,YAAA;ACVR;ADWQ;EACI,YAAA;ACTZ;ADYI;EACI,UAAA;EACA,sBAAA;EACA,mBAAA;EACA,kBAAA;EACA,aAAA;EACA,aAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;EACA,0BAAA;EACA,8BAAA;ACVR;ADWQ;EACI,aAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,YAAA;ACTZ;ADWQ;EACI,aAAA;EACA,sBAAA;ACTZ;ADUY;EACI,kBAAA;EACA,SAAA;EACA,WAAA;EACA,6BAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;ACRhB;ADUY;EACI,YAAA;ACRhB;ADYI;EACI,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,6BAAA;ACVR;;ADeI;EACI,yBAAA;EACA,mBAAA;EACA,aAAA;ACZR;ADaQ;EACI,gBAAA;ACXZ;ADaQ;EACI,sBAAA;ACXZ;ADaQ;EACI,uBAAA;ACXZ;ADYY;EACI,uBAAA;ACVhB;ADcY;EACI,yBAAA;ACZhB;ADgBY;EACI,gBAAA;ACdhB;ADgBY;EACI,yBAAA;EACA,mBAAA;EACA,iBAAA;EACA,eAAA;ACdhB;ADgBY;EACI,eAAA;ACdhB;ADegB;EACI,eAAA;EACA,gBAAA;ACbpB;ADegB;EACI,WAAA;EACA,aAAA;EACA,cAAA;EACA,sBAAA;ACbpB",
"file": "pricereview.css"
}

321
wms/mkt/css/pricereview.scss

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

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