This commit is contained in:
2026-01-16 05:02:55 +08:00
parent 15d5dc5255
commit 578189d316

View File

@@ -1,5 +1,45 @@
<template> <template>
<view class="page-content"> <view class="page-content">
<nut-sticky>
<view class="top-bar">
<view class="top-inner-price">
<view style="display: flex;">{{day}}日营业额
<view style="color: #fa2c19;font-size: 26rpx;">
¥2000.00
</view>
</view>
<view style="display: flex;">{{formatDate(day)}}月营业额
<view style="color: #fa2c19;font-size: 26rpx;">
¥2000.00
</view>
</view>
<!-- <view style="display: flex;">总计
<view style="color: #fa2c19;font-size: 26rpx;">
¥2000.00
</view>
</view> -->
</view>
<view class="top-inner-price">
<view style="display: flex;">优惠
<view style="color: #fa2c19;font-size: 26rpx;">
¥2000.00
</view>
</view>
<view style="display: flex;">总计
<view style="color: #fa2c19;font-size: 26rpx;">
¥2000.00
</view>
</view>
<view style="display: flex;">总计
<view style="color: #fa2c19;font-size: 26rpx;">
¥2000.00
</view>
</view>
</view>
</view>
</nut-sticky>
<z-paging ref="paging" :fixed="false" style="height: 88vh;" class="order-list" v-model="dataList" <z-paging ref="paging" :fixed="false" style="height: 88vh;" class="order-list" v-model="dataList"
@@ -106,13 +146,19 @@
import { import {
fetchDayOrderList, fetchDayOrderList,
} from '@/api/index'; } from '@/api/index';
const date = ref(''); const day = ref('');
onLoad((options) => { onLoad((options) => {
date.value = options.date day.value = options.date
console.log(date.value); console.log(day.value);
}) })
// 格式化日期为 Y-m 格式
const formatDate = (date) => {
const d = new Date(date)
const year = d.getFullYear(); // 获取年份
const month = (d.getMonth() + 1).toString().padStart(2, '0'); // 获取月份并确保是两位数
return `${year}-${month}`;
};
// 订单列表数据 // 订单列表数据
const dataList = ref([]); const dataList = ref([]);
@@ -123,11 +169,11 @@
// 获取订单列表 // 获取订单列表
const queryList = (pageNo = 1, pageSize = 10) => { const queryList = (pageNo = 1, pageSize = 10) => {
console.log(date.value); console.log(day.value);
const params = { const params = {
page: pageNo, page: pageNo,
pageSize: 10, pageSize: 10,
date: date.value, date: day.value,
} }
fetchDayOrderList(params).then(res => { fetchDayOrderList(params).then(res => {
console.log(res); console.log(res);
@@ -161,42 +207,58 @@
background-color: #f2f3f5; background-color: #f2f3f5;
} }
.title-list { .top-bar {
display: flex; background: #fff;
justify-content: space-around;
align-items: center; align-items: center;
width: 100%; text-align: center;
padding: 20rpx 60rpx;
}
.title-item { .top-inner-price {
display: flex; display: flex;
justify-content: space-around; flex-direction: column;
justify-content: space-evenly;
padding: 20rpx;
font-size: 26rpx;
align-items: center; align-items: center;
position: relative;
} }
.tabs-active { // .title-list {
font-weight: bold; // display: flex;
color: $tabs-titles-item-active-color; // justify-content: space-around;
opacity: $tabs-titles-item-line-opacity; // align-items: center;
transition: width 0.3s ease; // width: 100%;
.item__line { // .title-item {
position: absolute; // display: flex;
bottom: -10%; // justify-content: space-around;
left: 50%; // align-items: center;
overflow: hidden; // position: relative;
content: ' '; // }
border-radius: $tabs-titles-item-line-border-radius;
opacity: $tabs-titles-item-line-opacity; // .tabs-active {
transition: width 0.3s ease; // font-weight: bold;
transform: translate(-50%, 0); // color: $tabs-titles-item-active-color;
width: $tabs-horizontal-titles-item-active-line-width; // opacity: $tabs-titles-item-line-opacity;
height: 3px; // transition: width 0.3s ease;
content: ' ';
background: $tabs-horizontal-tab-line-color; // .item__line {
} // position: absolute;
} // bottom: -10%;
} // left: 50%;
// overflow: hidden;
// content: ' ';
// border-radius: $tabs-titles-item-line-border-radius;
// opacity: $tabs-titles-item-line-opacity;
// transition: width 0.3s ease;
// transform: translate(-50%, 0);
// width: $tabs-horizontal-titles-item-active-line-width;
// height: 3px;
// content: ' ';
// background: $tabs-horizontal-tab-line-color;
// }
// }
// }
.order-list { .order-list {