更新
This commit is contained in:
@@ -35,7 +35,8 @@ onMounted(() => {
|
||||
@refresh="onSearch">
|
||||
<template #buttons>
|
||||
<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>
|
||||
|
||||
@@ -23,13 +23,34 @@ const searchLabel = ref([
|
||||
]);
|
||||
const props = defineProps(["roomId"]);
|
||||
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({
|
||||
gift_bag_id: "",
|
||||
user_id: "",
|
||||
gift_id: "",
|
||||
periods: "",
|
||||
stime: "",
|
||||
etime: ""
|
||||
stime: getTodayAndWeekAgo().weekAgo,
|
||||
etime: getTodayAndWeekAgo().today
|
||||
});
|
||||
const pagination = ref({
|
||||
total: 0,
|
||||
|
||||
Reference in New Issue
Block a user