Files
fe_supplier_frontend/src/servers/api/typings.d.ts

1022 lines
22 KiB
TypeScript
Raw Normal View History

2025-06-17 14:20:06 +08:00
declare namespace API {
type APIResponse<T> = {
code: number;
success: boolean;
message: string;
data: T;
}
2025-06-17 18:32:33 +08:00
export type PolicyRequest = {
/**
*
*/
content: string;
/**
* _英文版
*/
contentEn: string;
/**
* (0.1.)
*/
isTop: string;
/**
* (0.1.)
*/
settingEn: number;
/**
*
*/
title: string;
/**
*
*/
titleEn: string;
[property: string]: any;
}
2025-06-17 14:20:06 +08:00
export type RegisterRequest = {
coscoSupplierBank: CoscoSupplierBank[];
coscoSupplierBase: CoscoSupplierBase;
coscoSupplierInvoice: CoscoSupplierInvoice;
coscoSupplierQualifications: CoscoSupplierQualification[];
coscoSupplierSurvey: CoscoSupplierSurvey;
coscoSupplierSurveyAttachments: CoscoSupplierSurveyAttachment[];
coscoSupplierSurveyQuestionReply: CoscoSupplierSurveyQuestionReply[];
[property: string]: any;
}
export type CoscoSupplierBank = {
account?: string;
accountName?: string;
bank?: string;
city?: string;
currency?: string;
interbankNumber?: string;
nation?: string;
province?: string;
[property: string]: any;
}
export type CoscoSupplierBase = {
capital: number;
contactsEmail: string;
contactsName: string;
contactsPhone: string;
contactsType: string;
enterpriseType: string;
idCard: string;
legalPerson: string;
licenceAccessory: string;
licenceDate: string;
name: string;
nameEn: string;
parentCompanyInvestor: string;
range: string;
regAddress: string;
socialCreditCode: string;
supplierType: string;
telephone: string;
workAddress: string;
[property: string]: any;
}
export type CoscoSupplierInvoice = {
account: string;
address: string;
bank: string;
head: string;
phone: string;
qualificationCertificate: string;
taxpayerCode: string;
taxpayerType: string;
[property: string]: any;
}
export type CoscoSupplierQualification = {
accessory?: string;
authority?: string;
certificateType?: string;
code?: string;
dateTime?: string;
name?: string;
termOfValidity?: string;
typeLevel?: string;
[property: string]: any;
}
export type CoscoSupplierSurvey = {
dateTime: string;
email: string;
name: string;
phone: string;
position: string;
supplierName: string;
[property: string]: any;
}
export type CoscoSupplierSurveyAttachment = {
attachmentsType: string;
fileName: string;
filePath: string;
fileSize: string;
fileType: string;
fileUrl: string;
[property: string]: any;
}
export type CoscoSupplierSurveyQuestionReply = {
replyValue?: string;
surveyQuestionId?: string;
[property: string]: any;
}
// 调查问卷返回类型
type SurveyQuestionResponse = {
id: string;
question: string;
orderBy: string;
coscoSurveyQuestionOptionList: {
id: string;
opentionValue: string;
optionName: string;
}[];
}[]
2025-06-17 18:32:33 +08:00
2025-06-18 14:37:42 +08:00
// 通用响应类型
type Response<T = any> = {
success: boolean;
data: T;
message?: string;
code?: number;
};
// 分页响应类型
type PageResponse<T = any> = {
records: T[];
total: number;
size: number;
current: number;
pages: number;
};
// 基础分页请求
interface BasePageRequest {
2025-06-17 18:32:33 +08:00
pageNo: number;
pageSize: number;
2025-06-18 14:37:42 +08:00
[property: string]: any;
2025-06-17 18:32:33 +08:00
}
// 分页请求参数
2025-06-18 14:37:42 +08:00
interface PageRequest {
2025-06-17 18:32:33 +08:00
basePageRequest: BasePageRequest;
2025-06-18 14:37:42 +08:00
[property: string]: any;
2025-06-17 18:32:33 +08:00
}
// 政策法规数据项
export interface PolicyRecord {
basePageRequest: null;
content: string;
contentEn: string;
createBy: string;
createDate: null;
createTime: string;
deleteFlag: null;
delFlag: string;
id: string;
isTop: string;
lastUpdateTime: null;
publishBy: string | null;
publishTime: string | null;
settingEn: string;
status: string;
tenantId: string | null;
tenantName: string | null;
title: string;
titleEn: string | null;
updateBy: string | null;
updateDate: string | null;
updateTime: string;
}
// 政策法规请求参数
export interface PolicyRequest {
id?: string;
title: string;
titleEn: string;
content: string;
contentEn: string;
isTop: string;
settingEn: number;
}
// 下载中心数据项
export interface DownloadRecord {
id: string;
name: string;
category: string;
keyword: string;
createTime: string;
createBy: string;
status: string; // 状态0-草稿1-已发布
thumbnail?: string; // 缩略图URL
fileUrl?: string; // 文件URL
}
// 下载中心请求参数
export interface DownloadRequest {
id?: string;
name: string;
category: string;
keyword: string;
fileId?: string;
thumbnailId?: string;
}
// 下载中心查询参数
export interface DownloadSearchParams {
name?: string;
category?: string;
status?: string;
}
// 文件上传响应
export interface UploadResponse {
id: string;
fileName: string;
fileSize: number;
fileType: string;
fileUrl: string;
}
2025-06-17 21:06:27 +08:00
// 通知中心数据项
export interface NoticeRecord {
id: string;
title: string;
titleEn?: string;
content: string;
contentEn?: string;
createTime: string;
createBy: string;
status: string; // 状态0-草稿1-已发布2-已下架
isTop: string; // 是否置顶0-否1-是
settingEn?: number; // 是否设置英文0-否1-是
}
// 通知中心请求参数
export interface NoticeRequest {
id?: string;
title: string;
titleEn?: string;
content: string;
contentEn?: string;
isTop: string;
settingEn?: number;
}
// 通知中心查询参数
export interface NoticeSearchParams {
title?: string;
status?: string;
2025-06-18 14:37:42 +08:00
pageNo?: number;
pageSize?: number;
2025-06-17 21:06:27 +08:00
}
// 帮助中心数据项
export interface HelpRecord {
id: string;
title: string;
titleEn?: string;
type: string; // 类型对应页面中的category
content: string;
contentEn?: string;
createTime: string;
createBy: string;
updateTime?: string;
updateBy?: string;
status: string; // 状态0-草稿1-已发布2-已下架
isTop: string; // 是否置顶0-否1-是
settingEn: number; // 是否设置英文0-否1-是
answerContent?: string;
answerContentNe?: string;
publishBy?: string | null;
publishTime?: string | null;
deleteFlag?: null;
delFlag?: string;
tenantId?: string | null;
tenantName?: string | null;
lastUpdateTime?: null;
createDate?: null;
updateDate?: null;
basePageRequest?: null;
}
// 帮助中心请求参数
export interface HelpRequest {
id?: string;
title: string;
titleEn?: string;
type: string; // 类型对应页面中的category
content: string;
contentEn?: string;
isTop: string;
settingEn: number;
answerContent?: string;
answerContentNe?: number;
}
// 帮助中心查询参数
export interface HelpSearchParams {
title?: string;
type?: string; // 类型对应页面中的category
status?: string;
pageNo?: number;
pageSize?: number;
}
// 用户提问数据项
export interface UserQuestionRecord {
id: string;
userId: string;
username: string;
email?: string;
question: string;
answer?: string;
createTime: string;
answerTime?: string;
status: string; // 状态0-未回答1-已回答
}
// 用户提问查询参数
export interface UserQuestionSearchParams {
question?: string;
status?: string;
pageNo?: number;
pageSize?: number;
}
2025-06-18 14:37:42 +08:00
// 用户问题记录类型
interface QuestionRecord {
id: string;
title: string;
type: string;
content: string;
answerContent?: string;
userName: string;
companyName: string;
fullName: string;
contactDetails: string;
email: string;
askTime: string;
answerTime?: string;
answerBy?: string;
isAnswer: string; // 0-未回答1-已回答
isPublished?: number; // 0-未发布1-已发布
isTop?: number; // 0-未置顶1-已置顶
createTime?: string;
updateTime?: string;
}
// 问题列表请求参数
interface QuestionListRequest {
isAnswer?: number; // 0-未回答1-已回答
title?: string;
type?: string;
[property: string]: any;
}
// 问题添加请求参数
interface QuestionAddRequest {
title: string;
content: string;
type: string;
fullName: string;
companyName: string;
userName: string;
contactDetails: string;
email: string;
}
// 问题回答请求参数
interface QuestionAnswerRequest {
id: string;
answerContent: string;
isPublished?: number; // 0-未发布1-已发布
isTop?: number; // 0-未置顶1-已置顶
}
// 问题状态更新请求参数
interface QuestionStatusRequest {
id: string;
isPublished?: number; // 0-未发布1-已发布
isTop?: number; // 0-未置顶1-已置顶
}
// 友情链接分类类型定义
interface CategoryType {
id: string;
name: string;
type: string;
parentId: string;
orderBy: string;
remark: string;
delFlag?: string;
createTime?: string;
updateTime?: string;
createBy?: string;
updateBy?: string;
key?: string;
children?: CategoryType[];
}
// 友情链接类型定义
interface LinkType {
id: string;
classificationId: string;
name: string;
nameEn: string;
thumbnail: string;
url: string;
status: string;
orderBy: string;
createTime?: string;
updateTime?: string;
categoryName?: string; // 用于显示
2025-06-18 18:46:32 +08:00
// 以下是详情接口返回的额外字段
createBy?: string;
createDate?: string | null;
updateBy?: string | null;
updateDate?: string | null;
tenantId?: string | null;
tenantName?: string | null;
deleteFlag?: string | null;
lastUpdateTime?: string | null;
delFlag?: string;
remark?: string | null;
basePageRequest?: null;
}
// 友情链接分类请求参数
export interface CategoryRequest {
id?: string;
name: string;
type: string;
parentId: string;
orderBy: string;
remark: string;
}
// 友情链接分类响应数据
export interface CategoryItem {
id: string;
name: string;
type: string;
parentId: string;
orderBy: string;
remark: string;
delFlag: string;
createTime: string;
updateTime: string;
createBy: string;
updateBy?: string;
}
// 友情链接请求参数
export interface LinkRequest {
id?: string | number;
classificationId: string;
name: string;
nameEn: string;
thumbnail: string;
url: string;
orderBy: number | string;
}
// 友情链接响应数据
export interface LinkItem {
id: string;
classificationId: string;
name: string;
nameEn: string;
thumbnail: string;
url: string;
status: string;
orderBy: string;
delFlag: string;
createTime: string;
updateTime: string;
createBy: string;
updateBy?: string;
remark?: string;
basePageRequest?: null;
}
2025-06-18 22:04:33 +08:00
// 供应商评价任务状态枚举
export enum TaskStatus {
DRAFT = '0', // 草稿
PUBLISHED = '1', // 已发布
PROCESSING = '2', // 进行中
COMPLETED = '3', // 已完成
CANCELED = '4', // 已取消
}
// 供应商评价任务类型枚举
export enum TaskType {
REGULAR = '1', // 常规评价
SPECIAL = '2', // 专项评价
}
// 供应商评价任务记录类型
export interface TaskRecord {
id: string;
taskName: string;
taskCode: string;
taskType: string;
templateName: string;
status: string;
startTime: string;
endTime: string;
createBy: string;
createTime: string;
updateBy?: string;
updateTime?: string;
key?: string;
}
// 供应商评价任务查询参数
export interface TaskSearchParams {
taskName?: string;
taskCode?: string;
taskType?: string;
status?: string;
dateRange?: [string, string];
}
// 供应商评价任务请求参数
export interface TaskRequest {
id?: string;
taskName: string;
taskCode: string;
taskType: string;
templateId: string;
startTime: string;
endTime: string;
}
2025-06-17 14:20:06 +08:00
}
2025-06-23 19:15:13 +08:00
// 供应商评价模块类型定义
declare namespace SupplierEvaluate {
// 模板管理类型定义
export type TemplateBasePageRequest = {
pageNo: number;
pageSize: number;
[property: string]: any;
}
export type TemplateRequest = {
basePageRequest: TemplateBasePageRequest;
[property: string]: any;
}
export type TemplateResponse = {
code: number;
data: TemplateData;
message: string;
success: boolean;
[property: string]: any;
}
export type TemplateData = {
countId: null;
current: number;
hitCount: boolean;
maxLimit: null;
optimizeCountSql: boolean;
orders: string[];
pages: number;
records: TemplateRecord[];
searchCount: boolean;
size: number;
total: number;
[property: string]: any;
}
export type TemplateRecord = {
basePageRequest?: null;
/**
* id
*/
categoryId?: string;
/**
*
*/
categoryName?: string;
/**
*
*/
createTime?: string;
/**
*
*/
deptName?: string;
/**
* id
*/
id?: string;
/**
*
*/
status?: string;
/**
*
*/
statusName?: string;
/**
*
*/
templateName?: string;
/**
*
*/
templateCode?: string;
/**
*
*/
templateType?: string;
/**
*
*/
tenantName?: string;
/**
*
*/
createBy?: string;
/**
*
*/
updateBy?: string;
/**
*
*/
updateTime?: string;
/**
* ID
*/
deptId?: string;
/**
* -
*/
department?: string;
[property: string]: any;
}
// 模板搜索参数
export type TemplateSearchParams = {
templateName?: string;
categoryId?: string;
status?: string;
tenantName?: string;
dateRange?: [string, string];
[property: string]: any;
}
// 模板详情响应
export type TemplateDetailResponse = {
code: number;
data: TemplateDetail;
message: string;
success: boolean;
[property: string]: any;
}
// 模板详情数据
export type TemplateDetail = {
categoryId: string;
categoryLimitation: string;
copyTemplateId: null;
createBy: null | string;
createDate: null | string;
createTime: string;
deleteFlag: null | string;
delFlag: string;
id: string;
indicatorStList: IndicatorStItem[];
lastUpdateTime: null | string;
status: string;
templateName: string;
templateType: string;
tenantId: null | string;
tenantName: null | string;
updateBy: null | string;
updateDate: null | string;
updateTime: string;
[property: string]: any;
}
2025-06-23 20:29:01 +08:00
// 模板列表项类型
export type TemplateItem = {
categoryId?: string;
categoryLimitation?: string;
copyTemplateId?: null;
createBy?: string;
createDate?: null;
createTime?: string;
deleteFlag?: null;
delFlag?: string;
id: string;
lastUpdateTime?: null;
status?: string;
templateName?: string;
templateType?: string;
tenantId?: null;
tenantName?: null;
updateBy?: string;
updateDate?: null;
updateTime?: string;
[property: string]: any;
};
2025-06-23 19:15:13 +08:00
// 一级指标项
export type IndicatorStItem = {
baseIndicator: string;
createBy: string;
createDate: null | string;
createTime: string;
deleteFlag: null | string;
delFlag: string;
descIndicator: string;
id: string;
indicatorNdList: IndicatorNdItem[];
lastUpdateTime: null | string;
orderBy: string;
score: string;
templateId: string;
tenantId: null | string;
tenantName: null | string;
updateBy: string;
updateDate: null | string;
updateTime: string;
[property: string]: any;
}
// 二级指标项
export type IndicatorNdItem = {
createBy: string;
createDate: null | string;
createTime: string;
deleteFlag: null | string;
delFlag: string;
id: string;
indicatorStId: string;
isStar: string;
lastUpdateTime: null | string;
orderBy: string;
score: string;
subIndicator: string;
templateId: string;
tenantId: null | string;
tenantName: null | string;
updateBy: string;
updateDate: null | string;
updateTime: string;
[property: string]: any;
}
// 模板添加/更新参数
export type TemplateSaveRequest = {
id?: string;
templateName: string;
templateCode?: string;
templateType: string;
categoryId: string;
deptId: string;
status: string;
[property: string]: any;
}
// 模板启用/禁用/删除参数
export type TemplateStatusRequest = {
id: string;
}
// 模板修改请求参数
export type TemplateUpdateRequest = {
categoryId: string;
categoryLimitation: string;
id: string;
indicatorStList: TemplateUpdateIndicatorStItem[];
status: number;
templateName: string;
templateType: string;
[property: string]: any;
}
// 修改请求一级指标项
export type TemplateUpdateIndicatorStItem = {
baseIndicator: string;
descIndicator: string;
indicatorNdList: TemplateUpdateIndicatorNdItem[];
orderBy: number;
score: string;
[property: string]: any;
}
// 修改请求二级指标项
export type TemplateUpdateIndicatorNdItem = {
isStar: string;
orderBy: number;
score: string;
subIndicator: string;
[property: string]: any;
}
// 模板新增请求参数
export type TemplateAddRequest = {
/**
* id(cosco_category表主键)
*/
categoryId: string;
/**
* 0.1.
*/
categoryLimitation: string;
/**
*
*/
indicatorNdMore: string;
indicatorStList: TemplateAddIndicatorStItem[];
/**
*
*/
indicatorStMore: string;
/**
* ( )
*/
indicatorTypeMore: string;
/**
* (0.稿1.2.)
*/
status: number;
/**
*
*/
templateName: string;
/**
* (code)
*/
templateType: string;
[property: string]: any;
}
// 新增请求一级指标项
export type TemplateAddIndicatorStItem = {
/**
*
*/
baseIndicator: string;
/**
* (0.1.)
*/
baseIndicatorEdit: string;
/**
*
*/
descIndicator: string;
/**
* (0.1.)
*/
descIndicatorEdit: string;
indicatorNdList: TemplateAddIndicatorNdItem[];
/**
* (0.1.)
*/
indicatorStEdit: string;
/**
* ( )
*/
indicatorType: string;
/**
*
*/
orderBy: number;
/**
*
*/
score: string;
/**
* (0.1.)
*/
scoreEdit: string;
[property: string]: any;
}
// 新增请求二级指标项
export type TemplateAddIndicatorNdItem = {
/**
* (0.1.)
*/
baseIndicatorEdit: string;
/**
* (0.1.)
*/
indicatorNdEdit: string;
/**
* (0.1.)
*/
isStar: string;
/**
* (0.1.)
*/
isStarEdit: string;
/**
*
*/
orderBy: number;
/**
*
*/
score: string;
/**
* (0.1.)
*/
scoreEdit: string;
/**
*
*/
subIndicator: string;
[property: string]: any;
}
// 品类树接口返回类型
export type CategoryTreeResponse = {
code: number;
data: CategoryTreeItem[];
message: string;
success: boolean;
[property: string]: any;
}
export type CategoryTreeItem = {
ancestors?: string;
basePageRequest?: null;
/**
*
*/
categoryName?: string;
children?: CategoryTreeChild[];
createBy?: string;
createTime?: string;
delFlag?: string;
id?: string;
lastUpdateTime?: null;
/**
*
*/
orderBy?: string;
/**
* id
*/
parentId?: string;
remark?: null;
/**
* 0 1
*/
type?: string;
updateBy?: null;
updateTime?: null;
[property: string]: any;
}
export type CategoryTreeChild = {
ancestors: string;
basePageRequest: null;
categoryName: string;
children: CategoryTreeGrandChild[] | null;
createBy: string;
createTime: string;
delFlag: string;
id: string;
lastUpdateTime: null;
orderBy: string;
parentId: string;
remark: null;
type: string;
updateBy: null | string;
updateTime: null | string;
[property: string]: any;
}
export type CategoryTreeGrandChild = {
ancestors?: string;
basePageRequest?: null;
categoryName?: string;
children?: null;
createBy?: string;
createTime?: string;
delFlag?: string;
id?: string;
lastUpdateTime?: null;
orderBy?: string;
parentId?: string;
remark?: null;
type?: string;
updateBy?: null;
updateTime?: null;
[property: string]: any;
}
}