Merge branch 'main' of http://122.51.230.86:3000/dianliang/oil-station
This commit is contained in:
commit
db50b79180
@ -1,298 +1,339 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="centenr">
|
<view class="centenr">
|
||||||
<view class="Candywrapper">
|
<view class="Candywrapper">
|
||||||
<view class="card_box">
|
<view class="card_box">
|
||||||
|
|
||||||
<view style="margin: 13px 0px;">当前积分</view>
|
<view style="margin: 13px 0px;">当前积分</view>
|
||||||
<view class="r-num">{{cardBalance.points || 0}}</view>
|
<view class="r-num">{{ cardBalance.points || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tab-bs">
|
<view class="tab-bs">
|
||||||
<view class="w_box" @click="show1 = true">类型筛选 <u-icon name="arrow-down-fill"></u-icon> </view>
|
<view class="w_box" @click="show1 = true">类型筛选
|
||||||
<view class="w_box" @click="show = true">全部时间 <u-icon name="arrow-down-fill"></u-icon> </view>
|
<u-icon name="arrow-down-fill"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="bai_box" v-for="(item,index) in pointsList" :key="index">
|
<view class="w_box" @click="show = true">全部时间
|
||||||
<view class="left-img">
|
<u-icon name="arrow-down-fill"></u-icon>
|
||||||
<!-- <image src="../../static/icon/hyxf.png" mode=""></image> -->
|
</view>
|
||||||
<image src="../../static/icon/jfdh.png" mode=""></image>
|
</view>
|
||||||
</view>
|
<view class="bai_box" v-for="(item,index) in pointsList" :key="index">
|
||||||
<view style="width: 85%;">
|
<view class="left-img">
|
||||||
<view class="right-box">
|
<!-- <image src="../../static/icon/hyxf.png" mode=""></image> -->
|
||||||
<view class="l-text">{{item.changeReason}}</view>
|
<image src="../../static/icon/jfdh.png" mode=""></image>
|
||||||
<view class="r-text" v-if="item.changeType==1">{{item.pointsChange}}</view>
|
</view>
|
||||||
<view class="r-text" v-else-if="item.changeType==0">-{{item.pointsChange}}</view>
|
<view style="width: 85%;">
|
||||||
<view class="r-text" v-else>0</view>
|
<view class="right-box">
|
||||||
</view>
|
<view class="l-text">{{ item.changeReason }}</view>
|
||||||
<view class="right-box">
|
<view class="r-text" v-if="item.changeType==1">{{ item.pointsChange }}</view>
|
||||||
<view class="">会员积分</view>
|
<view class="r-text" v-else-if="item.changeType==0">-{{ item.pointsChange }}</view>
|
||||||
<view class="">余额{{item.currentPoints || 0}}</view>
|
<view class="r-text" v-else>0</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="">{{item.storeName}}</view>
|
<view class="">会员积分</view>
|
||||||
<view class="">{{item.createTime}}</view>
|
<view class="">余额{{ item.currentPoints || 0 }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="right-box">
|
||||||
</view>
|
<view class="">{{ item.storeName }}</view>
|
||||||
<view v-if="!pointsList || pointsList.length==0">
|
<view class="">{{ item.createTime }}</view>
|
||||||
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
|
</view>
|
||||||
</u-empty>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="bai_box">
|
<view v-if="!pointsList || pointsList.length==0">
|
||||||
<view class="left-img">
|
<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png">
|
||||||
<image src="../../static/icon/hycz.png" mode=""></image>
|
</u-empty>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 85%;">
|
<!-- <view class="bai_box">
|
||||||
<view class="right-box">
|
<view class="left-img">
|
||||||
<view class="l-text">会员消费</view>
|
<image src="../../static/icon/hycz.png" mode=""></image>
|
||||||
<view class="r-text">-199.00</view>
|
</view>
|
||||||
</view>
|
<view style="width: 85%;">
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="">储值卡</view>
|
<view class="l-text">会员消费</view>
|
||||||
<view class="">余额123456.98</view>
|
<view class="r-text">-199.00</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="">中建锦绣二期站</view>
|
<view class="">储值卡</view>
|
||||||
<view class="">2024-09-09 16:45:09</view>
|
<view class="">余额123456.98</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="right-box">
|
||||||
</view>
|
<view class="">中建锦绣二期站</view>
|
||||||
<view class="bai_box">
|
<view class="">2024-09-09 16:45:09</view>
|
||||||
<view class="left-img">
|
</view>
|
||||||
<image src="../../static/icon/jfdh.png" mode=""></image>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="width: 85%;">
|
<view class="bai_box">
|
||||||
<view class="right-box">
|
<view class="left-img">
|
||||||
<view class="l-text">会员消费</view>
|
<image src="../../static/icon/jfdh.png" mode=""></image>
|
||||||
<view class="r-text">-199.00</view>
|
</view>
|
||||||
</view>
|
<view style="width: 85%;">
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="">储值卡</view>
|
<view class="l-text">会员消费</view>
|
||||||
<view class="">余额123456.98</view>
|
<view class="r-text">-199.00</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-box">
|
<view class="right-box">
|
||||||
<view class="">中建锦绣二期站</view>
|
<view class="">储值卡</view>
|
||||||
<view class="">2024-09-09 16:45:09</view>
|
<view class="">余额123456.98</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="right-box">
|
||||||
</view> -->
|
<view class="">中建锦绣二期站</view>
|
||||||
<u-datetime-picker :show="show" v-model="value1" mode="year-month" @cancel="cancel1"
|
<view class="">2024-09-09 16:45:09</view>
|
||||||
@confirm="confirm1"></u-datetime-picker>
|
</view>
|
||||||
<u-picker :show="show1" :columns="columns" @cancel="cancel" @confirm="confirm"></u-picker>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
<u-datetime-picker :show="show" v-model="value1" mode="year-month" @cancel="cancel1"
|
||||||
|
@confirm="confirm1"></u-datetime-picker>
|
||||||
|
<u-picker :show="show1" :columns="columns" @cancel="cancel" keyName="label" @confirm="confirm"></u-picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '../../utils/request'
|
import request from '../../utils/request'
|
||||||
export default {
|
|
||||||
data() {
|
export default {
|
||||||
return {
|
data() {
|
||||||
query: {
|
return {
|
||||||
chainStoreId: '',
|
query: {
|
||||||
couponType: '',
|
chainStoreId: '',
|
||||||
useStatus: 0,
|
couponType: '',
|
||||||
pageNo: 1,
|
useStatus: 0,
|
||||||
pageSize: 10
|
pageNo: 1,
|
||||||
},
|
pageSize: 10
|
||||||
cardBalance: {},
|
},
|
||||||
show: false,
|
cardBalance: {},
|
||||||
show1: false,
|
show: false,
|
||||||
value1: Number(new Date()),
|
show1: false,
|
||||||
columns: [
|
value1: Number(new Date()),
|
||||||
['全部类型', '消费有礼', '充值有礼', '积分兑换', '开卡有礼', '邀请有礼', '生日有礼', '推荐会员充值有礼',
|
columns: [
|
||||||
'推荐会员推荐有礼', '每日签到', '大转盘抽奖', '九宫格抽奖'
|
[{
|
||||||
]
|
label: '全部类型',
|
||||||
],
|
value: null
|
||||||
queryParams: {
|
}, {
|
||||||
pageNo: 1,
|
label: '消费有礼',
|
||||||
pageSize: 30,
|
value: ''
|
||||||
type: "",
|
}, {
|
||||||
storeId: uni.getStorageSync("storeId"),
|
label: '充值有礼',
|
||||||
changeReason: "",
|
value: ''
|
||||||
startTime: ""
|
}, {
|
||||||
},
|
label: '积分兑换',
|
||||||
pointsList: [],
|
value: ''
|
||||||
total: 0
|
}, {
|
||||||
}
|
label: '开卡有礼',
|
||||||
},
|
value: ''
|
||||||
onShow() {
|
}, {
|
||||||
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
|
label: '邀请有礼',
|
||||||
this.getUserBalance()
|
value: ''
|
||||||
this.getList()
|
}, {
|
||||||
},
|
label: '生日有礼',
|
||||||
onPullDownRefresh() {
|
value: ''
|
||||||
console.log("刷新");
|
}, {
|
||||||
this.pointsList = []
|
label: '推荐会员充值有礼',
|
||||||
this.queryParams = {
|
value: ''
|
||||||
pageNo: 1,
|
},
|
||||||
pageSize: 30,
|
{
|
||||||
type: "",
|
label: '推荐会员推荐有礼',
|
||||||
storeId: uni.getStorageSync("storeId"),
|
value: ''
|
||||||
changeReason: "",
|
}, {
|
||||||
startTime: ""
|
label: '每日签到',
|
||||||
}
|
value: ''
|
||||||
this.getList()
|
}, {
|
||||||
},
|
label: '大转盘抽奖',
|
||||||
onReachBottom() {
|
value: ''
|
||||||
// 触底加载
|
}, {
|
||||||
if (this.pointsList.length < this.total) {
|
label: '九宫格抽奖',
|
||||||
this.queryParams.pageNo++
|
value: ''
|
||||||
this.getList()
|
}
|
||||||
}
|
]
|
||||||
},
|
],
|
||||||
methods: {
|
queryParams: {
|
||||||
// 获取余额信息
|
pageNo: 1,
|
||||||
getUserBalance() {
|
pageSize: 30,
|
||||||
request({
|
type: "",
|
||||||
url: '/business/userManager/user/getUserBalanceApplet',
|
storeId: uni.getStorageSync("storeId"),
|
||||||
method: 'get',
|
changeReason: "",
|
||||||
params: this.query
|
startTime: ""
|
||||||
}).then(res => {
|
},
|
||||||
if (res.code == 200) {
|
pointsList: [],
|
||||||
this.cardBalance = res.data
|
total: 0
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
},
|
onShow() {
|
||||||
getList() {
|
this.query.chainStoreId = uni.getStorageSync('chainStoreId');
|
||||||
request({
|
this.getUserBalance()
|
||||||
url: '/business/integral/integralDetail/queryByPageUni',
|
this.getList()
|
||||||
method: 'get',
|
},
|
||||||
params: this.queryParams
|
onPullDownRefresh() {
|
||||||
}).then(res => {
|
console.log("刷新");
|
||||||
if (res.code == 200) {
|
this.pointsList = []
|
||||||
this.pointsList = res.data.records
|
this.queryParams = {
|
||||||
this.total = res.data.total
|
pageNo: 1,
|
||||||
}
|
pageSize: 30,
|
||||||
})
|
type: "",
|
||||||
},
|
storeId: uni.getStorageSync("storeId"),
|
||||||
confirm(e) {
|
changeReason: "",
|
||||||
this.queryParams.pageNo = 1
|
startTime: ""
|
||||||
if (e.value[0] == '全部类型') {
|
}
|
||||||
this.queryParams.type = ""
|
this.getList()
|
||||||
} else {
|
},
|
||||||
this.queryParams.type = e.value[0]
|
onReachBottom() {
|
||||||
}
|
// 触底加载
|
||||||
this.getList()
|
if (this.pointsList.length < this.total) {
|
||||||
this.show1 = false
|
this.queryParams.pageNo++
|
||||||
},
|
this.getList()
|
||||||
cancel() {
|
}
|
||||||
this.show1 = false
|
},
|
||||||
},
|
methods: {
|
||||||
timestampToString(timestamp) {
|
// 获取余额信息
|
||||||
// 将时间戳转换为Date对象
|
getUserBalance() {
|
||||||
const date = new Date(timestamp);
|
request({
|
||||||
// 使用toLocaleDateString和toLocaleTimeString可以根据本地格式转换日期和时间
|
url: '/business/userManager/user/getUserBalanceApplet',
|
||||||
const dateString = date.toLocaleDateString()
|
method: 'get',
|
||||||
const timeString = date.toLocaleTimeString();
|
params: this.query
|
||||||
// 返回日期和时间的组合
|
}).then(res => {
|
||||||
return date.getFullYear() + '-' + (date.getMonth() + 1);
|
if (res.code == 200) {
|
||||||
},
|
this.cardBalance = res.data
|
||||||
confirm1(e) {
|
}
|
||||||
this.queryParams.startTime = this.timestampToString(e.value)
|
})
|
||||||
this.queryParams.pageNo = 1
|
},
|
||||||
this.getList()
|
getList() {
|
||||||
this.show = false
|
request({
|
||||||
},
|
url: '/business/integral/integralDetail/queryByPageUni',
|
||||||
cancel1() {
|
method: 'get',
|
||||||
this.show = false
|
params: this.queryParams
|
||||||
}
|
}).then(res => {
|
||||||
}
|
if (res.code == 200) {
|
||||||
}
|
this.pointsList = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirm(e) {
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
if (e.value[0] == '全部类型') {
|
||||||
|
this.queryParams.type = null
|
||||||
|
} else {
|
||||||
|
this.queryParams.type = e.value[0].type
|
||||||
|
}
|
||||||
|
this.getList()
|
||||||
|
this.show1 = false
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.show1 = false
|
||||||
|
},
|
||||||
|
timestampToString(timestamp) {
|
||||||
|
// 将时间戳转换为Date对象
|
||||||
|
const date = new Date(timestamp);
|
||||||
|
// 使用toLocaleDateString和toLocaleTimeString可以根据本地格式转换日期和时间
|
||||||
|
const dateString = date.toLocaleDateString()
|
||||||
|
const timeString = date.toLocaleTimeString();
|
||||||
|
// 返回日期和时间的组合
|
||||||
|
return date.getFullYear() + '-' + (date.getMonth() + 1);
|
||||||
|
},
|
||||||
|
confirm1(e) {
|
||||||
|
this.queryParams.startTime = this.timestampToString(e.value)
|
||||||
|
this.queryParams.pageNo = 1
|
||||||
|
this.getList()
|
||||||
|
this.show = false
|
||||||
|
},
|
||||||
|
cancel1() {
|
||||||
|
this.show = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.centenr {
|
.centenr {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: #F9F9F9;
|
background: #F9F9F9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Candywrapper {
|
.Candywrapper {
|
||||||
background: #F9F9F9;
|
background: #F9F9F9;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card_box {
|
.card_box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
background: url('../../static/imgs/jf.png') no-repeat;
|
background: url('../../static/imgs/jf.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.r-size {
|
.r-size {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.r-num {
|
.r-num {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-bs {
|
.tab-bs {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
margin: 15px auto;
|
margin: 15px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.w_box {
|
.w_box {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bai_box {
|
.bai_box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px 10px;
|
padding: 15px 10px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-img {
|
.left-img {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-box {
|
.right-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.l-text {
|
.l-text {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.r-text {
|
.r-text {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user