1、资产管理
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m27s

This commit is contained in:
2025-06-24 14:52:45 +08:00
parent ed326906f5
commit a107323e36
37 changed files with 521 additions and 454 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;
}

View File

@@ -0,0 +1,61 @@
import type { AssetVO, AssetForm, AssetQuery } 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 assetList(params?: AssetQuery) {
return requestClient.get<PageResult<AssetVO>>('/property/asset/list', { params });
}
/**
* 导出资产管理列表
* @param params
* @returns 资产管理列表
*/
export function assetExport(params?: AssetQuery) {
return commonExport('/property/asset/export', params ?? {});
}
/**
* 查询资产管理详情
* @param id id
* @returns 资产管理详情
*/
export function assetInfo(id: ID) {
return requestClient.get<AssetVO>(`/property/asset/${id}`);
}
/**
* 新增资产管理
* @param data
* @returns void
*/
export function assetAdd(data: AssetForm) {
return requestClient.postWithMsg<void>('/property/asset', data);
}
/**
* 更新资产管理
* @param data
* @returns void
*/
export function assetUpdate(data: AssetForm) {
return requestClient.putWithMsg<void>('/property/asset', data);
}
/**
* 删除资产管理
* @param id id
* @returns void
*/
export function assetRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/asset/${id}`);
}

View File

@@ -0,0 +1,194 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface AssetVO {
/**
* 主键
*/
id: string | number;
/**
* 资产名称
*/
name: string;
/**
* 类型
*/
model: string;
/**
* 规格
*/
specs: string;
/**
* 价格
*/
price: number;
/**
* 库存
*/
stock: number;
/**
* 计量单位
*/
unit: string;
/**
* 仓库id
*/
depotId: string | number;
/**
* 描述信息
*/
msg: string;
/**
* 供应商id
*/
suppliersId: string | number;
/**
* 入库时间
*/
storageTime: string;
/**
* 固定资产类型
*/
type: number;
/**
* 创建时间
*/
createTime: string;
}
export interface AssetForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 资产名称
*/
name?: string;
/**
* 类型
*/
model?: string;
/**
* 规格
*/
specs?: string;
/**
* 价格
*/
price?: number;
/**
* 库存
*/
stock?: number;
/**
* 计量单位
*/
unit?: string;
/**
* 仓库id
*/
depotId?: string | number;
/**
* 描述信息
*/
msg?: string;
/**
* 供应商id
*/
suppliersId?: string | number;
/**
* 入库时间
*/
storageTime?: string;
/**
* 固定资产类型
*/
type?: number;
}
export interface AssetQuery extends PageQuery {
/**
* 资产名称
*/
name?: string;
/**
* 类型
*/
model?: string;
/**
* 规格
*/
specs?: string;
/**
* 价格
*/
price?: number;
/**
* 库存
*/
stock?: number;
/**
* 计量单位
*/
unit?: string;
/**
* 仓库id
*/
depotId?: string | number;
/**
* 描述信息
*/
msg?: string;
/**
* 供应商id
*/
suppliersId?: string | number;
/**
* 入库时间
*/
storageTime?: string;
/**
* 固定资产类型
*/
type?: number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -0,0 +1,61 @@
import type { DepotVO, DepotForm, DepotQuery } 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 depotList(params?: DepotQuery) {
return requestClient.get<PageResult<DepotVO>>('/property/depot/list', { params });
}
/**
* 导出仓库管理列表
* @param params
* @returns 仓库管理列表
*/
export function depotExport(params?: DepotQuery) {
return commonExport('/property/depot/export', params ?? {});
}
/**
* 查询仓库管理详情
* @param id id
* @returns 仓库管理详情
*/
export function depotInfo(id: ID) {
return requestClient.get<DepotVO>(`/property/depot/${id}`);
}
/**
* 新增仓库管理
* @param data
* @returns void
*/
export function depotAdd(data: DepotForm) {
return requestClient.postWithMsg<void>('/property/depot', data);
}
/**
* 更新仓库管理
* @param data
* @returns void
*/
export function depotUpdate(data: DepotForm) {
return requestClient.putWithMsg<void>('/property/depot', data);
}
/**
* 删除仓库管理
* @param id id
* @returns void
*/
export function depotRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/depot/${id}`);
}

View File

