1、资产管理
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-06-25 09:42:38 +08:00
parent 905fbb5f06
commit 87331ab607
13 changed files with 152 additions and 114 deletions

View File

@@ -0,0 +1,65 @@
import type { AssetTypeVO, AssetTypeForm, AssetTypeQuery } 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 assetTypeList(params?: AssetTypeQuery) {
return requestClient.get<PageResult<AssetTypeVO>>('/property/assetType/list', { params });
}
export function assetTypeselect() {
return requestClient.get<AssetTypeVO[]>('/property/assetType/list');
}
/**
* 导出资产类型列表
* @param params
* @returns 资产类型列表
*/
export function assetTypeExport(params?: AssetTypeQuery) {
return commonExport('/property/assetType/export', params ?? {});
}
/**
* 查询资产类型详情
* @param id id
* @returns 资产类型详情
*/
export function assetTypeInfo(id: ID) {
return requestClient.get<AssetTypeVO>(`/property/assetType/${id}`);
}
/**
* 新增资产类型
* @param data
* @returns void
*/
export function assetTypeAdd(data: AssetTypeForm) {
return requestClient.postWithMsg<void>('/property/assetType', data);
}
/**
* 更新资产类型
* @param data
* @returns void
*/
export function assetTypeUpdate(data: AssetTypeForm) {
return requestClient.putWithMsg<void>('/property/assetType', data);
}
/**
* 删除资产类型
* @param id id
* @returns void
*/
export function assetTypeRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/assetType/${id}`);
}

View File

@@ -0,0 +1,64 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface AssetTypeVO {
/**
* 主键
*/
id: string | number;
/**
* 分类名称
*/
assetTypeName: string;
/**
* 排序
*/
sort: number;
/**
* 创建时间
*/
createTime: string;
/**
* 创建人
*/
createBy: string;
}
export interface AssetTypeForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 分类名称
*/
assetTypeName?: string;
/**
* 排序
*/
sort?: number;
}
export interface AssetTypeQuery extends PageQuery {
/**
* 分类名称
*/
assetTypeName?: string;
/**
* 排序
*/
sort?: number;
/**
* 日期范围参数
*/
params?: any;
}