fix: 登记线下签署日期时同步创建 EsignRecord
登记签署日期后,签署记录 Tab 中也能看到这条记录。 创建一条 status=COMPLETED 的线下手签 EsignRecord, 避免已签合同在签署记录中无痕可查。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1133,7 +1133,9 @@ export default function Dashboard() {
|
||||
)}
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
{filteredTodos.slice((todoPage - 1) * todoPageSize, todoPage * todoPageSize).map((todo) => (
|
||||
{filteredTodos.slice((todoPage - 1) * todoPageSize, todoPage * todoPageSize).map((todo) => {
|
||||
const hasValidUrl = todo.actionUrl && todo.actionUrl !== '/' && todo.actionUrl !== ''
|
||||
return (
|
||||
<div
|
||||
key={todo.id}
|
||||
className="flex items-center justify-between px-2.5 py-2 rounded-md hover:bg-gray-50 transition-colors"
|
||||
@@ -1145,40 +1147,71 @@ export default function Dashboard() {
|
||||
onChange={() => toggleSelect(todo.id)}
|
||||
className="w-4 h-4 rounded border-gray-300 text-primary focus:ring-primary"
|
||||
/>
|
||||
<Link to={todo.actionUrl} className="flex items-center gap-2.5 flex-1">
|
||||
<TodoIcon type={todo.type} level={todo.level} />
|
||||
<div className="flex flex-col">
|
||||
<div className="flex items-center gap-1.5 flex-wrap">
|
||||
{todo.employeeName && (
|
||||
<span className="text-xs font-bold text-gray-900">{todo.employeeName}</span>
|
||||
)}
|
||||
{todo.employeeDepartment && (
|
||||
<span className="text-xs text-gray-400">{todo.employeeDepartment}</span>
|
||||
)}
|
||||
<span className="text-xs text-gray-700">{todo.title}</span>
|
||||
{todo.priority && priorityConfig[todo.priority] && (
|
||||
<span className={`px-1 py-0.5 rounded text-xs font-medium ${priorityConfig[todo.priority].bg} ${priorityConfig[todo.priority].color}`}>
|
||||
{priorityConfig[todo.priority].label}
|
||||
</span>
|
||||
)}
|
||||
{todo.estimatedLoss > 0 && (
|
||||
<span className="text-xs text-red-600 font-medium">损失 {fmt(todo.estimatedLoss)}</span>
|
||||
)}
|
||||
{todo.daysUntilDeadline !== null && todo.daysUntilDeadline <= 3 && (
|
||||
<span className="text-xs text-red-600">{todo.daysUntilDeadline <= 0 ? '已逾期' : `${todo.daysUntilDeadline}天`}</span>
|
||||
)}
|
||||
{hasValidUrl ? (
|
||||
<Link to={todo.actionUrl} className="flex items-center gap-2.5 flex-1">
|
||||
<TodoIcon type={todo.type} level={todo.level} />
|
||||
<div className="flex flex-col">
|
||||
<div className="flex items-center gap-1.5 flex-wrap">
|
||||
{todo.employeeName && (
|
||||
<span className="text-xs font-bold text-gray-900">{todo.employeeName}</span>
|
||||
)}
|
||||
{todo.employeeDepartment && (
|
||||
<span className="text-xs text-gray-400">{todo.employeeDepartment}</span>
|
||||
)}
|
||||
<span className="text-xs text-gray-700">{todo.title}</span>
|
||||
{todo.priority && priorityConfig[todo.priority] && (
|
||||
<span className={`px-1 py-0.5 rounded text-xs font-medium ${priorityConfig[todo.priority].bg} ${priorityConfig[todo.priority].color}`}>
|
||||
{priorityConfig[todo.priority].label}
|
||||
</span>
|
||||
)}
|
||||
{todo.estimatedLoss > 0 && (
|
||||
<span className="text-xs text-red-600 font-medium">损失 {fmt(todo.estimatedLoss)}</span>
|
||||
)}
|
||||
{todo.daysUntilDeadline !== null && todo.daysUntilDeadline <= 3 && (
|
||||
<span className="text-xs text-red-600">{todo.daysUntilDeadline <= 0 ? '已逾期' : `${todo.daysUntilDeadline}天`}</span>
|
||||
)}
|
||||
</div>
|
||||
<span className="text-xs text-gray-500 flex items-center gap-1"><Clock className="w-3 h-3" />{todo.description}</span>
|
||||
</div>
|
||||
</Link>
|
||||
) : (
|
||||
<div className="flex items-center gap-2.5 flex-1">
|
||||
<TodoIcon type={todo.type} level={todo.level} />
|
||||
<div className="flex flex-col">
|
||||
<div className="flex items-center gap-1.5 flex-wrap">
|
||||
{todo.employeeName && (
|
||||
<span className="text-xs font-bold text-gray-900">{todo.employeeName}</span>
|
||||
)}
|
||||
{todo.employeeDepartment && (
|
||||
<span className="text-xs text-gray-400">{todo.employeeDepartment}</span>
|
||||
)}
|
||||
<span className="text-xs text-gray-700">{todo.title}</span>
|
||||
{todo.priority && priorityConfig[todo.priority] && (
|
||||
<span className={`px-1 py-0.5 rounded text-xs font-medium ${priorityConfig[todo.priority].bg} ${priorityConfig[todo.priority].color}`}>
|
||||
{priorityConfig[todo.priority].label}
|
||||
</span>
|
||||
)}
|
||||
{todo.estimatedLoss > 0 && (
|
||||
<span className="text-xs text-red-600 font-medium">损失 {fmt(todo.estimatedLoss)}</span>
|
||||
)}
|
||||
{todo.daysUntilDeadline !== null && todo.daysUntilDeadline <= 3 && (
|
||||
<span className="text-xs text-red-600">{todo.daysUntilDeadline <= 0 ? '已逾期' : `${todo.daysUntilDeadline}天`}</span>
|
||||
)}
|
||||
</div>
|
||||
<span className="text-xs text-gray-500 flex items-center gap-1"><Clock className="w-3 h-3" />{todo.description}</span>
|
||||
</div>
|
||||
<span className="text-xs text-gray-500 flex items-center gap-1"><Clock className="w-3 h-3" />{todo.description}</span>
|
||||
</div>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex items-center gap-1">
|
||||
<Link
|
||||
to={todo.actionUrl}
|
||||
className="px-2 py-1 rounded text-xs font-medium bg-primary/10 text-primary hover:bg-primary/20 transition-colors whitespace-nowrap"
|
||||
>
|
||||
立刻办理 →
|
||||
</Link>
|
||||
{hasValidUrl && (
|
||||
<Link
|
||||
to={todo.actionUrl}
|
||||
className="px-2 py-1 rounded text-xs font-medium bg-primary/10 text-primary hover:bg-primary/20 transition-colors whitespace-nowrap"
|
||||
>
|
||||
立刻办理 →
|
||||
</Link>
|
||||
)}
|
||||
<button
|
||||
onClick={() => resolveMutation.mutate(todo.id)}
|
||||
disabled={resolveMutation.isPending}
|
||||
@@ -1197,7 +1230,7 @@ export default function Dashboard() {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
)})}
|
||||
</div>
|
||||
<Pagination page={todoPage} pageSize={todoPageSize} total={filteredTodos.length} onPageChange={setTodoPage} onPageSizeChange={() => setTodoPage(1)} />
|
||||
</>
|
||||
|
||||
@@ -861,6 +861,7 @@ export default function Roster() {
|
||||
unsigned_over_30: 'bg-red-50 text-danger',
|
||||
unsigned: 'bg-yellow-50 text-yellow-700',
|
||||
expiring: 'bg-yellow-50 text-yellow-700',
|
||||
pending_sign: 'bg-yellow-50 text-yellow-700',
|
||||
active: 'bg-green-50 text-safe',
|
||||
unfixed: 'bg-green-50 text-safe',
|
||||
}
|
||||
@@ -870,6 +871,7 @@ export default function Roster() {
|
||||
unsigned_over_30: '未签署(超30天)',
|
||||
unsigned: '未签署',
|
||||
expiring: '即将到期',
|
||||
pending_sign: '待签署',
|
||||
active: '正常',
|
||||
unfixed: '正常',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user