From 6a13e3a547e0b266f18401f85d078add46fee828 Mon Sep 17 00:00:00 2001 From: lq Date: Wed, 17 Dec 2025 14:49:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=8A=E6=89=80=E5=92=8C=E8=8D=AF?= =?UTF-8?q?=E5=BA=97=E5=88=86=E5=BC=80=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/system/pharmacy/components/modal.vue | 14 ++++++++++++-- .../src/views/system/store/components/modal.vue | 4 ++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/views/system/pharmacy/components/modal.vue b/apps/web-antd/src/views/system/pharmacy/components/modal.vue index d4569053..44fa3698 100644 --- a/apps/web-antd/src/views/system/pharmacy/components/modal.vue +++ b/apps/web-antd/src/views/system/pharmacy/components/modal.vue @@ -72,8 +72,18 @@ const [Modal, modalApi] = useVbenModal({ // 设置表单值,并处理时间字段(转换为dayjs对象) formApi.setValues({ ...values, - start_time: dayjs(values.start_time, 'HH:mm'), - end_time: dayjs(values.end_time, 'HH:mm') + start_time: dayjs(values.start_time || '08:00', 'HH:mm'), + end_time: dayjs(values.end_time || '20:00', 'HH:mm') + }); + } else { + console.log({ + + start_time: dayjs('08:00', 'HH:mm'), + end_time: dayjs('20:00', 'HH:mm') + }) + formApi.setValues({ + start_time: dayjs('08:00', 'HH:mm'), + end_time: dayjs('20:00', 'HH:mm') }); } } diff --git a/apps/web-antd/src/views/system/store/components/modal.vue b/apps/web-antd/src/views/system/store/components/modal.vue index 7e61b693..a1e9170e 100644 --- a/apps/web-antd/src/views/system/store/components/modal.vue +++ b/apps/web-antd/src/views/system/store/components/modal.vue @@ -56,8 +56,8 @@ const [Modal, modalApi] = useVbenModal({ values.address = [values.province_id, values.city_id]; formApi.setValues({ ...values, - start_time: dayjs(values.start_time, 'HH:mm'), - end_time: dayjs(values.end_time, 'HH:mm') + start_time: dayjs(values.start_time || '08:00', 'HH:mm'), + end_time: dayjs(values.end_time || '20:00', 'HH:mm') }); } }