|
|
@ -1,56 +1,47 @@ |
|
|
|
<template> |
|
|
|
<view class="running-water"> |
|
|
|
<navbar :title="title[status]" leftClick @leftClick="leftClick" /> |
|
|
|
<navbar :title="title[status]" leftClick @leftClick="leftClick" |
|
|
|
bgColor="#DC2828" |
|
|
|
color="#fff" |
|
|
|
/> |
|
|
|
|
|
|
|
<view style="background-color: red;height: 250rpx;"> |
|
|
|
<view style="background-color: #DC2828;height: 150rpx;"> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="sum"> |
|
|
|
<view class="left"> |
|
|
|
<view class="tiele">总佣金(元)</view> |
|
|
|
<view class="price">¥1240.00</view> |
|
|
|
<view class="btn">去提现</view> |
|
|
|
</view> |
|
|
|
<view class="right"> |
|
|
|
<view class="tiele">累计提现(元)</view> |
|
|
|
<view class="price">¥1240.00</view> |
|
|
|
<view class="btn">提现记录</view> |
|
|
|
<view class="card-wrapper"> |
|
|
|
<view class="card"> |
|
|
|
<view class="card-section"> |
|
|
|
<view class="amount-title">总佣金(元)</view> |
|
|
|
<view class="amount-value">¥ {{ info.lj_money }}</view> |
|
|
|
<!-- <view class="action-btn" @click="goWithdraw">提现</view> --> |
|
|
|
</view> |
|
|
|
<view class="card-divider"></view> |
|
|
|
<view class="card-section"> |
|
|
|
<view class="amount-title">累计提现(元)</view> |
|
|
|
<view class="amount-value">¥ {{ info.lj_price }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="searchCondition"> |
|
|
|
<!--搜索框--> |
|
|
|
<span style="margin-right: 40rpx;">金额明细</span> |
|
|
|
<view class="date-filter"> |
|
|
|
<text class="filter-title">金额明细</text> |
|
|
|
|
|
|
|
|
|
|
|
<view class="dateTimeCls"> |
|
|
|
<view class="date" @click="startDateOpen"> |
|
|
|
{{ queryParams.startDate }} |
|
|
|
<uv-datetime-picker ref="startDateRef" v-model="queryParams.startDate" mode="date" |
|
|
|
@confirm="startDateChange"></uv-datetime-picker> |
|
|
|
</view> |
|
|
|
<view class="image"> |
|
|
|
<image src="../static/order/2.svg" style="width: 100%;height: 100%"></image> |
|
|
|
<view class="filter-actions"> |
|
|
|
<view class="date-select" @click="openCalendar"> |
|
|
|
<text class="date-text">{{queryParams.year || '全部'}} {{queryParams.month || ''}}</text> |
|
|
|
<uv-icon name="calendar" size="32rpx" color="#666"></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<span style="margin: 0 20rpx;">-</span> |
|
|
|
<view class="dateTimeCls"> |
|
|
|
<view class="date" @click="endDateOpen"> |
|
|
|
{{ queryParams.endDate }} |
|
|
|
<uv-datetime-picker ref="endDateRef" v-model="queryParams.endDate" mode="date" |
|
|
|
@confirm="endDateChange"> |
|
|
|
</uv-datetime-picker> |
|
|
|
</view> |
|
|
|
<view class="image"> |
|
|
|
<image src="../static/order/2.svg" style="width: 100%;height: 100%"></image> |
|
|
|
|
|
|
|
<view v-if="queryParams.year" class="reset-btn" @click="resetFilter"> |
|
|
|
<uv-icon name="trash" size="28rpx" color="#999"></uv-icon> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="tab-box"> |
|
|
|
<view class="tab-box1" v-if="agentFlow.records.length>0 && agentFlow.total>0"> |
|
|
|
<uv-cell center border :title="item.title" v-for="(item, index) in agentFlow.records" |
|
|
|
<uv-cell center border :title="item.title" v-for="(item, index) in agentFlow.records" :key="item.id" |
|
|
|
:value="x[item.type] + item.money" :label="item.createTime" /> |
|
|
|
</view> |
|
|
|
<view style="padding: 100rpx 0;" v-else> |
|
|
@ -58,82 +49,129 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 日历选择器 --> |
|
|
|
<uv-calendars |
|
|
|
ref="calendar" |
|
|
|
:insert="false" |
|
|
|
mode="year-month" |
|
|
|
color="#DC2828" |
|
|
|
@confirm="calendarConfirm" |
|
|
|
></uv-calendars> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import dayjs from "dayjs"; |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
queryParams: { |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
startDate: dayjs(new Date()).subtract(30, 'day').format('YYYY-MM-DD'), |
|
|
|
endDate: dayjs(new Date()).format('YYYY-MM-DD'), |
|
|
|
year: '', |
|
|
|
month: '' |
|
|
|
}, |
|
|
|
title: ['余额记录', '提现记录', '佣金记录'], |
|
|
|
agentFlow: { |
|
|
|
total: 1, |
|
|
|
records: [{ |
|
|
|
type: 0, |
|
|
|
money: 100, |
|
|
|
createTime: '2024-04-02 20:00', |
|
|
|
title: "佣金提现", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 0, |
|
|
|
money: 100, |
|
|
|
createTime: '2024-04-02 20:00', |
|
|
|
title: "佣金提现", |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 0, |
|
|
|
money: 100, |
|
|
|
createTime: '2024-04-02 20:00', |
|
|
|
title: "佣金提现", |
|
|
|
}, |
|
|
|
] |
|
|
|
records: [] |
|
|
|
}, |
|
|
|
x: ['+', '-', '-', '+'], |
|
|
|
status: 0, |
|
|
|
info : {}, |
|
|
|
} |
|
|
|
}, |
|
|
|
onPullDownRefresh() { |
|
|
|
this.getAgentFlow() |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
this.loadMoreData() |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
this.status = e.status |
|
|
|
this.status = e.status || 0; |
|
|
|
// 加载数据 |
|
|
|
this.getAgentFlow(); |
|
|
|
this.$store.commit('getUserInfo'); |
|
|
|
this.getTeamInfo(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 获取团队信息 |
|
|
|
getTeamInfo() { |
|
|
|
this.$api('getTeamHeader', res => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.info = res.result; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
loadMoreData(){ |
|
|
|
if(this.queryParams.pageSize < this.total){ |
|
|
|
this.queryParams.pageSize += 10 |
|
|
|
this.getAgentFlow() |
|
|
|
} |
|
|
|
}, |
|
|
|
leftClick() { //返回钱包 |
|
|
|
uni.navigateBack(-1) |
|
|
|
}, |
|
|
|
getAgentFlow() { //获取流水记录 |
|
|
|
let type = this.status; |
|
|
|
this.$api('getAgentFlow', { |
|
|
|
type |
|
|
|
}, res => { |
|
|
|
const params = { |
|
|
|
type, |
|
|
|
pageNo: this.queryParams.pageNo, |
|
|
|
pageSize: this.queryParams.pageSize |
|
|
|
}; |
|
|
|
|
|
|
|
// 只有当年份有值时才添加年份筛选 |
|
|
|
if (this.queryParams.year) { |
|
|
|
// 提取数字部分 |
|
|
|
const year = this.queryParams.year.replace('年', ''); |
|
|
|
params.year = year; |
|
|
|
|
|
|
|
// 如果月份有值,添加月份筛选 |
|
|
|
if (this.queryParams.month) { |
|
|
|
const month = this.queryParams.month.replace('月', ''); |
|
|
|
params.month = month; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.$api('getLogList', params, res => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.agentFlow = res.result |
|
|
|
this.agentFlow = res.result; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
startDateChange(val) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.queryParams.startDate = dayjs(val.value).format("YYYY-MM-DD") |
|
|
|
// this.getData() |
|
|
|
goWithdraw() { |
|
|
|
// 跳转到提现页面 |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages_order/mine/withdraw' |
|
|
|
}); |
|
|
|
}, |
|
|
|
startDateOpen() { |
|
|
|
this.$refs.startDateRef.open(); |
|
|
|
// 日历选择器相关方法 |
|
|
|
openCalendar() { |
|
|
|
this.$refs.calendar.open(); |
|
|
|
}, |
|
|
|
endDateChange(val) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.queryParams.endDate = dayjs(val.value).format("YYYY-MM-DD") |
|
|
|
// this.getData() |
|
|
|
}); |
|
|
|
}, |
|
|
|
endDateOpen() { |
|
|
|
this.$refs.endDateRef.open(); |
|
|
|
calendarConfirm(e) { |
|
|
|
// 判断是否有值 |
|
|
|
if (e.year && e.month) { |
|
|
|
this.queryParams.year = e.year + '年'; |
|
|
|
this.queryParams.month = e.month + '月'; |
|
|
|
} else { |
|
|
|
// 重置为全部 |
|
|
|
this.queryParams.year = ''; |
|
|
|
this.queryParams.month = ''; |
|
|
|
} |
|
|
|
|
|
|
|
// 重置页码 |
|
|
|
this.queryParams.pageNo = 1; |
|
|
|
|
|
|
|
// 更新数据 |
|
|
|
this.getAgentFlow(); |
|
|
|
}, |
|
|
|
// 重置筛选 |
|
|
|
resetFilter() { |
|
|
|
this.queryParams.year = ''; |
|
|
|
this.queryParams.month = ''; |
|
|
|
this.queryParams.pageNo = 1; |
|
|
|
this.getAgentFlow(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
@ -143,115 +181,107 @@ |
|
|
|
width: 750rpx; |
|
|
|
margin: 0 auto; |
|
|
|
min-height: 100vh; |
|
|
|
position: absolute; |
|
|
|
position: relative; |
|
|
|
background: #F5F5F5; |
|
|
|
.tab-box { |
|
|
|
margin: 20rpx; |
|
|
|
// margin-top: 100rpx; |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
|
|
|
|
.sum { |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
gap: 100rpx; |
|
|
|
width: 90%; |
|
|
|
height: 200rpx; |
|
|
|
margin-top: 20rpx; |
|
|
|
padding: 20rpx; |
|
|
|
border: 1px solid #fff; |
|
|
|
background-color: #fff; |
|
|
|
z-index: 999; |
|
|
|
border-radius: 40rpx; |
|
|
|
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); |
|
|
|
position: absolute; |
|
|
|
top: 220rpx; |
|
|
|
left: 20rpx; |
|
|
|
|
|
|
|
|
|
|
|
.left { |
|
|
|
|
|
|
|
.card-wrapper { |
|
|
|
position: relative; |
|
|
|
padding: 0 30rpx; |
|
|
|
margin-top: -90rpx; |
|
|
|
z-index: 10; |
|
|
|
|
|
|
|
.card { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.price { |
|
|
|
font-size: 30rpx; |
|
|
|
font-weight: 700; |
|
|
|
color: #dc2929; |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08); |
|
|
|
overflow: hidden; |
|
|
|
|
|
|
|
.card-section { |
|
|
|
flex: 1; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
padding: 30rpx 0; |
|
|
|
|
|
|
|
.amount-title { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #666; |
|
|
|
margin-bottom: 16rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.amount-value { |
|
|
|
font-size: 42rpx; |
|
|
|
font-weight: bold; |
|
|
|
color: #DC2828; |
|
|
|
margin-bottom: 30rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.action-btn { |
|
|
|
width: 160rpx; |
|
|
|
height: 70rpx; |
|
|
|
line-height: 70rpx; |
|
|
|
text-align: center; |
|
|
|
border: 1px solid #DC2828; |
|
|
|
color: #DC2828; |
|
|
|
font-size: 28rpx; |
|
|
|
border-radius: 35rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.btn { |
|
|
|
padding: 10rpx 15rpx; |
|
|
|
border: 1px solid #dc2929; |
|
|
|
color: #dc2929; |
|
|
|
border-radius: 20rpx; |
|
|
|
|
|
|
|
.card-divider { |
|
|
|
width: 1px; |
|
|
|
background-color: #eee; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.right { |
|
|
|
} |
|
|
|
|
|
|
|
.date-filter { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: space-between; |
|
|
|
margin: 0 20rpx; |
|
|
|
margin-top: 30rpx; |
|
|
|
padding: 30rpx; |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 10rpx; |
|
|
|
|
|
|
|
.filter-title { |
|
|
|
font-size: 28rpx; |
|
|
|
color: #333; |
|
|
|
font-weight: 500; |
|
|
|
} |
|
|
|
|
|
|
|
.filter-actions { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.title { |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.price { |
|
|
|
font-size: 30rpx; |
|
|
|
font-weight: 700; |
|
|
|
color: #dc2929; |
|
|
|
} |
|
|
|
|
|
|
|
.btn { |
|
|
|
padding: 10rpx 15rpx; |
|
|
|
border: 1px solid #dc2929; |
|
|
|
color: #dc2929; |
|
|
|
border-radius: 20rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.searchCondition { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
width: 100vw; |
|
|
|
padding: 0 40rpx; |
|
|
|
padding-top: 130rpx; |
|
|
|
background-color: #fff; |
|
|
|
.dateTimeCls { |
|
|
|
|
|
|
|
.date-select { |
|
|
|
display: flex; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
width: 30%; |
|
|
|
border: 1px solid #b0b2b3; |
|
|
|
padding: 5rpx; |
|
|
|
border-radius: 20rpx; |
|
|
|
|
|
|
|
.date { |
|
|
|
font-size: 25rpx; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
width: 80%; |
|
|
|
height: 100%; |
|
|
|
color: #b0b2b3; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.image { |
|
|
|
width: 20%; |
|
|
|
height: 100%; |
|
|
|
padding: 12rpx 20rpx; |
|
|
|
border: 1px solid #ddd; |
|
|
|
border-radius: 8rpx; |
|
|
|
|
|
|
|
.date-text { |
|
|
|
margin-right: 10rpx; |
|
|
|
font-size: 26rpx; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.reset-btn { |
|
|
|
margin-left: 20rpx; |
|
|
|
padding: 12rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.tab-box { |
|
|
|
margin: 20rpx; |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |