| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- import {
- GetInventoryParams,
- BaseResult,
- MplanInventoryParams,
- EditInventoryParams,
- AddInventoryParams,
- BaseListResult,
- GetInventoryData,
- } from '@models';
- import {request} from './network';
- const BASE_URL = '/inventory';
- /** 查询物料管理列表 */
- export function GetInventoryList(
- data: GetInventoryParams,
- ): BaseListResult<GetInventoryData> {
- return request({
- method: 'GET',
- url: BASE_URL + '/getInventoryLists',
- data,
- });
- }
- /** 查询物料管理列表 */
- export function GetInventoryInfo(
- id: string,
- ): BaseListResult<GetInventoryData> {
- return request({
- method: 'GET',
- url: BASE_URL + '/getInventoryLists',
- data: {id, page: '1', limit: '1'},
- });
- }
- /** 物料管理导出 */
- export function exportInventory(
- data: GetInventoryParams,
- ): BaseResult {
- return request({
- method: 'GET',
- url: BASE_URL + '/inventoryExport',
- data,
- });
- }
- /** 新增物料管理 */
- export function addInventory(
- data: AddInventoryParams,
- ): BaseResult {
- return request({
- method: 'POST',
- url: BASE_URL + '/addInventory',
- data,
- });
- }
- /** 删除物料 */
- export function DeleteInventory(
- id: string,
- ): BaseResult {
- return request({
- method: 'DELETE',
- url: BASE_URL + '/delInventory',
- data: {id},
- });
- }
- /** 修改物料 */
- export function updateInventory(
- data: EditInventoryParams,
- ): BaseResult {
- return request({
- method: 'PUT',
- url: BASE_URL + '/updateInventory',
- data,
- });
- }
|