Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
million
Commits
45fb6cf0
Commit
45fb6cf0
authored
Mar 17, 2023
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
63eca6a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
19 deletions
+45
-19
orderPreview.vue
src/components/car/orderPreview.vue
+18
-11
calendar.vue
src/components/trip/calendar.vue
+2
-2
detailsCar.vue
src/pages/detailsCar.vue
+25
-6
No files found.
src/components/car/orderPreview.vue
View file @
45fb6cf0
...
...
@@ -151,10 +151,11 @@ export default {
this
.
p
=
n
;
if
(
n
&&
n
.
startDate
){
this
.
chosenObj
.
startDate
=
n
.
startDate
;
console
.
log
(
this
.
chosenObj
.
startDate
,
this
.
dataAll
,
'==='
)
let
arr
=
this
.
dataAll
.
filter
(
x
=>
x
.
Date
==
this
.
chosenObj
.
startDate
)
this
.
TicketIds
=
arr
[
0
].
Price
.
map
(
x
=>
{
return
x
.
TicketId
})
// this.selectedCar = this.dataList.CarTypeList[0].Id
// this.selectedCarObj = this.dataList.CarTypeList[0]
if
(
arr
.
length
>
0
){
this
.
TicketIds
=
arr
[
0
].
Price
.
map
(
x
=>
{
return
x
.
TicketId
})
}
}
this
.
calcMoney
()
...
...
@@ -170,6 +171,14 @@ export default {
deep
:
true
,
immediate
:
true
},
Month
:{
handler
(
n
,
o
)
{
this
.
selectedCarObj
=
this
.
dataList
.
CarTypeList
[
0
]
// this.getCarPriceData2()
},
deep
:
true
,
immediate
:
true
}
},
data
()
{
return
{
...
...
@@ -189,7 +198,7 @@ export default {
if
(
this
.
p
.
startDate
){
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
()
this
.
getCarPriceData2
()
//
this.getCarPriceData2()
}
this
.
getCarPriceData
()
},
...
...
@@ -312,13 +321,11 @@ export default {
remark
:
""
,
};
},
resetHandler
(
type
)
{
if
(
type
&&
type
!=
1
){
this
.
selectedCarObj
=
null
this
.
selectedAirportObj
=
null
this
.
onCarObj
=
null
this
.
unCarObj
=
null
}
resetHandler
()
{
this
.
selectedCarObj
=
null
this
.
selectedAirportObj
=
null
this
.
onCarObj
=
null
this
.
unCarObj
=
null
setTimeout
(()
=>
{
this
.
p
=
{};
this
.
initModel
()
...
...
src/components/trip/calendar.vue
View file @
45fb6cf0
...
...
@@ -122,10 +122,10 @@ export default {
},
methods
:
{
init
()
{
this
.
createChosenDateHandler
();
let
startDate
=
this
.
prices
.
length
>
0
&&
this
.
prices
[
0
].
startDate
?
this
.
prices
[
0
].
startDate
:
''
let
firstMonth
=
date
.
formatDate
(
new
Date
(
this
.
prices
[
0
].
startDate
),
new
Date
(
startDate
),
"YYYY/MM"
);
console
.
log
(
firstMonth
)
...
...
src/pages/detailsCar.vue
View file @
45fb6cf0
...
...
@@ -173,11 +173,12 @@
<span
class=
"f12 text-grey-6"
>
起
</span>
</div>
<div
v-else
class=
"text-subtitle1 text-grey-6"
>
暫無報價
</div>
<!-- :disable="priceList.length>0?false:true" -->
<q-btn
color=
"primary"
label=
"選擇方案"
unelevated
:disable=
"priceList.length>0?false:true"
@
click=
"goScrollHandler(priceListHeight)"
:class=
"
{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
...
...
@@ -271,6 +272,7 @@
:price=
"currentPrice"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
ref=
"orderPreview"
></order-preview>
</div>
...
...
@@ -278,9 +280,9 @@
<div
class=
"text-h6 q-pt-lg"
v-if=
"$q.platform.is.mobile"
>
所選方案詳情
</div>
<!-- v-if="priceList && priceList.length > 0" -->
<div
class=
"bg-white rounded-borders q-mt-md"
v-if=
"priceList && priceList.length > 0"
>
<div
class=
"q-pa-md row"
>
<div
class=
"col"
>
...
...
@@ -309,12 +311,13 @@
</div>
<div
class=
""
v-if=
"$q.platform.is.desktop"
>
<div
class=
"row items-center"
>
<span
class=
"product-price text-h6 q-mr-md"
<span
v-if=
"priceList.length>0&&priceList[0].originalB2CPrice > 0"
class=
"product-price text-h6 q-mr-md"
>
CNY
{{
moneyFormat
(
priceList
[
0
].
originalB2CPrice
,
0
)
}}
</span
>
<span
v-else
class=
"col"
></span>
<q-btn
color=
"primary"
outline
...
...
@@ -323,7 +326,7 @@
class=
"q-px-lg"
/>
</div>
<div
class=
"text-info q-mt-md text-right"
>
<div
class=
"text-info q-mt-md text-right"
v-if=
"priceList.length>0"
>
最早可預訂日期:
{{
priceList
[
0
].
startDate
}}
</div>
</div>
...
...
@@ -356,6 +359,7 @@
<calendar
:priceList=
"priceList"
@
change=
"changeChosenDateHandler"
@
getQuotationData=
"getCarPriceData2"
ref=
"calendar"
></calendar>
</div>
...
...
@@ -367,6 +371,7 @@
:price=
"currentPrice"
@
reset=
"resetHandler"
@
getPriceList=
"getPriceList"
ref=
"orderPreview"
></order-preview>
</div>
</div>
...
...
@@ -980,7 +985,11 @@ export default {
);
},
// 获取车的详情
getCarPriceData2
()
{
getCarPriceData2
(
time
)
{
if
(
time
){
this
.
currentYM
.
str
=
time
this
.
$refs
.
orderPreview
.
resetHandler
()
}
this
.
priceList
=
[]
this
.
apipost
(
"b2c_get_GetCarSingleProductMonthPrice"
,
...
...
@@ -1005,9 +1014,19 @@ export default {
if
(
date
.
formatDate
(
Date
.
now
(),
'YYYY-MM-DD'
)
!=
x
.
Date
){
arr
.
push
(
dataObj
)
}
}
})
if
(
arr
.
length
==
0
){
let
dataObj
=
{
startDate
:
this
.
currentYM
.
str
,
originalB2CPrice
:
''
,
remainNum
:
0
,
Count
:
0
,
isSupportChildren
:
0
,
safeMoney
:
0
,
}
arr
.
push
(
dataObj
)
}
this
.
priceList
=
JSON
.
parse
(
JSON
.
stringify
(
arr
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment