init:first commit of plus-ui
This commit is contained in:
63
src/api/materials/company/index.ts
Normal file
63
src/api/materials/company/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { CompanyForm, CompanyQuery, CompanyVO } from '@/api/materials/company/types';
|
||||
|
||||
/**
|
||||
* 查询公司列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listCompany = (query?: CompanyQuery): AxiosPromise<CompanyVO[]> => {
|
||||
return request({
|
||||
url: '/materials/company/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询公司详细
|
||||
* @param id
|
||||
*/
|
||||
export const getCompany = (id: string | number): AxiosPromise<CompanyVO> => {
|
||||
return request({
|
||||
url: '/materials/company/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增公司
|
||||
* @param data
|
||||
*/
|
||||
export const addCompany = (data: CompanyForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/materials/company',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改公司
|
||||
* @param data
|
||||
*/
|
||||
export const updateCompany = (data: CompanyForm) => {
|
||||
return request({
|
||||
url: '/materials/company',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除公司
|
||||
* @param id
|
||||
*/
|
||||
export const delCompany = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/company/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
99
src/api/materials/company/types.ts
Normal file
99
src/api/materials/company/types.ts
Normal file
@ -0,0 +1,99 @@
|
||||
export interface CompanyVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
companyName: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 资质情况
|
||||
*/
|
||||
qualification: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface CompanyForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
companyName?: string;
|
||||
principalPhone?: string;
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 资质情况
|
||||
*/
|
||||
qualification?: string;
|
||||
}
|
||||
|
||||
export interface CompanyQuery extends PageQuery {
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
companyName?: string;
|
||||
principalPhone?: string;
|
||||
principal?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 帐号状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 资质情况
|
||||
*/
|
||||
qualification?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
62
src/api/materials/materials/index.ts
Normal file
62
src/api/materials/materials/index.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MaterialsForm, MaterialsQuery, MaterialsVO } from '@/api/materials/materials/types';
|
||||
|
||||
/**
|
||||
* 查询材料名称列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
export const listMaterials = (query?: MaterialsQuery): AxiosPromise<MaterialsVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materials/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询材料名称详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMaterials = (id: string | number): AxiosPromise<MaterialsVO> => {
|
||||
return request({
|
||||
url: '/materials/materials/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增材料名称
|
||||
* @param data
|
||||
*/
|
||||
export const addMaterials = (data: MaterialsForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/materials/materials',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改材料名称
|
||||
* @param data
|
||||
*/
|
||||
export const updateMaterials = (data: MaterialsForm) => {
|
||||
return request({
|
||||
url: '/materials/materials',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除材料名称
|
||||
* @param id
|
||||
*/
|
||||
export const delMaterials = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/materials/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
177
src/api/materials/materials/types.ts
Normal file
177
src/api/materials/materials/types.ts
Normal file
@ -0,0 +1,177 @@
|
||||
import { CompanyVO } from '@/api/materials/company/types';
|
||||
|
||||
export interface MaterialsVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName: string;
|
||||
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
companyId: string | number;
|
||||
|
||||
/**
|
||||
* 公司信息
|
||||
*/
|
||||
companyVo: CompanyVO;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 规格型号名称
|
||||
*/
|
||||
typeSpecificationName: string;
|
||||
|
||||
/**
|
||||
* 文件详情列表
|
||||
*/
|
||||
fileOssMap: Record<string, string>;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart: string;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
weightId: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 预计材料数量
|
||||
*/
|
||||
quantityCount: string;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MaterialsForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName?: string;
|
||||
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
companyId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 规格型号名称
|
||||
*/
|
||||
typeSpecificationName?: string;
|
||||
|
||||
/**
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
fileOssIdMap?: Record<string, string | number>;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart?: string;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
weightId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
/**
|
||||
* 预计材料数量
|
||||
*/
|
||||
quantityCount?: string;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface MaterialsQuery extends PageQuery {
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName?: string;
|
||||
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
companyId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 规格型号名称
|
||||
*/
|
||||
typeSpecificationName?: string;
|
||||
|
||||
/**
|
||||
* 文件对象存储id列表
|
||||
*/
|
||||
fileOssIdMap?: Map<string, string | number>;
|
||||
|
||||
/**
|
||||
* 使用部位
|
||||
*/
|
||||
usePart?: string;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
weightId?: string | number;
|
||||
|
||||
/**
|
||||
* 预计材料数量
|
||||
*/
|
||||
quantityCount?: string;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
status?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
63
src/api/materials/materialsInventory/index.ts
Normal file
63
src/api/materials/materialsInventory/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { MaterialsInventoryForm, MaterialsInventoryQuery, MaterialsInventoryVO } from '@/api/materials/materialsInventory/types';
|
||||
|
||||
/**
|
||||
* 查询材料出/入库列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listMaterialsInventory = (query?: MaterialsInventoryQuery): AxiosPromise<MaterialsInventoryVO[]> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询材料出/入库详细
|
||||
* @param id
|
||||
*/
|
||||
export const getMaterialsInventory = (id: string | number): AxiosPromise<MaterialsInventoryVO> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增材料出/入库
|
||||
* @param data
|
||||
*/
|
||||
export const addMaterialsInventory = (data: MaterialsInventoryForm): AxiosPromise<string | number> => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改材料出/入库
|
||||
* @param data
|
||||
*/
|
||||
export const updateMaterialsInventory = (data: MaterialsInventoryForm) => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除材料出/入库
|
||||
* @param id
|
||||
*/
|
||||
export const delMaterialsInventory = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/materials/materialsInventory/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
212
src/api/materials/materialsInventory/types.ts
Normal file
212
src/api/materials/materialsInventory/types.ts
Normal file
@ -0,0 +1,212 @@
|
||||
import { MaterialsVO } from '@/api/materials/materials/types';
|
||||
|
||||
export interface MaterialsInventoryVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 材料id
|
||||
*/
|
||||
materialsId: string | number;
|
||||
|
||||
/**
|
||||
* 材料信息
|
||||
*/
|
||||
materialsVo: MaterialsVO;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId: string | number;
|
||||
|
||||
/**
|
||||
* 出入库状态
|
||||
*/
|
||||
outPut: string;
|
||||
|
||||
/**
|
||||
* 出/入库的数量
|
||||
*/
|
||||
number: number;
|
||||
|
||||
/**
|
||||
* 出/入库操作时间
|
||||
*/
|
||||
outPutTime: string;
|
||||
|
||||
/**
|
||||
* 剩余库存数量(记录最后一次操作留下的库存数)
|
||||
*/
|
||||
residue: string | number;
|
||||
|
||||
/**
|
||||
* 操作人(入库人、领料人)
|
||||
*/
|
||||
operator: string;
|
||||
|
||||
/**
|
||||
* 材料出入证明
|
||||
*/
|
||||
path: string;
|
||||
|
||||
/**
|
||||
* 处理方式
|
||||
*/
|
||||
disposition: string;
|
||||
|
||||
/**
|
||||
* 交接单位(班组)
|
||||
*/
|
||||
recipient: string;
|
||||
|
||||
/**
|
||||
* 领用人
|
||||
*/
|
||||
shipper: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
createTime: string;
|
||||
}
|
||||
|
||||
export interface MaterialsInventoryForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 材料id
|
||||
*/
|
||||
materialsId?: string | number;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 出入库状态
|
||||
*/
|
||||
outPut?: string;
|
||||
|
||||
/**
|
||||
* 出/入库的数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 出/入库操作时间
|
||||
*/
|
||||
outPutTime?: string;
|
||||
|
||||
/**
|
||||
* 剩余库存数量(记录最后一次操作留下的库存数)
|
||||
*/
|
||||
residue?: string | number;
|
||||
|
||||
/**
|
||||
* 操作人(入库人、领料人)
|
||||
*/
|
||||
operator?: string;
|
||||
|
||||
/**
|
||||
* 材料出入证明
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 处理方式
|
||||
*/
|
||||
disposition?: string;
|
||||
|
||||
/**
|
||||
* 交接单位(班组)
|
||||
*/
|
||||
recipient?: string;
|
||||
|
||||
/**
|
||||
* 领用人
|
||||
*/
|
||||
shipper?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
}
|
||||
|
||||
export interface MaterialsInventoryQuery extends PageQuery {
|
||||
/**
|
||||
* 材料id
|
||||
*/
|
||||
materialsId?: string | number;
|
||||
|
||||
/**
|
||||
* 材料名称
|
||||
*/
|
||||
materialsName?: string;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
projectId?: string | number;
|
||||
|
||||
/**
|
||||
* 出入库状态
|
||||
*/
|
||||
outPut?: string;
|
||||
|
||||
/**
|
||||
* 出/入库的数量
|
||||
*/
|
||||
number?: number;
|
||||
|
||||
/**
|
||||
* 出/入库操作时间
|
||||
*/
|
||||
outPutTime?: string;
|
||||
|
||||
/**
|
||||
* 剩余库存数量(记录最后一次操作留下的库存数)
|
||||
*/
|
||||
residue?: string | number;
|
||||
|
||||
/**
|
||||
* 操作人(入库人、领料人)
|
||||
*/
|
||||
operator?: string;
|
||||
|
||||
/**
|
||||
* 材料出入证明
|
||||
*/
|
||||
path?: string;
|
||||
|
||||
/**
|
||||
* 处理方式
|
||||
*/
|
||||
disposition?: string;
|
||||
|
||||
/**
|
||||
* 交接单位(班组)
|
||||
*/
|
||||
recipient?: string;
|
||||
|
||||
/**
|
||||
* 领用人
|
||||
*/
|
||||
shipper?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
Reference in New Issue
Block a user