Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
83b83478
Commit
83b83478
authored
Dec 08, 2023
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合下单页面开发
parent
24e3e559
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
289 additions
and
295 deletions
+289
-295
main.js
main.js
+1
-1
scenicCombiOrder.vue
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
+265
-259
times.vue
pages/scenic/scenicComponents/times.vue
+13
-16
scenicOrder.vue
pages/scenic/scenicOrder/scenicOrder.vue
+10
-19
No files found.
main.js
View file @
83b83478
...
...
@@ -8,7 +8,7 @@ import commonjs from 'common/common.js'
Vue
.
prototype
.
$commonjs
=
commonjs
Vue
.
prototype
.
$request
=
request
Vue
.
prototype
.
$wxurl
=
'https://
l
x.pangdly.com/#/'
Vue
.
prototype
.
$wxurl
=
'https://
w
x.pangdly.com/#/'
Vue
.
prototype
.
imageError
=
'@/static/img/common/pangdingLogo.png'
Vue
.
use
(
uView
)
uni
.
$u
.
config
.
unit
=
'rpx'
...
...
pages/scenic/scenicCombiOrder/scenicCombiOrder.vue
View file @
83b83478
This diff is collapsed.
Click to expand it.
pages/scenic/scenicComponents/times.vue
View file @
83b83478
<
template
>
<u-popup
:show=
"showPop"
:round=
"20"
@
close=
"
showPop=false
"
closeable
>
<u-popup
:show=
"showPop"
:round=
"20"
@
close=
"
confirm()
"
closeable
>
<view
class=
"son-wrap"
>
<view
class=
"time-title"
>
时间选择
...
...
@@ -14,15 +14,17 @@
:key="index" v-if="item.last>0">
<view>
{{
item
.
startPlanTime
?
item
.
startPlanTime
.
substr
(
0
,
5
):
""
}}
<text
v-if=
"item.endPlanTime"
>
-
</text>
{{
item
.
endPlanTime
?
item
.
endPlanTime
.
substr
(
0
,
5
):
""
}}
<text
v-if=
"!item.saleOnlyShowFromDate"
>
-
{{
item
.
endPlanTime
?
item
.
endPlanTime
.
substr
(
0
,
5
):
""
}}
</text>
</view>
<view>
剩余:
{{
item
.
last
}}
<text
v-if=
"item.copyLast!='余票充足'&&item.copyLast!='售罄'"
>
剩余:
</text>
{{
item
.
copyLast
}}
</view>
</view>
</view>
<view
style=
"padding:
0.5rem 0rem
;color: #FF0000;"
v-else
>
<view
style=
"padding:
50rpx 0
;color: #FF0000;"
v-else
>
空空如也...
</view>
<view
class=
"time-sure"
>
...
...
@@ -37,7 +39,7 @@
<
script
>
export
default
{
props
:
[
'chooseTimeList'
,
'
chooseTimeData'
,
'
timeActive'
],
props
:
[
'chooseTimeList'
,
'timeActive'
],
watch
:
{
timeActive
:
{
//父组件选中的下标
handler
(
newValue
,
oldValue
)
{
...
...
@@ -53,25 +55,20 @@ export default {
return
{
showPop
:
false
,
//控制该组件显示隐藏
active
:
10000
,
//默认不选中
times
:
''
,
//时间
timeNumber
:
''
,
//当前时间转化为数字
}
},
methods
:
{
//---时间选择
chooseTime
(
i
)
{
this
.
active
=
i
this
.
times
=
this
.
chooseTimeList
[
i
].
startPlanTime
},
//---时间确认事件
confirm
(
date
)
{
confirm
()
{
this
.
showPop
=
false
this
.
$emit
(
'timeConfig'
,
this
.
times
)
},
},
mounted
()
{
let
times
=
new
Date
().
Format
(
'yyyy-MM-dd hh:mm:ss'
)
this
.
timeNumber
=
parseInt
(
this
.
$commonjs
.
changeTime
(
times
))
if
(
this
.
active
!=
10000
){
this
.
$emit
(
'timeConfig'
,
this
.
active
)
}
}
}
}
</
script
>
...
...
pages/scenic/scenicOrder/scenicOrder.vue
View file @
83b83478
...
...
@@ -91,13 +91,13 @@
<view
class=
"time-list"
v-for=
"(item, index) of timeList"
@
click=
"chooseTime(index)"
:class=
"
{ on: timeActive == index }" :key="index">
<view>
{{
item
.
startPlanTime
?
item
.
startPlanTime
.
substr
(
0
,
5
)
:
''
}}
<text
v-if=
"
item.endPlanTime&&
!item.saleOnlyShowFromDate"
>
<text
v-if=
"!item.saleOnlyShowFromDate"
>
-
{{
item
.
endPlanTime
?
item
.
endPlanTime
.
substr
(
0
,
5
)
:
''
}}
</text>
</view>
<view>
<text
v-if=
"item.copyLast!='余票充足'&&item.copyLast!='售罄'"
>
剩余:
</text>
{{
item
.
l
ast
}}
{{
item
.
copyL
ast
}}
</view>
<view
v-if=
"timeActive == index"
class=
"date-icon"
>
<u-icon
name=
"checkmark"
color=
"#ffffff"
></u-icon>
...
...
@@ -329,7 +329,7 @@
:sortArr=
"sortArr"
:defaultAreaCode=
"defaultAreaCode"
></chooseArea>
<times
ref=
"times"
:chooseTimeList=
"timeList"
@
timeConfig=
"timeConfig"
:
chooseTimeData=
"chooseTimeData"
:
timeActive=
"timeActive"
></times>
<times
ref=
"times"
:chooseTimeList=
"timeList"
@
timeConfig=
"timeConfig"
:timeActive=
"timeActive"
></times>
<editContacts
ref=
"editContacts"
:editContact=
"editContact"
:contactTotal=
"contactTotal"
></editContacts>
<contactList
ref=
"contactList"
...
...
@@ -420,7 +420,6 @@ export default {
chooseContact
:
[],
//选中的游客信息列表
contactNum
:
1
,
//需要选择几位联系人数量
cruisePlanId
:
''
,
//班次Id
chooseTimeData
:
''
,
//选中的时间传给子组件
timeNumber
:
''
,
//当前时间转化为数字
startDate
:
''
,
//开始日期
endDate
:
''
,
//结束日期
...
...
@@ -589,7 +588,7 @@ export default {
})
this
.
dateChoose
(
index
)
//选中确认的日期
this
.
docQuery
.
selectAll
(
'.date-list'
).
boundingClientRect
(
data
=>
{
this
.
dateScroll
=
(
data
[
index
].
width
+
4
)
*
index
this
.
dateScroll
=
(
data
[
index
].
width
+
6
)
*
index
}).
exec
()
},
//---展示更多时间
...
...
@@ -601,7 +600,6 @@ export default {
if
(
this
.
timeList
[
i
].
copyLast
!=
'售罄'
){
this
.
timeActive
=
i
this
.
cruisePlanId
=
this
.
timeList
[
i
].
cruisePlanId
//获取班次Id
this
.
chooseTimeData
=
this
.
timeList
[
i
].
startPlanTime
this
.
maxBookNum
=
Math
.
min
(
this
.
timeList
[
i
].
last
,
this
.
productIfo
.
maxBookNum
)
//获取剩余库存
//如果为班次票,开始时间为班次时间的开始时间,结束时间为班次时间的结束时间,班次时间的结束时间为空时,结束时间为班次时间的开始时间
this
.
startPlayTime
=
this
.
timeList
[
i
].
startPlanTime
...
...
@@ -609,17 +607,11 @@ export default {
}
},
//---时间确认事件
timeConfig
(
data
)
{
let
index
=
this
.
timeList
.
findIndex
(
item
=>
{
return
item
.
startPlanTime
==
data
})
if
(
index
>
-
1
)
{
//子组件点击确认之后有选择的时间
timeConfig
(
index
)
{
this
.
chooseTime
(
index
)
//选中确认的日期
this
.
docQuery
.
selectAll
(
'.time-list'
).
boundingClientRect
(
data
=>
{
this
.
timeScroll
=
(
data
[
index
].
width
+
4
)
*
index
this
.
timeScroll
=
(
data
[
index
].
width
+
6
)
*
index
}).
exec
()
}
},
//---获取点击的编辑联系人信息,传给编辑联系人组件
getEditContact
(
data
)
{
...
...
@@ -1713,8 +1705,7 @@ export default {
max-width
:
750rpx
;
z-index
:
10
;
padding
:
0
24rpx
0
40rpx
;
box-sizing
:
border-box
;
box-shadow
:
0
0
3rpx
#666666
;
box-shadow
:
0px
4px
12px
rgba
(
0
,
0
,
0
,
0
.16
)
}
.bottom-left
>
text
:first-child
{
font-size
:
28rpx
;
...
...
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