@ -41,6 +41,7 @@ hope_project_elevator_spec.open,
hope_project_elevator_spec.spec_price,
hope_project_elevator_spec.spec_num,
fp.price AS price,
fp.id AS facility_id,
CASE hope_project_elevator_spec.open
WHEN 4 THEN '2U'
WHEN 5 THEN '4PCO'
@ -153,10 +154,10 @@ function convertDateTimeFormat($dateTimeStr) {
< button type = "button" class = "btn btn-primary" data-bs-dismiss = "modal" @ click = "chkOptions()" > 確認< / button >
< / div >
< / div >
< div class = "window-back" > < / div >
< div class = "window-back" @ click = "hideOptionsModal()" > < / div >
< / div >
< div class = "window-modal" x-ref = "toElevatorModal" id = "toElevatorModal" >
< div class = "window-modal-content modal-xl " >
< div class = "window-modal-content modal-m " >
< div class = "window-modal-header" >
< h4 > 配對電梯< / h4 >
< button class = "btn btn-close" @ click = "hideToElevatorModal()" > X< / button >
@ -185,81 +186,19 @@ function convertDateTimeFormat($dateTimeStr) {
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" @ click = "hideOptionsModal()" > 關閉< / button >
< button type = "button" class = "btn btn-primary" data-bs-dismiss = "modal" @ click = "chkOptions()" > 確認< / button >
< / div >
< / div >
< div class = "window-back" > < / div >
< / div >
< div class = "modal fade modal-dialog-scrollable modal-xl" id = "optionModal" tabindex = "-1" aria-labelledby = "optionModalLabel" aria-hidden = "true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header d-flex flex-column align-items-start" >
< button type = "button" class = "btn-close" data-bs-dismiss = "modal" aria-label = "Close" > < / button >
< h5 class = "modal-title" id = "optionModalLabel" > Option 加價< / h5 >
< div class = "mt-3" >
< input type = "text" class = "form-control" x-model = "searchtext" @ keyup = "searchOptions()" placeholder = "搜尋..." / >
< / div >
< div class = "categories mt-3" >
< button :class = "['btn', 'mt-2', (kind==1) ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions(1)" > 顯示全部< / button >
< button :class = "['btn', 'mt-2', (kind=='A') ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions('A', 1)" > A-1 車廂意匠< / button >
< button :class = "['btn', 'mt-2', (kind=='B') ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions('B', 1)" > A-2 車廂內裝< / button >
< button :class = "['btn', 'mt-2', (kind=='C') ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions('C', 1)" > A-3 車廂外部< / button >
< button :class = "['btn', 'mt-2', (kind=='D') ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions('D', 1)" > A-4 控制與其他< / button >
< button :class = "['btn', 'mt-2', (kind=='E') ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions('E', 1)" > B-1 平台梯< / button >
< button :class = "['btn', 'mt-2', (kind=='F') ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions('F', 1)" > C-1 汰改< / button >
< br / > < br / >
< template x-for = "button in buttons" >
< button style = "margin-right:3px" :class = "['btn', (button.type == subkind) ? 'btn-primary' : 'btn-secondary text-light']" @ click = "searchOptions(null, button.type)" x-text = "button.name" > < / button >
< / template >
< / div >
< / div >
< div class = "modal-body" >
< div >
< table class = "table " border = 1 >
< thead >
< tr >
< th > ID< / th >
< th > 名稱< / th >
< th > 規格< / th >
< th > 備註< / th >
< th > 配置< / th >
< th > 單位< / th >
< th > 定價< / th >
< / tr >
< / thead >
< tbody >
< template x-for = "(option, idx) in options" :key = "option.id" >
< tr style = "cursor:pointer;" :class = "option.selected == 1 ? ' selected' : ''" x-show = "option.isShow == 1" @ click = "selectOption(idx, option.id, option.group_name, option.price, option.memo)" >
< td x-text = 'option.id' name = "optionID" class = "bg-transparent" > < / td >
< td x-text = "option.group_name" class = "bg-transparent" > < / td >
< td x-text = "option.spec" class = "bg-transparent" > < / td >
< td x-text = "option.memo" class = "bg-transparent" > < / td >
< td x-text = "optionalArr[option.optional]" class = "bg-transparent" > < / td >
< td x-text = "option.unit" class = "bg-transparent" > < / td >
< td x-text = "option.price" class = "bg-transparent" > < / td >
< / tr >
< / template >
< / tbody >
< / table >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" > 關閉< / button >
< button type = "button" class = "btn btn-primary" data-bs-dismiss = "modal" @ click = "chkOptions()" > 確認< / button >
< / div >
< button type = "button" class = "btn btn-secondary" @ click = "hideToElevatorModal()" > 關閉< / button >
< button type = "button" class = "btn btn-primary" @ click = "chkOptionToElevators()" > 確認< / button >
< / div >
< / div >
< div class = "window-back" @ click = "hideToElevatorModal()" > < / div >
< / div >
< div class = "modal fade modal-dialog-scrollable modal-m" id = "toElevatorModal" tabindex = "-1" aria-labelledby = "toElevatorModalLabel" aria-hidden = "true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header d-flex flex-column align-items-start" >
< button type = "button" class = "btn-close" data-bs-dismiss = "modal" aria-label = "Close" > < / button >
< h5 class = "modal-title" id = "" > 配對電梯< / h5 >
< div class = "window-modal" x-ref = "toOtherOptionElevatorModal" id = "toOtherOptionElevatorModal" >
< div class = "window-modal-content modal-m" >
< div class = "window-modal-header" >
< h4 > 配對電梯< / h4 >
< button class = "btn btn-close" @ click = "hideToOtherOptionElevatorModal()" > X< / button >
< / div >
< div class = "modal-body" >
< div class = "window-modal-body" >
< div >
< table class = "table" >
< tr >
@ -271,7 +210,7 @@ function convertDateTimeFormat($dateTimeStr) {
< tr >
< td x-text = "elevator.id" > < / td >
< td x-text = "elevator.model" > < / td >
< td > < input type = "radio" name = "optionToElevator" :value = "elevator.id" class = "form-check-input" x-model = "toElevatorNo" / > < / td >
< td > < input type = "radio" name = "otherO ptionToElevator" :value = "elevator.id" class = "form-check-input" x-model = "toElevatorNo" / > < / td >
< / tr >
< / template >
< tr x-show = "toElevators.length == 0" >
@ -283,20 +222,19 @@ function convertDateTimeFormat($dateTimeStr) {
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" > 關閉< / button >
< button type = "button" class = "btn btn-primary" data-bs-dismiss = "modal" @ click = "chkOptionToElevators()" > 確認< / button >
< / div >
< button type = "button" class = "btn btn-secondary" @ click = "hideToOtherOptionElevatorModal()" > 關閉< / button >
< button type = "button" class = "btn btn-primary" @ click = "chkOtherOptionToElevators()" > 確認< / button >
< / div >
< / div >
< div class = "window-back" @ click = "hideToOtherOptionElevatorModal()" > < / div >
< / div >
< div class = "modal fade modal-dialog-scrollable modal-m" id = "toOtherOptionElevatorModal" tabindex = "-1" aria-labelledby = "toElevatorModalLabel" aria-hidden = "true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header d-flex flex-column align-items-start" >
< button type = "button" class = "btn-close" data-bs-dismiss = "modal" aria-label = "Close" > < / button >
< h5 class = "modal-title" id = "" > 配對電梯< / h5 >
< div class = "window-modal" x-ref = "toMaintainOptionElevatorModal" id = "toMaintainOptionElevatorModal" >
< div class = "window-modal-content modal-m" >
< div class = "window-modal-header" >
< h4 > 配對電梯< / h4 >
< button class = "btn btn-close" @ click = "hideToMaintainOptionElevatorModal()" > X< / button >
< / div >
< div class = "modal-body" >
< div class = "window- modal-body" >
< div >
< table class = "table" >
< tr >
@ -308,7 +246,7 @@ function convertDateTimeFormat($dateTimeStr) {
< tr >
< td x-text = "elevator.id" > < / td >
< td x-text = "elevator.model" > < / td >
< td > < input type = "radio" name = "other OptionToElevator" :value = "elevator.id" class = "form-check-input" x-model = "toElevatorNo" / > < / td >
< td > < input type = "radio" name = "maintain OptionToElevator" :value = "elevator.id" class = "form-check-input" x-model = "toElevatorNo" / > < / td >
< / tr >
< / template >
< tr x-show = "toElevators.length == 0" >
@ -320,50 +258,129 @@ function convertDateTimeFormat($dateTimeStr) {
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" > 關閉< / button >
< button type = "button" class = "btn btn-primary" data-bs-dismiss = "modal" @ click = "chkOtherOptionToElevators()" > 確認< / button >
< / div >
< button type = "button" class = "btn btn-secondary" @ click = "hideToMaintainOptionElevatorModal()" > 關閉< / button >
< button type = "button" class = "btn btn-primary" @ click = "chkMaintainOptionToElevators()" > 確認< / button >
< / div >
< / div >
< div class = "window-back" @ click = "hideToMaintainOptionElevatorModal()" > < / div >
< / div >
< div class = "modal fade modal-dialog-scrollable modal-m" id = "toMaintainOptionElevatorModal" tabindex = "-1" aria-labelledby = "toElevatorModalLabel" aria-hidden = "true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header d-flex flex-column align-items-start" >
< button type = "button" class = "btn-close" data-bs-dismiss = "modal" aria-label = "Close" > < / button >
< h5 class = "modal-title" id = "" > 配對電梯< / h5 >
< div class = "window-modal" x-ref = "createElevatorModal" id = "createElevatorModal" >
< div class = "window-modal-content modal-xl" >
< div class = "window-modal-header" >
< h4 > 新增電梯規格< / h4 >
< button class = "btn btn-close" @ click = "hideCreateElevatorModal()" > X< / button >
< / div >
< div class = "modal-body" >
< div class = "window- modal-body" >
< div >
< table class = "table" >
< tr class = "table-active" >
< th > 電梯< / th >
< th > 人乘/載重< / th >
< th > 停數< / th >
< th > 速度< / th >
< / tr >
< tr >
< th > 項次< / th >
< td >
< select name = "" id = "" class = "form-control" x-model = "modalElevatorInfo.spec" @ change = "getModalElevatorPrice()" >
< 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 = "modalElevatorInfo.person" @ change = "getModalElevatorPrice()" >
< 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 = "modalElevatorInfo.stop" @ keyup = "getModalElevatorPrice()" @ change = "getModalElevatorPrice()" / >
< / td >
< td >
< select name = "" id = "" class = "form-control" x-model = "modalElevatorInfo.speed" @ change = "getModalElevatorPrice()" >
< option value = "" > 請選擇< / option >
< option value = "9" > 9< / option >
< option value = "24" > 24< / option >
< option value = "30" > 30< / option >
< option value = "45" > 45< / option >
< option value = "60" > 60< / option >
< option value = "90" > 90< / option >
< option value = "105" > 105< / option >
< option value = "120" > 120< / option >
< option value = "150" > 150< / option >
< / select >
< / td >
< / tr >
< tr class = "table-active" >
< th > 開門方式< / th >
< th > 規格< / th >
< th > 選擇< / th >
< th > 數量< / th >
< th > < / th >
< / tr >
< template x-for = "elevator in toElevators" >
< tr >
< td x-text = "elevator.id" > < / td >
< td x-text = "elevator.model" > < / td >
< td > < input type = "radio" name = "maintainToElevator" :value = "elevator.id" class = "form-check-input" x-model = "toElevatorNo" / > < / td >
< td >
< select name = "" id = "" class = "form-control" style = "width:83px" x-model = "modalElevatorInfo.open" @ change = "getModalElevatorPrice()" >
< option value = "CO" > CO< / option >
< option value = "2S" > 2S< / option >
< option value = "2U" > CO< / option >
< option value = "4PCO" > 4PCO< / option >
< option value = "6PCO" > 6PCO< / option >
< / select >
< / td >
< td >
< input type = "text" x-show = "!modalElevatorInfo.price || modalElevatorInfo.price ==''" class = "form-control" disabled / >
< input type = "text" x-show = "modalElevatorInfo.price > 0" class = "form-control" disabled x-model = "modalElevatorInfo.spec + '-' + modalElevatorInfo.person + '*' + modalElevatorInfo.stop + '-' + modalElevatorInfo.open + modalElevatorInfo.speed" >
< / td >
< td >
< input type = "number" class = "form-control" style = "width:83px" x-model = "modalElevatorInfo.num" >
< / td >
< td > < / td >
< / tr >
< / template >
< tr x-show = "toElevators.length == 0" >
< td colspan = "3" >
< small class = "text-danger" style = "font-size:13px;font-weight:600" > 暫無可選電梯,請先新增電梯規格!< / small >
< tr class = "table-active" >
< th > 公司發布價(單價)< / th >
< th > 公司發布價(複價)< / th >
< th > 自定售價(台)< / th >
< th > 自定售價(總價)< / th >
< / tr >
< tr >
< td >
< input type = "text" disabled class = "form-control" x-model = "(modalElevatorInfo.price).toLocaleString()" >
< / td >
< td >
< input type = "text" disabled class = "form-control" x-model = "(modalElevatorInfo.price * modalElevatorInfo.num).toLocaleString()" >
< / td >
< td >
< input type = "number" class = "form-control" x-model = "modalElevatorInfo.sale_price" >
< / td >
< td >
< input type = "text" disabled class = "form-control" x-model = "(modalElevatorInfo.sale_price * modalElevatorInfo.num).toLocaleString()" >
< / td >
< / tr >
< / table >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" data-bs-dismiss = "modal" > 關閉< / button >
< button type = "button" class = "btn btn-primary" data-bs-dismiss = "modal" @ click = "chkMaintainOptionToElevators()" > 確認< / button >
< / div >
< button type = "button" class = "btn btn-secondary" @ click = "hideCreateElevatorModal()" > 關閉< / button >
< button type = "button" class = "btn btn-primary" @ click = "createElevatorFn()" > 新增< / button >
< / div >
< / div >
< div class = "window-back" @ click = "hideCreateElevatorModal()" > < / div >
< / div >
< div class = "modal fade modal-dialog-scrollable modal-lg" id = "createElevatorModal" tabindex = "-1" aria-labelledby = "createElevatorModalLabel" aria-hidden = "true" >
<!-- <div class="modal fade modal - dialog - scrollable modal - lg" id="createElevatorModal" tabindex=" - 1" aria - labelledby="createElevatorModalLabel" aria - hidden="true" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header d-flex flex-column align-items-start" >
@ -480,8 +497,41 @@ function convertDateTimeFormat($dateTimeStr) {
< / div >
< / div >
< / div >
< / div > -->
< div class = "window-modal" x-ref = "createOtherOptionModal" id = "createOtherOptionModal" >
< div class = "window-modal-content modal-xl" >
< div class = "window-modal-header" >
< h4 > 新增除外項目< / h4 >
< button class = "btn btn-close" @ click = "hideCreateOtherOptionModal()" > X< / button >
< / div >
< div class = "window-modal-body" >
< div >
< table class = "table" >
< tr class = "table-active" >
< th > 詢價單號< / th >
< th > 項目名稱< / th >
< th > 單價< / th >
< th > 數量< / th >
< th > 複價< / th >
< / tr >
< tr >
< td > < input type = "text" class = "form-control" x-model = "modalOtherOptionInfo.pr_no" > < / td >
< td > < input type = "text" class = "form-control" x-model = "modalOtherOptionInfo.name" > < / td >
< td > < input type = "number" class = "form-control" x-model = "modalOtherOptionInfo.price" > < / td >
< td > < input type = "number" class = "form-control" x-model = "modalOtherOptionInfo.num" > < / td >
< td > < input type = "text" disabled class = "form-control" x-model = "(modalOtherOptionInfo.price * modalOtherOptionInfo.num).toLocaleString()" > < / td >
< / tr >
< / table >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" @ click = "hideCreateOtherOptionModal()" > 關閉< / button >
< button type = "button" class = "btn btn-primary" @ click = "createOtherOptionFn()" > 新增< / button >
< / div >
< div class = "modal fade modal-dialog-scrollable modal-xl" id = "createOtherOptionModal" tabindex = "-1" aria-labelledby = "createElevatorModalLabel" aria-hidden = "true" >
< / div >
< div class = "window-back" @ click = "hideCreateOtherOptionModal()" > < / div >
< / div >
<!-- <div class="modal fade modal - dialog - scrollable modal - xl" id="createOtherOptionModal" tabindex=" - 1" aria - labelledby="createElevatorModalLabel" aria - hidden="true">
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header d-flex flex-column align-items-start" >
@ -515,8 +565,39 @@ function convertDateTimeFormat($dateTimeStr) {
< / div >
< / div >
< / div >
< / div > -->
< div class = "window-modal" x-ref = "createMaintainModal" id = "createMaintainModal" >
< div class = "window-modal-content modal-xl" >
< div class = "window-modal-header" >
< h4 > 新增保固延長< / h4 >
< button class = "btn btn-close" @ click = "hideCreateMaintainModal()" > X< / button >
< / div >
< div class = "modal fade modal-dialog-scrollable modal-lg" id = "createMaintainModal" tabindex = "-1" aria-labelledby = "createElevatorModalLabel" aria-hidden = "true" >
< div class = "window-modal-body" >
< div >
< table class = "table" >
< tr class = "table-active" >
< th > 單價< / th >
< th > 數量(月)< / th >
< th > 總價< / th >
< th > 備註< / th >
< / tr >
< tr >
< td > < input type = "number" class = "form-control" x-model = "modalMaintainInfo.price" > < / td >
< td > < input type = "number" class = "form-control" x-model = "modalMaintainInfo.num" > < / td >
< td > < input type = "text" disabled class = "form-control" x-model = "(modalMaintainInfo.price * modalMaintainInfo.num).toLocaleString()" > < / td >
< td > < input type = "text" class = "form-control" x-model = "modalMaintainInfo.memo" > < / td >
< / tr >
< / table >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-secondary" @ click = "hideCreateMaintainModal()" > 關閉< / button >
< button type = "button" class = "btn btn-primary" @ click = "createMaintainOptionFn()" > 新增< / button >
< / div >
< / div >
< div class = "window-back" @ click = "hideCreateMaintainModal()" > < / div >
< / div >
<!-- <div class="modal fade modal - dialog - scrollable modal - lg" id="createMaintainModal" tabindex=" - 1" aria - labelledby="createElevatorModalLabel" aria - hidden="true">
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-header d-flex flex-column align-items-start" >
@ -548,7 +629,7 @@ function convertDateTimeFormat($dateTimeStr) {
< / div >
< / div >
< / div >
< / div >
< / div > -->
< div class = "container" >
< table class = "table" border = "1" >
@ -645,23 +726,23 @@ function convertDateTimeFormat($dateTimeStr) {
< div class = "divitem" >
< div class = "title" >
< h4 > 整機單價< / h4 >
< button class = "addbtn btn" x-ref = "addElevatorBtn" data-bs-toggle = "modal" data-bs-target = "#createElevatorModal " > +< / button >
< button class = "addbtn btn" x-ref = "addElevatorBtn" @ click = "openCreateElevatorModal() " > +< / 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 >
< th > 項次< / th >
< th > 電梯< / th >
< th > 人乘/< br > 載重< / th >
< th > 停數< / th >
< th > 速度(m/min)< / th >
< th > 開門方式< / th >
< th > 規格< / th >
< th > 公司發布價(台)< / th >
< th > 數量< / th >
< th > 公司發布價(總價)< / th >
< th > 售價(台)< / th >
< th > 售價(總價) < / th >
< / tr >
< / thead >
< tbody >
@ -726,7 +807,7 @@ function convertDateTimeFormat($dateTimeStr) {
< input type = "text" style = "width:150px" x-show = "elevator.specifications!='' && elevator.person!='' && elevator.stop!='' && elevator.speed!='' && elevator.open_converted!=''" class = "form-control" disabled x-model = "elevator.specifications + '-' + elevator.person + '*' + elevator.stop + '-' + elevator.open_converted + elevator.speed" >
< / td >
< td >
< input type = "text" class = "form-control" disabled x-model = "elevator.price" > < span x-show = "elevator.price==''" style = "font-size:12px;color:red;font-weight:600" > 請填寫正確規格< / span >
< input type = "text" class = "form-control" disabled :value = "Number( elevator.price).toLocaleString() " > < span x-show = "elevator.price==''" style = "font-size:12px;color:red;font-weight:600" > 請填寫正確規格< / span >
< / td >
< td > < input type = "number" class = "form-control " value = "1" style = "width:40px;padding-left:5px" x-model = "elevator.spec_num" > < / td >
< td >
@ -746,9 +827,9 @@ function convertDateTimeFormat($dateTimeStr) {
< tr >
< td colspan = 8 > 小計< / td >
< td > < input type = "text" class = "form-control" disabled :value = "totalElevatorsNum()" style = "width:40px;padding-left:5px" > < / td >
< td > < input type = "text" class = "form-control" disabled :value = "totalElevatorsPrice()" > < / td >
< td > < input type = "text" class = "form-control" disabled :value = "totalElevatorsPrice().toLocaleString() " > < / td >
< td > < / td >
< td > < input type = "text" class = "form-control" disabled :value = "totalElevatorsSalePrice()" > < / td >
< td > < input type = "text" class = "form-control" disabled :value = "totalElevatorsSalePrice().toLocaleString() " > < / td >
< / tr >
< / template >
< / tbody >
@ -757,12 +838,12 @@ function convertDateTimeFormat($dateTimeStr) {
< div class = "divitem" >
< div class = "title" >
< h4 > Option加價< / h4 >
< button class = "addbtn btn" x-ref = "addElevatorBtn" data-bs-toggle = "modal" data-bs-target = "#optionModal" @ click = "initModalSelectedOptions()" > +< / button >
< button class = "addbtn btn" x-ref = "addElevatorBtn" @ click = "initModalSelectedOptions()" > +< / button >
< / div >
< table class = "table" border = 1 >
< thead x-show = "selectedOptions.length > 0" >
< tr >
< th > 項次 < / th >
< th > ID < / th >
< th > 選配規格< / th >
< th style = "width:150px;" > 單價< / th >
< th style = "width:80px;" > 數量< / th >
@ -773,13 +854,13 @@ function convertDateTimeFormat($dateTimeStr) {
< / tr >
< / thead >
< tbody >
< template x-for = "(option, key) in selectedOptions" :key = "option.idx " >
< template x-for = "(option, key) in selectedOptions" :key = "option.key " >
< tr x-show = "option != null" >
< td x-text = "option.id" > < / td >
< td x-text = "option.name" > < / td >
< td > < input type = "text" class = "form-control" x-model = "option.price" disabled > < / td >
< td > < input type = "text" class = "form-control" :value = "option.price.toLocaleString() " disabled > < / td >
< td > < input type = "number" class = "form-control" x-model = "option.qty" style = "width:80px" > < / td >
< td > < input type = "text" class = "form-control" disabled :value = "option.qty * option.price" > < / td >
< td > < input type = "text" class = "form-control" disabled :value = "Number( option.qty * option.price).toLocaleString() " > < / td >
< td > < textarea class = "form-control" x-text = "option.memo" cols = "30" rows = "auto" disabled > < / textarea > < / td >
< td >
< template x-for = "el in option.toElevator" >
@ -788,7 +869,7 @@ function convertDateTimeFormat($dateTimeStr) {
< / td >
< td >
< div class = "d-flex" >
< button class = "selectElevator btn btn-danger" data-bs-toggle = "modal" data-bs-target = "#toElevatorModal" @ click = "addOptionToElevator(option.key)" > 電梯< / button >
< button class = "selectElevator btn btn-danger" @ click = "addOptionToElevator(option.key)" > 電梯< / button >
< button class = "deleteBtn btn btn-danger" @ click = "removeOption(option.key)" > X< / button >
< / div >
< / td >
@ -796,7 +877,7 @@ function convertDateTimeFormat($dateTimeStr) {
< / template >
< tr x-show = "selectedOptions.length > 0" >
< td colspan = 4 > 小計< / td >
< td colspan = 1 > < input type = "text" class = "form-control" disabled :value = "totalOptionsPrice()" > < / td >
< td colspan = 1 > < input type = "text" class = "form-control" disabled :value = "totalOptionsPrice().toLocaleString() " > < / td >
< td colspan = 4 > < / td >
< / tr >
< / tbody >
@ -805,7 +886,7 @@ function convertDateTimeFormat($dateTimeStr) {
< div class = "divitem" >
< div class = "title" >
< h4 > 除外項目< / h4 >
< button class = "addbtn btn" x-ref = "addElevatorBtn" data-bs-toggle = "modal" data-bs-target = "#createOtherOptionModal" > +< / button >
< button class = "addbtn btn" @ click = "openCreateOtherOptionFn()" > +< / button >
< / div >
< table class = "table" border = 1 >
< thead x-show = "otherOptions.length > 0" >
@ -834,7 +915,7 @@ function convertDateTimeFormat($dateTimeStr) {
< / td >
< td >
< div class = "d-flex" >
< button class = "selectElevator btn btn-danger" data-bs-toggle = "modal" data-bs-target = "#toOtherOptionElevatorModal" @ click = "addOtherOptionToElevator(option.id)" > 電梯< / button >
< button class = "selectElevator btn btn-danger" @ click = "addOtherOptionToElevator(option.id)" > 電梯< / button >
< button class = "deleteBtn btn btn-danger" @ click = "removeOtherOption(option.id)" > X< / button >
< / div >
< / td >
@ -842,8 +923,8 @@ function convertDateTimeFormat($dateTimeStr) {
< / template >
< tr x-show = "otherOptions.length > 0" >
< td colspan = 3 > 小計< / td >
< td colspan = 1 > < input type = "number" class = "form-control" disabled x-model = "totalOtherOptionsNum()" > < / td >
< td colspan = 1 > < input type = "text" class = "form-control" disabled x-model = "totalOtherOptionsPrice()" > < / td >
< td colspan = 1 > < input type = "number" class = "form-control" disabled :value = "totalOtherOptionsNum().toLocaleString ()" > < / td >
< td colspan = 1 > < input type = "text" class = "form-control" disabled :value = "totalOtherOptionsPrice().toLocaleString ()" > < / td >
< td colspan = 3 > < / td >
< / tr >
< / tbody >
@ -852,7 +933,7 @@ function convertDateTimeFormat($dateTimeStr) {
< div class = "divitem" >
< div class = "title" >
< h4 > 保固延長< / h4 >
< button class = "addbtn btn" x-ref = "addElevatorBtn" data-bs-toggle = "modal" data-bs-target = "#createMaintainModal "> +< / button >
< button class = "addbtn btn" @ click = "openCreateMaintainModal() "> +< / button >
< / div >
< table class = "table" border = 1 >
< thead x-show = "maintainOptions.length > 0" >
@ -879,7 +960,7 @@ function convertDateTimeFormat($dateTimeStr) {
< / td >
< td >
< div class = "d-flex" >
< button class = "selectElevator btn btn-danger" data-bs-toggle = "modal" data-bs-target = "#toMaintainOptionElevatorModal" @ click = "addMaintainOptionToElevator(option.id)" > 電梯< / button >
< button class = "selectElevator btn btn-danger" @ click = "addMaintainOptionToElevator(option.id)" > 電梯< / button >
< button class = "deleteBtn btn btn-danger" @ click = "removeMaintainOption(option.id)" > X< / button >
< / div >
< / td >
@ -1059,7 +1140,7 @@ function convertDateTimeFormat($dateTimeStr) {
< td > < input type = "text" class = "form-control" x-model = "(totalSalePrice() - totalPrice()).toLocaleString()" disabled style = "width:180px" / > < / td >
< td > < input type = "text" class = "form-control" x-model = "Math.round(totalSalePrice() / totalPrice() * 100 * 10) /10" disabled / > < / td >
< td > < input type = "text" class = "form-control" x-model = "totalElevatorsNum()" disabled / > < / td >
< td > < input type = "text" class = "form-control" x-model = "serviceFee" / > < / td >
< td > < input type = "text" class = "form-control" x-model = "serviceFee" style = "width:150px" / > < / td >
< / tr >
< tr >
< th > 預定成交日< / th >
@ -1077,7 +1158,7 @@ function convertDateTimeFormat($dateTimeStr) {
< td > < / td >
< td > < / td >
< / tr >
<!-- <tr >
< tr >
< th > 罰則< / th >
< th > 訂金保證金(函)%< / th >
< th > 履約保證金(函)%< / th >
@ -1086,13 +1167,13 @@ function convertDateTimeFormat($dateTimeStr) {
< th > < / th >
< / tr >
< tr >
< td > < input type = "text" class = "form-control" value = "" / > < / td >
< td > < input type = "text" class = "form-control" value = "" / > < / td >
< td > < input type = "text" class = "form-control" value = "" / > < / td >
< td > < input type = "text" class = "form-control" value = "" / > < / td >
< td > < input type = "text" class = "form-control" x-model = "penalty " / > < / td >
< td > < input type = "text" class = "form-control" x-model = "deposit_rate " / > < / td >
< td > < input type = "text" class = "form-control" x-model = "keep_rate " / > < / td >
< td > < input type = "text" class = "form-control" x-model = "warranty_rate " / > < / td >
< td > < / td >
< td > < / td >
< / tr > -->
< / tr >
< tr >
< th colspan = "6" > 特記事項< / th >
< / tr >
@ -1140,4 +1221,5 @@ function convertDateTimeFormat($dateTimeStr) {
const salesman = '<?php echo $hope_customer [ 'salesman' ]; ?> ';
const pre_order_date = '<?php echo convertDateTimeFormat ( $hope_customer [ 'pre_order_date' ]); ?> ';
const is_renovation = '<?php echo $hope_customer [ 'is_renovation' ]; ?> ';
const token_link = '<?php echo $token_link ; ?> ';
< / script >