'workbench', 'home', 'new_dir', 'edit_dir', 'archive_form', 'archive_detail', 'directories' => 'list', 'reminders', 'pending_updates' => 'tasks', 'quick_queries', 'query_totals', 'query_payable_interest', 'query_external_guarantee', 'repayment_history' => 'query', 'interest_calculator', 'acceptance_discount_calculator' => 'tools', 'delete_approvals' => 'approvals', 'users' => 'users', 'profile' => 'profile', default => 'list', }; } function fusionStatusPill(string $status): string { $map = [ '履行中' => 'ok', '已还款' => 'ok', '已通过' => 'ok', '待更新' => 'pending', '待处理' => 'pending', '即将到期' => 'due', '未还' => 'due', '待审批' => 'due', '逾期中' => 'over', '已逾期' => 'over', '逾期' => 'over', '已完成' => 'done', '已延期' => 'done', '已驳回' => 'over', '已停用' => 'done', ]; $cls = $map[$status] ?? 'pending'; return '' . e($status) . ''; } function fusionPendingApprovalCount(): int { if (!function_exists('loadDeleteApprovals')) { return 0; } $n = 0; foreach (loadDeleteApprovals() as $ap) { if (($ap['status'] ?? '') === 'pending') { $n++; } } return $n; } function fusionQueryTabs(string $current): void { $tabs = [ 'query_totals' => '总金额', 'query_payable_interest' => '应付本息', 'query_external_guarantee' => '对外担保', 'repayment_history' => '历史还款', ]; echo '
'; foreach ($tabs as $act => $label) { $on = $current === $act; echo '' . e($label) . ''; } echo '
'; } function fusionToolsTabs(string $current): void { $tabs = [ 'interest_calculator' => '利息计算器', 'acceptance_discount_calculator' => '承兑贴现计算器', ]; echo '
'; foreach ($tabs as $act => $label) { $on = $current === $act; echo '' . e($label) . ''; } echo '
'; } function fusionRestrictedCard(string $title = '需要管理员权限'): void { echo '

' . e($title) . '

当前账号为普通用户,该功能仅管理员可操作。如需开通,请联系系统管理员。

返回工作台

'; } function fusionQuickDock(bool $isAdmin): void { $ico = static function (string $p): string { return ''; }; $items = []; if ($isAdmin) { $items[] = ['新建档案', '五步录入 · 自动归档', 'index.php?action=archive_form', '']; $items[] = ['导入档案', 'xlsx / csv 模板批量导入', '#', '', 'data-open-modal="import"']; } $items[] = ['统计查询', '总金额 / 应付本息 / 担保 / 历史', 'index.php?action=query_totals', '']; $items[] = ['利息计算', '单利 · 360 / 365 天基准', 'index.php?action=interest_calculator', '']; $items[] = ['承兑贴现', '异地加天 · 节假日顺延', 'index.php?action=acceptance_discount_calculator', '']; echo '
'; foreach ($items as $i => $it) { $extra = $it[4] ?? ''; $tag = $extra !== '' ? 'button type="button"' : 'a href="' . e($it[2]) . '"'; $close = $extra !== '' ? 'button' : 'a'; echo '<'.$tag.' class="qd-item stagger-in" style="animation-delay:' . ($i * 45) . 'ms" ' . $extra . '>'; echo '' . $ico($it[3]) . ''; echo '' . e($it[0]) . ''; echo '' . e($it[1]) . ''; echo ''; } echo '
'; } function pageHeader(array $me): void { $flash = getFlash(); $action = (string)($_GET['action'] ?? 'dashboard'); if ($action === 'home' && isset($_GET['view']) && $_GET['view'] === 'dirs') { $action = 'directories'; } $navKey = fusionNavKey($action); $isAdmin = (($me['role'] ?? '') === 'admin'); $taskBadge = (int)($GLOBALS['fusion_task_badge'] ?? 0); $approvalBadge = $isAdmin ? fusionPendingApprovalCount() : 0; $who = maskUsername((string)$me['username']); $role = roleLabel((string)$me['role']); $weekdays = ['日', '一', '二', '三', '四', '五', '六']; $todayLabel = date('Y-m-d') . ' 星期' . $weekdays[(int)date('w')]; $nav = [ ['group', '档案'], ['workbench', '工作台', '台', 'index.php?action=dashboard', false, 0], ['list', '档案库', '库', 'index.php?action=home', false, 0], ['tasks', '任务中心', '任', 'index.php?action=reminders&type=due', false, $taskBadge], ['group', '分析'], ['query', '统计查询', '查', 'index.php?action=query_totals', false, 0], ['tools', '计算工具', '算', 'index.php?action=interest_calculator', false, 0], ['group', '管理', true], ['approvals', '删除审批', '审', 'index.php?action=delete_approvals', true, $approvalBadge], ['users', '用户管理', '用', 'index.php?action=users', true, 0], ['group', '账户'], ['profile', '个人设置', '我', 'index.php?action=profile', false, 0], ]; ?> 金牛集团贷款档案管理系统
'; continue; } $active = $navKey === $n[0] ? ' data-active' : ''; $badge = (int)($n[5] ?? 0); echo '' . e((string)$n[1]); if ($badge > 0) { echo '' . $badge . ''; } echo ''; endforeach; ?>
金牛集团贷款档案管理系统 - 登录