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

1041 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-24 18:58:43 +08:00
// 用户相关接口类型定义
export interface UserListRequest {
basePageRequest: BasePageRequest;
keyword?: string;
[property: string]: any;
}
export interface UserItem {
userId: string;
userName: string;
userDept: string;
userDeptId: string;
[property: string]: any;
}
// 评价任务人员选择器相关接口
export interface PersonnelItem {
id: string;
name: string;
department: string;
position?: string;
selected?: boolean;
}
export interface Department {
id: string;
name: string;
}
2025-06-17 18:32:33 +08:00
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 UploadResponse {
id: string;
fileName: string;
fileSize: number;
fileType: string;
fileUrl: string;
}
2025-06-17 21:06:27 +08:00
2025-06-24 14:00:51 +08:00
//
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-24 10:32:29 +08:00
// 供应商评价结果类型定义
export interface EvaluateTaskRequest {
basePageRequest: BasePageRequest;
isAnswer?: number;
userId?: string;
evaluateTheme?: string;
status?: string;
startTime?: string;
endTime?: string;
[property: string]: any;
}
export interface EvaluateTaskData {
countId: null;
current: number;
hitCount: boolean;
maxLimit: null;
optimizeCountSql: boolean;
orders: any[];
pages: number;
records: EvaluateTaskRecord[];
searchCount: boolean;
size: number;
total: number;
[property: string]: any;
}
export interface EvaluateTaskRecord {
basePageRequest?: null;
endTime?: string;
evaluateTheme?: string;
id?: string;
startTime?: string;
status?: string;
statusName?: string;
tenantName?: string;
userId?: null;
taskName?: string;
taskCode?: string;
taskType?: string;
createBy?: string;
createTime?: string;
updateBy?: string;
updateTime?: string;
[property: string]: any;
}
export interface EvaluateTaskSearchParams {
evaluateTheme?: string;
status?: string;
timeRange?: [string, string];
[property: string]: any;
}
2025-06-24 14:00:51 +08:00
// 供应商评价结果详情查询请求
export interface EvaluateSupplierRequest {
basePageRequest: BasePageRequest;
evaluateTaskId: string;
isAnswer?: number;
supplierName?: string;
level?: string;
[property: string]: any;
}
// 供应商评价结果详情响应数据
export interface EvaluateSupplierData {
countId: null;
current: number;
hitCount: boolean;
maxLimit: null;
optimizeCountSql: boolean;
orders: any[];
pages: number;
records: EvaluateSupplierRecord[];
searchCount: boolean;
size: number;
total: number;
[property: string]: any;
}
// 供应商评价结果详情记录
export interface EvaluateSupplierRecord {
basePageRequest: null;
createBy: string;
createDate: null;
createTime: string;
2025-06-24 18:58:43 +08:00
deleteFlag: null | string;
2025-06-24 14:00:51 +08:00
delFlag: string;
evaluateTaskId: string;
id: string;
2025-06-24 18:58:43 +08:00
lastUpdateTime: null | string;
2025-06-24 14:00:51 +08:00
reviewResult: null | string;
reviewScore: null | number;
supplierId: string;
tenantId: null;
tenantName: null;
updateBy: string;
updateDate: null;
updateTime: string;
supplierName?: string; // 供应商名称
category?: string; // 品类
level?: string; // 评价等级
score?: number; // 评价得分
[property: string]: any;
}
// 供应商评价结果详情查询参数
export interface EvaluateSupplierSearchParams {
evaluateTaskId?: string;
supplierName?: string;
level?: string;
[property: string]: any;
}
// 供应商评价打分情况请求
export interface EvaluateScoreRequest {
basePageRequest: BasePageRequest;
taskId: string;
supplierId: string;
[property: string]: any;
}
// 供应商评价打分情况响应数据
export interface EvaluateScoreData {
categoryId: null;
categoryLimitation: string;
createBy: null;
createDate: null;
createTime: null;
deleteFlag: null;
delFlag: string;
deptId: null;
endTime: string;
evaluateTheme: string;
evaluateYear: string;
id: string;
indicatorList: EvaluateScoreIndicator[];
lastUpdateTime: null;
startTime: string;
status: string;
supplierIds: EvaluateSupplierId[];
templateId: string;
tenantId: null;
tenantName: null;
updateBy: null;
updateDate: null;
updateTime: null;
weightDept: null;
weightStatus: string;
weightValue: null;
[property: string]: any;
}
// 评价指标列表
export interface EvaluateScoreIndicator {
indicatorIds: null[];
type: string;
userId: string;
userName?: string;
evaluateUnit?: string;
evaluateTime?: string;
score?: string | number;
[property: string]: any;
}
// 供应商ID列表
export interface EvaluateSupplierId {
id: string;
userIds: any[];
supplierName?: string;
category?: string;
2025-06-24 18:58:43 +08:00
department?: string;
socialCreditCode?: string;
evaluators?: PersonnelItem[];
evaluatorCount?: number;
2025-06-24 14:00:51 +08:00
[property: string]: any;
}
// 供应商评价打分情况查询参数
export interface EvaluateScoreSearchParams {
supplierName?: string;
evaluateUnit?: string;
level?: string;
[property: string]: any;
}
// 供应商评价打分详情查询请求
export interface EvaluateScoreDetailRequest {
id: string;
[property: string]: any;
}
// 供应商评价打分详情响应数据
export interface EvaluateScoreDetailData {
taskIndicatorVo?: {
baseIndicator: string; // 一级指标名称
indicatorDesc?: string; // 指标说明
score: string; // 一级指标分值
subIndicator?: {
id: string; // 二级指标ID
subIndicator: string; // 二级指标名称
subScore: string; // 二级指标分值
starIndicator?: string; // 是否星号项
scoreNum?: string; // 实际得分
remark?: string; // 评分说明
}[];
}[];
// 其他字段...
}
// 评价指标数据
export interface TaskIndicatorVo {
baseIndicator: string;
indicatorDesc: string;
score: string;
subIndicator: SubIndicator[];
[property: string]: any;
}
// 二级指标数据
export interface SubIndicator {
id: string;
remark: null;
scoreNum: null;
starIndicator: string;
stId: string;
subIndicator: string;
subScore: string;
[property: string]: any;
}
// 评价规则相关类型定义
export interface EvaluateRuleResponse {
code: number;
data: EvaluateRuleItem[];
message: string;
success: boolean;
[property: string]: any;
}
export interface EvaluateRuleDetailResponse {
code: number;
data: EvaluateRuleItem;
message: string;
success: boolean;
[property: string]: any;
}
export interface EvaluateRuleItem {
beginValue: string;
createBy: string;
createDate: null;
createTime: string;
deleteFlag: null;
delFlag: string;
endValue: string;
id: string;
lastUpdateTime: null;
levelName: string;
remark: string;
ratingName?: string;
tenantId: null;
tenantName: null;
updateBy: string;
updateDate: null;
updateTime: string;
[property: string]: any;
}
export interface EvaluateRuleAddRequest {
/**
*
*/
beginValue: string;
/**
*
*/
endValue: string;
/**
* ABC...
*/
levelName: string;
/**
* ()
*/
ratingName: string;
/**
*
*/
remark?: string;
[property: string]: any;
}
export interface EvaluateRuleUpdateRequest {
/**
* ID
*/
id: string;
/**
*
*/
beginValue: string | number;
/**
*
*/
endValue: string | number;
/**
* ABC...
*/
levelName: string;
/**
*
*/
remark?: string;
[property: string]: any;
}
// 评价打分详情数据
interface IndicatorDetailData {
category: string;
name: string;
taskIndicatorVo: {
baseIndicator: string;
indicatorDesc: string;
score: string;
subIndicator: {
id: string;
remark: string | null;
scoreNum: string | null;
starIndicator: string;
stId: string;
subIndicator: string;
subScore: string;
}[];
}[];
}
2025-06-17 14:20:06 +08:00
}
2025-06-23 19:15:13 +08:00
// 供应商评价模块类型定义
declare namespace SupplierEvaluate {
2025-06-24 18:58:43 +08:00
// 权重单位接口
export interface WeightUnit {
id: string;
name: string;
weight: number;
}
2025-06-23 19:15:13 +08:00
// 模板管理类型定义
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;
}
}