feat: 社保/公积金缴纳截止日改为按账户配置
- SocialAccount 模型增加 paymentDay 字段 - detectMonthlyTasks 社保/公积金改为按账户 paymentDay 生成提醒 - 账户表单增加缴纳截止日输入 - 设置页面移除社保/公积金缴纳日,保留发薪日和个税日
This commit is contained in:
@@ -866,15 +866,11 @@ function NotificationSettings() {
|
||||
</label>
|
||||
<div className="border-t pt-3 space-y-3">
|
||||
<div className="text-xs font-medium">月度事务提醒</div>
|
||||
<div className="text-xs text-gray-500">设置每月截止日,到期后自动生成待办提醒</div>
|
||||
<div className="grid grid-cols-3 gap-3">
|
||||
<div className="text-xs text-gray-500">设置每月截止日,到期后自动生成待办提醒。社保/公积金缴纳日请在对应账户中设置。</div>
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div>
|
||||
<Label>社保缴纳日</Label>
|
||||
<Input type="number" min={1} max={28} value={form.socialInsDay ?? 15} onChange={(e) => setForm({ ...form, socialInsDay: Number(e.target.value) })} />
|
||||
</div>
|
||||
<div>
|
||||
<Label>公积金缴纳日</Label>
|
||||
<Input type="number" min={1} max={28} value={form.housingFundDay ?? 15} onChange={(e) => setForm({ ...form, housingFundDay: Number(e.target.value) })} />
|
||||
<Label>发薪日</Label>
|
||||
<Input type="number" min={1} max={28} value={form.payrollDay ?? 10} onChange={(e) => setForm({ ...form, payrollDay: Number(e.target.value) })} />
|
||||
</div>
|
||||
<div>
|
||||
<Label>个税申报日</Label>
|
||||
|
||||
@@ -26,6 +26,7 @@ export function AccountFormModal({ type, account, onClose, onSubmit, saving }: {
|
||||
const [bankAccount, setBankAccount] = useState(account?.bankAccount || '')
|
||||
const [accountTypeVal, setAccountTypeVal] = useState(account?.accountType || 'BASIC')
|
||||
const [isDefault, setIsDefault] = useState(account?.isDefault || false)
|
||||
const [paymentDay, setPaymentDay] = useState(account?.paymentDay || '')
|
||||
const [remark, setRemark] = useState(account?.remark || '')
|
||||
const [selectedDeptIds, setSelectedDeptIds] = useState<string[]>([])
|
||||
|
||||
@@ -91,6 +92,11 @@ export function AccountFormModal({ type, account, onClose, onSubmit, saving }: {
|
||||
<Label>缴费主体统一社会信用代码</Label>
|
||||
<Input value={orgCode} onChange={(e) => setOrgCode(e.target.value)} />
|
||||
</div>
|
||||
<div>
|
||||
<Label>每月缴纳截止日</Label>
|
||||
<Input type="number" min={1} max={28} value={paymentDay} onChange={(e) => setPaymentDay(e.target.value)} placeholder="如:15(每月15日前完成缴纳)" />
|
||||
<p className="text-xs text-gray-400 mt-1">设置后,工作台将按此日期生成缴纳提醒</p>
|
||||
</div>
|
||||
<div>
|
||||
<Label>备注</Label>
|
||||
<Input value={remark} onChange={(e) => setRemark(e.target.value)} />
|
||||
@@ -127,7 +133,7 @@ export function AccountFormModal({ type, account, onClose, onSubmit, saving }: {
|
||||
<Button variant="secondary" onClick={onClose}>取消</Button>
|
||||
<Button
|
||||
disabled={!name || !city || saving}
|
||||
onClick={() => onSubmit({ name, city, accountNo, orgName, orgCode, bankName, bankAccount, accountType: accountTypeVal, isDefault, remark }, selectedDeptIds)}
|
||||
onClick={() => onSubmit({ name, city, accountNo, orgName, orgCode, bankName, bankAccount, accountType: accountTypeVal, paymentDay: paymentDay ? Number(paymentDay) : undefined, isDefault, remark }, selectedDeptIds)}
|
||||
>
|
||||
{saving ? '保存中...' : '保存'}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user