Commit b04c5587 authored by qipeng's avatar qipeng

老代码

parent cdb945d7
<template> <template>
<view class="productBigBox"> <view class="productBigBox">
<!--头部点击选择类型--> <view class="product-SearchBox">
<view class="order-search"> <!--头部切换-->
<view class="search-list" :class="orderStatus===''?'search-listAct':''" @click="screenChange('')"> <view class="product-orderState">
全部 <view class="orderState-click" :class="orderStatus===''?'orderState-clickAct':''" @click="screenChange('')">
<view class="list-line"></view> 全部
</view> <view class="click-line">
<view class="search-list" :class="orderStatus==='0'?'search-listAct':''" @click="screenChange('0')"> <text></text>
待付款 </view>
<view class="list-line"></view> </view>
</view> <view class="orderState-click" :class="orderStatus==='0'?'orderState-clickAct':''" @click="screenChange('0')">
<view class="search-list" :class="orderStatus==='2'?'search-listAct':''" @click="screenChange('2')"> 待付款
待使用 <view class="click-line">
<view class="list-line"></view> <text></text>
</view> </view>
<!--暂无包邮--> </view>
<view class="search-list" :class="orderStatus==='3'?'search-listAct':''" @click="screenChange('3')" style="display: none;"> <view class="orderState-click" :class="orderStatus=='2'?'orderState-clickAct':''" @click="screenChange('2')">
待收货 待使用
<view class="list-line"></view> <view class="click-line">
</view> <text></text>
<view class="search-list" :class="orderStatus==='5'?'search-listAct':''" @click="screenChange('5')"> </view>
待评价 </view>
<view class="list-line"></view> <view class="orderState-click" :class="orderStatus=='3'?'orderState-clickAct':''" @click="screenChange('3')">
</view> 待收货
</view> <view class="click-line">
<!--头部搜索 手机号--> <text></text>
<view class="order-phoneSearch"> </view>
<view class="phoneSearch-type" @click="show = true"> </view>
<u-picker :show="show" :columns="columns" visibleItemCount="6" itemHeight="80" keyName="label" @confirm="addressFun" @cancel="show=false" ></u-picker> <view class="orderState-click" :class="orderStatus=='5'?'orderState-clickAct':''" @click="screenChange('5')">
<view class="type-boxOn"> 待评价
{{showAddress}} <view class="click-line">
<view class="address-triangle"></view> <text></text>
</view> </view>
</view> </view>
<u-search placeholder="搜索手机号" v-model="phoneNum" shape="round" :showAction="false" :clearabled="true"></u-search> </view>
</view> <!--查询-->
<!--身体列表--> <view class="product-searchBt">
<template v-if="lists.length>0"><!--判断是否有数--> <view class="searchBt-left" @click="orderShow=true">
<template v-for="(item,index) in lists"> <text>{{orderName}}</text>
<view class="order-list" :key="index" v-if="item.showList" @click="orderJump(item.id,item.orderType)"> <u-icon v-if="orderShow==false" name="arrow-down" color="#333333" size="20"></u-icon>
<view class="list-title"> <u-icon v-else name="arrow-up" color="#333333" size="20"></u-icon>
<view class="title-left"> <u-picker mode="selector" :show="orderShow" :default-selector="[orderType]" :columns="option" keyName="cateName" @confirm="industrysTypeConfirm($event)" @cancel="cancel"></u-picker>
<image v-if="item.orderType==1" src="../../static/orderList/iconjingqumenpiao.png"></image> </view>
<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> <text @click="showQueryPhone()">手机查询</text>
<image v-else-if="item.orderType==4" src="../../static/orderList/iconliwu1.png"></image> </view>
<image v-else-if="item.orderType==5" src="../../static/orderList/iconchuzuche.png"></image> </view>
<image v-else-if="item.orderType==10" src="../../static/orderList/iconzuhe.png"></image> <!--手机查询遮罩-->
<image v-else src="../../static/orderList/iconqita.png"></image> <u-popup mode="bottom" :show="phoneQuery">
<view>门票</view> <view class="content">
</view> <view class="content-title">
<view class="title-right" v-if="item.orderType!=10&&item.orderType!=0"> 订单查询
<template v-if="item.orderType==1&&item.subOrderType!=4"> <u-icon name="close" color="#333333" size="28" @click="phoneQuery=false"></u-icon>
{{item.orderStatus|orderStatus1}} </view>
</template> <view class="content-list">
<template v-else-if="item.orderType==2&&item.subOrderType!=4"> <text class="list-name">手机号码</text>
{{item.orderStatus|orderStatus2}} <text class="list-name2"></text>
</template> <input class="uni-input" v-model.trim="touristPhone" />
<template v-else-if="item.orderType==3&&item.subOrderType!=4"> </view>
{{item.orderStatus|orderStatus3}} <view class="content-list">
</template> <text class="list-name">姓名</text>
<template v-else-if="item.orderType==4&&item.subOrderType!=4"> <text class="list-name2"></text>
{{item.orderStatus|orderStatus4}} <input class="uni-input" v-model.trim="touristName" />
</template> </view>
<template v-else> <view class="confrim-btn">
{{item.orderStatus|orderStatus5}} <u-button @click="queryPhoneOrder()">查询</u-button>
</template> </view>
</view> </view>
</view> </u-popup>
<view class="list-name">{{item.merchantName}}({{item.productName}})</view> <!--列表-->
<view class="list-time"> <view class="product-goods" v-if="lists.length>0">
{{item.playDate.substr(0,10)}} 有效· <template v-for="(item,index) in lists">
<template v-if="item.orderType==1&&item.subOrderType!=4">{{item.orderNum}}</template> <view class="product-block" :key="index" v-if="item.showList" @click="orderJump(item.id,item.orderType)">
<template v-else-if="item.orderType==2&&item.subOrderType!=4">{{item.orderNum}}</template> <view class="block-title">
<template v-else-if="item.orderType==3&&item.subOrderType!=4">{{item.orderNum}}</template> <view class="title-left">
<template v-else-if="item.orderType==4&&item.subOrderType!=4">{{item.orderNum}}</template> <view class="left-imgBox" v-if="item.orderType==1">
<template v-else-if="item.orderType==10&&item.subOrderType!=4">{{item.orderNum}}</template> <image class="left-img" src="../../static/orderList/iconjingqumenpiao.png"></image>
<template v-else>{{item.orderNum}}</template> </view>
</view> <view class="left-imgBox" v-else-if="item.orderType==2">
<view class="list-tips">凭「胖丁动态二维码」直接验证使用</view> <image class="left-img" src="../../static/orderList/iconjiudian.png"></image>
<view class="list-money">¥{{item.totalMoney}}</view> </view>
<view class="list-btn"> <view class="left-imgBox" v-else-if="item.orderType==3">
<view class="btn-style">下载照片</view> <image class="left-img" src="../../static/orderList/iconcanyin.png"></image>
<view class="btn-style">导航取片</view> </view>
</view> <view class="left-imgBox" v-else-if="item.orderType==4">
</view> <image class="left-img" src="../../static/orderList/iconliwu1.png"></image>
</template> </view>
<view class="goods-NoMore" v-if="dataLengthType==true">暂无更多数据</view> <view class="left-imgBox" v-else-if="item.orderType==5">
</template> <image class="left-img" src="../../static/orderList/iconchuzuche.png"></image>
<view class="order-No" v-else>暂无订单信息</view> </view>
</view> <view class="left-imgBox" v-else-if="item.orderType==10">
</template> <image class="left-img" src="../../static/orderList/iconzuhe.png"></image>
</view>
<script> <view class="left-imgBox" v-else>
<image class="left-img" src="../../static/orderList/iconqita.png"></image>
export default { </view>
filters:{ <text class="left-Name">{{item.merchantName}}({{item.productName}})</text>
orderType(i){//订单类型 </view>
switch(i){ <view class="title-right" v-if="item.orderType!=0">
case 0: <template v-if="item.orderType==1&&item.subOrderType!=4">
return '其他' {{item.orderStatus|orderStatus1}}
break </template>
case 1: <template v-else-if="item.orderType==10&&item.subOrderType!=4">
return '景区' {{item.orderStatus|orderStatus1}}
break </template>
case 2: <template v-else-if="item.orderType==2&&item.subOrderType!=4">
return '酒店' {{item.orderStatus|orderStatus2}}
break </template>
case 3: <template v-else-if="item.orderType==3&&item.subOrderType!=4">
return '餐饮' {{item.orderStatus|orderStatus3}}
break </template>
case 4: <template v-else-if="item.orderType==4&&item.subOrderType!=4">
return '特产' {{item.orderStatus|orderStatus4}}
case 5: </template>
return '运营车' <template v-else>
case 10: {{item.orderStatus|orderStatus5}}
return '组合订单' </template>
} </view>
}, </view>
orderStatus1(i){//景区订单状态 <view class="block-main">
switch(i){ <view class="mian-InfoWrap">
case 0: <view class="InfoWrap-mb30">订单时间:{{item.playDate.substr(0,10)}}</view>
return '待支付' <view>
break 购买数量:
case 1: <template v-if="item.orderType==1&&item.subOrderType!=4">{{item.orderNum}}</template>
return '出票中' <template v-else-if="item.orderType==2&&item.subOrderType!=4">{{item.orderNum}}</template>
break <template v-else-if="item.orderType==3&&item.subOrderType!=4">{{item.orderNum}}</template>
case 2: <template v-else-if="item.orderType==4&&item.subOrderType!=4">{{item.orderNum}}</template>
return '出票成功' <template v-else-if="item.orderType==10&&item.subOrderType!=4">{{item.orderNum}}</template>
break <template v-else>{{item.orderNum}}</template>
case 3: </view>
return '预定失败' <view class="allPice">
break <text>¥</text>{{item.totalMoney}}
case 4: </view>
return '核销中' </view>
break <view class="main-right">
case 5: <u-icon name="arrow-right" color="#333333" size="28"></u-icon>
return '核销完成' </view>
break </view>
case 6: <view class="block-Btn">
return '退款中' <view class="block-button" @click.stop="operation(item,index)" v-if="item.orderStatus==9||item.orderStatus==10">删除</view>
break <view class="block-button" @click.stop="operation(item,index)" v-if="item.orderStatus==0">取消订单</view>
case 7: <template v-if="item.orderType==4"><!--特产-->
return '部分退货/退款' <view class="block-button" v-if="item.orderStatus==1||item.orderStatus==2||item.orderStatus==4||item.orderStatus==5||item.orderStatus==10" @click.stop="orderJump(item.id,item.orderType)">查看详情</view>
break <view class="block-button" v-if="item.orderStatus==2||item.orderStatus==4||item.orderStatus==5||item.orderStatus==10">查看物流</view>
case 8: <!-- <view class="block-button" v-if="item.orderStatus==5">评价</view> -->
return '全部退款退货 ' </template>
break <template v-else>
case 9: <template v-if="item.subOrderType!=4">
return '取消 ' <view class="block-button" v-if="item.orderStatus==1||item.orderStatus==2||item.orderStatus==4||item.orderStatus==5||item.orderStatus==10" @click.stop="orderJump(item.id,item.orderType)">{{item.orderStatus==2?'去使用':'查看详情'}}</view>
break </template>
case 10: <view class="block-button" v-if="item.orderStatus==2&&item.isRefund!=0&&item.isRefund!=3||item.orderStatus==7&&item.isRefund!=0&&item.isRefund!=3" @click.stop="refundJump(item.id)">退款/售后</view>
return '已完成 ' <!-- <view class="block-button" v-if="item.orderStatus==5">评价</view> -->
break </template>
case 11: <view class="block-button block-buttonOrange" v-if="item.orderStatus==0">去支付</view>
return '已过期 ' </view>
break </view>
case 12: </template>
return '退票审核中 ' <view class="goods-NoMore" v-if="dataLengthType==true">暂无更多数据</view>
break </view>
} <view class="product-goods" v-else>
}, <view class="order-No">暂无订单信息</view>
orderStatus2(i){//酒店订单状态 </view>
switch(i){ <!-- <u-toast ref="uToast" /> -->
case 0: <u-modal :show="configShow" show-cancel-button="true" :content="configTitle" @confirm="operationEnter()" @cancel="operationClose()"></u-modal>
return '待支付' </view>
break </template>
case 1:
return '确认中' <script>
break // import uPicker from '@/uview-ui/components/u-picker/u-picker.vue'
case 2: // import uPopup from '@/uview-ui/components/u-popup/u-popup.vue'
return '预定成功' // import uToast from '@/uview-ui/components/u-toast/u-toast.vue'
break // import uModal from '@/uview-ui/components/u-modal/u-modal.vue'
case 3: export default {
return '预定失败' filters:{
break orderType(i){//订单类型
case 4: switch(i){
return '核销中' case 0:
break return '其他'
case 5: break
return '待评价' case 1:
break return '景区'
case 6: break
return '退款中' case 2:
break return '酒店'
case 7: break
return '部分退货/退款' case 3:
break return '餐饮'
case 8: break
return '全部退款退货 ' case 4:
break return '特产'
case 9: case 5:
return '取消 ' return '运营车'
break case 10:
case 10: return '组合订单'
return '已完成 ' }
break },
case 11: orderStatus1(i){//景区订单状态
return '已过期 ' switch(i){
break case 0:
} return '待支付'
}, break
orderStatus3(i){//餐饮订单状态 case 1:
switch(i){ return '出票中'
case 0: break
return '待支付' case 2:
break return '出票成功'
case 1: break
return '确认中' case 3:
break return '预定失败'
case 2: break
return '预定成功' case 4:
break return '核销中'
case 3: break
return '预定失败' case 5:
break return '核销完成'
case 4: break
return '核销中' case 6:
break return '退款中'
case 5: break
return '待评价' case 7:
break return '部分退货/退款'
case 6: break
return '退款中' case 8:
break return '全部退款退货 '
case 7: break
return '部分退货/退款' case 9:
break return '取消 '
case 8: break
return '全部退款退货 ' case 10:
break return '已完成 '
case 9: break
return '取消 ' case 11:
break return '已过期 '
case 10: break
return '已完成 ' case 12:
break return '退票审核中 '
case 11: break
return '已过期 ' }
break },
} orderStatus2(i){//酒店订单状态
}, switch(i){
orderStatus4(i){//特产状态 case 0:
switch(i){ return '待支付'
case 0: break
return '待支付' case 1:
break return '确认中'
case 1: break
return '待发货' case 2:
break return '预定成功'
case 2: break
return '待收货' case 3:
break return '预定失败'
case 3: break
return '预定失败' case 4:
break return '核销中'
case 4: break
return '核销中' case 5:
break return '待评价'
case 5: break
return '已收货' case 6:
break return '退款中'
case 6: break
return '退款中' case 7:
break return '部分退货/退款'
case 7: break
return '部分退货/退款' case 8:
break return '全部退款退货 '
case 8: break
return '全部退款退货 ' case 9:
break return '取消 '
case 9: break
return '取消 ' case 10:
break return '已完成 '
case 10: break
return '已完成 ' case 11:
break return '已过期 '
case 11: break
return '已过期 ' }
break },
} orderStatus3(i){//餐饮订单状态
}, switch(i){
orderStatus5(i){ case 0:
switch(i){ return '待支付'
case 0: break
return '待支付' case 1:
break return '确认中'
case 1: break
return '确认中' case 2:
break return '预定成功'
case 2: break
return '支付成功' case 3:
break return '预定失败'
case 3: break
return '预定失败' case 4:
break return '核销中'
case 4: break
return '核销中' case 5:
break return '待评价'
case 5: break
return '待评价' case 6:
break return '退款中'
case 6: break
return '退款中' case 7:
break return '部分退货/退款'
case 7: break
return '部分退货/退款' case 8:
break return '全部退款退货 '
case 8: break
return '全部退款退货 ' case 9:
break return '取消 '
case 9: break
return '取消 ' case 10:
break return '已完成 '
case 10: break
return '已完成 ' case 11:
break return '已过期 '
case 11: break
return '已过期 ' }
break },
} orderStatus4(i){//特产状态
} switch(i){
}, case 0:
components: { return '待支付'
break
}, case 1:
data() { return '待发货'
return { break
//顶部参数 case 2:
orderStatus:'',//头部类型选择 return '待收货'
//手机搜索 break
show: false,//遮罩显隐---项目 case 3:
columns: [//遮罩列表---项目 return '预定失败'
[ break
{label: '类型',id: ''}, case 4:
{label: '全部',id: 0}, return '核销中'
{label: '景区',id: 1}, break
{label: '酒店',id: 2}, case 5:
{label: '餐饮',id: 3}, return '已收货'
{label: '特产',id: 4}, break
// {label: '运营车',id: 5}, case 6:
// {label: '组合订单',id: 10}, return '退款中'
] break
], case 7:
showAddress:'类型',//显示内容---项目 return '部分退货/退款'
phoneNum:'',//搜索手机号 break
//主数据分区 case 8:
lists:[],//数据 return '全部退款退货 '
//分页 break
isTrue:true,//截留 防止重复加载 case 9:
pageIndex:1,//当前页 return '取消 '
pageTotal:0,//总条数 break
//定时请求 case 10:
timerOutClear:null, return '已完成 '
//其他 break
ifyukuaiCode:'',//渝快付 case 11:
dataLengthType:false,//上拉加载无更多数据时显示 return '已过期 '
} break
}, }
onLoad(option) { },
this.openId = uni.getStorageSync('openid') orderStatus5(i){
this.openId = 'oh2UV1lyYABHMZ1rMlgjhVHyyYDQ'//oh2UV1lyYABHMZ1rMlgjhVHyyYDQ oroHZ5FaUQ_SOOC_uQQP92fJpBRE switch(i){
this.orderStatus = option.orderStatus||'' case 0:
this.ifyukuaiCode = option.ifyukuaiCode||'' return '待支付'
this.getData() break
}, case 1:
onShow(){ return '确认中'
this.pageIndex = 1 break
this.lists = [] //主要数据存储 case 2:
this.getData() return '支付成功'
}, break
onReachBottom(){//上拉加载 case 3:
this.pageIndex++ return '预定失败'
this.getData() break
}, case 4:
onUnload() { return '核销中'
if(this.timerOutClear) { break
clearTimeout(this.timerOutClear) case 5:
this.timerOutClear = null return '待评价'
} break
//隐藏加载框 case 6:
uni.hideLoading() return '退款中'
}, break
methods: { case 7:
screenChange(i){//顶部导航切换 return '部分退货/退款'
this.orderStatus = i //当前选择的数字 break
this.pageIndex = 1 //页码 case 8:
this.pageTotal = 0 //总数 return '全部退款退货 '
this.isTrue = true //是否同意请求 break
this.lists = [] //主要数据存储 case 9:
this.getData() return '取消 '
}, break
addressFun(e){//项目选择 case 10:
this.showAddress = e.value[0].label return '已完成 '
this.show=false break
}, case 11:
getData(){//数据加载 return '已过期 '
//显示加载框 break
uni.showLoading({ }
title: '加载中' }
}) },
if(this.isTrue){ components: {
this.isTrue = false // uPicker,
var data = {} // uPopup,
if(this.orderStatus=='2'){//点击的待使用 // uToast,
var orderStatusList=[2,4,5] // uModal
data={ },
pageIndex:this.pageIndex, data() {
pageSize:20, return {
orderType:this.orderType==0?'':this.orderType, queryLoad:false,//查询加载图标显示隐藏
orderStatusList :orderStatusList, phoneQuery:false,//手机查询显示隐藏
userId:this.openId touristPhone:'',//旅客电话
} touristName:'',//旅客姓名
}else{ orderStatus:'',//订单状态
data={ nodataShow:false,//没有数据时展示
pageIndex:this.pageIndex, lists:[],//数据
pageSize:20, orderType:0,//筛选 //1景区,2酒店,3餐饮,4特产,5运营车,10组合订单
orderType:this.orderType==0?'':this.orderType, orderName:'全部',//筛选 //1景区,2酒店,3餐饮,4特产,5运营车,10组合订单
orderStatus:this.orderStatus=='3'?2:parseFloat(this.orderStatus), orderShow:false,
userId:this.openId option: [[
} { cateName: '全部', id: 0 },
} { cateName: '景区', id: 1 },
this.$request('order/userOrder/findOrderList',data) { cateName: '酒店', id: 2 },
.then((res)=>{ { cateName: '餐饮', id: 3 },
if(res.code=='00'){ { cateName: '特产', id: 4 },
if(res.data.list.length>0){ // { cateName: '运营车', id: 5 },
this.dataLengthType = true // { cateName: '组合订单', id: 10 },
}else{ ]],
this.dataLengthType = false isTrue:true,//截留 防止重复加载
} pageIndex:1,//当前页
res.data.list.forEach((item)=>{ pageTotal:0,//总条数
if(this.orderStatus=='0'){////待付款的订单 pid 不能空的不显示 configShow:false,//删除订单确认框
if(item.pid){ configTitle:'',//弹窗title
operationItem:null,//操作项的数据 删除和取消订单
}else{ operationIndex:null,//操作下标
this.lists.push(item) callbackurl:'',//回调页面
} ifNotice:'',//是否通知
}else if(this.orderStatus=='2'){//待评价和待使用不能显示组合订单 openId:'',
if(item.orderType!=10&&item.orderType!=4){ ifyukuaiCode:'',//渝快付
this.lists.push(item) dataLengthType:false,//上拉加载无更多数据时显示
} timerOutClear:null,
}else if(this.orderStatus=='3'){//待收货和待使用不能显示组合订单 }
if(item.orderType!=10&&item.orderType==4){ },
this.lists.push(item) onLoad(option) {
} this.openId = uni.getStorageSync('openid')
}else if(this.orderStatus=='5'){//待评价不能显示组合订单 //this.openId = 'oroHZ5FaUQ_SOOC_uQQP92fJpBRE'//oh2UV1lyYABHMZ1rMlgjhVHyyYDQ oroHZ5FaUQ_SOOC_uQQP92fJpBRE
if(item.orderType!=10){ this.orderStatus = option.orderStatus||''
this.lists.push(item) this.ifyukuaiCode = option.ifyukuaiCode||''
} this.getData(1)
}else{ },
if(item.isDelete!=1){//( 0 未删除 1 已删除) onShow(){
this.lists.push(item) this.pageIndex = 1
} this.getData(1)
} },
}) methods: {
this.isTrue = true screenChange(i){//顶部导航切换
this.pageTotal = res.data.pageTotal this.orderStatus = i
this.pageIndex = 1
// 主订单显示待支付子订单显示除了待支付 this.pageTotal = 0
this.lists.forEach((item)=>{ this.isTrue = true
if(item.subOrderType!=9){ this.lists = []
if(item.orderType==10&&item.orderStatus==0){ this.getData(1)
item.showList=true },
} industrysTypeConfirm(e) {//单列----分类 点击确定
if(item.orderType!=10&&item.orderStatus!=0){ console.log('confirm', e)
item.showList=true this.orderType = e.value[0].id
} this.orderName = e.value[0].cateName
} this.pageIndex = 1
}) this.pageTotal = 0
//隐藏加载框 this.isTrue = true
uni.hideLoading() this.lists = []
}else{ this.getData(1)
//隐藏加载框 this.cancel()
uni.hideLoading() },
uni.showToast({ cancel() {//单列 点击取消
title: '暂无订单信息', this.orderShow = false
icon: 'none' },
}) showQueryPhone(){//展示手机查询弹窗
} this.touristPhone=''
}) this.touristName=''
.catch((err)=>{ this.phoneQuery=true
this.timerOutClear = setTimeout(()=>{ },
this.getData() queryPhoneOrder(){//通过手机号查看订单
},1000)
if(!(/^1[34578]\d{9}$/.test(this.touristPhone))){
}) uni.showToast({
} title: '请填写正确的手机号码',
icon: 'none'
}, })
orderJump(orderId,orderType){//-------------------订单详情跳转 return
if(orderType==11||orderType==12){ }
uni.navigateTo({ if(this.touristName==''){
url: '/pages/album/albumOrderdetail/albumOrderdetail?orderId='+orderId uni.showToast({
}) title: '姓名不可为空',
}else{ icon: 'none'
uni.navigateTo({ })
url: '/pages/my/order/electronicTicket/electronicTicket?orderId='+orderId return
}) }
} let data={
openid:this.openId,//用户Id
}, touristPhone:this.touristPhone,//旅客电话
refundJump(id){//-------------------退款 touristName:this.touristName,//旅客姓名
uni.navigateTo({ }
url: '/pages/my/order/afterSale/applyAfterSale/applyAfterSale?orderId='+id+'&ifyukuaiCode='+this.ifyukuaiCode this.queryLoad=true
}) this.$request('order/pdOrder/findOrderInfoByPhone',data).then((res)=>{
}, this.queryLoad=false
}, if(res.code=='00'){
} this.phoneQuery=false
</script> // uni.navigateTo({
// url: '/pages/my/order/productList/productList'
<style scoped lang="scss"> // })
.productBigBox{ this.pageIndex = 1
background: #F7F8FA; this.getData(1)
padding-top: 206rpx; }else{
min-height: 100vh; uni.showToast({
} title: res.message,
.order-search{ icon: 'none'
display: flex; })
justify-content: space-between; }
width: 100%;
height: 100rpx; })
background-color: #fff; },
padding: 0 40rpx 0 40rpx; getData(flag){//获取订单列表
position: fixed; this.nodataShow = false
top: 0; //显示加载框
left: 0; uni.showLoading({
.search-list{ title: '加载中'
font-weight: 600; })
font-size: 28rpx; if(this.isTrue){
color: #999999; this.isTrue = false
line-height: 100rpx; if(this.orderStatus=='2'){//点击的待使用
position: relative; var orderStatusList=[2,4,5]
.list-line{ var data={
display: none; pageIndex:this.pageIndex,
width: 100%; pageSize:20,
height: 6rpx; orderType:this.orderType==0?'':this.orderType,
background: #000000; orderStatusList :orderStatusList,
border-radius: 4rpx; userId:this.openId
position: absolute; }
left: 0; }else{
bottom: 16rpx; var data={
} pageIndex:this.pageIndex,
} pageSize:20,
.search-listAct{ orderType:this.orderType==0?'':this.orderType,
font-size: 30rpx; orderStatus:this.orderStatus=='3'?2:parseFloat(this.orderStatus),
color: #333333; userId:this.openId
.list-line{ }
display: block; }
} this.$request('order/userOrder/findOrderList',data)
} .then((res)=>{
} var ret = res
.order-phoneSearch{ if(ret.code=='00'){
display: flex; if(flag==1){//第一次加载
justify-content: space-between; this.lists = []
width: 100%; }
height: 104rpx; if(ret.data.list.length>0){
background: #F7F8FA; this.dataLengthType = true
padding: 20rpx 20rpx 0 20rpx; }else{
position: fixed; this.dataLengthType = false
top: 100rpx; }
left: 0; ret.data.list.forEach((item)=>{
.phoneSearch-type{ if(this.orderStatus=='0'){////待付款的订单 pid 不能空的不显示
width: 200rpx; if(item.pid){
height: 64rpx;
background: #FFFFFF; }else{
border-radius: 32rpx; this.lists.push(item)
line-height: 64rpx; }
position: relative; }else if(this.orderStatus=='2'){//待评价和待使用不能显示组合订单
.type-boxOn{ //item.orderType!=10&&
display: flex; if(item.orderType!=4&&item.productCode!=''){
justify-content: space-between; this.lists.push(item)
padding: 0 38rpx 0 38rpx; }
width: 200rpx; }else if(this.orderStatus=='3'){//待收货和待使用不能显示组合订单
height: 64rpx; //item.orderType!=10&&
font-weight: 600; if(item.orderType==4&&item.productCode!=''){
font-size: 24rpx; this.lists.push(item)
color: #333333; }
position: absolute; }else if(this.orderStatus=='5'){//待评价不能显示组合订单
top: 0; // if(item.orderType!=10){
left: 0; // }
} if(item.productCode!=''){
.address-triangle{ this.lists.push(item)
width: 0px; }
height: 0px; }else{
margin: auto; if(item.isDelete!=1){//( 0 未删除 1 已删除)
border: 10rpx solid transparent; this.lists.push(item)
border-top: 10rpx solid #D8D8D8; }
position: absolute; }
top: 8rpx; })
right: 38rpx; this.isTrue = true
bottom: 0; this.pageIndex++
} this.pageTotal = ret.data.pageTotal
} if(this.lists.length==0){
/deep/ .u-search__content{ this.nodataShow = true
height: 64rpx !important; }
background: #FFFFFF !important; // 主订单显示待支付子订单显示除了待支付
border-radius: 32rpx !important; this.lists.forEach((item)=>{
padding: 0 32rpx !important; if(item.subOrderType!=9){
} //item.orderType==10&&
/deep/ .u-search{ if(item.orderStatus==0){
width: 490rpx !important; item.showList=true
height: 64rpx !important; }
flex:none !important; //item.orderType!=10&&
align-items:flex-start; if(item.orderStatus!=0){
} item.showList=true
/deep/ .u-search__content__input{ }
background: #FFFFFF !important; }
font-size: 24rpx !important; })
}
/deep/ .u-icon__icon{ //隐藏加载框
font-size: 40rpx !important; uni.hideLoading()
color: #333333 !important; }else{
} uni.showToast({
} title: '暂无订单信息',
.order-list{ icon: 'none'
width: 710rpx; })
background-color: #fff; }
border-radius: 12rpx; })
margin: 0 auto 20rpx auto; .catch((err)=>{
padding: 42rpx 40rpx 40rpx 40rpx; this.timerOutClear = setTimeout(()=>{
overflow: hidden; this.getData(2)
.list-title{ },1000)
display: flex;
justify-content: space-between; })
.title-left{ }
display: flex; },
image{ operation(item,index){//操作 删除和取消订单
width: 40rpx; this.operationItem = item
height: 40rpx; this.operationIndex = index
background: #14C9C8; if(item.orderStatus==0){
border-radius: 50%; this.configTitle = '确认取消订单'
} }else{
view{ this.configTitle = '确认删除订单'
font-weight: 600; }
font-size: 28rpx; this.configShow = true
color: #333333; },
line-height: 40rpx; operationEnter(){//操作 删除和取消订单 确定
margin-left: 12rpx; if(this.operationItem.orderStatus==0){//取消订单
} this.$request('order/userOrder/cancelOrder',{
} id:this.operationItem.id,
.title-right{ userId:this.openId
font-weight: 600; })
font-size: 28rpx; .then((res)=>{
color: #00B42B; var ret = res
line-height: 40rpx; if(ret.code=='00'){
} uni.showToast({
} title: '订单取消成功',
.list-name{ icon: 'none'
padding-left: 52rpx; })
margin-top: 12rpx; //this.$store.commit('showLoading')
font-weight: 600; this.pageIndex = 1
font-size: 28rpx; this.pageTotal = 0
color: #333333; this.isTrue = true
line-height: 28rpx; this.lists[this.operationIndex].orderStatus = 9
} // this.lists = []
.list-time, // this.getData(1)
.list-tips{ this.configShow = false
padding-left: 52rpx; }else{
margin-top: 20rpx; uni.showToast({
font-weight: 400; title: res.message,
font-size: 28rpx; icon: 'none'
color: #999999; })
line-height: 28rpx; }
} })
.list-money{ }else{//删除订单
margin-top: 20rpx; this.$request('order/userOrder/deleteOrder',{
font-weight: 600; id:this.operationItem.id,
font-size: 28rpx; userId:this.openId
color: #333333; })
line-height: 28rpx; .then((res)=>{
text-align: right; var ret = res
} if(ret.code=='00'){
.list-btn{ uni.showToast({
display: flex; title: '订单删除成功',
justify-content: flex-end; icon: 'none'
margin-top: 40rpx; })
overflow: auto; //this.$store.commit('showLoading')
.btn-style{ this.pageIndex = 1
width: 170rpx; this.pageTotal = 0
height: 64rpx; this.isTrue = true
border-radius: 32rpx; this.lists.splice(this.operationIndex,1)
border: 2rpx solid #EDEDED; // this.lists = []
margin-left: 20rpx; // this.getData(1)
font-weight: 600; this.configShow = false
font-size: 28rpx; }else{
color: #666666; uni.showToast({
line-height: 60rpx; title: res.message,
text-align: center; icon: 'none'
} })
} }
} })
.order-listCancel{//订单取消的时候 }
.list-title{ },
.title-left{ operationClose(){//操作 删除和取消订单 取消
image{ this.configShow =false
background: #999999; },
} orderJump(orderId,orderType){//-------------------订单详情跳转
view{ if(orderType==11||orderType==12){
color: #999999; uni.navigateTo({
} url: '/pages/album/albumOrderdetail/albumOrderdetail?orderId='+orderId
} })
.title-right{ }else if(orderType==10){
color: #999999; uni.navigateTo({
} url: '/pages/my/order/jointElectronicTicket/jointElectronicTicket?orderId='+orderId
} })
.list-name{ }else{
color: #999999; uni.navigateTo({
} url: '/pages/my/order/electronicTicket/electronicTicket?orderId='+orderId
.list-money{ })
color: #999999; }
}
} },
.order-No{ refundJump(id){//-------------------退款
height: 40rpx; uni.navigateTo({
color: #666666; url: '/pages/my/order/afterSale/applyAfterSale/applyAfterSale?orderId='+id+'&ifyukuaiCode='+this.ifyukuaiCode
font-size: 30rpx; })
line-height: 40rpx; },
text-align: center; },
margin: auto; onReachBottom(){//上拉加载
position: fixed; this.pageIndex++
top: 0; this.getData(2)
right: 0; },
bottom: 0; onUnload() {
left: 0; if(this.timerOutClear) {
} clearTimeout(this.timerOutClear)
.goods-NoMore{ this.timerOutClear = null
height: 40rpx; }
color: #666666; //隐藏加载框 uni.hideLoading()
font-size: 30rpx; },
line-height: 40rpx; }
text-align: center; </script>
}
<style scoped lang="scss">
page{
background-color: #f5f5f5;
}
.productBigBox{
background-color: #f5f5f5;
min-height: 100vh;
}
.product-SearchBox{
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 20;
}
.product-title{
display: flex;
justify-content: center;
width: 100%;
height: 80rpx;
background-color: #fff;
font-size: 32rpx;
font-weight: bold;
line-height: 80rpx;
text-align: center;
u-icon{
height: 80rpx;
position: absolute;
left: 24rpx;
top: 0;
bottom: 0;
}
}
.product-orderState{
display: flex;
justify-content: space-between;
width: 100%;
padding: 0 24rpx;
background-color: #fff;
.orderState-click{
display: flex;
justify-content: center;
width: 100rpx;
height: 80rpx;
align-items: center;
color: #999999;
font-size: 28rpx;
position: relative;
.click-line{
display: none;
width: 55%;
height: 4rpx;
background-image: linear-gradient(to right, #9FCFFF , #DAE6F6);
margin: auto;
position: absolute;
bottom: 12rpx;
left: 0;
right: 0;
}
}
.orderState-clickAct{
color: #191919;
font-size: 32rpx;
font-weight: bold;
.click-line{
display: inline-block;
}
}
}
.product-searchBt{
width: 100%;
height: 80rpx;
box-shadow: 0 0 0;
display: flex;
background-color:#fff;
justify-content: space-between;
padding: 0 30rpx;
line-height: 80rpx;
box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.08);
.searchBt-left{
display: flex;
width: 100rpx;
justify-content: center;
text:nth-child(1){
margin-right: 5rpx;
}
}
}
.content-title{
display: flex;
justify-content: center;
height: 80rpx;
line-height: 80rpx;
position: relative;
font-size: 32rpx;
font-weight: bold;
/deep/ .u-icon{
color: #c8c9cc;
position: absolute;
right: 16rpx;
top: 0;
bottom: 0;
}
}
.content-list{
display: flex;
padding: 0 24rpx 0 24rpx;
margin-top: 20rpx;
.list-name{
display: inline-block;
text-align: justify;
text-align-last: justify;
width: 110rpx;
font-size: 26rpx;
line-height: 40px;
flex-shrink: 0;
}
.list-name2{
line-height: 40px;
}
.uni-input{
height: 40px;
border-bottom: 1px solid #d1d1d1;
flex: 1;
}
}
.confrim-btn{
margin: 64rpx 24rpx 40rpx 24rpx;
/deep/ .u-reset-button{
height: 80rpx;
line-height: 80rpx;
border-radius: 15rpx;
color: #FFFFFF;
text-align: center;
background: linear-gradient(134deg, #ED400C 0%, #FB862C 100%);
font-size: 28rpx;
border-radius: 8rpx;
border: none;
}
}
.product-goods{
padding: 30rpx;
padding-top: 200rpx;
overflow: auto;
position: relative;
.product-block{
border-radius: 5px;
margin-bottom: 20rpx;
background: #fff;
box-shadow: 0px 3px 0px rgba(0, 0, 0, 0.02);
.block-title{
padding: 30rpx 24rpx 25rpx 24rpx;
box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.08);
display: flex;
justify-content: space-between;
font-size: 30rpx;
color: #333;
.title-left{
flex: 1;
display: flex;
align-items: center;
.left-imgBox{
width: 32rpx;
height: 32rpx;
display: flex;
margin-right: 16rpx;
border-radius: 3px;
flex-shrink: 0;
background-color: #FEB221;
}
.left-img{
display: inline-block;
width: 32rpx;
height: 32rpx;
}
.left-Name{
font-size: 0.32rem;
color: #191919;
font-weight: bold;
flex: 1;
font-size: 28rpx;
line-height: 36rpx;
}
}
.title-right{
width: 160rpx;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 24rpx;
color: #ED400C;
}
}
.block-main{
display: flex;
height: 174rpx;
border-bottom: none;
color: #333333;
position: relative;
padding: 36rpx 24rpx 24rpx 24rpx;
.mian-InfoWrap{
display: flex;
flex: 1;
font-size: 30rpx;
color: #666666;
flex-wrap: wrap;
word-break: break-all;
margin-right: 20rpx;
flex-direction: column;
justify-content: center;
height: 100%;
.InfoWrap-mb30{
margin-bottom: 30rpx;
}
.allPice{
position: absolute;
left: 24rpx;
bottom: -80rpx;
color: #ED400C;
font-size: 40rpx;
font-weight: bold;
display: flex;
text{
font-size: 24rpx;
font-weight: normal;
margin-right: 4rpx;
line-height: 60rpx;
}
}
}
.main-right{
height: 100%;
display: flex;
align-items: center;
color: #6b6b6b;
}
}
.block-Btn{
display: flex;
justify-content: flex-end;
height: 100rpx;
align-items: center;
padding: 0 20rpx;
.block-button{
width: 152rpx;
height: 64rpx;
line-height: 64rpx;
color: #333333;
padding: 0;
text-align: center;
display: inline-block;
box-sizing: content-box;
font-size: 28rpx;
border: 1px solid #cccccc;
border-radius: 8rpx;
align-items: center;
margin-right: 15rpx;
}
.block-button:nth-last-child(1){
margin-right: 0;
}
.block-buttonOrange{
color: #f9690e;
border: 1px solid #f9690e;
}
}
}
.goods-NoMore{
height: 40rpx;
color: #666666;
font-size: 30rpx;
line-height: 40rpx;
text-align: center;
}
.order-No{
height: 40rpx;
color: #666666;
font-size: 30rpx;
line-height: 40rpx;
text-align: center;
margin: auto;
position: absolute;
top: 400;
right: 0;
bottom: 0;
left: 0;
}
}
</style> </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