diff --git a/src/components/pages/EquipmentPage.tsx b/src/components/pages/EquipmentPage.tsx index 7dbf39e..9a9ab1d 100644 --- a/src/components/pages/EquipmentPage.tsx +++ b/src/components/pages/EquipmentPage.tsx @@ -653,10 +653,10 @@ export default function EquipmentPage() { const installDate = e.target.value setNewEquipment({ ...newEquipment, installDate }) - // 自动填充下一次检测时间(安装日期+1年) - if (installDate && !newEquipment.nextInspectionDate) { + // 自动更新下一次检测时间(安装日期+半年) + if (installDate) { const nextDate = new Date(installDate) - nextDate.setFullYear(nextDate.getFullYear() + 1) + nextDate.setMonth(nextDate.getMonth() + 6) const nextDateStr = nextDate.toISOString().split('T')[0] setNewEquipment(prev => ({ ...prev, nextInspectionDate: nextDateStr })) } @@ -869,10 +869,10 @@ export default function EquipmentPage() { const installDate = e.target.value setEditEquipment({ ...editEquipment, installDate }) - // 自动填充下一次检测时间(安装日期+1年) - if (installDate && !editEquipment.nextInspectionDate) { + // 自动更新下一次检测时间(安装日期+半年) + if (installDate) { const nextDate = new Date(installDate) - nextDate.setFullYear(nextDate.getFullYear() + 1) + nextDate.setMonth(nextDate.getMonth() + 6) const nextDateStr = nextDate.toISOString().split('T')[0] setEditEquipment(prev => ({ ...prev, nextInspectionDate: nextDateStr })) } diff --git a/src/components/pages/MallsPage.tsx b/src/components/pages/MallsPage.tsx index a30ef16..d142930 100644 --- a/src/components/pages/MallsPage.tsx +++ b/src/components/pages/MallsPage.tsx @@ -64,9 +64,11 @@ interface Mall { mallName: string addr: string province: string + provinceName?: string creator: string updator: string | null mallUser: string + mallUserName?: string status: string } @@ -823,7 +825,7 @@ export default function MallsPage() {