修复个人中心问题
This commit is contained in:
@@ -245,8 +245,11 @@ const filters = reactive({
|
||||
});
|
||||
const pagination = reactive({ page: 1, pageSize: 20, total: 0 });
|
||||
|
||||
/** 统计周期:all(全部)/ month / quarter / year / custom(自定义选区间),默认全部 */
|
||||
const statsPeriod = ref("all");
|
||||
/**
|
||||
* 统计周期:all(全部)/ month / quarter / year / custom(自定义选区间)。
|
||||
* 默认「本年」——列表与统计都按签订日期落在本年内归类,打开即看当年合同。
|
||||
*/
|
||||
const statsPeriod = ref("year");
|
||||
const statsRange = ref([]);
|
||||
|
||||
/** 列表页统计:后端按周期汇总(排除已作废),周期参数透传给 Stats */
|
||||
@@ -254,7 +257,7 @@ const stats = ref({ total: 0, total_amount: 0, total_cost: 0, total_profit: 0 })
|
||||
/** 卡片加载态:切换周期时给出可见的刷新反馈 */
|
||||
const statsLoading = ref(false);
|
||||
|
||||
/** 当前统计范围文案:与后端口径一致(合同有效期与所选周期重叠),便于对照卡片数字 */
|
||||
/** 当前统计范围文案:与后端口径一致(按「签订日期」落在所选周期内),便于对照卡片数字 */
|
||||
const statsScopeText = computed(() => {
|
||||
const pad = (n) => String(n).padStart(2, "0");
|
||||
const fmt = (d) => `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
||||
@@ -275,13 +278,13 @@ const statsScopeText = computed(() => {
|
||||
? `${statsRange.value[0]} ~ ${statsRange.value[1]}`
|
||||
: "自定义区间";
|
||||
default:
|
||||
return "全部时间(不限有效期)";
|
||||
return "全部时间(不限签订日期)";
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 周期参数:统计与列表共用,保证两者口径一致。
|
||||
* 「全部」不传周期参数——列表不按有效期过滤,避免有效期不在所选周期内的合同(如历史合同)被隐藏。
|
||||
* 「全部」不传周期参数——列表不按签订日期过滤,避免签订日期不在所选周期内的合同被隐藏。
|
||||
*/
|
||||
function periodParams() {
|
||||
if (statsPeriod.value === "all") return {};
|
||||
|
||||
Reference in New Issue
Block a user