年审
This commit is contained in:
121
src/servers/api/supplierAnnual.ts
Normal file
121
src/servers/api/supplierAnnual.ts
Normal file
@ -0,0 +1,121 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// =================== 供应商年度模板管理 ===================
|
||||
|
||||
/**
|
||||
* 获取供应商年度模板列表
|
||||
* @param params 查询参数
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getAnnualTemplateList(params: supplierAnnualTemplateManage.TemplateRequest) {
|
||||
return request<supplierAnnualTemplateManage.TemplateResponse>('/annualreview/template/getPage', {
|
||||
method: 'POST',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有供应商年度模板列表
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getAllAnnualTemplates() {
|
||||
return request<supplierAnnualTemplateManage.AllTemplatesResponse>('/annualreview/template/getAllList', {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应商年度模板
|
||||
* @param params 模板数据
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function addAnnualTemplate(params: supplierAnnualTemplateManage.AddTemplateRequest) {
|
||||
return request<supplierAnnualTemplateManage.ApiResponse>('/annualreview/template', {
|
||||
method: 'POST',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新供应商年度模板
|
||||
* @param params 模板数据
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function updateAnnualTemplate(params: supplierAnnualTemplateManage.AddTemplateRequest) {
|
||||
return request<supplierAnnualTemplateManage.ApiResponse>('/annualreview/template', {
|
||||
method: 'PUT',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商年度模板详情
|
||||
* @param id 模板ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getAnnualTemplateDetail(id: string) {
|
||||
return request<supplierAnnualTemplateManage.TemplateDetailResponse>(`/annualreview/template/${id}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用供应商年度模板
|
||||
* @param id 模板ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function enableAnnualTemplate(id: string) {
|
||||
return request<supplierAnnualTemplateManage.ApiResponse>('/annualreview/template/up', {
|
||||
method: 'POST',
|
||||
data: { id },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用供应商年度模板
|
||||
* @param id 模板ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function disableAnnualTemplate(id: string) {
|
||||
return request<supplierAnnualTemplateManage.ApiResponse>('/annualreview/template/down', {
|
||||
method: 'POST',
|
||||
data: { id },
|
||||
});
|
||||
}
|
||||
|
||||
// =================== 供应商年度审查模块 ===================
|
||||
|
||||
/**
|
||||
* 获取供应商年度审查列表
|
||||
* @param params 查询参数
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getAnnualReviewList(params: supplierAnnualReview.ReviewListRequest) {
|
||||
return request<supplierAnnualReview.ReviewListResponse>('/annualreview/user/getPage', {
|
||||
method: 'POST',
|
||||
data: params,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取供应商年度审查详情
|
||||
* @param id 审查ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getAnnualReviewDetail(id: string) {
|
||||
return request<supplierAnnualReview.ReviewDetailResponse>(`/annualreview/user/${id}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交供应商年度审查打分
|
||||
* @param params 打分数据
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function submitAnnualReviewScore(params: supplierAnnualReview.ScoreRequest) {
|
||||
return request<supplierAnnualReview.ApiResponse>('/annualreview/user/addScore', {
|
||||
method: 'POST',
|
||||
data: params,
|
||||
});
|
||||
}
|
@ -359,3 +359,15 @@ export async function exportSupplierEvaluate(evaluateTaskId: string) {
|
||||
getResponse: false,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交评价任务审批
|
||||
* @param id 任务ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function submitTaskForApproval(id: string) {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/task/submit', {
|
||||
method: 'POST',
|
||||
data: { id },
|
||||
});
|
||||
}
|
||||
|
2
src/servers/api/typings.d.ts
vendored
2
src/servers/api/typings.d.ts
vendored
@ -267,7 +267,7 @@ declare namespace API {
|
||||
basePageRequest?: null;
|
||||
endTime?: string;
|
||||
evaluateTheme?: string;
|
||||
id?: string;
|
||||
id: string;
|
||||
startTime?: string;
|
||||
status?: string;
|
||||
statusName?: string;
|
||||
|
92
src/servers/dao/supplierAnnualManage/supplierAnnualReview.d.ts
vendored
Normal file
92
src/servers/dao/supplierAnnualManage/supplierAnnualReview.d.ts
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
// 供应商年度审查模块 dao 接口
|
||||
|
||||
declare namespace supplierAnnualReview {
|
||||
// 基础分页请求参数
|
||||
interface BasePageRequest {
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 年度审查列表请求参数
|
||||
interface ReviewListRequest {
|
||||
basePageRequest: BasePageRequest;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 年度审查列表响应
|
||||
interface ReviewListResponse {
|
||||
code: number;
|
||||
data: ReviewListResponseData;
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 年度审查列表响应数据
|
||||
interface ReviewListResponseData {
|
||||
countId: null;
|
||||
current: number;
|
||||
hitCount: boolean;
|
||||
maxLimit: null;
|
||||
optimizeCountSql: boolean;
|
||||
orders: any[];
|
||||
pages: number;
|
||||
records: ReviewRecord[];
|
||||
searchCount: boolean;
|
||||
size: number;
|
||||
total: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 年度审查记录
|
||||
interface ReviewRecord {
|
||||
annualreviewTheme: string;
|
||||
basePageRequest: null;
|
||||
deptName: string;
|
||||
endTime: string;
|
||||
id: string;
|
||||
name: string;
|
||||
reviewStatus: string;
|
||||
reviewStatusName: string;
|
||||
startTime: string;
|
||||
status: string;
|
||||
statusName: string;
|
||||
userId: null;
|
||||
userName: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 年度审查详情响应
|
||||
interface ReviewDetailResponse {
|
||||
code: number;
|
||||
data: ReviewRecord;
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 打分项
|
||||
interface ScoreItem {
|
||||
examineResult: string;
|
||||
id: string;
|
||||
remark: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 打分请求
|
||||
interface ScoreRequest {
|
||||
id: string;
|
||||
scoreVoList: ScoreItem[];
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 通用API响应
|
||||
interface ApiResponse<T = any> {
|
||||
code: number;
|
||||
data: T;
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: any;
|
||||
}
|
||||
}
|
142
src/servers/dao/supplierAnnualManage/supplierAnnualTemplateManage.d.ts
vendored
Normal file
142
src/servers/dao/supplierAnnualManage/supplierAnnualTemplateManage.d.ts
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
// 供应商年度模板管理模块 dao 接口
|
||||
|
||||
declare namespace supplierAnnualTemplateManage {
|
||||
// 基础分页请求参数
|
||||
interface BasePageRequest {
|
||||
pageNo: number;
|
||||
pageSize: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 模板列表请求参数
|
||||
interface TemplateRequest {
|
||||
basePageRequest: BasePageRequest;
|
||||
templateName?: string;
|
||||
categoryId?: string;
|
||||
tenantName?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 模板列表响应
|
||||
interface TemplateResponse {
|
||||
code: number;
|
||||
data: TemplateResponseData;
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 模板列表响应数据
|
||||
interface TemplateResponseData {
|
||||
countId: null;
|
||||
current: number;
|
||||
hitCount: boolean;
|
||||
maxLimit: null;
|
||||
optimizeCountSql: boolean;
|
||||
orders: any[];
|
||||
pages: number;
|
||||
records: TemplateRecord[];
|
||||
searchCount: boolean;
|
||||
size: number;
|
||||
total: number;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 模板记录
|
||||
interface TemplateRecord {
|
||||
basePageRequest: null;
|
||||
categoryId: string;
|
||||
categoryLimitation: string;
|
||||
categoryName: null;
|
||||
copyTemplateId: string;
|
||||
createBy: string;
|
||||
createDate: null;
|
||||
createTime: string;
|
||||
deleteFlag: null;
|
||||
delFlag: string;
|
||||
id: string;
|
||||
lastUpdateTime: null;
|
||||
remark: null;
|
||||
status: string;
|
||||
templateName: string;
|
||||
templateType: string;
|
||||
tenantId: null;
|
||||
tenantName: null;
|
||||
updateBy: string;
|
||||
updateDate: null;
|
||||
updateTime: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 指标记录
|
||||
interface IndicatorItem {
|
||||
isStar: string;
|
||||
itemName: string;
|
||||
orderBy: string;
|
||||
id?: string;
|
||||
createBy?: string;
|
||||
createTime?: string;
|
||||
deleteFlag?: null;
|
||||
delFlag?: string;
|
||||
lastUpdateTime?: null;
|
||||
remark?: null;
|
||||
templateId?: string;
|
||||
tenantId?: null;
|
||||
tenantName?: null;
|
||||
updateBy?: string;
|
||||
updateDate?: null;
|
||||
updateTime?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 新增模板请求参数
|
||||
interface AddTemplateRequest {
|
||||
categoryId?: string;
|
||||
categoryLimitation: string;
|
||||
copyTemplateId?: string;
|
||||
id?: string;
|
||||
indicatorList: IndicatorItem[];
|
||||
status: string;
|
||||
templateName: string;
|
||||
templateType?: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// API通用响应
|
||||
interface ApiResponse<T = any> {
|
||||
code: number;
|
||||
data: T;
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 获取全部模板列表响应
|
||||
interface AllTemplatesResponse {
|
||||
code: number;
|
||||
data: TemplateRecord[];
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 模板详情数据
|
||||
interface TemplateDetailData extends TemplateRecord {
|
||||
indicatorList: IndicatorItem[];
|
||||
}
|
||||
|
||||
// 模板详情响应
|
||||
interface TemplateDetailResponse {
|
||||
code: number;
|
||||
data: TemplateDetailData;
|
||||
message: string;
|
||||
success: boolean;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 启用禁用模板请求
|
||||
interface TemplateStatusRequest {
|
||||
id: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user