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/product/product/index.ts | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/src/api/erp/product/product/index.ts b/src/api/erp/product/product/index.ts
new file mode 100644
index 0000000..1136282
--- /dev/null
+++ b/src/api/erp/product/product/index.ts
@@ -0,0 +1,57 @@
+import request from '@/config/axios'
+
+// ERP 浜у搧 VO
+export interface ProductVO {
+ id: number // 浜у搧缂栧彿
+ name: string // 浜у搧鍚嶇О
+ barCode: string // 浜у搧鏉$爜
+ categoryId: number // 浜у搧绫诲瀷缂栧彿
+ unitId: number // 鍗曚綅缂栧彿
+ unitName?: string // 鍗曚綅鍚嶅瓧
+ status: number // 浜у搧鐘舵��
+ standard: string // 浜у搧瑙勬牸
+ remark: string // 浜у搧澶囨敞
+ expiryDay: number // 淇濊川鏈熷ぉ鏁�
+ weight: number // 閲嶉噺锛坘g锛�
+ purchasePrice: number // 閲囪喘浠锋牸锛屽崟浣嶏細鍏�
+ salePrice: number // 閿�鍞环鏍硷紝鍗曚綅锛氬厓
+ minPrice: number // 鏈�浣庝环鏍硷紝鍗曚綅锛氬厓
+}
+
+// ERP 浜у搧 API
+export const ProductApi = {
+ // 鏌ヨ浜у搧鍒嗛〉
+ getProductPage: async (params: any) => {
+ return await request.get({ url: `/erp/product/page`, params })
+ },
+
+ // 鏌ヨ浜у搧绮剧畝鍒楄〃
+ getProductSimpleList: async () => {
+ return await request.get({ url: `/erp/product/simple-list` })
+ },
+
+ // 鏌ヨ浜у搧璇︽儏
+ getProduct: async (id: number) => {
+ return await request.get({ url: `/erp/product/get?id=` + id })
+ },
+
+ // 鏂板浜у搧
+ createProduct: async (data: ProductVO) => {
+ return await request.post({ url: `/erp/product/create`, data })
+ },
+
+ // 淇敼浜у搧
+ updateProduct: async (data: ProductVO) => {
+ return await request.put({ url: `/erp/product/update`, data })
+ },
+
+ // 鍒犻櫎浜у搧
+ deleteProduct: async (id: number) => {
+ return await request.delete({ url: `/erp/product/delete?id=` + id })
+ },
+
+ // 瀵煎嚭浜у搧 Excel
+ exportProduct: async (params) => {
+ return await request.download({ url: `/erp/product/export-excel`, params })
+ }
+}
--
Gitblit v1.8.0