2023-11-28 10:44:18 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
|
|
|
<view class="container">
|
|
|
|
<view class="my-header">
|
|
|
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
|
|
|
<view class="my-text">充值记录</view>
|
|
|
|
<view class="my-icons"></view>
|
|
|
|
</view>
|
|
|
|
<!-- 顶部区域 -->
|
2023-11-28 14:43:36 +08:00
|
|
|
<view class="tap-top">
|
|
|
|
<view class="tap-box" :class="{ 'act' : tindex == index }" v-for="(item,index) in tapList" :key="index"
|
|
|
|
@click="tapindex(index)">
|
|
|
|
<view class="">{{ item.text }}</view>
|
|
|
|
<view class="gang" :class="{ 'lan' : tindex == index }"></view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2024-03-08 14:14:30 +08:00
|
|
|
<view class="ail" v-if="list.length > 0 ">
|
2023-12-06 09:20:25 +08:00
|
|
|
<view class="box-order" v-for="(item,index) in list" :key="index">
|
|
|
|
<view class="or-box-top">
|
2023-12-07 10:22:52 +08:00
|
|
|
<view class="">{{item.recordName}}</view>
|
2023-12-06 09:20:25 +08:00
|
|
|
<view class="chengg">充值成功</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="but-box">
|
2024-02-05 18:00:37 +08:00
|
|
|
<view class="huis">实付金额</view>
|
2023-12-07 10:22:52 +08:00
|
|
|
<view class="">¥{{item.rechargeBalance}}</view>
|
2023-12-06 09:20:25 +08:00
|
|
|
</view>
|
2023-12-07 10:22:52 +08:00
|
|
|
|
|
|
|
<view class="but-box" v-if="item.recordName == '储值卡'">
|
2024-02-05 18:00:37 +08:00
|
|
|
<view class="huis">充值金额</view>
|
2023-12-07 10:22:52 +08:00
|
|
|
<view class="reds">¥{{item.obtain}}</view>
|
|
|
|
</view>
|
|
|
|
<view class="but-box" v-else>
|
|
|
|
<view class="huis">所得升数</view>
|
2024-02-05 18:00:37 +08:00
|
|
|
<view class="reds">{{item.obtain}}L</view>
|
2023-12-06 09:20:25 +08:00
|
|
|
</view>
|
|
|
|
<view class="but-box">
|
|
|
|
<view class="huis">订单时间</view>
|
2023-12-07 10:22:52 +08:00
|
|
|
<view class="">{{item.createTime}}</view>
|
2023-12-06 09:20:25 +08:00
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
2023-12-07 10:22:52 +08:00
|
|
|
<u-empty v-if="list.length == 0 " mode="coupon" text="内容为空"
|
2023-11-28 14:43:36 +08:00
|
|
|
icon="http://cdn.uviewui.com/uview/empty/coupon.png">
|
2023-12-07 10:22:52 +08:00
|
|
|
</u-empty>
|
|
|
|
<u-loadmore :status="status" v-if="show == true" />
|
2023-11-28 10:44:18 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-12-07 10:22:52 +08:00
|
|
|
import config from '@/config'
|
|
|
|
import request from '../../utils/request'
|
2023-11-28 10:44:18 +08:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
2024-03-08 14:14:30 +08:00
|
|
|
appltType: uni.getStorageSync("appltType"),
|
2023-11-28 10:44:18 +08:00
|
|
|
title: '',
|
2023-11-28 14:43:36 +08:00
|
|
|
tindex: 0,
|
2023-12-07 10:22:52 +08:00
|
|
|
status: 'loading',
|
|
|
|
totalDetail: '',
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
list: [],
|
|
|
|
query: {
|
|
|
|
mtUserId: '',
|
|
|
|
storeId: '',
|
|
|
|
recordName: '',
|
|
|
|
pageNo: 1,
|
2024-01-24 15:22:16 +08:00
|
|
|
pageSize: 10,
|
|
|
|
appltType: '',
|
2023-12-07 10:22:52 +08:00
|
|
|
},
|
2023-11-28 14:43:36 +08:00
|
|
|
tapList: [{
|
|
|
|
text: "全部"
|
|
|
|
},
|
|
|
|
{
|
2024-03-06 09:26:20 +08:00
|
|
|
text: "电子储值卡"
|
2023-11-28 14:43:36 +08:00
|
|
|
},
|
|
|
|
{
|
2024-03-06 09:26:20 +08:00
|
|
|
text: "电子囤油卡"
|
2023-11-28 14:43:36 +08:00
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2023-11-28 10:44:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
components: {
|
|
|
|
|
2024-01-24 15:22:16 +08:00
|
|
|
},
|
2024-03-11 14:03:09 +08:00
|
|
|
onLoad(e) {
|
|
|
|
if (e.index){
|
|
|
|
console.log(e.index);
|
|
|
|
this.tindex = e.index
|
|
|
|
this.tapindex(e.index)
|
|
|
|
}
|
2023-12-07 10:22:52 +08:00
|
|
|
},
|
|
|
|
onShow() {
|
2024-01-03 13:39:21 +08:00
|
|
|
this.getAllOrderList();
|
|
|
|
this.storeId = uni.getStorageSync("storeId")
|
2023-12-07 10:22:52 +08:00
|
|
|
},
|
|
|
|
onReachBottom() {
|
|
|
|
this.show = true
|
|
|
|
if (this.list.length >= this.totalDetail) {
|
|
|
|
uni.showToast({
|
|
|
|
title: '没有下一页数据',
|
|
|
|
icon: 'none'
|
|
|
|
})
|
|
|
|
this.status = "nomore"
|
|
|
|
} else {
|
|
|
|
this.query.pageNo++
|
|
|
|
this.getAllOrderList()
|
|
|
|
}
|
2023-11-28 10:44:18 +08:00
|
|
|
},
|
|
|
|
methods: {
|
2023-11-28 14:43:36 +08:00
|
|
|
tapindex(index) {
|
|
|
|
this.tindex = index
|
2024-03-08 14:45:14 +08:00
|
|
|
this.query.pageNo = 1
|
2023-12-09 09:34:35 +08:00
|
|
|
this.list = []
|
2023-12-07 10:22:52 +08:00
|
|
|
if (index == 0) {
|
|
|
|
this.query.recordName = ''
|
|
|
|
} else if (index == 1) {
|
|
|
|
this.query.recordName = '储值卡'
|
|
|
|
} else if (index == 2) {
|
2024-02-01 15:53:54 +08:00
|
|
|
this.query.recordName = '囤油卡'
|
2023-12-07 10:22:52 +08:00
|
|
|
}
|
|
|
|
this.getAllOrderList()
|
2023-11-28 14:43:36 +08:00
|
|
|
},
|
2023-11-28 10:44:18 +08:00
|
|
|
goback() {
|
|
|
|
uni.navigateBack()
|
2023-12-07 10:22:52 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
// 查询全部充值订单
|
|
|
|
getAllOrderList() {
|
2024-03-08 14:14:30 +08:00
|
|
|
this.query.storeId = uni.getStorageSync("storeId")
|
2023-12-07 10:22:52 +08:00
|
|
|
request({
|
|
|
|
url: 'business/marketingActivity/cardValueRecord/selectAllRecord',
|
|
|
|
method: 'get',
|
|
|
|
params: this.query
|
|
|
|
|
|
|
|
}).then((res) => {
|
|
|
|
if (res.code == 200) {
|
2024-03-08 14:14:30 +08:00
|
|
|
if (this.query.pageNo > 1) {
|
2023-12-07 10:22:52 +08:00
|
|
|
this.list = this.list.concat(res.data.records)
|
|
|
|
} else {
|
|
|
|
this.list = res.data.records
|
|
|
|
}
|
|
|
|
this.totalDetail = res.data.total
|
|
|
|
this.show = false
|
|
|
|
uni.hideLoading();
|
2024-03-08 14:14:30 +08:00
|
|
|
console.log(this.list,123);
|
2023-12-07 10:22:52 +08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2023-11-28 10:44:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.content {
|
|
|
|
background: #f4f5f6;
|
2023-12-09 09:34:35 +08:00
|
|
|
height: 100vh;
|
2023-11-28 10:44:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.container {
|
|
|
|
width: 100%;
|
2023-12-07 10:22:52 +08:00
|
|
|
height: 100%;
|
2023-11-28 10:44:18 +08:00
|
|
|
box-sizing: border-box;
|
|
|
|
padding-top: 88px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.my-header {
|
|
|
|
width: 100%;
|
|
|
|
height: 88px;
|
|
|
|
background: #ffffff;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
color: #000;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 0px 15px;
|
|
|
|
padding-top: 40px;
|
|
|
|
|
|
|
|
.my-icons {
|
|
|
|
width: 20px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
position: fixed;
|
|
|
|
top: 0px;
|
|
|
|
}
|
2023-11-28 14:43:36 +08:00
|
|
|
|
|
|
|
.tap-top {
|
|
|
|
width: 100%;
|
|
|
|
height: 50px;
|
|
|
|
background-color: #ffffff;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tap-box {
|
|
|
|
width: 33%;
|
|
|
|
text-align: center;
|
|
|
|
color: #666666;
|
|
|
|
}
|
|
|
|
|
|
|
|
.gang {
|
|
|
|
width: 35px;
|
|
|
|
height: 4px;
|
|
|
|
// background: #0000ff;
|
|
|
|
margin: 0 auto;
|
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.act {
|
|
|
|
font-weight: bold;
|
|
|
|
color: #000;
|
|
|
|
}
|
|
|
|
|
|
|
|
.lan {
|
|
|
|
background: #0000ff;
|
|
|
|
}
|
2023-12-06 09:20:25 +08:00
|
|
|
|
|
|
|
.box-order {
|
|
|
|
width: 95%;
|
|
|
|
border-radius: 8px;
|
|
|
|
background: #ffffff;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 10px;
|
|
|
|
margin: 10px auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.or-box-top {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 5px 0px;
|
|
|
|
border-bottom: 1px solid #e5e5e5;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.chengg {
|
|
|
|
color: #1678ff;
|
|
|
|
}
|
|
|
|
|
|
|
|
.but-box {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
font-size: 14px;
|
|
|
|
margin: 5px 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.reds {
|
|
|
|
color: red;
|
|
|
|
}
|
|
|
|
|
|
|
|
.huis {
|
|
|
|
color: #666666;
|
|
|
|
}
|
|
|
|
|
|
|
|
.end-box {
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: flex-end;
|
|
|
|
}
|
|
|
|
|
|
|
|
.anniu {
|
|
|
|
width: 70px;
|
|
|
|
height: 25px;
|
|
|
|
background-color: #1678ff;
|
|
|
|
color: #ffffff;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
font-size: 14px;
|
|
|
|
border-radius: 15px;
|
|
|
|
}
|
2024-01-03 13:39:21 +08:00
|
|
|
</style>
|