归档
This commit is contained in:
110
openspec/specs/bank-insurance-ui/spec.md
Normal file
110
openspec/specs/bank-insurance-ui/spec.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# bank-insurance-ui Specification
|
||||
|
||||
## Purpose
|
||||
TBD - created by archiving change integrate-insurance-flow. Update Purpose after archive.
|
||||
## 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
|
||||
|
||||
Reference in New Issue
Block a user