From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/api/erp/stock/stock/index.ts | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/src/api/erp/stock/stock/index.ts b/src/api/erp/stock/stock/index.ts
new file mode 100644
index 0000000..4de86fb
--- /dev/null
+++ b/src/api/erp/stock/stock/index.ts
@@ -0,0 +1,41 @@
+import request from '@/config/axios'
+
+// ERP 浜у搧搴撳瓨 VO
+export interface StockVO {
+ // 缂栧彿
+ id: number
+ // 浜у搧缂栧彿
+ productId: number
+ // 浠撳簱缂栧彿
+ warehouseId: number
+ // 搴撳瓨鏁伴噺
+ count: number
+}
+
+// ERP 浜у搧搴撳瓨 API
+export const StockApi = {
+ // 鏌ヨ浜у搧搴撳瓨鍒嗛〉
+ getStockPage: async (params: any) => {
+ return await request.get({ url: `/erp/stock/page`, params })
+ },
+
+ // 鏌ヨ浜у搧搴撳瓨璇︽儏
+ getStock: async (id: number) => {
+ return await request.get({ url: `/erp/stock/get?id=` + id })
+ },
+
+ // 鏌ヨ浜у搧搴撳瓨璇︽儏
+ getStock2: async (productId: number, warehouseId: number) => {
+ return await request.get({ url: `/erp/stock/get`, params: { productId, warehouseId } })
+ },
+
+ // 鑾峰緱浜у搧搴撳瓨鏁伴噺
+ getStockCount: async (productId: number) => {
+ return await request.get({ url: `/erp/stock/get-count`, params: { productId } })
+ },
+
+ // 瀵煎嚭浜у搧搴撳瓨 Excel
+ exportStock: async (params) => {
+ return await request.download({ url: `/erp/stock/export-excel`, params })
+ }
+}
--
Gitblit v1.8.0