@@ -0,0 +1,89 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface DepotVO {
/**
* 主键
*/
id: string | number;
/**
* 类型名称
*/
depotName: string;
/**
* 描述信息
*/
msg: string;
/**
* 类型
*/
modelType: string;
/**
* 状态
*/
state: number;
/**
* 创建时间
*/
createTime: string;
}
export interface DepotForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 类型名称
*/
depotName?: string;
/**
* 描述信息
*/
msg?: string;
/**
* 类型
*/
modelType?: string;
/**
* 状态
*/
state?: number;
}
export interface DepotQuery extends PageQuery {
/**
* 类型名称
*/
depotName?: string;
/**
* 描述信息
*/
msg?: string;
/**
* 类型
*/
modelType?: string;
/**
* 状态
*/
state?: number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -0,0 +1,61 @@
import type { LogVO, LogForm, LogQuery } 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 logList(params?: LogQuery) {
return requestClient.get<PageResult<LogVO>>('/property/log/list', { params });
}
/**
* 导出仓库记录列表
* @param params
* @returns 仓库记录列表
*/
export function logExport(params?: LogQuery) {
return commonExport('/property/log/export', params ?? {});
}
/**
* 查询仓库记录详情
* @param id id
* @returns 仓库记录详情
*/
export function logInfo(id: ID) {
return requestClient.get<LogVO>(`/property/log/${id}`);
}
/**
* 新增仓库记录
* @param data
* @returns void
*/
export function logAdd(data: LogForm) {
return requestClient.postWithMsg<void>('/property/log', data);
}
/**
* 更新仓库记录
* @param data
* @returns void
*/
export function logUpdate(data: LogForm) {
return requestClient.putWithMsg<void>('/property/log', data);
}
/**
* 删除仓库记录
* @param id id
* @returns void
*/
export function logRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/log/${id}`);
}

View File

@@ -0,0 +1,189 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface LogVO {
/**
* 主键
*/
id: string | number;
/**
* 仓库id
*/
depotId: string | number;
/**
* 资产id
*/
assetId: string | number;
/**
* 流转类型
*/
type: number;
/**
* 流转时间
*/
time: string;
/**
* 操作人id
*/
userId: string | number;
/**
* 状态
*/
state: number;
/**
* 备注
*/
remark: string;
/**
* 价格
*/
price: number;
/**
* 总价
*/
priceSum: number;
/**
* 数量
*/
number: number;
/**
* 供应商id
*/
supplierId: string | number;
/**
* 创建时间
*/
createTime: string;
}
export interface LogForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 仓库id
*/
depotId?: string | number;
/**
* 资产id
*/
assetId?: string | number;
/**
* 流转类型
*/
type?: number;
/**
* 流转时间
*/
time?: string;
/**
* 操作人id
*/
userId?: string | number;
/**
* 状态
*/
state?: number;
/**
* 备注
*/
remark?: string;
/**
* 价格
*/
price?: number;
/**
* 总价
*/
priceSum?: number;
/**
* 数量
*/
number?: number;
/**
* 供应商id
*/
supplierId?: string | number;
}
export interface LogQuery extends PageQuery {
/**
* 仓库id
*/
depotId?: string | number;
/**
* 资产id
*/
assetId?: string | number;
/**
* 流转类型
*/
type?: number;
/**
* 流转时间
*/
time?: string;
/**
* 操作人id
*/
userId?: string | number;
/**
* 状态
*/
state?: number;
/**
* 价格
*/
price?: number;
/**
* 总价
*/
priceSum?: number;
/**
* 数量
*/
number?: number;
/**
* 供应商id
*/
supplierId?: string | number;
/**
* 日期范围参数
*/
params?: any;
}

View File

@@ -0,0 +1,61 @@
import type { SuppliersVO, SuppliersForm, SuppliersQuery } 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 suppliersList(params?: SuppliersQuery) {
return requestClient.get<PageResult<SuppliersVO>>('/property/suppliers/list', { params });
}
/**
* 导出供应商列表
* @param params
* @returns 供应商列表
*/
export function suppliersExport(params?: SuppliersQuery) {
return commonExport('/property/suppliers/export', params ?? {});
}
/**
* 查询供应商详情
* @param id id
* @returns 供应商详情
*/
export function suppliersInfo(id: ID) {
return requestClient.get<SuppliersVO>(`/property/suppliers/${id}`);
}
/**
* 新增供应商
* @param data
* @returns void
*/
export function suppliersAdd(data: SuppliersForm) {
return requestClient.postWithMsg<void>('/property/suppliers', data);
}
/**
* 更新供应商
* @param data
* @returns void
*/
export function suppliersUpdate(data: SuppliersForm) {
return requestClient.putWithMsg<void>('/property/suppliers', data);
}
/**
* 删除供应商
* @param id id
* @returns void
*/
export function suppliersRemove(id: ID | IDS) {
return requestClient.deleteWithMsg<void>(`/property/suppliers/${id}`);
}

View File

@@ -0,0 +1,144 @@
import type { PageQuery, BaseEntity } from '#/api/common';
export interface SuppliersVO {
/**
* 主键
*/
id: string | number;
/**
* 供应商名称
*/
suppliersName: string;
/**
* 电话
*/
phone: string;
/**
* 地址
*/
location: string;
/**
* 联系人
*/
user: string;
/**
* 状态
*/
state: number;
/**
* 开户行
*/
bank: string;
/**
* 卡号
*/
bankNumber: string;
/**
* 备注
*/
remark: string;
/**
* 创建时间
*/
createTime: string;
}
export interface SuppliersForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 供应商名称
*/
suppliersName?: string;
/**
* 电话
*/
phone?: string;
/**
* 地址
*/
location?: string;
/**
* 联系人
*/
user?: string;
/**
* 状态
*/
state?: number;
/**
* 开户行
*/
bank?: string;
/**
* 卡号
*/
bankNumber?: string;
/**
* 备注
*/
remark?: string;
}
export interface SuppliersQuery extends PageQuery {
/**
* 供应商名称
*/
suppliersName?: string;
/**
* 电话
*/
phone?: string;
/**
* 地址
*/
location?: string;
/**
* 联系人
*/
user?: string;
/**
* 状态
*/
state?: number;
/**
* 开户行
*/
bank?: string;
/**
* 卡号
*/
bankNumber?: string;
/**
* 日期范围参数
*/
params?: any;
}