Commit 2a2fd209 authored by qipeng's avatar qipeng

循环门票

parent 662cbac1
......@@ -36,26 +36,59 @@
<u-search placeholder="搜索手机号" v-model="phoneNum" shape="round" :showAction="false" :clearabled="true"></u-search>
</view>
<!--身体列表-->
<view class="order-list">
<template v-if="lists.length>0"><!--判断是否有数-->
<template v-for="(item,index) in lists">
<view class="order-list" :key="index" v-if="item.showList" @click="orderJump(item.id,item.orderType)">
<view class="list-title">
<view class="title-left">
<image class="" src="../../static/orderList/iconjingqumenpiao.png"></image>
<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">
已完成
<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">云端之眼高空观景台(观景票)</view>
<view class="list-time">2024-05-22 有效·2张</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">¥20.00</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 class="order-No">暂无订单信息</view>
</template>
<view class="goods-NoMore" v-if="dataLengthType==true">暂无更多数据</view>
</template>
<view class="order-No" v-else>暂无订单信息</view>
</view>
</template>
......@@ -299,64 +332,179 @@ export default {
//手机搜索
show: false,//遮罩显隐---项目
columns: [//遮罩列表---项目
[{
label: '类型',
id: ''
},{
label: '其他',
id: 0
},{
label: '景区',
id: 1
},{
label: '酒店',
id: 2
},{
label: '餐饮',
id: 3
},{
label: '特产',
id: 4
},{
label: '运营车',
id: 5
},{
label: '组合订单',
id: 10
}]
[
{label: '类型',id: ''},
{label: '全部',id: 0},
{label: '景区',id: 1},
{label: '酒店',id: 2},
{label: '餐饮',id: 3},
{label: '特产',id: 4},
// {label: '运营车',id: 5},
// {label: '组合订单',id: 10},
]
],
showAddress:'冷夜雨2',//显示内容---项目
showAddress:'类型',//显示内容---项目
phoneNum:'',//搜索手机号
//主数据分区
lists:[],//数据
//分页
isTrue:true,//截留 防止重复加载
pageIndex:1,//当前页
pageTotal:0,//总条数
//定时请求
timerOutClear:null,
//其他
ifyukuaiCode:'',//渝快付
dataLengthType:false,//上拉加载无更多数据时显示
}
},
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(){
this.pageIndex = 1
this.lists = [] //主要数据存储
this.getData()
},
onReachBottom(){//上拉加载
this.pageIndex++
this.getData()
},
onUnload() {
if(this.timerOutClear) {
clearTimeout(this.timerOutClear)
this.timerOutClear = null
}
//隐藏加载框
uni.hideLoading()
},
methods: {
screenChange(i){//顶部导航切换
this.orderStatus = i
this.pageIndex = 1
this.pageTotal = 0
this.isTrue = true
this.lists = []
//this.getData(1)
this.orderStatus = i //当前选择的数字
this.pageIndex = 1 //页码
this.pageTotal = 0 //总数
this.isTrue = true //是否同意请求
this.lists = [] //主要数据存储
this.getData()
},
addressFun(e){//项目选择
this.showAddress = e.value[0].label
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>
......@@ -576,4 +724,11 @@ export default {
bottom: 0;
left: 0;
}
.goods-NoMore{
height: 40rpx;
color: #666666;
font-size: 30rpx;
line-height: 40rpx;
text-align: center;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment