新增多个功能模块

This commit is contained in:
2025-06-23 09:27:28 +08:00
parent c783f365c8
commit 255481861a
66 changed files with 8555 additions and 6 deletions

View File

@@ -0,0 +1,61 @@
import type { ApplicationVO, ApplicationForm, ApplicationQuery } from './model';
import type { ID, IDS } from '#/api/common';
import type { PageResult } from '#/api/common';
import { commonExport } from '#/api/helper';
import { requestClient } from '#/api/request';
/**
* 查询资产领用列表
* @param params
* @returns 资产领用列表
*/
export function applicationList(params?: ApplicationQuery) {
return requestClient.get<PageResult<ApplicationVO>>('/property/application/list', { params });
}
/**
* 导出资产领用列表
* @param params
* @returns 资产领用列表
*/
export function applicationExport(params?: ApplicationQuery) {
return commonExport('/property/application/export', params ?? {});
}
/**
* 查询资产领用详情
* @param id id
* @returns 资产领用详情
*/
export function applicationInfo(id: ID) {
return requestClient.get<ApplicationVO>(`/property/application/${id}`);
}
/**
* 新增资产领用
* @param data
* @returns void
*/
export function applicationAdd(data: ApplicationForm) {
return requestClient.postWithMsg<void>('/property/application', data);
}
/**
* 更新资产领用
* @param data
* @returns void
*/
export function applicationUpdate(data: ApplicationForm) {
return requestClient.putWithMsg<void>('/property/application', data);
}
/**
* 删除资产领用
* @param id id
* @returns void
*/
export function applicationRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/application/${id}`);
}

View File

@@ -0,0 +1,134 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface ApplicationVO {
/**
* 主键
*/
id: string | number;
/**
* 资产id
*/
assetId: string | number;
/**
* 领用人id
*/
userId: string | number;
/**
* 数量
*/
number: number;
/**
* 状态
*/
state: number;
/**
* 审批人id
*/
acceptanceUserId: string | number;
/**
* 审批时间
*/
acceptanceTime: string;
/**
* 申请时间
*/
applicationTime: string;
/**
* 创建时间
*/
createTime: string;
}
export interface ApplicationForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 资产id
*/
assetId?: string | number;
/**
* 领用人id
*/
userId?: string | number;
/**
* 数量
*/
number?: number;
/**
* 状态
*/
state?: number;
/**
* 审批人id
*/
acceptanceUserId?: string | number;
/**
* 审批时间
*/
acceptanceTime?: string;
/**
* 申请时间
*/
applicationTime?: string;
}
export interface ApplicationQuery extends PageQuery {
/**
* 资产id
*/
assetId?: string | number;
/**
* 领用人id
*/
userId?: string | number;
/**
* 数量
*/
number?: number;
/**
* 状态
*/
state?: number;
/**
* 审批人id
*/
acceptanceUserId?: string | number;
/**
* 审批时间
*/
acceptanceTime?: string;
/**
* 申请时间
*/
applicationTime?: string;
/**
* 日期范围参数
*/
params?: any;
}