From fec9ff3a25a44ccc103ddd23436eb32416a8f277 Mon Sep 17 00:00:00 2001 From: zhousq Date: Wed, 22 May 2024 17:25:18 +0800 Subject: [PATCH] =?UTF-8?q?2024-05-22=20=E8=8A=82=E5=81=87=E6=97=A5?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84bug=E4=BF=AE=E5=A4=8D=EF=BC=9B?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=8E=86=E7=9A=84bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mes/holiday/holiday.data.ts | 20 ++++++++--- src/views/mes/workcalendar/index.vue | 48 +++++++++++++++++++-------- 2 files changed, 50 insertions(+), 18 deletions(-) diff --git a/src/views/mes/holiday/holiday.data.ts b/src/views/mes/holiday/holiday.data.ts index 02bdde572..55096dbd7 100644 --- a/src/views/mes/holiday/holiday.data.ts +++ b/src/views/mes/holiday/holiday.data.ts @@ -1,8 +1,17 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter } from '@/utils/formatTime' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' // 表单校验 export const HolidayRules = reactive({ + holidayName: [ + { required: true, message: '请输入节日名称', trigger: 'blur' } + ], + holidayType: [ + { required: true, message: '请输入节日类型', trigger: 'blur' } + ], + holidayDate: [ + { required: true, message: '请输入节日日期', trigger: 'blur' } + ], }) export const Holiday = useCrudSchemas(reactive([ @@ -10,7 +19,9 @@ export const Holiday = useCrudSchemas(reactive([ label: '主键', field: 'id', sort: 'custom', - isForm: false, + isSearch: false, + isTable:false, + isForm:false }, @@ -56,13 +67,13 @@ export const Holiday = useCrudSchemas(reactive([ label: '节日日期', field: 'holidayDate', sort: 'custom', - formatter: dateFormatter, + formatter: dateFormatter2, isSearch: true, search: { component: 'DatePicker', componentProps: { type: 'date', - valueFormat: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD 00:00:00', } }, form: { @@ -72,6 +83,7 @@ export const Holiday = useCrudSchemas(reactive([ valueFormat: 'x' } }, + }, { label: '状态', diff --git a/src/views/mes/workcalendar/index.vue b/src/views/mes/workcalendar/index.vue index 16c054af5..adda99bc1 100644 --- a/src/views/mes/workcalendar/index.vue +++ b/src/views/mes/workcalendar/index.vue @@ -59,7 +59,7 @@
- +