youhua1
This commit is contained in:
@@ -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 }))
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-sm text-gray-600">省份:</span>
|
||||
<span className="text-sm font-medium">{deletingMall.province}</span>
|
||||
<span className="text-sm font-medium">{deletingMall.provinceName || deletingMall.province}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-sm text-gray-600">创建者:</span>
|
||||
@@ -899,9 +901,9 @@ export default function MallsPage() {
|
||||
<div className="text-left sm:text-right">
|
||||
<div className="text-xs sm:text-sm font-medium">创建者: {mall.creator}</div>
|
||||
<div className="text-xs text-gray-500 flex flex-wrap items-center sm:justify-end gap-1 mt-1">
|
||||
<span>省份: {mall.province}</span>
|
||||
<span>省份: {mall.provinceName || mall.province}</span>
|
||||
<span className="hidden sm:inline">|</span>
|
||||
<span>管理员: {mall.mallUser}</span>
|
||||
<span>管理员: {mall.mallUserName || mall.mallUser}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2 flex-shrink-0">
|
||||
|
||||
Reference in New Issue
Block a user