feat 完善注释
This commit is contained in:
7
src/types/api.d.ts
vendored
7
src/types/api.d.ts
vendored
@@ -1,33 +1,26 @@
|
||||
// 接口通用结构(PRD 4.8)
|
||||
|
||||
/** 业务类型(跨模块共享) */
|
||||
export type BusinessType = 'internet' | 'hardware' | 'iot' | 'manufacturing' | 'other'
|
||||
|
||||
/** 统一响应结构 */
|
||||
export interface ApiResponse<T> {
|
||||
code: number
|
||||
msg: string
|
||||
data: T
|
||||
}
|
||||
|
||||
/** 分页结果 */
|
||||
export interface PageResult<T> {
|
||||
list: T[]
|
||||
total: number
|
||||
}
|
||||
|
||||
/** 通用分页查询参数 */
|
||||
export interface PageQuery {
|
||||
page: number
|
||||
pageSize: number
|
||||
}
|
||||
|
||||
/** 附件/文件信息 */
|
||||
export interface FileInfo {
|
||||
name: string
|
||||
size: number
|
||||
uploadTime: string
|
||||
url: string
|
||||
/** OSS 主键(同源预览用);本地未上传文件为 undefined */
|
||||
ossId?: string | number
|
||||
}
|
||||
|
||||
11
src/types/business/auth.d.ts
vendored
11
src/types/business/auth.d.ts
vendored
@@ -1,23 +1,12 @@
|
||||
// 账号密码登录/注册真实接口类型(对接 vermis-maker /auth/*)
|
||||
// 归位于 types/business/auth.d.ts,与 api/auth.ts 对应
|
||||
|
||||
/** 登录成功返回,对应后端 LoginVo(字段名以 @JsonProperty 为准) */
|
||||
export interface LoginResult {
|
||||
/** 授权令牌(后端字段 access_token) */
|
||||
access_token: string
|
||||
/** 刷新令牌 */
|
||||
refresh_token?: string
|
||||
/** access_token 有效期(秒) */
|
||||
expire_in?: number
|
||||
/** refresh_token 有效期(秒) */
|
||||
refresh_expire_in?: number
|
||||
/** 应用 id */
|
||||
client_id?: string
|
||||
/** 令牌权限 */
|
||||
scope?: string
|
||||
/** 用户 openid */
|
||||
openid?: string
|
||||
}
|
||||
|
||||
/** 注册返回:后端 R<Void>,无 data */
|
||||
export type RegisterResult = void
|
||||
|
||||
130
src/types/business/cases.d.ts
vendored
130
src/types/business/cases.d.ts
vendored
@@ -1,54 +1,24 @@
|
||||
// 案例库类型(案例实体 + 后端 VO,与 api/cases.ts 对应)
|
||||
//
|
||||
// 后端:vermis-maker com.ruoyi.vermins.controller.pc.web.ProjectCaseUserController(前缀 /web/projectCase)
|
||||
// 说明:案例实体类型统一定义在本文件(含首页「案例库精选」消费的 ProjectCaseVo)。
|
||||
|
||||
import type { BusinessType } from '@/types/api'
|
||||
|
||||
/**
|
||||
* 业务类型筛选项。
|
||||
*
|
||||
* <p>选项不是前端写死的,而是取自 GET /web/projectCase/categories 返回的
|
||||
* {@link ProjectCaseStatisticsVo#projectCaseCounts}——后端按项目提报表统计后下发。</p>
|
||||
*/
|
||||
export interface CaseTypeOption {
|
||||
/**
|
||||
* 下发值 = **提报主键 id**(如 "2099753433048526850")。
|
||||
*
|
||||
* <p>必须用 id 而非类型名:案例表 business_type 列实测存的就是提报主键 id,
|
||||
* 传类型名(如「硬件电路」)后端按原值精确匹配不到 → 实测 total=0。</p>
|
||||
*/
|
||||
value: string
|
||||
/** 展示名(后端下发的 businessType 名称,如「硬件电路」) */
|
||||
label: string
|
||||
/** 该业务类型的案例数(后端统计口径,可能为 0) */
|
||||
count: number
|
||||
}
|
||||
|
||||
/** 案例附件(页面消费,由后端 ProjectCaseAttachmentVo 映射而来) */
|
||||
export interface CaseAttachment {
|
||||
/** 原始文件名 */
|
||||
name: string
|
||||
/** 文件大小(后端已格式化的文本形式,可能为空) */
|
||||
size: string
|
||||
/** 附件访问地址 */
|
||||
url: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 案例正文区块(后端「自定义目录」一项 = 页面一张白卡)。
|
||||
*
|
||||
* <p>标题由后端下发,前端不写死:增删区块(项目背景 / 客户痛点 / 需求描述 / 交付物 …)
|
||||
* 完全由 vm_project_case_catalog 数据决定。</p>
|
||||
*/
|
||||
export interface CaseSection {
|
||||
/** 区块标题(vm_project_case_catalog.title) */
|
||||
title: string
|
||||
/** 区块内容:富文本 HTML(可能内嵌 img / video) */
|
||||
content: string
|
||||
}
|
||||
|
||||
/** 案例 */
|
||||
export interface Case {
|
||||
id: string
|
||||
title: string
|
||||
@@ -56,224 +26,124 @@ export interface Case {
|
||||
cover: string
|
||||
finishDate: string
|
||||
teamSize: number
|
||||
/** 规模展示值(如 '300万'、'10-50万'),筛选区间见 CaseQuery.scales */
|
||||
scale: string
|
||||
industry: string
|
||||
duration: string
|
||||
clientType: string
|
||||
/**
|
||||
* 正文区块列表(标题 + 富文本)。
|
||||
*
|
||||
* <p>来自后端 catalogs(vm_project_case_catalog,按 sort_order 升序);
|
||||
* 列表 / 精选接口不下发,故那些场景为空数组。</p>
|
||||
*/
|
||||
sections: CaseSection[]
|
||||
/** 附件列表(仅案例详情接口返回,列表页为空) */
|
||||
attachments?: CaseAttachment[]
|
||||
video: string
|
||||
isFavorite: boolean
|
||||
/** 收藏量(详情/列表接口下发,本地收藏翻转时同步 ±1) */
|
||||
favoriteCount: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 案例筛选条件。
|
||||
*
|
||||
* <p>三类选项全部由后端下发,前端不写死,且都来自 GET /categories({@link CaseSelectionModel}):
|
||||
* 业务类型({@link CaseTypeOption})、所属行业、项目规模;仅完成日期区间由前端生成。</p>
|
||||
*/
|
||||
export interface CaseQuery {
|
||||
/** 业务类型**提报主键 id**(多选,空数组 = 全部;值域见 CaseTypeOption.value) */
|
||||
categories: string[]
|
||||
/** 所属行业名称(多选,空数组 = 全部;值域见 BusinessIndustryOption.name) */
|
||||
industries: string[]
|
||||
/** 项目规模档位(多选,空数组 = 全部;整档对象直接下发,值域见 /categories) */
|
||||
scales: ScaleLimit[]
|
||||
dateRange: [string, string] | null
|
||||
/** 只看收藏(对应后端 isFavorite=1) */
|
||||
favoriteOnly: boolean
|
||||
keyword: string
|
||||
page: number
|
||||
pageSize: number
|
||||
}
|
||||
|
||||
/* ============================ 后端 VO / BO ============================ */
|
||||
|
||||
/**
|
||||
* GET /web/projectCase/list 的查询条件(后端 ProjectCaseUserBo)。
|
||||
*
|
||||
* <p>businessTypes 按案例表 business_type 列的**原值**精确匹配(in),而该列实测存的是
|
||||
* **提报主键 id**(非类型名),所以前端下发的是 CaseTypeOption.value(id)。</p>
|
||||
*/
|
||||
export interface ProjectCaseUserBo {
|
||||
/** 业务类型提报主键 id 列表 */
|
||||
businessTypes?: string[]
|
||||
/** 业务/行业名称列表 */
|
||||
businessIndustries?: string[]
|
||||
/** 规模区间列表(区间之间取并集) */
|
||||
scales?: ScaleLimit[]
|
||||
/** 只看收藏:1 = 是;不传 = 全部 */
|
||||
isFavorite?: number
|
||||
/** 关键字(案例名 / 客户类型 / 项目周期 / 团队人数) */
|
||||
key?: string
|
||||
/** 开始时间 */
|
||||
beginTime?: string
|
||||
/** 结束时间 */
|
||||
endTime?: string
|
||||
}
|
||||
|
||||
/** 规模区间(后端 UpperAndLowerLimitsModel):任一端为空表示该方向不设限 */
|
||||
export interface ScaleLimit {
|
||||
lowerLimit?: number | null
|
||||
upperLimit?: number | null
|
||||
/** 展示样式:以下 / 区间 / 以上 */
|
||||
model?: string | null
|
||||
/** 档位文字(后端拼好,如「28–46万」) */
|
||||
label?: string | null
|
||||
sort?: number | null
|
||||
}
|
||||
|
||||
/** 所属行业选项(后端 BusinessIndustryModel) */
|
||||
export interface BusinessIndustryOption {
|
||||
name: string | null
|
||||
sort: number | null
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /web/projectCase/categories —— 筛选面板选项。
|
||||
*
|
||||
* <p>左侧筛选**除完成时间外**的选项全部由本接口一次下发:
|
||||
* 业务类型({@link CaseSelectionModel.projectCaseStatisticsVo})、
|
||||
* 所属行业({@link CaseSelectionModel.businessIndustry})、
|
||||
* 项目规模({@link CaseSelectionModel.upperAndLowerLimits})。</p>
|
||||
*/
|
||||
export interface CaseSelectionModel {
|
||||
businessIndustry: BusinessIndustryOption[] | null
|
||||
upperAndLowerLimits: ScaleLimit[] | null
|
||||
/** 业务类型统计(承载业务类型筛选项与案例总数) */
|
||||
projectCaseStatisticsVo: ProjectCaseStatisticsVo | null
|
||||
}
|
||||
|
||||
/** 案例总数 + 各业务类型案例数 */
|
||||
export interface ProjectCaseStatisticsVo {
|
||||
/** 案例总数(口径:未删除且在架) */
|
||||
total: number | null
|
||||
/** 各业务类型的案例数(按案例数倒序) */
|
||||
projectCaseCounts: ProjectCaseCountVo[] | null
|
||||
}
|
||||
|
||||
/** 单个业务类型的案例数 */
|
||||
export interface ProjectCaseCountVo {
|
||||
/** 业务类型原值(提报主键 id 的字符串形式) */
|
||||
id: string | null
|
||||
/** 业务类型名称 */
|
||||
businessType: string | null
|
||||
caseCount: number | null
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /web/projectCase/list —— 案例分页列表 + 业务数据统计。
|
||||
*
|
||||
* <p>统计口径是「本次查询结果」,即跟随筛选条件变化,不是全表统计。</p>
|
||||
*/
|
||||
export interface ProjectCaseAndCaseCountVo {
|
||||
projectCasePage: ProjectCasePageVo | null
|
||||
projectCaseStatisticsVo: ProjectCaseStatisticsVo | null
|
||||
}
|
||||
|
||||
/** 分页体(后端 PageResult:rows + total) */
|
||||
export interface ProjectCasePageVo {
|
||||
total: number
|
||||
rows: ProjectCaseVo[]
|
||||
}
|
||||
|
||||
/** 案例库视图对象(列表 / 详情 / mostViewed 共用;后端 Long 主键序列化为字符串) */
|
||||
export interface ProjectCaseVo {
|
||||
id: string
|
||||
/** 案例编号 */
|
||||
caseNo: string | null
|
||||
/** 案例名称 */
|
||||
caseName: string | null
|
||||
/** 业务类型原值(案例表该列存提报主键 id 或类型名称) */
|
||||
businessType: string | null
|
||||
/** 业务类型名称(后端 JOIN 提报表翻译后的展示名) */
|
||||
projectTypeName: string | null
|
||||
/** 业务/行业 */
|
||||
businessIndustry: string | null
|
||||
/** 上下架:1 上架,0 下架 */
|
||||
enabled: number | null
|
||||
/** 规模数值(单位:万) */
|
||||
scale: number | null
|
||||
/** 预览量(详情接口每次调用自增 1) */
|
||||
previewCount: number | null
|
||||
/** 浏览量(已废弃,勿用于排序) */
|
||||
viewCount: number | null
|
||||
/** 收藏量 */
|
||||
favoriteCount: number | null
|
||||
/** 封面(后端下发的是 OSS 文件标识,未必是可直接访问的 URL) */
|
||||
coverUrl: string | null
|
||||
/** 客户类型 */
|
||||
customerType: string | null
|
||||
/** 所属行业 */
|
||||
industry: string | null
|
||||
/** 项目周期 */
|
||||
projectCycle: string | null
|
||||
/** 服务团队人数 */
|
||||
serviceTeam: number | null
|
||||
/** 完成时间 yyyy-MM-dd */
|
||||
completedAt: string | null
|
||||
/** 是否收藏:1 是,0 否(详情与列表接口均会回填) */
|
||||
isFavorite: number | null
|
||||
/**
|
||||
* 项目背景富文本段列表(仅详情返回)。
|
||||
*
|
||||
* @deprecated 后端已改用 {@link ProjectCaseVo.catalogs}(带标题的自定义目录),该字段恒为 null。
|
||||
*/
|
||||
backgrounds: ProjectCaseBackgroundVo[] | null
|
||||
/** 正文区块列表(仅详情返回;后端按 sort_order、id 升序下发) */
|
||||
catalogs: ProjectCaseCatalogVo[] | null
|
||||
/** 附件列表(仅详情返回) */
|
||||
attachments: ProjectCaseAttachmentVo[] | null
|
||||
/** 更新时间 yyyy-MM-dd HH:mm:ss */
|
||||
updateTime: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
* 案例项目背景富文本段(vm_project_case_detail)。
|
||||
*
|
||||
* @deprecated 已被 {@link ProjectCaseCatalogVo} 取代(新结构带 title),后端恒下发 null。
|
||||
*/
|
||||
export interface ProjectCaseBackgroundVo {
|
||||
id: string | null
|
||||
projectId: string | null
|
||||
/** 富文本 HTML */
|
||||
content: string | null
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
/** 案例自定义目录 / 正文区块(vm_project_case_catalog) */
|
||||
export interface ProjectCaseCatalogVo {
|
||||
id: string | null
|
||||
projectId: string | null
|
||||
/** 目录标题(如「项目背景」「客户痛点」) */
|
||||
title: string | null
|
||||
/** 目录内容富文本 HTML */
|
||||
content: string | null
|
||||
/** 排序值,升序 */
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
/** 案例附件(vm_project_case_attachment) */
|
||||
export interface ProjectCaseAttachmentVo {
|
||||
id: string | null
|
||||
projectId: string | null
|
||||
/** OSS 标识 */
|
||||
ossId: string | null
|
||||
/** 原始文件名 */
|
||||
originalName: string | null
|
||||
/** 文件大小(文本形式) */
|
||||
fileSize: string | null
|
||||
/** 附件访问地址 */
|
||||
url: string | null
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
4
src/types/business/contract.d.ts
vendored
4
src/types/business/contract.d.ts
vendored
@@ -1,11 +1,8 @@
|
||||
// 合同中心实体(PRD M6)
|
||||
|
||||
import type { FileInfo } from '@/types/api'
|
||||
|
||||
/** 签署状态 */
|
||||
export type SignStatus = '履行中' | '已过期' | '待签署'
|
||||
|
||||
/** 合同 */
|
||||
export interface Contract {
|
||||
id: string
|
||||
contractNo: string
|
||||
@@ -21,7 +18,6 @@ export interface Contract {
|
||||
files: FileInfo[]
|
||||
}
|
||||
|
||||
/** 合同列表查询条件 */
|
||||
export interface ContractQuery {
|
||||
keyword: string
|
||||
page: number
|
||||
|
||||
95
src/types/business/demand.d.ts
vendored
95
src/types/business/demand.d.ts
vendored
@@ -1,162 +1,70 @@
|
||||
// 需求提报(对接真实后端)
|
||||
// 草稿:POST /web/workOrderDraft/{getDraft,add,upload,reset} → vm_work_order_draft(WorkOrderDraftBo / Vo)
|
||||
// 提交:POST /web/requirementPool/create → vm_project_requirement(入参 WorkOrderDraftBo,与草稿同 BO,附件随请求体)
|
||||
// (同控制器的 /submit 入参是 RdProjectBo、会额外落 vm_rd_project,前端当前未使用)
|
||||
// 业务类型:GET /web/projectSubmission/list(vm_project_submission,@SaIgnore 免登录)
|
||||
// 与首页 /web/home-page/service-type-list 是同一个 service 方法,数据完全一致
|
||||
// 预算范围:GET /system/dict/data/type/vm_budget_range(字典)
|
||||
// 注意:草稿 / 提交 / 字典 需登录态(匿名实测 401);业务类型列表免登录
|
||||
|
||||
/** 业务类型图标标识(对应前端内联 SVG,见 views/demand/cpns/BizTypeIcon.vue) */
|
||||
export type BizIconKey = 'code' | 'chip' | 'iot' | 'factory' | 'other'
|
||||
|
||||
/** 字典项(GET /system/dict/data/type/{dictType}) */
|
||||
export interface DictOption {
|
||||
dictLabel: string
|
||||
dictValue: string
|
||||
dictSort: number
|
||||
}
|
||||
|
||||
/** 项目提报列表项(GET /web/projectSubmission/list,只取业务类型卡片用得到的字段) */
|
||||
export interface SubmissionBizTypeVo {
|
||||
/** 提报主键(业务详情接口 /web/projectSubmission/{id} 用它) */
|
||||
id: string | number
|
||||
/** 业务类型(既作展示名,也作下发给后端的值) */
|
||||
businessType: string | null
|
||||
/** 标题 */
|
||||
title: string | null
|
||||
/** 副标题(卡片一句话描述的数据源) */
|
||||
subtitle: string | null
|
||||
/** 封面(⚠️ 实测存的是 OSS 文件标识,非完整地址) */
|
||||
coverUrl: string | null
|
||||
/** Logo(⚠️ 同上,需经 /resource/oss/listByIds 换取真实地址) */
|
||||
logoUrl: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务类型卡片选项。
|
||||
*
|
||||
* <p>值域**完全由接口决定**:提报列表返回几条就渲染几张卡,前端不追加任何兜底项
|
||||
* (「其他」也不例外——接口有才显示,没有就不显示)。字段映射:`businessType` 作下发值、
|
||||
* `title` 作展示名、`subtitle` 作描述、`logoUrl` 作图标。但后端这两个字段目前是**半成品**——
|
||||
* subtitle 常与类型名重复、logo 存的是 OSS 文件标识——故 desc / icon 保留前端映射表兜底
|
||||
* (见 `utils/bizTypeMeta.ts`,只按类型名补描述/图标,不产生新选项)。</p>
|
||||
*/
|
||||
export interface BizTypeOption {
|
||||
/** 下发给后端的值(= 提报 businessType,如「互联网软件」) */
|
||||
value: string
|
||||
/** 展示名 */
|
||||
label: string
|
||||
/** 一句话描述(后端 subtitle 可用时优先,否则用前端映射) */
|
||||
desc: string
|
||||
/** 图标标识(前端内联 SVG;`iconUrl` 为空时渲染它) */
|
||||
icon: BizIconKey
|
||||
/** 后端 Logo 图片地址(已换链可直接访问时优先渲染,否则回退 `icon` 内联 SVG) */
|
||||
iconUrl?: string
|
||||
}
|
||||
|
||||
/** 草稿附件(vm_work_order_draft_attachment) */
|
||||
export interface DemandAttachment {
|
||||
id?: string | number | null
|
||||
draftId?: string | number | null
|
||||
/** OSS 文件主键 */
|
||||
ossId?: string | number | null
|
||||
/** 原始文件名 */
|
||||
originalName?: string | null
|
||||
/** 文件访问地址 */
|
||||
url?: string | null
|
||||
/** 文件大小(字节) */
|
||||
fileSize?: number | null
|
||||
/** 文件格式后缀(pdf / docx / zip …) */
|
||||
type?: string | null
|
||||
/** 上传时间(BaseEntity.createTime;本地上传时由前端补当前时间) */
|
||||
createTime?: string | null
|
||||
}
|
||||
|
||||
/** 需求提报表单(字段与后端 WorkOrderDraftBo 对应,另有 1 个纯前端状态字段:budgetManual) */
|
||||
export interface Demand {
|
||||
/** 草稿主键(编辑已有草稿时回填) */
|
||||
id?: string | number | null
|
||||
/** 业务类型(= 项目提报的 businessType,如「互联网软件」;后端落库存的也是这个名称,不是提报 id) */
|
||||
bizType: string
|
||||
/** 项目名称 */
|
||||
projectName: string
|
||||
/** 核心需求描述 */
|
||||
requirementDesc: string
|
||||
/**
|
||||
* 预算范围:选预设档位时为字典 `vm_budget_range` 的 dictValue('0'~'3');
|
||||
* 在第 5 个「手填」输入框里写字时为用户自己填的金额文本(如「80万」)。
|
||||
*
|
||||
* <p>⚠️ 手填内容只能放本字段:后端 `WorkOrderDraftBo.budgetCustom` 是被注释掉的、
|
||||
* `vm_work_order_draft` 表也没有 `budget_custom` 列(VO 上那个 `budgetCustom` 恒为 null),
|
||||
* 所以没有第二个位置可以承载手填文本。提交落 `vm_project_requirement.budget_range`,
|
||||
* 该列为 **varchar(30)**,故手填文本限长见 `utils/budgetMeta.ts#MANUAL_BUDGET_MAX`。</p>
|
||||
*/
|
||||
budgetRange: string
|
||||
/** 是否由「手填」输入框提供预算(**纯前端状态**:后端 BO/VO 与两张表都没有该字段,下发前需剔除) */
|
||||
budgetManual: boolean
|
||||
/** 预计开发周期(工作日) */
|
||||
developmentCycle: number | ''
|
||||
/** 补充备注 */
|
||||
supplementaryRemarks: string
|
||||
/** 用户名称 */
|
||||
userName: string
|
||||
/** 用户电话 */
|
||||
userPhone: string
|
||||
/** 附件列表(后端按此逐条转存为需求附件) */
|
||||
attachmentInfo: DemandAttachment[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接提报请求体(对应后端 `RdProjectBo` 的可写子集,POST /web/requirementPool/submit)。
|
||||
*
|
||||
* <p>⚠️ **当前前端未使用**:提交走的是 `/web/requirementPool/create`(入参 `WorkOrderDraftBo`,
|
||||
* 与草稿同一个 BO,附件随请求体下发)。本类型对应的是后端 `/submit` 链路,保留以备切回。</p>
|
||||
*
|
||||
* <p>⚠️ 与草稿 BO 的字段名**不同**,别混用:业务类型叫 `businessType`(草稿叫 `bizType`)、
|
||||
* 补充备注叫 `extraRemark`(草稿叫 `supplementaryRemarks`)。</p>
|
||||
*
|
||||
* <p>⚠️ 两个字段**不在**此请求体里:</p>
|
||||
* <ul>
|
||||
* <li>`developmentCycle`(预计开发周期)—— `vm_project_requirement` 与 `vm_rd_project`
|
||||
* 两张表都**没有**该列,所以提报链路无处存放(草稿表 `vm_work_order_draft.development_cycle`
|
||||
* 里有,提交后即丢失,草稿路径同样如此);</li>
|
||||
* <li>`attachmentInfo` —— `RdProjectBo` 无附件字段,后端按登录用户从**已落库草稿**里
|
||||
* 按 `ossId` 搬运到 `vm_project_requirement_attachment`(故走该链路时调用方需先落一次草稿,
|
||||
* 这也正是前端改回 `/create` 的原因之一)。</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p>`projectNo` / `sourceType` / `priority` / `status` / `progress` 在 BO 上虽标了 `@NotBlank`,
|
||||
* 但注解都挂 `AddGroup` / `EditGroup`,而控制器是裸 `@Validated`(未指定分组)⇒ 实际**不生效**;
|
||||
* 这些值由后端统一生成/兜默认(`project_no` 复用需求编号、`source_type=EXTERNAL`、
|
||||
* `priority=UNASSESSED`、`status=IN_PROGRESS`、`progress=0`),前端不下发。</p>
|
||||
*/
|
||||
export interface DemandSubmitBo {
|
||||
/** 业务类型名称(如「互联网软件」;后端落库存的是名称,不是提报 id) */
|
||||
businessType: string
|
||||
/** 项目名称 */
|
||||
projectName: string
|
||||
/** 核心需求描述 */
|
||||
requirementDesc: string
|
||||
/** 联系人姓名(缺失时后端回退取登录用户资料) */
|
||||
customerName: string
|
||||
/** 联系人电话(同上) */
|
||||
customerPhone: string
|
||||
/** 预算范围:预设档位 = 字典码值;手填 = 用户输入的金额文本 */
|
||||
budgetRange: string | null
|
||||
/** 补充备注(对应草稿的 supplementaryRemarks) */
|
||||
extraRemark: string | null
|
||||
}
|
||||
|
||||
/** 草稿详情(后端 WorkOrderDraftVo,取前端用得到的子集) */
|
||||
export interface DemandDraftVo {
|
||||
id: string | number | null
|
||||
bizType: string | null
|
||||
projectName: string | null
|
||||
requirementDesc: string | null
|
||||
/** 预算范围:预设档位=字典 dictValue;手填=用户在第 5 个输入框里写的文本(前端据此反推 budgetManual) */
|
||||
budgetRange: string | null
|
||||
/** ⚠️ 后端 VO 声明了该字段但**恒为 null**(Bo 里被注释、表无该列)→ 不要依赖它回填手填内容 */
|
||||
budgetCustom: string | null
|
||||
developmentCycle: number | null
|
||||
supplementaryRemarks: string | null
|
||||
@@ -165,7 +73,6 @@ export interface DemandDraftVo {
|
||||
attachmentInfo: DemandAttachment[] | null
|
||||
}
|
||||
|
||||
/** 附件上传返回(后端 SysOssVo) */
|
||||
export interface OssUploadVo {
|
||||
ossId: string | number
|
||||
url: string
|
||||
@@ -173,9 +80,7 @@ export interface OssUploadVo {
|
||||
fileSuffix: string
|
||||
}
|
||||
|
||||
/** OSS 换链返回项(GET /resource/oss/listByIds/{ids} 的子集) */
|
||||
export interface OssUrlVo {
|
||||
ossId: string | number
|
||||
/** 可直接访问的地址(阿里云 OSS 公网 URL) */
|
||||
url: string
|
||||
}
|
||||
|
||||
65
src/types/business/finance.d.ts
vendored
65
src/types/business/finance.d.ts
vendored
@@ -1,21 +1,8 @@
|
||||
// 财务中心实体(账单/支付/发票/抬头/统计)
|
||||
|
||||
/**
|
||||
* 账单状态(页面展示口径,中文)。
|
||||
*
|
||||
* <p>与后端 {@code vm_bill.status} 的英文编码(见 `BillStatusCode`)是多对一的展示映射,
|
||||
* 转换收口在 `utils/billVo.ts#toBillStatus`。</p>
|
||||
*/
|
||||
export type BillStatus = '待支付' | '已支付' | '未到期' | '已取消'
|
||||
|
||||
/** 后端账单状态编码(`vm_bill.status` 值域) */
|
||||
export type BillStatusCode = 'UNSTARTED' | 'PENDING' | 'PAID' | 'CANCELLED'
|
||||
|
||||
/**
|
||||
* 后端账单视图对象 —— `GET /web/bill/list` 的响应元素(对应后端 `BillVo`)。
|
||||
*
|
||||
* <p>金额单位 **元**;`id` 为雪花 id 时 JSON 里是字符串,小 id 是数字,一律 `String(id)` 归一。</p>
|
||||
*/
|
||||
export interface BillVo {
|
||||
id: number | string
|
||||
billNo?: string
|
||||
@@ -24,36 +11,19 @@ export interface BillVo {
|
||||
projectName?: string
|
||||
userId?: number | string
|
||||
amount?: number
|
||||
/** 业务类型字典值:internet_software / hardware_circuit / iot_solution / manufacturing */
|
||||
bizType?: string
|
||||
/** 账单类型:ADVANCE / PROGRESS / FINAL / OTHER */
|
||||
billType?: string
|
||||
/** 期次名,如「第2期·尾款」(页面「账单名称」列) */
|
||||
periodName?: string
|
||||
/** 占项目总额比例(%) */
|
||||
periodRatio?: number
|
||||
status?: BillStatusCode | string
|
||||
/** 支付通道:WECHAT / ALIPAY / BANK / WORKWX */
|
||||
payChannel?: string
|
||||
/** 交易流水号(支付成功回写) */
|
||||
transactionNo?: string
|
||||
/** 交易名称(支付时回传) */
|
||||
tradeName?: string
|
||||
payTime?: string
|
||||
dueDate?: string
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 后端分期计划视图对象(`vm_bill_plan` + 该期支付单信息,对应 `BillPlanVo`)。
|
||||
*
|
||||
* <p>由项目详情「合同财务」那个现成接口 `GET /web/requirementPool/get/finance/{需求id}`
|
||||
* 的 `billPlans` 下发;收银台「订单明细」复用同一份数据
|
||||
* (见 `api/finance.ts#getCheckoutBills`),没有再单开端点。</p>
|
||||
*
|
||||
* <p>⚠️ 本栈支付口径是**计划 id**:`vm_finance_payment.bill_id` 实测存的就是 `vm_bill_plan.id`,
|
||||
* 所以收银台 `?ids=` 传的是这个 `id`,而不是 `vm_bill.id`。</p>
|
||||
*/
|
||||
export interface BillPlanVo {
|
||||
id: number | string
|
||||
projectId?: number | string
|
||||
@@ -61,74 +31,46 @@ export interface BillPlanVo {
|
||||
projectName?: string
|
||||
userId?: number | string
|
||||
bizType?: string
|
||||
/** ⚠️ BigDecimal ⇒ 后端以**字符串**下发("120000.00"),用前必须 `Number()` 归一 */
|
||||
totalAmount?: number | string
|
||||
/** 分期总期数 */
|
||||
periods?: number
|
||||
/** 本期期次序号(1 起) */
|
||||
currentPeriod?: number
|
||||
/** 每期比例规则,如 "40,30,30" */
|
||||
periodRule?: string
|
||||
nextDate?: string
|
||||
/** 计划状态:ACTIVE / DONE / CLOSED / UNSTARTED */
|
||||
status?: string
|
||||
/** 该期支付单的商户订单号(页面「账单号」用它);未支付为空 */
|
||||
orderNo?: string
|
||||
transactionNo?: string
|
||||
payChannel?: string
|
||||
payAmount?: number | string
|
||||
/** 支付单状态:CREATED / SUCCESS / FAILED / REFUNDED */
|
||||
payStatus?: string
|
||||
payTime?: string
|
||||
}
|
||||
|
||||
/** 发票状态 */
|
||||
export type InvoiceStatus = '已开票' | '开票中' | '未开票'
|
||||
|
||||
/** 支付方式 */
|
||||
export type PayMethod = 'wechat' | 'alipay'
|
||||
|
||||
/**
|
||||
* 后端统一支付响应 `org.dromara.pay.domain.PaymentResponse`(字段名与后端一致)。
|
||||
*
|
||||
* <p>扫码(Native)渠道回 `codeUrl`;支付宝电脑网站支付回 `formBody`
|
||||
* ——注意该字段名虽叫 formBody,实测后端走 `pageExecute(request, "GET")`,
|
||||
* 内容其实是**收银台跳转地址**而非 HTML 表单,前端两种形态都兜住。</p>
|
||||
*/
|
||||
export interface PayOrderResponse {
|
||||
/** 支付渠道:WECHAT / ALIPAY / UNIONPAY */
|
||||
channel: string
|
||||
/** 支付场景:JSAPI / NATIVE / WEB_SCAN / WEB_PAGE / APP */
|
||||
scene: string
|
||||
/** 扫码支付二维码内容:微信 Native 为 code_url,支付宝订单码为 qr_code */
|
||||
codeUrl?: string
|
||||
/** 支付宝电脑网站支付返回的收银台跳转地址 / HTML 表单 */
|
||||
formBody?: string
|
||||
/** 支付宝 APP 支付订单串 */
|
||||
orderString?: string
|
||||
/** H5 支付链接 */
|
||||
h5Url?: string
|
||||
}
|
||||
|
||||
/** 账单(页面视图模型;由 `utils/billVo.ts#toBill` 从后端 `BillVo` 映射而来) */
|
||||
export interface Bill {
|
||||
id: string
|
||||
/** 分期计划名,如 '第一期·预付款 比例33%'(后端 `periodName`) */
|
||||
planName: string
|
||||
billNo: string
|
||||
/** 交易流水号(后端 `transactionNo`) */
|
||||
tradeNo?: string
|
||||
projectName: string
|
||||
amount: number
|
||||
status: BillStatus
|
||||
createTime: string
|
||||
/** 支付通道英文编码(WECHAT / ALIPAY / BANK / WORKWX) */
|
||||
payChannel?: string
|
||||
/** 支付时间(后端 `payTime`) */
|
||||
payTime?: string
|
||||
}
|
||||
|
||||
/** 账单查询条件 */
|
||||
export interface BillQuery {
|
||||
keyword: string
|
||||
status: BillStatus | 'all'
|
||||
@@ -136,7 +78,6 @@ export interface BillQuery {
|
||||
pageSize: number
|
||||
}
|
||||
|
||||
/** 支付单(二维码) */
|
||||
export interface Payment {
|
||||
billId: string
|
||||
method: PayMethod
|
||||
@@ -144,7 +85,6 @@ export interface Payment {
|
||||
qrExpiresInSeconds: number
|
||||
}
|
||||
|
||||
/** 支付结果 */
|
||||
export interface PaymentResult {
|
||||
method: PayMethod
|
||||
amount: number
|
||||
@@ -153,7 +93,6 @@ export interface PaymentResult {
|
||||
bills: Bill[]
|
||||
}
|
||||
|
||||
/** 发票 */
|
||||
export interface Invoice {
|
||||
id: string
|
||||
planName: string
|
||||
@@ -165,7 +104,6 @@ export interface Invoice {
|
||||
applyTime: string
|
||||
}
|
||||
|
||||
/** 发票查询条件 */
|
||||
export interface InvoiceQuery {
|
||||
keyword: string
|
||||
status: InvoiceStatus | 'all'
|
||||
@@ -173,7 +111,6 @@ export interface InvoiceQuery {
|
||||
pageSize: number
|
||||
}
|
||||
|
||||
/** 发票抬头 */
|
||||
export interface InvoiceTitle {
|
||||
id: string
|
||||
type: '企业单位' | '非企业单位'
|
||||
@@ -182,14 +119,12 @@ export interface InvoiceTitle {
|
||||
isDefault: boolean
|
||||
}
|
||||
|
||||
/** 新增/编辑发票抬头入参 */
|
||||
export interface InvoiceTitlePayload {
|
||||
type: InvoiceTitle['type']
|
||||
title: string
|
||||
taxNo: string
|
||||
}
|
||||
|
||||
/** 财务统计 */
|
||||
export interface FinanceStats {
|
||||
totalExpense: number
|
||||
month: string
|
||||
|
||||
75
src/types/business/home.d.ts
vendored
75
src/types/business/home.d.ts
vendored
@@ -1,53 +1,34 @@
|
||||
// 首页类型(VIEW 类型 + 后端真实 VO 类型 + 门户入口类型,统一归位于 types/business/home.d.ts)
|
||||
//
|
||||
// - VIEW 类型(BusinessLine / HomeStats / ServiceType / ServiceContentBlock / QuickLink):页面消费层
|
||||
// - 后端 VO 类型(Project* / BannerVo / AgreementFormVo / ProjectCaseVo):vermis-maker
|
||||
// com.ruoyi.vermins.controller.pc.web.UserSideWebHomePageController 与 ProjectCaseUserController 的真实返回
|
||||
// - 门户入口类型(PortalEntry* / EntryTone / PortalEntryCard):IPortalEntryUserController,属首页快捷入口功能
|
||||
|
||||
import type { BusinessType } from '@/types/api'
|
||||
|
||||
/* ============================ VIEW 类型(页面消费层) ============================ */
|
||||
|
||||
/** 数据看板 */
|
||||
export interface HomeStats {
|
||||
pending: number
|
||||
inProgress: number
|
||||
total: number
|
||||
}
|
||||
|
||||
/** 首页头图轮播(VIEW 层,由 BannerVo 映射) */
|
||||
export interface Banner {
|
||||
id: number
|
||||
imageUrl: string
|
||||
}
|
||||
|
||||
/** 快捷入口(VIEW 层占位,实际入口由门户接口驱动) */
|
||||
export interface QuickLink {
|
||||
label: string
|
||||
path: string
|
||||
}
|
||||
|
||||
/** 服务类型子项 */
|
||||
export interface ServiceType {
|
||||
label: string
|
||||
desc: string
|
||||
/** 图标(后端 icon_url 原样透传:图片地址时渲染为图,否则用名称首字兜底) */
|
||||
icon?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务内容区块(对应后端富文本目录 `vm_project_submission_catalog` 的一条:
|
||||
* 一条目录 = 详情页的一个「服务内容」区块,content 为富文本 HTML,可能内嵌图片/视频)
|
||||
*/
|
||||
export interface ServiceContentBlock {
|
||||
/** 区块标题(后端 catalog.title,可为空) */
|
||||
title: string
|
||||
/** 区块内容(富文本 HTML 原文,直接渲染) */
|
||||
content: string
|
||||
}
|
||||
|
||||
/** 业务线(首页业务卡片 + 业务详情页共用) */
|
||||
export interface BusinessLine {
|
||||
id: BusinessType
|
||||
name: string
|
||||
@@ -55,25 +36,17 @@ export interface BusinessLine {
|
||||
slogan: string
|
||||
icon: string
|
||||
serviceContent: string
|
||||
/** 服务内容区块列表(一条富文本目录一项,详情页逐块渲染,保留 HTML) */
|
||||
contents: ServiceContentBlock[]
|
||||
serviceTypes: ServiceType[]
|
||||
video: string
|
||||
}
|
||||
|
||||
/* ============================ 后端真实 VO 类型 ============================ */
|
||||
|
||||
/** GET /web/home-page/project-status-count —— 项目状态统计 */
|
||||
export interface ProjectStatusCount {
|
||||
/** 项目数量 */
|
||||
projectCount: number
|
||||
/** 进行中的项目数目 */
|
||||
ongoingProjectCount: number
|
||||
/** 待处理数目 */
|
||||
pendingProjectCount: number
|
||||
}
|
||||
|
||||
/** 服务类型子项(service-type-list / service-type-detail 内含) */
|
||||
export interface ProjectServiceTypeVo {
|
||||
id: number | null
|
||||
projectId: number | null
|
||||
@@ -82,7 +55,6 @@ export interface ProjectServiceTypeVo {
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
/** 项目背景(富文本) */
|
||||
export interface ProjectBackgroundVo {
|
||||
id: number | null
|
||||
projectId: number | null
|
||||
@@ -90,13 +62,11 @@ export interface ProjectBackgroundVo {
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
/** 项目提报视图对象:service-type-list / service-type-detail/{id} 的返回 */
|
||||
export interface ProjectSubmissionVo {
|
||||
id: number
|
||||
businessType: string | null
|
||||
title: string | null
|
||||
subtitle: string | null
|
||||
/** 是否启用:1 启用,0 停用 */
|
||||
enabled: number | null
|
||||
coverUrl: string | null
|
||||
logoUrl: string | null
|
||||
@@ -106,18 +76,13 @@ export interface ProjectSubmissionVo {
|
||||
updateTime: string | null
|
||||
}
|
||||
|
||||
/** GET /web/home-page/service-type-detail/{id} —— 项目提报详情(聚合 VO:主表单对象,三个子表均为一对多 List) */
|
||||
export interface ProjectSubmissionInfo {
|
||||
projectSubmission: ProjectSubmissionFlat | null
|
||||
/** 一对多:服务类型列表 */
|
||||
projectServiceType: ProjectServiceTypeInfo[] | null
|
||||
/** 一对多:附件列表 */
|
||||
projectSubmissionAttachment: ProjectSubmissionAttachmentInfo[] | null
|
||||
/** 一对多:富文本目录列表 */
|
||||
projectSubmissionCatalog: ProjectSubmissionCatalogInfo[] | null
|
||||
}
|
||||
|
||||
/** 主表 vm_project_submission(详情接口下发) */
|
||||
export interface ProjectSubmissionFlat {
|
||||
id: number | null
|
||||
businessType: string | null
|
||||
@@ -128,7 +93,6 @@ export interface ProjectSubmissionFlat {
|
||||
logoUrl: string | null
|
||||
}
|
||||
|
||||
/** 服务类型 vm_project_service_type(详情接口各取一条) */
|
||||
export interface ProjectServiceTypeInfo {
|
||||
id: number | null
|
||||
projectId: number | null
|
||||
@@ -137,7 +101,6 @@ export interface ProjectServiceTypeInfo {
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
/** 附件 vm_project_submission_attachment(详情接口各取一条) */
|
||||
export interface ProjectSubmissionAttachmentInfo {
|
||||
id: number | null
|
||||
projectId: number | null
|
||||
@@ -147,7 +110,6 @@ export interface ProjectSubmissionAttachmentInfo {
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
/** 目录(富文本)vm_project_submission_catalog(详情接口各取一条) */
|
||||
export interface ProjectSubmissionCatalogInfo {
|
||||
id: number | null
|
||||
projectId: number | null
|
||||
@@ -156,78 +118,41 @@ export interface ProjectSubmissionCatalogInfo {
|
||||
sortOrder: number | null
|
||||
}
|
||||
|
||||
/** GET /web/home-page/carousel-list —— 轮播图 */
|
||||
export interface BannerVo {
|
||||
id: number | null
|
||||
imageUrl: string | null
|
||||
sort: number | null
|
||||
/** 是否启用(true 启用,false 停用) */
|
||||
enabled: boolean | null
|
||||
}
|
||||
|
||||
/** GET /web/home-page/platform-intro、contact-info —— 协议/静态文章富文本 */
|
||||
export interface AgreementFormVo {
|
||||
id: number | null
|
||||
/** 协议类型(目前只有「关于我们」一条) */
|
||||
type: string | null
|
||||
/** 文章内容(富文本 HTML) */
|
||||
content: string | null
|
||||
}
|
||||
|
||||
// 案例库的实体类型与 VO(ProjectCaseVo / ProjectCaseUserBo / CaseSelectionModel 等)
|
||||
// 已按「一页一套」归位到 `@/types/business/cases`,本文件不再重复定义。
|
||||
|
||||
/* ============================ 门户入口(首页快捷入口功能) ============================ */
|
||||
|
||||
/**
|
||||
* 后端 IPortalEntryVo(入口目录 + 用户个性化分组)
|
||||
*
|
||||
* <p>注意字段来源分两处:</p>
|
||||
* - 登录分支(selectByUserId):name / id / icon / route / groupType / sortOrder / status,
|
||||
* 其中 id 取的是 vm_portal_entry.id(入口目录主键);
|
||||
* - 匿名分支(selectVoList,MyBatis-Plus 自动 SQL):多带 entryId 等目录字段,groupType 为目录默认值。
|
||||
*/
|
||||
export interface PortalEntryVo {
|
||||
/** 入口主键 */
|
||||
id: number | null
|
||||
/** 入口标识 */
|
||||
entryId: string | null
|
||||
/** 显示名 */
|
||||
name: string | null
|
||||
/** 图标名 / URL */
|
||||
icon: string | null
|
||||
/** 跳转路由 */
|
||||
route: string | null
|
||||
/** 权限标识(空 = 无需权限) */
|
||||
permission: string | null
|
||||
/** 1 = 快捷、0 = 其他 */
|
||||
groupType: string | null
|
||||
/** 组内顺序 */
|
||||
sortOrder: number | null
|
||||
/** 1 = 启用、0 = 停用 */
|
||||
status: boolean | null
|
||||
}
|
||||
|
||||
/** 入口分组:1 = 快捷入口、0 = 其他入口 */
|
||||
export type PortalEntryGroup = '1' | '0'
|
||||
|
||||
/** 页面消费的入口卡片(视图层类型,与后端字段解耦) */
|
||||
export interface PortalEntryCard {
|
||||
/** 入口 id(切换分组时回传后端) */
|
||||
id: number
|
||||
/** 显示名 */
|
||||
label: string
|
||||
/** 跳转路由(可能为空,为空时不可点击跳转) */
|
||||
route: string
|
||||
/** 当前分组:1 = 快捷、0 = 其他 */
|
||||
groupType: PortalEntryGroup
|
||||
/** 图标:emoji 字符或图片地址 */
|
||||
icon: string
|
||||
/** icon 是否为图片地址 */
|
||||
isImage: boolean
|
||||
/** 图标底色主题 */
|
||||
tone: EntryTone
|
||||
}
|
||||
|
||||
/** 图标底色主题(设计稿为五色循环) */
|
||||
export type EntryTone = 'purple' | 'green' | 'blue' | 'amber' | 'red' | 'cyan'
|
||||
|
||||
5
src/types/business/message.d.ts
vendored
5
src/types/business/message.d.ts
vendored
@@ -1,24 +1,19 @@
|
||||
// 消息实体(PRD M8 消息中心)
|
||||
|
||||
import type { FileInfo } from '@/types/api'
|
||||
|
||||
/** 消息类型 */
|
||||
export type MessageType = '在线客服' | '状态通知' | '系统通知'
|
||||
|
||||
/** 站内消息 */
|
||||
export interface Message {
|
||||
id: string
|
||||
type: MessageType
|
||||
title: string
|
||||
summary: string
|
||||
/** 正文纯文本,详情页 pre-wrap 渲染 */
|
||||
content: string
|
||||
publishTime: string
|
||||
isRead: boolean
|
||||
attachments: FileInfo[]
|
||||
}
|
||||
|
||||
/** 消息查询条件 */
|
||||
export interface MessageQuery {
|
||||
keyword: string
|
||||
type: MessageType | 'all'
|
||||
|
||||
14
src/types/business/profile.d.ts
vendored
14
src/types/business/profile.d.ts
vendored
@@ -1,23 +1,18 @@
|
||||
// 个人中心实体(M10:security/address/favorites/qualifications/feedback/help/about/hotline 共享)
|
||||
|
||||
import type { BusinessType, FileInfo } from '@/types/api'
|
||||
|
||||
/** 账号资料 */
|
||||
export interface Profile {
|
||||
nickname: string
|
||||
phone: string
|
||||
email: string
|
||||
/** 密码上次修改时间(展示值,如 '15天前') */
|
||||
passwordModifiedAt: string
|
||||
}
|
||||
|
||||
/** 修改密码入参 */
|
||||
export interface ChangePasswordParams {
|
||||
code: string
|
||||
password: string
|
||||
}
|
||||
|
||||
/** 收货地址 */
|
||||
export interface Address {
|
||||
id: string
|
||||
receiverName: string
|
||||
@@ -27,7 +22,6 @@ export interface Address {
|
||||
isDefault: boolean
|
||||
}
|
||||
|
||||
/** 资质类型 */
|
||||
export type QualificationType =
|
||||
| '营业执照'
|
||||
| '生产许可证'
|
||||
@@ -36,10 +30,8 @@ export type QualificationType =
|
||||
| '授权书'
|
||||
| '其他资质'
|
||||
|
||||
/** 资质审核状态 */
|
||||
export type QualificationStatus = '已认证' | '审核中' | '未通过'
|
||||
|
||||
/** 资质 */
|
||||
export interface Qualification {
|
||||
id: string
|
||||
type: QualificationType
|
||||
@@ -52,35 +44,29 @@ export interface Qualification {
|
||||
attachments: FileInfo[]
|
||||
}
|
||||
|
||||
/** 资质新增/编辑提交载荷(id 存在为编辑) */
|
||||
export type QualificationInput = Omit<Qualification, 'id' | 'status'> & { id?: string }
|
||||
|
||||
/** 意见反馈 */
|
||||
export interface Feedback {
|
||||
title: string
|
||||
description: string
|
||||
attachments: FileInfo[]
|
||||
}
|
||||
|
||||
/** 列表分页查询 */
|
||||
export interface ListQuery {
|
||||
page: number
|
||||
pageSize: number
|
||||
}
|
||||
|
||||
/** 我的收藏查询(关键字 + 分类 + 分页) */
|
||||
export interface FavoritesQuery extends ListQuery {
|
||||
keyword: string
|
||||
category: BusinessType | 'all'
|
||||
}
|
||||
|
||||
/** 帮助中心 FAQ 条目 */
|
||||
export interface HelpFaqItem {
|
||||
q: string
|
||||
a: string
|
||||
}
|
||||
|
||||
/** 帮助中心 FAQ 分组 */
|
||||
export interface HelpFaqGroup {
|
||||
title: string
|
||||
items: HelpFaqItem[]
|
||||
|
||||
228
src/types/business/project.d.ts
vendored
228
src/types/business/project.d.ts
vendored
@@ -1,15 +1,6 @@
|
||||
// 项目中心实体(PRD M5)
|
||||
|
||||
import type { BusinessType, FileInfo } from '@/types/api'
|
||||
|
||||
/**
|
||||
* 项目状态(详情页展示口径,中文)。
|
||||
*
|
||||
* <p>取值 = 两张表状态码值的并集经 {@link PROJECT_STATUS_LABEL} 映射后的中文:
|
||||
* 需求侧 `INITIATING`(待立项)/ `CANCELLED`(已取消),项目侧 `IN_PROGRESS` /
|
||||
* `PENDING_ACCEPTANCE` / `PENDING_INTERNAL_ACCEPTANCE` / `COMPLETED` / `AFTER_SALE`。
|
||||
* 「待内部验收」数量少但确实存在,故保留。</p>
|
||||
*/
|
||||
export type ProjectStatus =
|
||||
| '待立项'
|
||||
| '进行中'
|
||||
@@ -19,17 +10,6 @@ export type ProjectStatus =
|
||||
| '售后中'
|
||||
| '已取消'
|
||||
|
||||
/**
|
||||
* 列表行状态码值 —— 后端 `COALESCE(rd_project.status, project_requirement.status)`。
|
||||
*
|
||||
* <p>列表接口已改为「需求表为主 + LEFT JOIN 项目表」:已立项取项目状态,未立项回落到需求状态。
|
||||
* 因此这里 = 两张表状态的<b>并集</b>:<br>
|
||||
* · 项目表 `vm_rd_project.status`:IN_PROGRESS / PENDING_ACCEPTANCE /
|
||||
* PENDING_INTERNAL_ACCEPTANCE / COMPLETED / AFTER_SALE / CANCELLED<br>
|
||||
* · 需求表 `vm_project_requirement.status` 额外提供:<b>INITIATING(待立项)</b></p>
|
||||
*
|
||||
* <p>所以设计稿画的「待立项」现在是真实码值(= 需求已提报、尚未立项)。</p>
|
||||
*/
|
||||
export type RdProjectStatus =
|
||||
| 'INITIATING'
|
||||
| 'IN_PROGRESS'
|
||||
@@ -39,20 +19,12 @@ export type RdProjectStatus =
|
||||
| 'AFTER_SALE'
|
||||
| 'CANCELLED'
|
||||
|
||||
/**
|
||||
* 项目列表行 —— 后端 `RdProjectVo`(`GET /web/requirementPool/list` 的 `requirementPage.rows`)。
|
||||
*
|
||||
* <p>`id` 后端是 Long,但全局 Jackson 配置序列化成字符串(已实测),故按 string 声明。
|
||||
* `progress` 是 Integer,可能为 null(库里大量为空)⇒ 展示层要兜底成「—」。</p>
|
||||
*/
|
||||
export interface RdProjectVo {
|
||||
id: string
|
||||
/** 外部项目关联的需求主键,内部项目为 null */
|
||||
requirementId?: string | null
|
||||
projectNo: string
|
||||
/** EXTERNAL / INTERNAL */
|
||||
sourceType?: string | null
|
||||
/** 业务类型快照:存的是**提报表主键 id**(如 '1'),不是类型名 ⇒ 展示要经 label 映射 */
|
||||
businessType?: string | null
|
||||
projectName: string
|
||||
requirementDesc?: string | null
|
||||
@@ -74,29 +46,17 @@ export interface RdProjectVo {
|
||||
updateTime?: string | null
|
||||
}
|
||||
|
||||
/** 业务类型统计单项(后端 `ProjectRequirementCountVo`) */
|
||||
export interface ProjectBusinessTypeCount {
|
||||
/** 提报表主键 id(与列表筛选参数 `businessType` 同口径) */
|
||||
businessTypeId: string
|
||||
/** 业务类型名称,如「互联网软件」 */
|
||||
businessTypeLabel: string
|
||||
count: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务数据统计(后端 `ProjectRequirementStatisticsVo`)。
|
||||
*
|
||||
* <p>来源是独立端点 `GET /web/requirementPool/getFilterConditions`(**全量口径**,不随筛选 / 分页变化)。</p>
|
||||
*
|
||||
* <p>⚠️ 列表接口 `/list` 响应里的同名字段后端仍是注释状态、实测恒为 `null`,**不要**拿它当统计源。
|
||||
* 这里仍按「可能为 null」处理:拿不到时筛选栏只剩「全部」一行。</p>
|
||||
*/
|
||||
export interface ProjectStatistics {
|
||||
total?: number | null
|
||||
businessTypeCounts?: ProjectBusinessTypeCount[] | null
|
||||
}
|
||||
|
||||
/** 列表响应(后端 `ProjectRequirementAndCountVo`:分页数据 + 统计平级) */
|
||||
export interface ProjectListResult {
|
||||
requirementPage?: {
|
||||
total: number
|
||||
@@ -105,38 +65,22 @@ export interface ProjectListResult {
|
||||
requirementStatistics?: ProjectStatistics | null
|
||||
}
|
||||
|
||||
/** 里程碑节点 */
|
||||
export interface Milestone {
|
||||
name: string
|
||||
status: '待开始' | '进行中' | '已完成'
|
||||
time?: string
|
||||
}
|
||||
|
||||
/** 团队成员 */
|
||||
export interface TeamMember {
|
||||
role: string
|
||||
name: string
|
||||
avatarChar: string
|
||||
}
|
||||
|
||||
/** 项目账单(付款计划) */
|
||||
export interface ProjectBill {
|
||||
id: string
|
||||
/**
|
||||
* 数据来源:
|
||||
* - `bill` = 真账单(`vm_bill`)—— `id` 是账单 id,可跳收银台支付;
|
||||
* - `plan` = 仅付款计划(`vm_bill_plan`)—— 后端未重启(响应无 `bills`)时的只读回落,
|
||||
* **没有账单 id,不可支付**(计划 id 与账单 id 值域重叠,拿来当收银台入参会查到别的账单)。
|
||||
*/
|
||||
source: 'bill' | 'plan'
|
||||
planName: string
|
||||
/**
|
||||
* 期次占比(%),已归一成**可展示文本**(如 `"30"`;非整数比例保留一位小数)。
|
||||
*
|
||||
* <p>数据源:账单 `vm_bill.period_ratio`(BigDecimal,字符串下发),回落卡则由
|
||||
* `periodRule` 第 N 段折算。设计稿卡片标题是「第2期·进度款 比例30%」⇒ 标题 = 期次名 + 比例。
|
||||
* 缺失/非法时为空串,模板据此不渲染「比例」片段。</p>
|
||||
*/
|
||||
periodRatio?: string
|
||||
billNo: string
|
||||
amount: number
|
||||
@@ -145,48 +89,19 @@ export interface ProjectBill {
|
||||
projectName: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 售后工单(详情页组件契约)。
|
||||
*
|
||||
* <p>两态:`处理中` = 售后工单存在且未撤回/未作废(含后端 REQUESTED / IN_PROGRESS);
|
||||
* `无` = 没有工单,或最近一条已 WITHDRAWN(撤回后回到可再次申请的状态)。</p>
|
||||
*/
|
||||
export interface AfterSales {
|
||||
status: '无' | '处理中'
|
||||
/**
|
||||
* 售后类型 —— 申请页下拉的固定 8 项:软件 BUG 修复 / 软件 / 固件功能迭代 /
|
||||
* 硬件 PCB & 电路改版调整 / 硬件故障排查维修 / 成品不良品返修 / 元器件物料替换变更 /
|
||||
* 物联网整机联调与版本升级 / 交付资料补齐与技术答疑。
|
||||
* 库内暂无对应字典,值域先写在前端(`views/project/after-sales.vue#TYPE_OPTIONS`)。
|
||||
*/
|
||||
type: string
|
||||
/** 问题描述(后端 `reason`) */
|
||||
description: string
|
||||
/** 用户补充备注(后端 `remark`) */
|
||||
remark: string
|
||||
/** 售后工单附件(后端 `afterSaleAttachments`,phase = AFTER_SALE) */
|
||||
attachments: FileInfo[]
|
||||
/** 申请时间(后端 `requestTime`) */
|
||||
createTime: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 售后附件(已上传到 OSS,携带 ossId 以便提交时由后端转存)。
|
||||
*
|
||||
* <p>上传走需求提报的同一个 OSS 上传口(`POST /web/workOrderDraft/upload`),
|
||||
* 提交时只传 `ossId` 列表,后端按 `phase = AFTER_SALE`、`target_id = 售后工单 id`
|
||||
* 写进 `vm_project_requirement_attachment`,OSS 文件不重复上传。</p>
|
||||
*/
|
||||
export interface AfterSalesAttachment extends FileInfo {
|
||||
/** OSS 主键(提交时进 `attachmentOssIds`) */
|
||||
ossId: string | number
|
||||
}
|
||||
|
||||
/**
|
||||
* OSS 上传返回(后端 `SysOssVo` 的子集)—— 与需求提报共用同一个上传口。
|
||||
*
|
||||
* <p>⚠️ `fileSuffix` 带前导点(`.pdf`);响应里**没有**文件大小,大小要取本地 `File.size`。</p>
|
||||
*/
|
||||
export interface AfterSalesUploadVo {
|
||||
ossId: string | number
|
||||
url: string
|
||||
@@ -194,42 +109,18 @@ export interface AfterSalesUploadVo {
|
||||
fileSuffix?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 售后申请入参 —— **对齐后端 `ProjectRequirementActionBo`**。
|
||||
*
|
||||
* <p>字段名与页面语义的对应:页面「问题描述」→ {@link reason}、「补充备注」→ {@link note}。</p>
|
||||
*/
|
||||
export interface AfterSalesPayload {
|
||||
/** 售后类型(下拉 8 项之一),最长 50 */
|
||||
type: string
|
||||
/** 问题描述 → 后端 `reason`,最长 500 */
|
||||
reason: string
|
||||
/** 补充备注 → 后端 `note`(页面限 500,后端 BO 上限 2000) */
|
||||
note: string
|
||||
/** 附件 OSS 主键集合(空数组安全,后端 null 会走空判断) */
|
||||
attachmentOssIds: Array<string | number>
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目详情页数据模型 —— **详情页组件契约**,不是后端原样字段。
|
||||
*
|
||||
* <p>后端详情已拆成 4 个页签接口(见 {@link RequirementDetailBundle}),由
|
||||
* `utils/projectVo.ts#toProjectDetail` 合并映射成本类型;详情页 6 个子组件
|
||||
* (InfoCard/Team/Milestones/Files/Finance/AfterSales)只认这套字段,因此换数据来源
|
||||
* 不需要动组件。</p>
|
||||
*/
|
||||
export interface Project {
|
||||
id: string
|
||||
projectNo: string
|
||||
projectName: string
|
||||
/** 归一化后的枚举(未知类型会落到 'other',仅供图标/配色等视觉用途) */
|
||||
businessType: BusinessType
|
||||
/**
|
||||
* 后端**原样下发**的业务类型名称(如「互联网软件」,来自提报表)。
|
||||
*
|
||||
* <p>⚠️ 展示一律用它:`businessType` 只有 5 个固定枚举,后台新增业务类型时会全部落成
|
||||
* 「其他」——那是枚举的兜底,不是接口的值。</p>
|
||||
*/
|
||||
businessTypeName: string
|
||||
progress: number
|
||||
status: ProjectStatus
|
||||
@@ -245,61 +136,32 @@ export interface Project {
|
||||
afterSales?: AfterSales
|
||||
}
|
||||
|
||||
/** 业务类型筛选项 + 件数(左侧筛选栏「业务类型」列表;「全部」的 value 为 'all') */
|
||||
export interface ProjectTypeCount {
|
||||
/** 'all' 表示「全部」;否则是后端下发的 `businessTypeId` */
|
||||
value: string
|
||||
/** 展示文案(后端 `businessTypeLabel`;「全部」由前端给) */
|
||||
label: string
|
||||
/** 该类型下的项目件数(后端全量口径;统计缺失时为 0) */
|
||||
count: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目列表查询条件(**已是后端口径**)。
|
||||
*
|
||||
* <p>与 `RdProjectBo` 的字段对应关系:`keyword → key`、`businessTypes → businessTypes`(提报表 id,多选 IN)、
|
||||
* `status → status`(码值)、`startDate/endDate 或 timeShortcut → beginTime/endTime`(两者都落在
|
||||
* `create_time` 上)、`pageNum/pageSize → PageQuery`。</p>
|
||||
*
|
||||
* <p>用空串 / 空数组表示「不限」而不是 'all'——空值直接不出现在 querystring 里,与后端 `eqIfText` 的语义一致。</p>
|
||||
*/
|
||||
export interface ProjectQuery {
|
||||
keyword: string
|
||||
/** 空数组 = 全部;元素为后端统计下发的 businessTypeId(**多选**,后端走 IN) */
|
||||
businessTypes: string[]
|
||||
/** '' = 全部;否则为 {@link RdProjectStatus} 码值 */
|
||||
status: string
|
||||
/** 提交时间快捷区间;与 startDate/endDate 互斥(选其一会把另一组清空) */
|
||||
timeShortcut: 'all' | '3m' | '6m' | '1y'
|
||||
/** 提交时间自选区间起(YYYY-MM-DD,空串 = 不限) */
|
||||
startDate: string
|
||||
/** 提交时间自选区间止(YYYY-MM-DD,空串 = 不限) */
|
||||
endDate: string
|
||||
pageNum: number
|
||||
pageSize: number
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
// 详情契约:后端 4 个页签接口(都继承 ProjectRequirementBaseVo)
|
||||
// GET /web/requirementPool/get/progress/{id} → ProjectRequirementProgressVo
|
||||
// GET /web/requirementPool/get/files/{id} → ProjectRequirementFilesVo
|
||||
// GET /web/requirementPool/get/finance/{id} → ProjectRequirementFinanceVo
|
||||
// GET /web/requirementPool/get/afterSales/{id} → ProjectRequirementAfterSalesVo
|
||||
//
|
||||
// 为什么拆 4 个:详情页本就是 4 个页签,单接口要一次查全 8 张表;拆开后可「按页签取数」。
|
||||
// 4 个 VO 都带基础信息(继承 `ProjectRequirementBaseVo`)⇒ 任一页签的响应里都有项目名 /
|
||||
// 编号 / 业务类型 / 状态 / 提交时间,所以前端可以只用 `progress` 那一支渲染顶部信息卡,
|
||||
// 并保证切页签后信息卡不缺数据(合并逻辑见 utils/projectVo.ts#toProjectDetail)。
|
||||
//
|
||||
// 与列表一致:需求未立项时 `vm_rd_project` 没有对应行,项目侧字段(projectStage /
|
||||
// projectMilestones / members / billPlans / invoices / contracts)为空数组 / null,
|
||||
// 需求侧字段(基础信息 / requirementAttachments / afterSale)照常返回。
|
||||
// ⚠️ id 传的是**需求 id**(vm_project_requirement.id)= 列表行的 RdProjectVo.id;
|
||||
// 不存在 / 非本人 → 后端 `data` 为 null(详情页整页空态)。
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
/** 开发进度(后端 `ProjectStage`,表 `vm_project_stage`) */
|
||||
export interface RequirementProjectStage {
|
||||
id: string
|
||||
projectId: string | null
|
||||
@@ -309,12 +171,10 @@ export interface RequirementProjectStage {
|
||||
startTime: string | null
|
||||
planTime: string | null
|
||||
finishTime: string | null
|
||||
/** 开发进度百分比(列表页那个 progress 的详情侧来源) */
|
||||
developmentProgress: number | null
|
||||
sort: number | null
|
||||
}
|
||||
|
||||
/** 里程碑(后端 `RdProjectMilestone`,表 `vm_rd_project_milestone`) */
|
||||
export interface RequirementMilestone {
|
||||
id: string
|
||||
projectId: string | null
|
||||
@@ -326,22 +186,18 @@ export interface RequirementMilestone {
|
||||
parallelFlag: boolean | null
|
||||
}
|
||||
|
||||
/** 需求附件(后端 `ProjectRequirementAttachment`,表 `vm_project_requirement_attachment`) */
|
||||
export interface RequirementAttachment {
|
||||
id: string
|
||||
requirementId: string | null
|
||||
/** 附件所属阶段,实测有 `REQUIREMENT` */
|
||||
phase: string | null
|
||||
ossId: string | null
|
||||
originalName: string | null
|
||||
url: string | null
|
||||
fileSize: number | null
|
||||
sortOrder: number | null
|
||||
/** 上传时间(继承 BaseEntity,后端会下发) */
|
||||
createTime?: string | null
|
||||
}
|
||||
|
||||
/** 项目团队(后端 `RdProjectMember`,表 `vm_rd_project_member`) */
|
||||
export interface RequirementMember {
|
||||
id: string
|
||||
projectId: string | null
|
||||
@@ -352,12 +208,6 @@ export interface RequirementMember {
|
||||
isOwner: boolean | null
|
||||
}
|
||||
|
||||
/**
|
||||
* 账单(后端 `Bill`,表 `vm_bill`)—— 「合同财务」页签卡片的**数据源**。
|
||||
*
|
||||
* <p>设计稿卡片上的字段(「账单号」+ 已支付/待支付/未到期)只有这张表才有;
|
||||
* 且 `id` 直接就是收银台 `?ids=` 要传的**账单 id**(不是付款计划 id)。</p>
|
||||
*/
|
||||
export interface RequirementBill {
|
||||
id: string
|
||||
billNo: string | null
|
||||
@@ -365,14 +215,11 @@ export interface RequirementBill {
|
||||
projectNo: string | null
|
||||
projectName: string | null
|
||||
userId: string | null
|
||||
/** ⚠️ BigDecimal ⇒ 后端以**字符串**下发("24000.00"),用前必须 `Number()` 归一 */
|
||||
amount: string | number | null
|
||||
contractId: string | null
|
||||
/** ADVANCE / PROGRESS / FINAL / OTHER */
|
||||
billType: string | null
|
||||
/** 期次名,如「第2期·进度款」 */
|
||||
periodName: string | null
|
||||
/** 占项目总额比例(%),如 40.00 */
|
||||
periodRatio: string | number | null
|
||||
/** UNSTARTED / PENDING / PAID / CANCELLED */
|
||||
status: string | null
|
||||
@@ -381,95 +228,62 @@ export interface RequirementBill {
|
||||
tradeName: string | null
|
||||
payTime: string | null
|
||||
dueDate: string | null
|
||||
/** 创建时间(继承 BaseEntity,后端会下发) */
|
||||
createTime?: string | null
|
||||
}
|
||||
|
||||
/** 付款计划(后端 `BillPlan`,表 `vm_bill_plan`) */
|
||||
export interface RequirementBillPlan {
|
||||
id: string
|
||||
projectId: string | null
|
||||
projectNo: string | null
|
||||
projectName: string | null
|
||||
/** ⚠️ BigDecimal ⇒ 后端以**字符串**下发("120000.00"),用前必须 `Number()` 归一 */
|
||||
totalAmount: string | number | null
|
||||
periods: number | null
|
||||
currentPeriod: number | null
|
||||
periodRule: string | null
|
||||
nextDate: string | null
|
||||
status: string | null
|
||||
/**
|
||||
* 该期支付单的商户订单号(`vm_finance_payment.out_trade_no`)——
|
||||
* **页面「账单号」就显示它**;未支付(该期还没下过单)时为 null。
|
||||
*/
|
||||
orderNo: string | null
|
||||
/** 支付成功回写的交易流水号(`vm_finance_payment.transaction_no`);未支付为 null */
|
||||
transactionNo: string | null
|
||||
/** 支付通道:WECHAT/ALIPAY/...;未支付为 null */
|
||||
payChannel: string | null
|
||||
/** 该期实付金额(元);未支付为 null */
|
||||
payAmount: string | number | null
|
||||
/** 支付单状态:CREATED/SUCCESS/FAILED/REFUNDED;未支付为 null */
|
||||
payStatus: string | null
|
||||
/** 支付时间;未支付为 null */
|
||||
payTime: string | null
|
||||
}
|
||||
|
||||
/** 发票(后端 `Invoice`,表 `vm_invoice`) */
|
||||
export interface RequirementInvoice {
|
||||
id: string
|
||||
billId: string | null
|
||||
invoiceTitle: string | null
|
||||
taxNo: string | null
|
||||
invoiceType: string | null
|
||||
/** ⚠️ BigDecimal ⇒ 字符串下发,用前 `Number()` 归一 */
|
||||
amount: string | number | null
|
||||
status: string | null
|
||||
invoiceNo: string | null
|
||||
/** 电子发票文件地址 */
|
||||
invoiceFile: string | null
|
||||
applyTime: string | null
|
||||
invoiceDate: string | null
|
||||
/** 申请时间(继承 BaseEntity,后端会下发) */
|
||||
createTime?: string | null
|
||||
}
|
||||
|
||||
/** 合同(后端 `Contract`,表 `vm_contract`) */
|
||||
export interface RequirementContract {
|
||||
id: string
|
||||
contractNo: string | null
|
||||
projectId: string | null
|
||||
title: string | null
|
||||
/** ⚠️ BigDecimal ⇒ 字符串下发,用前 `Number()` 归一 */
|
||||
amount: string | number | null
|
||||
signStatus: string | null
|
||||
status: string | null
|
||||
signDate: string | null
|
||||
/** 合同文件地址 */
|
||||
file: string | null
|
||||
/** 签署时间(继承 BaseEntity,后端会下发) */
|
||||
createTime?: string | null
|
||||
}
|
||||
|
||||
/** 售后工单(后端 `ProjectRequirementAfterSale`,表 `vm_project_requirement_after_sale`) */
|
||||
export interface RequirementAfterSale {
|
||||
id: string
|
||||
requirementId: string | null
|
||||
/**
|
||||
* 售后类型 —— 申请页下拉的固定 8 项:软件 BUG 修复 / 软件 / 固件功能迭代 /
|
||||
* 硬件 PCB & 电路改版调整 / 硬件故障排查维修 / 成品不良品返修 / 元器件物料替换变更 /
|
||||
* 物联网整机联调与版本升级 / 交付资料补齐与技术答疑。
|
||||
* 库内暂无对应字典,值域先写在前端(`views/project/after-sales.vue#TYPE_OPTIONS`)。
|
||||
*/
|
||||
type: string | null
|
||||
/** 售后原因(用户在申请页填的「问题描述」) */
|
||||
reason: string | null
|
||||
/** 用户补充备注(申请页的「补充备注」) */
|
||||
remark: string | null
|
||||
/**
|
||||
* REQUESTED(待受理)/ IN_PROGRESS(处理中)/ WITHDRAWN(已撤回)/ COMPLETED(已完成)
|
||||
* —— 见 `ProjectRequirementConstants`。
|
||||
*/
|
||||
status: string | null
|
||||
requestUserName: string | null
|
||||
requestTime: string | null
|
||||
@@ -479,81 +293,39 @@ export interface RequirementAfterSale {
|
||||
withdrawReason: string | null
|
||||
}
|
||||
|
||||
/**
|
||||
* 4 个页签接口的公共基础信息(后端 `ProjectRequirementBaseVo`)。
|
||||
*
|
||||
* <p>字段全部来自需求表 `vm_project_requirement`,**与是否立项无关**,任意页签都填充。</p>
|
||||
*/
|
||||
export interface RequirementBaseVo {
|
||||
/** 需求 id(= 详情接口路径参数 = 列表行 RdProjectVo.id) */
|
||||
id: string
|
||||
projectNo: string | null
|
||||
projectName: string | null
|
||||
/** 业务类型**中文名**(如「硬件电路」),非英文 code */
|
||||
businessType: string | null
|
||||
/** 状态码值:需求侧 INITIATING/CANCELLED,项目侧 IN_PROGRESS/… */
|
||||
status: string | null
|
||||
/** 提交时间 */
|
||||
createTime: string | null
|
||||
/** 提交人名称 */
|
||||
submitUserName: string | null
|
||||
}
|
||||
|
||||
/** 「项目进度」页签(后端 `ProjectRequirementProgressVo`):基础信息 + 开发进度 + 里程碑 + 团队 */
|
||||
export interface RequirementProgressVo extends RequirementBaseVo {
|
||||
/** 开发进度;未立项为 null */
|
||||
projectStage: RequirementProjectStage | null
|
||||
/**
|
||||
* 总体进度百分比(= 列表 `RdProjectVo.progress`,同源 `vm_rd_project.progress`)。
|
||||
* 后端在项目行没有 progress 时回落到 `projectStage.developmentProgress`;未立项为 null。
|
||||
*/
|
||||
developmentProgress?: number | null
|
||||
projectMilestones: RequirementMilestone[]
|
||||
/** 项目团队;未立项为空数组 */
|
||||
members: RequirementMember[]
|
||||
}
|
||||
|
||||
/** 「项目文件」页签(后端 `ProjectRequirementFilesVo`):基础信息 + 需求附件 */
|
||||
export interface RequirementFilesVo extends RequirementBaseVo {
|
||||
/** 需求附件;与是否立项无关,始终填充 */
|
||||
requirementAttachments: RequirementAttachment[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 「合同财务」页签(后端 `ProjectRequirementFinanceVo`):基础信息 + 账单 + 付款计划 + 发票 + 合同。
|
||||
*
|
||||
* <p><b>卡片优先用 `bills`</b>(真账单:账单号 / 本期金额 / 真状态 / 可支付 id)。
|
||||
* 该字段**只在含「账单下发」改动的后端构建里才有**——运行态若是旧构建,响应里根本没有
|
||||
* 这个 key,所以声明成可选,由 `utils/projectVo.ts` 判别后回落到 `billPlans`(只读卡片)。</p>
|
||||
*/
|
||||
export interface RequirementFinanceVo extends RequirementBaseVo {
|
||||
/** 真账单(`vm_bill`);**旧构建不下发该字段(undefined)**,新构建即使无账单也会给空数组 */
|
||||
bills?: RequirementBill[]
|
||||
/** 付款计划(`vm_bill_plan`):分期规则,作为 `bills` 缺失时的只读回落 */
|
||||
billPlans: RequirementBillPlan[]
|
||||
invoices: RequirementInvoice[]
|
||||
contracts: RequirementContract[]
|
||||
}
|
||||
|
||||
/** 「售后信息」页签(后端 `ProjectRequirementAfterSalesVo`):基础信息 + 售后工单 + 工单附件 */
|
||||
export interface RequirementAfterSalesVo extends RequirementBaseVo {
|
||||
/** 售后工单;无则 null */
|
||||
afterSale: RequirementAfterSale | null
|
||||
/**
|
||||
* 售后工单附件 —— 与需求附件同表 `vm_project_requirement_attachment`,
|
||||
* 靠 `phase = AFTER_SALE` + `target_id = 售后工单 id` 区分。
|
||||
* 后端无条件下发(无工单时为空数组),前端直接渲染即可。
|
||||
*/
|
||||
afterSaleAttachments: RequirementAttachment[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情页四接口聚合结果。
|
||||
*
|
||||
* <p>`api/project.ts#getProjectDetail` 同帧并行取回 4 个页签后交给
|
||||
* `utils/projectVo.ts#toProjectDetail` 合并成组件契约 {@link Project};
|
||||
* 任一接口返回 null(需求不存在 / 非本人)即整页空态。</p>
|
||||
*/
|
||||
export interface RequirementDetailBundle {
|
||||
progress: RequirementProgressVo
|
||||
files: RequirementFilesVo
|
||||
|
||||
4
src/types/business/service.d.ts
vendored
4
src/types/business/service.d.ts
vendored
@@ -1,14 +1,10 @@
|
||||
// 在线客服会话实体(PRD M9 在线客服)
|
||||
|
||||
/** 会话角色 */
|
||||
export type ChatRole = 'user' | 'assistant'
|
||||
|
||||
/** 会话消息 */
|
||||
export interface ChatMessage {
|
||||
id: string
|
||||
role: ChatRole
|
||||
content: string
|
||||
/** 文件消息卡片(有值时按文件渲染) */
|
||||
file?: {
|
||||
name: string
|
||||
size: number
|
||||
|
||||
12
src/types/business/user.d.ts
vendored
12
src/types/business/user.d.ts
vendored
@@ -1,6 +1,4 @@
|
||||
// 用户/认证实体(M4,page-architecture)
|
||||
|
||||
/** 用户 */
|
||||
export interface User {
|
||||
id: string
|
||||
nickname: string
|
||||
@@ -10,11 +8,6 @@ export interface User {
|
||||
passwordModifiedAt: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录用户资料(GET /system/user/profile,后端 SysUserVo 的子集)。
|
||||
*
|
||||
* <p>字段名与后端一致:`nickName` / `phoneNumber`(不是 nickname / phone)。</p>
|
||||
*/
|
||||
export interface UserProfileVo {
|
||||
userId: string
|
||||
userName: string
|
||||
@@ -25,25 +18,21 @@ export interface UserProfileVo {
|
||||
deptName: string
|
||||
}
|
||||
|
||||
/** 账号密码登录参数 */
|
||||
export interface LoginByAccountParams {
|
||||
account: string
|
||||
password: string
|
||||
}
|
||||
|
||||
/** 短信验证码登录参数 */
|
||||
export interface LoginBySmsParams {
|
||||
phone: string
|
||||
code: string
|
||||
}
|
||||
|
||||
/** 登录结果 */
|
||||
export interface LoginResult {
|
||||
token: string
|
||||
user: User
|
||||
}
|
||||
|
||||
/** 注册参数 */
|
||||
export interface RegisterParams {
|
||||
phone: string
|
||||
code: string
|
||||
@@ -52,7 +41,6 @@ export interface RegisterParams {
|
||||
agree: boolean
|
||||
}
|
||||
|
||||
/** 找回/重置密码参数 */
|
||||
export interface ResetPasswordParams {
|
||||
phone: string
|
||||
code: string
|
||||
|
||||
2
src/types/global.d.ts
vendored
2
src/types/global.d.ts
vendored
@@ -1,8 +1,6 @@
|
||||
// 全局声明(Window 扩展等,按需添加)
|
||||
export {}
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
// 全局挂载扩展位
|
||||
}
|
||||
}
|
||||
|
||||
9
src/types/router.d.ts
vendored
9
src/types/router.d.ts
vendored
@@ -1,18 +1,9 @@
|
||||
// RouteMeta 扩展
|
||||
export {}
|
||||
|
||||
declare module 'vue-router' {
|
||||
interface RouteMeta {
|
||||
/** 页面标题(document.title) */
|
||||
title?: string
|
||||
/** 是否需要登录 */
|
||||
requiresAuth?: boolean
|
||||
/**
|
||||
* 是否展示公共底栏(AppFooter)。
|
||||
*
|
||||
* <p>默认不展示:底栏信息量大、只在门户首页作为站点信息区出现,
|
||||
* 其余页面(列表/详情/登录区)不渲染,避免干扰正文。</p>
|
||||
*/
|
||||
footer?: boolean
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user