2024-05-22 09:39:54 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<view class="container">
|
|
|
|
<headers :titles="titles"><u-icon name="arrow-left" color="#fff" size="22"></u-icon></headers>
|
|
|
|
<view class="tablist">
|
|
|
|
<view class="tabbox" v-for="(item,index) in tablist" :key="index" @click="getindex(index)">
|
|
|
|
<view class="">{{item}}</view>
|
|
|
|
<view class="gang" v-if="tabindex == index"></view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
2024-05-28 08:40:17 +08:00
|
|
|
<view class="box_" v-for="item,index in orderList" :key="index">
|
2024-05-22 09:39:54 +08:00
|
|
|
<view class="b-bx">
|
2024-05-28 08:40:17 +08:00
|
|
|
<!-- <view class="title_">京博加油站</view> -->
|
|
|
|
<view class="zt-size" v-if="item.orderStatus == 'paid'">已支付</view>
|
|
|
|
<view class="zt-size" v-if="item.orderStatus == 'refund'">已退款</view>
|
|
|
|
<view class="zt-size" v-if="item.orderStatus == 'unpaid'">未支付</view>
|
2024-05-22 09:39:54 +08:00
|
|
|
</view>
|
|
|
|
<view class="centne">
|
|
|
|
<view class="touxiang"></view>
|
|
|
|
<view class="right-centne">
|
2024-05-28 08:40:17 +08:00
|
|
|
<view class="h_">订单号:{{item.orderNo}}</view>
|
|
|
|
<view class="h_">油号:{{item.oilName}}</view>
|
|
|
|
<view class="h_">升数:{{item.shengshu}}L</view>
|
|
|
|
<view class="h_">下单时间:{{item.payTime}}</view>
|
2024-05-22 09:39:54 +08:00
|
|
|
<view class="b-bx">
|
2024-05-28 08:40:17 +08:00
|
|
|
<view class="">应付:¥{{item.goodsMoney}}</view>
|
2024-05-22 09:39:54 +08:00
|
|
|
<view class="">优惠:¥0.00</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2024-05-28 08:40:17 +08:00
|
|
|
<view class="end-box">实付:¥{{item.payMoney}}</view>
|
2024-05-22 09:39:54 +08:00
|
|
|
</view>
|
|
|
|
<view style="width: 100%; height: 20px; "></view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2024-05-28 08:40:17 +08:00
|
|
|
import request from "../../utils/request";
|
2024-05-22 09:39:54 +08:00
|
|
|
import headers from '../../components/header/headers.vue'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
titles: "订单列表",
|
|
|
|
tabindex: 0,
|
|
|
|
tablist: [
|
|
|
|
"全部",
|
|
|
|
"已完成",
|
2024-05-28 08:40:17 +08:00
|
|
|
"已退款",
|
|
|
|
"支付失败",
|
|
|
|
],
|
|
|
|
orderList: [],
|
2024-05-22 09:39:54 +08:00
|
|
|
|
2024-05-28 08:40:17 +08:00
|
|
|
form: {
|
|
|
|
page: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
status: ''
|
|
|
|
}
|
2024-05-22 09:39:54 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
// this.actList = ["1", "1", "1", "1", "1", ]
|
|
|
|
// this.status = "nomore" 底部刷新结束
|
2024-05-28 08:40:17 +08:00
|
|
|
this.getPageListByPos();
|
2024-05-22 09:39:54 +08:00
|
|
|
},
|
|
|
|
onPullDownRefresh() {
|
|
|
|
console.log("刷新");
|
|
|
|
uni.stopPullDownRefresh()
|
|
|
|
},
|
|
|
|
onReachBottom() {
|
|
|
|
// this.show = true
|
|
|
|
setTimeout(() => {
|
|
|
|
console.log("加载执行");
|
|
|
|
}, 2000)
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
headers
|
|
|
|
},
|
2024-05-28 08:40:17 +08:00
|
|
|
|
2024-05-22 09:39:54 +08:00
|
|
|
methods: {
|
|
|
|
getindex(index) {
|
2024-05-28 08:40:17 +08:00
|
|
|
this.orderList = []
|
|
|
|
this.tabindex = index
|
|
|
|
|
|
|
|
if (index == 0) {
|
|
|
|
this.form.status = ''
|
|
|
|
} else if (index == 1) {
|
|
|
|
this.form.status = 'paid'
|
|
|
|
} else if (index == 2) {
|
|
|
|
this.form.status = 'refund'
|
|
|
|
} else if (index == 3) {
|
|
|
|
this.form.status = 'unpaid'
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getPageListByPos()
|
|
|
|
|
|
|
|
|
2024-05-22 09:39:54 +08:00
|
|
|
},
|
|
|
|
goback() {
|
|
|
|
uni.navigateBack()
|
2024-05-28 08:40:17 +08:00
|
|
|
},
|
|
|
|
getPageListByPos() {
|
|
|
|
request({
|
|
|
|
url: 'business/allOrderInfo/getPageListByPos',
|
|
|
|
method: 'get',
|
|
|
|
params: this.form
|
|
|
|
}).then((res) => {
|
|
|
|
if (res.code == 200) {
|
|
|
|
this.orderList = res.data.records;
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
title: res.data,
|
|
|
|
icon: "none"
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
2024-05-22 09:39:54 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.content {
|
|
|
|
background: #f8f8f8;
|
|
|
|
// background: linear-gradient(180deg, #B2D2FC 0%, #B2D2FC 14%, rgba(255, 255, 255, 0.84) 24%, rgba(255, 255, 255, 0.84) 100%);
|
|
|
|
height: 100vh;
|
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
|
|
|
background: #f8f8f8;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding-top: 88px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.img-box {
|
|
|
|
image {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.tablist {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.tabbox {
|
|
|
|
width: 25%;
|
|
|
|
height: 40px;
|
|
|
|
text-align: center;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding-top: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gang {
|
|
|
|
width: 36px;
|
|
|
|
height: 2px;
|
|
|
|
background: #0864E9;
|
|
|
|
margin: 5px auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.box_ {
|
|
|
|
width: 95%;
|
|
|
|
border-radius: 8px;
|
|
|
|
background: #fff;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 15px;
|
|
|
|
margin: 15px auto;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.b-bx {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.title_ {
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 16px;
|
|
|
|
color: #333333;
|
|
|
|
}
|
|
|
|
|
|
|
|
.zt-size {
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 16px;
|
|
|
|
color: #FD504E;
|
|
|
|
}
|
|
|
|
|
|
|
|
.centne {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.touxiang {
|
|
|
|
width: 60px;
|
|
|
|
height: 60px;
|
|
|
|
border-radius: 50%;
|
|
|
|
background: #D9D9D9;
|
|
|
|
margin-right: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.right-centne {
|
|
|
|
width: 70%;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.h_ {
|
|
|
|
margin-bottom: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.end-box {
|
|
|
|
width: 100%;
|
|
|
|
text-align: right;
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 16px;
|
|
|
|
color: #0864E9;
|
|
|
|
}
|
|
|
|
</style>
|