fix: 签署日期不能晚于当前日期
后端 /sign-date 和 /paper-sign 均增加校验,签署日期晚于今天则报错。 前端日期选择器增加 max 属性限制为今天。
This commit is contained in:
@@ -528,7 +528,7 @@ function PaperSignModal({ onClose, onSuccess, initialEmployeeId, initialScene, i
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<div>
|
||||
<Label>签署日期 *</Label>
|
||||
<Input type="date" value={form.signedAt} onChange={(e) => setForm({ ...form, signedAt: e.target.value })} />
|
||||
<Input type="date" max={new Date().toISOString().slice(0, 10)} value={form.signedAt} onChange={(e) => setForm({ ...form, signedAt: e.target.value })} />
|
||||
</div>
|
||||
<div>
|
||||
<Label>签署地点</Label>
|
||||
@@ -935,6 +935,7 @@ function PendingTab({ pendingList, loading, onRemind, remindLoading, remindData,
|
||||
<>
|
||||
<input
|
||||
type="date"
|
||||
max={new Date().toISOString().slice(0, 10)}
|
||||
value={signDateValue}
|
||||
onChange={(e) => setSignDateValue(e.target.value)}
|
||||
className="h-7 px-2 text-xs border rounded"
|
||||
|
||||
Reference in New Issue
Block a user