From 8dee11802ecce412068851af1f7a44dbe27cf412 Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Tue, 15 Jul 2025 10:58:17 +0800 Subject: [PATCH] =?UTF-8?q?=20fix:=20=E4=BF=AE=E5=A4=8D=E4=BF=9D=E6=B4=81?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=BB=93=E6=9D=9F=E6=97=B6=E9=97=B4=E8=83=BD?= =?UTF-8?q?=E6=97=A9=E4=BA=8E=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/property/clean/cleanOrders/data.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts index 2a37486f..78f6337f 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts +++ b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts @@ -4,7 +4,7 @@ import type { VxeGridProps } from '#/adapter/vxe-table'; import { resident_unitList } from '#/api/property/resident/unit'; import { useCleanStore } from '#/store'; import type { FormSchema } from '../../../../../../../packages/@core/ui-kit/form-ui/src/types'; - +import dayjs from 'dayjs'; const cleanStore = useCleanStore(); export const querySchema: (areaList: any[]) => FormSchema[] = (areaList) => [ @@ -163,12 +163,21 @@ export const modalSchema: FormSchemaGetter = () => [ label: '结束时间', fieldName: 'endTime', component: 'DatePicker', - componentProps: { + componentProps: (values) => ({ showTime: true, format: 'YYYY-MM-DD HH:mm:ss', - placeholder: '请选择结束时间', - }, + placeholder: !values.starTime?'请先选择开始时间':`请选择结束时间(结束时间不能早于开始时间)`, + disabled: !values.starTime, // 没选开始时间时禁用 + disabledDate: (current:any) => { + if (!values.starTime) return false; + // 只允许选择大于等于开始时间的日期 + return current && current < dayjs(values.starTime).startOf('second'); + }, + }), rules: 'required', + dependencies: { + triggerFields: ['starTime'], + }, }, { label: '申请人',