Compare commits

..

11 Commits

Author SHA1 Message Date
fa6525bfd4 图标问题 2026-01-12 19:00:20 +08:00
1eedfe261f 归档 2026-01-12 18:32:00 +08:00
7adfd27f3f <!-- 顶部状态栏 --> 2026-01-12 18:24:25 +08:00
725aa1819a 修改项目信息 2026-01-12 11:41:56 +08:00
e7aaf6962b 删除被忽略的 .kilocode 目录 2026-01-12 10:38:54 +08:00
FlowerWater
e08b9694a5 feat: 新增政务端,保险端 2026-01-05 17:17:54 +08:00
3c8b3cf442 图标问题 2025-12-26 18:26:55 +08:00
32b7ae9ded 最近动态 2025-12-26 18:18:15 +08:00
d8785fe915 流程信息 2025-12-26 18:13:42 +08:00
e8e6778d08 优化 2025-12-26 15:13:33 +08:00
ee00783eb3 优化产品的选择 2025-12-26 09:40:57 +08:00
79 changed files with 15706 additions and 402 deletions

8
.gitignore vendored
View File

@@ -46,3 +46,11 @@ src/manifest.json
# 更新 uni-app 官方版本
# npx @dcloudio/uvm@latest
# src/pages.json
# AI
.kilocode
.kilocode/**
.opencode
.opencode/**
.agent
.agent/**

View File

@@ -1,17 +0,0 @@
<!-- OPENSPEC:START -->
**Guardrails**
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
- Keep changes tightly scoped to the requested outcome.
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
**Steps**
Track these steps as TODOs and complete them one by one.
1. Read `changes/<id>/proposal.md`, `design.md` (if present), and `tasks.md` to confirm scope and acceptance criteria.
2. Work through tasks sequentially, keeping edits minimal and focused on the requested change.
3. Confirm completion before updating statuses—make sure every item in `tasks.md` is finished.
4. Update the checklist after all work is done so each task is marked `- [x]` and reflects reality.
5. Reference `openspec list` or `openspec show <item>` when additional context is required.
**Reference**
- Use `openspec show <id> --json --deltas-only` if you need additional context from the proposal while implementing.
<!-- OPENSPEC:END -->

View File

@@ -1,21 +0,0 @@
<!-- OPENSPEC:START -->
**Guardrails**
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
- Keep changes tightly scoped to the requested outcome.
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
**Steps**
1. Determine the change ID to archive:
- If this prompt already includes a specific change ID (for example inside a `<ChangeId>` block populated by slash-command arguments), use that value after trimming whitespace.
- If the conversation references a change loosely (for example by title or summary), run `openspec list` to surface likely IDs, share the relevant candidates, and confirm which one the user intends.
- Otherwise, review the conversation, run `openspec list`, and ask the user which change to archive; wait for a confirmed change ID before proceeding.
- If you still cannot identify a single change ID, stop and tell the user you cannot archive anything yet.
2. Validate the change ID by running `openspec list` (or `openspec show <id>`) and stop if the change is missing, already archived, or otherwise not ready to archive.
3. Run `openspec archive <id> --yes` so the CLI moves the change and applies spec updates without prompts (use `--skip-specs` only for tooling-only work).
4. Review the command output to confirm the target specs were updated and the change landed in `changes/archive/`.
5. Validate with `openspec validate --strict` and inspect with `openspec show <id>` if anything looks off.
**Reference**
- Use `openspec list` to confirm change IDs before archiving.
- Inspect refreshed specs with `openspec list --specs` and address any validation issues before handing off.
<!-- OPENSPEC:END -->

View File

@@ -1,22 +0,0 @@
<!-- OPENSPEC:START -->
**Guardrails**
- Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
- Keep changes tightly scoped to the requested outcome.
- Refer to `openspec/AGENTS.md` (located inside the `openspec/` directory—run `ls openspec` or `openspec update` if you don't see it) if you need additional OpenSpec conventions or clarifications.
- Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
- Do not write any code during the proposal stage. Only create design documents (proposal.md, tasks.md, design.md, and spec deltas). Implementation happens in the apply stage after approval.
**Steps**
1. Review `openspec/project.md`, run `openspec list` and `openspec list --specs`, and inspect related code or docs (e.g., via `rg`/`ls`) to ground the proposal in current behaviour; note any gaps that require clarification.
2. Choose a unique verb-led `change-id` and scaffold `proposal.md`, `tasks.md`, and `design.md` (when needed) under `openspec/changes/<id>/`.
3. Map the change into concrete capabilities or requirements, breaking multi-scope efforts into distinct spec deltas with clear relationships and sequencing.
4. Capture architectural reasoning in `design.md` when the solution spans multiple systems, introduces new patterns, or demands trade-off discussion before committing to specs.
5. Draft spec deltas in `changes/<id>/specs/<capability>/spec.md` (one folder per capability) using `## ADDED|MODIFIED|REMOVED Requirements` with at least one `#### Scenario:` per requirement and cross-reference related capabilities when relevant.
6. Draft `tasks.md` as an ordered list of small, verifiable work items that deliver user-visible progress, include validation (tests, tooling), and highlight dependencies or parallelizable work.
7. Validate with `openspec validate <id> --strict` and resolve every issue before sharing the proposal.
**Reference**
- Use `openspec show <id> --json --deltas-only` or `openspec show <spec> --type spec` to inspect details when validation fails.
- Search existing requirements with `rg -n "Requirement:|Scenario:" openspec/specs` before writing new ones.
- Explore the codebase with `rg <keyword>`, `ls`, or direct file reads so proposals align with current implementation realities.
<!-- OPENSPEC:END -->

View File

@@ -2,6 +2,7 @@
# OpenSpec Instructions
These instructions are for AI assistants working in this project.
When communicating with me, please use Chinese.
Always open `@/openspec/AGENTS.md` when the request:
- Mentions planning or proposals (words like proposal, spec, change, plan)

View File

@@ -1,6 +1,7 @@
# OpenSpec Instructions
Instructions for AI coding assistants using OpenSpec for spec-driven development.
Instructions for AI coding assistants using OpenSpec for spec-driven development
When communicating with me, please use Chinese.
## TL;DR Quick Checklist

View File

@@ -0,0 +1,71 @@
# Change: 增强贷款审核相关页面功能
## Why
当前贷款审核相关页面(银行端审核列表、用户端申请记录、商家端贷款协助、银行端审核详情)的模拟数据不够完善,缺少不同状态的展示,且用户端无法查看银行端受理人的联系方式,影响业务沟通效率。同时银行端审核详情页缺少征信信息和信用评估功能。商家端贷款协助页面需要优化信息展示逻辑和添加状态筛选功能。此外,各端之间的模拟数据需要保持一致,商家端的订单和商品数据应与用户端的商品信息一致,银行端审核详情需要展示用户在商城的消费订单信息。
## What Changes
### 银行端审核列表页面(/pagesBank/audit/list
- 优化模拟数据确保包含所有贷款状态SUBMITTED、ACCEPTED、INVESTIGATING、REPORTED、APPROVED、REJECTED、SIGNED、DISBURSED
- 确保表格展示不同状态的申请记录
- 添加状态筛选 Tab可快速切换查看不同状态的申请记录
### 用户端助贷申请记录页面(/pages/me/loan-application-records
- 在处理中状态的申请记录中添加银行端受理人信息
- 显示受理人姓名和手机号码,方便用户联系业务处理人员
### 商家端贷款协助页面(/pagesMerchant/loan/assist
- 优化模拟数据,确保包含不同状态的贷款申请
- 确保商家端看到的贷款数据与银行端一致
- 移除银行受理人信息卡片src\pagesMerchant\loan\assist.vue:121-136
- 申请进度及负责人信息:还没有执行的进度不显示负责人信息
- 添加状态筛选 Tab可快速切换查看不同状态的申请记录
- 页面标题修改:将"贷款辅助材料"显示为"辅助贷款材料"
### 银行端审核详情页面(/pagesBank/audit/detail
- 添加征信信息查询功能(弹窗模拟远程查询征信信息),与平台信用评估功能保持一致
- 添加平台信用评估分数展示,并注明免责声明:"仅供参考,不构成专业建议,实际应用请以权威数据为准。"
- 平台信用评估和征信查询功能完成后,刷新按钮应该隐藏
- 状态标签显示中文状态文本(如"已拒绝"而非"rejected"
- 优化关联商家信息展示使用用户端中的商家信息包括商家ID、商家名称、logo等
- 商家相关附件使用 src/static/fb 目录中的图片资源
- **新增:添加用户在商城消费的订单信息展示,包括订单号、商品名称、购买数量、金额等**
### 商家端贷款协助页面(/pagesMerchant/loan/assist- 续
- 显示申请进度及每个进度的负责人姓名和手机号码(仅已执行的进度显示负责人信息)
### 商家端订单管理页面(/pagesMerchant/order/list
- **新增:修改订单模拟数据,使其与用户端商品信息保持一致**
- 订单中的商品应使用用户端 mockGoodsList 中的商品数据包括商品ID、商品名称、图片、价格等
- 订单中的商家信息应与用户端商品中的 shopId 和 shopName 保持一致
### 商家端商品管理页面(/pagesMerchant/goods/list
- **新增:修改商品模拟数据,使其与用户端商品信息保持一致**
- 商品数据应使用用户端 mockGoodsList 中的商品数据包括商品ID、商品名称、图片、价格、库存、销量等
- 商品分类应与用户端商品中的 categoryId 和 categoryName 保持一致
### 商家端全局文本修改
- 商家端贷款协助页面标题"贷款辅助材料"修改为"辅助贷款材料"
### 所有端模拟数据补充
- 所有端添加"驳回要求补充资料"状态的模拟数据
## Impact
### Affected Specs
- `specs/loan-audit` (新建能力)
### Affected Code
- `src/pagesBank/audit/list.vue` - 银行端审核列表
- `src/pagesBank/audit/detail.vue` - 银行端审核详情
- `src/pages/me/loan-application-records.vue` - 用户端申请记录
- `src/pagesMerchant/loan/assist.vue` - 商家端贷款协助
- `src/pagesMerchant/order/list.vue` - 商家端订单管理
- `src/pagesMerchant/goods/list.vue` - 商家端商品管理
- `src/mock/loan-application.ts` - 贷款申请模拟数据
- `src/pagesMerchant/mock/order.ts` - 商家端订单模拟数据
- `src/pagesMerchant/mock/goods.ts` - 商家端商品模拟数据
- `src/api/loan.ts` - 贷款相关API可能需要扩展
- `src/typings/loan.ts` - 贷款类型定义(可能需要扩展)
- `src/typings/mall.ts` - 商城类型定义(可能需要扩展)

View File

@@ -0,0 +1,209 @@
## ADDED Requirements
### Requirement: 银行端审核列表多状态展示
银行端审核列表页面 SHALL 显示包含所有贷款状态的申请记录包括SUBMITTED新申请、ACCEPTED已受理、INVESTIGATING调查中、REPORTED待审批、APPROVED已通过、REJECTED已拒绝、SIGNED已签约、DISBURSED已放款、REJECTED_REQUIRE_SUPPLEMENT驳回要求补充资料。页面 SHALL 提供状态筛选 Tab可快速切换查看不同状态的申请记录。
#### Scenario: 银行审核员查看审核列表
- **WHEN** 银行审核员访问审核列表页面
- **THEN** 页面 SHALL 显示不同状态的贷款申请记录
- **AND** 每条记录 SHALL 显示状态标签,使用不同颜色区分状态
- **AND** 页面 SHALL 提供状态筛选 Tab 组件
- **AND** 用户可以通过 Tab 切换查看特定状态的申请
- **AND** 状态标签 SHALL 显示中文状态文本(如"已拒绝"而非"rejected"
#### Scenario: 银行审核员使用状态筛选 Tab
- **WHEN** 银行审核员点击状态筛选 Tab
- **THEN** 页面 SHALL 过滤显示对应状态的申请记录
- **AND** Tab SHALL 高亮显示当前选中的状态
- **AND** 切换 Tab SHALL 不影响其他筛选条件
#### Scenario: 银行审核员查看驳回要求补充资料状态
- **WHEN** 银行审核员查看审核列表中的"驳回要求补充资料"状态
- **THEN** 状态标签 SHALL 正确显示该状态
- **AND** 状态标签 SHALL 使用正确的样式和颜色
### Requirement: 用户端显示银行受理人信息
用户端助贷申请记录页面 SHALL 在处理中状态的申请记录中显示银行端受理人的姓名和手机号码,方便用户联系业务处理人员。
#### Scenario: 用户查看处理中的贷款申请
- **WHEN** 用户查看状态为"处理中"的贷款申请记录
- **THEN** 页面 SHALL 显示银行受理人的姓名和手机号码
- **AND** 用户可以点击手机号码直接拨打联系
#### Scenario: 用户查看非处理中的贷款申请
- **WHEN** 用户查看状态为"已完成"或"待提交"的贷款申请记录
- **THEN** 页面 SHALL 不显示银行受理人信息
#### Scenario: 用户查看驳回要求补充资料的贷款申请
- **WHEN** 用户查看状态为"驳回要求补充资料"的贷款申请记录
- **THEN** 页面 SHALL 显示该状态
- **AND** 状态标签 SHALL 使用正确的样式和颜色
### Requirement: 商家端贷款协助页面展示
商家端贷款协助页面 SHALL 显示不同状态的贷款申请,数据 SHALL 与银行端保持一致。页面 SHALL 提供状态筛选 Tab可快速切换查看不同状态的申请记录。页面标题 SHALL 显示为"辅助贷款材料"。
#### Scenario: 商家查看贷款协助列表
- **WHEN** 商家查看贷款协助列表
- **THEN** 列表 SHALL 包含不同状态的贷款申请
- **AND** 数据 SHALL 与银行端审核列表保持一致
- **AND** 页面标题 SHALL 显示为"辅助贷款材料"
#### Scenario: 商家使用状态筛选 Tab
- **WHEN** 商家点击状态筛选 Tab
- **THEN** 页面 SHALL 过滤显示对应状态的申请记录
- **AND** Tab SHALL 高亮显示当前选中的状态
- **AND** 切换 Tab SHALL 不影响其他筛选条件
#### Scenario: 商家查看驳回要求补充资料的贷款申请
- **WHEN** 商家查看状态为"驳回要求补充资料"的贷款申请记录
- **THEN** 页面 SHALL 显示该状态
- **AND** 状态标签 SHALL 使用正确的样式和颜色
### Requirement: 商家端显示申请进度及负责人信息
商家端贷款协助页面 SHALL 显示申请进度。已执行的进度 SHALL 显示负责人姓名和手机号码,未执行的进度 SHALL 不显示负责人信息。
#### Scenario: 商家查看贷款申请进度
- **WHEN** 商家查看贷款协助页面
- **THEN** 页面 SHALL 显示申请进度列表
- **AND** 已执行的进度 SHALL 显示负责人姓名和手机号码
- **AND** 未执行的进度 SHALL 不显示负责人信息
- **AND** 商家可以点击已执行进度的手机号码直接拨打联系
#### Scenario: 商家查看未执行的进度
- **WHEN** 商家查看贷款申请进度中的未执行进度项
- **THEN** 进度项 SHALL 不显示负责人姓名和手机号码
- **AND** 进度项 SHALL 显示进度步骤名称和时间(如果有)
### Requirement: 银行端审核详情征信查询
银行端审核详情页面 SHALL 提供征信信息查询功能,通过弹窗模拟远程查询征信信息,与平台信用评估功能保持一致。
#### Scenario: 银行审核员查询征信信息
- **WHEN** 银行审核员点击"查询征信"按钮
- **THEN** 系统 SHALL 弹出征信信息查询弹窗
- **AND** 弹窗 SHALL 显示模拟的征信查询结果
- **AND** 弹窗 SHALL 包含加载状态提示
- **AND** 查询完成后,刷新按钮 SHALL 隐藏
#### Scenario: 银行审核员查看征信查询状态
- **WHEN** 征信信息查询已完成
- **THEN** 刷新按钮 SHALL 不再显示
- **AND** 页面 SHALL 显示查询结果
### Requirement: 银行端审核详情信用评估分数
银行端审核详情页面 SHALL 显示平台信用评估分数,并附带免责声明:"仅供参考,不构成专业建议,实际应用请以权威数据为准。"
#### Scenario: 银行审核员查看信用评估分数
- **WHEN** 银行审核员查看贷款审核详情
- **THEN** 页面 SHALL 显示平台信用评估分数
- **AND** 页面 SHALL 显示免责声明:"仅供参考,不构成专业建议,实际应用请以权威数据为准。"
- **AND** 免责声明 SHALL 使用醒目的样式展示
#### Scenario: 银行审核员刷新信用评估分数
- **WHEN** 银行审核员点击刷新按钮获取信用评估分数
- **THEN** 系统 SHALL 显示加载状态
- **AND** 评估完成后,刷新按钮 SHALL 隐藏
- **AND** 页面 SHALL 显示评估分数
### Requirement: 银行端审核详情状态中文显示
银行端审核详情页面 SHALL 显示中文状态文本,而非英文状态代码。
#### Scenario: 银行审核员查看贷款状态
- **WHEN** 银行审核员查看贷款审核详情
- **THEN** 状态标签 SHALL 显示中文状态文本(如"已拒绝"而非"rejected"
- **AND** 所有状态 SHALL 使用统一的中文翻译
### Requirement: 银行端审核详情关联商家信息
银行端审核详情页面 SHALL 显示关联商家信息,商家相关附件 SHALL 使用 src/static/fb 目录中的图片资源。商家信息 SHALL 与用户端商品数据保持一致。
#### Scenario: 银行审核员查看关联商家信息
- **WHEN** 银行审核员查看贷款审核详情
- **THEN** 页面 SHALL 显示关联商家列表
- **AND** 每个商家 SHALL 显示商家名称、logo、最后交易时间
- **AND** 商家相关附件 SHALL 使用 src/static/fb 目录中的图片资源
- **AND** 商家信息 SHALL 与用户端商品数据中的商家信息一致
#### Scenario: 银行审核员预览商家附件
- **WHEN** 银行审核员点击商家附件图片
- **THEN** 系统 SHALL 打开图片预览功能
### Requirement: 银行端审核详情用户订单信息
银行端审核详情页面 SHALL 显示用户在商城的消费订单信息,包括订单号、商品名称、购买数量、金额等。
#### Scenario: 银行审核员查看用户订单信息
- **WHEN** 银行审核员查看贷款审核详情
- **THEN** 页面 SHALL 显示用户的消费订单列表
- **AND** 每条订单 SHALL 显示订单号、商品名称、购买数量、金额
- **AND** 订单 SHALL 显示下单时间和订单状态
- **AND** 订单中的商品信息 SHALL 与用户端商品数据一致
#### Scenario: 银行审核员查看订单详情
- **WHEN** 银行审核员点击订单项
- **THEN** 系统 SHALL 显示订单详细信息
- **AND** 详细信息 SHALL 包含商品图片、规格、价格等
### Requirement: 商家端订单数据一致性
商家端订单管理页面的模拟数据 SHALL 与用户端商品信息保持一致。订单中的商品 SHALL 使用用户端 mockGoodsList 中的商品数据。
#### Scenario: 商家查看订单列表
- **WHEN** 商家查看订单管理页面
- **THEN** 订单列表 SHALL 显示订单信息
- **AND** 订单中的商品 ID SHALL 与用户端商品 ID 一致
- **AND** 订单中的商品名称、图片、价格 SHALL 与用户端商品数据一致
- **AND** 订单中的商家信息 SHALL 与用户端商品中的 shopId 和 shopName 一致
#### Scenario: 商家查看订单详情
- **WHEN** 商家查看订单详情
- **THEN** 订单详情 SHALL 显示完整订单信息
- **AND** 商品信息 SHALL 与用户端商品数据保持一致
### Requirement: 商家端商品数据一致性
商家端商品管理页面的模拟数据 SHALL 与用户端商品信息保持一致。商品数据 SHALL 使用用户端 mockGoodsList 中的商品数据。
#### Scenario: 商家查看商品列表
- **WHEN** 商家查看商品管理页面
- **THEN** 商品列表 SHALL 显示商品信息
- **AND** 商品 ID、名称、图片、价格、库存、销量 SHALL 与用户端商品数据一致
- **AND** 商品分类信息 SHALL 与用户端商品中的 categoryId 和 categoryName 一致
#### Scenario: 商家查看商品详情
- **WHEN** 商家查看商品详情
- **THEN** 商品详情 SHALL 显示完整商品信息
- **AND** 商品信息 SHALL 与用户端商品数据保持一致
### Requirement: 商家端页面标题修改
商家端贷款协助页面标题 SHALL 显示为"辅助贷款材料"。
#### Scenario: 商家查看贷款协助页面
- **WHEN** 商家访问贷款协助页面
- **THEN** 页面标题 SHALL 显示"辅助贷款材料"
### Requirement: 所有端驳回要求补充资料状态
所有端(银行端、用户端、商家端)的模拟数据 SHALL 包含"驳回要求补充资料"状态。
#### Scenario: 银行端查看驳回要求补充资料状态
- **WHEN** 银行审核员查看审核列表
- **THEN** 列表 SHALL 包含"驳回要求补充资料"状态的申请
- **AND** 状态标签 SHALL 正确显示该状态
#### Scenario: 用户端查看驳回要求补充资料状态
- **WHEN** 用户查看申请记录
- **THEN** 列表 SHALL 包含"驳回要求补充资料"状态的申请
- **AND** 状态标签 SHALL 正确显示该状态
#### Scenario: 商家端查看驳回要求补充资料状态
- **WHEN** 商家查看贷款协助列表
- **THEN** 列表 SHALL 包含"驳回要求补充资料"状态的申请
- **AND** 状态标签 SHALL 正确显示该状态

View File

@@ -0,0 +1,114 @@
## 1. 数据模型扩展
- [x] 1.1 扩展 `LoanApplication` 类型定义添加银行受理人信息字段handlerName、handlerPhone
- [x] 1.2 扩展 `LoanApplicationRecord` 类型定义,添加银行受理人信息字段
- [x] 1.3 扩展商家端贷款列表项类型,添加银行受理人信息字段
- [x] 1.4 扩展 `LoanApplication` 类型定义添加用户订单信息字段userOrders
- [x] 1.5 扩展商家端订单类型定义,确保与用户端商品信息一致
## 2. 模拟数据优化
- [x] 2.1 优化银行端审核列表模拟数据,确保包含所有贷款状态
- [x] 2.2 优化用户端申请记录模拟数据,为处理中状态添加银行受理人信息
- [x] 2.3 优化商家端贷款协助模拟数据,确保包含不同状态和银行受理人信息
- [x] 2.4 添加征信信息模拟数据
- [x] 2.5 添加信用评估分数模拟数据
- [x] 2.6 添加用户商城消费订单模拟数据到贷款申请详情
- [x] 2.7 修改商家端订单模拟数据使用用户端商品信息mockGoodsList
- [x] 2.8 修改商家端商品模拟数据使用用户端商品信息mockGoodsList
## 3. 银行端审核列表页面(/pagesBank/audit/list
- [x] 3.1 更新模拟数据,确保包含所有贷款状态
- [x] 3.2 验证列表页面能正确显示不同状态的申请记录
- [x] 3.3 验证状态标签颜色和文本显示正确
- [x] 3.4 添加状态筛选 Tab 组件,支持快速切换查看不同状态的申请记录
- [x] 3.5 实现 Tab 切换逻辑,根据选中状态过滤显示的申请记录
- [x] 3.6 验证 Tab 切换功能正常工作
## 4. 用户端申请记录页面(/pages/me/loan-application-records
- [x] 4.1 在处理中状态的申请记录卡片中添加银行受理人信息展示区域
- [x] 4.2 实现受理人姓名和手机号码的显示
- [x] 4.3 实现手机号码点击拨打功能
- [x] 4.4 确保非处理中状态不显示受理人信息
- [x] 4.5 在详情弹窗中也添加银行受理人信息展示
## 5. 商家端贷款协助页面(/pagesMerchant/loan/assist
- [x] 5.1 更新模拟数据,确保包含不同状态的贷款申请
- [x] 5.2 确保商家端数据与银行端保持一致
- [x] 5.3 移除银行受理人信息卡片(已无此卡片)
- [x] 5.4 显示申请进度及每个进度的负责人姓名和手机号码(仅已执行的进度显示)
- [x] 5.5 修改页面标题,将"贷款辅助材料"显示为"辅助贷款材料"
- [x] 5.6 添加状态筛选 Tab 组件,支持快速切换查看不同状态的申请记录
- [x] 5.7 实现 Tab 切换逻辑,根据选中状态过滤显示的申请记录
- [x] 5.8 验证 Tab 切换功能正常工作
- [x] 5.9 验证未执行的进度不显示负责人信息
## 6. 银行端审核详情页面(/pagesBank/audit/detail
- [x] 6.1 添加"查询征信"按钮
- [x] 6.2 实现征信查询弹窗组件
- [x] 6.3 实现征信信息模拟查询功能(包含加载状态)
- [x] 6.4 添加平台信用评估分数展示区域
- [x] 6.5 添加免责声明:"仅供参考,不构成专业建议,实际应用请以权威数据为准。"
- [x] 6.6 优化关联商家信息展示
- [x] 6.7 更新商家附件图片路径,使用 src/static/fb 目录中的资源
- [x] 6.8 实现平台信用评估和征信查询功能完成后隐藏刷新按钮
- [x] 6.9 修改状态标签显示中文状态文本(如"已拒绝"而非"rejected"
- [x] 6.10 优化查询征信功能,使其与平台信用评估功能保持一致
- [x] 6.11 添加用户商城消费订单信息展示区域
- [x] 6.12 实现订单列表展示(订单号、商品名称、数量、金额等)
- [x] 6.13 验证订单信息正确显示
## 7. 商家端订单管理页面(/pagesMerchant/order/list
- [x] 7.1 修改订单模拟数据使用用户端商品信息mockGoodsList
- [x] 7.2 确保订单中的商品ID与用户端商品ID一致
- [x] 7.3 确保订单中的商品名称、图片、价格与用户端商品一致
- [x] 7.4 验证订单列表正确显示商品信息
## 8. 商家端商品管理页面(/pagesMerchant/goods/list
- [x] 8.1 修改商品模拟数据使用用户端商品信息mockGoodsList
- [x] 8.2 确保商品ID、名称、图片、价格、库存、销量与用户端一致
- [x] 8.3 确保商品分类信息与用户端一致
- [x] 8.4 验证商品列表正确显示
## 9. 商家端页面标题修改
- [x] 9.1 修改商家端贷款协助页面标题,将"贷款辅助材料"显示为"辅助贷款材料"
- [x] 9.2 验证修改后的标题显示正确
## 10. 所有端模拟数据补充
- [x] 10.1 添加"驳回要求补充资料"状态到模拟数据
- [x] 10.2 确保银行端、用户端、商家端都包含该状态的模拟数据
- [x] 10.3 验证各端能正确显示"驳回要求补充资料"状态
## 11. 静态资源准备
- [x] 11.1 确认 src/static/fb 目录存在
- [x] 11.2 准备商家附件图片资源(如需要)
## 12. 测试验证
- [x] 12.1 验证银行端审核列表显示所有状态
- [x] 12.2 验证用户端处理中申请显示银行受理人信息
- [x] 12.3 验证商家端已移除银行受理人信息卡片
- [x] 12.4 验证商家端未执行的进度不显示负责人信息
- [x] 12.5 验证银行端审核列表状态筛选 Tab 功能
- [x] 12.6 验证商家端贷款协助页面状态筛选 Tab 功能
- [x] 12.7 验证商家端页面标题显示为"辅助贷款材料"
- [x] 12.8 验证银行端审核详情征信查询功能
- [x] 12.9 验证银行端审核详情信用评估分数显示
- [x] 12.10 验证商家附件图片正确加载
- [x] 12.11 验证用户端手机号码拨打功能
- [x] 12.12 验证平台信用评估和征信查询完成后刷新按钮隐藏
- [x] 12.13 验证状态标签显示中文状态文本
- [x] 12.14 验证商家端显示申请进度及已执行进度的负责人信息
- [x] 12.15 验证所有端包含"驳回要求补充资料"状态
- [x] 12.16 验证银行端审核详情显示用户商城消费订单信息
- [x] 12.17 验证商家端订单数据与用户端商品信息一致
- [x] 12.18 验证商家端商品数据与用户端商品信息一致

View File

@@ -0,0 +1,474 @@
# Design: 集成保险流程到贷款业务
## Context
本设计涉及银行端、保险端和政务端三个系统的协同,实现贷款业务中的保险购买、核保、理赔审核和不良贷款监管的完整流程。
**关键约束**
- 保险购买是银行端在贷款审核通过后的可选操作,与用户端无关
- 银行选择保险产品后,自动发送给对应的保险公司
- 银行端发起理赔申请并上传材料到保险公司
- 政务端可以看到银行端的所有贷款信息,包括不良贷款
**本次优化重点**
- 优化银行端审核详情页面的保险功能交互
- 实现投保和理赔的页面跳转
- 流程步骤条增加保险节点
- 快捷入口位置调整
## Goals / Non-Goals
**Goals**:
- 建立银行与保险公司之间的投保和核保流程
- 实现银行向保险公司提交理赔申请的功能
- 支持保险公司进行核保和理赔审核
- 为政务端提供完整的贷款业务流程视图,包括保险和审批信息
- 确保各端数据的一致性和可追溯性
- 优化银行端保险功能的用户体验
**Non-Goals**:
- 不涉及用户端直接购买保险
- 不涉及保险公司主动向银行推送产品
- 不涉及政务端对贷款的审批(仅查看)
- 不涉及保险产品的具体定价和费率计算
## Decisions
### 1. 数据模型设计
#### 1.1 保险相关数据实体
```typescript
// 保险公司
interface InsuranceCompany {
id: string;
name: string;
contactInfo: string;
status: 'active' | 'inactive';
}
// 保险产品
interface InsuranceProduct {
id: string;
companyId: string;
name: string;
type: 'housing_loan' | 'business_credit' | 'other';
description: string;
minAmount: number;
maxAmount: number;
status: 'active' | 'inactive';
}
// 投保申请
interface InsuranceApplication {
id: string;
loanId: string;
bankId: string;
companyId: string;
productId: string;
customerInfo: {
name: string;
idNumber: string;
creditScore: number;
loanAmount: number;
loanTerm: number;
};
insuranceAmount: number;
insuranceTerm: number;
status: 'pending' | 'approved' | 'rejected';
createdAt: Date;
reviewedAt?: Date;
reviewedBy?: string;
rejectionReason?: string;
}
// 保险单
interface InsurancePolicy {
id: string;
applicationId: string;
policyNumber: string;
companyId: string;
bankId: string;
loanId: string;
productId: string;
insuranceAmount: number;
insuranceTerm: number;
startDate: Date;
endDate: Date;
status: 'active' | 'expired' | 'cancelled';
issuedAt: Date;
}
// 理赔申请
interface ClaimApplication {
id: string;
policyId: string;
loanId: string;
bankId: string;
companyId: string;
claimAmount: number;
claimReason: string;
materials: string[]; // 文件URL列表
status: 'pending' | 'approved' | 'rejected';
submittedAt: Date;
reviewedAt?: Date;
reviewedBy?: string;
rejectionReason?: string;
payoutAmount?: number;
payoutDate?: Date;
}
```
#### 1.2 贷款与保险关联
```typescript
// 扩展现有贷款实体
interface Loan {
id: string;
// ... 现有字段
insuranceApplicationId?: string; // 可选
insurancePolicyId?: string; // 可选
claimApplicationIds: string[]; // 理赔申请列表
isBadLoan: boolean; // 是否为不良贷款
}
```
### 2. 业务流程设计
#### 2.1 保险购买流程
```mermaid
sequenceDiagram
participant Bank as 银行端
participant System as 系统后端
participant Insurance as 保险端
Bank->>System: 1. 贷款审核通过
Bank->>System: 2. 选择购买保险(可选)
Bank->>System: 3. 选择保险公司和产品
Bank->>System: 4. 确定保险金额和期限
System->>System: 5. 创建投保申请
System->>Insurance: 6. 自动发送投保申请
Insurance->>Insurance: 7. 核保人员审核
alt 核保通过
Insurance->>System: 8a. 返回核保通过
System->>System: 9a. 生成保险单
System->>Bank: 10a. 通知投保成功
else 核保拒绝
Insurance->>System: 8b. 返回拒绝原因
System->>Bank: 10b. 通知投保失败
end
```
#### 2.2 理赔申请流程
```mermaid
sequenceDiagram
participant Bank as 银行端
participant System as 系统后端
participant Insurance as 保险端
Bank->>System: 1. 发起理赔申请
Bank->>System: 2. 上传理赔材料
System->>System: 3. 创建理赔申请记录
System->>Insurance: 4. 发送理赔申请
Insurance->>Insurance: 5. 审核理赔材料
alt 审核通过
Insurance->>System: 6a. 返回审核通过
Insurance->>System: 7a. 执行赔付
System->>Bank: 8a. 通知理赔成功
else 审核拒绝
Insurance->>System: 6b. 返回拒绝原因
System->>Bank: 8b. 通知理赔失败
end
```
#### 2.3 政务端查看流程
```mermaid
sequenceDiagram
participant Government as 政务端
participant System as 系统后端
Government->>System: 1. 请求贷款列表
System->>Government: 2. 返回贷款信息(含保险信息)
Government->>System: 3. 请求贷款详情
System->>Government: 4. 返回完整信息:
- 用户信息
- 贷款信息
- 保险信息(投保申请、保险单)
- 理赔信息(理赔申请、审核结果)
- 审批流程记录
```
### 3. API 接口设计
#### 3.1 银行端接口
```typescript
// 获取合作保险公司列表
GET /api/bank/insurance/companies
// 获取保险产品列表
GET /api/bank/insurance/products?companyId={companyId}
// 创建投保申请
POST /api/bank/insurance/applications
{
loanId: string;
companyId: string;
productId: string;
insuranceAmount: number;
insuranceTerm: number;
}
// 获取投保申请状态
GET /api/bank/insurance/applications/{id}
// 创建理赔申请
POST /api/bank/insurance/claims
{
policyId: string;
loanId: string;
claimAmount: number;
claimReason: string;
materials: File[];
}
// 获取理赔申请状态
GET /api/bank/insurance/claims/{id}
```
#### 3.2 保险端接口
```typescript
// 获取待核保申请列表
GET /api/insurance/applications?status=pending
// 获取投保申请详情
GET /api/insurance/applications/{id}
// 核保审核
POST /api/insurance/applications/{id}/review
{
approved: boolean;
rejectionReason?: string;
}
// 获取待理赔审核列表
GET /api/insurance/claims?status=pending
// 获取理赔申请详情
GET /api/insurance/claims/{id}
// 理赔审核
POST /api/insurance/claims/{id}/review
{
approved: boolean;
rejectionReason?: string;
payoutAmount?: number;
}
```
#### 3.3 政务端接口
```typescript
// 获取贷款列表(含保险信息)
GET /api/government/loans?includeInsurance=true
// 获取贷款详情(含完整业务流程)
GET /api/government/loans/{id}?full=true
// 获取不良贷款列表
GET /api/government/loans/bad
```
### 4. 页面结构设计
#### 4.1 银行端页面
```
src/pagesBank/insurance/
├── application/
│ ├── create.vue # 创建投保申请
│ └── detail.vue # 投保申请详情
├── claim/
│ ├── create.vue # 创建理赔申请
│ └── list.vue # 理赔申请列表
└── policy/
└── detail.vue # 保险单详情
```
#### 4.2 保险端页面
```
src/pagesInsurance/underwriting/
├── list.vue # 待核保申请列表
└── detail.vue # 核保申请详情
src/pagesInsurance/claim-review/
├── list.vue # 待理赔审核列表
└── detail.vue # 理赔审核详情
```
#### 4.3 政务端页面
```
src/pagesGovernment/bank/
├── list.vue # 修改:显示保险信息标识
└── detail.vue # 修改:显示完整业务流程信息
```
### 5. 状态机设计
#### 5.1 投保申请状态机
```
pending → approved → policy_issued
pending → rejected
```
#### 5.2 理赔申请状态机
```
pending → approved → paid
pending → rejected
```
### 6. 权限控制
- **银行端**:只能查看和操作自己发起的投保和理赔申请
- **保险端**:只能查看和操作分配给自己的核保和理赔审核任务
- **政务端**:只读权限,可查看所有贷款信息
## UI/UX 优化设计
### 6.1 审核详情页面优化
#### 6.1.1 保险信息展示
根据贷款状态动态展示不同的保险信息:
- **未投保状态**status === 'DISBURSED' && !hasInsurance
- 显示"购买保险"按钮
- 不显示保单信息
- **已投保状态**hasInsurance
- 显示保单信息(保险公司、保单号、保险金额、保险期限)
- 显示"申请理赔"按钮
- **投保中状态**insuranceStatus === 'pending'
- 显示投保申请进度
- 不显示保单号(还未生成)
- **已理赔状态**hasClaim
- 显示保单信息
- 显示理赔记录
#### 6.1.2 投保申请跳转
```typescript
function handleBuyInsurance() {
const loanId = detail.value.id
const loanAmount = detail.value.amount
const loanTerm = detail.value.term * 12 // 转换为月
uni.navigateTo({
url: `/pagesBank/insurance/application/create?loanId=${loanId}&loanAmount=${loanAmount}&loanTerm=${loanTerm}`,
})
}
```
#### 6.1.3 理赔申请跳转
```typescript
function handleApplyClaim() {
const loanId = detail.value.id
const policyId = detail.value.insurancePolicy.id
const policyNumber = detail.value.insurancePolicy.policyNumber
uni.navigateTo({
url: `/pagesBank/insurance/claim/create?loanId=${loanId}&policyId=${policyId}&policyNumber=${policyNumber}`,
})
}
```
### 6.2 流程步骤条优化
#### 6.2.1 步骤定义
```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: '放款' },
]
```
#### 6.2.2 条件渲染
```vue
<view
v-for="(step, index) in visibleSteps"
:key="step.key"
class="step-item"
:class="{ active: index <= currentStepIndex, current: index === currentStepIndex }"
>
<!-- 步骤内容 -->
</view>
```
### 6.3 快捷入口迁移
#### 6.3.1 从审核列表移除
移除 `/pagesBank/audit/list.vue` 中的保险功能快捷入口代码块。
#### 6.3.2 添加到工作台首页
`/pagesBank/dashboard/index.vue``quickActions` 数组中添加:
```typescript
const quickActions = [
{ icon: 'i-carbon-task-approved', label: '待审核', path: '/pagesBank/audit/list' },
{ icon: 'i-carbon-group', label: '客户管理', path: '/pagesBank/customer/list' },
{ icon: 'i-carbon-calendar', label: '拜访计划', path: '/pagesBank/visit/list' },
{ icon: 'i-carbon-add', label: '创建拜访', path: '/pagesBank/visit/create' },
{ icon: 'i-carbon-document-download', label: '报表', path: '/pagesBank/report/list' },
{ icon: 'i-carbon-security', label: '投保管理', path: '/pagesBank/insurance/application/list' },
{ icon: 'i-carbon-money', label: '理赔管理', path: '/pagesBank/insurance/claim/list' },
{ icon: 'i-carbon-settings', label: '设置', path: '/pagesBank/me/index' },
]
```
## Risks / Trade-offs
| Risk | Mitigation |
|------|-----------|
| 保险公司核保时间过长影响贷款放款 | 设置核保超时机制,超时后允许银行取消投保 |
| 理赔材料审核标准不统一 | 在系统中提供审核标准文档和模板 |
| 跨系统数据同步延迟 | 使用消息队列确保数据最终一致性 |
| 政务端数据量过大影响性能 | 实现分页和懒加载,支持按条件筛选 |
## Migration Plan
1. **Phase 0**: 创建数据表和 API 接口
2. **Phase 2**: 实现银行端保险购买功能
3. **Phase 3**: 实现保险端核保功能
4. **Phase 4**: 实现银行端理赔申请功能
5. **Phase 5**: 实现保险端理赔审核功能
6. **Phase 6**: 扩展政务端查看功能
**Rollback**: 如果需要回滚,可以禁用保险相关功能,贷款流程将恢复到不包含保险的状态。
## Open Questions
1. 保险公司是否需要支持多家银行同时接入?
2. 理赔赔付金额的计算规则是什么?
3. 不良贷款的判定标准是什么(逾期天数、金额等)?
4. 是否需要支持保险单的转让或变更?
5. 投保节点是否需要在所有贷款流程中都显示?

View File

@@ -0,0 +1,288 @@
# Change: 集成保险流程到贷款业务(优化版)
## Why
当前贷款业务流程中缺少保险环节,无法实现风险共担机制。银行需要在贷款审核通过后选择为贷款购买保险(可选),保险公司进行核保,并在发生逾期时进行理赔。同时,政务端需要能够查看完整的贷款业务流程信息,包括保险和审批记录。这个变更将完善金融生态的风险管理体系。
## What Changes
### 本次优化内容integrate-insurance-flow
**银行端优化**
1. **审核详情页面投保流程优化**
- 点击"购买保险"跳转到保险公司选择页面
- 选择保险公司后,跳转到保险产品选择页面
- 选择产品后,填充投保申请创建页面的表单
- 实现完整的多步导航流程
2. **新增页面**
2.1 **投保申请列表页面** (`src/pagesBank/insurance/application/list.vue`)
- 显示所有投保申请列表
- 支持按状态筛选(全部、待审核、已通过、已拒绝)
- 支持搜索功能按ID/公司名称/产品名称/保单号)
- 支持分页加载每页20条
- 显示保险公司、保单号、保险金额、状态、提交时间
- 点击跳转到投保申请详情页
- 下拉刷新和上拉加载更多
2.2 **保险公司选择页面** (`src/pagesBank/insurance/company/select.vue`)
- 独立展示合作保险公司列表
- 支持搜索公司名称和联系方式
- 显示保险公司详细信息(名称、联系方式、合作状态)
- 显示已合作产品数量
- 点击选择后带参数跳转到产品选择页面
- 返回按钮返回投保申请页面
2.3 **保险产品选择页面** (`src/pagesBank/insurance/product/select.vue`)
- 独立展示保险产品列表
- 支持搜索产品名称、描述、类型
- 显示产品详细信息(名称、类型、描述、金额范围)
- 显示所属保险公司
- 支持查看产品详情弹窗
- 点击选择后返回投保申请页面并传递产品信息
3. **工作台首页快捷入口**
- 投保管理:跳转到 `/pagesBank/insurance/application/list`
- 理赔管理:跳转到 `/pagesBank/insurance/claim/list`
### 原始功能范围
- **银行端**
- 在贷款审核通过后添加可选的保险购买流程
- 支持选择合作保险公司和保险产品
- 支持确定保险类型、保险金额和保险期限
- 添加理赔申请功能,支持上传理赔材料
- 贷款信息(包括不良贷款)对政务端可见
- **保险端**
- 添加核保流程,接收银行提交的投保申请
- 支持核保人员查看投保单和银行提供的客户信息
- 支持核保通过(出具保险单)和拒绝(返回拒绝原因)
- 添加理赔审核功能,审核银行提交的理赔材料
- **政务端**
- 查看完整的贷款业务流程信息
- 查看用户信息、保险信息和相关审批记录
- 识别和查看不良贷款信息
## Impact
- **Affected specs**:
- 新增 `bank-insurance-integration` 能力
- 新增 `insurance-underwriting` 能力
- 新增 `insurance-claim-review` 能力
- 新增 `government-bad-loans` 能力
- 新增 `insurance-navigation` 能力(本次优化)
- 修改 `bank-insurance-ui` 能力(本次优化)
- **Affected code**:
- `src/pagesBank/audit/detail.vue` - 审核详情页面(本次优化投保流程)
- `src/pagesBank/audit/list.vue` - 审核列表页面(移除快捷入口)
- `src/pagesBank/dashboard/index.vue` - 工作台首页(快捷入口已存在)
- `src/pagesBank/insurance/application/list.vue` - 投保申请列表页面(新增)
- `src/pagesBank/insurance/company/select.vue` - 保险公司选择页面(新增)
- `src/pagesBank/insurance/product/select.vue` - 保险产品选择页面(新增)
- `src/pagesBank/insurance/application/create.vue` - 投保申请创建页面(支持参数)
- `src/pagesBank/` - 银行端页面(保险购买、理赔申请)
- `src/pagesInsurance/` - 保险端页面(核保、理赔审核)
- `src/pagesGovernment/` - 政务端页面(不良贷款查看)
- `src/api/insurance.ts` - API 接口定义
- 相关的 mock 数据和类型定义
## Change Impact
- **Spec**: `openspec/changes/integrate-insurance-flow/design.md`
- **Bank End**:
- `src/pagesBank/audit/detail.vue`: 优化保险信息展示,实现投保多步导航
- `src/pagesBank/audit/list.vue`: 移除保险功能快捷入口
- `src/pagesBank/dashboard/index.vue`: 添加保险功能快捷入口(已存在)
- `src/pagesBank/insurance/application/list.vue`: 新增投保申请列表页面
- `src/pagesBank/insurance/company/select.vue`: 新增保险公司选择页面
- `src/pagesBank/insurance/product/select.vue`: 新增保险产品选择页面
- **Insurance End**:
- `src/pagesInsurance/policy/list.vue`: 添加核保和理赔审核快捷入口
- `src/pagesInsurance/claim/list.vue`: 优化理赔列表展示,支持查看保单和更多状态
- `src/pagesInsurance/underwriting/list.vue`: 添加模拟数据,支持展示多种核保状态
- `src/pagesInsurance/claim-review/list.vue`: 添加模拟数据,支持展示多种理赔审核状态
- `src/api/insurance.ts`:
- 添加保险端核保和理赔审核的模拟数据
- 扩展 `mockInsurancePolicies` 数组至12条实现数据多样性
- **Government End**:
- `src/pagesGovernment/bank/detail.vue`: 扩充 Mock 数据,支持贷款列表卡片展开详细信息
- **API**:
- `src/api/insurance.ts`: 添加保险端核保和理赔审核的模拟数据
## Implementation Plan
### Phase 0: UI/UX Enhancement已完成 + 本次优化)
- [x] Bank: Update Audit List with Insurance tags and shortcuts
- [x] Bank: Update Audit Detail with Insurance card and actions
- [x] Bank: Create Insurance Application List page
- [x] Bank: Create Company Selection page
- [x] Bank: Create Product Selection page
- [x] Bank: Optimize Audit Detail navigation flow
- [x] Insurance: Update Policy List with Underwriting/Claim shortcuts
- [x] Insurance: Update Claim List with Policy view
- [ ] Insurance: Add mock data for underwriting list本次新增
- [ ] Insurance: Add mock data for claim review list本次新增
- [x] Government: Expand Mock Data and implement collapsible cards
### Phase 1: Database & API
- **Goal**: Establish data models and backend APIs.
- **Tasks**:
- Create tables for insurance companies, products, applications, policies, claims.
- Implement APIs for all roles (Bank, Insurance, Government).
### Phase 2: Frontend Integration
- **Goal**: Integrate APIs into the frontend pages.
- **Tasks**:
- Implement full flows: Purchase -> Underwrite -> Policy -> Claim -> Auditing -> Payout.
- Connect all enhanced UI components to real data.
### Phase 3: Testing & Deployment
- **Goal**: Verify end-to-end flows.
- **Tasks**:
- Integration testing.
- Deployment to staging/prod.
## Page Navigation Flow
```
## 保险端模拟数据设计
### 核保申请模拟数据
为 `src/pagesInsurance/underwriting/list.vue` 添加以下模拟数据:
1. **待审核状态** (pending):
- 投保申请号: IA20250112001
- 银行: 中国工商银行
- 保险公司: 中国人民财产保险股份有限公司
- 保险产品: 个人住房贷款保险
- 客户: 张三(信用评分 750
- 保险金额: 500,000 元
- 保险期限: 120 个月
2. **已通过状态** (approved):
- 投保申请号: IA20250111001
- 银行: 中国工商银行
- 保险公司: 中国平安财产保险股份有限公司
- 保险产品: 小微企业贷款保证保险
- 客户: 李四(信用评分 720
- 保险金额: 800,000 元
- 保险期限: 180 个月
- 核保员: 核保员001
3. **已拒绝状态** (rejected):
- 投保申请号: IA20250110001
- 银行: 中国建设银行
- 保险公司: 中国太平洋财产保险股份有限公司
- 保险产品: 个人消费贷款保险
- 客户: 王五(信用评分 680
- 保险金额: 300,000 元
- 保险期限: 90 个月
- 核保员: 核保员002
- 拒绝原因: 客户信用评分低于产品要求最低值700分
4. **待审核状态** (pending):
- 投保申请号: IA20250109001
- 银行: 中国工商银行
- 保险公司: 中国人民财产保险股份有限公司
- 保险产品: 企业信贷履约保证保险
- 客户: 赵六(信用评分 780
- 保险金额: 600,000 元
- 保险期限: 120 个月
### 理赔审核模拟数据
为 `src/pagesInsurance/claim-review/list.vue` 添加以下模拟数据:
1. **待审核状态** (pending):
- 理赔申请号: CA20250112001
- 银行: 中国工商银行
- 保险单号: POL20250111001
- 保险公司: 中国平安财产保险股份有限公司
- 理赔金额: 400,000 元
- 理赔原因: 借款人逾期超过90天无法偿还贷款本息
- 材料数量: 3 份(逾期还款记录.pdf、催收记录.docx、借款人财务状况.jpg
2. **已通过状态** (approved):
- 理赔申请号: CA20250111001
- 银行: 中国工商银行
- 保险单号: POL20250111001
- 保险公司: 中国平安财产保险股份有限公司
- 理赔金额: 200,000 元
- 赔付金额: 180,000 元
- 理赔原因: 借款人经营困难,申请部分理赔
- 材料数量: 1 份(经营困难证明.pdf
- 审核员: 理赔审核员001
- 赔付日期: 2025-01-12
3. **已拒绝状态** (rejected):
- 理赔申请号: CA20250110001
- 银行: 中国工商银行
- 保险单号: POL20250111001
- 保险公司: 中国平安财产保险股份有限公司
- 理赔金额: 600,000 元
- 理赔原因: 借款人失联,申请全额理赔
- 材料数量: 1 份(失联证明.pdf
- 审核员: 理赔审核员002
- 拒绝原因: 提供的失联证明材料不充分,需要补充公安部门出具的正式证明文件
### 保单模拟数据设计
为 `src/pagesInsurance/policy/list.vue` 添加以下12条保单模拟数据实现数据多样性
**生效中保单 (active)** - 6条
1. 保单号: POL20250111001 | 保险公司: 中国平安 | 产品: 小微企业贷款保证保险 | 保额: 800,000元 | 期限: 180个月
2. 保单号: POL20241220001 | 保险公司: 中国人保 | 产品: 个人住房贷款保险 | 保额: 500,000元 | 期限: 120个月
3. 保单号: POL20241115002 | 保险公司: 中国太保 | 产品: 个人消费贷款保险 | 保额: 300,000元 | 期限: 90个月
4. 保单号: POL20241010003 | 保险公司: 中国人保 | 产品: 企业信贷履约保证保险 | 保额: 1,000,000元 | 期限: 240个月
5. 保单号: POL20240305010 | 保险公司: 中国平安 | 产品: 小微企业贷款保证保险 | 保额: 900,000元 | 期限: 180个月
6. 保单号: POL20240206011 | 保险公司: 中国太保 | 产品: 个人消费贷款保险 | 保额: 250,000元 | 期限: 120个月
**即将到期保单 (expiring)** - 3条
1. 保单号: POL20240905004 | 保险公司: 中国平安 | 产品: 小微企业贷款保证保险 | 保额: 450,000元 | 期限: 120个月
2. 保单号: POL20240805005 | 保险公司: 中国太保 | 产品: 个人消费贷款保险 | 保额: 200,000元 | 期限: 60个月
3. 保单号: POL20240701006 | 保险公司: 中国人保 | 产品: 个人住房贷款保险 | 保额: 350,000元 | 期限: 180个月
**已失效保单 (expired)** - 3条
1. 保单号: POL20240602007 | 保险公司: 中国平安 | 产品: 小微企业贷款保证保险 | 保额: 600,000元 | 期限: 150个月
2. 保单号: POL20240503008 | 保险公司: 中国太保 | 产品: 个人消费贷款保险 | 保额: 150,000元 | 期限: 90个月
3. 保单号: POL20240404009 | 保险公司: 中国人保 | 产品: 企业信贷履约保证保险 | 保额: 750,000元 | 期限: 200个月
### Mock 数据实现位置
模拟数据将在 `src/api/insurance.ts` 中的以下数组中添加:
- `mockInsuranceApplications`: 核保申请模拟数据4条记录
- `mockClaimApplications`: 理赔审核模拟数据3条记录
- `mockInsurancePolicies`: 保险单模拟数据12条记录包含生效中、即将到期、已失效三种状态
审核详情页面 (/pagesBank/audit/detail)
├─→ "购买保险" 按钮
保险公司选择页面 (/pagesBank/insurance/company/select)
├─→ 选择保险公司
保险产品选择页面 (/pagesBank/insurance/product/select)
├─→ 选择保险产品
投保申请创建页面 (/pagesBank/insurance/application/create)
└─→ 提交投保申请
工作台首页 (/pagesBank/dashboard/index)
├─→ "投保管理" → /pagesBank/insurance/application/list
└─→ "理赔管理" → /pagesBank/insurance/claim/list
```

View File

@@ -0,0 +1,138 @@
# bank-insurance-integration Specification Delta
## ADDED Requirements
### Requirement: 保险购买入口
银行端 SHALL 在贷款审核通过后提供保险购买入口,该入口为可选操作。
#### Scenario: 显示保险购买入口
- **WHEN** 银行端用户查看已审核通过的贷款详情
- **THEN** 系统 SHALL 显示"购买保险"按钮
- **AND** 该按钮为可选操作,不强制要求购买
#### Scenario: 跳过保险购买
- **WHEN** 银行端用户选择不购买保险
- **THEN** 系统 SHALL 继续原贷款流程处理
- **AND** 不影响贷款的后续放款流程
### Requirement: 选择合作保险公司
银行端 SHALL 支持从合作保险公司列表中选择保险公司。
#### Scenario: 查看合作保险公司列表
- **WHEN** 银行端用户点击购买保险
- **THEN** 系统 SHALL 显示合作保险公司列表
- **AND** 每个保险公司显示名称、联系方式和状态
#### Scenario: 选择保险公司
- **WHEN** 银行端用户选择一个保险公司
- **THEN** 系统 SHALL 加载该保险公司提供的保险产品列表
### Requirement: 选择保险产品
银行端 SHALL 支持根据贷款类型选择相应的保险产品。
#### Scenario: 显示保险产品列表
- **WHEN** 银行端用户选择保险公司后
- **THEN** 系统 SHALL 显示该保险公司提供的保险产品列表
- **AND** 每个产品显示名称、类型、描述和保险金额范围
#### Scenario: 根据贷款类型筛选产品
- **WHEN** 银行端用户选择保险产品
- **THEN** 系统 SHALL 根据贷款类型推荐相应的保险产品
- **AND** 个人住房贷款推荐住房贷款保险
- **AND** 企业信贷推荐履约保证保险
### Requirement: 确定保险金额和期限
银行端 SHALL 支持确定保险金额和保险期限。
#### Scenario: 设置保险金额
- **WHEN** 银行端用户设置保险金额
- **THEN** 系统 SHALL 验证保险金额不低于抵押物价值
- **AND** 保险金额应在保险产品的最小和最大金额范围内
#### Scenario: 设置保险期限
- **WHEN** 银行端用户设置保险期限
- **THEN** 系统 SHALL 默认保险期限与贷款期限一致
- **AND** 允许用户根据需要调整保险期限
### Requirement: 提交投保申请
银行端 SHALL 支持提交投保申请,系统自动发送给对应的保险公司。
#### Scenario: 提交投保申请
- **WHEN** 银行端用户填写完整的投保信息并提交
- **THEN** 系统 SHALL 创建投保申请记录
- **AND** 系统 SHALL 自动发送投保申请给对应的保险公司
- **AND** 系统 SHALL 显示投保申请已提交的提示
#### Scenario: 投保申请包含银行信息
- **WHEN** 系统发送投保申请给保险公司
- **THEN** 投保申请 SHALL 包含银行相关信息
- **AND** 包含客户的基本信息和贷款信息
- **AND** 包含银行对客户的评估信息
### Requirement: 查看投保申请状态
银行端 SHALL 支持查看投保申请的审核状态。
#### Scenario: 查看待审核状态
- **WHEN** 银行端用户查看投保申请
- **AND** 保险公司尚未审核
- **THEN** 系统 SHALL 显示"待审核"状态
#### Scenario: 查看审核通过状态
- **WHEN** 保险公司核保通过
- **THEN** 系统 SHALL 显示"审核通过"状态
- **AND** 显示保险单信息
#### Scenario: 查看审核拒绝状态
- **WHEN** 保险公司核保拒绝
- **THEN** 系统 SHALL 显示"审核拒绝"状态
- **AND** 显示拒绝原因
### Requirement: 保险单管理
银行端 SHALL 支持查看和管理保险单。
#### Scenario: 查看保险单详情
- **WHEN** 银行端用户点击保险单
- **THEN** 系统 SHALL 显示保险单的完整信息
- **AND** 包括保单号、保险公司、保险金额、保险期限等
#### Scenario: 保险单与贷款关联
- **WHEN** 银行端用户查看贷款详情
- **THEN** 系统 SHALL 显示关联的保险单信息(如果存在)
### Requirement: 理赔申请功能
银行端 SHALL 支持发起理赔申请并上传理赔材料。
#### Scenario: 发起理赔申请
- **WHEN** 银行端用户选择一个保险单并发起理赔申请
- **THEN** 系统 SHALL 显示理赔申请表单
- **AND** 要求填写理赔金额和理赔原因
#### Scenario: 上传理赔材料
- **WHEN** 银行端用户提交理赔申请
- **THEN** 系统 SHALL 要求上传理赔材料
- **AND** 支持上传多个文件
- **AND** 验证文件格式和大小
#### Scenario: 提交理赔申请到保险公司
- **WHEN** 银行端用户提交理赔申请
- **THEN** 系统 SHALL 创建理赔申请记录
- **AND** 系统 SHALL 发送理赔申请给对应的保险公司
- **AND** 系统 SHALL 显示理赔申请已提交的提示
### Requirement: 查看理赔申请状态
银行端 SHALL 支持查看理赔申请的审核状态。
#### Scenario: 查看待审核状态
- **WHEN** 银行端用户查看理赔申请
- **AND** 保险公司尚未审核
- **THEN** 系统 SHALL 显示"待审核"状态
#### Scenario: 查看审核通过状态
- **WHEN** 保险公司理赔审核通过
- **THEN** 系统 SHALL 显示"审核通过"状态
- **AND** 显示赔付金额和赔付日期
#### Scenario: 查看审核拒绝状态
- **WHEN** 保险公司理赔审核拒绝
- **THEN** 系统 SHALL 显示"审核拒绝"状态
- **AND** 显示拒绝原因

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

View File

@@ -0,0 +1,104 @@
# government-bad-loans Specification Delta
## ADDED Requirements
### Requirement: 查看贷款信息
政务端 SHALL 支持查看银行端的所有贷款信息,包括不良贷款。
#### Scenario: 查看贷款列表
- **WHEN** 政务端用户访问贷款列表页面
- **THEN** 系统 SHALL 显示所有银行的贷款信息
- **AND** 每个贷款显示银行名称、客户姓名、贷款金额、贷款状态
#### Scenario: 识别不良贷款
- **WHEN** 政务端用户查看贷款列表
- **THEN** 系统 SHALL 标识不良贷款
- **AND** 不良贷款 SHALL 显示特殊标识或颜色区分
#### Scenario: 筛选不良贷款
- **WHEN** 政务端用户选择筛选条件
- **THEN** 系统 SHALL 支持按贷款状态筛选
- **AND** 支持单独查看不良贷款列表
### Requirement: 查看完整业务流程信息
政务端 SHALL 支持查看完整的贷款业务流程信息。
#### Scenario: 查看用户信息
- **WHEN** 政务端用户查看贷款详情
- **THEN** 系统 SHALL 显示用户的基本信息
- **AND** 包括姓名、身份证号、联系方式
#### Scenario: 查看贷款信息
- **WHEN** 政务端用户查看贷款详情
- **THEN** 系统 SHALL 显示贷款的完整信息
- **AND** 包括贷款金额、贷款期限、贷款类型、贷款状态
#### Scenario: 查看保险信息
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款购买了保险
- **THEN** 系统 SHALL 显示保险相关信息
- **AND** 包括保险公司、保险产品、保险金额、保险期限、保险单状态
#### Scenario: 查看投保申请记录
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有投保申请记录
- **THEN** 系统 SHALL 显示投保申请的完整记录
- **AND** 包括投保时间、核保结果、核保时间
#### Scenario: 查看理赔信息
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有理赔记录
- **THEN** 系统 SHALL 显示理赔相关信息
- **AND** 包括理赔申请时间、理赔金额、理赔审核结果、赔付金额
### Requirement: 查看审批流程记录
政务端 SHALL 支持查看贷款相关的审批流程记录。
#### Scenario: 查看贷款审批记录
- **WHEN** 政务端用户查看贷款详情
- **THEN** 系统 SHALL 显示贷款审批的完整流程
- **AND** 包括审批人、审批时间、审批结果、审批意见
#### Scenario: 查看保险核保记录
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有保险核保记录
- **THEN** 系统 SHALL 显示保险核保的完整记录
- **AND** 包括核保人、核保时间、核保结果、核保意见
#### Scenario: 查看理赔审核记录
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有理赔审核记录
- **THEN** 系统 SHALL 显示理赔审核的完整记录
- **AND** 包括审核人、审核时间、审核结果、审核意见
### Requirement: 不良贷款详情查看
政务端 SHALL 支持查看不良贷款的详细信息。
#### Scenario: 查看不良贷款基本信息
- **WHEN** 政务端用户点击不良贷款
- **THEN** 系统 SHALL 显示不良贷款的基本信息
- **AND** 包括逾期天数、逾期金额、当前状态
#### Scenario: 查看不良贷款保险情况
- **WHEN** 政务端用户查看不良贷款详情
- **AND** 该不良贷款购买了保险
- **THEN** 系统 SHALL 显示保险情况
- **AND** 包括是否已发起理赔、理赔状态、赔付金额
#### Scenario: 查看不良贷款处理记录
- **WHEN** 政务端用户查看不良贷款详情
- **THEN** 系统 SHALL 显示不良贷款的处理记录
- **AND** 包括催收记录、理赔记录、处置记录
### Requirement: 按银行筛选贷款
政务端 SHALL 支持按银行筛选贷款信息。
#### Scenario: 选择银行查看贷款
- **WHEN** 政务端用户选择一个银行
- **THEN** 系统 SHALL 显示该银行的所有贷款信息
- **AND** 包括正常贷款和不良贷款
#### Scenario: 查看银行不良贷款统计
- **WHEN** 政务端用户查看银行贷款信息
- **THEN** 系统 SHALL 显示该银行的不良贷款统计
- **AND** 包括不良贷款数量、不良贷款金额、不良贷款率

View File

@@ -0,0 +1,99 @@
# insurance-claim-review Specification Delta
## ADDED Requirements
### Requirement: 接收理赔申请
保险端 SHALL 接收银行端提交的理赔申请。
#### Scenario: 查看待理赔审核列表
- **WHEN** 保险端理赔审核人员登录系统
- **THEN** 系统 SHALL 显示待审核的理赔申请列表
- **AND** 每个申请显示银行名称、保险单号、理赔金额、理赔原因
#### Scenario: 查看理赔申请详情
- **WHEN** 保险端理赔审核人员点击理赔申请
- **THEN** 系统 SHALL 显示理赔申请的完整信息
- **AND** 包括银行信息、保险单信息、理赔金额、理赔原因
### Requirement: 查看理赔材料
保险端 SHALL 支持理赔审核人员查看银行上传的理赔材料。
#### Scenario: 查看材料列表
- **WHEN** 保险端理赔审核人员查看理赔申请详情
- **THEN** 系统 SHALL 显示理赔材料列表
- **AND** 每个材料显示文件名、文件类型、上传时间
#### Scenario: 下载和预览材料
- **WHEN** 保险端理赔审核人员点击理赔材料
- **THEN** 系统 SHALL 支持下载或预览材料
- **AND** 支持常见的文件格式图片、PDF、文档等
### Requirement: 理赔材料审核
保险端 SHALL 支持理赔审核人员对材料进行审核。
#### Scenario: 审核通过
- **WHEN** 保险端理赔审核人员审核理赔申请
- **AND** 确认理赔材料完整且符合要求
- **THEN** 系统 SHALL 允许审核人员选择"通过"
- **AND** 系统 SHALL 要求填写赔付金额
#### Scenario: 审核拒绝
- **WHEN** 保险端理赔审核人员审核理赔申请
- **AND** 发现理赔材料不完整或不符合要求
- **THEN** 系统 SHALL 允许审核人员选择"拒绝"
- **AND** 系统 SHALL 要求填写拒绝原因
#### Scenario: 保存赔付金额
- **WHEN** 保险端理赔审核人员审核通过理赔申请
- **THEN** 系统 SHALL 保存赔付金额
- **AND** 赔付金额 SHALL 返回给银行端
#### Scenario: 保存拒绝原因
- **WHEN** 保险端理赔审核人员拒绝理赔申请
- **THEN** 系统 SHALL 保存拒绝原因
- **AND** 拒绝原因 SHALL 返回给银行端
### Requirement: 执行赔付
保险端 SHALL 在理赔审核通过后执行赔付。
#### Scenario: 自动执行赔付
- **WHEN** 理赔申请审核通过
- **THEN** 系统 SHALL 自动执行赔付操作
- **AND** 系统 SHALL 记录赔付日期和赔付金额
#### Scenario: 赔付结果通知
- **WHEN** 赔付执行成功
- **THEN** 系统 SHALL 将赔付结果通知银行端
- **AND** 银行端 SHALL 能够查看赔付详情
### Requirement: 理赔审核历史记录
保险端 SHALL 保存理赔审核历史记录,支持查询和追溯。
#### Scenario: 查看理赔审核历史
- **WHEN** 保险端理赔审核人员查看已处理的理赔申请
- **THEN** 系统 SHALL 显示理赔审核历史记录
- **AND** 包括审核人员、审核时间、审核结果
#### Scenario: 查看拒绝原因历史
- **WHEN** 保险端理赔审核人员查看已拒绝的理赔申请
- **THEN** 系统 SHALL 显示拒绝原因
- **AND** 支持查看详细的拒绝理由
### Requirement: 理赔审核模拟数据
系统 SHALL 提供理赔审核的模拟数据以支持开发和测试。
#### Scenario: 模拟数据包含多种状态
- **WHEN** 系统加载理赔审核模拟数据
- **THEN** 数据 SHALL 包含待审核、已通过、已拒绝三种状态的理赔申请
- **AND** 每种状态至少包含一条记录
#### Scenario: 模拟数据包含完整信息
- **WHEN** 系统加载理赔审核模拟数据
- **THEN** 每条记录 SHALL 包含理赔申请号、银行信息、保险单号、保险公司信息
- **AND** 包含理赔金额、理赔原因、材料列表(文件名、文件类型、大小、上传时间)
- **AND** 包含申请时间、审核时间、审核人员、赔付金额、赔付日期、拒绝原因
#### Scenario: 模拟数据支持筛选
- **WHEN** 保险端理赔审核人员按状态筛选理赔申请
- **THEN** 系统 SHALL 返回对应状态的模拟数据
- **AND** 支持待审核、已通过、已拒绝三种状态筛选

View File

@@ -0,0 +1,268 @@
# Insurance Navigation Specification
## Overview
This specification defines the insurance navigation functionality for the bank side, including insurance application list, company/product selection flows, and dashboard shortcuts.
## ADDED Requirements
### Requirement: Insurance Application List Page
The bank side MUST provide a dedicated page to list all insurance applications with search and pagination support.
#### Scenario: Display insurance application list
**Given** the user navigates to `/pagesBank/insurance/application/list`
**When** the page loads
**Then** the system SHALL display a list of all insurance applications with:
- Application ID
- Company name
- Product name
- Insurance amount
- Insurance term
- Status (pending/approved/rejected)
- Created timestamp
- Clickable items that navigate to application detail
#### Scenario: Filter insurance applications by status
**Given** the user is on the insurance application list page
**When** the user selects a status filter (All, Pending, Approved, Rejected)
**Then** the system SHALL display only applications matching the selected status
#### Scenario: Search insurance applications
**Given** the user is on the insurance application list page
**When** the user enters a search term in the search box
**Then** the system SHALL filter applications by:
- Application ID
- Company name
- Product name
- Policy number
**And** display only matching applications in real-time
#### Scenario: Paginate insurance applications
**Given** the user is on the insurance application list page with more than 20 applications
**When** the user scrolls to the bottom of the list
**Then** the system SHALL load the next page of applications automatically
**And** display a loading indicator while fetching
### Requirement: Company and Product Selection Flow
The audit detail page MUST support a multi-step navigation flow for selecting insurance company and product with search functionality.
#### Scenario: Navigate from audit detail to company selection
**Given** a loan application with status `DISBURSED` and no insurance
**When** the user clicks "购买保险" button
**Then** the system SHALL navigate to `/pagesBank/insurance/company/select` with parameters:
- `loanId`: The loan application ID
- `loanAmount`: The loan amount in yuan
- `loanTerm`: The loan term in months
#### Scenario: Search and select insurance company
**Given** the user is on the insurance company selection page
**When** the user enters a search term in the search box
**Then** the system SHALL filter companies by:
- Company name
- Contact information
**And** display only matching companies in real-time
#### Scenario: Select insurance company
**Given** the user selects a company from the list
**When** the selection is confirmed
**Then** the system SHALL navigate to `/pagesBank/insurance/product/select` with parameters:
- `loanId`: The loan application ID
- `companyId`: The selected company ID
- `loanAmount`: The loan amount in yuan
- `loanTerm`: The loan term in months
#### Scenario: Search and select insurance product
**Given** the user is on the insurance product selection page
**When** the user enters a search term in the search box
**Then** the system SHALL filter products by:
- Product name
- Product description
- Product type
**And** display only matching products in real-time
#### Scenario: Select insurance product
**Given** the user selects a product from the list
**When** the selection is confirmed
**Then** the system SHALL navigate to `/pagesBank/insurance/application/create` with parameters:
- `loanId`: The loan application ID
- `companyId`: The selected company ID
- `productId`: The selected product ID
- `loanAmount`: The loan amount in yuan
- `loanTerm`: The loan term in months
### Requirement: Dashboard Shortcuts Navigation
The dashboard shortcuts MUST navigate to the correct insurance management pages.
#### Scenario: Navigate to insurance application list
**Given** the user is on the bank dashboard
**When** the user clicks the "投保管理" shortcut
**Then** the system SHALL navigate to `/pagesBank/insurance/application/list`
#### Scenario: Navigate to claim application list
**Given** the user is on the bank dashboard
**When** the user clicks the "理赔管理" shortcut
**Then** the system SHALL navigate to `/pagesBank/insurance/claim/list`
## Implementation Notes
### File Locations
- `src/pagesBank/insurance/application/list.vue`: Insurance application list page with search and pagination
- `src/pagesBank/insurance/company/select.vue`: Company selection page with search
- `src/pagesBank/insurance/product/select.vue`: Product selection page with search
- `src/pagesBank/audit/detail.vue`: Updated with multi-step navigation
- `src/pagesBank/dashboard/index.vue`: Verified shortcuts configuration
### Key Functions
```typescript
// Navigate to company selection
function handleBuyInsurance() {
uni.navigateTo({
url: `/pagesBank/insurance/company/select?loanId=${id.value}&loanAmount=${amount}&loanTerm=${term}`,
})
}
// Company selection handler
function handleSelectCompany(company: InsuranceCompany) {
uni.navigateTo({
url: `/pagesBank/insurance/product/select?loanId=${loanId.value}&companyId=${company.id}&loanAmount=${loanAmount.value}&loanTerm=${loanTerm.value}`,
})
}
// Product selection handler
function handleSelectProduct(product: InsuranceProduct) {
uni.navigateTo({
url: `/pagesBank/insurance/application/create?loanId=${loanId.value}&companyId=${companyId.value}&productId=${product.id}&loanAmount=${loanAmount.value}&loanTerm=${loanTerm.value}`,
})
}
// Search handler for lists
function handleSearch(keyword: string) {
searchKeyword.value = keyword
loadData(1) // Reset to first page
}
// Pagination handler
function handleLoadMore() {
if (!loading.value && hasMore.value) {
loadData(currentPage.value + 1)
}
}
```
### Page Flow Diagram
```
/pagesBank/audit/detail
├─→ "购买保险" button
/pagesBank/insurance/company/select (NEW)
├─→ Search companies by name/contact
├─→ Select company
/pagesBank/insurance/product/select (NEW)
├─→ Search products by name/description/type
├─→ Select product
/pagesBank/insurance/application/create (existing)
└─→ Submit application
/pagesBank/dashboard/index
├─→ "投保管理" → /pagesBank/insurance/application/list (NEW)
│ ├─→ Search by ID/company/product/policy
│ ├─→ Filter by status
│ └─→ Pagination support
└─→ "理赔管理" → /pagesBank/insurance/claim/list (existing)
```
### UI Components
#### Search Bar Component
```vue
<template>
<view class="search-bar">
<input
v-model="keyword"
placeholder="搜索公司名称、联系人..."
@input="handleSearch"
/>
<text v-if="keyword" class="clear-btn" @click="clearSearch">×</text>
</view>
</template>
```
#### Status Filter Component
```vue
<template>
<view class="status-filter">
<view
v-for="status in statusOptions"
:key="status.value"
class="filter-item"
:class="{ active: currentStatus === status.value }"
@click="selectStatus(status.value)"
>
{{ status.label }}
</view>
</view>
</template>
```
## Related Capabilities
- `bank-insurance-integration`: Core insurance integration functionality
- `bank-insurance-ui`: Insurance UI requirements

View File

@@ -0,0 +1,99 @@
# insurance-underwriting Specification Delta
## ADDED Requirements
### Requirement: 接收投保申请
保险端 SHALL 接收银行端提交的投保申请。
#### Scenario: 查看待核保申请列表
- **WHEN** 保险端核保人员登录系统
- **THEN** 系统 SHALL 显示待核保的投保申请列表
- **AND** 每个申请显示银行名称、客户姓名、贷款金额、保险产品
#### Scenario: 查看投保申请详情
- **WHEN** 保险端核保人员点击投保申请
- **THEN** 系统 SHALL 显示投保申请的完整信息
- **AND** 包括银行信息、客户信息、贷款信息、保险产品信息
### Requirement: 查看银行提供的信息
保险端 SHALL 支持核保人员查看银行提供的客户情况和相关信息。
#### Scenario: 查看客户基本信息
- **WHEN** 保险端核保人员查看投保申请详情
- **THEN** 系统 SHALL 显示客户的基本信息
- **AND** 包括姓名、身份证号、信用评分
#### Scenario: 查看贷款信息
- **WHEN** 保险端核保人员查看投保申请详情
- **THEN** 系统 SHALL 显示贷款相关信息
- **AND** 包括贷款金额、贷款期限、贷款类型
#### Scenario: 查看银行评估信息
- **WHEN** 保险端核保人员查看投保申请详情
- **THEN** 系统 SHALL 显示银行对客户的评估信息
- **AND** 包括银行的风险评估结果
### Requirement: 核保审核
保险端 SHALL 支持核保人员进行承保条件审核。
#### Scenario: 核保通过
- **WHEN** 保险端核保人员审核投保申请
- **AND** 核保人员确认承保条件满足
- **THEN** 系统 SHALL 允许核保人员选择"通过"
- **AND** 系统 SHALL 更新投保申请状态为"已通过"
#### Scenario: 核保拒绝
- **WHEN** 保险端核保人员审核投保申请
- **AND** 核保人员发现承保条件不满足
- **THEN** 系统 SHALL 允许核保人员选择"拒绝"
- **AND** 系统 SHALL 要求填写拒绝原因
#### Scenario: 保存拒绝原因
- **WHEN** 保险端核保人员拒绝投保申请
- **THEN** 系统 SHALL 保存拒绝原因
- **AND** 拒绝原因 SHALL 返回给银行端
### Requirement: 出具保险单
保险端 SHALL 在核保通过后出具保险单。
#### Scenario: 自动生成保险单
- **WHEN** 投保申请核保通过
- **THEN** 系统 SHALL 自动生成保险单
- **AND** 保险单 SHALL 包含保单号、保险公司信息、被保险人信息、保险金额、保险期限
#### Scenario: 保险单发送给银行
- **WHEN** 保险单生成成功
- **THEN** 系统 SHALL 将保险单信息发送给银行端
- **AND** 银行端 SHALL 能够查看保险单详情
### Requirement: 核保历史记录
保险端 SHALL 保存核保历史记录,支持查询和追溯。
#### Scenario: 查看核保历史
- **WHEN** 保险端核保人员查看已处理的投保申请
- **THEN** 系统 SHALL 显示核保历史记录
- **AND** 包括核保人员、核保时间、核保结果
#### Scenario: 查看拒绝原因历史
- **WHEN** 保险端核保人员查看已拒绝的投保申请
- **THEN** 系统 SHALL 显示拒绝原因
- **AND** 支持查看详细的拒绝理由
### Requirement: 核保申请模拟数据
系统 SHALL 提供核保申请的模拟数据以支持开发和测试。
#### Scenario: 模拟数据包含多种状态
- **WHEN** 系统加载核保申请模拟数据
- **THEN** 数据 SHALL 包含待审核、已通过、已拒绝三种状态的投保申请
- **AND** 每种状态至少包含一条记录
#### Scenario: 模拟数据包含完整信息
- **WHEN** 系统加载核保申请模拟数据
- **THEN** 每条记录 SHALL 包含投保申请号、银行信息、保险公司信息、保险产品信息
- **AND** 包含客户信息(姓名、身份证号、信用评分、贷款金额、贷款期限)
- **AND** 包含保险金额、保险期限、申请时间、审核时间、审核人员、拒绝原因
#### Scenario: 模拟数据支持筛选
- **WHEN** 保险端核保人员按状态筛选投保申请
- **THEN** 系统 SHALL 返回对应状态的模拟数据
- **AND** 支持待审核、已通过、已拒绝三种状态筛选

View File

@@ -0,0 +1,150 @@
# Implementation Tasks
## Phase 0: UI/UX Enhancements (Base Completed + This Optimization)
### 已完成的基础工作
- [x] Bank: Update Audit List UI (`src/pagesBank/audit/list.vue`)
- [x] Bank: Update Audit Detail UI (`src/pagesBank/audit/detail.vue`)
- [x] Insurance: Update Policy List UI (`src/pagesInsurance/policy/list.vue`)
- [x] Insurance: Update Claim List UI (`src/pagesInsurance/claim/list.vue`)
- [x] Government: Update Bank Detail UI & Mock Data (`src/pagesGovernment/bank/detail.vue`)
### 本次优化任务integrate-insurance-flow
- [x] 1.1 优化审核详情页面模拟数据,增加多种保险状态展示
- [x] 1.2 实现"购买保险"按钮跳转到投保申请页面
- [x] 1.3 实现"申请理赔"按钮跳转到理赔申请页面
- [x] 1.4 在流程步骤条中增加"投保"节点(条件显示)
- [x] 1.5 从审核列表页面移除保险功能快捷入口
- [x] 1.6 在工作台首页添加保险功能快捷入口
### 本次新增任务(保险端模拟数据)
- [x] 1.7 为保险端核保列表添加模拟数据
- [x] 1.7.1 在 `src/api/insurance.ts` 中添加 4 条核保申请模拟数据
- [x] 1.7.2 包含待审核、已通过、已拒绝三种状态
- [x] 1.7.3 包含不同的保险公司、保险产品和客户信息
- [x] 1.7.4 添加对应的保险单数据1条已通过的申请
- [x] 1.8 为保险端理赔审核列表添加模拟数据
- [x] 1.8.1 在 `src/api/insurance.ts` 中添加 3 条理赔审核模拟数据
- [x] 1.8.2 包含待审核、已通过、已拒绝三种状态
- [x] 1.8.3 包含不同的理赔原因和材料数量
- [x] 1.8.4 添加赔付金额、赔付日期、拒绝原因等详细信息
- [ ] 1.9 为保险端保单列表扩展模拟数据
- [ ] 1.9.1 在 `src/api/insurance.ts` 中扩展 `mockInsurancePolicies` 数组至12条记录
- [ ] 1.9.2 包含生效中、即将到期、已失效三种状态
- [ ] 1.9.3 包含不同的保险公司、保险产品、银行和客户信息
- [ ] 1.9.4 实现数据多样性(不同的保额、期限、日期)
- [ ] 1.9.5 确保数据与核保申请和理赔申请的关联性
### 本次新增任务(保险公司/产品选择流程)
- [x] 1.10 创建投保申请列表页面 (`src/pagesBank/insurance/application/list.vue`)
- [x] 1.10.1 实现页面基础结构和布局
- [x] 1.10.2 实现状态筛选功能(全部/待审核/已通过/已拒绝)
- [x] 1.10.3 实现搜索功能按ID/公司/产品/保单号)
- [x] 1.10.4 实现分页加载功能每页20条
- [x] 1.10.5 实现列表项点击跳转详情
- [x] 1.11 创建保险公司选择页面 (`src/pagesBank/insurance/company/select.vue`)
- [x] 1.11.1 实现页面基础结构和布局
- [x] 1.11.2 实现搜索功能(按名称/联系方式)
- [x] 1.11.3 显示公司详细信息和合作产品数量
- [x] 1.11.4 实现选择后带参数跳转
- [x] 1.12 创建保险产品选择页面 (`src/pagesBank/insurance/product/select.vue`)
- [x] 1.12.1 实现页面基础结构和布局
- [x] 1.12.2 实现搜索功能(按名称/描述/类型)
- [x] 1.12.3 显示产品详细信息(名称/类型/金额范围)
- [x] 1.12.4 实现产品详情弹窗
- [x] 1.12.5 实现选择后带参数跳转
- [x] 1.13 修改审核详情页投保流程,支持多步导航选择
- [x] 1.14 修改投保申请创建页面,支持接收公司/产品ID参数
## 1. 数据模型和数据库设计
- [ ] 2.1 设计并创建保险公司数据表
- [ ] 2.2 设计并创建保险产品数据表
- [ ] 2.3 设计并创建投保申请数据表
- [ ] 2.4 设计并创建保险单数据表
- [ ] 2.5 设计并创建理赔申请数据表
- [ ] 2.6 扩展贷款数据表,添加保险关联字段
- [ ] 2.7 创建数据库迁移脚本
- [ ] 2.8 编写 TypeScript 类型定义
## 2. 后端 API 开发
- [ ] 3.1 实现获取合作保险公司列表 API
- [ ] 3.2 实现获取保险产品列表 API
- [ ] 3.3 实现创建投保申请 API
- [ ] 3.4 实现获取投保申请详情 API
- [ ] 3.5 实现获取待核保申请列表 API保险端
- [ ] 3.6 实现核保审核 API保险端
- [ ] 3.7 实现保险单生成 API
- [ ] 3.8 实现创建理赔申请 API
- [ ] 3.9 实现获取理赔申请详情 API
- [ ] 3.10 实现获取待理赔审核列表 API保险端
- [ ] 3.11 实现理赔审核 API保险端
- [ ] 3.12 实现赔付执行 API
- [ ] 3.13 实现政务端获取贷款列表 API含保险信息
- [ ] 3.14 实现政务端获取贷款详情 API含完整业务流程
- [ ] 3.15 实现政务端获取不良贷款列表 API
- [ ] 3.16 添加文件上传 API理赔材料
## 3. 银行端页面开发
- [ ] 4.1 创建投保申请列表页面 (`src/pagesBank/insurance/application/list.vue`)
- [ ] 4.2 创建投保申请详情页面 (`src/pagesBank/insurance/application/detail.vue`)
- [ ] 4.3 创建保险公司选择页面 (`src/pagesBank/insurance/company/select.vue`)
- [ ] 4.4 创建保险产品选择页面 (`src/pagesBank/insurance/product/select.vue`)
- [ ] 4.5 修改投保申请创建页面,支持参数接收
- [ ] 4.6 创建保险单详情页面 (`src/pagesBank/insurance/policy/detail.vue`)
- [ ] 4.7 创建理赔申请创建页面 (`src/pagesBank/insurance/claim/create.vue`)
- [ ] 4.8 创建理赔申请列表页面 (`src/pagesBank/insurance/claim/list.vue`)
- [ ] 4.9 在贷款审核详情页添加保险购买入口
- [ ] 4.10 在贷款详情页显示保险信息
- [ ] 4.11 实现保险公司选择器组件
- [ ] 4.12 实现保险产品选择器组件
- [ ] 4.13 实现理赔材料上传组件
## 4. 保险端页面开发
- [ ] 5.1 创建待核保申请列表页面 (`src/pagesInsurance/underwriting/list.vue`)
- [ ] 5.2 创建核保申请详情页面 (`src/pagesInsurance/underwriting/detail.vue`)
- [ ] 5.3 实现核保审核表单组件
- [ ] 5.4 创建待理赔审核列表页面 (`src/pagesInsurance/claim-review/list.vue`)
- [ ] 5.5 创建理赔审核详情页面 (`src/pagesInsurance/claim-review/detail.vue`)
- [ ] 5.6 实现理赔材料查看组件
- [ ] 5.7 实现理赔审核表单组件
## 5. 政务端页面开发
- [ ] 6.1 修改银行贷款列表页面,显示保险信息标识
- [ ] 6.2 修改银行贷款详情页面,显示完整业务流程信息
- [ ] 6.3 添加不良贷款标识显示
- [ ] 6.4 添加保险信息展示区域
- [ ] 6.5 添加投保申请记录展示
- [ ] 6.6 添加理赔信息展示
- [ ] 6.7 添加审批流程记录展示
- [ ] 6.8 实现按银行筛选贷款功能
- [ ] 6.9 实现不良贷款筛选功能
## 6. Mock 数据开发
- [x] 7.1 创建保险公司 Mock 数据
- [x] 7.2 创建保险产品 Mock 数据
- [x] 7.3 创建投保申请 Mock 数据(包含保险端核保列表数据)
- [x] 7.4 创建保险单 Mock 数据
- [x] 7.5 创建理赔申请 Mock 数据(包含保险端理赔审核列表数据)
- [ ] 7.6 创建不良贷款 Mock 数据
## 7. API 集成和测试
- [ ] 8.1 银行端 API 集成测试
- [ ] 8.2 保险端 API 集成测试
- [ ] 8.3 政务端 API 集成测试
- [ ] 8.4 文件上传功能测试
- [ ] 8.5 端到端流程测试(投保 → 核保 → 理赔)
## 8. 样式和用户体验优化
- [ ] 9.1 银行端页面样式优化
- [ ] 9.2 保险端页面样式优化
- [ ] 9.3 政务端页面样式优化
- [ ] 9.4 添加加载状态和错误提示
- [ ] 9.5 添加表单验证提示
## 9. 文档和部署
- [ ] 10.1 更新 API 文档
- [ ] 10.2 更新用户操作手册
- [ ] 10.3 准备部署配置
- [ ] 10.4 执行数据库迁移
- [ ] 10.5 部署到测试环境
- [ ] 10.6 验证测试环境功能

View File

@@ -1,15 +1,124 @@
# Project Context
## 项目背景
### 一、 银行端核心业务背景
银行端作为金融生态的核心资金与风控方,其业务背景建立在与政务、商家、保险及用户的紧密协作之上,通过数字化手段重构核心作业流程。
###### 1. 各端交互与协作生态
银行端通过数据与流程的互联互通,形成完整的金融生态闭环:
* **与用户端 (农户/C端)****服务与被服务**。
* **精准获客**: 结合线下走访与线上数据建立多维度画像。
* **便捷用信**: 将信贷额度嵌入交易场景,实现“钱找人”的无感支付。
* **与商家端 (企业/商户)****场景与验真**。
* **贸易验真**: 交叉验证订单与物流数据,确保信贷资金流向真实贸易。
* **受托支付**: 资金封闭运行,直接结算至商户,降低挪用风险。
* **与保险端 (保险公司)****风险共担**。
* **履约保证**: 引入保险增信,互通投保状态,构建“无保不贷”机制。
* **风险联控**: 逾期信息同步,触发双向预警与理赔协同。
* **与政务端 (政府监管)****合规与引导**。
* **穿透监管**: 实时报送业务数据,接受全流程合规审计。
* **政策协同**: 自动匹配贴息与补贴政策,实现普惠金融精准滴灌。
###### 2. 核心业务运作模式
银行端业务遵循“贷前调查、贷中审查、贷后管理”的标准化金融规范,并进行了数字化升级:
* **贷前:网格化营销与建档**
* **目标**: 解决信息不对称,还原真实经营状况。
* **模式**: 客户经理通过“拜访计划”进行网格化展业,现场采集影像与资产数据,实现数字化建档与初评。
* **贷中:智能化审批与授信**
* **目标**: 提升审批效率,严控准入风险。
* **模式**: 系统聚合多方数据进行自动化风控筛查,结合人工专业判断核定额度,一键激活场景化信用额度。
* **贷后:信息聚合与数据支撑**
* **目标**: 为银行提供透明数据,支撑自主贷后管理。
* **模式**: 平台作为“信息中介”,实时同步交易数据,聚合还款与经营概况,提供标准化报表辅助银行监测风险。
---
### 二、 商家端核心业务背景
商家端致力于打造“交易+金融”的双轮驱动模式,既是商品交易的履约方,也是普惠金融落地的关键场景方。
###### 1. 数字化经营与供应链管理
* **目标**: 实现商品与库存的精细化管理,构建可信的交易数据底座。
* **场景**: 建立标准化的SKU体系通过数字化进销存沉淀真实的经营流水将“数据”转化为“资产”。
###### 2. 订单履约与受托支付
* **目标**: 规范交易流程,确保资金闭环安全。
* **场景**: 严格执行标准履约流程,作为受托支付对象接收信贷资金,配合验证资金用途。
###### 3. 信用辅助与渠道协同
* **目标**: 激活供应链上下游信用,降低金融服务门槛。
* **场景**: 依托核心企业信用推荐优质客户,并在结算环节协助核实交易真实性,完成资金闭环。
---
### 三、 保险端核心业务背景
保险端作为金融生态的“减震器”,通过专业的风险管理能力,为信贷资金提供安全屏障。
###### 1. 产品定制与承保准入
* **目标**: 精准识别承保标的,提供适配的风险保障。
* **场景**: 针对不同客群定制差异化保险产品,对接信贷数据进行自动化核保,实现承保前置。
###### 2. 保单管理与风险共担
* **目标**: 动态评估风险敞口,确保资产安全。
* **场景**: 全生命周期管理电子保单,与银行端实时交互风险数据,动态调整承保策略。
###### 3. 智能理赔与追偿协同
* **目标**: 快速响应出险事件,保障权益。
* **场景**: 接收逾期信号自动触发理赔流程,赔付后与多方协同开展追偿,降低综合损失。
---
### 四、 政务端核心业务背景
政务端在生态中扮演“监管者”与“服务者”的双重角色,引导金融资源合规、高效服务实体经济。
###### 1. 区域金融监测与监管
* **目标**: 防范系统性风险,掌握宏观态势。
* **场景**: 通过驾驶舱实时监控辖区信贷指标,设置红线自动预警违规行为。
###### 2. 政策扶持与精准滴灌
* **目标**: 提高财政资金效益。
* **场景**: 数字化管理补贴资格白名单,基于真实交易数据自动核算并与信贷发放联动,确保政策红利直达。
###### 3. 信用体系建设与共享
* **目标**: 打破数据孤岛,构建社会信用。
* **场景**: 归集政务数据丰富主体画像,输出公共信用评价结果,解决“征信白户”难题。
---
## Purpose
这是一个基于 unibest 模板开发的跨平台电商应用系统,包含个主要端:
这是一个基于 unibest 模板开发的跨平台电商+金融生态应用系统,包含个主要端:
1. **用户端**C端提供商品浏览、购物车、订单管理、会员服务、金融服务等功能
2. **商家端**B端提供商品管理、订单处理、财务管理、贷款协助、店铺设置等功能
3. **银行端**B端提供客户管理、贷款审核、交易记录、提现管理等功能
3. **银行端**B端提供客户管理、贷款审核、交易记录、提现管理、拜访计划等功能
4. **政务端**B端提供银行管理、合规检查、风险预警、报表管理等功能
5. **保险端**B端提供保单管理、理赔处理、合作银行管理等功能
项目支持多平台部署,包括 H5、iOS、Android 以及多个小程序平台微信、支付宝、百度、字节、快手、QQ、钉钉、小红书等
**多端架构特点:**
- 每个端独立配置 Tabbar 导航
- 使用分包优化策略,减少首屏加载时间
- 登录后根据角色自动切换到对应端
## Tech Stack
### 核心框架
@@ -30,9 +139,15 @@
- **vue-i18n** 9.1.9 - 国际化
### HTTP 请求库(支持多种选择)
- **alova** 3.3.3 - 请求库(推荐)
- **简单封装的 http** - 轻量级请求方案
- **vue-query** - 查询状态管理(用于自动生成接口)
- **alova** 3.3.3 - 请求库(推荐,支持 uni-app 适配器
- **简单封装的 http** - 轻量级请求方案`src/http/http.ts`
- **vue-query** - 查询状态管理(用于自动生成接口`src/http/vue-query.ts`
**HTTP 配置:**
- 统一的请求拦截器(`src/http/interceptor.ts`
- 支持登录拦截和自动跳转
- 支持请求/响应错误处理
- 自动注入 Token如已登录
### 工具库
- **dayjs** 1.11.10 - 日期处理
@@ -48,6 +163,60 @@
- **Node.js** >= 20
- **pnpm** >= 9
## Development Commands
### 常用开发命令
```bash
# H5 开发(默认)
pnpm dev
# 微信小程序开发
pnpm dev:mp
# App 开发
pnpm dev:app
# 指定环境运行
pnpm dev:test # 测试环境
pnpm dev:prod # 生产环境
```
### 打包构建命令
```bash
# H5 打包
pnpm build
# 微信小程序打包
pnpm build:mp
# App 打包
pnpm build:app
```
### 代码检查与类型检查
```bash
# ESLint 检查
pnpm lint
# ESLint 自动修复
pnpm lint:fix
# TypeScript 类型检查
pnpm type-check
```
### API 生成
```bash
# 从 OpenAPI 规范生成 API 接口代码
pnpm openapi
```
### 环境配置
项目支持多环境配置:
- `.env.development` - 开发环境
- `.env.test` - 测试环境
- `.env.production` - 生产环境
## Project Conventions
### Code Style
@@ -72,6 +241,11 @@
- `src/hooks` 目录下的 hooks 自动导入
- 组件自动导入(支持递归扫描子目录)
#### OpenAPI 集成
- 使用 `openapi-ts-request` 从 OpenAPI 规范自动生成 API 接口代码
- 生成的代码存放在 `src/service/` 目录(不应提交到版本控制)
- 支持自动生成 TypeScript 类型定义和请求函数
### Architecture Patterns
#### 目录结构
@@ -83,13 +257,18 @@ src/
├── http/ # HTTP 请求封装
├── layouts/ # 布局组件
├── mock/ # Mock 数据
├── pages/ # 用户端页面
├── pagesMerchant/# 商家端页面
├── pagesBank/ # 银行端页面
├── pages/ # 用户端页面(主包)
├── pagesMerchant/ # 商家端页面(分包)
├── pagesBank/ # 银行端页面(分包)
├── pagesGovernment/ # 政务端页面(分包)
├── pagesInsurance/ # 保险端页面(分包)
├── router/ # 路由配置
├── service/ # 自动生成的服务接口
├── static/ # 静态资源
── typings/ # 类型定义
── store/ # Pinia 状态管理
├── tabbar/ # Tabbar 配置
├── typings/ # 类型定义
└── utils/ # 工具函数
```
#### 路由策略
@@ -97,6 +276,24 @@ src/
- **Layout 布局**:支持多布局系统
- **分包优化**:使用 `@uni-ku/bundle-optimizer` 进行分包优化
- **异步导入**:支持模块和组件的异步跨包引用
- **分包配置**各端独立分包pagesMerchant、pagesBank、pagesGovernment、pagesInsurance
- **预下载规则**:登录后自动预下载所有分包
#### 多端 Tabbar 策略
支持 4 种 Tabbar 策略(`TABBAR_STRATEGY_MAP`
- `NO_TABBAR` (0):无 Tabbar
- `NATIVE_TABBAR` (1):完全原生 Tabbar
- `CUSTOM_TABBAR_WITH_CACHE` (2):有缓存自定义 Tabbar当前配置
- `CUSTOM_TABBAR_WITHOUT_CACHE` (3):无缓存自定义 Tabbar
各端独立的 Tabbar 配置:
- `userTabbarList`:用户端(首页、分类、购物车、我的)
- `merchantTabbarList`:商家端(工作台、订单、商品、财务、我的)
- `bankTabbarList`:银行端(工作台、审核、客户、我的)
- `governmentTabbarList`:政务端(工作台、检查、报表、我的)
- `insuranceTabbarList`:保险端(工作台、保单、理赔、我的)
通过 `getTabbarListByClientType()` 根据客户端类型动态切换 Tabbar。
#### 登录策略
支持两种登录策略(通过 `DEFAULT_NO_NEED_LOGIN` 配置):
@@ -118,10 +315,11 @@ src/
### Testing Strategy
当前项目未配置自动化测试框架。建议:
- 使用 Vitest 进行单元测试
- 使用 @vue/test-utils 进行组件测试
- 使用 Playwright 进行端到端测试
当前项目未配置自动化测试框架。基于技术栈建议:
- **单元测试**使用 Vitest 进行测试
- **组件测试**使用 @vue/test-utils 进行 Vue 组件测试
- **端到端测试**使用 Playwright 进行跨平台 E2E 测试
- **小程序测试**:使用 miniprogram-simulate 进行微信小程序单元测试
### Git Workflow
@@ -168,12 +366,29 @@ src/
- **仪表盘**:数据统计
- **客户管理**:客户列表、客户详情、交易记录、提现记录
- **审核管理**:贷款审核列表、审核详情
- **拜访管理**:拜访计划列表、创建拜访、拜访详情
- **报表管理**:报表列表、报表下载
#### 政务端B端
- **仪表盘**:区域金融监测
- **银行管理**:银行列表、银行详情
- **合规检查**:检查列表、检查详情
- **风险预警**:风险列表、风险详情
#### 保险端B端
- **仪表盘**:业务概览
- **保单管理**:保单列表、保单详情
- **理赔处理**:理赔列表、理赔详情
- **合作银行**:合作银行列表
### 关键概念
- **多端适配**:同一套代码适配 H5、App、小程序
- **角色权限**:用户、商家、银行三种角色
- **五端架构**:用户、商家、银行、政务、保险五个独立端
- **角色权限**:根据登录角色自动切换对应端的 Tabbar 和页面
- **金融服务**:信用额度、贷款申请、结算、核销
- **会员体系**:会员卡、会员权益
- **分包优化**:各端独立分包,登录后预下载
- **Tabbar 策略**:支持原生和自定义 Tabbar可配置缓存
## Important Constraints
@@ -194,6 +409,35 @@ src/
- **提交规范**:必须符合 Conventional Commits 规范
- **文件忽略**:自动生成的文件(如 `src/service/**`)不应提交
## Deployment Architecture
### 多平台部署流程
**H5 部署:**
1. 运行 `pnpm build` 构建生产版本
2. 生成的文件位于 `dist/build/h5`
3. 部署到 Web 服务器nginx、Apache 等)
4. 如非根目录部署,需在 `manifest.config.ts` 中配置 `h5.router.base`
**小程序部署:**
1. 运行 `pnpm build:mp` 构建小程序
2. 生成的文件位于 `dist/build/mp-weixin`
3. 使用微信开发者工具导入并上传
4. 在微信公众平台提交审核
**App 部署:**
1. 运行 `pnpm build:app` 构建 App
2. 生成的文件位于 `dist/build/app`
3. 使用 HBuilderX 导入文件夹
4. 选择"发行 - APP云打包"
5. (安卓和鸿蒙可直接用 HBuilderX 运行/发行)
### 分包策略优化
- 用户端(主包):核心页面和组件
- 商家端、银行端、政务端、保险端:独立分包
- 登录后自动预下载所有分包(`preloadRule`
- 使用 `@uni-ku/bundle-optimizer` 进行体积优化
## External Dependencies
### 平台依赖

View File

@@ -0,0 +1,140 @@
# bank-insurance-integration Specification
## Purpose
TBD - created by archiving change integrate-insurance-flow. Update Purpose after archive.
## Requirements
### Requirement: 保险购买入口
银行端 SHALL 在贷款审核通过后提供保险购买入口,该入口为可选操作。
#### Scenario: 显示保险购买入口
- **WHEN** 银行端用户查看已审核通过的贷款详情
- **THEN** 系统 SHALL 显示"购买保险"按钮
- **AND** 该按钮为可选操作,不强制要求购买
#### Scenario: 跳过保险购买
- **WHEN** 银行端用户选择不购买保险
- **THEN** 系统 SHALL 继续原贷款流程处理
- **AND** 不影响贷款的后续放款流程
### Requirement: 选择合作保险公司
银行端 SHALL 支持从合作保险公司列表中选择保险公司。
#### Scenario: 查看合作保险公司列表
- **WHEN** 银行端用户点击购买保险
- **THEN** 系统 SHALL 显示合作保险公司列表
- **AND** 每个保险公司显示名称、联系方式和状态
#### Scenario: 选择保险公司
- **WHEN** 银行端用户选择一个保险公司
- **THEN** 系统 SHALL 加载该保险公司提供的保险产品列表
### Requirement: 选择保险产品
银行端 SHALL 支持根据贷款类型选择相应的保险产品。
#### Scenario: 显示保险产品列表
- **WHEN** 银行端用户选择保险公司后
- **THEN** 系统 SHALL 显示该保险公司提供的保险产品列表
- **AND** 每个产品显示名称、类型、描述和保险金额范围
#### Scenario: 根据贷款类型筛选产品
- **WHEN** 银行端用户选择保险产品
- **THEN** 系统 SHALL 根据贷款类型推荐相应的保险产品
- **AND** 个人住房贷款推荐住房贷款保险
- **AND** 企业信贷推荐履约保证保险
### Requirement: 确定保险金额和期限
银行端 SHALL 支持确定保险金额和保险期限。
#### Scenario: 设置保险金额
- **WHEN** 银行端用户设置保险金额
- **THEN** 系统 SHALL 验证保险金额不低于抵押物价值
- **AND** 保险金额应在保险产品的最小和最大金额范围内
#### Scenario: 设置保险期限
- **WHEN** 银行端用户设置保险期限
- **THEN** 系统 SHALL 默认保险期限与贷款期限一致
- **AND** 允许用户根据需要调整保险期限
### Requirement: 提交投保申请
银行端 SHALL 支持提交投保申请,系统自动发送给对应的保险公司。
#### Scenario: 提交投保申请
- **WHEN** 银行端用户填写完整的投保信息并提交
- **THEN** 系统 SHALL 创建投保申请记录
- **AND** 系统 SHALL 自动发送投保申请给对应的保险公司
- **AND** 系统 SHALL 显示投保申请已提交的提示
#### Scenario: 投保申请包含银行信息
- **WHEN** 系统发送投保申请给保险公司
- **THEN** 投保申请 SHALL 包含银行相关信息
- **AND** 包含客户的基本信息和贷款信息
- **AND** 包含银行对客户的评估信息
### Requirement: 查看投保申请状态
银行端 SHALL 支持查看投保申请的审核状态。
#### Scenario: 查看待审核状态
- **WHEN** 银行端用户查看投保申请
- **AND** 保险公司尚未审核
- **THEN** 系统 SHALL 显示"待审核"状态
#### Scenario: 查看审核通过状态
- **WHEN** 保险公司核保通过
- **THEN** 系统 SHALL 显示"审核通过"状态
- **AND** 显示保险单信息
#### Scenario: 查看审核拒绝状态
- **WHEN** 保险公司核保拒绝
- **THEN** 系统 SHALL 显示"审核拒绝"状态
- **AND** 显示拒绝原因
### Requirement: 保险单管理
银行端 SHALL 支持查看和管理保险单。
#### Scenario: 查看保险单详情
- **WHEN** 银行端用户点击保险单
- **THEN** 系统 SHALL 显示保险单的完整信息
- **AND** 包括保单号、保险公司、保险金额、保险期限等
#### Scenario: 保险单与贷款关联
- **WHEN** 银行端用户查看贷款详情
- **THEN** 系统 SHALL 显示关联的保险单信息(如果存在)
### Requirement: 理赔申请功能
银行端 SHALL 支持发起理赔申请并上传理赔材料。
#### Scenario: 发起理赔申请
- **WHEN** 银行端用户选择一个保险单并发起理赔申请
- **THEN** 系统 SHALL 显示理赔申请表单
- **AND** 要求填写理赔金额和理赔原因
#### Scenario: 上传理赔材料
- **WHEN** 银行端用户提交理赔申请
- **THEN** 系统 SHALL 要求上传理赔材料
- **AND** 支持上传多个文件
- **AND** 验证文件格式和大小
#### Scenario: 提交理赔申请到保险公司
- **WHEN** 银行端用户提交理赔申请
- **THEN** 系统 SHALL 创建理赔申请记录
- **AND** 系统 SHALL 发送理赔申请给对应的保险公司
- **AND** 系统 SHALL 显示理赔申请已提交的提示
### Requirement: 查看理赔申请状态
银行端 SHALL 支持查看理赔申请的审核状态。
#### Scenario: 查看待审核状态
- **WHEN** 银行端用户查看理赔申请
- **AND** 保险公司尚未审核
- **THEN** 系统 SHALL 显示"待审核"状态
#### Scenario: 查看审核通过状态
- **WHEN** 保险公司理赔审核通过
- **THEN** 系统 SHALL 显示"审核通过"状态
- **AND** 显示赔付金额和赔付日期
#### Scenario: 查看审核拒绝状态
- **WHEN** 保险公司理赔审核拒绝
- **THEN** 系统 SHALL 显示"审核拒绝"状态
- **AND** 显示拒绝原因

View 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

View File

@@ -0,0 +1,106 @@
# government-bad-loans Specification
## Purpose
TBD - created by archiving change integrate-insurance-flow. Update Purpose after archive.
## Requirements
### Requirement: 查看贷款信息
政务端 SHALL 支持查看银行端的所有贷款信息,包括不良贷款。
#### Scenario: 查看贷款列表
- **WHEN** 政务端用户访问贷款列表页面
- **THEN** 系统 SHALL 显示所有银行的贷款信息
- **AND** 每个贷款显示银行名称、客户姓名、贷款金额、贷款状态
#### Scenario: 识别不良贷款
- **WHEN** 政务端用户查看贷款列表
- **THEN** 系统 SHALL 标识不良贷款
- **AND** 不良贷款 SHALL 显示特殊标识或颜色区分
#### Scenario: 筛选不良贷款
- **WHEN** 政务端用户选择筛选条件
- **THEN** 系统 SHALL 支持按贷款状态筛选
- **AND** 支持单独查看不良贷款列表
### Requirement: 查看完整业务流程信息
政务端 SHALL 支持查看完整的贷款业务流程信息。
#### Scenario: 查看用户信息
- **WHEN** 政务端用户查看贷款详情
- **THEN** 系统 SHALL 显示用户的基本信息
- **AND** 包括姓名、身份证号、联系方式
#### Scenario: 查看贷款信息
- **WHEN** 政务端用户查看贷款详情
- **THEN** 系统 SHALL 显示贷款的完整信息
- **AND** 包括贷款金额、贷款期限、贷款类型、贷款状态
#### Scenario: 查看保险信息
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款购买了保险
- **THEN** 系统 SHALL 显示保险相关信息
- **AND** 包括保险公司、保险产品、保险金额、保险期限、保险单状态
#### Scenario: 查看投保申请记录
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有投保申请记录
- **THEN** 系统 SHALL 显示投保申请的完整记录
- **AND** 包括投保时间、核保结果、核保时间
#### Scenario: 查看理赔信息
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有理赔记录
- **THEN** 系统 SHALL 显示理赔相关信息
- **AND** 包括理赔申请时间、理赔金额、理赔审核结果、赔付金额
### Requirement: 查看审批流程记录
政务端 SHALL 支持查看贷款相关的审批流程记录。
#### Scenario: 查看贷款审批记录
- **WHEN** 政务端用户查看贷款详情
- **THEN** 系统 SHALL 显示贷款审批的完整流程
- **AND** 包括审批人、审批时间、审批结果、审批意见
#### Scenario: 查看保险核保记录
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有保险核保记录
- **THEN** 系统 SHALL 显示保险核保的完整记录
- **AND** 包括核保人、核保时间、核保结果、核保意见
#### Scenario: 查看理赔审核记录
- **WHEN** 政务端用户查看贷款详情
- **AND** 该贷款有理赔审核记录
- **THEN** 系统 SHALL 显示理赔审核的完整记录
- **AND** 包括审核人、审核时间、审核结果、审核意见
### Requirement: 不良贷款详情查看
政务端 SHALL 支持查看不良贷款的详细信息。
#### Scenario: 查看不良贷款基本信息
- **WHEN** 政务端用户点击不良贷款
- **THEN** 系统 SHALL 显示不良贷款的基本信息
- **AND** 包括逾期天数、逾期金额、当前状态
#### Scenario: 查看不良贷款保险情况
- **WHEN** 政务端用户查看不良贷款详情
- **AND** 该不良贷款购买了保险
- **THEN** 系统 SHALL 显示保险情况
- **AND** 包括是否已发起理赔、理赔状态、赔付金额
#### Scenario: 查看不良贷款处理记录
- **WHEN** 政务端用户查看不良贷款详情
- **THEN** 系统 SHALL 显示不良贷款的处理记录
- **AND** 包括催收记录、理赔记录、处置记录
### Requirement: 按银行筛选贷款
政务端 SHALL 支持按银行筛选贷款信息。
#### Scenario: 选择银行查看贷款
- **WHEN** 政务端用户选择一个银行
- **THEN** 系统 SHALL 显示该银行的所有贷款信息
- **AND** 包括正常贷款和不良贷款
#### Scenario: 查看银行不良贷款统计
- **WHEN** 政务端用户查看银行贷款信息
- **THEN** 系统 SHALL 显示该银行的不良贷款统计
- **AND** 包括不良贷款数量、不良贷款金额、不良贷款率

View File

@@ -0,0 +1,101 @@
# insurance-claim-review Specification
## Purpose
TBD - created by archiving change integrate-insurance-flow. Update Purpose after archive.
## Requirements
### Requirement: 接收理赔申请
保险端 SHALL 接收银行端提交的理赔申请。
#### Scenario: 查看待理赔审核列表
- **WHEN** 保险端理赔审核人员登录系统
- **THEN** 系统 SHALL 显示待审核的理赔申请列表
- **AND** 每个申请显示银行名称、保险单号、理赔金额、理赔原因
#### Scenario: 查看理赔申请详情
- **WHEN** 保险端理赔审核人员点击理赔申请
- **THEN** 系统 SHALL 显示理赔申请的完整信息
- **AND** 包括银行信息、保险单信息、理赔金额、理赔原因
### Requirement: 查看理赔材料
保险端 SHALL 支持理赔审核人员查看银行上传的理赔材料。
#### Scenario: 查看材料列表
- **WHEN** 保险端理赔审核人员查看理赔申请详情
- **THEN** 系统 SHALL 显示理赔材料列表
- **AND** 每个材料显示文件名、文件类型、上传时间
#### Scenario: 下载和预览材料
- **WHEN** 保险端理赔审核人员点击理赔材料
- **THEN** 系统 SHALL 支持下载或预览材料
- **AND** 支持常见的文件格式图片、PDF、文档等
### Requirement: 理赔材料审核
保险端 SHALL 支持理赔审核人员对材料进行审核。
#### Scenario: 审核通过
- **WHEN** 保险端理赔审核人员审核理赔申请
- **AND** 确认理赔材料完整且符合要求
- **THEN** 系统 SHALL 允许审核人员选择"通过"
- **AND** 系统 SHALL 要求填写赔付金额
#### Scenario: 审核拒绝
- **WHEN** 保险端理赔审核人员审核理赔申请
- **AND** 发现理赔材料不完整或不符合要求
- **THEN** 系统 SHALL 允许审核人员选择"拒绝"
- **AND** 系统 SHALL 要求填写拒绝原因
#### Scenario: 保存赔付金额
- **WHEN** 保险端理赔审核人员审核通过理赔申请
- **THEN** 系统 SHALL 保存赔付金额
- **AND** 赔付金额 SHALL 返回给银行端
#### Scenario: 保存拒绝原因
- **WHEN** 保险端理赔审核人员拒绝理赔申请
- **THEN** 系统 SHALL 保存拒绝原因
- **AND** 拒绝原因 SHALL 返回给银行端
### Requirement: 执行赔付
保险端 SHALL 在理赔审核通过后执行赔付。
#### Scenario: 自动执行赔付
- **WHEN** 理赔申请审核通过
- **THEN** 系统 SHALL 自动执行赔付操作
- **AND** 系统 SHALL 记录赔付日期和赔付金额
#### Scenario: 赔付结果通知
- **WHEN** 赔付执行成功
- **THEN** 系统 SHALL 将赔付结果通知银行端
- **AND** 银行端 SHALL 能够查看赔付详情
### Requirement: 理赔审核历史记录
保险端 SHALL 保存理赔审核历史记录,支持查询和追溯。
#### Scenario: 查看理赔审核历史
- **WHEN** 保险端理赔审核人员查看已处理的理赔申请
- **THEN** 系统 SHALL 显示理赔审核历史记录
- **AND** 包括审核人员、审核时间、审核结果
#### Scenario: 查看拒绝原因历史
- **WHEN** 保险端理赔审核人员查看已拒绝的理赔申请
- **THEN** 系统 SHALL 显示拒绝原因
- **AND** 支持查看详细的拒绝理由
### Requirement: 理赔审核模拟数据
系统 SHALL 提供理赔审核的模拟数据以支持开发和测试。
#### Scenario: 模拟数据包含多种状态
- **WHEN** 系统加载理赔审核模拟数据
- **THEN** 数据 SHALL 包含待审核、已通过、已拒绝三种状态的理赔申请
- **AND** 每种状态至少包含一条记录
#### Scenario: 模拟数据包含完整信息
- **WHEN** 系统加载理赔审核模拟数据
- **THEN** 每条记录 SHALL 包含理赔申请号、银行信息、保险单号、保险公司信息
- **AND** 包含理赔金额、理赔原因、材料列表(文件名、文件类型、大小、上传时间)
- **AND** 包含申请时间、审核时间、审核人员、赔付金额、赔付日期、拒绝原因
#### Scenario: 模拟数据支持筛选
- **WHEN** 保险端理赔审核人员按状态筛选理赔申请
- **THEN** 系统 SHALL 返回对应状态的模拟数据
- **AND** 支持待审核、已通过、已拒绝三种状态筛选

View File

@@ -0,0 +1,142 @@
# insurance-navigation Specification
## Purpose
TBD - created by archiving change integrate-insurance-flow. Update Purpose after archive.
## Requirements
### Requirement: Insurance Application List Page
The bank side MUST provide a dedicated page to list all insurance applications with search and pagination support.
#### Scenario: Display insurance application list
**Given** the user navigates to `/pagesBank/insurance/application/list`
**When** the page loads
**Then** the system SHALL display a list of all insurance applications with:
- Application ID
- Company name
- Product name
- Insurance amount
- Insurance term
- Status (pending/approved/rejected)
- Created timestamp
- Clickable items that navigate to application detail
#### Scenario: Filter insurance applications by status
**Given** the user is on the insurance application list page
**When** the user selects a status filter (All, Pending, Approved, Rejected)
**Then** the system SHALL display only applications matching the selected status
#### Scenario: Search insurance applications
**Given** the user is on the insurance application list page
**When** the user enters a search term in the search box
**Then** the system SHALL filter applications by:
- Application ID
- Company name
- Product name
- Policy number
**And** display only matching applications in real-time
#### Scenario: Paginate insurance applications
**Given** the user is on the insurance application list page with more than 20 applications
**When** the user scrolls to the bottom of the list
**Then** the system SHALL load the next page of applications automatically
**And** display a loading indicator while fetching
### Requirement: Company and Product Selection Flow
The audit detail page MUST support a multi-step navigation flow for selecting insurance company and product with search functionality.
#### Scenario: Navigate from audit detail to company selection
**Given** a loan application with status `DISBURSED` and no insurance
**When** the user clicks "购买保险" button
**Then** the system SHALL navigate to `/pagesBank/insurance/company/select` with parameters:
- `loanId`: The loan application ID
- `loanAmount`: The loan amount in yuan
- `loanTerm`: The loan term in months
#### Scenario: Search and select insurance company
**Given** the user is on the insurance company selection page
**When** the user enters a search term in the search box
**Then** the system SHALL filter companies by:
- Company name
- Contact information
**And** display only matching companies in real-time
#### Scenario: Select insurance company
**Given** the user selects a company from the list
**When** the selection is confirmed
**Then** the system SHALL navigate to `/pagesBank/insurance/product/select` with parameters:
- `loanId`: The loan application ID
- `companyId`: The selected company ID
- `loanAmount`: The loan amount in yuan
- `loanTerm`: The loan term in months
#### Scenario: Search and select insurance product
**Given** the user is on the insurance product selection page
**When** the user enters a search term in the search box
**Then** the system SHALL filter products by:
- Product name
- Product description
- Product type
**And** display only matching products in real-time
#### Scenario: Select insurance product
**Given** the user selects a product from the list
**When** the selection is confirmed
**Then** the system SHALL navigate to `/pagesBank/insurance/application/create` with parameters:
- `loanId`: The loan application ID
- `companyId`: The selected company ID
- `productId`: The selected product ID
- `loanAmount`: The loan amount in yuan
- `loanTerm`: The loan term in months
### Requirement: Dashboard Shortcuts Navigation
The dashboard shortcuts MUST navigate to the correct insurance management pages.
#### Scenario: Navigate to insurance application list
**Given** the user is on the bank dashboard
**When** the user clicks the "投保管理" shortcut
**Then** the system SHALL navigate to `/pagesBank/insurance/application/list`
#### Scenario: Navigate to claim application list
**Given** the user is on the bank dashboard
**When** the user clicks the "理赔管理" shortcut
**Then** the system SHALL navigate to `/pagesBank/insurance/claim/list`

View File

@@ -0,0 +1,101 @@
# insurance-underwriting Specification
## Purpose
TBD - created by archiving change integrate-insurance-flow. Update Purpose after archive.
## Requirements
### Requirement: 接收投保申请
保险端 SHALL 接收银行端提交的投保申请。
#### Scenario: 查看待核保申请列表
- **WHEN** 保险端核保人员登录系统
- **THEN** 系统 SHALL 显示待核保的投保申请列表
- **AND** 每个申请显示银行名称、客户姓名、贷款金额、保险产品
#### Scenario: 查看投保申请详情
- **WHEN** 保险端核保人员点击投保申请
- **THEN** 系统 SHALL 显示投保申请的完整信息
- **AND** 包括银行信息、客户信息、贷款信息、保险产品信息
### Requirement: 查看银行提供的信息
保险端 SHALL 支持核保人员查看银行提供的客户情况和相关信息。
#### Scenario: 查看客户基本信息
- **WHEN** 保险端核保人员查看投保申请详情
- **THEN** 系统 SHALL 显示客户的基本信息
- **AND** 包括姓名、身份证号、信用评分
#### Scenario: 查看贷款信息
- **WHEN** 保险端核保人员查看投保申请详情
- **THEN** 系统 SHALL 显示贷款相关信息
- **AND** 包括贷款金额、贷款期限、贷款类型
#### Scenario: 查看银行评估信息
- **WHEN** 保险端核保人员查看投保申请详情
- **THEN** 系统 SHALL 显示银行对客户的评估信息
- **AND** 包括银行的风险评估结果
### Requirement: 核保审核
保险端 SHALL 支持核保人员进行承保条件审核。
#### Scenario: 核保通过
- **WHEN** 保险端核保人员审核投保申请
- **AND** 核保人员确认承保条件满足
- **THEN** 系统 SHALL 允许核保人员选择"通过"
- **AND** 系统 SHALL 更新投保申请状态为"已通过"
#### Scenario: 核保拒绝
- **WHEN** 保险端核保人员审核投保申请
- **AND** 核保人员发现承保条件不满足
- **THEN** 系统 SHALL 允许核保人员选择"拒绝"
- **AND** 系统 SHALL 要求填写拒绝原因
#### Scenario: 保存拒绝原因
- **WHEN** 保险端核保人员拒绝投保申请
- **THEN** 系统 SHALL 保存拒绝原因
- **AND** 拒绝原因 SHALL 返回给银行端
### Requirement: 出具保险单
保险端 SHALL 在核保通过后出具保险单。
#### Scenario: 自动生成保险单
- **WHEN** 投保申请核保通过
- **THEN** 系统 SHALL 自动生成保险单
- **AND** 保险单 SHALL 包含保单号、保险公司信息、被保险人信息、保险金额、保险期限
#### Scenario: 保险单发送给银行
- **WHEN** 保险单生成成功
- **THEN** 系统 SHALL 将保险单信息发送给银行端
- **AND** 银行端 SHALL 能够查看保险单详情
### Requirement: 核保历史记录
保险端 SHALL 保存核保历史记录,支持查询和追溯。
#### Scenario: 查看核保历史
- **WHEN** 保险端核保人员查看已处理的投保申请
- **THEN** 系统 SHALL 显示核保历史记录
- **AND** 包括核保人员、核保时间、核保结果
#### Scenario: 查看拒绝原因历史
- **WHEN** 保险端核保人员查看已拒绝的投保申请
- **THEN** 系统 SHALL 显示拒绝原因
- **AND** 支持查看详细的拒绝理由
### Requirement: 核保申请模拟数据
系统 SHALL 提供核保申请的模拟数据以支持开发和测试。
#### Scenario: 模拟数据包含多种状态
- **WHEN** 系统加载核保申请模拟数据
- **THEN** 数据 SHALL 包含待审核、已通过、已拒绝三种状态的投保申请
- **AND** 每种状态至少包含一条记录
#### Scenario: 模拟数据包含完整信息
- **WHEN** 系统加载核保申请模拟数据
- **THEN** 每条记录 SHALL 包含投保申请号、银行信息、保险公司信息、保险产品信息
- **AND** 包含客户信息(姓名、身份证号、信用评分、贷款金额、贷款期限)
- **AND** 包含保险金额、保险期限、申请时间、审核时间、审核人员、拒绝原因
#### Scenario: 模拟数据支持筛选
- **WHEN** 保险端核保人员按状态筛选投保申请
- **THEN** 系统 SHALL 返回对应状态的模拟数据
- **AND** 支持待审核、已通过、已拒绝三种状态筛选

View File

@@ -47,16 +47,47 @@ export default defineUniPages({
{ path: 'audit/list', style: { navigationBarTitleText: '审核列表' } },
{ path: 'audit/detail', style: { navigationBarTitleText: '审核详情' } },
{ path: 'customer/list', style: { navigationBarTitleText: '客户管理' } },
{ path: 'customer/detail', style: { navigationBarTitleText: '客户详情' } },
{ path: 'customer/transaction-list', style: { navigationBarTitleText: '交易记录' } },
{ path: 'customer/withdraw-list', style: { navigationBarTitleText: '提现记录' } },
{ path: 'report/list', style: { navigationBarTitleText: '报表列表' } },
{ path: 'report/download', style: { navigationBarTitleText: '报表下载' } },
{ path: 'visit/list', style: { navigationBarTitleText: '拜访计划' } },
{ path: 'visit/create', style: { navigationBarTitleText: '创建拜访' } },
{ path: 'visit/detail', style: { navigationBarTitleText: '拜访详情' } },
{ path: 'me/index', style: { navigationBarTitleText: '银行中心' } },
],
},
{
root: 'pagesGovernment',
pages: [
{ path: 'dashboard/index', style: { navigationBarTitleText: '政务工作台' } },
{ path: 'bank/list', style: { navigationBarTitleText: '银行管理' } },
{ path: 'bank/detail', style: { navigationBarTitleText: '银行详情' } },
{ path: 'supervise/list', style: { navigationBarTitleText: '合规检查' } },
{ path: 'risk/list', style: { navigationBarTitleText: '风险预警' } },
{ path: 'me/index', style: { navigationBarTitleText: '个人中心' } },
],
},
{
root: 'pagesInsurance',
pages: [
{ path: 'dashboard/index', style: { navigationBarTitleText: '保险工作台' } },
{ path: 'policy/list', style: { navigationBarTitleText: '保单管理' } },
{ path: 'policy/detail', style: { navigationBarTitleText: '保单详情' } },
{ path: 'claim/list', style: { navigationBarTitleText: '理赔处理' } },
{ path: 'claim/detail', style: { navigationBarTitleText: '理赔详情' } },
{ path: 'bank/list', style: { navigationBarTitleText: '合作银行' } },
{ path: 'me/index', style: { navigationBarTitleText: '个人中心' } },
],
},
],
// 分包预下载配置
preloadRule: {
'pages/login/index': {
network: 'all',
packages: ['pagesMerchant', 'pagesBank'],
packages: ['pagesMerchant', 'pagesBank', 'pagesGovernment', 'pagesInsurance'],
},
},
})

872
src/api/insurance.ts Normal file
View File

@@ -0,0 +1,872 @@
/**
* 保险相关 API 接口
*/
import type {
BankLoanWithInsurance,
ClaimApplication,
ClaimReviewRequest,
CreateClaimApplicationRequest,
CreateInsuranceApplicationRequest,
InsuranceApplication,
InsuranceCompany,
InsurancePolicy,
InsuranceProduct,
UnderwritingReviewRequest,
} from '@/api/types/insurance'
// Mock 数据存储
const mockInsuranceCompanies: InsuranceCompany[] = [
{
id: 'IC001',
name: '中国人民财产保险股份有限公司',
contactInfo: '400-1234567',
status: 'active',
},
{
id: 'IC002',
name: '中国平安财产保险股份有限公司',
contactInfo: '400-7654321',
status: 'active',
},
{
id: 'IC003',
name: '中国太平洋财产保险股份有限公司',
contactInfo: '400-9876543',
status: 'active',
},
]
const mockInsuranceProducts: InsuranceProduct[] = [
{
id: 'IP001',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
name: '个人住房贷款保险',
type: 'housing_loan',
description: '为个人住房贷款提供保险保障,保障贷款人因意外事故导致的还款能力丧失',
minAmount: 100000,
maxAmount: 5000000,
status: 'active',
},
{
id: 'IP002',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
name: '企业信贷履约保证保险',
type: 'business_credit',
description: '为企业信贷提供履约保证,降低银行信贷风险',
minAmount: 50000,
maxAmount: 10000000,
status: 'active',
},
{
id: 'IP003',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
name: '小微企业贷款保证保险',
type: 'business_credit',
description: '为小微企业贷款提供保证保险,支持小微企业发展',
minAmount: 30000,
maxAmount: 5000000,
status: 'active',
},
{
id: 'IP004',
companyId: 'IC003',
companyName: '中国太平洋财产保险股份有限公司',
name: '个人消费贷款保险',
type: 'other',
description: '为个人消费贷款提供保险保障',
minAmount: 20000,
maxAmount: 2000000,
status: 'active',
},
]
const mockInsuranceApplications: InsuranceApplication[] = [
{
id: 'IA20250112001',
loanId: 'LA20251226001',
bankId: 'B001',
bankName: '中国工商银行',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
productId: 'IP001',
productName: '个人住房贷款保险',
customerInfo: {
name: '张三',
idNumber: '440106199001011234',
creditScore: 750,
loanAmount: 500000,
loanTerm: 120,
loanType: 'housing_loan',
},
insuranceAmount: 500000,
insuranceTerm: 120,
status: 'pending',
createdAt: '2025-01-10 14:30:00',
},
{
id: 'IA20250111001',
loanId: 'LA20251226002',
bankId: 'B001',
bankName: '中国工商银行',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
productId: 'IP003',
productName: '小微企业贷款保证保险',
customerInfo: {
name: '李四',
idNumber: '440106199202025678',
creditScore: 720,
loanAmount: 800000,
loanTerm: 180,
loanType: 'business_credit',
},
insuranceAmount: 800000,
insuranceTerm: 180,
status: 'approved',
createdAt: '2025-01-09 10:15:00',
reviewedAt: '2025-01-10 16:20:00',
reviewedBy: '核保员001',
},
{
id: 'IA20250110001',
loanId: 'LA20251226003',
bankId: 'B002',
bankName: '中国建设银行',
companyId: 'IC003',
companyName: '中国太平洋财产保险股份有限公司',
productId: 'IP004',
productName: '个人消费贷款保险',
customerInfo: {
name: '王五',
idNumber: '440106198803034567',
creditScore: 680,
loanAmount: 300000,
loanTerm: 90,
loanType: 'other',
},
insuranceAmount: 300000,
insuranceTerm: 90,
status: 'rejected',
createdAt: '2025-01-08 09:45:00',
reviewedAt: '2025-01-09 11:30:00',
reviewedBy: '核保员002',
rejectionReason: '客户信用评分低于产品要求最低值700分',
},
{
id: 'IA20250109001',
loanId: 'LA20251226004',
bankId: 'B001',
bankName: '中国工商银行',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
productId: 'IP002',
productName: '企业信贷履约保证保险',
customerInfo: {
name: '赵六',
idNumber: '440106199504045678',
creditScore: 780,
loanAmount: 600000,
loanTerm: 120,
loanType: 'business_credit',
},
insuranceAmount: 600000,
insuranceTerm: 120,
status: 'pending',
createdAt: '2025-01-07 15:20:00',
},
]
const mockInsurancePolicies: InsurancePolicy[] = [
{
id: 'IP20250111001',
applicationId: 'IA20250111001',
policyNumber: 'POL20250111001',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
bankId: 'B001',
bankName: '中国工商银行',
loanId: 'LA20251226002',
productId: 'IP003',
productName: '小微企业贷款保证保险',
insuranceAmount: 800000,
insuranceTerm: 180,
startDate: '2025-01-10 16:20:00',
endDate: '2026-07-09 16:20:00',
status: 'active',
issuedAt: '2025-01-10 16:20:00',
},
{
id: 'IP20241220001',
applicationId: 'IA20241220001',
policyNumber: 'POL20241220001',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
bankId: 'B002',
bankName: '中国建设银行',
loanId: 'LA20241220001',
productId: 'IP001',
productName: '个人住房贷款保险',
insuranceAmount: 500000,
insuranceTerm: 120,
startDate: '2024-12-20 10:30:00',
endDate: '2025-12-20 10:30:00',
status: 'active',
issuedAt: '2024-12-20 10:30:00',
},
{
id: 'IP20241115002',
applicationId: 'IA20241115002',
policyNumber: 'POL20241115002',
companyId: 'IC003',
companyName: '中国太平洋财产保险股份有限公司',
bankId: 'B003',
bankName: '中国农业银行',
loanId: 'LA20241115002',
productId: 'IP004',
productName: '个人消费贷款保险',
insuranceAmount: 300000,
insuranceTerm: 90,
startDate: '2024-11-15 14:45:00',
endDate: '2025-02-15 14:45:00',
status: 'active',
issuedAt: '2024-11-15 14:45:00',
},
{
id: 'IP20241010003',
applicationId: 'IA20241010003',
policyNumber: 'POL20241010003',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
bankId: 'B004',
bankName: '中国银行',
loanId: 'LA20241010003',
productId: 'IP002',
productName: '企业信贷履约保证保险',
insuranceAmount: 1000000,
insuranceTerm: 240,
startDate: '2024-10-10 09:00:00',
endDate: '2026-10-10 09:00:00',
status: 'active',
issuedAt: '2024-10-10 09:00:00',
},
{
id: 'IP20240905004',
applicationId: 'IA20240905004',
policyNumber: 'POL20240905004',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
bankId: 'B001',
bankName: '中国工商银行',
loanId: 'LA20240905004',
productId: 'IP003',
productName: '小微企业贷款保证保险',
insuranceAmount: 450000,
insuranceTerm: 120,
startDate: '2024-09-05 16:20:00',
endDate: '2025-09-05 16:20:00',
status: 'expiring',
issuedAt: '2024-09-05 16:20:00',
},
{
id: 'IP20240805005',
applicationId: 'IA20240805005',
policyNumber: 'POL20240805005',
companyId: 'IC003',
companyName: '中国太平洋财产保险股份有限公司',
bankId: 'B002',
bankName: '中国建设银行',
loanId: 'LA20240805005',
productId: 'IP004',
productName: '个人消费贷款保险',
insuranceAmount: 200000,
insuranceTerm: 60,
startDate: '2024-08-05 11:30:00',
endDate: '2025-02-05 11:30:00',
status: 'expiring',
issuedAt: '2024-08-05 11:30:00',
},
{
id: 'IP20240701006',
applicationId: 'IA20240701006',
policyNumber: 'POL20240701006',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
bankId: 'B003',
bankName: '中国农业银行',
loanId: 'LA20240701006',
productId: 'IP001',
productName: '个人住房贷款保险',
insuranceAmount: 350000,
insuranceTerm: 180,
startDate: '2024-07-01 08:00:00',
endDate: '2025-07-01 08:00:00',
status: 'expiring',
issuedAt: '2024-07-01 08:00:00',
},
{
id: 'IP20240602007',
applicationId: 'IA20240602007',
policyNumber: 'POL20240602007',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
bankId: 'B004',
bankName: '中国银行',
loanId: 'LA20240602007',
productId: 'IP003',
productName: '小微企业贷款保证保险',
insuranceAmount: 600000,
insuranceTerm: 150,
startDate: '2024-06-02 13:15:00',
endDate: '2024-12-02 13:15:00',
status: 'expired',
issuedAt: '2024-06-02 13:15:00',
},
{
id: 'IP20240503008',
applicationId: 'IA20240503008',
policyNumber: 'POL20240503008',
companyId: 'IC003',
companyName: '中国太平洋财产保险股份有限公司',
bankId: 'B001',
bankName: '中国工商银行',
loanId: 'LA20240503008',
productId: 'IP004',
productName: '个人消费贷款保险',
insuranceAmount: 150000,
insuranceTerm: 90,
startDate: '2024-05-03 10:45:00',
endDate: '2024-08-03 10:45:00',
status: 'expired',
issuedAt: '2024-05-03 10:45:00',
},
{
id: 'IP20240404009',
applicationId: 'IA20240404009',
policyNumber: 'POL20240404009',
companyId: 'IC001',
companyName: '中国人民财产保险股份有限公司',
bankId: 'B002',
bankName: '中国建设银行',
loanId: 'LA20240404009',
productId: 'IP002',
productName: '企业信贷履约保证保险',
insuranceAmount: 750000,
insuranceTerm: 200,
startDate: '2024-04-04 15:30:00',
endDate: '2024-10-04 15:30:00',
status: 'expired',
issuedAt: '2024-04-04 15:30:00',
},
{
id: 'IP20240305010',
applicationId: 'IA20240305010',
policyNumber: 'POL20240305010',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
bankId: 'B003',
bankName: '中国农业银行',
loanId: 'LA20240305010',
productId: 'IP003',
productName: '小微企业贷款保证保险',
insuranceAmount: 900000,
insuranceTerm: 180,
startDate: '2024-03-05 09:20:00',
endDate: '2025-03-05 09:20:00',
status: 'active',
issuedAt: '2024-03-05 09:20:00',
},
{
id: 'IP20240206011',
applicationId: 'IA20240206011',
policyNumber: 'POL20240206011',
companyId: 'IC003',
companyName: '中国太平洋财产保险股份有限公司',
bankId: 'B004',
bankName: '中国银行',
loanId: 'LA20240206011',
productId: 'IP004',
productName: '个人消费贷款保险',
insuranceAmount: 250000,
insuranceTerm: 120,
startDate: '2024-02-06 14:10:00',
endDate: '2025-02-06 14:10:00',
status: 'active',
issuedAt: '2024-02-06 14:10:00',
},
]
const mockClaimApplications: ClaimApplication[] = [
{
id: 'CA20250112001',
policyId: 'IP20250111001',
policyNumber: 'POL20250111001',
loanId: 'LA20251226002',
bankId: 'B001',
bankName: '中国工商银行',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
claimAmount: 400000,
claimReason: '借款人逾期超过90天无法偿还贷款本息',
materials: [
{
id: 'CM20250112001',
name: '逾期还款记录.pdf',
url: 'https://example.com/files/overdue_record.pdf',
type: 'application/pdf',
size: 1024000,
uploadTime: '2025-01-12 10:30:00',
},
{
id: 'CM20250112002',
name: '催收记录.docx',
url: 'https://example.com/files/collection_record.docx',
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
size: 512000,
uploadTime: '2025-01-12 10:31:00',
},
{
id: 'CM20250112003',
name: '借款人财务状况.jpg',
url: 'https://example.com/files/financial_status.jpg',
type: 'image/jpeg',
size: 2048000,
uploadTime: '2025-01-12 10:32:00',
},
],
status: 'pending',
submittedAt: '2025-01-12 10:30:00',
},
{
id: 'CA20250111001',
policyId: 'IP20250111001',
policyNumber: 'POL20250111001',
loanId: 'LA20251226002',
bankId: 'B001',
bankName: '中国工商银行',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
claimAmount: 200000,
claimReason: '借款人经营困难,申请部分理赔',
materials: [
{
id: 'CM20250111001',
name: '经营困难证明.pdf',
url: 'https://example.com/files/difficulty_proof.pdf',
type: 'application/pdf',
size: 768000,
uploadTime: '2025-01-11 14:20:00',
},
],
status: 'approved',
submittedAt: '2025-01-11 14:20:00',
reviewedAt: '2025-01-12 09:15:00',
reviewedBy: '理赔审核员001',
payoutAmount: 180000,
payoutDate: '2025-01-12 09:20:00',
},
{
id: 'CA20250110001',
policyId: 'IP20250111001',
policyNumber: 'POL20250111001',
loanId: 'LA20251226002',
bankId: 'B001',
bankName: '中国工商银行',
companyId: 'IC002',
companyName: '中国平安财产保险股份有限公司',
claimAmount: 600000,
claimReason: '借款人失联,申请全额理赔',
materials: [
{
id: 'CM20250110001',
name: '失联证明.pdf',
url: 'https://example.com/files/missing_proof.pdf',
type: 'application/pdf',
size: 512000,
uploadTime: '2025-01-10 11:00:00',
},
],
status: 'rejected',
submittedAt: '2025-01-10 11:00:00',
reviewedAt: '2025-01-10 16:30:00',
reviewedBy: '理赔审核员002',
rejectionReason: '提供的失联证明材料不充分,需要补充公安部门出具的正式证明文件',
},
]
// ==================== 银行端 API ====================
/**
* [银行端] 获取合作保险公司列表
*/
export function getInsuranceCompanies() {
return new Promise<{ list: InsuranceCompany[] }>((resolve) => {
setTimeout(() => {
resolve({
list: mockInsuranceCompanies.filter(c => c.status === 'active'),
})
}, 300)
})
}
/**
* [银行端] 获取保险产品列表
*/
export function getInsuranceProducts(companyId?: string) {
return new Promise<{ list: InsuranceProduct[] }>((resolve) => {
setTimeout(() => {
let products = mockInsuranceProducts.filter(p => p.status === 'active')
if (companyId) {
products = products.filter(p => p.companyId === companyId)
}
resolve({ list: products })
}, 300)
})
}
/**
* [银行端] 创建投保申请
*/
export function createInsuranceApplication(data: CreateInsuranceApplicationRequest) {
return new Promise<{ id: string }>((resolve) => {
setTimeout(() => {
const application: InsuranceApplication = {
id: `IA${Date.now()}`,
loanId: data.loanId,
bankId: 'B001',
bankName: '中国工商银行',
companyId: data.companyId,
companyName: mockInsuranceCompanies.find(c => c.id === data.companyId)?.name || '',
productId: data.productId,
productName: mockInsuranceProducts.find(p => p.id === data.productId)?.name || '',
customerInfo: {
name: '张三',
idNumber: '440106199001011234',
creditScore: 750,
loanAmount: 500000,
loanTerm: 120,
loanType: 'business_credit',
},
insuranceAmount: data.insuranceAmount,
insuranceTerm: data.insuranceTerm,
status: 'pending',
createdAt: new Date().toLocaleString(),
}
mockInsuranceApplications.push(application)
resolve({ id: application.id })
}, 500)
})
}
/**
* [银行端] 获取投保申请详情
*/
export function getInsuranceApplicationDetail(id: string) {
return new Promise<InsuranceApplication>((resolve, reject) => {
setTimeout(() => {
const application = mockInsuranceApplications.find(a => a.id === id)
if (application) {
resolve(application)
}
else {
reject(new Error('投保申请不存在'))
}
}, 300)
})
}
/**
* [银行端] 获取保险单详情
*/
export function getInsurancePolicyDetail(id: string) {
return new Promise<InsurancePolicy>((resolve, reject) => {
setTimeout(() => {
const policy = mockInsurancePolicies.find(p => p.id === id)
if (policy) {
resolve(policy)
}
else {
reject(new Error('保险单不存在'))
}
}, 300)
})
}
/**
* [银行端] 创建理赔申请
*/
export function createClaimApplication(data: CreateClaimApplicationRequest) {
return new Promise<{ id: string }>((resolve) => {
setTimeout(() => {
const policy = mockInsurancePolicies.find(p => p.id === data.policyId)
const claim: ClaimApplication = {
id: `CA${Date.now()}`,
policyId: data.policyId,
policyNumber: policy?.policyNumber || '',
loanId: data.loanId,
bankId: 'B001',
bankName: '中国工商银行',
companyId: policy?.companyId || '',
companyName: policy?.companyName || '',
claimAmount: data.claimAmount,
claimReason: data.claimReason,
materials: data.materials.map((file, index) => ({
id: `CM${Date.now()}_${index}`,
name: file.name,
url: URL.createObjectURL(file),
type: file.type,
size: file.size,
uploadTime: new Date().toLocaleString(),
})),
status: 'pending',
submittedAt: new Date().toLocaleString(),
}
mockClaimApplications.push(claim)
resolve({ id: claim.id })
}, 500)
})
}
/**
* [银行端] 获取理赔申请详情
*/
export function getClaimApplicationDetail(id: string) {
return new Promise<ClaimApplication>((resolve, reject) => {
setTimeout(() => {
const claim = mockClaimApplications.find(c => c.id === id)
if (claim) {
resolve(claim)
}
else {
reject(new Error('理赔申请不存在'))
}
}, 300)
})
}
/**
* [银行端] 获取理赔申请列表
*/
export function getClaimApplicationList(params?: { status?: string }) {
return new Promise<{ list: ClaimApplication[] }>((resolve) => {
setTimeout(() => {
let list = [...mockClaimApplications]
if (params?.status) {
list = list.filter(c => c.status === params.status)
}
resolve({ list })
}, 300)
})
}
// ==================== 保险端 API ====================
/**
* [保险端] 获取待核保申请列表
*/
export function getUnderwritingApplications(params?: { status?: string }) {
return new Promise<{ list: InsuranceApplication[] }>((resolve) => {
setTimeout(() => {
let list = [...mockInsuranceApplications]
if (params?.status) {
list = list.filter(a => a.status === params.status)
}
resolve({ list })
}, 300)
})
}
/**
* [保险端] 核保审核
*/
export function reviewUnderwritingApplication(id: string, data: UnderwritingReviewRequest) {
return new Promise<void>((resolve) => {
setTimeout(() => {
const application = mockInsuranceApplications.find(a => a.id === id)
if (application) {
application.status = data.approved ? 'approved' : 'rejected'
application.reviewedAt = new Date().toLocaleString()
application.reviewedBy = '核保员001'
application.rejectionReason = data.rejectionReason
// 如果审核通过,生成保险单
if (data.approved) {
const policy: InsurancePolicy = {
id: `IP${Date.now()}`,
applicationId: application.id,
policyNumber: `POL${Date.now()}`,
companyId: application.companyId,
companyName: application.companyName,
bankId: application.bankId,
bankName: application.bankName,
loanId: application.loanId,
productId: application.productId,
productName: application.productName,
insuranceAmount: application.insuranceAmount,
insuranceTerm: application.insuranceTerm,
startDate: new Date().toLocaleString(),
endDate: new Date(Date.now() + application.insuranceTerm * 30 * 24 * 60 * 60 * 1000).toLocaleString(),
status: 'active',
issuedAt: new Date().toLocaleString(),
}
mockInsurancePolicies.push(policy)
}
}
resolve()
}, 500)
})
}
/**
* [保险端] 获取待理赔审核列表
*/
export function getClaimReviewApplications(params?: { status?: string }) {
return new Promise<{ list: ClaimApplication[] }>((resolve) => {
setTimeout(() => {
let list = [...mockClaimApplications]
if (params?.status) {
list = list.filter(c => c.status === params.status)
}
resolve({ list })
}, 300)
})
}
/**
* [保险端] 理赔审核
*/
export function reviewClaimApplication(id: string, data: ClaimReviewRequest) {
return new Promise<void>((resolve) => {
setTimeout(() => {
const claim = mockClaimApplications.find(c => c.id === id)
if (claim) {
claim.status = data.approved ? 'approved' : 'rejected'
claim.reviewedAt = new Date().toLocaleString()
claim.reviewedBy = '理赔审核员001'
claim.rejectionReason = data.rejectionReason
// 如果审核通过,执行赔付
if (data.approved && data.payoutAmount) {
claim.payoutAmount = data.payoutAmount
claim.payoutDate = new Date().toLocaleString()
}
}
resolve()
}, 500)
})
}
// ==================== 政务端 API ====================
/**
* [政务端] 获取贷款列表(含保险信息)
*/
export function getGovernmentLoanList(params?: { includeInsurance?: boolean, isBadLoan?: boolean }) {
return new Promise<{ list: BankLoanWithInsurance[] }>((resolve) => {
setTimeout(() => {
// Mock 数据
const loans: BankLoanWithInsurance[] = [
{
id: 'LA20251226001',
userId: 'U001',
userName: '张三',
amount: 500000,
term: 120,
status: 'approved',
isBadLoan: false,
},
{
id: 'LA20251226002',
userId: 'U002',
userName: '李四',
amount: 800000,
term: 180,
status: 'disbursed',
insuranceApplication: mockInsuranceApplications[0],
insurancePolicy: mockInsurancePolicies[0],
isBadLoan: false,
},
{
id: 'LA20251226003',
userId: 'U003',
userName: '王五',
amount: 300000,
term: 90,
status: 'disbursed',
insuranceApplication: mockInsuranceApplications[1],
insurancePolicy: mockInsurancePolicies[1],
claimApplications: mockClaimApplications.slice(0, 2),
isBadLoan: true,
badLoanDays: 45,
},
]
let list = [...loans]
if (params?.isBadLoan !== undefined) {
list = list.filter(l => l.isBadLoan === params.isBadLoan)
}
resolve({ list })
}, 500)
})
}
/**
* [政务端] 获取贷款详情(含完整业务流程)
*/
export function getGovernmentLoanDetail(id: string, params?: { full?: boolean }) {
return new Promise<BankLoanWithInsurance>((resolve, reject) => {
setTimeout(() => {
const loan: BankLoanWithInsurance = {
id,
userId: 'U001',
userName: '张三',
amount: 500000,
term: 120,
status: 'disbursed',
insuranceApplication: mockInsuranceApplications[0],
insurancePolicy: mockInsurancePolicies[0],
claimApplications: mockClaimApplications.slice(0, 1),
isBadLoan: false,
}
resolve(loan)
}, 500)
})
}
/**
* [政务端] 获取不良贷款列表
*/
export function getBadLoanList() {
return new Promise<{ list: BankLoanWithInsurance[] }>((resolve) => {
setTimeout(() => {
const loans: BankLoanWithInsurance[] = [
{
id: 'LA20251226003',
userId: 'U003',
userName: '王五',
amount: 300000,
term: 90,
status: 'disbursed',
insuranceApplication: mockInsuranceApplications[1],
insurancePolicy: mockInsurancePolicies[1],
claimApplications: mockClaimApplications.slice(0, 2),
isBadLoan: true,
badLoanDays: 45,
},
{
id: 'LA20251226004',
userId: 'U004',
userName: '赵六',
amount: 600000,
term: 120,
status: 'disbursed',
isBadLoan: true,
badLoanDays: 30,
},
]
resolve({ list: loans })
}, 500)
})
}

View File

@@ -79,26 +79,57 @@ let mockDatabase: LoanApplication[] = []
export function getLoanApplicationList(params: any) {
return new Promise<{ list: LoanApplication[], total: number }>((resolve) => {
setTimeout(() => {
// 如果没有数据,初始化一些 Mock 数据
// 如果没有数据,初始化一些 Mock 数据,包含所有状态
if (mockDatabase.length === 0) {
mockDatabase = [
{
id: 'LA20251219001',
id: 'LA20251226001',
userId: 'U001',
userName: '张三',
userPhone: '13800138000',
amount: 50,
term: 1,
status: LoanStatus.SUBMITTED,
createTime: '2025-12-19 10:00:00',
updateTime: '2025-12-19 10:00:00',
createTime: '2025-12-26 09:00:00',
updateTime: '2025-12-26 09:00:00',
userOrders: [
{
orderNo: 'O20251226001',
goodsName: '桂味新鲜荔枝现摘现发当季水果自家果园荔枝',
goodsImage: '/static/product/1/1.jpg',
quantity: 2,
amount: 40.00,
orderTime: '2025-12-20 10:30:00',
status: '已完成'
},
{
orderNo: 'O20251226002',
goodsName: '老农田桂圆肉干无核新货8a龙眼肉干500g厚元肉干',
goodsImage: '/static/product/2/1.jpg',
quantity: 1,
amount: 50.00,
orderTime: '2025-12-15 14:20:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M001',
merchantName: '乐高玩具旗舰店',
lastTradeTime: '2025-12-01',
selected: true,
assistStatus: 'pending'
assistStatus: 'pending',
materials: {
merchantId: 'M001',
merchantName: '乐高玩具旗舰店',
loanApplicationId: 'LA20251226001',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 09:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 09:00:00' }
],
submitTime: '2025-12-26 09:00:00',
status: 'submitted'
}
}
],
personalInfo: {
@@ -121,13 +152,636 @@ export function getLoanApplicationList(params: any) {
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226002',
userId: 'U002',
userName: '李四',
userPhone: '13900139000',
amount: 80,
term: 2,
status: LoanStatus.ACCEPTED,
handlerName: '王经理',
handlerPhone: '13800138888',
createTime: '2025-12-25 14:30:00',
updateTime: '2025-12-25 15:00:00',
userOrders: [
{
orderNo: 'O20251225001',
goodsName: '自然禾方化橘红陈皮无糖植物饮料350ml*9瓶整箱装',
goodsImage: '/static/product/3/1.jpg',
quantity: 2,
amount: 100.00,
orderTime: '2025-12-18 09:15:00',
status: '已完成'
},
{
orderNo: 'O20251225002',
goodsName: '沉香原木摆件老料虫漏原材料天然刮香',
goodsImage: '/static/product/4/1.jpg',
quantity: 1,
amount: 152.00,
orderTime: '2025-12-10 16:45:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M002',
merchantName: '迪士尼官方店',
lastTradeTime: '2025-11-20',
selected: true,
assistStatus: 'pending',
materials: {
merchantId: 'M002',
merchantName: '迪士尼官方店',
loanApplicationId: 'LA20251226002',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-25 14:30:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-25 14:30:00' }
],
submitTime: '2025-12-25 14:30:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '李四',
phone: '13900139000',
idCard: '440106199002021234',
region: ['广东省', '深圳市', '南山区'],
detailAddress: '科技园路2号'
},
businessInfo: {
businessProject: '玩具批发',
businessTime: '5年',
annualIncome: 150,
hasDebt: 'no',
loanDemand: 80,
assets: ['house']
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226003',
userId: 'U003',
userName: '王五',
userPhone: '13700137000',
amount: 30,
term: 1,
status: LoanStatus.INVESTIGATING,
handlerName: '刘经理',
handlerPhone: '13800139999',
createTime: '2025-12-24 10:00:00',
updateTime: '2025-12-25 16:00:00',
userOrders: [
{
orderNo: 'O20251224001',
goodsName: '罗非鱼苗新吉富雄性淡水养殖特大鱼耐寒',
goodsImage: '/static/product/6/1.jpg',
quantity: 5,
amount: 50.00,
orderTime: '2025-12-12 11:20:00',
status: '已完成'
},
{
orderNo: 'O20251224002',
goodsName: '三华李5斤新鲜李子孕妇水果现摘大果珍珠青李',
goodsImage: '/static/product/7/1.jpg',
quantity: 1,
amount: 30.00,
orderTime: '2025-12-08 15:30:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M003',
merchantName: '泡泡玛特',
lastTradeTime: '2025-11-15',
selected: true,
assistStatus: 'submitted',
materials: {
merchantId: 'M003',
merchantName: '泡泡玛特',
loanApplicationId: 'LA20251226003',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 10:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 10:00:00' }
],
submitTime: '2025-12-26 10:00:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '王五',
phone: '13700137000',
idCard: '440106199003031234',
region: ['广东省', '广州市', '越秀区'],
detailAddress: '北京路3号'
},
businessInfo: {
businessProject: '玩具零售',
businessTime: '2年',
annualIncome: 80,
hasDebt: 'yes',
debtAmount: 10,
loanDemand: 30,
assets: ['car']
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226004',
userId: 'U004',
userName: '赵六',
userPhone: '13600136000',
amount: 100,
term: 3,
status: LoanStatus.REPORTED,
handlerName: '陈经理',
handlerPhone: '13800137777',
createTime: '2025-12-23 11:00:00',
updateTime: '2025-12-25 17:00:00',
userOrders: [
{
orderNo: 'O20251223001',
goodsName: '茂名特产正宗黑豆干豆豉豉原味古法工艺散装',
goodsImage: '/static/product/10/1.jpg',
quantity: 3,
amount: 97.50,
orderTime: '2025-12-05 10:10:00',
status: '已完成'
},
{
orderNo: 'O20251223002',
goodsName: '电白绿奇线香纯手工电白绿奇手工香电白绿奇楠老料',
goodsImage: '/static/product/9/1.jpg',
quantity: 2,
amount: 91.20,
orderTime: '2025-11-28 14:50:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M004',
merchantName: '奥特曼官方玩具店',
lastTradeTime: '2025-11-10',
selected: true,
assistStatus: 'submitted',
materials: {
merchantId: 'M004',
merchantName: '奥特曼官方玩具店',
loanApplicationId: 'LA20251226004',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 11:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 11:00:00' }
],
submitTime: '2025-12-26 11:00:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '赵六',
phone: '13600136000',
idCard: '440106199004041234',
region: ['广东省', '珠海市', '香洲区'],
detailAddress: '情侣路4号'
},
businessInfo: {
businessProject: '玩具连锁',
businessTime: '8年',
annualIncome: 200,
hasDebt: 'no',
loanDemand: 100,
assets: ['house', 'car', 'shop']
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226005',
userId: 'U005',
userName: '孙七',
userPhone: '13500135000',
amount: 60,
term: 2,
status: LoanStatus.APPROVED,
handlerName: '周经理',
handlerPhone: '13800136666',
createTime: '2025-12-22 09:00:00',
updateTime: '2025-12-25 18:00:00',
userOrders: [
{
orderNo: 'O20251222001',
goodsName: '茂名特产籺籺寿桃籺籺菠萝叶籺籺电白高州籺籺',
goodsImage: '/static/product/11/1.jpg',
quantity: 2,
amount: 30.00,
orderTime: '2025-12-01 09:25:00',
status: '已完成'
},
{
orderNo: 'O20251222002',
goodsName: '凤球唛唛瑶柱鲍鱼汁290g/瓶海参即食捞饭',
goodsImage: '/static/product/12/1.jpg',
quantity: 1,
amount: 10.00,
orderTime: '2025-11-25 13:40:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M005',
merchantName: '玩具反斗城',
lastTradeTime: '2025-11-05',
selected: true,
assistStatus: 'submitted',
materials: {
merchantId: 'M005',
merchantName: '玩具反斗城',
loanApplicationId: 'LA20251226005',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 12:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 12:00:00' }
],
submitTime: '2025-12-26 12:00:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '孙七',
phone: '13500135000',
idCard: '440106199005051234',
region: ['广东省', '广州市', '番禺区'],
detailAddress: '番禺大道5号'
},
businessInfo: {
businessProject: '玩具批发',
businessTime: '6年',
annualIncome: 120,
hasDebt: 'no',
loanDemand: 60,
assets: ['house', 'shop']
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226006',
userId: 'U006',
userName: '周八',
userPhone: '13400134000',
amount: 40,
term: 1,
status: LoanStatus.REJECTED,
handlerName: '吴经理',
handlerPhone: '13800135555',
createTime: '2025-12-21 14:00:00',
updateTime: '2025-12-24 10:00:00',
userOrders: [
{
orderNo: 'O20251221001',
goodsName: '灰色西装套装女春秋高级感气质显瘦时尚通勤连衣',
goodsImage: '/static/product/14/1.jpg',
quantity: 1,
amount: 150.00,
orderTime: '2025-11-20 10:55:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M006',
merchantName: 'KidsLand',
lastTradeTime: '2025-10-20',
selected: true,
assistStatus: 'pending',
materials: {
merchantId: 'M006',
merchantName: 'KidsLand',
loanApplicationId: 'LA20251226006',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 13:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 13:00:00' }
],
submitTime: '2025-12-26 13:00:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '周八',
phone: '13400134000',
idCard: '440106199006061234',
region: ['广东省', '广州市', '海珠区'],
detailAddress: '江南大道6号'
},
businessInfo: {
businessProject: '玩具零售',
businessTime: '1年',
annualIncome: 50,
hasDebt: 'yes',
debtAmount: 20,
loanDemand: 40,
assets: []
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226007',
userId: 'U007',
userName: '郑九',
userPhone: '13300133000',
amount: 70,
term: 2,
status: LoanStatus.SIGNED,
handlerName: '郑经理',
handlerPhone: '13800134444',
createTime: '2025-12-20 10:00:00',
updateTime: '2025-12-26 09:00:00',
userOrders: [
{
orderNo: 'O20251220001',
goodsName: '竹编竹篮子高档手提中秋月饼包装礼盒端午节粽子',
goodsImage: '/static/product/17/1.jpg',
quantity: 2,
amount: 30.00,
orderTime: '2025-11-15 14:30:00',
status: '已完成'
},
{
orderNo: 'O20251220002',
goodsName: '洗面奶专用清爽控油祛痘洁面乳去油去黑头',
goodsImage: '/static/product/18/1.jpg',
quantity: 1,
amount: 45.00,
orderTime: '2025-11-10 09:20:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M001',
merchantName: '乐高玩具旗舰店',
lastTradeTime: '2025-12-01',
selected: true,
assistStatus: 'submitted',
materials: {
merchantId: 'M001',
merchantName: '乐高玩具旗舰店',
loanApplicationId: 'LA20251226007',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 14:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 14:00:00' }
],
submitTime: '2025-12-26 14:00:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '郑九',
phone: '13300133000',
idCard: '440106199007071234',
region: ['广东省', '广州市', '白云区'],
detailAddress: '白云大道7号'
},
businessInfo: {
businessProject: '玩具零售',
businessTime: '4年',
annualIncome: 110,
hasDebt: 'no',
loanDemand: 70,
assets: ['house', 'car']
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226008',
userId: 'U008',
userName: '王十',
userPhone: '13200132000',
amount: 90,
term: 3,
status: LoanStatus.DISBURSED,
handlerName: '冯经理',
handlerPhone: '13800133333',
createTime: '2025-12-19 11:00:00',
updateTime: '2025-12-26 10:00:00',
userOrders: [
{
orderNo: 'O20251219001',
goodsName: '100寸防爆电视机4K高清智能网络平板',
goodsImage: '/static/product/13/1.jpg',
quantity: 1,
amount: 500.00,
orderTime: '2025-11-05 11:45:00',
status: '已完成'
},
{
orderNo: 'O20251219002',
goodsName: '原创汉服改良交领刺绣织金妆花黑色马面裙女冬款',
goodsImage: '/static/product/15/1.jpg',
quantity: 1,
amount: 90.00,
orderTime: '2025-10-28 16:20:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M002',
merchantName: '迪士尼官方店',
lastTradeTime: '2025-11-20',
selected: true,
assistStatus: 'submitted',
materials: {
merchantId: 'M002',
merchantName: '迪士尼官方店',
loanApplicationId: 'LA20251226008',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 15:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 15:00:00' }
],
submitTime: '2025-12-26 15:00:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '王十',
phone: '13200132000',
idCard: '440106199008081234',
region: ['广东省', '广州市', '荔湾区'],
detailAddress: '中山八路8号'
},
businessInfo: {
businessProject: '玩具批发',
businessTime: '7年',
annualIncome: 180,
hasDebt: 'no',
loanDemand: 90,
assets: ['house', 'shop']
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: []
},
{
id: 'LA20251226009',
userId: 'U009',
userName: '钱十一',
userPhone: '13100131000',
amount: 45,
term: 1,
status: LoanStatus.PENDING_SUPPLEMENT,
handlerName: '吴经理',
handlerPhone: '13800132222',
createTime: '2025-12-18 13:00:00',
updateTime: '2025-12-26 16:00:00',
userOrders: [
{
orderNo: 'O20251218001',
goodsName: '正宗化州拖罗饼金腿拖罗大饼广式月饼中秋特产',
goodsImage: '/static/product/8/1.jpg',
quantity: 1,
amount: 30.00,
orderTime: '2025-10-15 10:30:00',
status: '已完成'
},
{
orderNo: 'O20251218002',
goodsName: '天然玉石玉雕龙船一帆风顺摆件家居装饰品',
goodsImage: '/static/product/16/1.jpg',
quantity: 1,
amount: 168.00,
orderTime: '2025-10-10 14:15:00',
status: '已完成'
}
],
relatedMerchants: [
{
merchantId: 'M003',
merchantName: '泡泡玛特',
lastTradeTime: '2025-11-15',
selected: true,
assistStatus: 'pending',
materials: {
merchantId: 'M003',
merchantName: '泡泡玛特',
loanApplicationId: 'LA20251226009',
materials: [
{ type: 'invoice', url: '/static/fb/1.jpg', name: '发票', uploadTime: '2025-12-26 16:00:00' },
{ type: 'contract', url: '/static/fb/2.jpg', name: '合同', uploadTime: '2025-12-26 16:00:00' }
],
submitTime: '2025-12-26 16:00:00',
status: 'submitted'
}
}
],
personalInfo: {
name: '钱十一',
phone: '13100131000',
idCard: '440106199009091234',
region: ['广东省', '广州市', '黄埔区'],
detailAddress: '黄埔大道9号'
},
businessInfo: {
businessProject: '玩具零售',
businessTime: '1.5年',
annualIncome: 60,
hasDebt: 'yes',
debtAmount: 15,
loanDemand: 45,
assets: ['car']
},
documentInfo: {
businessLicense: 'https://via.placeholder.com/150',
otherMaterials: []
},
processRecords: [
{
step: 'accept',
operator: '王经理',
operateTime: '2025-12-18 14:00:00',
result: 'pass'
},
{
step: 'investigate',
operator: '刘经理',
operateTime: '2025-12-20 10:00:00',
result: 'pass',
opinion: '经营情况良好但需要补充近3个月银行流水'
},
{
step: 'report',
operator: '陈经理',
operateTime: '2025-12-26 16:00:00',
result: 'reject',
opinion: '资料不全要求补充近3个月银行流水和纳税证明'
}
]
}
]
}
// 根据参数过滤数据
let filteredList = [...mockDatabase]
console.log('getLoanApplicationList - params:', params)
console.log('getLoanApplicationList - mockDatabase length:', mockDatabase.length)
// 按状态过滤
if (params.status) {
console.log('按状态过滤:', params.status)
filteredList = filteredList.filter(item => item.status === params.status)
console.log('过滤后数量:', filteredList.length)
}
// 按关键词过滤
if (params.keyword) {
const keyword = params.keyword.toLowerCase()
filteredList = filteredList.filter(item =>
item.userName.toLowerCase().includes(keyword) ||
item.id.toLowerCase().includes(keyword)
)
}
console.log('最终返回数量:', filteredList.length)
resolve({
list: mockDatabase,
total: mockDatabase.length
list: filteredList,
total: filteredList.length
})
}, 500)
})
@@ -191,15 +845,84 @@ export function getMerchantPendingAssistList() {
return new Promise<{ list: any[] }>((resolve) => {
setTimeout(() => {
// 找到所有关联了当前商家的未处理申请
// 这里简化逻辑,直接返回 Mock
// 这里简化逻辑,直接返回 Mock,包含不同状态
resolve({
list: [
{
loanId: 'LA20251219001',
userName: '张三',
applyTime: '2025-12-19 10:00:00',
amount: 50,
status: 'pending'
loanId: 'LA20251226002',
userName: '李四',
applyTime: '2025-12-25 14:30:00',
amount: 80,
status: 'accepted',
handlerName: '王经理',
handlerPhone: '13800138888',
// 申请进度及负责人信息
progress: [
{ step: '提交申请', handlerName: '李四', handlerPhone: '13900139000', time: '2025-12-25 14:30:00', completed: true },
{ step: '银行受理', handlerName: '王经理', handlerPhone: '13800138888', time: '2025-12-25 15:00:00', completed: true },
{ step: '上门调查', handlerName: '刘经理', handlerPhone: '13800139999', time: '', completed: false },
{ step: '审批决策', handlerName: '陈经理', handlerPhone: '13800137777', time: '', completed: false }
]
},
{
loanId: 'LA20251226003',
userName: '王五',
applyTime: '2025-12-24 10:00:00',
amount: 30,
status: 'investigating',
handlerName: '刘经理',
handlerPhone: '13800139999',
progress: [
{ step: '提交申请', handlerName: '王五', handlerPhone: '13700137000', time: '2025-12-24 10:00:00', completed: true },
{ step: '银行受理', handlerName: '王经理', handlerPhone: '13800138888', time: '2025-12-24 11:00:00', completed: true },
{ step: '上门调查', handlerName: '刘经理', handlerPhone: '13800139999', time: '2025-12-25 16:00:00', completed: true },
{ step: '审批决策', handlerName: '陈经理', handlerPhone: '13800137777', time: '', completed: false }
]
},
{
loanId: 'LA20251226004',
userName: '赵六',
applyTime: '2025-12-23 11:00:00',
amount: 100,
status: 'reported',
handlerName: '陈经理',
handlerPhone: '13800137777',
progress: [
{ step: '提交申请', handlerName: '赵六', handlerPhone: '13600136000', time: '2025-12-23 11:00:00', completed: true },
{ step: '银行受理', handlerName: '王经理', handlerPhone: '13800138888', time: '2025-12-23 12:00:00', completed: true },
{ step: '上门调查', handlerName: '刘经理', handlerPhone: '13800139999', time: '2025-12-24 10:00:00', completed: true },
{ step: '审批决策', handlerName: '陈经理', handlerPhone: '13800137777', time: '2025-12-25 17:00:00', completed: true }
]
},
{
loanId: 'LA20251226005',
userName: '孙七',
applyTime: '2025-12-22 09:00:00',
amount: 60,
status: 'approved',
handlerName: '周经理',
handlerPhone: '13800136666',
progress: [
{ step: '提交申请', handlerName: '孙七', handlerPhone: '13500135000', time: '2025-12-22 09:00:00', completed: true },
{ step: '银行受理', handlerName: '王经理', handlerPhone: '13800138888', time: '2025-12-22 10:00:00', completed: true },
{ step: '上门调查', handlerName: '刘经理', handlerPhone: '13800139999', time: '2025-12-23 09:00:00', completed: true },
{ step: '审批决策', handlerName: '陈经理', handlerPhone: '13800137777', time: '2025-12-25 18:00:00', completed: true }
]
},
{
loanId: 'LA20251226009',
userName: '钱十一',
applyTime: '2025-12-18 13:00:00',
amount: 45,
status: 'pending_supplement',
handlerName: '吴经理',
handlerPhone: '13800132222',
progress: [
{ step: '提交申请', handlerName: '钱十一', handlerPhone: '13100131000', time: '2025-12-18 13:00:00', completed: true },
{ step: '银行受理', handlerName: '王经理', handlerPhone: '13800138888', time: '2025-12-18 14:00:00', completed: true },
{ step: '上门调查', handlerName: '刘经理', handlerPhone: '13800139999', time: '2025-12-20 10:00:00', completed: true },
{ step: '审批决策', handlerName: '吴经理', handlerPhone: '13800132222', time: '2025-12-26 16:00:00', completed: true }
]
}
]
})
@@ -230,3 +953,82 @@ export function submitAssistMaterial(loanId: string, materials: any[]) {
}, 800)
})
}
/**
* [银行端] 查询征信信息
*/
export function queryCreditInfo(userId: string) {
return new Promise<any>((resolve) => {
setTimeout(() => {
resolve({
creditScore: 720,
creditLevel: '良好',
loanRecords: [
{
bank: '工商银行',
amount: 30,
status: 'paid',
date: '2022-03-15'
},
{
bank: '建设银行',
amount: 50,
status: 'normal',
date: '2023-06-20'
},
{
bank: '农业银行',
amount: 20,
status: 'overdue',
date: '2021-11-10'
}
],
overdueRecords: [
{
amount: 20,
overdueDays: 15,
date: '2021-11-10'
}
],
queryTime: new Date().toLocaleString()
})
}, 1500)
})
}
/**
* [银行端] 获取信用评估分数
*/
export function getCreditAssessment(userId: string) {
return new Promise<any>((resolve) => {
setTimeout(() => {
resolve({
score: 78,
level: '良好',
factors: [
{
name: '收入稳定性',
score: 85,
description: '年收入稳定,无大额波动'
},
{
name: '负债率',
score: 75,
description: '负债率适中,还款能力良好'
},
{
name: '征信记录',
score: 70,
description: '存在少量逾期记录,需注意'
},
{
name: '经营年限',
score: 82,
description: '经营年限较长,经验丰富'
}
],
updateTime: new Date().toLocaleString()
})
}, 800)
})
}

191
src/api/types/insurance.ts Normal file
View File

@@ -0,0 +1,191 @@
/**
* 保险相关类型定义
*/
// 保险公司状态
export type InsuranceCompanyStatus = 'active' | 'inactive'
// 保险产品类型
export type InsuranceProductType = 'housing_loan' | 'business_credit' | 'other'
// 投保申请状态
export type InsuranceApplicationStatus = 'pending' | 'approved' | 'rejected'
// 保险单状态
export type InsurancePolicyStatus = 'active' | 'expiring' | 'expired' | 'cancelled'
// 理赔申请状态
export type ClaimApplicationStatus = 'pending' | 'approved' | 'rejected'
/**
* 保险公司
*/
export interface InsuranceCompany {
id: string
name: string
contactInfo: string
status: InsuranceCompanyStatus
}
/**
* 保险产品
*/
export interface InsuranceProduct {
id: string
companyId: string
companyName: string
name: string
type: InsuranceProductType
description: string
minAmount: number
maxAmount: number
status: InsuranceCompanyStatus
}
/**
* 客户信息(用于投保申请)
*/
export interface CustomerInfo {
name: string
idNumber: string
creditScore: number
loanAmount: number
loanTerm: number
loanType: string
}
/**
* 投保申请
*/
export interface InsuranceApplication {
id: string
loanId: string
bankId: string
bankName: string
companyId: string
companyName: string
productId: string
productName: string
customerInfo: CustomerInfo
insuranceAmount: number
insuranceTerm: number
status: InsuranceApplicationStatus
createdAt: string
reviewedAt?: string
reviewedBy?: string
rejectionReason?: string
}
/**
* 保险单
*/
export interface InsurancePolicy {
id: string
applicationId: string
policyNumber: string
companyId: string
companyName: string
bankId: string
bankName: string
loanId: string
productId: string
productName: string
insuranceAmount: number
insuranceTerm: number
startDate: string
endDate: string
status: InsurancePolicyStatus
issuedAt: string
}
/**
* 理赔材料
*/
export interface ClaimMaterial {
id: string
name: string
url: string
type: string
size: number
uploadTime: string
}
/**
* 理赔申请
*/
export interface ClaimApplication {
id: string
policyId: string
policyNumber: string
loanId: string
bankId: string
bankName: string
companyId: string
companyName: string
claimAmount: number
claimReason: string
materials: ClaimMaterial[]
status: ClaimApplicationStatus
submittedAt: string
reviewedAt?: string
reviewedBy?: string
rejectionReason?: string
payoutAmount?: number
payoutDate?: string
}
/**
* 创建投保申请请求
*/
export interface CreateInsuranceApplicationRequest {
loanId: string
companyId: string
productId: string
insuranceAmount: number
insuranceTerm: number
}
/**
* 核保审核请求
*/
export interface UnderwritingReviewRequest {
approved: boolean
rejectionReason?: string
}
/**
* 创建理赔申请请求
*/
export interface CreateClaimApplicationRequest {
policyId: string
loanId: string
claimAmount: number
claimReason: string
materials: File[]
}
/**
* 理赔审核请求
*/
export interface ClaimReviewRequest {
approved: boolean
rejectionReason?: string
payoutAmount?: number
}
/**
* 银行贷款信息(扩展)
*/
export interface BankLoanWithInsurance {
id: string
userId: string
userName: string
amount: number
term: number
status: string
insuranceApplication?: InsuranceApplication
insurancePolicy?: InsurancePolicy
claimApplications?: ClaimApplication[]
isBadLoan: boolean
badLoanDays?: number
}

View File

@@ -24,6 +24,8 @@ export const mockLoanApplicationRecords: LoanApplicationRecord[] = [
type: "info",
content: "您的申请正在风控部门审核中预计还需要1-2个工作日完成评估"
},
handlerName: "王经理",
handlerPhone: "13800138888",
actions: [
{
code: "VIEW_DETAIL",
@@ -104,6 +106,8 @@ export const mockLoanApplicationRecords: LoanApplicationRecord[] = [
type: "info",
content: "您的申请已进入资料审核阶段,请耐心等待"
},
handlerName: "刘经理",
handlerPhone: "13800139999",
actions: [
{
code: "CANCEL",

View File

@@ -19,7 +19,9 @@
"network": "all",
"packages": [
"pagesMerchant",
"pagesBank"
"pagesBank",
"pagesGovernment",
"pagesInsurance"
]
}
},
@@ -264,12 +266,6 @@
"navigationBarTitleText": "提现记录"
}
},
{
"path": "me/index",
"style": {
"navigationBarTitleText": "银行中心"
}
},
{
"path": "report/list",
"style": {
@@ -299,6 +295,102 @@
"style": {
"navigationBarTitleText": "拜访详情"
}
},
{
"path": "me/index",
"style": {
"navigationBarTitleText": "银行中心"
}
}
]
},
{
"root": "pagesGovernment",
"pages": [
// GENERATED BY UNI-PAGES, PLATFORM: H5
{
"path": "dashboard/index",
"style": {
"navigationBarTitleText": "政务工作台"
}
},
{
"path": "bank/list",
"style": {
"navigationBarTitleText": "银行管理"
}
},
{
"path": "bank/detail",
"style": {
"navigationBarTitleText": "银行详情"
}
},
{
"path": "supervise/list",
"style": {
"navigationBarTitleText": "合规检查"
}
},
{
"path": "risk/list",
"style": {
"navigationBarTitleText": "风险预警"
}
},
{
"path": "me/index",
"style": {
"navigationBarTitleText": "个人中心"
}
}
]
},
{
"root": "pagesInsurance",
"pages": [
// GENERATED BY UNI-PAGES, PLATFORM: H5
{
"path": "dashboard/index",
"style": {
"navigationBarTitleText": "保险工作台"
}
},
{
"path": "policy/list",
"style": {
"navigationBarTitleText": "保单管理"
}
},
{
"path": "policy/detail",
"style": {
"navigationBarTitleText": "保单详情"
}
},
{
"path": "claim/list",
"style": {
"navigationBarTitleText": "理赔处理"
}
},
{
"path": "claim/detail",
"style": {
"navigationBarTitleText": "理赔详情"
}
},
{
"path": "bank/list",
"style": {
"navigationBarTitleText": "合作银行"
}
},
{
"path": "me/index",
"style": {
"navigationBarTitleText": "个人中心"
}
}
]
}

View File

@@ -25,6 +25,8 @@ const clientTypes = [
{ type: ClientType.USER, ...CLIENT_TYPE_CONFIG[ClientType.USER] },
{ type: ClientType.MERCHANT, ...CLIENT_TYPE_CONFIG[ClientType.MERCHANT] },
{ type: ClientType.BANK, ...CLIENT_TYPE_CONFIG[ClientType.BANK] },
{ type: ClientType.GOVERNMENT, ...CLIENT_TYPE_CONFIG[ClientType.GOVERNMENT] },
{ type: ClientType.INSURANCE, ...CLIENT_TYPE_CONFIG[ClientType.INSURANCE] },
]
// 选择客户端类型

View File

@@ -73,6 +73,13 @@ function handleActionClick(record: LoanApplicationRecord, action: any) {
}
}
// 拨打银行受理人电话
function handleCallPhone(phone: string) {
uni.makePhoneCall({
phoneNumber: phone
})
}
// 获取状态颜色
function getStatusColor(status: LoanApplicationStatus) {
switch (status) {
@@ -185,6 +192,21 @@ function getButtonStyle(style: string) {
</view>
</view>
<!-- 银行受理人信息仅处理中状态显示 -->
<view v-if="record.status === 'PROCESSING' && record.handlerName" class="handler-section">
<view class="handler-info">
<text class="i-carbon-user handler-icon"></text>
<view class="handler-details">
<text class="handler-label">银行受理人</text>
<text class="handler-name">{{ record.handlerName }}</text>
<view class="handler-phone-wrapper" @click="handleCallPhone(record.handlerPhone)">
<text class="i-carbon-phone handler-phone-icon"></text>
<text class="handler-phone">{{ record.handlerPhone }}</text>
</view>
</view>
</view>
</view>
<!-- 底部操作区 -->
<view class="actions-section">
<view
@@ -251,6 +273,21 @@ function getButtonStyle(style: string) {
</view>
</view>
<!-- 银行受理人信息仅处理中状态显示 -->
<view v-if="selectedRecord.status === 'PROCESSING' && selectedRecord.handlerName" class="handler-detail">
<text class="detail-label">银行受理人</text>
<view class="handler-detail-info">
<view class="handler-detail-row">
<text class="i-carbon-user handler-detail-icon"></text>
<text class="handler-detail-name">{{ selectedRecord.handlerName }}</text>
</view>
<view class="handler-detail-row handler-detail-phone" @click="handleCallPhone(selectedRecord.handlerPhone)">
<text class="i-carbon-phone handler-detail-icon"></text>
<text class="handler-detail-phone-number">{{ selectedRecord.handlerPhone }}</text>
</view>
</view>
</view>
<!-- 提示信息 -->
<view v-if="selectedRecord.alertInfo && selectedRecord.alertInfo.show" class="alert-detail">
<view
@@ -451,6 +488,58 @@ function getButtonStyle(style: string) {
}
}
.handler-section {
margin-bottom: 24rpx;
.handler-info {
background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
border-radius: 12rpx;
padding: 20rpx;
display: flex;
align-items: center;
gap: 16rpx;
.handler-icon {
font-size: 48rpx;
color: #fff;
}
.handler-details {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.handler-label {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.8);
}
.handler-name {
font-size: 28rpx;
font-weight: 600;
color: #fff;
}
.handler-phone-wrapper {
display: flex;
align-items: center;
gap: 8rpx;
.handler-phone-icon {
font-size: 24rpx;
color: #fff;
}
.handler-phone {
font-size: 26rpx;
color: #fff;
}
}
}
}
}
.actions-section {
display: flex;
justify-content: flex-end;
@@ -612,6 +701,52 @@ function getButtonStyle(style: string) {
}
}
.handler-detail {
padding: 20rpx 0;
.detail-label {
font-size: 28rpx;
color: #666;
margin-bottom: 20rpx;
display: block;
}
.handler-detail-info {
background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
border-radius: 12rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
gap: 16rpx;
.handler-detail-row {
display: flex;
align-items: center;
gap: 12rpx;
.handler-detail-icon {
font-size: 32rpx;
color: #fff;
}
.handler-detail-name {
font-size: 28rpx;
font-weight: 600;
color: #fff;
}
&.handler-detail-phone {
cursor: pointer;
.handler-detail-phone-number {
font-size: 26rpx;
color: #fff;
}
}
}
}
}
.alert-detail {
padding: 20rpx 0;

File diff suppressed because it is too large Load Diff

View File

@@ -13,9 +13,15 @@ definePage({
// 状态标签
const tabs = [
{ label: '全部', value: '' },
{ label: '待处理', value: LoanStatus.SUBMITTED }, // 包含提交/受理等
{ label: '新申请', value: LoanStatus.SUBMITTED },
{ label: '已受理', value: LoanStatus.ACCEPTED },
{ label: '调查中', value: LoanStatus.INVESTIGATING },
{ label: '待审批', value: LoanStatus.REPORTED },
{ label: '已通过', value: LoanStatus.APPROVED },
{ label: '已拒绝', value: LoanStatus.REJECTED },
{ label: '已签约', value: LoanStatus.SIGNED },
{ label: '已放款', value: LoanStatus.DISBURSED },
{ label: '驳回要求补充', value: LoanStatus.PENDING_SUPPLEMENT },
]
const activeTab = ref('')
@@ -32,15 +38,22 @@ const statusMap: Record<string, { text: string; color: string; bgColor: string }
[LoanStatus.REJECTED]: { text: '已拒绝', color: '#fa4350', bgColor: 'rgba(250, 67, 80, 0.1)' },
[LoanStatus.SIGNED]: { text: '已签约', color: '#00c05a', bgColor: 'rgba(0, 192, 90, 0.1)' },
[LoanStatus.DISBURSED]: { text: '已放款', color: '#00c05a', bgColor: 'rgba(0, 192, 90, 0.1)' },
[LoanStatus.PENDING_SUPPLEMENT]: { text: '驳回要求补充', color: '#fa4350', bgColor: 'rgba(250, 67, 80, 0.1)' },
}
async function loadData() {
loading.value = true
try {
const res = await getLoanApplicationList({
const params = {
status: activeTab.value || undefined,
keyword: keyword.value
})
}
console.log('loadData - 请求参数:', params)
console.log('loadData - activeTab.value:', activeTab.value)
const res = await getLoanApplicationList(params)
console.log('loadData - 返回结果:', res)
list.value = res.list
} finally {
loading.value = false
@@ -122,12 +135,21 @@ onPullDownRefresh(() => {
<text class="merchant-name">{{ item.userName }}的贷款申请</text>
<text class="time">{{ item.createTime }}</text>
</view>
<view class="tags-row">
<text
class="status-tag"
:style="{ color: statusMap[item.status]?.color, backgroundColor: statusMap[item.status]?.bgColor }"
>
{{ statusMap[item.status]?.text || item.status }}
</text>
<!-- 保险状态标识 -->
<text
v-if="item.status === LoanStatus.DISBURSED"
class="insurance-tag"
>
{{ Math.random() > 0.5 ? '已投保' : '未投保' }}
</text>
</view>
</view>
<view class="card-content">
@@ -190,11 +212,20 @@ onPullDownRefresh(() => {
.tabs {
display: flex;
justify-content: space-around;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
border-bottom: 1rpx solid #f1f3f5;
-webkit-overflow-scrolling: touch;
/* 隐藏滚动条 */
&::-webkit-scrollbar {
display: none;
}
.tab-item {
padding: 20rpx 0;
flex-shrink: 0;
padding: 20rpx 24rpx;
font-size: 28rpx;
color: #495057;
position: relative;
@@ -206,8 +237,9 @@ onPullDownRefresh(() => {
.line {
position: absolute;
bottom: 0;
left: 0;
right: 0;
left: 50%;
transform: translateX(-50%);
width: 40rpx;
height: 6rpx;
background: #00c05a;
border-radius: 3rpx;
@@ -250,12 +282,27 @@ onPullDownRefresh(() => {
}
}
.tags-row {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8rpx;
.status-tag {
font-size: 22rpx;
padding: 6rpx 16rpx;
border-radius: 8rpx;
font-weight: 600;
}
.insurance-tag {
font-size: 20rpx;
color: #00c05a;
background: rgba(0, 192, 90, 0.1);
padding: 4rpx 12rpx;
border-radius: 6rpx;
}
}
}
.card-content {

View File

@@ -444,7 +444,7 @@ onLoad((options) => {
text { font-size: 40rpx; color: #00c05a; }
&.danger { text { color: #fa4350; } color: #fa4350; }
&.danger { color: #fa4350; text { color: #fa4350; } }
&:active { background: #f8f9fa; }
}

View File

@@ -16,11 +16,108 @@ const quickActions = [
{ icon: 'i-carbon-task-approved', label: '待审核', path: '/pagesBank/audit/list' },
{ icon: 'i-carbon-group', label: '客户管理', path: '/pagesBank/customer/list' },
{ icon: 'i-carbon-calendar', label: '拜访计划', path: '/pagesBank/visit/list' },
{ icon: 'i-carbon-add', label: '创建拜访', path: '/pagesBank/visit/create' },
{ icon: 'i-carbon-document-download', label: '报表', path: '/pagesBank/report/list' },
{ icon: 'i-carbon-security', label: '投保管理', path: '/pagesBank/insurance/application/list' },
{ icon: 'i-carbon-money', label: '理赔管理', path: '/pagesBank/insurance/claim/list' },
{ icon: 'i-carbon-settings', label: '设置', path: '/pagesBank/me/index' },
]
// 最近动态数据
interface RecentActivity {
id: number
type: 'audit' | 'visit' | 'customer' | 'withdraw'
title: string
description: string
time: string
status?: 'pending' | 'approved' | 'rejected' | 'completed'
}
const recentActivities = ref<RecentActivity[]>([
{
id: 1,
type: 'audit',
title: '贷款审核',
description: '商户"张三便利店"提交的贷款申请待审核',
time: '10分钟前',
status: 'pending',
},
{
id: 2,
type: 'visit',
title: '拜访计划',
description: '已安排拜访"李四超市"了解经营情况',
time: '30分钟前',
status: 'completed',
},
{
id: 3,
type: 'audit',
title: '提现审核',
description: '商户"王五五金店"提现申请已通过',
time: '1小时前',
status: 'approved',
},
{
id: 4,
type: 'customer',
title: '客户入驻',
description: '新商户"赵六服装店"提交入驻申请',
time: '2小时前',
status: 'pending',
},
{
id: 5,
type: 'audit',
title: '贷款审核',
description: '商户"孙七水果店"的贷款申请已拒绝',
time: '3小时前',
status: 'rejected',
},
])
// 获取动态类型对应的图标
function getActivityIcon(type: string) {
const iconMap: Record<string, string> = {
audit: 'i-carbon-task-approved',
visit: 'i-carbon-calendar',
customer: 'i-carbon-group',
withdraw: 'i-carbon-wallet',
}
return iconMap[type] || 'i-carbon-information'
}
// 获取动态类型对应的颜色
function getActivityColor(type: string) {
const colorMap: Record<string, string> = {
audit: '#ff8f0d',
visit: '#00c05a',
customer: '#3b82f6',
withdraw: '#8b5cf6',
}
return colorMap[type] || '#666'
}
// 获取状态对应的文本
function getStatusText(status?: string) {
const statusMap: Record<string, string> = {
pending: '待审核',
approved: '已通过',
rejected: '已拒绝',
completed: '已完成',
}
return status ? statusMap[status] : ''
}
// 获取状态对应的颜色
function getStatusColor(status?: string) {
const colorMap: Record<string, string> = {
pending: '#ff8f0d',
approved: '#00c05a',
rejected: '#ef4444',
completed: '#3b82f6',
}
return status ? colorMap[status] : ''
}
function handleAction(path: string) {
if (!path) {
uni.showToast({ title: '功能开发中', icon: 'none' })
@@ -29,6 +126,20 @@ function handleAction(path: string) {
uni.navigateTo({ url: path })
}
function handleActivityClick(activity: RecentActivity) {
// 根据动态类型跳转到对应页面
const pathMap: Record<string, string> = {
audit: '/pagesBank/audit/list',
visit: '/pagesBank/visit/list',
customer: '/pagesBank/customer/list',
withdraw: '/pagesBank/audit/list',
}
const path = pathMap[activity.type]
if (path) {
uni.navigateTo({ url: path })
}
}
onMounted(() => {
bankStore.fetchStats()
})
@@ -66,7 +177,7 @@ onMounted(() => {
<text class="i-carbon-wallet"></text>
</view>
</view>
<view class="stat-card">
<view class="stat-card" @click="handleAction('/pagesBank/audit/list')">
<view class="stat-info">
<text class="stat-value success">{{ bankStore.stats?.todayApprovedCount || 0 }}</text>
<text class="stat-label">今日审批</text>
@@ -116,15 +227,37 @@ onMounted(() => {
</view>
</view>
<!-- 最近动态 (Placeholder) -->
<!-- 最近动态 -->
<view class="section">
<view class="section-header">
<text class="section-title">最近动态</text>
<text class="more">更多 ></text>
<text class="more" @click="handleAction('/pagesBank/audit/list')">更多 ></text>
</view>
<view class="activity-list">
<view
v-for="activity in recentActivities"
:key="activity.id"
class="activity-item"
@click="handleActivityClick(activity)"
>
<view class="activity-icon" :style="{ background: `${getActivityColor(activity.type)}15` }">
<text :class="getActivityIcon(activity.type)" :style="{ color: getActivityColor(activity.type) }"></text>
</view>
<view class="activity-content">
<view class="activity-header">
<text class="activity-title">{{ activity.title }}</text>
<text
v-if="activity.status"
class="activity-status"
:style="{ color: getStatusColor(activity.status) }"
>
{{ getStatusText(activity.status) }}
</text>
</view>
<text class="activity-description">{{ activity.description }}</text>
<text class="activity-time">{{ activity.time }}</text>
</view>
</view>
<view class="empty-dynamic">
<text class="i-carbon-reminder-attendance"></text>
<text>暂无新的审核动态</text>
</view>
</view>
</view>
@@ -334,21 +467,74 @@ onMounted(() => {
}
}
.empty-dynamic {
.activity-list {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40rpx 0;
color: #adb5bd;
gap: 16rpx;
gap: 24rpx;
text:first-child {
font-size: 64rpx;
.activity-item {
display: flex;
gap: 20rpx;
padding: 24rpx;
background: #f8f9fa;
border-radius: 16rpx;
transition: all 0.2s;
&:active {
background: #e9ecef;
transform: scale(0.98);
}
text:last-child {
font-size: 26rpx;
.activity-icon {
width: 72rpx;
height: 72rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
text {
font-size: 36rpx;
}
}
.activity-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.activity-header {
display: flex;
justify-content: space-between;
align-items: center;
.activity-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.activity-status {
font-size: 22rpx;
padding: 4rpx 12rpx;
background: rgba(0, 0, 0, 0.05);
border-radius: 8rpx;
}
}
.activity-description {
font-size: 24rpx;
color: #666;
line-height: 1.5;
}
.activity-time {
font-size: 22rpx;
color: #999;
}
}
}
}
</style>

View File

@@ -0,0 +1,521 @@
<script lang="ts" setup>
import type { InsuranceCompany, InsuranceProduct } from '@/api/types/insurance'
import { createInsuranceApplication, getInsuranceCompanies, getInsuranceProducts } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '购买保险',
},
})
const loanId = ref('')
const companyId = ref('')
const productId = ref('')
const loanAmount = ref(0)
const loanTerm = ref(0)
const loading = ref(false)
const submitting = ref(false)
// 选中的数据
const selectedCompany = ref<InsuranceCompany | null>(null)
const selectedProduct = ref<InsuranceProduct | null>(null)
const insuranceAmount = ref('')
const insuranceTerm = ref('')
// 列表数据
const companies = ref<InsuranceCompany[]>([])
const products = ref<InsuranceProduct[]>([])
// 状态
const showCompanyPicker = ref(false)
const showProductPicker = ref(false)
// 加载保险公司列表
async function loadCompanies() {
loading.value = true
try {
const res = await getInsuranceCompanies()
companies.value = res.list
}
finally {
loading.value = false
}
}
// 根据ID预选保险公司
function preSelectCompany() {
if (!companyId.value)
return
const company = companies.value.find(c => c.id === companyId.value)
if (company) {
selectedCompany.value = company
loadProducts(company.id)
}
}
// 选择保险公司
function handleSelectCompany(company: InsuranceCompany) {
selectedCompany.value = company
selectedProduct.value = null
insuranceAmount.value = ''
insuranceTerm.value = ''
loadProducts(company.id)
showCompanyPicker.value = false
}
// 加载保险产品列表
async function loadProducts(companyId: string) {
const res = await getInsuranceProducts(companyId)
products.value = res.list
}
// 选择保险产品
function handleSelectProduct(product: InsuranceProduct) {
selectedProduct.value = product
// 默认保险金额等于贷款金额
insuranceAmount.value = loanAmount.value.toString()
// 默认保险期限等于贷款期限(月)
insuranceTerm.value = loanTerm.value.toString()
showProductPicker.value = false
}
// 根据ID预选保险产品
function preSelectProduct() {
if (!productId.value || !selectedCompany.value)
return
loadProducts(selectedCompany.value.id).then(() => {
const product = products.value.find(p => p.id === productId.value)
if (product) {
handleSelectProduct(product)
}
})
}
// 提交投保申请
async function handleSubmit() {
if (!selectedCompany.value || !selectedProduct.value) {
uni.showToast({ title: '请选择保险公司和保险产品', icon: 'none' })
return
}
if (!insuranceAmount.value || !insuranceTerm.value) {
uni.showToast({ title: '请填写保险金额和期限', icon: 'none' })
return
}
const amount = Number(insuranceAmount.value)
const term = Number(insuranceTerm.value)
// 验证保险金额
if (amount < selectedProduct.value.minAmount) {
uni.showToast({ title: `保险金额不能低于${selectedProduct.value.minAmount}`, icon: 'none' })
return
}
if (amount > selectedProduct.value.maxAmount) {
uni.showToast({ title: `保险金额不能高于${selectedProduct.value.maxAmount}`, icon: 'none' })
return
}
submitting.value = true
try {
await createInsuranceApplication({
loanId: loanId.value,
companyId: selectedCompany.value.id,
productId: selectedProduct.value.id,
insuranceAmount: amount,
insuranceTerm: term,
})
uni.showToast({ title: '投保申请已提交', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
finally {
submitting.value = false
}
}
onLoad((options) => {
if (options?.loanId) {
loanId.value = options.loanId
}
if (options?.loanAmount) {
loanAmount.value = Number(options.loanAmount)
}
if (options?.loanTerm) {
loanTerm.value = Number(options.loanTerm)
}
if (options?.companyId) {
companyId.value = options.companyId
}
if (options?.productId) {
productId.value = options.productId
}
loadCompanies().then(() => {
preSelectCompany()
if (productId.value) {
preSelectProduct()
}
})
})
</script>
<template>
<view class="insurance-create-page">
<view v-if="loading" class="loading-state">
加载中...
</view>
<template v-else>
<!-- 保险公司选择 -->
<view class="section-card">
<view class="card-header">
<text class="title">选择保险公司</text>
<text v-if="selectedCompany" class="selected-text">{{ selectedCompany.name }}</text>
</view>
<view class="company-list">
<view
v-for="company in companies"
:key="company.id"
class="company-item"
:class="{ active: selectedCompany?.id === company.id }"
@click="handleSelectCompany(company)"
>
<view class="company-info">
<text class="company-name">{{ company.name }}</text>
<text class="contact-info">联系方式: {{ company.contactInfo }}</text>
</view>
<text v-if="selectedCompany?.id === company.id" class="i-carbon-checkmark selected-icon" />
</view>
</view>
</view>
<!-- 保险产品选择 -->
<view v-if="selectedCompany" class="section-card">
<view class="card-header">
<text class="title">选择保险产品</text>
<text v-if="selectedProduct" class="selected-text">{{ selectedProduct.name }}</text>
</view>
<view class="product-list">
<view
v-for="product in products"
:key="product.id"
class="product-item"
:class="{ active: selectedProduct?.id === product.id }"
@click="handleSelectProduct(product)"
>
<view class="product-info">
<text class="product-name">{{ product.name }}</text>
<text class="product-desc">{{ product.description }}</text>
<view class="product-meta">
<text class="meta-item">类型: {{ product.type === 'housing_loan' ? '住房贷款' : product.type === 'business_credit' ? '企业信贷' : '其他' }}</text>
<text class="meta-item">金额范围: {{ product.minAmount }}-{{ product.maxAmount }}</text>
</view>
</view>
<text v-if="selectedProduct?.id === product.id" class="i-carbon-checkmark selected-icon" />
</view>
</view>
</view>
<!-- 保险信息 -->
<view v-if="selectedProduct" class="section-card">
<view class="card-header">
保险信息
</view>
<view class="form-group">
<view class="form-item">
<text class="label">保险金额</text>
<input
v-model="insuranceAmount"
type="digit"
class="input"
placeholder="请输入保险金额"
>
</view>
<view class="form-item">
<text class="label">保险期限</text>
<input
v-model="insuranceTerm"
type="number"
class="input"
placeholder="请输入保险期限"
>
</view>
<view class="form-item">
<text class="label">贷款金额参考</text>
<text class="value">{{ loanAmount }}</text>
</view>
<view class="form-item">
<text class="label">贷款期限参考</text>
<text class="value">{{ loanTerm }}</text>
</view>
</view>
</view>
<!-- 提示信息 -->
<view class="tips-card">
<view class="tips-header">
<text class="i-carbon-information tips-icon" />
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-content">
<text class="tips-item"> 保险金额一般不低于抵押物价值</text>
<text class="tips-item"> 保险期限应与贷款期限一致</text>
<text class="tips-item"> 投保申请提交后将由保险公司进行核保</text>
<text class="tips-item"> 核保通过后将自动生成保险单</text>
</view>
</view>
<!-- 底部操作栏 -->
<view class="action-bar safe-area-bottom">
<button
class="btn primary"
:disabled="submitting"
@click="handleSubmit"
>
<text v-if="submitting">提交中...</text>
<text v-else>提交投保申请</text>
</button>
</view>
</template>
</view>
</template>
<style lang="scss" scoped>
.insurance-create-page {
min-height: 100vh;
background: #f5f7fa;
padding: 20rpx;
padding-bottom: 120rpx;
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.section-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
display: flex;
justify-content: space-between;
align-items: center;
.selected-text {
font-size: 24rpx;
color: #00c05a;
font-weight: normal;
}
}
}
.company-list {
padding: 20rpx 0;
.company-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx;
background: #f8f9fa;
border-radius: 12rpx;
margin-bottom: 16rpx;
border: 2rpx solid transparent;
&:last-child {
margin-bottom: 0;
}
&.active {
border-color: #00c05a;
background: #e6f7eb;
}
.company-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.company-name {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.contact-info {
font-size: 24rpx;
color: #666;
}
}
.selected-icon {
font-size: 40rpx;
color: #00c05a;
}
}
}
.product-list {
padding: 20rpx 0;
.product-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx;
background: #f8f9fa;
border-radius: 12rpx;
margin-bottom: 16rpx;
border: 2rpx solid transparent;
&:last-child {
margin-bottom: 0;
}
&.active {
border-color: #00c05a;
background: #e6f7eb;
}
.product-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.product-name {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.product-desc {
font-size: 24rpx;
color: #666;
line-height: 1.5;
}
.product-meta {
display: flex;
gap: 16rpx;
flex-wrap: wrap;
.meta-item {
font-size: 22rpx;
color: #999;
}
}
}
.selected-icon {
font-size: 40rpx;
color: #00c05a;
}
}
}
.form-group {
padding: 20rpx 0;
.form-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16rpx 0;
font-size: 26rpx;
.label {
color: #666;
flex-shrink: 0;
}
.input {
flex: 1;
text-align: right;
font-size: 26rpx;
color: #333;
}
.value {
color: #333;
}
}
}
.tips-card {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 20rpx;
.tips-header {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 16rpx;
.tips-icon {
font-size: 28rpx;
color: #f59e0b;
}
.tips-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
}
.tips-content {
display: flex;
flex-direction: column;
gap: 12rpx;
.tips-item {
font-size: 24rpx;
color: #666;
line-height: 1.6;
}
}
}
.action-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
padding: 20rpx 30rpx;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
z-index: 100;
.btn {
width: 100%;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
&.primary {
background: #00c05a;
color: #fff;
}
&:disabled {
opacity: 0.6;
}
}
}
</style>

View File

@@ -0,0 +1,322 @@
<script lang="ts" setup>
import type { InsuranceApplication, InsurancePolicy } from '@/api/types/insurance'
import { getInsuranceApplicationDetail, getInsurancePolicyDetail } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '投保申请详情',
},
})
const applicationId = ref('')
const application = ref<InsuranceApplication | null>(null)
const policy = ref<InsurancePolicy | null>(null)
const loading = ref(false)
// 状态映射
const statusMap: Record<string, { text: string, color: string }> = {
pending: { text: '待审核', color: '#F59E0B' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
const statusInfo = computed(() => {
if (!application.value)
return null
return statusMap[application.value.status] || { text: application.value.status, color: '#666' }
})
async function loadDetail() {
loading.value = true
try {
const res = await getInsuranceApplicationDetail(applicationId.value)
application.value = res
// 如果已通过,加载保险单
if (res.status === 'approved') {
// 查找对应的保险单
const policies = await getInsurancePolicyDetail(res.id)
policy.value = policies
}
}
finally {
loading.value = false
}
}
onLoad((options) => {
if (options?.id) {
applicationId.value = options.id
loadDetail()
}
})
</script>
<template>
<view class="application-detail-page">
<view v-if="loading" class="loading-state">
加载中...
</view>
<template v-else-if="application">
<!-- 状态卡片 -->
<view class="status-card" :style="{ background: statusInfo?.color }">
<text class="status-text">{{ statusInfo?.text }}</text>
<text v-if="application.status === 'pending'" class="status-desc">保险公司正在审核您的投保申请</text>
<text v-else-if="application.status === 'approved'" class="status-desc">投保申请已通过保险单已生成</text>
<text v-else-if="application.status === 'rejected'" class="status-desc">投保申请已被拒绝</text>
</view>
<!-- 基本信息 -->
<view class="section-card">
<view class="card-header">
基本信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">投保申请号</text>
<text class="value">{{ application.id }}</text>
</view>
<view class="info-item">
<text class="label">贷款编号</text>
<text class="value">{{ application.loanId }}</text>
</view>
<view class="info-item">
<text class="label">申请时间</text>
<text class="value">{{ application.createdAt }}</text>
</view>
</view>
</view>
<!-- 保险公司信息 -->
<view class="section-card">
<view class="card-header">
保险公司信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险公司</text>
<text class="value">{{ application.companyName }}</text>
</view>
<view class="info-item">
<text class="label">保险产品</text>
<text class="value">{{ application.productName }}</text>
</view>
</view>
</view>
<!-- 客户信息 -->
<view class="section-card">
<view class="card-header">
客户信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">客户姓名</text>
<text class="value">{{ application.customerInfo.name }}</text>
</view>
<view class="info-item">
<text class="label">身份证号</text>
<text class="value">{{ application.customerInfo.idNumber }}</text>
</view>
<view class="info-item">
<text class="label">信用评分</text>
<text class="value score">{{ application.customerInfo.creditScore }}</text>
</view>
<view class="info-item">
<text class="label">贷款金额</text>
<text class="value">{{ application.customerInfo.loanAmount }}</text>
</view>
<view class="info-item">
<text class="label">贷款期限</text>
<text class="value">{{ application.customerInfo.loanTerm }}</text>
</view>
</view>
</view>
<!-- 保险信息 -->
<view class="section-card">
<view class="card-header">
保险信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险金额</text>
<text class="value amount">{{ application.insuranceAmount }}</text>
</view>
<view class="info-item">
<text class="label">保险期限</text>
<text class="value">{{ application.insuranceTerm }}</text>
</view>
</view>
</view>
<!-- 审核信息 -->
<view v-if="application.status !== 'pending'" class="section-card">
<view class="card-header">
审核信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">审核时间</text>
<text class="value">{{ application.reviewedAt }}</text>
</view>
<view class="info-item">
<text class="label">审核人员</text>
<text class="value">{{ application.reviewedBy }}</text>
</view>
<view v-if="application.rejectionReason" class="info-item full">
<text class="label">拒绝原因</text>
<text class="value reason">{{ application.rejectionReason }}</text>
</view>
</view>
</view>
<!-- 保险单信息 -->
<view v-if="policy" class="section-card">
<view class="card-header">
<text>保险单信息</text>
<text class="i-carbon-checkmark success-icon" />
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险单号</text>
<text class="value">{{ policy.policyNumber }}</text>
</view>
<view class="info-item">
<text class="label">保险金额</text>
<text class="value amount">{{ policy.insuranceAmount }}</text>
</view>
<view class="info-item">
<text class="label">保险期限</text>
<text class="value">{{ policy.insuranceTerm }}</text>
</view>
<view class="info-item">
<text class="label">开始日期</text>
<text class="value">{{ policy.startDate }}</text>
</view>
<view class="info-item">
<text class="label">结束日期</text>
<text class="value">{{ policy.endDate }}</text>
</view>
<view class="info-item">
<text class="label">出单时间</text>
<text class="value">{{ policy.issuedAt }}</text>
</view>
</view>
</view>
</template>
</view>
</template>
<style lang="scss" scoped>
.application-detail-page {
min-height: 100vh;
background: #f5f7fa;
padding: 20rpx;
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.status-card {
background: linear-gradient(135deg, #00c05a 0%, #34d19d 100%);
border-radius: 16rpx;
padding: 40rpx 30rpx;
color: #fff;
margin-bottom: 20rpx;
text-align: center;
.status-text {
font-size: 36rpx;
font-weight: bold;
display: block;
margin-bottom: 12rpx;
}
.status-desc {
font-size: 24rpx;
opacity: 0.9;
display: block;
}
}
.section-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
display: flex;
align-items: center;
gap: 8rpx;
.success-icon {
font-size: 28rpx;
color: #00c05a;
}
}
}
.info-list {
padding: 20rpx 0;
.info-item {
display: flex;
justify-content: space-between;
padding: 16rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f9f9f9;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
&.score {
color: #00c05a;
font-weight: 600;
}
&.amount {
color: #ff8f0d;
font-weight: 600;
}
&.reason {
color: #fa4350;
text-align: left;
line-height: 1.5;
}
}
&.full {
flex-direction: column;
align-items: flex-start;
.value {
margin-top: 8rpx;
width: 100%;
}
}
}
}
</style>

View File

@@ -0,0 +1,439 @@
<script lang="ts" setup>
import type { InsuranceApplication } from '@/api/types/insurance'
import { getInsuranceApplicationList } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '投保申请',
},
})
const loading = ref(false)
const applications = ref<InsuranceApplication[]>([])
const filteredApplications = ref<InsuranceApplication[]>([])
const searchKeyword = ref('')
const currentTab = ref('all')
const pageSize = 20
const currentPage = ref(1)
const hasMore = ref(true)
const statusMap: Record<string, { text: string, color: string }> = {
pending: { text: '待审核', color: '#F59E0B' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
const tabs = [
{ key: 'all', label: '全部' },
{ key: 'pending', label: '待审核' },
{ key: 'approved', label: '已通过' },
{ key: 'rejected', label: '已拒绝' },
]
function getStatusInfo(status: string) {
return statusMap[status] || { text: status, color: '#999' }
}
function getProductTypeText(type: string) {
const typeMap: Record<string, string> = {
housing_loan: '住房贷款',
business_credit: '企业信贷',
other: '其他',
}
return typeMap[type] || type
}
function filterBySearch(list: InsuranceApplication[]) {
if (!searchKeyword.value.trim())
return list
const keyword = searchKeyword.value.toLowerCase()
return list.filter(app =>
app.id.toLowerCase().includes(keyword)
|| app.companyName.toLowerCase().includes(keyword)
|| app.productName.toLowerCase().includes(keyword)
|| (app as any).policyNumber?.toLowerCase().includes(keyword),
)
}
function filterByStatus(list: InsuranceApplication[]) {
if (currentTab.value === 'all')
return list
return list.filter(app => app.status === currentTab.value)
}
function updateFilteredList() {
let list = filterBySearch(applications.value)
list = filterByStatus(list)
filteredApplications.value = list
}
function handleTabChange(tab: string) {
currentTab.value = tab
updateFilteredList()
}
function handleSearch() {
currentPage.value = 1
updateFilteredList()
}
function handleClearSearch() {
searchKeyword.value = ''
handleSearch()
}
function handleViewDetail(id: string) {
uni.navigateTo({
url: `/pagesBank/insurance/application/detail?id=${id}`,
})
}
async function loadList(reset = false) {
if (reset) {
currentPage.value = 1
applications.value = []
hasMore.value = true
}
if (!hasMore.value)
return
loading.value = true
try {
const res = await getInsuranceApplicationList()
applications.value = res.list
updateFilteredList()
hasMore.value = res.list.length >= pageSize
}
finally {
loading.value = false
}
}
function handleLoadMore() {
if (!loading.value && hasMore.value) {
currentPage.value++
loadList()
}
}
function handleRefresh() {
loadList(true)
}
onShow(() => {
loadList(true)
})
</script>
<template>
<view class="application-list-page">
<view class="search-bar">
<view class="search-input-wrap">
<text class="search-icon i-carbon-search" />
<input
v-model="searchKeyword"
class="search-input"
placeholder="搜索保单号/公司/产品"
@confirm="handleSearch"
>
<text v-if="searchKeyword" class="clear-icon" @click="handleClearSearch">×</text>
</view>
</view>
<view class="tabs">
<view
v-for="tab in tabs"
:key="tab.key"
class="tab-item"
:class="{ active: currentTab === tab.key }"
@click="handleTabChange(tab.key)"
>
<text class="tab-text">{{ tab.label }}</text>
<view v-if="currentTab === tab.key" class="tab-indicator" />
</view>
</view>
<view v-if="loading && filteredApplications.length === 0" class="loading-state">
加载中...
</view>
<view v-else-if="filteredApplications.length > 0" class="application-list">
<view
v-for="app in filteredApplications"
:key="app.id"
class="application-item"
@click="handleViewDetail(app.id)"
>
<view class="app-header">
<view class="app-info">
<text class="app-id">{{ app.id }}</text>
<text class="company-name">{{ app.companyName }}</text>
</view>
<view
class="status-tag"
:style="{ background: getStatusInfo(app.status).color }"
>
{{ getStatusInfo(app.status).text }}
</view>
</view>
<view class="app-body">
<view class="app-row">
<text class="label">保险产品</text>
<text class="value">{{ app.productName }}</text>
</view>
<view class="app-row">
<text class="label">产品类型</text>
<text class="value">{{ getProductTypeText(app.customerInfo?.loanType || 'other') }}</text>
</view>
<view class="app-row">
<text class="label">保险金额</text>
<text class="value amount">{{ (app.insuranceAmount / 10000).toFixed(2) }}</text>
</view>
<view class="app-row">
<text class="label">保险期限</text>
<text class="value">{{ app.insuranceTerm / 12 }}</text>
</view>
<view class="app-row">
<text class="label">提交时间</text>
<text class="value">{{ app.createdAt }}</text>
</view>
<view v-if="app.rejectionReason" class="app-row reject">
<text class="label">拒绝原因</text>
<text class="value">{{ app.rejectionReason }}</text>
</view>
</view>
<view class="app-footer">
<text class="view-detail">查看详情</text>
<text class="arrow-icon i-carbon-chevron-right" />
</view>
</view>
</view>
<view v-if="!loading && filteredApplications.length > 0 && hasMore" class="load-more" @click="handleLoadMore">
<text>加载更多</text>
</view>
<view v-if="!loading && filteredApplications.length === 0" class="empty-state">
<text class="empty-icon i-carbon-document" />
<text class="empty-text">暂无投保申请</text>
</view>
</view>
</template>
<style lang="scss" scoped>
.application-list-page {
min-height: 100vh;
background: #f5f7fa;
}
.search-bar {
background: #fff;
padding: 20rpx 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.search-input-wrap {
display: flex;
align-items: center;
background: #f5f7fa;
border-radius: 36rpx;
padding: 16rpx 24rpx;
.search-icon {
font-size: 32rpx;
color: #999;
margin-right: 12rpx;
}
.search-input {
flex: 1;
font-size: 28rpx;
}
.clear-icon {
font-size: 36rpx;
color: #999;
padding: 10rpx;
}
}
}
.tabs {
background: #fff;
display: flex;
padding: 0 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.tab-item {
flex: 1;
position: relative;
padding: 30rpx 0;
text-align: center;
font-size: 28rpx;
color: #666;
&.active {
color: #00c05a;
font-weight: 600;
}
.tab-text {
position: relative;
z-index: 1;
}
.tab-indicator {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60rpx;
height: 4rpx;
background: #00c05a;
border-radius: 2rpx;
}
}
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.application-list {
padding: 20rpx;
.application-item {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
.app-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.app-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.app-id {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.company-name {
font-size: 24rpx;
color: #666;
}
}
.status-tag {
padding: 8rpx 20rpx;
border-radius: 8rpx;
font-size: 24rpx;
color: #fff;
}
}
.app-body {
background: #f8f9fa;
border-radius: 12rpx;
padding: 20rpx;
margin-bottom: 16rpx;
.app-row {
display: flex;
justify-content: space-between;
padding: 12rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
&.amount {
color: #ff8f0d;
font-weight: 600;
}
&.reject {
color: #fa4350;
text-align: left;
line-height: 1.5;
}
}
}
}
.app-footer {
display: flex;
justify-content: flex-end;
align-items: center;
padding-top: 12rpx;
.view-detail {
font-size: 24rpx;
color: #00c05a;
margin-right: 8rpx;
}
.arrow-icon {
font-size: 28rpx;
color: #00c05a;
}
}
}
}
.load-more {
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx;
color: #666;
font-size: 26rpx;
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
color: #ccc;
}
.empty-text {
font-size: 26rpx;
}
}
</style>

View File

@@ -0,0 +1,421 @@
<script lang="ts" setup>
import type { InsurancePolicy } from '@/api/types/insurance'
import { createClaimApplication } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '发起理赔申请',
},
})
const policyId = ref('')
const policyNumber = ref('')
const loanId = ref('')
const claimAmount = ref('')
const claimReason = ref('')
const materials = ref<any[]>([])
const submitting = ref(false)
// 上传材料
function handleUploadMaterial() {
uni.chooseImage({
count: 9,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
const tempFilePaths = res.tempFilePaths as string[]
tempFilePaths.forEach((filePath, index) => {
materials.value.push({
id: `material_${Date.now()}_${index}`,
url: filePath,
name: `理赔材料${materials.value.length + 1}.jpg`,
type: 'image/jpeg',
size: 0,
})
})
},
})
}
// 删除材料
function handleRemoveMaterial(index: number) {
materials.value.splice(index, 1)
}
// 预览图片
function handlePreviewImage(url: string) {
uni.previewImage({
urls: [url],
})
}
// 提交理赔申请
async function handleSubmit() {
if (!claimAmount.value || !claimReason.value) {
uni.showToast({ title: '请填写理赔金额和原因', icon: 'none' })
return
}
if (materials.value.length === 0) {
uni.showToast({ title: '请上传理赔材料', icon: 'none' })
return
}
submitting.value = true
try {
const files = materials.value.map((m) => {
// 模拟 File 对象
return new File([], m.name, { type: m.type })
})
await createClaimApplication({
policyId: policyId.value,
loanId: loanId.value,
claimAmount: Number(claimAmount.value),
claimReason: claimReason.value,
materials: files,
})
uni.showToast({ title: '理赔申请已提交', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
finally {
submitting.value = false
}
}
onLoad((options) => {
if (options?.policyId) {
policyId.value = options.policyId
}
if (options?.policyNumber) {
policyNumber.value = options.policyNumber
}
if (options?.loanId) {
loanId.value = options.loanId
}
})
</script>
<template>
<view class="claim-create-page">
<!-- 保险单信息 -->
<view class="section-card">
<view class="card-header">
保险单信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险单号</text>
<text class="value">{{ policyNumber }}</text>
</view>
</view>
</view>
<!-- 理赔信息 -->
<view class="section-card">
<view class="card-header">
理赔信息
</view>
<view class="form-group">
<view class="form-item">
<text class="label">理赔金额</text>
<input
v-model="claimAmount"
type="digit"
class="input"
placeholder="请输入理赔金额"
>
</view>
<view class="form-item vertical">
<text class="label">理赔原因</text>
<textarea
v-model="claimReason"
class="textarea"
placeholder="请详细描述理赔原因..."
:maxlength="500"
/>
<text class="char-count">{{ claimReason.length }}/500</text>
</view>
</view>
</view>
<!-- 理赔材料 -->
<view class="section-card">
<view class="card-header">
<text>理赔材料</text>
<text class="required">至少上传1份</text>
</view>
<view class="materials-area">
<view class="upload-btn" @click="handleUploadMaterial">
<text class="i-carbon-add upload-icon" />
<text class="upload-text">上传材料</text>
</view>
<view
v-for="(material, index) in materials"
:key="material.id"
class="material-item"
>
<image :src="material.url" mode="aspectFill" @click="handlePreviewImage(material.url)" />
<view class="material-actions">
<text class="delete-btn" @click="handleRemoveMaterial(index)">
<text class="i-carbon-close" />
</text>
</view>
</view>
</view>
</view>
<!-- 提示信息 -->
<view class="tips-card">
<view class="tips-header">
<text class="i-carbon-information tips-icon" />
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-content">
<text class="tips-item"> 请上传清晰的理赔材料包括但不限于事故证明损失清单相关票据等</text>
<text class="tips-item"> 理赔申请提交后将由保险公司进行审核</text>
<text class="tips-item"> 审核通过后将执行赔付审核失败将返回拒绝原因</text>
<text class="tips-item"> 理赔金额不得超过保险金额</text>
</view>
</view>
<!-- 底部操作栏 -->
<view class="action-bar safe-area-bottom">
<button
class="btn primary"
:disabled="submitting"
@click="handleSubmit"
>
<text v-if="submitting">提交中...</text>
<text v-else>提交理赔申请</text>
</button>
</view>
</view>
</template>
<style lang="scss" scoped>
.claim-create-page {
min-height: 100vh;
background: #f5f7fa;
padding: 20rpx;
padding-bottom: 120rpx;
}
.section-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
display: flex;
justify-content: space-between;
align-items: center;
.required {
font-size: 22rpx;
color: #fa4350;
font-weight: normal;
}
}
}
.info-list {
padding: 20rpx 0;
.info-item {
display: flex;
justify-content: space-between;
padding: 16rpx 0;
font-size: 26rpx;
.label {
color: #666;
}
.value {
color: #333;
}
}
}
.form-group {
padding: 20rpx 0;
.form-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16rpx 0;
font-size: 26rpx;
&.vertical {
flex-direction: column;
align-items: flex-start;
}
.label {
color: #666;
flex-shrink: 0;
margin-bottom: 12rpx;
}
.input {
flex: 1;
text-align: right;
font-size: 26rpx;
color: #333;
}
.textarea {
width: 100%;
min-height: 150rpx;
padding: 16rpx;
background: #f8f9fa;
border-radius: 8rpx;
font-size: 26rpx;
color: #333;
line-height: 1.5;
}
.char-count {
font-size: 22rpx;
color: #999;
text-align: right;
margin-top: 8rpx;
}
}
}
.materials-area {
padding: 20rpx 0;
display: flex;
gap: 16rpx;
flex-wrap: wrap;
.upload-btn {
width: 160rpx;
height: 160rpx;
border: 2rpx dashed #d9d9d9;
border-radius: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8rpx;
background: #f8f9fa;
.upload-icon {
font-size: 48rpx;
color: #999;
}
.upload-text {
font-size: 22rpx;
color: #999;
}
}
.material-item {
position: relative;
width: 160rpx;
height: 160rpx;
border-radius: 12rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
.material-actions {
position: absolute;
top: 8rpx;
right: 8rpx;
.delete-btn {
width: 40rpx;
height: 40rpx;
background: rgba(0, 0, 0, 0.6);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 24rpx;
}
}
}
}
.tips-card {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 20rpx;
.tips-header {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 16rpx;
.tips-icon {
font-size: 28rpx;
color: #f59e0b;
}
.tips-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
}
.tips-content {
display: flex;
flex-direction: column;
gap: 12rpx;
.tips-item {
font-size: 24rpx;
color: #666;
line-height: 1.6;
}
}
}
.action-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
padding: 20rpx 30rpx;
box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
z-index: 100;
.btn {
width: 100%;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
&.primary {
background: #00c05a;
color: #fff;
}
&:disabled {
opacity: 0.6;
}
}
}
</style>

View File

@@ -0,0 +1,332 @@
<script lang="ts" setup>
import type { ClaimApplication } from '@/api/types/insurance'
import { getClaimApplicationList } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '理赔申请',
},
})
const loading = ref(false)
const claims = ref<ClaimApplication[]>([])
const currentTab = ref('all')
// 状态映射
const statusMap: Record<string, { text: string, color: string }> = {
pending: { text: '待审核', color: '#F59E0B' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
const tabs = [
{ key: 'all', label: '全部' },
{ key: 'pending', label: '待审核' },
{ key: 'approved', label: '已通过' },
{ key: 'rejected', label: '已拒绝' },
]
// 筛选后的列表
const filteredClaims = computed(() => {
if (currentTab.value === 'all') {
return claims.value
}
return claims.value.filter(c => c.status === currentTab.value)
})
// 切换标签
function handleTabChange(tab: string) {
currentTab.value = tab
}
// 查看详情
function handleViewDetail(id: string) {
uni.navigateTo({
url: `/pagesBank/insurance/claim/detail?id=${id}`,
})
}
// 加载列表
async function loadList() {
loading.value = true
try {
const res = await getClaimApplicationList()
claims.value = res.list
}
finally {
loading.value = false
}
}
onShow(() => {
loadList()
})
</script>
<template>
<view class="claim-list-page">
<!-- 标签页 -->
<view class="tabs">
<view
v-for="tab in tabs"
:key="tab.key"
class="tab-item"
:class="{ active: currentTab === tab.key }"
@click="handleTabChange(tab.key)"
>
<text class="tab-text">{{ tab.label }}</text>
<view v-if="currentTab === tab.key" class="tab-indicator" />
</view>
</view>
<!-- 列表 -->
<view v-if="loading" class="loading-state">
加载中...
</view>
<view v-else-if="filteredClaims.length > 0" class="claim-list">
<view
v-for="claim in filteredClaims"
:key="claim.id"
class="claim-item"
@click="handleViewDetail(claim.id)"
>
<view class="claim-header">
<view class="claim-info">
<text class="policy-no">保险单号: {{ claim.policyNumber }}</text>
<text class="company-name">{{ claim.companyName }}</text>
</view>
<view
class="status-tag"
:style="{ background: statusMap[claim.status]?.color }"
>
{{ statusMap[claim.status]?.text }}
</view>
</view>
<view class="claim-body">
<view class="claim-row">
<text class="label">理赔金额</text>
<text class="value amount">{{ claim.claimAmount }}</text>
</view>
<view class="claim-row">
<text class="label">理赔原因</text>
<text class="value reason">{{ claim.claimReason }}</text>
</view>
<view class="claim-row">
<text class="label">提交时间</text>
<text class="value">{{ claim.submittedAt }}</text>
</view>
<view v-if="claim.payoutAmount" class="claim-row">
<text class="label">赔付金额</text>
<text class="value payout">{{ claim.payoutAmount }}</text>
</view>
<view v-if="claim.payoutDate" class="claim-row">
<text class="label">赔付日期</text>
<text class="value">{{ claim.payoutDate }}</text>
</view>
<view v-if="claim.rejectionReason" class="claim-row">
<text class="label">拒绝原因</text>
<text class="value reject">{{ claim.rejectionReason }}</text>
</view>
</view>
<view class="claim-footer">
<text class="material-count">已上传 {{ claim.materials.length }} 份材料</text>
<text class="arrow-icon i-carbon-chevron-right" />
</view>
</view>
</view>
<!-- 空状态 -->
<view v-else class="empty-state">
<text class="empty-icon i-carbon-document" />
<text class="empty-text">暂无理赔申请</text>
</view>
</view>
</template>
<style lang="scss" scoped>
.claim-list-page {
min-height: 100vh;
background: #f5f7fa;
}
.tabs {
background: #fff;
display: flex;
padding: 0 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.tab-item {
flex: 1;
position: relative;
padding: 30rpx 0;
text-align: center;
font-size: 28rpx;
color: #666;
&.active {
color: #00c05a;
font-weight: 600;
}
.tab-text {
position: relative;
z-index: 1;
}
.tab-indicator {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60rpx;
height: 4rpx;
background: #00c05a;
border-radius: 2rpx;
}
}
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.claim-list {
padding: 20rpx;
.claim-item {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
.claim-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.claim-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.policy-no {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.company-name {
font-size: 24rpx;
color: #666;
}
}
.status-tag {
padding: 8rpx 20rpx;
border-radius: 8rpx;
font-size: 24rpx;
color: #fff;
}
}
.claim-body {
background: #f8f9fa;
border-radius: 12rpx;
padding: 20rpx;
margin-bottom: 16rpx;
.claim-row {
display: flex;
justify-content: space-between;
padding: 12rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
flex: 1;
&.amount {
color: #ff8f0d;
font-weight: 600;
}
&.reason {
text-align: left;
line-height: 1.5;
}
&.payout {
color: #00c05a;
font-weight: 600;
}
&.reject {
color: #fa4350;
text-align: left;
line-height: 1.5;
}
}
}
}
.claim-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 12rpx;
.material-count {
font-size: 24rpx;
color: #999;
}
.arrow-icon {
font-size: 28rpx;
color: #ccc;
}
}
}
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
color: #ccc;
}
.empty-text {
font-size: 26rpx;
}
}
</style>

View File

@@ -0,0 +1,380 @@
<script lang="ts" setup>
import type { InsuranceCompany, InsuranceProduct } from '@/api/types/insurance'
import { getInsuranceCompanies, getInsuranceProducts } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '选择保险公司',
},
})
const loanId = ref('')
const loanAmount = ref(0)
const loanTerm = ref(0)
const loading = ref(false)
const searchKeyword = ref('')
const companies = ref<InsuranceCompany[]>([])
const productsCount = ref<Record<string, number>>({})
const filteredCompanies = computed(() => {
if (!searchKeyword.value.trim())
return companies.value
const keyword = searchKeyword.value.toLowerCase()
return companies.value.filter(company =>
company.name.toLowerCase().includes(keyword)
|| company.contactInfo.toLowerCase().includes(keyword),
)
})
function handleSearch() {
}
function handleClearSearch() {
searchKeyword.value = ''
}
async function loadCompanies() {
loading.value = true
try {
const res = await getInsuranceCompanies()
companies.value = res.list
for (const company of companies.value) {
const productsRes = await getInsuranceProducts(company.id)
productsCount.value[company.id] = productsRes.list.length
}
}
finally {
loading.value = false
}
}
function handleSelectCompany(company: InsuranceCompany) {
uni.navigateTo({
url: `/pagesBank/insurance/product/select?loanId=${loanId.value}&companyId=${company.id}&loanAmount=${loanAmount.value}&loanTerm=${loanTerm.value}`,
})
}
function handleGoBack() {
uni.navigateBack()
}
onLoad((options) => {
if (options?.loanId)
loanId.value = options.loanId
if (options?.loanAmount)
loanAmount.value = Number(options.loanAmount)
if (options?.loanTerm)
loanTerm.value = Number(options.loanTerm)
loadCompanies()
})
</script>
<template>
<view class="company-select-page">
<view class="header">
<view class="back-btn" @click="handleGoBack">
<text class="i-carbon-arrow-left" />
</view>
<text class="header-title">选择保险公司</text>
</view>
<view class="search-bar">
<view class="search-input-wrap">
<text class="search-icon i-carbon-search" />
<input
v-model="searchKeyword"
class="search-input"
placeholder="搜索公司名称或联系方式"
@input="handleSearch"
>
<text v-if="searchKeyword" class="clear-icon" @click="handleClearSearch">×</text>
</view>
</view>
<view v-if="loading" class="loading-state">
加载中...
</view>
<view v-else-if="filteredCompanies.length > 0" class="company-list">
<view
v-for="company in filteredCompanies"
:key="company.id"
class="company-item"
@click="handleSelectCompany(company)"
>
<view class="company-main">
<view class="company-avatar">
<text class="i-carbon-building" />
</view>
<view class="company-info">
<text class="company-name">{{ company.name }}</text>
<view class="company-meta">
<text class="contact">
<text class="i-carbon-phone" />
{{ company.contactInfo }}
</text>
<text class="status active">
<text class="i-carbon-checkmark" />
合作中
</text>
</view>
</view>
</view>
<view class="company-action">
<text class="product-count">{{ productsCount[company.id] || 0 }}个产品</text>
<text class="select-icon i-carbon-chevron-right" />
</view>
</view>
</view>
<view v-else class="empty-state">
<text class="empty-icon i-carbon-search" />
<text class="empty-text">未找到相关保险公司</text>
</view>
<view v-if="!loading && filteredCompanies.length > 0" class="tips-card">
<view class="tips-header">
<text class="tips-icon i-carbon-information" />
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-content">
<text class="tips-item">请选择为您发放贷款的保险公司</text>
<text class="tips-item">选择后将进入产品选择页面</text>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.company-select-page {
min-height: 100vh;
background: #f5f7fa;
}
.header {
display: flex;
align-items: center;
background: #fff;
padding: 20rpx 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.back-btn {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
text {
font-size: 36rpx;
color: #333;
}
}
.header-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
}
.search-bar {
background: #fff;
padding: 20rpx 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.search-input-wrap {
display: flex;
align-items: center;
background: #f5f7fa;
border-radius: 36rpx;
padding: 16rpx 24rpx;
.search-icon {
font-size: 32rpx;
color: #999;
margin-right: 12rpx;
}
.search-input {
flex: 1;
font-size: 28rpx;
}
.clear-icon {
font-size: 36rpx;
color: #999;
padding: 10rpx;
}
}
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.company-list {
padding: 20rpx;
.company-item {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
.company-main {
display: flex;
align-items: center;
flex: 1;
.company-avatar {
width: 80rpx;
height: 80rpx;
background: linear-gradient(135deg, #00c05a 0%, #34d19d 100%);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
text {
font-size: 40rpx;
color: #fff;
}
}
.company-info {
flex: 1;
.company-name {
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 12rpx;
display: block;
}
.company-meta {
display: flex;
align-items: center;
gap: 20rpx;
.contact {
display: flex;
align-items: center;
gap: 8rpx;
font-size: 24rpx;
color: #666;
text:first-child {
font-size: 24rpx;
}
}
.status {
display: flex;
align-items: center;
gap: 6rpx;
font-size: 24rpx;
&.active {
color: #00c05a;
}
text:first-child {
font-size: 20rpx;
}
}
}
}
}
.company-action {
display: flex;
align-items: center;
gap: 12rpx;
.product-count {
font-size: 24rpx;
color: #999;
}
.select-icon {
font-size: 28rpx;
color: #ccc;
}
}
}
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
color: #ccc;
}
.empty-text {
font-size: 26rpx;
}
}
.tips-card {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
padding: 24rpx 30rpx;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
.tips-header {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 12rpx;
.tips-icon {
font-size: 28rpx;
color: #f59e0b;
}
.tips-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
}
.tips-content {
display: flex;
flex-direction: column;
gap: 8rpx;
.tips-item {
font-size: 24rpx;
color: #666;
line-height: 1.5;
}
}
}
</style>

View File

@@ -0,0 +1,270 @@
<script lang="ts" setup>
import type { InsurancePolicy } from '@/api/types/insurance'
import { getInsurancePolicyDetail } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '保险单详情',
},
})
const policyId = ref('')
const policy = ref<InsurancePolicy | null>(null)
const loading = ref(false)
// 状态映射
const statusMap: Record<string, { text: string, color: string }> = {
active: { text: '生效中', color: '#00c05a' },
expired: { text: '已过期', color: '#999' },
cancelled: { text: '已取消', color: '#fa4350' },
}
const statusInfo = computed(() => {
if (!policy.value)
return null
return statusMap[policy.value.status] || { text: policy.value.status, color: '#666' }
})
async function loadDetail() {
loading.value = true
try {
const res = await getInsurancePolicyDetail(policyId.value)
policy.value = res
}
finally {
loading.value = false
}
}
onLoad((options) => {
if (options?.id) {
policyId.value = options.id
loadDetail()
}
})
</script>
<template>
<view class="policy-detail-page">
<view v-if="loading" class="loading-state">
加载中...
</view>
<template v-else-if="policy">
<!-- 状态卡片 -->
<view class="status-card" :style="{ background: statusInfo?.color }">
<text class="status-text">{{ statusInfo?.text }}</text>
<text class="policy-no">保险单号: {{ policy.policyNumber }}</text>
</view>
<!-- 基本信息 -->
<view class="section-card">
<view class="card-header">
基本信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险单号</text>
<text class="value">{{ policy.policyNumber }}</text>
</view>
<view class="info-item">
<text class="label">出单时间</text>
<text class="value">{{ policy.issuedAt }}</text>
</view>
</view>
</view>
<!-- 保险公司信息 -->
<view class="section-card">
<view class="card-header">
保险公司信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险公司</text>
<text class="value">{{ policy.companyName }}</text>
</view>
<view class="info-item">
<text class="label">保险产品</text>
<text class="value">{{ policy.productName }}</text>
</view>
</view>
</view>
<!-- 保险信息 -->
<view class="section-card">
<view class="card-header">
保险信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险金额</text>
<text class="value amount">{{ policy.insuranceAmount }}</text>
</view>
<view class="info-item">
<text class="label">保险期限</text>
<text class="value">{{ policy.insuranceTerm }}</text>
</view>
<view class="info-item">
<text class="label">开始日期</text>
<text class="value">{{ policy.startDate }}</text>
</view>
<view class="info-item">
<text class="label">结束日期</text>
<text class="value">{{ policy.endDate }}</text>
</view>
</view>
</view>
<!-- 关联信息 -->
<view class="section-card">
<view class="card-header">
关联信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">投保申请号</text>
<text class="value">{{ policy.applicationId }}</text>
</view>
<view class="info-item">
<text class="label">贷款编号</text>
<text class="value">{{ policy.loanId }}</text>
</view>
</view>
</view>
<!-- 操作提示 -->
<view v-if="policy.status === 'active'" class="tips-card">
<view class="tips-header">
<text class="i-carbon-information tips-icon" />
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-content">
<text class="tips-item"> 保险单生效期间如发生保险事故可发起理赔申请</text>
<text class="tips-item"> 理赔申请需提供相关证明材料</text>
<text class="tips-item"> 保险单到期后自动失效需重新购买保险</text>
</view>
</view>
</template>
</view>
</template>
<style lang="scss" scoped>
.policy-detail-page {
min-height: 100vh;
background: #f5f7fa;
padding: 20rpx;
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.status-card {
background: linear-gradient(135deg, #00c05a 0%, #34d19d 100%);
border-radius: 16rpx;
padding: 40rpx 30rpx;
color: #fff;
margin-bottom: 20rpx;
text-align: center;
.status-text {
font-size: 36rpx;
font-weight: bold;
display: block;
margin-bottom: 12rpx;
}
.policy-no {
font-size: 24rpx;
opacity: 0.9;
display: block;
}
}
.section-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
}
}
.info-list {
padding: 20rpx 0;
.info-item {
display: flex;
justify-content: space-between;
padding: 16rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f9f9f9;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
&.amount {
color: #ff8f0d;
font-weight: 600;
}
}
}
}
.tips-card {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 20rpx;
.tips-header {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 16rpx;
.tips-icon {
font-size: 28rpx;
color: #f59e0b;
}
.tips-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
}
.tips-content {
display: flex;
flex-direction: column;
gap: 12rpx;
.tips-item {
font-size: 24rpx;
color: #666;
line-height: 1.6;
}
}
}
</style>

View File

@@ -0,0 +1,582 @@
<script lang="ts" setup>
import type { InsuranceCompany, InsuranceProduct } from '@/api/types/insurance'
import { getInsuranceCompanies, getInsuranceProducts } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '选择保险产品',
},
})
const loanId = ref('')
const companyId = ref('')
const companyName = ref('')
const loanAmount = ref(0)
const loanTerm = ref(0)
const loading = ref(false)
const searchKeyword = ref('')
const products = ref<InsuranceProduct[]>([])
const selectedProduct = ref<InsuranceProduct | null>(null)
const showDetailModal = ref(false)
const filteredProducts = computed(() => {
if (!searchKeyword.value.trim())
return products.value
const keyword = searchKeyword.value.toLowerCase()
return products.value.filter(product =>
product.name.toLowerCase().includes(keyword)
|| product.description.toLowerCase().includes(keyword)
|| product.type.toLowerCase().includes(keyword),
)
})
function getProductTypeText(type: string) {
const typeMap: Record<string, string> = {
housing_loan: '住房贷款',
business_credit: '企业信贷',
other: '其他',
}
return typeMap[type] || type
}
function handleSearch() {
}
function handleClearSearch() {
searchKeyword.value = ''
}
async function loadProducts() {
loading.value = true
try {
const res = await getInsuranceProducts(companyId.value)
products.value = res.list
}
finally {
loading.value = false
}
}
function handleShowDetail(product: InsuranceProduct) {
selectedProduct.value = product
showDetailModal.value = true
}
function handleCloseDetail() {
showDetailModal.value = false
selectedProduct.value = null
}
function handleSelectProduct(product: InsuranceProduct) {
uni.navigateTo({
url: `/pagesBank/insurance/application/create?loanId=${loanId.value}&companyId=${companyId.value}&productId=${product.id}&loanAmount=${loanAmount.value}&loanTerm=${loanTerm.value}`,
})
}
function handleGoBack() {
uni.navigateBack()
}
onLoad(async (options) => {
if (options?.loanId)
loanId.value = options.loanId
if (options?.companyId)
companyId.value = options.companyId
if (options?.loanAmount)
loanAmount.value = Number(options.loanAmount)
if (options?.loanTerm)
loanTerm.value = Number(options.loanTerm)
if (companyId.value) {
const companyRes = await getInsuranceCompanies()
const company = companyRes.list.find(c => c.id === companyId.value)
if (company)
companyName.value = company.name
loadProducts()
}
})
</script>
<template>
<view class="product-select-page">
<view class="header">
<view class="back-btn" @click="handleGoBack">
<text class="i-carbon-arrow-left" />
</view>
<text class="header-title">{{ companyName }} - 选择产品</text>
</view>
<view class="search-bar">
<view class="search-input-wrap">
<text class="search-icon i-carbon-search" />
<input
v-model="searchKeyword"
class="search-input"
placeholder="搜索产品名称/类型/描述"
@input="handleSearch"
>
<text v-if="searchKeyword" class="clear-icon" @click="handleClearSearch">×</text>
</view>
</view>
<view v-if="loading" class="loading-state">
加载中...
</view>
<view v-else-if="filteredProducts.length > 0" class="product-list">
<view
v-for="product in filteredProducts"
:key="product.id"
class="product-item"
@click="handleSelectProduct(product)"
>
<view class="product-main">
<view class="product-icon">
<text class="i-carbon-security" />
</view>
<view class="product-info">
<text class="product-name">{{ product.name }}</text>
<view class="product-tags">
<view class="tag type">
{{ getProductTypeText(product.type) }}
</view>
</view>
<text class="product-desc">{{ product.description }}</text>
<view class="product-range">
<text class="range-label">保险金额范围</text>
<text class="range-value">{{ (product.minAmount / 10000).toFixed(0) }} - {{ (product.maxAmount / 10000).toFixed(0) }}</text>
</view>
</view>
</view>
<view class="product-actions">
<view class="info-btn" @click.stop="handleShowDetail(product)">
<text class="i-carbon-information" />
<text>详情</text>
</view>
<text class="select-icon i-carbon-chevron-right" />
</view>
</view>
</view>
<view v-else class="empty-state">
<text class="empty-icon i-carbon-search" />
<text class="empty-text">未找到相关产品</text>
</view>
<view v-if="!loading && filteredProducts.length > 0" class="tips-card">
<view class="tips-header">
<text class="tips-icon i-carbon-information" />
<text class="tips-title">温馨提示</text>
</view>
<view class="tips-content">
<text class="tips-item">请选择适合的保险产品</text>
<text class="tips-item">保险金额建议与贷款金额一致</text>
<text class="tips-item">保险期限建议与贷款期限一致</text>
</view>
</view>
<view v-if="showDetailModal && selectedProduct" class="modal-mask" @click="handleCloseDetail">
<view class="modal-content" @click.stop>
<view class="modal-header">
<text class="modal-title">产品详情</text>
<view class="close-btn" @click="handleCloseDetail">
<text class="i-carbon-close" />
</view>
</view>
<view class="modal-body">
<view class="detail-row">
<text class="detail-label">产品名称</text>
<text class="detail-value">{{ selectedProduct.name }}</text>
</view>
<view class="detail-row">
<text class="detail-label">所属公司</text>
<text class="detail-value">{{ companyName }}</text>
</view>
<view class="detail-row">
<text class="detail-label">产品类型</text>
<text class="detail-value">{{ getProductTypeText(selectedProduct.type) }}</text>
</view>
<view class="detail-row">
<text class="detail-label">产品描述</text>
<text class="detail-value desc">{{ selectedProduct.description }}</text>
</view>
<view class="detail-row">
<text class="detail-label">最低金额</text>
<text class="detail-value amount">{{ (selectedProduct.minAmount / 10000).toFixed(2) }}</text>
</view>
<view class="detail-row">
<text class="detail-label">最高金额</text>
<text class="detail-value amount">{{ (selectedProduct.maxAmount / 10000).toFixed(2) }}</text>
</view>
</view>
<view class="modal-footer">
<button class="btn" @click="handleSelectProduct(selectedProduct)">
选择此产品
</button>
</view>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.product-select-page {
min-height: 100vh;
background: #f5f7fa;
padding-bottom: 200rpx;
}
.header {
display: flex;
align-items: center;
background: #fff;
padding: 20rpx 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.back-btn {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
text {
font-size: 36rpx;
color: #333;
}
}
.header-title {
font-size: 30rpx;
font-weight: 600;
color: #333;
flex: 1;
text-align: center;
margin-right: 60rpx;
}
}
.search-bar {
background: #fff;
padding: 20rpx 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.search-input-wrap {
display: flex;
align-items: center;
background: #f5f7fa;
border-radius: 36rpx;
padding: 16rpx 24rpx;
.search-icon {
font-size: 32rpx;
color: #999;
margin-right: 12rpx;
}
.search-input {
flex: 1;
font-size: 28rpx;
}
.clear-icon {
font-size: 36rpx;
color: #999;
padding: 10rpx;
}
}
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.product-list {
padding: 20rpx;
.product-item {
display: flex;
justify-content: space-between;
align-items: center;
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
.product-main {
display: flex;
align-items: center;
flex: 1;
.product-icon {
width: 80rpx;
height: 80rpx;
background: linear-gradient(135deg, #00c05a 0%, #34d19d 100%);
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
text {
font-size: 40rpx;
color: #fff;
}
}
.product-info {
flex: 1;
.product-name {
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 8rpx;
display: block;
}
.product-tags {
display: flex;
gap: 12rpx;
margin-bottom: 8rpx;
.tag {
display: inline-block;
padding: 4rpx 12rpx;
border-radius: 6rpx;
font-size: 22rpx;
&.type {
background: #e6f7eb;
color: #00c05a;
}
}
}
.product-desc {
font-size: 24rpx;
color: #666;
line-height: 1.5;
margin-bottom: 12rpx;
display: block;
}
.product-range {
display: flex;
align-items: center;
gap: 8rpx;
.range-label {
font-size: 24rpx;
color: #999;
}
.range-value {
font-size: 24rpx;
color: #ff8f0d;
font-weight: 600;
}
}
}
}
.product-actions {
display: flex;
align-items: center;
gap: 16rpx;
.info-btn {
display: flex;
align-items: center;
gap: 6rpx;
padding: 8rpx 16rpx;
background: #f5f7fa;
border-radius: 8rpx;
font-size: 24rpx;
color: #666;
text:first-child {
font-size: 24rpx;
}
text:last-child {
font-size: 24rpx;
}
}
.select-icon {
font-size: 28rpx;
color: #ccc;
}
}
}
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
color: #ccc;
}
.empty-text {
font-size: 26rpx;
}
}
.tips-card {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: #fff;
padding: 24rpx 30rpx;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05);
.tips-header {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 12rpx;
.tips-icon {
font-size: 28rpx;
color: #f59e0b;
}
.tips-title {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
}
.tips-content {
display: flex;
flex-direction: column;
gap: 8rpx;
.tips-item {
font-size: 24rpx;
color: #666;
line-height: 1.5;
}
}
}
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
background: #fff;
border-radius: 24rpx;
width: 600rpx;
max-height: 80vh;
overflow-y: auto;
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
.modal-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
}
.close-btn {
width: 60rpx;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
text {
font-size: 36rpx;
color: #999;
}
}
}
.modal-body {
padding: 0 30rpx 30rpx;
.detail-row {
display: flex;
justify-content: space-between;
padding: 16rpx 0;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.detail-label {
font-size: 26rpx;
color: #666;
flex-shrink: 0;
margin-right: 20rpx;
}
.detail-value {
flex: 1;
text-align: right;
font-size: 26rpx;
color: #333;
&.desc {
text-align: left;
line-height: 1.5;
}
&.amount {
color: #ff8f0d;
font-weight: 600;
}
}
}
}
.modal-footer {
padding: 20rpx 30rpx 30rpx;
.btn {
width: 100%;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
background: #00c05a;
color: #fff;
font-size: 28rpx;
}
}
}
</style>

View File

@@ -57,6 +57,7 @@ export const mockCustomerList: BankCustomer[] = [
id: 'C1001',
merchantId: 'M1001',
merchantName: '张三', // 模拟个人客户
logo: '/static/tc/1.jpg',
creditLimit: 500000.00,
usedLimit: 125000.00,
balance: 375000.00,
@@ -69,6 +70,7 @@ export const mockCustomerList: BankCustomer[] = [
id: 'C1002',
merchantId: 'M1002',
merchantName: '李四', // 模拟个人客户
logo: '/static/tc/2.jpg',
creditLimit: 200000.00,
usedLimit: 180000.00,
balance: 20000.00,
@@ -76,6 +78,162 @@ export const mockCustomerList: BankCustomer[] = [
contactName: '李四',
contactPhone: '139****9999',
joinTime: '2024-06-15'
},
{
id: 'C1003',
merchantId: 'M1003',
merchantName: '王五',
logo: '/static/tc/3.jpg',
creditLimit: 300000.00,
usedLimit: 150000.00,
balance: 150000.00,
status: 'normal',
contactName: '王五',
contactPhone: '136****6666',
joinTime: '2024-03-10'
},
{
id: 'C1004',
merchantId: 'M1004',
merchantName: '赵六',
logo: '/static/tc/4.jpg',
creditLimit: 150000.00,
usedLimit: 145000.00,
balance: 5000.00,
status: 'warning',
contactName: '赵六',
contactPhone: '137****7777',
joinTime: '2024-04-05'
},
{
id: 'C1005',
merchantId: 'M1005',
merchantName: '孙七',
logo: '/static/tc/1.jpg',
creditLimit: 800000.00,
usedLimit: 720000.00,
balance: 80000.00,
status: 'frozen',
contactName: '孙七',
contactPhone: '135****5555',
joinTime: '2024-01-15'
},
{
id: 'C1006',
merchantId: 'M1006',
merchantName: '周八',
logo: '/static/tc/2.jpg',
creditLimit: 250000.00,
usedLimit: 50000.00,
balance: 200000.00,
status: 'normal',
contactName: '周八',
contactPhone: '134****4444',
joinTime: '2024-07-20'
},
{
id: 'C1007',
merchantId: 'M1007',
merchantName: '吴九',
logo: '/static/tc/3.jpg',
creditLimit: 400000.00,
usedLimit: 380000.00,
balance: 20000.00,
status: 'warning',
contactName: '吴九',
contactPhone: '133****3333',
joinTime: '2024-02-28'
},
{
id: 'C1008',
merchantId: 'M1008',
merchantName: '郑十',
logo: '/static/tc/4.jpg',
creditLimit: 600000.00,
usedLimit: 180000.00,
balance: 420000.00,
status: 'normal',
contactName: '郑十',
contactPhone: '132****2222',
joinTime: '2024-05-12'
},
{
id: 'C1009',
merchantId: 'M1009',
merchantName: '钱十一',
logo: '/static/tc/1.jpg',
creditLimit: 350000.00,
usedLimit: 340000.00,
balance: 10000.00,
status: 'warning',
contactName: '钱十一',
contactPhone: '131****1111',
joinTime: '2024-06-30'
},
{
id: 'C1010',
merchantId: 'M1010',
merchantName: '陈十二',
logo: '/static/tc/2.jpg',
creditLimit: 1000000.00,
usedLimit: 850000.00,
balance: 150000.00,
status: 'frozen',
contactName: '陈十二',
contactPhone: '130****0000',
joinTime: '2024-01-08'
},
{
id: 'C1011',
merchantId: 'M1011',
merchantName: '林十三',
logo: '/static/tc/3.jpg',
creditLimit: 280000.00,
usedLimit: 56000.00,
balance: 224000.00,
status: 'normal',
contactName: '林十三',
contactPhone: '158****8888',
joinTime: '2024-08-15'
},
{
id: 'C1012',
merchantId: 'M1012',
merchantName: '黄十四',
logo: '/static/tc/4.jpg',
creditLimit: 450000.00,
usedLimit: 400000.00,
balance: 50000.00,
status: 'warning',
contactName: '黄十四',
contactPhone: '159****9999',
joinTime: '2024-03-22'
},
{
id: 'C1013',
merchantId: 'M1013',
merchantName: '杨十五',
logo: '/static/tc/1.jpg',
creditLimit: 550000.00,
usedLimit: 110000.00,
balance: 440000.00,
status: 'normal',
contactName: '杨十五',
contactPhone: '156****6666',
joinTime: '2024-04-18'
},
{
id: 'C1014',
merchantId: 'M1014',
merchantName: '朱十六',
logo: '/static/tc/2.jpg',
creditLimit: 180000.00,
usedLimit: 162000.00,
balance: 18000.00,
status: 'warning',
contactName: '朱十六',
contactPhone: '157****7777',
joinTime: '2024-07-05'
}
]

View File

@@ -69,6 +69,20 @@ function toggleProduct(productId: string) {
}
}
// 获取产品名称
function getProductName(productId: string): string {
const product = products.value.find(p => p.id === productId)
return product?.name || ''
}
// 移除产品
function removeProduct(productId: string) {
const index = formData.value.productIds.indexOf(productId)
if (index > -1) {
formData.value.productIds.splice(index, 1)
}
}
// 表单验证
function validateForm(): boolean {
if (!formData.value.date) {
@@ -154,13 +168,22 @@ onMounted(() => {
</view>
<!-- 营销产品 -->
<view class="form-item" @click="showProductPicker = true">
<view class="form-item">
<view class="label">营销产品</view>
<view class="value-input">
<text :class="{ placeholder: formData.productIds.length === 0 }">
{{ formData.productIds.length > 0 ? `已选${formData.productIds.length}` : '请选择' }}
</text>
<text class="i-carbon-chevron-right"></text>
<view class="product-tags-container" @click="showProductPicker = true">
<view v-if="formData.productIds.length === 0" class="placeholder">请选择</view>
<view v-else class="product-tags">
<view
v-for="productId in formData.productIds"
:key="productId"
class="product-tag"
@click.stop="removeProduct(productId)"
>
<text class="tag-name">{{ getProductName(productId) }}</text>
<text class="tag-close i-carbon-close"></text>
</view>
</view>
<text class="i-carbon-chevron-right picker-icon"></text>
</view>
</view>
@@ -293,6 +316,65 @@ onMounted(() => {
}
}
.product-tags-container {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 40rpx;
.placeholder {
color: #adb5bd;
font-size: 28rpx;
}
.product-tags {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
flex: 1;
margin-right: 16rpx;
.product-tag {
display: inline-flex;
align-items: center;
background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
border: 1rpx solid #bae7ff;
border-radius: 8rpx;
padding: 8rpx 16rpx;
font-size: 24rpx;
color: #0050b3;
.tag-name {
margin-right: 8rpx;
}
.tag-close {
display: flex;
align-items: center;
justify-content: center;
width: 28rpx;
height: 28rpx;
border-radius: 50%;
background: rgba(0, 80, 179, 0.1);
color: #0050b3;
font-size: 20rpx;
transition: all 0.2s;
&:active {
background: rgba(0, 80, 179, 0.2);
transform: scale(0.9);
}
}
}
}
.picker-icon {
color: #adb5bd;
font-size: 32rpx;
flex-shrink: 0;
}
}
.input {
width: 100%;
font-size: 28rpx;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,161 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '银行监管',
navigationBarBackgroundColor: '#fff',
navigationBarTextStyle: 'black',
},
}
</route>
<template>
<view class="bank-list-page">
<view class="search-wrap">
<wd-search v-model="keyword" placeholder="请输入机构名称或编码" hide-cancel />
</view>
<view class="list-container">
<view
v-for="item in filteredList"
:key="item.id"
class="bank-card"
@click="goDetail(item.id)"
>
<view class="card-head">
<view class="name-box">
<text class="i-carbon-building text-xl mr-2 text-primary" />
<text class="name">{{ item.name }}</text>
</view>
<wd-tag type="success" plain v-if="item.status === 'normal'">正常</wd-tag>
<wd-tag type="warning" plain v-else>关注</wd-tag>
</view>
<view class="card-data">
<view class="data-item">
<text class="val">{{ item.loanAmount }}</text>
<text class="label">监管贷款余额()</text>
</view>
<view class="data-item">
<text class="val">{{ item.customerCount }}</text>
<text class="label">在贷户数</text>
</view>
<view class="data-item">
<text class="val text-red">{{ item.overdueRate }}%</text>
<text class="label">不良贷款率</text>
</view>
</view>
<view class="card-bar">
<text class="time">更新时间{{ item.updateTime }}</text>
<text class="action">查看详情 ></text>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue'
const keyword = ref('')
const bankList = ref([
{
id: '1',
name: '某某商业银行',
code: 'BANK001',
status: 'normal',
loanAmount: 5680,
customerCount: 1234,
overdueRate: 1.2,
updateTime: '2026-01-05 14:30',
},
{
id: '2',
name: '某某农村信用社',
code: 'BANK002',
status: 'warning',
loanAmount: 3420,
customerCount: 856,
overdueRate: 3.5,
updateTime: '2026-01-05 13:20',
},
])
const filteredList = computed(() => {
if (!keyword.value) return bankList.value
return bankList.value.filter(item => item.name.includes(keyword.value))
})
function goDetail(id: string) {
uni.navigateTo({ url: `/pagesGovernment/bank/detail?id=${id}` })
}
</script>
<style lang="scss" scoped>
.bank-list-page {
min-height: 100vh;
background: #f5f7fa;
}
.search-wrap {
padding: 20rpx 32rpx;
background: #fff;
position: sticky;
top: 0;
z-index: 10;
}
.list-container {
padding: 24rpx 32rpx;
}
.bank-card {
background: #fff;
border-radius: 12rpx;
padding: 32rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
.card-head {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 24rpx;
border-bottom: 1rpx solid #f5f5f5;
.name-box {
display: flex;
align-items: center;
.name { font-size: 30rpx; font-weight: 600; color: #333; }
.text-primary { color: #0957DE; }
}
}
.card-data {
display: flex;
padding: 24rpx 0;
.data-item {
flex: 1;
text-align: center;
.val { display: block; font-size: 32rpx; font-weight: 600; color: #333; margin-bottom: 8rpx; }
.label { font-size: 24rpx; color: #999; }
.text-red { color: #d32f2f; }
}
}
.card-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 20rpx;
border-top: 1rpx solid #f5f5f5;
font-size: 24rpx;
.time { color: #999; }
.action { color: #0957DE; }
}
}
</style>

View File

@@ -0,0 +1,334 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '政务工作台',
navigationBarBackgroundColor: '#0957DE',
navigationBarTextStyle: 'white',
},
}
</route>
<template>
<view class="gov-dashboard">
<!-- 顶部 Banner -->
<view class="header-bg">
<view class="user-welcome">
<view class="text-info">
<text class="greeting">欢迎回来监管员</text>
<text class="date">{{ currentDate }}</text>
</view>
<view class="avatar-box">
<text class="i-carbon-user-avatar" />
</view>
</view>
</view>
<!-- 核心指标卡片 -->
<view class="stats-overview">
<view class="stat-row">
<view class="stat-col">
<text class="num">{{ stats.bankCount }}</text>
<text class="label">监管机构</text>
</view>
<view class="divider" />
<view class="stat-col">
<text class="num primary">{{ stats.loanBalance }}</text>
<text class="label">监管贷款余额</text>
</view>
<view class="divider" />
<view class="stat-col">
<text class="num warning">{{ stats.nplRatio }}</text>
<text class="label">不良贷款率</text>
</view>
</view>
</view>
<!-- 功能导航 -->
<view class="grid-menu">
<view class="menu-item" @click="navigateTo('/pagesGovernment/bank/list')">
<view class="icon-wrap primary">
<text class="i-carbon-building-government" />
</view>
<text class="label">机构监管</text>
</view>
<view class="menu-item" @click="navigateTo('/pagesGovernment/supervise/list')">
<view class="icon-wrap success">
<text class="i-carbon-task-approved" />
</view>
<text class="label">贷款抽查</text>
</view>
<view class="menu-item" @click="navigateTo('/pagesGovernment/risk/list')">
<view class="icon-wrap warning">
<text class="i-carbon-warning-alt" />
</view>
<text class="label">风险监测</text>
</view>
<view class="menu-item" @click="navigateTo('/pagesGovernment/report/list')">
<view class="icon-wrap info">
<text class="i-carbon-chart-line-data" />
</view>
<text class="label">数据报送</text>
</view>
</view>
<!-- 待办事项 -->
<view class="section-card">
<view class="card-header">
<text class="title">待办事项</text>
<text class="more">查看全部</text>
</view>
<view class="todo-list">
<view v-for="item in todoList" :key="item.id" class="todo-item">
<view class="todo-icon">
<text class="i-carbon-notification-new" />
</view>
<view class="todo-content">
<text class="todo-title">{{ item.title }}</text>
<text class="todo-time">{{ item.time }}</text>
</view>
<wd-button size="small" type="primary" plain>处理</wd-button>
</view>
</view>
</view>
<!-- 风险动态 -->
<view class="section-card">
<view class="card-header">
<text class="title">风险动态</text>
</view>
<view class="risk-list">
<view v-for="alert in riskAlerts" :key="alert.id" class="risk-item">
<view class="risk-tag" :class="alert.level">{{ alert.levelText }}</view>
<text class="risk-msg">{{ alert.message }}</text>
<text class="risk-bank">{{ alert.bankName }}</text>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue'
import dayjs from 'dayjs'
const currentDate = computed(() => dayjs().format('YYYY年MM月DD日'))
const stats = ref({
bankCount: 24,
loanBalance: '128.5亿',
nplRatio: '1.8%',
})
const todoList = ref([
{ id: 1, title: '某某银行第二季度合规报告审核', time: '截止:今日 18:00' },
{ id: 2, title: '关于落实信贷风险排查的通知', time: '待发布' },
])
const riskAlerts = ref([
{ id: 1, level: 'high', levelText: '高', message: '信贷逾期率超过警戒线 2%', bankName: '某某农村信用社' },
{ id: 2, level: 'medium', levelText: '中', message: '大额交易集中度异常', bankName: '某某商业银行' },
])
function navigateTo(url: string) {
uni.navigateTo({ url })
}
</script>
<style lang="scss" scoped>
.gov-dashboard {
min-height: 100vh;
background: #f5f7fa;
padding-bottom: 40rpx;
}
.header-bg {
background: #0957DE;
padding: 40rpx 32rpx 100rpx;
border-bottom-left-radius: 40rpx;
border-bottom-right-radius: 40rpx;
position: relative;
.user-welcome {
display: flex;
justify-content: space-between;
align-items: center;
color: #fff;
margin-bottom: 40rpx;
.greeting { font-size: 36rpx; font-weight: 600; display: block; }
.date { font-size: 24rpx; opacity: 0.8; margin-top: 8rpx; display: block; }
.avatar-box {
width: 80rpx;
height: 80rpx;
background: rgba(255,255,255,0.2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 44rpx;
}
}
}
.stats-overview {
background: #fff;
border-radius: 16rpx;
padding: 40rpx 0;
box-shadow: 0 8rpx 24rpx rgba(9, 87, 222, 0.08);
position: relative;
margin-top: -60rpx; /* 上移效果 */
margin-left: 32rpx;
margin-right: 32rpx;
.stat-row {
display: flex;
align-items: center;
.stat-col {
flex: 1;
text-align: center;
.num {
font-size: 40rpx;
font-weight: 700;
color: #333;
display: block;
&.warning { color: #f57c00; }
}
.label {
font-size: 24rpx;
color: #999;
margin-top: 8rpx;
display: block;
}
}
.divider {
width: 1rpx;
height: 40rpx;
background: #eee;
}
}
}
.grid-menu {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20rpx;
background: #fff;
margin: 24rpx 32rpx;
padding: 32rpx 0;
border-radius: 16rpx;
.menu-item {
display: flex;
flex-direction: column;
align-items: center;
.icon-wrap {
width: 88rpx;
height: 88rpx;
border-radius: 24rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 40rpx;
margin-bottom: 12rpx;
&.primary { background: #e3f2fd; color: #0957DE; }
&.success { background: #e8f5e9; color: #38a169; }
&.warning { background: #fff3e0; color: #f57c00; }
&.info { background: #f3e5f5; color: #9c27b0; }
}
.label { font-size: 26rpx; color: #333; }
}
}
.section-card {
background: #fff;
margin: 24rpx 32rpx;
border-radius: 16rpx;
padding: 24rpx 32rpx;
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
.title { font-size: 32rpx; font-weight: 600; color: #333; display: flex; align-items: center; }
.title::before {
content: '';
display: inline-block;
width: 8rpx;
height: 32rpx;
background: #0957DE;
border-radius: 4rpx;
margin-right: 12rpx;
}
.more { font-size: 24rpx; color: #999; }
}
}
.todo-list {
.todo-item {
display: flex;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #f5f5f5;
&:last-child { border-bottom: none; }
.todo-icon {
width: 64rpx;
height: 64rpx;
background: #f0f7ff;
border-radius: 50%;
color: #0957DE;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.todo-content {
flex: 1;
margin-right: 20rpx;
.todo-title { font-size: 28rpx; color: #333; display: block; margin-bottom: 4rpx; }
.todo-time { font-size: 24rpx; color: #999; }
}
}
}
.risk-list {
.risk-item {
background: #fdfdfd;
border: 1rpx solid #f0f0f0;
border-radius: 8rpx;
padding: 20rpx;
margin-bottom: 16rpx;
display: flex;
align-items: center;
.risk-tag {
font-size: 20rpx;
padding: 2rpx 8rpx;
border-radius: 4rpx;
margin-right: 12rpx;
&.high { background: #ffebee; color: #d32f2f; border: 1rpx solid #ef9a9a; }
&.medium { background: #fff3e0; color: #ef6c00; border: 1rpx solid #ffcc80; }
}
.risk-msg { flex: 1; font-size: 26rpx; color: #333; }
.risk-bank { font-size: 22rpx; color: #999; margin-left: 12rpx; }
}
}
</style>

View File

@@ -0,0 +1,98 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '个人中心',
navigationBarBackgroundColor: '#0957DE',
navigationBarTextStyle: 'white',
},
}
</route>
<template>
<view class="me-page">
<view class="user-info-box">
<view class="flex items-center">
<view class="avatar">
<text class="i-carbon-user-avatar-filled-alt text-4xl" />
</view>
<view class="ml-4">
<text class="name">监管员001</text>
<text class="dept">市金融监管局 · 银行监管处</text>
</view>
</view>
</view>
<view class="menu-group">
<wd-cell-group border>
<wd-cell title="消息通知" is-link>
<template #icon>
<text class="i-carbon-notification text-lg mr-2 text-blue-500" />
</template>
</wd-cell>
<wd-cell title="工作日志" is-link>
<template #icon>
<text class="i-carbon-catalog text-lg mr-2 text-green-500" />
</template>
</wd-cell>
<wd-cell title="系统设置" is-link>
<template #icon>
<text class="i-carbon-settings text-lg mr-2 text-gray-500" />
</template>
</wd-cell>
</wd-cell-group>
</view>
<view class="p-4 mt-4">
<wd-button type="error" plain block @click="handleLogout">退出登录</wd-button>
</view>
</view>
</template>
<script lang="ts" setup>
function handleLogout() {
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
uni.reLaunch({ url: '/pages/login/index' })
}
}
})
}
</script>
<style lang="scss" scoped>
.me-page {
min-height: 100vh;
background: #f5f7fa;
}
.user-info-box {
background: #0957DE;
padding: 60rpx 40rpx 80rpx;
color: #fff;
.avatar {
width: 100rpx;
height: 100rpx;
background: rgba(255,255,255,0.2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.name { font-size: 36rpx; font-weight: 600; display: block; }
.dept { font-size: 26rpx; opacity: 0.8; margin-top: 8rpx; display: block; }
}
.menu-group {
margin-top: -20rpx;
background: #fff;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
overflow: hidden;
padding-top: 20rpx;
}
</style>

View File

@@ -0,0 +1,128 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '风险预警',
navigationBarBackgroundColor: '#fff',
navigationBarTextStyle: 'black',
},
}
</route>
<template>
<view class="risk-page">
<view class="list-wrap">
<view v-for="item in riskList" :key="item.id" class="risk-card">
<view class="left-line" :class="item.level"></view>
<view class="content">
<view class="head">
<text class="title">{{ item.title }}</text>
<text class="time">{{ item.time }}</text>
</view>
<view class="desc">{{ item.desc }}</view>
<view class="foot">
<view class="tag-box">
<text class="bank">{{ item.bankName }}</text>
<text class="level-tag" :class="item.level">{{ item.levelText }}</text>
</view>
<wd-button size="small" type="primary" plain>处置</wd-button>
</view>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const riskList = ref([
{
id: 1,
title: '信贷逾期率超标',
desc: '当前逾期率达2.5%,超过监管红线',
bankName: '某某农村信用社',
time: '10:30',
level: 'high',
levelText: '高风险'
},
{
id: 2,
title: '大额交易异常',
desc: '检测到单笔超大额资金流向敏感行业',
bankName: '某某商业银行',
time: '昨日',
level: 'medium',
levelText: '中风险'
},
])
</script>
<style lang="scss" scoped>
.risk-page {
min-height: 100vh;
background: #f5f7fa;
padding: 24rpx 32rpx;
}
.risk-card {
background: #fff;
border-radius: 12rpx;
overflow: hidden;
display: flex;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
.left-line {
width: 8rpx;
background: #ccc;
&.high { background: #d32f2f; }
&.medium { background: #f57c00; }
}
.content {
flex: 1;
padding: 24rpx;
}
.head {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
.title { font-size: 30rpx; font-weight: 600; color: #333; }
.time { font-size: 24rpx; color: #999; }
}
.desc {
font-size: 26rpx;
color: #666;
line-height: 1.5;
margin-bottom: 20rpx;
}
.foot {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1rpx solid #f5f5f5;
padding-top: 20rpx;
.tag-box {
display: flex;
align-items: center;
.bank { font-size: 24rpx; color: #666; margin-right: 16rpx; }
.level-tag {
font-size: 20rpx;
padding: 2rpx 8rpx;
border-radius: 4rpx;
&.high { background: #fce4ec; color: #d32f2f; }
&.medium { background: #FFF3E0; color: #f57c00; }
}
}
}
}
</style>

View File

@@ -0,0 +1,134 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '贷款抽查',
navigationBarBackgroundColor: '#fff',
navigationBarTextStyle: 'black',
},
}
</route>
<template>
<view class="check-page">
<wd-tabs v-model="currentTab" sticky>
<wd-tab title="待执行" name="pending">
<view class="list-wrap">
<view v-for="item in pendingList" :key="item.id" class="task-card">
<view class="task-head">
<view class="title-box">
<text class="i-carbon-task text-lg mr-1 text-gray-500" />
<text class="title">{{ item.title }}</text>
</view>
<wd-tag type="warning" plain>待执行</wd-tag>
</view>
<view class="task-body">
<view class="row">
<text class="label">被检机构</text>
<text>{{ item.bankName }}</text>
</view>
<view class="row">
<text class="label">计划日期</text>
<text>{{ item.date }}</text>
</view>
</view>
<view class="task-foot">
<wd-button size="small" type="primary" @click="handleStart(item)">开始检查</wd-button>
</view>
</view>
</view>
</wd-tab>
<wd-tab title="已完成" name="completed">
<view class="list-wrap">
<view class="empty-tip">暂无已完成任务</view>
</view>
</wd-tab>
</wd-tabs>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const currentTab = ref('pending')
const pendingList = ref([
{ id: 1, title: '2026年第一季度信贷合规检查', bankName: '某某商业银行', date: '2026-01-20' },
{ id: 2, title: '反洗钱专项排查', bankName: '某某农村信用社', date: '2026-01-22' },
])
function handleStart(item: any) {
uni.showToast({ title: '开始任务', icon: 'none' })
}
</script>
<style lang="scss" scoped>
.check-page {
min-height: 100vh;
background: #f5f7fa;
}
.list-wrap {
padding: 24rpx 32rpx;
}
.task-card {
background: #fff;
position: relative;
overflow: hidden;
border-radius: 12rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05);
&::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 6rpx;
background: #ff9800;
}
.task-head {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 24rpx;
.title-box {
flex: 1;
display: flex;
align-items: flex-start;
margin-right: 16rpx;
.title { font-size: 30rpx; font-weight: 600; color: #333; line-height: 1.4; }
}
}
.task-body {
.row {
font-size: 26rpx;
margin-bottom: 12rpx;
color: #333;
.label { color: #999; }
}
}
.task-foot {
display: flex;
justify-content: flex-end;
padding-top: 20rpx;
border-top: 1rpx solid #f5f5f5;
margin-top: 20rpx;
}
}
.empty-tip {
text-align: center;
color: #999;
padding-top: 100rpx;
font-size: 28rpx;
}
</style>

View File

@@ -0,0 +1,126 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '合作银行',
},
}
</route>
<template>
<view class="bank-list-page">
<wd-search v-model="keyword" placeholder="搜索银行名称" hide-cancel />
<view class="list-container">
<view class="section-title">签约银行</view>
<view class="bank-grid">
<view
v-for="item in bankList"
:key="item.id"
class="bank-item"
>
<view class="bank-icon">
<text class="i-carbon-building" />
</view>
<text class="name">{{ item.name }}</text>
<view class="tags">
<text class="tag">合作{{ item.years }}</text>
<text class="tag primary">保单{{ item.policyCount }}</text>
</view>
<view class="contact">
<text class="label">对接人</text>
<text class="val">{{ item.contact }}</text>
</view>
<wd-button size="small" plain class="mt-2">联系</wd-button>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const keyword = ref('')
const bankList = ref([
{ id: 1, name: '某某商业银行', years: 3, policyCount: 560, contact: '张经理' },
{ id: 2, name: '某某农村信用社', years: 5, policyCount: 1200, contact: '李经理' },
{ id: 3, name: '某某村镇银行', years: 2, policyCount: 320, contact: '王经理' },
{ id: 4, name: '某某城市银行', years: 1, policyCount: 150, contact: '赵经理' },
])
</script>
<style lang="scss" scoped>
.bank-list-page {
min-height: 100vh;
background: #f5f7fa;
padding: 24rpx 32rpx;
}
.section-title {
font-size: 30rpx;
font-weight: 600;
color: #333;
margin: 24rpx 0 16rpx;
}
.bank-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
}
.bank-item {
background: #fff;
border-radius: 16rpx;
padding: 32rpx;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.02);
.bank-icon {
width: 80rpx;
height: 80rpx;
background: #e3f2fd;
color: #1976d2;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
margin-bottom: 16rpx;
}
.name {
font-size: 28rpx;
font-weight: 600;
color: #333;
margin-bottom: 12rpx;
}
.tags {
display: flex;
gap: 8rpx;
margin-bottom: 16rpx;
.tag {
font-size: 20rpx;
padding: 2rpx 8rpx;
border-radius: 8rpx;
background: #f5f5f5;
color: #666;
&.primary { background: #e8f5e9; color: #38a169; }
}
}
.contact {
font-size: 22rpx;
color: #999;
margin-bottom: 12rpx;
.val { color: #666; }
}
}
</style>

View File

@@ -0,0 +1,491 @@
<script lang="ts" setup>
import type { ClaimApplication } from '@/api/types/insurance'
import { getClaimApplicationDetail, reviewClaimApplication } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '理赔审核详情',
},
})
const claimId = ref('')
const claim = ref<ClaimApplication | null>(null)
const loading = ref(false)
const reviewing = ref(false)
const rejectionReason = ref('')
const payoutAmount = ref('')
// 状态映射
const statusMap: Record<string, { text: string, color: string }> = {
pending: { text: '待审核', color: '#F59E0B' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
const statusInfo = computed(() => {
if (!claim.value)
return null
return statusMap[claim.value.status] || { text: claim.value.status, color: '#666' }
})
async function loadDetail() {
loading.value = true
try {
const res = await getClaimApplicationDetail(claimId.value)
claim.value = res
if (res.payoutAmount) {
payoutAmount.value = res.payoutAmount.toString()
}
}
finally {
loading.value = false
}
}
// 预览图片
function handlePreviewImage(url: string) {
uni.previewImage({
urls: [url],
})
}
// 理赔审核通过
async function handleApprove() {
if (!payoutAmount.value || Number(payoutAmount.value) <= 0) {
uni.showToast({ title: '请输入赔付金额', icon: 'none' })
return
}
reviewing.value = true
try {
await reviewClaimApplication(claimId.value, {
approved: true,
payoutAmount: Number(payoutAmount.value),
})
uni.showToast({ title: '审核通过', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
finally {
reviewing.value = false
}
}
// 理赔审核拒绝
async function handleReject() {
if (!rejectionReason.value) {
uni.showToast({ title: '请填写拒绝原因', icon: 'none' })
return
}
reviewing.value = true
try {
await reviewClaimApplication(claimId.value, {
approved: false,
rejectionReason: rejectionReason.value,
})
uni.showToast({ title: '已拒绝', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
finally {
reviewing.value = false
}
}
onLoad((options) => {
if (options?.id) {
claimId.value = options.id
loadDetail()
}
})
</script>
<template>
<view class="claim-review-detail-page">
<view v-if="loading" class="loading-state">
加载中...
</view>
<template v-else-if="claim">
<!-- 状态卡片 -->
<view class="status-card" :style="{ background: statusInfo?.color }">
<text class="status-text">{{ statusInfo?.text }}</text>
</view>
<!-- 银行信息 -->
<view class="section-card">
<view class="card-header">
银行信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">银行名称</text>
<text class="value">{{ claim.bankName }}</text>
</view>
<view class="info-item">
<text class="label">保险单号</text>
<text class="value">{{ claim.policyNumber }}</text>
</view>
</view>
</view>
<!-- 保险公司信息 -->
<view class="section-card">
<view class="card-header">
保险公司信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险公司</text>
<text class="value">{{ claim.companyName }}</text>
</view>
</view>
</view>
<!-- 理赔信息 -->
<view class="section-card">
<view class="card-header">
理赔信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">理赔金额</text>
<text class="value amount">{{ claim.claimAmount }}</text>
</view>
<view class="info-item">
<text class="label">理赔原因</text>
<text class="value reason">{{ claim.claimReason }}</text>
</view>
<view class="info-item">
<text class="label">提交时间</text>
<text class="value">{{ claim.submittedAt }}</text>
</view>
</view>
</view>
<!-- 理赔材料 -->
<view class="section-card">
<view class="card-header">
理赔材料
</view>
<view class="materials-list">
<view
v-for="material in claim.materials"
:key="material.id"
class="material-item"
@click="handlePreviewImage(material.url)"
>
<image :src="material.url" mode="aspectFill" />
<view class="material-info">
<text class="material-name">{{ material.name }}</text>
<text class="upload-time">{{ material.uploadTime }}</text>
</view>
</view>
</view>
</view>
<!-- 审核操作 -->
<view v-if="claim.status === 'pending'" class="action-card">
<view class="card-header">
理赔审核
</view>
<view class="action-buttons">
<button
class="btn approve"
:disabled="reviewing"
@click="handleApprove"
>
<text v-if="reviewing">处理中...</text>
<text v-else>通过</text>
</button>
<button
class="btn reject"
:disabled="reviewing"
@click="handleReject"
>
<text v-if="reviewing">处理中...</text>
<text v-else>拒绝</text>
</button>
</view>
<view class="payout-input">
<text class="label">赔付金额</text>
<input
v-model="payoutAmount"
type="digit"
class="input"
placeholder="请输入赔付金额"
>
</view>
<view v-if="!reviewing" class="reject-reason">
<textarea
v-model="rejectionReason"
class="textarea"
placeholder="请输入拒绝原因..."
:maxlength="500"
/>
<text class="char-count">{{ rejectionReason.length }}/500</text>
</view>
</view>
<!-- 已审核信息 -->
<view v-if="claim.status !== 'pending'" class="section-card">
<view class="card-header">
审核信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">审核时间</text>
<text class="value">{{ claim.reviewedAt }}</text>
</view>
<view class="info-item">
<text class="label">审核人员</text>
<text class="value">{{ claim.reviewedBy }}</text>
</view>
<view v-if="claim.payoutAmount" class="info-item">
<text class="label">赔付金额</text>
<text class="value payout">{{ claim.payoutAmount }}</text>
</view>
<view v-if="claim.payoutDate" class="info-item">
<text class="label">赔付日期</text>
<text class="value">{{ claim.payoutDate }}</text>
</view>
<view v-if="claim.rejectionReason" class="info-item full">
<text class="label">拒绝原因</text>
<text class="value reason">{{ claim.rejectionReason }}</text>
</view>
</view>
</view>
</template>
</view>
</template>
<style lang="scss" scoped>
.claim-review-detail-page {
min-height: 100vh;
background: #f5f7fa;
padding: 20rpx;
padding-bottom: 120rpx;
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.status-card {
background: linear-gradient(135deg, #00c05a 0%, #34d19d 100%);
border-radius: 16rpx;
padding: 40rpx 30rpx;
color: #fff;
margin-bottom: 20rpx;
text-align: center;
.status-text {
font-size: 36rpx;
font-weight: bold;
display: block;
}
}
.section-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
}
}
.info-list {
padding: 20rpx 0;
.info-item {
display: flex;
justify-content: space-between;
padding: 16rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f9f9f9;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
&.amount {
color: #ff8f0d;
font-weight: 600;
}
&.reason {
text-align: left;
line-height: 1.5;
}
&.payout {
color: #00c05a;
font-weight: 600;
}
}
&.full {
flex-direction: column;
align-items: flex-start;
.value {
margin-top: 8rpx;
width: 100%;
}
}
}
}
.materials-list {
padding: 20rpx 0;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16rpx;
.material-item {
position: relative;
border-radius: 12rpx;
overflow: hidden;
background: #f8f9fa;
image {
width: 100%;
height: 200rpx;
display: block;
}
.material-info {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
padding: 12rpx;
display: flex;
flex-direction: column;
gap: 4rpx;
.material-name {
font-size: 22rpx;
color: #fff;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.upload-time {
font-size: 20rpx;
color: rgba(255, 255, 255, 0.8);
}
}
}
}
.action-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
}
.action-buttons {
display: flex;
gap: 20rpx;
padding: 20rpx 0;
.btn {
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
&.approve {
background: #00c05a;
color: #fff;
}
&.reject {
background: #fa4350;
color: #fff;
}
&:disabled {
opacity: 0.6;
}
}
}
.payout-input {
padding: 0 0 20rpx 0;
.label {
display: block;
font-size: 26rpx;
color: #666;
margin-bottom: 12rpx;
}
.input {
width: 100%;
padding: 16rpx;
background: #f8f9fa;
border-radius: 8rpx;
font-size: 26rpx;
color: #333;
}
}
.reject-reason {
padding: 0 0 20rpx 0;
.textarea {
width: 100%;
min-height: 150rpx;
padding: 16rpx;
background: #f8f9fa;
border-radius: 8rpx;
font-size: 26rpx;
color: #333;
line-height: 1.5;
}
.char-count {
font-size: 22rpx;
color: #999;
text-align: right;
margin-top: 8rpx;
display: block;
}
}
}
</style>

View File

@@ -0,0 +1,339 @@
<script lang="ts" setup>
import type { ClaimApplication } from '@/api/types/insurance'
import { getClaimReviewApplications } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '理赔审核',
},
})
const loading = ref(false)
const claims = ref<ClaimApplication[]>([])
const currentTab = ref('pending')
// 状态映射
const statusMap: Record<string, { text: string, color: string }> = {
pending: { text: '待审核', color: '#F59E0B' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
const tabs = [
{ key: 'pending', label: '待审核' },
{ key: 'approved', label: '已通过' },
{ key: 'rejected', label: '已拒绝' },
]
// 筛选后的列表
const filteredClaims = computed(() => {
if (currentTab.value === 'pending') {
return claims.value.filter(c => c.status === 'pending')
}
return claims.value.filter(c => c.status === currentTab.value)
})
// 切换标签
function handleTabChange(tab: string) {
currentTab.value = tab
}
// 查看详情
function handleViewDetail(id: string) {
uni.navigateTo({
url: `/pagesInsurance/claim-review/detail?id=${id}`,
})
}
// 加载列表
async function loadList() {
loading.value = true
try {
const res = await getClaimReviewApplications()
claims.value = res.list
}
finally {
loading.value = false
}
}
onShow(() => {
loadList()
})
</script>
<template>
<view class="claim-review-list-page">
<!-- 标签页 -->
<view class="tabs">
<view
v-for="tab in tabs"
:key="tab.key"
class="tab-item"
:class="{ active: currentTab === tab.key }"
@click="handleTabChange(tab.key)"
>
<text class="tab-text">{{ tab.label }}</text>
<view v-if="currentTab === tab.key" class="tab-indicator" />
</view>
</view>
<!-- 列表 -->
<view v-if="loading" class="loading-state">
加载中...
</view>
<view v-else-if="filteredClaims.length > 0" class="claim-list">
<view
v-for="claim in filteredClaims"
:key="claim.id"
class="claim-item"
@click="handleViewDetail(claim.id)"
>
<view class="claim-header">
<view class="claim-info">
<text class="claim-id">理赔申请号: {{ claim.id }}</text>
<text class="bank-name">{{ claim.bankName }}</text>
</view>
<view
class="status-tag"
:style="{ background: statusMap[claim.status]?.color }"
>
{{ statusMap[claim.status]?.text }}
</view>
</view>
<view class="claim-body">
<view class="claim-row">
<text class="label">保险单号</text>
<text class="value">{{ claim.policyNumber }}</text>
</view>
<view class="claim-row">
<text class="label">保险公司</text>
<text class="value">{{ claim.companyName }}</text>
</view>
<view class="claim-row">
<text class="label">理赔金额</text>
<text class="value amount">{{ claim.claimAmount }}</text>
</view>
<view class="claim-row">
<text class="label">理赔原因</text>
<text class="value reason">{{ claim.claimReason }}</text>
</view>
<view class="claim-row">
<text class="label">提交时间</text>
<text class="value">{{ claim.submittedAt }}</text>
</view>
<view v-if="claim.payoutAmount" class="claim-row">
<text class="label">赔付金额</text>
<text class="value payout">{{ claim.payoutAmount }}</text>
</view>
<view v-if="claim.payoutDate" class="claim-row">
<text class="label">赔付日期</text>
<text class="value">{{ claim.payoutDate }}</text>
</view>
<view v-if="claim.rejectionReason" class="claim-row">
<text class="label">拒绝原因</text>
<text class="value reject">{{ claim.rejectionReason }}</text>
</view>
</view>
<view class="claim-footer">
<text class="material-count">已上传 {{ claim.materials.length }} 份材料</text>
<text class="arrow-icon i-carbon-chevron-right" />
</view>
</view>
</view>
<!-- 空状态 -->
<view v-else class="empty-state">
<text class="empty-icon i-carbon-document" />
<text class="empty-text">暂无理赔申请</text>
</view>
</view>
</template>
<style lang="scss" scoped>
.claim-review-list-page {
min-height: 100vh;
background: #f5f7fa;
}
.tabs {
background: #fff;
display: flex;
padding: 0 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.tab-item {
flex: 1;
position: relative;
padding: 30rpx 0;
text-align: center;
font-size: 28rpx;
color: #666;
&.active {
color: #00c05a;
font-weight: 600;
}
.tab-text {
position: relative;
z-index: 1;
}
.tab-indicator {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60rpx;
height: 4rpx;
background: #00c05a;
border-radius: 2rpx;
}
}
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.claim-list {
padding: 20rpx;
.claim-item {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
.claim-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.claim-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.claim-id {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.bank-name {
font-size: 24rpx;
color: #666;
}
}
.status-tag {
padding: 8rpx 20rpx;
border-radius: 8rpx;
font-size: 24rpx;
color: #fff;
}
}
.claim-body {
background: #f8f9fa;
border-radius: 12rpx;
padding: 20rpx;
margin-bottom: 16rpx;
.claim-row {
display: flex;
justify-content: space-between;
padding: 12rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
flex: 1;
&.amount {
color: #ff8f0d;
font-weight: 600;
}
&.reason {
text-align: left;
line-height: 1.5;
}
&.payout {
color: #00c05a;
font-weight: 600;
}
&.reject {
color: #fa4350;
text-align: left;
line-height: 1.5;
}
}
}
}
.claim-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 12rpx;
.material-count {
font-size: 24rpx;
color: #999;
}
.arrow-icon {
font-size: 28rpx;
color: #ccc;
}
}
}
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
color: #ccc;
}
.empty-text {
font-size: 26rpx;
}
}
</style>

View File

@@ -0,0 +1,200 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '理赔详情',
},
}
</route>
<template>
<view class="claim-detail">
<!-- 顶部状态 -->
<view class="status-header">
<view class="status-content">
<text class="label">当前状态</text>
<text class="status">{{ claim.statusText }}</text>
</view>
<text class="amount">¥{{ claim.amount.toLocaleString() }}</text>
</view>
<!-- 申请信息 -->
<view class="card">
<view class="card-title">申请信息</view>
<view class="info-list">
<view class="item">
<text class="label">理赔单号</text>
<text class="val">{{ claim.claimNo }}</text>
</view>
<view class="item">
<text class="label">申请时间</text>
<text class="val">{{ claim.createTime }}</text>
</view>
<view class="item">
<text class="label">理赔原因</text>
<text class="val">{{ claim.reason }}</text>
</view>
<view class="item">
<text class="label">附件材料</text>
<text class="link">查看附件 (3)</text>
</view>
</view>
</view>
<!-- 关联保单 -->
<view class="card">
<view class="card-title">关联保单</view>
<view class="policy-preview">
<view class="row">
<text class="label">保单号</text>
<text class="val">{{ claim.policyNo }}</text>
</view>
<view class="row">
<text class="label">被保险人</text>
<text class="val">{{ claim.customerName }}</text>
</view>
<view class="row">
<text class="label">承保金额</text>
<text class="val">¥{{ (500000).toLocaleString() }}</text>
</view>
</view>
<wd-button size="small" plain block class="mt-2">查看保单详情</wd-button>
</view>
<!-- 审核记录 -->
<view class="card">
<view class="card-title">审核流程</view>
<wd-steps :active="activeStep" vertical>
<wd-step title="提交申请" :description="claim.createTime" />
<wd-step title="初审" description="等待保险专员初审" />
<wd-step title="复核" description="等待理赔经理复核" />
<wd-step title="结案打款" />
</wd-steps>
</view>
<!-- 底部操作栏 -->
<view class="action-bar" v-if="claim.status === 'pending'">
<wd-button type="error" plain class="flex-1 mr-2" @click="handleReject">驳回</wd-button>
<wd-button type="primary" class="flex-1" @click="handleApprove">通过初审</wd-button>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const claim = ref({
id: '1',
claimNo: 'C20260105001',
amount: 50000,
status: 'pending',
statusText: '待初审',
createTime: '2026-01-05 10:00:00',
reason: '借款人长期失联确认贷款逾期超过90天',
policyNo: 'P202511010023',
customerName: '张某某',
bankName: '某某商业银行'
})
const activeStep = ref(1)
function handleReject() {
uni.showModal({
title: '驳回申请',
editable: true,
placeholderText: '请输入驳回原因',
success: (res) => {
if (res.confirm) {
uni.showToast({ title: '已驳回', icon: 'none' })
}
}
})
}
function handleApprove() {
uni.showModal({
title: '确认通过',
content: '确认通过初审并提交复核?',
success: (res) => {
if (res.confirm) {
uni.showToast({ title: '已通过', icon: 'success' })
}
}
})
}
</script>
<style lang="scss" scoped>
.claim-detail {
min-height: 100vh;
background: #f5f7fa;
padding-bottom: 120rpx;
}
.status-header {
background: #0957DE;
color: #fff;
padding: 40rpx 32rpx;
display: flex;
justify-content: space-between;
align-items: center;
.label { font-size: 24rpx; opacity: 0.8; margin-right: 12rpx; }
.status { font-size: 36rpx; font-weight: 600; }
.amount { font-size: 48rpx; font-weight: 700; }
}
.card {
background: #fff;
border-radius: 16rpx;
padding: 32rpx;
margin: 24rpx 32rpx;
.card-title {
font-size: 30rpx;
font-weight: 600;
margin-bottom: 24rpx;
padding-left: 16rpx;
border-left: 6rpx solid #0957DE;
}
.info-list {
.item {
display: flex;
justify-content: space-between;
margin-bottom: 16rpx;
font-size: 28rpx;
.label { color: #718096; }
.val { color: #2d3748; text-align: right; max-width: 60%; }
.link { color: #2b6cb0; }
}
}
.policy-preview {
background: #f7fafc;
padding: 20rpx;
border-radius: 8rpx;
.row {
display: flex;
justify-content: space-between;
margin-bottom: 8rpx;
font-size: 26rpx;
.label { color: #718096; }
.val { color: #2d3748; font-weight: 500; }
}
}
}
.action-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 24rpx 32rpx;
background: #fff;
display: flex;
box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05);
}
</style>

View File

@@ -0,0 +1,320 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '理赔处理',
},
}
</route>
<template>
<view class="claim-list-page">
<view class="tab-header">
<view
v-for="item in tabs"
:key="item.value"
class="tab-item"
:class="{ active: currentTab === item.value }"
@click="currentTab = item.value"
>
{{ item.label }}
<view class="badge" v-if="item.count">{{ item.count }}</view>
</view>
</view>
<view class="list-content">
<view
v-for="item in filteredList"
:key="item.id"
class="claim-card"
:class="item.status"
@click="goDetail(item.id)"
>
<view class="card-top">
<text class="claim-no">CASE NO.{{ item.claimNo }}</text>
<text class="time">{{ item.time }}</text>
</view>
<view class="card-main">
<view class="amount-box">
<text class="label">申请金额</text>
<text class="amount">¥{{ item.amount.toLocaleString() }}</text>
</view>
<view class="info-box">
<view class="row">
<text class="label">申请银行</text>
<text class="val">{{ item.bankName }}</text>
</view>
<view class="row">
<text class="label">关联客户</text>
<text class="val">{{ item.customerName }}</text>
</view>
</view>
</view>
<view class="card-reason">
<text class="label">理赔原因</text>
<text class="text">{{ item.reason }}</text>
</view>
<view class="card-status-bar">
<text class="status-btn" :class="item.status">{{ item.statusText }}</text>
<view class="actions">
<view class="view-policy-btn" @click="goPolicyDetail">查看保单</view>
<text class="i-carbon-chevron-right text-gray-400" />
</view>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue'
const currentTab = ref('pending')
const tabs = [
{ value: 'pending', label: '待处理', count: 5 },
{ value: 'processing', label: '审核中', count: 2 },
{ value: 'completed', label: '已结案', count: 0 },
]
const claimList = ref([
{
id: '1',
claimNo: 'C20260105001',
time: '2026-01-05 10:00',
amount: 50000,
bankName: '某某商业银行',
customerName: '张某某',
reason: '贷款逾期超过90天',
status: 'pending',
statusText: '待审核'
},
{
id: '2',
claimNo: 'C20260104008',
time: '2026-01-04 15:30',
amount: 120000,
bankName: '某某农村信用社',
customerName: '李某某',
reason: '借款人经营困难,无力还款',
status: 'pending',
statusText: '待审核'
},
{
id: '3',
claimNo: 'C20260103012',
time: '2026-01-03 09:20',
amount: 35000,
bankName: '某某村镇银行',
customerName: '王某某',
reason: '意外事故导致还款能力丧失',
status: 'processing',
statusText: '复核中'
},
{
id: '4',
claimNo: 'C20251228005',
time: '2025-12-28 11:00',
amount: 80000,
bankName: '某某商业银行',
customerName: '赵某某',
reason: '企业破产清算',
status: 'processing',
statusText: '审核中'
},
{
id: '5',
claimNo: 'C20251215001',
time: '2025-12-15 14:00',
amount: 200000,
bankName: '某某商业银行',
customerName: '钱某某',
reason: '贷款逾期超过180天',
status: 'completed',
statusText: '已赔付'
},
{
id: '6',
claimNo: 'C20251120003',
time: '2025-11-20 09:30',
amount: 60000,
bankName: '某某村镇银行',
customerName: '孙某某',
reason: '资料不全,无法证明损失',
status: 'rejected',
statusText: '已拒绝'
}
])
const filteredList = computed(() => {
if (currentTab.value === 'completed') {
return claimList.value.filter(item => ['completed', 'rejected'].includes(item.status))
}
return claimList.value.filter(item => item.status === currentTab.value)
})
function goDetail(id: string) {
uni.navigateTo({ url: `/pagesInsurance/claim/detail?id=${id}` })
}
function goPolicyDetail(e: Event) {
e.stopPropagation()
uni.showToast({ title: '查看保单详情', icon: 'none' })
// uni.navigateTo({ url: `/pagesInsurance/policy/detail?id=1` })
}
</script>
<style lang="scss" scoped>
.claim-list-page {
min-height: 100vh;
background: #f5f7fa;
}
.tab-header {
display: flex;
background: #fff;
padding: 0 32rpx;
position: sticky;
top: 0;
z-index: 10;
border-bottom: 1rpx solid #eee;
.tab-item {
flex: 1;
text-align: center;
padding: 28rpx 0;
font-size: 28rpx;
color: #666;
position: relative;
display: flex;
align-items: center;
justify-content: center;
gap: 8rpx;
&.active {
color: #0957DE;
font-weight: 600;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60rpx;
height: 6rpx;
background: #0957DE;
border-radius: 4rpx;
}
}
.badge {
background: #e53e3e;
color: #fff;
font-size: 20rpx;
padding: 2rpx 10rpx;
border-radius: 20rpx;
}
}
}
.list-content {
padding: 24rpx 32rpx;
}
.claim-card {
background: #fff;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
position: relative;
overflow: hidden;
&.pending { border-left: 8rpx solid #ff9800; }
&.processing { border-left: 8rpx solid #2196f3; }
&.completed { border-left: 8rpx solid #4caf50; }
.card-top {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #999;
margin-bottom: 20rpx;
.claim-no { font-family: monospace; }
}
.card-main {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 20rpx;
.amount-box {
.label { display: block; font-size: 22rpx; color: #666; }
.amount { font-size: 40rpx; font-weight: 700; color: #333; }
}
.info-box {
text-align: right;
.row {
font-size: 24rpx;
margin-bottom: 4rpx;
.label { color: #999; }
.val { color: #333; }
}
}
}
.card-reason {
background: #f9f9f9;
padding: 16rpx;
border-radius: 8rpx;
font-size: 26rpx;
margin-bottom: 20rpx;
color: #555;
.label { color: #999; }
}
.card-status-bar {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1rpx solid #eee;
padding-top: 16rpx;
.status-btn {
font-size: 26rpx;
font-weight: 600;
&.pending { color: #f57c00; }
&.processing { color: #0957DE; }
&.completed { color: #38a169; }
&.rejected { color: #fa4350; }
}
.actions {
display: flex;
align-items: center;
gap: 16rpx;
.view-policy-btn {
font-size: 24rpx;
color: #666;
padding: 8rpx 20rpx;
background: #f5f5f5;
border-radius: 24rpx;
&:active {
opacity: 0.8;
background: #eee;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,355 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '保险工作台',
navigationBarBackgroundColor: '#0957DE',
navigationBarTextStyle: 'white',
},
}
</route>
<template>
<view class="dashboard">
<!-- 顶部欢迎区 -->
<view class="header-bg">
<view class="welcome-info">
<view class="text-info">
<text class="greeting">信贷保险平台</text>
<text class="date">{{ currentDate }}</text>
</view>
<view class="avatar-box">
<text class="i-carbon-user-avatar" />
</view>
</view>
</view>
<!-- 统计卡片 -->
<view class="stats-overview">
<view class="stat-row">
<view class="stat-col">
<text class="num">{{ stats.policyCount }}</text>
<text class="label">有效保单</text>
</view>
<view class="divider" />
<view class="stat-col">
<text class="num primary">{{ stats.totalPremium }}<text class="unit"></text></text>
<text class="label">保费总额</text>
</view>
<view class="divider" />
<view class="stat-col">
<text class="num warning">{{ stats.pendingClaim }}</text>
<text class="label">待理赔</text>
</view>
</view>
</view>
<!-- 快捷功能 -->
<view class="grid-menu">
<view class="menu-item" @click="navigateTo('/pagesInsurance/policy/list')">
<view class="icon-wrap primary">
<text class="i-carbon-document-protected" />
</view>
<text class="label">保单管理</text>
</view>
<view class="menu-item" @click="navigateTo('/pagesInsurance/claim/list')">
<view class="icon-wrap warning">
<text class="i-carbon-request-quote" />
</view>
<text class="label">理赔处理</text>
</view>
<view class="menu-item" @click="navigateTo('/pagesInsurance/bank/list')">
<view class="icon-wrap info">
<text class="i-carbon-building" />
</view>
<text class="label">合作银行</text>
</view>
<view class="menu-item" @click="navigateTo('/pagesInsurance/report/index')">
<view class="icon-wrap success">
<text class="i-carbon-chart-line" />
</view>
<text class="label">业务报表</text>
</view>
</view>
<!-- 待处理理赔 -->
<view class="section-card">
<view class="card-header">
<text class="title">待处理理赔</text>
<text class="more" @click="navigateTo('/pagesInsurance/claim/list')">查看全部</text>
</view>
<view class="claim-list">
<view v-for="item in pendingClaims" :key="item.id" class="claim-item" @click="goClaimDetail(item.id)">
<view class="claim-icon">
<text class="i-carbon-warning-hex" />
</view>
<view class="claim-content">
<text class="claim-title">{{ item.bankName }} - {{ item.customerName }}</text>
<text class="claim-desc">理赔金额¥{{ item.amount.toLocaleString() }}</text>
</view>
<view class="claim-time">{{ item.time }}</view>
<text class="i-carbon-chevron-right text-gray-300 ml-2" />
</view>
</view>
</view>
<!-- 业务趋势 -->
<view class="section-card">
<view class="card-header">
<text class="title">本月概览</text>
</view>
<view class="overview-grid">
<view class="overview-item">
<text class="label">新增保单</text>
<view class="val-box">
<text class="val">86</text>
<text class="trend up">+12%</text>
</view>
</view>
<view class="overview-item">
<text class="label">保费收入</text>
<view class="val-box">
<text class="val">¥128</text>
<text class="trend up">+8%</text>
</view>
</view>
<view class="overview-item">
<text class="label">理赔案件</text>
<view class="val-box">
<text class="val">12</text>
<text class="trend down">-5%</text>
</view>
</view>
<view class="overview-item">
<text class="label">赔付率</text>
<view class="val-box">
<text class="val">2.3%</text>
<text class="trend">-</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue'
import dayjs from 'dayjs'
const currentDate = computed(() => dayjs().format('YYYY年MM月DD日'))
const stats = ref({
policyCount: 1256,
totalPremium: 3680,
pendingClaim: 8,
claimAmount: 45.6,
})
const pendingClaims = ref([
{ id: '1', bankName: '某某商业银行', customerName: '张某某', amount: 50000, time: '30分钟前' },
{ id: '2', bankName: '某某农村信用社', customerName: '李某某', amount: 120000, time: '2小时前' },
])
function navigateTo(url: string) {
uni.navigateTo({ url })
}
function goClaimDetail(id: string) {
uni.navigateTo({ url: `/pagesInsurance/claim/detail?id=${id}` })
}
</script>
<style lang="scss" scoped>
.dashboard {
min-height: 100vh;
background: #f5f7fa;
padding-bottom: 40rpx;
}
.header-bg {
background: #0957DE;
padding: 40rpx 32rpx 100rpx;
border-bottom-left-radius: 40rpx;
border-bottom-right-radius: 40rpx;
position: relative;
.welcome-info {
display: flex;
justify-content: space-between;
align-items: center;
color: #fff;
margin-bottom: 40rpx;
.greeting { font-size: 36rpx; font-weight: 600; display: block; }
.date { font-size: 24rpx; opacity: 0.8; margin-top: 8rpx; display: block; }
.avatar-box {
width: 80rpx;
height: 80rpx;
background: rgba(255,255,255,0.2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 44rpx;
}
}
}
.stats-overview {
background: #fff;
border-radius: 16rpx;
padding: 40rpx 0;
box-shadow: 0 8rpx 24rpx rgba(9, 87, 222, 0.08);
position: relative;
margin-top: -60rpx;
margin-left: 32rpx;
margin-right: 32rpx;
.stat-row {
display: flex;
align-items: center;
.stat-col {
flex: 1;
text-align: center;
.num {
font-size: 40rpx;
font-weight: 700;
color: #333;
display: block;
&.primary { color: #0957DE; }
&.warning { color: #f57c00; }
.unit { font-size: 24rpx; font-weight: 400; margin-left: 4rpx; color: #666; }
}
.label { font-size: 24rpx; color: #999; margin-top: 8rpx; display: block; }
}
.divider { width: 1rpx; height: 40rpx; background: #eee; }
}
}
.grid-menu {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20rpx;
background: #fff;
margin: 24rpx 32rpx;
padding: 32rpx 0;
border-radius: 16rpx;
.menu-item {
display: flex;
flex-direction: column;
align-items: center;
.icon-wrap {
width: 88rpx;
height: 88rpx;
border-radius: 24rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 40rpx;
margin-bottom: 12rpx;
&.primary { background: #e3f2fd; color: #0957DE; }
&.success { background: #e8f5e9; color: #38a169; }
&.warning { background: #fff3e0; color: #f57c00; }
&.info { background: #f3e5f5; color: #9c27b0; }
}
.label { font-size: 26rpx; color: #333; }
}
}
.section-card {
background: #fff;
margin: 24rpx 32rpx;
border-radius: 16rpx;
padding: 24rpx 32rpx;
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
.title { font-size: 32rpx; font-weight: 600; color: #333; display: flex; align-items: center; }
.title::before {
content: '';
display: inline-block;
width: 8rpx;
height: 32rpx;
background: #0957DE;
border-radius: 4rpx;
margin-right: 12rpx;
}
.more { font-size: 24rpx; color: #999; }
}
}
.claim-list {
.claim-item {
display: flex;
align-items: center;
padding: 24rpx 0;
border-bottom: 1rpx solid #f5f5f5;
&:last-child { border-bottom: none; }
.claim-icon {
width: 64rpx;
height: 64rpx;
background: #fff3e0;
border-radius: 50%;
color: #f57c00;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.claim-content {
flex: 1;
.claim-title { font-size: 28rpx; color: #333; display: block; margin-bottom: 4rpx; }
.claim-desc { font-size: 24rpx; color: #d32f2f; }
}
.claim-time { font-size: 24rpx; color: #999; }
}
}
.overview-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
.overview-item {
background: #f9f9f9;
padding: 20rpx;
border-radius: 8rpx;
.label { font-size: 24rpx; color: #666; display: block; margin-bottom: 8rpx; }
.val-box {
display: flex;
align-items: flex-end;
.val { font-size: 32rpx; font-weight: 600; color: #333; margin-right: 8rpx; }
.trend {
font-size: 22rpx;
color: #999;
&.up { color: #38a169; }
&.down { color: #d32f2f; }
}
}
}
}
</style>

View File

@@ -0,0 +1,103 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '个人中心',
navigationBarBackgroundColor: '#0957DE',
navigationBarTextStyle: 'white',
},
}
</route>
<template>
<view class="me-page">
<view class="user-info-box">
<view class="flex items-center">
<view class="avatar">
<text class="i-carbon-user-avatar text-4xl" />
</view>
<view class="ml-4">
<text class="name">保险专员007</text>
<text class="dept">核保部 / 高级专员</text>
</view>
</view>
</view>
<view class="menu-group">
<wd-cell-group border>
<wd-cell title="我的保单" is-link to="/pagesInsurance/policy/list">
<template #icon>
<text class="i-carbon-document-protected text-lg mr-2 text-blue-500" />
</template>
</wd-cell>
<wd-cell title="业绩统计" is-link>
<template #icon>
<text class="i-carbon-chart-line text-lg mr-2 text-orange-500" />
</template>
</wd-cell>
<wd-cell title="联系客服" is-link>
<template #icon>
<text class="i-carbon-customer-service text-lg mr-2 text-green-500" />
</template>
</wd-cell>
<wd-cell title="账户设置" is-link>
<template #icon>
<text class="i-carbon-settings text-lg mr-2 text-gray-500" />
</template>
</wd-cell>
</wd-cell-group>
</view>
<view class="p-4 mt-4">
<wd-button type="error" plain block @click="handleLogout">退出登录</wd-button>
</view>
</view>
</template>
<script lang="ts" setup>
function handleLogout() {
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
uni.reLaunch({ url: '/pages/login/index' })
}
}
})
}
</script>
<style lang="scss" scoped>
.me-page {
min-height: 100vh;
background: #f5f7fa;
}
.user-info-box {
background: #0957DE;
padding: 60rpx 40rpx 80rpx;
color: #fff;
.avatar {
width: 100rpx;
height: 100rpx;
background: rgba(255,255,255,0.2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.name { font-size: 36rpx; font-weight: 600; display: block; }
.dept { font-size: 26rpx; opacity: 0.8; margin-top: 8rpx; display: block; }
}
.menu-group {
margin-top: -20rpx;
background: #fff;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
overflow: hidden;
padding-top: 20rpx;
}
</style>

View File

@@ -0,0 +1,231 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '保单详情',
},
}
</route>
<template>
<view class="policy-detail">
<!-- 保单状态头 -->
<view class="detail-header">
<view class="status-icon">
<text class="i-carbon-checkmark-filled text-4xl text-green-500" v-if="policy.status === 'active'" />
<text class="i-carbon-warning-filled text-4xl text-orange-500" v-else />
</view>
<text class="status-text">{{ policy.statusText }}</text>
<text class="policy-no">NO.{{ policy.policyNo }}</text>
</view>
<!-- 基本信息 -->
<view class="section">
<view class="section-title">基本信息</view>
<view class="info-grid">
<view class="info-item">
<text class="label">投保人</text>
<text class="value">{{ policy.customerName }}</text>
</view>
<view class="info-item">
<text class="label">身份证号</text>
<text class="value">{{ policy.idCard }}</text>
</view>
<view class="info-item">
<text class="label">联系电话</text>
<text class="value">{{ policy.phone }}</text>
</view>
<view class="info-item">
<text class="label">受益人</text>
<text class="value">{{ policy.beneficiary }}{{ policy.bankName }}</text>
</view>
</view>
</view>
<!-- 保障内容 -->
<view class="section">
<view class="section-title">保障内容</view>
<view class="coverage-list">
<view class="coverage-item">
<text class="name">个人消费信贷保证保险</text>
<text class="amount">¥{{ policy.amount.toLocaleString() }}</text>
</view>
</view>
<view class="divider" />
<view class="info-row">
<text class="label">保险费</text>
<text class="value price">¥{{ policy.premium.toLocaleString() }}</text>
</view>
<view class="info-row">
<text class="label">保险期限</text>
<text class="value">{{ policy.startDate }} {{ policy.endDate }}</text>
</view>
</view>
<!-- 相关理赔 -->
<view class="section" v-if="policy.claims.length > 0">
<view class="section-title">理赔记录</view>
<view class="claim-list">
<view v-for="claim in policy.claims" :key="claim.id" class="claim-item">
<view class="claim-header">
<text class="date">{{ claim.date }}</text>
<text class="status">{{ claim.status }}</text>
</view>
<text class="desc">{{ claim.reason }}</text>
</view>
</view>
</view>
<!-- 底部操作 -->
<view class="footer-actions">
<wd-button type="info" plain class="flex-1 mr-2">电子保单</wd-button>
<wd-button type="primary" class="flex-1">发起理赔</wd-button>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
const policy = ref({
id: '1',
policyNo: 'P202601050001',
status: 'active',
statusText: '保障中',
customerName: '张某某',
idCard: '33010619900101****',
phone: '138****0000',
beneficiary: '某某商业银行',
bankName: '某某商业银行',
amount: 500000,
premium: 2500,
startDate: '2026-01-01',
endDate: '2027-01-01',
claims: [
// { id: 1, date: '2026-06-01', status: '处理中', reason: '贷款逾期申请理赔' }
]
})
</script>
<style lang="scss" scoped>
.policy-detail {
min-height: 100vh;
background: #f5f7fa;
padding-bottom: 120rpx;
}
.detail-header {
background: #0957DE;
color: #fff;
padding: 40rpx 32rpx 60rpx;
display: flex;
flex-direction: column;
align-items: center;
.status-icon {
width: 100rpx;
height: 100rpx;
background: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 16rpx;
}
.status-text {
font-size: 36rpx;
font-weight: 600;
}
.policy-no {
font-size: 26rpx;
opacity: 0.8;
margin-top: 8rpx;
}
}
.section {
background: #fff;
margin: 24rpx 32rpx;
padding: 32rpx;
border-radius: 16rpx;
margin-top: -20rpx;
position: relative;
z-index: 1;
& + .section {
margin-top: 24rpx;
}
.section-title {
font-size: 32rpx;
font-weight: 600;
color: #1a202c;
margin-bottom: 24rpx;
padding-left: 16rpx;
border-left: 8rpx solid #0957DE;
}
}
.info-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 24rpx;
.info-item {
.label {
display: block;
font-size: 24rpx;
color: #718096;
}
.value {
display: block;
font-size: 28rpx;
color: #2d3748;
margin-top: 8rpx;
font-weight: 500;
}
}
}
.coverage-item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
.name { font-size: 28rpx; color: #2d3748; }
.amount { font-size: 32rpx; font-weight: 600; color: #1a202c; }
}
.divider {
height: 1rpx;
background: #e2e8f0;
margin: 24rpx 0;
}
.info-row {
display: flex;
justify-content: space-between;
margin-bottom: 12rpx;
font-size: 28rpx;
.label { color: #718096; }
.value {
color: #2d3748;
&.price { color: #e53e3e; font-weight: 600; }
}
}
.footer-actions {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 24rpx 32rpx;
background: #fff;
box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05);
display: flex;
z-index: 100;
}
</style>

View File

@@ -0,0 +1,337 @@
<route lang="json5">
{
style: {
navigationBarTitleText: '保单管理',
},
}
</route>
<template>
<view class="policy-list">
<!-- 搜索和筛选 -->
<view class="header-search">
<view class="action-buttons">
<view class="action-btn" @click="goToUnderwriting">
<text class="i-carbon-task icon"></text>
<text>待核保</text>
<view class="badge">3</view>
</view>
<view class="action-btn" @click="goToClaimReview">
<text class="i-carbon-review icon"></text>
<text>理赔审核</text>
<view class="badge warning">2</view>
</view>
</view>
<wd-search v-model="keyword" placeholder="搜索保单号/客户名" @search="onSearch" />
<view class="filter-tabs">
<view
v-for="tab in tabs"
:key="tab.value"
class="tab-item"
:class="{ active: currentTab === tab.value }"
@click="currentTab = tab.value"
>
{{ tab.label }}
</view>
</view>
</view>
<!-- 保单列表 -->
<view class="list-container">
<view
v-for="item in filteredList"
:key="item.id"
class="policy-card"
@click="goDetail(item.id)"
>
<view class="card-header">
<text class="policy-no">NO.{{ item.policyNo }}</text>
<text class="status-tag" :class="item.status">{{ item.statusText }}</text>
</view>
<view class="card-body">
<view class="info-row">
<text class="label">投保客户</text>
<text class="value">{{ item.customerName }}</text>
</view>
<view class="info-row">
<text class="label">贷款银行</text>
<text class="value">{{ item.bankName }}</text>
</view>
<view class="info-row">
<text class="label">保额/保费</text>
<text class="value price">
¥{{ item.amount.toLocaleString() }}
<text class="sub">/ ¥{{ item.premium.toLocaleString() }}</text>
</text>
</view>
<view class="info-row">
<text class="label">保险期限</text>
<text class="value">{{ item.startDate }} {{ item.endDate }}</text>
</view>
</view>
<view class="card-footer">
<text class="time">投保时间{{ item.createTime }}</text>
<wd-button size="small" plain @click.stop="handleRenew(item)">续保</wd-button>
</view>
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import { ref, computed } from 'vue'
const keyword = ref('')
const currentTab = ref('active')
const tabs = [
{ label: '生效中', value: 'active' },
{ label: '即将到期', value: 'expiring' },
{ label: '已失效', value: 'expired' },
]
const policyList = ref([
{
id: '1',
policyNo: 'P202601050001',
customerName: '张某某',
bankName: '某某商业银行',
amount: 500000,
premium: 2500,
startDate: '2026-01-01',
endDate: '2027-01-01',
createTime: '2026-01-01 10:00',
status: 'active',
statusText: '保障中',
},
{
id: '2',
policyNo: 'P202512150023',
customerName: '李某某',
bankName: '某某农村信用社',
amount: 300000,
premium: 1500,
startDate: '2025-12-15',
endDate: '2026-12-15',
createTime: '2025-12-15 14:30',
status: 'active',
statusText: '保障中',
},
{
id: '3',
policyNo: 'P202501010001',
customerName: '王某某',
bankName: '某某村镇银行',
amount: 200000,
premium: 1000,
startDate: '2025-01-01',
endDate: '2026-01-01',
createTime: '2025-01-01 09:00',
status: 'expiring',
statusText: '即将到期',
},
])
const filteredList = computed(() => {
let list = policyList.value
if (currentTab.value !== 'all') {
list = list.filter(item => item.status === currentTab.value)
}
if (keyword.value) {
list = list.filter(item =>
item.policyNo.includes(keyword.value) ||
item.customerName.includes(keyword.value)
)
}
return list
})
function onSearch() {
// Implement search logic
}
function goDetail(id: string) {
uni.navigateTo({ url: `/pagesInsurance/policy/detail?id=${id}` })
}
function handleRenew(item: any) {
uni.showToast({ title: '发起续保', icon: 'none' })
}
function goToUnderwriting() {
uni.navigateTo({ url: '/pagesInsurance/underwriting/list' })
}
function goToClaimReview() {
uni.navigateTo({ url: '/pagesInsurance/claim-review/list' })
}
</script>
<style lang="scss" scoped>
.policy-list {
min-height: 100vh;
background: #f5f7fa;
padding-bottom: 40rpx;
}
.header-search {
background: #fff;
padding: 24rpx 32rpx 0;
position: sticky;
top: 0;
z-index: 10;
.action-buttons {
display: flex;
gap: 20rpx;
margin-bottom: 24rpx;
.action-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
padding: 16rpx;
background: #f8f9fa;
border-radius: 12rpx;
position: relative;
font-size: 28rpx;
color: #333;
font-weight: 500;
.icon {
font-size: 32rpx;
color: #0957DE;
}
.badge {
position: absolute;
top: -6rpx;
right: -6rpx;
background: #fa4350;
color: #fff;
font-size: 20rpx;
padding: 2rpx 10rpx;
border-radius: 20rpx;
transform: scale(0.9);
&.warning {
background: #ff8f0d;
}
}
}
}
}
.filter-tabs {
display: flex;
margin-top: 20rpx;
border-bottom: 1rpx solid #e2e8f0;
.tab-item {
flex: 1;
text-align: center;
padding: 24rpx 0;
font-size: 28rpx;
color: #718096;
position: relative;
&.active {
color: #0957DE;
font-weight: 600;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40rpx;
height: 6rpx;
background: #0957DE;
border-radius: 3rpx;
}
}
}
}
.list-container {
padding: 24rpx 32rpx;
}
.policy-card {
background: #fff;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #f0f0f0;
.policy-no {
font-size: 28rpx;
color: #4a5568;
font-family: monospace;
}
.status-tag {
font-size: 24rpx;
padding: 4rpx 16rpx;
border-radius: 12rpx;
&.active { background: #e3f2fd; color: #0957DE; }
&.expiring { background: #fff3e0; color: #f57c00; }
&.expired { background: #f5f5f5; color: #9e9e9e; }
}
}
.card-body {
.info-row {
display: flex;
justify-content: space-between;
margin-bottom: 16rpx;
font-size: 28rpx;
.label { color: #718096; }
.value {
color: #2d3748;
font-weight: 500;
&.price {
color: #e53e3e;
font-weight: 700;
.sub {
font-size: 24rpx;
color: #718096;
font-weight: 400;
}
}
}
}
}
.card-footer {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 24rpx;
padding-top: 20rpx;
border-top: 1rpx solid #f0f0f0;
.time {
font-size: 24rpx;
color: #a0aec0;
}
}
}
</style>

View File

@@ -0,0 +1,405 @@
<script lang="ts" setup>
import type { InsuranceApplication } from '@/api/types/insurance'
import { getInsuranceApplicationDetail, reviewUnderwritingApplication } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '核保申请详情',
},
})
const applicationId = ref('')
const application = ref<InsuranceApplication | null>(null)
const loading = ref(false)
const reviewing = ref(false)
const rejectionReason = ref('')
// 状态映射
const statusMap: Record<string, { text: string, color: string }> = {
pending: { text: '待审核', color: '#F59E0B' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
const statusInfo = computed(() => {
if (!application.value)
return null
return statusMap[application.value.status] || { text: application.value.status, color: '#666' }
})
async function loadDetail() {
loading.value = true
try {
const res = await getInsuranceApplicationDetail(applicationId.value)
application.value = res
}
finally {
loading.value = false
}
}
// 核保通过
async function handleApprove() {
reviewing.value = true
try {
await reviewUnderwritingApplication(applicationId.value, {
approved: true,
})
uni.showToast({ title: '核保通过', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
finally {
reviewing.value = false
}
}
// 核保拒绝
async function handleReject() {
if (!rejectionReason.value) {
uni.showToast({ title: '请填写拒绝原因', icon: 'none' })
return
}
reviewing.value = true
try {
await reviewUnderwritingApplication(applicationId.value, {
approved: false,
rejectionReason: rejectionReason.value,
})
uni.showToast({ title: '已拒绝', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 1500)
}
finally {
reviewing.value = false
}
}
onLoad((options) => {
if (options?.id) {
applicationId.value = options.id
loadDetail()
}
})
</script>
<template>
<view class="underwriting-detail-page">
<view v-if="loading" class="loading-state">
加载中...
</view>
<template v-else-if="application">
<!-- 状态卡片 -->
<view class="status-card" :style="{ background: statusInfo?.color }">
<text class="status-text">{{ statusInfo?.text }}</text>
</view>
<!-- 银行信息 -->
<view class="section-card">
<view class="card-header">
银行信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">银行名称</text>
<text class="value">{{ application.bankName }}</text>
</view>
<view class="info-item">
<text class="label">贷款编号</text>
<text class="value">{{ application.loanId }}</text>
</view>
</view>
</view>
<!-- 保险公司信息 -->
<view class="section-card">
<view class="card-header">
保险公司信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险公司</text>
<text class="value">{{ application.companyName }}</text>
</view>
<view class="info-item">
<text class="label">保险产品</text>
<text class="value">{{ application.productName }}</text>
</view>
</view>
</view>
<!-- 客户信息 -->
<view class="section-card">
<view class="card-header">
客户信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">客户姓名</text>
<text class="value">{{ application.customerInfo.name }}</text>
</view>
<view class="info-item">
<text class="label">身份证号</text>
<text class="value">{{ application.customerInfo.idNumber }}</text>
</view>
<view class="info-item">
<text class="label">信用评分</text>
<text class="value score">{{ application.customerInfo.creditScore }}</text>
</view>
<view class="info-item">
<text class="label">贷款金额</text>
<text class="value">{{ application.customerInfo.loanAmount }}</text>
</view>
<view class="info-item">
<text class="label">贷款期限</text>
<text class="value">{{ application.customerInfo.loanTerm }}</text>
</view>
</view>
</view>
<!-- 保险信息 -->
<view class="section-card">
<view class="card-header">
保险信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">保险金额</text>
<text class="value amount">{{ application.insuranceAmount }}</text>
</view>
<view class="info-item">
<text class="label">保险期限</text>
<text class="value">{{ application.insuranceTerm }}</text>
</view>
<view class="info-item">
<text class="label">申请时间</text>
<text class="value">{{ application.createdAt }}</text>
</view>
</view>
</view>
<!-- 审核操作 -->
<view v-if="application.status === 'pending'" class="action-card">
<view class="card-header">
核保审核
</view>
<view class="action-buttons">
<button
class="btn approve"
:disabled="reviewing"
@click="handleApprove"
>
<text v-if="reviewing">处理中...</text>
<text v-else>通过</text>
</button>
<button
class="btn reject"
:disabled="reviewing"
@click="handleReject"
>
<text v-if="reviewing">处理中...</text>
<text v-else>拒绝</text>
</button>
</view>
<view v-if="!reviewing" class="reject-reason">
<textarea
v-model="rejectionReason"
class="textarea"
placeholder="请输入拒绝原因..."
:maxlength="500"
/>
<text class="char-count">{{ rejectionReason.length }}/500</text>
</view>
</view>
<!-- 已审核信息 -->
<view v-if="application.status !== 'pending'" class="section-card">
<view class="card-header">
审核信息
</view>
<view class="info-list">
<view class="info-item">
<text class="label">审核时间</text>
<text class="value">{{ application.reviewedAt }}</text>
</view>
<view class="info-item">
<text class="label">审核人员</text>
<text class="value">{{ application.reviewedBy }}</text>
</view>
<view v-if="application.rejectionReason" class="info-item full">
<text class="label">拒绝原因</text>
<text class="value reason">{{ application.rejectionReason }}</text>
</view>
</view>
</view>
</template>
</view>
</template>
<style lang="scss" scoped>
.underwriting-detail-page {
min-height: 100vh;
background: #f5f7fa;
padding: 20rpx;
padding-bottom: 120rpx;
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.status-card {
background: linear-gradient(135deg, #00c05a 0%, #34d19d 100%);
border-radius: 16rpx;
padding: 40rpx 30rpx;
color: #fff;
margin-bottom: 20rpx;
text-align: center;
.status-text {
font-size: 36rpx;
font-weight: bold;
display: block;
}
}
.section-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
}
}
.action-card {
background: #fff;
border-radius: 16rpx;
padding: 0 30rpx;
margin-bottom: 20rpx;
.card-header {
padding: 30rpx 0;
border-bottom: 1rpx solid #f5f5f5;
font-size: 28rpx;
font-weight: bold;
color: #333;
}
.action-buttons {
display: flex;
gap: 20rpx;
padding: 20rpx 0;
.btn {
flex: 1;
font-size: 28rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
&.approve {
background: #00c05a;
color: #fff;
}
&.reject {
background: #fa4350;
color: #fff;
}
&:disabled {
opacity: 0.6;
}
}
}
.reject-reason {
padding: 0 0 20rpx 0;
.textarea {
width: 100%;
min-height: 150rpx;
padding: 16rpx;
background: #f8f9fa;
border-radius: 8rpx;
font-size: 26rpx;
color: #333;
line-height: 1.5;
}
.char-count {
font-size: 22rpx;
color: #999;
text-align: right;
margin-top: 8rpx;
display: block;
}
}
}
.info-list {
padding: 20rpx 0;
.info-item {
display: flex;
justify-content: space-between;
padding: 16rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f9f9f9;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
&.score {
color: #00c05a;
font-weight: 600;
}
&.amount {
color: #ff8f0d;
font-weight: 600;
}
&.reason {
color: #fa4350;
text-align: left;
line-height: 1.5;
}
}
&.full {
flex-direction: column;
align-items: flex-start;
.value {
margin-top: 8rpx;
width: 100%;
}
}
}
}
</style>

View File

@@ -0,0 +1,321 @@
<script lang="ts" setup>
import type { InsuranceApplication } from '@/api/types/insurance'
import { getUnderwritingApplications } from '@/api/insurance'
definePage({
style: {
navigationBarTitleText: '待核保申请',
},
})
const loading = ref(false)
const applications = ref<InsuranceApplication[]>([])
const currentTab = ref('pending')
// 状态映射
const statusMap: Record<string, { text: string, color: string }> = {
pending: { text: '待审核', color: '#F59E0B' },
approved: { text: '已通过', color: '#00c05a' },
rejected: { text: '已拒绝', color: '#fa4350' },
}
const tabs = [
{ key: 'pending', label: '待审核' },
{ key: 'approved', label: '已通过' },
{ key: 'rejected', label: '已拒绝' },
]
// 筛选后的列表
const filteredApplications = computed(() => {
if (currentTab.value === 'pending') {
return applications.value.filter(a => a.status === 'pending')
}
return applications.value.filter(a => a.status === currentTab.value)
})
// 切换标签
function handleTabChange(tab: string) {
currentTab.value = tab
}
// 查看详情
function handleViewDetail(id: string) {
uni.navigateTo({
url: `/pagesInsurance/underwriting/detail?id=${id}`,
})
}
// 加载列表
async function loadList() {
loading.value = true
try {
const res = await getUnderwritingApplications()
applications.value = res.list
}
finally {
loading.value = false
}
}
onShow(() => {
loadList()
})
</script>
<template>
<view class="underwriting-list-page">
<!-- 标签页 -->
<view class="tabs">
<view
v-for="tab in tabs"
:key="tab.key"
class="tab-item"
:class="{ active: currentTab === tab.key }"
@click="handleTabChange(tab.key)"
>
<text class="tab-text">{{ tab.label }}</text>
<view v-if="currentTab === tab.key" class="tab-indicator" />
</view>
</view>
<!-- 列表 -->
<view v-if="loading" class="loading-state">
加载中...
</view>
<view v-else-if="filteredApplications.length > 0" class="application-list">
<view
v-for="app in filteredApplications"
:key="app.id"
class="application-item"
@click="handleViewDetail(app.id)"
>
<view class="app-header">
<view class="app-info">
<text class="app-id">投保申请号: {{ app.id }}</text>
<text class="bank-name">{{ app.bankName }}</text>
</view>
<view
class="status-tag"
:style="{ background: statusMap[app.status]?.color }"
>
{{ statusMap[app.status]?.text }}
</view>
</view>
<view class="app-body">
<view class="app-row">
<text class="label">保险公司</text>
<text class="value">{{ app.companyName }}</text>
</view>
<view class="app-row">
<text class="label">保险产品</text>
<text class="value">{{ app.productName }}</text>
</view>
<view class="app-row">
<text class="label">保险金额</text>
<text class="value amount">{{ app.insuranceAmount }}</text>
</view>
<view class="app-row">
<text class="label">保险期限</text>
<text class="value">{{ app.insuranceTerm }}</text>
</view>
<view class="app-row">
<text class="label">客户姓名</text>
<text class="value">{{ app.customerInfo.name }}</text>
</view>
<view class="app-row">
<text class="label">信用评分</text>
<text class="value score">{{ app.customerInfo.creditScore }}</text>
</view>
<view class="app-row">
<text class="label">贷款金额</text>
<text class="value">{{ app.customerInfo.loanAmount }}</text>
</view>
<view class="app-row">
<text class="label">申请时间</text>
<text class="value">{{ app.createdAt }}</text>
</view>
</view>
<view class="app-footer">
<text class="arrow-icon i-carbon-chevron-right" />
</view>
</view>
</view>
<!-- 空状态 -->
<view v-else class="empty-state">
<text class="empty-icon i-carbon-document" />
<text class="empty-text">暂无投保申请</text>
</view>
</view>
</template>
<style lang="scss" scoped>
.underwriting-list-page {
min-height: 100vh;
background: #f5f7fa;
}
.tabs {
background: #fff;
display: flex;
padding: 0 30rpx;
border-bottom: 1rpx solid #f5f5f5;
.tab-item {
flex: 1;
position: relative;
padding: 30rpx 0;
text-align: center;
font-size: 28rpx;
color: #666;
&.active {
color: #00c05a;
font-weight: 600;
}
.tab-text {
position: relative;
z-index: 1;
}
.tab-indicator {
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60rpx;
height: 4rpx;
background: #00c05a;
border-radius: 2rpx;
}
}
}
.loading-state {
display: flex;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
}
.application-list {
padding: 20rpx;
.application-item {
background: #fff;
border-radius: 16rpx;
padding: 24rpx;
margin-bottom: 16rpx;
&:last-child {
margin-bottom: 0;
}
.app-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.app-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.app-id {
font-size: 28rpx;
font-weight: 600;
color: #333;
}
.bank-name {
font-size: 24rpx;
color: #666;
}
}
.status-tag {
padding: 8rpx 20rpx;
border-radius: 8rpx;
font-size: 24rpx;
color: #fff;
}
}
.app-body {
background: #f8f9fa;
border-radius: 12rpx;
padding: 20rpx;
margin-bottom: 16rpx;
.app-row {
display: flex;
justify-content: space-between;
padding: 12rpx 0;
font-size: 26rpx;
border-bottom: 1rpx solid #f5f5f5;
&:last-child {
border-bottom: none;
}
.label {
color: #666;
}
.value {
color: #333;
text-align: right;
flex: 1;
&.amount {
color: #ff8f0d;
font-weight: 600;
}
&.score {
color: #00c05a;
font-weight: 600;
}
}
}
}
.app-footer {
display: flex;
justify-content: flex-end;
padding-top: 12rpx;
.arrow-icon {
font-size: 28rpx;
color: #ccc;
}
}
}
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 100rpx 0;
color: #999;
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
color: #ccc;
}
.empty-text {
font-size: 26rpx;
}
}
</style>

View File

@@ -29,7 +29,7 @@ const quickActions = [
{ icon: 'i-carbon-add-alt', label: '新增商品', path: '/pagesMerchant/goods/edit' },
{ icon: 'i-carbon-wallet', label: '财务中心', path: '/pagesMerchant/finance/index' },
{ icon: 'i-carbon-settings', label: '店铺设置', path: '/pagesMerchant/me/shop' },
{ icon: 'i-carbon-document', label: '贷款辅助', path: '/pagesMerchant/loan/assist' },
{ icon: 'i-carbon-document', label: '辅助贷款', path: '/pagesMerchant/loan/assist' },
]
// 加载数据

View File

@@ -3,7 +3,7 @@ import { getMerchantPendingAssistList, submitAssistMaterial } from '@/api/loan'
definePage({
style: {
navigationBarTitleText: '贷款辅助材料',
navigationBarTitleText: '辅助贷款材料',
},
})
@@ -14,8 +14,29 @@ interface LoanItem {
applyTime: string
isExpanded: boolean
materials: { type: string, url: string, name: string }[]
status?: string
// 申请进度及负责人信息
progress?: {
step: string
handlerName: string
handlerPhone: string
time: string
completed: boolean
}[]
}
// 状态筛选 Tab
const statusTabs = [
{ label: '全部', value: '' },
{ label: '已受理', value: 'accepted' },
{ label: '调查中', value: 'investigating' },
{ label: '待审批', value: 'reported' },
{ label: '已通过', value: 'approved' },
{ label: '已拒绝', value: 'rejected' },
{ label: '驳回要求补充', value: 'pending_supplement' },
]
const activeTab = ref('')
const list = ref<LoanItem[]>([])
const loading = ref(false)
@@ -28,11 +49,20 @@ async function loadData() {
isExpanded: false,
materials: []
}))
// 根据选中的状态筛选
if (activeTab.value) {
list.value = list.value.filter(item => item.status === activeTab.value)
}
} finally {
loading.value = false
}
}
function handleTabChange(value: string) {
activeTab.value = value
loadData()
}
function handleExpand(item: LoanItem) {
item.isExpanded = !item.isExpanded
}
@@ -55,6 +85,13 @@ function removeMaterial(item: LoanItem, index: number) {
item.materials.splice(index, 1)
}
// 拨打负责人电话
function handleCallPhone(phone: string) {
uni.makePhoneCall({
phoneNumber: phone
})
}
async function handleSubmit(item: LoanItem) {
if (item.materials.length === 0) {
uni.showToast({ title: '请至少上传一项材料', icon: 'none' })
@@ -80,6 +117,23 @@ onMounted(() => {
<template>
<view class="assist-page">
<!-- 状态筛选 Tab -->
<view class="tabs-container">
<scroll-view scroll-x class="tabs-scroll">
<view class="tabs">
<view
v-for="tab in statusTabs"
:key="tab.value"
class="tab-item"
:class="{ active: activeTab === tab.value }"
@click="handleTabChange(tab.value)"
>
{{ tab.label }}
</view>
</view>
</scroll-view>
</view>
<view v-if="loading && list.length === 0" class="loading">加载中...</view>
<view v-else-if="list.length === 0" class="empty">
@@ -100,6 +154,41 @@ onMounted(() => {
</view>
</view>
<!-- 申请进度及负责人信息 -->
<view v-if="item.progress && item.progress.length" class="progress-section">
<view class="progress-header">
<text class="i-carbon-time progress-icon"></text>
<text class="progress-title">申请进度</text>
</view>
<view class="progress-list">
<view
v-for="(p, idx) in item.progress"
:key="idx"
class="progress-item"
:class="{ completed: p.completed, current: !p.completed && idx > 0 && item.progress[idx - 1].completed }"
>
<view class="progress-dot">
<text v-if="p.completed" class="i-carbon-checkmark"></text>
<text v-else class="dot"></text>
</view>
<view class="progress-content">
<view class="progress-main">
<text class="progress-step">{{ p.step }}</text>
<text v-if="p.time" class="progress-time">{{ p.time }}</text>
</view>
<view class="progress-handler" v-if="p.completed">
<text class="handler-label">负责人</text>
<text class="handler-name">{{ p.handlerName }}</text>
<view class="handler-phone-wrapper" @click="handleCallPhone(p.handlerPhone)">
<text class="i-carbon-phone phone-icon"></text>
<text class="handler-phone">{{ p.handlerPhone }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="action-area" v-if="!item.isExpanded">
<button class="btn primary" @click="handleExpand(item)">提供材料</button>
</view>
@@ -186,6 +275,197 @@ onMounted(() => {
}
}
.tabs-container {
background: #fff;
padding: 20rpx 0;
border-bottom: 1rpx solid #f5f5f5;
position: sticky;
top: 0;
z-index: 100;
.tabs-scroll {
white-space: nowrap;
}
.tabs {
display: inline-flex;
padding: 0 20rpx;
gap: 30rpx;
.tab-item {
font-size: 28rpx;
color: #666;
position: relative;
padding: 10rpx 0;
flex-shrink: 0;
&.active {
color: #00c05a;
font-weight: 600;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 40rpx;
height: 4rpx;
background: #00c05a;
border-radius: 2rpx;
}
}
}
}
}
.progress-section {
background: #f8f9fa;
border-radius: 12rpx;
padding: 20rpx;
margin-top: 20rpx;
.progress-header {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 16rpx;
.progress-icon {
font-size: 28rpx;
color: #00c05a;
}
.progress-title {
font-size: 26rpx;
font-weight: 600;
color: #333;
}
}
.progress-list {
.progress-item {
display: flex;
gap: 16rpx;
padding-bottom: 20rpx;
position: relative;
&:last-child {
padding-bottom: 0;
}
&:not(:last-child)::after {
content: '';
position: absolute;
left: 11rpx;
top: 32rpx;
bottom: 0;
width: 2rpx;
background: #e5e5e5;
}
.progress-dot {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
background: #e5e5e5;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
color: #fff;
font-size: 16rpx;
z-index: 1;
}
.progress-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 8rpx;
.progress-main {
display: flex;
justify-content: space-between;
align-items: center;
.progress-step {
font-size: 26rpx;
color: #666;
}
.progress-time {
font-size: 22rpx;
color: #999;
}
}
.progress-handler {
display: flex;
align-items: center;
gap: 8rpx;
flex-wrap: wrap;
.handler-label {
font-size: 22rpx;
color: #999;
}
.handler-name {
font-size: 24rpx;
color: #333;
font-weight: 500;
}
.handler-phone-wrapper {
display: flex;
align-items: center;
gap: 4rpx;
padding: 4rpx 12rpx;
background: #e6f7eb;
border-radius: 12rpx;
.phone-icon {
font-size: 20rpx;
color: #00c05a;
}
.handler-phone {
font-size: 22rpx;
color: #00c05a;
}
}
}
}
&.completed {
.progress-dot {
background: #00c05a;
}
.progress-step {
color: #00c05a;
}
&:not(:last-child)::after {
background: #00c05a;
}
}
&.current {
.progress-dot {
background: #3B82F6;
}
.progress-step {
color: #3B82F6;
font-weight: 600;
}
}
}
}
}
.action-area {
border-top: 1rpx solid #f5f5f5;
padding-top: 20rpx;

View File

@@ -1,82 +1,26 @@
/**
* 商户端商品数据 Mock
* 使用用户端商品信息mockGoodsList
*/
import type { MerchantGoods } from '@/typings/merchant'
import { GoodsStatus } from '@/typings/merchant'
import { mockGoodsList } from '@/mock/goods'
export const mockMerchantGoods: MerchantGoods[] = [
{
id: '1',
name: '苹果 iPhone 15 Pro',
categoryId: '1',
categoryName: '手机',
brand: 'Apple',
price: 8999.00,
costPrice: 7500.00,
stock: 50,
sales: 128,
status: GoodsStatus.ON,
images: ['/static/goods/iphone15.jpg'],
description: '全新 iPhone 15 Pro搭载 A17 Pro 芯片',
specs: [
{ name: '颜色', values: ['黑色', '白色', '蓝色'] },
{ name: '存储', values: ['128GB', '256GB', '512GB'] },
],
skuList: [
{ id: 'sku1', specs: { '颜色': '黑色', '存储': '128GB' }, price: 7999, stock: 20, image: '' },
{ id: 'sku2', specs: { '颜色': '黑色', '存储': '256GB' }, price: 8999, stock: 15, image: '' },
{ id: 'sku3', specs: { '颜色': '白色', '存储': '128GB' }, price: 7999, stock: 10, image: '' },
{ id: 'sku4', specs: { '颜色': '白色', '存储': '256GB' }, price: 8999, stock: 5, image: '' },
],
export const mockMerchantGoods: MerchantGoods[] = mockGoodsList.map(goods => ({
id: goods.id,
name: goods.name,
categoryId: goods.categoryId,
categoryName: goods.categoryName,
brand: '',
price: goods.price,
costPrice: Math.round(goods.price * 0.7), // 成本价为售价的70%
stock: goods.stock,
sales: goods.sales,
status: goods.stock > 0 ? GoodsStatus.ON : GoodsStatus.OFF,
images: goods.images,
description: goods.description,
specs: goods.specs,
skuList: [], // 简化处理,不使用多规格
createTime: '2024-12-01 10:00:00',
updateTime: '2024-12-17 10:00:00',
},
{
id: '2',
name: '华为 Mate 60 Pro',
categoryId: '1',
categoryName: '手机',
brand: 'HUAWEI',
price: 6999.00,
costPrice: 5800.00,
stock: 30,
sales: 86,
status: GoodsStatus.ON,
images: ['/static/goods/mate60.jpg'],
description: '华为 Mate 60 Pro搭载麒麟 9000S 芯片',
createTime: '2024-12-02 10:00:00',
updateTime: '2024-12-17 10:00:00',
},
{
id: '3',
name: '小米 14 Ultra',
categoryId: '1',
categoryName: '手机',
brand: 'Xiaomi',
price: 5999.00,
costPrice: 4800.00,
stock: 0,
sales: 56,
status: GoodsStatus.SOLD_OUT,
images: ['/static/goods/mi14.jpg'],
description: '小米 14 Ultra徕卡影像旗舰',
createTime: '2024-12-03 10:00:00',
updateTime: '2024-12-17 10:00:00',
},
{
id: '4',
name: 'AirPods Pro 2',
categoryId: '2',
categoryName: '耳机',
brand: 'Apple',
price: 1899.00,
costPrice: 1500.00,
stock: 100,
sales: 256,
status: GoodsStatus.ON,
images: ['/static/goods/airpods.jpg'],
description: 'AirPods Pro 第二代,主动降噪',
createTime: '2024-12-04 10:00:00',
updateTime: '2024-12-17 10:00:00',
},
]
}))

View File

@@ -1,8 +1,10 @@
/**
* 商户端订单数据 Mock
* 使用用户端商品信息mockGoodsList
*/
import type { MerchantOrder } from '@/typings/merchant'
import { OrderStatus } from '@/typings/merchant'
import { mockGoodsList } from '@/mock/goods'
export const mockMerchantOrders: MerchantOrder[] = [
{
@@ -11,20 +13,20 @@ export const mockMerchantOrders: MerchantOrder[] = [
customerName: '张三',
customerPhone: '138****8000',
status: OrderStatus.PENDING,
amount: 2999.00,
amount: 20.00,
freight: 0,
payAmount: 2999.00,
payAmount: 20.00,
remark: '请尽快发货',
goods: [
{
id: 'g1',
goodsId: '101',
name: '苹果 iPhone 15 Pro 256GB',
image: '/static/goods/iphone15.jpg',
skuName: '黑色 256GB',
price: 2999.00,
goodsId: 'goods_001',
name: '桂味新鲜荔枝现摘现发当季水果自家果园荔枝',
image: '/static/product/1/1.jpg',
skuName: '5斤装 特级',
price: 20.00,
quantity: 1,
amount: 2999.00,
amount: 20.00,
},
],
address: {
@@ -44,19 +46,19 @@ export const mockMerchantOrders: MerchantOrder[] = [
customerName: '李四',
customerPhone: '139****9000',
status: OrderStatus.SHIPPING,
amount: 1580.00,
amount: 100.00,
freight: 10,
payAmount: 1590.00,
payAmount: 110.00,
goods: [
{
id: 'g2',
goodsId: '102',
name: '华为 Mate 60 Pro',
image: '/static/goods/mate60.jpg',
skuName: '白色 512GB',
price: 1580.00,
quantity: 1,
amount: 1580.00,
goodsId: 'goods_002',
name: '老农田桂圆肉干无核新货8a龙眼肉干500g厚元肉干',
image: '/static/product/2/1.jpg',
skuName: '500g',
price: 50.00,
quantity: 2,
amount: 100.00,
},
],
address: {
@@ -76,19 +78,19 @@ export const mockMerchantOrders: MerchantOrder[] = [
customerName: '王五',
customerPhone: '137****7000',
status: OrderStatus.SHIPPED,
amount: 456.50,
amount: 150.00,
freight: 0,
payAmount: 456.50,
payAmount: 150.00,
goods: [
{
id: 'g3',
goodsId: '103',
name: '小米 14 Ultra',
image: '/static/goods/mi14.jpg',
skuName: '黑色 256GB',
price: 456.50,
quantity: 1,
amount: 456.50,
goodsId: 'goods_003',
name: '自然禾方化橘红陈皮无糖植物饮料350ml*9瓶整箱装',
image: '/static/product/3/1.jpg',
skuName: '9瓶装',
price: 50.00,
quantity: 3,
amount: 150.00,
},
],
address: {
@@ -119,19 +121,19 @@ export const mockMerchantOrders: MerchantOrder[] = [
customerName: '赵六',
customerPhone: '136****6000',
status: OrderStatus.COMPLETED,
amount: 888.00,
amount: 30.00,
freight: 0,
payAmount: 888.00,
payAmount: 30.00,
goods: [
{
id: 'g4',
goodsId: '104',
name: 'AirPods Pro 2',
image: '/static/goods/airpods.jpg',
skuName: '默认',
price: 888.00,
goodsId: 'goods_005',
name: '罗非鱼新鲜冷冻食材烧烤红烧净膛烤鱼酒店食堂快',
image: '/static/product/5/1.jpg',
skuName: '500g',
price: 30.00,
quantity: 1,
amount: 888.00,
amount: 30.00,
},
],
address: {

BIN
src/static/fb/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
src/static/fb/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
src/static/tc/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
src/static/tc/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

BIN
src/static/tc/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

BIN
src/static/tc/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@@ -1,7 +1,8 @@
import { defineStore } from 'pinia'
import type { User } from '@/typings/mall'
import { defineStore } from 'pinia'
import { mockMember } from '@/mock/member'
// i-carbon-building
// i-carbon-logo-angular
/**
* 客户端类型枚举
* - user: 用户端(消费者)
@@ -12,6 +13,8 @@ export enum ClientType {
USER = 'user',
MERCHANT = 'merchant',
BANK = 'bank',
GOVERNMENT = 'government',
INSURANCE = 'insurance',
}
/** 客户端类型配置 */
@@ -32,11 +35,25 @@ export const CLIENT_TYPE_CONFIG = {
},
[ClientType.BANK]: {
label: '银行端',
icon: 'i-carbon-bank',
icon: 'i-carbon-home',
color: '#00c05a',
description: '账款审核、金融服务',
homePage: '/pagesBank/dashboard/index',
},
[ClientType.GOVERNMENT]: {
label: '政务端',
icon: 'i-carbon-building',
color: '#d53f8c',
description: '合规监管、风险预警',
homePage: '/pagesGovernment/dashboard/index',
},
[ClientType.INSURANCE]: {
label: '保险端',
icon: 'i-carbon-logo-angular',
color: '#3182ce',
description: '保单管理、理赔服务',
homePage: '/pagesInsurance/dashboard/index',
},
}
export const useUserStore = defineStore('user', {
@@ -100,4 +117,3 @@ export const useUserStore = defineStore('user', {
},
},
})

View File

@@ -123,13 +123,71 @@ export const bankTabbarList: CustomTabBarItem[] = [
},
]
// ==================== 政务端 Tabbar 配置 ====================
export const governmentTabbarList: CustomTabBarItem[] = [
{
text: '工作台',
pagePath: 'pagesGovernment/dashboard/index',
iconType: 'unocss',
icon: 'i-carbon-dashboard',
},
{
pagePath: 'pagesGovernment/supervise/list',
text: '检查',
iconType: 'unocss',
icon: 'i-carbon-task',
},
{
pagePath: 'pagesGovernment/report/list',
text: '报表',
iconType: 'unocss',
icon: 'i-carbon-document',
},
{
pagePath: 'pagesGovernment/me/index',
text: '我的',
iconType: 'unocss',
icon: 'i-carbon-user',
},
]
// ==================== 保险端 Tabbar 配置 ====================
export const insuranceTabbarList: CustomTabBarItem[] = [
{
text: '工作台',
pagePath: 'pagesInsurance/dashboard/index',
iconType: 'unocss',
icon: 'i-carbon-dashboard',
},
{
pagePath: 'pagesInsurance/policy/list',
text: '保单',
iconType: 'unocss',
icon: 'i-carbon-document-protected',
},
{
pagePath: 'pagesInsurance/claim/list',
text: '理赔',
iconType: 'unocss',
icon: 'i-carbon-request-quote',
},
{
pagePath: 'pagesInsurance/me/index',
text: '我的',
iconType: 'unocss',
icon: 'i-carbon-user',
},
]
// 根据客户端类型获取对应的 tabbar 配置
export type ClientTypeKey = 'user' | 'merchant' | 'bank'
export type ClientTypeKey = 'user' | 'merchant' | 'bank' | 'government' | 'insurance'
export function getTabbarListByClientType(clientType: ClientTypeKey): CustomTabBarItem[] {
const tabbarMap: Record<ClientTypeKey, CustomTabBarItem[]> = {
user: userTabbarList,
merchant: merchantTabbarList,
bank: bankTabbarList,
government: governmentTabbarList,
insurance: insuranceTabbarList,
}
return tabbarMap[clientType] || userTabbarList
}

View File

@@ -2,6 +2,36 @@
* 贷款相关类型定义
*/
/** 征信信息 */
export interface CreditInfo {
creditScore: number // 征信分数
creditLevel: string // 信用等级
loanRecords: { // 贷款记录
bank: string
amount: number
status: 'normal' | 'overdue' | 'paid'
date: string
}[]
overdueRecords?: { // 逾期记录
amount: number
overdueDays: number
date: string
}[]
queryTime: string // 查询时间
}
/** 信用评估分数 */
export interface CreditAssessment {
score: number // 评估分数 (0-100)
level: string // 评估等级 (优秀/良好/一般/较差)
factors: { // 评估因素
name: string
score: number
description: string
}[]
updateTime: string // 更新时间
}
/** 贷款申请状态 */
export enum LoanStatus {
DRAFT = 'draft', // 草稿
@@ -57,6 +87,17 @@ export interface BankProcessRecord {
attachments?: string[] // 附件,如调查报告
}
/** 用户订单信息 */
export interface UserOrder {
orderNo: string // 订单号
goodsName: string // 商品名称
goodsImage: string // 商品图片
quantity: number // 购买数量
amount: number // 订单金额
orderTime: string // 下单时间
status: string // 订单状态
}
/** 贷款申请详情 */
export interface LoanApplication {
id: string
@@ -67,11 +108,18 @@ export interface LoanApplication {
// 关联的商家列表
relatedMerchants: RelatedMerchant[]
// 用户商城消费订单
userOrders?: UserOrder[] // 用户在商城的消费订单
// 申请信息
amount: number // 申请金额(万)
term: number // 期限(月/年)
status: LoanStatus
// 银行受理人信息
handlerName?: string // 受理人姓名
handlerPhone?: string // 受理人手机号
// 个人信息
personalInfo: {
name: string

View File

@@ -251,4 +251,7 @@ export interface LoanApplicationRecord {
progress?: LoanApplicationProgress // 进度条数据 (仅Processing和Pending状态需要)
alertInfo?: LoanApplicationAlertInfo // 提示信息框 (可空)
actions: LoanApplicationAction[] // 底部按钮配置
// 银行受理人信息
handlerName?: string // 受理人姓名
handlerPhone?: string // 受理人手机号
}

View File

@@ -73,17 +73,68 @@ export default defineConfig({
// 动态图标需要在这里配置
safelist: [
// 基础图标
'i-carbon-code', 'i-carbon-home', 'i-carbon-user', 'i-carbon-shopping-cart', 'i-carbon-view-mode-2', 'i-carbon-webhook',
'i-carbon-restaurant', 'i-carbon-crop', 'i-carbon-ibm-deployable-architecture',
'i-carbon-edge-device', 'i-carbon-ibm-cloud-direct-link-1-dedicated-hosting', 'i-carbon-face-satisfied', 'i-carbon-document-attachment',
'i-carbon-code',
'i-carbon-home',
'i-carbon-user',
'i-carbon-shopping-cart',
'i-carbon-view-mode-2',
'i-carbon-webhook',
'i-carbon-restaurant',
'i-carbon-crop',
'i-carbon-ibm-deployable-architecture',
'i-carbon-edge-device',
'i-carbon-ibm-cloud-direct-link-1-dedicated-hosting',
'i-carbon-face-satisfied',
'i-carbon-document-attachment',
// 商家端/银行端 tabbar 图标
'i-carbon-dashboard', 'i-carbon-document', 'i-carbon-product', 'i-carbon-wallet',
'i-carbon-analytics', 'i-carbon-task-approved', 'i-carbon-group', 'i-carbon-report',
'i-carbon-dashboard',
'i-carbon-document',
'i-carbon-product',
'i-carbon-wallet',
'i-carbon-analytics',
'i-carbon-task-approved',
'i-carbon-group',
'i-carbon-report',
// 登录页端类型选择图标
'i-carbon-store', 'i-carbon-bank', 'i-carbon-checkmark-filled',
'i-carbon-store',
'i-carbon-bank',
'i-carbon-building',
'i-carbon-logo-angular',
'i-carbon-checkmark-filled',
// 其他图标
'i-carbon-crown',
'i-carbon-user-avatar-filled-blank',
// 银行端图标
'i-carbon-search',
'i-carbon-calendar',
'i-carbon-location-filled',
'i-carbon-tag',
'i-carbon-trash-can',
'i-carbon-close',
'i-carbon-camera',
'i-carbon-document-download',
'i-carbon-checkmark-outline',
'i-carbon-user-activity',
'i-carbon-circle-dash',
'i-carbon-phone-filled',
'i-carbon-list',
'i-carbon-calendar-add',
'i-carbon-locked',
'i-carbon-unlocked',
'i-carbon-document-blank',
'i-carbon-checkmark',
'i-carbon-reset',
'i-carbon-warning',
'i-carbon-time',
// 菜单图标
'i-carbon-settings', 'i-carbon-customer-service', 'i-carbon-help', 'i-carbon-information',
'i-carbon-add', 'i-carbon-add-alt', 'i-carbon-document-add', 'i-carbon-chevron-right',
'i-carbon-settings',
'i-carbon-customer-service',
'i-carbon-help',
'i-carbon-information',
'i-carbon-add',
'i-carbon-add-alt',
'i-carbon-document-add',
'i-carbon-chevron-right',
],
rules: [
[