feat: 项目管理调整

This commit is contained in:
caiyuchao
2025-06-30 19:03:10 +08:00
parent f0949b211a
commit acd01127d1
6 changed files with 256 additions and 129 deletions

View File

@@ -8,13 +8,13 @@ export namespace ProjectApi {
/** 项目信息 */
export interface Project {
id: number; // 主键
customerId?: number; // 客户ID
projectId?: number; // 项目ID
name?: string; // 项目名称
code?: string; // 项目编号
contractCode?: string; // 合同编号
businessStatus: number; // 商务状态
businessOwner?: number; // 业务负责人
customerOwner?: number; // 客户对接人
projectOwner?: number; // 项目对接人
technicalOwnerA?: number; // 技术负责人1
technicalOwnerB: number; // 技术负责人2
technicalOwnerC: number; // 技术负责人3
@@ -59,3 +59,28 @@ export function deleteProject(id: number) {
export function exportProject(params: any) {
return requestClient.download('/license/project/export-excel', params);
}
/** 项目名称是否唯一 */
export async function isProjectNameUnique(
name: string,
id?: ProjectApi.Project['id'],
) {
return requestClient.get<boolean>('/license/project/name-unique', {
params: { id, name },
});
}
/** 项目编号是否唯一 */
export async function isProjectCodeUnique(
code: number,
id?: ProjectApi.Project['id'],
) {
return requestClient.get<boolean>('/license/project/code-unique', {
params: { id, code },
});
}
/** 查询当前最大sn */
export async function getMaxSn() {
return requestClient.get<boolean>('/license/project/max-sn');
}