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
0ee7a8aa
Commit
0ee7a8aa
authored
Nov 21, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c06499e9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1980 additions
and
98 deletions
+1980
-98
kkday.vue
src/components/searchProductdata/kkday.vue
+136
-85
list.vue
src/components/searchProductdata/list.vue
+15
-2
calendarproduct.vue
src/components/trip/calendarproduct.vue
+233
-0
SearchProduct.vue
src/pages/SearchProduct.vue
+1
-1
detailsProduct.vue
src/pages/detailsProduct.vue
+1580
-0
orderPreview.vue
src/pages/line/orderPreview.vue
+10
-10
routes.js
src/router/routes.js
+5
-0
No files found.
src/components/searchProductdata/kkday.vue
View file @
0ee7a8aa
This diff is collapsed.
Click to expand it.
src/components/searchProductdata/list.vue
View file @
0ee7a8aa
...
...
@@ -33,7 +33,7 @@
<ul
class=
"group-list"
>
<li>
<
template
v-if=
"itemf.PriceList&&itemf.PriceList.length>0"
>
<div
v-for=
"(item,index) in itemf.priceList"
:key=
"index"
>
<div
v-for=
"(item,index) in itemf.priceList"
:key=
"index"
style=
"margin-right:5px;margin-bottom:7px;"
@
click=
"SwitchTCID(itemf,indexf,index)"
>
<a>
{{
item
.
StartDate
}}
</a>
</div>
</
template
>
...
...
@@ -69,12 +69,25 @@
},
methods
:
{
GotoDetails
(
item
)
{
this
.
CommonJump
(
'/details/'
+
encodeURIComponent
(
item
.
id
)
+
"/"
+
item
.
tcid
,
{}
);
this
.
CommonJump
(
'/details/'
+
encodeURIComponent
(
item
.
id
)
+
"/"
+
item
.
configId
,
{},
"blank"
);
},
//调用
gerOrderList
(){
this
.
$emit
(
'getPage'
)
},
SwitchTCID
(
obj
,
i
,
index
)
{
if
(
this
.
DataList
&&
this
.
DataList
.
length
>
0
){
let
nowobj
=
JSON
.
parse
(
JSON
.
stringify
(
obj
));
console
.
log
(
"nowobj"
,
nowobj
.
startDateList
);
this
.
DataList
[
i
]
=
{
...
nowobj
.
priceList
[
index
]
}
this
.
DataList
[
i
].
index
=
index
;
this
.
DataList
[
i
].
startDateList
=
nowobj
.
startDateList
;
this
.
DataList
[
i
].
priceList
=
nowobj
.
priceList
;
this
.
$forceUpdate
();
}
},
}
}
...
...
src/components/trip/calendarproduct.vue
0 → 100644
View file @
0ee7a8aa
<
template
>
<div>
<div
class=
"text-subtitle2 text-weight-bold"
>
選擇日期、選項
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
請選擇出發日期
</div>
<div
class=
"rounded-borders"
style=
"border: 1px solid #eee"
>
<div
class=
"q-px-lg q-py-sm row items-center"
>
<div
class=
"text-subtitle2 text-weight-bold col"
>
{{
months
[
currentMonth
].
display
}}
</div>
<div>
<q-btn
color=
"primary"
round
icon=
"iconfont iconpreviewleft"
flat
@
click=
"changeShowMonthHandler(-1)"
class=
"q-mr-sm"
:disable=
"currentMonth == 0"
/>
<q-btn
color=
"primary"
round
icon=
"iconfont iconpreviewright"
flat
@
click=
"changeShowMonthHandler(1)"
:disable=
"currentMonth == months.length - 1"
/>
</div>
</div>
<div
class=
"q-pa-sm non-selectable"
style=
"border-top: 1px solid #eee"
>
<div
class=
"row items-center"
>
<div
class=
"col text-weight-bold text-center"
style=
"padding: 10px 0 20px"
v-for=
"(x, i) in chineseWeek"
:key=
"i"
>
{{
x
}}
</div>
</div>
<div
class=
"row wrap"
>
<div
class=
"rounded-borders text-center text-weight-bold"
:class=
"
{
'cursor-pointer hover-date': x.value != ''
&&
x.price,
'cursor-not-allowed': (!x.price || x.price.remainNum==0)
&&
x.value != '',
'bg-primary': x.value != ''
&&
x.value == currentDate,
}"
style="padding: 8px 4px; width: 14.285%"
v-for="(x, i) in col"
:key="i"
@click="chosenDateHandler(x)"
>
<div
class=
"text-dark"
:class=
"
{ 'text-white': x.value == currentDate }"
v-if="x.price"
>
{{
x
.
display
}}
</div>
<div
class=
"text-grey-6"
v-else
>
{{
x
.
display
}}
</div>
<div
class=
"q-mt-sm f12"
:class=
"
{
'text-grey-1': x.value == currentDate,
' text-grey-6': x.value != currentDate,
}"
>
{{
x
.
price
&&
x
.
price
.
remainNum
>
0
?
moneyFormat
(
x
.
price
.
originalB2CPrice
,
0
)
:(
x
.
price
&&
x
.
price
.
remainNum
==
0
?
'售罄'
:
' '
)
}}
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
date
}
from
"quasar"
;
export
default
{
props
:
[
"priceList"
,
"tcid"
],
data
()
{
return
{
chineseWeek
:
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
],
chineseMonth
:
[
"一月"
,
"二月"
,
"三月"
,
"四月"
,
"五月"
,
"6月"
,
"七月"
,
"八月"
,
"九月"
,
"十月"
,
"十一月"
,
"十二月"
,
],
data
:
[],
months
:
[],
currentMonth
:
0
,
col
:
[],
prices
:
[],
currentDate
:
""
,
};
},
watch
:
{
priceList
:
{
handler
(
newVal
,
oldValue
)
{
this
.
prices
=
newVal
;
this
.
init
();
},
deep
:
true
,
// 深度监听
},
},
created
()
{
this
.
prices
=
this
.
priceList
;
console
.
log
(
this
.
prices
)
this
.
init
();
},
methods
:
{
init
()
{
this
.
createChosenDateHandler
();
let
startDate
=
this
.
prices
.
length
>
0
&&
this
.
prices
[
0
].
startDate
?
this
.
prices
[
0
].
startDate
:
''
let
firstMonth
=
date
.
formatDate
(
new
Date
(
startDate
),
"YYYY/MM"
);
console
.
log
(
firstMonth
)
let
current
=
this
.
months
.
findIndex
((
x
)
=>
x
.
monthValue
==
firstMonth
)
this
.
currentMonth
=
current
>-
1
?
current
:
0
;
this
.
changeMonthHandler
();
},
createChosenDateHandler
()
{
let
beginDate
=
new
Date
();
let
endDate
=
date
.
addToDate
(
beginDate
,
{
years
:
1
});
while
(
beginDate
<=
endDate
)
{
let
i
=
parseInt
(
date
.
formatDate
(
beginDate
,
"M"
))
-
1
;
this
.
months
.
push
({
value
:
date
.
formatDate
(
beginDate
,
"YYYY/MM/DD"
),
monthValue
:
date
.
formatDate
(
beginDate
,
"YYYY/MM"
),
display
:
`
${
date
.
formatDate
(
beginDate
,
"YYYY"
)}
${
this
.
chineseMonth
[
i
]
}
`
,
});
beginDate
=
date
.
addToDate
(
beginDate
,
{
months
:
1
});
}
},
changeShowMonthHandler
(
i
)
{
this
.
currentMonth
+=
i
;
let
value
=
this
.
months
[
this
.
currentMonth
].
value
this
.
$emit
(
'getQuotationData'
,
value
)
this
.
changeMonthHandler
();
},
changeMonthHandler
()
{
try
{
this
.
col
=
[];
let
newDate
=
new
Date
(
this
.
months
[
this
.
currentMonth
].
monthValue
+
'/01'
);
let
newBeginDate
=
date
.
startOfDate
(
newDate
,
"month"
);
let
newEndDate
=
date
.
endOfDate
(
newDate
,
"month"
);
for
(
let
i
=
0
;
i
<
date
.
formatDate
(
newBeginDate
,
"d"
);
i
++
)
{
this
.
col
.
push
({
value
:
""
,
});
}
while
(
newBeginDate
<=
newEndDate
)
{
let
value
=
date
.
formatDate
(
newBeginDate
,
"YYYY-MM-DD"
);
let
price
=
this
.
prices
.
find
((
x
)
=>
x
.
startDate
==
value
);
this
.
col
.
push
({
value
,
display
:
date
.
formatDate
(
newBeginDate
,
"DD"
),
price
,
});
newBeginDate
=
date
.
addToDate
(
newBeginDate
,
{
days
:
1
});
// 默认日期 价格
let
InitialOption
=
false
for
(
let
i
=
0
;
i
<
this
.
col
.
length
;
i
++
){
if
(
this
.
tcid
&&
this
.
tcid
.
length
>
0
){
if
(
!
InitialOption
&&
this
.
col
[
i
].
price
&&
this
.
col
[
i
].
price
.
id
===
this
.
tcid
)
{
this
.
currentDate
=
this
.
col
[
i
].
value
;
this
.
$emit
(
"change"
,
this
.
col
[
i
]);
InitialOption
=
true
}
}
else
{
if
(
!
InitialOption
&&
this
.
col
[
i
].
price
&&
this
.
col
[
i
].
price
.
remainNum
>
0
)
{
this
.
currentDate
=
this
.
col
[
i
].
value
;
this
.
$emit
(
"change"
,
this
.
col
[
i
]);
InitialOption
=
true
}
}
}
}
let
after
=
6
-
date
.
formatDate
(
newBeginDate
,
"d"
);
for
(
let
i
=
0
;
i
<
after
;
i
++
)
{
this
.
col
.
push
({
value
:
""
,
});
}
}
catch
(
error
)
{
alert
(
error
)
}
},
chosenDateHandler
(
item
)
{
if
(
item
.
price
&&
item
.
price
.
remainNum
>
0
)
{
this
.
currentDate
=
item
.
value
;
this
.
$emit
(
"change"
,
item
);
}
},
changePriceHandler
(
dateStr
,
money
){
//this.currentDate.price.originalB2CPrice=money
this
.
col
.
forEach
(
x
=>
{
if
(
x
.
value
==
dateStr
){
x
.
price
.
originalB2CPrice
=
money
}
})
},
reset
()
{
this
.
currentDate
=
""
;
},
},
};
</
script
>
<
style
>
.hover-date
:hover
{
background
:
#eee
;
}
</
style
>
src/pages/SearchProduct.vue
View file @
0ee7a8aa
...
...
@@ -1433,7 +1433,7 @@ export default {
this
.
ShowType
=
jObj
.
Config
.
ShowType
;
this
.
ShowType
=
2
;
}
else
{
this
.
getAera
();
//
this.getAera();
}
document
.
addEventListener
(
"click"
,
this
.
clickHandler
);
var
qsearchKey
=
this
.
getUrlKey
(
"qsearchKey"
,
window
.
location
.
href
);
...
...
src/pages/detailsProduct.vue
0 → 100644
View file @
0ee7a8aa
This diff is collapsed.
Click to expand it.
src/pages/line/orderPreview.vue
View file @
0ee7a8aa
...
...
@@ -434,7 +434,7 @@
</div>
</div>
</div>
<div
v-if=
"price.visaPrice > 0 || price.otherPrice > 0"
>
<
!-- <
div v-if="price.visaPrice > 0 || price.otherPrice > 0">
<hr
style="border: none; border-top: 1px dashed #eee !important"
class="bg-transparent q-mb-sm"
...
...
@@ -469,7 +469,7 @@
}}
</div>
</div>
</div>
</div>
-->
<hr
style=
"border: none; border-top: 1px dashed #eee !important"
class=
"bg-transparent q-mb-sm"
...
...
@@ -813,13 +813,13 @@ export default {
if
(
this
.
chosenObj
.
df
>
0
)
{
guestInfo
+=
`單房x
${
this
.
chosenObj
.
df
}
; `
;
}
if
(
this
.
chosenObj
.
visaPrice
>
0
)
{
guestInfo
+=
`簽證x
${
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
yeCount
}
; `
;
}
//
if (this.chosenObj.visaPrice > 0) {
//
guestInfo += `簽證x${
//
this.chosenObj.crCount +
//
this.chosenObj.etCount +
//
this.chosenObj.yeCount
//
}; `;
//
}
if
(
this
.
chosenObj
.
safeMoney
>
0
)
{
guestInfo
+=
`旅行保險x
${
this
.
chosenObj
.
crCount
+
...
...
@@ -961,7 +961,7 @@ export default {
money
+=
this
.
price
.
singleRoomPrice
*
this
.
chosenObj
.
df
;
let
sumCount
=
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
;
money
+=
this
.
price
.
visaPrice
*
sumCount
;
//
money += this.price.visaPrice * sumCount;
money
+=
this
.
price
.
safeMoney
*
sumCount
;
money
+=
this
.
price
.
otherPrice
*
sumCount
;
this
.
sumPrice
=
money
;
...
...
src/router/routes.js
View file @
0ee7a8aa
...
...
@@ -34,6 +34,11 @@ const routes = [{
meta
:
{
title
:
'行程'
},
component
:
()
=>
import
(
'pages/details.vue'
)
},
{
//行程2024
path
:
'/detailsProduct/:id/:configId'
,
meta
:
{
title
:
'行程'
},
component
:
()
=>
import
(
'pages/detailsProduct.vue'
)
},
{
// 包车,接机
meta
:
{
title
:
'包车,接机'
},
path
:
'/detailCar/:id'
,
...
...
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