更新统计数据

This commit is contained in:
磷叶 2025-05-08 18:16:46 +08:00
parent 7aac742898
commit 0790456789
2 changed files with 13 additions and 4 deletions

View File

@ -26,7 +26,7 @@
<el-row :gutter="gutter" style="margin-bottom:12px">
<el-col :sm="24" :md="18">
<el-card shadow="never">
<mch-stat id="mch-stat" :query="{areaId: areaId, userId: userId}"/>
<mch-stat ref="mchStat" id="mch-stat" :query="mchStatQuery"/>
</el-card>
</el-col>
<el-col :sm="24" :md="6">
@ -99,6 +99,12 @@ export default {
areaId: this.areaId,
bonusUserId: this.userId,
}
},
mchStatQuery() {
return {
areaId: this.areaId,
userId: this.userId,
}
}
},
created() {
@ -124,6 +130,9 @@ export default {
if (this.$refs.dailyStat) {
this.$refs.dailyStat.getDailyAmount();
}
if (this.$refs.mchStat) {
this.$refs.mchStat.getStat();
}
})
},
getUserInfo() {

View File

@ -1,7 +1,7 @@
<template>
<div class="stat-container" v-loading="loading">
<el-date-picker
v-model="queryParams.createDateRange"
v-model="queryParams.dateRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
@ -141,7 +141,7 @@ export default {
DatePickerOptions,
OrderStatus,
queryParams: {
createDateRange: [
dateRange: [
getLastDateStr(0),
getLastDateStr(0)
],
@ -187,12 +187,12 @@ export default {
}
},
created() {
Object.assign(this.queryParams, this.query);
this.getStat();
},
methods: {
getStat() {
this.loading = true;
Object.assign(this.queryParams, this.query);
getRevenueStat(this.queryParams).then(res => {
this.stat = res.data;
}).finally(() => {