hookehuyr

feat(plan): 完善计划书 API 接口定义

- 修复 list.md 的 OpenAPI 文档格式问题(重复内容、YAML 结构错误)
- 新增 delete.md 和 view.md API 规范文档
- 重新生成 plan.js,补充完整的 4 个接口(add, delete, view, list)
- 为 deleteAPI 和 viewAPI 添加参数说明(params.i)
- 为 listAPI 添加详细的参数说明(status, keyword, limit, page)
- 优化 JSDoc 类型注释(integer → number)
- 添加完整的返回值类型定义

影响文件:
- docs/api-specs/plan/list.md (格式修复)
- docs/api-specs/plan/delete.md (新增)
- docs/api-specs/plan/view.md (新增)
- src/api/plan.js (接口补充)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
# 删除计划书
## OpenAPI Specification
```yaml
openapi: 3.0.1
info:
title: ''
version: 1.0.0
paths:
/srv/:
post:
summary: 删除计划书
deprecated: false
description: ''
tags:
- 计划书
parameters:
- name: f
in: query
description: ''
required: false
example: manulife
schema:
type: string
- name: a
in: query
description: ''
required: false
example: proposal
schema:
type: string
- name: t
in: query
description: ''
required: false
example: delete
schema:
type: string
- name: i
in: query
description: 计划书id
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
code:
type: integer
msg:
type: string
required:
- code
- msg
x-apifox-orders:
- code
- msg
example:
code: 1
msg: 订单删除成功
headers: {}
x-apifox-name: 成功
x-apifox-ordering: 0
security: []
x-apifox-folder: 计划书
x-apifox-status: developing
x-run-in-apifox: https://app.apifox.com/web/project/7792797/apis/api-417901038-run
components:
schemas: {}
responses: {}
securitySchemes: {}
servers:
- url: https://manulife.onwall.cn
description: 正式环境
security: []
```
......@@ -5,7 +5,7 @@
```yaml
openapi: 3.0.1
info:
title: ''
title: 计划书列表
version: 1.0.0
paths:
/srv/:
......@@ -37,6 +37,32 @@ paths:
example: list
schema:
type: string
- name: status
in: query
description: '3:待处理,5:处理中,7:已生成,9:已查看'
required: false
schema:
type: string
- name: keyword
in: query
description: ''
required: false
schema:
type: string
- name: limit
in: query
description: ''
required: false
example: '10'
schema:
type: string
- name: page
in: query
description: ''
required: false
example: '0'
schema:
type: string
responses:
'200':
description: ''
......@@ -167,6 +193,4 @@ components:
servers:
- url: https://manulife.onwall.cn
description: 正式环境
security: []
```
......
# 查看计划书
## OpenAPI Specification
```yaml
openapi: 3.0.1
info:
title: ''
version: 1.0.0
paths:
/srv/:
post:
summary: 查看计划书
deprecated: false
description: ''
tags:
- 计划书
parameters:
- name: f
in: query
description: ''
required: false
example: manulife
schema:
type: string
- name: a
in: query
description: ''
required: false
example: proposal
schema:
type: string
- name: t
in: query
description: ''
required: false
example: view
schema:
type: string
- name: i
in: query
description: 计划书id
required: false
example: '2769908'
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
properties:
code:
type: integer
msg:
type: string
required:
- code
- msg
x-apifox-orders:
- code
- msg
example:
code: 1
msg: 订单状态已更新为已查看
headers: {}
x-apifox-name: 成功
x-apifox-ordering: 0
security: []
x-apifox-folder: 计划书
x-apifox-status: developing
x-run-in-apifox: https://app.apifox.com/web/project/7792797/apis/api-417872149-run
components:
schemas: {}
responses: {}
securitySchemes: {}
servers:
- url: https://manulife.onwall.cn
description: 正式环境
security: []
```
......@@ -2,62 +2,88 @@ import { fn, fetch } from '@/api/fn';
const Api = {
Add: '/srv/?a=proposal&t=add',
Delete: '/srv/?a=proposal&t=delete',
View: '/srv/?a=proposal&t=view',
List: '/srv/?a=proposal&t=list',
}
};
/**
* @description 新增计划书
* @remark
* @param {Object} params 请求参数
* @param {string} params.customer_name 申请人
* @param {string} params.customer_gender 性别
* @param {integer} params.customer_age 年龄
* @param {number} params.customer_age 年龄
* @param {string} params.customer_birthday 出生年月日
* @param {integer} params.annual_premium 保额
* @param {string} params.payment_years 繳費年期
* @param {number} params.annual_premium 保额
* @param {string} params.payment_years 缴费年期
* @param {string} params.currency_type 币种
* @param {string} params.allow_reduce_amount 是否容许减少名义金额
* @param {string} params.withdrawal_option 提取选项
* @param {integer} params.withdrawal_start_age 提取开始年龄
* @param {integer} params.withdrawal_period 提取期(年)
* @param {number} params.withdrawal_start_age 提取开始年龄
* @param {number} params.withdrawal_period 提取期(年)
* @param {string} params.smoking_status 是否吸烟
* @param {integer} params.total_premium 总保费金额
* @param {integer} params.product_id 产品id
* @param {number} params.total_premium 总保费金额
* @param {number} params.product_id 产品id
* @returns {Promise<{
* code: number; // 状态码
* msg: string; // 消息
* data: {
order_id: string; //
* order_id: string; // 订单ID
* };
* }>}
*/
export const addAPI = (params) => fn(fetch.post(Api.Add, params));
/**
* @description 删除计划书
* @param {Object} params 请求参数
* @param {string} params.i 计划书id
* @returns {Promise<{
* code: number; // 状态码
* msg: string; // 消息
* }>}
*/
export const deleteAPI = (params) => fn(fetch.post(Api.Delete, params));
/**
* @description 查看计划书
* @param {Object} params 请求参数
* @param {string} params.i 计划书id
* @returns {Promise<{
* code: number; // 状态码
* msg: string; // 消息
* }>}
*/
export const viewAPI = (params) => fn(fetch.post(Api.View, params));
/**
* @description 计划书列表
* @remark
* @param {Object} params 请求参数
* @param {string} [params.status] 状态筛选(3:待处理,5:处理中,7:已生成,9:已查看)
* @param {string} [params.keyword] 搜索关键词
* @param {string} [params.limit] 每页数量(默认10)
* @param {string} [params.page] 页码(默认0)
* @returns {Promise<{
* code: number; // 状态码
* msg: string; // 消息
* data: {
list: Array<{
id: integer; //
customer_name: string; // 申请人
product_name: string; // 产品名
categories: Array<{
id: string; // 分类id
name: string; // 分类名
}>;
created_time: string; // 创建时间
order_status: string; // 状态
proposal_files: Array<{
file_name: string; // 名称
file_url: string; // 地址
id: integer; //
}>;
}>;
total: string; //
* list: Array<{
* id: number; // 计划书id
* customer_name: string; // 申请人
* product_name: string; // 产品名
* categories: Array<{
* id: string; // 分类id
* name: string; // 分类名
* }>; // 分类
* created_time: string; // 创建时间
* order_status: string; // 状态
* proposal_files: Array<{
* file_name: string; // 文件名称
* file_url: string; // 文件地址
* id: number; // 文件id
* }>; // 生成的计划书
* }>; // 计划书列表
* total: string; // 总数
* };
* }>}
*/
......