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/category/index.ts |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/src/api/erp/product/category/index.ts b/src/api/erp/product/category/index.ts
new file mode 100644
index 0000000..d67ccff
--- /dev/null
+++ b/src/api/erp/product/category/index.ts
@@ -0,0 +1,49 @@
+import request from '@/config/axios'
+
+// ERP 浜у搧鍒嗙被 VO
+export interface ProductCategoryVO {
+  id: number // 鍒嗙被缂栧彿
+  parentId: number // 鐖跺垎绫荤紪鍙�
+  name: string // 鍒嗙被鍚嶇О
+  code: string // 鍒嗙被缂栫爜
+  sort: number // 鍒嗙被鎺掑簭
+  status: number // 寮�鍚姸鎬�
+}
+
+// ERP 浜у搧鍒嗙被 API
+export const ProductCategoryApi = {
+  // 鏌ヨ浜у搧鍒嗙被鍒楄〃
+  getProductCategoryList: async () => {
+    return await request.get({ url: `/erp/product-category/list` })
+  },
+
+  // 鏌ヨ浜у搧鍒嗙被绮剧畝鍒楄〃
+  getProductCategorySimpleList: async () => {
+    return await request.get({ url: `/erp/product-category/simple-list` })
+  },
+
+  // 鏌ヨ浜у搧鍒嗙被璇︽儏
+  getProductCategory: async (id: number) => {
+    return await request.get({ url: `/erp/product-category/get?id=` + id })
+  },
+
+  // 鏂板浜у搧鍒嗙被
+  createProductCategory: async (data: ProductCategoryVO) => {
+    return await request.post({ url: `/erp/product-category/create`, data })
+  },
+
+  // 淇敼浜у搧鍒嗙被
+  updateProductCategory: async (data: ProductCategoryVO) => {
+    return await request.put({ url: `/erp/product-category/update`, data })
+  },
+
+  // 鍒犻櫎浜у搧鍒嗙被
+  deleteProductCategory: async (id: number) => {
+    return await request.delete({ url: `/erp/product-category/delete?id=` + id })
+  },
+
+  // 瀵煎嚭浜у搧鍒嗙被 Excel
+  exportProductCategory: async (params) => {
+    return await request.download({ url: `/erp/product-category/export-excel`, params })
+  }
+}

--
Gitblit v1.8.0