对接评价模板新增和修改
This commit is contained in:
@ -10,8 +10,11 @@ export async function getAllTemplates() {
|
||||
});
|
||||
}
|
||||
|
||||
// 模板管理接口
|
||||
// 获取模板列表
|
||||
/**
|
||||
* 获取模板列表
|
||||
* @param params 查询参数
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getTemplateList(params: SupplierEvaluate.TemplateRequest) {
|
||||
return request<SupplierEvaluate.TemplateResponse>('/coscoEvaluate/template/getPage', {
|
||||
method: 'POST',
|
||||
@ -19,14 +22,22 @@ export async function getTemplateList(params: SupplierEvaluate.TemplateRequest)
|
||||
});
|
||||
}
|
||||
|
||||
// 获取模板详情
|
||||
/**
|
||||
* 获取模板详情
|
||||
* @param id 模板ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getTemplateDetail(id: string) {
|
||||
return request<SupplierEvaluate.TemplateDetailResponse>(`/coscoEvaluate/template/${id}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增模板
|
||||
/**
|
||||
* 新增模板
|
||||
* @param params 模板数据
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function addTemplate(params: SupplierEvaluate.TemplateAddRequest) {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/template', {
|
||||
method: 'POST',
|
||||
@ -34,7 +45,12 @@ export async function addTemplate(params: SupplierEvaluate.TemplateAddRequest) {
|
||||
});
|
||||
}
|
||||
|
||||
// 更新模板
|
||||
|
||||
/**
|
||||
* 更新评价模板
|
||||
* @param params 模板数据
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function updateTemplate(params: SupplierEvaluate.TemplateUpdateRequest) {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/template', {
|
||||
method: 'PUT',
|
||||
@ -42,7 +58,11 @@ export async function updateTemplate(params: SupplierEvaluate.TemplateUpdateRequ
|
||||
});
|
||||
}
|
||||
|
||||
// 删除模板
|
||||
/**
|
||||
* 删除评价模板
|
||||
* @param id 模板ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function deleteTemplate(id: string) {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/template/delete', {
|
||||
method: 'POST',
|
||||
@ -50,7 +70,11 @@ export async function deleteTemplate(id: string) {
|
||||
});
|
||||
}
|
||||
|
||||
// 启用模板
|
||||
/**
|
||||
* 启用评价模板
|
||||
* @param id 模板ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function enableTemplate(id: string) {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/template/enable', {
|
||||
method: 'POST',
|
||||
@ -58,7 +82,11 @@ export async function enableTemplate(id: string) {
|
||||
});
|
||||
}
|
||||
|
||||
// 禁用模板
|
||||
/**
|
||||
* 禁用评价模板
|
||||
* @param id 模板ID
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function disableTemplate(id: string) {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/template/disable', {
|
||||
method: 'POST',
|
||||
@ -66,24 +94,32 @@ export async function disableTemplate(id: string) {
|
||||
});
|
||||
}
|
||||
|
||||
// 获取品类列表
|
||||
/**
|
||||
* 获取品类列表
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getCategoryList() {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/category/list', {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取品类树
|
||||
/**
|
||||
* 获取品类树
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getCategoryTree() {
|
||||
return request<SupplierEvaluate.CategoryTreeResponse>('/cosco/category/categoryTree', {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
// 获取部门列表
|
||||
/**
|
||||
* 获取部门列表
|
||||
* @returns Promise
|
||||
*/
|
||||
export async function getDepartmentList() {
|
||||
return request<API.APIResponse<any>>('/coscoEvaluate/dept/list', {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
23
src/servers/api/typings.d.ts
vendored
23
src/servers/api/typings.d.ts
vendored
@ -708,7 +708,28 @@ declare namespace SupplierEvaluate {
|
||||
updateTime: string;
|
||||
[property: string]: any;
|
||||
}
|
||||
|
||||
// 模板列表项类型
|
||||
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;
|
||||
};
|
||||
// 一级指标项
|
||||
export type IndicatorStItem = {
|
||||
baseIndicator: string;
|
||||
|
Reference in New Issue
Block a user