完成仓库模块

This commit is contained in:
Zy
2026-04-23 17:59:36 +08:00
parent 985860c9de
commit 9d4416b238
39 changed files with 5040 additions and 80 deletions

View File

@@ -0,0 +1,63 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { StockInVO, StockInForm, StockInQuery } from './type';
/**
* 查询入库主列表
* @param query
* @returns {*}
*/
export const listStockIn = (query?: StockInQuery): AxiosPromise<StockInVO[]> => {
return request({
url: '/stockIn/list',
method: 'get',
params: query
});
};
/**
* 查询入库主详细
* @param id
*/
export const getStockIn = (id: string | number): AxiosPromise<StockInVO> => {
return request({
url: '/stockIn/' + id,
method: 'get'
});
};
/**
* 新增入库主
* @param data
*/
export const addStockIn = (data: StockInForm) => {
return request({
url: '/stockIn',
method: 'post',
data: data
});
};
/**
* 修改入库主
* @param data
*/
export const updateStockIn = (data: StockInForm) => {
return request({
url: '/stockIn',
method: 'put',
data: data
});
};
/**
* 删除入库主
* @param id
*/
export const delStockIn = (id: string | number | Array<string | number>) => {
return request({
url: '/stockIn/' + id,
method: 'delete'
});
};

View File

@@ -0,0 +1,128 @@
import { MaterialVO } from '../Tmaterial/type';
export interface StockInVO {
/**
* 主键
*/
id: string | number;
/**
* 入库单号*
*/
inNo: string;
/**
* 入库日期*
*/
inDate: string;
totalAmount: string;
/**
* 供应商id*
*/
supplierId: string;
/**
* 入库仓库id*
*/
warehouseId: string;
/**
* 操作状态 入库/未入库
*/
operateStatus: string;
/**
* 负责人
*/
leader: string;
/**
* 备注
*/
remark: string;
items: MaterialVO[];
warehouseName: string;
supplierName: string;
createTime: string;
}
export interface StockInForm extends BaseEntity {
/**
* 主键
*/
id?: string | number;
/**
* 入库单号*
*/
inNo?: string;
/**
* 入库日期*
*/
inDate?: string;
/**
* 供应商id*
*/
supplierId?: string;
/**
* 入库仓库id*
*/
warehouseId?: string;
/**
* 操作状态 入库/未入库
*/
operateStatus?: string;
/**
* 负责人
*/
leader?: string;
/**
* 备注
*/
remark?: string;
}
export interface StockInQuery extends PageQuery {
/**
* 入库单号*
*/
inNo?: string;
/**
* 入库日期*
*/
inDate?: string;
/**
* 供应商id*
*/
supplierId?: string;
/**
* 入库仓库id*
*/
warehouseId?: string;
/**
* 操作状态 入库/未入库
*/
operateStatus?: string;
/**
* 负责人
*/
leader?: string;
/**
* 日期范围参数
*/
params?: any;
}