<!-- 顶部状态栏 -->

This commit is contained in:
2026-01-12 18:24:25 +08:00
parent 725aa1819a
commit 7adfd27f3f
33 changed files with 9401 additions and 309 deletions

View File

@@ -0,0 +1,172 @@
# Bank Insurance UI Specification
## Overview
This specification defines the UI requirements for the bank-side insurance functionality integration, including insurance information display, navigation flows, and workflow step visualization.
## ADDED Requirements
### Requirement: Audit Detail Insurance Display
The audit detail page MUST display insurance information based on the loan status.
#### Scenario: Display insurance information for insured loans
**Given** a loan application with status `DISBURSED` and insurance policy exists
**When** the user views the audit detail page
**Then** the system SHALL display:
- Insurance status as "保障中"
- Insurance company name
- Insurance product name
- Policy number
- Insurance amount matching the loan amount
- Insurance term matching the loan term
- "申请理赔" (Apply for Claim) button
#### Scenario: Display purchase insurance option for uninsured loans
**Given** a loan application with status `DISBURSED` and no insurance policy
**When** the user views the audit detail page
**Then** the system SHALL display:
- "购买保险" (Purchase Insurance) button
- No insurance policy details section
### Requirement: Insurance Navigation
The audit detail page MUST provide navigation to insurance-related pages.
#### Scenario: Navigate to insurance application creation
**Given** a loan application with status `DISBURSED`
**When** the user clicks the "购买保险" button
**Then** the system SHALL navigate to `/pagesBank/insurance/application/create` with query parameters:
- `loanId`: The loan application ID
- `loanAmount`: The loan amount in yuan
- `loanTerm`: The loan term in months
#### Scenario: Navigate to claim application creation
**Given** a loan application with an active insurance policy
**When** the user clicks the "申请理赔" button
**Then** the system SHALL navigate to `/pagesBank/insurance/claim/create` with query parameters:
- `loanId`: The loan application ID
- `policyId`: The insurance policy ID
- `policyNumber`: The insurance policy number
### Requirement: Workflow Step Insurance Node
The workflow step bar MUST conditionally display an insurance node.
#### Scenario: Display insurance node for insured loans
**Given** a loan application with status `DISBURSED` and an active insurance policy
**When** the user views the audit detail page
**Then** the system SHALL display an "投保" (Insurance) node in the workflow step bar
**And** the insurance node SHALL appear between the "审批" (Approval) and "签约" (Signing) nodes
**And** the insurance node SHALL be marked as completed
#### Scenario: Hide insurance node for uninsured loans
**Given** a loan application with status `DISBURSED` and no insurance policy
**When** the user views the audit detail page
**Then** the system SHALL NOT display an "投保" (Insurance) node in the workflow step bar
### Requirement: Dashboard Insurance Shortcuts
The bank dashboard MUST provide insurance management shortcuts.
#### Scenario: Display insurance shortcuts on dashboard
**Given** the user is on the bank dashboard page
**When** the page loads
**Then** the system SHALL display two insurance-related shortcuts in the quick actions area:
- "投保管理" (Insurance Management) with icon `i-carbon-security`, navigating to `/pagesBank/insurance/application/list`
- "理赔管理" (Claim Management) with icon `i-carbon-money`, navigating to `/pagesBank/insurance/claim/list`
### Requirement: Audit List Insurance Shortcuts Removal
The audit list page MUST NOT contain insurance shortcuts.
#### Scenario: Remove insurance shortcuts from audit list
**Given** the user is on the bank audit list page
**When** the page loads
**Then** the system SHALL NOT display the insurance actions section that was previously located above the audit list
## Modified Requirements
### Modified: Audit Detail Insurance Information Display
The insurance information section on the audit detail page is enhanced to support multiple insurance states.
**Previous Behavior**: Displayed static insurance information
**New Behavior**:
- Shows insurance policy details only when insurance exists
- Shows "购买保险" button when no insurance exists
- Shows "申请理赔" button when insurance exists and is active
- Conditionally shows insurance node in workflow steps
## Implementation Notes
### File Locations
- `src/pagesBank/audit/detail.vue`: Audit detail page with insurance display
- `src/pagesBank/audit/list.vue`: Audit list page (shortcuts removed)
- `src/pagesBank/dashboard/index.vue`: Dashboard page (shortcuts added)
### Key Functions
```typescript
// Navigation to insurance application creation
function handleBuyInsurance() {
uni.navigateTo({
url: `/pagesBank/insurance/application/create?loanId=${id.value}&loanAmount=${amount}&loanTerm=${term}`,
})
}
// Navigation to claim application creation
function handleApplyClaim() {
uni.navigateTo({
url: `/pagesBank/insurance/claim/create?loanId=${id.value}&policyId=${policyId}&policyNumber=${policyNumber}`,
})
}
```
### Workflow Steps Configuration
```typescript
const steps = [
{ key: 'SUBMITTED', label: '申请' },
{ key: 'ACCEPTED', label: '受理' },
{ key: 'INVESTIGATING', label: '调查' },
{ key: 'APPROVING', label: '审批' },
{ key: 'INSURANCE', label: '投保', condition: (detail) => detail.hasInsurance },
{ key: 'SIGNING', label: '签约' },
{ key: 'DISBURSED', label: '放款' },
]
```
## Related Capabilities
- `bank-insurance-integration`: Core insurance integration functionality
- `insurance-underwriting`: Insurance underwriting workflow
- `insurance-claim-review`: Insurance claim review workflow