Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Add product stock api
Browse files Browse the repository at this point in the history
  • Loading branch information
Jzow committed Oct 20, 2023
1 parent b80f7ed commit 96d4608
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/api/product/model/productModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export interface ProductStockResp {
id: number | string;
warehouseId: number | string;
warehouseName: string;
initStockQuantity: number;
lowStockQuantity: number;
highStockQuantity: number;
}
11 changes: 10 additions & 1 deletion src/api/product/product.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import {defHttp} from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
import {BaseDataResp} from "@/api/model/baseModel";
import {ProductStockResp} from "@/api/product/model/productModel";

enum Api {
getBarCode = '/product/getBarCode',
getStock = '/product/getStock',
}

export function getBarCode() {
Expand All @@ -12,4 +13,12 @@ export function getBarCode() {
url: Api.getBarCode,
}
);
}

export function getStock() {
return defHttp.get<BaseDataResp<ProductStockResp>>(
{
url: Api.getStock,
}
);
}

0 comments on commit 96d4608

Please sign in to comment.