更新
This commit is contained in:
@@ -35,7 +35,8 @@ onMounted(() => {
|
|||||||
@refresh="onSearch">
|
@refresh="onSearch">
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<div style="display: inline-flex;align-items: center;">
|
<div style="display: inline-flex;align-items: center;">
|
||||||
<div style="margin-right: 10px;font-size: 16px;">消费金额合计:{{ totalData.total_coin_num }}</div>
|
<div style="margin-right: 10px;font-size: 16px;">消费金额合计:<span style="color: red;">{{
|
||||||
|
totalData.total_coin_num }}</span></div>
|
||||||
<el-button type="primary" @click="exportExcel">
|
<el-button type="primary" @click="exportExcel">
|
||||||
导出
|
导出
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|||||||
@@ -23,13 +23,34 @@ const searchLabel = ref([
|
|||||||
]);
|
]);
|
||||||
const props = defineProps(["roomId"]);
|
const props = defineProps(["roomId"]);
|
||||||
const typeList = ref([])
|
const typeList = ref([])
|
||||||
|
const formatDate = (date) => {
|
||||||
|
// 获取年份
|
||||||
|
const year = date.getFullYear();
|
||||||
|
// 获取月份,并将其转为两位数格式
|
||||||
|
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||||
|
// 获取日期,并将其转为两位数格式
|
||||||
|
const day = String(date.getDate()).padStart(2, '0');
|
||||||
|
// 返回格式化后的日期字符串
|
||||||
|
return `${year}-${month}-${day} 00:00:00`;
|
||||||
|
}
|
||||||
|
const getTodayAndWeekAgo = () => {
|
||||||
|
const today = new Date(); // 获取今天的日期对象
|
||||||
|
const weekAgo = new Date(); // 获取当前日期对象
|
||||||
|
weekAgo.setDate(today.getDate() - 7); // 将日期设置为一周前
|
||||||
|
|
||||||
|
// 返回一个包含今天和一周前日期的对象,并将日期格式化
|
||||||
|
return {
|
||||||
|
today: formatDate(today),
|
||||||
|
weekAgo: formatDate(weekAgo)
|
||||||
|
};
|
||||||
|
}
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
gift_bag_id: "",
|
gift_bag_id: "",
|
||||||
user_id: "",
|
user_id: "",
|
||||||
gift_id: "",
|
gift_id: "",
|
||||||
periods: "",
|
periods: "",
|
||||||
stime: "",
|
stime: getTodayAndWeekAgo().weekAgo,
|
||||||
etime: ""
|
etime: getTodayAndWeekAgo().today
|
||||||
});
|
});
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
total: 0,
|
total: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user