工具器和物料

This commit is contained in:
2025-06-27 18:27:32 +08:00
parent 04dac2eba1
commit 68547f08c1
14 changed files with 2185 additions and 2 deletions

View File

@ -0,0 +1,63 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ContractorToolEntryVO, ContractorToolEntryForm, ContractorToolEntryQuery } from '@/api/contractor/contractorToolEntry/types';
/**
* 查询分包方工器具进场列表
* @param query
* @returns {*}
*/
export const listContractorToolEntry = (query?: ContractorToolEntryQuery): AxiosPromise<ContractorToolEntryVO[]> => {
return request({
url: '/contractor/contractorToolRecord/list',
method: 'get',
params: query
});
};
/**
* 查询分包方工器具进场详细
* @param id
*/
export const getContractorToolEntry = (id: string | number): AxiosPromise<ContractorToolEntryVO> => {
return request({
url: '/contractor/contractorToolRecord/' + id,
method: 'get'
});
};
/**
* 新增分包方工器具进场
* @param data
*/
export const addContractorToolEntry = (data: ContractorToolEntryForm) => {
return request({
url: '/contractor/contractorToolRecord',
method: 'post',
data: data
});
};
/**
* 修改分包方工器具进场
* @param data
*/
export const updateContractorToolEntry = (data: ContractorToolEntryForm) => {
return request({
url: '/contractor/contractorToolRecord',
method: 'put',
data: data
});
};
/**
* 删除分包方工器具进场
* @param id
*/
export const delContractorToolEntry = (id: string | number | Array<string | number>) => {
return request({
url: '/contractor/contractorToolRecord/' + id,
method: 'delete'
});
};

View File

@ -0,0 +1,156 @@
export interface ContractorToolEntryVO {
/**
* 主键id
*/
id: string | number;
/**
* 项目id
*/
projectId: string | number;
/**
* 分包方id
*/
contractorId: string | number;
/**
* 分包方工器具id
*/
contractorToolId: string | number;
/**
* 进场工器具数量
*/
toolNumber: string;
/**
* 检测编号
*/
checkNum: string;
/**
* 检测部门
*/
checkDept: string;
/**
* 检测时间
*/
checkTime: string;
/**
* 合格证
*/
certificate: string;
/**
* 备注
*/
remark: string;
/**
* 进场时间
*/
entryTime: string;
}
export interface ContractorToolEntryForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 分包方工器具id
*/
contractorToolId?: string | number;
/**
* 进场工器具数量
*/
toolNumber?: string;
/**
* 检测编号
*/
checkNum?: string;
/**
* 检测部门
*/
checkDept?: string;
/**
* 检测时间
*/
checkTime?: string;
/**
* 合格证
*/
certificate?: string;
/**
* 备注
*/
remark?: string;
/**
* 进场时间
*/
entryTime?: string;
/**
* 类型
*/
recordType?: string;
/**
* 工器具数量
*/
recordNumber?: number;
}
export interface ContractorToolEntryQuery extends PageQuery {
/**
* 项目id
*/
projectId?: string | number;
/**
* 分包方id
*/
contractorId?: string | number;
/**
* 分包方工器具id
*/
contractorToolId?: string | number;
/**
* 进场工器具数量
*/
toolNumber?: string;
/**
* 检测编号
*/
checkNum?: string;
/**
* 类型
*/
recordType?: string;
/**
* 检测部门
*/
checkDept?: string;
/**
* 日期范围参数
*/
params?: any;
}

View File

@ -0,0 +1,63 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ContractorToolVO, ContractorToolForm, ContractorToolQuery } from '@/api/project/contractorTool/types';
/**
* 查询分包方工器具列表
* @param query
* @returns {*}
*/
export const listContractorTool = (query?: ContractorToolQuery): AxiosPromise<ContractorToolVO[]> => {
return request({
url: '/project/contractorTool/list',
method: 'get',
params: query
});
};
/**
* 查询分包方工器具详细
* @param id
*/
export const getContractorTool = (id: string | number): AxiosPromise<ContractorToolVO> => {
return request({
url: '/project/contractorTool/' + id,
method: 'get'
});
};
/**
* 新增分包方工器具
* @param data
*/
export const addContractorTool = (data: ContractorToolForm) => {
return request({
url: '/project/contractorTool',
method: 'post',
data: data
});
};
/**
* 修改分包方工器具
* @param data
*/
export const updateContractorTool = (data: ContractorToolForm) => {
return request({
url: '/project/contractorTool',
method: 'put',
data: data
});
};
/**
* 删除分包方工器具
* @param id
*/
export const delContractorTool = (id: string | number | Array<string | number>) => {
return request({
url: '/project/contractorTool/' + id,
method: 'delete'
});
};

View File

@ -0,0 +1,136 @@
export interface ContractorToolVO {
/**
* 主键id
*/
id: string | number;
/**
* 项目id
*/
projectId: string | number;
/**
* 分包方id
*/
contractorId: string | number;
/**
* 工具名称
*/
toolName: string;
/**
* 工具类型
*/
toolType: string;
/**
* 工具型号
*/
toolModel: string;
/**
* 工具数量
*/
toolNumber: string;
/**
* 备注
*/
remark: string;
/**
* 创建时间
*/
createTime: string;
}
export interface ContractorToolForm extends BaseEntity {
/**
* 主键id
*/
id?: string | number;
/**
* 项目id
*/
projectId?: string | number;
/**
* 分包方id
*/
contractorId?: string | number;
/**
* 工具名称
*/
toolName?: string;
/**
* 工具类型
*/
toolType?: string;
/**
* 工具型号
*/
toolModel?: string;
/**
* 工具数量
*/
toolNumber?: string;
/**
* 文件
*/
file?: string;
/**
* 备注
*/
remark?: string;
}
export interface ContractorToolQuery extends PageQuery {
/**
* 项目id
*/
projectId?: string | number;
/**
* 分包方id
*/
contractorId?: string | number;
/**
* 工具名称
*/
toolName?: string;
/**
* 工具类型
*/
toolType?: string;
/**
* 工具型号
*/
toolModel?: string;
/**
* 工具数量
*/
toolNumber?: string;
/**
* 日期范围参数
*/
params?: any;
}