From eadd7a685ce5de65d065a4d7246fd170e97c9c76 Mon Sep 17 00:00:00 2001 From: Weiming Date: Thu, 3 Dec 2026 16:45:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=B7=B2=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9A=84=E5=8E=9F=E5=9E=8B=E8=B0=83=E6=95=B4=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +- src/api/payees.ts | 12 +- src/api/reimbursement.ts | 161 ++- src/api/travelApplications.ts | 2 + src/assets/ui-system.css | 922 ++++++++++++++++++ src/authorization/pageAccess.ts | 2 +- src/components.d.ts | 7 + src/components/EmployeeAdvancedFilter.vue | 12 +- src/components/KingdeeAccountBindingPanel.vue | 11 +- src/components/KingdeeSyncConfigPanel.vue | 18 +- src/components/ReimbursementForm.vue | 132 ++- src/components/SearchableSelect.vue | 515 ++++++++++ src/components/SearchableSelectLayer.vue | 291 ++++++ .../RoleNavigationPermissionEditor.vue | 2 +- .../permissions/RolePermissionEditor.vue | 2 +- .../reimbursement/FeishuFormFields.vue | 50 +- src/finance/financeUi.ts | 5 +- src/main.ts | 3 + src/modules/reimbursementFormErrors.ts | 2 +- src/navigation/systemSettings.ts | 31 +- src/router/index.ts | 17 +- src/store/workbench.ts | 77 +- src/views/ApplicationDetail.vue | 75 +- src/views/Applications.vue | 270 ++--- src/views/ConfigurationPlaceholder.vue | 2 +- src/views/Dashboard.vue | 112 +-- src/views/ExpenseTypes.vue | 32 +- src/views/FinanceReceipt.vue | 152 +-- src/views/IntegrationConfig.vue | 6 +- src/views/Layout.vue | 42 +- src/views/Login.vue | 2 +- src/views/Logs.vue | 21 +- src/views/Payees.vue | 88 +- src/views/Payments.vue | 174 +++- src/views/ScheduledTasks.vue | 30 +- src/views/Sources.vue | 6 +- src/views/Users.vue | 54 +- .../business-config/BudgetManagement.vue | 151 ++- src/views/business-config/CostCenters.vue | 16 +- src/views/business-config/Currencies.vue | 4 +- src/views/business-config/LegalEntities.vue | 12 +- src/views/business-config/PaymentAccounts.vue | 24 +- src/views/business-config/PaymentMethods.vue | 6 +- 43 files changed, 2743 insertions(+), 815 deletions(-) create mode 100644 src/assets/ui-system.css create mode 100644 src/components.d.ts create mode 100644 src/components/SearchableSelect.vue create mode 100644 src/components/SearchableSelectLayer.vue diff --git a/.gitignore b/.gitignore index 27505c3..ab292c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,11 @@ # dependencies node_modules/ -# generated build output (dist is intentionally versioned for deployment) +# generated build output build/ .next/ out/ -!dist/ -!dist/** +dist/ # local env files .env diff --git a/src/api/payees.ts b/src/api/payees.ts index c0fa982..b6a73a1 100644 --- a/src/api/payees.ts +++ b/src/api/payees.ts @@ -1,7 +1,8 @@ import request from './request' export type PayeeAccountStatus = 'ACTIVE' | 'INACTIVE' -export type PayeeSubjectType = 'EMPLOYEE' | 'SUPPLIER' +export type PayeeSubjectType = 'EMPLOYEE' | 'SUPPLIER' | 'GOVERNMENT' +export type PayeeRelationType = 'INTERNAL' | 'EXTERNAL' export interface PayeeAccount { id: number @@ -43,8 +44,13 @@ export interface PayeeAccountPayload { export interface PayeeSubject { id: number + payeeCode?: string | null payeeType: PayeeSubjectType displayName: string + relationType: PayeeRelationType + countryRegion: string + identityType?: string | null + identityValueMaintained?: boolean employeeOpenId?: string | null identityNumber?: string | null supplierCreditCode?: string | null @@ -56,6 +62,10 @@ export interface PayeeSubject { export interface PayeeSubjectPayload { payeeType: PayeeSubjectType + relationType?: PayeeRelationType + countryRegion?: string + identityType?: string + identityValue?: string employeeOpenId?: string | null identityNumber?: string | null displayName: string diff --git a/src/api/reimbursement.ts b/src/api/reimbursement.ts index a3ac5f5..e04c735 100644 --- a/src/api/reimbursement.ts +++ b/src/api/reimbursement.ts @@ -8,19 +8,42 @@ export interface PageResponse { pageSize: number } -export interface ReimApplicationSummary { +export interface PaymentApplicationFacts { + paymentScenarioId?: number + requestedAmount?: number + paymentScenario?: string + expenseItemCategory?: string + payerEntityName?: string + costCenterName?: string + currencyCode?: string + paymentReason?: string + plannedPaymentDate?: string + linkedTravelApplicationId?: number + approvedAmount?: number + actualPaymentAmount?: number +} + +export interface ReimApplicationSummary extends PaymentApplicationFacts { id: number | string applicationNo: string title: string applicantName: string departmentName: string - expenseTypeName: string - category: string - totalAmount: number + paymentScenario: string + expenseItemCategory: string + requestedAmount: number + /** @deprecated 仅用于接收旧接口数据。 */ + expenseTypeName?: string + /** @deprecated 仅用于接收旧接口数据。 */ + category?: string + /** @deprecated 仅用于接收旧接口数据。 */ + totalAmount?: number applicationStatus: string approvalStatus: string currentApprovalNode: string - receiptStatus: string + financeCheckStatus: string + /** @deprecated 仅用于接收旧接口数据。 */ + receiptStatus?: string paymentStatus: string budgetStatus: string submitTime: string @@ -30,26 +53,38 @@ export interface ReimApplicationSummary { remainingAmount?: number } -export interface ReimApplicationDetail { +export interface ReimApplicationDetail extends PaymentApplicationFacts { id: number | string applicationNo: string title: string applicantName: string applicantEmployeeNo: string departmentName: string - expenseTypeId: number - expenseTypeName: string - category: string - totalAmount: number + paymentScenarioId: number + paymentScenario: string + expenseItemCategory: string + requestedAmount: number + /** @deprecated 仅用于接收旧接口数据。 */ + expenseTypeId?: number + /** @deprecated 仅用于接收旧接口数据。 */ + expenseTypeName?: string + /** @deprecated 仅用于接收旧接口数据。 */ + category?: string + /** @deprecated 仅用于接收旧接口数据。 */ + totalAmount?: number description: string applicationStatus: string approvalStatus: string currentApprovalNode: string - receiptStatus: string + financeCheckStatus: string + /** @deprecated 仅用于接收旧接口数据。 */ + receiptStatus?: string paymentStatus: string budgetStatus: string sourceDocNo: string - sourceStatus: string + syncStatus: string + /** @deprecated 仅用于接收旧接口数据。 */ + sourceStatus?: string payeeName: string payeeBankId: number bankName: string @@ -106,10 +141,11 @@ export interface ReimbursementFormDefinition { export interface ExpenseTypeMetadata { id: number - code: string - name: string - category: string - description: string + scenarioCode: string + scenarioName: string + scenarioGroup: string + status?: string + description?: string } export interface ReimbursementFormSnapshot { @@ -123,7 +159,9 @@ export interface ExpenseItem { id?: number | string seqNo?: number expenseDate: string - category: string + expenseItemName: string + /** @deprecated 仅用于接收旧接口数据。 */ + category?: string description?: string amount: number attachmentIds: Array @@ -138,15 +176,23 @@ export interface ReimbursementFormAttachment { fileSize: number } -export interface CreateApplicationRequest { +export interface CreateApplicationRequest extends PaymentApplicationFacts { title: string - expenseTypeId: number - category: string - totalAmount: number + paymentScenarioId: number + expenseItemCategory: string + requestedAmount: number description: string payeeName: string payeeBankId: number - items: ExpenseItem[] + expenseItems: ExpenseItem[] + /** @deprecated 仅用于旧客户端过渡。 */ + expenseTypeId?: number + /** @deprecated 仅用于旧客户端过渡。 */ + category?: string + /** @deprecated 仅用于旧客户端过渡。 */ + totalAmount?: number + /** @deprecated 仅用于旧客户端过渡。 */ + items?: ExpenseItem[] formFingerprint?: string formValues?: Record } @@ -210,7 +256,16 @@ export interface ApprovalRecord { actionTime: string } -export interface PaymentRecord { +export interface ExternalPaymentFacts { + actualPaymentAmount?: number + actualPaymentDate?: string + actualPaymentMethod?: string + bankTransactionNo?: string + paymentReceipt?: string + source?: string +} + +export interface PaymentRecord extends ExternalPaymentFacts { id: number | string paymentNo: string applicationId?: number | string @@ -218,7 +273,11 @@ export interface PaymentRecord { totalAmount?: number paidAmount?: number remainingAmount?: number - paymentMethod: string + actualPaymentAmount: number + approvedAmount?: number + actualPaymentMethod: string + resultRecordedAt?: string + paymentMethod?: string referenceNo?: string paymentStatus: string operatorName?: string @@ -234,8 +293,9 @@ export interface PaymentReviewRequest { rejectionCode?: string } -export interface PaymentResult { +export interface PaymentResult extends ExternalPaymentFacts { paymentNo?: string + amount?: number paymentAmount?: number paymentStatus: string message?: string @@ -247,61 +307,69 @@ export interface TransferApprovalRequest { comment?: string } -export interface ReimbursementWorkbenchResponse { +export interface PaymentApplicationWorkbenchResponse { + paymentApplications?: ReimApplicationDetail[] reimbursements?: ReimApplicationDetail[] content?: ReimApplicationDetail[] payments?: PaymentRecord[] notifications?: number user?: unknown + financeCheckEnabled?: boolean + independentPaymentReviewEnabled?: boolean } +/** @deprecated 仅供旧调用方过渡,请使用 PaymentApplicationWorkbenchResponse。 */ +export type ReimbursementWorkbenchResponse = PaymentApplicationWorkbenchResponse + +const paymentApplicationBase = '/v1/payment-applications' + export const reimbursementApi = { getFormDefinition: (): Promise => - request.get('/v1/reimbursements/form-definition', { suppressErrorNotification: true }), + request.get(`${paymentApplicationBase}/form-definition`, { suppressErrorNotification: true }), getExpenseTypes: (): Promise => - request.get('/metadata/expense-types', { suppressErrorNotification: true }), + request.get('/metadata/payment-scenarios', { suppressErrorNotification: true }), uploadFormAttachment: (file: File, formFingerprint: string, controlId: string): Promise => { const data = new FormData() data.append('file', file) data.append('formFingerprint', formFingerprint) data.append('controlId', controlId) - return request.post('/v1/reimbursements/form-attachments', data, { headers: { 'Content-Type': 'multipart/form-data' }, suppressErrorNotification: true }) + return request.post(`${paymentApplicationBase}/form-attachments`, data, { headers: { 'Content-Type': 'multipart/form-data' }, suppressErrorNotification: true }) }, deleteFormAttachment: (id: number | string): Promise => - request.delete(`/v1/reimbursements/form-attachments/${encodeURIComponent(String(id))}`, { suppressErrorNotification: true }), + request.delete(`${paymentApplicationBase}/form-attachments/${encodeURIComponent(String(id))}`, { suppressErrorNotification: true }), - getWorkbench: (): Promise => - request.get('/v1/reimbursements/workbench'), + getWorkbench: (): Promise => + request.get(`${paymentApplicationBase}/workbench`), getMyApplications: (params?: { status?: string; page?: number; size?: number }): Promise> => - request.get('/v1/reimbursements/my', { params }), + request.get(`${paymentApplicationBase}/my`, { params }), getDetail: (id: number | string): Promise => - request.get(`/v1/reimbursements/${id}`), + request.get(`${paymentApplicationBase}/${id}`), getByApplicationNo: (no: string): Promise => - request.get(`/v1/reimbursements/no/${no}`), + request.get(`${paymentApplicationBase}/no/${no}`), create: (data: Partial): Promise => - request.post('/v1/reimbursements', data), + request.post(paymentApplicationBase, data), update: (id: number | string, data: Partial): Promise => - request.put(`/v1/reimbursements/${id}`, data), + request.put(`${paymentApplicationBase}/${id}`, data), getRoutePreview: (id: number | string): Promise => - request.get(`/v1/reimbursements/${id}/route-preview`), + request.get(`${paymentApplicationBase}/${id}/route-preview`), submit: (id: number | string, data: SubmitReimbursementRequest): Promise => - request.post(`/v1/reimbursements/${id}/submit`, data), + request.post(`${paymentApplicationBase}/${id}/submit`, data), receive: (id: number | string): Promise => - request.post(`/v1/reimbursements/${id}/receive`), + request.post(`${paymentApplicationBase}/${id}/receive`), delete: (id: number | string): Promise => - request.delete(`/v1/reimbursements/${id}`), + request.delete(`${paymentApplicationBase}/${id}`), } export const accountsPayableApi = { @@ -331,11 +399,11 @@ export const cashierApi = { getTaskDetail: (id: number | string): Promise => request.get(`/v1/cashier/tasks/${id}`), - executePayment: (applicationId: number | string, paymentAmount: number, remark?: string, idempotencyKey?: string): Promise => - request.post('/v1/cashier/pay', { applicationId, paymentAmount, remark }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined), + executePayment: (applicationId: number | string, actualPaymentAmount: number, remark?: string, idempotencyKey?: string, facts?: ExternalPaymentFacts): Promise => + request.post('/v1/cashier/pay', { applicationId, actualPaymentAmount, remark, ...facts }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined), - partialPayment: (applicationId: number | string, paymentAmount: number, remark?: string, idempotencyKey?: string): Promise => - request.post('/v1/cashier/partial-pay', { applicationId, paymentAmount, remark }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined), + partialPayment: (applicationId: number | string, actualPaymentAmount: number, remark?: string, idempotencyKey?: string, facts?: ExternalPaymentFacts): Promise => + request.post('/v1/cashier/partial-pay', { applicationId, actualPaymentAmount, remark, ...facts }, idempotencyKey ? { headers: { 'Idempotency-Key': idempotencyKey } } : undefined), getHistory: (): Promise => request.get('/v1/cashier/history'), @@ -345,6 +413,9 @@ export const cashierApi = { reject: (data: PaymentReviewRequest): Promise => request.post('/v1/cashier/payments/reject', data), + + attachReceipt: (paymentId: number | string, paymentReceipt: string): Promise => + request.patch(`/v1/cashier/payments/${paymentId}/receipt`, { paymentReceipt }), } export const dashboardApi = { diff --git a/src/api/travelApplications.ts b/src/api/travelApplications.ts index bf4991b..02d172b 100644 --- a/src/api/travelApplications.ts +++ b/src/api/travelApplications.ts @@ -18,8 +18,10 @@ export interface TravelApplication { status: string approvalSystem: string syncedAt: string + linkedPaymentApplicationCount: number } export const travelApplicationsApi = { mine: (): Promise => request.get('/v1/travel-applications/mine'), + detail: (id: number): Promise => request.get(`/v1/travel-applications/${id}`), } diff --git a/src/assets/ui-system.css b/src/assets/ui-system.css new file mode 100644 index 0000000..4055fef --- /dev/null +++ b/src/assets/ui-system.css @@ -0,0 +1,922 @@ +/* + * Unified UI system + * Apple-family clarity with a restrained ZeroErr blue accent. + * This layer intentionally contains no business-specific rules. + */ + +:root { + --navy: #1d1d1f; + --deep: #111113; + --blue: #0071e3; + --blue-hover: #0077ed; + --blue-soft: #e8f2ff; + --white: #ffffff; + --surface: #f5f5f7; + --surface-2: #ececf0; + --line: rgba(60, 60, 67, 0.16); + --line-strong: rgba(60, 60, 67, 0.28); + --text: #1d1d1f; + --body: #3a3a3c; + --muted: #6e6e73; + --quiet: #86868b; + --info: #0071e3; + --info-soft: #e8f2ff; + --success: #248a3d; + --success-soft: #edf8ef; + --warning: #9a6700; + --warning-soft: #fff8e8; + --danger: #d70015; + --danger-hover: #b50012; + --danger-soft: #fff0f1; + --disabled: #8e8e93; + --disabled-soft: #f0f0f2; + --focus: rgba(0, 113, 227, 0.38); + --control-height: 40px; + --control-height-small: 34px; + --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; + --mono: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace; + --shadow: 0 18px 48px rgba(0, 0, 0, 0.08); + --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 24px rgba(0, 0, 0, 0.04); + --radius-control: 10px; + --radius-panel: 14px; + --radius-modal: 18px; + --side: 240px; +} + +html { + background: var(--surface); + color-scheme: light; +} + +body { + color: var(--text); + background: var(--surface); + font: 14px/1.55 var(--sans); + letter-spacing: -0.006em; + text-rendering: optimizeLegibility; +} + +button, +input, +select, +textarea { + letter-spacing: inherit; +} + +button:focus-visible, +a:focus-visible, +input:focus-visible, +select:focus-visible, +textarea:focus-visible, +[tabindex]:focus-visible { + outline: 3px solid var(--focus); + outline-offset: 2px; +} + +::selection { + background: rgba(0, 113, 227, 0.18); +} + +/* Application shell */ + +.sidebar { + width: var(--side); + padding: 20px 14px 16px; + border-right: 1px solid var(--line); + background: rgba(247, 247, 249, 0.96); + color: var(--text); + box-shadow: none; + backdrop-filter: saturate(180%) blur(24px); +} + +.brand { + gap: 10px; + padding: 0 10px; +} + +.brand strong { + color: var(--text); + font-size: 15px; + letter-spacing: -0.01em; +} + +.brand small { + margin-top: 0; + color: var(--quiet); + font: 10px/1.2 var(--sans); + letter-spacing: 0.16em; +} + +.sidebar .brand strong { + color: var(--text); +} + +.sidebar .brand small { + color: var(--quiet); +} + +.brand-mark { + width: 30px; + height: 30px; + border: 1px solid var(--line); + border-radius: 9px; + background: #fff; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); +} + +.product-name { + margin: 16px 10px 20px; + padding-top: 14px; + border-top-color: var(--line); + color: var(--muted); + font-size: 12px; +} + +.main-nav { + margin-right: -2px; + padding-right: 2px; +} + +.nav-group { + margin-bottom: 18px; +} + +.nav-group > span { + margin: 0 10px 7px; + color: var(--quiet); + font: 600 11px/1.3 var(--sans); + letter-spacing: 0; +} + +.main-nav a { + min-height: 38px; + gap: 10px; + margin: 2px 0; + padding: 8px 10px; + border: 0; + border-radius: 10px; + color: var(--body); + font-size: 13px; + transition: background-color 140ms ease, color 140ms ease; +} + +.main-nav a b, +.main-nav a .nav-icon { + color: var(--muted); +} + +.main-nav a:hover { + background: rgba(0, 0, 0, 0.045); + color: var(--text); +} + +.main-nav a.active { + border: 0; + background: rgba(0, 113, 227, 0.1); + color: var(--blue); + font-weight: 650; +} + +.main-nav a.active b, +.main-nav a.active .nav-icon { + color: var(--blue); +} + +.nav-subgroup { + border-left: 0; +} + +.nav-subgroup summary { + padding: 7px 10px; + color: var(--muted); + font-size: 12px; +} + +.nav-subgroup summary::before { + color: var(--quiet); +} + +.sidebar-foot { + margin: 12px 4px 0; + padding: 11px 10px; + border-color: var(--line); + border-radius: 11px; + background: rgba(255, 255, 255, 0.68); +} + +.sidebar-foot strong { + color: var(--body); +} + +.sidebar-foot small { + color: var(--quiet); +} + +.main-area { + margin-left: var(--side); +} + +.topbar { + height: 64px; + padding: 0 32px; + border-bottom: 1px solid var(--line); + background: rgba(255, 255, 255, 0.82); + backdrop-filter: saturate(180%) blur(24px); +} + +.breadcrumb { + color: var(--muted); + font-size: 13px; +} + +.breadcrumb i { + color: var(--line-strong); +} + +.breadcrumb strong { + color: var(--text); + font-weight: 600; +} + +.search-box { + width: min(360px, 32vw); + height: 38px; + border-color: transparent; + border-radius: 11px; + background: rgba(118, 118, 128, 0.09); +} + +.search-box:focus-within { + border-color: rgba(0, 113, 227, 0.34); + background: #fff; + box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1); +} + +.icon-button, +.role-switch { + border-radius: 10px; +} + +.icon-button { + border-color: transparent; + background: transparent; +} + +.icon-button:hover, +.role-switch:hover { + border-color: var(--line); + background: rgba(118, 118, 128, 0.08); +} + +.role-switch { + padding: 4px 8px 4px 4px; +} + +.avatar { + border-radius: 9px; + background: var(--text); +} + +.page-stage { + width: min(1480px, 100%); + padding: 30px 40px 64px; +} + +.page-head { + align-items: flex-end; + margin-bottom: 24px; +} + +.page-head h1 { + color: var(--text); + font-size: clamp(26px, 2.2vw, 32px); + font-weight: 700; + letter-spacing: -0.035em; +} + +.page-head p { + max-width: 760px; + margin-top: 6px; + color: var(--muted); + font-size: 13px; + line-height: 1.55; +} + +.head-actions { + gap: 8px; +} + +/* Controls */ + +.btn { + min-height: var(--control-height); + padding: 8px 16px; + border: 1px solid var(--line-strong); + border-radius: var(--radius-control); + background: rgba(255, 255, 255, 0.9); + color: var(--text); + font-size: 13px; + font-weight: 600; + line-height: 1.2; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.02); + transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease; +} + +.btn:hover:not(:disabled) { + border-color: rgba(60, 60, 67, 0.36); + background: #fff; +} + +.btn:active:not(:disabled) { + transform: scale(0.98); +} + +.btn.primary { + border-color: var(--blue); + background: var(--blue); + color: #fff; + box-shadow: none; +} + +.btn.primary:hover:not(:disabled) { + border-color: var(--blue-hover); + background: var(--blue-hover); +} + +.btn.ghost { + border-color: transparent; + background: transparent; + color: var(--blue); + box-shadow: none; +} + +.btn.ghost:hover:not(:disabled) { + border-color: transparent; + background: rgba(0, 113, 227, 0.08); +} + +.btn.small { + min-height: var(--control-height-small); + padding: 6px 12px; + border-radius: 9px; + font-size: 12px; +} + +.field input, +.field select, +.field textarea, +.filter-input, +.filter-select, +.table-input, +.inline-select, +.field-filter-grid input, +.field-filter-grid select { + border: 1px solid var(--line-strong); + border-radius: var(--radius-control); + background: #fff; + color: var(--text); + font-size: 14px; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.015); +} + +.field input:focus, +.field select:focus, +.field textarea:focus, +.filter-input:focus, +.filter-select:focus, +.table-input:focus, +.inline-select:focus { + border-color: rgba(0, 113, 227, 0.58); + box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1); + outline: 0; +} + +.field label, +.field-filter-grid label > span { + color: var(--muted); + font-size: 12px; + font-weight: 600; +} + +.field-hint { + color: var(--quiet); +} + +/* Panels and information hierarchy */ + +.card, +.section-card, +.payment-start-panel, +.workspace-focus, +.business-document-gate, +.approval-preview, +.role-permission-detail, +.role-directory { + border: 1px solid var(--line); + border-radius: var(--radius-panel); + background: rgba(255, 255, 255, 0.94); + box-shadow: var(--shadow-soft); +} + +.card-head, +.section-title { + border-bottom-color: var(--line); +} + +.card-head { + padding: 17px 19px; +} + +.card-head h2, +.section-title h2 { + color: var(--text); + font-size: 15px; + font-weight: 650; + letter-spacing: -0.015em; +} + +.card-head p, +.section-title span { + color: var(--quiet); +} + +.card-body { + padding: 19px; +} + +.section-card { + margin-bottom: 16px; + box-shadow: none; +} + +.section-title { + min-height: 58px; + padding: 15px 18px; +} + +.inline-note, +.discussion-note { + border: 0; + border-radius: 12px; + background: var(--blue-soft); + color: var(--body); + box-shadow: inset 3px 0 0 rgba(0, 113, 227, 0.72); +} + +.metric { + border-color: var(--line); + border-radius: 13px; + background: rgba(255, 255, 255, 0.9); + box-shadow: none; +} + +.metric::before { + width: 2px; +} + +.metric strong { + color: var(--text); + font-family: var(--sans); + font-weight: 700; +} + +.attention-card, +.featured-start-card, +.workspace-focus, +.payment-start-panel, +.business-document-gate { + border-color: var(--line); + background: linear-gradient(135deg, #fff, #fafafd); + box-shadow: var(--shadow-soft); +} + +.type-card, +.quick-type, +.task-item, +.approval-item { + border-color: var(--line); +} + +.type-card, +.quick-type { + border-radius: 12px; + background: #fff; +} + +.type-card:hover, +.type-card.selected, +.quick-type:hover { + border-color: rgba(0, 113, 227, 0.36); + background: #fff; + box-shadow: 0 10px 30px rgba(0, 113, 227, 0.08); + transform: translateY(-1px); +} + +.empty-state { + min-height: 120px; + color: var(--quiet); +} + +/* Tables, filters and segmented navigation */ + +.table-wrap { + border-radius: 0 0 var(--radius-panel) var(--radius-panel); +} + +.data-table { + font-size: 13px; +} + +.data-table th { + padding: 11px 13px; + border-bottom-color: var(--line); + background: #f7f7f9; + color: var(--muted); + font-size: 12px; + font-weight: 600; +} + +.data-table td { + padding: 13px; + border-bottom-color: var(--line); + color: var(--body); +} + +.data-table tbody tr:hover { + background: rgba(0, 113, 227, 0.035); +} + +.data-table td strong { + color: var(--text); + font-size: 13px; +} + +.data-table td small { + color: var(--quiet); + font-size: 12px; +} + +.amount { + color: var(--text); + font-size: 13px; + font-weight: 650; +} + +.table-action, +.card-link, +.info-link { + color: var(--blue); + font-weight: 600; +} + +.filter-bar, +.field-filter-panel { + gap: 9px; + padding: 13px 15px; + border-bottom-color: var(--line); + background: rgba(247, 247, 249, 0.78); +} + +.tabs { + gap: 4px; + padding: 5px; + border-bottom: 0; + border-radius: 11px 11px 0 0; + background: rgba(118, 118, 128, 0.08); +} + +.tab { + min-height: 34px; + padding: 7px 13px; + border: 0; + border-radius: 8px; + color: var(--muted); +} + +.tab:hover { + background: rgba(255, 255, 255, 0.62); + color: var(--text); +} + +.tab.active { + border: 0; + background: #fff; + color: var(--text); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); +} + +.tag { + gap: 0; + padding: 4px 8px; + border-radius: 999px; + font-size: 11px; + font-weight: 600; +} + +.tag::before { + display: none; +} + +/* Modal and feedback */ + +.modal-layer { + background: rgba(0, 0, 0, 0.28); + backdrop-filter: blur(10px); +} + +.modal { + border: 1px solid rgba(255, 255, 255, 0.72); + border-radius: var(--radius-modal); + background: rgba(255, 255, 255, 0.98); + box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2); +} + +.modal-head, +.modal-actions { + border-color: var(--line); +} + +.modal-head { + padding: 20px 22px 17px; +} + +.modal-head h2 { + font-size: 18px; + letter-spacing: -0.02em; +} + +.modal-body { + padding: 22px; +} + +.modal-actions { + padding: 14px 22px; + background: rgba(247, 247, 249, 0.88); +} + +.toast { + border-radius: 12px; + background: rgba(29, 29, 31, 0.94); + box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2); + backdrop-filter: blur(18px); +} + +/* Role selection */ + +.login-screen { + min-height: 100vh; + padding: 40px; + background: radial-gradient(circle at 80% 5%, rgba(0, 113, 227, 0.1), transparent 30%), var(--surface); + color: var(--text); +} + +.login-panel { + width: min(1180px, 100%); +} + +.login-brand { + margin-bottom: 72px; +} + +.login-brand strong { + color: var(--text); +} + +.login-brand small { + color: var(--quiet); +} + +.login-copy { + margin-bottom: 38px; +} + +.login-copy h1 { + margin: 12px 0 8px; + color: var(--text); + font-size: clamp(36px, 5vw, 56px); + font-weight: 700; + letter-spacing: -0.045em; +} + +.login-copy p { + color: var(--muted); + font-size: 14px; +} + +.environment-pill { + border: 0; + background: var(--blue-soft); + color: var(--blue); +} + +.role-login-grid { + gap: 30px; +} + +.role-category { + padding: 0; + border: 0; + border-radius: 0; + background: transparent; + box-shadow: none; +} + +.role-category-head { + margin-bottom: 12px; + padding: 0 2px; +} + +.role-category-head strong { + color: var(--text); + font-size: 14px; + font-weight: 650; +} + +.role-category-head small { + display: none; +} + +.role-category-grid { + gap: 10px; +} + +.role-login-card { + min-height: 108px; + padding: 16px; + border: 1px solid var(--line); + border-radius: 14px; + background: rgba(255, 255, 255, 0.88); + color: var(--text); + box-shadow: none; + backdrop-filter: blur(18px); +} + +.role-login-card:hover, +.role-login-card:focus-visible { + border-color: rgba(0, 113, 227, 0.34); + background: #fff; + box-shadow: 0 12px 32px rgba(0, 113, 227, 0.08); + transform: translateY(-1px); +} + +.role-login-avatar { + border-radius: 10px; + background: var(--blue-soft); + color: var(--blue); +} + +.role-login-card strong { + color: var(--text); + font-size: 13px; +} + +.role-login-card small { + color: var(--muted); + font-size: 12px; +} + +.role-login-card i { + color: var(--blue); + font-size: 12px; +} + +.role-login-card.is-disabled { + background: rgba(238, 238, 240, 0.72); + opacity: 0.7; +} + +/* Domain patterns */ + +.approval-preview { + overflow: hidden; + border-color: var(--line); + background: #fff; + box-shadow: none; +} + +.approval-preview-head { + border-bottom-color: var(--line); + background: #f7f7f9; +} + +.approval-node > span { + background: var(--blue); +} + +.step-rail { + border-color: var(--line); + border-radius: 12px; + background: #fff; +} + +.step.active .step-num, +.flow-step.done i { + border-color: var(--blue); + background: var(--blue); +} + +.flow-step.current i { + box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1); +} + +.progress-bar { + background: var(--surface-2); +} + +.role-detail-hero, +.expense-type-detail-hero { + background: linear-gradient(135deg, #fff, #f7f7f9); +} + +.ui-tip summary, +.info-entry, +.info-link > span { + border-radius: 50%; +} + +/* Responsive behavior */ + +@media (max-width: 1180px) { + .page-stage { + padding-right: 28px; + padding-left: 28px; + } +} + +@media (max-width: 920px) { + :root { + --side: 0px; + } + + .sidebar { + width: 250px; + box-shadow: 18px 0 48px rgba(0, 0, 0, 0.14); + } + + .main-area { + margin-left: 0; + } + + .topbar { + padding: 0 20px; + } +} + +@media (max-width: 680px) { + .login-screen { + padding: 24px 16px 40px; + } + + .login-brand { + margin-bottom: 48px; + } + + .login-copy h1 { + font-size: 38px; + } + + .page-stage { + padding: 22px 16px 48px; + } + + .page-head { + align-items: flex-start; + margin-bottom: 20px; + } + + .page-head h1 { + font-size: 27px; + } + + .head-actions { + width: 100%; + } + + .head-actions .btn { + flex: 1 1 auto; + } + + .card, + .section-card, + .payment-start-panel, + .workspace-focus, + .business-document-gate, + .approval-preview { + border-radius: 12px; + } + + .tabs { + overflow-x: auto; + } +} + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + scroll-behavior: auto !important; + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} diff --git a/src/authorization/pageAccess.ts b/src/authorization/pageAccess.ts index c0201be..b82b75e 100644 --- a/src/authorization/pageAccess.ts +++ b/src/authorization/pageAccess.ts @@ -159,7 +159,7 @@ const landingCandidates: ReadonlyArray<{ key: PageAccessKey; target: PageLanding { key: 'financeOperations', target: { path: '/finance-receipt' } }, { key: 'sources', target: { path: '/sources' } }, { key: 'logs', target: { path: '/logs' } }, - { key: 'expenseTypes', target: { path: '/expense-types' } }, + { key: 'expenseTypes', target: { path: '/payment-scenarios' } }, { key: 'payees', target: { path: '/payees' } }, { key: 'legalEntities', target: { path: '/legal-entities' } }, { key: 'costCenters', target: { path: '/cost-centers' } }, diff --git a/src/components.d.ts b/src/components.d.ts new file mode 100644 index 0000000..4a668b0 --- /dev/null +++ b/src/components.d.ts @@ -0,0 +1,7 @@ +export {} + +declare module 'vue' { + export interface GlobalComponents { + SearchableSelect: typeof import('./components/SearchableSelect.vue')['default'] + } +} diff --git a/src/components/EmployeeAdvancedFilter.vue b/src/components/EmployeeAdvancedFilter.vue index 39fe56e..fc0aa79 100644 --- a/src/components/EmployeeAdvancedFilter.vue +++ b/src/components/EmployeeAdvancedFilter.vue @@ -6,12 +6,12 @@
- - - - - - + + + + + +