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
2a2fd209
Commit
2a2fd209
authored
Jun 26, 2024
by
qipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
循环门票
parent
662cbac1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
209 additions
and
54 deletions
+209
-54
orderList.vue
pages/my/order/orderList/orderList.vue
+209
-54
No files found.
pages/my/order/orderList/orderList.vue
View file @
2a2fd209
...
@@ -36,26 +36,59 @@
...
@@ -36,26 +36,59 @@
<u-search
placeholder=
"搜索手机号"
v-model=
"phoneNum"
shape=
"round"
:showAction=
"false"
:clearabled=
"true"
></u-search>
<u-search
placeholder=
"搜索手机号"
v-model=
"phoneNum"
shape=
"round"
:showAction=
"false"
:clearabled=
"true"
></u-search>
</view>
</view>
<!--身体列表-->
<!--身体列表-->
<view
class=
"order-list"
>
<template
v-if=
"lists.length>0"
>
<!--判断是否有数-->
<view
class=
"list-title"
>
<template
v-for=
"(item,index) in lists"
>
<view
class=
"title-left"
>
<view
class=
"order-list"
:key=
"index"
v-if=
"item.showList"
@
click=
"orderJump(item.id,item.orderType)"
>
<image
class=
""
src=
"../../static/orderList/iconjingqumenpiao.png"
></image>
<view
class=
"list-title"
>
<view>
门票
</view>
<view
class=
"title-left"
>
<image
v-if=
"item.orderType==1"
src=
"../../static/orderList/iconjingqumenpiao.png"
></image>
<image
v-else-if=
"item.orderType==2"
src=
"../../static/orderList/iconjiudian.png"
></image>
<image
v-else-if=
"item.orderType==3"
src=
"../../static/orderList/iconcanyin.png"
></image>
<image
v-else-if=
"item.orderType==4"
src=
"../../static/orderList/iconliwu1.png"
></image>
<image
v-else-if=
"item.orderType==5"
src=
"../../static/orderList/iconchuzuche.png"
></image>
<image
v-else-if=
"item.orderType==10"
src=
"../../static/orderList/iconzuhe.png"
></image>
<image
v-else
src=
"../../static/orderList/iconqita.png"
></image>
<view>
门票
</view>
</view>
<view
class=
"title-right"
v-if=
"item.orderType!=10&&item.orderType!=0"
>
<template
v-if=
"item.orderType==1&&item.subOrderType!=4"
>
{{
item
.
orderStatus
|
orderStatus1
}}
</
template
>
<
template
v-else-if=
"item.orderType==2&&item.subOrderType!=4"
>
{{
item
.
orderStatus
|
orderStatus2
}}
</
template
>
<
template
v-else-if=
"item.orderType==3&&item.subOrderType!=4"
>
{{
item
.
orderStatus
|
orderStatus3
}}
</
template
>
<
template
v-else-if=
"item.orderType==4&&item.subOrderType!=4"
>
{{
item
.
orderStatus
|
orderStatus4
}}
</
template
>
<
template
v-else
>
{{
item
.
orderStatus
|
orderStatus5
}}
</
template
>
</view>
</view>
<view
class=
"list-name"
>
{{item.merchantName}}({{item.productName}})
</view>
<view
class=
"list-time"
>
{{item.playDate.substr(0,10)}} 有效·
<
template
v-if=
"item.orderType==1&&item.subOrderType!=4"
>
{{
item
.
orderNum
}}
张
</
template
>
<
template
v-else-if=
"item.orderType==2&&item.subOrderType!=4"
>
{{
item
.
orderNum
}}
间
</
template
>
<
template
v-else-if=
"item.orderType==3&&item.subOrderType!=4"
>
{{
item
.
orderNum
}}
桌
</
template
>
<
template
v-else-if=
"item.orderType==4&&item.subOrderType!=4"
>
{{
item
.
orderNum
}}
箱
</
template
>
<
template
v-else-if=
"item.orderType==10&&item.subOrderType!=4"
>
{{
item
.
orderNum
}}
张
</
template
>
<
template
v-else
>
{{
item
.
orderNum
}}
份
</
template
>
</view>
<view
class=
"list-tips"
>
凭「胖丁动态二维码」直接验证使用
</view>
<view
class=
"list-money"
>
¥{{item.totalMoney}}
</view>
<view
class=
"list-btn"
>
<view
class=
"btn-style"
>
下载照片
</view>
<view
class=
"btn-style"
>
导航取片
</view>
</view>
</view>
</view>
<view
class=
"title-right"
>
</template>
已完成
<view
class=
"goods-NoMore"
v-if=
"dataLengthType==true"
>
暂无更多数据
</view>
</view>
</template>
</view>
<view
class=
"order-No"
v-else
>
暂无订单信息
</view>
<view
class=
"list-name"
>
云端之眼高空观景台(观景票)
</view>
<view
class=
"list-time"
>
2024-05-22 有效·2张
</view>
<view
class=
"list-tips"
>
凭「胖丁动态二维码」直接验证使用
</view>
<view
class=
"list-money"
>
¥20.00
</view>
<view
class=
"list-btn"
>
<view
class=
"btn-style"
>
下载照片
</view>
<view
class=
"btn-style"
>
导航取片
</view>
</view>
</view>
<view
class=
"order-No"
>
暂无订单信息
</view>
</view>
</view>
</template>
</template>
...
@@ -299,64 +332,179 @@ export default {
...
@@ -299,64 +332,179 @@ export default {
//手机搜索
//手机搜索
show
:
false
,
//遮罩显隐---项目
show
:
false
,
//遮罩显隐---项目
columns
:
[
//遮罩列表---项目
columns
:
[
//遮罩列表---项目
[{
[
label
:
'类型'
,
{
label
:
'类型'
,
id
:
''
},
id
:
''
{
label
:
'全部'
,
id
:
0
},
},{
{
label
:
'景区'
,
id
:
1
},
label
:
'其他'
,
{
label
:
'酒店'
,
id
:
2
},
id
:
0
{
label
:
'餐饮'
,
id
:
3
},
},{
{
label
:
'特产'
,
id
:
4
},
label
:
'景区'
,
// {label: '运营车',id: 5},
id
:
1
// {label: '组合订单',id: 10},
},{
]
label
:
'酒店'
,
id
:
2
},{
label
:
'餐饮'
,
id
:
3
},{
label
:
'特产'
,
id
:
4
},{
label
:
'运营车'
,
id
:
5
},{
label
:
'组合订单'
,
id
:
10
}]
],
],
showAddress
:
'
冷夜雨2
'
,
//显示内容---项目
showAddress
:
'
类型
'
,
//显示内容---项目
phoneNum
:
''
,
//搜索手机号
phoneNum
:
''
,
//搜索手机号
//主数据分区
lists
:[],
//数据
//分页
//分页
isTrue
:
true
,
//截留 防止重复加载
isTrue
:
true
,
//截留 防止重复加载
pageIndex
:
1
,
//当前页
pageIndex
:
1
,
//当前页
pageTotal
:
0
,
//总条数
pageTotal
:
0
,
//总条数
//定时请求
timerOutClear
:
null
,
//其他
ifyukuaiCode
:
''
,
//渝快付
dataLengthType
:
false
,
//上拉加载无更多数据时显示
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
openId
=
uni
.
getStorageSync
(
'openid'
)
this
.
openId
=
'oh2UV1lyYABHMZ1rMlgjhVHyyYDQ'
//oh2UV1lyYABHMZ1rMlgjhVHyyYDQ oroHZ5FaUQ_SOOC_uQQP92fJpBRE
this
.
orderStatus
=
option
.
orderStatus
||
''
this
.
ifyukuaiCode
=
option
.
ifyukuaiCode
||
''
this
.
getData
()
},
},
onShow
(){
onShow
(){
this
.
pageIndex
=
1
this
.
lists
=
[]
//主要数据存储
this
.
getData
()
},
},
onReachBottom
(){
//上拉加载
onReachBottom
(){
//上拉加载
this
.
pageIndex
++
this
.
getData
()
},
},
onUnload
()
{
onUnload
()
{
if
(
this
.
timerOutClear
)
{
clearTimeout
(
this
.
timerOutClear
)
this
.
timerOutClear
=
null
}
//隐藏加载框
uni
.
hideLoading
()
},
},
methods
:
{
methods
:
{
screenChange
(
i
){
//顶部导航切换
screenChange
(
i
){
//顶部导航切换
this
.
orderStatus
=
i
this
.
orderStatus
=
i
//当前选择的数字
this
.
pageIndex
=
1
this
.
pageIndex
=
1
//页码
this
.
pageTotal
=
0
this
.
pageTotal
=
0
//总数
this
.
isTrue
=
true
this
.
isTrue
=
true
//是否同意请求
this
.
lists
=
[]
this
.
lists
=
[]
//主要数据存储
//this.getData(1
)
this
.
getData
(
)
},
},
addressFun
(
e
){
//项目选择
addressFun
(
e
){
//项目选择
this
.
showAddress
=
e
.
value
[
0
].
label
this
.
showAddress
=
e
.
value
[
0
].
label
this
.
show
=
false
this
.
show
=
false
},
},
getData
(){
//数据加载
//显示加载框
uni
.
showLoading
({
title
:
'加载中'
})
if
(
this
.
isTrue
){
this
.
isTrue
=
false
var
data
=
{}
if
(
this
.
orderStatus
==
'2'
){
//点击的待使用
var
orderStatusList
=
[
2
,
4
,
5
]
data
=
{
pageIndex
:
this
.
pageIndex
,
pageSize
:
20
,
orderType
:
this
.
orderType
==
0
?
''
:
this
.
orderType
,
orderStatusList
:
orderStatusList
,
userId
:
this
.
openId
}
}
else
{
data
=
{
pageIndex
:
this
.
pageIndex
,
pageSize
:
20
,
orderType
:
this
.
orderType
==
0
?
''
:
this
.
orderType
,
orderStatus
:
this
.
orderStatus
==
'3'
?
2
:
parseFloat
(
this
.
orderStatus
),
userId
:
this
.
openId
}
}
this
.
$request
(
'order/userOrder/findOrderList'
,
data
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
'00'
){
if
(
res
.
data
.
list
.
length
>
0
){
this
.
dataLengthType
=
true
}
else
{
this
.
dataLengthType
=
false
}
res
.
data
.
list
.
forEach
((
item
)
=>
{
if
(
this
.
orderStatus
==
'0'
){
////待付款的订单 pid 不能空的不显示
if
(
item
.
pid
){
}
else
{
this
.
lists
.
push
(
item
)
}
}
else
if
(
this
.
orderStatus
==
'2'
){
//待评价和待使用不能显示组合订单
if
(
item
.
orderType
!=
10
&&
item
.
orderType
!=
4
){
this
.
lists
.
push
(
item
)
}
}
else
if
(
this
.
orderStatus
==
'3'
){
//待收货和待使用不能显示组合订单
if
(
item
.
orderType
!=
10
&&
item
.
orderType
==
4
){
this
.
lists
.
push
(
item
)
}
}
else
if
(
this
.
orderStatus
==
'5'
){
//待评价不能显示组合订单
if
(
item
.
orderType
!=
10
){
this
.
lists
.
push
(
item
)
}
}
else
{
if
(
item
.
isDelete
!=
1
){
//( 0 未删除 1 已删除)
this
.
lists
.
push
(
item
)
}
}
})
this
.
isTrue
=
true
this
.
pageTotal
=
res
.
data
.
pageTotal
// 主订单显示待支付子订单显示除了待支付
this
.
lists
.
forEach
((
item
)
=>
{
if
(
item
.
subOrderType
!=
9
){
if
(
item
.
orderType
==
10
&&
item
.
orderStatus
==
0
){
item
.
showList
=
true
}
if
(
item
.
orderType
!=
10
&&
item
.
orderStatus
!=
0
){
item
.
showList
=
true
}
}
})
//隐藏加载框
uni
.
hideLoading
()
}
else
{
//隐藏加载框
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'暂无订单信息'
,
icon
:
'none'
})
}
})
.
catch
((
err
)
=>
{
this
.
timerOutClear
=
setTimeout
(()
=>
{
this
.
getData
()
},
1000
)
})
}
},
orderJump
(
orderId
,
orderType
){
//-------------------订单详情跳转
if
(
orderType
==
11
||
orderType
==
12
){
uni
.
navigateTo
({
url
:
'/pages/album/albumOrderdetail/albumOrderdetail?orderId='
+
orderId
})
}
else
{
uni
.
navigateTo
({
url
:
'/pages/my/order/electronicTicket/electronicTicket?orderId='
+
orderId
})
}
},
refundJump
(
id
){
//-------------------退款
uni
.
navigateTo
({
url
:
'/pages/my/order/afterSale/applyAfterSale/applyAfterSale?orderId='
+
id
+
'&ifyukuaiCode='
+
this
.
ifyukuaiCode
})
},
},
},
}
}
</
script
>
</
script
>
...
@@ -576,4 +724,11 @@ export default {
...
@@ -576,4 +724,11 @@ export default {
bottom
:
0
;
bottom
:
0
;
left
:
0
;
left
:
0
;
}
}
.goods-NoMore
{
height
:
40rpx
;
color
:
#666666
;
font-size
:
30rpx
;
line-height
:
40rpx
;
text-align
:
center
;
}
</
style
>
</
style
>
\ No newline at end of file
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